fc5b9fddab278a82f224ca3a785a6277a009cb99
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.53.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 if expr a : '\(a\)' >/dev/null 2>&1; then
11   as_expr=expr
12 else
13   as_expr=false
14 fi
15
16
17 ## --------------------- ##
18 ## M4sh Initialization.  ##
19 ## --------------------- ##
20
21 # Be Bourne compatible
22 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23   emulate sh
24   NULLCMD=:
25 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26   set -o posix
27 fi
28
29 # NLS nuisances.
30 # Support unset when possible.
31 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
32   as_unset=unset
33 else
34   as_unset=false
35 fi
36
37 (set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
38     { $as_unset LANG || test "${LANG+set}" != set; } ||
39       { LANG=C; export LANG; }
40 (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
41     { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
42       { LC_ALL=C; export LC_ALL; }
43 (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
44     { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
45       { LC_TIME=C; export LC_TIME; }
46 (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
47     { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
48       { LC_CTYPE=C; export LC_CTYPE; }
49 (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
50     { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
51       { LANGUAGE=C; export LANGUAGE; }
52 (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
53     { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
54       { LC_COLLATE=C; export LC_COLLATE; }
55 (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
56     { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
57       { LC_NUMERIC=C; export LC_NUMERIC; }
58 (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
59     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
60       { LC_MESSAGES=C; export LC_MESSAGES; }
61
62
63 # Name of the executable.
64 as_me=`(basename "$0") 2>/dev/null ||
65 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66          X"$0" : 'X\(//\)$' \| \
67          X"$0" : 'X\(/\)$' \| \
68          .     : '\(.\)' 2>/dev/null ||
69 echo X/"$0" |
70     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
71           /^X\/\(\/\/\)$/{ s//\1/; q; }
72           /^X\/\(\/\).*/{ s//\1/; q; }
73           s/.*/./; q'`
74
75 # PATH needs CR, and LINENO needs CR and PATH.
76 # Avoid depending upon Character Ranges.
77 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
78 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
79 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
80 as_cr_digits='0123456789'
81 as_cr_alnum=$as_cr_Letters$as_cr_digits
82
83 # The user is always right.
84 if test "${PATH_SEPARATOR+set}" != set; then
85   echo "#! /bin/sh" >conftest.sh
86   echo  "exit 0"   >>conftest.sh
87   chmod +x conftest.sh
88   if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
89     PATH_SEPARATOR=';'
90   else
91     PATH_SEPARATOR=:
92   fi
93   rm -f conftest.sh
94 fi
95
96
97   as_lineno_1=$LINENO
98   as_lineno_2=$LINENO
99   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
100   test "x$as_lineno_1" != "x$as_lineno_2" &&
101   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
102   # Find who we are.  Look in the path if we contain no path at all
103   # relative or not.
104   case $0 in
105     *[\\/]* ) as_myself=$0 ;;
106     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
107 for as_dir in $PATH
108 do
109   IFS=$as_save_IFS
110   test -z "$as_dir" && as_dir=.
111   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
112 done
113
114        ;;
115   esac
116   # We did not find ourselves, most probably we were run as `sh COMMAND'
117   # in which case we are not to be found in the path.
118   if test "x$as_myself" = x; then
119     as_myself=$0
120   fi
121   if test ! -f "$as_myself"; then
122     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
123    { (exit 1); exit 1; }; }
124   fi
125   case $CONFIG_SHELL in
126   '')
127     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
128 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
129 do
130   IFS=$as_save_IFS
131   test -z "$as_dir" && as_dir=.
132   for as_base in sh bash ksh sh5; do
133          case $as_dir in
134          /*)
135            if ("$as_dir/$as_base" -c '
136   as_lineno_1=$LINENO
137   as_lineno_2=$LINENO
138   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
139   test "x$as_lineno_1" != "x$as_lineno_2" &&
140   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
141              CONFIG_SHELL=$as_dir/$as_base
142              export CONFIG_SHELL
143              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
144            fi;;
145          esac
146        done
147 done
148 ;;
149   esac
150
151   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
152   # uniformly replaced by the line number.  The first 'sed' inserts a
153   # line-number line before each line; the second 'sed' does the real
154   # work.  The second script uses 'N' to pair each line-number line
155   # with the numbered line, and appends trailing '-' during
156   # substitution so that $LINENO is not a special case at line end.
157   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
158   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
159   sed '=' <$as_myself |
160     sed '
161       N
162       s,$,-,
163       : loop
164       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
165       t loop
166       s,-$,,
167       s,^['$as_cr_digits']*\n,,
168     ' >$as_me.lineno &&
169   chmod +x $as_me.lineno ||
170     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
171    { (exit 1); exit 1; }; }
172
173   # Don't try to exec as it changes $[0], causing all sort of problems
174   # (the dirname of $[0] is not the place where we might find the
175   # original and so on.  Autoconf is especially sensible to this).
176   . ./$as_me.lineno
177   # Exit status is that of the last command.
178   exit
179 }
180
181
182 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
183   *c*,-n*) ECHO_N= ECHO_C='
184 ' ECHO_T='      ' ;;
185   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
186   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
187 esac
188
189 if expr a : '\(a\)' >/dev/null 2>&1; then
190   as_expr=expr
191 else
192   as_expr=false
193 fi
194
195 rm -f conf$$ conf$$.exe conf$$.file
196 echo >conf$$.file
197 if ln -s conf$$.file conf$$ 2>/dev/null; then
198   # We could just check for DJGPP; but this test a) works b) is more generic
199   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
200   if test -f conf$$.exe; then
201     # Don't use ln at all; we don't have any links
202     as_ln_s='cp -p'
203   else
204     as_ln_s='ln -s'
205   fi
206 elif ln conf$$.file conf$$ 2>/dev/null; then
207   as_ln_s=ln
208 else
209   as_ln_s='cp -p'
210 fi
211 rm -f conf$$ conf$$.exe conf$$.file
212
213 as_executable_p="test -f"
214
215 # Sed expression to map a string onto a valid CPP name.
216 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
217
218 # Sed expression to map a string onto a valid variable name.
219 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
220
221
222 # IFS
223 # We need space, tab and new line, in precisely that order.
224 as_nl='
225 '
226 IFS="   $as_nl"
227
228 # CDPATH.
229 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
230
231
232 # Name of the host.
233 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
234 # so uname gets run too.
235 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
236
237 exec 6>&1
238
239 #
240 # Initializations.
241 #
242 ac_default_prefix=/usr/local
243 cross_compiling=no
244 subdirs=
245 MFLAGS=
246 MAKEFLAGS=
247 SHELL=${CONFIG_SHELL-/bin/sh}
248
249 # Maximum number of lines to put in a shell here document.
250 # This variable seems obsolete.  It should probably be removed, and
251 # only ac_max_sed_lines should be used.
252 : ${ac_max_here_lines=38}
253
254 # Identity of this package.
255 PACKAGE_NAME=
256 PACKAGE_TARNAME=
257 PACKAGE_VERSION=
258 PACKAGE_STRING=
259 PACKAGE_BUGREPORT=
260
261 ac_unique_file="driver/subprocs.c"
262 # Factoring default headers for most tests.
263 ac_includes_default="\
264 #include <stdio.h>
265 #if HAVE_SYS_TYPES_H
266 # include <sys/types.h>
267 #endif
268 #if HAVE_SYS_STAT_H
269 # include <sys/stat.h>
270 #endif
271 #if STDC_HEADERS
272 # include <stdlib.h>
273 # include <stddef.h>
274 #else
275 # if HAVE_STDLIB_H
276 #  include <stdlib.h>
277 # endif
278 #endif
279 #if HAVE_STRING_H
280 # if !STDC_HEADERS && HAVE_MEMORY_H
281 #  include <memory.h>
282 # endif
283 # include <string.h>
284 #endif
285 #if HAVE_STRINGS_H
286 # include <strings.h>
287 #endif
288 #if HAVE_INTTYPES_H
289 # include <inttypes.h>
290 #else
291 # if HAVE_STDINT_H
292 #  include <stdint.h>
293 # endif
294 #endif
295 #if HAVE_UNISTD_H
296 # include <unistd.h>
297 #endif"
298
299
300 # Initialize some variables set by options.
301 ac_init_help=
302 ac_init_version=false
303 # The variables have the same names as the options, with
304 # dashes changed to underlines.
305 cache_file=/dev/null
306 exec_prefix=NONE
307 no_create=
308 no_recursion=
309 prefix=NONE
310 program_prefix=NONE
311 program_suffix=NONE
312 program_transform_name=s,x,x,
313 silent=
314 site=
315 srcdir=
316 verbose=
317 x_includes=NONE
318 x_libraries=NONE
319
320 # Installation directory options.
321 # These are left unexpanded so users can "make install exec_prefix=/foo"
322 # and all the variables that are supposed to be based on exec_prefix
323 # by default will actually change.
324 # Use braces instead of parens because sh, perl, etc. also accept them.
325 bindir='${exec_prefix}/bin'
326 sbindir='${exec_prefix}/sbin'
327 libexecdir='${exec_prefix}/libexec'
328 datadir='${prefix}/share'
329 sysconfdir='${prefix}/etc'
330 sharedstatedir='${prefix}/com'
331 localstatedir='${prefix}/var'
332 libdir='${exec_prefix}/lib'
333 includedir='${prefix}/include'
334 oldincludedir='/usr/include'
335 infodir='${prefix}/info'
336 mandir='${prefix}/man'
337
338 ac_prev=
339 for ac_option
340 do
341   # If the previous option needs an argument, assign it.
342   if test -n "$ac_prev"; then
343     eval "$ac_prev=\$ac_option"
344     ac_prev=
345     continue
346   fi
347
348   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
349
350   # Accept the important Cygnus configure options, so we can diagnose typos.
351
352   case $ac_option in
353
354   -bindir | --bindir | --bindi | --bind | --bin | --bi)
355     ac_prev=bindir ;;
356   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
357     bindir=$ac_optarg ;;
358
359   -build | --build | --buil | --bui | --bu)
360     ac_prev=build_alias ;;
361   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
362     build_alias=$ac_optarg ;;
363
364   -cache-file | --cache-file | --cache-fil | --cache-fi \
365   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
366     ac_prev=cache_file ;;
367   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
368   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
369     cache_file=$ac_optarg ;;
370
371   --config-cache | -C)
372     cache_file=config.cache ;;
373
374   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
375     ac_prev=datadir ;;
376   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
377   | --da=*)
378     datadir=$ac_optarg ;;
379
380   -disable-* | --disable-*)
381     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
382     # Reject names that are not valid shell variable names.
383     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
384       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
385    { (exit 1); exit 1; }; }
386     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
387     eval "enable_$ac_feature=no" ;;
388
389   -enable-* | --enable-*)
390     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
391     # Reject names that are not valid shell variable names.
392     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
393       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
394    { (exit 1); exit 1; }; }
395     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
396     case $ac_option in
397       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
398       *) ac_optarg=yes ;;
399     esac
400     eval "enable_$ac_feature='$ac_optarg'" ;;
401
402   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
403   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
404   | --exec | --exe | --ex)
405     ac_prev=exec_prefix ;;
406   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
407   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
408   | --exec=* | --exe=* | --ex=*)
409     exec_prefix=$ac_optarg ;;
410
411   -gas | --gas | --ga | --g)
412     # Obsolete; use --with-gas.
413     with_gas=yes ;;
414
415   -help | --help | --hel | --he | -h)
416     ac_init_help=long ;;
417   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
418     ac_init_help=recursive ;;
419   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
420     ac_init_help=short ;;
421
422   -host | --host | --hos | --ho)
423     ac_prev=host_alias ;;
424   -host=* | --host=* | --hos=* | --ho=*)
425     host_alias=$ac_optarg ;;
426
427   -includedir | --includedir | --includedi | --included | --include \
428   | --includ | --inclu | --incl | --inc)
429     ac_prev=includedir ;;
430   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
431   | --includ=* | --inclu=* | --incl=* | --inc=*)
432     includedir=$ac_optarg ;;
433
434   -infodir | --infodir | --infodi | --infod | --info | --inf)
435     ac_prev=infodir ;;
436   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
437     infodir=$ac_optarg ;;
438
439   -libdir | --libdir | --libdi | --libd)
440     ac_prev=libdir ;;
441   -libdir=* | --libdir=* | --libdi=* | --libd=*)
442     libdir=$ac_optarg ;;
443
444   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
445   | --libexe | --libex | --libe)
446     ac_prev=libexecdir ;;
447   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
448   | --libexe=* | --libex=* | --libe=*)
449     libexecdir=$ac_optarg ;;
450
451   -localstatedir | --localstatedir | --localstatedi | --localstated \
452   | --localstate | --localstat | --localsta | --localst \
453   | --locals | --local | --loca | --loc | --lo)
454     ac_prev=localstatedir ;;
455   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
456   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
457   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
458     localstatedir=$ac_optarg ;;
459
460   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
461     ac_prev=mandir ;;
462   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
463     mandir=$ac_optarg ;;
464
465   -nfp | --nfp | --nf)
466     # Obsolete; use --without-fp.
467     with_fp=no ;;
468
469   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
470   | --no-cr | --no-c | -n)
471     no_create=yes ;;
472
473   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
474   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
475     no_recursion=yes ;;
476
477   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
478   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
479   | --oldin | --oldi | --old | --ol | --o)
480     ac_prev=oldincludedir ;;
481   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
482   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
483   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
484     oldincludedir=$ac_optarg ;;
485
486   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
487     ac_prev=prefix ;;
488   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
489     prefix=$ac_optarg ;;
490
491   -program-prefix | --program-prefix | --program-prefi | --program-pref \
492   | --program-pre | --program-pr | --program-p)
493     ac_prev=program_prefix ;;
494   -program-prefix=* | --program-prefix=* | --program-prefi=* \
495   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
496     program_prefix=$ac_optarg ;;
497
498   -program-suffix | --program-suffix | --program-suffi | --program-suff \
499   | --program-suf | --program-su | --program-s)
500     ac_prev=program_suffix ;;
501   -program-suffix=* | --program-suffix=* | --program-suffi=* \
502   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503     program_suffix=$ac_optarg ;;
504
505   -program-transform-name | --program-transform-name \
506   | --program-transform-nam | --program-transform-na \
507   | --program-transform-n | --program-transform- \
508   | --program-transform | --program-transfor \
509   | --program-transfo | --program-transf \
510   | --program-trans | --program-tran \
511   | --progr-tra | --program-tr | --program-t)
512     ac_prev=program_transform_name ;;
513   -program-transform-name=* | --program-transform-name=* \
514   | --program-transform-nam=* | --program-transform-na=* \
515   | --program-transform-n=* | --program-transform-=* \
516   | --program-transform=* | --program-transfor=* \
517   | --program-transfo=* | --program-transf=* \
518   | --program-trans=* | --program-tran=* \
519   | --progr-tra=* | --program-tr=* | --program-t=*)
520     program_transform_name=$ac_optarg ;;
521
522   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
523   | -silent | --silent | --silen | --sile | --sil)
524     silent=yes ;;
525
526   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
527     ac_prev=sbindir ;;
528   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
529   | --sbi=* | --sb=*)
530     sbindir=$ac_optarg ;;
531
532   -sharedstatedir | --sharedstatedir | --sharedstatedi \
533   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
534   | --sharedst | --shareds | --shared | --share | --shar \
535   | --sha | --sh)
536     ac_prev=sharedstatedir ;;
537   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
538   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
539   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
540   | --sha=* | --sh=*)
541     sharedstatedir=$ac_optarg ;;
542
543   -site | --site | --sit)
544     ac_prev=site ;;
545   -site=* | --site=* | --sit=*)
546     site=$ac_optarg ;;
547
548   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
549     ac_prev=srcdir ;;
550   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
551     srcdir=$ac_optarg ;;
552
553   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
554   | --syscon | --sysco | --sysc | --sys | --sy)
555     ac_prev=sysconfdir ;;
556   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
557   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
558     sysconfdir=$ac_optarg ;;
559
560   -target | --target | --targe | --targ | --tar | --ta | --t)
561     ac_prev=target_alias ;;
562   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
563     target_alias=$ac_optarg ;;
564
565   -v | -verbose | --verbose | --verbos | --verbo | --verb)
566     verbose=yes ;;
567
568   -version | --version | --versio | --versi | --vers | -V)
569     ac_init_version=: ;;
570
571   -with-* | --with-*)
572     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
573     # Reject names that are not valid shell variable names.
574     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
575       { echo "$as_me: error: invalid package name: $ac_package" >&2
576    { (exit 1); exit 1; }; }
577     ac_package=`echo $ac_package| sed 's/-/_/g'`
578     case $ac_option in
579       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
580       *) ac_optarg=yes ;;
581     esac
582     eval "with_$ac_package='$ac_optarg'" ;;
583
584   -without-* | --without-*)
585     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
586     # Reject names that are not valid shell variable names.
587     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
588       { echo "$as_me: error: invalid package name: $ac_package" >&2
589    { (exit 1); exit 1; }; }
590     ac_package=`echo $ac_package | sed 's/-/_/g'`
591     eval "with_$ac_package=no" ;;
592
593   --x)
594     # Obsolete; use --with-x.
595     with_x=yes ;;
596
597   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
598   | --x-incl | --x-inc | --x-in | --x-i)
599     ac_prev=x_includes ;;
600   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
601   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
602     x_includes=$ac_optarg ;;
603
604   -x-libraries | --x-libraries | --x-librarie | --x-librari \
605   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
606     ac_prev=x_libraries ;;
607   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
608   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
609     x_libraries=$ac_optarg ;;
610
611   -*) { echo "$as_me: error: unrecognized option: $ac_option
612 Try \`$0 --help' for more information." >&2
613    { (exit 1); exit 1; }; }
614     ;;
615
616   *=*)
617     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
618     # Reject names that are not valid shell variable names.
619     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
620       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
621    { (exit 1); exit 1; }; }
622     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
623     eval "$ac_envvar='$ac_optarg'"
624     export $ac_envvar ;;
625
626   *)
627     # FIXME: should be removed in autoconf 3.0.
628     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
629     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
630       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
631     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
632     ;;
633
634   esac
635 done
636
637 if test -n "$ac_prev"; then
638   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
639   { echo "$as_me: error: missing argument to $ac_option" >&2
640    { (exit 1); exit 1; }; }
641 fi
642
643 # Be sure to have absolute paths.
644 for ac_var in exec_prefix prefix
645 do
646   eval ac_val=$`echo $ac_var`
647   case $ac_val in
648     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
649     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
650    { (exit 1); exit 1; }; };;
651   esac
652 done
653
654 # Be sure to have absolute paths.
655 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
656               localstatedir libdir includedir oldincludedir infodir mandir
657 do
658   eval ac_val=$`echo $ac_var`
659   case $ac_val in
660     [\\/$]* | ?:[\\/]* ) ;;
661     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
662    { (exit 1); exit 1; }; };;
663   esac
664 done
665
666 # There might be people who depend on the old broken behavior: `$host'
667 # used to hold the argument of --host etc.
668 # FIXME: To remove some day.
669 build=$build_alias
670 host=$host_alias
671 target=$target_alias
672
673 # FIXME: To remove some day.
674 if test "x$host_alias" != x; then
675   if test "x$build_alias" = x; then
676     cross_compiling=maybe
677     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
678     If a cross compiler is detected then cross compile mode will be used." >&2
679   elif test "x$build_alias" != "x$host_alias"; then
680     cross_compiling=yes
681   fi
682 fi
683
684 ac_tool_prefix=
685 test -n "$host_alias" && ac_tool_prefix=$host_alias-
686
687 test "$silent" = yes && exec 6>/dev/null
688
689
690 # Find the source files, if location was not specified.
691 if test -z "$srcdir"; then
692   ac_srcdir_defaulted=yes
693   # Try the directory containing this script, then its parent.
694   ac_confdir=`(dirname "$0") 2>/dev/null ||
695 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
696          X"$0" : 'X\(//\)[^/]' \| \
697          X"$0" : 'X\(//\)$' \| \
698          X"$0" : 'X\(/\)' \| \
699          .     : '\(.\)' 2>/dev/null ||
700 echo X"$0" |
701     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
702           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
703           /^X\(\/\/\)$/{ s//\1/; q; }
704           /^X\(\/\).*/{ s//\1/; q; }
705           s/.*/./; q'`
706   srcdir=$ac_confdir
707   if test ! -r $srcdir/$ac_unique_file; then
708     srcdir=..
709   fi
710 else
711   ac_srcdir_defaulted=no
712 fi
713 if test ! -r $srcdir/$ac_unique_file; then
714   if test "$ac_srcdir_defaulted" = yes; then
715     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
716    { (exit 1); exit 1; }; }
717   else
718     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
719    { (exit 1); exit 1; }; }
720   fi
721 fi
722 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
723 ac_env_build_alias_set=${build_alias+set}
724 ac_env_build_alias_value=$build_alias
725 ac_cv_env_build_alias_set=${build_alias+set}
726 ac_cv_env_build_alias_value=$build_alias
727 ac_env_host_alias_set=${host_alias+set}
728 ac_env_host_alias_value=$host_alias
729 ac_cv_env_host_alias_set=${host_alias+set}
730 ac_cv_env_host_alias_value=$host_alias
731 ac_env_target_alias_set=${target_alias+set}
732 ac_env_target_alias_value=$target_alias
733 ac_cv_env_target_alias_set=${target_alias+set}
734 ac_cv_env_target_alias_value=$target_alias
735 ac_env_CC_set=${CC+set}
736 ac_env_CC_value=$CC
737 ac_cv_env_CC_set=${CC+set}
738 ac_cv_env_CC_value=$CC
739 ac_env_CFLAGS_set=${CFLAGS+set}
740 ac_env_CFLAGS_value=$CFLAGS
741 ac_cv_env_CFLAGS_set=${CFLAGS+set}
742 ac_cv_env_CFLAGS_value=$CFLAGS
743 ac_env_LDFLAGS_set=${LDFLAGS+set}
744 ac_env_LDFLAGS_value=$LDFLAGS
745 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
746 ac_cv_env_LDFLAGS_value=$LDFLAGS
747 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
748 ac_env_CPPFLAGS_value=$CPPFLAGS
749 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
750 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
751 ac_env_CPP_set=${CPP+set}
752 ac_env_CPP_value=$CPP
753 ac_cv_env_CPP_set=${CPP+set}
754 ac_cv_env_CPP_value=$CPP
755
756 #
757 # Report the --help message.
758 #
759 if test "$ac_init_help" = "long"; then
760   # Omit some internal or obsolete options to make the list less imposing.
761   # This message is too long to be a string in the A/UX 3.1 sh.
762   cat <<_ACEOF
763 \`configure' configures this package to adapt to many kinds of systems.
764
765 Usage: $0 [OPTION]... [VAR=VALUE]...
766
767 To assign environment variables (e.g., CC, CFLAGS...), specify them as
768 VAR=VALUE.  See below for descriptions of some of the useful variables.
769
770 Defaults for the options are specified in brackets.
771
772
773 Configuration:
774
775   -h, --help              display this help and exit
776       --help=short        display options specific to this package
777       --help=recursive    display the short help of all the included packages
778   -V, --version           display version information and exit
779   -q, --quiet, --silent   do not print \`checking...' messages
780       --cache-file=FILE   cache test results in FILE [disabled]
781   -C, --config-cache      alias for \`--cache-file=config.cache'
782   -n, --no-create         do not create output files
783       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
784
785 _ACEOF
786
787   cat <<_ACEOF
788 Installation directories:
789   --prefix=PREFIX         install architecture-independent files in PREFIX
790                           [$ac_default_prefix]
791   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
792                           [PREFIX]
793
794 By default, \`make install' will install all the files in
795 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
796 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
797 for instance \`--prefix=\$HOME'.
798
799 For better control, use the options below.
800
801 Fine tuning of the installation directories:
802   --bindir=DIR           user executables [EPREFIX/bin]
803   --libdir=DIR           object code libraries [EPREFIX/lib]
804   --includedir=DIR       C header files [PREFIX/include]
805   --x-includes=DIR        X include files are in DIR
806   --x-libraries=DIR       X library files are in DIR
807   --mandir=DIR           man documentation [PREFIX/man]
808 _ACEOF
809
810   cat <<\_ACEOF
811
812 X features:
813   --x-includes=DIR    X include files are in DIR
814   --x-libraries=DIR   X library files are in DIR
815
816 System types:
817   --build=BUILD     configure for building on BUILD [guessed]
818   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
819 _ACEOF
820 fi
821
822 if test -n "$ac_init_help"; then
823
824   cat <<\_ACEOF
825
826 Optional Features:
827   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
828   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
829
830
831 Screen locking options:
832
833   --enable-locking        Compile in support for locking the display.
834   --disable-locking       Do not allow locking at all.
835
836 Optional Packages:
837   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
838   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
839 Installation options:
840
841   --with-hackdir=DIR      Where to install the hundreds of demo executables.
842                           Default: \`PREFIX/lib/xscreensaver/'
843   --with-configdir=DIR    Where to install the data files that describe each
844                           of the display modes to the GUI.
845                           Default: \`GNOMEPREFIX/control-center/screensavers/'
846                           or \`PREFIX/lib/xscreensaver/config/', depending on
847                           whether GNOME is available.
848
849 Except where noted, all of the --with options below can also take a
850 directory argument: for example, \`--with-motif=/opt/Motif'.  That would
851 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
852 to be added to the -L list, assuming those directories exist.
853
854 By default, support for each of these options will be built in, if the
855 relevant library routines exist.  At run time, they will then be used
856 only if the X server being used supports them.  Each --with option has
857 a corresponding --without option, to override building support for them
858 at all.
859
860 Screen blanking and idle-detection options:
861
862   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
863   --with-mit-ext          Include support for the MIT-SCREEN-SAVER extension.
864   --with-xidle-ext        Include support for the XIDLE extension.
865   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
866   --with-dpms-ext         Include support for the DPMS extension.
867   --with-xinerama-ext     Include support for the XINERAMA extension.
868   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
869   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
870   --with-proc-interrupts  Include support for consulting the /proc/interrupts
871                           file to notice keyboard activity.
872   --with-pam              Include support for PAM (Pluggable Auth Modules.)
873   --with-kerberos         Include support for Kerberos authentication.
874   --with-shadow           Include support for shadow password authentication.
875
876 User interface options:
877
878   --with-motif            Use the Motif toolkit for the user interface
879                           (not recommended.)
880   --with-gtk              Use the Gtk toolkit for the user interface.
881   --with-gnome            Include support for the Gnome 1.x Control Center.
882                           (This option is not needed with GTK 2.x / Gnome 2.x.)
883
884   --with-xml              The XML toolkit is needed for some parts of
885                           the Gtk interface.  Without it, the configuration
886                           interface will be much less featureful.
887
888 Graphics options:
889
890   --with-gl               Build those demos which depend on OpenGL.
891   --with-gle              Build those demos which depend on GLE
892                           (the OpenGL "extrusion" library.)
893   --with-xpm              Include support for XPM files in some demos.
894                           (Not needed if Pixbuf is used.)
895   --with-pixbuf           Include support for the GDK-Pixbuf library in some
896                           demos, which will make it possible for them to read
897                           GIF, JPEG, and PNG files as well.  (The path here is
898                           ignored if GTK 2.x is being used.)
899   --with-jpeg             Include support for the JPEG library.
900   --with-xshm-ext         Include support for the Shared Memory extension.
901   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
902   --with-readdisplay      Include support for the XReadDisplay extension.
903
904   --with-fortune=PROGRAM  Some demos are able to run an external program and
905                           display its text; this names the program to use by
906                           default (though it can be overridden with X
907                           resources.)  Default is \"/usr/games/fortune\".
908   --with-setuid-hacks     Allow some demos to be installed \`setuid root'
909                           (which is needed in order to ping other hosts.)
910
911
912 Some influential environment variables:
913   CC          C compiler command
914   CFLAGS      C compiler flags
915   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
916               nonstandard directory <lib dir>
917   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
918               headers in a nonstandard directory <include dir>
919   CPP         C preprocessor
920
921 Use these variables to override the choices made by `configure' or to help
922 it to find libraries and programs with nonstandard names/locations.
923
924 _ACEOF
925 fi
926
927 if test "$ac_init_help" = "recursive"; then
928   # If there are subdirs, report their specific --help.
929   ac_popdir=`pwd`
930   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
931     test -d $ac_dir || continue
932     ac_builddir=.
933
934 if test "$ac_dir" != .; then
935   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
936   # A "../" for each directory in $ac_dir_suffix.
937   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
938 else
939   ac_dir_suffix= ac_top_builddir=
940 fi
941
942 case $srcdir in
943   .)  # No --srcdir option.  We are building in place.
944     ac_srcdir=.
945     if test -z "$ac_top_builddir"; then
946        ac_top_srcdir=.
947     else
948        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
949     fi ;;
950   [\\/]* | ?:[\\/]* )  # Absolute path.
951     ac_srcdir=$srcdir$ac_dir_suffix;
952     ac_top_srcdir=$srcdir ;;
953   *) # Relative path.
954     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
955     ac_top_srcdir=$ac_top_builddir$srcdir ;;
956 esac
957 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
958 # absolute.
959 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
960 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
961 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
962 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
963
964     cd $ac_dir
965     # Check for guested configure; otherwise get Cygnus style configure.
966     if test -f $ac_srcdir/configure.gnu; then
967       echo
968       $SHELL $ac_srcdir/configure.gnu  --help=recursive
969     elif test -f $ac_srcdir/configure; then
970       echo
971       $SHELL $ac_srcdir/configure  --help=recursive
972     elif test -f $ac_srcdir/configure.ac ||
973            test -f $ac_srcdir/configure.in; then
974       echo
975       $ac_configure --help
976     else
977       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
978     fi
979     cd $ac_popdir
980   done
981 fi
982
983 test -n "$ac_init_help" && exit 0
984 if $ac_init_version; then
985   cat <<\_ACEOF
986
987 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
988 Free Software Foundation, Inc.
989 This configure script is free software; the Free Software Foundation
990 gives unlimited permission to copy, distribute and modify it.
991 _ACEOF
992   exit 0
993 fi
994 exec 5>config.log
995 cat >&5 <<_ACEOF
996 This file contains any messages produced by compilers while
997 running configure, to aid debugging if configure makes a mistake.
998
999 It was created by $as_me, which was
1000 generated by GNU Autoconf 2.53.  Invocation command line was
1001
1002   $ $0 $@
1003
1004 _ACEOF
1005 {
1006 cat <<_ASUNAME
1007 ## --------- ##
1008 ## Platform. ##
1009 ## --------- ##
1010
1011 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1012 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1013 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1014 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1015 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1016
1017 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1018 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1019
1020 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1021 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1022 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1023 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1024 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1025 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1026 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1027
1028 _ASUNAME
1029
1030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1031 for as_dir in $PATH
1032 do
1033   IFS=$as_save_IFS
1034   test -z "$as_dir" && as_dir=.
1035   echo "PATH: $as_dir"
1036 done
1037
1038 } >&5
1039
1040 cat >&5 <<_ACEOF
1041
1042
1043 ## ----------- ##
1044 ## Core tests. ##
1045 ## ----------- ##
1046
1047 _ACEOF
1048
1049
1050 # Keep a trace of the command line.
1051 # Strip out --no-create and --no-recursion so they do not pile up.
1052 # Also quote any args containing shell meta-characters.
1053 ac_configure_args=
1054 ac_sep=
1055 for ac_arg
1056 do
1057   case $ac_arg in
1058   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1059   | --no-cr | --no-c | -n ) continue ;;
1060   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1061   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1062     continue ;;
1063   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1064     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1065   esac
1066   case " $ac_configure_args " in
1067     *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1068     *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1069        ac_sep=" " ;;
1070   esac
1071   # Get rid of the leading space.
1072 done
1073
1074 # When interrupted or exit'd, cleanup temporary files, and complete
1075 # config.log.  We remove comments because anyway the quotes in there
1076 # would cause problems or look ugly.
1077 # WARNING: Be sure not to use single quotes in there, as some shells,
1078 # such as our DU 5.0 friend, will then `close' the trap.
1079 trap 'exit_status=$?
1080   # Save into config.log some information that might help in debugging.
1081   {
1082     echo
1083     cat <<\_ASBOX
1084 ## ---------------- ##
1085 ## Cache variables. ##
1086 ## ---------------- ##
1087 _ASBOX
1088     echo
1089     # The following way of writing the cache mishandles newlines in values,
1090 {
1091   (set) 2>&1 |
1092     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1093     *ac_space=\ *)
1094       sed -n \
1095         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1096           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1097       ;;
1098     *)
1099       sed -n \
1100         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1101       ;;
1102     esac;
1103 }
1104     echo
1105     if test -s confdefs.h; then
1106       cat <<\_ASBOX
1107 ## ----------- ##
1108 ## confdefs.h. ##
1109 ## ----------- ##
1110 _ASBOX
1111       echo
1112       sed "/^$/d" confdefs.h
1113       echo
1114     fi
1115     test "$ac_signal" != 0 &&
1116       echo "$as_me: caught signal $ac_signal"
1117     echo "$as_me: exit $exit_status"
1118   } >&5
1119   rm -f core core.* *.core &&
1120   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1121     exit $exit_status
1122      ' 0
1123 for ac_signal in 1 2 13 15; do
1124   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1125 done
1126 ac_signal=0
1127
1128 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1129 rm -rf conftest* confdefs.h
1130 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1131 echo >confdefs.h
1132
1133 # Predefined preprocessor variables.
1134
1135 cat >>confdefs.h <<_ACEOF
1136 #define PACKAGE_NAME "$PACKAGE_NAME"
1137 _ACEOF
1138
1139
1140 cat >>confdefs.h <<_ACEOF
1141 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1142 _ACEOF
1143
1144
1145 cat >>confdefs.h <<_ACEOF
1146 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1147 _ACEOF
1148
1149
1150 cat >>confdefs.h <<_ACEOF
1151 #define PACKAGE_STRING "$PACKAGE_STRING"
1152 _ACEOF
1153
1154
1155 cat >>confdefs.h <<_ACEOF
1156 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1157 _ACEOF
1158
1159
1160 # Let the site file select an alternate cache file if it wants to.
1161 # Prefer explicitly selected file to automatically selected ones.
1162 if test -z "$CONFIG_SITE"; then
1163   if test "x$prefix" != xNONE; then
1164     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1165   else
1166     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1167   fi
1168 fi
1169 for ac_site_file in $CONFIG_SITE; do
1170   if test -r "$ac_site_file"; then
1171     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1172 echo "$as_me: loading site script $ac_site_file" >&6;}
1173     sed 's/^/| /' "$ac_site_file" >&5
1174     . "$ac_site_file"
1175   fi
1176 done
1177
1178 if test -r "$cache_file"; then
1179   # Some versions of bash will fail to source /dev/null (special
1180   # files actually), so we avoid doing that.
1181   if test -f "$cache_file"; then
1182     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1183 echo "$as_me: loading cache $cache_file" >&6;}
1184     case $cache_file in
1185       [\\/]* | ?:[\\/]* ) . $cache_file;;
1186       *)                      . ./$cache_file;;
1187     esac
1188   fi
1189 else
1190   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1191 echo "$as_me: creating cache $cache_file" >&6;}
1192   >$cache_file
1193 fi
1194
1195 # Check that the precious variables saved in the cache have kept the same
1196 # value.
1197 ac_cache_corrupted=false
1198 for ac_var in `(set) 2>&1 |
1199                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1200   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1201   eval ac_new_set=\$ac_env_${ac_var}_set
1202   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1203   eval ac_new_val="\$ac_env_${ac_var}_value"
1204   case $ac_old_set,$ac_new_set in
1205     set,)
1206       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1207 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1208       ac_cache_corrupted=: ;;
1209     ,set)
1210       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1211 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1212       ac_cache_corrupted=: ;;
1213     ,);;
1214     *)
1215       if test "x$ac_old_val" != "x$ac_new_val"; then
1216         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1217 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1218         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1219 echo "$as_me:   former value:  $ac_old_val" >&2;}
1220         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1221 echo "$as_me:   current value: $ac_new_val" >&2;}
1222         ac_cache_corrupted=:
1223       fi;;
1224   esac
1225   # Pass precious variables to config.status.
1226   if test "$ac_new_set" = set; then
1227     case $ac_new_val in
1228     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1229       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1230     *) ac_arg=$ac_var=$ac_new_val ;;
1231     esac
1232     case " $ac_configure_args " in
1233       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1234       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1235     esac
1236   fi
1237 done
1238 if $ac_cache_corrupted; then
1239   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1240 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1241   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1242 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1243    { (exit 1); exit 1; }; }
1244 fi
1245
1246 ac_ext=c
1247 ac_cpp='$CPP $CPPFLAGS'
1248 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1249 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1250 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269 ac_config_headers="$ac_config_headers config.h"
1270
1271
1272 echo "current directory: `pwd`"
1273 echo "command line was: $0 $@"
1274
1275
1276 # After checking to see that --srcdir is correct (which AC_INIT does)
1277 # check for some random other files that come later in the tar file,
1278 # to make sure everything is here.
1279 #
1280 for d in driver utils hacks hacks/glx ; do
1281   f=$srcdir/$d/Makefile.in
1282   if test \! -r $f ; then
1283     echo ""
1284     echo "ERROR: The package is incomplete: $f does not exist."
1285     echo "       This probably means that your download was truncated."
1286     echo ""
1287     exit 1
1288   fi
1289 done
1290
1291 ###############################################################################
1292 #
1293 #       Function to figure out how to run the compiler.
1294 #
1295 ###############################################################################
1296
1297
1298
1299
1300 ###############################################################################
1301 #
1302 #       Functions to figure out how to disable // comments in ANSI C code.
1303 #
1304 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
1305 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
1306 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
1307 #       so much for compatibility!)
1308 #
1309 ###############################################################################
1310
1311
1312
1313
1314
1315
1316 ###############################################################################
1317 #
1318 #       Function to figure out how to turn off Objective C on MacOS X.
1319 #       (We have to do this to work around an Apple-specific gcc bug.)
1320 #
1321 ###############################################################################
1322
1323
1324
1325
1326
1327
1328 ###############################################################################
1329 #
1330 #       Function to figure out how to create directory trees.
1331 #
1332 ###############################################################################
1333
1334
1335
1336
1337 ###############################################################################
1338 #
1339 #       Function to check whether gettimeofday() exists, and how to call it.
1340 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1341 #
1342 ###############################################################################
1343
1344
1345
1346
1347 ###############################################################################
1348 #
1349 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1350 #
1351 ###############################################################################
1352
1353 # M4 sucks!!  perl sucks too!!
1354
1355 perl_version_cmd='print $]'
1356
1357
1358
1359
1360
1361 ###############################################################################
1362 #
1363 #       Function to demand "bc".  Losers.
1364 #
1365 ###############################################################################
1366
1367
1368
1369 ###############################################################################
1370 #
1371 #       Functions to check how to do ICMP PING requests.
1372 #
1373 ###############################################################################
1374
1375
1376
1377
1378
1379
1380 ###############################################################################
1381 #
1382 #       Functions to check for various X11 crap.
1383 #
1384 ###############################################################################
1385
1386 # Try and find the app-defaults directory.
1387 # It sucks that autoconf doesn't do this already...
1388 #
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399 # Random special-cases for X on certain pathological OSes.
1400 # You know who you are.
1401 #
1402
1403
1404
1405
1406 ###############################################################################
1407 #
1408 #       Some utility functions to make checking for X things easier.
1409 #
1410 ###############################################################################
1411
1412 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1413 #
1414
1415
1416 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1417 #
1418
1419
1420 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1421 #
1422
1423
1424
1425 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1426 # Use this sparingly; it probably doesn't work very well on X programs.
1427 #
1428
1429
1430 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1431 # (But not the -L directories!)
1432 #
1433
1434
1435
1436
1437 # Usage: HANDLE_X_PATH_ARG([variable_name],
1438 #                          [--command-line-option],
1439 #                          [descriptive string])
1440 #
1441 # All of the --with options take three forms:
1442 #
1443 #   --with-foo (or --with-foo=yes)
1444 #   --without-foo (or --with-foo=no)
1445 #   --with-foo=/DIR
1446 #
1447 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1448 # a directory (string beginning with a slash) it checks to see whether
1449 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1450 # as appropriate.
1451 #
1452
1453
1454
1455
1456 ###############################################################################
1457 ###############################################################################
1458 #
1459 #       End of function definitions.  Now start actually executing stuff.
1460 #
1461 ###############################################################################
1462 ###############################################################################
1463
1464 # random compiler setup
1465 ac_aux_dir=
1466 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1467   if test -f $ac_dir/install-sh; then
1468     ac_aux_dir=$ac_dir
1469     ac_install_sh="$ac_aux_dir/install-sh -c"
1470     break
1471   elif test -f $ac_dir/install.sh; then
1472     ac_aux_dir=$ac_dir
1473     ac_install_sh="$ac_aux_dir/install.sh -c"
1474     break
1475   elif test -f $ac_dir/shtool; then
1476     ac_aux_dir=$ac_dir
1477     ac_install_sh="$ac_aux_dir/shtool install -c"
1478     break
1479   fi
1480 done
1481 if test -z "$ac_aux_dir"; then
1482   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1483 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1484    { (exit 1); exit 1; }; }
1485 fi
1486 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1487 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1488 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1489
1490 # Make sure we can run config.sub.
1491 $ac_config_sub sun4 >/dev/null 2>&1 ||
1492   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1493 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1494    { (exit 1); exit 1; }; }
1495
1496 echo "$as_me:$LINENO: checking build system type" >&5
1497 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1498 if test "${ac_cv_build+set}" = set; then
1499   echo $ECHO_N "(cached) $ECHO_C" >&6
1500 else
1501   ac_cv_build_alias=$build_alias
1502 test -z "$ac_cv_build_alias" &&
1503   ac_cv_build_alias=`$ac_config_guess`
1504 test -z "$ac_cv_build_alias" &&
1505   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1506 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1507    { (exit 1); exit 1; }; }
1508 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1509   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1510 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1511    { (exit 1); exit 1; }; }
1512
1513 fi
1514 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1515 echo "${ECHO_T}$ac_cv_build" >&6
1516 build=$ac_cv_build
1517 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1518 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1519 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1520
1521
1522 echo "$as_me:$LINENO: checking host system type" >&5
1523 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1524 if test "${ac_cv_host+set}" = set; then
1525   echo $ECHO_N "(cached) $ECHO_C" >&6
1526 else
1527   ac_cv_host_alias=$host_alias
1528 test -z "$ac_cv_host_alias" &&
1529   ac_cv_host_alias=$ac_cv_build_alias
1530 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1531   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1532 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1533    { (exit 1); exit 1; }; }
1534
1535 fi
1536 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1537 echo "${ECHO_T}$ac_cv_host" >&6
1538 host=$ac_cv_host
1539 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1540 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1541 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1542
1543
1544
1545 ac_ext=c
1546 ac_cpp='$CPP $CPPFLAGS'
1547 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1548 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1549 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1550 if test -n "$ac_tool_prefix"; then
1551   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1552 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1553 echo "$as_me:$LINENO: checking for $ac_word" >&5
1554 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1555 if test "${ac_cv_prog_CC+set}" = set; then
1556   echo $ECHO_N "(cached) $ECHO_C" >&6
1557 else
1558   if test -n "$CC"; then
1559   ac_cv_prog_CC="$CC" # Let the user override the test.
1560 else
1561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1562 for as_dir in $PATH
1563 do
1564   IFS=$as_save_IFS
1565   test -z "$as_dir" && as_dir=.
1566   for ac_exec_ext in '' $ac_executable_extensions; do
1567   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1568     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1569     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1570     break 2
1571   fi
1572 done
1573 done
1574
1575 fi
1576 fi
1577 CC=$ac_cv_prog_CC
1578 if test -n "$CC"; then
1579   echo "$as_me:$LINENO: result: $CC" >&5
1580 echo "${ECHO_T}$CC" >&6
1581 else
1582   echo "$as_me:$LINENO: result: no" >&5
1583 echo "${ECHO_T}no" >&6
1584 fi
1585
1586 fi
1587 if test -z "$ac_cv_prog_CC"; then
1588   ac_ct_CC=$CC
1589   # Extract the first word of "gcc", so it can be a program name with args.
1590 set dummy gcc; ac_word=$2
1591 echo "$as_me:$LINENO: checking for $ac_word" >&5
1592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1593 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1594   echo $ECHO_N "(cached) $ECHO_C" >&6
1595 else
1596   if test -n "$ac_ct_CC"; then
1597   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1598 else
1599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1600 for as_dir in $PATH
1601 do
1602   IFS=$as_save_IFS
1603   test -z "$as_dir" && as_dir=.
1604   for ac_exec_ext in '' $ac_executable_extensions; do
1605   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1606     ac_cv_prog_ac_ct_CC="gcc"
1607     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1608     break 2
1609   fi
1610 done
1611 done
1612
1613 fi
1614 fi
1615 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1616 if test -n "$ac_ct_CC"; then
1617   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1618 echo "${ECHO_T}$ac_ct_CC" >&6
1619 else
1620   echo "$as_me:$LINENO: result: no" >&5
1621 echo "${ECHO_T}no" >&6
1622 fi
1623
1624   CC=$ac_ct_CC
1625 else
1626   CC="$ac_cv_prog_CC"
1627 fi
1628
1629 if test -z "$CC"; then
1630   if test -n "$ac_tool_prefix"; then
1631   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1632 set dummy ${ac_tool_prefix}cc; ac_word=$2
1633 echo "$as_me:$LINENO: checking for $ac_word" >&5
1634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1635 if test "${ac_cv_prog_CC+set}" = set; then
1636   echo $ECHO_N "(cached) $ECHO_C" >&6
1637 else
1638   if test -n "$CC"; then
1639   ac_cv_prog_CC="$CC" # Let the user override the test.
1640 else
1641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1642 for as_dir in $PATH
1643 do
1644   IFS=$as_save_IFS
1645   test -z "$as_dir" && as_dir=.
1646   for ac_exec_ext in '' $ac_executable_extensions; do
1647   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1648     ac_cv_prog_CC="${ac_tool_prefix}cc"
1649     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1650     break 2
1651   fi
1652 done
1653 done
1654
1655 fi
1656 fi
1657 CC=$ac_cv_prog_CC
1658 if test -n "$CC"; then
1659   echo "$as_me:$LINENO: result: $CC" >&5
1660 echo "${ECHO_T}$CC" >&6
1661 else
1662   echo "$as_me:$LINENO: result: no" >&5
1663 echo "${ECHO_T}no" >&6
1664 fi
1665
1666 fi
1667 if test -z "$ac_cv_prog_CC"; then
1668   ac_ct_CC=$CC
1669   # Extract the first word of "cc", so it can be a program name with args.
1670 set dummy cc; ac_word=$2
1671 echo "$as_me:$LINENO: checking for $ac_word" >&5
1672 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1673 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1674   echo $ECHO_N "(cached) $ECHO_C" >&6
1675 else
1676   if test -n "$ac_ct_CC"; then
1677   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1678 else
1679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1680 for as_dir in $PATH
1681 do
1682   IFS=$as_save_IFS
1683   test -z "$as_dir" && as_dir=.
1684   for ac_exec_ext in '' $ac_executable_extensions; do
1685   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1686     ac_cv_prog_ac_ct_CC="cc"
1687     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1688     break 2
1689   fi
1690 done
1691 done
1692
1693 fi
1694 fi
1695 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1696 if test -n "$ac_ct_CC"; then
1697   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1698 echo "${ECHO_T}$ac_ct_CC" >&6
1699 else
1700   echo "$as_me:$LINENO: result: no" >&5
1701 echo "${ECHO_T}no" >&6
1702 fi
1703
1704   CC=$ac_ct_CC
1705 else
1706   CC="$ac_cv_prog_CC"
1707 fi
1708
1709 fi
1710 if test -z "$CC"; then
1711   # Extract the first word of "cc", so it can be a program name with args.
1712 set dummy cc; ac_word=$2
1713 echo "$as_me:$LINENO: checking for $ac_word" >&5
1714 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1715 if test "${ac_cv_prog_CC+set}" = set; then
1716   echo $ECHO_N "(cached) $ECHO_C" >&6
1717 else
1718   if test -n "$CC"; then
1719   ac_cv_prog_CC="$CC" # Let the user override the test.
1720 else
1721   ac_prog_rejected=no
1722 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1723 for as_dir in $PATH
1724 do
1725   IFS=$as_save_IFS
1726   test -z "$as_dir" && as_dir=.
1727   for ac_exec_ext in '' $ac_executable_extensions; do
1728   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1729     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1730        ac_prog_rejected=yes
1731        continue
1732      fi
1733     ac_cv_prog_CC="cc"
1734     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1735     break 2
1736   fi
1737 done
1738 done
1739
1740 if test $ac_prog_rejected = yes; then
1741   # We found a bogon in the path, so make sure we never use it.
1742   set dummy $ac_cv_prog_CC
1743   shift
1744   if test $# != 0; then
1745     # We chose a different compiler from the bogus one.
1746     # However, it has the same basename, so the bogon will be chosen
1747     # first if we set CC to just the basename; use the full file name.
1748     shift
1749     set dummy "$as_dir/$ac_word" ${1+"$@"}
1750     shift
1751     ac_cv_prog_CC="$@"
1752   fi
1753 fi
1754 fi
1755 fi
1756 CC=$ac_cv_prog_CC
1757 if test -n "$CC"; then
1758   echo "$as_me:$LINENO: result: $CC" >&5
1759 echo "${ECHO_T}$CC" >&6
1760 else
1761   echo "$as_me:$LINENO: result: no" >&5
1762 echo "${ECHO_T}no" >&6
1763 fi
1764
1765 fi
1766 if test -z "$CC"; then
1767   if test -n "$ac_tool_prefix"; then
1768   for ac_prog in cl
1769   do
1770     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1771 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1772 echo "$as_me:$LINENO: checking for $ac_word" >&5
1773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1774 if test "${ac_cv_prog_CC+set}" = set; then
1775   echo $ECHO_N "(cached) $ECHO_C" >&6
1776 else
1777   if test -n "$CC"; then
1778   ac_cv_prog_CC="$CC" # Let the user override the test.
1779 else
1780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1781 for as_dir in $PATH
1782 do
1783   IFS=$as_save_IFS
1784   test -z "$as_dir" && as_dir=.
1785   for ac_exec_ext in '' $ac_executable_extensions; do
1786   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1787     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1788     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1789     break 2
1790   fi
1791 done
1792 done
1793
1794 fi
1795 fi
1796 CC=$ac_cv_prog_CC
1797 if test -n "$CC"; then
1798   echo "$as_me:$LINENO: result: $CC" >&5
1799 echo "${ECHO_T}$CC" >&6
1800 else
1801   echo "$as_me:$LINENO: result: no" >&5
1802 echo "${ECHO_T}no" >&6
1803 fi
1804
1805     test -n "$CC" && break
1806   done
1807 fi
1808 if test -z "$CC"; then
1809   ac_ct_CC=$CC
1810   for ac_prog in cl
1811 do
1812   # Extract the first word of "$ac_prog", so it can be a program name with args.
1813 set dummy $ac_prog; ac_word=$2
1814 echo "$as_me:$LINENO: checking for $ac_word" >&5
1815 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1816 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1817   echo $ECHO_N "(cached) $ECHO_C" >&6
1818 else
1819   if test -n "$ac_ct_CC"; then
1820   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1821 else
1822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1823 for as_dir in $PATH
1824 do
1825   IFS=$as_save_IFS
1826   test -z "$as_dir" && as_dir=.
1827   for ac_exec_ext in '' $ac_executable_extensions; do
1828   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1829     ac_cv_prog_ac_ct_CC="$ac_prog"
1830     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1831     break 2
1832   fi
1833 done
1834 done
1835
1836 fi
1837 fi
1838 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1839 if test -n "$ac_ct_CC"; then
1840   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1841 echo "${ECHO_T}$ac_ct_CC" >&6
1842 else
1843   echo "$as_me:$LINENO: result: no" >&5
1844 echo "${ECHO_T}no" >&6
1845 fi
1846
1847   test -n "$ac_ct_CC" && break
1848 done
1849
1850   CC=$ac_ct_CC
1851 fi
1852
1853 fi
1854
1855
1856 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1857 echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1858    { (exit 1); exit 1; }; }
1859
1860 # Provide some information about the compiler.
1861 echo "$as_me:$LINENO:" \
1862      "checking for C compiler version" >&5
1863 ac_compiler=`set X $ac_compile; echo $2`
1864 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1865   (eval $ac_compiler --version </dev/null >&5) 2>&5
1866   ac_status=$?
1867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1868   (exit $ac_status); }
1869 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1870   (eval $ac_compiler -v </dev/null >&5) 2>&5
1871   ac_status=$?
1872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1873   (exit $ac_status); }
1874 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1875   (eval $ac_compiler -V </dev/null >&5) 2>&5
1876   ac_status=$?
1877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1878   (exit $ac_status); }
1879
1880 cat >conftest.$ac_ext <<_ACEOF
1881 #line $LINENO "configure"
1882 #include "confdefs.h"
1883
1884 #ifdef F77_DUMMY_MAIN
1885 #  ifdef __cplusplus
1886      extern "C"
1887 #  endif
1888    int F77_DUMMY_MAIN() { return 1; }
1889 #endif
1890 int
1891 main ()
1892 {
1893
1894   ;
1895   return 0;
1896 }
1897 _ACEOF
1898 ac_clean_files_save=$ac_clean_files
1899 ac_clean_files="$ac_clean_files a.out a.exe"
1900 # Try to create an executable without -o first, disregard a.out.
1901 # It will help us diagnose broken compilers, and finding out an intuition
1902 # of exeext.
1903 echo "$as_me:$LINENO: checking for C compiler default output" >&5
1904 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1905 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1906 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1907   (eval $ac_link_default) 2>&5
1908   ac_status=$?
1909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1910   (exit $ac_status); }; then
1911   # Find the output, starting from the most likely.  This scheme is
1912 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1913 # resort.
1914
1915 # Be careful to initialize this variable, since it used to be cached.
1916 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1917 ac_cv_exeext=
1918 for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1919                 ls a.out conftest 2>/dev/null;
1920                 ls a.* conftest.* 2>/dev/null`; do
1921   case $ac_file in
1922     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1923     a.out ) # We found the default executable, but exeext='' is most
1924             # certainly right.
1925             break;;
1926     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1927           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1928           export ac_cv_exeext
1929           break;;
1930     * ) break;;
1931   esac
1932 done
1933 else
1934   echo "$as_me: failed program was:" >&5
1935 cat conftest.$ac_ext >&5
1936 { { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
1937 echo "$as_me: error: C compiler cannot create executables" >&2;}
1938    { (exit 77); exit 77; }; }
1939 fi
1940
1941 ac_exeext=$ac_cv_exeext
1942 echo "$as_me:$LINENO: result: $ac_file" >&5
1943 echo "${ECHO_T}$ac_file" >&6
1944
1945 # Check the compiler produces executables we can run.  If not, either
1946 # the compiler is broken, or we cross compile.
1947 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1948 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1949 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1950 # If not cross compiling, check that we can run a simple program.
1951 if test "$cross_compiling" != yes; then
1952   if { ac_try='./$ac_file'
1953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1954   (eval $ac_try) 2>&5
1955   ac_status=$?
1956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1957   (exit $ac_status); }; }; then
1958     cross_compiling=no
1959   else
1960     if test "$cross_compiling" = maybe; then
1961         cross_compiling=yes
1962     else
1963         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1964 If you meant to cross compile, use \`--host'." >&5
1965 echo "$as_me: error: cannot run C compiled programs.
1966 If you meant to cross compile, use \`--host'." >&2;}
1967    { (exit 1); exit 1; }; }
1968     fi
1969   fi
1970 fi
1971 echo "$as_me:$LINENO: result: yes" >&5
1972 echo "${ECHO_T}yes" >&6
1973
1974 rm -f a.out a.exe conftest$ac_cv_exeext
1975 ac_clean_files=$ac_clean_files_save
1976 # Check the compiler produces executables we can run.  If not, either
1977 # the compiler is broken, or we cross compile.
1978 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1979 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1980 echo "$as_me:$LINENO: result: $cross_compiling" >&5
1981 echo "${ECHO_T}$cross_compiling" >&6
1982
1983 echo "$as_me:$LINENO: checking for suffix of executables" >&5
1984 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1985 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1986   (eval $ac_link) 2>&5
1987   ac_status=$?
1988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1989   (exit $ac_status); }; then
1990   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1991 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1992 # work properly (i.e., refer to `conftest.exe'), while it won't with
1993 # `rm'.
1994 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1995   case $ac_file in
1996     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1997     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1998           export ac_cv_exeext
1999           break;;
2000     * ) break;;
2001   esac
2002 done
2003 else
2004   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2005 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2006    { (exit 1); exit 1; }; }
2007 fi
2008
2009 rm -f conftest$ac_cv_exeext
2010 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2011 echo "${ECHO_T}$ac_cv_exeext" >&6
2012
2013 rm -f conftest.$ac_ext
2014 EXEEXT=$ac_cv_exeext
2015 ac_exeext=$EXEEXT
2016 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2017 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2018 if test "${ac_cv_objext+set}" = set; then
2019   echo $ECHO_N "(cached) $ECHO_C" >&6
2020 else
2021   cat >conftest.$ac_ext <<_ACEOF
2022 #line $LINENO "configure"
2023 #include "confdefs.h"
2024
2025 #ifdef F77_DUMMY_MAIN
2026 #  ifdef __cplusplus
2027      extern "C"
2028 #  endif
2029    int F77_DUMMY_MAIN() { return 1; }
2030 #endif
2031 int
2032 main ()
2033 {
2034
2035   ;
2036   return 0;
2037 }
2038 _ACEOF
2039 rm -f conftest.o conftest.obj
2040 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2041   (eval $ac_compile) 2>&5
2042   ac_status=$?
2043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2044   (exit $ac_status); }; then
2045   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2046   case $ac_file in
2047     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2048     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2049        break;;
2050   esac
2051 done
2052 else
2053   echo "$as_me: failed program was:" >&5
2054 cat conftest.$ac_ext >&5
2055 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2056 echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2057    { (exit 1); exit 1; }; }
2058 fi
2059
2060 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2061 fi
2062 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2063 echo "${ECHO_T}$ac_cv_objext" >&6
2064 OBJEXT=$ac_cv_objext
2065 ac_objext=$OBJEXT
2066 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2067 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2068 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2069   echo $ECHO_N "(cached) $ECHO_C" >&6
2070 else
2071   cat >conftest.$ac_ext <<_ACEOF
2072 #line $LINENO "configure"
2073 #include "confdefs.h"
2074
2075 #ifdef F77_DUMMY_MAIN
2076 #  ifdef __cplusplus
2077      extern "C"
2078 #  endif
2079    int F77_DUMMY_MAIN() { return 1; }
2080 #endif
2081 int
2082 main ()
2083 {
2084 #ifndef __GNUC__
2085        choke me
2086 #endif
2087
2088   ;
2089   return 0;
2090 }
2091 _ACEOF
2092 rm -f conftest.$ac_objext
2093 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2094   (eval $ac_compile) 2>&5
2095   ac_status=$?
2096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2097   (exit $ac_status); } &&
2098          { ac_try='test -s conftest.$ac_objext'
2099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2100   (eval $ac_try) 2>&5
2101   ac_status=$?
2102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2103   (exit $ac_status); }; }; then
2104   ac_compiler_gnu=yes
2105 else
2106   echo "$as_me: failed program was:" >&5
2107 cat conftest.$ac_ext >&5
2108 ac_compiler_gnu=no
2109 fi
2110 rm -f conftest.$ac_objext conftest.$ac_ext
2111 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2112
2113 fi
2114 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2115 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2116 GCC=`test $ac_compiler_gnu = yes && echo yes`
2117 ac_test_CFLAGS=${CFLAGS+set}
2118 ac_save_CFLAGS=$CFLAGS
2119 CFLAGS="-g"
2120 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2121 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2122 if test "${ac_cv_prog_cc_g+set}" = set; then
2123   echo $ECHO_N "(cached) $ECHO_C" >&6
2124 else
2125   cat >conftest.$ac_ext <<_ACEOF
2126 #line $LINENO "configure"
2127 #include "confdefs.h"
2128
2129 #ifdef F77_DUMMY_MAIN
2130 #  ifdef __cplusplus
2131      extern "C"
2132 #  endif
2133    int F77_DUMMY_MAIN() { return 1; }
2134 #endif
2135 int
2136 main ()
2137 {
2138
2139   ;
2140   return 0;
2141 }
2142 _ACEOF
2143 rm -f conftest.$ac_objext
2144 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2145   (eval $ac_compile) 2>&5
2146   ac_status=$?
2147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2148   (exit $ac_status); } &&
2149          { ac_try='test -s conftest.$ac_objext'
2150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2151   (eval $ac_try) 2>&5
2152   ac_status=$?
2153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2154   (exit $ac_status); }; }; then
2155   ac_cv_prog_cc_g=yes
2156 else
2157   echo "$as_me: failed program was:" >&5
2158 cat conftest.$ac_ext >&5
2159 ac_cv_prog_cc_g=no
2160 fi
2161 rm -f conftest.$ac_objext conftest.$ac_ext
2162 fi
2163 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2164 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2165 if test "$ac_test_CFLAGS" = set; then
2166   CFLAGS=$ac_save_CFLAGS
2167 elif test $ac_cv_prog_cc_g = yes; then
2168   if test "$GCC" = yes; then
2169     CFLAGS="-g -O2"
2170   else
2171     CFLAGS="-g"
2172   fi
2173 else
2174   if test "$GCC" = yes; then
2175     CFLAGS="-O2"
2176   else
2177     CFLAGS=
2178   fi
2179 fi
2180 # Some people use a C++ compiler to compile C.  Since we use `exit',
2181 # in C++ we need to declare it.  In case someone uses the same compiler
2182 # for both compiling C and C++ we need to have the C++ compiler decide
2183 # the declaration of exit, since it's the most demanding environment.
2184 cat >conftest.$ac_ext <<_ACEOF
2185 #ifndef __cplusplus
2186   choke me
2187 #endif
2188 _ACEOF
2189 rm -f conftest.$ac_objext
2190 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2191   (eval $ac_compile) 2>&5
2192   ac_status=$?
2193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2194   (exit $ac_status); } &&
2195          { ac_try='test -s conftest.$ac_objext'
2196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2197   (eval $ac_try) 2>&5
2198   ac_status=$?
2199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2200   (exit $ac_status); }; }; then
2201   for ac_declaration in \
2202    ''\
2203    '#include <stdlib.h>' \
2204    'extern "C" void std::exit (int) throw (); using std::exit;' \
2205    'extern "C" void std::exit (int); using std::exit;' \
2206    'extern "C" void exit (int) throw ();' \
2207    'extern "C" void exit (int);' \
2208    'void exit (int);'
2209 do
2210   cat >conftest.$ac_ext <<_ACEOF
2211 #line $LINENO "configure"
2212 #include "confdefs.h"
2213 #include <stdlib.h>
2214 $ac_declaration
2215 #ifdef F77_DUMMY_MAIN
2216 #  ifdef __cplusplus
2217      extern "C"
2218 #  endif
2219    int F77_DUMMY_MAIN() { return 1; }
2220 #endif
2221 int
2222 main ()
2223 {
2224 exit (42);
2225   ;
2226   return 0;
2227 }
2228 _ACEOF
2229 rm -f conftest.$ac_objext
2230 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2231   (eval $ac_compile) 2>&5
2232   ac_status=$?
2233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2234   (exit $ac_status); } &&
2235          { ac_try='test -s conftest.$ac_objext'
2236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2237   (eval $ac_try) 2>&5
2238   ac_status=$?
2239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2240   (exit $ac_status); }; }; then
2241   :
2242 else
2243   echo "$as_me: failed program was:" >&5
2244 cat conftest.$ac_ext >&5
2245 continue
2246 fi
2247 rm -f conftest.$ac_objext conftest.$ac_ext
2248   cat >conftest.$ac_ext <<_ACEOF
2249 #line $LINENO "configure"
2250 #include "confdefs.h"
2251 $ac_declaration
2252 #ifdef F77_DUMMY_MAIN
2253 #  ifdef __cplusplus
2254      extern "C"
2255 #  endif
2256    int F77_DUMMY_MAIN() { return 1; }
2257 #endif
2258 int
2259 main ()
2260 {
2261 exit (42);
2262   ;
2263   return 0;
2264 }
2265 _ACEOF
2266 rm -f conftest.$ac_objext
2267 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2268   (eval $ac_compile) 2>&5
2269   ac_status=$?
2270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2271   (exit $ac_status); } &&
2272          { ac_try='test -s conftest.$ac_objext'
2273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2274   (eval $ac_try) 2>&5
2275   ac_status=$?
2276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2277   (exit $ac_status); }; }; then
2278   break
2279 else
2280   echo "$as_me: failed program was:" >&5
2281 cat conftest.$ac_ext >&5
2282 fi
2283 rm -f conftest.$ac_objext conftest.$ac_ext
2284 done
2285 rm -f conftest*
2286 if test -n "$ac_declaration"; then
2287   echo '#ifdef __cplusplus' >>confdefs.h
2288   echo $ac_declaration      >>confdefs.h
2289   echo '#endif'             >>confdefs.h
2290 fi
2291
2292 else
2293   echo "$as_me: failed program was:" >&5
2294 cat conftest.$ac_ext >&5
2295 fi
2296 rm -f conftest.$ac_objext conftest.$ac_ext
2297 ac_ext=c
2298 ac_cpp='$CPP $CPPFLAGS'
2299 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2300 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2301 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2302
2303
2304   if test -z "$GCC"; then
2305     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2306 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2307     case "$host" in
2308       *-hpux* )
2309         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2310 echo "${ECHO_T}HPUX: adding -Ae" >&6
2311         CC="$CC -Ae"
2312       ;;
2313       *-aix* )
2314         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2315 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2316         CC="$CC -qlanglvl=ansi -qhalt=e"
2317       ;;
2318
2319       *-dec-* )
2320         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2321 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2322         CC="$CC -std1"
2323       ;;
2324
2325       *)
2326         echo "$as_me:$LINENO: result: no idea" >&5
2327 echo "${ECHO_T}no idea" >&6
2328       ;;
2329     esac
2330   fi
2331
2332   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2333 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2334   if test "$cross_compiling" = yes; then
2335   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2336 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2337    { (exit 1); exit 1; }; }
2338 else
2339   cat >conftest.$ac_ext <<_ACEOF
2340 #line $LINENO "configure"
2341 #include "confdefs.h"
2342  main(int ac, char **av) { return 0; }
2343 _ACEOF
2344 rm -f conftest$ac_exeext
2345 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2346   (eval $ac_link) 2>&5
2347   ac_status=$?
2348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2349   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2351   (eval $ac_try) 2>&5
2352   ac_status=$?
2353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2354   (exit $ac_status); }; }; then
2355   echo "$as_me:$LINENO: result: yes" >&5
2356 echo "${ECHO_T}yes" >&6
2357 else
2358   echo "$as_me: program exited with status $ac_status" >&5
2359 echo "$as_me: failed program was:" >&5
2360 cat conftest.$ac_ext >&5
2361 ( exit $ac_status )
2362 echo "$as_me:$LINENO: result: no" >&5
2363 echo "${ECHO_T}no" >&6
2364      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2365 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2366    { (exit 1); exit 1; }; }
2367 fi
2368 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2369 fi
2370
2371   if test -n "$GCC"; then
2372     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2373 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2374     CC="$CC -Wall -Wstrict-prototypes -Wnested-externs"
2375   else
2376     case "$host" in
2377       *-irix5* |*-irix6.0-3* )
2378         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2379 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2380         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2381       ;;
2382 #     *-dec-osf* )
2383 #       if test -z "$GCC"; then
2384 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2385 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2386 #       fi
2387 #     ;;
2388     esac
2389   fi
2390
2391 if test -n "$GCC"; then
2392    if test -n "$GCC"; then
2393    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2394 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2395 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2396   echo $ECHO_N "(cached) $ECHO_C" >&6
2397 else
2398   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
2399           grep unrecognized >/dev/null ); then
2400        ac_cv_gcc_accepts_std=no
2401      else
2402        ac_cv_gcc_accepts_std=yes
2403      fi
2404 fi
2405 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2406 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2407    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2408   fi
2409
2410    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2411 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2412    #
2413    # The reason that // comments are banned from xscreensaver is that gcc is
2414    # basically the only compiler in the world that supports them in C code.
2415    # All other vendors support them only in their C++ compilers, not in their
2416    # ANSI C compilers.  This means that it's a portability problem: every time
2417    # these comments have snuck into the xscreensaver source code, I've gotten
2418    # complaints about it the next day.  So we turn off support for them in gcc
2419    # as well to prevent them from accidentially slipping in.
2420    #
2421    if test "$ac_gcc_accepts_std" = yes ; then
2422      #
2423      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2424      # (That appears to be the only additional preprocessor symbol
2425      # it defines, in addition to the syntax changes it makes.)
2426      #
2427      # -std=gnu89 is no good, because // comments were a GNU extension
2428      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2429      # with -std=gnu89 but not with -std=c89.)
2430      #
2431      CC="$CC -std=c89 -U__STRICT_ANSI__"
2432    else
2433      # The old way:
2434      CC="$CC -Wp,-lang-c89"
2435    fi
2436   fi
2437
2438 if test -n "$GCC"; then
2439    if test -n "$GCC"; then
2440    echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
2441 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6
2442 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
2443   echo $ECHO_N "(cached) $ECHO_C" >&6
2444 else
2445   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
2446           grep unrecognized >/dev/null ); then
2447        ac_cv_gcc_accepts_no_cpp_precomp=no
2448      else
2449        ac_cv_gcc_accepts_no_cpp_precomp=yes
2450      fi
2451 fi
2452 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
2453 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6
2454    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
2455   fi
2456
2457    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
2458      echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
2459 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6
2460      CC="$CC -no-cpp-precomp"
2461    fi
2462   fi
2463
2464 ac_ext=c
2465 ac_cpp='$CPP $CPPFLAGS'
2466 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2467 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2468 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2469 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2470 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2471 # On Suns, sometimes $CPP names a directory.
2472 if test -n "$CPP" && test -d "$CPP"; then
2473   CPP=
2474 fi
2475 if test -z "$CPP"; then
2476   if test "${ac_cv_prog_CPP+set}" = set; then
2477   echo $ECHO_N "(cached) $ECHO_C" >&6
2478 else
2479       # Double quotes because CPP needs to be expanded
2480     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2481     do
2482       ac_preproc_ok=false
2483 for ac_c_preproc_warn_flag in '' yes
2484 do
2485   # Use a header file that comes with gcc, so configuring glibc
2486   # with a fresh cross-compiler works.
2487   # On the NeXT, cc -E runs the code through the compiler's parser,
2488   # not just through cpp. "Syntax error" is here to catch this case.
2489   cat >conftest.$ac_ext <<_ACEOF
2490 #line $LINENO "configure"
2491 #include "confdefs.h"
2492 #include <assert.h>
2493                      Syntax error
2494 _ACEOF
2495 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2496   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2497   ac_status=$?
2498   egrep -v '^ *\+' conftest.er1 >conftest.err
2499   rm -f conftest.er1
2500   cat conftest.err >&5
2501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2502   (exit $ac_status); } >/dev/null; then
2503   if test -s conftest.err; then
2504     ac_cpp_err=$ac_c_preproc_warn_flag
2505   else
2506     ac_cpp_err=
2507   fi
2508 else
2509   ac_cpp_err=yes
2510 fi
2511 if test -z "$ac_cpp_err"; then
2512   :
2513 else
2514   echo "$as_me: failed program was:" >&5
2515   cat conftest.$ac_ext >&5
2516   # Broken: fails on valid input.
2517 continue
2518 fi
2519 rm -f conftest.err conftest.$ac_ext
2520
2521   # OK, works on sane cases.  Now check whether non-existent headers
2522   # can be detected and how.
2523   cat >conftest.$ac_ext <<_ACEOF
2524 #line $LINENO "configure"
2525 #include "confdefs.h"
2526 #include <ac_nonexistent.h>
2527 _ACEOF
2528 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2529   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2530   ac_status=$?
2531   egrep -v '^ *\+' conftest.er1 >conftest.err
2532   rm -f conftest.er1
2533   cat conftest.err >&5
2534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2535   (exit $ac_status); } >/dev/null; then
2536   if test -s conftest.err; then
2537     ac_cpp_err=$ac_c_preproc_warn_flag
2538   else
2539     ac_cpp_err=
2540   fi
2541 else
2542   ac_cpp_err=yes
2543 fi
2544 if test -z "$ac_cpp_err"; then
2545   # Broken: success on invalid input.
2546 continue
2547 else
2548   echo "$as_me: failed program was:" >&5
2549   cat conftest.$ac_ext >&5
2550   # Passes both tests.
2551 ac_preproc_ok=:
2552 break
2553 fi
2554 rm -f conftest.err conftest.$ac_ext
2555
2556 done
2557 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2558 rm -f conftest.err conftest.$ac_ext
2559 if $ac_preproc_ok; then
2560   break
2561 fi
2562
2563     done
2564     ac_cv_prog_CPP=$CPP
2565
2566 fi
2567   CPP=$ac_cv_prog_CPP
2568 else
2569   ac_cv_prog_CPP=$CPP
2570 fi
2571 echo "$as_me:$LINENO: result: $CPP" >&5
2572 echo "${ECHO_T}$CPP" >&6
2573 ac_preproc_ok=false
2574 for ac_c_preproc_warn_flag in '' yes
2575 do
2576   # Use a header file that comes with gcc, so configuring glibc
2577   # with a fresh cross-compiler works.
2578   # On the NeXT, cc -E runs the code through the compiler's parser,
2579   # not just through cpp. "Syntax error" is here to catch this case.
2580   cat >conftest.$ac_ext <<_ACEOF
2581 #line $LINENO "configure"
2582 #include "confdefs.h"
2583 #include <assert.h>
2584                      Syntax error
2585 _ACEOF
2586 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2587   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2588   ac_status=$?
2589   egrep -v '^ *\+' conftest.er1 >conftest.err
2590   rm -f conftest.er1
2591   cat conftest.err >&5
2592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2593   (exit $ac_status); } >/dev/null; then
2594   if test -s conftest.err; then
2595     ac_cpp_err=$ac_c_preproc_warn_flag
2596   else
2597     ac_cpp_err=
2598   fi
2599 else
2600   ac_cpp_err=yes
2601 fi
2602 if test -z "$ac_cpp_err"; then
2603   :
2604 else
2605   echo "$as_me: failed program was:" >&5
2606   cat conftest.$ac_ext >&5
2607   # Broken: fails on valid input.
2608 continue
2609 fi
2610 rm -f conftest.err conftest.$ac_ext
2611
2612   # OK, works on sane cases.  Now check whether non-existent headers
2613   # can be detected and how.
2614   cat >conftest.$ac_ext <<_ACEOF
2615 #line $LINENO "configure"
2616 #include "confdefs.h"
2617 #include <ac_nonexistent.h>
2618 _ACEOF
2619 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2620   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2621   ac_status=$?
2622   egrep -v '^ *\+' conftest.er1 >conftest.err
2623   rm -f conftest.er1
2624   cat conftest.err >&5
2625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2626   (exit $ac_status); } >/dev/null; then
2627   if test -s conftest.err; then
2628     ac_cpp_err=$ac_c_preproc_warn_flag
2629   else
2630     ac_cpp_err=
2631   fi
2632 else
2633   ac_cpp_err=yes
2634 fi
2635 if test -z "$ac_cpp_err"; then
2636   # Broken: success on invalid input.
2637 continue
2638 else
2639   echo "$as_me: failed program was:" >&5
2640   cat conftest.$ac_ext >&5
2641   # Passes both tests.
2642 ac_preproc_ok=:
2643 break
2644 fi
2645 rm -f conftest.err conftest.$ac_ext
2646
2647 done
2648 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2649 rm -f conftest.err conftest.$ac_ext
2650 if $ac_preproc_ok; then
2651   :
2652 else
2653   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2654 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2655    { (exit 1); exit 1; }; }
2656 fi
2657
2658 ac_ext=c
2659 ac_cpp='$CPP $CPPFLAGS'
2660 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2661 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2663
2664 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2665 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2666 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2667   echo $ECHO_N "(cached) $ECHO_C" >&6
2668 else
2669   ac_cv_prog_cc_stdc=no
2670 ac_save_CC=$CC
2671 cat >conftest.$ac_ext <<_ACEOF
2672 #line $LINENO "configure"
2673 #include "confdefs.h"
2674 #include <stdarg.h>
2675 #include <stdio.h>
2676 #include <sys/types.h>
2677 #include <sys/stat.h>
2678 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2679 struct buf { int x; };
2680 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2681 static char *e (p, i)
2682      char **p;
2683      int i;
2684 {
2685   return p[i];
2686 }
2687 static char *f (char * (*g) (char **, int), char **p, ...)
2688 {
2689   char *s;
2690   va_list v;
2691   va_start (v,p);
2692   s = g (p, va_arg (v,int));
2693   va_end (v);
2694   return s;
2695 }
2696 int test (int i, double x);
2697 struct s1 {int (*f) (int a);};
2698 struct s2 {int (*f) (double a);};
2699 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2700 int argc;
2701 char **argv;
2702 #ifdef F77_DUMMY_MAIN
2703 #  ifdef __cplusplus
2704      extern "C"
2705 #  endif
2706    int F77_DUMMY_MAIN() { return 1; }
2707 #endif
2708 int
2709 main ()
2710 {
2711 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2712   ;
2713   return 0;
2714 }
2715 _ACEOF
2716 # Don't try gcc -ansi; that turns off useful extensions and
2717 # breaks some systems' header files.
2718 # AIX                   -qlanglvl=ansi
2719 # Ultrix and OSF/1      -std1
2720 # HP-UX 10.20 and later -Ae
2721 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2722 # SVR4                  -Xc -D__EXTENSIONS__
2723 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2724 do
2725   CC="$ac_save_CC $ac_arg"
2726   rm -f conftest.$ac_objext
2727 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2728   (eval $ac_compile) 2>&5
2729   ac_status=$?
2730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2731   (exit $ac_status); } &&
2732          { ac_try='test -s conftest.$ac_objext'
2733   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2734   (eval $ac_try) 2>&5
2735   ac_status=$?
2736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2737   (exit $ac_status); }; }; then
2738   ac_cv_prog_cc_stdc=$ac_arg
2739 break
2740 else
2741   echo "$as_me: failed program was:" >&5
2742 cat conftest.$ac_ext >&5
2743 fi
2744 rm -f conftest.$ac_objext
2745 done
2746 rm -f conftest.$ac_ext conftest.$ac_objext
2747 CC=$ac_save_CC
2748
2749 fi
2750
2751 case "x$ac_cv_prog_cc_stdc" in
2752   x|xno)
2753     echo "$as_me:$LINENO: result: none needed" >&5
2754 echo "${ECHO_T}none needed" >&6 ;;
2755   *)
2756     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2757 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2758     CC="$CC $ac_cv_prog_cc_stdc" ;;
2759 esac
2760
2761 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
2762 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2763 if test "${ac_cv_c_const+set}" = set; then
2764   echo $ECHO_N "(cached) $ECHO_C" >&6
2765 else
2766   cat >conftest.$ac_ext <<_ACEOF
2767 #line $LINENO "configure"
2768 #include "confdefs.h"
2769
2770 #ifdef F77_DUMMY_MAIN
2771 #  ifdef __cplusplus
2772      extern "C"
2773 #  endif
2774    int F77_DUMMY_MAIN() { return 1; }
2775 #endif
2776 int
2777 main ()
2778 {
2779 /* FIXME: Include the comments suggested by Paul. */
2780 #ifndef __cplusplus
2781   /* Ultrix mips cc rejects this.  */
2782   typedef int charset[2];
2783   const charset x;
2784   /* SunOS 4.1.1 cc rejects this.  */
2785   char const *const *ccp;
2786   char **p;
2787   /* NEC SVR4.0.2 mips cc rejects this.  */
2788   struct point {int x, y;};
2789   static struct point const zero = {0,0};
2790   /* AIX XL C 1.02.0.0 rejects this.
2791      It does not let you subtract one const X* pointer from another in
2792      an arm of an if-expression whose if-part is not a constant
2793      expression */
2794   const char *g = "string";
2795   ccp = &g + (g ? g-g : 0);
2796   /* HPUX 7.0 cc rejects these. */
2797   ++ccp;
2798   p = (char**) ccp;
2799   ccp = (char const *const *) p;
2800   { /* SCO 3.2v4 cc rejects this.  */
2801     char *t;
2802     char const *s = 0 ? (char *) 0 : (char const *) 0;
2803
2804     *t++ = 0;
2805   }
2806   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2807     int x[] = {25, 17};
2808     const int *foo = &x[0];
2809     ++foo;
2810   }
2811   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2812     typedef const int *iptr;
2813     iptr p = 0;
2814     ++p;
2815   }
2816   { /* AIX XL C 1.02.0.0 rejects this saying
2817        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2818     struct s { int j; const int *ap[3]; };
2819     struct s *b; b->j = 5;
2820   }
2821   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2822     const int foo = 10;
2823   }
2824 #endif
2825
2826   ;
2827   return 0;
2828 }
2829 _ACEOF
2830 rm -f conftest.$ac_objext
2831 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2832   (eval $ac_compile) 2>&5
2833   ac_status=$?
2834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2835   (exit $ac_status); } &&
2836          { ac_try='test -s conftest.$ac_objext'
2837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2838   (eval $ac_try) 2>&5
2839   ac_status=$?
2840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2841   (exit $ac_status); }; }; then
2842   ac_cv_c_const=yes
2843 else
2844   echo "$as_me: failed program was:" >&5
2845 cat conftest.$ac_ext >&5
2846 ac_cv_c_const=no
2847 fi
2848 rm -f conftest.$ac_objext conftest.$ac_ext
2849 fi
2850 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
2851 echo "${ECHO_T}$ac_cv_c_const" >&6
2852 if test $ac_cv_c_const = no; then
2853
2854 cat >>confdefs.h <<\_ACEOF
2855 #define const
2856 _ACEOF
2857
2858 fi
2859
2860 echo "$as_me:$LINENO: checking for inline" >&5
2861 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2862 if test "${ac_cv_c_inline+set}" = set; then
2863   echo $ECHO_N "(cached) $ECHO_C" >&6
2864 else
2865   ac_cv_c_inline=no
2866 for ac_kw in inline __inline__ __inline; do
2867   cat >conftest.$ac_ext <<_ACEOF
2868 #line $LINENO "configure"
2869 #include "confdefs.h"
2870 #ifndef __cplusplus
2871 static $ac_kw int static_foo () {return 0; }
2872 $ac_kw int foo () {return 0; }
2873 #endif
2874
2875 _ACEOF
2876 rm -f conftest.$ac_objext
2877 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2878   (eval $ac_compile) 2>&5
2879   ac_status=$?
2880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2881   (exit $ac_status); } &&
2882          { ac_try='test -s conftest.$ac_objext'
2883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2884   (eval $ac_try) 2>&5
2885   ac_status=$?
2886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2887   (exit $ac_status); }; }; then
2888   ac_cv_c_inline=$ac_kw; break
2889 else
2890   echo "$as_me: failed program was:" >&5
2891 cat conftest.$ac_ext >&5
2892 fi
2893 rm -f conftest.$ac_objext conftest.$ac_ext
2894 done
2895
2896 fi
2897 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
2898 echo "${ECHO_T}$ac_cv_c_inline" >&6
2899 case $ac_cv_c_inline in
2900   inline | yes) ;;
2901   no)
2902 cat >>confdefs.h <<\_ACEOF
2903 #define inline
2904 _ACEOF
2905  ;;
2906   *)  cat >>confdefs.h <<_ACEOF
2907 #define inline $ac_cv_c_inline
2908 _ACEOF
2909  ;;
2910 esac
2911
2912
2913 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
2914   echo "$as_me:$LINENO: checking for bc" >&5
2915 echo $ECHO_N "checking for bc... $ECHO_C" >&6
2916   if test "$ac_bc_result" = "15" ; then
2917     echo "$as_me:$LINENO: result: yes" >&5
2918 echo "${ECHO_T}yes" >&6
2919   else
2920     echo "$as_me:$LINENO: result: no" >&5
2921 echo "${ECHO_T}no" >&6
2922     echo ''
2923     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
2924                   part of Unix since the 1970s.  Come back when your vendor
2925                   has grown a clue." >&5
2926 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
2927                   part of Unix since the 1970s.  Come back when your vendor
2928                   has grown a clue." >&2;}
2929    { (exit 1); exit 1; }; }
2930   fi
2931
2932
2933 # stuff for Makefiles
2934 # Find a good install program.  We prefer a C program (faster),
2935 # so one script is as good as another.  But avoid the broken or
2936 # incompatible versions:
2937 # SysV /etc/install, /usr/sbin/install
2938 # SunOS /usr/etc/install
2939 # IRIX /sbin/install
2940 # AIX /bin/install
2941 # AmigaOS /C/install, which installs bootblocks on floppy discs
2942 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2943 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2944 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2945 # ./install, which can be erroneously created by make from ./install.sh.
2946 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2947 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2948 if test -z "$INSTALL"; then
2949 if test "${ac_cv_path_install+set}" = set; then
2950   echo $ECHO_N "(cached) $ECHO_C" >&6
2951 else
2952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2953 for as_dir in $PATH
2954 do
2955   IFS=$as_save_IFS
2956   test -z "$as_dir" && as_dir=.
2957   # Account for people who put trailing slashes in PATH elements.
2958 case $as_dir/ in
2959   ./ | .// | /cC/* | \
2960   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2961   /usr/ucb/* ) ;;
2962   *)
2963     # OSF1 and SCO ODT 3.0 have their own names for install.
2964     # Don't use installbsd from OSF since it installs stuff as root
2965     # by default.
2966     for ac_prog in ginstall scoinst install; do
2967       for ac_exec_ext in '' $ac_executable_extensions; do
2968         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2969           if test $ac_prog = install &&
2970             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2971             # AIX install.  It has an incompatible calling convention.
2972             :
2973           elif test $ac_prog = install &&
2974             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2975             # program-specific install script used by HP pwplus--don't use.
2976             :
2977           else
2978             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2979             break 3
2980           fi
2981         fi
2982       done
2983     done
2984     ;;
2985 esac
2986 done
2987
2988
2989 fi
2990   if test "${ac_cv_path_install+set}" = set; then
2991     INSTALL=$ac_cv_path_install
2992   else
2993     # As a last resort, use the slow shell script.  We don't cache a
2994     # path for INSTALL within a source directory, because that will
2995     # break other packages using the cache if that directory is
2996     # removed, or if the path is relative.
2997     INSTALL=$ac_install_sh
2998   fi
2999 fi
3000 echo "$as_me:$LINENO: result: $INSTALL" >&5
3001 echo "${ECHO_T}$INSTALL" >&6
3002
3003 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3004 # It thinks the first close brace ends the variable substitution.
3005 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3006
3007 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3008
3009 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3010
3011 echo "$as_me:$LINENO: checking whether \\"\${INSTALL} -d\\" creates intermediate directories" >&5
3012 echo $ECHO_N "checking whether \\"\${INSTALL} -d\\" creates intermediate directories... $ECHO_C" >&6
3013 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
3014   echo $ECHO_N "(cached) $ECHO_C" >&6
3015 else
3016   ac_cv_install_d_creates_dirs=no
3017      rm -rf conftestdir
3018      if mkdir conftestdir; then
3019        cd conftestdir 2>/dev/null
3020        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
3021        if test -d dir1/dir2/. ; then
3022          ac_cv_install_d_creates_dirs=yes
3023        fi
3024        cd .. 2>/dev/null
3025        rm -rf conftestdir
3026      fi
3027
3028 fi
3029 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
3030 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
3031
3032   if test "$ac_cv_install_d_creates_dirs" = no ; then
3033     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
3034 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
3035 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
3036   echo $ECHO_N "(cached) $ECHO_C" >&6
3037 else
3038   ac_cv_mkdir_p_creates_dirs=no
3039        rm -rf conftestdir
3040        if mkdir conftestdir; then
3041          cd conftestdir 2>/dev/null
3042          mkdir -p dir1/dir2 >/dev/null 2>&1
3043          if test -d dir1/dir2/. ; then
3044            ac_cv_mkdir_p_creates_dirs=yes
3045          fi
3046          cd .. 2>/dev/null
3047          rm -rf conftestdir
3048        fi
3049
3050 fi
3051 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3052 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3053   fi
3054
3055   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3056     INSTALL_DIRS='${INSTALL} -d'
3057   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3058     INSTALL_DIRS='mkdir -p'
3059   else
3060     # any other ideas?
3061     INSTALL_DIRS='${INSTALL} -d'
3062   fi
3063
3064 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5
3065 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3066 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3067 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3068   echo $ECHO_N "(cached) $ECHO_C" >&6
3069 else
3070   cat >conftest.make <<\_ACEOF
3071 all:
3072         @echo 'ac_maketemp="${MAKE}"'
3073 _ACEOF
3074 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3075 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3076 if test -n "$ac_maketemp"; then
3077   eval ac_cv_prog_make_${ac_make}_set=yes
3078 else
3079   eval ac_cv_prog_make_${ac_make}_set=no
3080 fi
3081 rm -f conftest.make
3082 fi
3083 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3084   echo "$as_me:$LINENO: result: yes" >&5
3085 echo "${ECHO_T}yes" >&6
3086   SET_MAKE=
3087 else
3088   echo "$as_me:$LINENO: result: no" >&5
3089 echo "${ECHO_T}no" >&6
3090   SET_MAKE="MAKE=${MAKE-make}"
3091 fi
3092
3093
3094 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3095 # That's wrong: it should be set to '${INSTALL}', so that one can
3096 # implement the "install-strip" target properly (strip executables,
3097 # but do not try to strip scripts.)
3098 #
3099 INSTALL_SCRIPT='${INSTALL}'
3100
3101 # random libc stuff
3102
3103 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3104 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3105 if test "${ac_cv_header_stdc+set}" = set; then
3106   echo $ECHO_N "(cached) $ECHO_C" >&6
3107 else
3108   cat >conftest.$ac_ext <<_ACEOF
3109 #line $LINENO "configure"
3110 #include "confdefs.h"
3111 #include <stdlib.h>
3112 #include <stdarg.h>
3113 #include <string.h>
3114 #include <float.h>
3115
3116 _ACEOF
3117 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3118   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3119   ac_status=$?
3120   egrep -v '^ *\+' conftest.er1 >conftest.err
3121   rm -f conftest.er1
3122   cat conftest.err >&5
3123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3124   (exit $ac_status); } >/dev/null; then
3125   if test -s conftest.err; then
3126     ac_cpp_err=$ac_c_preproc_warn_flag
3127   else
3128     ac_cpp_err=
3129   fi
3130 else
3131   ac_cpp_err=yes
3132 fi
3133 if test -z "$ac_cpp_err"; then
3134   ac_cv_header_stdc=yes
3135 else
3136   echo "$as_me: failed program was:" >&5
3137   cat conftest.$ac_ext >&5
3138   ac_cv_header_stdc=no
3139 fi
3140 rm -f conftest.err conftest.$ac_ext
3141
3142 if test $ac_cv_header_stdc = yes; then
3143   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3144   cat >conftest.$ac_ext <<_ACEOF
3145 #line $LINENO "configure"
3146 #include "confdefs.h"
3147 #include <string.h>
3148
3149 _ACEOF
3150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3151   egrep "memchr" >/dev/null 2>&1; then
3152   :
3153 else
3154   ac_cv_header_stdc=no
3155 fi
3156 rm -f conftest*
3157
3158 fi
3159
3160 if test $ac_cv_header_stdc = yes; then
3161   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3162   cat >conftest.$ac_ext <<_ACEOF
3163 #line $LINENO "configure"
3164 #include "confdefs.h"
3165 #include <stdlib.h>
3166
3167 _ACEOF
3168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3169   egrep "free" >/dev/null 2>&1; then
3170   :
3171 else
3172   ac_cv_header_stdc=no
3173 fi
3174 rm -f conftest*
3175
3176 fi
3177
3178 if test $ac_cv_header_stdc = yes; then
3179   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3180   if test "$cross_compiling" = yes; then
3181   :
3182 else
3183   cat >conftest.$ac_ext <<_ACEOF
3184 #line $LINENO "configure"
3185 #include "confdefs.h"
3186 #include <ctype.h>
3187 #if ((' ' & 0x0FF) == 0x020)
3188 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3189 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3190 #else
3191 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3192                      || ('j' <= (c) && (c) <= 'r') \
3193                      || ('s' <= (c) && (c) <= 'z'))
3194 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3195 #endif
3196
3197 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3198 int
3199 main ()
3200 {
3201   int i;
3202   for (i = 0; i < 256; i++)
3203     if (XOR (islower (i), ISLOWER (i))
3204         || toupper (i) != TOUPPER (i))
3205       exit(2);
3206   exit (0);
3207 }
3208 _ACEOF
3209 rm -f conftest$ac_exeext
3210 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3211   (eval $ac_link) 2>&5
3212   ac_status=$?
3213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3214   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3216   (eval $ac_try) 2>&5
3217   ac_status=$?
3218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3219   (exit $ac_status); }; }; then
3220   :
3221 else
3222   echo "$as_me: program exited with status $ac_status" >&5
3223 echo "$as_me: failed program was:" >&5
3224 cat conftest.$ac_ext >&5
3225 ( exit $ac_status )
3226 ac_cv_header_stdc=no
3227 fi
3228 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3229 fi
3230 fi
3231 fi
3232 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3233 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3234 if test $ac_cv_header_stdc = yes; then
3235
3236 cat >>confdefs.h <<\_ACEOF
3237 #define STDC_HEADERS 1
3238 _ACEOF
3239
3240 fi
3241
3242 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3253                   inttypes.h stdint.h unistd.h
3254 do
3255 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3256 echo "$as_me:$LINENO: checking for $ac_header" >&5
3257 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3258 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3259   echo $ECHO_N "(cached) $ECHO_C" >&6
3260 else
3261   cat >conftest.$ac_ext <<_ACEOF
3262 #line $LINENO "configure"
3263 #include "confdefs.h"
3264 $ac_includes_default
3265
3266 #include <$ac_header>
3267 _ACEOF
3268 rm -f conftest.$ac_objext
3269 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3270   (eval $ac_compile) 2>&5
3271   ac_status=$?
3272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3273   (exit $ac_status); } &&
3274          { ac_try='test -s conftest.$ac_objext'
3275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3276   (eval $ac_try) 2>&5
3277   ac_status=$?
3278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3279   (exit $ac_status); }; }; then
3280   eval "$as_ac_Header=yes"
3281 else
3282   echo "$as_me: failed program was:" >&5
3283 cat conftest.$ac_ext >&5
3284 eval "$as_ac_Header=no"
3285 fi
3286 rm -f conftest.$ac_objext conftest.$ac_ext
3287 fi
3288 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3289 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3290 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3291   cat >>confdefs.h <<_ACEOF
3292 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3293 _ACEOF
3294
3295 fi
3296
3297 done
3298
3299
3300
3301 for ac_header in unistd.h
3302 do
3303 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3304 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3305   echo "$as_me:$LINENO: checking for $ac_header" >&5
3306 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3307 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3308   echo $ECHO_N "(cached) $ECHO_C" >&6
3309 fi
3310 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3311 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3312 else
3313   # Is the header compilable?
3314 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3315 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3316 cat >conftest.$ac_ext <<_ACEOF
3317 #line $LINENO "configure"
3318 #include "confdefs.h"
3319 $ac_includes_default
3320 #include <$ac_header>
3321 _ACEOF
3322 rm -f conftest.$ac_objext
3323 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3324   (eval $ac_compile) 2>&5
3325   ac_status=$?
3326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3327   (exit $ac_status); } &&
3328          { ac_try='test -s conftest.$ac_objext'
3329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3330   (eval $ac_try) 2>&5
3331   ac_status=$?
3332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3333   (exit $ac_status); }; }; then
3334   ac_header_compiler=yes
3335 else
3336   echo "$as_me: failed program was:" >&5
3337 cat conftest.$ac_ext >&5
3338 ac_header_compiler=no
3339 fi
3340 rm -f conftest.$ac_objext conftest.$ac_ext
3341 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3342 echo "${ECHO_T}$ac_header_compiler" >&6
3343
3344 # Is the header present?
3345 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3346 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3347 cat >conftest.$ac_ext <<_ACEOF
3348 #line $LINENO "configure"
3349 #include "confdefs.h"
3350 #include <$ac_header>
3351 _ACEOF
3352 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3353   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3354   ac_status=$?
3355   egrep -v '^ *\+' conftest.er1 >conftest.err
3356   rm -f conftest.er1
3357   cat conftest.err >&5
3358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3359   (exit $ac_status); } >/dev/null; then
3360   if test -s conftest.err; then
3361     ac_cpp_err=$ac_c_preproc_warn_flag
3362   else
3363     ac_cpp_err=
3364   fi
3365 else
3366   ac_cpp_err=yes
3367 fi
3368 if test -z "$ac_cpp_err"; then
3369   ac_header_preproc=yes
3370 else
3371   echo "$as_me: failed program was:" >&5
3372   cat conftest.$ac_ext >&5
3373   ac_header_preproc=no
3374 fi
3375 rm -f conftest.err conftest.$ac_ext
3376 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3377 echo "${ECHO_T}$ac_header_preproc" >&6
3378
3379 # So?  What about this header?
3380 case $ac_header_compiler:$ac_header_preproc in
3381   yes:no )
3382     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3383 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3384     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3385 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3386   no:yes )
3387     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3388 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3389     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3390 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3391     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3392 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3393 esac
3394 echo "$as_me:$LINENO: checking for $ac_header" >&5
3395 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3396 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3397   echo $ECHO_N "(cached) $ECHO_C" >&6
3398 else
3399   eval "$as_ac_Header=$ac_header_preproc"
3400 fi
3401 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3402 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3403
3404 fi
3405 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3406   cat >>confdefs.h <<_ACEOF
3407 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3408 _ACEOF
3409
3410 fi
3411
3412 done
3413
3414 echo "$as_me:$LINENO: checking for mode_t" >&5
3415 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3416 if test "${ac_cv_type_mode_t+set}" = set; then
3417   echo $ECHO_N "(cached) $ECHO_C" >&6
3418 else
3419   cat >conftest.$ac_ext <<_ACEOF
3420 #line $LINENO "configure"
3421 #include "confdefs.h"
3422 $ac_includes_default
3423 #ifdef F77_DUMMY_MAIN
3424 #  ifdef __cplusplus
3425      extern "C"
3426 #  endif
3427    int F77_DUMMY_MAIN() { return 1; }
3428 #endif
3429 int
3430 main ()
3431 {
3432 if ((mode_t *) 0)
3433   return 0;
3434 if (sizeof (mode_t))
3435   return 0;
3436   ;
3437   return 0;
3438 }
3439 _ACEOF
3440 rm -f conftest.$ac_objext
3441 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3442   (eval $ac_compile) 2>&5
3443   ac_status=$?
3444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3445   (exit $ac_status); } &&
3446          { ac_try='test -s conftest.$ac_objext'
3447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3448   (eval $ac_try) 2>&5
3449   ac_status=$?
3450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3451   (exit $ac_status); }; }; then
3452   ac_cv_type_mode_t=yes
3453 else
3454   echo "$as_me: failed program was:" >&5
3455 cat conftest.$ac_ext >&5
3456 ac_cv_type_mode_t=no
3457 fi
3458 rm -f conftest.$ac_objext conftest.$ac_ext
3459 fi
3460 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
3461 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3462 if test $ac_cv_type_mode_t = yes; then
3463   :
3464 else
3465
3466 cat >>confdefs.h <<_ACEOF
3467 #define mode_t int
3468 _ACEOF
3469
3470 fi
3471
3472 echo "$as_me:$LINENO: checking for pid_t" >&5
3473 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
3474 if test "${ac_cv_type_pid_t+set}" = set; then
3475   echo $ECHO_N "(cached) $ECHO_C" >&6
3476 else
3477   cat >conftest.$ac_ext <<_ACEOF
3478 #line $LINENO "configure"
3479 #include "confdefs.h"
3480 $ac_includes_default
3481 #ifdef F77_DUMMY_MAIN
3482 #  ifdef __cplusplus
3483      extern "C"
3484 #  endif
3485    int F77_DUMMY_MAIN() { return 1; }
3486 #endif
3487 int
3488 main ()
3489 {
3490 if ((pid_t *) 0)
3491   return 0;
3492 if (sizeof (pid_t))
3493   return 0;
3494   ;
3495   return 0;
3496 }
3497 _ACEOF
3498 rm -f conftest.$ac_objext
3499 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3500   (eval $ac_compile) 2>&5
3501   ac_status=$?
3502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3503   (exit $ac_status); } &&
3504          { ac_try='test -s conftest.$ac_objext'
3505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3506   (eval $ac_try) 2>&5
3507   ac_status=$?
3508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3509   (exit $ac_status); }; }; then
3510   ac_cv_type_pid_t=yes
3511 else
3512   echo "$as_me: failed program was:" >&5
3513 cat conftest.$ac_ext >&5
3514 ac_cv_type_pid_t=no
3515 fi
3516 rm -f conftest.$ac_objext conftest.$ac_ext
3517 fi
3518 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
3519 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3520 if test $ac_cv_type_pid_t = yes; then
3521   :
3522 else
3523
3524 cat >>confdefs.h <<_ACEOF
3525 #define pid_t int
3526 _ACEOF
3527
3528 fi
3529
3530 echo "$as_me:$LINENO: checking for size_t" >&5
3531 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
3532 if test "${ac_cv_type_size_t+set}" = set; then
3533   echo $ECHO_N "(cached) $ECHO_C" >&6
3534 else
3535   cat >conftest.$ac_ext <<_ACEOF
3536 #line $LINENO "configure"
3537 #include "confdefs.h"
3538 $ac_includes_default
3539 #ifdef F77_DUMMY_MAIN
3540 #  ifdef __cplusplus
3541      extern "C"
3542 #  endif
3543    int F77_DUMMY_MAIN() { return 1; }
3544 #endif
3545 int
3546 main ()
3547 {
3548 if ((size_t *) 0)
3549   return 0;
3550 if (sizeof (size_t))
3551   return 0;
3552   ;
3553   return 0;
3554 }
3555 _ACEOF
3556 rm -f conftest.$ac_objext
3557 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3558   (eval $ac_compile) 2>&5
3559   ac_status=$?
3560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3561   (exit $ac_status); } &&
3562          { ac_try='test -s conftest.$ac_objext'
3563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3564   (eval $ac_try) 2>&5
3565   ac_status=$?
3566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3567   (exit $ac_status); }; }; then
3568   ac_cv_type_size_t=yes
3569 else
3570   echo "$as_me: failed program was:" >&5
3571 cat conftest.$ac_ext >&5
3572 ac_cv_type_size_t=no
3573 fi
3574 rm -f conftest.$ac_objext conftest.$ac_ext
3575 fi
3576 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
3577 echo "${ECHO_T}$ac_cv_type_size_t" >&6
3578 if test $ac_cv_type_size_t = yes; then
3579   :
3580 else
3581
3582 cat >>confdefs.h <<_ACEOF
3583 #define size_t unsigned
3584 _ACEOF
3585
3586 fi
3587
3588 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
3589 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
3590 if test "${ac_cv_type_signal+set}" = set; then
3591   echo $ECHO_N "(cached) $ECHO_C" >&6
3592 else
3593   cat >conftest.$ac_ext <<_ACEOF
3594 #line $LINENO "configure"
3595 #include "confdefs.h"
3596 #include <sys/types.h>
3597 #include <signal.h>
3598 #ifdef signal
3599 # undef signal
3600 #endif
3601 #ifdef __cplusplus
3602 extern "C" void (*signal (int, void (*)(int)))(int);
3603 #else
3604 void (*signal ()) ();
3605 #endif
3606
3607 #ifdef F77_DUMMY_MAIN
3608 #  ifdef __cplusplus
3609      extern "C"
3610 #  endif
3611    int F77_DUMMY_MAIN() { return 1; }
3612 #endif
3613 int
3614 main ()
3615 {
3616 int i;
3617   ;
3618   return 0;
3619 }
3620 _ACEOF
3621 rm -f conftest.$ac_objext
3622 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3623   (eval $ac_compile) 2>&5
3624   ac_status=$?
3625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3626   (exit $ac_status); } &&
3627          { ac_try='test -s conftest.$ac_objext'
3628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3629   (eval $ac_try) 2>&5
3630   ac_status=$?
3631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3632   (exit $ac_status); }; }; then
3633   ac_cv_type_signal=void
3634 else
3635   echo "$as_me: failed program was:" >&5
3636 cat conftest.$ac_ext >&5
3637 ac_cv_type_signal=int
3638 fi
3639 rm -f conftest.$ac_objext conftest.$ac_ext
3640 fi
3641 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
3642 echo "${ECHO_T}$ac_cv_type_signal" >&6
3643
3644 cat >>confdefs.h <<_ACEOF
3645 #define RETSIGTYPE $ac_cv_type_signal
3646 _ACEOF
3647
3648
3649 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
3650 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3651 if test "${ac_cv_header_time+set}" = set; then
3652   echo $ECHO_N "(cached) $ECHO_C" >&6
3653 else
3654   cat >conftest.$ac_ext <<_ACEOF
3655 #line $LINENO "configure"
3656 #include "confdefs.h"
3657 #include <sys/types.h>
3658 #include <sys/time.h>
3659 #include <time.h>
3660
3661 #ifdef F77_DUMMY_MAIN
3662 #  ifdef __cplusplus
3663      extern "C"
3664 #  endif
3665    int F77_DUMMY_MAIN() { return 1; }
3666 #endif
3667 int
3668 main ()
3669 {
3670 if ((struct tm *) 0)
3671 return 0;
3672   ;
3673   return 0;
3674 }
3675 _ACEOF
3676 rm -f conftest.$ac_objext
3677 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3678   (eval $ac_compile) 2>&5
3679   ac_status=$?
3680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3681   (exit $ac_status); } &&
3682          { ac_try='test -s conftest.$ac_objext'
3683   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3684   (eval $ac_try) 2>&5
3685   ac_status=$?
3686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3687   (exit $ac_status); }; }; then
3688   ac_cv_header_time=yes
3689 else
3690   echo "$as_me: failed program was:" >&5
3691 cat conftest.$ac_ext >&5
3692 ac_cv_header_time=no
3693 fi
3694 rm -f conftest.$ac_objext conftest.$ac_ext
3695 fi
3696 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
3697 echo "${ECHO_T}$ac_cv_header_time" >&6
3698 if test $ac_cv_header_time = yes; then
3699
3700 cat >>confdefs.h <<\_ACEOF
3701 #define TIME_WITH_SYS_TIME 1
3702 _ACEOF
3703
3704 fi
3705
3706 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
3707 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
3708 if test "${ac_cv_header_sys_wait_h+set}" = set; then
3709   echo $ECHO_N "(cached) $ECHO_C" >&6
3710 else
3711   cat >conftest.$ac_ext <<_ACEOF
3712 #line $LINENO "configure"
3713 #include "confdefs.h"
3714 #include <sys/types.h>
3715 #include <sys/wait.h>
3716 #ifndef WEXITSTATUS
3717 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3718 #endif
3719 #ifndef WIFEXITED
3720 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3721 #endif
3722
3723 #ifdef F77_DUMMY_MAIN
3724 #  ifdef __cplusplus
3725      extern "C"
3726 #  endif
3727    int F77_DUMMY_MAIN() { return 1; }
3728 #endif
3729 int
3730 main ()
3731 {
3732   int s;
3733   wait (&s);
3734   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3735   ;
3736   return 0;
3737 }
3738 _ACEOF
3739 rm -f conftest.$ac_objext
3740 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3741   (eval $ac_compile) 2>&5
3742   ac_status=$?
3743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3744   (exit $ac_status); } &&
3745          { ac_try='test -s conftest.$ac_objext'
3746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3747   (eval $ac_try) 2>&5
3748   ac_status=$?
3749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3750   (exit $ac_status); }; }; then
3751   ac_cv_header_sys_wait_h=yes
3752 else
3753   echo "$as_me: failed program was:" >&5
3754 cat conftest.$ac_ext >&5
3755 ac_cv_header_sys_wait_h=no
3756 fi
3757 rm -f conftest.$ac_objext conftest.$ac_ext
3758 fi
3759 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3760 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3761 if test $ac_cv_header_sys_wait_h = yes; then
3762
3763 cat >>confdefs.h <<\_ACEOF
3764 #define HAVE_SYS_WAIT_H 1
3765 _ACEOF
3766
3767 fi
3768
3769
3770
3771
3772
3773
3774 ac_header_dirent=no
3775 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3776   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3777 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3778 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3779 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3780   echo $ECHO_N "(cached) $ECHO_C" >&6
3781 else
3782   cat >conftest.$ac_ext <<_ACEOF
3783 #line $LINENO "configure"
3784 #include "confdefs.h"
3785 #include <sys/types.h>
3786 #include <$ac_hdr>
3787
3788 #ifdef F77_DUMMY_MAIN
3789 #  ifdef __cplusplus
3790      extern "C"
3791 #  endif
3792    int F77_DUMMY_MAIN() { return 1; }
3793 #endif
3794 int
3795 main ()
3796 {
3797 if ((DIR *) 0)
3798 return 0;
3799   ;
3800   return 0;
3801 }
3802 _ACEOF
3803 rm -f conftest.$ac_objext
3804 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3805   (eval $ac_compile) 2>&5
3806   ac_status=$?
3807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3808   (exit $ac_status); } &&
3809          { ac_try='test -s conftest.$ac_objext'
3810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3811   (eval $ac_try) 2>&5
3812   ac_status=$?
3813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3814   (exit $ac_status); }; }; then
3815   eval "$as_ac_Header=yes"
3816 else
3817   echo "$as_me: failed program was:" >&5
3818 cat conftest.$ac_ext >&5
3819 eval "$as_ac_Header=no"
3820 fi
3821 rm -f conftest.$ac_objext conftest.$ac_ext
3822 fi
3823 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3824 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3825 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3826   cat >>confdefs.h <<_ACEOF
3827 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
3828 _ACEOF
3829
3830 ac_header_dirent=$ac_hdr; break
3831 fi
3832
3833 done
3834 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3835 if test $ac_header_dirent = dirent.h; then
3836   echo "$as_me:$LINENO: checking for library containing opendir" >&5
3837 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
3838 if test "${ac_cv_search_opendir+set}" = set; then
3839   echo $ECHO_N "(cached) $ECHO_C" >&6
3840 else
3841   ac_func_search_save_LIBS=$LIBS
3842 ac_cv_search_opendir=no
3843 cat >conftest.$ac_ext <<_ACEOF
3844 #line $LINENO "configure"
3845 #include "confdefs.h"
3846
3847 /* Override any gcc2 internal prototype to avoid an error.  */
3848 #ifdef __cplusplus
3849 extern "C"
3850 #endif
3851 /* We use char because int might match the return type of a gcc2
3852    builtin and then its argument prototype would still apply.  */
3853 char opendir ();
3854 #ifdef F77_DUMMY_MAIN
3855 #  ifdef __cplusplus
3856      extern "C"
3857 #  endif
3858    int F77_DUMMY_MAIN() { return 1; }
3859 #endif
3860 int
3861 main ()
3862 {
3863 opendir ();
3864   ;
3865   return 0;
3866 }
3867 _ACEOF
3868 rm -f conftest.$ac_objext conftest$ac_exeext
3869 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3870   (eval $ac_link) 2>&5
3871   ac_status=$?
3872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3873   (exit $ac_status); } &&
3874          { ac_try='test -s conftest$ac_exeext'
3875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3876   (eval $ac_try) 2>&5
3877   ac_status=$?
3878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3879   (exit $ac_status); }; }; then
3880   ac_cv_search_opendir="none required"
3881 else
3882   echo "$as_me: failed program was:" >&5
3883 cat conftest.$ac_ext >&5
3884 fi
3885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3886 if test "$ac_cv_search_opendir" = no; then
3887   for ac_lib in dir; do
3888     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3889     cat >conftest.$ac_ext <<_ACEOF
3890 #line $LINENO "configure"
3891 #include "confdefs.h"
3892
3893 /* Override any gcc2 internal prototype to avoid an error.  */
3894 #ifdef __cplusplus
3895 extern "C"
3896 #endif
3897 /* We use char because int might match the return type of a gcc2
3898    builtin and then its argument prototype would still apply.  */
3899 char opendir ();
3900 #ifdef F77_DUMMY_MAIN
3901 #  ifdef __cplusplus
3902      extern "C"
3903 #  endif
3904    int F77_DUMMY_MAIN() { return 1; }
3905 #endif
3906 int
3907 main ()
3908 {
3909 opendir ();
3910   ;
3911   return 0;
3912 }
3913 _ACEOF
3914 rm -f conftest.$ac_objext conftest$ac_exeext
3915 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3916   (eval $ac_link) 2>&5
3917   ac_status=$?
3918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3919   (exit $ac_status); } &&
3920          { ac_try='test -s conftest$ac_exeext'
3921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3922   (eval $ac_try) 2>&5
3923   ac_status=$?
3924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3925   (exit $ac_status); }; }; then
3926   ac_cv_search_opendir="-l$ac_lib"
3927 break
3928 else
3929   echo "$as_me: failed program was:" >&5
3930 cat conftest.$ac_ext >&5
3931 fi
3932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3933   done
3934 fi
3935 LIBS=$ac_func_search_save_LIBS
3936 fi
3937 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
3938 echo "${ECHO_T}$ac_cv_search_opendir" >&6
3939 if test "$ac_cv_search_opendir" != no; then
3940   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
3941
3942 fi
3943
3944 else
3945   echo "$as_me:$LINENO: checking for library containing opendir" >&5
3946 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
3947 if test "${ac_cv_search_opendir+set}" = set; then
3948   echo $ECHO_N "(cached) $ECHO_C" >&6
3949 else
3950   ac_func_search_save_LIBS=$LIBS
3951 ac_cv_search_opendir=no
3952 cat >conftest.$ac_ext <<_ACEOF
3953 #line $LINENO "configure"
3954 #include "confdefs.h"
3955
3956 /* Override any gcc2 internal prototype to avoid an error.  */
3957 #ifdef __cplusplus
3958 extern "C"
3959 #endif
3960 /* We use char because int might match the return type of a gcc2
3961    builtin and then its argument prototype would still apply.  */
3962 char opendir ();
3963 #ifdef F77_DUMMY_MAIN
3964 #  ifdef __cplusplus
3965      extern "C"
3966 #  endif
3967    int F77_DUMMY_MAIN() { return 1; }
3968 #endif
3969 int
3970 main ()
3971 {
3972 opendir ();
3973   ;
3974   return 0;
3975 }
3976 _ACEOF
3977 rm -f conftest.$ac_objext conftest$ac_exeext
3978 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3979   (eval $ac_link) 2>&5
3980   ac_status=$?
3981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3982   (exit $ac_status); } &&
3983          { ac_try='test -s conftest$ac_exeext'
3984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3985   (eval $ac_try) 2>&5
3986   ac_status=$?
3987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3988   (exit $ac_status); }; }; then
3989   ac_cv_search_opendir="none required"
3990 else
3991   echo "$as_me: failed program was:" >&5
3992 cat conftest.$ac_ext >&5
3993 fi
3994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3995 if test "$ac_cv_search_opendir" = no; then
3996   for ac_lib in x; do
3997     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3998     cat >conftest.$ac_ext <<_ACEOF
3999 #line $LINENO "configure"
4000 #include "confdefs.h"
4001
4002 /* Override any gcc2 internal prototype to avoid an error.  */
4003 #ifdef __cplusplus
4004 extern "C"
4005 #endif
4006 /* We use char because int might match the return type of a gcc2
4007    builtin and then its argument prototype would still apply.  */
4008 char opendir ();
4009 #ifdef F77_DUMMY_MAIN
4010 #  ifdef __cplusplus
4011      extern "C"
4012 #  endif
4013    int F77_DUMMY_MAIN() { return 1; }
4014 #endif
4015 int
4016 main ()
4017 {
4018 opendir ();
4019   ;
4020   return 0;
4021 }
4022 _ACEOF
4023 rm -f conftest.$ac_objext conftest$ac_exeext
4024 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4025   (eval $ac_link) 2>&5
4026   ac_status=$?
4027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4028   (exit $ac_status); } &&
4029          { ac_try='test -s conftest$ac_exeext'
4030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4031   (eval $ac_try) 2>&5
4032   ac_status=$?
4033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4034   (exit $ac_status); }; }; then
4035   ac_cv_search_opendir="-l$ac_lib"
4036 break
4037 else
4038   echo "$as_me: failed program was:" >&5
4039 cat conftest.$ac_ext >&5
4040 fi
4041 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4042   done
4043 fi
4044 LIBS=$ac_func_search_save_LIBS
4045 fi
4046 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4047 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4048 if test "$ac_cv_search_opendir" != no; then
4049   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4050
4051 fi
4052
4053 fi
4054
4055 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4056 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4057   if test "${ac_cv_gettimeofday_args+set}" = set; then
4058   echo $ECHO_N "(cached) $ECHO_C" >&6
4059 else
4060   cat >conftest.$ac_ext <<_ACEOF
4061 #line $LINENO "configure"
4062 #include "confdefs.h"
4063 #include <stdlib.h>
4064                     #include <sys/time.h>
4065 #ifdef F77_DUMMY_MAIN
4066 #  ifdef __cplusplus
4067      extern "C"
4068 #  endif
4069    int F77_DUMMY_MAIN() { return 1; }
4070 #endif
4071 int
4072 main ()
4073 {
4074 struct timeval tv; struct timezone tzp;
4075                     gettimeofday(&tv, &tzp);
4076   ;
4077   return 0;
4078 }
4079 _ACEOF
4080 rm -f conftest.$ac_objext
4081 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4082   (eval $ac_compile) 2>&5
4083   ac_status=$?
4084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085   (exit $ac_status); } &&
4086          { ac_try='test -s conftest.$ac_objext'
4087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4088   (eval $ac_try) 2>&5
4089   ac_status=$?
4090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4091   (exit $ac_status); }; }; then
4092   ac_gettimeofday_args=2
4093 else
4094   echo "$as_me: failed program was:" >&5
4095 cat conftest.$ac_ext >&5
4096 cat >conftest.$ac_ext <<_ACEOF
4097 #line $LINENO "configure"
4098 #include "confdefs.h"
4099 #include <stdlib.h>
4100                                     #include <sys/time.h>
4101 #ifdef F77_DUMMY_MAIN
4102 #  ifdef __cplusplus
4103      extern "C"
4104 #  endif
4105    int F77_DUMMY_MAIN() { return 1; }
4106 #endif
4107 int
4108 main ()
4109 {
4110 struct timeval tv; gettimeofday(&tv);
4111   ;
4112   return 0;
4113 }
4114 _ACEOF
4115 rm -f conftest.$ac_objext
4116 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4117   (eval $ac_compile) 2>&5
4118   ac_status=$?
4119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4120   (exit $ac_status); } &&
4121          { ac_try='test -s conftest.$ac_objext'
4122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4123   (eval $ac_try) 2>&5
4124   ac_status=$?
4125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126   (exit $ac_status); }; }; then
4127   ac_gettimeofday_args=1
4128 else
4129   echo "$as_me: failed program was:" >&5
4130 cat conftest.$ac_ext >&5
4131 ac_gettimeofday_args=0
4132 fi
4133 rm -f conftest.$ac_objext conftest.$ac_ext
4134 fi
4135 rm -f conftest.$ac_objext conftest.$ac_ext
4136     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4137 fi
4138
4139   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4140   if test "$ac_gettimeofday_args" = 1 ; then
4141     cat >>confdefs.h <<\_ACEOF
4142 #define HAVE_GETTIMEOFDAY 1
4143 _ACEOF
4144
4145     echo "$as_me:$LINENO: result: one argument" >&5
4146 echo "${ECHO_T}one argument" >&6
4147   elif test "$ac_gettimeofday_args" = 2 ; then
4148     cat >>confdefs.h <<\_ACEOF
4149 #define HAVE_GETTIMEOFDAY 1
4150 _ACEOF
4151
4152     cat >>confdefs.h <<\_ACEOF
4153 #define GETTIMEOFDAY_TWO_ARGS 1
4154 _ACEOF
4155
4156     echo "$as_me:$LINENO: result: two arguments" >&5
4157 echo "${ECHO_T}two arguments" >&6
4158   else
4159     echo "$as_me:$LINENO: result: unknown" >&5
4160 echo "${ECHO_T}unknown" >&6
4161   fi
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4173 do
4174 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4175 echo "$as_me:$LINENO: checking for $ac_func" >&5
4176 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4177 if eval "test \"\${$as_ac_var+set}\" = set"; then
4178   echo $ECHO_N "(cached) $ECHO_C" >&6
4179 else
4180   cat >conftest.$ac_ext <<_ACEOF
4181 #line $LINENO "configure"
4182 #include "confdefs.h"
4183 /* System header to define __stub macros and hopefully few prototypes,
4184     which can conflict with char $ac_func (); below.  */
4185 #include <assert.h>
4186 /* Override any gcc2 internal prototype to avoid an error.  */
4187 #ifdef __cplusplus
4188 extern "C"
4189 #endif
4190 /* We use char because int might match the return type of a gcc2
4191    builtin and then its argument prototype would still apply.  */
4192 char $ac_func ();
4193 char (*f) ();
4194
4195 #ifdef F77_DUMMY_MAIN
4196 #  ifdef __cplusplus
4197      extern "C"
4198 #  endif
4199    int F77_DUMMY_MAIN() { return 1; }
4200 #endif
4201 int
4202 main ()
4203 {
4204 /* The GNU C library defines this for functions which it implements
4205     to always fail with ENOSYS.  Some functions are actually named
4206     something starting with __ and the normal name is an alias.  */
4207 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4208 choke me
4209 #else
4210 f = $ac_func;
4211 #endif
4212
4213   ;
4214   return 0;
4215 }
4216 _ACEOF
4217 rm -f conftest.$ac_objext conftest$ac_exeext
4218 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4219   (eval $ac_link) 2>&5
4220   ac_status=$?
4221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4222   (exit $ac_status); } &&
4223          { ac_try='test -s conftest$ac_exeext'
4224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4225   (eval $ac_try) 2>&5
4226   ac_status=$?
4227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4228   (exit $ac_status); }; }; then
4229   eval "$as_ac_var=yes"
4230 else
4231   echo "$as_me: failed program was:" >&5
4232 cat conftest.$ac_ext >&5
4233 eval "$as_ac_var=no"
4234 fi
4235 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4236 fi
4237 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4238 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4239 if test `eval echo '${'$as_ac_var'}'` = yes; then
4240   cat >>confdefs.h <<_ACEOF
4241 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4242 _ACEOF
4243
4244 fi
4245 done
4246
4247
4248
4249
4250
4251
4252 for ac_func in sigaction syslog realpath setrlimit
4253 do
4254 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4255 echo "$as_me:$LINENO: checking for $ac_func" >&5
4256 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4257 if eval "test \"\${$as_ac_var+set}\" = set"; then
4258   echo $ECHO_N "(cached) $ECHO_C" >&6
4259 else
4260   cat >conftest.$ac_ext <<_ACEOF
4261 #line $LINENO "configure"
4262 #include "confdefs.h"
4263 /* System header to define __stub macros and hopefully few prototypes,
4264     which can conflict with char $ac_func (); below.  */
4265 #include <assert.h>
4266 /* Override any gcc2 internal prototype to avoid an error.  */
4267 #ifdef __cplusplus
4268 extern "C"
4269 #endif
4270 /* We use char because int might match the return type of a gcc2
4271    builtin and then its argument prototype would still apply.  */
4272 char $ac_func ();
4273 char (*f) ();
4274
4275 #ifdef F77_DUMMY_MAIN
4276 #  ifdef __cplusplus
4277      extern "C"
4278 #  endif
4279    int F77_DUMMY_MAIN() { return 1; }
4280 #endif
4281 int
4282 main ()
4283 {
4284 /* The GNU C library defines this for functions which it implements
4285     to always fail with ENOSYS.  Some functions are actually named
4286     something starting with __ and the normal name is an alias.  */
4287 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4288 choke me
4289 #else
4290 f = $ac_func;
4291 #endif
4292
4293   ;
4294   return 0;
4295 }
4296 _ACEOF
4297 rm -f conftest.$ac_objext conftest$ac_exeext
4298 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4299   (eval $ac_link) 2>&5
4300   ac_status=$?
4301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4302   (exit $ac_status); } &&
4303          { ac_try='test -s conftest$ac_exeext'
4304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4305   (eval $ac_try) 2>&5
4306   ac_status=$?
4307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4308   (exit $ac_status); }; }; then
4309   eval "$as_ac_var=yes"
4310 else
4311   echo "$as_me: failed program was:" >&5
4312 cat conftest.$ac_ext >&5
4313 eval "$as_ac_var=no"
4314 fi
4315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4316 fi
4317 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4318 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4319 if test `eval echo '${'$as_ac_var'}'` = yes; then
4320   cat >>confdefs.h <<_ACEOF
4321 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4322 _ACEOF
4323
4324 fi
4325 done
4326
4327 echo "$as_me:$LINENO: checking for struct icmp" >&5
4328 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
4329 if test "${ac_cv_have_icmp+set}" = set; then
4330   echo $ECHO_N "(cached) $ECHO_C" >&6
4331 else
4332   cat >conftest.$ac_ext <<_ACEOF
4333 #line $LINENO "configure"
4334 #include "confdefs.h"
4335 #include <stdlib.h>
4336                    #include <stdio.h>
4337                    #include <math.h>
4338                    #include <unistd.h>
4339                    #include <limits.h>
4340                    #include <signal.h>
4341                    #include <fcntl.h>
4342                    #include <sys/types.h>
4343                    #include <sys/time.h>
4344                    #include <sys/ipc.h>
4345                    #include <sys/shm.h>
4346                    #include <sys/socket.h>
4347                    #include <netinet/in_systm.h>
4348                    #include <netinet/in.h>
4349                    #include <netinet/ip.h>
4350                    #include <netinet/ip_icmp.h>
4351                    #include <netinet/udp.h>
4352                    #include <arpa/inet.h>
4353                    #include <netdb.h>
4354 #ifdef F77_DUMMY_MAIN
4355 #  ifdef __cplusplus
4356      extern "C"
4357 #  endif
4358    int F77_DUMMY_MAIN() { return 1; }
4359 #endif
4360 int
4361 main ()
4362 {
4363 struct icmp i;
4364                    struct sockaddr s;
4365                    struct sockaddr_in si;
4366                    struct ip ip;
4367                    i.icmp_type = ICMP_ECHO;
4368                    i.icmp_code = 0;
4369                    i.icmp_cksum = 0;
4370                    i.icmp_id = 0;
4371                    i.icmp_seq = 0;
4372                    si.sin_family = AF_INET;
4373                    #if defined(__DECC) || defined(_IP_VHL)
4374                    ip.ip_vhl = 0;
4375                    #else
4376                    ip.ip_hl = 0;
4377                    #endif
4378
4379   ;
4380   return 0;
4381 }
4382 _ACEOF
4383 rm -f conftest.$ac_objext
4384 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4385   (eval $ac_compile) 2>&5
4386   ac_status=$?
4387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4388   (exit $ac_status); } &&
4389          { ac_try='test -s conftest.$ac_objext'
4390   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4391   (eval $ac_try) 2>&5
4392   ac_status=$?
4393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4394   (exit $ac_status); }; }; then
4395   ac_cv_have_icmp=yes
4396 else
4397   echo "$as_me: failed program was:" >&5
4398 cat conftest.$ac_ext >&5
4399 ac_cv_have_icmp=no
4400 fi
4401 rm -f conftest.$ac_objext conftest.$ac_ext
4402 fi
4403 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
4404 echo "${ECHO_T}$ac_cv_have_icmp" >&6
4405  if test "$ac_cv_have_icmp" = yes ; then
4406    cat >>confdefs.h <<\_ACEOF
4407 #define HAVE_ICMP 1
4408 _ACEOF
4409
4410  fi
4411 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
4412 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
4413 if test "${ac_cv_have_icmphdr+set}" = set; then
4414   echo $ECHO_N "(cached) $ECHO_C" >&6
4415 else
4416   cat >conftest.$ac_ext <<_ACEOF
4417 #line $LINENO "configure"
4418 #include "confdefs.h"
4419 #include <stdlib.h>
4420                    #include <stdio.h>
4421                    #include <math.h>
4422                    #include <unistd.h>
4423                    #include <limits.h>
4424                    #include <signal.h>
4425                    #include <fcntl.h>
4426                    #include <sys/types.h>
4427                    #include <sys/time.h>
4428                    #include <sys/ipc.h>
4429                    #include <sys/shm.h>
4430                    #include <sys/socket.h>
4431                    #include <netinet/in_systm.h>
4432                    #include <netinet/in.h>
4433                    #include <netinet/ip.h>
4434                    #include <netinet/ip_icmp.h>
4435                    #include <netinet/udp.h>
4436                    #include <arpa/inet.h>
4437                    #include <netdb.h>
4438 #ifdef F77_DUMMY_MAIN
4439 #  ifdef __cplusplus
4440      extern "C"
4441 #  endif
4442    int F77_DUMMY_MAIN() { return 1; }
4443 #endif
4444 int
4445 main ()
4446 {
4447 struct icmphdr i;
4448                    struct sockaddr s;
4449                    struct sockaddr_in si;
4450                    struct ip ip;
4451                    i.type = ICMP_ECHO;
4452                    i.code = 0;
4453                    i.checksum = 0;
4454                    i.un.echo.id = 0;
4455                    i.un.echo.sequence = 0;
4456                    si.sin_family = AF_INET;
4457                    ip.ip_hl = 0;
4458   ;
4459   return 0;
4460 }
4461 _ACEOF
4462 rm -f conftest.$ac_objext
4463 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4464   (eval $ac_compile) 2>&5
4465   ac_status=$?
4466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4467   (exit $ac_status); } &&
4468          { ac_try='test -s conftest.$ac_objext'
4469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4470   (eval $ac_try) 2>&5
4471   ac_status=$?
4472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4473   (exit $ac_status); }; }; then
4474   ac_cv_have_icmphdr=yes
4475 else
4476   echo "$as_me: failed program was:" >&5
4477 cat conftest.$ac_ext >&5
4478 ac_cv_have_icmphdr=no
4479 fi
4480 rm -f conftest.$ac_objext conftest.$ac_ext
4481 fi
4482 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
4483 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
4484  if test "$ac_cv_have_icmphdr" = yes ; then
4485    cat >>confdefs.h <<\_ACEOF
4486 #define HAVE_ICMPHDR 1
4487 _ACEOF
4488
4489  fi
4490
4491
4492 for ac_header in crypt.h sys/select.h
4493 do
4494 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4495 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4496   echo "$as_me:$LINENO: checking for $ac_header" >&5
4497 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4498 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4499   echo $ECHO_N "(cached) $ECHO_C" >&6
4500 fi
4501 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4502 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4503 else
4504   # Is the header compilable?
4505 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4506 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4507 cat >conftest.$ac_ext <<_ACEOF
4508 #line $LINENO "configure"
4509 #include "confdefs.h"
4510 $ac_includes_default
4511 #include <$ac_header>
4512 _ACEOF
4513 rm -f conftest.$ac_objext
4514 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4515   (eval $ac_compile) 2>&5
4516   ac_status=$?
4517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4518   (exit $ac_status); } &&
4519          { ac_try='test -s conftest.$ac_objext'
4520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4521   (eval $ac_try) 2>&5
4522   ac_status=$?
4523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4524   (exit $ac_status); }; }; then
4525   ac_header_compiler=yes
4526 else
4527   echo "$as_me: failed program was:" >&5
4528 cat conftest.$ac_ext >&5
4529 ac_header_compiler=no
4530 fi
4531 rm -f conftest.$ac_objext conftest.$ac_ext
4532 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4533 echo "${ECHO_T}$ac_header_compiler" >&6
4534
4535 # Is the header present?
4536 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4537 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4538 cat >conftest.$ac_ext <<_ACEOF
4539 #line $LINENO "configure"
4540 #include "confdefs.h"
4541 #include <$ac_header>
4542 _ACEOF
4543 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4544   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4545   ac_status=$?
4546   egrep -v '^ *\+' conftest.er1 >conftest.err
4547   rm -f conftest.er1
4548   cat conftest.err >&5
4549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4550   (exit $ac_status); } >/dev/null; then
4551   if test -s conftest.err; then
4552     ac_cpp_err=$ac_c_preproc_warn_flag
4553   else
4554     ac_cpp_err=
4555   fi
4556 else
4557   ac_cpp_err=yes
4558 fi
4559 if test -z "$ac_cpp_err"; then
4560   ac_header_preproc=yes
4561 else
4562   echo "$as_me: failed program was:" >&5
4563   cat conftest.$ac_ext >&5
4564   ac_header_preproc=no
4565 fi
4566 rm -f conftest.err conftest.$ac_ext
4567 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4568 echo "${ECHO_T}$ac_header_preproc" >&6
4569
4570 # So?  What about this header?
4571 case $ac_header_compiler:$ac_header_preproc in
4572   yes:no )
4573     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4574 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4575     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4576 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4577   no:yes )
4578     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4579 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4580     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4581 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4582     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4583 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4584 esac
4585 echo "$as_me:$LINENO: checking for $ac_header" >&5
4586 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4587 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4588   echo $ECHO_N "(cached) $ECHO_C" >&6
4589 else
4590   eval "$as_ac_Header=$ac_header_preproc"
4591 fi
4592 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4593 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4594
4595 fi
4596 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4597   cat >>confdefs.h <<_ACEOF
4598 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4599 _ACEOF
4600
4601 fi
4602
4603 done
4604
4605 for ac_prog in perl5 perl
4606 do
4607   # Extract the first word of "$ac_prog", so it can be a program name with args.
4608 set dummy $ac_prog; ac_word=$2
4609 echo "$as_me:$LINENO: checking for $ac_word" >&5
4610 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4611 if test "${ac_cv_path_PERL+set}" = set; then
4612   echo $ECHO_N "(cached) $ECHO_C" >&6
4613 else
4614   case $PERL in
4615   [\\/]* | ?:[\\/]*)
4616   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4617   ;;
4618   *)
4619   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4620 for as_dir in $PATH
4621 do
4622   IFS=$as_save_IFS
4623   test -z "$as_dir" && as_dir=.
4624   for ac_exec_ext in '' $ac_executable_extensions; do
4625   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4626     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4627     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4628     break 2
4629   fi
4630 done
4631 done
4632
4633   ;;
4634 esac
4635 fi
4636 PERL=$ac_cv_path_PERL
4637
4638 if test -n "$PERL"; then
4639   echo "$as_me:$LINENO: result: $PERL" >&5
4640 echo "${ECHO_T}$PERL" >&6
4641 else
4642   echo "$as_me:$LINENO: result: no" >&5
4643 echo "${ECHO_T}no" >&6
4644 fi
4645
4646   test -n "$PERL" && break
4647 done
4648
4649   if test -z "$PERL" ; then
4650     PERL_VERSION=0
4651   else
4652     echo "$as_me:$LINENO: checking perl version" >&5
4653 echo $ECHO_N "checking perl version... $ECHO_C" >&6
4654 if test "${ac_cv_perl_version+set}" = set; then
4655   echo $ECHO_N "(cached) $ECHO_C" >&6
4656 else
4657   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
4658 fi
4659 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
4660 echo "${ECHO_T}$ac_cv_perl_version" >&6
4661     PERL_VERSION=$ac_cv_perl_version
4662   fi
4663
4664
4665 if test -z "$PERL" ; then
4666   # don't let it be blank...
4667   PERL=/usr/bin/perl
4668 fi
4669
4670 echo "$as_me:$LINENO: checking for X" >&5
4671 echo $ECHO_N "checking for X... $ECHO_C" >&6
4672
4673
4674 # Check whether --with-x or --without-x was given.
4675 if test "${with_x+set}" = set; then
4676   withval="$with_x"
4677
4678 fi;
4679 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4680 if test "x$with_x" = xno; then
4681   # The user explicitly disabled X.
4682   have_x=disabled
4683 else
4684   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4685     # Both variables are already set.
4686     have_x=yes
4687   else
4688     if test "${ac_cv_have_x+set}" = set; then
4689   echo $ECHO_N "(cached) $ECHO_C" >&6
4690 else
4691   # One or both of the vars are not set, and there is no cached value.
4692 ac_x_includes=no ac_x_libraries=no
4693 rm -fr conftest.dir
4694 if mkdir conftest.dir; then
4695   cd conftest.dir
4696   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4697   cat >Imakefile <<'_ACEOF'
4698 acfindx:
4699         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4700 _ACEOF
4701   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4702     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4703     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4704     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4705     for ac_extension in a so sl; do
4706       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4707          test -f $ac_im_libdir/libX11.$ac_extension; then
4708         ac_im_usrlibdir=$ac_im_libdir; break
4709       fi
4710     done
4711     # Screen out bogus values from the imake configuration.  They are
4712     # bogus both because they are the default anyway, and because
4713     # using them would break gcc on systems where it needs fixed includes.
4714     case $ac_im_incroot in
4715         /usr/include) ;;
4716         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4717     esac
4718     case $ac_im_usrlibdir in
4719         /usr/lib | /lib) ;;
4720         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4721     esac
4722   fi
4723   cd ..
4724   rm -fr conftest.dir
4725 fi
4726
4727 # Standard set of common directories for X headers.
4728 # Check X11 before X11Rn because it is often a symlink to the current release.
4729 ac_x_header_dirs='
4730 /usr/X11/include
4731 /usr/X11R6/include
4732 /usr/X11R5/include
4733 /usr/X11R4/include
4734
4735 /usr/include/X11
4736 /usr/include/X11R6
4737 /usr/include/X11R5
4738 /usr/include/X11R4
4739
4740 /usr/local/X11/include
4741 /usr/local/X11R6/include
4742 /usr/local/X11R5/include
4743 /usr/local/X11R4/include
4744
4745 /usr/local/include/X11
4746 /usr/local/include/X11R6
4747 /usr/local/include/X11R5
4748 /usr/local/include/X11R4
4749
4750 /usr/X386/include
4751 /usr/x386/include
4752 /usr/XFree86/include/X11
4753
4754 /usr/include
4755 /usr/local/include
4756 /usr/unsupported/include
4757 /usr/athena/include
4758 /usr/local/x11r5/include
4759 /usr/lpp/Xamples/include
4760
4761 /usr/openwin/include
4762 /usr/openwin/share/include'
4763
4764 if test "$ac_x_includes" = no; then
4765   # Guess where to find include files, by looking for Intrinsic.h.
4766   # First, try using that file with no special directory specified.
4767   cat >conftest.$ac_ext <<_ACEOF
4768 #line $LINENO "configure"
4769 #include "confdefs.h"
4770 #include <X11/Intrinsic.h>
4771 _ACEOF
4772 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4773   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4774   ac_status=$?
4775   egrep -v '^ *\+' conftest.er1 >conftest.err
4776   rm -f conftest.er1
4777   cat conftest.err >&5
4778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4779   (exit $ac_status); } >/dev/null; then
4780   if test -s conftest.err; then
4781     ac_cpp_err=$ac_c_preproc_warn_flag
4782   else
4783     ac_cpp_err=
4784   fi
4785 else
4786   ac_cpp_err=yes
4787 fi
4788 if test -z "$ac_cpp_err"; then
4789   # We can compile using X headers with no special include directory.
4790 ac_x_includes=
4791 else
4792   echo "$as_me: failed program was:" >&5
4793   cat conftest.$ac_ext >&5
4794   for ac_dir in $ac_x_header_dirs; do
4795   if test -r "$ac_dir/X11/Intrinsic.h"; then
4796     ac_x_includes=$ac_dir
4797     break
4798   fi
4799 done
4800 fi
4801 rm -f conftest.err conftest.$ac_ext
4802 fi # $ac_x_includes = no
4803
4804 if test "$ac_x_libraries" = no; then
4805   # Check for the libraries.
4806   # See if we find them without any special options.
4807   # Don't add to $LIBS permanently.
4808   ac_save_LIBS=$LIBS
4809   LIBS="-lXt $LIBS"
4810   cat >conftest.$ac_ext <<_ACEOF
4811 #line $LINENO "configure"
4812 #include "confdefs.h"
4813 #include <X11/Intrinsic.h>
4814 #ifdef F77_DUMMY_MAIN
4815 #  ifdef __cplusplus
4816      extern "C"
4817 #  endif
4818    int F77_DUMMY_MAIN() { return 1; }
4819 #endif
4820 int
4821 main ()
4822 {
4823 XtMalloc (0)
4824   ;
4825   return 0;
4826 }
4827 _ACEOF
4828 rm -f conftest.$ac_objext conftest$ac_exeext
4829 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4830   (eval $ac_link) 2>&5
4831   ac_status=$?
4832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4833   (exit $ac_status); } &&
4834          { ac_try='test -s conftest$ac_exeext'
4835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4836   (eval $ac_try) 2>&5
4837   ac_status=$?
4838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4839   (exit $ac_status); }; }; then
4840   LIBS=$ac_save_LIBS
4841 # We can link X programs with no special library path.
4842 ac_x_libraries=
4843 else
4844   echo "$as_me: failed program was:" >&5
4845 cat conftest.$ac_ext >&5
4846 LIBS=$ac_save_LIBS
4847 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
4848 do
4849   # Don't even attempt the hair of trying to link an X program!
4850   for ac_extension in a so sl; do
4851     if test -r $ac_dir/libXt.$ac_extension; then
4852       ac_x_libraries=$ac_dir
4853       break 2
4854     fi
4855   done
4856 done
4857 fi
4858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4859 fi # $ac_x_libraries = no
4860
4861 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
4862   # Didn't find X anywhere.  Cache the known absence of X.
4863   ac_cv_have_x="have_x=no"
4864 else
4865   # Record where we found X for the cache.
4866   ac_cv_have_x="have_x=yes \
4867                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4868 fi
4869 fi
4870
4871   fi
4872   eval "$ac_cv_have_x"
4873 fi # $with_x != no
4874
4875 if test "$have_x" != yes; then
4876   echo "$as_me:$LINENO: result: $have_x" >&5
4877 echo "${ECHO_T}$have_x" >&6
4878   no_x=yes
4879 else
4880   # If each of the values was on the command line, it overrides each guess.
4881   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4882   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4883   # Update the cache value to reflect the command line values.
4884   ac_cv_have_x="have_x=yes \
4885                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4886   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
4887 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
4888 fi
4889
4890 if test "$no_x" = yes; then
4891   # Not all programs may use this symbol, but it does not hurt to define it.
4892
4893 cat >>confdefs.h <<\_ACEOF
4894 #define X_DISPLAY_MISSING 1
4895 _ACEOF
4896
4897   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4898 else
4899   if test -n "$x_includes"; then
4900     X_CFLAGS="$X_CFLAGS -I$x_includes"
4901   fi
4902
4903   # It would also be nice to do this for all -L options, not just this one.
4904   if test -n "$x_libraries"; then
4905     X_LIBS="$X_LIBS -L$x_libraries"
4906     # For Solaris; some versions of Sun CC require a space after -R and
4907     # others require no space.  Words are not sufficient . . . .
4908     case `(uname -sr) 2>/dev/null` in
4909     "SunOS 5"*)
4910       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
4911 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
4912       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
4913       cat >conftest.$ac_ext <<_ACEOF
4914 #line $LINENO "configure"
4915 #include "confdefs.h"
4916
4917 #ifdef F77_DUMMY_MAIN
4918 #  ifdef __cplusplus
4919      extern "C"
4920 #  endif
4921    int F77_DUMMY_MAIN() { return 1; }
4922 #endif
4923 int
4924 main ()
4925 {
4926
4927   ;
4928   return 0;
4929 }
4930 _ACEOF
4931 rm -f conftest.$ac_objext conftest$ac_exeext
4932 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4933   (eval $ac_link) 2>&5
4934   ac_status=$?
4935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4936   (exit $ac_status); } &&
4937          { ac_try='test -s conftest$ac_exeext'
4938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4939   (eval $ac_try) 2>&5
4940   ac_status=$?
4941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4942   (exit $ac_status); }; }; then
4943   ac_R_nospace=yes
4944 else
4945   echo "$as_me: failed program was:" >&5
4946 cat conftest.$ac_ext >&5
4947 ac_R_nospace=no
4948 fi
4949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4950       if test $ac_R_nospace = yes; then
4951         echo "$as_me:$LINENO: result: no" >&5
4952 echo "${ECHO_T}no" >&6
4953         X_LIBS="$X_LIBS -R$x_libraries"
4954       else
4955         LIBS="$ac_xsave_LIBS -R $x_libraries"
4956         cat >conftest.$ac_ext <<_ACEOF
4957 #line $LINENO "configure"
4958 #include "confdefs.h"
4959
4960 #ifdef F77_DUMMY_MAIN
4961 #  ifdef __cplusplus
4962      extern "C"
4963 #  endif
4964    int F77_DUMMY_MAIN() { return 1; }
4965 #endif
4966 int
4967 main ()
4968 {
4969
4970   ;
4971   return 0;
4972 }
4973 _ACEOF
4974 rm -f conftest.$ac_objext conftest$ac_exeext
4975 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4976   (eval $ac_link) 2>&5
4977   ac_status=$?
4978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979   (exit $ac_status); } &&
4980          { ac_try='test -s conftest$ac_exeext'
4981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4982   (eval $ac_try) 2>&5
4983   ac_status=$?
4984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985   (exit $ac_status); }; }; then
4986   ac_R_space=yes
4987 else
4988   echo "$as_me: failed program was:" >&5
4989 cat conftest.$ac_ext >&5
4990 ac_R_space=no
4991 fi
4992 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4993         if test $ac_R_space = yes; then
4994           echo "$as_me:$LINENO: result: yes" >&5
4995 echo "${ECHO_T}yes" >&6
4996           X_LIBS="$X_LIBS -R $x_libraries"
4997         else
4998           echo "$as_me:$LINENO: result: neither works" >&5
4999 echo "${ECHO_T}neither works" >&6
5000         fi
5001       fi
5002       LIBS=$ac_xsave_LIBS
5003     esac
5004   fi
5005
5006   # Check for system-dependent libraries X programs must link with.
5007   # Do this before checking for the system-independent R6 libraries
5008   # (-lICE), since we may need -lsocket or whatever for X linking.
5009
5010   if test "$ISC" = yes; then
5011     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5012   else
5013     # Martyn Johnson says this is needed for Ultrix, if the X
5014     # libraries were built with DECnet support.  And Karl Berry says
5015     # the Alpha needs dnet_stub (dnet does not exist).
5016     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5017     cat >conftest.$ac_ext <<_ACEOF
5018 #line $LINENO "configure"
5019 #include "confdefs.h"
5020
5021 /* Override any gcc2 internal prototype to avoid an error.  */
5022 #ifdef __cplusplus
5023 extern "C"
5024 #endif
5025 /* We use char because int might match the return type of a gcc2
5026    builtin and then its argument prototype would still apply.  */
5027 char XOpenDisplay ();
5028 #ifdef F77_DUMMY_MAIN
5029 #  ifdef __cplusplus
5030      extern "C"
5031 #  endif
5032    int F77_DUMMY_MAIN() { return 1; }
5033 #endif
5034 int
5035 main ()
5036 {
5037 XOpenDisplay ();
5038   ;
5039   return 0;
5040 }
5041 _ACEOF
5042 rm -f conftest.$ac_objext conftest$ac_exeext
5043 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5044   (eval $ac_link) 2>&5
5045   ac_status=$?
5046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5047   (exit $ac_status); } &&
5048          { ac_try='test -s conftest$ac_exeext'
5049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5050   (eval $ac_try) 2>&5
5051   ac_status=$?
5052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5053   (exit $ac_status); }; }; then
5054   :
5055 else
5056   echo "$as_me: failed program was:" >&5
5057 cat conftest.$ac_ext >&5
5058 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5059 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5060 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5061   echo $ECHO_N "(cached) $ECHO_C" >&6
5062 else
5063   ac_check_lib_save_LIBS=$LIBS
5064 LIBS="-ldnet  $LIBS"
5065 cat >conftest.$ac_ext <<_ACEOF
5066 #line $LINENO "configure"
5067 #include "confdefs.h"
5068
5069 /* Override any gcc2 internal prototype to avoid an error.  */
5070 #ifdef __cplusplus
5071 extern "C"
5072 #endif
5073 /* We use char because int might match the return type of a gcc2
5074    builtin and then its argument prototype would still apply.  */
5075 char dnet_ntoa ();
5076 #ifdef F77_DUMMY_MAIN
5077 #  ifdef __cplusplus
5078      extern "C"
5079 #  endif
5080    int F77_DUMMY_MAIN() { return 1; }
5081 #endif
5082 int
5083 main ()
5084 {
5085 dnet_ntoa ();
5086   ;
5087   return 0;
5088 }
5089 _ACEOF
5090 rm -f conftest.$ac_objext conftest$ac_exeext
5091 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5092   (eval $ac_link) 2>&5
5093   ac_status=$?
5094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5095   (exit $ac_status); } &&
5096          { ac_try='test -s conftest$ac_exeext'
5097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5098   (eval $ac_try) 2>&5
5099   ac_status=$?
5100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101   (exit $ac_status); }; }; then
5102   ac_cv_lib_dnet_dnet_ntoa=yes
5103 else
5104   echo "$as_me: failed program was:" >&5
5105 cat conftest.$ac_ext >&5
5106 ac_cv_lib_dnet_dnet_ntoa=no
5107 fi
5108 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5109 LIBS=$ac_check_lib_save_LIBS
5110 fi
5111 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5112 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5113 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5114   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5115 fi
5116
5117     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5118       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5119 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5120 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5121   echo $ECHO_N "(cached) $ECHO_C" >&6
5122 else
5123   ac_check_lib_save_LIBS=$LIBS
5124 LIBS="-ldnet_stub  $LIBS"
5125 cat >conftest.$ac_ext <<_ACEOF
5126 #line $LINENO "configure"
5127 #include "confdefs.h"
5128
5129 /* Override any gcc2 internal prototype to avoid an error.  */
5130 #ifdef __cplusplus
5131 extern "C"
5132 #endif
5133 /* We use char because int might match the return type of a gcc2
5134    builtin and then its argument prototype would still apply.  */
5135 char dnet_ntoa ();
5136 #ifdef F77_DUMMY_MAIN
5137 #  ifdef __cplusplus
5138      extern "C"
5139 #  endif
5140    int F77_DUMMY_MAIN() { return 1; }
5141 #endif
5142 int
5143 main ()
5144 {
5145 dnet_ntoa ();
5146   ;
5147   return 0;
5148 }
5149 _ACEOF
5150 rm -f conftest.$ac_objext conftest$ac_exeext
5151 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5152   (eval $ac_link) 2>&5
5153   ac_status=$?
5154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5155   (exit $ac_status); } &&
5156          { ac_try='test -s conftest$ac_exeext'
5157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5158   (eval $ac_try) 2>&5
5159   ac_status=$?
5160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5161   (exit $ac_status); }; }; then
5162   ac_cv_lib_dnet_stub_dnet_ntoa=yes
5163 else
5164   echo "$as_me: failed program was:" >&5
5165 cat conftest.$ac_ext >&5
5166 ac_cv_lib_dnet_stub_dnet_ntoa=no
5167 fi
5168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5169 LIBS=$ac_check_lib_save_LIBS
5170 fi
5171 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5172 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5173 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5174   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5175 fi
5176
5177     fi
5178 fi
5179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5180     LIBS="$ac_xsave_LIBS"
5181
5182     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5183     # to get the SysV transport functions.
5184     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5185     # needs -lnsl.
5186     # The nsl library prevents programs from opening the X display
5187     # on Irix 5.2, according to T.E. Dickey.
5188     # The functions gethostbyname, getservbyname, and inet_addr are
5189     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5190     echo "$as_me:$LINENO: checking for gethostbyname" >&5
5191 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5192 if test "${ac_cv_func_gethostbyname+set}" = set; then
5193   echo $ECHO_N "(cached) $ECHO_C" >&6
5194 else
5195   cat >conftest.$ac_ext <<_ACEOF
5196 #line $LINENO "configure"
5197 #include "confdefs.h"
5198 /* System header to define __stub macros and hopefully few prototypes,
5199     which can conflict with char gethostbyname (); below.  */
5200 #include <assert.h>
5201 /* Override any gcc2 internal prototype to avoid an error.  */
5202 #ifdef __cplusplus
5203 extern "C"
5204 #endif
5205 /* We use char because int might match the return type of a gcc2
5206    builtin and then its argument prototype would still apply.  */
5207 char gethostbyname ();
5208 char (*f) ();
5209
5210 #ifdef F77_DUMMY_MAIN
5211 #  ifdef __cplusplus
5212      extern "C"
5213 #  endif
5214    int F77_DUMMY_MAIN() { return 1; }
5215 #endif
5216 int
5217 main ()
5218 {
5219 /* The GNU C library defines this for functions which it implements
5220     to always fail with ENOSYS.  Some functions are actually named
5221     something starting with __ and the normal name is an alias.  */
5222 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5223 choke me
5224 #else
5225 f = gethostbyname;
5226 #endif
5227
5228   ;
5229   return 0;
5230 }
5231 _ACEOF
5232 rm -f conftest.$ac_objext conftest$ac_exeext
5233 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5234   (eval $ac_link) 2>&5
5235   ac_status=$?
5236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5237   (exit $ac_status); } &&
5238          { ac_try='test -s conftest$ac_exeext'
5239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5240   (eval $ac_try) 2>&5
5241   ac_status=$?
5242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5243   (exit $ac_status); }; }; then
5244   ac_cv_func_gethostbyname=yes
5245 else
5246   echo "$as_me: failed program was:" >&5
5247 cat conftest.$ac_ext >&5
5248 ac_cv_func_gethostbyname=no
5249 fi
5250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5251 fi
5252 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5253 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5254
5255     if test $ac_cv_func_gethostbyname = no; then
5256       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5257 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5258 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5259   echo $ECHO_N "(cached) $ECHO_C" >&6
5260 else
5261   ac_check_lib_save_LIBS=$LIBS
5262 LIBS="-lnsl  $LIBS"
5263 cat >conftest.$ac_ext <<_ACEOF
5264 #line $LINENO "configure"
5265 #include "confdefs.h"
5266
5267 /* Override any gcc2 internal prototype to avoid an error.  */
5268 #ifdef __cplusplus
5269 extern "C"
5270 #endif
5271 /* We use char because int might match the return type of a gcc2
5272    builtin and then its argument prototype would still apply.  */
5273 char gethostbyname ();
5274 #ifdef F77_DUMMY_MAIN
5275 #  ifdef __cplusplus
5276      extern "C"
5277 #  endif
5278    int F77_DUMMY_MAIN() { return 1; }
5279 #endif
5280 int
5281 main ()
5282 {
5283 gethostbyname ();
5284   ;
5285   return 0;
5286 }
5287 _ACEOF
5288 rm -f conftest.$ac_objext conftest$ac_exeext
5289 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5290   (eval $ac_link) 2>&5
5291   ac_status=$?
5292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5293   (exit $ac_status); } &&
5294          { ac_try='test -s conftest$ac_exeext'
5295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5296   (eval $ac_try) 2>&5
5297   ac_status=$?
5298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5299   (exit $ac_status); }; }; then
5300   ac_cv_lib_nsl_gethostbyname=yes
5301 else
5302   echo "$as_me: failed program was:" >&5
5303 cat conftest.$ac_ext >&5
5304 ac_cv_lib_nsl_gethostbyname=no
5305 fi
5306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5307 LIBS=$ac_check_lib_save_LIBS
5308 fi
5309 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5310 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5311 if test $ac_cv_lib_nsl_gethostbyname = yes; then
5312   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5313 fi
5314
5315       if test $ac_cv_lib_nsl_gethostbyname = no; then
5316         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5317 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5318 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5319   echo $ECHO_N "(cached) $ECHO_C" >&6
5320 else
5321   ac_check_lib_save_LIBS=$LIBS
5322 LIBS="-lbsd  $LIBS"
5323 cat >conftest.$ac_ext <<_ACEOF
5324 #line $LINENO "configure"
5325 #include "confdefs.h"
5326
5327 /* Override any gcc2 internal prototype to avoid an error.  */
5328 #ifdef __cplusplus
5329 extern "C"
5330 #endif
5331 /* We use char because int might match the return type of a gcc2
5332    builtin and then its argument prototype would still apply.  */
5333 char gethostbyname ();
5334 #ifdef F77_DUMMY_MAIN
5335 #  ifdef __cplusplus
5336      extern "C"
5337 #  endif
5338    int F77_DUMMY_MAIN() { return 1; }
5339 #endif
5340 int
5341 main ()
5342 {
5343 gethostbyname ();
5344   ;
5345   return 0;
5346 }
5347 _ACEOF
5348 rm -f conftest.$ac_objext conftest$ac_exeext
5349 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5350   (eval $ac_link) 2>&5
5351   ac_status=$?
5352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5353   (exit $ac_status); } &&
5354          { ac_try='test -s conftest$ac_exeext'
5355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5356   (eval $ac_try) 2>&5
5357   ac_status=$?
5358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5359   (exit $ac_status); }; }; then
5360   ac_cv_lib_bsd_gethostbyname=yes
5361 else
5362   echo "$as_me: failed program was:" >&5
5363 cat conftest.$ac_ext >&5
5364 ac_cv_lib_bsd_gethostbyname=no
5365 fi
5366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5367 LIBS=$ac_check_lib_save_LIBS
5368 fi
5369 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
5370 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
5371 if test $ac_cv_lib_bsd_gethostbyname = yes; then
5372   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5373 fi
5374
5375       fi
5376     fi
5377
5378     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5379     # socket/setsockopt and other routines are undefined under SCO ODT
5380     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5381     # on later versions), says Simon Leinen: it contains gethostby*
5382     # variants that don't use the nameserver (or something).  -lsocket
5383     # must be given before -lnsl if both are needed.  We assume that
5384     # if connect needs -lnsl, so does gethostbyname.
5385     echo "$as_me:$LINENO: checking for connect" >&5
5386 echo $ECHO_N "checking for connect... $ECHO_C" >&6
5387 if test "${ac_cv_func_connect+set}" = set; then
5388   echo $ECHO_N "(cached) $ECHO_C" >&6
5389 else
5390   cat >conftest.$ac_ext <<_ACEOF
5391 #line $LINENO "configure"
5392 #include "confdefs.h"
5393 /* System header to define __stub macros and hopefully few prototypes,
5394     which can conflict with char connect (); below.  */
5395 #include <assert.h>
5396 /* Override any gcc2 internal prototype to avoid an error.  */
5397 #ifdef __cplusplus
5398 extern "C"
5399 #endif
5400 /* We use char because int might match the return type of a gcc2
5401    builtin and then its argument prototype would still apply.  */
5402 char connect ();
5403 char (*f) ();
5404
5405 #ifdef F77_DUMMY_MAIN
5406 #  ifdef __cplusplus
5407      extern "C"
5408 #  endif
5409    int F77_DUMMY_MAIN() { return 1; }
5410 #endif
5411 int
5412 main ()
5413 {
5414 /* The GNU C library defines this for functions which it implements
5415     to always fail with ENOSYS.  Some functions are actually named
5416     something starting with __ and the normal name is an alias.  */
5417 #if defined (__stub_connect) || defined (__stub___connect)
5418 choke me
5419 #else
5420 f = connect;
5421 #endif
5422
5423   ;
5424   return 0;
5425 }
5426 _ACEOF
5427 rm -f conftest.$ac_objext conftest$ac_exeext
5428 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5429   (eval $ac_link) 2>&5
5430   ac_status=$?
5431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5432   (exit $ac_status); } &&
5433          { ac_try='test -s conftest$ac_exeext'
5434   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5435   (eval $ac_try) 2>&5
5436   ac_status=$?
5437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5438   (exit $ac_status); }; }; then
5439   ac_cv_func_connect=yes
5440 else
5441   echo "$as_me: failed program was:" >&5
5442 cat conftest.$ac_ext >&5
5443 ac_cv_func_connect=no
5444 fi
5445 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5446 fi
5447 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5448 echo "${ECHO_T}$ac_cv_func_connect" >&6
5449
5450     if test $ac_cv_func_connect = no; then
5451       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
5452 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
5453 if test "${ac_cv_lib_socket_connect+set}" = set; then
5454   echo $ECHO_N "(cached) $ECHO_C" >&6
5455 else
5456   ac_check_lib_save_LIBS=$LIBS
5457 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5458 cat >conftest.$ac_ext <<_ACEOF
5459 #line $LINENO "configure"
5460 #include "confdefs.h"
5461
5462 /* Override any gcc2 internal prototype to avoid an error.  */
5463 #ifdef __cplusplus
5464 extern "C"
5465 #endif
5466 /* We use char because int might match the return type of a gcc2
5467    builtin and then its argument prototype would still apply.  */
5468 char connect ();
5469 #ifdef F77_DUMMY_MAIN
5470 #  ifdef __cplusplus
5471      extern "C"
5472 #  endif
5473    int F77_DUMMY_MAIN() { return 1; }
5474 #endif
5475 int
5476 main ()
5477 {
5478 connect ();
5479   ;
5480   return 0;
5481 }
5482 _ACEOF
5483 rm -f conftest.$ac_objext conftest$ac_exeext
5484 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5485   (eval $ac_link) 2>&5
5486   ac_status=$?
5487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5488   (exit $ac_status); } &&
5489          { ac_try='test -s conftest$ac_exeext'
5490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5491   (eval $ac_try) 2>&5
5492   ac_status=$?
5493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5494   (exit $ac_status); }; }; then
5495   ac_cv_lib_socket_connect=yes
5496 else
5497   echo "$as_me: failed program was:" >&5
5498 cat conftest.$ac_ext >&5
5499 ac_cv_lib_socket_connect=no
5500 fi
5501 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5502 LIBS=$ac_check_lib_save_LIBS
5503 fi
5504 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
5505 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
5506 if test $ac_cv_lib_socket_connect = yes; then
5507   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5508 fi
5509
5510     fi
5511
5512     # Guillermo Gomez says -lposix is necessary on A/UX.
5513     echo "$as_me:$LINENO: checking for remove" >&5
5514 echo $ECHO_N "checking for remove... $ECHO_C" >&6
5515 if test "${ac_cv_func_remove+set}" = set; then
5516   echo $ECHO_N "(cached) $ECHO_C" >&6
5517 else
5518   cat >conftest.$ac_ext <<_ACEOF
5519 #line $LINENO "configure"
5520 #include "confdefs.h"
5521 /* System header to define __stub macros and hopefully few prototypes,
5522     which can conflict with char remove (); below.  */
5523 #include <assert.h>
5524 /* Override any gcc2 internal prototype to avoid an error.  */
5525 #ifdef __cplusplus
5526 extern "C"
5527 #endif
5528 /* We use char because int might match the return type of a gcc2
5529    builtin and then its argument prototype would still apply.  */
5530 char remove ();
5531 char (*f) ();
5532
5533 #ifdef F77_DUMMY_MAIN
5534 #  ifdef __cplusplus
5535      extern "C"
5536 #  endif
5537    int F77_DUMMY_MAIN() { return 1; }
5538 #endif
5539 int
5540 main ()
5541 {
5542 /* The GNU C library defines this for functions which it implements
5543     to always fail with ENOSYS.  Some functions are actually named
5544     something starting with __ and the normal name is an alias.  */
5545 #if defined (__stub_remove) || defined (__stub___remove)
5546 choke me
5547 #else
5548 f = remove;
5549 #endif
5550
5551   ;
5552   return 0;
5553 }
5554 _ACEOF
5555 rm -f conftest.$ac_objext conftest$ac_exeext
5556 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5557   (eval $ac_link) 2>&5
5558   ac_status=$?
5559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5560   (exit $ac_status); } &&
5561          { ac_try='test -s conftest$ac_exeext'
5562   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5563   (eval $ac_try) 2>&5
5564   ac_status=$?
5565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5566   (exit $ac_status); }; }; then
5567   ac_cv_func_remove=yes
5568 else
5569   echo "$as_me: failed program was:" >&5
5570 cat conftest.$ac_ext >&5
5571 ac_cv_func_remove=no
5572 fi
5573 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5574 fi
5575 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
5576 echo "${ECHO_T}$ac_cv_func_remove" >&6
5577
5578     if test $ac_cv_func_remove = no; then
5579       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
5580 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
5581 if test "${ac_cv_lib_posix_remove+set}" = set; then
5582   echo $ECHO_N "(cached) $ECHO_C" >&6
5583 else
5584   ac_check_lib_save_LIBS=$LIBS
5585 LIBS="-lposix  $LIBS"
5586 cat >conftest.$ac_ext <<_ACEOF
5587 #line $LINENO "configure"
5588 #include "confdefs.h"
5589
5590 /* Override any gcc2 internal prototype to avoid an error.  */
5591 #ifdef __cplusplus
5592 extern "C"
5593 #endif
5594 /* We use char because int might match the return type of a gcc2
5595    builtin and then its argument prototype would still apply.  */
5596 char remove ();
5597 #ifdef F77_DUMMY_MAIN
5598 #  ifdef __cplusplus
5599      extern "C"
5600 #  endif
5601    int F77_DUMMY_MAIN() { return 1; }
5602 #endif
5603 int
5604 main ()
5605 {
5606 remove ();
5607   ;
5608   return 0;
5609 }
5610 _ACEOF
5611 rm -f conftest.$ac_objext conftest$ac_exeext
5612 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5613   (eval $ac_link) 2>&5
5614   ac_status=$?
5615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5616   (exit $ac_status); } &&
5617          { ac_try='test -s conftest$ac_exeext'
5618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5619   (eval $ac_try) 2>&5
5620   ac_status=$?
5621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5622   (exit $ac_status); }; }; then
5623   ac_cv_lib_posix_remove=yes
5624 else
5625   echo "$as_me: failed program was:" >&5
5626 cat conftest.$ac_ext >&5
5627 ac_cv_lib_posix_remove=no
5628 fi
5629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5630 LIBS=$ac_check_lib_save_LIBS
5631 fi
5632 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
5633 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
5634 if test $ac_cv_lib_posix_remove = yes; then
5635   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5636 fi
5637
5638     fi
5639
5640     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5641     echo "$as_me:$LINENO: checking for shmat" >&5
5642 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
5643 if test "${ac_cv_func_shmat+set}" = set; then
5644   echo $ECHO_N "(cached) $ECHO_C" >&6
5645 else
5646   cat >conftest.$ac_ext <<_ACEOF
5647 #line $LINENO "configure"
5648 #include "confdefs.h"
5649 /* System header to define __stub macros and hopefully few prototypes,
5650     which can conflict with char shmat (); below.  */
5651 #include <assert.h>
5652 /* Override any gcc2 internal prototype to avoid an error.  */
5653 #ifdef __cplusplus
5654 extern "C"
5655 #endif
5656 /* We use char because int might match the return type of a gcc2
5657    builtin and then its argument prototype would still apply.  */
5658 char shmat ();
5659 char (*f) ();
5660
5661 #ifdef F77_DUMMY_MAIN
5662 #  ifdef __cplusplus
5663      extern "C"
5664 #  endif
5665    int F77_DUMMY_MAIN() { return 1; }
5666 #endif
5667 int
5668 main ()
5669 {
5670 /* The GNU C library defines this for functions which it implements
5671     to always fail with ENOSYS.  Some functions are actually named
5672     something starting with __ and the normal name is an alias.  */
5673 #if defined (__stub_shmat) || defined (__stub___shmat)
5674 choke me
5675 #else
5676 f = shmat;
5677 #endif
5678
5679   ;
5680   return 0;
5681 }
5682 _ACEOF
5683 rm -f conftest.$ac_objext conftest$ac_exeext
5684 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5685   (eval $ac_link) 2>&5
5686   ac_status=$?
5687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5688   (exit $ac_status); } &&
5689          { ac_try='test -s conftest$ac_exeext'
5690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5691   (eval $ac_try) 2>&5
5692   ac_status=$?
5693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5694   (exit $ac_status); }; }; then
5695   ac_cv_func_shmat=yes
5696 else
5697   echo "$as_me: failed program was:" >&5
5698 cat conftest.$ac_ext >&5
5699 ac_cv_func_shmat=no
5700 fi
5701 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5702 fi
5703 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
5704 echo "${ECHO_T}$ac_cv_func_shmat" >&6
5705
5706     if test $ac_cv_func_shmat = no; then
5707       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
5708 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
5709 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
5710   echo $ECHO_N "(cached) $ECHO_C" >&6
5711 else
5712   ac_check_lib_save_LIBS=$LIBS
5713 LIBS="-lipc  $LIBS"
5714 cat >conftest.$ac_ext <<_ACEOF
5715 #line $LINENO "configure"
5716 #include "confdefs.h"
5717
5718 /* Override any gcc2 internal prototype to avoid an error.  */
5719 #ifdef __cplusplus
5720 extern "C"
5721 #endif
5722 /* We use char because int might match the return type of a gcc2
5723    builtin and then its argument prototype would still apply.  */
5724 char shmat ();
5725 #ifdef F77_DUMMY_MAIN
5726 #  ifdef __cplusplus
5727      extern "C"
5728 #  endif
5729    int F77_DUMMY_MAIN() { return 1; }
5730 #endif
5731 int
5732 main ()
5733 {
5734 shmat ();
5735   ;
5736   return 0;
5737 }
5738 _ACEOF
5739 rm -f conftest.$ac_objext conftest$ac_exeext
5740 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5741   (eval $ac_link) 2>&5
5742   ac_status=$?
5743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5744   (exit $ac_status); } &&
5745          { ac_try='test -s conftest$ac_exeext'
5746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5747   (eval $ac_try) 2>&5
5748   ac_status=$?
5749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5750   (exit $ac_status); }; }; then
5751   ac_cv_lib_ipc_shmat=yes
5752 else
5753   echo "$as_me: failed program was:" >&5
5754 cat conftest.$ac_ext >&5
5755 ac_cv_lib_ipc_shmat=no
5756 fi
5757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5758 LIBS=$ac_check_lib_save_LIBS
5759 fi
5760 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
5761 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
5762 if test $ac_cv_lib_ipc_shmat = yes; then
5763   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5764 fi
5765
5766     fi
5767   fi
5768
5769   # Check for libraries that X11R6 Xt/Xaw programs need.
5770   ac_save_LDFLAGS=$LDFLAGS
5771   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5772   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5773   # check for ICE first), but we must link in the order -lSM -lICE or
5774   # we get undefined symbols.  So assume we have SM if we have ICE.
5775   # These have to be linked with before -lX11, unlike the other
5776   # libraries we check for below, so use a different variable.
5777   # John Interrante, Karl Berry
5778   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
5779 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
5780 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
5781   echo $ECHO_N "(cached) $ECHO_C" >&6
5782 else
5783   ac_check_lib_save_LIBS=$LIBS
5784 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5785 cat >conftest.$ac_ext <<_ACEOF
5786 #line $LINENO "configure"
5787 #include "confdefs.h"
5788
5789 /* Override any gcc2 internal prototype to avoid an error.  */
5790 #ifdef __cplusplus
5791 extern "C"
5792 #endif
5793 /* We use char because int might match the return type of a gcc2
5794    builtin and then its argument prototype would still apply.  */
5795 char IceConnectionNumber ();
5796 #ifdef F77_DUMMY_MAIN
5797 #  ifdef __cplusplus
5798      extern "C"
5799 #  endif
5800    int F77_DUMMY_MAIN() { return 1; }
5801 #endif
5802 int
5803 main ()
5804 {
5805 IceConnectionNumber ();
5806   ;
5807   return 0;
5808 }
5809 _ACEOF
5810 rm -f conftest.$ac_objext conftest$ac_exeext
5811 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5812   (eval $ac_link) 2>&5
5813   ac_status=$?
5814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5815   (exit $ac_status); } &&
5816          { ac_try='test -s conftest$ac_exeext'
5817   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5818   (eval $ac_try) 2>&5
5819   ac_status=$?
5820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5821   (exit $ac_status); }; }; then
5822   ac_cv_lib_ICE_IceConnectionNumber=yes
5823 else
5824   echo "$as_me: failed program was:" >&5
5825 cat conftest.$ac_ext >&5
5826 ac_cv_lib_ICE_IceConnectionNumber=no
5827 fi
5828 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5829 LIBS=$ac_check_lib_save_LIBS
5830 fi
5831 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
5832 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
5833 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
5834   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5835 fi
5836
5837   LDFLAGS=$ac_save_LDFLAGS
5838
5839 fi
5840
5841
5842 if test "$have_x" != yes; then
5843   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
5844 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
5845    { (exit 1); exit 1; }; }
5846 fi
5847
5848
5849     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
5850 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
5851 if test "${ac_cv_x_app_defaults+set}" = set; then
5852   echo $ECHO_N "(cached) $ECHO_C" >&6
5853 else
5854
5855   rm -fr conftestdir
5856   if mkdir conftestdir; then
5857     cd conftestdir 2>/dev/null
5858     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5859     cat > Imakefile <<'EOF'
5860 acfindx:
5861         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
5862 EOF
5863     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
5864       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
5865       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5866     fi
5867     cd .. 2>/dev/null
5868     rm -fr conftestdir
5869   fi
5870       if test x"$ac_x_app_defaults" = x; then
5871
5872   # Look for the directory under a standard set of common directories.
5873   # Check X11 before X11Rn because it's often a symlink to the current release.
5874   for ac_dir in                                 \
5875     /usr/X11/lib/app-defaults                   \
5876     /usr/X11R6/lib/app-defaults                 \
5877     /usr/X11R6/lib/X11/app-defaults             \
5878     /usr/X11R5/lib/app-defaults                 \
5879     /usr/X11R5/lib/X11/app-defaults             \
5880     /usr/X11R4/lib/app-defaults                 \
5881     /usr/X11R4/lib/X11/app-defaults             \
5882                                                 \
5883     /usr/lib/X11/app-defaults                   \
5884     /usr/lib/X11R6/app-defaults                 \
5885     /usr/lib/X11R5/app-defaults                 \
5886     /usr/lib/X11R4/app-defaults                 \
5887                                                 \
5888     /usr/local/X11/lib/app-defaults             \
5889     /usr/local/X11R6/lib/app-defaults           \
5890     /usr/local/X11R5/lib/app-defaults           \
5891     /usr/local/X11R4/lib/app-defaults           \
5892                                                 \
5893     /usr/local/lib/X11/app-defaults             \
5894     /usr/local/lib/X11R6/app-defaults           \
5895     /usr/local/lib/X11R6/X11/app-defaults       \
5896     /usr/local/lib/X11R5/app-defaults           \
5897     /usr/local/lib/X11R5/X11/app-defaults       \
5898     /usr/local/lib/X11R4/app-defaults           \
5899     /usr/local/lib/X11R4/X11/app-defaults       \
5900                                                 \
5901     /usr/X386/lib/X11/app-defaults              \
5902     /usr/x386/lib/X11/app-defaults              \
5903     /usr/XFree86/lib/X11/app-defaults           \
5904                                                 \
5905     /usr/lib/X11/app-defaults                   \
5906     /usr/local/lib/X11/app-defaults             \
5907     /usr/unsupported/lib/X11/app-defaults       \
5908     /usr/athena/lib/X11/app-defaults            \
5909     /usr/local/x11r5/lib/X11/app-defaults       \
5910     /usr/lpp/Xamples/lib/X11/app-defaults       \
5911     /lib/usr/lib/X11/app-defaults               \
5912                                                 \
5913     /usr/openwin/lib/app-defaults               \
5914     /usr/openwin/lib/X11/app-defaults           \
5915     /usr/openwin/share/lib/app-defaults         \
5916     /usr/openwin/share/lib/X11/app-defaults     \
5917                                                 \
5918     /X11R6/lib/app-defaults                     \
5919     /X11R5/lib/app-defaults                     \
5920     /X11R4/lib/app-defaults                     \
5921     ; \
5922   do
5923     if test -d "$ac_dir"; then
5924       ac_x_app_defaults=$ac_dir
5925       break
5926     fi
5927   done
5928
5929       fi
5930       if test x"$ac_x_app_defaults" = x; then
5931         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
5932       else
5933         # Record where we found app-defaults for the cache.
5934         ac_cv_x_app_defaults="$ac_x_app_defaults"
5935       fi
5936 fi
5937 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
5938 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
5939     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
5940 case "$host" in
5941     *-hpux*)
5942
5943       # The following arcana was gleaned from conversations with
5944       # Eric Schwartz <erics@col.hp.com>:
5945       #
5946       # On HPUX 10.x, the parts of X that HP considers "standard" live in
5947       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
5948       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
5949       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
5950       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
5951       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
5952       # you don't need any -I or -L arguments.
5953       #
5954       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
5955       # are the same division as 10.x.  However, there are no symlinks to
5956       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
5957       # arguments are always necessary.
5958       #
5959       # However, X11R6 was available on HPUX 9.x as a patch: if that
5960       # patch was installed, then all of X11R6 went in to
5961       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
5962       #
5963       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
5964       # whether R5 was available as a patch; R6 undoubtedly was not.)
5965       #
5966       # So.  We try and use the highest numbered pair of
5967       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
5968       # that are available.  We do not mix and match different versions
5969       # of X.
5970       #
5971       # Question I still don't know the answer to: (do you?)
5972       #
5973       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
5974       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
5975       #     that contrib directory?  Did it contain so-called "standard"
5976       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
5977       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
5978       #     be a situation where one had to reach into the R5 headers and
5979       #     libs to find Xmu?  That is, must both R6 and R5 directories
5980       #     be on the -I and -L lists in that case?
5981       #
5982       for version in X11R6 X11R5 X11R4 ; do
5983         # if either pair of directories exists...
5984         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
5985         then
5986            # if contrib exists, use it...
5987            if test -d /usr/contrib/$version/include ; then
5988              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
5989              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
5990            fi
5991            # if the "standard" one exists, use it.
5992            if test -d /usr/include/$version ; then
5993              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
5994              X_LIBS="$X_LIBS -L/usr/lib/$version"
5995            fi
5996            # since at least one of the pair exists, go no farther.
5997            break
5998         fi
5999       done
6000
6001       # Now find Motif.  Thanks for not making xmkmf find this by
6002       # default, you losers.
6003       #
6004       if test -d /usr/include/Motif2.1 ; then
6005         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6006         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6007       elif test -d /usr/include/Motif1.2 ; then
6008         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6009         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6010       elif test -d /usr/include/Motif1.1 ; then
6011         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6012         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6013       fi
6014
6015       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6016       #
6017       if test -d /opt/graphics/OpenGL/include ; then
6018         # HP-UX 10.20 puts it here
6019         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6020         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6021       elif test -d /opt/Mesa/lib ; then
6022         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6023         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6024       fi
6025
6026
6027       if test -d /opt/xpm/lib/X11 ; then
6028         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6029         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6030       fi
6031
6032       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6033       # in /usr/local/, unless there is already an xscreensaver in
6034       # /usr/local/bin/.  This can be overridden with the --prefix arg
6035       # to configure.  I'm not sure this is the right thing to do, but
6036       # Richard Lloyd says so...
6037       #
6038       if test \! -x /usr/local/bin/xscreensaver ; then
6039         ac_default_prefix=/opt/xscreensaver
6040       fi
6041
6042     ;;
6043     *-solaris*)
6044
6045       # Thanks for not making xmkmf find this by default, pinheads.
6046       # And thanks for moving things around again, too.  Is this
6047       # really the standard location now?  What happened to the
6048       # joke that this kind of thing went in /opt?
6049       # cthomp says "answer: CDE (Common Disorganized Environment)"
6050       #
6051       if test -f /usr/dt/include/Xm/Xm.h ; then
6052         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6053         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
6054
6055         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6056         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
6057 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
6058 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
6059   echo $ECHO_N "(cached) $ECHO_C" >&6
6060 else
6061   ac_check_lib_save_LIBS=$LIBS
6062 LIBS="-lgen  $LIBS"
6063 cat >conftest.$ac_ext <<_ACEOF
6064 #line $LINENO "configure"
6065 #include "confdefs.h"
6066
6067 /* Override any gcc2 internal prototype to avoid an error.  */
6068 #ifdef __cplusplus
6069 extern "C"
6070 #endif
6071 /* We use char because int might match the return type of a gcc2
6072    builtin and then its argument prototype would still apply.  */
6073 char regcmp ();
6074 #ifdef F77_DUMMY_MAIN
6075 #  ifdef __cplusplus
6076      extern "C"
6077 #  endif
6078    int F77_DUMMY_MAIN() { return 1; }
6079 #endif
6080 int
6081 main ()
6082 {
6083 regcmp ();
6084   ;
6085   return 0;
6086 }
6087 _ACEOF
6088 rm -f conftest.$ac_objext conftest$ac_exeext
6089 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6090   (eval $ac_link) 2>&5
6091   ac_status=$?
6092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093   (exit $ac_status); } &&
6094          { ac_try='test -s conftest$ac_exeext'
6095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6096   (eval $ac_try) 2>&5
6097   ac_status=$?
6098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6099   (exit $ac_status); }; }; then
6100   ac_cv_lib_gen_regcmp=yes
6101 else
6102   echo "$as_me: failed program was:" >&5
6103 cat conftest.$ac_ext >&5
6104 ac_cv_lib_gen_regcmp=no
6105 fi
6106 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6107 LIBS=$ac_check_lib_save_LIBS
6108 fi
6109 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
6110 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
6111 if test $ac_cv_lib_gen_regcmp = yes; then
6112   MOTIF_LIBS="$MOTIF_LIBS -lgen"
6113 fi
6114
6115       fi
6116
6117     ;;
6118     *-darwin*)
6119
6120       # On MacOS X (10.x with "fink"), many things are under /sw/.
6121       #
6122       if test -d /sw/include ; then
6123         X_CFLAGS="-I/sw/include $X_CFLAGS"
6124         X_LIBS="-L/sw/lib $X_LIBS"
6125       fi
6126     ;;
6127   esac
6128 echo "$as_me:$LINENO: checking for XPointer" >&5
6129 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
6130 if test "${ac_cv_xpointer+set}" = set; then
6131   echo $ECHO_N "(cached) $ECHO_C" >&6
6132 else
6133
6134   ac_save_CPPFLAGS="$CPPFLAGS"
6135   if test \! -z "$includedir" ; then
6136     CPPFLAGS="$CPPFLAGS -I$includedir"
6137   fi
6138   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6139   cat >conftest.$ac_ext <<_ACEOF
6140 #line $LINENO "configure"
6141 #include "confdefs.h"
6142 #include <X11/Xlib.h>
6143 #ifdef F77_DUMMY_MAIN
6144 #  ifdef __cplusplus
6145      extern "C"
6146 #  endif
6147    int F77_DUMMY_MAIN() { return 1; }
6148 #endif
6149 int
6150 main ()
6151 {
6152 XPointer foo = (XPointer) 0;
6153   ;
6154   return 0;
6155 }
6156 _ACEOF
6157 rm -f conftest.$ac_objext
6158 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6159   (eval $ac_compile) 2>&5
6160   ac_status=$?
6161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6162   (exit $ac_status); } &&
6163          { ac_try='test -s conftest.$ac_objext'
6164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6165   (eval $ac_try) 2>&5
6166   ac_status=$?
6167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6168   (exit $ac_status); }; }; then
6169   ac_cv_xpointer=yes
6170 else
6171   echo "$as_me: failed program was:" >&5
6172 cat conftest.$ac_ext >&5
6173 ac_cv_xpointer=no
6174 fi
6175 rm -f conftest.$ac_objext conftest.$ac_ext
6176   CPPFLAGS="$ac_save_CPPFLAGS"
6177 fi
6178 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
6179 echo "${ECHO_T}$ac_cv_xpointer" >&6
6180   if test "$ac_cv_xpointer" != yes; then
6181    cat >>confdefs.h <<\_ACEOF
6182 #define XPointer char*
6183 _ACEOF
6184
6185   fi
6186
6187
6188 ###############################################################################
6189 #
6190 #       Gettext support
6191 #
6192 ###############################################################################
6193
6194
6195
6196 if test -n ""; then
6197     echo "$as_me:$LINENO: checking for intltool >= " >&5
6198 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
6199
6200     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
6201     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
6202
6203     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
6204
6205
6206     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
6207         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
6208 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
6209     else
6210         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
6211 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
6212         exit 1
6213     fi
6214 fi
6215
6216   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
6217 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
6218      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -k -u -c $(top_builddir)/po/.intltool-merge-cache'
6219       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
6220      INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
6221    INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -u -c $(top_builddir)/po/.intltool-merge-cache'
6222     INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
6223 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
6224        INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
6225       INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
6226     INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240 # Use the tools built into the package, not the ones that are installed.
6241
6242 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
6243 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
6244 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
6245
6246
6247
6248
6249
6250 # Extract the first word of "perl", so it can be a program name with args.
6251 set dummy perl; ac_word=$2
6252 echo "$as_me:$LINENO: checking for $ac_word" >&5
6253 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6254 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
6255   echo $ECHO_N "(cached) $ECHO_C" >&6
6256 else
6257   case $INTLTOOL_PERL in
6258   [\\/]* | ?:[\\/]*)
6259   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
6260   ;;
6261   *)
6262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6263 for as_dir in $PATH
6264 do
6265   IFS=$as_save_IFS
6266   test -z "$as_dir" && as_dir=.
6267   for ac_exec_ext in '' $ac_executable_extensions; do
6268   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6269     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
6270     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6271     break 2
6272   fi
6273 done
6274 done
6275
6276   ;;
6277 esac
6278 fi
6279 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
6280
6281 if test -n "$INTLTOOL_PERL"; then
6282   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
6283 echo "${ECHO_T}$INTLTOOL_PERL" >&6
6284 else
6285   echo "$as_me:$LINENO: result: no" >&5
6286 echo "${ECHO_T}no" >&6
6287 fi
6288
6289 if test -z "$INTLTOOL_PERL"; then
6290    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
6291 echo "$as_me: error: perl not found; required for intltool" >&2;}
6292    { (exit 1); exit 1; }; }
6293 fi
6294 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
6295    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
6296 echo "$as_me: error: perl 5.x required for intltool" >&2;}
6297    { (exit 1); exit 1; }; }
6298 fi
6299
6300 # Remove file type tags (using []) from po/POTFILES.
6301
6302
6303
6304
6305
6306
6307
6308 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
6309
6310 ac_config_commands="$ac_config_commands default-1"
6311
6312
6313
6314 GETTEXT_PACKAGE=xscreensaver
6315 cat >>confdefs.h <<_ACEOF
6316 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
6317 _ACEOF
6318
6319 cat >>confdefs.h <<_ACEOF
6320 #define PACKAGE "$GETTEXT_PACKAGE"
6321 _ACEOF
6322
6323
6324
6325 ALL_LINGUAS="ca da de es et fi fr hu it ja ko nl no pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
6326 if test -n "$ac_tool_prefix"; then
6327   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6328 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6329 echo "$as_me:$LINENO: checking for $ac_word" >&5
6330 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6331 if test "${ac_cv_prog_RANLIB+set}" = set; then
6332   echo $ECHO_N "(cached) $ECHO_C" >&6
6333 else
6334   if test -n "$RANLIB"; then
6335   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6336 else
6337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6338 for as_dir in $PATH
6339 do
6340   IFS=$as_save_IFS
6341   test -z "$as_dir" && as_dir=.
6342   for ac_exec_ext in '' $ac_executable_extensions; do
6343   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6344     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6345     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6346     break 2
6347   fi
6348 done
6349 done
6350
6351 fi
6352 fi
6353 RANLIB=$ac_cv_prog_RANLIB
6354 if test -n "$RANLIB"; then
6355   echo "$as_me:$LINENO: result: $RANLIB" >&5
6356 echo "${ECHO_T}$RANLIB" >&6
6357 else
6358   echo "$as_me:$LINENO: result: no" >&5
6359 echo "${ECHO_T}no" >&6
6360 fi
6361
6362 fi
6363 if test -z "$ac_cv_prog_RANLIB"; then
6364   ac_ct_RANLIB=$RANLIB
6365   # Extract the first word of "ranlib", so it can be a program name with args.
6366 set dummy ranlib; ac_word=$2
6367 echo "$as_me:$LINENO: checking for $ac_word" >&5
6368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6369 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6370   echo $ECHO_N "(cached) $ECHO_C" >&6
6371 else
6372   if test -n "$ac_ct_RANLIB"; then
6373   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6374 else
6375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6376 for as_dir in $PATH
6377 do
6378   IFS=$as_save_IFS
6379   test -z "$as_dir" && as_dir=.
6380   for ac_exec_ext in '' $ac_executable_extensions; do
6381   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6382     ac_cv_prog_ac_ct_RANLIB="ranlib"
6383     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6384     break 2
6385   fi
6386 done
6387 done
6388
6389   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6390 fi
6391 fi
6392 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6393 if test -n "$ac_ct_RANLIB"; then
6394   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6395 echo "${ECHO_T}$ac_ct_RANLIB" >&6
6396 else
6397   echo "$as_me:$LINENO: result: no" >&5
6398 echo "${ECHO_T}no" >&6
6399 fi
6400
6401   RANLIB=$ac_ct_RANLIB
6402 else
6403   RANLIB="$ac_cv_prog_RANLIB"
6404 fi
6405
6406 echo "$as_me:$LINENO: checking for off_t" >&5
6407 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
6408 if test "${ac_cv_type_off_t+set}" = set; then
6409   echo $ECHO_N "(cached) $ECHO_C" >&6
6410 else
6411   cat >conftest.$ac_ext <<_ACEOF
6412 #line $LINENO "configure"
6413 #include "confdefs.h"
6414 $ac_includes_default
6415 #ifdef F77_DUMMY_MAIN
6416 #  ifdef __cplusplus
6417      extern "C"
6418 #  endif
6419    int F77_DUMMY_MAIN() { return 1; }
6420 #endif
6421 int
6422 main ()
6423 {
6424 if ((off_t *) 0)
6425   return 0;
6426 if (sizeof (off_t))
6427   return 0;
6428   ;
6429   return 0;
6430 }
6431 _ACEOF
6432 rm -f conftest.$ac_objext
6433 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6434   (eval $ac_compile) 2>&5
6435   ac_status=$?
6436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6437   (exit $ac_status); } &&
6438          { ac_try='test -s conftest.$ac_objext'
6439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6440   (eval $ac_try) 2>&5
6441   ac_status=$?
6442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6443   (exit $ac_status); }; }; then
6444   ac_cv_type_off_t=yes
6445 else
6446   echo "$as_me: failed program was:" >&5
6447 cat conftest.$ac_ext >&5
6448 ac_cv_type_off_t=no
6449 fi
6450 rm -f conftest.$ac_objext conftest.$ac_ext
6451 fi
6452 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6453 echo "${ECHO_T}$ac_cv_type_off_t" >&6
6454 if test $ac_cv_type_off_t = yes; then
6455   :
6456 else
6457
6458 cat >>confdefs.h <<_ACEOF
6459 #define off_t long
6460 _ACEOF
6461
6462 fi
6463
6464 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6465 # for constant arguments.  Useless!
6466 echo "$as_me:$LINENO: checking for working alloca.h" >&5
6467 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
6468 if test "${ac_cv_working_alloca_h+set}" = set; then
6469   echo $ECHO_N "(cached) $ECHO_C" >&6
6470 else
6471   cat >conftest.$ac_ext <<_ACEOF
6472 #line $LINENO "configure"
6473 #include "confdefs.h"
6474 #include <alloca.h>
6475 #ifdef F77_DUMMY_MAIN
6476 #  ifdef __cplusplus
6477      extern "C"
6478 #  endif
6479    int F77_DUMMY_MAIN() { return 1; }
6480 #endif
6481 int
6482 main ()
6483 {
6484 char *p = (char *) alloca (2 * sizeof (int));
6485   ;
6486   return 0;
6487 }
6488 _ACEOF
6489 rm -f conftest.$ac_objext conftest$ac_exeext
6490 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6491   (eval $ac_link) 2>&5
6492   ac_status=$?
6493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6494   (exit $ac_status); } &&
6495          { ac_try='test -s conftest$ac_exeext'
6496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6497   (eval $ac_try) 2>&5
6498   ac_status=$?
6499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6500   (exit $ac_status); }; }; then
6501   ac_cv_working_alloca_h=yes
6502 else
6503   echo "$as_me: failed program was:" >&5
6504 cat conftest.$ac_ext >&5
6505 ac_cv_working_alloca_h=no
6506 fi
6507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6508 fi
6509 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
6510 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
6511 if test $ac_cv_working_alloca_h = yes; then
6512
6513 cat >>confdefs.h <<\_ACEOF
6514 #define HAVE_ALLOCA_H 1
6515 _ACEOF
6516
6517 fi
6518
6519 echo "$as_me:$LINENO: checking for alloca" >&5
6520 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
6521 if test "${ac_cv_func_alloca_works+set}" = set; then
6522   echo $ECHO_N "(cached) $ECHO_C" >&6
6523 else
6524   cat >conftest.$ac_ext <<_ACEOF
6525 #line $LINENO "configure"
6526 #include "confdefs.h"
6527 #ifdef __GNUC__
6528 # define alloca __builtin_alloca
6529 #else
6530 # ifdef _MSC_VER
6531 #  include <malloc.h>
6532 #  define alloca _alloca
6533 # else
6534 #  if HAVE_ALLOCA_H
6535 #   include <alloca.h>
6536 #  else
6537 #   ifdef _AIX
6538  #pragma alloca
6539 #   else
6540 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6541 char *alloca ();
6542 #    endif
6543 #   endif
6544 #  endif
6545 # endif
6546 #endif
6547
6548 #ifdef F77_DUMMY_MAIN
6549 #  ifdef __cplusplus
6550      extern "C"
6551 #  endif
6552    int F77_DUMMY_MAIN() { return 1; }
6553 #endif
6554 int
6555 main ()
6556 {
6557 char *p = (char *) alloca (1);
6558   ;
6559   return 0;
6560 }
6561 _ACEOF
6562 rm -f conftest.$ac_objext conftest$ac_exeext
6563 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6564   (eval $ac_link) 2>&5
6565   ac_status=$?
6566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6567   (exit $ac_status); } &&
6568          { ac_try='test -s conftest$ac_exeext'
6569   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6570   (eval $ac_try) 2>&5
6571   ac_status=$?
6572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6573   (exit $ac_status); }; }; then
6574   ac_cv_func_alloca_works=yes
6575 else
6576   echo "$as_me: failed program was:" >&5
6577 cat conftest.$ac_ext >&5
6578 ac_cv_func_alloca_works=no
6579 fi
6580 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6581 fi
6582 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
6583 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
6584
6585 if test $ac_cv_func_alloca_works = yes; then
6586
6587 cat >>confdefs.h <<\_ACEOF
6588 #define HAVE_ALLOCA 1
6589 _ACEOF
6590
6591 else
6592   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6593 # that cause trouble.  Some versions do not even contain alloca or
6594 # contain a buggy version.  If you still want to use their alloca,
6595 # use ar to extract alloca.o from them instead of compiling alloca.c.
6596
6597 ALLOCA=alloca.$ac_objext
6598
6599 cat >>confdefs.h <<\_ACEOF
6600 #define C_ALLOCA 1
6601 _ACEOF
6602
6603
6604 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
6605 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
6606 if test "${ac_cv_os_cray+set}" = set; then
6607   echo $ECHO_N "(cached) $ECHO_C" >&6
6608 else
6609   cat >conftest.$ac_ext <<_ACEOF
6610 #line $LINENO "configure"
6611 #include "confdefs.h"
6612 #if defined(CRAY) && ! defined(CRAY2)
6613 webecray
6614 #else
6615 wenotbecray
6616 #endif
6617
6618 _ACEOF
6619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6620   egrep "webecray" >/dev/null 2>&1; then
6621   ac_cv_os_cray=yes
6622 else
6623   ac_cv_os_cray=no
6624 fi
6625 rm -f conftest*
6626
6627 fi
6628 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
6629 echo "${ECHO_T}$ac_cv_os_cray" >&6
6630 if test $ac_cv_os_cray = yes; then
6631   for ac_func in _getb67 GETB67 getb67; do
6632     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6633 echo "$as_me:$LINENO: checking for $ac_func" >&5
6634 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6635 if eval "test \"\${$as_ac_var+set}\" = set"; then
6636   echo $ECHO_N "(cached) $ECHO_C" >&6
6637 else
6638   cat >conftest.$ac_ext <<_ACEOF
6639 #line $LINENO "configure"
6640 #include "confdefs.h"
6641 /* System header to define __stub macros and hopefully few prototypes,
6642     which can conflict with char $ac_func (); below.  */
6643 #include <assert.h>
6644 /* Override any gcc2 internal prototype to avoid an error.  */
6645 #ifdef __cplusplus
6646 extern "C"
6647 #endif
6648 /* We use char because int might match the return type of a gcc2
6649    builtin and then its argument prototype would still apply.  */
6650 char $ac_func ();
6651 char (*f) ();
6652
6653 #ifdef F77_DUMMY_MAIN
6654 #  ifdef __cplusplus
6655      extern "C"
6656 #  endif
6657    int F77_DUMMY_MAIN() { return 1; }
6658 #endif
6659 int
6660 main ()
6661 {
6662 /* The GNU C library defines this for functions which it implements
6663     to always fail with ENOSYS.  Some functions are actually named
6664     something starting with __ and the normal name is an alias.  */
6665 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6666 choke me
6667 #else
6668 f = $ac_func;
6669 #endif
6670
6671   ;
6672   return 0;
6673 }
6674 _ACEOF
6675 rm -f conftest.$ac_objext conftest$ac_exeext
6676 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6677   (eval $ac_link) 2>&5
6678   ac_status=$?
6679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6680   (exit $ac_status); } &&
6681          { ac_try='test -s conftest$ac_exeext'
6682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6683   (eval $ac_try) 2>&5
6684   ac_status=$?
6685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6686   (exit $ac_status); }; }; then
6687   eval "$as_ac_var=yes"
6688 else
6689   echo "$as_me: failed program was:" >&5
6690 cat conftest.$ac_ext >&5
6691 eval "$as_ac_var=no"
6692 fi
6693 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6694 fi
6695 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6696 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6697 if test `eval echo '${'$as_ac_var'}'` = yes; then
6698
6699 cat >>confdefs.h <<_ACEOF
6700 #define CRAY_STACKSEG_END $ac_func
6701 _ACEOF
6702
6703     break
6704 fi
6705
6706   done
6707 fi
6708
6709 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
6710 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
6711 if test "${ac_cv_c_stack_direction+set}" = set; then
6712   echo $ECHO_N "(cached) $ECHO_C" >&6
6713 else
6714   if test "$cross_compiling" = yes; then
6715   ac_cv_c_stack_direction=0
6716 else
6717   cat >conftest.$ac_ext <<_ACEOF
6718 #line $LINENO "configure"
6719 #include "confdefs.h"
6720 int
6721 find_stack_direction ()
6722 {
6723   static char *addr = 0;
6724   auto char dummy;
6725   if (addr == 0)
6726     {
6727       addr = &dummy;
6728       return find_stack_direction ();
6729     }
6730   else
6731     return (&dummy > addr) ? 1 : -1;
6732 }
6733
6734 int
6735 main ()
6736 {
6737   exit (find_stack_direction () < 0);
6738 }
6739 _ACEOF
6740 rm -f conftest$ac_exeext
6741 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6742   (eval $ac_link) 2>&5
6743   ac_status=$?
6744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6745   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6747   (eval $ac_try) 2>&5
6748   ac_status=$?
6749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6750   (exit $ac_status); }; }; then
6751   ac_cv_c_stack_direction=1
6752 else
6753   echo "$as_me: program exited with status $ac_status" >&5
6754 echo "$as_me: failed program was:" >&5
6755 cat conftest.$ac_ext >&5
6756 ( exit $ac_status )
6757 ac_cv_c_stack_direction=-1
6758 fi
6759 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6760 fi
6761 fi
6762 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
6763 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
6764
6765 cat >>confdefs.h <<_ACEOF
6766 #define STACK_DIRECTION $ac_cv_c_stack_direction
6767 _ACEOF
6768
6769
6770 fi
6771
6772
6773
6774 for ac_header in stdlib.h unistd.h
6775 do
6776 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6777 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6778   echo "$as_me:$LINENO: checking for $ac_header" >&5
6779 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6780 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6781   echo $ECHO_N "(cached) $ECHO_C" >&6
6782 fi
6783 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6784 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6785 else
6786   # Is the header compilable?
6787 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6788 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6789 cat >conftest.$ac_ext <<_ACEOF
6790 #line $LINENO "configure"
6791 #include "confdefs.h"
6792 $ac_includes_default
6793 #include <$ac_header>
6794 _ACEOF
6795 rm -f conftest.$ac_objext
6796 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6797   (eval $ac_compile) 2>&5
6798   ac_status=$?
6799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6800   (exit $ac_status); } &&
6801          { ac_try='test -s conftest.$ac_objext'
6802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6803   (eval $ac_try) 2>&5
6804   ac_status=$?
6805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6806   (exit $ac_status); }; }; then
6807   ac_header_compiler=yes
6808 else
6809   echo "$as_me: failed program was:" >&5
6810 cat conftest.$ac_ext >&5
6811 ac_header_compiler=no
6812 fi
6813 rm -f conftest.$ac_objext conftest.$ac_ext
6814 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6815 echo "${ECHO_T}$ac_header_compiler" >&6
6816
6817 # Is the header present?
6818 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6819 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6820 cat >conftest.$ac_ext <<_ACEOF
6821 #line $LINENO "configure"
6822 #include "confdefs.h"
6823 #include <$ac_header>
6824 _ACEOF
6825 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6826   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6827   ac_status=$?
6828   egrep -v '^ *\+' conftest.er1 >conftest.err
6829   rm -f conftest.er1
6830   cat conftest.err >&5
6831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6832   (exit $ac_status); } >/dev/null; then
6833   if test -s conftest.err; then
6834     ac_cpp_err=$ac_c_preproc_warn_flag
6835   else
6836     ac_cpp_err=
6837   fi
6838 else
6839   ac_cpp_err=yes
6840 fi
6841 if test -z "$ac_cpp_err"; then
6842   ac_header_preproc=yes
6843 else
6844   echo "$as_me: failed program was:" >&5
6845   cat conftest.$ac_ext >&5
6846   ac_header_preproc=no
6847 fi
6848 rm -f conftest.err conftest.$ac_ext
6849 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6850 echo "${ECHO_T}$ac_header_preproc" >&6
6851
6852 # So?  What about this header?
6853 case $ac_header_compiler:$ac_header_preproc in
6854   yes:no )
6855     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6856 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6857     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6858 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
6859   no:yes )
6860     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6861 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6862     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6863 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6864     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6865 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
6866 esac
6867 echo "$as_me:$LINENO: checking for $ac_header" >&5
6868 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6869 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6870   echo $ECHO_N "(cached) $ECHO_C" >&6
6871 else
6872   eval "$as_ac_Header=$ac_header_preproc"
6873 fi
6874 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6875 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6876
6877 fi
6878 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6879   cat >>confdefs.h <<_ACEOF
6880 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6881 _ACEOF
6882
6883 fi
6884
6885 done
6886
6887
6888 for ac_func in getpagesize
6889 do
6890 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6891 echo "$as_me:$LINENO: checking for $ac_func" >&5
6892 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6893 if eval "test \"\${$as_ac_var+set}\" = set"; then
6894   echo $ECHO_N "(cached) $ECHO_C" >&6
6895 else
6896   cat >conftest.$ac_ext <<_ACEOF
6897 #line $LINENO "configure"
6898 #include "confdefs.h"
6899 /* System header to define __stub macros and hopefully few prototypes,
6900     which can conflict with char $ac_func (); below.  */
6901 #include <assert.h>
6902 /* Override any gcc2 internal prototype to avoid an error.  */
6903 #ifdef __cplusplus
6904 extern "C"
6905 #endif
6906 /* We use char because int might match the return type of a gcc2
6907    builtin and then its argument prototype would still apply.  */
6908 char $ac_func ();
6909 char (*f) ();
6910
6911 #ifdef F77_DUMMY_MAIN
6912 #  ifdef __cplusplus
6913      extern "C"
6914 #  endif
6915    int F77_DUMMY_MAIN() { return 1; }
6916 #endif
6917 int
6918 main ()
6919 {
6920 /* The GNU C library defines this for functions which it implements
6921     to always fail with ENOSYS.  Some functions are actually named
6922     something starting with __ and the normal name is an alias.  */
6923 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6924 choke me
6925 #else
6926 f = $ac_func;
6927 #endif
6928
6929   ;
6930   return 0;
6931 }
6932 _ACEOF
6933 rm -f conftest.$ac_objext conftest$ac_exeext
6934 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6935   (eval $ac_link) 2>&5
6936   ac_status=$?
6937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6938   (exit $ac_status); } &&
6939          { ac_try='test -s conftest$ac_exeext'
6940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6941   (eval $ac_try) 2>&5
6942   ac_status=$?
6943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6944   (exit $ac_status); }; }; then
6945   eval "$as_ac_var=yes"
6946 else
6947   echo "$as_me: failed program was:" >&5
6948 cat conftest.$ac_ext >&5
6949 eval "$as_ac_var=no"
6950 fi
6951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6952 fi
6953 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6954 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6955 if test `eval echo '${'$as_ac_var'}'` = yes; then
6956   cat >>confdefs.h <<_ACEOF
6957 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6958 _ACEOF
6959
6960 fi
6961 done
6962
6963 echo "$as_me:$LINENO: checking for working mmap" >&5
6964 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
6965 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
6966   echo $ECHO_N "(cached) $ECHO_C" >&6
6967 else
6968   if test "$cross_compiling" = yes; then
6969   ac_cv_func_mmap_fixed_mapped=no
6970 else
6971   cat >conftest.$ac_ext <<_ACEOF
6972 #line $LINENO "configure"
6973 #include "confdefs.h"
6974 $ac_includes_default
6975 /* malloc might have been renamed as rpl_malloc. */
6976 #undef malloc
6977
6978 /* Thanks to Mike Haertel and Jim Avera for this test.
6979    Here is a matrix of mmap possibilities:
6980         mmap private not fixed
6981         mmap private fixed at somewhere currently unmapped
6982         mmap private fixed at somewhere already mapped
6983         mmap shared not fixed
6984         mmap shared fixed at somewhere currently unmapped
6985         mmap shared fixed at somewhere already mapped
6986    For private mappings, we should verify that changes cannot be read()
6987    back from the file, nor mmap's back from the file at a different
6988    address.  (There have been systems where private was not correctly
6989    implemented like the infamous i386 svr4.0, and systems where the
6990    VM page cache was not coherent with the file system buffer cache
6991    like early versions of FreeBSD and possibly contemporary NetBSD.)
6992    For shared mappings, we should conversely verify that changes get
6993    propagated back to all the places they're supposed to be.
6994
6995    Grep wants private fixed already mapped.
6996    The main things grep needs to know about mmap are:
6997    * does it exist and is it safe to write into the mmap'd area
6998    * how to use it (BSD variants)  */
6999
7000 #include <fcntl.h>
7001 #include <sys/mman.h>
7002
7003 #if !STDC_HEADERS && !HAVE_STDLIB_H
7004 char *malloc ();
7005 #endif
7006
7007 /* This mess was copied from the GNU getpagesize.h.  */
7008 #if !HAVE_GETPAGESIZE
7009 /* Assume that all systems that can run configure have sys/param.h.  */
7010 # if !HAVE_SYS_PARAM_H
7011 #  define HAVE_SYS_PARAM_H 1
7012 # endif
7013
7014 # ifdef _SC_PAGESIZE
7015 #  define getpagesize() sysconf(_SC_PAGESIZE)
7016 # else /* no _SC_PAGESIZE */
7017 #  if HAVE_SYS_PARAM_H
7018 #   include <sys/param.h>
7019 #   ifdef EXEC_PAGESIZE
7020 #    define getpagesize() EXEC_PAGESIZE
7021 #   else /* no EXEC_PAGESIZE */
7022 #    ifdef NBPG
7023 #     define getpagesize() NBPG * CLSIZE
7024 #     ifndef CLSIZE
7025 #      define CLSIZE 1
7026 #     endif /* no CLSIZE */
7027 #    else /* no NBPG */
7028 #     ifdef NBPC
7029 #      define getpagesize() NBPC
7030 #     else /* no NBPC */
7031 #      ifdef PAGESIZE
7032 #       define getpagesize() PAGESIZE
7033 #      endif /* PAGESIZE */
7034 #     endif /* no NBPC */
7035 #    endif /* no NBPG */
7036 #   endif /* no EXEC_PAGESIZE */
7037 #  else /* no HAVE_SYS_PARAM_H */
7038 #   define getpagesize() 8192   /* punt totally */
7039 #  endif /* no HAVE_SYS_PARAM_H */
7040 # endif /* no _SC_PAGESIZE */
7041
7042 #endif /* no HAVE_GETPAGESIZE */
7043
7044 int
7045 main ()
7046 {
7047   char *data, *data2, *data3;
7048   int i, pagesize;
7049   int fd;
7050
7051   pagesize = getpagesize ();
7052
7053   /* First, make a file with some known garbage in it. */
7054   data = (char *) malloc (pagesize);
7055   if (!data)
7056     exit (1);
7057   for (i = 0; i < pagesize; ++i)
7058     *(data + i) = rand ();
7059   umask (0);
7060   fd = creat ("conftest.mmap", 0600);
7061   if (fd < 0)
7062     exit (1);
7063   if (write (fd, data, pagesize) != pagesize)
7064     exit (1);
7065   close (fd);
7066
7067   /* Next, try to mmap the file at a fixed address which already has
7068      something else allocated at it.  If we can, also make sure that
7069      we see the same garbage.  */
7070   fd = open ("conftest.mmap", O_RDWR);
7071   if (fd < 0)
7072     exit (1);
7073   data2 = (char *) malloc (2 * pagesize);
7074   if (!data2)
7075     exit (1);
7076   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7077   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7078                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
7079     exit (1);
7080   for (i = 0; i < pagesize; ++i)
7081     if (*(data + i) != *(data2 + i))
7082       exit (1);
7083
7084   /* Finally, make sure that changes to the mapped area do not
7085      percolate back to the file as seen by read().  (This is a bug on
7086      some variants of i386 svr4.0.)  */
7087   for (i = 0; i < pagesize; ++i)
7088     *(data2 + i) = *(data2 + i) + 1;
7089   data3 = (char *) malloc (pagesize);
7090   if (!data3)
7091     exit (1);
7092   if (read (fd, data3, pagesize) != pagesize)
7093     exit (1);
7094   for (i = 0; i < pagesize; ++i)
7095     if (*(data + i) != *(data3 + i))
7096       exit (1);
7097   close (fd);
7098   exit (0);
7099 }
7100 _ACEOF
7101 rm -f conftest$ac_exeext
7102 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7103   (eval $ac_link) 2>&5
7104   ac_status=$?
7105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7106   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7107   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7108   (eval $ac_try) 2>&5
7109   ac_status=$?
7110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7111   (exit $ac_status); }; }; then
7112   ac_cv_func_mmap_fixed_mapped=yes
7113 else
7114   echo "$as_me: program exited with status $ac_status" >&5
7115 echo "$as_me: failed program was:" >&5
7116 cat conftest.$ac_ext >&5
7117 ( exit $ac_status )
7118 ac_cv_func_mmap_fixed_mapped=no
7119 fi
7120 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7121 fi
7122 fi
7123 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
7124 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7125 if test $ac_cv_func_mmap_fixed_mapped = yes; then
7126
7127 cat >>confdefs.h <<\_ACEOF
7128 #define HAVE_MMAP 1
7129 _ACEOF
7130
7131 fi
7132 rm -f conftest.mmap
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
7144 unistd.h sys/param.h
7145 do
7146 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7147 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7148   echo "$as_me:$LINENO: checking for $ac_header" >&5
7149 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7150 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7151   echo $ECHO_N "(cached) $ECHO_C" >&6
7152 fi
7153 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7154 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7155 else
7156   # Is the header compilable?
7157 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7158 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7159 cat >conftest.$ac_ext <<_ACEOF
7160 #line $LINENO "configure"
7161 #include "confdefs.h"
7162 $ac_includes_default
7163 #include <$ac_header>
7164 _ACEOF
7165 rm -f conftest.$ac_objext
7166 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7167   (eval $ac_compile) 2>&5
7168   ac_status=$?
7169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7170   (exit $ac_status); } &&
7171          { ac_try='test -s conftest.$ac_objext'
7172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7173   (eval $ac_try) 2>&5
7174   ac_status=$?
7175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7176   (exit $ac_status); }; }; then
7177   ac_header_compiler=yes
7178 else
7179   echo "$as_me: failed program was:" >&5
7180 cat conftest.$ac_ext >&5
7181 ac_header_compiler=no
7182 fi
7183 rm -f conftest.$ac_objext conftest.$ac_ext
7184 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7185 echo "${ECHO_T}$ac_header_compiler" >&6
7186
7187 # Is the header present?
7188 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7189 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7190 cat >conftest.$ac_ext <<_ACEOF
7191 #line $LINENO "configure"
7192 #include "confdefs.h"
7193 #include <$ac_header>
7194 _ACEOF
7195 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7196   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7197   ac_status=$?
7198   egrep -v '^ *\+' conftest.er1 >conftest.err
7199   rm -f conftest.er1
7200   cat conftest.err >&5
7201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7202   (exit $ac_status); } >/dev/null; then
7203   if test -s conftest.err; then
7204     ac_cpp_err=$ac_c_preproc_warn_flag
7205   else
7206     ac_cpp_err=
7207   fi
7208 else
7209   ac_cpp_err=yes
7210 fi
7211 if test -z "$ac_cpp_err"; then
7212   ac_header_preproc=yes
7213 else
7214   echo "$as_me: failed program was:" >&5
7215   cat conftest.$ac_ext >&5
7216   ac_header_preproc=no
7217 fi
7218 rm -f conftest.err conftest.$ac_ext
7219 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7220 echo "${ECHO_T}$ac_header_preproc" >&6
7221
7222 # So?  What about this header?
7223 case $ac_header_compiler:$ac_header_preproc in
7224   yes:no )
7225     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7226 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7227     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7228 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7229   no:yes )
7230     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7231 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7232     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7233 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7234     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7235 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7236 esac
7237 echo "$as_me:$LINENO: checking for $ac_header" >&5
7238 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7239 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7240   echo $ECHO_N "(cached) $ECHO_C" >&6
7241 else
7242   eval "$as_ac_Header=$ac_header_preproc"
7243 fi
7244 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7245 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7246
7247 fi
7248 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7249   cat >>confdefs.h <<_ACEOF
7250 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7251 _ACEOF
7252
7253 fi
7254
7255 done
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
7269 strdup __argz_count __argz_stringify __argz_next
7270 do
7271 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7272 echo "$as_me:$LINENO: checking for $ac_func" >&5
7273 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7274 if eval "test \"\${$as_ac_var+set}\" = set"; then
7275   echo $ECHO_N "(cached) $ECHO_C" >&6
7276 else
7277   cat >conftest.$ac_ext <<_ACEOF
7278 #line $LINENO "configure"
7279 #include "confdefs.h"
7280 /* System header to define __stub macros and hopefully few prototypes,
7281     which can conflict with char $ac_func (); below.  */
7282 #include <assert.h>
7283 /* Override any gcc2 internal prototype to avoid an error.  */
7284 #ifdef __cplusplus
7285 extern "C"
7286 #endif
7287 /* We use char because int might match the return type of a gcc2
7288    builtin and then its argument prototype would still apply.  */
7289 char $ac_func ();
7290 char (*f) ();
7291
7292 #ifdef F77_DUMMY_MAIN
7293 #  ifdef __cplusplus
7294      extern "C"
7295 #  endif
7296    int F77_DUMMY_MAIN() { return 1; }
7297 #endif
7298 int
7299 main ()
7300 {
7301 /* The GNU C library defines this for functions which it implements
7302     to always fail with ENOSYS.  Some functions are actually named
7303     something starting with __ and the normal name is an alias.  */
7304 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7305 choke me
7306 #else
7307 f = $ac_func;
7308 #endif
7309
7310   ;
7311   return 0;
7312 }
7313 _ACEOF
7314 rm -f conftest.$ac_objext conftest$ac_exeext
7315 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7316   (eval $ac_link) 2>&5
7317   ac_status=$?
7318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7319   (exit $ac_status); } &&
7320          { ac_try='test -s conftest$ac_exeext'
7321   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7322   (eval $ac_try) 2>&5
7323   ac_status=$?
7324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7325   (exit $ac_status); }; }; then
7326   eval "$as_ac_var=yes"
7327 else
7328   echo "$as_me: failed program was:" >&5
7329 cat conftest.$ac_ext >&5
7330 eval "$as_ac_var=no"
7331 fi
7332 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7333 fi
7334 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7335 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7336 if test `eval echo '${'$as_ac_var'}'` = yes; then
7337   cat >>confdefs.h <<_ACEOF
7338 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7339 _ACEOF
7340
7341 fi
7342 done
7343
7344
7345    if test $ac_cv_header_locale_h = yes; then
7346     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
7347 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7348 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7349   echo $ECHO_N "(cached) $ECHO_C" >&6
7350 else
7351   cat >conftest.$ac_ext <<_ACEOF
7352 #line $LINENO "configure"
7353 #include "confdefs.h"
7354 #include <locale.h>
7355 #ifdef F77_DUMMY_MAIN
7356 #  ifdef __cplusplus
7357      extern "C"
7358 #  endif
7359    int F77_DUMMY_MAIN() { return 1; }
7360 #endif
7361 int
7362 main ()
7363 {
7364 return LC_MESSAGES
7365   ;
7366   return 0;
7367 }
7368 _ACEOF
7369 rm -f conftest.$ac_objext conftest$ac_exeext
7370 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7371   (eval $ac_link) 2>&5
7372   ac_status=$?
7373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7374   (exit $ac_status); } &&
7375          { ac_try='test -s conftest$ac_exeext'
7376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7377   (eval $ac_try) 2>&5
7378   ac_status=$?
7379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7380   (exit $ac_status); }; }; then
7381   am_cv_val_LC_MESSAGES=yes
7382 else
7383   echo "$as_me: failed program was:" >&5
7384 cat conftest.$ac_ext >&5
7385 am_cv_val_LC_MESSAGES=no
7386 fi
7387 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7388 fi
7389 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
7390 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
7391     if test $am_cv_val_LC_MESSAGES = yes; then
7392
7393 cat >>confdefs.h <<\_ACEOF
7394 #define HAVE_LC_MESSAGES 1
7395 _ACEOF
7396
7397     fi
7398   fi
7399      USE_NLS=yes
7400
7401
7402         nls_cv_force_use_gnu_gettext="no"
7403
7404     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7405     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7406                               nls_cv_header_intl=
7407       nls_cv_header_libgt=
7408       CATOBJEXT=NONE
7409
7410       if test "${ac_cv_header_libintl_h+set}" = set; then
7411   echo "$as_me:$LINENO: checking for libintl.h" >&5
7412 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7413 if test "${ac_cv_header_libintl_h+set}" = set; then
7414   echo $ECHO_N "(cached) $ECHO_C" >&6
7415 fi
7416 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7417 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7418 else
7419   # Is the header compilable?
7420 echo "$as_me:$LINENO: checking libintl.h usability" >&5
7421 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
7422 cat >conftest.$ac_ext <<_ACEOF
7423 #line $LINENO "configure"
7424 #include "confdefs.h"
7425 $ac_includes_default
7426 #include <libintl.h>
7427 _ACEOF
7428 rm -f conftest.$ac_objext
7429 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7430   (eval $ac_compile) 2>&5
7431   ac_status=$?
7432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7433   (exit $ac_status); } &&
7434          { ac_try='test -s conftest.$ac_objext'
7435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7436   (eval $ac_try) 2>&5
7437   ac_status=$?
7438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7439   (exit $ac_status); }; }; then
7440   ac_header_compiler=yes
7441 else
7442   echo "$as_me: failed program was:" >&5
7443 cat conftest.$ac_ext >&5
7444 ac_header_compiler=no
7445 fi
7446 rm -f conftest.$ac_objext conftest.$ac_ext
7447 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7448 echo "${ECHO_T}$ac_header_compiler" >&6
7449
7450 # Is the header present?
7451 echo "$as_me:$LINENO: checking libintl.h presence" >&5
7452 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
7453 cat >conftest.$ac_ext <<_ACEOF
7454 #line $LINENO "configure"
7455 #include "confdefs.h"
7456 #include <libintl.h>
7457 _ACEOF
7458 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7459   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7460   ac_status=$?
7461   egrep -v '^ *\+' conftest.er1 >conftest.err
7462   rm -f conftest.er1
7463   cat conftest.err >&5
7464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7465   (exit $ac_status); } >/dev/null; then
7466   if test -s conftest.err; then
7467     ac_cpp_err=$ac_c_preproc_warn_flag
7468   else
7469     ac_cpp_err=
7470   fi
7471 else
7472   ac_cpp_err=yes
7473 fi
7474 if test -z "$ac_cpp_err"; then
7475   ac_header_preproc=yes
7476 else
7477   echo "$as_me: failed program was:" >&5
7478   cat conftest.$ac_ext >&5
7479   ac_header_preproc=no
7480 fi
7481 rm -f conftest.err conftest.$ac_ext
7482 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7483 echo "${ECHO_T}$ac_header_preproc" >&6
7484
7485 # So?  What about this header?
7486 case $ac_header_compiler:$ac_header_preproc in
7487   yes:no )
7488     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
7489 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7490     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7491 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
7492   no:yes )
7493     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
7494 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
7495     { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
7496 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
7497     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7498 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
7499 esac
7500 echo "$as_me:$LINENO: checking for libintl.h" >&5
7501 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7502 if test "${ac_cv_header_libintl_h+set}" = set; then
7503   echo $ECHO_N "(cached) $ECHO_C" >&6
7504 else
7505   ac_cv_header_libintl_h=$ac_header_preproc
7506 fi
7507 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7508 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7509
7510 fi
7511 if test $ac_cv_header_libintl_h = yes; then
7512   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
7513 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
7514 if test "${gt_cv_func_dgettext_libc+set}" = set; then
7515   echo $ECHO_N "(cached) $ECHO_C" >&6
7516 else
7517   cat >conftest.$ac_ext <<_ACEOF
7518 #line $LINENO "configure"
7519 #include "confdefs.h"
7520 #include <libintl.h>
7521 #ifdef F77_DUMMY_MAIN
7522 #  ifdef __cplusplus
7523      extern "C"
7524 #  endif
7525    int F77_DUMMY_MAIN() { return 1; }
7526 #endif
7527 int
7528 main ()
7529 {
7530 return (int) dgettext ("","")
7531   ;
7532   return 0;
7533 }
7534 _ACEOF
7535 rm -f conftest.$ac_objext conftest$ac_exeext
7536 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7537   (eval $ac_link) 2>&5
7538   ac_status=$?
7539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7540   (exit $ac_status); } &&
7541          { ac_try='test -s conftest$ac_exeext'
7542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7543   (eval $ac_try) 2>&5
7544   ac_status=$?
7545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7546   (exit $ac_status); }; }; then
7547   gt_cv_func_dgettext_libc=yes
7548 else
7549   echo "$as_me: failed program was:" >&5
7550 cat conftest.$ac_ext >&5
7551 gt_cv_func_dgettext_libc=no
7552 fi
7553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7554 fi
7555 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
7556 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
7557
7558           if test "$gt_cv_func_dgettext_libc" != "yes"; then
7559             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
7560 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
7561 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
7562   echo $ECHO_N "(cached) $ECHO_C" >&6
7563 else
7564   ac_check_lib_save_LIBS=$LIBS
7565 LIBS="-lintl  $LIBS"
7566 cat >conftest.$ac_ext <<_ACEOF
7567 #line $LINENO "configure"
7568 #include "confdefs.h"
7569
7570 /* Override any gcc2 internal prototype to avoid an error.  */
7571 #ifdef __cplusplus
7572 extern "C"
7573 #endif
7574 /* We use char because int might match the return type of a gcc2
7575    builtin and then its argument prototype would still apply.  */
7576 char bindtextdomain ();
7577 #ifdef F77_DUMMY_MAIN
7578 #  ifdef __cplusplus
7579      extern "C"
7580 #  endif
7581    int F77_DUMMY_MAIN() { return 1; }
7582 #endif
7583 int
7584 main ()
7585 {
7586 bindtextdomain ();
7587   ;
7588   return 0;
7589 }
7590 _ACEOF
7591 rm -f conftest.$ac_objext conftest$ac_exeext
7592 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7593   (eval $ac_link) 2>&5
7594   ac_status=$?
7595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7596   (exit $ac_status); } &&
7597          { ac_try='test -s conftest$ac_exeext'
7598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7599   (eval $ac_try) 2>&5
7600   ac_status=$?
7601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7602   (exit $ac_status); }; }; then
7603   ac_cv_lib_intl_bindtextdomain=yes
7604 else
7605   echo "$as_me: failed program was:" >&5
7606 cat conftest.$ac_ext >&5
7607 ac_cv_lib_intl_bindtextdomain=no
7608 fi
7609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7610 LIBS=$ac_check_lib_save_LIBS
7611 fi
7612 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
7613 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
7614 if test $ac_cv_lib_intl_bindtextdomain = yes; then
7615   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
7616 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
7617 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
7618   echo $ECHO_N "(cached) $ECHO_C" >&6
7619 else
7620   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
7621 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
7622 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
7623   echo $ECHO_N "(cached) $ECHO_C" >&6
7624 else
7625   ac_check_lib_save_LIBS=$LIBS
7626 LIBS="-lintl  $LIBS"
7627 cat >conftest.$ac_ext <<_ACEOF
7628 #line $LINENO "configure"
7629 #include "confdefs.h"
7630
7631 /* Override any gcc2 internal prototype to avoid an error.  */
7632 #ifdef __cplusplus
7633 extern "C"
7634 #endif
7635 /* We use char because int might match the return type of a gcc2
7636    builtin and then its argument prototype would still apply.  */
7637 char dgettext ();
7638 #ifdef F77_DUMMY_MAIN
7639 #  ifdef __cplusplus
7640      extern "C"
7641 #  endif
7642    int F77_DUMMY_MAIN() { return 1; }
7643 #endif
7644 int
7645 main ()
7646 {
7647 dgettext ();
7648   ;
7649   return 0;
7650 }
7651 _ACEOF
7652 rm -f conftest.$ac_objext conftest$ac_exeext
7653 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7654   (eval $ac_link) 2>&5
7655   ac_status=$?
7656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7657   (exit $ac_status); } &&
7658          { ac_try='test -s conftest$ac_exeext'
7659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7660   (eval $ac_try) 2>&5
7661   ac_status=$?
7662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7663   (exit $ac_status); }; }; then
7664   ac_cv_lib_intl_dgettext=yes
7665 else
7666   echo "$as_me: failed program was:" >&5
7667 cat conftest.$ac_ext >&5
7668 ac_cv_lib_intl_dgettext=no
7669 fi
7670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7671 LIBS=$ac_check_lib_save_LIBS
7672 fi
7673 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
7674 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
7675 if test $ac_cv_lib_intl_dgettext = yes; then
7676   gt_cv_func_dgettext_libintl=yes
7677 else
7678   gt_cv_func_dgettext_libintl=no
7679 fi
7680
7681 fi
7682 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
7683 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
7684 fi
7685
7686           fi
7687
7688           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7689             LIBS="$LIBS -lintl";
7690           fi
7691
7692           if test "$gt_cv_func_dgettext_libc" = "yes" \
7693             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7694
7695 cat >>confdefs.h <<\_ACEOF
7696 #define HAVE_GETTEXT 1
7697 _ACEOF
7698
7699             # Extract the first word of "msgfmt", so it can be a program name with args.
7700 set dummy msgfmt; ac_word=$2
7701 echo "$as_me:$LINENO: checking for $ac_word" >&5
7702 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7703 if test "${ac_cv_path_MSGFMT+set}" = set; then
7704   echo $ECHO_N "(cached) $ECHO_C" >&6
7705 else
7706   case "$MSGFMT" in
7707   /*)
7708   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7709   ;;
7710   *)
7711   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7712   for ac_dir in $PATH; do
7713     test -z "$ac_dir" && ac_dir=.
7714     if test -f $ac_dir/$ac_word; then
7715       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7716         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7717         break
7718       fi
7719     fi
7720   done
7721   IFS="$ac_save_ifs"
7722   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
7723   ;;
7724 esac
7725 fi
7726 MSGFMT="$ac_cv_path_MSGFMT"
7727 if test -n "$MSGFMT"; then
7728   echo "$as_me:$LINENO: result: $MSGFMT" >&5
7729 echo "${ECHO_T}$MSGFMT" >&6
7730 else
7731   echo "$as_me:$LINENO: result: no" >&5
7732 echo "${ECHO_T}no" >&6
7733 fi
7734             if test "$MSGFMT" != "no"; then
7735
7736 for ac_func in dcgettext
7737 do
7738 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7739 echo "$as_me:$LINENO: checking for $ac_func" >&5
7740 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7741 if eval "test \"\${$as_ac_var+set}\" = set"; then
7742   echo $ECHO_N "(cached) $ECHO_C" >&6
7743 else
7744   cat >conftest.$ac_ext <<_ACEOF
7745 #line $LINENO "configure"
7746 #include "confdefs.h"
7747 /* System header to define __stub macros and hopefully few prototypes,
7748     which can conflict with char $ac_func (); below.  */
7749 #include <assert.h>
7750 /* Override any gcc2 internal prototype to avoid an error.  */
7751 #ifdef __cplusplus
7752 extern "C"
7753 #endif
7754 /* We use char because int might match the return type of a gcc2
7755    builtin and then its argument prototype would still apply.  */
7756 char $ac_func ();
7757 char (*f) ();
7758
7759 #ifdef F77_DUMMY_MAIN
7760 #  ifdef __cplusplus
7761      extern "C"
7762 #  endif
7763    int F77_DUMMY_MAIN() { return 1; }
7764 #endif
7765 int
7766 main ()
7767 {
7768 /* The GNU C library defines this for functions which it implements
7769     to always fail with ENOSYS.  Some functions are actually named
7770     something starting with __ and the normal name is an alias.  */
7771 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7772 choke me
7773 #else
7774 f = $ac_func;
7775 #endif
7776
7777   ;
7778   return 0;
7779 }
7780 _ACEOF
7781 rm -f conftest.$ac_objext conftest$ac_exeext
7782 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7783   (eval $ac_link) 2>&5
7784   ac_status=$?
7785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7786   (exit $ac_status); } &&
7787          { ac_try='test -s conftest$ac_exeext'
7788   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7789   (eval $ac_try) 2>&5
7790   ac_status=$?
7791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7792   (exit $ac_status); }; }; then
7793   eval "$as_ac_var=yes"
7794 else
7795   echo "$as_me: failed program was:" >&5
7796 cat conftest.$ac_ext >&5
7797 eval "$as_ac_var=no"
7798 fi
7799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7800 fi
7801 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7802 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7803 if test `eval echo '${'$as_ac_var'}'` = yes; then
7804   cat >>confdefs.h <<_ACEOF
7805 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7806 _ACEOF
7807
7808 fi
7809 done
7810
7811               # Extract the first word of "gmsgfmt", so it can be a program name with args.
7812 set dummy gmsgfmt; ac_word=$2
7813 echo "$as_me:$LINENO: checking for $ac_word" >&5
7814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7815 if test "${ac_cv_path_GMSGFMT+set}" = set; then
7816   echo $ECHO_N "(cached) $ECHO_C" >&6
7817 else
7818   case $GMSGFMT in
7819   [\\/]* | ?:[\\/]*)
7820   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7821   ;;
7822   *)
7823   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7824 for as_dir in $PATH
7825 do
7826   IFS=$as_save_IFS
7827   test -z "$as_dir" && as_dir=.
7828   for ac_exec_ext in '' $ac_executable_extensions; do
7829   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7830     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7831     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7832     break 2
7833   fi
7834 done
7835 done
7836
7837   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7838   ;;
7839 esac
7840 fi
7841 GMSGFMT=$ac_cv_path_GMSGFMT
7842
7843 if test -n "$GMSGFMT"; then
7844   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
7845 echo "${ECHO_T}$GMSGFMT" >&6
7846 else
7847   echo "$as_me:$LINENO: result: no" >&5
7848 echo "${ECHO_T}no" >&6
7849 fi
7850
7851               # Extract the first word of "xgettext", so it can be a program name with args.
7852 set dummy xgettext; ac_word=$2
7853 echo "$as_me:$LINENO: checking for $ac_word" >&5
7854 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7855 if test "${ac_cv_path_XGETTEXT+set}" = set; then
7856   echo $ECHO_N "(cached) $ECHO_C" >&6
7857 else
7858   case "$XGETTEXT" in
7859   /*)
7860   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7861   ;;
7862   *)
7863   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7864   for ac_dir in $PATH; do
7865     test -z "$ac_dir" && ac_dir=.
7866     if test -f $ac_dir/$ac_word; then
7867       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7868         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7869         break
7870       fi
7871     fi
7872   done
7873   IFS="$ac_save_ifs"
7874   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7875   ;;
7876 esac
7877 fi
7878 XGETTEXT="$ac_cv_path_XGETTEXT"
7879 if test -n "$XGETTEXT"; then
7880   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
7881 echo "${ECHO_T}$XGETTEXT" >&6
7882 else
7883   echo "$as_me:$LINENO: result: no" >&5
7884 echo "${ECHO_T}no" >&6
7885 fi
7886
7887               cat >conftest.$ac_ext <<_ACEOF
7888 #line $LINENO "configure"
7889 #include "confdefs.h"
7890
7891 #ifdef F77_DUMMY_MAIN
7892 #  ifdef __cplusplus
7893      extern "C"
7894 #  endif
7895    int F77_DUMMY_MAIN() { return 1; }
7896 #endif
7897 int
7898 main ()
7899 {
7900 extern int _nl_msg_cat_cntr;
7901                              return _nl_msg_cat_cntr
7902   ;
7903   return 0;
7904 }
7905 _ACEOF
7906 rm -f conftest.$ac_objext conftest$ac_exeext
7907 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7908   (eval $ac_link) 2>&5
7909   ac_status=$?
7910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7911   (exit $ac_status); } &&
7912          { ac_try='test -s conftest$ac_exeext'
7913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7914   (eval $ac_try) 2>&5
7915   ac_status=$?
7916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7917   (exit $ac_status); }; }; then
7918   CATOBJEXT=.gmo
7919                  DATADIRNAME=share
7920 else
7921   echo "$as_me: failed program was:" >&5
7922 cat conftest.$ac_ext >&5
7923 CATOBJEXT=.mo
7924                  DATADIRNAME=lib
7925 fi
7926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7927               INSTOBJEXT=.mo
7928             fi
7929           fi
7930
7931           # Added by Martin Baulig 12/15/98 for libc5 systems
7932           if test "$gt_cv_func_dgettext_libc" != "yes" \
7933             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
7934             INTLLIBS=-lintl
7935             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
7936           fi
7937
7938 fi
7939
7940
7941
7942       if test "$CATOBJEXT" = "NONE"; then
7943                         nls_cv_use_gnu_gettext=yes
7944       fi
7945     fi
7946
7947     if test "$nls_cv_use_gnu_gettext" != "yes"; then
7948
7949 cat >>confdefs.h <<\_ACEOF
7950 #define ENABLE_NLS 1
7951 _ACEOF
7952
7953     else
7954             CATOBJEXT=
7955     fi
7956
7957         if test "$XGETTEXT" != ":"; then
7958                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7959         : ;
7960       else
7961         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
7962 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
7963         XGETTEXT=":"
7964       fi
7965     fi
7966
7967     # We need to process the po/ directory.
7968     POSUB=po
7969
7970     ac_config_commands="$ac_config_commands default-2"
7971
7972
7973                 for lang in $ALL_LINGUAS; do
7974       GMOFILES="$GMOFILES $lang.gmo"
7975       POFILES="$POFILES $lang.po"
7976     done
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990    if test "x$CATOBJEXT" != "x"; then
7991      if test "x$ALL_LINGUAS" = "x"; then
7992        LINGUAS=
7993      else
7994        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
7995 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
7996        NEW_LINGUAS=
7997        for lang in ${LINGUAS=$ALL_LINGUAS}; do
7998          case "$ALL_LINGUAS" in
7999           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
8000          esac
8001        done
8002        LINGUAS=$NEW_LINGUAS
8003        echo "$as_me:$LINENO: result: $LINGUAS" >&5
8004 echo "${ECHO_T}$LINGUAS" >&6
8005      fi
8006
8007           if test -n "$LINGUAS"; then
8008        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8009      fi
8010    fi
8011
8012             test -d po || mkdir po
8013    if test "$CATOBJEXT" = ".cat"; then
8014      if test "${ac_cv_header_linux_version_h+set}" = set; then
8015   echo "$as_me:$LINENO: checking for linux/version.h" >&5
8016 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8017 if test "${ac_cv_header_linux_version_h+set}" = set; then
8018   echo $ECHO_N "(cached) $ECHO_C" >&6
8019 fi
8020 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8021 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8022 else
8023   # Is the header compilable?
8024 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
8025 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
8026 cat >conftest.$ac_ext <<_ACEOF
8027 #line $LINENO "configure"
8028 #include "confdefs.h"
8029 $ac_includes_default
8030 #include <linux/version.h>
8031 _ACEOF
8032 rm -f conftest.$ac_objext
8033 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8034   (eval $ac_compile) 2>&5
8035   ac_status=$?
8036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8037   (exit $ac_status); } &&
8038          { ac_try='test -s conftest.$ac_objext'
8039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8040   (eval $ac_try) 2>&5
8041   ac_status=$?
8042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8043   (exit $ac_status); }; }; then
8044   ac_header_compiler=yes
8045 else
8046   echo "$as_me: failed program was:" >&5
8047 cat conftest.$ac_ext >&5
8048 ac_header_compiler=no
8049 fi
8050 rm -f conftest.$ac_objext conftest.$ac_ext
8051 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8052 echo "${ECHO_T}$ac_header_compiler" >&6
8053
8054 # Is the header present?
8055 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
8056 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
8057 cat >conftest.$ac_ext <<_ACEOF
8058 #line $LINENO "configure"
8059 #include "confdefs.h"
8060 #include <linux/version.h>
8061 _ACEOF
8062 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8063   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8064   ac_status=$?
8065   egrep -v '^ *\+' conftest.er1 >conftest.err
8066   rm -f conftest.er1
8067   cat conftest.err >&5
8068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8069   (exit $ac_status); } >/dev/null; then
8070   if test -s conftest.err; then
8071     ac_cpp_err=$ac_c_preproc_warn_flag
8072   else
8073     ac_cpp_err=
8074   fi
8075 else
8076   ac_cpp_err=yes
8077 fi
8078 if test -z "$ac_cpp_err"; then
8079   ac_header_preproc=yes
8080 else
8081   echo "$as_me: failed program was:" >&5
8082   cat conftest.$ac_ext >&5
8083   ac_header_preproc=no
8084 fi
8085 rm -f conftest.err conftest.$ac_ext
8086 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8087 echo "${ECHO_T}$ac_header_preproc" >&6
8088
8089 # So?  What about this header?
8090 case $ac_header_compiler:$ac_header_preproc in
8091   yes:no )
8092     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
8093 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8094     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8095 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;};;
8096   no:yes )
8097     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
8098 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
8099     { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
8100 echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
8101     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8102 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;};;
8103 esac
8104 echo "$as_me:$LINENO: checking for linux/version.h" >&5
8105 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8106 if test "${ac_cv_header_linux_version_h+set}" = set; then
8107   echo $ECHO_N "(cached) $ECHO_C" >&6
8108 else
8109   ac_cv_header_linux_version_h=$ac_header_preproc
8110 fi
8111 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8112 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8113
8114 fi
8115 if test $ac_cv_header_linux_version_h = yes; then
8116   msgformat=linux
8117 else
8118   msgformat=xopen
8119 fi
8120
8121
8122
8123                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
8124    fi
8125
8126             MKINSTALLDIRS=
8127 #
8128 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
8129 #
8130 #   if test -n "$ac_aux_dir"; then
8131 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8132 #   fi
8133    if test -z "$MKINSTALLDIRS"; then
8134      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8135    fi
8136
8137    # jwz: you know what, screw it.  Let's just use the version that I
8138    # already computed in configure.in, instead of this version that came
8139    # with the i18n crud, ok?
8140    MKINSTALLDIRS="$INSTALL_DIRS"
8141
8142
8143
8144
8145          test -d po || mkdir po
8146    if test "x$srcdir" != "x."; then
8147      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8148        posrcprefix="$srcdir/"
8149      else
8150        posrcprefix="../$srcdir/"
8151      fi
8152    else
8153      posrcprefix="../"
8154    fi
8155    rm -f po/POTFILES
8156    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8157         < $srcdir/po/POTFILES.in > po/POTFILES
8158
8159
8160
8161 ###############################################################################
8162 #
8163 #       Check for -lXmu (some fucked up vendors don't ship it...)
8164 #
8165 ###############################################################################
8166
8167 have_xmu=no
8168
8169   ac_save_CPPFLAGS="$CPPFLAGS"
8170   if test \! -z "$includedir" ; then
8171     CPPFLAGS="$CPPFLAGS -I$includedir"
8172   fi
8173   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8174   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
8175 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
8176 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
8177   echo $ECHO_N "(cached) $ECHO_C" >&6
8178 else
8179   cat >conftest.$ac_ext <<_ACEOF
8180 #line $LINENO "configure"
8181 #include "confdefs.h"
8182 #include <stdlib.h>
8183                    #include <stdio.h>
8184                    #include <X11/Intrinsic.h>
8185
8186 #include <X11/Xmu/Error.h>
8187 _ACEOF
8188 rm -f conftest.$ac_objext
8189 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8190   (eval $ac_compile) 2>&5
8191   ac_status=$?
8192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8193   (exit $ac_status); } &&
8194          { ac_try='test -s conftest.$ac_objext'
8195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8196   (eval $ac_try) 2>&5
8197   ac_status=$?
8198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8199   (exit $ac_status); }; }; then
8200   ac_cv_header_X11_Xmu_Error_h=yes
8201 else
8202   echo "$as_me: failed program was:" >&5
8203 cat conftest.$ac_ext >&5
8204 ac_cv_header_X11_Xmu_Error_h=no
8205 fi
8206 rm -f conftest.$ac_objext conftest.$ac_ext
8207 fi
8208 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
8209 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
8210 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
8211   have_xmu=yes
8212 fi
8213
8214
8215   CPPFLAGS="$ac_save_CPPFLAGS"
8216 if test "$have_xmu" = no ; then
8217   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8218   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8219   XMU_LIBS=''
8220 else
8221   XMU_SRCS=''
8222   XMU_OBJS=''
8223   XMU_LIBS='-lXmu'
8224   cat >>confdefs.h <<\_ACEOF
8225 #define HAVE_XMU 1
8226 _ACEOF
8227
8228 fi
8229
8230
8231 ###############################################################################
8232 #
8233 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8234 #       See comp.windows.x FAQ question 124.  The right fix is to
8235 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8236 #
8237 ###############################################################################
8238
8239 if test "$have_xmu" = yes ; then
8240   case "$host" in
8241     *-sunos4*)
8242     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8243 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
8244 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
8245   echo $ECHO_N "(cached) $ECHO_C" >&6
8246 else
8247   ac_save_LDFLAGS="$LDFLAGS"
8248                     if test \! -z "$x_libraries" ; then
8249                       LDFLAGS="$LDFLAGS -L$x_libraries"
8250                     fi
8251                     # Note: this trick never works!  (Generally.)
8252                     # We're only getting away with using AC_TRY_LINK
8253                     # with X libraries because we know it's SunOS.
8254                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8255                     cat >conftest.$ac_ext <<_ACEOF
8256 #line $LINENO "configure"
8257 #include "confdefs.h"
8258
8259 #ifdef F77_DUMMY_MAIN
8260 #  ifdef __cplusplus
8261      extern "C"
8262 #  endif
8263    int F77_DUMMY_MAIN() { return 1; }
8264 #endif
8265 int
8266 main ()
8267 {
8268
8269   ;
8270   return 0;
8271 }
8272 _ACEOF
8273 rm -f conftest.$ac_objext conftest$ac_exeext
8274 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8275   (eval $ac_link) 2>&5
8276   ac_status=$?
8277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8278   (exit $ac_status); } &&
8279          { ac_try='test -s conftest$ac_exeext'
8280   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8281   (eval $ac_try) 2>&5
8282   ac_status=$?
8283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8284   (exit $ac_status); }; }; then
8285   ac_cv_sunos_xmu_bug=no
8286 else
8287   echo "$as_me: failed program was:" >&5
8288 cat conftest.$ac_ext >&5
8289 ac_cv_sunos_xmu_bug=yes
8290 fi
8291 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8292                     LDFLAGS="$ac_save_LDFLAGS"
8293 fi
8294 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
8295 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
8296     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8297       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
8298 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
8299 if test "${ac_cv_ld_static+set}" = set; then
8300   echo $ECHO_N "(cached) $ECHO_C" >&6
8301 else
8302   ac_save_LDFLAGS="$LDFLAGS"
8303                       LDFLAGS="$LDFLAGS -static"
8304                       cat >conftest.$ac_ext <<_ACEOF
8305 #line $LINENO "configure"
8306 #include "confdefs.h"
8307
8308 #ifdef F77_DUMMY_MAIN
8309 #  ifdef __cplusplus
8310      extern "C"
8311 #  endif
8312    int F77_DUMMY_MAIN() { return 1; }
8313 #endif
8314 int
8315 main ()
8316 {
8317
8318   ;
8319   return 0;
8320 }
8321 _ACEOF
8322 rm -f conftest.$ac_objext conftest$ac_exeext
8323 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8324   (eval $ac_link) 2>&5
8325   ac_status=$?
8326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8327   (exit $ac_status); } &&
8328          { ac_try='test -s conftest$ac_exeext'
8329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8330   (eval $ac_try) 2>&5
8331   ac_status=$?
8332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8333   (exit $ac_status); }; }; then
8334   ac_cv_ld_static=yes
8335 else
8336   echo "$as_me: failed program was:" >&5
8337 cat conftest.$ac_ext >&5
8338 ac_cv_ld_static=no
8339 fi
8340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8341                     LDFLAGS="$ac_save_LDFLAGS"
8342 fi
8343 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
8344 echo "${ECHO_T}$ac_cv_ld_static" >&6
8345       if test "$ac_cv_ld_static" = yes ; then
8346         LDFLAGS="$LDFLAGS -static"
8347       else
8348         LDFLAGS="$LDFLAGS -Bstatic"
8349       fi
8350     fi
8351     ;;
8352   esac
8353 fi
8354
8355
8356 ###############################################################################
8357 #
8358 #       Handle the --with-hackdir option
8359 #
8360 ###############################################################################
8361
8362 have_hackdir=yes
8363 with_hackdir_req=unspecified
8364
8365 # Check whether --with-hackdir or --without-hackdir was given.
8366 if test "${with_hackdir+set}" = set; then
8367   withval="$with_hackdir"
8368   with_hackdir="$withval"; with_hackdir_req="$withval"
8369 else
8370   with_hackdir=yes
8371 fi;
8372
8373 if test x"$with_hackdir" = xyes; then
8374   HACKDIR='${exec_prefix}/lib/xscreensaver'
8375 elif test x"$with_hackdir" = xno; then
8376   HACKDIR='${bindir}'
8377 else
8378   # there must be a better way than this...
8379   if test -z "`echo $with_hackdir | sed 's@^/.*@@'`" ; then
8380     # absolute path
8381     HACKDIR=$with_hackdir
8382   else
8383     # relative path
8384     HACKDIR="\${exec_prefix}$with_hackdir"
8385   fi
8386 fi
8387
8388 # canonicalize slashes.
8389 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8390
8391 # This option used to be called --enable-subdir; make sure that is no longer
8392 # used, since configure brain-damagedly ignores unknown --enable options.
8393
8394 obsolete_enable=
8395 # Check whether --enable-subdir or --disable-subdir was given.
8396 if test "${enable_subdir+set}" = set; then
8397   enableval="$enable_subdir"
8398   obsolete_enable=yes
8399 fi;
8400 if test -n "$obsolete_enable"; then
8401   echo "error: the --enable-subdir option has been replaced with"
8402   echo "       the new --with-hackdir option; see \`configure --help'"
8403   echo "       for more information."
8404   exit 1
8405 fi
8406
8407
8408 ###############################################################################
8409 #
8410 #       Handle the --with-configdir option
8411 #
8412 ###############################################################################
8413
8414 have_configdir=yes
8415 with_configdir_req=unspecified
8416
8417 # Check whether --with-configdir or --without-configdir was given.
8418 if test "${with_configdir+set}" = set; then
8419   withval="$with_configdir"
8420   with_configdir="$withval"; with_configdir_req="$withval"
8421 else
8422   with_configdir=yes
8423 fi;
8424
8425 if test x"$with_configdir" = xyes; then
8426   # filled in later...
8427   HACK_CONF_DIR=''
8428 elif test x"$with_configdir" = xno; then
8429   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8430   exit 1
8431 else
8432   # there must be a better way than this...
8433   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8434     # absolute path
8435     HACK_CONF_DIR=$with_configdir
8436   else
8437     # relative path
8438     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8439   fi
8440 fi
8441
8442
8443
8444
8445 ###############################################################################
8446 #
8447 #       Check for the SGI SCREEN_SAVER server extension.
8448 #
8449 ###############################################################################
8450
8451 have_sgi=no
8452 with_sgi_req=unspecified
8453
8454 # Check whether --with-sgi-ext or --without-sgi-ext was given.
8455 if test "${with_sgi_ext+set}" = set; then
8456   withval="$with_sgi_ext"
8457   with_sgi="$withval"; with_sgi_req="$withval"
8458 else
8459   with_sgi=yes
8460 fi;
8461
8462
8463    case "$with_sgi" in
8464     yes) ;;
8465     no)  ;;
8466
8467     /*)
8468      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
8469 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
8470      d=$with_sgi/include
8471      if test -d $d; then
8472        X_CFLAGS="-I$d $X_CFLAGS"
8473        echo "$as_me:$LINENO: result: $d" >&5
8474 echo "${ECHO_T}$d" >&6
8475      else
8476        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8477 echo "${ECHO_T}not found ($d: no such directory)" >&6
8478      fi
8479
8480      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
8481 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
8482      d=$with_sgi/lib
8483      if test -d $d; then
8484        X_LIBS="-L$d $X_LIBS"
8485        echo "$as_me:$LINENO: result: $d" >&5
8486 echo "${ECHO_T}$d" >&6
8487      else
8488        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8489 echo "${ECHO_T}not found ($d: no such directory)" >&6
8490      fi
8491
8492      # replace the directory string with "yes".
8493      with_sgi_req="yes"
8494      with_sgi=$with_sgi_req
8495      ;;
8496
8497     *)
8498      echo ""
8499      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
8500      echo "       If it is a directory, then \`DIR/include' will be added to"
8501      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8502      exit 1
8503      ;;
8504    esac
8505
8506
8507 if test "$with_sgi" = yes; then
8508
8509   ac_save_CPPFLAGS="$CPPFLAGS"
8510   if test \! -z "$includedir" ; then
8511     CPPFLAGS="$CPPFLAGS -I$includedir"
8512   fi
8513   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8514   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
8515 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
8516 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
8517   echo $ECHO_N "(cached) $ECHO_C" >&6
8518 else
8519   cat >conftest.$ac_ext <<_ACEOF
8520 #line $LINENO "configure"
8521 #include "confdefs.h"
8522 #include <X11/Xlib.h>
8523
8524 #include <X11/extensions/XScreenSaver.h>
8525 _ACEOF
8526 rm -f conftest.$ac_objext
8527 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8528   (eval $ac_compile) 2>&5
8529   ac_status=$?
8530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8531   (exit $ac_status); } &&
8532          { ac_try='test -s conftest.$ac_objext'
8533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8534   (eval $ac_try) 2>&5
8535   ac_status=$?
8536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8537   (exit $ac_status); }; }; then
8538   ac_cv_header_X11_extensions_XScreenSaver_h=yes
8539 else
8540   echo "$as_me: failed program was:" >&5
8541 cat conftest.$ac_ext >&5
8542 ac_cv_header_X11_extensions_XScreenSaver_h=no
8543 fi
8544 rm -f conftest.$ac_objext conftest.$ac_ext
8545 fi
8546 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
8547 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
8548 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
8549   have_sgi=yes
8550                      cat >>confdefs.h <<\_ACEOF
8551 #define HAVE_SGI_SAVER_EXTENSION 1
8552 _ACEOF
8553
8554 fi
8555
8556
8557   CPPFLAGS="$ac_save_CPPFLAGS"
8558
8559 elif test "$with_sgi" != no; then
8560   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
8561   exit 1
8562 fi
8563
8564
8565 ###############################################################################
8566 #
8567 #       Check for the MIT-SCREEN-SAVER server extension.
8568 #
8569 ###############################################################################
8570
8571 have_mit=no
8572 with_mit_req=unspecified
8573
8574 # Check whether --with-mit-ext or --without-mit-ext was given.
8575 if test "${with_mit_ext+set}" = set; then
8576   withval="$with_mit_ext"
8577   with_mit="$withval"; with_mit_req="$withval"
8578 else
8579   with_mit=yes
8580 fi;
8581
8582
8583    case "$with_mit" in
8584     yes) ;;
8585     no)  ;;
8586
8587     /*)
8588      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER headers" >&5
8589 echo $ECHO_N "checking for MIT-SCREEN-SAVER headers... $ECHO_C" >&6
8590      d=$with_mit/include
8591      if test -d $d; then
8592        X_CFLAGS="-I$d $X_CFLAGS"
8593        echo "$as_me:$LINENO: result: $d" >&5
8594 echo "${ECHO_T}$d" >&6
8595      else
8596        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8597 echo "${ECHO_T}not found ($d: no such directory)" >&6
8598      fi
8599
8600      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER libs" >&5
8601 echo $ECHO_N "checking for MIT-SCREEN-SAVER libs... $ECHO_C" >&6
8602      d=$with_mit/lib
8603      if test -d $d; then
8604        X_LIBS="-L$d $X_LIBS"
8605        echo "$as_me:$LINENO: result: $d" >&5
8606 echo "${ECHO_T}$d" >&6
8607      else
8608        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8609 echo "${ECHO_T}not found ($d: no such directory)" >&6
8610      fi
8611
8612      # replace the directory string with "yes".
8613      with_mit_req="yes"
8614      with_mit=$with_mit_req
8615      ;;
8616
8617     *)
8618      echo ""
8619      echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
8620      echo "       If it is a directory, then \`DIR/include' will be added to"
8621      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8622      exit 1
8623      ;;
8624    esac
8625
8626
8627 if test "$with_mit" = yes; then
8628
8629   ac_save_CPPFLAGS="$CPPFLAGS"
8630   if test \! -z "$includedir" ; then
8631     CPPFLAGS="$CPPFLAGS -I$includedir"
8632   fi
8633   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8634   echo "$as_me:$LINENO: checking for X11/extensions/scrnsaver.h" >&5
8635 echo $ECHO_N "checking for X11/extensions/scrnsaver.h... $ECHO_C" >&6
8636 if test "${ac_cv_header_X11_extensions_scrnsaver_h+set}" = set; then
8637   echo $ECHO_N "(cached) $ECHO_C" >&6
8638 else
8639   cat >conftest.$ac_ext <<_ACEOF
8640 #line $LINENO "configure"
8641 #include "confdefs.h"
8642 #include <X11/Xlib.h>
8643
8644 #include <X11/extensions/scrnsaver.h>
8645 _ACEOF
8646 rm -f conftest.$ac_objext
8647 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8648   (eval $ac_compile) 2>&5
8649   ac_status=$?
8650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8651   (exit $ac_status); } &&
8652          { ac_try='test -s conftest.$ac_objext'
8653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8654   (eval $ac_try) 2>&5
8655   ac_status=$?
8656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8657   (exit $ac_status); }; }; then
8658   ac_cv_header_X11_extensions_scrnsaver_h=yes
8659 else
8660   echo "$as_me: failed program was:" >&5
8661 cat conftest.$ac_ext >&5
8662 ac_cv_header_X11_extensions_scrnsaver_h=no
8663 fi
8664 rm -f conftest.$ac_objext conftest.$ac_ext
8665 fi
8666 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_scrnsaver_h" >&5
8667 echo "${ECHO_T}$ac_cv_header_X11_extensions_scrnsaver_h" >&6
8668 if test $ac_cv_header_X11_extensions_scrnsaver_h = yes; then
8669   have_mit=yes
8670 fi
8671
8672
8673   CPPFLAGS="$ac_save_CPPFLAGS"
8674
8675   # Now check to see if it's really in the library; XF86Free-3.3 ships
8676   # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
8677   #
8678   if test "$have_mit" = yes; then
8679
8680   ac_save_CPPFLAGS="$CPPFLAGS"
8681   ac_save_LDFLAGS="$LDFLAGS"
8682 #  ac_save_LIBS="$LIBS"
8683
8684   if test \! -z "$includedir" ; then
8685     CPPFLAGS="$CPPFLAGS -I$includedir"
8686   fi
8687   # note: $X_CFLAGS includes $x_includes
8688   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8689
8690   if test \! -z "$libdir" ; then
8691     LDFLAGS="$LDFLAGS -L$libdir"
8692   fi
8693   # note: $X_LIBS includes $x_libraries
8694   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8695
8696   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXext" >&5
8697 echo $ECHO_N "checking for XScreenSaverRegister in -lXext... $ECHO_C" >&6
8698 if test "${ac_cv_lib_Xext_XScreenSaverRegister+set}" = set; then
8699   echo $ECHO_N "(cached) $ECHO_C" >&6
8700 else
8701   ac_check_lib_save_LIBS=$LIBS
8702 LIBS="-lXext -lm $LIBS"
8703 cat >conftest.$ac_ext <<_ACEOF
8704 #line $LINENO "configure"
8705 #include "confdefs.h"
8706
8707 /* Override any gcc2 internal prototype to avoid an error.  */
8708 #ifdef __cplusplus
8709 extern "C"
8710 #endif
8711 /* We use char because int might match the return type of a gcc2
8712    builtin and then its argument prototype would still apply.  */
8713 char XScreenSaverRegister ();
8714 #ifdef F77_DUMMY_MAIN
8715 #  ifdef __cplusplus
8716      extern "C"
8717 #  endif
8718    int F77_DUMMY_MAIN() { return 1; }
8719 #endif
8720 int
8721 main ()
8722 {
8723 XScreenSaverRegister ();
8724   ;
8725   return 0;
8726 }
8727 _ACEOF
8728 rm -f conftest.$ac_objext conftest$ac_exeext
8729 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8730   (eval $ac_link) 2>&5
8731   ac_status=$?
8732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8733   (exit $ac_status); } &&
8734          { ac_try='test -s conftest$ac_exeext'
8735   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8736   (eval $ac_try) 2>&5
8737   ac_status=$?
8738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8739   (exit $ac_status); }; }; then
8740   ac_cv_lib_Xext_XScreenSaverRegister=yes
8741 else
8742   echo "$as_me: failed program was:" >&5
8743 cat conftest.$ac_ext >&5
8744 ac_cv_lib_Xext_XScreenSaverRegister=no
8745 fi
8746 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8747 LIBS=$ac_check_lib_save_LIBS
8748 fi
8749 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XScreenSaverRegister" >&5
8750 echo "${ECHO_T}$ac_cv_lib_Xext_XScreenSaverRegister" >&6
8751 if test $ac_cv_lib_Xext_XScreenSaverRegister = yes; then
8752   true
8753 else
8754   have_mit=no
8755 fi
8756
8757   CPPFLAGS="$ac_save_CPPFLAGS"
8758   LDFLAGS="$ac_save_LDFLAGS"
8759 #  LIBS="$ac_save_LIBS"
8760
8761
8762     if test "$have_mit" = no; then
8763       # Fuck!  Looks like XF86Free-3.3 actually puts it in XExExt instead
8764       # of in Xext.  Thank you master, may I have another.
8765
8766   ac_save_CPPFLAGS="$CPPFLAGS"
8767   ac_save_LDFLAGS="$LDFLAGS"
8768 #  ac_save_LIBS="$LIBS"
8769
8770   if test \! -z "$includedir" ; then
8771     CPPFLAGS="$CPPFLAGS -I$includedir"
8772   fi
8773   # note: $X_CFLAGS includes $x_includes
8774   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8775
8776   if test \! -z "$libdir" ; then
8777     LDFLAGS="$LDFLAGS -L$libdir"
8778   fi
8779   # note: $X_LIBS includes $x_libraries
8780   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8781
8782   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXExExt" >&5
8783 echo $ECHO_N "checking for XScreenSaverRegister in -lXExExt... $ECHO_C" >&6
8784 if test "${ac_cv_lib_XExExt_XScreenSaverRegister+set}" = set; then
8785   echo $ECHO_N "(cached) $ECHO_C" >&6
8786 else
8787   ac_check_lib_save_LIBS=$LIBS
8788 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
8789 cat >conftest.$ac_ext <<_ACEOF
8790 #line $LINENO "configure"
8791 #include "confdefs.h"
8792
8793 /* Override any gcc2 internal prototype to avoid an error.  */
8794 #ifdef __cplusplus
8795 extern "C"
8796 #endif
8797 /* We use char because int might match the return type of a gcc2
8798    builtin and then its argument prototype would still apply.  */
8799 char XScreenSaverRegister ();
8800 #ifdef F77_DUMMY_MAIN
8801 #  ifdef __cplusplus
8802      extern "C"
8803 #  endif
8804    int F77_DUMMY_MAIN() { return 1; }
8805 #endif
8806 int
8807 main ()
8808 {
8809 XScreenSaverRegister ();
8810   ;
8811   return 0;
8812 }
8813 _ACEOF
8814 rm -f conftest.$ac_objext conftest$ac_exeext
8815 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8816   (eval $ac_link) 2>&5
8817   ac_status=$?
8818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8819   (exit $ac_status); } &&
8820          { ac_try='test -s conftest$ac_exeext'
8821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8822   (eval $ac_try) 2>&5
8823   ac_status=$?
8824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8825   (exit $ac_status); }; }; then
8826   ac_cv_lib_XExExt_XScreenSaverRegister=yes
8827 else
8828   echo "$as_me: failed program was:" >&5
8829 cat conftest.$ac_ext >&5
8830 ac_cv_lib_XExExt_XScreenSaverRegister=no
8831 fi
8832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8833 LIBS=$ac_check_lib_save_LIBS
8834 fi
8835 echo "$as_me:$LINENO: result: $ac_cv_lib_XExExt_XScreenSaverRegister" >&5
8836 echo "${ECHO_T}$ac_cv_lib_XExExt_XScreenSaverRegister" >&6
8837 if test $ac_cv_lib_XExExt_XScreenSaverRegister = yes; then
8838   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
8839 else
8840   true
8841 fi
8842
8843   CPPFLAGS="$ac_save_CPPFLAGS"
8844   LDFLAGS="$ac_save_LDFLAGS"
8845 #  LIBS="$ac_save_LIBS"
8846
8847     fi
8848
8849     if test "$have_mit" = no; then
8850       # Double fuck!  Looks like some versions of XFree86 (whichever version
8851       # it is that comes with RedHat Linux 2.0 -- I can't find a version
8852       # number) put this garbage in Xss instead of Xext.  Thank you master,
8853       #  may I have another.
8854
8855   ac_save_CPPFLAGS="$CPPFLAGS"
8856   ac_save_LDFLAGS="$LDFLAGS"
8857 #  ac_save_LIBS="$LIBS"
8858
8859   if test \! -z "$includedir" ; then
8860     CPPFLAGS="$CPPFLAGS -I$includedir"
8861   fi
8862   # note: $X_CFLAGS includes $x_includes
8863   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8864
8865   if test \! -z "$libdir" ; then
8866     LDFLAGS="$LDFLAGS -L$libdir"
8867   fi
8868   # note: $X_LIBS includes $x_libraries
8869   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8870
8871   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXss" >&5
8872 echo $ECHO_N "checking for XScreenSaverRegister in -lXss... $ECHO_C" >&6
8873 if test "${ac_cv_lib_Xss_XScreenSaverRegister+set}" = set; then
8874   echo $ECHO_N "(cached) $ECHO_C" >&6
8875 else
8876   ac_check_lib_save_LIBS=$LIBS
8877 LIBS="-lXss -lX11 -lXext -lm $LIBS"
8878 cat >conftest.$ac_ext <<_ACEOF
8879 #line $LINENO "configure"
8880 #include "confdefs.h"
8881
8882 /* Override any gcc2 internal prototype to avoid an error.  */
8883 #ifdef __cplusplus
8884 extern "C"
8885 #endif
8886 /* We use char because int might match the return type of a gcc2
8887    builtin and then its argument prototype would still apply.  */
8888 char XScreenSaverRegister ();
8889 #ifdef F77_DUMMY_MAIN
8890 #  ifdef __cplusplus
8891      extern "C"
8892 #  endif
8893    int F77_DUMMY_MAIN() { return 1; }
8894 #endif
8895 int
8896 main ()
8897 {
8898 XScreenSaverRegister ();
8899   ;
8900   return 0;
8901 }
8902 _ACEOF
8903 rm -f conftest.$ac_objext conftest$ac_exeext
8904 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8905   (eval $ac_link) 2>&5
8906   ac_status=$?
8907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8908   (exit $ac_status); } &&
8909          { ac_try='test -s conftest$ac_exeext'
8910   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8911   (eval $ac_try) 2>&5
8912   ac_status=$?
8913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8914   (exit $ac_status); }; }; then
8915   ac_cv_lib_Xss_XScreenSaverRegister=yes
8916 else
8917   echo "$as_me: failed program was:" >&5
8918 cat conftest.$ac_ext >&5
8919 ac_cv_lib_Xss_XScreenSaverRegister=no
8920 fi
8921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8922 LIBS=$ac_check_lib_save_LIBS
8923 fi
8924 echo "$as_me:$LINENO: result: $ac_cv_lib_Xss_XScreenSaverRegister" >&5
8925 echo "${ECHO_T}$ac_cv_lib_Xss_XScreenSaverRegister" >&6
8926 if test $ac_cv_lib_Xss_XScreenSaverRegister = yes; then
8927   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
8928 else
8929   true
8930 fi
8931
8932   CPPFLAGS="$ac_save_CPPFLAGS"
8933   LDFLAGS="$ac_save_LDFLAGS"
8934 #  LIBS="$ac_save_LIBS"
8935
8936     fi
8937
8938   if test "$have_mit" = yes; then
8939     cat >>confdefs.h <<\_ACEOF
8940 #define HAVE_MIT_SAVER_EXTENSION 1
8941 _ACEOF
8942
8943   fi
8944
8945   fi
8946
8947 elif test "$with_mit" != no; then
8948   echo "error: must be yes or no: --with-mit-ext=$with_mit"
8949   exit 1
8950 fi
8951
8952
8953 ###############################################################################
8954 #
8955 #       Check for the XIDLE server extension.
8956 #
8957 ###############################################################################
8958
8959 have_xidle=no
8960 with_xidle_req=unspecified
8961
8962 # Check whether --with-xidle-ext or --without-xidle-ext was given.
8963 if test "${with_xidle_ext+set}" = set; then
8964   withval="$with_xidle_ext"
8965   with_xidle="$withval"; with_xidle_req="$withval"
8966 else
8967   with_xidle=yes
8968 fi;
8969
8970
8971    case "$with_xidle" in
8972     yes) ;;
8973     no)  ;;
8974
8975     /*)
8976      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
8977 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
8978      d=$with_xidle/include
8979      if test -d $d; then
8980        X_CFLAGS="-I$d $X_CFLAGS"
8981        echo "$as_me:$LINENO: result: $d" >&5
8982 echo "${ECHO_T}$d" >&6
8983      else
8984        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8985 echo "${ECHO_T}not found ($d: no such directory)" >&6
8986      fi
8987
8988      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
8989 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
8990      d=$with_xidle/lib
8991      if test -d $d; then
8992        X_LIBS="-L$d $X_LIBS"
8993        echo "$as_me:$LINENO: result: $d" >&5
8994 echo "${ECHO_T}$d" >&6
8995      else
8996        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8997 echo "${ECHO_T}not found ($d: no such directory)" >&6
8998      fi
8999
9000      # replace the directory string with "yes".
9001      with_xidle_req="yes"
9002      with_xidle=$with_xidle_req
9003      ;;
9004
9005     *)
9006      echo ""
9007      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
9008      echo "       If it is a directory, then \`DIR/include' will be added to"
9009      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9010      exit 1
9011      ;;
9012    esac
9013
9014
9015 if test "$with_xidle" = yes; then
9016
9017   ac_save_CPPFLAGS="$CPPFLAGS"
9018   if test \! -z "$includedir" ; then
9019     CPPFLAGS="$CPPFLAGS -I$includedir"
9020   fi
9021   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9022   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
9023 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
9024 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
9025   echo $ECHO_N "(cached) $ECHO_C" >&6
9026 else
9027   cat >conftest.$ac_ext <<_ACEOF
9028 #line $LINENO "configure"
9029 #include "confdefs.h"
9030 #include <X11/Xlib.h>
9031
9032 #include <X11/extensions/xidle.h>
9033 _ACEOF
9034 rm -f conftest.$ac_objext
9035 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9036   (eval $ac_compile) 2>&5
9037   ac_status=$?
9038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9039   (exit $ac_status); } &&
9040          { ac_try='test -s conftest.$ac_objext'
9041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9042   (eval $ac_try) 2>&5
9043   ac_status=$?
9044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9045   (exit $ac_status); }; }; then
9046   ac_cv_header_X11_extensions_xidle_h=yes
9047 else
9048   echo "$as_me: failed program was:" >&5
9049 cat conftest.$ac_ext >&5
9050 ac_cv_header_X11_extensions_xidle_h=no
9051 fi
9052 rm -f conftest.$ac_objext conftest.$ac_ext
9053 fi
9054 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
9055 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
9056 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
9057   have_xidle=yes
9058                      cat >>confdefs.h <<\_ACEOF
9059 #define HAVE_XIDLE_EXTENSION 1
9060 _ACEOF
9061
9062 fi
9063
9064
9065   CPPFLAGS="$ac_save_CPPFLAGS"
9066 elif test "$with_xidle" != no; then
9067   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
9068   exit 1
9069 fi
9070
9071
9072 ###############################################################################
9073 #
9074 #       Check for the SGI-VIDEO-CONTROL server extension.
9075 #
9076 ###############################################################################
9077
9078 have_sgivc=no
9079 with_sgivc_req=unspecified
9080
9081 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
9082 if test "${with_sgivc_ext+set}" = set; then
9083   withval="$with_sgivc_ext"
9084   with_sgivc="$withval"; with_sgivc_req="$withval"
9085 else
9086   with_sgivc=yes
9087 fi;
9088
9089
9090    case "$with_sgivc" in
9091     yes) ;;
9092     no)  ;;
9093
9094     /*)
9095      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
9096 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
9097      d=$with_sgivc/include
9098      if test -d $d; then
9099        X_CFLAGS="-I$d $X_CFLAGS"
9100        echo "$as_me:$LINENO: result: $d" >&5
9101 echo "${ECHO_T}$d" >&6
9102      else
9103        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9104 echo "${ECHO_T}not found ($d: no such directory)" >&6
9105      fi
9106
9107      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
9108 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
9109      d=$with_sgivc/lib
9110      if test -d $d; then
9111        X_LIBS="-L$d $X_LIBS"
9112        echo "$as_me:$LINENO: result: $d" >&5
9113 echo "${ECHO_T}$d" >&6
9114      else
9115        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9116 echo "${ECHO_T}not found ($d: no such directory)" >&6
9117      fi
9118
9119      # replace the directory string with "yes".
9120      with_sgivc_req="yes"
9121      with_sgivc=$with_sgivc_req
9122      ;;
9123
9124     *)
9125      echo ""
9126      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
9127      echo "       If it is a directory, then \`DIR/include' will be added to"
9128      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9129      exit 1
9130      ;;
9131    esac
9132
9133
9134 if test "$with_sgivc" = yes; then
9135
9136   # first check for XSGIvc.h
9137
9138   ac_save_CPPFLAGS="$CPPFLAGS"
9139   if test \! -z "$includedir" ; then
9140     CPPFLAGS="$CPPFLAGS -I$includedir"
9141   fi
9142   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9143   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
9144 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
9145 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
9146   echo $ECHO_N "(cached) $ECHO_C" >&6
9147 else
9148   cat >conftest.$ac_ext <<_ACEOF
9149 #line $LINENO "configure"
9150 #include "confdefs.h"
9151 #include <X11/Xlib.h>
9152
9153 #include <X11/extensions/XSGIvc.h>
9154 _ACEOF
9155 rm -f conftest.$ac_objext
9156 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9157   (eval $ac_compile) 2>&5
9158   ac_status=$?
9159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9160   (exit $ac_status); } &&
9161          { ac_try='test -s conftest.$ac_objext'
9162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9163   (eval $ac_try) 2>&5
9164   ac_status=$?
9165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9166   (exit $ac_status); }; }; then
9167   ac_cv_header_X11_extensions_XSGIvc_h=yes
9168 else
9169   echo "$as_me: failed program was:" >&5
9170 cat conftest.$ac_ext >&5
9171 ac_cv_header_X11_extensions_XSGIvc_h=no
9172 fi
9173 rm -f conftest.$ac_objext conftest.$ac_ext
9174 fi
9175 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
9176 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
9177 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
9178   have_sgivc=yes
9179 fi
9180
9181
9182   CPPFLAGS="$ac_save_CPPFLAGS"
9183
9184   # if that succeeded, then check for the -lXsgivc
9185   if test "$have_sgivc" = yes; then
9186     have_sgivc=no
9187
9188   ac_save_CPPFLAGS="$CPPFLAGS"
9189   ac_save_LDFLAGS="$LDFLAGS"
9190 #  ac_save_LIBS="$LIBS"
9191
9192   if test \! -z "$includedir" ; then
9193     CPPFLAGS="$CPPFLAGS -I$includedir"
9194   fi
9195   # note: $X_CFLAGS includes $x_includes
9196   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9197
9198   if test \! -z "$libdir" ; then
9199     LDFLAGS="$LDFLAGS -L$libdir"
9200   fi
9201   # note: $X_LIBS includes $x_libraries
9202   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9203
9204   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
9205 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
9206 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
9207   echo $ECHO_N "(cached) $ECHO_C" >&6
9208 else
9209   ac_check_lib_save_LIBS=$LIBS
9210 LIBS="-lXsgivc -lXext -lX11 $LIBS"
9211 cat >conftest.$ac_ext <<_ACEOF
9212 #line $LINENO "configure"
9213 #include "confdefs.h"
9214
9215 /* Override any gcc2 internal prototype to avoid an error.  */
9216 #ifdef __cplusplus
9217 extern "C"
9218 #endif
9219 /* We use char because int might match the return type of a gcc2
9220    builtin and then its argument prototype would still apply.  */
9221 char XSGIvcQueryGammaMap ();
9222 #ifdef F77_DUMMY_MAIN
9223 #  ifdef __cplusplus
9224      extern "C"
9225 #  endif
9226    int F77_DUMMY_MAIN() { return 1; }
9227 #endif
9228 int
9229 main ()
9230 {
9231 XSGIvcQueryGammaMap ();
9232   ;
9233   return 0;
9234 }
9235 _ACEOF
9236 rm -f conftest.$ac_objext conftest$ac_exeext
9237 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9238   (eval $ac_link) 2>&5
9239   ac_status=$?
9240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9241   (exit $ac_status); } &&
9242          { ac_try='test -s conftest$ac_exeext'
9243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9244   (eval $ac_try) 2>&5
9245   ac_status=$?
9246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9247   (exit $ac_status); }; }; then
9248   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
9249 else
9250   echo "$as_me: failed program was:" >&5
9251 cat conftest.$ac_ext >&5
9252 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
9253 fi
9254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9255 LIBS=$ac_check_lib_save_LIBS
9256 fi
9257 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
9258 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
9259 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
9260   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
9261 else
9262   true
9263 fi
9264
9265   CPPFLAGS="$ac_save_CPPFLAGS"
9266   LDFLAGS="$ac_save_LDFLAGS"
9267 #  LIBS="$ac_save_LIBS"
9268
9269   fi
9270
9271   # if that succeeded, then we've really got it.
9272   if test "$have_sgivc" = yes; then
9273     cat >>confdefs.h <<\_ACEOF
9274 #define HAVE_SGI_VC_EXTENSION 1
9275 _ACEOF
9276
9277   fi
9278
9279 elif test "$with_sgivc" != no; then
9280   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
9281   exit 1
9282 fi
9283
9284
9285 ###############################################################################
9286 #
9287 #       Check for the DPMS server extension.
9288 #
9289 ###############################################################################
9290
9291 have_dpms=no
9292 with_dpms_req=unspecified
9293
9294 # Check whether --with-dpms-ext or --without-dpms-ext was given.
9295 if test "${with_dpms_ext+set}" = set; then
9296   withval="$with_dpms_ext"
9297   with_dpms="$withval"; with_dpms_req="$withval"
9298 else
9299   with_dpms=yes
9300 fi;
9301
9302
9303    case "$with_dpms" in
9304     yes) ;;
9305     no)  ;;
9306
9307     /*)
9308      echo "$as_me:$LINENO: checking for DPMS headers" >&5
9309 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
9310      d=$with_dpms/include
9311      if test -d $d; then
9312        X_CFLAGS="-I$d $X_CFLAGS"
9313        echo "$as_me:$LINENO: result: $d" >&5
9314 echo "${ECHO_T}$d" >&6
9315      else
9316        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9317 echo "${ECHO_T}not found ($d: no such directory)" >&6
9318      fi
9319
9320      echo "$as_me:$LINENO: checking for DPMS libs" >&5
9321 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
9322      d=$with_dpms/lib
9323      if test -d $d; then
9324        X_LIBS="-L$d $X_LIBS"
9325        echo "$as_me:$LINENO: result: $d" >&5
9326 echo "${ECHO_T}$d" >&6
9327      else
9328        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9329 echo "${ECHO_T}not found ($d: no such directory)" >&6
9330      fi
9331
9332      # replace the directory string with "yes".
9333      with_dpms_req="yes"
9334      with_dpms=$with_dpms_req
9335      ;;
9336
9337     *)
9338      echo ""
9339      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
9340      echo "       If it is a directory, then \`DIR/include' will be added to"
9341      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9342      exit 1
9343      ;;
9344    esac
9345
9346
9347 if test "$with_dpms" = yes; then
9348
9349   # first check for dpms.h
9350
9351   ac_save_CPPFLAGS="$CPPFLAGS"
9352   if test \! -z "$includedir" ; then
9353     CPPFLAGS="$CPPFLAGS -I$includedir"
9354   fi
9355   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9356   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
9357 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
9358 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
9359   echo $ECHO_N "(cached) $ECHO_C" >&6
9360 else
9361   cat >conftest.$ac_ext <<_ACEOF
9362 #line $LINENO "configure"
9363 #include "confdefs.h"
9364 #include <X11/Xlib.h>
9365                      #include <X11/Xmd.h>
9366
9367 #include <X11/extensions/dpms.h>
9368 _ACEOF
9369 rm -f conftest.$ac_objext
9370 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9371   (eval $ac_compile) 2>&5
9372   ac_status=$?
9373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9374   (exit $ac_status); } &&
9375          { ac_try='test -s conftest.$ac_objext'
9376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9377   (eval $ac_try) 2>&5
9378   ac_status=$?
9379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9380   (exit $ac_status); }; }; then
9381   ac_cv_header_X11_extensions_dpms_h=yes
9382 else
9383   echo "$as_me: failed program was:" >&5
9384 cat conftest.$ac_ext >&5
9385 ac_cv_header_X11_extensions_dpms_h=no
9386 fi
9387 rm -f conftest.$ac_objext conftest.$ac_ext
9388 fi
9389 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
9390 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
9391 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
9392   have_dpms=yes
9393 fi
9394
9395
9396   CPPFLAGS="$ac_save_CPPFLAGS"
9397
9398   # if that succeeded, then check for the DPMS code in the libraries
9399   if test "$have_dpms" = yes; then
9400
9401     # first look in -lXext (this is where it is with XFree86 4.0)
9402     have_dpms=no
9403
9404   ac_save_CPPFLAGS="$CPPFLAGS"
9405   ac_save_LDFLAGS="$LDFLAGS"
9406 #  ac_save_LIBS="$LIBS"
9407
9408   if test \! -z "$includedir" ; then
9409     CPPFLAGS="$CPPFLAGS -I$includedir"
9410   fi
9411   # note: $X_CFLAGS includes $x_includes
9412   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9413
9414   if test \! -z "$libdir" ; then
9415     LDFLAGS="$LDFLAGS -L$libdir"
9416   fi
9417   # note: $X_LIBS includes $x_libraries
9418   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9419
9420   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
9421 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
9422 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
9423   echo $ECHO_N "(cached) $ECHO_C" >&6
9424 else
9425   ac_check_lib_save_LIBS=$LIBS
9426 LIBS="-lXext -lXext -lX11 $LIBS"
9427 cat >conftest.$ac_ext <<_ACEOF
9428 #line $LINENO "configure"
9429 #include "confdefs.h"
9430
9431 /* Override any gcc2 internal prototype to avoid an error.  */
9432 #ifdef __cplusplus
9433 extern "C"
9434 #endif
9435 /* We use char because int might match the return type of a gcc2
9436    builtin and then its argument prototype would still apply.  */
9437 char DPMSInfo ();
9438 #ifdef F77_DUMMY_MAIN
9439 #  ifdef __cplusplus
9440      extern "C"
9441 #  endif
9442    int F77_DUMMY_MAIN() { return 1; }
9443 #endif
9444 int
9445 main ()
9446 {
9447 DPMSInfo ();
9448   ;
9449   return 0;
9450 }
9451 _ACEOF
9452 rm -f conftest.$ac_objext conftest$ac_exeext
9453 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9454   (eval $ac_link) 2>&5
9455   ac_status=$?
9456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9457   (exit $ac_status); } &&
9458          { ac_try='test -s conftest$ac_exeext'
9459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9460   (eval $ac_try) 2>&5
9461   ac_status=$?
9462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9463   (exit $ac_status); }; }; then
9464   ac_cv_lib_Xext_DPMSInfo=yes
9465 else
9466   echo "$as_me: failed program was:" >&5
9467 cat conftest.$ac_ext >&5
9468 ac_cv_lib_Xext_DPMSInfo=no
9469 fi
9470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9471 LIBS=$ac_check_lib_save_LIBS
9472 fi
9473 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
9474 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
9475 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
9476   have_dpms=yes
9477 else
9478   true
9479 fi
9480
9481   CPPFLAGS="$ac_save_CPPFLAGS"
9482   LDFLAGS="$ac_save_LDFLAGS"
9483 #  LIBS="$ac_save_LIBS"
9484
9485
9486     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
9487     if test "$have_dpms" = no; then
9488
9489   ac_save_CPPFLAGS="$CPPFLAGS"
9490   ac_save_LDFLAGS="$LDFLAGS"
9491 #  ac_save_LIBS="$LIBS"
9492
9493   if test \! -z "$includedir" ; then
9494     CPPFLAGS="$CPPFLAGS -I$includedir"
9495   fi
9496   # note: $X_CFLAGS includes $x_includes
9497   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9498
9499   if test \! -z "$libdir" ; then
9500     LDFLAGS="$LDFLAGS -L$libdir"
9501   fi
9502   # note: $X_LIBS includes $x_libraries
9503   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9504
9505   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
9506 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
9507 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
9508   echo $ECHO_N "(cached) $ECHO_C" >&6
9509 else
9510   ac_check_lib_save_LIBS=$LIBS
9511 LIBS="-lXdpms -lXext -lX11 $LIBS"
9512 cat >conftest.$ac_ext <<_ACEOF
9513 #line $LINENO "configure"
9514 #include "confdefs.h"
9515
9516 /* Override any gcc2 internal prototype to avoid an error.  */
9517 #ifdef __cplusplus
9518 extern "C"
9519 #endif
9520 /* We use char because int might match the return type of a gcc2
9521    builtin and then its argument prototype would still apply.  */
9522 char DPMSInfo ();
9523 #ifdef F77_DUMMY_MAIN
9524 #  ifdef __cplusplus
9525      extern "C"
9526 #  endif
9527    int F77_DUMMY_MAIN() { return 1; }
9528 #endif
9529 int
9530 main ()
9531 {
9532 DPMSInfo ();
9533   ;
9534   return 0;
9535 }
9536 _ACEOF
9537 rm -f conftest.$ac_objext conftest$ac_exeext
9538 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9539   (eval $ac_link) 2>&5
9540   ac_status=$?
9541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9542   (exit $ac_status); } &&
9543          { ac_try='test -s conftest$ac_exeext'
9544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9545   (eval $ac_try) 2>&5
9546   ac_status=$?
9547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9548   (exit $ac_status); }; }; then
9549   ac_cv_lib_Xdpms_DPMSInfo=yes
9550 else
9551   echo "$as_me: failed program was:" >&5
9552 cat conftest.$ac_ext >&5
9553 ac_cv_lib_Xdpms_DPMSInfo=no
9554 fi
9555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9556 LIBS=$ac_check_lib_save_LIBS
9557 fi
9558 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
9559 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
9560 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
9561   have_dpms=yes; XDPMS_LIBS="-lXdpms"
9562 else
9563   true
9564 fi
9565
9566   CPPFLAGS="$ac_save_CPPFLAGS"
9567   LDFLAGS="$ac_save_LDFLAGS"
9568 #  LIBS="$ac_save_LIBS"
9569
9570     fi
9571   fi
9572
9573
9574   # if that succeeded, then we've really got it.
9575   if test "$have_dpms" = yes; then
9576     cat >>confdefs.h <<\_ACEOF
9577 #define HAVE_DPMS_EXTENSION 1
9578 _ACEOF
9579
9580   fi
9581
9582 elif test "$with_dpms" != no; then
9583   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
9584   exit 1
9585 fi
9586
9587
9588 ###############################################################################
9589 #
9590 #       Check for the XINERAMA server extension.
9591 #
9592 ###############################################################################
9593
9594 have_xinerama=no
9595 with_xinerama_req=unspecified
9596
9597 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
9598 if test "${with_xinerama_ext+set}" = set; then
9599   withval="$with_xinerama_ext"
9600   with_xinerama="$withval"; with_xinerama_req="$withval"
9601 else
9602   with_xinerama=yes
9603 fi;
9604
9605
9606    case "$with_xinerama" in
9607     yes) ;;
9608     no)  ;;
9609
9610     /*)
9611      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
9612 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
9613      d=$with_xinerama/include
9614      if test -d $d; then
9615        X_CFLAGS="-I$d $X_CFLAGS"
9616        echo "$as_me:$LINENO: result: $d" >&5
9617 echo "${ECHO_T}$d" >&6
9618      else
9619        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9620 echo "${ECHO_T}not found ($d: no such directory)" >&6
9621      fi
9622
9623      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
9624 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
9625      d=$with_xinerama/lib
9626      if test -d $d; then
9627        X_LIBS="-L$d $X_LIBS"
9628        echo "$as_me:$LINENO: result: $d" >&5
9629 echo "${ECHO_T}$d" >&6
9630      else
9631        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9632 echo "${ECHO_T}not found ($d: no such directory)" >&6
9633      fi
9634
9635      # replace the directory string with "yes".
9636      with_xinerama_req="yes"
9637      with_xinerama=$with_xinerama_req
9638      ;;
9639
9640     *)
9641      echo ""
9642      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
9643      echo "       If it is a directory, then \`DIR/include' will be added to"
9644      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9645      exit 1
9646      ;;
9647    esac
9648
9649
9650 if test "$with_xinerama" = yes; then
9651
9652   # first check for Xinerama.h
9653
9654   ac_save_CPPFLAGS="$CPPFLAGS"
9655   if test \! -z "$includedir" ; then
9656     CPPFLAGS="$CPPFLAGS -I$includedir"
9657   fi
9658   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9659   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
9660 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
9661 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
9662   echo $ECHO_N "(cached) $ECHO_C" >&6
9663 else
9664   cat >conftest.$ac_ext <<_ACEOF
9665 #line $LINENO "configure"
9666 #include "confdefs.h"
9667 #include <X11/Xlib.h>
9668
9669 #include <X11/extensions/Xinerama.h>
9670 _ACEOF
9671 rm -f conftest.$ac_objext
9672 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9673   (eval $ac_compile) 2>&5
9674   ac_status=$?
9675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9676   (exit $ac_status); } &&
9677          { ac_try='test -s conftest.$ac_objext'
9678   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9679   (eval $ac_try) 2>&5
9680   ac_status=$?
9681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9682   (exit $ac_status); }; }; then
9683   ac_cv_header_X11_extensions_Xinerama_h=yes
9684 else
9685   echo "$as_me: failed program was:" >&5
9686 cat conftest.$ac_ext >&5
9687 ac_cv_header_X11_extensions_Xinerama_h=no
9688 fi
9689 rm -f conftest.$ac_objext conftest.$ac_ext
9690 fi
9691 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
9692 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
9693 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
9694   have_xinerama=yes
9695 fi
9696
9697
9698   CPPFLAGS="$ac_save_CPPFLAGS"
9699
9700   # if that succeeded, then check for the XINERAMA code in the libraries
9701   if test "$have_xinerama" = yes; then
9702
9703     # first look in -lXext
9704     have_xinerama=no
9705
9706   ac_save_CPPFLAGS="$CPPFLAGS"
9707   ac_save_LDFLAGS="$LDFLAGS"
9708 #  ac_save_LIBS="$LIBS"
9709
9710   if test \! -z "$includedir" ; then
9711     CPPFLAGS="$CPPFLAGS -I$includedir"
9712   fi
9713   # note: $X_CFLAGS includes $x_includes
9714   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9715
9716   if test \! -z "$libdir" ; then
9717     LDFLAGS="$LDFLAGS -L$libdir"
9718   fi
9719   # note: $X_LIBS includes $x_libraries
9720   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9721
9722   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXext" >&5
9723 echo $ECHO_N "checking for XineramaQueryExtension in -lXext... $ECHO_C" >&6
9724 if test "${ac_cv_lib_Xext_XineramaQueryExtension+set}" = set; then
9725   echo $ECHO_N "(cached) $ECHO_C" >&6
9726 else
9727   ac_check_lib_save_LIBS=$LIBS
9728 LIBS="-lXext -lXext -lX11 $LIBS"
9729 cat >conftest.$ac_ext <<_ACEOF
9730 #line $LINENO "configure"
9731 #include "confdefs.h"
9732
9733 /* Override any gcc2 internal prototype to avoid an error.  */
9734 #ifdef __cplusplus
9735 extern "C"
9736 #endif
9737 /* We use char because int might match the return type of a gcc2
9738    builtin and then its argument prototype would still apply.  */
9739 char XineramaQueryExtension ();
9740 #ifdef F77_DUMMY_MAIN
9741 #  ifdef __cplusplus
9742      extern "C"
9743 #  endif
9744    int F77_DUMMY_MAIN() { return 1; }
9745 #endif
9746 int
9747 main ()
9748 {
9749 XineramaQueryExtension ();
9750   ;
9751   return 0;
9752 }
9753 _ACEOF
9754 rm -f conftest.$ac_objext conftest$ac_exeext
9755 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9756   (eval $ac_link) 2>&5
9757   ac_status=$?
9758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9759   (exit $ac_status); } &&
9760          { ac_try='test -s conftest$ac_exeext'
9761   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9762   (eval $ac_try) 2>&5
9763   ac_status=$?
9764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9765   (exit $ac_status); }; }; then
9766   ac_cv_lib_Xext_XineramaQueryExtension=yes
9767 else
9768   echo "$as_me: failed program was:" >&5
9769 cat conftest.$ac_ext >&5
9770 ac_cv_lib_Xext_XineramaQueryExtension=no
9771 fi
9772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9773 LIBS=$ac_check_lib_save_LIBS
9774 fi
9775 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryExtension" >&5
9776 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryExtension" >&6
9777 if test $ac_cv_lib_Xext_XineramaQueryExtension = yes; then
9778   have_xinerama=yes
9779 else
9780   true
9781 fi
9782
9783   CPPFLAGS="$ac_save_CPPFLAGS"
9784   LDFLAGS="$ac_save_LDFLAGS"
9785 #  LIBS="$ac_save_LIBS"
9786
9787
9788     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
9789     if test "$have_xinerama" = no; then
9790
9791   ac_save_CPPFLAGS="$CPPFLAGS"
9792   ac_save_LDFLAGS="$LDFLAGS"
9793 #  ac_save_LIBS="$LIBS"
9794
9795   if test \! -z "$includedir" ; then
9796     CPPFLAGS="$CPPFLAGS -I$includedir"
9797   fi
9798   # note: $X_CFLAGS includes $x_includes
9799   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9800
9801   if test \! -z "$libdir" ; then
9802     LDFLAGS="$LDFLAGS -L$libdir"
9803   fi
9804   # note: $X_LIBS includes $x_libraries
9805   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9806
9807   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXinerama" >&5
9808 echo $ECHO_N "checking for XineramaQueryExtension in -lXinerama... $ECHO_C" >&6
9809 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then
9810   echo $ECHO_N "(cached) $ECHO_C" >&6
9811 else
9812   ac_check_lib_save_LIBS=$LIBS
9813 LIBS="-lXinerama -lXext -lX11 $LIBS"
9814 cat >conftest.$ac_ext <<_ACEOF
9815 #line $LINENO "configure"
9816 #include "confdefs.h"
9817
9818 /* Override any gcc2 internal prototype to avoid an error.  */
9819 #ifdef __cplusplus
9820 extern "C"
9821 #endif
9822 /* We use char because int might match the return type of a gcc2
9823    builtin and then its argument prototype would still apply.  */
9824 char XineramaQueryExtension ();
9825 #ifdef F77_DUMMY_MAIN
9826 #  ifdef __cplusplus
9827      extern "C"
9828 #  endif
9829    int F77_DUMMY_MAIN() { return 1; }
9830 #endif
9831 int
9832 main ()
9833 {
9834 XineramaQueryExtension ();
9835   ;
9836   return 0;
9837 }
9838 _ACEOF
9839 rm -f conftest.$ac_objext conftest$ac_exeext
9840 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9841   (eval $ac_link) 2>&5
9842   ac_status=$?
9843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9844   (exit $ac_status); } &&
9845          { ac_try='test -s conftest$ac_exeext'
9846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9847   (eval $ac_try) 2>&5
9848   ac_status=$?
9849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9850   (exit $ac_status); }; }; then
9851   ac_cv_lib_Xinerama_XineramaQueryExtension=yes
9852 else
9853   echo "$as_me: failed program was:" >&5
9854 cat conftest.$ac_ext >&5
9855 ac_cv_lib_Xinerama_XineramaQueryExtension=no
9856 fi
9857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9858 LIBS=$ac_check_lib_save_LIBS
9859 fi
9860 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
9861 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6
9862 if test $ac_cv_lib_Xinerama_XineramaQueryExtension = yes; then
9863   have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"
9864 else
9865   true
9866 fi
9867
9868   CPPFLAGS="$ac_save_CPPFLAGS"
9869   LDFLAGS="$ac_save_LDFLAGS"
9870 #  LIBS="$ac_save_LIBS"
9871
9872     fi
9873   fi
9874
9875   # if that succeeded, then we've really got it.
9876   if test "$have_xinerama" = yes; then
9877     cat >>confdefs.h <<\_ACEOF
9878 #define HAVE_XINERAMA 1
9879 _ACEOF
9880
9881   fi
9882
9883 elif test "$with_xinerama" != no; then
9884   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
9885   exit 1
9886 fi
9887
9888
9889 ###############################################################################
9890 #
9891 #       Check for the XF86VMODE server extension (for virtual screens.)
9892 #
9893 ###############################################################################
9894
9895 have_xf86vmode=no
9896 with_xf86vmode_req=unspecified
9897
9898 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
9899 if test "${with_xf86vmode_ext+set}" = set; then
9900   withval="$with_xf86vmode_ext"
9901   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
9902 else
9903   with_xf86vmode=yes
9904 fi;
9905
9906
9907    case "$with_xf86vmode" in
9908     yes) ;;
9909     no)  ;;
9910
9911     /*)
9912      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
9913 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
9914      d=$with_xf86vmode/include
9915      if test -d $d; then
9916        X_CFLAGS="-I$d $X_CFLAGS"
9917        echo "$as_me:$LINENO: result: $d" >&5
9918 echo "${ECHO_T}$d" >&6
9919      else
9920        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9921 echo "${ECHO_T}not found ($d: no such directory)" >&6
9922      fi
9923
9924      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
9925 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
9926      d=$with_xf86vmode/lib
9927      if test -d $d; then
9928        X_LIBS="-L$d $X_LIBS"
9929        echo "$as_me:$LINENO: result: $d" >&5
9930 echo "${ECHO_T}$d" >&6
9931      else
9932        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9933 echo "${ECHO_T}not found ($d: no such directory)" >&6
9934      fi
9935
9936      # replace the directory string with "yes".
9937      with_xf86vmode_req="yes"
9938      with_xf86vmode=$with_xf86vmode_req
9939      ;;
9940
9941     *)
9942      echo ""
9943      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
9944      echo "       If it is a directory, then \`DIR/include' will be added to"
9945      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9946      exit 1
9947      ;;
9948    esac
9949
9950
9951 if test "$with_xf86vmode" = yes; then
9952
9953   # first check for xf86vmode.h
9954
9955   ac_save_CPPFLAGS="$CPPFLAGS"
9956   if test \! -z "$includedir" ; then
9957     CPPFLAGS="$CPPFLAGS -I$includedir"
9958   fi
9959   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9960   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
9961 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
9962 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
9963   echo $ECHO_N "(cached) $ECHO_C" >&6
9964 else
9965   cat >conftest.$ac_ext <<_ACEOF
9966 #line $LINENO "configure"
9967 #include "confdefs.h"
9968 #include <X11/Xlib.h>
9969
9970 #include <X11/extensions/xf86vmode.h>
9971 _ACEOF
9972 rm -f conftest.$ac_objext
9973 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9974   (eval $ac_compile) 2>&5
9975   ac_status=$?
9976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9977   (exit $ac_status); } &&
9978          { ac_try='test -s conftest.$ac_objext'
9979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9980   (eval $ac_try) 2>&5
9981   ac_status=$?
9982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9983   (exit $ac_status); }; }; then
9984   ac_cv_header_X11_extensions_xf86vmode_h=yes
9985 else
9986   echo "$as_me: failed program was:" >&5
9987 cat conftest.$ac_ext >&5
9988 ac_cv_header_X11_extensions_xf86vmode_h=no
9989 fi
9990 rm -f conftest.$ac_objext conftest.$ac_ext
9991 fi
9992 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
9993 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
9994 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
9995   have_xf86vmode=yes
9996 fi
9997
9998
9999   CPPFLAGS="$ac_save_CPPFLAGS"
10000
10001   # if that succeeded, then check for the -lXxf86vm
10002   if test "$have_xf86vmode" = yes; then
10003     have_xf86vmode=no
10004
10005   ac_save_CPPFLAGS="$CPPFLAGS"
10006   ac_save_LDFLAGS="$LDFLAGS"
10007 #  ac_save_LIBS="$LIBS"
10008
10009   if test \! -z "$includedir" ; then
10010     CPPFLAGS="$CPPFLAGS -I$includedir"
10011   fi
10012   # note: $X_CFLAGS includes $x_includes
10013   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10014
10015   if test \! -z "$libdir" ; then
10016     LDFLAGS="$LDFLAGS -L$libdir"
10017   fi
10018   # note: $X_LIBS includes $x_libraries
10019   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10020
10021   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
10022 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
10023 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
10024   echo $ECHO_N "(cached) $ECHO_C" >&6
10025 else
10026   ac_check_lib_save_LIBS=$LIBS
10027 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10028 cat >conftest.$ac_ext <<_ACEOF
10029 #line $LINENO "configure"
10030 #include "confdefs.h"
10031
10032 /* Override any gcc2 internal prototype to avoid an error.  */
10033 #ifdef __cplusplus
10034 extern "C"
10035 #endif
10036 /* We use char because int might match the return type of a gcc2
10037    builtin and then its argument prototype would still apply.  */
10038 char XF86VidModeGetViewPort ();
10039 #ifdef F77_DUMMY_MAIN
10040 #  ifdef __cplusplus
10041      extern "C"
10042 #  endif
10043    int F77_DUMMY_MAIN() { return 1; }
10044 #endif
10045 int
10046 main ()
10047 {
10048 XF86VidModeGetViewPort ();
10049   ;
10050   return 0;
10051 }
10052 _ACEOF
10053 rm -f conftest.$ac_objext conftest$ac_exeext
10054 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10055   (eval $ac_link) 2>&5
10056   ac_status=$?
10057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10058   (exit $ac_status); } &&
10059          { ac_try='test -s conftest$ac_exeext'
10060   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10061   (eval $ac_try) 2>&5
10062   ac_status=$?
10063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10064   (exit $ac_status); }; }; then
10065   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
10066 else
10067   echo "$as_me: failed program was:" >&5
10068 cat conftest.$ac_ext >&5
10069 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
10070 fi
10071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10072 LIBS=$ac_check_lib_save_LIBS
10073 fi
10074 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
10075 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
10076 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
10077   have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10078 else
10079   true
10080 fi
10081
10082   CPPFLAGS="$ac_save_CPPFLAGS"
10083   LDFLAGS="$ac_save_LDFLAGS"
10084 #  LIBS="$ac_save_LIBS"
10085
10086   fi
10087
10088   # if that succeeded, then we've really got it.
10089   if test "$have_xf86vmode" = yes; then
10090     cat >>confdefs.h <<\_ACEOF
10091 #define HAVE_XF86VMODE 1
10092 _ACEOF
10093
10094   fi
10095
10096 elif test "$with_xf86vmode" != no; then
10097   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
10098   exit 1
10099 fi
10100
10101
10102 ###############################################################################
10103 #
10104 #       Check for the XF86VMODE server extension (for gamma fading.)
10105 #
10106 ###############################################################################
10107
10108 have_xf86gamma=no
10109 have_xf86gamma_ramp=no
10110 with_xf86gamma_req=unspecified
10111
10112 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
10113 if test "${with_xf86gamma_ext+set}" = set; then
10114   withval="$with_xf86gamma_ext"
10115   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
10116 else
10117   with_xf86gamma=yes
10118 fi;
10119
10120
10121    case "$with_xf86gamma" in
10122     yes) ;;
10123     no)  ;;
10124
10125     /*)
10126      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
10127 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
10128      d=$with_xf86gamma/include
10129      if test -d $d; then
10130        X_CFLAGS="-I$d $X_CFLAGS"
10131        echo "$as_me:$LINENO: result: $d" >&5
10132 echo "${ECHO_T}$d" >&6
10133      else
10134        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10135 echo "${ECHO_T}not found ($d: no such directory)" >&6
10136      fi
10137
10138      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
10139 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
10140      d=$with_xf86gamma/lib
10141      if test -d $d; then
10142        X_LIBS="-L$d $X_LIBS"
10143        echo "$as_me:$LINENO: result: $d" >&5
10144 echo "${ECHO_T}$d" >&6
10145      else
10146        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10147 echo "${ECHO_T}not found ($d: no such directory)" >&6
10148      fi
10149
10150      # replace the directory string with "yes".
10151      with_xf86gamma_req="yes"
10152      with_xf86gamma=$with_xf86gamma_req
10153      ;;
10154
10155     *)
10156      echo ""
10157      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
10158      echo "       If it is a directory, then \`DIR/include' will be added to"
10159      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10160      exit 1
10161      ;;
10162    esac
10163
10164
10165 if test "$with_xf86gamma" = yes; then
10166
10167   # first check for xf86vmode.h, if we haven't already
10168   if test "$have_xf86vmode" = yes; then
10169     have_xf86gamma=yes
10170   else
10171
10172   ac_save_CPPFLAGS="$CPPFLAGS"
10173   if test \! -z "$includedir" ; then
10174     CPPFLAGS="$CPPFLAGS -I$includedir"
10175   fi
10176   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10177   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10178 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10179 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10180   echo $ECHO_N "(cached) $ECHO_C" >&6
10181 else
10182   cat >conftest.$ac_ext <<_ACEOF
10183 #line $LINENO "configure"
10184 #include "confdefs.h"
10185 #include <X11/Xlib.h>
10186
10187 #include <X11/extensions/xf86vmode.h>
10188 _ACEOF
10189 rm -f conftest.$ac_objext
10190 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10191   (eval $ac_compile) 2>&5
10192   ac_status=$?
10193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10194   (exit $ac_status); } &&
10195          { ac_try='test -s conftest.$ac_objext'
10196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10197   (eval $ac_try) 2>&5
10198   ac_status=$?
10199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10200   (exit $ac_status); }; }; then
10201   ac_cv_header_X11_extensions_xf86vmode_h=yes
10202 else
10203   echo "$as_me: failed program was:" >&5
10204 cat conftest.$ac_ext >&5
10205 ac_cv_header_X11_extensions_xf86vmode_h=no
10206 fi
10207 rm -f conftest.$ac_objext conftest.$ac_ext
10208 fi
10209 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10210 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10211 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10212   have_xf86gamma=yes
10213 fi
10214
10215
10216   CPPFLAGS="$ac_save_CPPFLAGS"
10217   fi
10218
10219   # if that succeeded, then check for the -lXxf86vm
10220   if test "$have_xf86gamma" = yes; then
10221     have_xf86gamma=no
10222
10223   ac_save_CPPFLAGS="$CPPFLAGS"
10224   ac_save_LDFLAGS="$LDFLAGS"
10225 #  ac_save_LIBS="$LIBS"
10226
10227   if test \! -z "$includedir" ; then
10228     CPPFLAGS="$CPPFLAGS -I$includedir"
10229   fi
10230   # note: $X_CFLAGS includes $x_includes
10231   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10232
10233   if test \! -z "$libdir" ; then
10234     LDFLAGS="$LDFLAGS -L$libdir"
10235   fi
10236   # note: $X_LIBS includes $x_libraries
10237   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10238
10239   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
10240 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
10241 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
10242   echo $ECHO_N "(cached) $ECHO_C" >&6
10243 else
10244   ac_check_lib_save_LIBS=$LIBS
10245 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10246 cat >conftest.$ac_ext <<_ACEOF
10247 #line $LINENO "configure"
10248 #include "confdefs.h"
10249
10250 /* Override any gcc2 internal prototype to avoid an error.  */
10251 #ifdef __cplusplus
10252 extern "C"
10253 #endif
10254 /* We use char because int might match the return type of a gcc2
10255    builtin and then its argument prototype would still apply.  */
10256 char XF86VidModeSetGamma ();
10257 #ifdef F77_DUMMY_MAIN
10258 #  ifdef __cplusplus
10259      extern "C"
10260 #  endif
10261    int F77_DUMMY_MAIN() { return 1; }
10262 #endif
10263 int
10264 main ()
10265 {
10266 XF86VidModeSetGamma ();
10267   ;
10268   return 0;
10269 }
10270 _ACEOF
10271 rm -f conftest.$ac_objext conftest$ac_exeext
10272 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10273   (eval $ac_link) 2>&5
10274   ac_status=$?
10275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10276   (exit $ac_status); } &&
10277          { ac_try='test -s conftest$ac_exeext'
10278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10279   (eval $ac_try) 2>&5
10280   ac_status=$?
10281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10282   (exit $ac_status); }; }; then
10283   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
10284 else
10285   echo "$as_me: failed program was:" >&5
10286 cat conftest.$ac_ext >&5
10287 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
10288 fi
10289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10290 LIBS=$ac_check_lib_save_LIBS
10291 fi
10292 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
10293 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
10294 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
10295   have_xf86gamma=yes
10296 else
10297   true
10298 fi
10299
10300   CPPFLAGS="$ac_save_CPPFLAGS"
10301   LDFLAGS="$ac_save_LDFLAGS"
10302 #  LIBS="$ac_save_LIBS"
10303
10304   fi
10305
10306   # check for the Ramp versions of the functions too.
10307   if test "$have_xf86gamma" = yes; then
10308     have_xf86gamma_ramp=no
10309
10310   ac_save_CPPFLAGS="$CPPFLAGS"
10311   ac_save_LDFLAGS="$LDFLAGS"
10312 #  ac_save_LIBS="$LIBS"
10313
10314   if test \! -z "$includedir" ; then
10315     CPPFLAGS="$CPPFLAGS -I$includedir"
10316   fi
10317   # note: $X_CFLAGS includes $x_includes
10318   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10319
10320   if test \! -z "$libdir" ; then
10321     LDFLAGS="$LDFLAGS -L$libdir"
10322   fi
10323   # note: $X_LIBS includes $x_libraries
10324   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10325
10326   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
10327 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
10328 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
10329   echo $ECHO_N "(cached) $ECHO_C" >&6
10330 else
10331   ac_check_lib_save_LIBS=$LIBS
10332 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10333 cat >conftest.$ac_ext <<_ACEOF
10334 #line $LINENO "configure"
10335 #include "confdefs.h"
10336
10337 /* Override any gcc2 internal prototype to avoid an error.  */
10338 #ifdef __cplusplus
10339 extern "C"
10340 #endif
10341 /* We use char because int might match the return type of a gcc2
10342    builtin and then its argument prototype would still apply.  */
10343 char XF86VidModeSetGammaRamp ();
10344 #ifdef F77_DUMMY_MAIN
10345 #  ifdef __cplusplus
10346      extern "C"
10347 #  endif
10348    int F77_DUMMY_MAIN() { return 1; }
10349 #endif
10350 int
10351 main ()
10352 {
10353 XF86VidModeSetGammaRamp ();
10354   ;
10355   return 0;
10356 }
10357 _ACEOF
10358 rm -f conftest.$ac_objext conftest$ac_exeext
10359 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10360   (eval $ac_link) 2>&5
10361   ac_status=$?
10362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10363   (exit $ac_status); } &&
10364          { ac_try='test -s conftest$ac_exeext'
10365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10366   (eval $ac_try) 2>&5
10367   ac_status=$?
10368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10369   (exit $ac_status); }; }; then
10370   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
10371 else
10372   echo "$as_me: failed program was:" >&5
10373 cat conftest.$ac_ext >&5
10374 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
10375 fi
10376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10377 LIBS=$ac_check_lib_save_LIBS
10378 fi
10379 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
10380 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
10381 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
10382   have_xf86gamma_ramp=yes
10383 else
10384   true
10385 fi
10386
10387   CPPFLAGS="$ac_save_CPPFLAGS"
10388   LDFLAGS="$ac_save_LDFLAGS"
10389 #  LIBS="$ac_save_LIBS"
10390
10391   fi
10392
10393   # if those tests succeeded, then we've really got the functions.
10394   if test "$have_xf86gamma" = yes; then
10395     cat >>confdefs.h <<\_ACEOF
10396 #define HAVE_XF86VMODE_GAMMA 1
10397 _ACEOF
10398
10399   fi
10400
10401   if test "$have_xf86gamma_ramp" = yes; then
10402     cat >>confdefs.h <<\_ACEOF
10403 #define HAVE_XF86VMODE_GAMMA_RAMP 1
10404 _ACEOF
10405
10406   fi
10407
10408   # pull in the lib, if we haven't already
10409   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
10410     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10411   fi
10412
10413 elif test "$with_xf86gamma" != no; then
10414   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
10415   exit 1
10416 fi
10417
10418
10419 ###############################################################################
10420 #
10421 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
10422 #       using other XF86 stuff.)
10423 #
10424 ###############################################################################
10425
10426 have_xf86miscsetgrabkeysstate=no
10427 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
10428
10429   ac_save_CPPFLAGS="$CPPFLAGS"
10430   ac_save_LDFLAGS="$LDFLAGS"
10431 #  ac_save_LIBS="$LIBS"
10432
10433   if test \! -z "$includedir" ; then
10434     CPPFLAGS="$CPPFLAGS -I$includedir"
10435   fi
10436   # note: $X_CFLAGS includes $x_includes
10437   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10438
10439   if test \! -z "$libdir" ; then
10440     LDFLAGS="$LDFLAGS -L$libdir"
10441   fi
10442   # note: $X_LIBS includes $x_libraries
10443   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10444
10445   echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
10446 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6
10447 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
10448   echo $ECHO_N "(cached) $ECHO_C" >&6
10449 else
10450   ac_check_lib_save_LIBS=$LIBS
10451 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
10452 cat >conftest.$ac_ext <<_ACEOF
10453 #line $LINENO "configure"
10454 #include "confdefs.h"
10455
10456 /* Override any gcc2 internal prototype to avoid an error.  */
10457 #ifdef __cplusplus
10458 extern "C"
10459 #endif
10460 /* We use char because int might match the return type of a gcc2
10461    builtin and then its argument prototype would still apply.  */
10462 char XF86MiscSetGrabKeysState ();
10463 #ifdef F77_DUMMY_MAIN
10464 #  ifdef __cplusplus
10465      extern "C"
10466 #  endif
10467    int F77_DUMMY_MAIN() { return 1; }
10468 #endif
10469 int
10470 main ()
10471 {
10472 XF86MiscSetGrabKeysState ();
10473   ;
10474   return 0;
10475 }
10476 _ACEOF
10477 rm -f conftest.$ac_objext conftest$ac_exeext
10478 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10479   (eval $ac_link) 2>&5
10480   ac_status=$?
10481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10482   (exit $ac_status); } &&
10483          { ac_try='test -s conftest$ac_exeext'
10484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10485   (eval $ac_try) 2>&5
10486   ac_status=$?
10487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10488   (exit $ac_status); }; }; then
10489   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
10490 else
10491   echo "$as_me: failed program was:" >&5
10492 cat conftest.$ac_ext >&5
10493 ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
10494 fi
10495 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10496 LIBS=$ac_check_lib_save_LIBS
10497 fi
10498 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
10499 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6
10500 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
10501   have_xf86miscsetgrabkeysstate=yes
10502 else
10503   true
10504 fi
10505
10506   CPPFLAGS="$ac_save_CPPFLAGS"
10507   LDFLAGS="$ac_save_LDFLAGS"
10508 #  LIBS="$ac_save_LIBS"
10509
10510   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
10511     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
10512     cat >>confdefs.h <<\_ACEOF
10513 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
10514 _ACEOF
10515
10516   fi
10517 fi
10518
10519
10520 ###############################################################################
10521 #
10522 #       Check for HP XHPDisableReset and XHPEnableReset.
10523 #
10524 ###############################################################################
10525
10526 echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
10527 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6
10528
10529   ac_save_CPPFLAGS="$CPPFLAGS"
10530   if test \! -z "$includedir" ; then
10531     CPPFLAGS="$CPPFLAGS -I$includedir"
10532   fi
10533   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10534   cat >conftest.$ac_ext <<_ACEOF
10535 #line $LINENO "configure"
10536 #include "confdefs.h"
10537 #include <X11/XHPlib.h>
10538
10539 _ACEOF
10540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10541   egrep "XHPDisableReset" >/dev/null 2>&1; then
10542   cat >>confdefs.h <<\_ACEOF
10543 #define HAVE_XHPDISABLERESET 1
10544 _ACEOF
10545
10546                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
10547                    echo "$as_me:$LINENO: result: yes" >&5
10548 echo "${ECHO_T}yes" >&6
10549 else
10550   echo "$as_me:$LINENO: result: no" >&5
10551 echo "${ECHO_T}no" >&6
10552 fi
10553 rm -f conftest*
10554
10555   CPPFLAGS="$ac_save_CPPFLAGS"
10556
10557
10558 ###############################################################################
10559 #
10560 #       Check for /proc/interrupts.
10561 #
10562 ###############################################################################
10563
10564 have_proc_interrupts=no
10565 with_proc_interrupts_req=unspecified
10566
10567 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
10568 if test "${with_proc_interrupts+set}" = set; then
10569   withval="$with_proc_interrupts"
10570   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
10571 else
10572   with_proc_interrupts=yes
10573 fi;
10574
10575 if test "$with_proc_interrupts" = yes; then
10576
10577    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
10578 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
10579 if test "${ac_cv_have_proc_interrupts+set}" = set; then
10580   echo $ECHO_N "(cached) $ECHO_C" >&6
10581 else
10582   ac_cv_have_proc_interrupts=no
10583      if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
10584        ac_cv_have_proc_interrupts=yes
10585      fi
10586
10587 fi
10588 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
10589 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
10590    have_proc_interrupts=$ac_cv_have_proc_interrupts
10591
10592   if test "$have_proc_interrupts" = yes; then
10593     cat >>confdefs.h <<\_ACEOF
10594 #define HAVE_PROC_INTERRUPTS 1
10595 _ACEOF
10596
10597   fi
10598
10599 elif test "$with_proc_interrupts" != no; then
10600   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
10601   exit 1
10602 fi
10603
10604
10605 ###############################################################################
10606 #
10607 #       The --enable-locking option
10608 #
10609 ###############################################################################
10610
10611 # Check whether --enable-locking or --disable-locking was given.
10612 if test "${enable_locking+set}" = set; then
10613   enableval="$enable_locking"
10614   enable_locking="$enableval"
10615 else
10616   enable_locking=yes
10617 fi;
10618 if test "$enable_locking" = yes; then
10619   true
10620 elif test "$enable_locking" = no; then
10621   cat >>confdefs.h <<\_ACEOF
10622 #define NO_LOCKING 1
10623 _ACEOF
10624
10625 else
10626   echo "error: must be yes or no: --enable-locking=$enable_locking"
10627   exit 1
10628 fi
10629
10630
10631
10632 ###############################################################################
10633 #
10634 #       The --enable-vt-locking option
10635 #
10636 ###############################################################################
10637
10638 #ac_vt_lockswitch=no
10639 #AC_ARG_ENABLE(vt-locking,[
10640 #  --enable-vt-locking     Compile in support for locking Virtual Terminals.
10641 #                          This is the default if the system supports it, and
10642 #                          if locking support is included (--enable-locking.)
10643 #  --disable-vt-locking    Do not allow locking of VTs, even if locking is
10644 #                          enabled.],
10645 #  [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
10646 #if test "$enable_vt_locking" = yes; then
10647 #
10648 #  AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
10649 #   [AC_TRY_COMPILE([#include <fcntl.h>
10650 #                   #include <sys/ioctl.h>
10651 #                   #include <sys/vt.h>],
10652 #                  [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
10653 #                  [ac_cv_vt_lockswitch=yes],
10654 #                  [ac_cv_vt_lockswitch=no])])
10655 #  ac_vt_lockswitch=$ac_cv_vt_lockswitch
10656 #
10657 #elif test "$enable_vt_locking" = no; then
10658 #  true
10659 #else
10660 #  echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
10661 #  exit 1
10662 #fi
10663 #
10664 #if test "$ac_vt_lockswitch" = yes; then
10665 #  AC_DEFINE(HAVE_VT_LOCKSWITCH)
10666 #  # the VT_LOCKSWITCH ioctl can only be used when running as root.
10667 #  # #### but it doesn't work yet, so don't worry about that for now.
10668 ##  need_setuid=yes
10669 #fi
10670
10671
10672 ###############################################################################
10673 #
10674 #       Check for PAM.
10675 #
10676 ###############################################################################
10677
10678 case "$host" in
10679   *-solaris*)
10680    # Solaris systems tend to come with PAM misconfigured.
10681    #  Don't build it by default, even if the headers exist.
10682    with_pam_default=no
10683    ;;
10684   *)
10685    # Default to building PAM support on all other systems, if it exists.
10686    with_pam_default=yes
10687   ;;
10688 esac
10689
10690 have_pam=no
10691 with_pam_req=unspecified
10692
10693
10694 # Check whether --with-pam or --without-pam was given.
10695 if test "${with_pam+set}" = set; then
10696   withval="$with_pam"
10697   with_pam="$withval"; with_pam_req="$withval"
10698 else
10699   with_pam=$with_pam_default
10700 fi;
10701
10702
10703    case "$with_pam" in
10704     yes) ;;
10705     no)  ;;
10706
10707     /*)
10708      echo "$as_me:$LINENO: checking for PAM headers" >&5
10709 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
10710      d=$with_pam/include
10711      if test -d $d; then
10712        X_CFLAGS="-I$d $X_CFLAGS"
10713        echo "$as_me:$LINENO: result: $d" >&5
10714 echo "${ECHO_T}$d" >&6
10715      else
10716        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10717 echo "${ECHO_T}not found ($d: no such directory)" >&6
10718      fi
10719
10720      echo "$as_me:$LINENO: checking for PAM libs" >&5
10721 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
10722      d=$with_pam/lib
10723      if test -d $d; then
10724        X_LIBS="-L$d $X_LIBS"
10725        echo "$as_me:$LINENO: result: $d" >&5
10726 echo "${ECHO_T}$d" >&6
10727      else
10728        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10729 echo "${ECHO_T}not found ($d: no such directory)" >&6
10730      fi
10731
10732      # replace the directory string with "yes".
10733      with_pam_req="yes"
10734      with_pam=$with_pam_req
10735      ;;
10736
10737     *)
10738      echo ""
10739      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
10740      echo "       If it is a directory, then \`DIR/include' will be added to"
10741      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10742      exit 1
10743      ;;
10744    esac
10745
10746
10747 if test "$enable_locking" = yes -a "$with_pam" = yes; then
10748   echo "$as_me:$LINENO: checking for PAM" >&5
10749 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
10750 if test "${ac_cv_pam+set}" = set; then
10751   echo $ECHO_N "(cached) $ECHO_C" >&6
10752 else
10753
10754   ac_save_CPPFLAGS="$CPPFLAGS"
10755   if test \! -z "$includedir" ; then
10756     CPPFLAGS="$CPPFLAGS -I$includedir"
10757   fi
10758   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10759   cat >conftest.$ac_ext <<_ACEOF
10760 #line $LINENO "configure"
10761 #include "confdefs.h"
10762 #include <security/pam_appl.h>
10763 #ifdef F77_DUMMY_MAIN
10764 #  ifdef __cplusplus
10765      extern "C"
10766 #  endif
10767    int F77_DUMMY_MAIN() { return 1; }
10768 #endif
10769 int
10770 main ()
10771 {
10772
10773   ;
10774   return 0;
10775 }
10776 _ACEOF
10777 rm -f conftest.$ac_objext
10778 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10779   (eval $ac_compile) 2>&5
10780   ac_status=$?
10781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10782   (exit $ac_status); } &&
10783          { ac_try='test -s conftest.$ac_objext'
10784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10785   (eval $ac_try) 2>&5
10786   ac_status=$?
10787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10788   (exit $ac_status); }; }; then
10789   ac_cv_pam=yes
10790 else
10791   echo "$as_me: failed program was:" >&5
10792 cat conftest.$ac_ext >&5
10793 ac_cv_pam=no
10794 fi
10795 rm -f conftest.$ac_objext conftest.$ac_ext
10796   CPPFLAGS="$ac_save_CPPFLAGS"
10797 fi
10798 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
10799 echo "${ECHO_T}$ac_cv_pam" >&6
10800   if test "$ac_cv_pam" = yes ; then
10801     have_pam=yes
10802     cat >>confdefs.h <<\_ACEOF
10803 #define HAVE_PAM 1
10804 _ACEOF
10805
10806     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
10807
10808     # libpam typically requires dlopen and dlsym.  On FreeBSD,
10809     # those are in libc.  On Linux and Solaris, they're in libdl.
10810     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10811 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10812 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10813   echo $ECHO_N "(cached) $ECHO_C" >&6
10814 else
10815   ac_check_lib_save_LIBS=$LIBS
10816 LIBS="-ldl  $LIBS"
10817 cat >conftest.$ac_ext <<_ACEOF
10818 #line $LINENO "configure"
10819 #include "confdefs.h"
10820
10821 /* Override any gcc2 internal prototype to avoid an error.  */
10822 #ifdef __cplusplus
10823 extern "C"
10824 #endif
10825 /* We use char because int might match the return type of a gcc2
10826    builtin and then its argument prototype would still apply.  */
10827 char dlopen ();
10828 #ifdef F77_DUMMY_MAIN
10829 #  ifdef __cplusplus
10830      extern "C"
10831 #  endif
10832    int F77_DUMMY_MAIN() { return 1; }
10833 #endif
10834 int
10835 main ()
10836 {
10837 dlopen ();
10838   ;
10839   return 0;
10840 }
10841 _ACEOF
10842 rm -f conftest.$ac_objext conftest$ac_exeext
10843 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10844   (eval $ac_link) 2>&5
10845   ac_status=$?
10846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10847   (exit $ac_status); } &&
10848          { ac_try='test -s conftest$ac_exeext'
10849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10850   (eval $ac_try) 2>&5
10851   ac_status=$?
10852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10853   (exit $ac_status); }; }; then
10854   ac_cv_lib_dl_dlopen=yes
10855 else
10856   echo "$as_me: failed program was:" >&5
10857 cat conftest.$ac_ext >&5
10858 ac_cv_lib_dl_dlopen=no
10859 fi
10860 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10861 LIBS=$ac_check_lib_save_LIBS
10862 fi
10863 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10864 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10865 if test $ac_cv_lib_dl_dlopen = yes; then
10866   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
10867 fi
10868
10869
10870     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
10871 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
10872     if test "${ac_cv_pam_strerror_args+set}" = set; then
10873   echo $ECHO_N "(cached) $ECHO_C" >&6
10874 else
10875   cat >conftest.$ac_ext <<_ACEOF
10876 #line $LINENO "configure"
10877 #include "confdefs.h"
10878 #include <stdio.h>
10879                       #include <stdlib.h>
10880                       #include <security/pam_appl.h>
10881 #ifdef F77_DUMMY_MAIN
10882 #  ifdef __cplusplus
10883      extern "C"
10884 #  endif
10885    int F77_DUMMY_MAIN() { return 1; }
10886 #endif
10887 int
10888 main ()
10889 {
10890 pam_handle_t *pamh = 0;
10891                       char *s = pam_strerror(pamh, PAM_SUCCESS);
10892   ;
10893   return 0;
10894 }
10895 _ACEOF
10896 rm -f conftest.$ac_objext
10897 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10898   (eval $ac_compile) 2>&5
10899   ac_status=$?
10900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10901   (exit $ac_status); } &&
10902          { ac_try='test -s conftest.$ac_objext'
10903   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10904   (eval $ac_try) 2>&5
10905   ac_status=$?
10906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10907   (exit $ac_status); }; }; then
10908   ac_pam_strerror_args=2
10909 else
10910   echo "$as_me: failed program was:" >&5
10911 cat conftest.$ac_ext >&5
10912 cat >conftest.$ac_ext <<_ACEOF
10913 #line $LINENO "configure"
10914 #include "confdefs.h"
10915 #include <stdio.h>
10916                                       #include <stdlib.h>
10917                                       #include <security/pam_appl.h>
10918 #ifdef F77_DUMMY_MAIN
10919 #  ifdef __cplusplus
10920      extern "C"
10921 #  endif
10922    int F77_DUMMY_MAIN() { return 1; }
10923 #endif
10924 int
10925 main ()
10926 {
10927 char *s =
10928                                        pam_strerror(PAM_SUCCESS);
10929   ;
10930   return 0;
10931 }
10932 _ACEOF
10933 rm -f conftest.$ac_objext
10934 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10935   (eval $ac_compile) 2>&5
10936   ac_status=$?
10937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10938   (exit $ac_status); } &&
10939          { ac_try='test -s conftest.$ac_objext'
10940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10941   (eval $ac_try) 2>&5
10942   ac_status=$?
10943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10944   (exit $ac_status); }; }; then
10945   ac_pam_strerror_args=1
10946 else
10947   echo "$as_me: failed program was:" >&5
10948 cat conftest.$ac_ext >&5
10949 ac_pam_strerror_args=0
10950 fi
10951 rm -f conftest.$ac_objext conftest.$ac_ext
10952 fi
10953 rm -f conftest.$ac_objext conftest.$ac_ext
10954       ac_cv_pam_strerror_args=$ac_pam_strerror_args
10955 fi
10956
10957     ac_pam_strerror_args=$ac_cv_pam_strerror_args
10958     if test "$ac_pam_strerror_args" = 1 ; then
10959       echo "$as_me:$LINENO: result: one argument" >&5
10960 echo "${ECHO_T}one argument" >&6
10961     elif test "$ac_pam_strerror_args" = 2 ; then
10962       cat >>confdefs.h <<\_ACEOF
10963 #define PAM_STRERROR_TWO_ARGS 1
10964 _ACEOF
10965
10966       echo "$as_me:$LINENO: result: two arguments" >&5
10967 echo "${ECHO_T}two arguments" >&6
10968     else
10969       echo "$as_me:$LINENO: result: unknown" >&5
10970 echo "${ECHO_T}unknown" >&6
10971     fi
10972   fi
10973 fi
10974
10975
10976 ###############################################################################
10977 #
10978 #       Check for Kerberos.
10979 #
10980 ###############################################################################
10981
10982 have_kerberos=no
10983 have_kerberos5=no
10984 with_kerberos_req=unspecified
10985
10986
10987 # Check whether --with-kerberos or --without-kerberos was given.
10988 if test "${with_kerberos+set}" = set; then
10989   withval="$with_kerberos"
10990   with_kerberos="$withval"; with_kerberos_req="$withval"
10991 else
10992   with_kerberos=yes
10993 fi;
10994
10995
10996    case "$with_kerberos" in
10997     yes) ;;
10998     no)  ;;
10999
11000     /*)
11001      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
11002 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
11003      d=$with_kerberos/include
11004      if test -d $d; then
11005        X_CFLAGS="-I$d $X_CFLAGS"
11006        echo "$as_me:$LINENO: result: $d" >&5
11007 echo "${ECHO_T}$d" >&6
11008      else
11009        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11010 echo "${ECHO_T}not found ($d: no such directory)" >&6
11011      fi
11012
11013      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
11014 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
11015      d=$with_kerberos/lib
11016      if test -d $d; then
11017        X_LIBS="-L$d $X_LIBS"
11018        echo "$as_me:$LINENO: result: $d" >&5
11019 echo "${ECHO_T}$d" >&6
11020      else
11021        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11022 echo "${ECHO_T}not found ($d: no such directory)" >&6
11023      fi
11024
11025      # replace the directory string with "yes".
11026      with_kerberos_req="yes"
11027      with_kerberos=$with_kerberos_req
11028      ;;
11029
11030     *)
11031      echo ""
11032      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
11033      echo "       If it is a directory, then \`DIR/include' will be added to"
11034      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11035      exit 1
11036      ;;
11037    esac
11038
11039
11040 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
11041   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
11042 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
11043 if test "${ac_cv_kerberos+set}" = set; then
11044   echo $ECHO_N "(cached) $ECHO_C" >&6
11045 else
11046
11047   ac_save_CPPFLAGS="$CPPFLAGS"
11048   if test \! -z "$includedir" ; then
11049     CPPFLAGS="$CPPFLAGS -I$includedir"
11050   fi
11051   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11052   cat >conftest.$ac_ext <<_ACEOF
11053 #line $LINENO "configure"
11054 #include "confdefs.h"
11055 #include <krb.h>
11056 #ifdef F77_DUMMY_MAIN
11057 #  ifdef __cplusplus
11058      extern "C"
11059 #  endif
11060    int F77_DUMMY_MAIN() { return 1; }
11061 #endif
11062 int
11063 main ()
11064 {
11065
11066   ;
11067   return 0;
11068 }
11069 _ACEOF
11070 rm -f conftest.$ac_objext
11071 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11072   (eval $ac_compile) 2>&5
11073   ac_status=$?
11074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11075   (exit $ac_status); } &&
11076          { ac_try='test -s conftest.$ac_objext'
11077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11078   (eval $ac_try) 2>&5
11079   ac_status=$?
11080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11081   (exit $ac_status); }; }; then
11082   ac_cv_kerberos=yes
11083 else
11084   echo "$as_me: failed program was:" >&5
11085 cat conftest.$ac_ext >&5
11086 ac_cv_kerberos=no
11087 fi
11088 rm -f conftest.$ac_objext conftest.$ac_ext
11089   CPPFLAGS="$ac_save_CPPFLAGS"
11090 fi
11091 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
11092 echo "${ECHO_T}$ac_cv_kerberos" >&6
11093   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
11094 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
11095 if test "${ac_cv_kerberos5+set}" = set; then
11096   echo $ECHO_N "(cached) $ECHO_C" >&6
11097 else
11098
11099   ac_save_CPPFLAGS="$CPPFLAGS"
11100   if test \! -z "$includedir" ; then
11101     CPPFLAGS="$CPPFLAGS -I$includedir"
11102   fi
11103   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11104   cat >conftest.$ac_ext <<_ACEOF
11105 #line $LINENO "configure"
11106 #include "confdefs.h"
11107 #include <kerberosIV/krb.h>
11108 #ifdef F77_DUMMY_MAIN
11109 #  ifdef __cplusplus
11110      extern "C"
11111 #  endif
11112    int F77_DUMMY_MAIN() { return 1; }
11113 #endif
11114 int
11115 main ()
11116 {
11117
11118   ;
11119   return 0;
11120 }
11121 _ACEOF
11122 rm -f conftest.$ac_objext
11123 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11124   (eval $ac_compile) 2>&5
11125   ac_status=$?
11126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11127   (exit $ac_status); } &&
11128          { ac_try='test -s conftest.$ac_objext'
11129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11130   (eval $ac_try) 2>&5
11131   ac_status=$?
11132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11133   (exit $ac_status); }; }; then
11134   ac_cv_kerberos5=yes
11135 else
11136   echo "$as_me: failed program was:" >&5
11137 cat conftest.$ac_ext >&5
11138 ac_cv_kerberos5=no
11139 fi
11140 rm -f conftest.$ac_objext conftest.$ac_ext
11141   CPPFLAGS="$ac_save_CPPFLAGS"
11142 fi
11143 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
11144 echo "${ECHO_T}$ac_cv_kerberos5" >&6
11145
11146   if test "$ac_cv_kerberos" = yes ; then
11147     have_kerberos=yes
11148     cat >>confdefs.h <<\_ACEOF
11149 #define HAVE_KERBEROS 1
11150 _ACEOF
11151
11152   fi
11153
11154   if test "$ac_cv_kerberos5" = yes ; then
11155
11156     # Andrew Snare <ajs@pigpond.com> wrote:
11157     #
11158     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
11159     # (krb4) was also available.  This turns out not to be the case with
11160     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
11161     # is optional.
11162     #
11163     # So, disable kerberosV support if libkrb4 can't be found.
11164     # This is not the best solution, but it makes the compile not fail.
11165     #
11166
11167   ac_save_CPPFLAGS="$CPPFLAGS"
11168   ac_save_LDFLAGS="$LDFLAGS"
11169 #  ac_save_LIBS="$LIBS"
11170
11171   if test \! -z "$includedir" ; then
11172     CPPFLAGS="$CPPFLAGS -I$includedir"
11173   fi
11174   # note: $X_CFLAGS includes $x_includes
11175   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11176
11177   if test \! -z "$libdir" ; then
11178     LDFLAGS="$LDFLAGS -L$libdir"
11179   fi
11180   # note: $X_LIBS includes $x_libraries
11181   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11182
11183   echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
11184 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6
11185 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
11186   echo $ECHO_N "(cached) $ECHO_C" >&6
11187 else
11188   ac_check_lib_save_LIBS=$LIBS
11189 LIBS="-lkrb4  $LIBS"
11190 cat >conftest.$ac_ext <<_ACEOF
11191 #line $LINENO "configure"
11192 #include "confdefs.h"
11193
11194 /* Override any gcc2 internal prototype to avoid an error.  */
11195 #ifdef __cplusplus
11196 extern "C"
11197 #endif
11198 /* We use char because int might match the return type of a gcc2
11199    builtin and then its argument prototype would still apply.  */
11200 char krb_get_tf_realm ();
11201 #ifdef F77_DUMMY_MAIN
11202 #  ifdef __cplusplus
11203      extern "C"
11204 #  endif
11205    int F77_DUMMY_MAIN() { return 1; }
11206 #endif
11207 int
11208 main ()
11209 {
11210 krb_get_tf_realm ();
11211   ;
11212   return 0;
11213 }
11214 _ACEOF
11215 rm -f conftest.$ac_objext conftest$ac_exeext
11216 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11217   (eval $ac_link) 2>&5
11218   ac_status=$?
11219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11220   (exit $ac_status); } &&
11221          { ac_try='test -s conftest$ac_exeext'
11222   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11223   (eval $ac_try) 2>&5
11224   ac_status=$?
11225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11226   (exit $ac_status); }; }; then
11227   ac_cv_lib_krb4_krb_get_tf_realm=yes
11228 else
11229   echo "$as_me: failed program was:" >&5
11230 cat conftest.$ac_ext >&5
11231 ac_cv_lib_krb4_krb_get_tf_realm=no
11232 fi
11233 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11234 LIBS=$ac_check_lib_save_LIBS
11235 fi
11236 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
11237 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6
11238 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
11239   have_kerberos=yes
11240 else
11241   have_kerberos=no
11242 fi
11243
11244   CPPFLAGS="$ac_save_CPPFLAGS"
11245   LDFLAGS="$ac_save_LDFLAGS"
11246 #  LIBS="$ac_save_LIBS"
11247
11248     if test "$have_kerberos" = yes ; then
11249       have_kerberos5=yes
11250       cat >>confdefs.h <<\_ACEOF
11251 #define HAVE_KERBEROS 1
11252 _ACEOF
11253
11254       cat >>confdefs.h <<\_ACEOF
11255 #define HAVE_KERBEROS5 1
11256 _ACEOF
11257
11258     else
11259       have_kerberos5=no
11260       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
11261 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
11262     fi
11263
11264   fi
11265
11266   if test "$have_kerberos5" = yes ; then
11267     # from Matt Knopp <mhat@infocalypse.netlag.com>
11268     # (who got it from amu@mit.edu)
11269
11270     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
11271
11272     # jwz: MacOS X uses -lkrb5, but not -lcrypt
11273
11274   ac_save_CPPFLAGS="$CPPFLAGS"
11275   ac_save_LDFLAGS="$LDFLAGS"
11276 #  ac_save_LIBS="$LIBS"
11277
11278   if test \! -z "$includedir" ; then
11279     CPPFLAGS="$CPPFLAGS -I$includedir"
11280   fi
11281   # note: $X_CFLAGS includes $x_includes
11282   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11283
11284   if test \! -z "$libdir" ; then
11285     LDFLAGS="$LDFLAGS -L$libdir"
11286   fi
11287   # note: $X_LIBS includes $x_libraries
11288   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11289
11290   echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
11291 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
11292 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
11293   echo $ECHO_N "(cached) $ECHO_C" >&6
11294 else
11295   ac_check_lib_save_LIBS=$LIBS
11296 LIBS="-lcrypt  $LIBS"
11297 cat >conftest.$ac_ext <<_ACEOF
11298 #line $LINENO "configure"
11299 #include "confdefs.h"
11300
11301 /* Override any gcc2 internal prototype to avoid an error.  */
11302 #ifdef __cplusplus
11303 extern "C"
11304 #endif
11305 /* We use char because int might match the return type of a gcc2
11306    builtin and then its argument prototype would still apply.  */
11307 char crypt ();
11308 #ifdef F77_DUMMY_MAIN
11309 #  ifdef __cplusplus
11310      extern "C"
11311 #  endif
11312    int F77_DUMMY_MAIN() { return 1; }
11313 #endif
11314 int
11315 main ()
11316 {
11317 crypt ();
11318   ;
11319   return 0;
11320 }
11321 _ACEOF
11322 rm -f conftest.$ac_objext conftest$ac_exeext
11323 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11324   (eval $ac_link) 2>&5
11325   ac_status=$?
11326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11327   (exit $ac_status); } &&
11328          { ac_try='test -s conftest$ac_exeext'
11329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11330   (eval $ac_try) 2>&5
11331   ac_status=$?
11332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11333   (exit $ac_status); }; }; then
11334   ac_cv_lib_crypt_crypt=yes
11335 else
11336   echo "$as_me: failed program was:" >&5
11337 cat conftest.$ac_ext >&5
11338 ac_cv_lib_crypt_crypt=no
11339 fi
11340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11341 LIBS=$ac_check_lib_save_LIBS
11342 fi
11343 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
11344 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
11345 if test $ac_cv_lib_crypt_crypt = yes; then
11346   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11347 fi
11348
11349   CPPFLAGS="$ac_save_CPPFLAGS"
11350   LDFLAGS="$ac_save_LDFLAGS"
11351 #  LIBS="$ac_save_LIBS"
11352
11353
11354   elif test "$have_kerberos" = yes ; then
11355     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
11356     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
11357   fi
11358
11359   if test "$have_kerberos" = yes ; then
11360     echo "$as_me:$LINENO: checking for res_search" >&5
11361 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
11362 if test "${ac_cv_func_res_search+set}" = set; then
11363   echo $ECHO_N "(cached) $ECHO_C" >&6
11364 else
11365   cat >conftest.$ac_ext <<_ACEOF
11366 #line $LINENO "configure"
11367 #include "confdefs.h"
11368 /* System header to define __stub macros and hopefully few prototypes,
11369     which can conflict with char res_search (); below.  */
11370 #include <assert.h>
11371 /* Override any gcc2 internal prototype to avoid an error.  */
11372 #ifdef __cplusplus
11373 extern "C"
11374 #endif
11375 /* We use char because int might match the return type of a gcc2
11376    builtin and then its argument prototype would still apply.  */
11377 char res_search ();
11378 char (*f) ();
11379
11380 #ifdef F77_DUMMY_MAIN
11381 #  ifdef __cplusplus
11382      extern "C"
11383 #  endif
11384    int F77_DUMMY_MAIN() { return 1; }
11385 #endif
11386 int
11387 main ()
11388 {
11389 /* The GNU C library defines this for functions which it implements
11390     to always fail with ENOSYS.  Some functions are actually named
11391     something starting with __ and the normal name is an alias.  */
11392 #if defined (__stub_res_search) || defined (__stub___res_search)
11393 choke me
11394 #else
11395 f = res_search;
11396 #endif
11397
11398   ;
11399   return 0;
11400 }
11401 _ACEOF
11402 rm -f conftest.$ac_objext conftest$ac_exeext
11403 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11404   (eval $ac_link) 2>&5
11405   ac_status=$?
11406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11407   (exit $ac_status); } &&
11408          { ac_try='test -s conftest$ac_exeext'
11409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11410   (eval $ac_try) 2>&5
11411   ac_status=$?
11412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11413   (exit $ac_status); }; }; then
11414   ac_cv_func_res_search=yes
11415 else
11416   echo "$as_me: failed program was:" >&5
11417 cat conftest.$ac_ext >&5
11418 ac_cv_func_res_search=no
11419 fi
11420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11421 fi
11422 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
11423 echo "${ECHO_T}$ac_cv_func_res_search" >&6
11424 if test $ac_cv_func_res_search = yes; then
11425   :
11426 else
11427   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
11428 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
11429 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
11430   echo $ECHO_N "(cached) $ECHO_C" >&6
11431 else
11432   ac_check_lib_save_LIBS=$LIBS
11433 LIBS="-lresolv  $LIBS"
11434 cat >conftest.$ac_ext <<_ACEOF
11435 #line $LINENO "configure"
11436 #include "confdefs.h"
11437
11438 /* Override any gcc2 internal prototype to avoid an error.  */
11439 #ifdef __cplusplus
11440 extern "C"
11441 #endif
11442 /* We use char because int might match the return type of a gcc2
11443    builtin and then its argument prototype would still apply.  */
11444 char res_search ();
11445 #ifdef F77_DUMMY_MAIN
11446 #  ifdef __cplusplus
11447      extern "C"
11448 #  endif
11449    int F77_DUMMY_MAIN() { return 1; }
11450 #endif
11451 int
11452 main ()
11453 {
11454 res_search ();
11455   ;
11456   return 0;
11457 }
11458 _ACEOF
11459 rm -f conftest.$ac_objext conftest$ac_exeext
11460 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11461   (eval $ac_link) 2>&5
11462   ac_status=$?
11463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11464   (exit $ac_status); } &&
11465          { ac_try='test -s conftest$ac_exeext'
11466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11467   (eval $ac_try) 2>&5
11468   ac_status=$?
11469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11470   (exit $ac_status); }; }; then
11471   ac_cv_lib_resolv_res_search=yes
11472 else
11473   echo "$as_me: failed program was:" >&5
11474 cat conftest.$ac_ext >&5
11475 ac_cv_lib_resolv_res_search=no
11476 fi
11477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11478 LIBS=$ac_check_lib_save_LIBS
11479 fi
11480 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
11481 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
11482 if test $ac_cv_lib_resolv_res_search = yes; then
11483   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
11484 else
11485   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
11486 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
11487
11488 fi
11489
11490 fi
11491
11492   fi
11493 fi
11494
11495
11496 ###############################################################################
11497 #
11498 #       Check for the nine billion variants of shadow passwords...
11499 #
11500 ###############################################################################
11501
11502 need_setuid=no
11503
11504 have_shadow=no
11505 with_shadow_req=unspecified
11506
11507
11508 # Check whether --with-shadow or --without-shadow was given.
11509 if test "${with_shadow+set}" = set; then
11510   withval="$with_shadow"
11511   with_shadow="$withval"; with_shadow_req="$withval"
11512 else
11513   with_shadow=yes
11514 fi;
11515
11516
11517    case "$with_shadow" in
11518     yes) ;;
11519     no)  ;;
11520
11521     /*)
11522      echo "$as_me:$LINENO: checking for shadow password headers" >&5
11523 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
11524      d=$with_shadow/include
11525      if test -d $d; then
11526        X_CFLAGS="-I$d $X_CFLAGS"
11527        echo "$as_me:$LINENO: result: $d" >&5
11528 echo "${ECHO_T}$d" >&6
11529      else
11530        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11531 echo "${ECHO_T}not found ($d: no such directory)" >&6
11532      fi
11533
11534      echo "$as_me:$LINENO: checking for shadow password libs" >&5
11535 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
11536      d=$with_shadow/lib
11537      if test -d $d; then
11538        X_LIBS="-L$d $X_LIBS"
11539        echo "$as_me:$LINENO: result: $d" >&5
11540 echo "${ECHO_T}$d" >&6
11541      else
11542        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11543 echo "${ECHO_T}not found ($d: no such directory)" >&6
11544      fi
11545
11546      # replace the directory string with "yes".
11547      with_shadow_req="yes"
11548      with_shadow=$with_shadow_req
11549      ;;
11550
11551     *)
11552      echo ""
11553      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
11554      echo "       If it is a directory, then \`DIR/include' will be added to"
11555      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11556      exit 1
11557      ;;
11558    esac
11559
11560
11561 if test "$enable_locking" = no ; then
11562   with_shadow_req=no
11563   with_shadow=no
11564 fi
11565
11566
11567 ###############################################################################
11568 #
11569 #       Check for Sun "adjunct" passwords.
11570 #
11571 ###############################################################################
11572
11573 if test "$with_shadow" = yes ; then
11574   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
11575 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
11576 if test "${ac_cv_sun_adjunct+set}" = set; then
11577   echo $ECHO_N "(cached) $ECHO_C" >&6
11578 else
11579
11580   ac_save_CPPFLAGS="$CPPFLAGS"
11581   if test \! -z "$includedir" ; then
11582     CPPFLAGS="$CPPFLAGS -I$includedir"
11583   fi
11584   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11585   cat >conftest.$ac_ext <<_ACEOF
11586 #line $LINENO "configure"
11587 #include "confdefs.h"
11588 #include <stdlib.h>
11589                                     #include <unistd.h>
11590                                     #include <sys/types.h>
11591                                     #include <sys/label.h>
11592                                     #include <sys/audit.h>
11593                                     #include <pwdadj.h>
11594 #ifdef F77_DUMMY_MAIN
11595 #  ifdef __cplusplus
11596      extern "C"
11597 #  endif
11598    int F77_DUMMY_MAIN() { return 1; }
11599 #endif
11600 int
11601 main ()
11602 {
11603 struct passwd_adjunct *p = getpwanam("nobody");
11604                        const char *pw = p->pwa_passwd;
11605   ;
11606   return 0;
11607 }
11608 _ACEOF
11609 rm -f conftest.$ac_objext
11610 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11611   (eval $ac_compile) 2>&5
11612   ac_status=$?
11613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11614   (exit $ac_status); } &&
11615          { ac_try='test -s conftest.$ac_objext'
11616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11617   (eval $ac_try) 2>&5
11618   ac_status=$?
11619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11620   (exit $ac_status); }; }; then
11621   ac_cv_sun_adjunct=yes
11622 else
11623   echo "$as_me: failed program was:" >&5
11624 cat conftest.$ac_ext >&5
11625 ac_cv_sun_adjunct=no
11626 fi
11627 rm -f conftest.$ac_objext conftest.$ac_ext
11628   CPPFLAGS="$ac_save_CPPFLAGS"
11629 fi
11630 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
11631 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
11632   if test "$ac_cv_sun_adjunct" = yes; then
11633     have_shadow_adjunct=yes
11634     have_shadow=yes
11635     need_setuid=yes
11636   fi
11637 fi
11638
11639
11640 ###############################################################################
11641 #
11642 #       Check for DEC and SCO so-called "enhanced" security.
11643 #
11644 ###############################################################################
11645
11646 if test "$with_shadow" = yes ; then
11647   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
11648 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
11649 if test "${ac_cv_enhanced_passwd+set}" = set; then
11650   echo $ECHO_N "(cached) $ECHO_C" >&6
11651 else
11652
11653   ac_save_CPPFLAGS="$CPPFLAGS"
11654   if test \! -z "$includedir" ; then
11655     CPPFLAGS="$CPPFLAGS -I$includedir"
11656   fi
11657   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11658   cat >conftest.$ac_ext <<_ACEOF
11659 #line $LINENO "configure"
11660 #include "confdefs.h"
11661 #include <stdlib.h>
11662                                     #include <unistd.h>
11663                                     #include <sys/types.h>
11664                                     #include <pwd.h>
11665                                     #include <sys/security.h>
11666                                     #include <prot.h>
11667 #ifdef F77_DUMMY_MAIN
11668 #  ifdef __cplusplus
11669      extern "C"
11670 #  endif
11671    int F77_DUMMY_MAIN() { return 1; }
11672 #endif
11673 int
11674 main ()
11675 {
11676 struct pr_passwd *p;
11677                        const char *pw;
11678                        set_auth_parameters(0, 0);
11679                        check_auth_parameters();
11680                        p = getprpwnam("nobody");
11681                        pw = p->ufld.fd_encrypt;
11682   ;
11683   return 0;
11684 }
11685 _ACEOF
11686 rm -f conftest.$ac_objext
11687 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11688   (eval $ac_compile) 2>&5
11689   ac_status=$?
11690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11691   (exit $ac_status); } &&
11692          { ac_try='test -s conftest.$ac_objext'
11693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11694   (eval $ac_try) 2>&5
11695   ac_status=$?
11696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11697   (exit $ac_status); }; }; then
11698   ac_cv_enhanced_passwd=yes
11699 else
11700   echo "$as_me: failed program was:" >&5
11701 cat conftest.$ac_ext >&5
11702 ac_cv_enhanced_passwd=no
11703 fi
11704 rm -f conftest.$ac_objext conftest.$ac_ext
11705   CPPFLAGS="$ac_save_CPPFLAGS"
11706 fi
11707 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
11708 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
11709   if test $ac_cv_enhanced_passwd = yes; then
11710     have_shadow_enhanced=yes
11711     have_shadow=yes
11712     need_setuid=yes
11713
11714     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
11715     # (I'm told it needs -lcurses too, but I don't understand why.)
11716     # But on DEC, it's in -lsecurity.
11717     #
11718     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
11719 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
11720 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
11721   echo $ECHO_N "(cached) $ECHO_C" >&6
11722 else
11723   ac_check_lib_save_LIBS=$LIBS
11724 LIBS="-lprot -lx $LIBS"
11725 cat >conftest.$ac_ext <<_ACEOF
11726 #line $LINENO "configure"
11727 #include "confdefs.h"
11728
11729 /* Override any gcc2 internal prototype to avoid an error.  */
11730 #ifdef __cplusplus
11731 extern "C"
11732 #endif
11733 /* We use char because int might match the return type of a gcc2
11734    builtin and then its argument prototype would still apply.  */
11735 char getprpwnam ();
11736 #ifdef F77_DUMMY_MAIN
11737 #  ifdef __cplusplus
11738      extern "C"
11739 #  endif
11740    int F77_DUMMY_MAIN() { return 1; }
11741 #endif
11742 int
11743 main ()
11744 {
11745 getprpwnam ();
11746   ;
11747   return 0;
11748 }
11749 _ACEOF
11750 rm -f conftest.$ac_objext conftest$ac_exeext
11751 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11752   (eval $ac_link) 2>&5
11753   ac_status=$?
11754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11755   (exit $ac_status); } &&
11756          { ac_try='test -s conftest$ac_exeext'
11757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11758   (eval $ac_try) 2>&5
11759   ac_status=$?
11760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11761   (exit $ac_status); }; }; then
11762   ac_cv_lib_prot_getprpwnam=yes
11763 else
11764   echo "$as_me: failed program was:" >&5
11765 cat conftest.$ac_ext >&5
11766 ac_cv_lib_prot_getprpwnam=no
11767 fi
11768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11769 LIBS=$ac_check_lib_save_LIBS
11770 fi
11771 echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
11772 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
11773 if test $ac_cv_lib_prot_getprpwnam = yes; then
11774   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
11775 else
11776   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
11777 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
11778 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
11779   echo $ECHO_N "(cached) $ECHO_C" >&6
11780 else
11781   ac_check_lib_save_LIBS=$LIBS
11782 LIBS="-lsecurity  $LIBS"
11783 cat >conftest.$ac_ext <<_ACEOF
11784 #line $LINENO "configure"
11785 #include "confdefs.h"
11786
11787 /* Override any gcc2 internal prototype to avoid an error.  */
11788 #ifdef __cplusplus
11789 extern "C"
11790 #endif
11791 /* We use char because int might match the return type of a gcc2
11792    builtin and then its argument prototype would still apply.  */
11793 char getprpwnam ();
11794 #ifdef F77_DUMMY_MAIN
11795 #  ifdef __cplusplus
11796      extern "C"
11797 #  endif
11798    int F77_DUMMY_MAIN() { return 1; }
11799 #endif
11800 int
11801 main ()
11802 {
11803 getprpwnam ();
11804   ;
11805   return 0;
11806 }
11807 _ACEOF
11808 rm -f conftest.$ac_objext conftest$ac_exeext
11809 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11810   (eval $ac_link) 2>&5
11811   ac_status=$?
11812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11813   (exit $ac_status); } &&
11814          { ac_try='test -s conftest$ac_exeext'
11815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11816   (eval $ac_try) 2>&5
11817   ac_status=$?
11818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11819   (exit $ac_status); }; }; then
11820   ac_cv_lib_security_getprpwnam=yes
11821 else
11822   echo "$as_me: failed program was:" >&5
11823 cat conftest.$ac_ext >&5
11824 ac_cv_lib_security_getprpwnam=no
11825 fi
11826 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11827 LIBS=$ac_check_lib_save_LIBS
11828 fi
11829 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
11830 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
11831 if test $ac_cv_lib_security_getprpwnam = yes; then
11832   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
11833 fi
11834
11835 fi
11836
11837   fi
11838 fi
11839
11840 ###############################################################################
11841 #
11842 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
11843 #
11844 ###############################################################################
11845
11846 if test "$with_shadow" = yes ; then
11847   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
11848 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
11849 if test "${ac_cv_hpux_passwd+set}" = set; then
11850   echo $ECHO_N "(cached) $ECHO_C" >&6
11851 else
11852
11853   ac_save_CPPFLAGS="$CPPFLAGS"
11854   if test \! -z "$includedir" ; then
11855     CPPFLAGS="$CPPFLAGS -I$includedir"
11856   fi
11857   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11858   cat >conftest.$ac_ext <<_ACEOF
11859 #line $LINENO "configure"
11860 #include "confdefs.h"
11861 #include <stdlib.h>
11862                                     #include <unistd.h>
11863                                     #include <sys/types.h>
11864                                     #include <pwd.h>
11865                                     #include <hpsecurity.h>
11866                                     #include <prot.h>
11867 #ifdef F77_DUMMY_MAIN
11868 #  ifdef __cplusplus
11869      extern "C"
11870 #  endif
11871    int F77_DUMMY_MAIN() { return 1; }
11872 #endif
11873 int
11874 main ()
11875 {
11876 struct s_passwd *p = getspwnam("nobody");
11877                        const char *pw = p->pw_passwd;
11878   ;
11879   return 0;
11880 }
11881 _ACEOF
11882 rm -f conftest.$ac_objext
11883 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11884   (eval $ac_compile) 2>&5
11885   ac_status=$?
11886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11887   (exit $ac_status); } &&
11888          { ac_try='test -s conftest.$ac_objext'
11889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11890   (eval $ac_try) 2>&5
11891   ac_status=$?
11892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11893   (exit $ac_status); }; }; then
11894   ac_cv_hpux_passwd=yes
11895 else
11896   echo "$as_me: failed program was:" >&5
11897 cat conftest.$ac_ext >&5
11898 ac_cv_hpux_passwd=no
11899 fi
11900 rm -f conftest.$ac_objext conftest.$ac_ext
11901   CPPFLAGS="$ac_save_CPPFLAGS"
11902 fi
11903 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
11904 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
11905   if test "$ac_cv_hpux_passwd" = yes; then
11906     have_shadow_hpux=yes
11907     have_shadow=yes
11908     need_setuid=yes
11909
11910     # on HPUX, bigcrypt is in -lsec
11911     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
11912 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
11913 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
11914   echo $ECHO_N "(cached) $ECHO_C" >&6
11915 else
11916   ac_check_lib_save_LIBS=$LIBS
11917 LIBS="-lsec  $LIBS"
11918 cat >conftest.$ac_ext <<_ACEOF
11919 #line $LINENO "configure"
11920 #include "confdefs.h"
11921
11922 /* Override any gcc2 internal prototype to avoid an error.  */
11923 #ifdef __cplusplus
11924 extern "C"
11925 #endif
11926 /* We use char because int might match the return type of a gcc2
11927    builtin and then its argument prototype would still apply.  */
11928 char bigcrypt ();
11929 #ifdef F77_DUMMY_MAIN
11930 #  ifdef __cplusplus
11931      extern "C"
11932 #  endif
11933    int F77_DUMMY_MAIN() { return 1; }
11934 #endif
11935 int
11936 main ()
11937 {
11938 bigcrypt ();
11939   ;
11940   return 0;
11941 }
11942 _ACEOF
11943 rm -f conftest.$ac_objext conftest$ac_exeext
11944 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11945   (eval $ac_link) 2>&5
11946   ac_status=$?
11947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11948   (exit $ac_status); } &&
11949          { ac_try='test -s conftest$ac_exeext'
11950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11951   (eval $ac_try) 2>&5
11952   ac_status=$?
11953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11954   (exit $ac_status); }; }; then
11955   ac_cv_lib_sec_bigcrypt=yes
11956 else
11957   echo "$as_me: failed program was:" >&5
11958 cat conftest.$ac_ext >&5
11959 ac_cv_lib_sec_bigcrypt=no
11960 fi
11961 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11962 LIBS=$ac_check_lib_save_LIBS
11963 fi
11964 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
11965 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
11966 if test $ac_cv_lib_sec_bigcrypt = yes; then
11967   PASSWD_LIBS="$PASSWD_LIBS -lsec"
11968 fi
11969
11970   fi
11971 fi
11972
11973
11974 ###############################################################################
11975 #
11976 #       Check for FreeBSD-style shadow passwords.
11977 #
11978 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
11979 #       password systems -- except you only get stuff in the pw_passwd field
11980 #       if the running program is setuid.  So, guess that we've got this
11981 #       lossage to contend with if /etc/master.passwd exists, and default to
11982 #       a setuid installation.
11983 #
11984 ###############################################################################
11985
11986 if test "$with_shadow" = yes ; then
11987   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
11988 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
11989 if test "${ac_cv_master_passwd+set}" = set; then
11990   echo $ECHO_N "(cached) $ECHO_C" >&6
11991 else
11992   if test -f /etc/master.passwd ; then
11993                     ac_cv_master_passwd=yes
11994                   else
11995                     ac_cv_master_passwd=no
11996                   fi
11997 fi
11998 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
11999 echo "${ECHO_T}$ac_cv_master_passwd" >&6
12000   if test "$ac_cv_master_passwd" = yes; then
12001     need_setuid=yes
12002   fi
12003 fi
12004
12005
12006 ###############################################################################
12007 #
12008 #       Check for traditional (ha!) shadow passwords.
12009 #
12010 ###############################################################################
12011
12012 if test "$with_shadow" = yes ; then
12013   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
12014 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
12015 if test "${ac_cv_shadow+set}" = set; then
12016   echo $ECHO_N "(cached) $ECHO_C" >&6
12017 else
12018
12019   ac_save_CPPFLAGS="$CPPFLAGS"
12020   if test \! -z "$includedir" ; then
12021     CPPFLAGS="$CPPFLAGS -I$includedir"
12022   fi
12023   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12024   cat >conftest.$ac_ext <<_ACEOF
12025 #line $LINENO "configure"
12026 #include "confdefs.h"
12027 #include <stdlib.h>
12028                                     #include <unistd.h>
12029                                     #include <sys/types.h>
12030                                     #include <pwd.h>
12031                                     #include <shadow.h>
12032 #ifdef F77_DUMMY_MAIN
12033 #  ifdef __cplusplus
12034      extern "C"
12035 #  endif
12036    int F77_DUMMY_MAIN() { return 1; }
12037 #endif
12038 int
12039 main ()
12040 {
12041 struct spwd *p = getspnam("nobody");
12042                        const char *pw = p->sp_pwdp;
12043   ;
12044   return 0;
12045 }
12046 _ACEOF
12047 rm -f conftest.$ac_objext
12048 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12049   (eval $ac_compile) 2>&5
12050   ac_status=$?
12051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12052   (exit $ac_status); } &&
12053          { ac_try='test -s conftest.$ac_objext'
12054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12055   (eval $ac_try) 2>&5
12056   ac_status=$?
12057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12058   (exit $ac_status); }; }; then
12059   ac_cv_shadow=yes
12060 else
12061   echo "$as_me: failed program was:" >&5
12062 cat conftest.$ac_ext >&5
12063 ac_cv_shadow=no
12064 fi
12065 rm -f conftest.$ac_objext conftest.$ac_ext
12066   CPPFLAGS="$ac_save_CPPFLAGS"
12067 fi
12068 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
12069 echo "${ECHO_T}$ac_cv_shadow" >&6
12070   if test "$ac_cv_shadow" = yes; then
12071     have_shadow=yes
12072     need_setuid=yes
12073
12074     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
12075     have_getspnam=no
12076     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
12077 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
12078 if test "${ac_cv_lib_c_getspnam+set}" = set; then
12079   echo $ECHO_N "(cached) $ECHO_C" >&6
12080 else
12081   ac_check_lib_save_LIBS=$LIBS
12082 LIBS="-lc  $LIBS"
12083 cat >conftest.$ac_ext <<_ACEOF
12084 #line $LINENO "configure"
12085 #include "confdefs.h"
12086
12087 /* Override any gcc2 internal prototype to avoid an error.  */
12088 #ifdef __cplusplus
12089 extern "C"
12090 #endif
12091 /* We use char because int might match the return type of a gcc2
12092    builtin and then its argument prototype would still apply.  */
12093 char getspnam ();
12094 #ifdef F77_DUMMY_MAIN
12095 #  ifdef __cplusplus
12096      extern "C"
12097 #  endif
12098    int F77_DUMMY_MAIN() { return 1; }
12099 #endif
12100 int
12101 main ()
12102 {
12103 getspnam ();
12104   ;
12105   return 0;
12106 }
12107 _ACEOF
12108 rm -f conftest.$ac_objext conftest$ac_exeext
12109 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12110   (eval $ac_link) 2>&5
12111   ac_status=$?
12112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12113   (exit $ac_status); } &&
12114          { ac_try='test -s conftest$ac_exeext'
12115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12116   (eval $ac_try) 2>&5
12117   ac_status=$?
12118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12119   (exit $ac_status); }; }; then
12120   ac_cv_lib_c_getspnam=yes
12121 else
12122   echo "$as_me: failed program was:" >&5
12123 cat conftest.$ac_ext >&5
12124 ac_cv_lib_c_getspnam=no
12125 fi
12126 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12127 LIBS=$ac_check_lib_save_LIBS
12128 fi
12129 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
12130 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
12131 if test $ac_cv_lib_c_getspnam = yes; then
12132   have_getspnam=yes
12133 fi
12134
12135     if test "$have_getspnam" = no ; then
12136       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
12137 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
12138 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
12139   echo $ECHO_N "(cached) $ECHO_C" >&6
12140 else
12141   ac_check_lib_save_LIBS=$LIBS
12142 LIBS="-lgen  $LIBS"
12143 cat >conftest.$ac_ext <<_ACEOF
12144 #line $LINENO "configure"
12145 #include "confdefs.h"
12146
12147 /* Override any gcc2 internal prototype to avoid an error.  */
12148 #ifdef __cplusplus
12149 extern "C"
12150 #endif
12151 /* We use char because int might match the return type of a gcc2
12152    builtin and then its argument prototype would still apply.  */
12153 char getspnam ();
12154 #ifdef F77_DUMMY_MAIN
12155 #  ifdef __cplusplus
12156      extern "C"
12157 #  endif
12158    int F77_DUMMY_MAIN() { return 1; }
12159 #endif
12160 int
12161 main ()
12162 {
12163 getspnam ();
12164   ;
12165   return 0;
12166 }
12167 _ACEOF
12168 rm -f conftest.$ac_objext conftest$ac_exeext
12169 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12170   (eval $ac_link) 2>&5
12171   ac_status=$?
12172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12173   (exit $ac_status); } &&
12174          { ac_try='test -s conftest$ac_exeext'
12175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12176   (eval $ac_try) 2>&5
12177   ac_status=$?
12178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12179   (exit $ac_status); }; }; then
12180   ac_cv_lib_gen_getspnam=yes
12181 else
12182   echo "$as_me: failed program was:" >&5
12183 cat conftest.$ac_ext >&5
12184 ac_cv_lib_gen_getspnam=no
12185 fi
12186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12187 LIBS=$ac_check_lib_save_LIBS
12188 fi
12189 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
12190 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
12191 if test $ac_cv_lib_gen_getspnam = yes; then
12192   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
12193 fi
12194
12195     fi
12196   fi
12197 fi
12198
12199
12200 ###############################################################################
12201 #
12202 #       Check for other libraries needed for non-shadow passwords.
12203 #
12204 ###############################################################################
12205
12206 if test "$enable_locking" = yes ; then
12207
12208   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
12209   have_crypt=no
12210   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
12211 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
12212 if test "${ac_cv_lib_c_crypt+set}" = set; then
12213   echo $ECHO_N "(cached) $ECHO_C" >&6
12214 else
12215   ac_check_lib_save_LIBS=$LIBS
12216 LIBS="-lc  $LIBS"
12217 cat >conftest.$ac_ext <<_ACEOF
12218 #line $LINENO "configure"
12219 #include "confdefs.h"
12220
12221 /* Override any gcc2 internal prototype to avoid an error.  */
12222 #ifdef __cplusplus
12223 extern "C"
12224 #endif
12225 /* We use char because int might match the return type of a gcc2
12226    builtin and then its argument prototype would still apply.  */
12227 char crypt ();
12228 #ifdef F77_DUMMY_MAIN
12229 #  ifdef __cplusplus
12230      extern "C"
12231 #  endif
12232    int F77_DUMMY_MAIN() { return 1; }
12233 #endif
12234 int
12235 main ()
12236 {
12237 crypt ();
12238   ;
12239   return 0;
12240 }
12241 _ACEOF
12242 rm -f conftest.$ac_objext conftest$ac_exeext
12243 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12244   (eval $ac_link) 2>&5
12245   ac_status=$?
12246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12247   (exit $ac_status); } &&
12248          { ac_try='test -s conftest$ac_exeext'
12249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12250   (eval $ac_try) 2>&5
12251   ac_status=$?
12252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12253   (exit $ac_status); }; }; then
12254   ac_cv_lib_c_crypt=yes
12255 else
12256   echo "$as_me: failed program was:" >&5
12257 cat conftest.$ac_ext >&5
12258 ac_cv_lib_c_crypt=no
12259 fi
12260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12261 LIBS=$ac_check_lib_save_LIBS
12262 fi
12263 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
12264 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
12265 if test $ac_cv_lib_c_crypt = yes; then
12266   have_crypt=yes
12267 fi
12268
12269   if test "$have_crypt" = no ; then
12270     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
12271 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
12272 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
12273   echo $ECHO_N "(cached) $ECHO_C" >&6
12274 else
12275   ac_check_lib_save_LIBS=$LIBS
12276 LIBS="-lcrypt  $LIBS"
12277 cat >conftest.$ac_ext <<_ACEOF
12278 #line $LINENO "configure"
12279 #include "confdefs.h"
12280
12281 /* Override any gcc2 internal prototype to avoid an error.  */
12282 #ifdef __cplusplus
12283 extern "C"
12284 #endif
12285 /* We use char because int might match the return type of a gcc2
12286    builtin and then its argument prototype would still apply.  */
12287 char crypt ();
12288 #ifdef F77_DUMMY_MAIN
12289 #  ifdef __cplusplus
12290      extern "C"
12291 #  endif
12292    int F77_DUMMY_MAIN() { return 1; }
12293 #endif
12294 int
12295 main ()
12296 {
12297 crypt ();
12298   ;
12299   return 0;
12300 }
12301 _ACEOF
12302 rm -f conftest.$ac_objext conftest$ac_exeext
12303 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12304   (eval $ac_link) 2>&5
12305   ac_status=$?
12306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12307   (exit $ac_status); } &&
12308          { ac_try='test -s conftest$ac_exeext'
12309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12310   (eval $ac_try) 2>&5
12311   ac_status=$?
12312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12313   (exit $ac_status); }; }; then
12314   ac_cv_lib_crypt_crypt=yes
12315 else
12316   echo "$as_me: failed program was:" >&5
12317 cat conftest.$ac_ext >&5
12318 ac_cv_lib_crypt_crypt=no
12319 fi
12320 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12321 LIBS=$ac_check_lib_save_LIBS
12322 fi
12323 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
12324 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
12325 if test $ac_cv_lib_crypt_crypt = yes; then
12326   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
12327 fi
12328
12329   fi
12330 fi
12331
12332
12333 # Most of the above shadow mechanisms will have set need_setuid to yes,
12334 # if they were found.  But, on some systems, we need setuid even when
12335 # using plain old vanilla passwords.
12336 #
12337 if test "$enable_locking" = yes ; then
12338   case "$host" in
12339     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
12340       need_setuid=yes
12341     ;;
12342   esac
12343 fi
12344
12345
12346 if test "$have_shadow_adjunct" = yes ; then
12347   cat >>confdefs.h <<\_ACEOF
12348 #define HAVE_ADJUNCT_PASSWD 1
12349 _ACEOF
12350
12351 elif test "$have_shadow_enhanced" = yes ; then
12352   cat >>confdefs.h <<\_ACEOF
12353 #define HAVE_ENHANCED_PASSWD 1
12354 _ACEOF
12355
12356 elif test "$have_shadow_hpux" = yes ; then
12357   cat >>confdefs.h <<\_ACEOF
12358 #define HAVE_HPUX_PASSWD 1
12359 _ACEOF
12360
12361 elif test "$have_shadow" = yes ; then
12362   cat >>confdefs.h <<\_ACEOF
12363 #define HAVE_SHADOW_PASSWD 1
12364 _ACEOF
12365
12366 fi
12367
12368
12369 ###############################################################################
12370 #
12371 #       Check for -lXm.
12372 #
12373 ###############################################################################
12374
12375 have_motif=no
12376 with_motif_req=unspecified
12377
12378 # Check whether --with-motif or --without-motif was given.
12379 if test "${with_motif+set}" = set; then
12380   withval="$with_motif"
12381   with_motif="$withval"; with_motif_req="$withval"
12382 else
12383   with_motif=yes
12384 fi;
12385
12386
12387    case "$with_motif" in
12388     yes) ;;
12389     no)  ;;
12390
12391     /*)
12392      echo "$as_me:$LINENO: checking for Motif headers" >&5
12393 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
12394      d=$with_motif/include
12395      if test -d $d; then
12396        X_CFLAGS="-I$d $X_CFLAGS"
12397        echo "$as_me:$LINENO: result: $d" >&5
12398 echo "${ECHO_T}$d" >&6
12399      else
12400        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12401 echo "${ECHO_T}not found ($d: no such directory)" >&6
12402      fi
12403
12404      echo "$as_me:$LINENO: checking for Motif libs" >&5
12405 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
12406      d=$with_motif/lib
12407      if test -d $d; then
12408        X_LIBS="-L$d $X_LIBS"
12409        echo "$as_me:$LINENO: result: $d" >&5
12410 echo "${ECHO_T}$d" >&6
12411      else
12412        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12413 echo "${ECHO_T}not found ($d: no such directory)" >&6
12414      fi
12415
12416      # replace the directory string with "yes".
12417      with_motif_req="yes"
12418      with_motif=$with_motif_req
12419      ;;
12420
12421     *)
12422      echo ""
12423      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
12424      echo "       If it is a directory, then \`DIR/include' will be added to"
12425      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12426      exit 1
12427      ;;
12428    esac
12429
12430
12431 if test "$with_motif" != yes -a "$with_motif" != no ; then
12432   echo "error: must be yes or no: --with-motif=$with_motif"
12433   exit 1
12434 fi
12435
12436 if test "$with_motif" = yes; then
12437   have_motif=no
12438
12439   ac_save_CPPFLAGS="$CPPFLAGS"
12440   if test \! -z "$includedir" ; then
12441     CPPFLAGS="$CPPFLAGS -I$includedir"
12442   fi
12443   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12444   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
12445 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
12446 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
12447   echo $ECHO_N "(cached) $ECHO_C" >&6
12448 else
12449   cat >conftest.$ac_ext <<_ACEOF
12450 #line $LINENO "configure"
12451 #include "confdefs.h"
12452 #include <stdlib.h>
12453                      #include <stdio.h>
12454                      #include <X11/Intrinsic.h>
12455
12456 #include <Xm/Xm.h>
12457 _ACEOF
12458 rm -f conftest.$ac_objext
12459 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12460   (eval $ac_compile) 2>&5
12461   ac_status=$?
12462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12463   (exit $ac_status); } &&
12464          { ac_try='test -s conftest.$ac_objext'
12465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12466   (eval $ac_try) 2>&5
12467   ac_status=$?
12468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12469   (exit $ac_status); }; }; then
12470   ac_cv_header_Xm_Xm_h=yes
12471 else
12472   echo "$as_me: failed program was:" >&5
12473 cat conftest.$ac_ext >&5
12474 ac_cv_header_Xm_Xm_h=no
12475 fi
12476 rm -f conftest.$ac_objext conftest.$ac_ext
12477 fi
12478 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
12479 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
12480 if test $ac_cv_header_Xm_Xm_h = yes; then
12481   have_motif=yes
12482                      cat >>confdefs.h <<\_ACEOF
12483 #define HAVE_MOTIF 1
12484 _ACEOF
12485
12486                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
12487 fi
12488
12489
12490   CPPFLAGS="$ac_save_CPPFLAGS"
12491 fi
12492
12493
12494 if test "$have_motif" = yes; then
12495
12496   ac_save_CPPFLAGS="$CPPFLAGS"
12497   if test \! -z "$includedir" ; then
12498     CPPFLAGS="$CPPFLAGS -I$includedir"
12499   fi
12500   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12501   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
12502 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
12503 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
12504   echo $ECHO_N "(cached) $ECHO_C" >&6
12505 else
12506   cat >conftest.$ac_ext <<_ACEOF
12507 #line $LINENO "configure"
12508 #include "confdefs.h"
12509 #include <stdlib.h>
12510                      #include <stdio.h>
12511                      #include <X11/Intrinsic.h>
12512
12513 #include <Xm/ComboBox.h>
12514 _ACEOF
12515 rm -f conftest.$ac_objext
12516 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12517   (eval $ac_compile) 2>&5
12518   ac_status=$?
12519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12520   (exit $ac_status); } &&
12521          { ac_try='test -s conftest.$ac_objext'
12522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12523   (eval $ac_try) 2>&5
12524   ac_status=$?
12525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12526   (exit $ac_status); }; }; then
12527   ac_cv_header_Xm_ComboBox_h=yes
12528 else
12529   echo "$as_me: failed program was:" >&5
12530 cat conftest.$ac_ext >&5
12531 ac_cv_header_Xm_ComboBox_h=no
12532 fi
12533 rm -f conftest.$ac_objext conftest.$ac_ext
12534 fi
12535 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
12536 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
12537 if test $ac_cv_header_Xm_ComboBox_h = yes; then
12538   cat >>confdefs.h <<\_ACEOF
12539 #define HAVE_XMCOMBOBOX 1
12540 _ACEOF
12541
12542 fi
12543
12544
12545   CPPFLAGS="$ac_save_CPPFLAGS"
12546 fi
12547
12548
12549 ###############################################################################
12550 #
12551 #       Check for -lgtk (and Gnome stuff)
12552 #
12553 ###############################################################################
12554
12555 have_gtk=no
12556 have_gtk2=no
12557 with_gtk_req=unspecified
12558
12559 # Check whether --with-gtk or --without-gtk was given.
12560 if test "${with_gtk+set}" = set; then
12561   withval="$with_gtk"
12562   with_gtk="$withval"; with_gtk_req="$withval"
12563 else
12564   with_gtk=yes
12565 fi;
12566
12567 # if --with-gtk=/directory/ was specified, remember that directory so that
12568 # we can also look for the `gtk-config' program in that directory.
12569 case "$with_gtk" in
12570   /*)
12571     gtk_dir="$with_gtk"
12572     ;;
12573   *)
12574     gtk_dir=""
12575     ;;
12576 esac
12577
12578
12579    case "$with_gtk" in
12580     yes) ;;
12581     no)  ;;
12582
12583     /*)
12584      echo "$as_me:$LINENO: checking for Gtk headers" >&5
12585 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
12586      d=$with_gtk/include
12587      if test -d $d; then
12588        X_CFLAGS="-I$d $X_CFLAGS"
12589        echo "$as_me:$LINENO: result: $d" >&5
12590 echo "${ECHO_T}$d" >&6
12591      else
12592        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12593 echo "${ECHO_T}not found ($d: no such directory)" >&6
12594      fi
12595
12596      echo "$as_me:$LINENO: checking for Gtk libs" >&5
12597 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12598      d=$with_gtk/lib
12599      if test -d $d; then
12600        X_LIBS="-L$d $X_LIBS"
12601        echo "$as_me:$LINENO: result: $d" >&5
12602 echo "${ECHO_T}$d" >&6
12603      else
12604        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12605 echo "${ECHO_T}not found ($d: no such directory)" >&6
12606      fi
12607
12608      # replace the directory string with "yes".
12609      with_gtk_req="yes"
12610      with_gtk=$with_gtk_req
12611      ;;
12612
12613     *)
12614      echo ""
12615      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
12616      echo "       If it is a directory, then \`DIR/include' will be added to"
12617      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12618      exit 1
12619      ;;
12620    esac
12621
12622
12623 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
12624   echo "error: must be yes or no: --with-gtk=$with_gtk"
12625   exit 1
12626 fi
12627
12628 have_gnome=no
12629 with_gnome_req=unspecified
12630
12631 # Check whether --with-gnome or --without-gnome was given.
12632 if test "${with_gnome+set}" = set; then
12633   withval="$with_gnome"
12634   with_gnome="$withval"; with_gnome_req="$withval"
12635 else
12636   with_gnome=yes
12637 fi;
12638
12639 # if --with-gnome=/directory/ was specified, remember that directory so that
12640 # we can also look for the `gnome-config' program in that directory.
12641 case "$with_gnome" in
12642   /*)
12643     gnome_dir="$with_gnome"
12644     ;;
12645   *)
12646     gnome_dir=""
12647     ;;
12648 esac
12649
12650
12651    case "$with_gnome" in
12652     yes) ;;
12653     no)  ;;
12654
12655     /*)
12656      echo "$as_me:$LINENO: checking for Gnome headers" >&5
12657 echo $ECHO_N "checking for Gnome headers... $ECHO_C" >&6
12658      d=$with_gnome/include
12659      if test -d $d; then
12660        X_CFLAGS="-I$d $X_CFLAGS"
12661        echo "$as_me:$LINENO: result: $d" >&5
12662 echo "${ECHO_T}$d" >&6
12663      else
12664        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12665 echo "${ECHO_T}not found ($d: no such directory)" >&6
12666      fi
12667
12668      echo "$as_me:$LINENO: checking for Gnome libs" >&5
12669 echo $ECHO_N "checking for Gnome libs... $ECHO_C" >&6
12670      d=$with_gnome/lib
12671      if test -d $d; then
12672        X_LIBS="-L$d $X_LIBS"
12673        echo "$as_me:$LINENO: result: $d" >&5
12674 echo "${ECHO_T}$d" >&6
12675      else
12676        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12677 echo "${ECHO_T}not found ($d: no such directory)" >&6
12678      fi
12679
12680      # replace the directory string with "yes".
12681      with_gnome_req="yes"
12682      with_gnome=$with_gnome_req
12683      ;;
12684
12685     *)
12686      echo ""
12687      echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
12688      echo "       If it is a directory, then \`DIR/include' will be added to"
12689      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12690      exit 1
12691      ;;
12692    esac
12693
12694
12695 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
12696   echo "error: must be yes or no: --with-gnome=$with_gnome"
12697   exit 1
12698 fi
12699
12700 parse_gtk_version_string() {
12701   # M4 sucks!!
12702
12703   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
12704   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
12705
12706   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
12707   if test -z "$ac_gtk_version"; then
12708     ac_gtk_version=unknown
12709     ac_gtk_version_string=unknown
12710   fi
12711 }
12712
12713
12714 jurassic_gtk=no
12715 gtk2_halfassed=no
12716
12717 if test "$with_gtk" = yes; then
12718   have_gtk=no
12719
12720   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
12721   # look in /foo/bin/ for glib-config, gtk-config, and gnome-config.
12722   #
12723   gtk_path="$PATH"
12724
12725   if test ! -z "$gtk_dir"; then
12726     # canonicalize slashes.
12727     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
12728     gtk_path="$foo:$gtk_path"
12729   fi
12730
12731   if test ! -z "$gnome_dir"; then
12732     # canonicalize slashes.
12733     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
12734     gtk_path="$foo:$gtk_path"
12735   fi
12736
12737   for ac_prog in pkg-config
12738 do
12739   # Extract the first word of "$ac_prog", so it can be a program name with args.
12740 set dummy $ac_prog; ac_word=$2
12741 echo "$as_me:$LINENO: checking for $ac_word" >&5
12742 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12743 if test "${ac_cv_path_pkg_config+set}" = set; then
12744   echo $ECHO_N "(cached) $ECHO_C" >&6
12745 else
12746   case $pkg_config in
12747   [\\/]* | ?:[\\/]*)
12748   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
12749   ;;
12750   *)
12751   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12752 for as_dir in $gtk_path
12753 do
12754   IFS=$as_save_IFS
12755   test -z "$as_dir" && as_dir=.
12756   for ac_exec_ext in '' $ac_executable_extensions; do
12757   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12758     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
12759     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12760     break 2
12761   fi
12762 done
12763 done
12764
12765   ;;
12766 esac
12767 fi
12768 pkg_config=$ac_cv_path_pkg_config
12769
12770 if test -n "$pkg_config"; then
12771   echo "$as_me:$LINENO: result: $pkg_config" >&5
12772 echo "${ECHO_T}$pkg_config" >&6
12773 else
12774   echo "$as_me:$LINENO: result: no" >&5
12775 echo "${ECHO_T}no" >&6
12776 fi
12777
12778   test -n "$pkg_config" && break
12779 done
12780
12781
12782   if test -n "$pkg_config" ; then
12783     #
12784     # the new way...
12785     # run pkg-config based tests.
12786     #
12787     pkgs=''
12788     pkg_check_version() {
12789       if test "$ok" = yes ; then
12790         req="$1"
12791         min="$2"
12792         echo "$as_me:$LINENO: checking for $req" >&5
12793 echo $ECHO_N "checking for $req... $ECHO_C" >&6
12794         if $pkg_config --exists "$req" ; then
12795           vers=`$pkg_config --modversion "$req"`
12796           if $pkg_config --exists "$req >= $min" ; then
12797             echo "$as_me:$LINENO: result: $vers" >&5
12798 echo "${ECHO_T}$vers" >&6
12799             pkgs="$pkgs $req"
12800             return 1
12801           else
12802             echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
12803 echo "${ECHO_T}$vers (wanted >= $min)" >&6
12804             ok=no
12805             return 0
12806           fi
12807         else
12808           echo "$as_me:$LINENO: result: no" >&5
12809 echo "${ECHO_T}no" >&6
12810           ok=no
12811           return 0
12812         fi
12813       fi
12814     }
12815
12816     echo "$as_me:$LINENO: result: checking for GTK 2.x with pkg-config based tests..." >&5
12817 echo "${ECHO_T}checking for GTK 2.x with pkg-config based tests..." >&6
12818
12819     ok="yes"
12820     pkg_check_version       gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
12821     pkg_check_version    gmodule-2.0  2.0.0
12822     pkg_check_version     libxml-2.0  2.4.6
12823     pkg_check_version   libglade-2.0  1.99.0
12824 #   pkg_check_version gdk_pixbuf      0.1
12825     have_gtk="$ok"
12826
12827     if test "$have_gtk" = yes; then
12828       have_gtk2=yes
12829       cat >>confdefs.h <<\_ACEOF
12830 #define HAVE_GTK2 1
12831 _ACEOF
12832
12833     else
12834       if test -n "$ac_gtk_version_string" ; then
12835         gtk2_halfassed="$ac_gtk_version_string"
12836         gtk2_halfassed_lib="$req"
12837       fi
12838     fi
12839
12840     if test "$have_gtk" = no; then
12841       #
12842       # we don't have GTK 2.  Let's look for GTK 1.
12843       #
12844       echo "$as_me:$LINENO: result: checking for GTK 1.x with pkg-config based tests..." >&5
12845 echo "${ECHO_T}checking for GTK 1.x with pkg-config based tests..." >&6
12846
12847       pkgs=''
12848       ok="yes"
12849       pkg_check_version gtk+       1.2     ; ac_gtk_version_string="$vers"
12850       pkg_check_version glib       1.0
12851       pkg_check_version gdk_pixbuf 0.1
12852       have_gtk="$ok"
12853
12854       # Now check for Gnome...
12855       #
12856       if test "$have_gtk" = yes -a "$with_gnome" = yes; then
12857         old_pkgs="$pkgs"
12858         ok=yes
12859         pkg_check_version capplet    1.0
12860         pkg_check_version gnomeui    1.0
12861         pkg_check_version gdk_pixbuf 0.1
12862         have_gnome="$ok"
12863
12864         if test "$have_gnome" = no; then
12865           pkgs="$old_pkgs"
12866         else
12867           cat >>confdefs.h <<\_ACEOF
12868 #define HAVE_CRAPPLET 1
12869 _ACEOF
12870
12871         fi
12872       fi
12873     fi
12874
12875     if test "$have_gtk" = yes; then
12876       parse_gtk_version_string
12877       jurassic_gtk=no
12878     else
12879       have_gnome=no
12880     fi
12881
12882     if test "$have_gtk" = yes; then
12883       echo "$as_me:$LINENO: checking for Gtk includes" >&5
12884 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
12885 if test "${ac_cv_gtk_config_cflags+set}" = set; then
12886   echo $ECHO_N "(cached) $ECHO_C" >&6
12887 else
12888   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
12889 fi
12890 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
12891 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
12892       echo "$as_me:$LINENO: checking for Gtk libs" >&5
12893 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12894 if test "${ac_cv_gtk_config_libs+set}" = set; then
12895   echo $ECHO_N "(cached) $ECHO_C" >&6
12896 else
12897   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
12898 fi
12899 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
12900 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
12901     fi
12902     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12903     ac_gtk_config_libs=$ac_cv_gtk_config_libs
12904
12905     ac_gnome_config_cflags=$ac_gtk_config_cflags
12906     ac_gnome_config_libs=$ac_gtk_config_libs
12907
12908   else
12909     #
12910     # the old way...
12911     # run {gnome,gtk}-config based tests.
12912     #
12913     echo "$as_me:$LINENO: result: checking for GTK 1.x with gtk-config based tests..." >&5
12914 echo "${ECHO_T}checking for GTK 1.x with gtk-config based tests..." >&6
12915
12916     for ac_prog in glib12-config glib-config
12917 do
12918   # Extract the first word of "$ac_prog", so it can be a program name with args.
12919 set dummy $ac_prog; ac_word=$2
12920 echo "$as_me:$LINENO: checking for $ac_word" >&5
12921 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12922 if test "${ac_cv_path_glib_config+set}" = set; then
12923   echo $ECHO_N "(cached) $ECHO_C" >&6
12924 else
12925   case $glib_config in
12926   [\\/]* | ?:[\\/]*)
12927   ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
12928   ;;
12929   *)
12930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12931 for as_dir in $gtk_path
12932 do
12933   IFS=$as_save_IFS
12934   test -z "$as_dir" && as_dir=.
12935   for ac_exec_ext in '' $ac_executable_extensions; do
12936   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12937     ac_cv_path_glib_config="$as_dir/$ac_word$ac_exec_ext"
12938     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12939     break 2
12940   fi
12941 done
12942 done
12943
12944   ;;
12945 esac
12946 fi
12947 glib_config=$ac_cv_path_glib_config
12948
12949 if test -n "$glib_config"; then
12950   echo "$as_me:$LINENO: result: $glib_config" >&5
12951 echo "${ECHO_T}$glib_config" >&6
12952 else
12953   echo "$as_me:$LINENO: result: no" >&5
12954 echo "${ECHO_T}no" >&6
12955 fi
12956
12957   test -n "$glib_config" && break
12958 done
12959
12960     for ac_prog in gtk12-config  gtk-config
12961 do
12962   # Extract the first word of "$ac_prog", so it can be a program name with args.
12963 set dummy $ac_prog; ac_word=$2
12964 echo "$as_me:$LINENO: checking for $ac_word" >&5
12965 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12966 if test "${ac_cv_path_gtk_config+set}" = set; then
12967   echo $ECHO_N "(cached) $ECHO_C" >&6
12968 else
12969   case $gtk_config in
12970   [\\/]* | ?:[\\/]*)
12971   ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
12972   ;;
12973   *)
12974   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12975 for as_dir in $gtk_path
12976 do
12977   IFS=$as_save_IFS
12978   test -z "$as_dir" && as_dir=.
12979   for ac_exec_ext in '' $ac_executable_extensions; do
12980   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12981     ac_cv_path_gtk_config="$as_dir/$ac_word$ac_exec_ext"
12982     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12983     break 2
12984   fi
12985 done
12986 done
12987
12988   ;;
12989 esac
12990 fi
12991 gtk_config=$ac_cv_path_gtk_config
12992
12993 if test -n "$gtk_config"; then
12994   echo "$as_me:$LINENO: result: $gtk_config" >&5
12995 echo "${ECHO_T}$gtk_config" >&6
12996 else
12997   echo "$as_me:$LINENO: result: no" >&5
12998 echo "${ECHO_T}no" >&6
12999 fi
13000
13001   test -n "$gtk_config" && break
13002 done
13003
13004
13005     if test "$with_gnome" = yes; then
13006       for ac_prog in gnome-config
13007 do
13008   # Extract the first word of "$ac_prog", so it can be a program name with args.
13009 set dummy $ac_prog; ac_word=$2
13010 echo "$as_me:$LINENO: checking for $ac_word" >&5
13011 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13012 if test "${ac_cv_path_gnome_config+set}" = set; then
13013   echo $ECHO_N "(cached) $ECHO_C" >&6
13014 else
13015   case $gnome_config in
13016   [\\/]* | ?:[\\/]*)
13017   ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
13018   ;;
13019   *)
13020   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13021 for as_dir in $gtk_path
13022 do
13023   IFS=$as_save_IFS
13024   test -z "$as_dir" && as_dir=.
13025   for ac_exec_ext in '' $ac_executable_extensions; do
13026   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13027     ac_cv_path_gnome_config="$as_dir/$ac_word$ac_exec_ext"
13028     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13029     break 2
13030   fi
13031 done
13032 done
13033
13034   ;;
13035 esac
13036 fi
13037 gnome_config=$ac_cv_path_gnome_config
13038
13039 if test -n "$gnome_config"; then
13040   echo "$as_me:$LINENO: result: $gnome_config" >&5
13041 echo "${ECHO_T}$gnome_config" >&6
13042 else
13043   echo "$as_me:$LINENO: result: no" >&5
13044 echo "${ECHO_T}no" >&6
13045 fi
13046
13047   test -n "$gnome_config" && break
13048 done
13049
13050     fi
13051
13052     if test -n "$glib_config" -a  -n "$gtk_config" ; then
13053       have_gtk=yes
13054       if test "$with_gnome" = yes -a -n "$gnome_config" ; then
13055         have_gnome=yes
13056       fi
13057     fi
13058
13059     if test "$have_gtk" = yes; then
13060       echo "$as_me:$LINENO: checking Gtk version number" >&5
13061 echo $ECHO_N "checking Gtk version number... $ECHO_C" >&6
13062 if test "${ac_cv_gtk_version_string+set}" = set; then
13063   echo $ECHO_N "(cached) $ECHO_C" >&6
13064 else
13065   ac_cv_gtk_version_string=`$gtk_config --version`
13066 fi
13067 echo "$as_me:$LINENO: result: $ac_cv_gtk_version_string" >&5
13068 echo "${ECHO_T}$ac_cv_gtk_version_string" >&6
13069       ac_gtk_version_string=$ac_cv_gtk_version_string
13070       parse_gtk_version_string
13071     fi
13072
13073     if test "$have_gtk" = yes; then
13074       if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
13075       then
13076         have_gtk=no
13077         have_gnome=no
13078         jurassic_gtk=yes
13079       fi
13080     fi
13081
13082     if test "$have_gtk" = yes; then
13083       echo "$as_me:$LINENO: checking for Gtk includes" >&5
13084 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
13085 if test "${ac_cv_gtk_config_cflags+set}" = set; then
13086   echo $ECHO_N "(cached) $ECHO_C" >&6
13087 else
13088   ac_cv_gtk_config_cflags=`$gtk_config --cflags`
13089 fi
13090 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
13091 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
13092       echo "$as_me:$LINENO: checking for Gtk libs" >&5
13093 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
13094 if test "${ac_cv_gtk_config_libs+set}" = set; then
13095   echo $ECHO_N "(cached) $ECHO_C" >&6
13096 else
13097   ac_cv_gtk_config_libs=`$gtk_config --libs`
13098 fi
13099 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
13100 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
13101     fi
13102     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
13103     ac_gtk_config_libs=$ac_cv_gtk_config_libs
13104
13105     # Check for Gnome Capplet support.
13106     # Note that this is only needed with Gnome 1.x, not Gnome 2.x.
13107     # In a Gnome 2.x world, libcapplet will not exist.
13108     # (In fact, this likely won't even be checked, since in a Gnome 2.x
13109     # world, we will probably be up in the "$pkg_config" branch instead
13110     # of here in the "$gnome_config" branch.)
13111     #
13112     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13113       gnome_config_libs="gtk capplet gnomeui gdk_pixbuf"
13114       echo "$as_me:$LINENO: checking for Gnome capplet includes" >&5
13115 echo $ECHO_N "checking for Gnome capplet includes... $ECHO_C" >&6
13116       if test "${ac_cv_gnome_config_cflags+set}" = set; then
13117   echo $ECHO_N "(cached) $ECHO_C" >&6
13118 else
13119   if ( $gnome_config --cflags $gnome_config_libs 2>&1 | \
13120               grep Unknown >/dev/null ) ; then
13121            ac_cv_gnome_config_cflags=''
13122          else
13123           ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
13124          fi
13125 fi
13126
13127       ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
13128       if test "$ac_gnome_config_cflags" = "" ; then
13129         have_gnome=no
13130         echo "$as_me:$LINENO: result: no" >&5
13131 echo "${ECHO_T}no" >&6
13132       else
13133         echo "$as_me:$LINENO: result: $ac_gnome_config_cflags" >&5
13134 echo "${ECHO_T}$ac_gnome_config_cflags" >&6
13135       fi
13136     fi
13137
13138     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13139       echo "$as_me:$LINENO: checking for Gnome capplet libs" >&5
13140 echo $ECHO_N "checking for Gnome capplet libs... $ECHO_C" >&6
13141       if test "${ac_cv_gnome_config_libs+set}" = set; then
13142   echo $ECHO_N "(cached) $ECHO_C" >&6
13143 else
13144   if ( $gnome_config --libs $gnome_config_libs 2>&1 |
13145               grep Unknown >/dev/null ) ; then
13146            ac_cv_gnome_config_libs=''
13147          else
13148            ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
13149          fi
13150 fi
13151
13152       ac_gnome_config_libs=$ac_cv_gnome_config_libs
13153       if test "$ac_gnome_config_libs" = "" ; then
13154         have_gnome=no
13155         echo "$as_me:$LINENO: result: no" >&5
13156 echo "${ECHO_T}no" >&6
13157       else
13158         echo "$as_me:$LINENO: result: $ac_gnome_config_libs" >&5
13159 echo "${ECHO_T}$ac_gnome_config_libs" >&6
13160       fi
13161     fi
13162
13163     # If we have Gnome, then override the gtk-config values with
13164     # the gnome-config values.
13165     #
13166     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13167       ac_gtk_config_cflags=$ac_gnome_config_cflags
13168       ac_gtk_config_libs=$ac_gnome_config_libs
13169       cat >>confdefs.h <<\_ACEOF
13170 #define HAVE_CRAPPLET 1
13171 _ACEOF
13172
13173     fi
13174
13175   fi   # end of {gnome,gtk}-config based tests
13176
13177   if test "$have_gtk" = yes -a "$have_gtk2" = no; then
13178     # check for this function that was not in libcapplet 1.2.
13179     # (only needed in Gnome/Gtk 1.x, not Gnome/Gtk 2.x)
13180
13181   ac_save_CPPFLAGS="$CPPFLAGS"
13182   ac_save_LDFLAGS="$LDFLAGS"
13183 #  ac_save_LIBS="$LIBS"
13184
13185   if test \! -z "$includedir" ; then
13186     CPPFLAGS="$CPPFLAGS -I$includedir"
13187   fi
13188   # note: $X_CFLAGS includes $x_includes
13189   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13190
13191   if test \! -z "$libdir" ; then
13192     LDFLAGS="$LDFLAGS -L$libdir"
13193   fi
13194   # note: $X_LIBS includes $x_libraries
13195   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13196
13197   echo "$as_me:$LINENO: checking for capplet_widget_changes_are_immediate in -lcapplet" >&5
13198 echo $ECHO_N "checking for capplet_widget_changes_are_immediate in -lcapplet... $ECHO_C" >&6
13199 if test "${ac_cv_lib_capplet_capplet_widget_changes_are_immediate+set}" = set; then
13200   echo $ECHO_N "(cached) $ECHO_C" >&6
13201 else
13202   ac_check_lib_save_LIBS=$LIBS
13203 LIBS="-lcapplet $ac_gnome_config_libs $LIBS"
13204 cat >conftest.$ac_ext <<_ACEOF
13205 #line $LINENO "configure"
13206 #include "confdefs.h"
13207
13208 /* Override any gcc2 internal prototype to avoid an error.  */
13209 #ifdef __cplusplus
13210 extern "C"
13211 #endif
13212 /* We use char because int might match the return type of a gcc2
13213    builtin and then its argument prototype would still apply.  */
13214 char capplet_widget_changes_are_immediate ();
13215 #ifdef F77_DUMMY_MAIN
13216 #  ifdef __cplusplus
13217      extern "C"
13218 #  endif
13219    int F77_DUMMY_MAIN() { return 1; }
13220 #endif
13221 int
13222 main ()
13223 {
13224 capplet_widget_changes_are_immediate ();
13225   ;
13226   return 0;
13227 }
13228 _ACEOF
13229 rm -f conftest.$ac_objext conftest$ac_exeext
13230 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13231   (eval $ac_link) 2>&5
13232   ac_status=$?
13233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13234   (exit $ac_status); } &&
13235          { ac_try='test -s conftest$ac_exeext'
13236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13237   (eval $ac_try) 2>&5
13238   ac_status=$?
13239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13240   (exit $ac_status); }; }; then
13241   ac_cv_lib_capplet_capplet_widget_changes_are_immediate=yes
13242 else
13243   echo "$as_me: failed program was:" >&5
13244 cat conftest.$ac_ext >&5
13245 ac_cv_lib_capplet_capplet_widget_changes_are_immediate=no
13246 fi
13247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13248 LIBS=$ac_check_lib_save_LIBS
13249 fi
13250 echo "$as_me:$LINENO: result: $ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&5
13251 echo "${ECHO_T}$ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&6
13252 if test $ac_cv_lib_capplet_capplet_widget_changes_are_immediate = yes; then
13253   cat >>confdefs.h <<\_ACEOF
13254 #define HAVE_CRAPPLET_IMMEDIATE 1
13255 _ACEOF
13256
13257 else
13258   true
13259 fi
13260
13261   CPPFLAGS="$ac_save_CPPFLAGS"
13262   LDFLAGS="$ac_save_LDFLAGS"
13263 #  LIBS="$ac_save_LIBS"
13264
13265   fi
13266
13267
13268   GNOME_DATADIR=""
13269   if test "$have_gtk" = yes; then
13270     if test -n "$pkg_config"; then
13271       if test "$have_gtk2" = yes; then
13272         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
13273       else
13274         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+`
13275       fi
13276     else
13277       GNOME_DATADIR=`$gtk_config --prefix`
13278     fi
13279     GNOME_DATADIR="$GNOME_DATADIR/share"
13280   fi
13281
13282   # .desktop files go in different places in Gnome 1.x and Gnome 2.x...
13283   if test "$have_gtk2" = yes; then
13284     GNOME_PANELDIR='$(GNOME_PANELDIR2)'
13285   else
13286     GNOME_PANELDIR='$(GNOME_PANELDIR1)'
13287   fi
13288
13289
13290   if test "$have_gtk" = yes; then
13291     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
13292     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
13293     cat >>confdefs.h <<\_ACEOF
13294 #define HAVE_GTK 1
13295 _ACEOF
13296
13297
13298     if test "$have_gtk2" = yes; then
13299       GTK_EXTRA_OBJS=""
13300     else
13301       GTK_EXTRA_OBJS="\$(GTK_EXTRA_OBJS)"
13302     fi
13303   fi
13304
13305 fi
13306
13307
13308 # Check for the Gnome Help Browser.
13309 #
13310 if test "$have_gtk" = yes; then
13311   for ac_prog in yelp gnome-help-browser
13312 do
13313   # Extract the first word of "$ac_prog", so it can be a program name with args.
13314 set dummy $ac_prog; ac_word=$2
13315 echo "$as_me:$LINENO: checking for $ac_word" >&5
13316 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13317 if test "${ac_cv_prog_have_gnome_help+set}" = set; then
13318   echo $ECHO_N "(cached) $ECHO_C" >&6
13319 else
13320   if test -n "$have_gnome_help"; then
13321   ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
13322 else
13323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13324 for as_dir in $PATH
13325 do
13326   IFS=$as_save_IFS
13327   test -z "$as_dir" && as_dir=.
13328   for ac_exec_ext in '' $ac_executable_extensions; do
13329   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13330     ac_cv_prog_have_gnome_help="$ac_prog"
13331     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13332     break 2
13333   fi
13334 done
13335 done
13336
13337 fi
13338 fi
13339 have_gnome_help=$ac_cv_prog_have_gnome_help
13340 if test -n "$have_gnome_help"; then
13341   echo "$as_me:$LINENO: result: $have_gnome_help" >&5
13342 echo "${ECHO_T}$have_gnome_help" >&6
13343 else
13344   echo "$as_me:$LINENO: result: no" >&5
13345 echo "${ECHO_T}no" >&6
13346 fi
13347
13348   test -n "$have_gnome_help" && break
13349 done
13350 test -n "$have_gnome_help" || have_gnome_help="no"
13351
13352   if test "$have_gnome_help" != no; then
13353     have_gnome_help=yes
13354   fi
13355 fi
13356
13357
13358 ###############################################################################
13359 #
13360 #       Check for -lxml
13361 #
13362 ###############################################################################
13363
13364 have_xml=no
13365 with_xml_req=unspecified
13366 xml_halfassed=no
13367
13368 # Check whether --with-xml or --without-xml was given.
13369 if test "${with_xml+set}" = set; then
13370   withval="$with_xml"
13371   with_xml="$withval"; with_xml_req="$withval"
13372 else
13373   with_xml=yes
13374 fi;
13375
13376 # if --with-xml=/directory/ was specified, remember that directory so that
13377 # we can also look for the `xml-config' program in that directory.
13378 case "$with_xml" in
13379   /*)
13380     xml_dir="$with_xml"
13381     ;;
13382   *)
13383     xml_dir=""
13384     ;;
13385 esac
13386
13387
13388    case "$with_xml" in
13389     yes) ;;
13390     no)  ;;
13391
13392     /*)
13393      echo "$as_me:$LINENO: checking for XML headers" >&5
13394 echo $ECHO_N "checking for XML headers... $ECHO_C" >&6
13395      d=$with_xml/include
13396      if test -d $d; then
13397        X_CFLAGS="-I$d $X_CFLAGS"
13398        echo "$as_me:$LINENO: result: $d" >&5
13399 echo "${ECHO_T}$d" >&6
13400      else
13401        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13402 echo "${ECHO_T}not found ($d: no such directory)" >&6
13403      fi
13404
13405      echo "$as_me:$LINENO: checking for XML libs" >&5
13406 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13407      d=$with_xml/lib
13408      if test -d $d; then
13409        X_LIBS="-L$d $X_LIBS"
13410        echo "$as_me:$LINENO: result: $d" >&5
13411 echo "${ECHO_T}$d" >&6
13412      else
13413        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13414 echo "${ECHO_T}not found ($d: no such directory)" >&6
13415      fi
13416
13417      # replace the directory string with "yes".
13418      with_xml_req="yes"
13419      with_xml=$with_xml_req
13420      ;;
13421
13422     *)
13423      echo ""
13424      echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory."
13425      echo "       If it is a directory, then \`DIR/include' will be added to"
13426      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13427      exit 1
13428      ;;
13429    esac
13430
13431
13432 if test "$with_xml" != yes -a "$with_xml" != no ; then
13433   echo "error: must be yes or no: --with-xml=$with_xml"
13434   exit 1
13435 fi
13436
13437 if test "$with_xml" = yes; then
13438   have_xml=no
13439   have_old_xml=no
13440
13441   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
13442   # look in /foo/bin/ for for xml-config.
13443   #
13444   xml_path="$PATH"
13445
13446   if test ! -z "$gtk_dir"; then
13447     # canonicalize slashes.
13448     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
13449     xml_path="$foo:$xml_path"
13450   fi
13451
13452   if test ! -z "$gnome_dir"; then
13453     # canonicalize slashes.
13454     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
13455     xml_path="$foo:$xml_path"
13456   fi
13457
13458   if test -n "$pkg_config" ; then
13459     #
13460     # the new way...
13461     # run pkg-config based tests.
13462     #
13463     pkgs=""
13464     ok="yes"
13465
13466     # If we have Gtk 2.x, then *only* XML 2.x will work.
13467     # If we have Gtk 1.x, or don't have Gtk at all, then
13468     # either XML 1.x or 2.x will work.
13469
13470     # First check for XML 2.x.
13471     #
13472     pkg_check_version libxml-2.0 2.4.6
13473
13474     # If that didn't work (we don't have XML 2.x) and we *don't* have
13475     # Gtk 2.x, then check to see if we have XML 1.x
13476     #
13477     if test "$ok" = no -a "$have_gtk2" = no; then
13478       ok=yes
13479       pkg_check_version libxml 1.0
13480     fi
13481
13482     have_xml="$ok"
13483
13484     if test "$have_xml" = yes; then
13485       echo "$as_me:$LINENO: checking for XML includes" >&5
13486 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
13487 if test "${ac_cv_xml_config_cflags+set}" = set; then
13488   echo $ECHO_N "(cached) $ECHO_C" >&6
13489 else
13490   ac_cv_xml_config_cflags=`$pkg_config --cflags $pkgs`
13491 fi
13492 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
13493 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
13494       echo "$as_me:$LINENO: checking for XML libs" >&5
13495 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13496 if test "${ac_cv_xml_config_libs+set}" = set; then
13497   echo $ECHO_N "(cached) $ECHO_C" >&6
13498 else
13499   ac_cv_xml_config_libs=`$pkg_config --libs $pkgs`
13500 fi
13501 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
13502 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
13503       ac_xml_config_cflags=$ac_cv_xml_config_cflags
13504       ac_xml_config_libs=$ac_cv_xml_config_libs
13505     fi
13506
13507   else
13508     #
13509     # the old way...
13510     # run {xml2,xml}-config based tests.
13511     #
13512
13513     for ac_prog in xml2-config xml-config
13514 do
13515   # Extract the first word of "$ac_prog", so it can be a program name with args.
13516 set dummy $ac_prog; ac_word=$2
13517 echo "$as_me:$LINENO: checking for $ac_word" >&5
13518 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13519 if test "${ac_cv_path_xml_config+set}" = set; then
13520   echo $ECHO_N "(cached) $ECHO_C" >&6
13521 else
13522   case $xml_config in
13523   [\\/]* | ?:[\\/]*)
13524   ac_cv_path_xml_config="$xml_config" # Let the user override the test with a path.
13525   ;;
13526   *)
13527   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13528 for as_dir in $xml_path
13529 do
13530   IFS=$as_save_IFS
13531   test -z "$as_dir" && as_dir=.
13532   for ac_exec_ext in '' $ac_executable_extensions; do
13533   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13534     ac_cv_path_xml_config="$as_dir/$ac_word$ac_exec_ext"
13535     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13536     break 2
13537   fi
13538 done
13539 done
13540
13541   ;;
13542 esac
13543 fi
13544 xml_config=$ac_cv_path_xml_config
13545
13546 if test -n "$xml_config"; then
13547   echo "$as_me:$LINENO: result: $xml_config" >&5
13548 echo "${ECHO_T}$xml_config" >&6
13549 else
13550   echo "$as_me:$LINENO: result: no" >&5
13551 echo "${ECHO_T}no" >&6
13552 fi
13553
13554   test -n "$xml_config" && break
13555 done
13556
13557
13558     # If we found the xml-config program, run it to get flags.
13559     #
13560     if test -n "$xml_config" ; then
13561       echo "$as_me:$LINENO: checking for XML includes" >&5
13562 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
13563 if test "${ac_cv_xml_config_cflags+set}" = set; then
13564   echo $ECHO_N "(cached) $ECHO_C" >&6
13565 else
13566   ac_cv_xml_config_cflags=`$xml_config --cflags`
13567 fi
13568 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
13569 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
13570       echo "$as_me:$LINENO: checking for XML libs" >&5
13571 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13572 if test "${ac_cv_xml_config_libs+set}" = set; then
13573   echo $ECHO_N "(cached) $ECHO_C" >&6
13574 else
13575   ac_cv_xml_config_libs=`$xml_config --libs`
13576 fi
13577 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
13578 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
13579       ac_xml_config_cflags=$ac_cv_xml_config_cflags
13580       ac_xml_config_libs=$ac_cv_xml_config_libs
13581     fi
13582
13583     ac_save_xml_CPPFLAGS="$CPPFLAGS"
13584     CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags"
13585
13586     # first try <libxml/parser.h> which is the new way...
13587     #
13588
13589   ac_save_CPPFLAGS="$CPPFLAGS"
13590   if test \! -z "$includedir" ; then
13591     CPPFLAGS="$CPPFLAGS -I$includedir"
13592   fi
13593   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13594   echo "$as_me:$LINENO: checking for libxml/xmlIO.h" >&5
13595 echo $ECHO_N "checking for libxml/xmlIO.h... $ECHO_C" >&6
13596 if test "${ac_cv_header_libxml_xmlIO_h+set}" = set; then
13597   echo $ECHO_N "(cached) $ECHO_C" >&6
13598 else
13599   cat >conftest.$ac_ext <<_ACEOF
13600 #line $LINENO "configure"
13601 #include "confdefs.h"
13602 #include <libxml/parser.h>
13603
13604 #include <libxml/xmlIO.h>
13605 _ACEOF
13606 rm -f conftest.$ac_objext
13607 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13608   (eval $ac_compile) 2>&5
13609   ac_status=$?
13610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13611   (exit $ac_status); } &&
13612          { ac_try='test -s conftest.$ac_objext'
13613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13614   (eval $ac_try) 2>&5
13615   ac_status=$?
13616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13617   (exit $ac_status); }; }; then
13618   ac_cv_header_libxml_xmlIO_h=yes
13619 else
13620   echo "$as_me: failed program was:" >&5
13621 cat conftest.$ac_ext >&5
13622 ac_cv_header_libxml_xmlIO_h=no
13623 fi
13624 rm -f conftest.$ac_objext conftest.$ac_ext
13625 fi
13626 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlIO_h" >&5
13627 echo "${ECHO_T}$ac_cv_header_libxml_xmlIO_h" >&6
13628 if test $ac_cv_header_libxml_xmlIO_h = yes; then
13629   have_xml=yes
13630 fi
13631
13632
13633   CPPFLAGS="$ac_save_CPPFLAGS"
13634
13635     # if that didn't work, then try just <parser.h> which is the old way...
13636     #
13637     if test "$have_xml" = no; then
13638
13639   ac_save_CPPFLAGS="$CPPFLAGS"
13640   if test \! -z "$includedir" ; then
13641     CPPFLAGS="$CPPFLAGS -I$includedir"
13642   fi
13643   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13644   echo "$as_me:$LINENO: checking for xmlIO.h" >&5
13645 echo $ECHO_N "checking for xmlIO.h... $ECHO_C" >&6
13646 if test "${ac_cv_header_xmlIO_h+set}" = set; then
13647   echo $ECHO_N "(cached) $ECHO_C" >&6
13648 else
13649   cat >conftest.$ac_ext <<_ACEOF
13650 #line $LINENO "configure"
13651 #include "confdefs.h"
13652 #include <parser.h>
13653
13654 #include <xmlIO.h>
13655 _ACEOF
13656 rm -f conftest.$ac_objext
13657 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13658   (eval $ac_compile) 2>&5
13659   ac_status=$?
13660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13661   (exit $ac_status); } &&
13662          { ac_try='test -s conftest.$ac_objext'
13663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13664   (eval $ac_try) 2>&5
13665   ac_status=$?
13666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13667   (exit $ac_status); }; }; then
13668   ac_cv_header_xmlIO_h=yes
13669 else
13670   echo "$as_me: failed program was:" >&5
13671 cat conftest.$ac_ext >&5
13672 ac_cv_header_xmlIO_h=no
13673 fi
13674 rm -f conftest.$ac_objext conftest.$ac_ext
13675 fi
13676 echo "$as_me:$LINENO: result: $ac_cv_header_xmlIO_h" >&5
13677 echo "${ECHO_T}$ac_cv_header_xmlIO_h" >&6
13678 if test $ac_cv_header_xmlIO_h = yes; then
13679   have_xml=yes; have_old_xml=yes
13680 fi
13681
13682
13683   CPPFLAGS="$ac_save_CPPFLAGS"
13684     fi
13685
13686     CPPFLAGS="$ac_save_xml_CPPFLAGS"
13687   fi
13688
13689
13690   have_zlib=no
13691   if test "$have_xml" = yes; then
13692     # we have the XML headers; now make sure zlib is around.
13693     # yes, it's stupid we have to do this too, but there is
13694     # dependency screwage in Gnome.
13695
13696   ac_save_CPPFLAGS="$CPPFLAGS"
13697   ac_save_LDFLAGS="$LDFLAGS"
13698 #  ac_save_LIBS="$LIBS"
13699
13700   if test \! -z "$includedir" ; then
13701     CPPFLAGS="$CPPFLAGS -I$includedir"
13702   fi
13703   # note: $X_CFLAGS includes $x_includes
13704   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13705
13706   if test \! -z "$libdir" ; then
13707     LDFLAGS="$LDFLAGS -L$libdir"
13708   fi
13709   # note: $X_LIBS includes $x_libraries
13710   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13711
13712   echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5
13713 echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
13714 if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
13715   echo $ECHO_N "(cached) $ECHO_C" >&6
13716 else
13717   ac_check_lib_save_LIBS=$LIBS
13718 LIBS="-lz  $LIBS"
13719 cat >conftest.$ac_ext <<_ACEOF
13720 #line $LINENO "configure"
13721 #include "confdefs.h"
13722
13723 /* Override any gcc2 internal prototype to avoid an error.  */
13724 #ifdef __cplusplus
13725 extern "C"
13726 #endif
13727 /* We use char because int might match the return type of a gcc2
13728    builtin and then its argument prototype would still apply.  */
13729 char zlibVersion ();
13730 #ifdef F77_DUMMY_MAIN
13731 #  ifdef __cplusplus
13732      extern "C"
13733 #  endif
13734    int F77_DUMMY_MAIN() { return 1; }
13735 #endif
13736 int
13737 main ()
13738 {
13739 zlibVersion ();
13740   ;
13741   return 0;
13742 }
13743 _ACEOF
13744 rm -f conftest.$ac_objext conftest$ac_exeext
13745 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13746   (eval $ac_link) 2>&5
13747   ac_status=$?
13748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13749   (exit $ac_status); } &&
13750          { ac_try='test -s conftest$ac_exeext'
13751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13752   (eval $ac_try) 2>&5
13753   ac_status=$?
13754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13755   (exit $ac_status); }; }; then
13756   ac_cv_lib_z_zlibVersion=yes
13757 else
13758   echo "$as_me: failed program was:" >&5
13759 cat conftest.$ac_ext >&5
13760 ac_cv_lib_z_zlibVersion=no
13761 fi
13762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13763 LIBS=$ac_check_lib_save_LIBS
13764 fi
13765 echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5
13766 echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
13767 if test $ac_cv_lib_z_zlibVersion = yes; then
13768   have_zlib=yes
13769 fi
13770
13771   CPPFLAGS="$ac_save_CPPFLAGS"
13772   LDFLAGS="$ac_save_LDFLAGS"
13773 #  LIBS="$ac_save_LIBS"
13774
13775     if test "$have_zlib" = no; then
13776       xml_halfassed=yes
13777       have_xml=no
13778     fi
13779   fi
13780
13781   if test "$have_xml" = yes; then
13782     # we have the header, now check for the library
13783     have_xml=no
13784     xml_halfassed=yes
13785
13786   ac_save_CPPFLAGS="$CPPFLAGS"
13787   ac_save_LDFLAGS="$LDFLAGS"
13788 #  ac_save_LIBS="$LIBS"
13789
13790   if test \! -z "$includedir" ; then
13791     CPPFLAGS="$CPPFLAGS -I$includedir"
13792   fi
13793   # note: $X_CFLAGS includes $x_includes
13794   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13795
13796   if test \! -z "$libdir" ; then
13797     LDFLAGS="$LDFLAGS -L$libdir"
13798   fi
13799   # note: $X_LIBS includes $x_libraries
13800   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13801
13802   echo "$as_me:$LINENO: checking for xmlParseChunk in -lc" >&5
13803 echo $ECHO_N "checking for xmlParseChunk in -lc... $ECHO_C" >&6
13804 if test "${ac_cv_lib_c_xmlParseChunk+set}" = set; then
13805   echo $ECHO_N "(cached) $ECHO_C" >&6
13806 else
13807   ac_check_lib_save_LIBS=$LIBS
13808 LIBS="-lc $ac_xml_config_libs $LIBS"
13809 cat >conftest.$ac_ext <<_ACEOF
13810 #line $LINENO "configure"
13811 #include "confdefs.h"
13812
13813 /* Override any gcc2 internal prototype to avoid an error.  */
13814 #ifdef __cplusplus
13815 extern "C"
13816 #endif
13817 /* We use char because int might match the return type of a gcc2
13818    builtin and then its argument prototype would still apply.  */
13819 char xmlParseChunk ();
13820 #ifdef F77_DUMMY_MAIN
13821 #  ifdef __cplusplus
13822      extern "C"
13823 #  endif
13824    int F77_DUMMY_MAIN() { return 1; }
13825 #endif
13826 int
13827 main ()
13828 {
13829 xmlParseChunk ();
13830   ;
13831   return 0;
13832 }
13833 _ACEOF
13834 rm -f conftest.$ac_objext conftest$ac_exeext
13835 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13836   (eval $ac_link) 2>&5
13837   ac_status=$?
13838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13839   (exit $ac_status); } &&
13840          { ac_try='test -s conftest$ac_exeext'
13841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13842   (eval $ac_try) 2>&5
13843   ac_status=$?
13844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13845   (exit $ac_status); }; }; then
13846   ac_cv_lib_c_xmlParseChunk=yes
13847 else
13848   echo "$as_me: failed program was:" >&5
13849 cat conftest.$ac_ext >&5
13850 ac_cv_lib_c_xmlParseChunk=no
13851 fi
13852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13853 LIBS=$ac_check_lib_save_LIBS
13854 fi
13855 echo "$as_me:$LINENO: result: $ac_cv_lib_c_xmlParseChunk" >&5
13856 echo "${ECHO_T}$ac_cv_lib_c_xmlParseChunk" >&6
13857 if test $ac_cv_lib_c_xmlParseChunk = yes; then
13858   have_xml=yes
13859                     xml_halfassed=no
13860                     XML_LIBS="$ac_xml_config_libs"
13861                     cat >>confdefs.h <<\_ACEOF
13862 #define HAVE_XML 1
13863 _ACEOF
13864
13865 else
13866   true
13867 fi
13868
13869   CPPFLAGS="$ac_save_CPPFLAGS"
13870   LDFLAGS="$ac_save_LDFLAGS"
13871 #  LIBS="$ac_save_LIBS"
13872
13873   fi
13874
13875   if test "$have_xml" = yes; then
13876     INCLUDES="$INCLUDES $ac_xml_config_cflags"
13877     GTK_LIBS="$GTK_LIBS $ac_xml_config_libs"
13878     cat >>confdefs.h <<\_ACEOF
13879 #define HAVE_XML 1
13880 _ACEOF
13881
13882     if test "$have_old_xml" = yes; then
13883       cat >>confdefs.h <<\_ACEOF
13884 #define HAVE_OLD_XML_HEADERS 1
13885 _ACEOF
13886
13887     fi
13888   fi
13889
13890 fi
13891
13892
13893 ###############################################################################
13894 #
13895 #       Checking whether Motif is really Lesstif.
13896 #
13897 ###############################################################################
13898
13899 have_lesstif=no
13900 if test "$have_motif" = yes ; then
13901   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
13902 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
13903 if test "${ac_cv_have_lesstif+set}" = set; then
13904   echo $ECHO_N "(cached) $ECHO_C" >&6
13905 else
13906
13907   ac_save_CPPFLAGS="$CPPFLAGS"
13908   if test \! -z "$includedir" ; then
13909     CPPFLAGS="$CPPFLAGS -I$includedir"
13910   fi
13911   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13912   cat >conftest.$ac_ext <<_ACEOF
13913 #line $LINENO "configure"
13914 #include "confdefs.h"
13915 #include <Xm/Xm.h>
13916 #ifdef F77_DUMMY_MAIN
13917 #  ifdef __cplusplus
13918      extern "C"
13919 #  endif
13920    int F77_DUMMY_MAIN() { return 1; }
13921 #endif
13922 int
13923 main ()
13924 {
13925 long vers = LesstifVersion;
13926   ;
13927   return 0;
13928 }
13929 _ACEOF
13930 rm -f conftest.$ac_objext
13931 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13932   (eval $ac_compile) 2>&5
13933   ac_status=$?
13934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13935   (exit $ac_status); } &&
13936          { ac_try='test -s conftest.$ac_objext'
13937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13938   (eval $ac_try) 2>&5
13939   ac_status=$?
13940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13941   (exit $ac_status); }; }; then
13942   ac_cv_have_lesstif=yes
13943 else
13944   echo "$as_me: failed program was:" >&5
13945 cat conftest.$ac_ext >&5
13946 ac_cv_have_lesstif=no
13947 fi
13948 rm -f conftest.$ac_objext conftest.$ac_ext
13949   CPPFLAGS="$ac_save_CPPFLAGS"
13950 fi
13951 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
13952 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
13953   have_lesstif=$ac_cv_have_lesstif
13954 fi
13955
13956
13957 lesstif_version=unknown
13958 lesstif_version_string=unknown
13959
13960 if test "$have_lesstif" = yes ; then
13961   ltv=unknown
13962   echo unknown > conftest-lt
13963   echo "$as_me:$LINENO: checking LessTif version number" >&5
13964 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
13965 if test "${ac_cv_lesstif_version_string+set}" = set; then
13966   echo $ECHO_N "(cached) $ECHO_C" >&6
13967 else
13968
13969   ac_save_CPPFLAGS="$CPPFLAGS"
13970   if test \! -z "$includedir" ; then
13971     CPPFLAGS="$CPPFLAGS -I$includedir"
13972   fi
13973   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13974   if test "$cross_compiling" = yes; then
13975   ac_cv_lesstif_version=unknown
13976                      ac_cv_lesstif_version_string=unknown
13977 else
13978   cat >conftest.$ac_ext <<_ACEOF
13979 #line $LINENO "configure"
13980 #include "confdefs.h"
13981 #include <stdio.h>
13982                      #include <Xm/Xm.h>
13983                      int main() {
13984                        FILE *f = fopen("conftest-lt", "w");
13985                        if (!f) exit(1);
13986                        fprintf(f, "%d %d.%d\n", LesstifVersion,
13987                           LESSTIF_VERSION, LESSTIF_REVISION);
13988                        fclose(f);
13989                        exit(0);
13990                      }
13991 _ACEOF
13992 rm -f conftest$ac_exeext
13993 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13994   (eval $ac_link) 2>&5
13995   ac_status=$?
13996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13997   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13999   (eval $ac_try) 2>&5
14000   ac_status=$?
14001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14002   (exit $ac_status); }; }; then
14003   ltv=`cat conftest-lt`
14004                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
14005                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
14006 else
14007   echo "$as_me: program exited with status $ac_status" >&5
14008 echo "$as_me: failed program was:" >&5
14009 cat conftest.$ac_ext >&5
14010 ( exit $ac_status )
14011 ac_cv_lesstif_version=unknown
14012                      ac_cv_lesstif_version_string=unknown
14013 fi
14014 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14015 fi
14016   CPPFLAGS="$ac_save_CPPFLAGS"
14017 fi
14018 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
14019 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
14020   rm -f conftest-lt
14021   lesstif_version=$ac_cv_lesstif_version
14022   lesstif_version_string=$ac_cv_lesstif_version_string
14023
14024 fi
14025
14026
14027 if test "$have_motif" = yes ; then
14028   mtv=unknown
14029   echo unknown > conftest-mt
14030   echo "$as_me:$LINENO: checking Motif version number" >&5
14031 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
14032 if test "${ac_cv_motif_version_string+set}" = set; then
14033   echo $ECHO_N "(cached) $ECHO_C" >&6
14034 else
14035
14036   ac_save_CPPFLAGS="$CPPFLAGS"
14037   if test \! -z "$includedir" ; then
14038     CPPFLAGS="$CPPFLAGS -I$includedir"
14039   fi
14040   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14041   if test "$cross_compiling" = yes; then
14042   ac_cv_motif_version=unknown
14043                      ac_cv_motif_version_string=unknown
14044 else
14045   cat >conftest.$ac_ext <<_ACEOF
14046 #line $LINENO "configure"
14047 #include "confdefs.h"
14048 #include <stdio.h>
14049                      #include <Xm/Xm.h>
14050                      int main() {
14051                        FILE *f = fopen("conftest-mt", "w");
14052                        if (!f) exit(1);
14053                        fprintf(f, "%d %d.%d\n", XmVersion,
14054                           XmVERSION, XmREVISION);
14055                        fclose(f);
14056                        exit(0);
14057                      }
14058 _ACEOF
14059 rm -f conftest$ac_exeext
14060 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14061   (eval $ac_link) 2>&5
14062   ac_status=$?
14063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14064   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14065   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14066   (eval $ac_try) 2>&5
14067   ac_status=$?
14068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14069   (exit $ac_status); }; }; then
14070   mtv=`cat conftest-mt`
14071                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
14072                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
14073 else
14074   echo "$as_me: program exited with status $ac_status" >&5
14075 echo "$as_me: failed program was:" >&5
14076 cat conftest.$ac_ext >&5
14077 ( exit $ac_status )
14078 ac_cv_motif_version=unknown
14079                      ac_cv_motif_version_string=unknown
14080 fi
14081 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14082 fi
14083   CPPFLAGS="$ac_save_CPPFLAGS"
14084 fi
14085 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
14086 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
14087   rm -f conftest-mt
14088   motif_version=$ac_cv_motif_version
14089   motif_version_string=$ac_cv_motif_version_string
14090
14091 fi
14092
14093
14094 ###############################################################################
14095 #
14096 #       Checking whether Motif requires -lXpm.
14097 #
14098 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
14099 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
14100 #       of the library whether to build the XPM code into libXm, or whether
14101 #       to rely on an external libXm.  So the only way to tell whether XPM is
14102 #       a link-time requirement is to examine libXm.a, which is very
14103 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
14104 #       always link against XPM if the XPM lib exists (and this will be a
14105 #       no-op if libXm happens to already have the XPM code in it.)
14106 #
14107 ###############################################################################
14108
14109 motif_requires_xpm=no
14110 if test "$have_motif" = yes ; then
14111    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
14112 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
14113    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
14114    then
14115      motif_requires_xpm=yes
14116      echo "$as_me:$LINENO: result: maybe" >&5
14117 echo "${ECHO_T}maybe" >&6
14118    else
14119      echo "$as_me:$LINENO: result: no" >&5
14120 echo "${ECHO_T}no" >&6
14121    fi
14122 fi
14123
14124
14125 ###############################################################################
14126 #
14127 #       Checking whether Motif requires -lXp.
14128 #
14129 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
14130 #       Extension".   Why this extension isn't in -lXext with all the others,
14131 #       I have no idea.
14132 #
14133 ###############################################################################
14134
14135 have_xp_ext=no
14136 if test "$have_motif" = yes ; then
14137    have_xp_ext=no
14138
14139   ac_save_CPPFLAGS="$CPPFLAGS"
14140   ac_save_LDFLAGS="$LDFLAGS"
14141 #  ac_save_LIBS="$LIBS"
14142
14143   if test \! -z "$includedir" ; then
14144     CPPFLAGS="$CPPFLAGS -I$includedir"
14145   fi
14146   # note: $X_CFLAGS includes $x_includes
14147   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14148
14149   if test \! -z "$libdir" ; then
14150     LDFLAGS="$LDFLAGS -L$libdir"
14151   fi
14152   # note: $X_LIBS includes $x_libraries
14153   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14154
14155   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
14156 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
14157 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
14158   echo $ECHO_N "(cached) $ECHO_C" >&6
14159 else
14160   ac_check_lib_save_LIBS=$LIBS
14161 LIBS="-lXp -lX11 -lXext -lm $LIBS"
14162 cat >conftest.$ac_ext <<_ACEOF
14163 #line $LINENO "configure"
14164 #include "confdefs.h"
14165
14166 /* Override any gcc2 internal prototype to avoid an error.  */
14167 #ifdef __cplusplus
14168 extern "C"
14169 #endif
14170 /* We use char because int might match the return type of a gcc2
14171    builtin and then its argument prototype would still apply.  */
14172 char XpQueryExtension ();
14173 #ifdef F77_DUMMY_MAIN
14174 #  ifdef __cplusplus
14175      extern "C"
14176 #  endif
14177    int F77_DUMMY_MAIN() { return 1; }
14178 #endif
14179 int
14180 main ()
14181 {
14182 XpQueryExtension ();
14183   ;
14184   return 0;
14185 }
14186 _ACEOF
14187 rm -f conftest.$ac_objext conftest$ac_exeext
14188 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14189   (eval $ac_link) 2>&5
14190   ac_status=$?
14191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14192   (exit $ac_status); } &&
14193          { ac_try='test -s conftest$ac_exeext'
14194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14195   (eval $ac_try) 2>&5
14196   ac_status=$?
14197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14198   (exit $ac_status); }; }; then
14199   ac_cv_lib_Xp_XpQueryExtension=yes
14200 else
14201   echo "$as_me: failed program was:" >&5
14202 cat conftest.$ac_ext >&5
14203 ac_cv_lib_Xp_XpQueryExtension=no
14204 fi
14205 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14206 LIBS=$ac_check_lib_save_LIBS
14207 fi
14208 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
14209 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
14210 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
14211   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
14212 else
14213   true
14214 fi
14215
14216   CPPFLAGS="$ac_save_CPPFLAGS"
14217   LDFLAGS="$ac_save_LDFLAGS"
14218 #  LIBS="$ac_save_LIBS"
14219
14220 fi
14221
14222
14223 ###############################################################################
14224 #
14225 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
14226 #
14227 ###############################################################################
14228
14229 have_xintl=no
14230 if test "$have_motif" = yes ; then
14231
14232   ac_save_CPPFLAGS="$CPPFLAGS"
14233   ac_save_LDFLAGS="$LDFLAGS"
14234 #  ac_save_LIBS="$LIBS"
14235
14236   if test \! -z "$includedir" ; then
14237     CPPFLAGS="$CPPFLAGS -I$includedir"
14238   fi
14239   # note: $X_CFLAGS includes $x_includes
14240   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14241
14242   if test \! -z "$libdir" ; then
14243     LDFLAGS="$LDFLAGS -L$libdir"
14244   fi
14245   # note: $X_LIBS includes $x_libraries
14246   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14247
14248   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
14249 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
14250 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
14251   echo $ECHO_N "(cached) $ECHO_C" >&6
14252 else
14253   ac_check_lib_save_LIBS=$LIBS
14254 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
14255 cat >conftest.$ac_ext <<_ACEOF
14256 #line $LINENO "configure"
14257 #include "confdefs.h"
14258
14259 /* Override any gcc2 internal prototype to avoid an error.  */
14260 #ifdef __cplusplus
14261 extern "C"
14262 #endif
14263 /* We use char because int might match the return type of a gcc2
14264    builtin and then its argument prototype would still apply.  */
14265 char _Xsetlocale ();
14266 #ifdef F77_DUMMY_MAIN
14267 #  ifdef __cplusplus
14268      extern "C"
14269 #  endif
14270    int F77_DUMMY_MAIN() { return 1; }
14271 #endif
14272 int
14273 main ()
14274 {
14275 _Xsetlocale ();
14276   ;
14277   return 0;
14278 }
14279 _ACEOF
14280 rm -f conftest.$ac_objext conftest$ac_exeext
14281 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14282   (eval $ac_link) 2>&5
14283   ac_status=$?
14284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14285   (exit $ac_status); } &&
14286          { ac_try='test -s conftest$ac_exeext'
14287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14288   (eval $ac_try) 2>&5
14289   ac_status=$?
14290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14291   (exit $ac_status); }; }; then
14292   ac_cv_lib_Xintl__Xsetlocale=yes
14293 else
14294   echo "$as_me: failed program was:" >&5
14295 cat conftest.$ac_ext >&5
14296 ac_cv_lib_Xintl__Xsetlocale=no
14297 fi
14298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14299 LIBS=$ac_check_lib_save_LIBS
14300 fi
14301 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
14302 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
14303 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
14304   have_xintl=yes
14305 else
14306   have_xintl=no
14307 fi
14308
14309   CPPFLAGS="$ac_save_CPPFLAGS"
14310   LDFLAGS="$ac_save_LDFLAGS"
14311 #  LIBS="$ac_save_LIBS"
14312
14313   if test "$have_xintl" = yes; then
14314     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
14315   fi
14316 fi
14317
14318
14319 ###############################################################################
14320 #
14321 #       Check for -lGL or -lMesaGL.
14322 #
14323 ###############################################################################
14324
14325 have_gl=no
14326 ac_have_mesa_gl=no
14327 with_gl_req=unspecified
14328 gl_halfassed=no
14329
14330 # Check whether --with-gl or --without-gl was given.
14331 if test "${with_gl+set}" = set; then
14332   withval="$with_gl"
14333   with_gl="$withval"; with_gl_req="$withval"
14334 else
14335   with_gl=yes
14336 fi;
14337
14338
14339    case "$with_gl" in
14340     yes) ;;
14341     no)  ;;
14342
14343     /*)
14344      echo "$as_me:$LINENO: checking for GL headers" >&5
14345 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
14346      d=$with_gl/include
14347      if test -d $d; then
14348        X_CFLAGS="-I$d $X_CFLAGS"
14349        echo "$as_me:$LINENO: result: $d" >&5
14350 echo "${ECHO_T}$d" >&6
14351      else
14352        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14353 echo "${ECHO_T}not found ($d: no such directory)" >&6
14354      fi
14355
14356      echo "$as_me:$LINENO: checking for GL libs" >&5
14357 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
14358      d=$with_gl/lib
14359      if test -d $d; then
14360        X_LIBS="-L$d $X_LIBS"
14361        echo "$as_me:$LINENO: result: $d" >&5
14362 echo "${ECHO_T}$d" >&6
14363      else
14364        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14365 echo "${ECHO_T}not found ($d: no such directory)" >&6
14366      fi
14367
14368      # replace the directory string with "yes".
14369      with_gl_req="yes"
14370      with_gl=$with_gl_req
14371      ;;
14372
14373     *)
14374      echo ""
14375      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
14376      echo "       If it is a directory, then \`DIR/include' will be added to"
14377      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14378      exit 1
14379      ;;
14380    esac
14381
14382
14383 ac_mesagl_version=unknown
14384 ac_mesagl_version_string=unknown
14385
14386 if test "$with_gl" = yes; then
14387
14388   ac_save_CPPFLAGS="$CPPFLAGS"
14389   if test \! -z "$includedir" ; then
14390     CPPFLAGS="$CPPFLAGS -I$includedir"
14391   fi
14392   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14393   if test "${ac_cv_header_GL_gl_h+set}" = set; then
14394   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
14395 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
14396 if test "${ac_cv_header_GL_gl_h+set}" = set; then
14397   echo $ECHO_N "(cached) $ECHO_C" >&6
14398 fi
14399 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
14400 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
14401 else
14402   # Is the header compilable?
14403 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
14404 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
14405 cat >conftest.$ac_ext <<_ACEOF
14406 #line $LINENO "configure"
14407 #include "confdefs.h"
14408 $ac_includes_default
14409 #include <GL/gl.h>
14410 _ACEOF
14411 rm -f conftest.$ac_objext
14412 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14413   (eval $ac_compile) 2>&5
14414   ac_status=$?
14415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14416   (exit $ac_status); } &&
14417          { ac_try='test -s conftest.$ac_objext'
14418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14419   (eval $ac_try) 2>&5
14420   ac_status=$?
14421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14422   (exit $ac_status); }; }; then
14423   ac_header_compiler=yes
14424 else
14425   echo "$as_me: failed program was:" >&5
14426 cat conftest.$ac_ext >&5
14427 ac_header_compiler=no
14428 fi
14429 rm -f conftest.$ac_objext conftest.$ac_ext
14430 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14431 echo "${ECHO_T}$ac_header_compiler" >&6
14432
14433 # Is the header present?
14434 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
14435 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
14436 cat >conftest.$ac_ext <<_ACEOF
14437 #line $LINENO "configure"
14438 #include "confdefs.h"
14439 #include <GL/gl.h>
14440 _ACEOF
14441 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14442   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14443   ac_status=$?
14444   egrep -v '^ *\+' conftest.er1 >conftest.err
14445   rm -f conftest.er1
14446   cat conftest.err >&5
14447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14448   (exit $ac_status); } >/dev/null; then
14449   if test -s conftest.err; then
14450     ac_cpp_err=$ac_c_preproc_warn_flag
14451   else
14452     ac_cpp_err=
14453   fi
14454 else
14455   ac_cpp_err=yes
14456 fi
14457 if test -z "$ac_cpp_err"; then
14458   ac_header_preproc=yes
14459 else
14460   echo "$as_me: failed program was:" >&5
14461   cat conftest.$ac_ext >&5
14462   ac_header_preproc=no
14463 fi
14464 rm -f conftest.err conftest.$ac_ext
14465 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14466 echo "${ECHO_T}$ac_header_preproc" >&6
14467
14468 # So?  What about this header?
14469 case $ac_header_compiler:$ac_header_preproc in
14470   yes:no )
14471     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
14472 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14473     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
14474 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;};;
14475   no:yes )
14476     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
14477 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
14478     { echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5
14479 echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;}
14480     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
14481 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;};;
14482 esac
14483 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
14484 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
14485 if test "${ac_cv_header_GL_gl_h+set}" = set; then
14486   echo $ECHO_N "(cached) $ECHO_C" >&6
14487 else
14488   ac_cv_header_GL_gl_h=$ac_header_preproc
14489 fi
14490 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
14491 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
14492
14493 fi
14494 if test $ac_cv_header_GL_gl_h = yes; then
14495   have_gl=yes
14496 else
14497   have_gl=no
14498 fi
14499
14500
14501   CPPFLAGS="$ac_save_CPPFLAGS"
14502   if test "$have_gl" = yes ; then
14503
14504   ac_save_CPPFLAGS="$CPPFLAGS"
14505   if test \! -z "$includedir" ; then
14506     CPPFLAGS="$CPPFLAGS -I$includedir"
14507   fi
14508   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14509   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
14510 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
14511 if test "${ac_cv_header_GL_glx_h+set}" = set; then
14512   echo $ECHO_N "(cached) $ECHO_C" >&6
14513 else
14514   cat >conftest.$ac_ext <<_ACEOF
14515 #line $LINENO "configure"
14516 #include "confdefs.h"
14517 #include <GL/gl.h>
14518
14519 #include <GL/glx.h>
14520 _ACEOF
14521 rm -f conftest.$ac_objext
14522 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14523   (eval $ac_compile) 2>&5
14524   ac_status=$?
14525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14526   (exit $ac_status); } &&
14527          { ac_try='test -s conftest.$ac_objext'
14528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14529   (eval $ac_try) 2>&5
14530   ac_status=$?
14531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14532   (exit $ac_status); }; }; then
14533   ac_cv_header_GL_glx_h=yes
14534 else
14535   echo "$as_me: failed program was:" >&5
14536 cat conftest.$ac_ext >&5
14537 ac_cv_header_GL_glx_h=no
14538 fi
14539 rm -f conftest.$ac_objext conftest.$ac_ext
14540 fi
14541 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
14542 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
14543 if test $ac_cv_header_GL_glx_h = yes; then
14544   have_gl=yes
14545 else
14546   have_gl=no
14547 fi
14548
14549
14550   CPPFLAGS="$ac_save_CPPFLAGS"
14551   fi
14552
14553   # If we have the headers, try and figure out which vendor it's from.
14554   #
14555   if test "$have_gl" = yes ; then
14556
14557     # We need to know whether it's MesaGL so that we know which libraries
14558     # to link against.
14559     #
14560     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
14561 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
14562 if test "${ac_cv_have_mesa_gl+set}" = set; then
14563   echo $ECHO_N "(cached) $ECHO_C" >&6
14564 else
14565   ac_cv_have_mesa_gl=no
14566
14567   ac_save_CPPFLAGS="$CPPFLAGS"
14568   if test \! -z "$includedir" ; then
14569     CPPFLAGS="$CPPFLAGS -I$includedir"
14570   fi
14571   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14572   cat >conftest.$ac_ext <<_ACEOF
14573 #line $LINENO "configure"
14574 #include "confdefs.h"
14575 #include <GL/glx.h>
14576
14577 _ACEOF
14578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14579   egrep "Mesa|MESA" >/dev/null 2>&1; then
14580   ac_cv_have_mesa_gl=yes
14581 fi
14582 rm -f conftest*
14583
14584   CPPFLAGS="$ac_save_CPPFLAGS"
14585
14586 fi
14587 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
14588 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
14589     ac_have_mesa_gl=$ac_cv_have_mesa_gl
14590
14591
14592     gl_lib_1=""
14593     GL_LIBS=""
14594
14595
14596     # Some versions of MesaGL are compiled to require -lpthread.
14597     # So if the Mesa headers exist, and -lpthread exists, then always
14598     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
14599     #
14600     if test "$ac_have_mesa_gl" = yes; then
14601       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14602 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
14603 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
14604   echo $ECHO_N "(cached) $ECHO_C" >&6
14605 else
14606   ac_check_lib_save_LIBS=$LIBS
14607 LIBS="-lpthread  $LIBS"
14608 cat >conftest.$ac_ext <<_ACEOF
14609 #line $LINENO "configure"
14610 #include "confdefs.h"
14611
14612 /* Override any gcc2 internal prototype to avoid an error.  */
14613 #ifdef __cplusplus
14614 extern "C"
14615 #endif
14616 /* We use char because int might match the return type of a gcc2
14617    builtin and then its argument prototype would still apply.  */
14618 char pthread_create ();
14619 #ifdef F77_DUMMY_MAIN
14620 #  ifdef __cplusplus
14621      extern "C"
14622 #  endif
14623    int F77_DUMMY_MAIN() { return 1; }
14624 #endif
14625 int
14626 main ()
14627 {
14628 pthread_create ();
14629   ;
14630   return 0;
14631 }
14632 _ACEOF
14633 rm -f conftest.$ac_objext conftest$ac_exeext
14634 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14635   (eval $ac_link) 2>&5
14636   ac_status=$?
14637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14638   (exit $ac_status); } &&
14639          { ac_try='test -s conftest$ac_exeext'
14640   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14641   (eval $ac_try) 2>&5
14642   ac_status=$?
14643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14644   (exit $ac_status); }; }; then
14645   ac_cv_lib_pthread_pthread_create=yes
14646 else
14647   echo "$as_me: failed program was:" >&5
14648 cat conftest.$ac_ext >&5
14649 ac_cv_lib_pthread_pthread_create=no
14650 fi
14651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14652 LIBS=$ac_check_lib_save_LIBS
14653 fi
14654 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
14655 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
14656 if test $ac_cv_lib_pthread_pthread_create = yes; then
14657   GL_LIBS="-lpthread"
14658 fi
14659
14660     fi
14661
14662
14663     # If we have Mesa headers, check to see if we can link against -lMesaGL.
14664     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
14665     # Else, warn that GL is busted.  (We have the headers, but no libs.)
14666     #
14667
14668     if test "$ac_have_mesa_gl" = yes ; then
14669
14670   ac_save_CPPFLAGS="$CPPFLAGS"
14671   ac_save_LDFLAGS="$LDFLAGS"
14672 #  ac_save_LIBS="$LIBS"
14673
14674   if test \! -z "$includedir" ; then
14675     CPPFLAGS="$CPPFLAGS -I$includedir"
14676   fi
14677   # note: $X_CFLAGS includes $x_includes
14678   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14679
14680   if test \! -z "$libdir" ; then
14681     LDFLAGS="$LDFLAGS -L$libdir"
14682   fi
14683   # note: $X_LIBS includes $x_libraries
14684   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14685
14686   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
14687 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
14688 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
14689   echo $ECHO_N "(cached) $ECHO_C" >&6
14690 else
14691   ac_check_lib_save_LIBS=$LIBS
14692 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
14693 cat >conftest.$ac_ext <<_ACEOF
14694 #line $LINENO "configure"
14695 #include "confdefs.h"
14696
14697 /* Override any gcc2 internal prototype to avoid an error.  */
14698 #ifdef __cplusplus
14699 extern "C"
14700 #endif
14701 /* We use char because int might match the return type of a gcc2
14702    builtin and then its argument prototype would still apply.  */
14703 char glXCreateContext ();
14704 #ifdef F77_DUMMY_MAIN
14705 #  ifdef __cplusplus
14706      extern "C"
14707 #  endif
14708    int F77_DUMMY_MAIN() { return 1; }
14709 #endif
14710 int
14711 main ()
14712 {
14713 glXCreateContext ();
14714   ;
14715   return 0;
14716 }
14717 _ACEOF
14718 rm -f conftest.$ac_objext conftest$ac_exeext
14719 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14720   (eval $ac_link) 2>&5
14721   ac_status=$?
14722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14723   (exit $ac_status); } &&
14724          { ac_try='test -s conftest$ac_exeext'
14725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14726   (eval $ac_try) 2>&5
14727   ac_status=$?
14728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14729   (exit $ac_status); }; }; then
14730   ac_cv_lib_MesaGL_glXCreateContext=yes
14731 else
14732   echo "$as_me: failed program was:" >&5
14733 cat conftest.$ac_ext >&5
14734 ac_cv_lib_MesaGL_glXCreateContext=no
14735 fi
14736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14737 LIBS=$ac_check_lib_save_LIBS
14738 fi
14739 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
14740 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
14741 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
14742   gl_lib_1="MesaGL"
14743                       GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
14744 fi
14745
14746   CPPFLAGS="$ac_save_CPPFLAGS"
14747   LDFLAGS="$ac_save_LDFLAGS"
14748 #  LIBS="$ac_save_LIBS"
14749
14750     fi
14751
14752     if test "$gl_lib_1" = "" ; then
14753
14754   ac_save_CPPFLAGS="$CPPFLAGS"
14755   ac_save_LDFLAGS="$LDFLAGS"
14756 #  ac_save_LIBS="$LIBS"
14757
14758   if test \! -z "$includedir" ; then
14759     CPPFLAGS="$CPPFLAGS -I$includedir"
14760   fi
14761   # note: $X_CFLAGS includes $x_includes
14762   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14763
14764   if test \! -z "$libdir" ; then
14765     LDFLAGS="$LDFLAGS -L$libdir"
14766   fi
14767   # note: $X_LIBS includes $x_libraries
14768   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14769
14770   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
14771 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
14772 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
14773   echo $ECHO_N "(cached) $ECHO_C" >&6
14774 else
14775   ac_check_lib_save_LIBS=$LIBS
14776 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
14777 cat >conftest.$ac_ext <<_ACEOF
14778 #line $LINENO "configure"
14779 #include "confdefs.h"
14780
14781 /* Override any gcc2 internal prototype to avoid an error.  */
14782 #ifdef __cplusplus
14783 extern "C"
14784 #endif
14785 /* We use char because int might match the return type of a gcc2
14786    builtin and then its argument prototype would still apply.  */
14787 char glXCreateContext ();
14788 #ifdef F77_DUMMY_MAIN
14789 #  ifdef __cplusplus
14790      extern "C"
14791 #  endif
14792    int F77_DUMMY_MAIN() { return 1; }
14793 #endif
14794 int
14795 main ()
14796 {
14797 glXCreateContext ();
14798   ;
14799   return 0;
14800 }
14801 _ACEOF
14802 rm -f conftest.$ac_objext conftest$ac_exeext
14803 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14804   (eval $ac_link) 2>&5
14805   ac_status=$?
14806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14807   (exit $ac_status); } &&
14808          { ac_try='test -s conftest$ac_exeext'
14809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14810   (eval $ac_try) 2>&5
14811   ac_status=$?
14812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14813   (exit $ac_status); }; }; then
14814   ac_cv_lib_GL_glXCreateContext=yes
14815 else
14816   echo "$as_me: failed program was:" >&5
14817 cat conftest.$ac_ext >&5
14818 ac_cv_lib_GL_glXCreateContext=no
14819 fi
14820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14821 LIBS=$ac_check_lib_save_LIBS
14822 fi
14823 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
14824 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
14825 if test $ac_cv_lib_GL_glXCreateContext = yes; then
14826   gl_lib_1="GL"
14827                       GL_LIBS="-lGL -lGLU $GL_LIBS"
14828 fi
14829
14830   CPPFLAGS="$ac_save_CPPFLAGS"
14831   LDFLAGS="$ac_save_LDFLAGS"
14832 #  LIBS="$ac_save_LIBS"
14833
14834     fi
14835
14836     if test "$gl_lib_1" = "" ; then
14837       # we have headers, but no libs -- bail.
14838       have_gl=no
14839       ac_have_mesa_gl=no
14840       gl_halfassed=yes
14841     else
14842       # linking works -- we can build the GL hacks.
14843       cat >>confdefs.h <<\_ACEOF
14844 #define HAVE_GL 1
14845 _ACEOF
14846
14847       if test "$ac_have_mesa_gl" = yes ; then
14848         cat >>confdefs.h <<\_ACEOF
14849 #define HAVE_MESA_GL 1
14850 _ACEOF
14851
14852       fi
14853     fi
14854   fi
14855
14856
14857   # Now that we know we have GL headers and libs, do some more GL testing.
14858   #
14859
14860   if test "$have_gl" = yes ; then
14861     # If it's MesaGL, we'd like to issue a warning if the version number
14862     # is less than or equal to 2.6, because that version had a security bug.
14863     #
14864     if test "$ac_have_mesa_gl" = yes; then
14865
14866       echo "$as_me:$LINENO: checking MesaGL version number" >&5
14867 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
14868 if test "${ac_cv_mesagl_version_string+set}" = set; then
14869   echo $ECHO_N "(cached) $ECHO_C" >&6
14870 else
14871   cat > conftest.$ac_ext <<EOF
14872 #line 14878 "configure"
14873 #include "confdefs.h"
14874 #include <GL/gl.h>
14875 #ifndef MESA_MAJOR_VERSION
14876 # include <GL/xmesa.h>
14877 # ifdef XMESA_MAJOR_VERSION
14878    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
14879       we have to check the XMesa version number (the number of the X protocol
14880       support, which seems to be the same as the Mesa version number.)
14881     */
14882 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
14883 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
14884 # else
14885    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
14886       so we have no way of telling what version of Mesa this is at all.
14887       So, we'll guess that the osmesa version (the "offscreen protocol")
14888       is less than or equal to the real mesa version number.  Except that
14889       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
14890       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
14891     */
14892 # include <GL/osmesa.h>
14893 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
14894 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
14895 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
14896 #   undef MESA_MINOR_VERSION
14897 #   define MESA_MINOR_VERSION 4 or newer, probably?
14898 #  endif
14899 # endif
14900 #endif
14901 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
14902 EOF
14903
14904          ac_save_CPPFLAGS="$CPPFLAGS"
14905          if test \! -z "$includedir" ; then
14906            CPPFLAGS="$CPPFLAGS -I$includedir"
14907          fi
14908          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14909
14910          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
14911
14912          # M4 sucks!!
14913
14914           mglv=`echo "$mglv" | sed -n \
14915              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
14916
14917
14918          rm -f conftest.$ac_ext
14919
14920          CPPFLAGS="$ac_save_CPPFLAGS"
14921
14922          if test "$mglv" = ""; then
14923            ac_mesagl_version=unknown
14924            ac_mesagl_version_string=unknown
14925          else
14926            ac_mesagl_version_string="$mglv"
14927            # M4 sucks!!
14928
14929            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
14930            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
14931
14932            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
14933            if test -z "$ac_mesagl_version"; then
14934              ac_mesagl_version=unknown
14935              ac_mesagl_version_string=unknown
14936            fi
14937          fi
14938          ac_cv_mesagl_version=$ac_mesagl_version
14939          ac_cv_mesagl_version_string=$ac_mesagl_version_string
14940
14941 fi
14942 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
14943 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
14944       ac_mesagl_version=$ac_cv_mesagl_version
14945       ac_mesagl_version_string=$ac_cv_mesagl_version_string
14946     fi
14947
14948
14949     # Check for OpenGL 1.1 features.
14950     #
14951
14952   ac_save_CPPFLAGS="$CPPFLAGS"
14953   ac_save_LDFLAGS="$LDFLAGS"
14954 #  ac_save_LIBS="$LIBS"
14955
14956   if test \! -z "$includedir" ; then
14957     CPPFLAGS="$CPPFLAGS -I$includedir"
14958   fi
14959   # note: $X_CFLAGS includes $x_includes
14960   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14961
14962   if test \! -z "$libdir" ; then
14963     LDFLAGS="$LDFLAGS -L$libdir"
14964   fi
14965   # note: $X_LIBS includes $x_libraries
14966   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14967
14968   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
14969 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
14970 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
14971 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14972   echo $ECHO_N "(cached) $ECHO_C" >&6
14973 else
14974   ac_check_lib_save_LIBS=$LIBS
14975 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
14976 cat >conftest.$ac_ext <<_ACEOF
14977 #line $LINENO "configure"
14978 #include "confdefs.h"
14979
14980 /* Override any gcc2 internal prototype to avoid an error.  */
14981 #ifdef __cplusplus
14982 extern "C"
14983 #endif
14984 /* We use char because int might match the return type of a gcc2
14985    builtin and then its argument prototype would still apply.  */
14986 char glBindTexture ();
14987 #ifdef F77_DUMMY_MAIN
14988 #  ifdef __cplusplus
14989      extern "C"
14990 #  endif
14991    int F77_DUMMY_MAIN() { return 1; }
14992 #endif
14993 int
14994 main ()
14995 {
14996 glBindTexture ();
14997   ;
14998   return 0;
14999 }
15000 _ACEOF
15001 rm -f conftest.$ac_objext conftest$ac_exeext
15002 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15003   (eval $ac_link) 2>&5
15004   ac_status=$?
15005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15006   (exit $ac_status); } &&
15007          { ac_try='test -s conftest$ac_exeext'
15008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15009   (eval $ac_try) 2>&5
15010   ac_status=$?
15011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15012   (exit $ac_status); }; }; then
15013   eval "$as_ac_Lib=yes"
15014 else
15015   echo "$as_me: failed program was:" >&5
15016 cat conftest.$ac_ext >&5
15017 eval "$as_ac_Lib=no"
15018 fi
15019 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15020 LIBS=$ac_check_lib_save_LIBS
15021 fi
15022 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15023 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15024 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15025   cat >>confdefs.h <<\_ACEOF
15026 #define HAVE_GLBINDTEXTURE 1
15027 _ACEOF
15028
15029 else
15030   true
15031 fi
15032
15033   CPPFLAGS="$ac_save_CPPFLAGS"
15034   LDFLAGS="$ac_save_LDFLAGS"
15035 #  LIBS="$ac_save_LIBS"
15036
15037   fi
15038
15039 elif test "$with_gl" != no; then
15040   echo "error: must be yes or no: --with-gl=$with_gl"
15041   exit 1
15042 fi
15043
15044
15045 ###############################################################################
15046 #
15047 #       Check for -lgle.
15048 #
15049 ###############################################################################
15050
15051 have_gle=no
15052 with_gle_req=unspecified
15053 gle_halfassed=no
15054
15055 # Check whether --with-gle or --without-gle was given.
15056 if test "${with_gle+set}" = set; then
15057   withval="$with_gle"
15058   with_gle="$withval"; with_gle_req="$withval"
15059 else
15060   with_gle=yes
15061 fi;
15062
15063
15064    case "$with_gle" in
15065     yes) ;;
15066     no)  ;;
15067
15068     /*)
15069      echo "$as_me:$LINENO: checking for GLE headers" >&5
15070 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
15071      d=$with_gle/include
15072      if test -d $d; then
15073        X_CFLAGS="-I$d $X_CFLAGS"
15074        echo "$as_me:$LINENO: result: $d" >&5
15075 echo "${ECHO_T}$d" >&6
15076      else
15077        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15078 echo "${ECHO_T}not found ($d: no such directory)" >&6
15079      fi
15080
15081      echo "$as_me:$LINENO: checking for GLE libs" >&5
15082 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
15083      d=$with_gle/lib
15084      if test -d $d; then
15085        X_LIBS="-L$d $X_LIBS"
15086        echo "$as_me:$LINENO: result: $d" >&5
15087 echo "${ECHO_T}$d" >&6
15088      else
15089        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15090 echo "${ECHO_T}not found ($d: no such directory)" >&6
15091      fi
15092
15093      # replace the directory string with "yes".
15094      with_gle_req="yes"
15095      with_gle=$with_gle_req
15096      ;;
15097
15098     *)
15099      echo ""
15100      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
15101      echo "       If it is a directory, then \`DIR/include' will be added to"
15102      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15103      exit 1
15104      ;;
15105    esac
15106
15107
15108 GLE_LIBS=""
15109
15110 if test "$have_gl" = no ; then
15111  true
15112 elif test "$with_gle" = yes; then
15113
15114
15115   ac_save_CPPFLAGS="$CPPFLAGS"
15116   if test \! -z "$includedir" ; then
15117     CPPFLAGS="$CPPFLAGS -I$includedir"
15118   fi
15119   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15120   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
15121 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
15122 if test "${ac_cv_header_GL_gle_h+set}" = set; then
15123   echo $ECHO_N "(cached) $ECHO_C" >&6
15124 else
15125   cat >conftest.$ac_ext <<_ACEOF
15126 #line $LINENO "configure"
15127 #include "confdefs.h"
15128 #include <GL/gl.h>
15129
15130 #include <GL/gle.h>
15131 _ACEOF
15132 rm -f conftest.$ac_objext
15133 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15134   (eval $ac_compile) 2>&5
15135   ac_status=$?
15136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15137   (exit $ac_status); } &&
15138          { ac_try='test -s conftest.$ac_objext'
15139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15140   (eval $ac_try) 2>&5
15141   ac_status=$?
15142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15143   (exit $ac_status); }; }; then
15144   ac_cv_header_GL_gle_h=yes
15145 else
15146   echo "$as_me: failed program was:" >&5
15147 cat conftest.$ac_ext >&5
15148 ac_cv_header_GL_gle_h=no
15149 fi
15150 rm -f conftest.$ac_objext conftest.$ac_ext
15151 fi
15152 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
15153 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
15154 if test $ac_cv_header_GL_gle_h = yes; then
15155   have_gle3=yes
15156 else
15157   have_gle3=no
15158 fi
15159
15160
15161   CPPFLAGS="$ac_save_CPPFLAGS"
15162   if test "$have_gle3" = yes ; then
15163     have_gle=yes;
15164   else
15165
15166   ac_save_CPPFLAGS="$CPPFLAGS"
15167   if test \! -z "$includedir" ; then
15168     CPPFLAGS="$CPPFLAGS -I$includedir"
15169   fi
15170   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15171   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
15172 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
15173 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
15174   echo $ECHO_N "(cached) $ECHO_C" >&6
15175 else
15176   cat >conftest.$ac_ext <<_ACEOF
15177 #line $LINENO "configure"
15178 #include "confdefs.h"
15179 #include <GL/gl.h>
15180
15181 #include <GL/gutil.h>
15182 _ACEOF
15183 rm -f conftest.$ac_objext
15184 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15185   (eval $ac_compile) 2>&5
15186   ac_status=$?
15187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15188   (exit $ac_status); } &&
15189          { ac_try='test -s conftest.$ac_objext'
15190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15191   (eval $ac_try) 2>&5
15192   ac_status=$?
15193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15194   (exit $ac_status); }; }; then
15195   ac_cv_header_GL_gutil_h=yes
15196 else
15197   echo "$as_me: failed program was:" >&5
15198 cat conftest.$ac_ext >&5
15199 ac_cv_header_GL_gutil_h=no
15200 fi
15201 rm -f conftest.$ac_objext conftest.$ac_ext
15202 fi
15203 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
15204 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
15205 if test $ac_cv_header_GL_gutil_h = yes; then
15206   have_gle=yes
15207 else
15208   have_gle=no
15209 fi
15210
15211
15212   CPPFLAGS="$ac_save_CPPFLAGS"
15213     if test "$have_gle" = yes ; then
15214
15215   ac_save_CPPFLAGS="$CPPFLAGS"
15216   if test \! -z "$includedir" ; then
15217     CPPFLAGS="$CPPFLAGS -I$includedir"
15218   fi
15219   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15220   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
15221 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
15222 if test "${ac_cv_header_GL_tube_h+set}" = set; then
15223   echo $ECHO_N "(cached) $ECHO_C" >&6
15224 else
15225   cat >conftest.$ac_ext <<_ACEOF
15226 #line $LINENO "configure"
15227 #include "confdefs.h"
15228 #include <GL/gl.h>
15229
15230 #include <GL/tube.h>
15231 _ACEOF
15232 rm -f conftest.$ac_objext
15233 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15234   (eval $ac_compile) 2>&5
15235   ac_status=$?
15236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15237   (exit $ac_status); } &&
15238          { ac_try='test -s conftest.$ac_objext'
15239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15240   (eval $ac_try) 2>&5
15241   ac_status=$?
15242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15243   (exit $ac_status); }; }; then
15244   ac_cv_header_GL_tube_h=yes
15245 else
15246   echo "$as_me: failed program was:" >&5
15247 cat conftest.$ac_ext >&5
15248 ac_cv_header_GL_tube_h=no
15249 fi
15250 rm -f conftest.$ac_objext conftest.$ac_ext
15251 fi
15252 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
15253 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
15254 if test $ac_cv_header_GL_tube_h = yes; then
15255   have_gle=yes
15256 else
15257   have_gle=no
15258 fi
15259
15260
15261   CPPFLAGS="$ac_save_CPPFLAGS"
15262     fi
15263   fi
15264
15265   if test "$have_gle" = yes ; then
15266     have_gle=no
15267     gle_halfassed=yes
15268
15269   ac_save_CPPFLAGS="$CPPFLAGS"
15270   ac_save_LDFLAGS="$LDFLAGS"
15271 #  ac_save_LIBS="$LIBS"
15272
15273   if test \! -z "$includedir" ; then
15274     CPPFLAGS="$CPPFLAGS -I$includedir"
15275   fi
15276   # note: $X_CFLAGS includes $x_includes
15277   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15278
15279   if test \! -z "$libdir" ; then
15280     LDFLAGS="$LDFLAGS -L$libdir"
15281   fi
15282   # note: $X_LIBS includes $x_libraries
15283   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15284
15285   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
15286 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
15287 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
15288   echo $ECHO_N "(cached) $ECHO_C" >&6
15289 else
15290   ac_check_lib_save_LIBS=$LIBS
15291 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
15292 cat >conftest.$ac_ext <<_ACEOF
15293 #line $LINENO "configure"
15294 #include "confdefs.h"
15295
15296 /* Override any gcc2 internal prototype to avoid an error.  */
15297 #ifdef __cplusplus
15298 extern "C"
15299 #endif
15300 /* We use char because int might match the return type of a gcc2
15301    builtin and then its argument prototype would still apply.  */
15302 char gleCreateGC ();
15303 #ifdef F77_DUMMY_MAIN
15304 #  ifdef __cplusplus
15305      extern "C"
15306 #  endif
15307    int F77_DUMMY_MAIN() { return 1; }
15308 #endif
15309 int
15310 main ()
15311 {
15312 gleCreateGC ();
15313   ;
15314   return 0;
15315 }
15316 _ACEOF
15317 rm -f conftest.$ac_objext conftest$ac_exeext
15318 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15319   (eval $ac_link) 2>&5
15320   ac_status=$?
15321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15322   (exit $ac_status); } &&
15323          { ac_try='test -s conftest$ac_exeext'
15324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15325   (eval $ac_try) 2>&5
15326   ac_status=$?
15327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15328   (exit $ac_status); }; }; then
15329   ac_cv_lib_gle_gleCreateGC=yes
15330 else
15331   echo "$as_me: failed program was:" >&5
15332 cat conftest.$ac_ext >&5
15333 ac_cv_lib_gle_gleCreateGC=no
15334 fi
15335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15336 LIBS=$ac_check_lib_save_LIBS
15337 fi
15338 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
15339 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
15340 if test $ac_cv_lib_gle_gleCreateGC = yes; then
15341   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
15342 fi
15343
15344   CPPFLAGS="$ac_save_CPPFLAGS"
15345   LDFLAGS="$ac_save_LDFLAGS"
15346 #  LIBS="$ac_save_LIBS"
15347
15348   fi
15349   if test "$have_gle" = yes ; then
15350     have_gle=no
15351     gle_halfassed=yes
15352
15353     # sometimes the libmatrix stuff is included in libgle.  look there first.
15354 #
15355 # I don't get it.  For some reason, this test passes on SGI, as if
15356 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
15357 # Yet the link is succeeding.  Why???
15358 #
15359 #    AC_CHECK_X_LIB(gle, uview_direction_d,
15360 #                   [have_gle=yes; gle_halfassed=no],
15361 #                   [], $GL_LIBS -lX11 -lXext -lm)
15362
15363     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
15364     # *sigh*
15365     if test "$have_gle3" = yes ; then
15366
15367   ac_save_CPPFLAGS="$CPPFLAGS"
15368   ac_save_LDFLAGS="$LDFLAGS"
15369 #  ac_save_LIBS="$LIBS"
15370
15371   if test \! -z "$includedir" ; then
15372     CPPFLAGS="$CPPFLAGS -I$includedir"
15373   fi
15374   # note: $X_CFLAGS includes $x_includes
15375   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15376
15377   if test \! -z "$libdir" ; then
15378     LDFLAGS="$LDFLAGS -L$libdir"
15379   fi
15380   # note: $X_LIBS includes $x_libraries
15381   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15382
15383   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
15384 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
15385 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
15386   echo $ECHO_N "(cached) $ECHO_C" >&6
15387 else
15388   ac_check_lib_save_LIBS=$LIBS
15389 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
15390 cat >conftest.$ac_ext <<_ACEOF
15391 #line $LINENO "configure"
15392 #include "confdefs.h"
15393
15394 /* Override any gcc2 internal prototype to avoid an error.  */
15395 #ifdef __cplusplus
15396 extern "C"
15397 #endif
15398 /* We use char because int might match the return type of a gcc2
15399    builtin and then its argument prototype would still apply.  */
15400 char uview_direction ();
15401 #ifdef F77_DUMMY_MAIN
15402 #  ifdef __cplusplus
15403      extern "C"
15404 #  endif
15405    int F77_DUMMY_MAIN() { return 1; }
15406 #endif
15407 int
15408 main ()
15409 {
15410 uview_direction ();
15411   ;
15412   return 0;
15413 }
15414 _ACEOF
15415 rm -f conftest.$ac_objext conftest$ac_exeext
15416 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15417   (eval $ac_link) 2>&5
15418   ac_status=$?
15419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15420   (exit $ac_status); } &&
15421          { ac_try='test -s conftest$ac_exeext'
15422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15423   (eval $ac_try) 2>&5
15424   ac_status=$?
15425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15426   (exit $ac_status); }; }; then
15427   ac_cv_lib_gle_uview_direction=yes
15428 else
15429   echo "$as_me: failed program was:" >&5
15430 cat conftest.$ac_ext >&5
15431 ac_cv_lib_gle_uview_direction=no
15432 fi
15433 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15434 LIBS=$ac_check_lib_save_LIBS
15435 fi
15436 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
15437 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
15438 if test $ac_cv_lib_gle_uview_direction = yes; then
15439   have_gle=yes; gle_halfassed=no
15440 fi
15441
15442   CPPFLAGS="$ac_save_CPPFLAGS"
15443   LDFLAGS="$ac_save_LDFLAGS"
15444 #  LIBS="$ac_save_LIBS"
15445
15446     fi
15447     # if it wasn't in libgle, then look in libmatrix.
15448     if test "$have_gle" = no ; then
15449
15450   ac_save_CPPFLAGS="$CPPFLAGS"
15451   ac_save_LDFLAGS="$LDFLAGS"
15452 #  ac_save_LIBS="$LIBS"
15453
15454   if test \! -z "$includedir" ; then
15455     CPPFLAGS="$CPPFLAGS -I$includedir"
15456   fi
15457   # note: $X_CFLAGS includes $x_includes
15458   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15459
15460   if test \! -z "$libdir" ; then
15461     LDFLAGS="$LDFLAGS -L$libdir"
15462   fi
15463   # note: $X_LIBS includes $x_libraries
15464   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15465
15466   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
15467 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
15468 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
15469   echo $ECHO_N "(cached) $ECHO_C" >&6
15470 else
15471   ac_check_lib_save_LIBS=$LIBS
15472 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
15473 cat >conftest.$ac_ext <<_ACEOF
15474 #line $LINENO "configure"
15475 #include "confdefs.h"
15476
15477 /* Override any gcc2 internal prototype to avoid an error.  */
15478 #ifdef __cplusplus
15479 extern "C"
15480 #endif
15481 /* We use char because int might match the return type of a gcc2
15482    builtin and then its argument prototype would still apply.  */
15483 char uview_direction_d ();
15484 #ifdef F77_DUMMY_MAIN
15485 #  ifdef __cplusplus
15486      extern "C"
15487 #  endif
15488    int F77_DUMMY_MAIN() { return 1; }
15489 #endif
15490 int
15491 main ()
15492 {
15493 uview_direction_d ();
15494   ;
15495   return 0;
15496 }
15497 _ACEOF
15498 rm -f conftest.$ac_objext conftest$ac_exeext
15499 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15500   (eval $ac_link) 2>&5
15501   ac_status=$?
15502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15503   (exit $ac_status); } &&
15504          { ac_try='test -s conftest$ac_exeext'
15505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15506   (eval $ac_try) 2>&5
15507   ac_status=$?
15508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15509   (exit $ac_status); }; }; then
15510   ac_cv_lib_matrix_uview_direction_d=yes
15511 else
15512   echo "$as_me: failed program was:" >&5
15513 cat conftest.$ac_ext >&5
15514 ac_cv_lib_matrix_uview_direction_d=no
15515 fi
15516 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15517 LIBS=$ac_check_lib_save_LIBS
15518 fi
15519 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
15520 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
15521 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
15522   have_gle=yes; gle_halfassed=no;
15523                       GLE_LIBS="$GLE_LIBS -lmatrix"
15524 fi
15525
15526   CPPFLAGS="$ac_save_CPPFLAGS"
15527   LDFLAGS="$ac_save_LDFLAGS"
15528 #  LIBS="$ac_save_LIBS"
15529
15530     fi
15531   fi
15532
15533   if test "$have_gle" = yes ; then
15534     cat >>confdefs.h <<\_ACEOF
15535 #define HAVE_GLE 1
15536 _ACEOF
15537
15538     if test "$have_gle3" = yes ; then
15539       cat >>confdefs.h <<\_ACEOF
15540 #define HAVE_GLE3 1
15541 _ACEOF
15542
15543     fi
15544   fi
15545
15546 elif test "$with_gle" != no; then
15547   echo "error: must be yes or no: --with-gle=$with_gle"
15548   exit 1
15549
15550 fi
15551
15552
15553
15554 ###############################################################################
15555 #
15556 #       Check for -lXpm.
15557 #
15558 ###############################################################################
15559
15560 have_xpm=no
15561 with_xpm_req=unspecified
15562
15563 # Check whether --with-xpm or --without-xpm was given.
15564 if test "${with_xpm+set}" = set; then
15565   withval="$with_xpm"
15566   with_xpm="$withval"; with_xpm_req="$withval"
15567 else
15568   with_xpm=yes
15569 fi;
15570
15571
15572    case "$with_xpm" in
15573     yes) ;;
15574     no)  ;;
15575
15576     /*)
15577      echo "$as_me:$LINENO: checking for XPM headers" >&5
15578 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
15579      d=$with_xpm/include
15580      if test -d $d; then
15581        X_CFLAGS="-I$d $X_CFLAGS"
15582        echo "$as_me:$LINENO: result: $d" >&5
15583 echo "${ECHO_T}$d" >&6
15584      else
15585        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15586 echo "${ECHO_T}not found ($d: no such directory)" >&6
15587      fi
15588
15589      echo "$as_me:$LINENO: checking for XPM libs" >&5
15590 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
15591      d=$with_xpm/lib
15592      if test -d $d; then
15593        X_LIBS="-L$d $X_LIBS"
15594        echo "$as_me:$LINENO: result: $d" >&5
15595 echo "${ECHO_T}$d" >&6
15596      else
15597        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15598 echo "${ECHO_T}not found ($d: no such directory)" >&6
15599      fi
15600
15601      # replace the directory string with "yes".
15602      with_xpm_req="yes"
15603      with_xpm=$with_xpm_req
15604      ;;
15605
15606     *)
15607      echo ""
15608      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
15609      echo "       If it is a directory, then \`DIR/include' will be added to"
15610      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15611      exit 1
15612      ;;
15613    esac
15614
15615
15616 if test "$with_xpm" = yes; then
15617
15618   ac_save_CPPFLAGS="$CPPFLAGS"
15619   if test \! -z "$includedir" ; then
15620     CPPFLAGS="$CPPFLAGS -I$includedir"
15621   fi
15622   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15623   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
15624 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
15625 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
15626   echo $ECHO_N "(cached) $ECHO_C" >&6
15627 else
15628   cat >conftest.$ac_ext <<_ACEOF
15629 #line $LINENO "configure"
15630 #include "confdefs.h"
15631 #include <X11/Xlib.h>
15632
15633 #include <X11/xpm.h>
15634 _ACEOF
15635 rm -f conftest.$ac_objext
15636 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15637   (eval $ac_compile) 2>&5
15638   ac_status=$?
15639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15640   (exit $ac_status); } &&
15641          { ac_try='test -s conftest.$ac_objext'
15642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15643   (eval $ac_try) 2>&5
15644   ac_status=$?
15645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15646   (exit $ac_status); }; }; then
15647   ac_cv_header_X11_xpm_h=yes
15648 else
15649   echo "$as_me: failed program was:" >&5
15650 cat conftest.$ac_ext >&5
15651 ac_cv_header_X11_xpm_h=no
15652 fi
15653 rm -f conftest.$ac_objext conftest.$ac_ext
15654 fi
15655 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
15656 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
15657 if test $ac_cv_header_X11_xpm_h = yes; then
15658   have_xpm=yes
15659                     cat >>confdefs.h <<\_ACEOF
15660 #define HAVE_XPM 1
15661 _ACEOF
15662
15663                     XPM_LIBS="-lXpm"
15664 fi
15665
15666
15667   CPPFLAGS="$ac_save_CPPFLAGS"
15668 elif test "$with_xpm" != no; then
15669   echo "error: must be yes or no: --with-xpm=$with_xpm"
15670   exit 1
15671 fi
15672
15673 # See comment near $motif_requires_xpm, above.
15674 # Need to do this here, after both Motif and XPM have been checked for.
15675 #
15676 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
15677   if test "$motif_requires_xpm" = yes ; then
15678     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
15679   fi
15680 fi
15681
15682 ###############################################################################
15683 #
15684 #       Check for -lgdk_pixbuf.
15685 #
15686 ###############################################################################
15687
15688 have_gdk_pixbuf=no
15689 with_gdk_pixbuf_req=unspecified
15690
15691 # Check whether --with-pixbuf or --without-pixbuf was given.
15692 if test "${with_pixbuf+set}" = set; then
15693   withval="$with_pixbuf"
15694   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
15695 else
15696   with_gdk_pixbuf=yes
15697 fi;
15698
15699 # if --with-pixbuf=/directory/ was specified, remember that directory so that
15700 # we can also look for the `gdk-pixbuf-config' program in that directory.
15701 case "$with_gdk_pixbuf" in
15702   /*)
15703     gdk_pixbuf_dir="$with_gdk_pixbuf"
15704     ;;
15705   *)
15706     gdk_pixbuf_dir=""
15707     ;;
15708 esac
15709
15710
15711    case "$with_gdk_pixbuf" in
15712     yes) ;;
15713     no)  ;;
15714
15715     /*)
15716      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
15717 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
15718      d=$with_gdk_pixbuf/include
15719      if test -d $d; then
15720        X_CFLAGS="-I$d $X_CFLAGS"
15721        echo "$as_me:$LINENO: result: $d" >&5
15722 echo "${ECHO_T}$d" >&6
15723      else
15724        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15725 echo "${ECHO_T}not found ($d: no such directory)" >&6
15726      fi
15727
15728      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
15729 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
15730      d=$with_gdk_pixbuf/lib
15731      if test -d $d; then
15732        X_LIBS="-L$d $X_LIBS"
15733        echo "$as_me:$LINENO: result: $d" >&5
15734 echo "${ECHO_T}$d" >&6
15735      else
15736        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15737 echo "${ECHO_T}not found ($d: no such directory)" >&6
15738      fi
15739
15740      # replace the directory string with "yes".
15741      with_gdk_pixbuf_req="yes"
15742      with_gdk_pixbuf=$with_gdk_pixbuf_req
15743      ;;
15744
15745     *)
15746      echo ""
15747      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
15748      echo "       If it is a directory, then \`DIR/include' will be added to"
15749      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15750      exit 1
15751      ;;
15752    esac
15753
15754
15755 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
15756   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
15757   exit 1
15758 fi
15759
15760 if test "$with_gdk_pixbuf" = yes; then
15761   have_gdk_pixbuf=no
15762   have_gdk_pixbuf2=no
15763
15764   if test -n "$pkg_config" ; then
15765     #
15766     # the new way...
15767     # run pkg-config based tests.
15768     #
15769     pkgs=''
15770     ok="yes"
15771
15772     # If we have Gtk 2.x, then *only* gdk-pixbuf 2.x will work.
15773     # If we have Gtk 1.x, then *only* gdk-pixbuf 1.x will work.
15774     # If we don't have Gtk at all, then either will work.
15775
15776     if test "$have_gtk" = no -o "$have_gtk2" = yes; then
15777       #
15778       # we don't have Gtk; or we have Gtk 2.x.  Check for pixbuf 2.x.
15779       #
15780       echo "$as_me:$LINENO: result: checking for gdk_pixbuf 2.x with gtk-config based tests..." >&5
15781 echo "${ECHO_T}checking for gdk_pixbuf 2.x with gtk-config based tests..." >&6
15782       pkg_check_version gdk-pixbuf-2.0      2.0.0
15783       pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
15784       have_gdk_pixbuf="$ok"
15785       have_gdk_pixbuf2="$ok"
15786     fi
15787
15788     if test "$have_gtk" = no -o "$have_gtk2" = no; then
15789       #
15790       # we don't have Gtk; or we have Gtk 1.x.
15791       # If we don't have pixbuf 2.x, then check for pixbuf 1.x.
15792       #
15793       if test "$have_gdk_pixbuf2" = no; then
15794         pkgs=''
15795         ok="yes"
15796       echo "$as_me:$LINENO: result: checking for gdk_pixbuf 1.x with gtk-config based tests..." >&5
15797 echo "${ECHO_T}checking for gdk_pixbuf 1.x with gtk-config based tests..." >&6
15798         pkg_check_version gdk_pixbuf      0.0
15799         pkg_check_version gdk_pixbuf_xlib 0.0
15800         have_gdk_pixbuf="$ok"
15801       fi
15802     fi
15803
15804     if test "$have_gdk_pixbuf" = yes; then
15805       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
15806 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
15807 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
15808   echo $ECHO_N "(cached) $ECHO_C" >&6
15809 else
15810   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
15811 fi
15812 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
15813 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
15814       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
15815 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
15816 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
15817   echo $ECHO_N "(cached) $ECHO_C" >&6
15818 else
15819   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
15820 fi
15821 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
15822 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
15823     fi
15824     ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
15825     ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
15826   fi
15827
15828
15829   if test "$have_gdk_pixbuf" = no; then
15830     #
15831     # the old way...
15832     # run gdk-pixbuf-config based tests.
15833     # note that we can't assume that the existence of "pkg-config" means
15834     # that we don't have to look for gdk-pixbuf-config -- in Gnome 1.4,
15835     # pkg-config exists, but doesn't know about pixbuf.
15836     #
15837
15838    echo "$as_me:$LINENO: result: checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&5
15839 echo "${ECHO_T}checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&6
15840
15841     # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
15842     # look in /foo/bin/ for for gdk-pixbuf-config.
15843     #
15844     gdk_pixbuf_path="$PATH"
15845
15846     if test ! -z "$gtk_dir"; then
15847       # canonicalize slashes.
15848       foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15849       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
15850     fi
15851
15852     if test ! -z "$gnome_dir"; then
15853       # canonicalize slashes.
15854       foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
15855       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
15856     fi
15857
15858     for ac_prog in gdk-pixbuf-config
15859 do
15860   # Extract the first word of "$ac_prog", so it can be a program name with args.
15861 set dummy $ac_prog; ac_word=$2
15862 echo "$as_me:$LINENO: checking for $ac_word" >&5
15863 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15864 if test "${ac_cv_path_gdk_pixbuf_config+set}" = set; then
15865   echo $ECHO_N "(cached) $ECHO_C" >&6
15866 else
15867   case $gdk_pixbuf_config in
15868   [\\/]* | ?:[\\/]*)
15869   ac_cv_path_gdk_pixbuf_config="$gdk_pixbuf_config" # Let the user override the test with a path.
15870   ;;
15871   *)
15872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15873 for as_dir in $gdk_pixbuf_path
15874 do
15875   IFS=$as_save_IFS
15876   test -z "$as_dir" && as_dir=.
15877   for ac_exec_ext in '' $ac_executable_extensions; do
15878   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15879     ac_cv_path_gdk_pixbuf_config="$as_dir/$ac_word$ac_exec_ext"
15880     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15881     break 2
15882   fi
15883 done
15884 done
15885
15886   ;;
15887 esac
15888 fi
15889 gdk_pixbuf_config=$ac_cv_path_gdk_pixbuf_config
15890
15891 if test -n "$gdk_pixbuf_config"; then
15892   echo "$as_me:$LINENO: result: $gdk_pixbuf_config" >&5
15893 echo "${ECHO_T}$gdk_pixbuf_config" >&6
15894 else
15895   echo "$as_me:$LINENO: result: no" >&5
15896 echo "${ECHO_T}no" >&6
15897 fi
15898
15899   test -n "$gdk_pixbuf_config" && break
15900 done
15901
15902
15903     # If we found the gdk-pixbuf-config program, run it to get flags.
15904     #
15905     if test -n "$gdk_pixbuf_config" ; then
15906       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
15907 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
15908 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
15909   echo $ECHO_N "(cached) $ECHO_C" >&6
15910 else
15911   ac_cv_gdk_pixbuf_config_cflags=`$gdk_pixbuf_config --cflags`
15912 fi
15913 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
15914 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
15915       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
15916 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
15917 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
15918   echo $ECHO_N "(cached) $ECHO_C" >&6
15919 else
15920   ac_cv_gdk_pixbuf_config_libs=`$gdk_pixbuf_config --libs`
15921 fi
15922 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
15923 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
15924
15925       # note that "gdk-pixbuf-config --libs" produces a link line including
15926       # -lgdk_pixbuf, but there's no way to get it to produce one that also
15927       # includes -lgdk_pixbuf_xlib.  Since we don't know *exactly* what the
15928       # name of the library will be, construct it with sed...
15929       # M4 sucks!!
15930
15931       ac_cv_gdk_pixbuf_config_libs=`echo $ac_cv_gdk_pixbuf_config_libs | \
15932        sed 's@ \(-lgdk_pixbuf\([-_a-zA-Z0-9.]*\)\) @ \1 -lgdk_pixbuf_xlib\2 @'`
15933
15934
15935       ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
15936       ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
15937     fi
15938   fi
15939
15940   ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
15941   CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
15942
15943   if test "$have_gdk_pixbuf" = no; then
15944     #
15945     # we appear to have pixbuf; check for headers/libs to be sure.
15946     #
15947
15948     have_gdk_pixbuf=no
15949
15950     # check for header A...
15951
15952   ac_save_CPPFLAGS="$CPPFLAGS"
15953   if test \! -z "$includedir" ; then
15954     CPPFLAGS="$CPPFLAGS -I$includedir"
15955   fi
15956   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15957   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15958   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
15959 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
15960 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15961   echo $ECHO_N "(cached) $ECHO_C" >&6
15962 fi
15963 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
15964 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
15965 else
15966   # Is the header compilable?
15967 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
15968 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
15969 cat >conftest.$ac_ext <<_ACEOF
15970 #line $LINENO "configure"
15971 #include "confdefs.h"
15972 $ac_includes_default
15973 #include <gdk-pixbuf/gdk-pixbuf.h>
15974 _ACEOF
15975 rm -f conftest.$ac_objext
15976 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15977   (eval $ac_compile) 2>&5
15978   ac_status=$?
15979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15980   (exit $ac_status); } &&
15981          { ac_try='test -s conftest.$ac_objext'
15982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15983   (eval $ac_try) 2>&5
15984   ac_status=$?
15985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15986   (exit $ac_status); }; }; then
15987   ac_header_compiler=yes
15988 else
15989   echo "$as_me: failed program was:" >&5
15990 cat conftest.$ac_ext >&5
15991 ac_header_compiler=no
15992 fi
15993 rm -f conftest.$ac_objext conftest.$ac_ext
15994 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15995 echo "${ECHO_T}$ac_header_compiler" >&6
15996
15997 # Is the header present?
15998 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
15999 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
16000 cat >conftest.$ac_ext <<_ACEOF
16001 #line $LINENO "configure"
16002 #include "confdefs.h"
16003 #include <gdk-pixbuf/gdk-pixbuf.h>
16004 _ACEOF
16005 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16006   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16007   ac_status=$?
16008   egrep -v '^ *\+' conftest.er1 >conftest.err
16009   rm -f conftest.er1
16010   cat conftest.err >&5
16011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16012   (exit $ac_status); } >/dev/null; then
16013   if test -s conftest.err; then
16014     ac_cpp_err=$ac_c_preproc_warn_flag
16015   else
16016     ac_cpp_err=
16017   fi
16018 else
16019   ac_cpp_err=yes
16020 fi
16021 if test -z "$ac_cpp_err"; then
16022   ac_header_preproc=yes
16023 else
16024   echo "$as_me: failed program was:" >&5
16025   cat conftest.$ac_ext >&5
16026   ac_header_preproc=no
16027 fi
16028 rm -f conftest.err conftest.$ac_ext
16029 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16030 echo "${ECHO_T}$ac_header_preproc" >&6
16031
16032 # So?  What about this header?
16033 case $ac_header_compiler:$ac_header_preproc in
16034   yes:no )
16035     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
16036 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16037     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
16038 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;};;
16039   no:yes )
16040     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
16041 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
16042     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&5
16043 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&2;}
16044     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
16045 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;};;
16046 esac
16047 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
16048 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
16049 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
16050   echo $ECHO_N "(cached) $ECHO_C" >&6
16051 else
16052   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
16053 fi
16054 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
16055 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
16056
16057 fi
16058 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
16059   have_gdk_pixbuf=yes
16060 fi
16061
16062
16063   CPPFLAGS="$ac_save_CPPFLAGS"
16064
16065     # if that worked, check for header B...
16066     if test "$have_gdk_pixbuf" = yes; then
16067       have_gdk_pixbuf=no
16068       gdk_pixbuf_halfassed=yes
16069
16070   ac_save_CPPFLAGS="$CPPFLAGS"
16071   if test \! -z "$includedir" ; then
16072     CPPFLAGS="$CPPFLAGS -I$includedir"
16073   fi
16074   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16075   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16076   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
16077 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16078 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16079   echo $ECHO_N "(cached) $ECHO_C" >&6
16080 fi
16081 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
16082 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
16083 else
16084   # Is the header compilable?
16085 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
16086 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
16087 cat >conftest.$ac_ext <<_ACEOF
16088 #line $LINENO "configure"
16089 #include "confdefs.h"
16090 $ac_includes_default
16091 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
16092 _ACEOF
16093 rm -f conftest.$ac_objext
16094 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16095   (eval $ac_compile) 2>&5
16096   ac_status=$?
16097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16098   (exit $ac_status); } &&
16099          { ac_try='test -s conftest.$ac_objext'
16100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16101   (eval $ac_try) 2>&5
16102   ac_status=$?
16103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16104   (exit $ac_status); }; }; then
16105   ac_header_compiler=yes
16106 else
16107   echo "$as_me: failed program was:" >&5
16108 cat conftest.$ac_ext >&5
16109 ac_header_compiler=no
16110 fi
16111 rm -f conftest.$ac_objext conftest.$ac_ext
16112 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16113 echo "${ECHO_T}$ac_header_compiler" >&6
16114
16115 # Is the header present?
16116 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
16117 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
16118 cat >conftest.$ac_ext <<_ACEOF
16119 #line $LINENO "configure"
16120 #include "confdefs.h"
16121 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
16122 _ACEOF
16123 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16124   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16125   ac_status=$?
16126   egrep -v '^ *\+' conftest.er1 >conftest.err
16127   rm -f conftest.er1
16128   cat conftest.err >&5
16129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16130   (exit $ac_status); } >/dev/null; then
16131   if test -s conftest.err; then
16132     ac_cpp_err=$ac_c_preproc_warn_flag
16133   else
16134     ac_cpp_err=
16135   fi
16136 else
16137   ac_cpp_err=yes
16138 fi
16139 if test -z "$ac_cpp_err"; then
16140   ac_header_preproc=yes
16141 else
16142   echo "$as_me: failed program was:" >&5
16143   cat conftest.$ac_ext >&5
16144   ac_header_preproc=no
16145 fi
16146 rm -f conftest.err conftest.$ac_ext
16147 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16148 echo "${ECHO_T}$ac_header_preproc" >&6
16149
16150 # So?  What about this header?
16151 case $ac_header_compiler:$ac_header_preproc in
16152   yes:no )
16153     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16154 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16155     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16156 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
16157   no:yes )
16158     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
16159 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
16160     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
16161 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
16162     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16163 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
16164 esac
16165 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
16166 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16167 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16168   echo $ECHO_N "(cached) $ECHO_C" >&6
16169 else
16170   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
16171 fi
16172 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
16173 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
16174
16175 fi
16176 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
16177   have_gdk_pixbuf=yes
16178                          gdk_pixbuf_halfassed=no
16179 fi
16180
16181
16182   CPPFLAGS="$ac_save_CPPFLAGS"
16183
16184       # yay, it has a new name in Gtk 2.x...
16185       if test "$have_gdk_pixbuf" = no; then
16186         have_gdk_pixbuf=no
16187         gdk_pixbuf_halfassed=yes
16188
16189   ac_save_CPPFLAGS="$CPPFLAGS"
16190   if test \! -z "$includedir" ; then
16191     CPPFLAGS="$CPPFLAGS -I$includedir"
16192   fi
16193   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16194   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16195   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
16196 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16197 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16198   echo $ECHO_N "(cached) $ECHO_C" >&6
16199 fi
16200 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
16201 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
16202 else
16203   # Is the header compilable?
16204 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
16205 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
16206 cat >conftest.$ac_ext <<_ACEOF
16207 #line $LINENO "configure"
16208 #include "confdefs.h"
16209 $ac_includes_default
16210 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
16211 _ACEOF
16212 rm -f conftest.$ac_objext
16213 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16214   (eval $ac_compile) 2>&5
16215   ac_status=$?
16216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16217   (exit $ac_status); } &&
16218          { ac_try='test -s conftest.$ac_objext'
16219   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16220   (eval $ac_try) 2>&5
16221   ac_status=$?
16222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16223   (exit $ac_status); }; }; then
16224   ac_header_compiler=yes
16225 else
16226   echo "$as_me: failed program was:" >&5
16227 cat conftest.$ac_ext >&5
16228 ac_header_compiler=no
16229 fi
16230 rm -f conftest.$ac_objext conftest.$ac_ext
16231 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16232 echo "${ECHO_T}$ac_header_compiler" >&6
16233
16234 # Is the header present?
16235 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
16236 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
16237 cat >conftest.$ac_ext <<_ACEOF
16238 #line $LINENO "configure"
16239 #include "confdefs.h"
16240 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
16241 _ACEOF
16242 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16243   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16244   ac_status=$?
16245   egrep -v '^ *\+' conftest.er1 >conftest.err
16246   rm -f conftest.er1
16247   cat conftest.err >&5
16248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16249   (exit $ac_status); } >/dev/null; then
16250   if test -s conftest.err; then
16251     ac_cpp_err=$ac_c_preproc_warn_flag
16252   else
16253     ac_cpp_err=
16254   fi
16255 else
16256   ac_cpp_err=yes
16257 fi
16258 if test -z "$ac_cpp_err"; then
16259   ac_header_preproc=yes
16260 else
16261   echo "$as_me: failed program was:" >&5
16262   cat conftest.$ac_ext >&5
16263   ac_header_preproc=no
16264 fi
16265 rm -f conftest.err conftest.$ac_ext
16266 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16267 echo "${ECHO_T}$ac_header_preproc" >&6
16268
16269 # So?  What about this header?
16270 case $ac_header_compiler:$ac_header_preproc in
16271   yes:no )
16272     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16273 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16274     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16275 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
16276   no:yes )
16277     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
16278 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
16279     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
16280 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
16281     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16282 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
16283 esac
16284 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
16285 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16286 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16287   echo $ECHO_N "(cached) $ECHO_C" >&6
16288 else
16289   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
16290 fi
16291 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
16292 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
16293
16294 fi
16295 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
16296   have_gdk_pixbuf=yes
16297                            gdk_pixbuf_halfassed=no
16298 fi
16299
16300
16301   CPPFLAGS="$ac_save_CPPFLAGS"
16302       fi
16303     fi
16304   fi
16305
16306   CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
16307
16308   if test "$have_gdk_pixbuf" = yes; then
16309     # we have the headers, now check for the libraries
16310     have_gdk_pixbuf=no
16311     gdk_pixbuf_halfassed=yes
16312
16313     # library A...
16314
16315   ac_save_CPPFLAGS="$CPPFLAGS"
16316   ac_save_LDFLAGS="$LDFLAGS"
16317 #  ac_save_LIBS="$LIBS"
16318
16319   if test \! -z "$includedir" ; then
16320     CPPFLAGS="$CPPFLAGS -I$includedir"
16321   fi
16322   # note: $X_CFLAGS includes $x_includes
16323   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16324
16325   if test \! -z "$libdir" ; then
16326     LDFLAGS="$LDFLAGS -L$libdir"
16327   fi
16328   # note: $X_LIBS includes $x_libraries
16329   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16330
16331   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
16332 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
16333 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
16334   echo $ECHO_N "(cached) $ECHO_C" >&6
16335 else
16336   ac_check_lib_save_LIBS=$LIBS
16337 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
16338 cat >conftest.$ac_ext <<_ACEOF
16339 #line $LINENO "configure"
16340 #include "confdefs.h"
16341
16342 /* Override any gcc2 internal prototype to avoid an error.  */
16343 #ifdef __cplusplus
16344 extern "C"
16345 #endif
16346 /* We use char because int might match the return type of a gcc2
16347    builtin and then its argument prototype would still apply.  */
16348 char gdk_pixbuf_new_from_file ();
16349 #ifdef F77_DUMMY_MAIN
16350 #  ifdef __cplusplus
16351      extern "C"
16352 #  endif
16353    int F77_DUMMY_MAIN() { return 1; }
16354 #endif
16355 int
16356 main ()
16357 {
16358 gdk_pixbuf_new_from_file ();
16359   ;
16360   return 0;
16361 }
16362 _ACEOF
16363 rm -f conftest.$ac_objext conftest$ac_exeext
16364 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16365   (eval $ac_link) 2>&5
16366   ac_status=$?
16367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16368   (exit $ac_status); } &&
16369          { ac_try='test -s conftest$ac_exeext'
16370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16371   (eval $ac_try) 2>&5
16372   ac_status=$?
16373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16374   (exit $ac_status); }; }; then
16375   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
16376 else
16377   echo "$as_me: failed program was:" >&5
16378 cat conftest.$ac_ext >&5
16379 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
16380 fi
16381 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16382 LIBS=$ac_check_lib_save_LIBS
16383 fi
16384 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
16385 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
16386 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
16387   have_gdk_pixbuf=yes
16388 fi
16389
16390   CPPFLAGS="$ac_save_CPPFLAGS"
16391   LDFLAGS="$ac_save_LDFLAGS"
16392 #  LIBS="$ac_save_LIBS"
16393
16394     # library B...
16395     if test "$have_gdk_pixbuf" = yes; then
16396       have_gdk_pixbuf=no
16397
16398   ac_save_CPPFLAGS="$CPPFLAGS"
16399   ac_save_LDFLAGS="$LDFLAGS"
16400 #  ac_save_LIBS="$LIBS"
16401
16402   if test \! -z "$includedir" ; then
16403     CPPFLAGS="$CPPFLAGS -I$includedir"
16404   fi
16405   # note: $X_CFLAGS includes $x_includes
16406   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16407
16408   if test \! -z "$libdir" ; then
16409     LDFLAGS="$LDFLAGS -L$libdir"
16410   fi
16411   # note: $X_LIBS includes $x_libraries
16412   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16413
16414   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
16415 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
16416 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
16417   echo $ECHO_N "(cached) $ECHO_C" >&6
16418 else
16419   ac_check_lib_save_LIBS=$LIBS
16420 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
16421 cat >conftest.$ac_ext <<_ACEOF
16422 #line $LINENO "configure"
16423 #include "confdefs.h"
16424
16425 /* Override any gcc2 internal prototype to avoid an error.  */
16426 #ifdef __cplusplus
16427 extern "C"
16428 #endif
16429 /* We use char because int might match the return type of a gcc2
16430    builtin and then its argument prototype would still apply.  */
16431 char gdk_pixbuf_xlib_init ();
16432 #ifdef F77_DUMMY_MAIN
16433 #  ifdef __cplusplus
16434      extern "C"
16435 #  endif
16436    int F77_DUMMY_MAIN() { return 1; }
16437 #endif
16438 int
16439 main ()
16440 {
16441 gdk_pixbuf_xlib_init ();
16442   ;
16443   return 0;
16444 }
16445 _ACEOF
16446 rm -f conftest.$ac_objext conftest$ac_exeext
16447 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16448   (eval $ac_link) 2>&5
16449   ac_status=$?
16450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16451   (exit $ac_status); } &&
16452          { ac_try='test -s conftest$ac_exeext'
16453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16454   (eval $ac_try) 2>&5
16455   ac_status=$?
16456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16457   (exit $ac_status); }; }; then
16458   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
16459 else
16460   echo "$as_me: failed program was:" >&5
16461 cat conftest.$ac_ext >&5
16462 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
16463 fi
16464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16465 LIBS=$ac_check_lib_save_LIBS
16466 fi
16467 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
16468 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
16469 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
16470   have_gdk_pixbuf=yes
16471                       gdk_pixbuf_halfassed=no
16472 fi
16473
16474   CPPFLAGS="$ac_save_CPPFLAGS"
16475   LDFLAGS="$ac_save_LDFLAGS"
16476 #  LIBS="$ac_save_LIBS"
16477
16478     fi
16479   fi
16480
16481   if test "$have_gdk_pixbuf" = yes; then
16482     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
16483     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
16484     cat >>confdefs.h <<\_ACEOF
16485 #define HAVE_GDK_PIXBUF 1
16486 _ACEOF
16487
16488   else
16489     have_gdk_pixbuf2=no
16490   fi
16491 fi
16492
16493
16494 ###############################################################################
16495 #
16496 #       Check for -ljpeg
16497 #
16498 ###############################################################################
16499
16500 have_jpeg=no
16501 with_jpeg_req=unspecified
16502 jpeg_halfassed=no
16503
16504 # Check whether --with-jpeg or --without-jpeg was given.
16505 if test "${with_jpeg+set}" = set; then
16506   withval="$with_jpeg"
16507   with_jpeg="$withval"; with_jpeg_req="$withval"
16508 else
16509   with_jpeg=yes
16510 fi;
16511
16512
16513    case "$with_jpeg" in
16514     yes) ;;
16515     no)  ;;
16516
16517     /*)
16518      echo "$as_me:$LINENO: checking for JPEG headers" >&5
16519 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
16520      d=$with_jpeg/include
16521      if test -d $d; then
16522        X_CFLAGS="-I$d $X_CFLAGS"
16523        echo "$as_me:$LINENO: result: $d" >&5
16524 echo "${ECHO_T}$d" >&6
16525      else
16526        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16527 echo "${ECHO_T}not found ($d: no such directory)" >&6
16528      fi
16529
16530      echo "$as_me:$LINENO: checking for JPEG libs" >&5
16531 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
16532      d=$with_jpeg/lib
16533      if test -d $d; then
16534        X_LIBS="-L$d $X_LIBS"
16535        echo "$as_me:$LINENO: result: $d" >&5
16536 echo "${ECHO_T}$d" >&6
16537      else
16538        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16539 echo "${ECHO_T}not found ($d: no such directory)" >&6
16540      fi
16541
16542      # replace the directory string with "yes".
16543      with_jpeg_req="yes"
16544      with_jpeg=$with_jpeg_req
16545      ;;
16546
16547     *)
16548      echo ""
16549      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
16550      echo "       If it is a directory, then \`DIR/include' will be added to"
16551      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16552      exit 1
16553      ;;
16554    esac
16555
16556
16557 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
16558   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
16559   exit 1
16560 fi
16561
16562 if test "$with_jpeg" = yes; then
16563
16564   have_jpeg=no
16565
16566   ac_save_CPPFLAGS="$CPPFLAGS"
16567   if test \! -z "$includedir" ; then
16568     CPPFLAGS="$CPPFLAGS -I$includedir"
16569   fi
16570   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16571   if test "${ac_cv_header_jpeglib_h+set}" = set; then
16572   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
16573 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
16574 if test "${ac_cv_header_jpeglib_h+set}" = set; then
16575   echo $ECHO_N "(cached) $ECHO_C" >&6
16576 fi
16577 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
16578 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
16579 else
16580   # Is the header compilable?
16581 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
16582 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
16583 cat >conftest.$ac_ext <<_ACEOF
16584 #line $LINENO "configure"
16585 #include "confdefs.h"
16586 $ac_includes_default
16587 #include <jpeglib.h>
16588 _ACEOF
16589 rm -f conftest.$ac_objext
16590 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16591   (eval $ac_compile) 2>&5
16592   ac_status=$?
16593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16594   (exit $ac_status); } &&
16595          { ac_try='test -s conftest.$ac_objext'
16596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16597   (eval $ac_try) 2>&5
16598   ac_status=$?
16599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16600   (exit $ac_status); }; }; then
16601   ac_header_compiler=yes
16602 else
16603   echo "$as_me: failed program was:" >&5
16604 cat conftest.$ac_ext >&5
16605 ac_header_compiler=no
16606 fi
16607 rm -f conftest.$ac_objext conftest.$ac_ext
16608 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16609 echo "${ECHO_T}$ac_header_compiler" >&6
16610
16611 # Is the header present?
16612 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
16613 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
16614 cat >conftest.$ac_ext <<_ACEOF
16615 #line $LINENO "configure"
16616 #include "confdefs.h"
16617 #include <jpeglib.h>
16618 _ACEOF
16619 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16620   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16621   ac_status=$?
16622   egrep -v '^ *\+' conftest.er1 >conftest.err
16623   rm -f conftest.er1
16624   cat conftest.err >&5
16625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16626   (exit $ac_status); } >/dev/null; then
16627   if test -s conftest.err; then
16628     ac_cpp_err=$ac_c_preproc_warn_flag
16629   else
16630     ac_cpp_err=
16631   fi
16632 else
16633   ac_cpp_err=yes
16634 fi
16635 if test -z "$ac_cpp_err"; then
16636   ac_header_preproc=yes
16637 else
16638   echo "$as_me: failed program was:" >&5
16639   cat conftest.$ac_ext >&5
16640   ac_header_preproc=no
16641 fi
16642 rm -f conftest.err conftest.$ac_ext
16643 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16644 echo "${ECHO_T}$ac_header_preproc" >&6
16645
16646 # So?  What about this header?
16647 case $ac_header_compiler:$ac_header_preproc in
16648   yes:no )
16649     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16650 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16651     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
16652 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;};;
16653   no:yes )
16654     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
16655 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
16656     { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5
16657 echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;}
16658     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
16659 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;};;
16660 esac
16661 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
16662 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
16663 if test "${ac_cv_header_jpeglib_h+set}" = set; then
16664   echo $ECHO_N "(cached) $ECHO_C" >&6
16665 else
16666   ac_cv_header_jpeglib_h=$ac_header_preproc
16667 fi
16668 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
16669 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
16670
16671 fi
16672 if test $ac_cv_header_jpeglib_h = yes; then
16673   have_jpeg=yes
16674 fi
16675
16676
16677   CPPFLAGS="$ac_save_CPPFLAGS"
16678
16679   if test "$have_jpeg" = yes; then
16680     # we have the header, now check for the library
16681     have_jpeg=no
16682     jpeg_halfassed=yes
16683
16684   ac_save_CPPFLAGS="$CPPFLAGS"
16685   ac_save_LDFLAGS="$LDFLAGS"
16686 #  ac_save_LIBS="$LIBS"
16687
16688   if test \! -z "$includedir" ; then
16689     CPPFLAGS="$CPPFLAGS -I$includedir"
16690   fi
16691   # note: $X_CFLAGS includes $x_includes
16692   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16693
16694   if test \! -z "$libdir" ; then
16695     LDFLAGS="$LDFLAGS -L$libdir"
16696   fi
16697   # note: $X_LIBS includes $x_libraries
16698   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16699
16700   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
16701 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
16702 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
16703   echo $ECHO_N "(cached) $ECHO_C" >&6
16704 else
16705   ac_check_lib_save_LIBS=$LIBS
16706 LIBS="-ljpeg  $LIBS"
16707 cat >conftest.$ac_ext <<_ACEOF
16708 #line $LINENO "configure"
16709 #include "confdefs.h"
16710
16711 /* Override any gcc2 internal prototype to avoid an error.  */
16712 #ifdef __cplusplus
16713 extern "C"
16714 #endif
16715 /* We use char because int might match the return type of a gcc2
16716    builtin and then its argument prototype would still apply.  */
16717 char jpeg_start_compress ();
16718 #ifdef F77_DUMMY_MAIN
16719 #  ifdef __cplusplus
16720      extern "C"
16721 #  endif
16722    int F77_DUMMY_MAIN() { return 1; }
16723 #endif
16724 int
16725 main ()
16726 {
16727 jpeg_start_compress ();
16728   ;
16729   return 0;
16730 }
16731 _ACEOF
16732 rm -f conftest.$ac_objext conftest$ac_exeext
16733 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16734   (eval $ac_link) 2>&5
16735   ac_status=$?
16736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16737   (exit $ac_status); } &&
16738          { ac_try='test -s conftest$ac_exeext'
16739   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16740   (eval $ac_try) 2>&5
16741   ac_status=$?
16742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16743   (exit $ac_status); }; }; then
16744   ac_cv_lib_jpeg_jpeg_start_compress=yes
16745 else
16746   echo "$as_me: failed program was:" >&5
16747 cat conftest.$ac_ext >&5
16748 ac_cv_lib_jpeg_jpeg_start_compress=no
16749 fi
16750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16751 LIBS=$ac_check_lib_save_LIBS
16752 fi
16753 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
16754 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
16755 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
16756   have_jpeg=yes
16757                     jpeg_halfassed=no
16758                     JPEG_LIBS="-ljpeg"
16759                     cat >>confdefs.h <<\_ACEOF
16760 #define HAVE_JPEGLIB 1
16761 _ACEOF
16762
16763 fi
16764
16765   CPPFLAGS="$ac_save_CPPFLAGS"
16766   LDFLAGS="$ac_save_LDFLAGS"
16767 #  LIBS="$ac_save_LIBS"
16768
16769   fi
16770 fi
16771
16772
16773 ###############################################################################
16774 #
16775 #       Check for the XSHM server extension.
16776 #
16777 ###############################################################################
16778
16779 have_xshm=no
16780 with_xshm_req=unspecified
16781
16782 # Check whether --with-xshm-ext or --without-xshm-ext was given.
16783 if test "${with_xshm_ext+set}" = set; then
16784   withval="$with_xshm_ext"
16785   with_xshm="$withval"; with_xshm_req="$withval"
16786 else
16787   with_xshm=yes
16788 fi;
16789
16790
16791    case "$with_xshm" in
16792     yes) ;;
16793     no)  ;;
16794
16795     /*)
16796      echo "$as_me:$LINENO: checking for XSHM headers" >&5
16797 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
16798      d=$with_xshm/include
16799      if test -d $d; then
16800        X_CFLAGS="-I$d $X_CFLAGS"
16801        echo "$as_me:$LINENO: result: $d" >&5
16802 echo "${ECHO_T}$d" >&6
16803      else
16804        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16805 echo "${ECHO_T}not found ($d: no such directory)" >&6
16806      fi
16807
16808      echo "$as_me:$LINENO: checking for XSHM libs" >&5
16809 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
16810      d=$with_xshm/lib
16811      if test -d $d; then
16812        X_LIBS="-L$d $X_LIBS"
16813        echo "$as_me:$LINENO: result: $d" >&5
16814 echo "${ECHO_T}$d" >&6
16815      else
16816        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16817 echo "${ECHO_T}not found ($d: no such directory)" >&6
16818      fi
16819
16820      # replace the directory string with "yes".
16821      with_xshm_req="yes"
16822      with_xshm=$with_xshm_req
16823      ;;
16824
16825     *)
16826      echo ""
16827      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
16828      echo "       If it is a directory, then \`DIR/include' will be added to"
16829      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16830      exit 1
16831      ;;
16832    esac
16833
16834
16835 if test "$with_xshm" = yes; then
16836
16837   # first check for Xshm.h.
16838
16839   ac_save_CPPFLAGS="$CPPFLAGS"
16840   if test \! -z "$includedir" ; then
16841     CPPFLAGS="$CPPFLAGS -I$includedir"
16842   fi
16843   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16844   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
16845 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
16846 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
16847   echo $ECHO_N "(cached) $ECHO_C" >&6
16848 else
16849   cat >conftest.$ac_ext <<_ACEOF
16850 #line $LINENO "configure"
16851 #include "confdefs.h"
16852 #include <X11/Xlib.h>
16853
16854 #include <X11/extensions/XShm.h>
16855 _ACEOF
16856 rm -f conftest.$ac_objext
16857 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16858   (eval $ac_compile) 2>&5
16859   ac_status=$?
16860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16861   (exit $ac_status); } &&
16862          { ac_try='test -s conftest.$ac_objext'
16863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16864   (eval $ac_try) 2>&5
16865   ac_status=$?
16866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16867   (exit $ac_status); }; }; then
16868   ac_cv_header_X11_extensions_XShm_h=yes
16869 else
16870   echo "$as_me: failed program was:" >&5
16871 cat conftest.$ac_ext >&5
16872 ac_cv_header_X11_extensions_XShm_h=no
16873 fi
16874 rm -f conftest.$ac_objext conftest.$ac_ext
16875 fi
16876 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
16877 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
16878 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
16879   have_xshm=yes
16880 fi
16881
16882
16883   CPPFLAGS="$ac_save_CPPFLAGS"
16884
16885   # if that succeeded, then check for sys/ipc.h.
16886   if test "$have_xshm" = yes; then
16887     have_xshm=no
16888
16889   ac_save_CPPFLAGS="$CPPFLAGS"
16890   if test \! -z "$includedir" ; then
16891     CPPFLAGS="$CPPFLAGS -I$includedir"
16892   fi
16893   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16894   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16895   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
16896 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
16897 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16898   echo $ECHO_N "(cached) $ECHO_C" >&6
16899 fi
16900 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
16901 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
16902 else
16903   # Is the header compilable?
16904 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
16905 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
16906 cat >conftest.$ac_ext <<_ACEOF
16907 #line $LINENO "configure"
16908 #include "confdefs.h"
16909 $ac_includes_default
16910 #include <sys/ipc.h>
16911 _ACEOF
16912 rm -f conftest.$ac_objext
16913 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16914   (eval $ac_compile) 2>&5
16915   ac_status=$?
16916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16917   (exit $ac_status); } &&
16918          { ac_try='test -s conftest.$ac_objext'
16919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16920   (eval $ac_try) 2>&5
16921   ac_status=$?
16922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16923   (exit $ac_status); }; }; then
16924   ac_header_compiler=yes
16925 else
16926   echo "$as_me: failed program was:" >&5
16927 cat conftest.$ac_ext >&5
16928 ac_header_compiler=no
16929 fi
16930 rm -f conftest.$ac_objext conftest.$ac_ext
16931 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16932 echo "${ECHO_T}$ac_header_compiler" >&6
16933
16934 # Is the header present?
16935 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
16936 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
16937 cat >conftest.$ac_ext <<_ACEOF
16938 #line $LINENO "configure"
16939 #include "confdefs.h"
16940 #include <sys/ipc.h>
16941 _ACEOF
16942 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16943   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16944   ac_status=$?
16945   egrep -v '^ *\+' conftest.er1 >conftest.err
16946   rm -f conftest.er1
16947   cat conftest.err >&5
16948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16949   (exit $ac_status); } >/dev/null; then
16950   if test -s conftest.err; then
16951     ac_cpp_err=$ac_c_preproc_warn_flag
16952   else
16953     ac_cpp_err=
16954   fi
16955 else
16956   ac_cpp_err=yes
16957 fi
16958 if test -z "$ac_cpp_err"; then
16959   ac_header_preproc=yes
16960 else
16961   echo "$as_me: failed program was:" >&5
16962   cat conftest.$ac_ext >&5
16963   ac_header_preproc=no
16964 fi
16965 rm -f conftest.err conftest.$ac_ext
16966 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16967 echo "${ECHO_T}$ac_header_preproc" >&6
16968
16969 # So?  What about this header?
16970 case $ac_header_compiler:$ac_header_preproc in
16971   yes:no )
16972     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
16973 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16974     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
16975 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;};;
16976   no:yes )
16977     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
16978 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
16979     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&5
16980 echo "$as_me: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&2;}
16981     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
16982 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;};;
16983 esac
16984 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
16985 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
16986 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16987   echo $ECHO_N "(cached) $ECHO_C" >&6
16988 else
16989   ac_cv_header_sys_ipc_h=$ac_header_preproc
16990 fi
16991 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
16992 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
16993
16994 fi
16995 if test $ac_cv_header_sys_ipc_h = yes; then
16996   have_xshm=yes
16997 fi
16998
16999
17000   CPPFLAGS="$ac_save_CPPFLAGS"
17001   fi
17002
17003   # if that succeeded, then check for sys/shm.h.
17004   if test "$have_xshm" = yes; then
17005     have_xshm=no
17006
17007   ac_save_CPPFLAGS="$CPPFLAGS"
17008   if test \! -z "$includedir" ; then
17009     CPPFLAGS="$CPPFLAGS -I$includedir"
17010   fi
17011   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17012   if test "${ac_cv_header_sys_shm_h+set}" = set; then
17013   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
17014 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
17015 if test "${ac_cv_header_sys_shm_h+set}" = set; then
17016   echo $ECHO_N "(cached) $ECHO_C" >&6
17017 fi
17018 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
17019 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
17020 else
17021   # Is the header compilable?
17022 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
17023 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
17024 cat >conftest.$ac_ext <<_ACEOF
17025 #line $LINENO "configure"
17026 #include "confdefs.h"
17027 $ac_includes_default
17028 #include <sys/shm.h>
17029 _ACEOF
17030 rm -f conftest.$ac_objext
17031 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17032   (eval $ac_compile) 2>&5
17033   ac_status=$?
17034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17035   (exit $ac_status); } &&
17036          { ac_try='test -s conftest.$ac_objext'
17037   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17038   (eval $ac_try) 2>&5
17039   ac_status=$?
17040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17041   (exit $ac_status); }; }; then
17042   ac_header_compiler=yes
17043 else
17044   echo "$as_me: failed program was:" >&5
17045 cat conftest.$ac_ext >&5
17046 ac_header_compiler=no
17047 fi
17048 rm -f conftest.$ac_objext conftest.$ac_ext
17049 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17050 echo "${ECHO_T}$ac_header_compiler" >&6
17051
17052 # Is the header present?
17053 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
17054 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
17055 cat >conftest.$ac_ext <<_ACEOF
17056 #line $LINENO "configure"
17057 #include "confdefs.h"
17058 #include <sys/shm.h>
17059 _ACEOF
17060 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17061   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17062   ac_status=$?
17063   egrep -v '^ *\+' conftest.er1 >conftest.err
17064   rm -f conftest.er1
17065   cat conftest.err >&5
17066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17067   (exit $ac_status); } >/dev/null; then
17068   if test -s conftest.err; then
17069     ac_cpp_err=$ac_c_preproc_warn_flag
17070   else
17071     ac_cpp_err=
17072   fi
17073 else
17074   ac_cpp_err=yes
17075 fi
17076 if test -z "$ac_cpp_err"; then
17077   ac_header_preproc=yes
17078 else
17079   echo "$as_me: failed program was:" >&5
17080   cat conftest.$ac_ext >&5
17081   ac_header_preproc=no
17082 fi
17083 rm -f conftest.err conftest.$ac_ext
17084 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17085 echo "${ECHO_T}$ac_header_preproc" >&6
17086
17087 # So?  What about this header?
17088 case $ac_header_compiler:$ac_header_preproc in
17089   yes:no )
17090     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
17091 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17092     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
17093 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;};;
17094   no:yes )
17095     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
17096 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
17097     { echo "$as_me:$LINENO: WARNING: sys/shm.h: check for missing prerequisite headers?" >&5
17098 echo "$as_me: WARNING: sys/shm.h: check for missing prerequisite headers?" >&2;}
17099     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
17100 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;};;
17101 esac
17102 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
17103 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
17104 if test "${ac_cv_header_sys_shm_h+set}" = set; then
17105   echo $ECHO_N "(cached) $ECHO_C" >&6
17106 else
17107   ac_cv_header_sys_shm_h=$ac_header_preproc
17108 fi
17109 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
17110 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
17111
17112 fi
17113 if test $ac_cv_header_sys_shm_h = yes; then
17114   have_xshm=yes
17115 fi
17116
17117
17118   CPPFLAGS="$ac_save_CPPFLAGS"
17119   fi
17120
17121   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
17122   # to exist, but the library code to not exist.  And even better, the library
17123   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
17124   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
17125   # that's not quite right, but close enough.)
17126   #
17127   case "$host" in
17128     *-aix*)
17129       if  `uname -v` -eq 3 ; then
17130         have_xshm=no
17131
17132   ac_save_CPPFLAGS="$CPPFLAGS"
17133   ac_save_LDFLAGS="$LDFLAGS"
17134 #  ac_save_LIBS="$LIBS"
17135
17136   if test \! -z "$includedir" ; then
17137     CPPFLAGS="$CPPFLAGS -I$includedir"
17138   fi
17139   # note: $X_CFLAGS includes $x_includes
17140   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17141
17142   if test \! -z "$libdir" ; then
17143     LDFLAGS="$LDFLAGS -L$libdir"
17144   fi
17145   # note: $X_LIBS includes $x_libraries
17146   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17147
17148   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
17149 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
17150 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
17151   echo $ECHO_N "(cached) $ECHO_C" >&6
17152 else
17153   ac_check_lib_save_LIBS=$LIBS
17154 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
17155 cat >conftest.$ac_ext <<_ACEOF
17156 #line $LINENO "configure"
17157 #include "confdefs.h"
17158
17159 /* Override any gcc2 internal prototype to avoid an error.  */
17160 #ifdef __cplusplus
17161 extern "C"
17162 #endif
17163 /* We use char because int might match the return type of a gcc2
17164    builtin and then its argument prototype would still apply.  */
17165 char XShmQueryExtension ();
17166 #ifdef F77_DUMMY_MAIN
17167 #  ifdef __cplusplus
17168      extern "C"
17169 #  endif
17170    int F77_DUMMY_MAIN() { return 1; }
17171 #endif
17172 int
17173 main ()
17174 {
17175 XShmQueryExtension ();
17176   ;
17177   return 0;
17178 }
17179 _ACEOF
17180 rm -f conftest.$ac_objext conftest$ac_exeext
17181 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17182   (eval $ac_link) 2>&5
17183   ac_status=$?
17184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17185   (exit $ac_status); } &&
17186          { ac_try='test -s conftest$ac_exeext'
17187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17188   (eval $ac_try) 2>&5
17189   ac_status=$?
17190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17191   (exit $ac_status); }; }; then
17192   ac_cv_lib_XextSam_XShmQueryExtension=yes
17193 else
17194   echo "$as_me: failed program was:" >&5
17195 cat conftest.$ac_ext >&5
17196 ac_cv_lib_XextSam_XShmQueryExtension=no
17197 fi
17198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17199 LIBS=$ac_check_lib_save_LIBS
17200 fi
17201 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
17202 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
17203 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
17204   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
17205 else
17206   true
17207 fi
17208
17209   CPPFLAGS="$ac_save_CPPFLAGS"
17210   LDFLAGS="$ac_save_LDFLAGS"
17211 #  LIBS="$ac_save_LIBS"
17212
17213       fi
17214     ;;
17215   esac
17216
17217   # if that succeeded, then we've really got it.
17218   if test "$have_xshm" = yes; then
17219     cat >>confdefs.h <<\_ACEOF
17220 #define HAVE_XSHM_EXTENSION 1
17221 _ACEOF
17222
17223   fi
17224
17225 elif test "$with_xshm" != no; then
17226   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
17227   exit 1
17228 fi
17229
17230
17231 ###############################################################################
17232 #
17233 #       Check for the DOUBLE-BUFFER server extension.
17234 #
17235 ###############################################################################
17236
17237 have_xdbe=no
17238 with_xdbe_req=unspecified
17239
17240 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
17241 if test "${with_xdbe_ext+set}" = set; then
17242   withval="$with_xdbe_ext"
17243   with_xdbe="$withval"; with_xdbe_req="$withval"
17244 else
17245   with_xdbe=yes
17246 fi;
17247
17248
17249    case "$with_xdbe" in
17250     yes) ;;
17251     no)  ;;
17252
17253     /*)
17254      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
17255 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
17256      d=$with_xdbe/include
17257      if test -d $d; then
17258        X_CFLAGS="-I$d $X_CFLAGS"
17259        echo "$as_me:$LINENO: result: $d" >&5
17260 echo "${ECHO_T}$d" >&6
17261      else
17262        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17263 echo "${ECHO_T}not found ($d: no such directory)" >&6
17264      fi
17265
17266      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
17267 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
17268      d=$with_xdbe/lib
17269      if test -d $d; then
17270        X_LIBS="-L$d $X_LIBS"
17271        echo "$as_me:$LINENO: result: $d" >&5
17272 echo "${ECHO_T}$d" >&6
17273      else
17274        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17275 echo "${ECHO_T}not found ($d: no such directory)" >&6
17276      fi
17277
17278      # replace the directory string with "yes".
17279      with_xdbe_req="yes"
17280      with_xdbe=$with_xdbe_req
17281      ;;
17282
17283     *)
17284      echo ""
17285      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
17286      echo "       If it is a directory, then \`DIR/include' will be added to"
17287      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17288      exit 1
17289      ;;
17290    esac
17291
17292
17293 if test "$with_xdbe" = yes; then
17294
17295
17296   ac_save_CPPFLAGS="$CPPFLAGS"
17297   if test \! -z "$includedir" ; then
17298     CPPFLAGS="$CPPFLAGS -I$includedir"
17299   fi
17300   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17301   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
17302 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
17303 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
17304   echo $ECHO_N "(cached) $ECHO_C" >&6
17305 else
17306   cat >conftest.$ac_ext <<_ACEOF
17307 #line $LINENO "configure"
17308 #include "confdefs.h"
17309 #include <X11/Xlib.h>
17310
17311 #include <X11/extensions/Xdbe.h>
17312 _ACEOF
17313 rm -f conftest.$ac_objext
17314 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17315   (eval $ac_compile) 2>&5
17316   ac_status=$?
17317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17318   (exit $ac_status); } &&
17319          { ac_try='test -s conftest.$ac_objext'
17320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17321   (eval $ac_try) 2>&5
17322   ac_status=$?
17323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17324   (exit $ac_status); }; }; then
17325   ac_cv_header_X11_extensions_Xdbe_h=yes
17326 else
17327   echo "$as_me: failed program was:" >&5
17328 cat conftest.$ac_ext >&5
17329 ac_cv_header_X11_extensions_Xdbe_h=no
17330 fi
17331 rm -f conftest.$ac_objext conftest.$ac_ext
17332 fi
17333 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
17334 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
17335 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
17336   have_xdbe=yes
17337 fi
17338
17339
17340   CPPFLAGS="$ac_save_CPPFLAGS"
17341   if test "$have_xdbe" = yes; then
17342     cat >>confdefs.h <<\_ACEOF
17343 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
17344 _ACEOF
17345
17346   fi
17347
17348 elif test "$with_xdbe" != no; then
17349   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
17350   exit 1
17351 fi
17352
17353
17354 ###############################################################################
17355 #
17356 #       Check for the SGI XReadDisplay server extension.
17357 #
17358 #       Note: this has to be down here, rather than up with the other server
17359 #       extension tests, so that the output of `configure --help' is in the
17360 #       right order.  Arrgh!
17361 #
17362 ###############################################################################
17363
17364 have_readdisplay=no
17365 with_readdisplay_req=unspecified
17366
17367 # Check whether --with-readdisplay or --without-readdisplay was given.
17368 if test "${with_readdisplay+set}" = set; then
17369   withval="$with_readdisplay"
17370   with_readdisplay="$withval"; with_readdisplay_req="$withval"
17371 else
17372   with_readdisplay=yes
17373 fi;
17374
17375
17376    case "$with_readdisplay" in
17377     yes) ;;
17378     no)  ;;
17379
17380     /*)
17381      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
17382 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
17383      d=$with_readdisplay/include
17384      if test -d $d; then
17385        X_CFLAGS="-I$d $X_CFLAGS"
17386        echo "$as_me:$LINENO: result: $d" >&5
17387 echo "${ECHO_T}$d" >&6
17388      else
17389        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17390 echo "${ECHO_T}not found ($d: no such directory)" >&6
17391      fi
17392
17393      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
17394 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
17395      d=$with_readdisplay/lib
17396      if test -d $d; then
17397        X_LIBS="-L$d $X_LIBS"
17398        echo "$as_me:$LINENO: result: $d" >&5
17399 echo "${ECHO_T}$d" >&6
17400      else
17401        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17402 echo "${ECHO_T}not found ($d: no such directory)" >&6
17403      fi
17404
17405      # replace the directory string with "yes".
17406      with_readdisplay_req="yes"
17407      with_readdisplay=$with_readdisplay_req
17408      ;;
17409
17410     *)
17411      echo ""
17412      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
17413      echo "       If it is a directory, then \`DIR/include' will be added to"
17414      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17415      exit 1
17416      ;;
17417    esac
17418
17419
17420 if test "$with_readdisplay" = yes; then
17421
17422   ac_save_CPPFLAGS="$CPPFLAGS"
17423   if test \! -z "$includedir" ; then
17424     CPPFLAGS="$CPPFLAGS -I$includedir"
17425   fi
17426   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17427   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
17428 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
17429 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
17430   echo $ECHO_N "(cached) $ECHO_C" >&6
17431 else
17432   cat >conftest.$ac_ext <<_ACEOF
17433 #line $LINENO "configure"
17434 #include "confdefs.h"
17435 #include <X11/Xlib.h>
17436
17437 #include <X11/extensions/readdisplay.h>
17438 _ACEOF
17439 rm -f conftest.$ac_objext
17440 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17441   (eval $ac_compile) 2>&5
17442   ac_status=$?
17443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17444   (exit $ac_status); } &&
17445          { ac_try='test -s conftest.$ac_objext'
17446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17447   (eval $ac_try) 2>&5
17448   ac_status=$?
17449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17450   (exit $ac_status); }; }; then
17451   ac_cv_header_X11_extensions_readdisplay_h=yes
17452 else
17453   echo "$as_me: failed program was:" >&5
17454 cat conftest.$ac_ext >&5
17455 ac_cv_header_X11_extensions_readdisplay_h=no
17456 fi
17457 rm -f conftest.$ac_objext conftest.$ac_ext
17458 fi
17459 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
17460 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
17461 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
17462   cat >>confdefs.h <<\_ACEOF
17463 #define HAVE_READ_DISPLAY_EXTENSION 1
17464 _ACEOF
17465
17466 fi
17467
17468
17469   CPPFLAGS="$ac_save_CPPFLAGS"
17470 elif test "$with_readdisplay" != no; then
17471   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
17472   exit 1
17473 fi
17474
17475
17476 ###############################################################################
17477 #
17478 #       Check for a program to generate random text.
17479 #
17480 #       Zippy is funnier than the idiocy generally spat out by `fortune',
17481 #       so first see if "fortune zippy" works.  Else, use plain "fortune".
17482 #
17483 #       We used to dig around in Emacs to look for the "yow" program, but
17484 #       most people who have Emacs also have "fortune zippy", so nevermind.
17485 #
17486 ###############################################################################
17487
17488 with_fortune_req=""
17489
17490 # Check whether --with-fortune or --without-fortune was given.
17491 if test "${with_fortune+set}" = set; then
17492   withval="$with_fortune"
17493   with_fortune_req="$withval"; with_fortune="$withval"
17494 else
17495   with_fortune=yes
17496 fi;
17497
17498 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
17499   with_fortune=""
17500   with_fortune_req=""
17501 fi
17502
17503 if test -n "$with_fortune_req" ; then
17504   ac_cv_fortune_program=""
17505   case "$with_fortune_req" in
17506     /*)
17507
17508       set dummy $with_fortune_req ; fortune_tmp=$2
17509       echo "$as_me:$LINENO: checking for $fortune_tmp" >&5
17510 echo $ECHO_N "checking for $fortune_tmp... $ECHO_C" >&6
17511       if test -x "$fortune_tmp" ; then
17512         echo "$as_me:$LINENO: result: yes" >&5
17513 echo "${ECHO_T}yes" >&6
17514       else
17515         echo "$as_me:$LINENO: result: no" >&5
17516 echo "${ECHO_T}no" >&6
17517         with_fortune=""
17518       fi
17519     ;;
17520     *)
17521       set dummy $with_fortune_req ; fortune_tmp=$2
17522       # don't cache
17523       unset ac_cv_path_fortune_tmp
17524       # Extract the first word of "$fortune_tmp", so it can be a program name with args.
17525 set dummy $fortune_tmp; ac_word=$2
17526 echo "$as_me:$LINENO: checking for $ac_word" >&5
17527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17528 if test "${ac_cv_path_fortune_tmp+set}" = set; then
17529   echo $ECHO_N "(cached) $ECHO_C" >&6
17530 else
17531   case $fortune_tmp in
17532   [\\/]* | ?:[\\/]*)
17533   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
17534   ;;
17535   *)
17536   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17537 for as_dir in $PATH
17538 do
17539   IFS=$as_save_IFS
17540   test -z "$as_dir" && as_dir=.
17541   for ac_exec_ext in '' $ac_executable_extensions; do
17542   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17543     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
17544     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17545     break 2
17546   fi
17547 done
17548 done
17549
17550   ;;
17551 esac
17552 fi
17553 fortune_tmp=$ac_cv_path_fortune_tmp
17554
17555 if test -n "$fortune_tmp"; then
17556   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17557 echo "${ECHO_T}$fortune_tmp" >&6
17558 else
17559   echo "$as_me:$LINENO: result: no" >&5
17560 echo "${ECHO_T}no" >&6
17561 fi
17562
17563       if test -z "$fortune_tmp" ; then
17564         with_fortune=""
17565       fi
17566     ;;
17567   esac
17568   ac_cv_fortune_program="$with_fortune"
17569
17570 elif test -n "$ac_cv_fortune_program"; then
17571   echo "$as_me:$LINENO: result: checking for fortune... (cached) $ac_cv_fortune_program" >&5
17572 echo "${ECHO_T}checking for fortune... (cached) $ac_cv_fortune_program" >&6
17573 fi
17574
17575 unset ac_cv_path_fortune_tmp
17576 unset fortune_tmp
17577
17578 if test -z "$ac_cv_fortune_program" ; then
17579
17580   # first look for fortune in /usr/games/ (and use absolute path)
17581   for ac_prog in fortune
17582 do
17583   # Extract the first word of "$ac_prog", so it can be a program name with args.
17584 set dummy $ac_prog; ac_word=$2
17585 echo "$as_me:$LINENO: checking for $ac_word" >&5
17586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17587 if test "${ac_cv_path_fortune_tmp+set}" = set; then
17588   echo $ECHO_N "(cached) $ECHO_C" >&6
17589 else
17590   case $fortune_tmp in
17591   [\\/]* | ?:[\\/]*)
17592   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
17593   ;;
17594   *)
17595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17596 as_dummy=""/usr/games""
17597 for as_dir in $as_dummy
17598 do
17599   IFS=$as_save_IFS
17600   test -z "$as_dir" && as_dir=.
17601   for ac_exec_ext in '' $ac_executable_extensions; do
17602   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17603     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
17604     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17605     break 2
17606   fi
17607 done
17608 done
17609
17610   ;;
17611 esac
17612 fi
17613 fortune_tmp=$ac_cv_path_fortune_tmp
17614
17615 if test -n "$fortune_tmp"; then
17616   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17617 echo "${ECHO_T}$fortune_tmp" >&6
17618 else
17619   echo "$as_me:$LINENO: result: no" >&5
17620 echo "${ECHO_T}no" >&6
17621 fi
17622
17623   test -n "$fortune_tmp" && break
17624 done
17625
17626
17627   # if it's not there, look on $PATH (and don't use absolute path)
17628   if test -z "$fortune_tmp" ; then
17629      for ac_prog in fortune
17630 do
17631   # Extract the first word of "$ac_prog", so it can be a program name with args.
17632 set dummy $ac_prog; ac_word=$2
17633 echo "$as_me:$LINENO: checking for $ac_word" >&5
17634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17635 if test "${ac_cv_prog_fortune_tmp+set}" = set; then
17636   echo $ECHO_N "(cached) $ECHO_C" >&6
17637 else
17638   if test -n "$fortune_tmp"; then
17639   ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
17640 else
17641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17642 for as_dir in $PATH
17643 do
17644   IFS=$as_save_IFS
17645   test -z "$as_dir" && as_dir=.
17646   for ac_exec_ext in '' $ac_executable_extensions; do
17647   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17648     ac_cv_prog_fortune_tmp="$ac_prog"
17649     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17650     break 2
17651   fi
17652 done
17653 done
17654
17655 fi
17656 fi
17657 fortune_tmp=$ac_cv_prog_fortune_tmp
17658 if test -n "$fortune_tmp"; then
17659   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17660 echo "${ECHO_T}$fortune_tmp" >&6
17661 else
17662   echo "$as_me:$LINENO: result: no" >&5
17663 echo "${ECHO_T}no" >&6
17664 fi
17665
17666   test -n "$fortune_tmp" && break
17667 done
17668
17669   fi
17670
17671   # if we didn't find anything, then just assume /usr/games/
17672   if test -z "$fortune_tmp" ; then
17673      fortune_tmp="/usr/games/fortune"
17674   fi
17675
17676   ac_cv_fortune_program="$fortune_tmp"
17677
17678   # now check to see whether "fortune zippy" works.
17679   #
17680   fortune_tmp="$fortune_tmp zippy"
17681   echo "$as_me:$LINENO: checking for zippy quotes" >&5
17682 echo $ECHO_N "checking for zippy quotes... $ECHO_C" >&6
17683   if ( $fortune_tmp >/dev/null 2>&1 ); then
17684     ac_cv_fortune_program="$fortune_tmp"
17685     echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17686 echo "${ECHO_T}$fortune_tmp" >&6
17687   else
17688     echo "$as_me:$LINENO: result: no" >&5
17689 echo "${ECHO_T}no" >&6
17690   fi
17691
17692 fi
17693
17694 unset ac_cv_path_fortune_tmp
17695 unset fortune_tmp
17696
17697 cat >>confdefs.h <<_ACEOF
17698 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
17699 _ACEOF
17700
17701
17702
17703 ###############################################################################
17704 #
17705 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
17706 #       This should be safe, but let's give people the option.
17707 #
17708 ###############################################################################
17709
17710 setuid_hacks_default=no
17711 setuid_hacks="$setuid_hacks_default"
17712
17713 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
17714 if test "${with_setuid_hacks+set}" = set; then
17715   withval="$with_setuid_hacks"
17716   setuid_hacks="$withval"
17717 else
17718   setuid_hacks="$setuid_hacks_default"
17719 fi;
17720
17721
17722    case "$setuid_hacks" in
17723     yes) ;;
17724     no)  ;;
17725
17726     /*)
17727      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
17728 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
17729      d=$setuid_hacks/include
17730      if test -d $d; then
17731        X_CFLAGS="-I$d $X_CFLAGS"
17732        echo "$as_me:$LINENO: result: $d" >&5
17733 echo "${ECHO_T}$d" >&6
17734      else
17735        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17736 echo "${ECHO_T}not found ($d: no such directory)" >&6
17737      fi
17738
17739      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
17740 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
17741      d=$setuid_hacks/lib
17742      if test -d $d; then
17743        X_LIBS="-L$d $X_LIBS"
17744        echo "$as_me:$LINENO: result: $d" >&5
17745 echo "${ECHO_T}$d" >&6
17746      else
17747        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17748 echo "${ECHO_T}not found ($d: no such directory)" >&6
17749      fi
17750
17751      # replace the directory string with "yes".
17752      setuid_hacks_req="yes"
17753      setuid_hacks=$setuid_hacks_req
17754      ;;
17755
17756     *)
17757      echo ""
17758      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
17759      echo "       If it is a directory, then \`DIR/include' will be added to"
17760      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17761      exit 1
17762      ;;
17763    esac
17764
17765
17766 if test "$setuid_hacks" = yes; then
17767   true
17768 elif test "$setuid_hacks" != no; then
17769   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
17770   exit 1
17771 fi
17772
17773
17774 ###############################################################################
17775 #
17776 #       Done testing.  Now, set up the various -I and -L variables,
17777 #       and decide which GUI program to build by default.
17778 #
17779 ###############################################################################
17780
17781 DEPEND=makedepend
17782 DEPEND_FLAGS=
17783 DEPEND_DEFINES=
17784
17785
17786 if test \! -z "$includedir" ; then
17787   INCLUDES="$INCLUDES -I$includedir"
17788 fi
17789
17790 if test \! -z "$libdir" ; then
17791   LDFLAGS="$LDFLAGS -L$libdir"
17792 fi
17793
17794
17795 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
17796 ALL_DEMO_PROGRAMS=
17797 if test "$have_motif" = yes; then
17798   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
17799   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
17800 fi
17801 if test "$have_gtk" = yes; then
17802   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
17803   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
17804 fi
17805
17806
17807 if test "$have_kerberos" = yes; then
17808   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
17809   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
17810 fi
17811 if test "$have_pam" = yes; then
17812   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
17813   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
17814   INSTALL_PAM="install-pam"
17815 fi
17816   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
17817   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
17818
17819
17820 if test "$enable_locking" = yes; then
17821   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
17822   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
17823 else
17824   LOCK_SRCS='$(NOLOCK_SRCS_1)'
17825   LOCK_OBJS='$(NOLOCK_OBJS_1)'
17826 fi
17827
17828 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
17829
17830 if test "$need_setuid" = yes; then
17831   NEED_SETUID=yes
17832 else
17833   NEED_SETUID=no
17834 fi
17835
17836 if test "$setuid_hacks" = yes; then
17837   SETUID_HACKS=yes
17838 else
17839   SETUID_HACKS=no
17840 fi
17841
17842 tab='   '
17843 if test "$have_gl" = yes; then
17844   GL_EXES='$(GL_EXES)'
17845   GL_UTIL_EXES='$(GL_UTIL_EXES)'
17846   GL_MEN='$(GL_MEN)'
17847   GL_KLUDGE="${tab}  "
17848 else
17849   GL_KLUDGE="-${tab}  "
17850 fi
17851
17852 if test "$have_gle" = yes; then
17853   GLE_EXES='$(GLE_EXES)'
17854   GLE_KLUDGE="${tab}   "
17855 else
17856   GLE_KLUDGE="-${tab}   "
17857 fi
17858
17859 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
17860  JPEG_EXES='$(JPEG_EXES)'
17861 fi
17862
17863
17864 # Another substitution in the XScreenSaver.ad.in file:
17865 #
17866 if test "$have_gnome_help" = yes; then
17867   GNOMEHELP_Y=''
17868   GNOMEHELP_N='!    '
17869 else
17870   GNOMEHELP_Y='!    '
17871   GNOMEHELP_N=''
17872 fi
17873
17874
17875 # Now that we know whether we have Gnome, we can decide where the XML
17876 # config files get installed.
17877 #
17878 if test -z "$HACK_CONF_DIR" ; then
17879   if test -n "$GNOME_DATADIR" ; then
17880     HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
17881   else
17882     HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
17883   fi
17884 fi
17885
17886
17887
17888 # After computing $HACK_CONF_DIR, make sure $GLADE_DATADIR has a value
17889 # so that we know where to install the Gtk pixmaps.
17890 #
17891 # It should usually be "/usr/share/pixmaps/", but we can't just use
17892 # "$(prefix)/share/pixmaps" because that would usually result in
17893 # "/usr/X11R6/share/pixmaps/", which is wrong.  It needs to be the
17894 # Gnome/Gtk prefix, not the overall prefix.
17895 #
17896 if test -n "$GNOME_DATADIR" ; then
17897   GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver'
17898 elif test "$have_gtk" = yes; then
17899   if test -n "$pkg_config"; then
17900     if test "$have_gtk2" = yes; then
17901       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
17902     else
17903       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+`
17904     fi
17905   else
17906     GLADE_DATADIR=`$gtk_config --prefix`
17907   fi
17908   GLADE_DATADIR="$GLADE_DATADIR/share/xscreensaver"
17909 else
17910   GLADE_DATADIR=''
17911 fi
17912
17913
17914 # Set PO_DATADIR to something sensible.
17915 #
17916 echo "$as_me:$LINENO: checking for locale directory" >&5
17917 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
17918 if test -n "$GNOME_DATADIR" ; then
17919   PO_DATADIR="$GNOME_DATADIR"
17920 elif test "$have_gtk" = yes; then
17921   if test -n "$pkg_config"; then
17922     if test "$have_gtk2" = yes; then
17923       PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
17924     else
17925       PO_DATADIR=`$pkg_config --variable=prefix gtk+`
17926     fi
17927   else
17928     PO_DATADIR=`$gtk_config --prefix`
17929   fi
17930   PO_DATADIR="$PO_DATADIR/share"
17931 fi
17932
17933 if test -z "$PO_DATADIR" ; then
17934   #
17935   # #### Total fucking kludge --
17936   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
17937   # but of course we need to expand all the nested variables to do that...
17938   #
17939   dd=$datadir
17940   eval dd=${dd}
17941   eval dd=${dd}
17942   eval dd=${dd}
17943   eval dd=${dd}
17944   eval dd=${dd}
17945   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
17946 fi
17947
17948 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
17949 echo "${ECHO_T}$PO_DATADIR/locale" >&6
17950
17951
17952 # canonicalize slashes.
17953 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
17954
17955 # gcc 3.0 likes to issue this warning for every file:
17956 #
17957 # cc1: warning: changing search order for system directory "/usr/local/include"
17958 # cc1: warning:   as it has already been specified as a non-system directory
17959 #
17960 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
17961 # Which *should* be totally redundant, and thus an ok thing to delete?
17962 #
17963 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
17964
17965
17966 ###############################################################################
17967 #
17968 #       Perform substitutions and write Makefiles.
17969 #
17970 ###############################################################################
17971
17972
17973
17974
17975
17976
17977
17978
17979
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 APPDEFAULTS=$ac_x_app_defaults
18021
18022
18023
18024
18025
18026
18027
18028 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"
18029 cat >confcache <<\_ACEOF
18030 # This file is a shell script that caches the results of configure
18031 # tests run on this system so they can be shared between configure
18032 # scripts and configure runs, see configure's option --config-cache.
18033 # It is not useful on other systems.  If it contains results you don't
18034 # want to keep, you may remove or edit it.
18035 #
18036 # config.status only pays attention to the cache file if you give it
18037 # the --recheck option to rerun configure.
18038 #
18039 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18040 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18041 # following values.
18042
18043 _ACEOF
18044
18045 # The following way of writing the cache mishandles newlines in values,
18046 # but we know of no workaround that is simple, portable, and efficient.
18047 # So, don't put newlines in cache variables' values.
18048 # Ultrix sh set writes to stderr and can't be redirected directly,
18049 # and sets the high bit in the cache file unless we assign to the vars.
18050 {
18051   (set) 2>&1 |
18052     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18053     *ac_space=\ *)
18054       # `set' does not quote correctly, so add quotes (double-quote
18055       # substitution turns \\\\ into \\, and sed turns \\ into \).
18056       sed -n \
18057         "s/'/'\\\\''/g;
18058           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18059       ;;
18060     *)
18061       # `set' quotes correctly as required by POSIX, so do not add quotes.
18062       sed -n \
18063         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18064       ;;
18065     esac;
18066 } |
18067   sed '
18068      t clear
18069      : clear
18070      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18071      t end
18072      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18073      : end' >>confcache
18074 if cmp -s $cache_file confcache; then :; else
18075   if test -w $cache_file; then
18076     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18077     cat confcache >$cache_file
18078   else
18079     echo "not updating unwritable cache $cache_file"
18080   fi
18081 fi
18082 rm -f confcache
18083
18084 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18085 # Let make expand exec_prefix.
18086 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18087
18088 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18089 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18090 # trailing colons and then remove the whole line if VPATH becomes empty
18091 # (actually we leave an empty line to preserve line numbers).
18092 if test "x$srcdir" = x.; then
18093   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18094 s/:*\$(srcdir):*/:/;
18095 s/:*\${srcdir}:*/:/;
18096 s/:*@srcdir@:*/:/;
18097 s/^\([^=]*=[    ]*\):*/\1/;
18098 s/:*$//;
18099 s/^[^=]*=[      ]*$//;
18100 }'
18101 fi
18102
18103 DEFS=-DHAVE_CONFIG_H
18104
18105
18106
18107         mv -f po/POTFILES po/POTFILES.tmp
18108         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
18109         rm -f po/POTFILES.tmp
18110
18111
18112
18113 : ${CONFIG_STATUS=./config.status}
18114 ac_clean_files_save=$ac_clean_files
18115 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18116 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18117 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18118 cat >$CONFIG_STATUS <<_ACEOF
18119 #! $SHELL
18120 # Generated by $as_me.
18121 # Run this file to recreate the current configuration.
18122 # Compiler output produced by configure, useful for debugging
18123 # configure, is in config.log if it exists.
18124
18125 debug=false
18126 SHELL=\${CONFIG_SHELL-$SHELL}
18127 _ACEOF
18128
18129 cat >>$CONFIG_STATUS <<\_ACEOF
18130
18131 ## --------------------- ##
18132 ## M4sh Initialization.  ##
18133 ## --------------------- ##
18134
18135 # Be Bourne compatible
18136 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18137   emulate sh
18138   NULLCMD=:
18139 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18140   set -o posix
18141 fi
18142
18143 # NLS nuisances.
18144 # Support unset when possible.
18145 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18146   as_unset=unset
18147 else
18148   as_unset=false
18149 fi
18150
18151 (set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
18152     { $as_unset LANG || test "${LANG+set}" != set; } ||
18153       { LANG=C; export LANG; }
18154 (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
18155     { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
18156       { LC_ALL=C; export LC_ALL; }
18157 (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
18158     { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
18159       { LC_TIME=C; export LC_TIME; }
18160 (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
18161     { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
18162       { LC_CTYPE=C; export LC_CTYPE; }
18163 (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
18164     { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
18165       { LANGUAGE=C; export LANGUAGE; }
18166 (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
18167     { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
18168       { LC_COLLATE=C; export LC_COLLATE; }
18169 (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
18170     { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
18171       { LC_NUMERIC=C; export LC_NUMERIC; }
18172 (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
18173     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
18174       { LC_MESSAGES=C; export LC_MESSAGES; }
18175
18176
18177 # Name of the executable.
18178 as_me=`(basename "$0") 2>/dev/null ||
18179 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18180          X"$0" : 'X\(//\)$' \| \
18181          X"$0" : 'X\(/\)$' \| \
18182          .     : '\(.\)' 2>/dev/null ||
18183 echo X/"$0" |
18184     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18185           /^X\/\(\/\/\)$/{ s//\1/; q; }
18186           /^X\/\(\/\).*/{ s//\1/; q; }
18187           s/.*/./; q'`
18188
18189 # PATH needs CR, and LINENO needs CR and PATH.
18190 # Avoid depending upon Character Ranges.
18191 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18192 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18193 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18194 as_cr_digits='0123456789'
18195 as_cr_alnum=$as_cr_Letters$as_cr_digits
18196
18197 # The user is always right.
18198 if test "${PATH_SEPARATOR+set}" != set; then
18199   echo "#! /bin/sh" >conftest.sh
18200   echo  "exit 0"   >>conftest.sh
18201   chmod +x conftest.sh
18202   if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
18203     PATH_SEPARATOR=';'
18204   else
18205     PATH_SEPARATOR=:
18206   fi
18207   rm -f conftest.sh
18208 fi
18209
18210
18211   as_lineno_1=$LINENO
18212   as_lineno_2=$LINENO
18213   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18214   test "x$as_lineno_1" != "x$as_lineno_2" &&
18215   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
18216   # Find who we are.  Look in the path if we contain no path at all
18217   # relative or not.
18218   case $0 in
18219     *[\\/]* ) as_myself=$0 ;;
18220     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18221 for as_dir in $PATH
18222 do
18223   IFS=$as_save_IFS
18224   test -z "$as_dir" && as_dir=.
18225   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18226 done
18227
18228        ;;
18229   esac
18230   # We did not find ourselves, most probably we were run as `sh COMMAND'
18231   # in which case we are not to be found in the path.
18232   if test "x$as_myself" = x; then
18233     as_myself=$0
18234   fi
18235   if test ! -f "$as_myself"; then
18236     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18237 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18238    { (exit 1); exit 1; }; }
18239   fi
18240   case $CONFIG_SHELL in
18241   '')
18242     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18243 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18244 do
18245   IFS=$as_save_IFS
18246   test -z "$as_dir" && as_dir=.
18247   for as_base in sh bash ksh sh5; do
18248          case $as_dir in
18249          /*)
18250            if ("$as_dir/$as_base" -c '
18251   as_lineno_1=$LINENO
18252   as_lineno_2=$LINENO
18253   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18254   test "x$as_lineno_1" != "x$as_lineno_2" &&
18255   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
18256              CONFIG_SHELL=$as_dir/$as_base
18257              export CONFIG_SHELL
18258              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18259            fi;;
18260          esac
18261        done
18262 done
18263 ;;
18264   esac
18265
18266   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18267   # uniformly replaced by the line number.  The first 'sed' inserts a
18268   # line-number line before each line; the second 'sed' does the real
18269   # work.  The second script uses 'N' to pair each line-number line
18270   # with the numbered line, and appends trailing '-' during
18271   # substitution so that $LINENO is not a special case at line end.
18272   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18273   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
18274   sed '=' <$as_myself |
18275     sed '
18276       N
18277       s,$,-,
18278       : loop
18279       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18280       t loop
18281       s,-$,,
18282       s,^['$as_cr_digits']*\n,,
18283     ' >$as_me.lineno &&
18284   chmod +x $as_me.lineno ||
18285     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18286 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18287    { (exit 1); exit 1; }; }
18288
18289   # Don't try to exec as it changes $[0], causing all sort of problems
18290   # (the dirname of $[0] is not the place where we might find the
18291   # original and so on.  Autoconf is especially sensible to this).
18292   . ./$as_me.lineno
18293   # Exit status is that of the last command.
18294   exit
18295 }
18296
18297
18298 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18299   *c*,-n*) ECHO_N= ECHO_C='
18300 ' ECHO_T='      ' ;;
18301   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18302   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
18303 esac
18304
18305 if expr a : '\(a\)' >/dev/null 2>&1; then
18306   as_expr=expr
18307 else
18308   as_expr=false
18309 fi
18310
18311 rm -f conf$$ conf$$.exe conf$$.file
18312 echo >conf$$.file
18313 if ln -s conf$$.file conf$$ 2>/dev/null; then
18314   # We could just check for DJGPP; but this test a) works b) is more generic
18315   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18316   if test -f conf$$.exe; then
18317     # Don't use ln at all; we don't have any links
18318     as_ln_s='cp -p'
18319   else
18320     as_ln_s='ln -s'
18321   fi
18322 elif ln conf$$.file conf$$ 2>/dev/null; then
18323   as_ln_s=ln
18324 else
18325   as_ln_s='cp -p'
18326 fi
18327 rm -f conf$$ conf$$.exe conf$$.file
18328
18329 as_executable_p="test -f"
18330
18331 # Sed expression to map a string onto a valid CPP name.
18332 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18333
18334 # Sed expression to map a string onto a valid variable name.
18335 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18336
18337
18338 # IFS
18339 # We need space, tab and new line, in precisely that order.
18340 as_nl='
18341 '
18342 IFS="   $as_nl"
18343
18344 # CDPATH.
18345 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
18346
18347 exec 6>&1
18348
18349 # Open the log real soon, to keep \$[0] and so on meaningful, and to
18350 # report actual input values of CONFIG_FILES etc. instead of their
18351 # values after options handling.  Logging --version etc. is OK.
18352 exec 5>>config.log
18353 {
18354   echo
18355   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18356 ## Running $as_me. ##
18357 _ASBOX
18358 } >&5
18359 cat >&5 <<_CSEOF
18360
18361 This file was extended by $as_me, which was
18362 generated by GNU Autoconf 2.53.  Invocation command line was
18363
18364   CONFIG_FILES    = $CONFIG_FILES
18365   CONFIG_HEADERS  = $CONFIG_HEADERS
18366   CONFIG_LINKS    = $CONFIG_LINKS
18367   CONFIG_COMMANDS = $CONFIG_COMMANDS
18368   $ $0 $@
18369
18370 _CSEOF
18371 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18372 echo >&5
18373 _ACEOF
18374
18375 # Files that config.status was made for.
18376 if test -n "$ac_config_files"; then
18377   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18378 fi
18379
18380 if test -n "$ac_config_headers"; then
18381   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18382 fi
18383
18384 if test -n "$ac_config_links"; then
18385   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18386 fi
18387
18388 if test -n "$ac_config_commands"; then
18389   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18390 fi
18391
18392 cat >>$CONFIG_STATUS <<\_ACEOF
18393
18394 ac_cs_usage="\
18395 \`$as_me' instantiates files from templates according to the
18396 current configuration.
18397
18398 Usage: $0 [OPTIONS] [FILE]...
18399
18400   -h, --help       print this help, then exit
18401   -V, --version    print version number, then exit
18402   -d, --debug      don't remove temporary files
18403       --recheck    update $as_me by reconfiguring in the same conditions
18404   --file=FILE[:TEMPLATE]
18405                    instantiate the configuration file FILE
18406   --header=FILE[:TEMPLATE]
18407                    instantiate the configuration header FILE
18408
18409 Configuration files:
18410 $config_files
18411
18412 Configuration headers:
18413 $config_headers
18414
18415 Configuration commands:
18416 $config_commands
18417
18418 Report bugs to <bug-autoconf@gnu.org>."
18419 _ACEOF
18420
18421 cat >>$CONFIG_STATUS <<_ACEOF
18422 ac_cs_version="\\
18423 config.status
18424 configured by $0, generated by GNU Autoconf 2.53,
18425   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18426
18427 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18428 Free Software Foundation, Inc.
18429 This config.status script is free software; the Free Software Foundation
18430 gives unlimited permission to copy, distribute and modify it."
18431 srcdir=$srcdir
18432 INSTALL="$INSTALL"
18433 _ACEOF
18434
18435 cat >>$CONFIG_STATUS <<\_ACEOF
18436 # If no file are specified by the user, then we need to provide default
18437 # value.  By we need to know if files were specified by the user.
18438 ac_need_defaults=:
18439 while test $# != 0
18440 do
18441   case $1 in
18442   --*=*)
18443     ac_option=`expr "x$1" : 'x\([^=]*\)='`
18444     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18445     shift
18446     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18447     shift
18448     ;;
18449   -*);;
18450   *) # This is not an option, so the user has probably given explicit
18451      # arguments.
18452      ac_need_defaults=false;;
18453   esac
18454
18455   case $1 in
18456   # Handling of the options.
18457 _ACEOF
18458 cat >>$CONFIG_STATUS <<_ACEOF
18459   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18460     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18461     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18462 _ACEOF
18463 cat >>$CONFIG_STATUS <<\_ACEOF
18464   --version | --vers* | -V )
18465     echo "$ac_cs_version"; exit 0 ;;
18466   --he | --h)
18467     # Conflict between --help and --header
18468     { { echo "$as_me:$LINENO: error: ambiguous option: $1
18469 Try \`$0 --help' for more information." >&5
18470 echo "$as_me: error: ambiguous option: $1
18471 Try \`$0 --help' for more information." >&2;}
18472    { (exit 1); exit 1; }; };;
18473   --help | --hel | -h )
18474     echo "$ac_cs_usage"; exit 0 ;;
18475   --debug | --d* | -d )
18476     debug=: ;;
18477   --file | --fil | --fi | --f )
18478     shift
18479     CONFIG_FILES="$CONFIG_FILES $1"
18480     ac_need_defaults=false;;
18481   --header | --heade | --head | --hea )
18482     shift
18483     CONFIG_HEADERS="$CONFIG_HEADERS $1"
18484     ac_need_defaults=false;;
18485
18486   # This is an error.
18487   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18488 Try \`$0 --help' for more information." >&5
18489 echo "$as_me: error: unrecognized option: $1
18490 Try \`$0 --help' for more information." >&2;}
18491    { (exit 1); exit 1; }; } ;;
18492
18493   *) ac_config_targets="$ac_config_targets $1" ;;
18494
18495   esac
18496   shift
18497 done
18498
18499 _ACEOF
18500
18501 cat >>$CONFIG_STATUS <<_ACEOF
18502 #
18503 # INIT-COMMANDS section.
18504 #
18505
18506 INTLTOOL_PERL=${INTLTOOL_PERL}
18507
18508
18509 _ACEOF
18510
18511
18512
18513 cat >>$CONFIG_STATUS <<\_ACEOF
18514 for ac_config_target in $ac_config_targets
18515 do
18516   case "$ac_config_target" in
18517   # Handling of arguments.
18518   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18519   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
18520   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
18521   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
18522   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
18523   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
18524   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
18525   "driver/xscreensaver.kss" ) CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.kss" ;;
18526   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
18527   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
18528   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
18529   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18530 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18531    { (exit 1); exit 1; }; };;
18532   esac
18533 done
18534
18535 # If the user did not use the arguments to specify the items to instantiate,
18536 # then the envvar interface is used.  Set only those that are not.
18537 # We use the long form for the default assignment because of an extremely
18538 # bizarre bug on SunOS 4.1.3.
18539 if $ac_need_defaults; then
18540   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18541   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18542   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18543 fi
18544
18545 # Create a temporary directory, and hook for its removal unless debugging.
18546 $debug ||
18547 {
18548   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18549   trap '{ (exit 1); exit 1; }' 1 2 13 15
18550 }
18551
18552 # Create a (secure) tmp directory for tmp files.
18553 : ${TMPDIR=/tmp}
18554 {
18555   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18556   test -n "$tmp" && test -d "$tmp"
18557 }  ||
18558 {
18559   tmp=$TMPDIR/cs$$-$RANDOM
18560   (umask 077 && mkdir $tmp)
18561 } ||
18562 {
18563    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18564    { (exit 1); exit 1; }
18565 }
18566
18567 _ACEOF
18568
18569 cat >>$CONFIG_STATUS <<_ACEOF
18570
18571 #
18572 # CONFIG_FILES section.
18573 #
18574
18575 # No need to generate the scripts if there are no CONFIG_FILES.
18576 # This happens for instance when ./config.status config.h
18577 if test -n "\$CONFIG_FILES"; then
18578   # Protect against being on the right side of a sed subst in config.status.
18579   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18580    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18581 s,@SHELL@,$SHELL,;t t
18582 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18583 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18584 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18585 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18586 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18587 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18588 s,@exec_prefix@,$exec_prefix,;t t
18589 s,@prefix@,$prefix,;t t
18590 s,@program_transform_name@,$program_transform_name,;t t
18591 s,@bindir@,$bindir,;t t
18592 s,@sbindir@,$sbindir,;t t
18593 s,@libexecdir@,$libexecdir,;t t
18594 s,@datadir@,$datadir,;t t
18595 s,@sysconfdir@,$sysconfdir,;t t
18596 s,@sharedstatedir@,$sharedstatedir,;t t
18597 s,@localstatedir@,$localstatedir,;t t
18598 s,@libdir@,$libdir,;t t
18599 s,@includedir@,$includedir,;t t
18600 s,@oldincludedir@,$oldincludedir,;t t
18601 s,@infodir@,$infodir,;t t
18602 s,@mandir@,$mandir,;t t
18603 s,@build_alias@,$build_alias,;t t
18604 s,@host_alias@,$host_alias,;t t
18605 s,@target_alias@,$target_alias,;t t
18606 s,@DEFS@,$DEFS,;t t
18607 s,@ECHO_C@,$ECHO_C,;t t
18608 s,@ECHO_N@,$ECHO_N,;t t
18609 s,@ECHO_T@,$ECHO_T,;t t
18610 s,@LIBS@,$LIBS,;t t
18611 s,@build@,$build,;t t
18612 s,@build_cpu@,$build_cpu,;t t
18613 s,@build_vendor@,$build_vendor,;t t
18614 s,@build_os@,$build_os,;t t
18615 s,@host@,$host,;t t
18616 s,@host_cpu@,$host_cpu,;t t
18617 s,@host_vendor@,$host_vendor,;t t
18618 s,@host_os@,$host_os,;t t
18619 s,@CC@,$CC,;t t
18620 s,@CFLAGS@,$CFLAGS,;t t
18621 s,@LDFLAGS@,$LDFLAGS,;t t
18622 s,@CPPFLAGS@,$CPPFLAGS,;t t
18623 s,@ac_ct_CC@,$ac_ct_CC,;t t
18624 s,@EXEEXT@,$EXEEXT,;t t
18625 s,@OBJEXT@,$OBJEXT,;t t
18626 s,@CPP@,$CPP,;t t
18627 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18628 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18629 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18630 s,@SET_MAKE@,$SET_MAKE,;t t
18631 s,@PERL@,$PERL,;t t
18632 s,@X_CFLAGS@,$X_CFLAGS,;t t
18633 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
18634 s,@X_LIBS@,$X_LIBS,;t t
18635 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
18636 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
18637 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
18638 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
18639 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
18640 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
18641 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
18642 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
18643 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
18644 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
18645 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
18646 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
18647 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
18648 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
18649 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
18650 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
18651 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
18652 s,@RANLIB@,$RANLIB,;t t
18653 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18654 s,@ALLOCA@,$ALLOCA,;t t
18655 s,@USE_NLS@,$USE_NLS,;t t
18656 s,@MSGFMT@,$MSGFMT,;t t
18657 s,@GMSGFMT@,$GMSGFMT,;t t
18658 s,@XGETTEXT@,$XGETTEXT,;t t
18659 s,@CATALOGS@,$CATALOGS,;t t
18660 s,@CATOBJEXT@,$CATOBJEXT,;t t
18661 s,@DATADIRNAME@,$DATADIRNAME,;t t
18662 s,@GMOFILES@,$GMOFILES,;t t
18663 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
18664 s,@INTLDEPS@,$INTLDEPS,;t t
18665 s,@INTLLIBS@,$INTLLIBS,;t t
18666 s,@INTLOBJS@,$INTLOBJS,;t t
18667 s,@POFILES@,$POFILES,;t t
18668 s,@POSUB@,$POSUB,;t t
18669 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
18670 s,@pkg_config@,$pkg_config,;t t
18671 s,@glib_config@,$glib_config,;t t
18672 s,@gtk_config@,$gtk_config,;t t
18673 s,@gnome_config@,$gnome_config,;t t
18674 s,@have_gnome_help@,$have_gnome_help,;t t
18675 s,@xml_config@,$xml_config,;t t
18676 s,@gdk_pixbuf_config@,$gdk_pixbuf_config,;t t
18677 s,@fortune_tmp@,$fortune_tmp,;t t
18678 s,@INCLUDES@,$INCLUDES,;t t
18679 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
18680 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
18681 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
18682 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
18683 s,@GTK_LIBS@,$GTK_LIBS,;t t
18684 s,@XML_LIBS@,$XML_LIBS,;t t
18685 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
18686 s,@HACK_LIBS@,$HACK_LIBS,;t t
18687 s,@XPM_LIBS@,$XPM_LIBS,;t t
18688 s,@GL_LIBS@,$GL_LIBS,;t t
18689 s,@GLE_LIBS@,$GLE_LIBS,;t t
18690 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
18691 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
18692 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
18693 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
18694 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
18695 s,@NEED_SETUID@,$NEED_SETUID,;t t
18696 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
18697 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
18698 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
18699 s,@XMU_SRCS@,$XMU_SRCS,;t t
18700 s,@XMU_OBJS@,$XMU_OBJS,;t t
18701 s,@XMU_LIBS@,$XMU_LIBS,;t t
18702 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
18703 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
18704 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
18705 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
18706 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
18707 s,@JPEG_EXES@,$JPEG_EXES,;t t
18708 s,@GL_EXES@,$GL_EXES,;t t
18709 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
18710 s,@GL_MEN@,$GL_MEN,;t t
18711 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
18712 s,@GLE_EXES@,$GLE_EXES,;t t
18713 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
18714 s,@GNOMEHELP_Y@,$GNOMEHELP_Y,;t t
18715 s,@GNOMEHELP_N@,$GNOMEHELP_N,;t t
18716 s,@HACKDIR@,$HACKDIR,;t t
18717 s,@GNOME_DATADIR@,$GNOME_DATADIR,;t t
18718 s,@GLADE_DATADIR@,$GLADE_DATADIR,;t t
18719 s,@PO_DATADIR@,$PO_DATADIR,;t t
18720 s,@GNOME_PANELDIR@,$GNOME_PANELDIR,;t t
18721 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
18722 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
18723 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
18724 s,@DEPEND@,$DEPEND,;t t
18725 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
18726 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
18727 CEOF
18728
18729 _ACEOF
18730
18731   cat >>$CONFIG_STATUS <<\_ACEOF
18732   # Split the substitutions into bite-sized pieces for seds with
18733   # small command number limits, like on Digital OSF/1 and HP-UX.
18734   ac_max_sed_lines=48
18735   ac_sed_frag=1 # Number of current file.
18736   ac_beg=1 # First line for current file.
18737   ac_end=$ac_max_sed_lines # Line after last line for current file.
18738   ac_more_lines=:
18739   ac_sed_cmds=
18740   while $ac_more_lines; do
18741     if test $ac_beg -gt 1; then
18742       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18743     else
18744       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18745     fi
18746     if test ! -s $tmp/subs.frag; then
18747       ac_more_lines=false
18748     else
18749       # The purpose of the label and of the branching condition is to
18750       # speed up the sed processing (if there are no `@' at all, there
18751       # is no need to browse any of the substitutions).
18752       # These are the two extra sed commands mentioned above.
18753       (echo ':t
18754   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18755       if test -z "$ac_sed_cmds"; then
18756         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18757       else
18758         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18759       fi
18760       ac_sed_frag=`expr $ac_sed_frag + 1`
18761       ac_beg=$ac_end
18762       ac_end=`expr $ac_end + $ac_max_sed_lines`
18763     fi
18764   done
18765   if test -z "$ac_sed_cmds"; then
18766     ac_sed_cmds=cat
18767   fi
18768 fi # test -n "$CONFIG_FILES"
18769
18770 _ACEOF
18771 cat >>$CONFIG_STATUS <<\_ACEOF
18772 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18773   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18774   case $ac_file in
18775   - | *:- | *:-:* ) # input from stdin
18776         cat >$tmp/stdin
18777         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18778         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18779   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18780         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18781   * )   ac_file_in=$ac_file.in ;;
18782   esac
18783
18784   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18785   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18786 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18787          X"$ac_file" : 'X\(//\)[^/]' \| \
18788          X"$ac_file" : 'X\(//\)$' \| \
18789          X"$ac_file" : 'X\(/\)' \| \
18790          .     : '\(.\)' 2>/dev/null ||
18791 echo X"$ac_file" |
18792     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18793           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18794           /^X\(\/\/\)$/{ s//\1/; q; }
18795           /^X\(\/\).*/{ s//\1/; q; }
18796           s/.*/./; q'`
18797   { case "$ac_dir" in
18798   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18799   *)                      as_incr_dir=.;;
18800 esac
18801 as_dummy="$ac_dir"
18802 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18803   case $as_mkdir_dir in
18804     # Skip DOS drivespec
18805     ?:) as_incr_dir=$as_mkdir_dir ;;
18806     *)
18807       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18808       test -d "$as_incr_dir" ||
18809         mkdir "$as_incr_dir" ||
18810         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18811 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18812    { (exit 1); exit 1; }; }
18813     ;;
18814   esac
18815 done; }
18816
18817   ac_builddir=.
18818
18819 if test "$ac_dir" != .; then
18820   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18821   # A "../" for each directory in $ac_dir_suffix.
18822   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18823 else
18824   ac_dir_suffix= ac_top_builddir=
18825 fi
18826
18827 case $srcdir in
18828   .)  # No --srcdir option.  We are building in place.
18829     ac_srcdir=.
18830     if test -z "$ac_top_builddir"; then
18831        ac_top_srcdir=.
18832     else
18833        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18834     fi ;;
18835   [\\/]* | ?:[\\/]* )  # Absolute path.
18836     ac_srcdir=$srcdir$ac_dir_suffix;
18837     ac_top_srcdir=$srcdir ;;
18838   *) # Relative path.
18839     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18840     ac_top_srcdir=$ac_top_builddir$srcdir ;;
18841 esac
18842 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18843 # absolute.
18844 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
18845 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
18846 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18847 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18848
18849
18850   case $INSTALL in
18851   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18852   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18853   esac
18854
18855   if test x"$ac_file" != x-; then
18856     { echo "$as_me:$LINENO: creating $ac_file" >&5
18857 echo "$as_me: creating $ac_file" >&6;}
18858     rm -f "$ac_file"
18859   fi
18860   # Let's still pretend it is `configure' which instantiates (i.e., don't
18861   # use $as_me), people would be surprised to read:
18862   #    /* config.h.  Generated by config.status.  */
18863   if test x"$ac_file" = x-; then
18864     configure_input=
18865   else
18866     configure_input="$ac_file.  "
18867   fi
18868   configure_input=$configure_input"Generated from `echo $ac_file_in |
18869                                      sed 's,.*/,,'` by configure."
18870
18871   # First look for the input files in the build tree, otherwise in the
18872   # src tree.
18873   ac_file_inputs=`IFS=:
18874     for f in $ac_file_in; do
18875       case $f in
18876       -) echo $tmp/stdin ;;
18877       [\\/$]*)
18878          # Absolute (can't be DOS-style, as IFS=:)
18879          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18880 echo "$as_me: error: cannot find input file: $f" >&2;}
18881    { (exit 1); exit 1; }; }
18882          echo $f;;
18883       *) # Relative
18884          if test -f "$f"; then
18885            # Build tree
18886            echo $f
18887          elif test -f "$srcdir/$f"; then
18888            # Source tree
18889            echo $srcdir/$f
18890          else
18891            # /dev/null tree
18892            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18893 echo "$as_me: error: cannot find input file: $f" >&2;}
18894    { (exit 1); exit 1; }; }
18895          fi;;
18896       esac
18897     done` || { (exit 1); exit 1; }
18898 _ACEOF
18899 cat >>$CONFIG_STATUS <<_ACEOF
18900   sed "$ac_vpsub
18901 $extrasub
18902 _ACEOF
18903 cat >>$CONFIG_STATUS <<\_ACEOF
18904 :t
18905 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18906 s,@configure_input@,$configure_input,;t t
18907 s,@srcdir@,$ac_srcdir,;t t
18908 s,@abs_srcdir@,$ac_abs_srcdir,;t t
18909 s,@top_srcdir@,$ac_top_srcdir,;t t
18910 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18911 s,@builddir@,$ac_builddir,;t t
18912 s,@abs_builddir@,$ac_abs_builddir,;t t
18913 s,@top_builddir@,$ac_top_builddir,;t t
18914 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18915 s,@INSTALL@,$ac_INSTALL,;t t
18916 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18917   rm -f $tmp/stdin
18918   if test x"$ac_file" != x-; then
18919     mv $tmp/out $ac_file
18920   else
18921     cat $tmp/out
18922     rm -f $tmp/out
18923   fi
18924
18925 done
18926 _ACEOF
18927 cat >>$CONFIG_STATUS <<\_ACEOF
18928
18929 #
18930 # CONFIG_HEADER section.
18931 #
18932
18933 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18934 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18935 #
18936 # ac_d sets the value in "#define NAME VALUE" lines.
18937 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18938 ac_dB='[        ].*$,\1#\2'
18939 ac_dC=' '
18940 ac_dD=',;t'
18941 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18942 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18943 ac_uB='$,\1#\2define\3'
18944 ac_uC=' '
18945 ac_uD=',;t'
18946
18947 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18948   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18949   case $ac_file in
18950   - | *:- | *:-:* ) # input from stdin
18951         cat >$tmp/stdin
18952         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18953         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18954   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18955         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18956   * )   ac_file_in=$ac_file.in ;;
18957   esac
18958
18959   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18960 echo "$as_me: creating $ac_file" >&6;}
18961
18962   # First look for the input files in the build tree, otherwise in the
18963   # src tree.
18964   ac_file_inputs=`IFS=:
18965     for f in $ac_file_in; do
18966       case $f in
18967       -) echo $tmp/stdin ;;
18968       [\\/$]*)
18969          # Absolute (can't be DOS-style, as IFS=:)
18970          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18971 echo "$as_me: error: cannot find input file: $f" >&2;}
18972    { (exit 1); exit 1; }; }
18973          echo $f;;
18974       *) # Relative
18975          if test -f "$f"; then
18976            # Build tree
18977            echo $f
18978          elif test -f "$srcdir/$f"; then
18979            # Source tree
18980            echo $srcdir/$f
18981          else
18982            # /dev/null tree
18983            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18984 echo "$as_me: error: cannot find input file: $f" >&2;}
18985    { (exit 1); exit 1; }; }
18986          fi;;
18987       esac
18988     done` || { (exit 1); exit 1; }
18989   # Remove the trailing spaces.
18990   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18991
18992 _ACEOF
18993
18994 # Transform confdefs.h into two sed scripts, `conftest.defines' and
18995 # `conftest.undefs', that substitutes the proper values into
18996 # config.h.in to produce config.h.  The first handles `#define'
18997 # templates, and the second `#undef' templates.
18998 # And first: Protect against being on the right side of a sed subst in
18999 # config.status.  Protect against being in an unquoted here document
19000 # in config.status.
19001 rm -f conftest.defines conftest.undefs
19002 # Using a here document instead of a string reduces the quoting nightmare.
19003 # Putting comments in sed scripts is not portable.
19004 #
19005 # `end' is used to avoid that the second main sed command (meant for
19006 # 0-ary CPP macros) applies to n-ary macro definitions.
19007 # See the Autoconf documentation for `clear'.
19008 cat >confdef2sed.sed <<\_ACEOF
19009 s/[\\&,]/\\&/g
19010 s,[\\$`],\\&,g
19011 t clear
19012 : clear
19013 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19014 t end
19015 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19016 : end
19017 _ACEOF
19018 # If some macros were called several times there might be several times
19019 # the same #defines, which is useless.  Nevertheless, we may not want to
19020 # sort them, since we want the *last* AC-DEFINE to be honored.
19021 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19022 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19023 rm -f confdef2sed.sed
19024
19025 # This sed command replaces #undef with comments.  This is necessary, for
19026 # example, in the case of _POSIX_SOURCE, which is predefined and required
19027 # on some systems where configure will not decide to define it.
19028 cat >>conftest.undefs <<\_ACEOF
19029 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19030 _ACEOF
19031
19032 # Break up conftest.defines because some shells have a limit on the size
19033 # of here documents, and old seds have small limits too (100 cmds).
19034 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
19035 echo '  if egrep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
19036 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19037 echo '  :' >>$CONFIG_STATUS
19038 rm -f conftest.tail
19039 while grep . conftest.defines >/dev/null
19040 do
19041   # Write a limited-size here document to $tmp/defines.sed.
19042   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19043   # Speed up: don't consider the non `#define' lines.
19044   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
19045   # Work around the forget-to-reset-the-flag bug.
19046   echo 't clr' >>$CONFIG_STATUS
19047   echo ': clr' >>$CONFIG_STATUS
19048   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
19049   echo 'CEOF
19050   sed -f $tmp/defines.sed $tmp/in >$tmp/out
19051   rm -f $tmp/in
19052   mv $tmp/out $tmp/in
19053 ' >>$CONFIG_STATUS
19054   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19055   rm -f conftest.defines
19056   mv conftest.tail conftest.defines
19057 done
19058 rm -f conftest.defines
19059 echo '  fi # egrep' >>$CONFIG_STATUS
19060 echo >>$CONFIG_STATUS
19061
19062 # Break up conftest.undefs because some shells have a limit on the size
19063 # of here documents, and old seds have small limits too (100 cmds).
19064 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
19065 rm -f conftest.tail
19066 while grep . conftest.undefs >/dev/null
19067 do
19068   # Write a limited-size here document to $tmp/undefs.sed.
19069   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19070   # Speed up: don't consider the non `#undef'
19071   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
19072   # Work around the forget-to-reset-the-flag bug.
19073   echo 't clr' >>$CONFIG_STATUS
19074   echo ': clr' >>$CONFIG_STATUS
19075   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19076   echo 'CEOF
19077   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19078   rm -f $tmp/in
19079   mv $tmp/out $tmp/in
19080 ' >>$CONFIG_STATUS
19081   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19082   rm -f conftest.undefs
19083   mv conftest.tail conftest.undefs
19084 done
19085 rm -f conftest.undefs
19086
19087 cat >>$CONFIG_STATUS <<\_ACEOF
19088   # Let's still pretend it is `configure' which instantiates (i.e., don't
19089   # use $as_me), people would be surprised to read:
19090   #    /* config.h.  Generated by config.status.  */
19091   if test x"$ac_file" = x-; then
19092     echo "/* Generated by configure.  */" >$tmp/config.h
19093   else
19094     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
19095   fi
19096   cat $tmp/in >>$tmp/config.h
19097   rm -f $tmp/in
19098   if test x"$ac_file" != x-; then
19099     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19100       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19101 echo "$as_me: $ac_file is unchanged" >&6;}
19102     else
19103       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19104 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19105          X"$ac_file" : 'X\(//\)[^/]' \| \
19106          X"$ac_file" : 'X\(//\)$' \| \
19107          X"$ac_file" : 'X\(/\)' \| \
19108          .     : '\(.\)' 2>/dev/null ||
19109 echo X"$ac_file" |
19110     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19111           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19112           /^X\(\/\/\)$/{ s//\1/; q; }
19113           /^X\(\/\).*/{ s//\1/; q; }
19114           s/.*/./; q'`
19115       { case "$ac_dir" in
19116   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19117   *)                      as_incr_dir=.;;
19118 esac
19119 as_dummy="$ac_dir"
19120 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19121   case $as_mkdir_dir in
19122     # Skip DOS drivespec
19123     ?:) as_incr_dir=$as_mkdir_dir ;;
19124     *)
19125       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19126       test -d "$as_incr_dir" ||
19127         mkdir "$as_incr_dir" ||
19128         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
19129 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
19130    { (exit 1); exit 1; }; }
19131     ;;
19132   esac
19133 done; }
19134
19135       rm -f $ac_file
19136       mv $tmp/config.h $ac_file
19137     fi
19138   else
19139     cat $tmp/config.h
19140     rm -f $tmp/config.h
19141   fi
19142 done
19143 _ACEOF
19144 cat >>$CONFIG_STATUS <<\_ACEOF
19145
19146 #
19147 # CONFIG_COMMANDS section.
19148 #
19149 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19150   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19151   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19152   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
19153 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19154          X"$ac_dest" : 'X\(//\)[^/]' \| \
19155          X"$ac_dest" : 'X\(//\)$' \| \
19156          X"$ac_dest" : 'X\(/\)' \| \
19157          .     : '\(.\)' 2>/dev/null ||
19158 echo X"$ac_dest" |
19159     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19160           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19161           /^X\(\/\/\)$/{ s//\1/; q; }
19162           /^X\(\/\).*/{ s//\1/; q; }
19163           s/.*/./; q'`
19164   ac_builddir=.
19165
19166 if test "$ac_dir" != .; then
19167   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19168   # A "../" for each directory in $ac_dir_suffix.
19169   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19170 else
19171   ac_dir_suffix= ac_top_builddir=
19172 fi
19173
19174 case $srcdir in
19175   .)  # No --srcdir option.  We are building in place.
19176     ac_srcdir=.
19177     if test -z "$ac_top_builddir"; then
19178        ac_top_srcdir=.
19179     else
19180        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19181     fi ;;
19182   [\\/]* | ?:[\\/]* )  # Absolute path.
19183     ac_srcdir=$srcdir$ac_dir_suffix;
19184     ac_top_srcdir=$srcdir ;;
19185   *) # Relative path.
19186     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19187     ac_top_srcdir=$ac_top_builddir$srcdir ;;
19188 esac
19189 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19190 # absolute.
19191 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
19192 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
19193 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19194 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19195
19196
19197   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
19198 echo "$as_me: executing $ac_dest commands" >&6;}
19199   case $ac_dest in
19200     default-1 )
19201
19202 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
19203 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
19204   rm -f intltool-extract.out
19205 else
19206   mv -f intltool-extract.out intltool-extract
19207 fi
19208 chmod ugo+x intltool-extract
19209 chmod u+w intltool-extract
19210
19211 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
19212 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
19213   rm -f intltool-merge.out
19214 else
19215   mv -f intltool-merge.out intltool-merge
19216 fi
19217 chmod ugo+x intltool-merge
19218 chmod u+w intltool-merge
19219
19220 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
19221 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
19222   rm -f intltool-update.out
19223 else
19224   mv -f intltool-update.out intltool-update
19225 fi
19226 chmod ugo+x intltool-update
19227 chmod u+w intltool-update
19228
19229  ;;
19230     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
19231         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
19232       esac ;;
19233   esac
19234 done
19235 _ACEOF
19236
19237 cat >>$CONFIG_STATUS <<\_ACEOF
19238
19239 { (exit 0); exit 0; }
19240 _ACEOF
19241 chmod +x $CONFIG_STATUS
19242 ac_clean_files=$ac_clean_files_save
19243
19244
19245 # configure is writing to config.log, and then calls config.status.
19246 # config.status does its own redirection, appending to config.log.
19247 # Unfortunately, on DOS this fails, as config.log is still kept open
19248 # by configure, so config.status won't be able to write to it; its
19249 # output is simply discarded.  So we exec the FD to /dev/null,
19250 # effectively closing config.log, so it can be properly (re)opened and
19251 # appended to by config.status.  When coming back to configure, we
19252 # need to make the FD available again.
19253 if test "$no_create" != yes; then
19254   ac_cs_success=:
19255   exec 5>/dev/null
19256   $SHELL $CONFIG_STATUS || ac_cs_success=false
19257   exec 5>>config.log
19258   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19259   # would make configure fail if this is the last instruction.
19260   $ac_cs_success || { (exit 1); exit 1; }
19261 fi
19262
19263
19264 ###############################################################################
19265 #
19266 #       Print some warnings at the end.
19267 #
19268 ###############################################################################
19269
19270 warn_prefix_1="    Warning:"
19271 warn_prefix_2="       Note:"
19272 warn_prefix="$warn_prefix_1"
19273
19274 warning=no
19275 warnsep='    #################################################################'
19276
19277 warnpre() {
19278   if test "$warning" = no ; then
19279     echo '' ; echo "$warnsep" ; echo ''
19280     warning=yes
19281   fi
19282 }
19283
19284 warn() {
19285   warnpre
19286   if test "$warning" = long ; then echo '' ; fi
19287   warning=yes
19288   rest="$@"
19289   echo "$warn_prefix $rest"
19290 }
19291
19292 warnL() {
19293   was=$warning
19294   warnpre
19295   warning=yes
19296   if test "$was" != no ; then echo '' ; fi
19297   rest="$@"
19298   echo "$warn_prefix $rest"
19299 }
19300
19301 warn2() {
19302   rest="$@"
19303   echo "             $rest"
19304   warning=long
19305 }
19306
19307 note() {
19308   warn_prefix="$warn_prefix_2"
19309   warn $@
19310   warn_prefix="$warn_prefix_1"
19311 }
19312
19313 noteL() {
19314   warn_prefix="$warn_prefix_2"
19315   warnL $@
19316   warn_prefix="$warn_prefix_1"
19317 }
19318
19319
19320 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
19321   warn 'The SGI saver extension was requested, but was not found.'
19322 fi
19323
19324 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
19325   warn 'The MIT saver extension was requested, but was not found.'
19326 fi
19327
19328 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
19329   warn 'The XIdle extension was requested, but was not found.'
19330 fi
19331
19332 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
19333   warn 'The XSHM extension was requested, but was not found.'
19334 fi
19335
19336 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
19337   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
19338 fi
19339
19340 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
19341   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
19342 fi
19343
19344 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
19345   warn 'The DPMS extension was requested, but was not found.'
19346 fi
19347
19348 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
19349   warn 'The Xinerama extension was requested, but was not found.'
19350 fi
19351
19352 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
19353   warn 'The XF86VMODE extension was requested, but was not found.'
19354 fi
19355
19356 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
19357   warn "Checking of /proc/interrupts was requested, but it's bogus."
19358 fi
19359
19360
19361 if test "$have_motif" = no -a "$have_gtk" = no; then
19362   warnL "Neither Motif nor Gtk seem to be available;"
19363   warn2 "the \`xscreensaver-demo' program requires one of these."
19364
19365 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
19366   warnL "Use of Motif was requested, but it wasn't found;"
19367   warn2 "Gtk will be used instead."
19368
19369 elif test "$jurassic_gtk" = yes ; then
19370
19371   pref_gtk=1.2
19372
19373   v="$ac_gtk_version_string"
19374   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
19375     warnL "Use of Gtk was requested, but its version number is unknown;"
19376   elif test "$with_gtk_req" = yes ; then
19377     warnL "Use of Gtk was requested, but it is version $v;"
19378   else
19379     warnL "Gtk was found on this system, but it is version $v;"
19380   fi
19381
19382   warn2 "Gtk $pref_gtk or newer is required.  Motif will be used instead."
19383
19384 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
19385   warnL "Use of Gtk was requested, but it wasn't found."
19386   if test "$have_motif" = yes; then
19387     warn2 "Motif will be used instead."
19388   fi
19389 fi
19390
19391 if test "$gtk2_halfassed" != no ; then
19392   warnL "GTK version $gtk2_halfassed was found, but at least one supporting"
19393   warn2 "library ($gtk2_halfassed_lib) was not, so GTK 2.x can't be used."
19394   v="$ac_gtk_version_string"
19395   warn2 "GTK $v is also installed, so it will be used instead."
19396   warn2 "Please read the above output and the \`config.log' file"
19397   warn2 "for more details."
19398 fi
19399
19400
19401 if test "$with_gnome_req" = yes -a "$have_gnome" = no \
19402         -a "$have_gtk2" = no; then
19403   # don't issue this warning if we have GTK2 -- in that case, the
19404   # Gnome-specific code isn't needed.
19405   warn  'Use of the Gnome Control Panel was requested, but the necessary'
19406   warn2 'headers and/or libraries were not found.'
19407 fi
19408
19409 if test "$have_gtk" = yes ; then
19410   if test "$have_xml" = no ; then
19411     if test "$with_xml_req" = yes ; then
19412       warn  'Use of the XML library was requested, but the necessary'
19413       warn2 'headers and/or libraries were not found.'
19414     else
19415       warn  'GTK is being used, but the XML library was not found.'
19416     fi
19417
19418     if test "$xml_halfassed" = yes ; then
19419
19420       if test "$have_zlib" = yes ; then
19421         which="XML libraries"
19422       else
19423         which="\`zlib' library"
19424       fi
19425
19426       echo ''
19427       warn2 'More specifically, we found the headers, but not the'
19428       warn2 "$which; so either XML is half-installed on this"
19429       warn2 "system, or something else went wrong.  The \`config.log'"
19430       warn2 'file might contain some clues.'
19431     fi
19432
19433     echo ''
19434     warn2 "Without XML, the per-display-mode \`Settings' dialogs"
19435     warn2 'will not be available.  Specify the location of the XML'
19436     warn2 'library through the --with-xml option to configure.'
19437   fi
19438 fi
19439
19440 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
19441   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
19442   warn2 "headers were not found.  That can't be good.  Please"
19443   warn2 "install the GDK-Pixbuf development kit and re-configure."
19444 fi
19445
19446 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
19447
19448   preferred_lesstif=0.92
19449
19450   if test "$lesstif_version" = unknown; then
19451     warnL "Unable to determine the LessTif version number!"
19452     warn2 "Make sure you are using version $preferred_lesstif or newer."
19453     warn2 "See <http://www.lesstif.org/>."
19454
19455   elif test \! $lesstif_version -gt 82; then
19456     warnL "LessTif version $lesstif_version_string is being used."
19457     warn2 "LessTif versions 0.82 and earlier are too buggy to"
19458     warn2 "use with XScreenSaver; it is strongly recommended"
19459     warn2 "that you upgrade to at least version $preferred_lesstif!"
19460     warn2 "See <http://www.lesstif.org/>."
19461   fi
19462 fi
19463
19464
19465 if test "$have_motif" = yes -a "$have_gtk" = no ; then
19466   warn  'Motif is being used, and GTK is not.'
19467   echo  ''
19468   warn2 'Though the Motif front-end to xscreensaver is still'
19469   warn2 'maintained, it is no longer being updated with new'
19470   warn2 'features: all new development on the xscreensaver-demo'
19471   warn2 'program is happening in the GTK version, and not in the'
19472   warn2 'Motif version.  It is recommended that you build against'
19473   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
19474 fi
19475
19476
19477 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
19478   warnL 'Use of XPM was requested, but it was not found.'
19479 fi
19480
19481 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
19482   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
19483 fi
19484
19485 if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \
19486    test "$gdk_pixbuf_halfassed" = yes; then
19487
19488   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
19489     true
19490   elif test "$with_xpm_req" = no ; then
19491     warnL 'The XPM library is not being used.'
19492   else
19493     warnL 'The XPM library was not found.'
19494   fi
19495
19496   if test "$with_gdk_pixbuf_req" = yes ; then
19497     true
19498   elif test "$with_gdk_pixbuf_req" = no ; then
19499     warnL 'The GDK-Pixbuf library is not being used.'
19500   else
19501     warnL 'The GDK-Pixbuf library was not found.'
19502   fi
19503
19504   if test "$gdk_pixbuf_halfassed" = yes ; then
19505     echo ''
19506     warn2 'More specifically, we found the headers, but not the'
19507     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
19508     warn2 "system, or something else went wrong.  The \`config.log'"
19509     warn2 'file might contain some clues.'
19510   fi
19511
19512   echo ''
19513   warn2 'Some of the demos will not be as colorful as they'
19514   warn2 'could be.  You should consider installing Pixbuf or'
19515   warn2 'XPM and re-running configure.  The Pixbuf library is'
19516   warn2 'a part of GNOME.  The XPM library comes with most'
19517   warn2 'X11 installations; you can also find it at the X11'
19518   warn2 'archive sites, such as <http://sunsite.unc.edu/>.'
19519   echo  ''
19520   warn2 'GDK-Pixbuf is recommended over XPM, as it provides'
19521   warn2 'support for more image formats.'
19522 fi
19523
19524
19525 if test "$have_jpeg" = no ; then
19526   if test "$with_jpeg_req" = yes ; then
19527     warnL 'Use of libjpeg was requested, but it was not found.'
19528   elif test "$with_jpeg_req" = no ; then
19529     noteL 'The JPEG library is not being used.'
19530   else
19531     noteL 'The JPEG library was not found.'
19532   fi
19533
19534   if test "$jpeg_halfassed" = yes ; then
19535     echo ''
19536     warn2 'More specifically, we found the headers, but not the'
19537     warn2 'library; so either JPEG is half-installed on this'
19538     warn2 "system, or something else went wrong.  The \`config.log'"
19539     warn2 'file might contain some clues.'
19540     echo ''
19541   fi
19542
19543   if test "$have_gdk_pixbuf" = no ; then
19544     warn2 "This means that it won't be possible for the image-manipulating"
19545     warn2 "display modes to load files from disk; and it also means that"
19546     warn2 "the \`webcollage' program will be much slower."
19547   else
19548     warn2 "This means the \`webcollage' program will be much slower."
19549   fi
19550 fi
19551
19552
19553 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
19554   preferred_mesagl=3.4
19555   mgv="$ac_mesagl_version_string"
19556   pgl="$preferred_mesagl"
19557
19558   if test "$ac_mesagl_version" = unknown; then
19559     warnL "Unable to determine the MesaGL version number!"
19560     warn2 "Make sure you are using version $preferred_mesagl or newer."
19561
19562   elif test \! "$ac_mesagl_version" -gt 2006; then
19563     warnL "MesaGL version number is $mgv --"
19564     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
19565     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
19566
19567   elif test \! "$ac_mesagl_version" -gt 3003; then
19568     warnL "MesaGL version number is $mgv --"
19569     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
19570     warn2 "that you upgrade to $pgl or newer."
19571   fi
19572 fi
19573
19574 if test "$have_gl" = no ; then
19575   if test "$with_gl_req" = yes ; then
19576     warnL 'Use of GL was requested, but it was not found.'
19577   elif test "$with_gl_req" = no ; then
19578     noteL 'The OpenGL 3D library is not being used.'
19579   else
19580     noteL 'The OpenGL 3D library was not found.'
19581   fi
19582
19583   if test "$gl_halfassed" = yes ; then
19584     echo ''
19585     warn2 'More specifically, we found the headers, but not the'
19586     warn2 'libraries; so either GL is half-installed on this'
19587     warn2 "system, or something else went wrong.  The \`config.log'"
19588     warn2 'file might contain some clues.'
19589   fi
19590
19591   echo ''
19592   warn2 'Those demos which use 3D will not be built or installed.'
19593   warn2 'You might want to consider installing OpenGL and'
19594   warn2 "re-running configure.  If your vendor doesn't ship"
19595   warn2 'their own implementation of OpenGL, you can get a free'
19596   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
19597   warn2 'info, see <http://www.opengl.org/>.'
19598
19599 fi
19600
19601
19602 if test "$have_gl" = yes -a "$have_gle" = no ; then
19603
19604  # nobody cares about this; don't print the warning unless it was
19605  # requested and not found, or halfway-found.
19606  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
19607
19608   if test "$with_gle_req" = yes ; then
19609     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
19610     warn2 'it was not found (though the OpenGL library was found, and'
19611     warn2 'is being used.)'
19612   elif test "$with_gle_req" = no ; then
19613     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
19614     warn2 'library is not.'
19615   else
19616     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
19617     warn2 'was not.'
19618   fi
19619
19620   if test "$gle_halfassed" = yes ; then
19621     echo ''
19622     warn2 'More specifically, we found the headers, but not the'
19623     warn2 'libraries; so either GLE is half-installed on this'
19624     warn2 "system, or something else went wrong.  The \`config.log'"
19625     warn2 'file might contain some clues.'
19626   fi
19627
19628   echo ''
19629   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
19630   warn2 'will not be built or installed.  You might want to consider'
19631   warn2 'installing GLE and re-running configure.  You can find the'
19632   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
19633   warn2 'OpenGL info, see <http://www.opengl.org/>.'
19634
19635  fi
19636 fi
19637
19638
19639 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
19640   warn 'Use of XReadDisplay was requested, but it was not found.'
19641 fi
19642
19643 if test -n "$with_fortune_req"; then
19644   if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
19645     warnL "$with_fortune_req was requested as the Fortune program,"
19646     warn2 "but was not found.  The default will be used instead."
19647   fi
19648 fi
19649
19650 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
19651   warn 'Use of Kerberos was requested, but it was not found.'
19652 fi
19653
19654 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
19655   warn 'Use of PAM was requested, but it was not found.'
19656 fi
19657
19658 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
19659   warn 'Use of shadow passwords was requested, but they were not found.'
19660 fi
19661
19662
19663 # You are in a twisty maze of namespaces and syntaxes, all alike.
19664 # Fuck the skull of Unix.
19665 #
19666 eval bindir=${bindir}
19667 eval bindir=${bindir}
19668 eval bindir=${bindir}
19669 eval bindir=${bindir}
19670 eval bindir=${bindir}
19671 eval bindir=${bindir}
19672 eval HACKDIR=${HACKDIR}
19673 eval HACKDIR=${HACKDIR}
19674 eval HACKDIR=${HACKDIR}
19675 eval HACKDIR=${HACKDIR}
19676 eval HACKDIR=${HACKDIR}
19677 eval HACKDIR=${HACKDIR}
19678 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19679 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19680 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19681 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19682 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19683 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19684
19685 # canonicalize slashes.
19686 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
19687 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
19688 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
19689
19690
19691 # Sanity check the hackdir
19692 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
19693   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
19694     echo ""
19695     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
19696                    There will be an executable installed with that name, so
19697                    that can't be the name of a directory as well.  Please
19698                    re-configure with a different directory name." >&5
19699 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
19700                    There will be an executable installed with that name, so
19701                    that can't be the name of a directory as well.  Please
19702                    re-configure with a different directory name." >&2;}
19703    { (exit 1); exit 1; }; }
19704   fi
19705 done
19706
19707
19708 do_dir_warning=no
19709
19710 # Now let's see if there's a previous RPM version already installed.  Blargh!
19711
19712 # M4 sucks!!
19713
19714 rpmv=`(rpm -qv xscreensaver) 2>/dev/null | \
19715       sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
19716
19717
19718 if test \! -z "$rpmv" ; then
19719   rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
19720   rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
19721
19722   warning=no
19723   warnL "There is already an installed RPM of xscreensaver $rpmv"
19724   warn2 "on this system.  You might want to remove it (with"
19725   warn2 '"rpm -ve xscreensaver") before running "make install"'
19726   warn2 "from this directory."
19727   echo ""
19728   warn2 "Alternately, you could build this version of xscreensaver"
19729   warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
19730   warn2 "file is included.  See the RPM documentation for more info."
19731   echo ""
19732
19733   if test "$rpmbdir" = "$rpmhdir" ; then
19734     warn2 "The RPM version was installed in $rpmbdir/."
19735   else
19736     warn2 "The RPM version was installed in $rpmbdir/,"
19737     warn2 "with demos in $rpmhdir/."
19738   fi
19739
19740   do_dir_warning=yes
19741 fi
19742
19743
19744 if test "${bindir}" = "${HACKDIR}" ; then
19745   do_dir_warning=yes
19746 fi
19747
19748 if test "$do_dir_warning" = yes; then
19749   echo ""
19750   echo "$warnsep"
19751   echo ""
19752   echo '      When you run "make install", the "xscreensaver",'
19753   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
19754   echo "      will be installed in ${bindir}/."
19755   echo ""
19756   echo "      The various graphics demos (160+ different executables) will"
19757   echo "      be installed in ${HACKDIR}/."
19758   echo ""
19759   echo "      If you would prefer the demos to be installed elsewhere,"
19760   echo "      you should re-run configure with the --with-hackdir=DIR"
19761   echo "      option.  For more information, run \`./configure --help'."
19762   warning=yes
19763 fi
19764
19765 if test "$warning" != no; then
19766   echo '' ; echo "$warnsep" ; echo ''
19767 fi
19768
19769 if test "$do_dir_warning" = no; then
19770   if test "$warning" = no; then
19771     echo ''
19772   fi
19773   echo "User programs will be installed in ${bindir}/"
19774   echo "Screen savers will be installed in ${HACKDIR}/"
19775   echo "Configuration will be installed in ${HACK_CONF_DIR}/"
19776   echo ''
19777 fi