http://ftp.ussg.iu.edu/linux/slackware/slackware-9.0/source/xap/xscreensaver/xscreens...
[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 in some demos.
900                           (If this library is available, webcollage will be a
901                         . lot faster.)
902   --with-xshm-ext         Include support for the Shared Memory extension.
903   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
904   --with-readdisplay      Include support for the XReadDisplay extension.
905
906   --with-fortune=PROGRAM  Some demos are able to run an external program and
907                           display its text; this names the program to use by
908                           default (though it can be overridden with X
909                           resources.)  Default is \"/usr/games/fortune\".
910   --with-setuid-hacks     Allow some demos to be installed \`setuid root'
911                           (which is needed in order to ping other hosts.)
912
913
914 Some influential environment variables:
915   CC          C compiler command
916   CFLAGS      C compiler flags
917   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
918               nonstandard directory <lib dir>
919   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
920               headers in a nonstandard directory <include dir>
921   CPP         C preprocessor
922
923 Use these variables to override the choices made by `configure' or to help
924 it to find libraries and programs with nonstandard names/locations.
925
926 _ACEOF
927 fi
928
929 if test "$ac_init_help" = "recursive"; then
930   # If there are subdirs, report their specific --help.
931   ac_popdir=`pwd`
932   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
933     test -d $ac_dir || continue
934     ac_builddir=.
935
936 if test "$ac_dir" != .; then
937   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
938   # A "../" for each directory in $ac_dir_suffix.
939   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
940 else
941   ac_dir_suffix= ac_top_builddir=
942 fi
943
944 case $srcdir in
945   .)  # No --srcdir option.  We are building in place.
946     ac_srcdir=.
947     if test -z "$ac_top_builddir"; then
948        ac_top_srcdir=.
949     else
950        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
951     fi ;;
952   [\\/]* | ?:[\\/]* )  # Absolute path.
953     ac_srcdir=$srcdir$ac_dir_suffix;
954     ac_top_srcdir=$srcdir ;;
955   *) # Relative path.
956     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
957     ac_top_srcdir=$ac_top_builddir$srcdir ;;
958 esac
959 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
960 # absolute.
961 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
962 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
963 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
964 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
965
966     cd $ac_dir
967     # Check for guested configure; otherwise get Cygnus style configure.
968     if test -f $ac_srcdir/configure.gnu; then
969       echo
970       $SHELL $ac_srcdir/configure.gnu  --help=recursive
971     elif test -f $ac_srcdir/configure; then
972       echo
973       $SHELL $ac_srcdir/configure  --help=recursive
974     elif test -f $ac_srcdir/configure.ac ||
975            test -f $ac_srcdir/configure.in; then
976       echo
977       $ac_configure --help
978     else
979       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
980     fi
981     cd $ac_popdir
982   done
983 fi
984
985 test -n "$ac_init_help" && exit 0
986 if $ac_init_version; then
987   cat <<\_ACEOF
988
989 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
990 Free Software Foundation, Inc.
991 This configure script is free software; the Free Software Foundation
992 gives unlimited permission to copy, distribute and modify it.
993 _ACEOF
994   exit 0
995 fi
996 exec 5>config.log
997 cat >&5 <<_ACEOF
998 This file contains any messages produced by compilers while
999 running configure, to aid debugging if configure makes a mistake.
1000
1001 It was created by $as_me, which was
1002 generated by GNU Autoconf 2.53.  Invocation command line was
1003
1004   $ $0 $@
1005
1006 _ACEOF
1007 {
1008 cat <<_ASUNAME
1009 ## --------- ##
1010 ## Platform. ##
1011 ## --------- ##
1012
1013 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1014 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1015 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1016 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1017 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1018
1019 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1020 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1021
1022 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1023 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1024 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1025 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1026 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1027 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1028 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1029
1030 _ASUNAME
1031
1032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1033 for as_dir in $PATH
1034 do
1035   IFS=$as_save_IFS
1036   test -z "$as_dir" && as_dir=.
1037   echo "PATH: $as_dir"
1038 done
1039
1040 } >&5
1041
1042 cat >&5 <<_ACEOF
1043
1044
1045 ## ----------- ##
1046 ## Core tests. ##
1047 ## ----------- ##
1048
1049 _ACEOF
1050
1051
1052 # Keep a trace of the command line.
1053 # Strip out --no-create and --no-recursion so they do not pile up.
1054 # Also quote any args containing shell meta-characters.
1055 ac_configure_args=
1056 ac_sep=
1057 for ac_arg
1058 do
1059   case $ac_arg in
1060   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1061   | --no-cr | --no-c | -n ) continue ;;
1062   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1063   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1064     continue ;;
1065   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1066     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1067   esac
1068   case " $ac_configure_args " in
1069     *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1070     *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1071        ac_sep=" " ;;
1072   esac
1073   # Get rid of the leading space.
1074 done
1075
1076 # When interrupted or exit'd, cleanup temporary files, and complete
1077 # config.log.  We remove comments because anyway the quotes in there
1078 # would cause problems or look ugly.
1079 # WARNING: Be sure not to use single quotes in there, as some shells,
1080 # such as our DU 5.0 friend, will then `close' the trap.
1081 trap 'exit_status=$?
1082   # Save into config.log some information that might help in debugging.
1083   {
1084     echo
1085     cat <<\_ASBOX
1086 ## ---------------- ##
1087 ## Cache variables. ##
1088 ## ---------------- ##
1089 _ASBOX
1090     echo
1091     # The following way of writing the cache mishandles newlines in values,
1092 {
1093   (set) 2>&1 |
1094     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1095     *ac_space=\ *)
1096       sed -n \
1097         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1098           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1099       ;;
1100     *)
1101       sed -n \
1102         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1103       ;;
1104     esac;
1105 }
1106     echo
1107     if test -s confdefs.h; then
1108       cat <<\_ASBOX
1109 ## ----------- ##
1110 ## confdefs.h. ##
1111 ## ----------- ##
1112 _ASBOX
1113       echo
1114       sed "/^$/d" confdefs.h
1115       echo
1116     fi
1117     test "$ac_signal" != 0 &&
1118       echo "$as_me: caught signal $ac_signal"
1119     echo "$as_me: exit $exit_status"
1120   } >&5
1121   rm -f core core.* *.core &&
1122   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1123     exit $exit_status
1124      ' 0
1125 for ac_signal in 1 2 13 15; do
1126   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1127 done
1128 ac_signal=0
1129
1130 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1131 rm -rf conftest* confdefs.h
1132 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1133 echo >confdefs.h
1134
1135 # Predefined preprocessor variables.
1136
1137 cat >>confdefs.h <<_ACEOF
1138 #define PACKAGE_NAME "$PACKAGE_NAME"
1139 _ACEOF
1140
1141
1142 cat >>confdefs.h <<_ACEOF
1143 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1144 _ACEOF
1145
1146
1147 cat >>confdefs.h <<_ACEOF
1148 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1149 _ACEOF
1150
1151
1152 cat >>confdefs.h <<_ACEOF
1153 #define PACKAGE_STRING "$PACKAGE_STRING"
1154 _ACEOF
1155
1156
1157 cat >>confdefs.h <<_ACEOF
1158 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1159 _ACEOF
1160
1161
1162 # Let the site file select an alternate cache file if it wants to.
1163 # Prefer explicitly selected file to automatically selected ones.
1164 if test -z "$CONFIG_SITE"; then
1165   if test "x$prefix" != xNONE; then
1166     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1167   else
1168     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1169   fi
1170 fi
1171 for ac_site_file in $CONFIG_SITE; do
1172   if test -r "$ac_site_file"; then
1173     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1174 echo "$as_me: loading site script $ac_site_file" >&6;}
1175     sed 's/^/| /' "$ac_site_file" >&5
1176     . "$ac_site_file"
1177   fi
1178 done
1179
1180 if test -r "$cache_file"; then
1181   # Some versions of bash will fail to source /dev/null (special
1182   # files actually), so we avoid doing that.
1183   if test -f "$cache_file"; then
1184     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1185 echo "$as_me: loading cache $cache_file" >&6;}
1186     case $cache_file in
1187       [\\/]* | ?:[\\/]* ) . $cache_file;;
1188       *)                      . ./$cache_file;;
1189     esac
1190   fi
1191 else
1192   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1193 echo "$as_me: creating cache $cache_file" >&6;}
1194   >$cache_file
1195 fi
1196
1197 # Check that the precious variables saved in the cache have kept the same
1198 # value.
1199 ac_cache_corrupted=false
1200 for ac_var in `(set) 2>&1 |
1201                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1202   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1203   eval ac_new_set=\$ac_env_${ac_var}_set
1204   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1205   eval ac_new_val="\$ac_env_${ac_var}_value"
1206   case $ac_old_set,$ac_new_set in
1207     set,)
1208       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1209 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1210       ac_cache_corrupted=: ;;
1211     ,set)
1212       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1213 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1214       ac_cache_corrupted=: ;;
1215     ,);;
1216     *)
1217       if test "x$ac_old_val" != "x$ac_new_val"; then
1218         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1219 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1220         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1221 echo "$as_me:   former value:  $ac_old_val" >&2;}
1222         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1223 echo "$as_me:   current value: $ac_new_val" >&2;}
1224         ac_cache_corrupted=:
1225       fi;;
1226   esac
1227   # Pass precious variables to config.status.
1228   if test "$ac_new_set" = set; then
1229     case $ac_new_val in
1230     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1231       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1232     *) ac_arg=$ac_var=$ac_new_val ;;
1233     esac
1234     case " $ac_configure_args " in
1235       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1236       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1237     esac
1238   fi
1239 done
1240 if $ac_cache_corrupted; then
1241   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1242 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1243   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1244 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1245    { (exit 1); exit 1; }; }
1246 fi
1247
1248 ac_ext=c
1249 ac_cpp='$CPP $CPPFLAGS'
1250 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1251 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1252 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271 ac_config_headers="$ac_config_headers config.h"
1272
1273
1274 echo "current directory: `pwd`"
1275 echo "command line was: $0 $@"
1276
1277
1278 # After checking to see that --srcdir is correct (which AC_INIT does)
1279 # check for some random other files that come later in the tar file,
1280 # to make sure everything is here.
1281 #
1282 for d in driver utils hacks hacks/glx ; do
1283   f=$srcdir/$d/Makefile.in
1284   if test \! -r $f ; then
1285     echo ""
1286     echo "ERROR: The package is incomplete: $f does not exist."
1287     echo "       This probably means that your download was truncated."
1288     echo ""
1289     exit 1
1290   fi
1291 done
1292
1293 ###############################################################################
1294 #
1295 #       Function to figure out how to run the compiler.
1296 #
1297 ###############################################################################
1298
1299
1300
1301
1302 ###############################################################################
1303 #
1304 #       Functions to figure out how to disable // comments in ANSI C code.
1305 #
1306 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
1307 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
1308 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
1309 #       so much for compatibility!)
1310 #
1311 ###############################################################################
1312
1313
1314
1315
1316
1317
1318 ###############################################################################
1319 #
1320 #       Function to figure out how to turn off Objective C on MacOS X.
1321 #       (We have to do this to work around an Apple-specific gcc bug.)
1322 #
1323 ###############################################################################
1324
1325
1326
1327
1328
1329
1330 ###############################################################################
1331 #
1332 #       Function to figure out how to create directory trees.
1333 #
1334 ###############################################################################
1335
1336
1337
1338
1339 ###############################################################################
1340 #
1341 #       Function to check whether gettimeofday() exists, and how to call it.
1342 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1343 #
1344 ###############################################################################
1345
1346
1347
1348
1349 ###############################################################################
1350 #
1351 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1352 #
1353 ###############################################################################
1354
1355 # M4 sucks!!  perl sucks too!!
1356
1357 perl_version_cmd='print $]'
1358
1359
1360
1361
1362
1363 ###############################################################################
1364 #
1365 #       Function to demand "bc".  Losers.
1366 #
1367 ###############################################################################
1368
1369
1370
1371 ###############################################################################
1372 #
1373 #       Functions to check how to do ICMP PING requests.
1374 #
1375 ###############################################################################
1376
1377
1378
1379
1380
1381
1382 ###############################################################################
1383 #
1384 #       Functions to check for various X11 crap.
1385 #
1386 ###############################################################################
1387
1388 # Try and find the app-defaults directory.
1389 # It sucks that autoconf doesn't do this already...
1390 #
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401 # Random special-cases for X on certain pathological OSes.
1402 # You know who you are.
1403 #
1404
1405
1406
1407
1408 ###############################################################################
1409 #
1410 #       Some utility functions to make checking for X things easier.
1411 #
1412 ###############################################################################
1413
1414 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1415 #
1416
1417
1418 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1419 #
1420
1421
1422 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1423 #
1424
1425
1426
1427 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1428 # Use this sparingly; it probably doesn't work very well on X programs.
1429 #
1430
1431
1432 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1433 # (But not the -L directories!)
1434 #
1435
1436
1437
1438
1439 # Usage: HANDLE_X_PATH_ARG([variable_name],
1440 #                          [--command-line-option],
1441 #                          [descriptive string])
1442 #
1443 # All of the --with options take three forms:
1444 #
1445 #   --with-foo (or --with-foo=yes)
1446 #   --without-foo (or --with-foo=no)
1447 #   --with-foo=/DIR
1448 #
1449 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1450 # a directory (string beginning with a slash) it checks to see whether
1451 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1452 # as appropriate.
1453 #
1454
1455
1456
1457
1458 ###############################################################################
1459 ###############################################################################
1460 #
1461 #       End of function definitions.  Now start actually executing stuff.
1462 #
1463 ###############################################################################
1464 ###############################################################################
1465
1466 # random compiler setup
1467 ac_aux_dir=
1468 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1469   if test -f $ac_dir/install-sh; then
1470     ac_aux_dir=$ac_dir
1471     ac_install_sh="$ac_aux_dir/install-sh -c"
1472     break
1473   elif test -f $ac_dir/install.sh; then
1474     ac_aux_dir=$ac_dir
1475     ac_install_sh="$ac_aux_dir/install.sh -c"
1476     break
1477   elif test -f $ac_dir/shtool; then
1478     ac_aux_dir=$ac_dir
1479     ac_install_sh="$ac_aux_dir/shtool install -c"
1480     break
1481   fi
1482 done
1483 if test -z "$ac_aux_dir"; then
1484   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1485 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1486    { (exit 1); exit 1; }; }
1487 fi
1488 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1489 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1490 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1491
1492 # Make sure we can run config.sub.
1493 $ac_config_sub sun4 >/dev/null 2>&1 ||
1494   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1495 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1496    { (exit 1); exit 1; }; }
1497
1498 echo "$as_me:$LINENO: checking build system type" >&5
1499 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1500 if test "${ac_cv_build+set}" = set; then
1501   echo $ECHO_N "(cached) $ECHO_C" >&6
1502 else
1503   ac_cv_build_alias=$build_alias
1504 test -z "$ac_cv_build_alias" &&
1505   ac_cv_build_alias=`$ac_config_guess`
1506 test -z "$ac_cv_build_alias" &&
1507   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1508 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1509    { (exit 1); exit 1; }; }
1510 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1511   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1512 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1513    { (exit 1); exit 1; }; }
1514
1515 fi
1516 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1517 echo "${ECHO_T}$ac_cv_build" >&6
1518 build=$ac_cv_build
1519 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1520 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1521 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1522
1523
1524 echo "$as_me:$LINENO: checking host system type" >&5
1525 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1526 if test "${ac_cv_host+set}" = set; then
1527   echo $ECHO_N "(cached) $ECHO_C" >&6
1528 else
1529   ac_cv_host_alias=$host_alias
1530 test -z "$ac_cv_host_alias" &&
1531   ac_cv_host_alias=$ac_cv_build_alias
1532 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1533   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1534 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1535    { (exit 1); exit 1; }; }
1536
1537 fi
1538 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1539 echo "${ECHO_T}$ac_cv_host" >&6
1540 host=$ac_cv_host
1541 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1542 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1543 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1544
1545
1546
1547 ac_ext=c
1548 ac_cpp='$CPP $CPPFLAGS'
1549 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1550 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1551 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1552 if test -n "$ac_tool_prefix"; then
1553   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1554 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1555 echo "$as_me:$LINENO: checking for $ac_word" >&5
1556 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1557 if test "${ac_cv_prog_CC+set}" = set; then
1558   echo $ECHO_N "(cached) $ECHO_C" >&6
1559 else
1560   if test -n "$CC"; then
1561   ac_cv_prog_CC="$CC" # Let the user override the test.
1562 else
1563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1564 for as_dir in $PATH
1565 do
1566   IFS=$as_save_IFS
1567   test -z "$as_dir" && as_dir=.
1568   for ac_exec_ext in '' $ac_executable_extensions; do
1569   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1570     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1571     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1572     break 2
1573   fi
1574 done
1575 done
1576
1577 fi
1578 fi
1579 CC=$ac_cv_prog_CC
1580 if test -n "$CC"; then
1581   echo "$as_me:$LINENO: result: $CC" >&5
1582 echo "${ECHO_T}$CC" >&6
1583 else
1584   echo "$as_me:$LINENO: result: no" >&5
1585 echo "${ECHO_T}no" >&6
1586 fi
1587
1588 fi
1589 if test -z "$ac_cv_prog_CC"; then
1590   ac_ct_CC=$CC
1591   # Extract the first word of "gcc", so it can be a program name with args.
1592 set dummy gcc; ac_word=$2
1593 echo "$as_me:$LINENO: checking for $ac_word" >&5
1594 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1595 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1596   echo $ECHO_N "(cached) $ECHO_C" >&6
1597 else
1598   if test -n "$ac_ct_CC"; then
1599   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1600 else
1601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1602 for as_dir in $PATH
1603 do
1604   IFS=$as_save_IFS
1605   test -z "$as_dir" && as_dir=.
1606   for ac_exec_ext in '' $ac_executable_extensions; do
1607   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1608     ac_cv_prog_ac_ct_CC="gcc"
1609     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1610     break 2
1611   fi
1612 done
1613 done
1614
1615 fi
1616 fi
1617 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1618 if test -n "$ac_ct_CC"; then
1619   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1620 echo "${ECHO_T}$ac_ct_CC" >&6
1621 else
1622   echo "$as_me:$LINENO: result: no" >&5
1623 echo "${ECHO_T}no" >&6
1624 fi
1625
1626   CC=$ac_ct_CC
1627 else
1628   CC="$ac_cv_prog_CC"
1629 fi
1630
1631 if test -z "$CC"; then
1632   if test -n "$ac_tool_prefix"; then
1633   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1634 set dummy ${ac_tool_prefix}cc; ac_word=$2
1635 echo "$as_me:$LINENO: checking for $ac_word" >&5
1636 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1637 if test "${ac_cv_prog_CC+set}" = set; then
1638   echo $ECHO_N "(cached) $ECHO_C" >&6
1639 else
1640   if test -n "$CC"; then
1641   ac_cv_prog_CC="$CC" # Let the user override the test.
1642 else
1643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1644 for as_dir in $PATH
1645 do
1646   IFS=$as_save_IFS
1647   test -z "$as_dir" && as_dir=.
1648   for ac_exec_ext in '' $ac_executable_extensions; do
1649   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1650     ac_cv_prog_CC="${ac_tool_prefix}cc"
1651     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1652     break 2
1653   fi
1654 done
1655 done
1656
1657 fi
1658 fi
1659 CC=$ac_cv_prog_CC
1660 if test -n "$CC"; then
1661   echo "$as_me:$LINENO: result: $CC" >&5
1662 echo "${ECHO_T}$CC" >&6
1663 else
1664   echo "$as_me:$LINENO: result: no" >&5
1665 echo "${ECHO_T}no" >&6
1666 fi
1667
1668 fi
1669 if test -z "$ac_cv_prog_CC"; then
1670   ac_ct_CC=$CC
1671   # Extract the first word of "cc", so it can be a program name with args.
1672 set dummy cc; ac_word=$2
1673 echo "$as_me:$LINENO: checking for $ac_word" >&5
1674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1675 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1676   echo $ECHO_N "(cached) $ECHO_C" >&6
1677 else
1678   if test -n "$ac_ct_CC"; then
1679   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1680 else
1681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1682 for as_dir in $PATH
1683 do
1684   IFS=$as_save_IFS
1685   test -z "$as_dir" && as_dir=.
1686   for ac_exec_ext in '' $ac_executable_extensions; do
1687   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1688     ac_cv_prog_ac_ct_CC="cc"
1689     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1690     break 2
1691   fi
1692 done
1693 done
1694
1695 fi
1696 fi
1697 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1698 if test -n "$ac_ct_CC"; then
1699   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1700 echo "${ECHO_T}$ac_ct_CC" >&6
1701 else
1702   echo "$as_me:$LINENO: result: no" >&5
1703 echo "${ECHO_T}no" >&6
1704 fi
1705
1706   CC=$ac_ct_CC
1707 else
1708   CC="$ac_cv_prog_CC"
1709 fi
1710
1711 fi
1712 if test -z "$CC"; then
1713   # Extract the first word of "cc", so it can be a program name with args.
1714 set dummy cc; ac_word=$2
1715 echo "$as_me:$LINENO: checking for $ac_word" >&5
1716 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1717 if test "${ac_cv_prog_CC+set}" = set; then
1718   echo $ECHO_N "(cached) $ECHO_C" >&6
1719 else
1720   if test -n "$CC"; then
1721   ac_cv_prog_CC="$CC" # Let the user override the test.
1722 else
1723   ac_prog_rejected=no
1724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1725 for as_dir in $PATH
1726 do
1727   IFS=$as_save_IFS
1728   test -z "$as_dir" && as_dir=.
1729   for ac_exec_ext in '' $ac_executable_extensions; do
1730   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1731     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1732        ac_prog_rejected=yes
1733        continue
1734      fi
1735     ac_cv_prog_CC="cc"
1736     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1737     break 2
1738   fi
1739 done
1740 done
1741
1742 if test $ac_prog_rejected = yes; then
1743   # We found a bogon in the path, so make sure we never use it.
1744   set dummy $ac_cv_prog_CC
1745   shift
1746   if test $# != 0; then
1747     # We chose a different compiler from the bogus one.
1748     # However, it has the same basename, so the bogon will be chosen
1749     # first if we set CC to just the basename; use the full file name.
1750     shift
1751     set dummy "$as_dir/$ac_word" ${1+"$@"}
1752     shift
1753     ac_cv_prog_CC="$@"
1754   fi
1755 fi
1756 fi
1757 fi
1758 CC=$ac_cv_prog_CC
1759 if test -n "$CC"; then
1760   echo "$as_me:$LINENO: result: $CC" >&5
1761 echo "${ECHO_T}$CC" >&6
1762 else
1763   echo "$as_me:$LINENO: result: no" >&5
1764 echo "${ECHO_T}no" >&6
1765 fi
1766
1767 fi
1768 if test -z "$CC"; then
1769   if test -n "$ac_tool_prefix"; then
1770   for ac_prog in cl
1771   do
1772     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1773 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1774 echo "$as_me:$LINENO: checking for $ac_word" >&5
1775 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1776 if test "${ac_cv_prog_CC+set}" = set; then
1777   echo $ECHO_N "(cached) $ECHO_C" >&6
1778 else
1779   if test -n "$CC"; then
1780   ac_cv_prog_CC="$CC" # Let the user override the test.
1781 else
1782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1783 for as_dir in $PATH
1784 do
1785   IFS=$as_save_IFS
1786   test -z "$as_dir" && as_dir=.
1787   for ac_exec_ext in '' $ac_executable_extensions; do
1788   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1789     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1790     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1791     break 2
1792   fi
1793 done
1794 done
1795
1796 fi
1797 fi
1798 CC=$ac_cv_prog_CC
1799 if test -n "$CC"; then
1800   echo "$as_me:$LINENO: result: $CC" >&5
1801 echo "${ECHO_T}$CC" >&6
1802 else
1803   echo "$as_me:$LINENO: result: no" >&5
1804 echo "${ECHO_T}no" >&6
1805 fi
1806
1807     test -n "$CC" && break
1808   done
1809 fi
1810 if test -z "$CC"; then
1811   ac_ct_CC=$CC
1812   for ac_prog in cl
1813 do
1814   # Extract the first word of "$ac_prog", so it can be a program name with args.
1815 set dummy $ac_prog; ac_word=$2
1816 echo "$as_me:$LINENO: checking for $ac_word" >&5
1817 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1818 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1819   echo $ECHO_N "(cached) $ECHO_C" >&6
1820 else
1821   if test -n "$ac_ct_CC"; then
1822   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1823 else
1824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1825 for as_dir in $PATH
1826 do
1827   IFS=$as_save_IFS
1828   test -z "$as_dir" && as_dir=.
1829   for ac_exec_ext in '' $ac_executable_extensions; do
1830   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1831     ac_cv_prog_ac_ct_CC="$ac_prog"
1832     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1833     break 2
1834   fi
1835 done
1836 done
1837
1838 fi
1839 fi
1840 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1841 if test -n "$ac_ct_CC"; then
1842   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1843 echo "${ECHO_T}$ac_ct_CC" >&6
1844 else
1845   echo "$as_me:$LINENO: result: no" >&5
1846 echo "${ECHO_T}no" >&6
1847 fi
1848
1849   test -n "$ac_ct_CC" && break
1850 done
1851
1852   CC=$ac_ct_CC
1853 fi
1854
1855 fi
1856
1857
1858 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1859 echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1860    { (exit 1); exit 1; }; }
1861
1862 # Provide some information about the compiler.
1863 echo "$as_me:$LINENO:" \
1864      "checking for C compiler version" >&5
1865 ac_compiler=`set X $ac_compile; echo $2`
1866 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1867   (eval $ac_compiler --version </dev/null >&5) 2>&5
1868   ac_status=$?
1869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1870   (exit $ac_status); }
1871 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1872   (eval $ac_compiler -v </dev/null >&5) 2>&5
1873   ac_status=$?
1874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1875   (exit $ac_status); }
1876 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1877   (eval $ac_compiler -V </dev/null >&5) 2>&5
1878   ac_status=$?
1879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1880   (exit $ac_status); }
1881
1882 cat >conftest.$ac_ext <<_ACEOF
1883 #line $LINENO "configure"
1884 #include "confdefs.h"
1885
1886 #ifdef F77_DUMMY_MAIN
1887 #  ifdef __cplusplus
1888      extern "C"
1889 #  endif
1890    int F77_DUMMY_MAIN() { return 1; }
1891 #endif
1892 int
1893 main ()
1894 {
1895
1896   ;
1897   return 0;
1898 }
1899 _ACEOF
1900 ac_clean_files_save=$ac_clean_files
1901 ac_clean_files="$ac_clean_files a.out a.exe"
1902 # Try to create an executable without -o first, disregard a.out.
1903 # It will help us diagnose broken compilers, and finding out an intuition
1904 # of exeext.
1905 echo "$as_me:$LINENO: checking for C compiler default output" >&5
1906 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1907 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1908 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1909   (eval $ac_link_default) 2>&5
1910   ac_status=$?
1911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1912   (exit $ac_status); }; then
1913   # Find the output, starting from the most likely.  This scheme is
1914 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1915 # resort.
1916
1917 # Be careful to initialize this variable, since it used to be cached.
1918 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1919 ac_cv_exeext=
1920 for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1921                 ls a.out conftest 2>/dev/null;
1922                 ls a.* conftest.* 2>/dev/null`; do
1923   case $ac_file in
1924     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1925     a.out ) # We found the default executable, but exeext='' is most
1926             # certainly right.
1927             break;;
1928     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1929           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1930           export ac_cv_exeext
1931           break;;
1932     * ) break;;
1933   esac
1934 done
1935 else
1936   echo "$as_me: failed program was:" >&5
1937 cat conftest.$ac_ext >&5
1938 { { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
1939 echo "$as_me: error: C compiler cannot create executables" >&2;}
1940    { (exit 77); exit 77; }; }
1941 fi
1942
1943 ac_exeext=$ac_cv_exeext
1944 echo "$as_me:$LINENO: result: $ac_file" >&5
1945 echo "${ECHO_T}$ac_file" >&6
1946
1947 # Check the compiler produces executables we can run.  If not, either
1948 # the compiler is broken, or we cross compile.
1949 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1950 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1951 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1952 # If not cross compiling, check that we can run a simple program.
1953 if test "$cross_compiling" != yes; then
1954   if { ac_try='./$ac_file'
1955   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1956   (eval $ac_try) 2>&5
1957   ac_status=$?
1958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1959   (exit $ac_status); }; }; then
1960     cross_compiling=no
1961   else
1962     if test "$cross_compiling" = maybe; then
1963         cross_compiling=yes
1964     else
1965         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1966 If you meant to cross compile, use \`--host'." >&5
1967 echo "$as_me: error: cannot run C compiled programs.
1968 If you meant to cross compile, use \`--host'." >&2;}
1969    { (exit 1); exit 1; }; }
1970     fi
1971   fi
1972 fi
1973 echo "$as_me:$LINENO: result: yes" >&5
1974 echo "${ECHO_T}yes" >&6
1975
1976 rm -f a.out a.exe conftest$ac_cv_exeext
1977 ac_clean_files=$ac_clean_files_save
1978 # Check the compiler produces executables we can run.  If not, either
1979 # the compiler is broken, or we cross compile.
1980 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1981 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1982 echo "$as_me:$LINENO: result: $cross_compiling" >&5
1983 echo "${ECHO_T}$cross_compiling" >&6
1984
1985 echo "$as_me:$LINENO: checking for suffix of executables" >&5
1986 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1987 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1988   (eval $ac_link) 2>&5
1989   ac_status=$?
1990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1991   (exit $ac_status); }; then
1992   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1993 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1994 # work properly (i.e., refer to `conftest.exe'), while it won't with
1995 # `rm'.
1996 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1997   case $ac_file in
1998     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1999     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2000           export ac_cv_exeext
2001           break;;
2002     * ) break;;
2003   esac
2004 done
2005 else
2006   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2007 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2008    { (exit 1); exit 1; }; }
2009 fi
2010
2011 rm -f conftest$ac_cv_exeext
2012 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2013 echo "${ECHO_T}$ac_cv_exeext" >&6
2014
2015 rm -f conftest.$ac_ext
2016 EXEEXT=$ac_cv_exeext
2017 ac_exeext=$EXEEXT
2018 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2019 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2020 if test "${ac_cv_objext+set}" = set; then
2021   echo $ECHO_N "(cached) $ECHO_C" >&6
2022 else
2023   cat >conftest.$ac_ext <<_ACEOF
2024 #line $LINENO "configure"
2025 #include "confdefs.h"
2026
2027 #ifdef F77_DUMMY_MAIN
2028 #  ifdef __cplusplus
2029      extern "C"
2030 #  endif
2031    int F77_DUMMY_MAIN() { return 1; }
2032 #endif
2033 int
2034 main ()
2035 {
2036
2037   ;
2038   return 0;
2039 }
2040 _ACEOF
2041 rm -f conftest.o conftest.obj
2042 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2043   (eval $ac_compile) 2>&5
2044   ac_status=$?
2045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2046   (exit $ac_status); }; then
2047   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2048   case $ac_file in
2049     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2050     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2051        break;;
2052   esac
2053 done
2054 else
2055   echo "$as_me: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2057 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2058 echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2059    { (exit 1); exit 1; }; }
2060 fi
2061
2062 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2063 fi
2064 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2065 echo "${ECHO_T}$ac_cv_objext" >&6
2066 OBJEXT=$ac_cv_objext
2067 ac_objext=$OBJEXT
2068 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2069 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2070 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2071   echo $ECHO_N "(cached) $ECHO_C" >&6
2072 else
2073   cat >conftest.$ac_ext <<_ACEOF
2074 #line $LINENO "configure"
2075 #include "confdefs.h"
2076
2077 #ifdef F77_DUMMY_MAIN
2078 #  ifdef __cplusplus
2079      extern "C"
2080 #  endif
2081    int F77_DUMMY_MAIN() { return 1; }
2082 #endif
2083 int
2084 main ()
2085 {
2086 #ifndef __GNUC__
2087        choke me
2088 #endif
2089
2090   ;
2091   return 0;
2092 }
2093 _ACEOF
2094 rm -f conftest.$ac_objext
2095 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2096   (eval $ac_compile) 2>&5
2097   ac_status=$?
2098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2099   (exit $ac_status); } &&
2100          { ac_try='test -s conftest.$ac_objext'
2101   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2102   (eval $ac_try) 2>&5
2103   ac_status=$?
2104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2105   (exit $ac_status); }; }; then
2106   ac_compiler_gnu=yes
2107 else
2108   echo "$as_me: failed program was:" >&5
2109 cat conftest.$ac_ext >&5
2110 ac_compiler_gnu=no
2111 fi
2112 rm -f conftest.$ac_objext conftest.$ac_ext
2113 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2114
2115 fi
2116 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2117 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2118 GCC=`test $ac_compiler_gnu = yes && echo yes`
2119 ac_test_CFLAGS=${CFLAGS+set}
2120 ac_save_CFLAGS=$CFLAGS
2121 CFLAGS="-g"
2122 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2123 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2124 if test "${ac_cv_prog_cc_g+set}" = set; then
2125   echo $ECHO_N "(cached) $ECHO_C" >&6
2126 else
2127   cat >conftest.$ac_ext <<_ACEOF
2128 #line $LINENO "configure"
2129 #include "confdefs.h"
2130
2131 #ifdef F77_DUMMY_MAIN
2132 #  ifdef __cplusplus
2133      extern "C"
2134 #  endif
2135    int F77_DUMMY_MAIN() { return 1; }
2136 #endif
2137 int
2138 main ()
2139 {
2140
2141   ;
2142   return 0;
2143 }
2144 _ACEOF
2145 rm -f conftest.$ac_objext
2146 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2147   (eval $ac_compile) 2>&5
2148   ac_status=$?
2149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2150   (exit $ac_status); } &&
2151          { ac_try='test -s conftest.$ac_objext'
2152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2153   (eval $ac_try) 2>&5
2154   ac_status=$?
2155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2156   (exit $ac_status); }; }; then
2157   ac_cv_prog_cc_g=yes
2158 else
2159   echo "$as_me: failed program was:" >&5
2160 cat conftest.$ac_ext >&5
2161 ac_cv_prog_cc_g=no
2162 fi
2163 rm -f conftest.$ac_objext conftest.$ac_ext
2164 fi
2165 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2166 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2167 if test "$ac_test_CFLAGS" = set; then
2168   CFLAGS=$ac_save_CFLAGS
2169 elif test $ac_cv_prog_cc_g = yes; then
2170   if test "$GCC" = yes; then
2171     CFLAGS="-g -O2"
2172   else
2173     CFLAGS="-g"
2174   fi
2175 else
2176   if test "$GCC" = yes; then
2177     CFLAGS="-O2"
2178   else
2179     CFLAGS=
2180   fi
2181 fi
2182 # Some people use a C++ compiler to compile C.  Since we use `exit',
2183 # in C++ we need to declare it.  In case someone uses the same compiler
2184 # for both compiling C and C++ we need to have the C++ compiler decide
2185 # the declaration of exit, since it's the most demanding environment.
2186 cat >conftest.$ac_ext <<_ACEOF
2187 #ifndef __cplusplus
2188   choke me
2189 #endif
2190 _ACEOF
2191 rm -f conftest.$ac_objext
2192 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2193   (eval $ac_compile) 2>&5
2194   ac_status=$?
2195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2196   (exit $ac_status); } &&
2197          { ac_try='test -s conftest.$ac_objext'
2198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2199   (eval $ac_try) 2>&5
2200   ac_status=$?
2201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2202   (exit $ac_status); }; }; then
2203   for ac_declaration in \
2204    ''\
2205    '#include <stdlib.h>' \
2206    'extern "C" void std::exit (int) throw (); using std::exit;' \
2207    'extern "C" void std::exit (int); using std::exit;' \
2208    'extern "C" void exit (int) throw ();' \
2209    'extern "C" void exit (int);' \
2210    'void exit (int);'
2211 do
2212   cat >conftest.$ac_ext <<_ACEOF
2213 #line $LINENO "configure"
2214 #include "confdefs.h"
2215 #include <stdlib.h>
2216 $ac_declaration
2217 #ifdef F77_DUMMY_MAIN
2218 #  ifdef __cplusplus
2219      extern "C"
2220 #  endif
2221    int F77_DUMMY_MAIN() { return 1; }
2222 #endif
2223 int
2224 main ()
2225 {
2226 exit (42);
2227   ;
2228   return 0;
2229 }
2230 _ACEOF
2231 rm -f conftest.$ac_objext
2232 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2233   (eval $ac_compile) 2>&5
2234   ac_status=$?
2235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2236   (exit $ac_status); } &&
2237          { ac_try='test -s conftest.$ac_objext'
2238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2239   (eval $ac_try) 2>&5
2240   ac_status=$?
2241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2242   (exit $ac_status); }; }; then
2243   :
2244 else
2245   echo "$as_me: failed program was:" >&5
2246 cat conftest.$ac_ext >&5
2247 continue
2248 fi
2249 rm -f conftest.$ac_objext conftest.$ac_ext
2250   cat >conftest.$ac_ext <<_ACEOF
2251 #line $LINENO "configure"
2252 #include "confdefs.h"
2253 $ac_declaration
2254 #ifdef F77_DUMMY_MAIN
2255 #  ifdef __cplusplus
2256      extern "C"
2257 #  endif
2258    int F77_DUMMY_MAIN() { return 1; }
2259 #endif
2260 int
2261 main ()
2262 {
2263 exit (42);
2264   ;
2265   return 0;
2266 }
2267 _ACEOF
2268 rm -f conftest.$ac_objext
2269 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2270   (eval $ac_compile) 2>&5
2271   ac_status=$?
2272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2273   (exit $ac_status); } &&
2274          { ac_try='test -s conftest.$ac_objext'
2275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2276   (eval $ac_try) 2>&5
2277   ac_status=$?
2278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2279   (exit $ac_status); }; }; then
2280   break
2281 else
2282   echo "$as_me: failed program was:" >&5
2283 cat conftest.$ac_ext >&5
2284 fi
2285 rm -f conftest.$ac_objext conftest.$ac_ext
2286 done
2287 rm -f conftest*
2288 if test -n "$ac_declaration"; then
2289   echo '#ifdef __cplusplus' >>confdefs.h
2290   echo $ac_declaration      >>confdefs.h
2291   echo '#endif'             >>confdefs.h
2292 fi
2293
2294 else
2295   echo "$as_me: failed program was:" >&5
2296 cat conftest.$ac_ext >&5
2297 fi
2298 rm -f conftest.$ac_objext conftest.$ac_ext
2299 ac_ext=c
2300 ac_cpp='$CPP $CPPFLAGS'
2301 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2302 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2303 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2304
2305
2306   if test -z "$GCC"; then
2307     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2308 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2309     case "$host" in
2310       *-hpux* )
2311         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2312 echo "${ECHO_T}HPUX: adding -Ae" >&6
2313         CC="$CC -Ae"
2314       ;;
2315       *-aix* )
2316         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2317 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2318         CC="$CC -qlanglvl=ansi -qhalt=e"
2319       ;;
2320
2321       *-dec-* )
2322         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2323 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2324         CC="$CC -std1"
2325       ;;
2326
2327       *)
2328         echo "$as_me:$LINENO: result: no idea" >&5
2329 echo "${ECHO_T}no idea" >&6
2330       ;;
2331     esac
2332   fi
2333
2334   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2335 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2336   if test "$cross_compiling" = yes; then
2337   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2338 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2339    { (exit 1); exit 1; }; }
2340 else
2341   cat >conftest.$ac_ext <<_ACEOF
2342 #line $LINENO "configure"
2343 #include "confdefs.h"
2344  main(int ac, char **av) { return 0; }
2345 _ACEOF
2346 rm -f conftest$ac_exeext
2347 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2348   (eval $ac_link) 2>&5
2349   ac_status=$?
2350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2351   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2353   (eval $ac_try) 2>&5
2354   ac_status=$?
2355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2356   (exit $ac_status); }; }; then
2357   echo "$as_me:$LINENO: result: yes" >&5
2358 echo "${ECHO_T}yes" >&6
2359 else
2360   echo "$as_me: program exited with status $ac_status" >&5
2361 echo "$as_me: failed program was:" >&5
2362 cat conftest.$ac_ext >&5
2363 ( exit $ac_status )
2364 echo "$as_me:$LINENO: result: no" >&5
2365 echo "${ECHO_T}no" >&6
2366      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2367 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2368    { (exit 1); exit 1; }; }
2369 fi
2370 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2371 fi
2372
2373   if test -n "$GCC"; then
2374     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2375 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2376     CC="$CC -Wall -Wstrict-prototypes -Wnested-externs"
2377   else
2378     case "$host" in
2379       *-irix5* |*-irix6.0-3* )
2380         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2381 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2382         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2383       ;;
2384 #     *-dec-osf* )
2385 #       if test -z "$GCC"; then
2386 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2387 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2388 #       fi
2389 #     ;;
2390     esac
2391   fi
2392
2393 if test -n "$GCC"; then
2394    if test -n "$GCC"; then
2395    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2396 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2397 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2398   echo $ECHO_N "(cached) $ECHO_C" >&6
2399 else
2400   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
2401           grep unrecognized >/dev/null ); then
2402        ac_cv_gcc_accepts_std=no
2403      else
2404        ac_cv_gcc_accepts_std=yes
2405      fi
2406 fi
2407 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2408 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2409    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2410   fi
2411
2412    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2413 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2414    #
2415    # The reason that // comments are banned from xscreensaver is that gcc is
2416    # basically the only compiler in the world that supports them in C code.
2417    # All other vendors support them only in their C++ compilers, not in their
2418    # ANSI C compilers.  This means that it's a portability problem: every time
2419    # these comments have snuck into the xscreensaver source code, I've gotten
2420    # complaints about it the next day.  So we turn off support for them in gcc
2421    # as well to prevent them from accidentially slipping in.
2422    #
2423    if test "$ac_gcc_accepts_std" = yes ; then
2424      #
2425      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2426      # (That appears to be the only additional preprocessor symbol
2427      # it defines, in addition to the syntax changes it makes.)
2428      #
2429      # -std=gnu89 is no good, because // comments were a GNU extension
2430      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2431      # with -std=gnu89 but not with -std=c89.)
2432      #
2433      CC="$CC -std=c89 -U__STRICT_ANSI__"
2434    else
2435      # The old way:
2436      CC="$CC -Wp,-lang-c89"
2437    fi
2438   fi
2439
2440 if test -n "$GCC"; then
2441    if test -n "$GCC"; then
2442    echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
2443 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6
2444 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
2445   echo $ECHO_N "(cached) $ECHO_C" >&6
2446 else
2447   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
2448           grep unrecognized >/dev/null ); then
2449        ac_cv_gcc_accepts_no_cpp_precomp=no
2450      else
2451        ac_cv_gcc_accepts_no_cpp_precomp=yes
2452      fi
2453 fi
2454 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
2455 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6
2456    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
2457   fi
2458
2459    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
2460      echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
2461 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6
2462      CC="$CC -no-cpp-precomp"
2463    fi
2464   fi
2465
2466 ac_ext=c
2467 ac_cpp='$CPP $CPPFLAGS'
2468 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2469 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2470 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2471 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2472 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2473 # On Suns, sometimes $CPP names a directory.
2474 if test -n "$CPP" && test -d "$CPP"; then
2475   CPP=
2476 fi
2477 if test -z "$CPP"; then
2478   if test "${ac_cv_prog_CPP+set}" = set; then
2479   echo $ECHO_N "(cached) $ECHO_C" >&6
2480 else
2481       # Double quotes because CPP needs to be expanded
2482     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2483     do
2484       ac_preproc_ok=false
2485 for ac_c_preproc_warn_flag in '' yes
2486 do
2487   # Use a header file that comes with gcc, so configuring glibc
2488   # with a fresh cross-compiler works.
2489   # On the NeXT, cc -E runs the code through the compiler's parser,
2490   # not just through cpp. "Syntax error" is here to catch this case.
2491   cat >conftest.$ac_ext <<_ACEOF
2492 #line $LINENO "configure"
2493 #include "confdefs.h"
2494 #include <assert.h>
2495                      Syntax error
2496 _ACEOF
2497 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2498   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2499   ac_status=$?
2500   egrep -v '^ *\+' conftest.er1 >conftest.err
2501   rm -f conftest.er1
2502   cat conftest.err >&5
2503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2504   (exit $ac_status); } >/dev/null; then
2505   if test -s conftest.err; then
2506     ac_cpp_err=$ac_c_preproc_warn_flag
2507   else
2508     ac_cpp_err=
2509   fi
2510 else
2511   ac_cpp_err=yes
2512 fi
2513 if test -z "$ac_cpp_err"; then
2514   :
2515 else
2516   echo "$as_me: failed program was:" >&5
2517   cat conftest.$ac_ext >&5
2518   # Broken: fails on valid input.
2519 continue
2520 fi
2521 rm -f conftest.err conftest.$ac_ext
2522
2523   # OK, works on sane cases.  Now check whether non-existent headers
2524   # can be detected and how.
2525   cat >conftest.$ac_ext <<_ACEOF
2526 #line $LINENO "configure"
2527 #include "confdefs.h"
2528 #include <ac_nonexistent.h>
2529 _ACEOF
2530 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2531   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2532   ac_status=$?
2533   egrep -v '^ *\+' conftest.er1 >conftest.err
2534   rm -f conftest.er1
2535   cat conftest.err >&5
2536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2537   (exit $ac_status); } >/dev/null; then
2538   if test -s conftest.err; then
2539     ac_cpp_err=$ac_c_preproc_warn_flag
2540   else
2541     ac_cpp_err=
2542   fi
2543 else
2544   ac_cpp_err=yes
2545 fi
2546 if test -z "$ac_cpp_err"; then
2547   # Broken: success on invalid input.
2548 continue
2549 else
2550   echo "$as_me: failed program was:" >&5
2551   cat conftest.$ac_ext >&5
2552   # Passes both tests.
2553 ac_preproc_ok=:
2554 break
2555 fi
2556 rm -f conftest.err conftest.$ac_ext
2557
2558 done
2559 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2560 rm -f conftest.err conftest.$ac_ext
2561 if $ac_preproc_ok; then
2562   break
2563 fi
2564
2565     done
2566     ac_cv_prog_CPP=$CPP
2567
2568 fi
2569   CPP=$ac_cv_prog_CPP
2570 else
2571   ac_cv_prog_CPP=$CPP
2572 fi
2573 echo "$as_me:$LINENO: result: $CPP" >&5
2574 echo "${ECHO_T}$CPP" >&6
2575 ac_preproc_ok=false
2576 for ac_c_preproc_warn_flag in '' yes
2577 do
2578   # Use a header file that comes with gcc, so configuring glibc
2579   # with a fresh cross-compiler works.
2580   # On the NeXT, cc -E runs the code through the compiler's parser,
2581   # not just through cpp. "Syntax error" is here to catch this case.
2582   cat >conftest.$ac_ext <<_ACEOF
2583 #line $LINENO "configure"
2584 #include "confdefs.h"
2585 #include <assert.h>
2586                      Syntax error
2587 _ACEOF
2588 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2589   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2590   ac_status=$?
2591   egrep -v '^ *\+' conftest.er1 >conftest.err
2592   rm -f conftest.er1
2593   cat conftest.err >&5
2594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2595   (exit $ac_status); } >/dev/null; then
2596   if test -s conftest.err; then
2597     ac_cpp_err=$ac_c_preproc_warn_flag
2598   else
2599     ac_cpp_err=
2600   fi
2601 else
2602   ac_cpp_err=yes
2603 fi
2604 if test -z "$ac_cpp_err"; then
2605   :
2606 else
2607   echo "$as_me: failed program was:" >&5
2608   cat conftest.$ac_ext >&5
2609   # Broken: fails on valid input.
2610 continue
2611 fi
2612 rm -f conftest.err conftest.$ac_ext
2613
2614   # OK, works on sane cases.  Now check whether non-existent headers
2615   # can be detected and how.
2616   cat >conftest.$ac_ext <<_ACEOF
2617 #line $LINENO "configure"
2618 #include "confdefs.h"
2619 #include <ac_nonexistent.h>
2620 _ACEOF
2621 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2622   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2623   ac_status=$?
2624   egrep -v '^ *\+' conftest.er1 >conftest.err
2625   rm -f conftest.er1
2626   cat conftest.err >&5
2627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2628   (exit $ac_status); } >/dev/null; then
2629   if test -s conftest.err; then
2630     ac_cpp_err=$ac_c_preproc_warn_flag
2631   else
2632     ac_cpp_err=
2633   fi
2634 else
2635   ac_cpp_err=yes
2636 fi
2637 if test -z "$ac_cpp_err"; then
2638   # Broken: success on invalid input.
2639 continue
2640 else
2641   echo "$as_me: failed program was:" >&5
2642   cat conftest.$ac_ext >&5
2643   # Passes both tests.
2644 ac_preproc_ok=:
2645 break
2646 fi
2647 rm -f conftest.err conftest.$ac_ext
2648
2649 done
2650 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2651 rm -f conftest.err conftest.$ac_ext
2652 if $ac_preproc_ok; then
2653   :
2654 else
2655   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2656 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2657    { (exit 1); exit 1; }; }
2658 fi
2659
2660 ac_ext=c
2661 ac_cpp='$CPP $CPPFLAGS'
2662 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2663 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2664 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2665
2666 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2667 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2668 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2669   echo $ECHO_N "(cached) $ECHO_C" >&6
2670 else
2671   ac_cv_prog_cc_stdc=no
2672 ac_save_CC=$CC
2673 cat >conftest.$ac_ext <<_ACEOF
2674 #line $LINENO "configure"
2675 #include "confdefs.h"
2676 #include <stdarg.h>
2677 #include <stdio.h>
2678 #include <sys/types.h>
2679 #include <sys/stat.h>
2680 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2681 struct buf { int x; };
2682 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2683 static char *e (p, i)
2684      char **p;
2685      int i;
2686 {
2687   return p[i];
2688 }
2689 static char *f (char * (*g) (char **, int), char **p, ...)
2690 {
2691   char *s;
2692   va_list v;
2693   va_start (v,p);
2694   s = g (p, va_arg (v,int));
2695   va_end (v);
2696   return s;
2697 }
2698 int test (int i, double x);
2699 struct s1 {int (*f) (int a);};
2700 struct s2 {int (*f) (double a);};
2701 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2702 int argc;
2703 char **argv;
2704 #ifdef F77_DUMMY_MAIN
2705 #  ifdef __cplusplus
2706      extern "C"
2707 #  endif
2708    int F77_DUMMY_MAIN() { return 1; }
2709 #endif
2710 int
2711 main ()
2712 {
2713 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2714   ;
2715   return 0;
2716 }
2717 _ACEOF
2718 # Don't try gcc -ansi; that turns off useful extensions and
2719 # breaks some systems' header files.
2720 # AIX                   -qlanglvl=ansi
2721 # Ultrix and OSF/1      -std1
2722 # HP-UX 10.20 and later -Ae
2723 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2724 # SVR4                  -Xc -D__EXTENSIONS__
2725 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2726 do
2727   CC="$ac_save_CC $ac_arg"
2728   rm -f conftest.$ac_objext
2729 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2730   (eval $ac_compile) 2>&5
2731   ac_status=$?
2732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2733   (exit $ac_status); } &&
2734          { ac_try='test -s conftest.$ac_objext'
2735   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2736   (eval $ac_try) 2>&5
2737   ac_status=$?
2738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2739   (exit $ac_status); }; }; then
2740   ac_cv_prog_cc_stdc=$ac_arg
2741 break
2742 else
2743   echo "$as_me: failed program was:" >&5
2744 cat conftest.$ac_ext >&5
2745 fi
2746 rm -f conftest.$ac_objext
2747 done
2748 rm -f conftest.$ac_ext conftest.$ac_objext
2749 CC=$ac_save_CC
2750
2751 fi
2752
2753 case "x$ac_cv_prog_cc_stdc" in
2754   x|xno)
2755     echo "$as_me:$LINENO: result: none needed" >&5
2756 echo "${ECHO_T}none needed" >&6 ;;
2757   *)
2758     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2759 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2760     CC="$CC $ac_cv_prog_cc_stdc" ;;
2761 esac
2762
2763 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
2764 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2765 if test "${ac_cv_c_const+set}" = set; then
2766   echo $ECHO_N "(cached) $ECHO_C" >&6
2767 else
2768   cat >conftest.$ac_ext <<_ACEOF
2769 #line $LINENO "configure"
2770 #include "confdefs.h"
2771
2772 #ifdef F77_DUMMY_MAIN
2773 #  ifdef __cplusplus
2774      extern "C"
2775 #  endif
2776    int F77_DUMMY_MAIN() { return 1; }
2777 #endif
2778 int
2779 main ()
2780 {
2781 /* FIXME: Include the comments suggested by Paul. */
2782 #ifndef __cplusplus
2783   /* Ultrix mips cc rejects this.  */
2784   typedef int charset[2];
2785   const charset x;
2786   /* SunOS 4.1.1 cc rejects this.  */
2787   char const *const *ccp;
2788   char **p;
2789   /* NEC SVR4.0.2 mips cc rejects this.  */
2790   struct point {int x, y;};
2791   static struct point const zero = {0,0};
2792   /* AIX XL C 1.02.0.0 rejects this.
2793      It does not let you subtract one const X* pointer from another in
2794      an arm of an if-expression whose if-part is not a constant
2795      expression */
2796   const char *g = "string";
2797   ccp = &g + (g ? g-g : 0);
2798   /* HPUX 7.0 cc rejects these. */
2799   ++ccp;
2800   p = (char**) ccp;
2801   ccp = (char const *const *) p;
2802   { /* SCO 3.2v4 cc rejects this.  */
2803     char *t;
2804     char const *s = 0 ? (char *) 0 : (char const *) 0;
2805
2806     *t++ = 0;
2807   }
2808   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2809     int x[] = {25, 17};
2810     const int *foo = &x[0];
2811     ++foo;
2812   }
2813   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2814     typedef const int *iptr;
2815     iptr p = 0;
2816     ++p;
2817   }
2818   { /* AIX XL C 1.02.0.0 rejects this saying
2819        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2820     struct s { int j; const int *ap[3]; };
2821     struct s *b; b->j = 5;
2822   }
2823   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2824     const int foo = 10;
2825   }
2826 #endif
2827
2828   ;
2829   return 0;
2830 }
2831 _ACEOF
2832 rm -f conftest.$ac_objext
2833 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2834   (eval $ac_compile) 2>&5
2835   ac_status=$?
2836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2837   (exit $ac_status); } &&
2838          { ac_try='test -s conftest.$ac_objext'
2839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2840   (eval $ac_try) 2>&5
2841   ac_status=$?
2842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2843   (exit $ac_status); }; }; then
2844   ac_cv_c_const=yes
2845 else
2846   echo "$as_me: failed program was:" >&5
2847 cat conftest.$ac_ext >&5
2848 ac_cv_c_const=no
2849 fi
2850 rm -f conftest.$ac_objext conftest.$ac_ext
2851 fi
2852 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
2853 echo "${ECHO_T}$ac_cv_c_const" >&6
2854 if test $ac_cv_c_const = no; then
2855
2856 cat >>confdefs.h <<\_ACEOF
2857 #define const
2858 _ACEOF
2859
2860 fi
2861
2862 echo "$as_me:$LINENO: checking for inline" >&5
2863 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2864 if test "${ac_cv_c_inline+set}" = set; then
2865   echo $ECHO_N "(cached) $ECHO_C" >&6
2866 else
2867   ac_cv_c_inline=no
2868 for ac_kw in inline __inline__ __inline; do
2869   cat >conftest.$ac_ext <<_ACEOF
2870 #line $LINENO "configure"
2871 #include "confdefs.h"
2872 #ifndef __cplusplus
2873 static $ac_kw int static_foo () {return 0; }
2874 $ac_kw int foo () {return 0; }
2875 #endif
2876
2877 _ACEOF
2878 rm -f conftest.$ac_objext
2879 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2880   (eval $ac_compile) 2>&5
2881   ac_status=$?
2882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2883   (exit $ac_status); } &&
2884          { ac_try='test -s conftest.$ac_objext'
2885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2886   (eval $ac_try) 2>&5
2887   ac_status=$?
2888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2889   (exit $ac_status); }; }; then
2890   ac_cv_c_inline=$ac_kw; break
2891 else
2892   echo "$as_me: failed program was:" >&5
2893 cat conftest.$ac_ext >&5
2894 fi
2895 rm -f conftest.$ac_objext conftest.$ac_ext
2896 done
2897
2898 fi
2899 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
2900 echo "${ECHO_T}$ac_cv_c_inline" >&6
2901 case $ac_cv_c_inline in
2902   inline | yes) ;;
2903   no)
2904 cat >>confdefs.h <<\_ACEOF
2905 #define inline
2906 _ACEOF
2907  ;;
2908   *)  cat >>confdefs.h <<_ACEOF
2909 #define inline $ac_cv_c_inline
2910 _ACEOF
2911  ;;
2912 esac
2913
2914
2915 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
2916   echo "$as_me:$LINENO: checking for bc" >&5
2917 echo $ECHO_N "checking for bc... $ECHO_C" >&6
2918   if test "$ac_bc_result" = "15" ; then
2919     echo "$as_me:$LINENO: result: yes" >&5
2920 echo "${ECHO_T}yes" >&6
2921   else
2922     echo "$as_me:$LINENO: result: no" >&5
2923 echo "${ECHO_T}no" >&6
2924     echo ''
2925     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
2926                   part of Unix since the 1970s.  Come back when your vendor
2927                   has grown a clue." >&5
2928 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
2929                   part of Unix since the 1970s.  Come back when your vendor
2930                   has grown a clue." >&2;}
2931    { (exit 1); exit 1; }; }
2932   fi
2933
2934
2935 # stuff for Makefiles
2936 # Find a good install program.  We prefer a C program (faster),
2937 # so one script is as good as another.  But avoid the broken or
2938 # incompatible versions:
2939 # SysV /etc/install, /usr/sbin/install
2940 # SunOS /usr/etc/install
2941 # IRIX /sbin/install
2942 # AIX /bin/install
2943 # AmigaOS /C/install, which installs bootblocks on floppy discs
2944 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2945 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2946 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2947 # ./install, which can be erroneously created by make from ./install.sh.
2948 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2949 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2950 if test -z "$INSTALL"; then
2951 if test "${ac_cv_path_install+set}" = set; then
2952   echo $ECHO_N "(cached) $ECHO_C" >&6
2953 else
2954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2955 for as_dir in $PATH
2956 do
2957   IFS=$as_save_IFS
2958   test -z "$as_dir" && as_dir=.
2959   # Account for people who put trailing slashes in PATH elements.
2960 case $as_dir/ in
2961   ./ | .// | /cC/* | \
2962   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2963   /usr/ucb/* ) ;;
2964   *)
2965     # OSF1 and SCO ODT 3.0 have their own names for install.
2966     # Don't use installbsd from OSF since it installs stuff as root
2967     # by default.
2968     for ac_prog in ginstall scoinst install; do
2969       for ac_exec_ext in '' $ac_executable_extensions; do
2970         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2971           if test $ac_prog = install &&
2972             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2973             # AIX install.  It has an incompatible calling convention.
2974             :
2975           elif test $ac_prog = install &&
2976             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2977             # program-specific install script used by HP pwplus--don't use.
2978             :
2979           else
2980             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2981             break 3
2982           fi
2983         fi
2984       done
2985     done
2986     ;;
2987 esac
2988 done
2989
2990
2991 fi
2992   if test "${ac_cv_path_install+set}" = set; then
2993     INSTALL=$ac_cv_path_install
2994   else
2995     # As a last resort, use the slow shell script.  We don't cache a
2996     # path for INSTALL within a source directory, because that will
2997     # break other packages using the cache if that directory is
2998     # removed, or if the path is relative.
2999     INSTALL=$ac_install_sh
3000   fi
3001 fi
3002 echo "$as_me:$LINENO: result: $INSTALL" >&5
3003 echo "${ECHO_T}$INSTALL" >&6
3004
3005 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3006 # It thinks the first close brace ends the variable substitution.
3007 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3008
3009 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3010
3011 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3012
3013 echo "$as_me:$LINENO: checking whether \\"\${INSTALL} -d\\" creates intermediate directories" >&5
3014 echo $ECHO_N "checking whether \\"\${INSTALL} -d\\" creates intermediate directories... $ECHO_C" >&6
3015 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
3016   echo $ECHO_N "(cached) $ECHO_C" >&6
3017 else
3018   ac_cv_install_d_creates_dirs=no
3019      rm -rf conftestdir
3020      if mkdir conftestdir; then
3021        cd conftestdir 2>/dev/null
3022        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
3023        if test -d dir1/dir2/. ; then
3024          ac_cv_install_d_creates_dirs=yes
3025        fi
3026        cd .. 2>/dev/null
3027        rm -rf conftestdir
3028      fi
3029
3030 fi
3031 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
3032 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
3033
3034   if test "$ac_cv_install_d_creates_dirs" = no ; then
3035     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
3036 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
3037 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
3038   echo $ECHO_N "(cached) $ECHO_C" >&6
3039 else
3040   ac_cv_mkdir_p_creates_dirs=no
3041        rm -rf conftestdir
3042        if mkdir conftestdir; then
3043          cd conftestdir 2>/dev/null
3044          mkdir -p dir1/dir2 >/dev/null 2>&1
3045          if test -d dir1/dir2/. ; then
3046            ac_cv_mkdir_p_creates_dirs=yes
3047          fi
3048          cd .. 2>/dev/null
3049          rm -rf conftestdir
3050        fi
3051
3052 fi
3053 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3054 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3055   fi
3056
3057   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3058     INSTALL_DIRS='${INSTALL} -d'
3059   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3060     INSTALL_DIRS='mkdir -p'
3061   else
3062     # any other ideas?
3063     INSTALL_DIRS='${INSTALL} -d'
3064   fi
3065
3066 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5
3067 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3068 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3069 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3070   echo $ECHO_N "(cached) $ECHO_C" >&6
3071 else
3072   cat >conftest.make <<\_ACEOF
3073 all:
3074         @echo 'ac_maketemp="${MAKE}"'
3075 _ACEOF
3076 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3077 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3078 if test -n "$ac_maketemp"; then
3079   eval ac_cv_prog_make_${ac_make}_set=yes
3080 else
3081   eval ac_cv_prog_make_${ac_make}_set=no
3082 fi
3083 rm -f conftest.make
3084 fi
3085 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3086   echo "$as_me:$LINENO: result: yes" >&5
3087 echo "${ECHO_T}yes" >&6
3088   SET_MAKE=
3089 else
3090   echo "$as_me:$LINENO: result: no" >&5
3091 echo "${ECHO_T}no" >&6
3092   SET_MAKE="MAKE=${MAKE-make}"
3093 fi
3094
3095
3096 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3097 # That's wrong: it should be set to '${INSTALL}', so that one can
3098 # implement the "install-strip" target properly (strip executables,
3099 # but do not try to strip scripts.)
3100 #
3101 INSTALL_SCRIPT='${INSTALL}'
3102
3103 # random libc stuff
3104
3105 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3106 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3107 if test "${ac_cv_header_stdc+set}" = set; then
3108   echo $ECHO_N "(cached) $ECHO_C" >&6
3109 else
3110   cat >conftest.$ac_ext <<_ACEOF
3111 #line $LINENO "configure"
3112 #include "confdefs.h"
3113 #include <stdlib.h>
3114 #include <stdarg.h>
3115 #include <string.h>
3116 #include <float.h>
3117
3118 _ACEOF
3119 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3120   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3121   ac_status=$?
3122   egrep -v '^ *\+' conftest.er1 >conftest.err
3123   rm -f conftest.er1
3124   cat conftest.err >&5
3125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3126   (exit $ac_status); } >/dev/null; then
3127   if test -s conftest.err; then
3128     ac_cpp_err=$ac_c_preproc_warn_flag
3129   else
3130     ac_cpp_err=
3131   fi
3132 else
3133   ac_cpp_err=yes
3134 fi
3135 if test -z "$ac_cpp_err"; then
3136   ac_cv_header_stdc=yes
3137 else
3138   echo "$as_me: failed program was:" >&5
3139   cat conftest.$ac_ext >&5
3140   ac_cv_header_stdc=no
3141 fi
3142 rm -f conftest.err conftest.$ac_ext
3143
3144 if test $ac_cv_header_stdc = yes; then
3145   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3146   cat >conftest.$ac_ext <<_ACEOF
3147 #line $LINENO "configure"
3148 #include "confdefs.h"
3149 #include <string.h>
3150
3151 _ACEOF
3152 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3153   egrep "memchr" >/dev/null 2>&1; then
3154   :
3155 else
3156   ac_cv_header_stdc=no
3157 fi
3158 rm -f conftest*
3159
3160 fi
3161
3162 if test $ac_cv_header_stdc = yes; then
3163   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3164   cat >conftest.$ac_ext <<_ACEOF
3165 #line $LINENO "configure"
3166 #include "confdefs.h"
3167 #include <stdlib.h>
3168
3169 _ACEOF
3170 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3171   egrep "free" >/dev/null 2>&1; then
3172   :
3173 else
3174   ac_cv_header_stdc=no
3175 fi
3176 rm -f conftest*
3177
3178 fi
3179
3180 if test $ac_cv_header_stdc = yes; then
3181   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3182   if test "$cross_compiling" = yes; then
3183   :
3184 else
3185   cat >conftest.$ac_ext <<_ACEOF
3186 #line $LINENO "configure"
3187 #include "confdefs.h"
3188 #include <ctype.h>
3189 #if ((' ' & 0x0FF) == 0x020)
3190 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3191 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3192 #else
3193 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3194                      || ('j' <= (c) && (c) <= 'r') \
3195                      || ('s' <= (c) && (c) <= 'z'))
3196 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3197 #endif
3198
3199 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3200 int
3201 main ()
3202 {
3203   int i;
3204   for (i = 0; i < 256; i++)
3205     if (XOR (islower (i), ISLOWER (i))
3206         || toupper (i) != TOUPPER (i))
3207       exit(2);
3208   exit (0);
3209 }
3210 _ACEOF
3211 rm -f conftest$ac_exeext
3212 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3213   (eval $ac_link) 2>&5
3214   ac_status=$?
3215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3216   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3217   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3218   (eval $ac_try) 2>&5
3219   ac_status=$?
3220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3221   (exit $ac_status); }; }; then
3222   :
3223 else
3224   echo "$as_me: program exited with status $ac_status" >&5
3225 echo "$as_me: failed program was:" >&5
3226 cat conftest.$ac_ext >&5
3227 ( exit $ac_status )
3228 ac_cv_header_stdc=no
3229 fi
3230 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3231 fi
3232 fi
3233 fi
3234 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3235 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3236 if test $ac_cv_header_stdc = yes; then
3237
3238 cat >>confdefs.h <<\_ACEOF
3239 #define STDC_HEADERS 1
3240 _ACEOF
3241
3242 fi
3243
3244 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3255                   inttypes.h stdint.h unistd.h
3256 do
3257 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3258 echo "$as_me:$LINENO: checking for $ac_header" >&5
3259 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3260 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3261   echo $ECHO_N "(cached) $ECHO_C" >&6
3262 else
3263   cat >conftest.$ac_ext <<_ACEOF
3264 #line $LINENO "configure"
3265 #include "confdefs.h"
3266 $ac_includes_default
3267
3268 #include <$ac_header>
3269 _ACEOF
3270 rm -f conftest.$ac_objext
3271 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3272   (eval $ac_compile) 2>&5
3273   ac_status=$?
3274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3275   (exit $ac_status); } &&
3276          { ac_try='test -s conftest.$ac_objext'
3277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3278   (eval $ac_try) 2>&5
3279   ac_status=$?
3280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3281   (exit $ac_status); }; }; then
3282   eval "$as_ac_Header=yes"
3283 else
3284   echo "$as_me: failed program was:" >&5
3285 cat conftest.$ac_ext >&5
3286 eval "$as_ac_Header=no"
3287 fi
3288 rm -f conftest.$ac_objext conftest.$ac_ext
3289 fi
3290 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3291 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3292 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3293   cat >>confdefs.h <<_ACEOF
3294 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3295 _ACEOF
3296
3297 fi
3298
3299 done
3300
3301
3302
3303 for ac_header in unistd.h
3304 do
3305 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3306 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3307   echo "$as_me:$LINENO: checking for $ac_header" >&5
3308 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3309 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3310   echo $ECHO_N "(cached) $ECHO_C" >&6
3311 fi
3312 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3313 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3314 else
3315   # Is the header compilable?
3316 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3317 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3318 cat >conftest.$ac_ext <<_ACEOF
3319 #line $LINENO "configure"
3320 #include "confdefs.h"
3321 $ac_includes_default
3322 #include <$ac_header>
3323 _ACEOF
3324 rm -f conftest.$ac_objext
3325 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3326   (eval $ac_compile) 2>&5
3327   ac_status=$?
3328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3329   (exit $ac_status); } &&
3330          { ac_try='test -s conftest.$ac_objext'
3331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3332   (eval $ac_try) 2>&5
3333   ac_status=$?
3334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3335   (exit $ac_status); }; }; then
3336   ac_header_compiler=yes
3337 else
3338   echo "$as_me: failed program was:" >&5
3339 cat conftest.$ac_ext >&5
3340 ac_header_compiler=no
3341 fi
3342 rm -f conftest.$ac_objext conftest.$ac_ext
3343 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3344 echo "${ECHO_T}$ac_header_compiler" >&6
3345
3346 # Is the header present?
3347 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3348 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3349 cat >conftest.$ac_ext <<_ACEOF
3350 #line $LINENO "configure"
3351 #include "confdefs.h"
3352 #include <$ac_header>
3353 _ACEOF
3354 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3355   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3356   ac_status=$?
3357   egrep -v '^ *\+' conftest.er1 >conftest.err
3358   rm -f conftest.er1
3359   cat conftest.err >&5
3360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3361   (exit $ac_status); } >/dev/null; then
3362   if test -s conftest.err; then
3363     ac_cpp_err=$ac_c_preproc_warn_flag
3364   else
3365     ac_cpp_err=
3366   fi
3367 else
3368   ac_cpp_err=yes
3369 fi
3370 if test -z "$ac_cpp_err"; then
3371   ac_header_preproc=yes
3372 else
3373   echo "$as_me: failed program was:" >&5
3374   cat conftest.$ac_ext >&5
3375   ac_header_preproc=no
3376 fi
3377 rm -f conftest.err conftest.$ac_ext
3378 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3379 echo "${ECHO_T}$ac_header_preproc" >&6
3380
3381 # So?  What about this header?
3382 case $ac_header_compiler:$ac_header_preproc in
3383   yes:no )
3384     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3385 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3386     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3387 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3388   no:yes )
3389     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3390 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3391     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3392 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3393     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3394 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3395 esac
3396 echo "$as_me:$LINENO: checking for $ac_header" >&5
3397 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3398 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3399   echo $ECHO_N "(cached) $ECHO_C" >&6
3400 else
3401   eval "$as_ac_Header=$ac_header_preproc"
3402 fi
3403 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3404 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3405
3406 fi
3407 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3408   cat >>confdefs.h <<_ACEOF
3409 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3410 _ACEOF
3411
3412 fi
3413
3414 done
3415
3416 echo "$as_me:$LINENO: checking for mode_t" >&5
3417 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3418 if test "${ac_cv_type_mode_t+set}" = set; then
3419   echo $ECHO_N "(cached) $ECHO_C" >&6
3420 else
3421   cat >conftest.$ac_ext <<_ACEOF
3422 #line $LINENO "configure"
3423 #include "confdefs.h"
3424 $ac_includes_default
3425 #ifdef F77_DUMMY_MAIN
3426 #  ifdef __cplusplus
3427      extern "C"
3428 #  endif
3429    int F77_DUMMY_MAIN() { return 1; }
3430 #endif
3431 int
3432 main ()
3433 {
3434 if ((mode_t *) 0)
3435   return 0;
3436 if (sizeof (mode_t))
3437   return 0;
3438   ;
3439   return 0;
3440 }
3441 _ACEOF
3442 rm -f conftest.$ac_objext
3443 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3444   (eval $ac_compile) 2>&5
3445   ac_status=$?
3446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3447   (exit $ac_status); } &&
3448          { ac_try='test -s conftest.$ac_objext'
3449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3450   (eval $ac_try) 2>&5
3451   ac_status=$?
3452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3453   (exit $ac_status); }; }; then
3454   ac_cv_type_mode_t=yes
3455 else
3456   echo "$as_me: failed program was:" >&5
3457 cat conftest.$ac_ext >&5
3458 ac_cv_type_mode_t=no
3459 fi
3460 rm -f conftest.$ac_objext conftest.$ac_ext
3461 fi
3462 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
3463 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3464 if test $ac_cv_type_mode_t = yes; then
3465   :
3466 else
3467
3468 cat >>confdefs.h <<_ACEOF
3469 #define mode_t int
3470 _ACEOF
3471
3472 fi
3473
3474 echo "$as_me:$LINENO: checking for pid_t" >&5
3475 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
3476 if test "${ac_cv_type_pid_t+set}" = set; then
3477   echo $ECHO_N "(cached) $ECHO_C" >&6
3478 else
3479   cat >conftest.$ac_ext <<_ACEOF
3480 #line $LINENO "configure"
3481 #include "confdefs.h"
3482 $ac_includes_default
3483 #ifdef F77_DUMMY_MAIN
3484 #  ifdef __cplusplus
3485      extern "C"
3486 #  endif
3487    int F77_DUMMY_MAIN() { return 1; }
3488 #endif
3489 int
3490 main ()
3491 {
3492 if ((pid_t *) 0)
3493   return 0;
3494 if (sizeof (pid_t))
3495   return 0;
3496   ;
3497   return 0;
3498 }
3499 _ACEOF
3500 rm -f conftest.$ac_objext
3501 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3502   (eval $ac_compile) 2>&5
3503   ac_status=$?
3504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3505   (exit $ac_status); } &&
3506          { ac_try='test -s conftest.$ac_objext'
3507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3508   (eval $ac_try) 2>&5
3509   ac_status=$?
3510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3511   (exit $ac_status); }; }; then
3512   ac_cv_type_pid_t=yes
3513 else
3514   echo "$as_me: failed program was:" >&5
3515 cat conftest.$ac_ext >&5
3516 ac_cv_type_pid_t=no
3517 fi
3518 rm -f conftest.$ac_objext conftest.$ac_ext
3519 fi
3520 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
3521 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3522 if test $ac_cv_type_pid_t = yes; then
3523   :
3524 else
3525
3526 cat >>confdefs.h <<_ACEOF
3527 #define pid_t int
3528 _ACEOF
3529
3530 fi
3531
3532 echo "$as_me:$LINENO: checking for size_t" >&5
3533 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
3534 if test "${ac_cv_type_size_t+set}" = set; then
3535   echo $ECHO_N "(cached) $ECHO_C" >&6
3536 else
3537   cat >conftest.$ac_ext <<_ACEOF
3538 #line $LINENO "configure"
3539 #include "confdefs.h"
3540 $ac_includes_default
3541 #ifdef F77_DUMMY_MAIN
3542 #  ifdef __cplusplus
3543      extern "C"
3544 #  endif
3545    int F77_DUMMY_MAIN() { return 1; }
3546 #endif
3547 int
3548 main ()
3549 {
3550 if ((size_t *) 0)
3551   return 0;
3552 if (sizeof (size_t))
3553   return 0;
3554   ;
3555   return 0;
3556 }
3557 _ACEOF
3558 rm -f conftest.$ac_objext
3559 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3560   (eval $ac_compile) 2>&5
3561   ac_status=$?
3562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3563   (exit $ac_status); } &&
3564          { ac_try='test -s conftest.$ac_objext'
3565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3566   (eval $ac_try) 2>&5
3567   ac_status=$?
3568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3569   (exit $ac_status); }; }; then
3570   ac_cv_type_size_t=yes
3571 else
3572   echo "$as_me: failed program was:" >&5
3573 cat conftest.$ac_ext >&5
3574 ac_cv_type_size_t=no
3575 fi
3576 rm -f conftest.$ac_objext conftest.$ac_ext
3577 fi
3578 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
3579 echo "${ECHO_T}$ac_cv_type_size_t" >&6
3580 if test $ac_cv_type_size_t = yes; then
3581   :
3582 else
3583
3584 cat >>confdefs.h <<_ACEOF
3585 #define size_t unsigned
3586 _ACEOF
3587
3588 fi
3589
3590 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
3591 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
3592 if test "${ac_cv_type_signal+set}" = set; then
3593   echo $ECHO_N "(cached) $ECHO_C" >&6
3594 else
3595   cat >conftest.$ac_ext <<_ACEOF
3596 #line $LINENO "configure"
3597 #include "confdefs.h"
3598 #include <sys/types.h>
3599 #include <signal.h>
3600 #ifdef signal
3601 # undef signal
3602 #endif
3603 #ifdef __cplusplus
3604 extern "C" void (*signal (int, void (*)(int)))(int);
3605 #else
3606 void (*signal ()) ();
3607 #endif
3608
3609 #ifdef F77_DUMMY_MAIN
3610 #  ifdef __cplusplus
3611      extern "C"
3612 #  endif
3613    int F77_DUMMY_MAIN() { return 1; }
3614 #endif
3615 int
3616 main ()
3617 {
3618 int i;
3619   ;
3620   return 0;
3621 }
3622 _ACEOF
3623 rm -f conftest.$ac_objext
3624 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3625   (eval $ac_compile) 2>&5
3626   ac_status=$?
3627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3628   (exit $ac_status); } &&
3629          { ac_try='test -s conftest.$ac_objext'
3630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3631   (eval $ac_try) 2>&5
3632   ac_status=$?
3633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3634   (exit $ac_status); }; }; then
3635   ac_cv_type_signal=void
3636 else
3637   echo "$as_me: failed program was:" >&5
3638 cat conftest.$ac_ext >&5
3639 ac_cv_type_signal=int
3640 fi
3641 rm -f conftest.$ac_objext conftest.$ac_ext
3642 fi
3643 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
3644 echo "${ECHO_T}$ac_cv_type_signal" >&6
3645
3646 cat >>confdefs.h <<_ACEOF
3647 #define RETSIGTYPE $ac_cv_type_signal
3648 _ACEOF
3649
3650
3651 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
3652 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3653 if test "${ac_cv_header_time+set}" = set; then
3654   echo $ECHO_N "(cached) $ECHO_C" >&6
3655 else
3656   cat >conftest.$ac_ext <<_ACEOF
3657 #line $LINENO "configure"
3658 #include "confdefs.h"
3659 #include <sys/types.h>
3660 #include <sys/time.h>
3661 #include <time.h>
3662
3663 #ifdef F77_DUMMY_MAIN
3664 #  ifdef __cplusplus
3665      extern "C"
3666 #  endif
3667    int F77_DUMMY_MAIN() { return 1; }
3668 #endif
3669 int
3670 main ()
3671 {
3672 if ((struct tm *) 0)
3673 return 0;
3674   ;
3675   return 0;
3676 }
3677 _ACEOF
3678 rm -f conftest.$ac_objext
3679 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3680   (eval $ac_compile) 2>&5
3681   ac_status=$?
3682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3683   (exit $ac_status); } &&
3684          { ac_try='test -s conftest.$ac_objext'
3685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3686   (eval $ac_try) 2>&5
3687   ac_status=$?
3688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3689   (exit $ac_status); }; }; then
3690   ac_cv_header_time=yes
3691 else
3692   echo "$as_me: failed program was:" >&5
3693 cat conftest.$ac_ext >&5
3694 ac_cv_header_time=no
3695 fi
3696 rm -f conftest.$ac_objext conftest.$ac_ext
3697 fi
3698 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
3699 echo "${ECHO_T}$ac_cv_header_time" >&6
3700 if test $ac_cv_header_time = yes; then
3701
3702 cat >>confdefs.h <<\_ACEOF
3703 #define TIME_WITH_SYS_TIME 1
3704 _ACEOF
3705
3706 fi
3707
3708 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
3709 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
3710 if test "${ac_cv_header_sys_wait_h+set}" = set; then
3711   echo $ECHO_N "(cached) $ECHO_C" >&6
3712 else
3713   cat >conftest.$ac_ext <<_ACEOF
3714 #line $LINENO "configure"
3715 #include "confdefs.h"
3716 #include <sys/types.h>
3717 #include <sys/wait.h>
3718 #ifndef WEXITSTATUS
3719 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3720 #endif
3721 #ifndef WIFEXITED
3722 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3723 #endif
3724
3725 #ifdef F77_DUMMY_MAIN
3726 #  ifdef __cplusplus
3727      extern "C"
3728 #  endif
3729    int F77_DUMMY_MAIN() { return 1; }
3730 #endif
3731 int
3732 main ()
3733 {
3734   int s;
3735   wait (&s);
3736   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3737   ;
3738   return 0;
3739 }
3740 _ACEOF
3741 rm -f conftest.$ac_objext
3742 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3743   (eval $ac_compile) 2>&5
3744   ac_status=$?
3745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3746   (exit $ac_status); } &&
3747          { ac_try='test -s conftest.$ac_objext'
3748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3749   (eval $ac_try) 2>&5
3750   ac_status=$?
3751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3752   (exit $ac_status); }; }; then
3753   ac_cv_header_sys_wait_h=yes
3754 else
3755   echo "$as_me: failed program was:" >&5
3756 cat conftest.$ac_ext >&5
3757 ac_cv_header_sys_wait_h=no
3758 fi
3759 rm -f conftest.$ac_objext conftest.$ac_ext
3760 fi
3761 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3762 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3763 if test $ac_cv_header_sys_wait_h = yes; then
3764
3765 cat >>confdefs.h <<\_ACEOF
3766 #define HAVE_SYS_WAIT_H 1
3767 _ACEOF
3768
3769 fi
3770
3771
3772
3773
3774
3775
3776 ac_header_dirent=no
3777 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3778   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3779 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3780 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3781 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3782   echo $ECHO_N "(cached) $ECHO_C" >&6
3783 else
3784   cat >conftest.$ac_ext <<_ACEOF
3785 #line $LINENO "configure"
3786 #include "confdefs.h"
3787 #include <sys/types.h>
3788 #include <$ac_hdr>
3789
3790 #ifdef F77_DUMMY_MAIN
3791 #  ifdef __cplusplus
3792      extern "C"
3793 #  endif
3794    int F77_DUMMY_MAIN() { return 1; }
3795 #endif
3796 int
3797 main ()
3798 {
3799 if ((DIR *) 0)
3800 return 0;
3801   ;
3802   return 0;
3803 }
3804 _ACEOF
3805 rm -f conftest.$ac_objext
3806 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3807   (eval $ac_compile) 2>&5
3808   ac_status=$?
3809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3810   (exit $ac_status); } &&
3811          { ac_try='test -s conftest.$ac_objext'
3812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3813   (eval $ac_try) 2>&5
3814   ac_status=$?
3815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3816   (exit $ac_status); }; }; then
3817   eval "$as_ac_Header=yes"
3818 else
3819   echo "$as_me: failed program was:" >&5
3820 cat conftest.$ac_ext >&5
3821 eval "$as_ac_Header=no"
3822 fi
3823 rm -f conftest.$ac_objext conftest.$ac_ext
3824 fi
3825 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3826 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3827 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3828   cat >>confdefs.h <<_ACEOF
3829 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
3830 _ACEOF
3831
3832 ac_header_dirent=$ac_hdr; break
3833 fi
3834
3835 done
3836 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3837 if test $ac_header_dirent = dirent.h; then
3838   echo "$as_me:$LINENO: checking for library containing opendir" >&5
3839 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
3840 if test "${ac_cv_search_opendir+set}" = set; then
3841   echo $ECHO_N "(cached) $ECHO_C" >&6
3842 else
3843   ac_func_search_save_LIBS=$LIBS
3844 ac_cv_search_opendir=no
3845 cat >conftest.$ac_ext <<_ACEOF
3846 #line $LINENO "configure"
3847 #include "confdefs.h"
3848
3849 /* Override any gcc2 internal prototype to avoid an error.  */
3850 #ifdef __cplusplus
3851 extern "C"
3852 #endif
3853 /* We use char because int might match the return type of a gcc2
3854    builtin and then its argument prototype would still apply.  */
3855 char opendir ();
3856 #ifdef F77_DUMMY_MAIN
3857 #  ifdef __cplusplus
3858      extern "C"
3859 #  endif
3860    int F77_DUMMY_MAIN() { return 1; }
3861 #endif
3862 int
3863 main ()
3864 {
3865 opendir ();
3866   ;
3867   return 0;
3868 }
3869 _ACEOF
3870 rm -f conftest.$ac_objext conftest$ac_exeext
3871 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3872   (eval $ac_link) 2>&5
3873   ac_status=$?
3874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3875   (exit $ac_status); } &&
3876          { ac_try='test -s conftest$ac_exeext'
3877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3878   (eval $ac_try) 2>&5
3879   ac_status=$?
3880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3881   (exit $ac_status); }; }; then
3882   ac_cv_search_opendir="none required"
3883 else
3884   echo "$as_me: failed program was:" >&5
3885 cat conftest.$ac_ext >&5
3886 fi
3887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3888 if test "$ac_cv_search_opendir" = no; then
3889   for ac_lib in dir; do
3890     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3891     cat >conftest.$ac_ext <<_ACEOF
3892 #line $LINENO "configure"
3893 #include "confdefs.h"
3894
3895 /* Override any gcc2 internal prototype to avoid an error.  */
3896 #ifdef __cplusplus
3897 extern "C"
3898 #endif
3899 /* We use char because int might match the return type of a gcc2
3900    builtin and then its argument prototype would still apply.  */
3901 char opendir ();
3902 #ifdef F77_DUMMY_MAIN
3903 #  ifdef __cplusplus
3904      extern "C"
3905 #  endif
3906    int F77_DUMMY_MAIN() { return 1; }
3907 #endif
3908 int
3909 main ()
3910 {
3911 opendir ();
3912   ;
3913   return 0;
3914 }
3915 _ACEOF
3916 rm -f conftest.$ac_objext conftest$ac_exeext
3917 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3918   (eval $ac_link) 2>&5
3919   ac_status=$?
3920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3921   (exit $ac_status); } &&
3922          { ac_try='test -s conftest$ac_exeext'
3923   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3924   (eval $ac_try) 2>&5
3925   ac_status=$?
3926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3927   (exit $ac_status); }; }; then
3928   ac_cv_search_opendir="-l$ac_lib"
3929 break
3930 else
3931   echo "$as_me: failed program was:" >&5
3932 cat conftest.$ac_ext >&5
3933 fi
3934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3935   done
3936 fi
3937 LIBS=$ac_func_search_save_LIBS
3938 fi
3939 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
3940 echo "${ECHO_T}$ac_cv_search_opendir" >&6
3941 if test "$ac_cv_search_opendir" != no; then
3942   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
3943
3944 fi
3945
3946 else
3947   echo "$as_me:$LINENO: checking for library containing opendir" >&5
3948 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
3949 if test "${ac_cv_search_opendir+set}" = set; then
3950   echo $ECHO_N "(cached) $ECHO_C" >&6
3951 else
3952   ac_func_search_save_LIBS=$LIBS
3953 ac_cv_search_opendir=no
3954 cat >conftest.$ac_ext <<_ACEOF
3955 #line $LINENO "configure"
3956 #include "confdefs.h"
3957
3958 /* Override any gcc2 internal prototype to avoid an error.  */
3959 #ifdef __cplusplus
3960 extern "C"
3961 #endif
3962 /* We use char because int might match the return type of a gcc2
3963    builtin and then its argument prototype would still apply.  */
3964 char opendir ();
3965 #ifdef F77_DUMMY_MAIN
3966 #  ifdef __cplusplus
3967      extern "C"
3968 #  endif
3969    int F77_DUMMY_MAIN() { return 1; }
3970 #endif
3971 int
3972 main ()
3973 {
3974 opendir ();
3975   ;
3976   return 0;
3977 }
3978 _ACEOF
3979 rm -f conftest.$ac_objext conftest$ac_exeext
3980 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3981   (eval $ac_link) 2>&5
3982   ac_status=$?
3983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3984   (exit $ac_status); } &&
3985          { ac_try='test -s conftest$ac_exeext'
3986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3987   (eval $ac_try) 2>&5
3988   ac_status=$?
3989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3990   (exit $ac_status); }; }; then
3991   ac_cv_search_opendir="none required"
3992 else
3993   echo "$as_me: failed program was:" >&5
3994 cat conftest.$ac_ext >&5
3995 fi
3996 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3997 if test "$ac_cv_search_opendir" = no; then
3998   for ac_lib in x; do
3999     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4000     cat >conftest.$ac_ext <<_ACEOF
4001 #line $LINENO "configure"
4002 #include "confdefs.h"
4003
4004 /* Override any gcc2 internal prototype to avoid an error.  */
4005 #ifdef __cplusplus
4006 extern "C"
4007 #endif
4008 /* We use char because int might match the return type of a gcc2
4009    builtin and then its argument prototype would still apply.  */
4010 char opendir ();
4011 #ifdef F77_DUMMY_MAIN
4012 #  ifdef __cplusplus
4013      extern "C"
4014 #  endif
4015    int F77_DUMMY_MAIN() { return 1; }
4016 #endif
4017 int
4018 main ()
4019 {
4020 opendir ();
4021   ;
4022   return 0;
4023 }
4024 _ACEOF
4025 rm -f conftest.$ac_objext conftest$ac_exeext
4026 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4027   (eval $ac_link) 2>&5
4028   ac_status=$?
4029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4030   (exit $ac_status); } &&
4031          { ac_try='test -s conftest$ac_exeext'
4032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4033   (eval $ac_try) 2>&5
4034   ac_status=$?
4035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4036   (exit $ac_status); }; }; then
4037   ac_cv_search_opendir="-l$ac_lib"
4038 break
4039 else
4040   echo "$as_me: failed program was:" >&5
4041 cat conftest.$ac_ext >&5
4042 fi
4043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4044   done
4045 fi
4046 LIBS=$ac_func_search_save_LIBS
4047 fi
4048 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4049 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4050 if test "$ac_cv_search_opendir" != no; then
4051   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4052
4053 fi
4054
4055 fi
4056
4057 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4058 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4059   if test "${ac_cv_gettimeofday_args+set}" = set; then
4060   echo $ECHO_N "(cached) $ECHO_C" >&6
4061 else
4062   cat >conftest.$ac_ext <<_ACEOF
4063 #line $LINENO "configure"
4064 #include "confdefs.h"
4065 #include <stdlib.h>
4066                     #include <sys/time.h>
4067 #ifdef F77_DUMMY_MAIN
4068 #  ifdef __cplusplus
4069      extern "C"
4070 #  endif
4071    int F77_DUMMY_MAIN() { return 1; }
4072 #endif
4073 int
4074 main ()
4075 {
4076 struct timeval tv; struct timezone tzp;
4077                     gettimeofday(&tv, &tzp);
4078   ;
4079   return 0;
4080 }
4081 _ACEOF
4082 rm -f conftest.$ac_objext
4083 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4084   (eval $ac_compile) 2>&5
4085   ac_status=$?
4086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4087   (exit $ac_status); } &&
4088          { ac_try='test -s conftest.$ac_objext'
4089   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4090   (eval $ac_try) 2>&5
4091   ac_status=$?
4092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4093   (exit $ac_status); }; }; then
4094   ac_gettimeofday_args=2
4095 else
4096   echo "$as_me: failed program was:" >&5
4097 cat conftest.$ac_ext >&5
4098 cat >conftest.$ac_ext <<_ACEOF
4099 #line $LINENO "configure"
4100 #include "confdefs.h"
4101 #include <stdlib.h>
4102                                     #include <sys/time.h>
4103 #ifdef F77_DUMMY_MAIN
4104 #  ifdef __cplusplus
4105      extern "C"
4106 #  endif
4107    int F77_DUMMY_MAIN() { return 1; }
4108 #endif
4109 int
4110 main ()
4111 {
4112 struct timeval tv; gettimeofday(&tv);
4113   ;
4114   return 0;
4115 }
4116 _ACEOF
4117 rm -f conftest.$ac_objext
4118 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4119   (eval $ac_compile) 2>&5
4120   ac_status=$?
4121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4122   (exit $ac_status); } &&
4123          { ac_try='test -s conftest.$ac_objext'
4124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4125   (eval $ac_try) 2>&5
4126   ac_status=$?
4127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4128   (exit $ac_status); }; }; then
4129   ac_gettimeofday_args=1
4130 else
4131   echo "$as_me: failed program was:" >&5
4132 cat conftest.$ac_ext >&5
4133 ac_gettimeofday_args=0
4134 fi
4135 rm -f conftest.$ac_objext conftest.$ac_ext
4136 fi
4137 rm -f conftest.$ac_objext conftest.$ac_ext
4138     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4139 fi
4140
4141   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4142   if test "$ac_gettimeofday_args" = 1 ; then
4143     cat >>confdefs.h <<\_ACEOF
4144 #define HAVE_GETTIMEOFDAY 1
4145 _ACEOF
4146
4147     echo "$as_me:$LINENO: result: one argument" >&5
4148 echo "${ECHO_T}one argument" >&6
4149   elif test "$ac_gettimeofday_args" = 2 ; then
4150     cat >>confdefs.h <<\_ACEOF
4151 #define HAVE_GETTIMEOFDAY 1
4152 _ACEOF
4153
4154     cat >>confdefs.h <<\_ACEOF
4155 #define GETTIMEOFDAY_TWO_ARGS 1
4156 _ACEOF
4157
4158     echo "$as_me:$LINENO: result: two arguments" >&5
4159 echo "${ECHO_T}two arguments" >&6
4160   else
4161     echo "$as_me:$LINENO: result: unknown" >&5
4162 echo "${ECHO_T}unknown" >&6
4163   fi
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4175 do
4176 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4177 echo "$as_me:$LINENO: checking for $ac_func" >&5
4178 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4179 if eval "test \"\${$as_ac_var+set}\" = set"; then
4180   echo $ECHO_N "(cached) $ECHO_C" >&6
4181 else
4182   cat >conftest.$ac_ext <<_ACEOF
4183 #line $LINENO "configure"
4184 #include "confdefs.h"
4185 /* System header to define __stub macros and hopefully few prototypes,
4186     which can conflict with char $ac_func (); below.  */
4187 #include <assert.h>
4188 /* Override any gcc2 internal prototype to avoid an error.  */
4189 #ifdef __cplusplus
4190 extern "C"
4191 #endif
4192 /* We use char because int might match the return type of a gcc2
4193    builtin and then its argument prototype would still apply.  */
4194 char $ac_func ();
4195 char (*f) ();
4196
4197 #ifdef F77_DUMMY_MAIN
4198 #  ifdef __cplusplus
4199      extern "C"
4200 #  endif
4201    int F77_DUMMY_MAIN() { return 1; }
4202 #endif
4203 int
4204 main ()
4205 {
4206 /* The GNU C library defines this for functions which it implements
4207     to always fail with ENOSYS.  Some functions are actually named
4208     something starting with __ and the normal name is an alias.  */
4209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4210 choke me
4211 #else
4212 f = $ac_func;
4213 #endif
4214
4215   ;
4216   return 0;
4217 }
4218 _ACEOF
4219 rm -f conftest.$ac_objext conftest$ac_exeext
4220 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4221   (eval $ac_link) 2>&5
4222   ac_status=$?
4223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4224   (exit $ac_status); } &&
4225          { ac_try='test -s conftest$ac_exeext'
4226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4227   (eval $ac_try) 2>&5
4228   ac_status=$?
4229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4230   (exit $ac_status); }; }; then
4231   eval "$as_ac_var=yes"
4232 else
4233   echo "$as_me: failed program was:" >&5
4234 cat conftest.$ac_ext >&5
4235 eval "$as_ac_var=no"
4236 fi
4237 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4238 fi
4239 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4240 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4241 if test `eval echo '${'$as_ac_var'}'` = yes; then
4242   cat >>confdefs.h <<_ACEOF
4243 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4244 _ACEOF
4245
4246 fi
4247 done
4248
4249
4250
4251
4252
4253
4254 for ac_func in sigaction syslog realpath setrlimit
4255 do
4256 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4257 echo "$as_me:$LINENO: checking for $ac_func" >&5
4258 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4259 if eval "test \"\${$as_ac_var+set}\" = set"; then
4260   echo $ECHO_N "(cached) $ECHO_C" >&6
4261 else
4262   cat >conftest.$ac_ext <<_ACEOF
4263 #line $LINENO "configure"
4264 #include "confdefs.h"
4265 /* System header to define __stub macros and hopefully few prototypes,
4266     which can conflict with char $ac_func (); below.  */
4267 #include <assert.h>
4268 /* Override any gcc2 internal prototype to avoid an error.  */
4269 #ifdef __cplusplus
4270 extern "C"
4271 #endif
4272 /* We use char because int might match the return type of a gcc2
4273    builtin and then its argument prototype would still apply.  */
4274 char $ac_func ();
4275 char (*f) ();
4276
4277 #ifdef F77_DUMMY_MAIN
4278 #  ifdef __cplusplus
4279      extern "C"
4280 #  endif
4281    int F77_DUMMY_MAIN() { return 1; }
4282 #endif
4283 int
4284 main ()
4285 {
4286 /* The GNU C library defines this for functions which it implements
4287     to always fail with ENOSYS.  Some functions are actually named
4288     something starting with __ and the normal name is an alias.  */
4289 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4290 choke me
4291 #else
4292 f = $ac_func;
4293 #endif
4294
4295   ;
4296   return 0;
4297 }
4298 _ACEOF
4299 rm -f conftest.$ac_objext conftest$ac_exeext
4300 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4301   (eval $ac_link) 2>&5
4302   ac_status=$?
4303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4304   (exit $ac_status); } &&
4305          { ac_try='test -s conftest$ac_exeext'
4306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4307   (eval $ac_try) 2>&5
4308   ac_status=$?
4309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4310   (exit $ac_status); }; }; then
4311   eval "$as_ac_var=yes"
4312 else
4313   echo "$as_me: failed program was:" >&5
4314 cat conftest.$ac_ext >&5
4315 eval "$as_ac_var=no"
4316 fi
4317 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4318 fi
4319 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4320 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4321 if test `eval echo '${'$as_ac_var'}'` = yes; then
4322   cat >>confdefs.h <<_ACEOF
4323 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4324 _ACEOF
4325
4326 fi
4327 done
4328
4329 echo "$as_me:$LINENO: checking for struct icmp" >&5
4330 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
4331 if test "${ac_cv_have_icmp+set}" = set; then
4332   echo $ECHO_N "(cached) $ECHO_C" >&6
4333 else
4334   cat >conftest.$ac_ext <<_ACEOF
4335 #line $LINENO "configure"
4336 #include "confdefs.h"
4337 #include <stdlib.h>
4338                    #include <stdio.h>
4339                    #include <math.h>
4340                    #include <unistd.h>
4341                    #include <limits.h>
4342                    #include <signal.h>
4343                    #include <fcntl.h>
4344                    #include <sys/types.h>
4345                    #include <sys/time.h>
4346                    #include <sys/ipc.h>
4347                    #include <sys/shm.h>
4348                    #include <sys/socket.h>
4349                    #include <netinet/in_systm.h>
4350                    #include <netinet/in.h>
4351                    #include <netinet/ip.h>
4352                    #include <netinet/ip_icmp.h>
4353                    #include <netinet/udp.h>
4354                    #include <arpa/inet.h>
4355                    #include <netdb.h>
4356 #ifdef F77_DUMMY_MAIN
4357 #  ifdef __cplusplus
4358      extern "C"
4359 #  endif
4360    int F77_DUMMY_MAIN() { return 1; }
4361 #endif
4362 int
4363 main ()
4364 {
4365 struct icmp i;
4366                    struct sockaddr s;
4367                    struct sockaddr_in si;
4368                    struct ip ip;
4369                    i.icmp_type = ICMP_ECHO;
4370                    i.icmp_code = 0;
4371                    i.icmp_cksum = 0;
4372                    i.icmp_id = 0;
4373                    i.icmp_seq = 0;
4374                    si.sin_family = AF_INET;
4375                    #if defined(__DECC) || defined(_IP_VHL)
4376                    ip.ip_vhl = 0;
4377                    #else
4378                    ip.ip_hl = 0;
4379                    #endif
4380
4381   ;
4382   return 0;
4383 }
4384 _ACEOF
4385 rm -f conftest.$ac_objext
4386 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4387   (eval $ac_compile) 2>&5
4388   ac_status=$?
4389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4390   (exit $ac_status); } &&
4391          { ac_try='test -s conftest.$ac_objext'
4392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4393   (eval $ac_try) 2>&5
4394   ac_status=$?
4395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4396   (exit $ac_status); }; }; then
4397   ac_cv_have_icmp=yes
4398 else
4399   echo "$as_me: failed program was:" >&5
4400 cat conftest.$ac_ext >&5
4401 ac_cv_have_icmp=no
4402 fi
4403 rm -f conftest.$ac_objext conftest.$ac_ext
4404 fi
4405 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
4406 echo "${ECHO_T}$ac_cv_have_icmp" >&6
4407  if test "$ac_cv_have_icmp" = yes ; then
4408    cat >>confdefs.h <<\_ACEOF
4409 #define HAVE_ICMP 1
4410 _ACEOF
4411
4412  fi
4413 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
4414 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
4415 if test "${ac_cv_have_icmphdr+set}" = set; then
4416   echo $ECHO_N "(cached) $ECHO_C" >&6
4417 else
4418   cat >conftest.$ac_ext <<_ACEOF
4419 #line $LINENO "configure"
4420 #include "confdefs.h"
4421 #include <stdlib.h>
4422                    #include <stdio.h>
4423                    #include <math.h>
4424                    #include <unistd.h>
4425                    #include <limits.h>
4426                    #include <signal.h>
4427                    #include <fcntl.h>
4428                    #include <sys/types.h>
4429                    #include <sys/time.h>
4430                    #include <sys/ipc.h>
4431                    #include <sys/shm.h>
4432                    #include <sys/socket.h>
4433                    #include <netinet/in_systm.h>
4434                    #include <netinet/in.h>
4435                    #include <netinet/ip.h>
4436                    #include <netinet/ip_icmp.h>
4437                    #include <netinet/udp.h>
4438                    #include <arpa/inet.h>
4439                    #include <netdb.h>
4440 #ifdef F77_DUMMY_MAIN
4441 #  ifdef __cplusplus
4442      extern "C"
4443 #  endif
4444    int F77_DUMMY_MAIN() { return 1; }
4445 #endif
4446 int
4447 main ()
4448 {
4449 struct icmphdr i;
4450                    struct sockaddr s;
4451                    struct sockaddr_in si;
4452                    struct ip ip;
4453                    i.type = ICMP_ECHO;
4454                    i.code = 0;
4455                    i.checksum = 0;
4456                    i.un.echo.id = 0;
4457                    i.un.echo.sequence = 0;
4458                    si.sin_family = AF_INET;
4459                    ip.ip_hl = 0;
4460   ;
4461   return 0;
4462 }
4463 _ACEOF
4464 rm -f conftest.$ac_objext
4465 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4466   (eval $ac_compile) 2>&5
4467   ac_status=$?
4468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4469   (exit $ac_status); } &&
4470          { ac_try='test -s conftest.$ac_objext'
4471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4472   (eval $ac_try) 2>&5
4473   ac_status=$?
4474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4475   (exit $ac_status); }; }; then
4476   ac_cv_have_icmphdr=yes
4477 else
4478   echo "$as_me: failed program was:" >&5
4479 cat conftest.$ac_ext >&5
4480 ac_cv_have_icmphdr=no
4481 fi
4482 rm -f conftest.$ac_objext conftest.$ac_ext
4483 fi
4484 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
4485 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
4486  if test "$ac_cv_have_icmphdr" = yes ; then
4487    cat >>confdefs.h <<\_ACEOF
4488 #define HAVE_ICMPHDR 1
4489 _ACEOF
4490
4491  fi
4492
4493
4494 for ac_header in crypt.h sys/select.h
4495 do
4496 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4497 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4498   echo "$as_me:$LINENO: checking for $ac_header" >&5
4499 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4500 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4501   echo $ECHO_N "(cached) $ECHO_C" >&6
4502 fi
4503 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4504 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4505 else
4506   # Is the header compilable?
4507 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4508 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4509 cat >conftest.$ac_ext <<_ACEOF
4510 #line $LINENO "configure"
4511 #include "confdefs.h"
4512 $ac_includes_default
4513 #include <$ac_header>
4514 _ACEOF
4515 rm -f conftest.$ac_objext
4516 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4517   (eval $ac_compile) 2>&5
4518   ac_status=$?
4519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4520   (exit $ac_status); } &&
4521          { ac_try='test -s conftest.$ac_objext'
4522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4523   (eval $ac_try) 2>&5
4524   ac_status=$?
4525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4526   (exit $ac_status); }; }; then
4527   ac_header_compiler=yes
4528 else
4529   echo "$as_me: failed program was:" >&5
4530 cat conftest.$ac_ext >&5
4531 ac_header_compiler=no
4532 fi
4533 rm -f conftest.$ac_objext conftest.$ac_ext
4534 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4535 echo "${ECHO_T}$ac_header_compiler" >&6
4536
4537 # Is the header present?
4538 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4539 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4540 cat >conftest.$ac_ext <<_ACEOF
4541 #line $LINENO "configure"
4542 #include "confdefs.h"
4543 #include <$ac_header>
4544 _ACEOF
4545 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4546   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4547   ac_status=$?
4548   egrep -v '^ *\+' conftest.er1 >conftest.err
4549   rm -f conftest.er1
4550   cat conftest.err >&5
4551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4552   (exit $ac_status); } >/dev/null; then
4553   if test -s conftest.err; then
4554     ac_cpp_err=$ac_c_preproc_warn_flag
4555   else
4556     ac_cpp_err=
4557   fi
4558 else
4559   ac_cpp_err=yes
4560 fi
4561 if test -z "$ac_cpp_err"; then
4562   ac_header_preproc=yes
4563 else
4564   echo "$as_me: failed program was:" >&5
4565   cat conftest.$ac_ext >&5
4566   ac_header_preproc=no
4567 fi
4568 rm -f conftest.err conftest.$ac_ext
4569 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4570 echo "${ECHO_T}$ac_header_preproc" >&6
4571
4572 # So?  What about this header?
4573 case $ac_header_compiler:$ac_header_preproc in
4574   yes:no )
4575     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4576 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4577     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4578 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4579   no:yes )
4580     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4581 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4582     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4583 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4584     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4585 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4586 esac
4587 echo "$as_me:$LINENO: checking for $ac_header" >&5
4588 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4589 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4590   echo $ECHO_N "(cached) $ECHO_C" >&6
4591 else
4592   eval "$as_ac_Header=$ac_header_preproc"
4593 fi
4594 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4595 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4596
4597 fi
4598 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4599   cat >>confdefs.h <<_ACEOF
4600 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4601 _ACEOF
4602
4603 fi
4604
4605 done
4606
4607 for ac_prog in perl5 perl
4608 do
4609   # Extract the first word of "$ac_prog", so it can be a program name with args.
4610 set dummy $ac_prog; ac_word=$2
4611 echo "$as_me:$LINENO: checking for $ac_word" >&5
4612 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4613 if test "${ac_cv_path_PERL+set}" = set; then
4614   echo $ECHO_N "(cached) $ECHO_C" >&6
4615 else
4616   case $PERL in
4617   [\\/]* | ?:[\\/]*)
4618   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4619   ;;
4620   *)
4621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4622 for as_dir in $PATH
4623 do
4624   IFS=$as_save_IFS
4625   test -z "$as_dir" && as_dir=.
4626   for ac_exec_ext in '' $ac_executable_extensions; do
4627   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4628     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4629     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4630     break 2
4631   fi
4632 done
4633 done
4634
4635   ;;
4636 esac
4637 fi
4638 PERL=$ac_cv_path_PERL
4639
4640 if test -n "$PERL"; then
4641   echo "$as_me:$LINENO: result: $PERL" >&5
4642 echo "${ECHO_T}$PERL" >&6
4643 else
4644   echo "$as_me:$LINENO: result: no" >&5
4645 echo "${ECHO_T}no" >&6
4646 fi
4647
4648   test -n "$PERL" && break
4649 done
4650
4651   if test -z "$PERL" ; then
4652     PERL_VERSION=0
4653   else
4654     echo "$as_me:$LINENO: checking perl version" >&5
4655 echo $ECHO_N "checking perl version... $ECHO_C" >&6
4656 if test "${ac_cv_perl_version+set}" = set; then
4657   echo $ECHO_N "(cached) $ECHO_C" >&6
4658 else
4659   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
4660 fi
4661 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
4662 echo "${ECHO_T}$ac_cv_perl_version" >&6
4663     PERL_VERSION=$ac_cv_perl_version
4664   fi
4665
4666
4667 if test -z "$PERL" ; then
4668   # don't let it be blank...
4669   PERL=/usr/bin/perl
4670 fi
4671
4672 echo "$as_me:$LINENO: checking for X" >&5
4673 echo $ECHO_N "checking for X... $ECHO_C" >&6
4674
4675
4676 # Check whether --with-x or --without-x was given.
4677 if test "${with_x+set}" = set; then
4678   withval="$with_x"
4679
4680 fi;
4681 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4682 if test "x$with_x" = xno; then
4683   # The user explicitly disabled X.
4684   have_x=disabled
4685 else
4686   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4687     # Both variables are already set.
4688     have_x=yes
4689   else
4690     if test "${ac_cv_have_x+set}" = set; then
4691   echo $ECHO_N "(cached) $ECHO_C" >&6
4692 else
4693   # One or both of the vars are not set, and there is no cached value.
4694 ac_x_includes=no ac_x_libraries=no
4695 rm -fr conftest.dir
4696 if mkdir conftest.dir; then
4697   cd conftest.dir
4698   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4699   cat >Imakefile <<'_ACEOF'
4700 acfindx:
4701         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4702 _ACEOF
4703   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4704     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4705     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4706     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4707     for ac_extension in a so sl; do
4708       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4709          test -f $ac_im_libdir/libX11.$ac_extension; then
4710         ac_im_usrlibdir=$ac_im_libdir; break
4711       fi
4712     done
4713     # Screen out bogus values from the imake configuration.  They are
4714     # bogus both because they are the default anyway, and because
4715     # using them would break gcc on systems where it needs fixed includes.
4716     case $ac_im_incroot in
4717         /usr/include) ;;
4718         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4719     esac
4720     case $ac_im_usrlibdir in
4721         /usr/lib | /lib) ;;
4722         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4723     esac
4724   fi
4725   cd ..
4726   rm -fr conftest.dir
4727 fi
4728
4729 # Standard set of common directories for X headers.
4730 # Check X11 before X11Rn because it is often a symlink to the current release.
4731 ac_x_header_dirs='
4732 /usr/X11/include
4733 /usr/X11R6/include
4734 /usr/X11R5/include
4735 /usr/X11R4/include
4736
4737 /usr/include/X11
4738 /usr/include/X11R6
4739 /usr/include/X11R5
4740 /usr/include/X11R4
4741
4742 /usr/local/X11/include
4743 /usr/local/X11R6/include
4744 /usr/local/X11R5/include
4745 /usr/local/X11R4/include
4746
4747 /usr/local/include/X11
4748 /usr/local/include/X11R6
4749 /usr/local/include/X11R5
4750 /usr/local/include/X11R4
4751
4752 /usr/X386/include
4753 /usr/x386/include
4754 /usr/XFree86/include/X11
4755
4756 /usr/include
4757 /usr/local/include
4758 /usr/unsupported/include
4759 /usr/athena/include
4760 /usr/local/x11r5/include
4761 /usr/lpp/Xamples/include
4762
4763 /usr/openwin/include
4764 /usr/openwin/share/include'
4765
4766 if test "$ac_x_includes" = no; then
4767   # Guess where to find include files, by looking for Intrinsic.h.
4768   # First, try using that file with no special directory specified.
4769   cat >conftest.$ac_ext <<_ACEOF
4770 #line $LINENO "configure"
4771 #include "confdefs.h"
4772 #include <X11/Intrinsic.h>
4773 _ACEOF
4774 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4775   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4776   ac_status=$?
4777   egrep -v '^ *\+' conftest.er1 >conftest.err
4778   rm -f conftest.er1
4779   cat conftest.err >&5
4780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4781   (exit $ac_status); } >/dev/null; then
4782   if test -s conftest.err; then
4783     ac_cpp_err=$ac_c_preproc_warn_flag
4784   else
4785     ac_cpp_err=
4786   fi
4787 else
4788   ac_cpp_err=yes
4789 fi
4790 if test -z "$ac_cpp_err"; then
4791   # We can compile using X headers with no special include directory.
4792 ac_x_includes=
4793 else
4794   echo "$as_me: failed program was:" >&5
4795   cat conftest.$ac_ext >&5
4796   for ac_dir in $ac_x_header_dirs; do
4797   if test -r "$ac_dir/X11/Intrinsic.h"; then
4798     ac_x_includes=$ac_dir
4799     break
4800   fi
4801 done
4802 fi
4803 rm -f conftest.err conftest.$ac_ext
4804 fi # $ac_x_includes = no
4805
4806 if test "$ac_x_libraries" = no; then
4807   # Check for the libraries.
4808   # See if we find them without any special options.
4809   # Don't add to $LIBS permanently.
4810   ac_save_LIBS=$LIBS
4811   LIBS="-lXt $LIBS"
4812   cat >conftest.$ac_ext <<_ACEOF
4813 #line $LINENO "configure"
4814 #include "confdefs.h"
4815 #include <X11/Intrinsic.h>
4816 #ifdef F77_DUMMY_MAIN
4817 #  ifdef __cplusplus
4818      extern "C"
4819 #  endif
4820    int F77_DUMMY_MAIN() { return 1; }
4821 #endif
4822 int
4823 main ()
4824 {
4825 XtMalloc (0)
4826   ;
4827   return 0;
4828 }
4829 _ACEOF
4830 rm -f conftest.$ac_objext conftest$ac_exeext
4831 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4832   (eval $ac_link) 2>&5
4833   ac_status=$?
4834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4835   (exit $ac_status); } &&
4836          { ac_try='test -s conftest$ac_exeext'
4837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4838   (eval $ac_try) 2>&5
4839   ac_status=$?
4840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4841   (exit $ac_status); }; }; then
4842   LIBS=$ac_save_LIBS
4843 # We can link X programs with no special library path.
4844 ac_x_libraries=
4845 else
4846   echo "$as_me: failed program was:" >&5
4847 cat conftest.$ac_ext >&5
4848 LIBS=$ac_save_LIBS
4849 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
4850 do
4851   # Don't even attempt the hair of trying to link an X program!
4852   for ac_extension in a so sl; do
4853     if test -r $ac_dir/libXt.$ac_extension; then
4854       ac_x_libraries=$ac_dir
4855       break 2
4856     fi
4857   done
4858 done
4859 fi
4860 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4861 fi # $ac_x_libraries = no
4862
4863 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
4864   # Didn't find X anywhere.  Cache the known absence of X.
4865   ac_cv_have_x="have_x=no"
4866 else
4867   # Record where we found X for the cache.
4868   ac_cv_have_x="have_x=yes \
4869                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4870 fi
4871 fi
4872
4873   fi
4874   eval "$ac_cv_have_x"
4875 fi # $with_x != no
4876
4877 if test "$have_x" != yes; then
4878   echo "$as_me:$LINENO: result: $have_x" >&5
4879 echo "${ECHO_T}$have_x" >&6
4880   no_x=yes
4881 else
4882   # If each of the values was on the command line, it overrides each guess.
4883   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4884   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4885   # Update the cache value to reflect the command line values.
4886   ac_cv_have_x="have_x=yes \
4887                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4888   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
4889 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
4890 fi
4891
4892 if test "$no_x" = yes; then
4893   # Not all programs may use this symbol, but it does not hurt to define it.
4894
4895 cat >>confdefs.h <<\_ACEOF
4896 #define X_DISPLAY_MISSING 1
4897 _ACEOF
4898
4899   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4900 else
4901   if test -n "$x_includes"; then
4902     X_CFLAGS="$X_CFLAGS -I$x_includes"
4903   fi
4904
4905   # It would also be nice to do this for all -L options, not just this one.
4906   if test -n "$x_libraries"; then
4907     X_LIBS="$X_LIBS -L$x_libraries"
4908     # For Solaris; some versions of Sun CC require a space after -R and
4909     # others require no space.  Words are not sufficient . . . .
4910     case `(uname -sr) 2>/dev/null` in
4911     "SunOS 5"*)
4912       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
4913 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
4914       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
4915       cat >conftest.$ac_ext <<_ACEOF
4916 #line $LINENO "configure"
4917 #include "confdefs.h"
4918
4919 #ifdef F77_DUMMY_MAIN
4920 #  ifdef __cplusplus
4921      extern "C"
4922 #  endif
4923    int F77_DUMMY_MAIN() { return 1; }
4924 #endif
4925 int
4926 main ()
4927 {
4928
4929   ;
4930   return 0;
4931 }
4932 _ACEOF
4933 rm -f conftest.$ac_objext conftest$ac_exeext
4934 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4935   (eval $ac_link) 2>&5
4936   ac_status=$?
4937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4938   (exit $ac_status); } &&
4939          { ac_try='test -s conftest$ac_exeext'
4940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4941   (eval $ac_try) 2>&5
4942   ac_status=$?
4943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4944   (exit $ac_status); }; }; then
4945   ac_R_nospace=yes
4946 else
4947   echo "$as_me: failed program was:" >&5
4948 cat conftest.$ac_ext >&5
4949 ac_R_nospace=no
4950 fi
4951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4952       if test $ac_R_nospace = yes; then
4953         echo "$as_me:$LINENO: result: no" >&5
4954 echo "${ECHO_T}no" >&6
4955         X_LIBS="$X_LIBS -R$x_libraries"
4956       else
4957         LIBS="$ac_xsave_LIBS -R $x_libraries"
4958         cat >conftest.$ac_ext <<_ACEOF
4959 #line $LINENO "configure"
4960 #include "confdefs.h"
4961
4962 #ifdef F77_DUMMY_MAIN
4963 #  ifdef __cplusplus
4964      extern "C"
4965 #  endif
4966    int F77_DUMMY_MAIN() { return 1; }
4967 #endif
4968 int
4969 main ()
4970 {
4971
4972   ;
4973   return 0;
4974 }
4975 _ACEOF
4976 rm -f conftest.$ac_objext conftest$ac_exeext
4977 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4978   (eval $ac_link) 2>&5
4979   ac_status=$?
4980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4981   (exit $ac_status); } &&
4982          { ac_try='test -s conftest$ac_exeext'
4983   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4984   (eval $ac_try) 2>&5
4985   ac_status=$?
4986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4987   (exit $ac_status); }; }; then
4988   ac_R_space=yes
4989 else
4990   echo "$as_me: failed program was:" >&5
4991 cat conftest.$ac_ext >&5
4992 ac_R_space=no
4993 fi
4994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4995         if test $ac_R_space = yes; then
4996           echo "$as_me:$LINENO: result: yes" >&5
4997 echo "${ECHO_T}yes" >&6
4998           X_LIBS="$X_LIBS -R $x_libraries"
4999         else
5000           echo "$as_me:$LINENO: result: neither works" >&5
5001 echo "${ECHO_T}neither works" >&6
5002         fi
5003       fi
5004       LIBS=$ac_xsave_LIBS
5005     esac
5006   fi
5007
5008   # Check for system-dependent libraries X programs must link with.
5009   # Do this before checking for the system-independent R6 libraries
5010   # (-lICE), since we may need -lsocket or whatever for X linking.
5011
5012   if test "$ISC" = yes; then
5013     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5014   else
5015     # Martyn Johnson says this is needed for Ultrix, if the X
5016     # libraries were built with DECnet support.  And Karl Berry says
5017     # the Alpha needs dnet_stub (dnet does not exist).
5018     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5019     cat >conftest.$ac_ext <<_ACEOF
5020 #line $LINENO "configure"
5021 #include "confdefs.h"
5022
5023 /* Override any gcc2 internal prototype to avoid an error.  */
5024 #ifdef __cplusplus
5025 extern "C"
5026 #endif
5027 /* We use char because int might match the return type of a gcc2
5028    builtin and then its argument prototype would still apply.  */
5029 char XOpenDisplay ();
5030 #ifdef F77_DUMMY_MAIN
5031 #  ifdef __cplusplus
5032      extern "C"
5033 #  endif
5034    int F77_DUMMY_MAIN() { return 1; }
5035 #endif
5036 int
5037 main ()
5038 {
5039 XOpenDisplay ();
5040   ;
5041   return 0;
5042 }
5043 _ACEOF
5044 rm -f conftest.$ac_objext conftest$ac_exeext
5045 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5046   (eval $ac_link) 2>&5
5047   ac_status=$?
5048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5049   (exit $ac_status); } &&
5050          { ac_try='test -s conftest$ac_exeext'
5051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5052   (eval $ac_try) 2>&5
5053   ac_status=$?
5054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5055   (exit $ac_status); }; }; then
5056   :
5057 else
5058   echo "$as_me: failed program was:" >&5
5059 cat conftest.$ac_ext >&5
5060 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5061 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5062 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5063   echo $ECHO_N "(cached) $ECHO_C" >&6
5064 else
5065   ac_check_lib_save_LIBS=$LIBS
5066 LIBS="-ldnet  $LIBS"
5067 cat >conftest.$ac_ext <<_ACEOF
5068 #line $LINENO "configure"
5069 #include "confdefs.h"
5070
5071 /* Override any gcc2 internal prototype to avoid an error.  */
5072 #ifdef __cplusplus
5073 extern "C"
5074 #endif
5075 /* We use char because int might match the return type of a gcc2
5076    builtin and then its argument prototype would still apply.  */
5077 char dnet_ntoa ();
5078 #ifdef F77_DUMMY_MAIN
5079 #  ifdef __cplusplus
5080      extern "C"
5081 #  endif
5082    int F77_DUMMY_MAIN() { return 1; }
5083 #endif
5084 int
5085 main ()
5086 {
5087 dnet_ntoa ();
5088   ;
5089   return 0;
5090 }
5091 _ACEOF
5092 rm -f conftest.$ac_objext conftest$ac_exeext
5093 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5094   (eval $ac_link) 2>&5
5095   ac_status=$?
5096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5097   (exit $ac_status); } &&
5098          { ac_try='test -s conftest$ac_exeext'
5099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5100   (eval $ac_try) 2>&5
5101   ac_status=$?
5102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5103   (exit $ac_status); }; }; then
5104   ac_cv_lib_dnet_dnet_ntoa=yes
5105 else
5106   echo "$as_me: failed program was:" >&5
5107 cat conftest.$ac_ext >&5
5108 ac_cv_lib_dnet_dnet_ntoa=no
5109 fi
5110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5111 LIBS=$ac_check_lib_save_LIBS
5112 fi
5113 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5114 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5115 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5116   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5117 fi
5118
5119     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5120       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5121 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5122 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5123   echo $ECHO_N "(cached) $ECHO_C" >&6
5124 else
5125   ac_check_lib_save_LIBS=$LIBS
5126 LIBS="-ldnet_stub  $LIBS"
5127 cat >conftest.$ac_ext <<_ACEOF
5128 #line $LINENO "configure"
5129 #include "confdefs.h"
5130
5131 /* Override any gcc2 internal prototype to avoid an error.  */
5132 #ifdef __cplusplus
5133 extern "C"
5134 #endif
5135 /* We use char because int might match the return type of a gcc2
5136    builtin and then its argument prototype would still apply.  */
5137 char dnet_ntoa ();
5138 #ifdef F77_DUMMY_MAIN
5139 #  ifdef __cplusplus
5140      extern "C"
5141 #  endif
5142    int F77_DUMMY_MAIN() { return 1; }
5143 #endif
5144 int
5145 main ()
5146 {
5147 dnet_ntoa ();
5148   ;
5149   return 0;
5150 }
5151 _ACEOF
5152 rm -f conftest.$ac_objext conftest$ac_exeext
5153 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5154   (eval $ac_link) 2>&5
5155   ac_status=$?
5156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5157   (exit $ac_status); } &&
5158          { ac_try='test -s conftest$ac_exeext'
5159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5160   (eval $ac_try) 2>&5
5161   ac_status=$?
5162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5163   (exit $ac_status); }; }; then
5164   ac_cv_lib_dnet_stub_dnet_ntoa=yes
5165 else
5166   echo "$as_me: failed program was:" >&5
5167 cat conftest.$ac_ext >&5
5168 ac_cv_lib_dnet_stub_dnet_ntoa=no
5169 fi
5170 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5171 LIBS=$ac_check_lib_save_LIBS
5172 fi
5173 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5174 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5175 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5176   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5177 fi
5178
5179     fi
5180 fi
5181 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5182     LIBS="$ac_xsave_LIBS"
5183
5184     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5185     # to get the SysV transport functions.
5186     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5187     # needs -lnsl.
5188     # The nsl library prevents programs from opening the X display
5189     # on Irix 5.2, according to T.E. Dickey.
5190     # The functions gethostbyname, getservbyname, and inet_addr are
5191     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5192     echo "$as_me:$LINENO: checking for gethostbyname" >&5
5193 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5194 if test "${ac_cv_func_gethostbyname+set}" = set; then
5195   echo $ECHO_N "(cached) $ECHO_C" >&6
5196 else
5197   cat >conftest.$ac_ext <<_ACEOF
5198 #line $LINENO "configure"
5199 #include "confdefs.h"
5200 /* System header to define __stub macros and hopefully few prototypes,
5201     which can conflict with char gethostbyname (); below.  */
5202 #include <assert.h>
5203 /* Override any gcc2 internal prototype to avoid an error.  */
5204 #ifdef __cplusplus
5205 extern "C"
5206 #endif
5207 /* We use char because int might match the return type of a gcc2
5208    builtin and then its argument prototype would still apply.  */
5209 char gethostbyname ();
5210 char (*f) ();
5211
5212 #ifdef F77_DUMMY_MAIN
5213 #  ifdef __cplusplus
5214      extern "C"
5215 #  endif
5216    int F77_DUMMY_MAIN() { return 1; }
5217 #endif
5218 int
5219 main ()
5220 {
5221 /* The GNU C library defines this for functions which it implements
5222     to always fail with ENOSYS.  Some functions are actually named
5223     something starting with __ and the normal name is an alias.  */
5224 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5225 choke me
5226 #else
5227 f = gethostbyname;
5228 #endif
5229
5230   ;
5231   return 0;
5232 }
5233 _ACEOF
5234 rm -f conftest.$ac_objext conftest$ac_exeext
5235 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5236   (eval $ac_link) 2>&5
5237   ac_status=$?
5238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5239   (exit $ac_status); } &&
5240          { ac_try='test -s conftest$ac_exeext'
5241   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5242   (eval $ac_try) 2>&5
5243   ac_status=$?
5244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5245   (exit $ac_status); }; }; then
5246   ac_cv_func_gethostbyname=yes
5247 else
5248   echo "$as_me: failed program was:" >&5
5249 cat conftest.$ac_ext >&5
5250 ac_cv_func_gethostbyname=no
5251 fi
5252 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5253 fi
5254 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5255 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5256
5257     if test $ac_cv_func_gethostbyname = no; then
5258       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5259 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5260 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5261   echo $ECHO_N "(cached) $ECHO_C" >&6
5262 else
5263   ac_check_lib_save_LIBS=$LIBS
5264 LIBS="-lnsl  $LIBS"
5265 cat >conftest.$ac_ext <<_ACEOF
5266 #line $LINENO "configure"
5267 #include "confdefs.h"
5268
5269 /* Override any gcc2 internal prototype to avoid an error.  */
5270 #ifdef __cplusplus
5271 extern "C"
5272 #endif
5273 /* We use char because int might match the return type of a gcc2
5274    builtin and then its argument prototype would still apply.  */
5275 char gethostbyname ();
5276 #ifdef F77_DUMMY_MAIN
5277 #  ifdef __cplusplus
5278      extern "C"
5279 #  endif
5280    int F77_DUMMY_MAIN() { return 1; }
5281 #endif
5282 int
5283 main ()
5284 {
5285 gethostbyname ();
5286   ;
5287   return 0;
5288 }
5289 _ACEOF
5290 rm -f conftest.$ac_objext conftest$ac_exeext
5291 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5292   (eval $ac_link) 2>&5
5293   ac_status=$?
5294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5295   (exit $ac_status); } &&
5296          { ac_try='test -s conftest$ac_exeext'
5297   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5298   (eval $ac_try) 2>&5
5299   ac_status=$?
5300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5301   (exit $ac_status); }; }; then
5302   ac_cv_lib_nsl_gethostbyname=yes
5303 else
5304   echo "$as_me: failed program was:" >&5
5305 cat conftest.$ac_ext >&5
5306 ac_cv_lib_nsl_gethostbyname=no
5307 fi
5308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5309 LIBS=$ac_check_lib_save_LIBS
5310 fi
5311 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5312 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5313 if test $ac_cv_lib_nsl_gethostbyname = yes; then
5314   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5315 fi
5316
5317       if test $ac_cv_lib_nsl_gethostbyname = no; then
5318         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5319 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5320 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5321   echo $ECHO_N "(cached) $ECHO_C" >&6
5322 else
5323   ac_check_lib_save_LIBS=$LIBS
5324 LIBS="-lbsd  $LIBS"
5325 cat >conftest.$ac_ext <<_ACEOF
5326 #line $LINENO "configure"
5327 #include "confdefs.h"
5328
5329 /* Override any gcc2 internal prototype to avoid an error.  */
5330 #ifdef __cplusplus
5331 extern "C"
5332 #endif
5333 /* We use char because int might match the return type of a gcc2
5334    builtin and then its argument prototype would still apply.  */
5335 char gethostbyname ();
5336 #ifdef F77_DUMMY_MAIN
5337 #  ifdef __cplusplus
5338      extern "C"
5339 #  endif
5340    int F77_DUMMY_MAIN() { return 1; }
5341 #endif
5342 int
5343 main ()
5344 {
5345 gethostbyname ();
5346   ;
5347   return 0;
5348 }
5349 _ACEOF
5350 rm -f conftest.$ac_objext conftest$ac_exeext
5351 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5352   (eval $ac_link) 2>&5
5353   ac_status=$?
5354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5355   (exit $ac_status); } &&
5356          { ac_try='test -s conftest$ac_exeext'
5357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5358   (eval $ac_try) 2>&5
5359   ac_status=$?
5360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5361   (exit $ac_status); }; }; then
5362   ac_cv_lib_bsd_gethostbyname=yes
5363 else
5364   echo "$as_me: failed program was:" >&5
5365 cat conftest.$ac_ext >&5
5366 ac_cv_lib_bsd_gethostbyname=no
5367 fi
5368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5369 LIBS=$ac_check_lib_save_LIBS
5370 fi
5371 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
5372 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
5373 if test $ac_cv_lib_bsd_gethostbyname = yes; then
5374   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5375 fi
5376
5377       fi
5378     fi
5379
5380     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5381     # socket/setsockopt and other routines are undefined under SCO ODT
5382     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5383     # on later versions), says Simon Leinen: it contains gethostby*
5384     # variants that don't use the nameserver (or something).  -lsocket
5385     # must be given before -lnsl if both are needed.  We assume that
5386     # if connect needs -lnsl, so does gethostbyname.
5387     echo "$as_me:$LINENO: checking for connect" >&5
5388 echo $ECHO_N "checking for connect... $ECHO_C" >&6
5389 if test "${ac_cv_func_connect+set}" = set; then
5390   echo $ECHO_N "(cached) $ECHO_C" >&6
5391 else
5392   cat >conftest.$ac_ext <<_ACEOF
5393 #line $LINENO "configure"
5394 #include "confdefs.h"
5395 /* System header to define __stub macros and hopefully few prototypes,
5396     which can conflict with char connect (); below.  */
5397 #include <assert.h>
5398 /* Override any gcc2 internal prototype to avoid an error.  */
5399 #ifdef __cplusplus
5400 extern "C"
5401 #endif
5402 /* We use char because int might match the return type of a gcc2
5403    builtin and then its argument prototype would still apply.  */
5404 char connect ();
5405 char (*f) ();
5406
5407 #ifdef F77_DUMMY_MAIN
5408 #  ifdef __cplusplus
5409      extern "C"
5410 #  endif
5411    int F77_DUMMY_MAIN() { return 1; }
5412 #endif
5413 int
5414 main ()
5415 {
5416 /* The GNU C library defines this for functions which it implements
5417     to always fail with ENOSYS.  Some functions are actually named
5418     something starting with __ and the normal name is an alias.  */
5419 #if defined (__stub_connect) || defined (__stub___connect)
5420 choke me
5421 #else
5422 f = connect;
5423 #endif
5424
5425   ;
5426   return 0;
5427 }
5428 _ACEOF
5429 rm -f conftest.$ac_objext conftest$ac_exeext
5430 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5431   (eval $ac_link) 2>&5
5432   ac_status=$?
5433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5434   (exit $ac_status); } &&
5435          { ac_try='test -s conftest$ac_exeext'
5436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5437   (eval $ac_try) 2>&5
5438   ac_status=$?
5439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5440   (exit $ac_status); }; }; then
5441   ac_cv_func_connect=yes
5442 else
5443   echo "$as_me: failed program was:" >&5
5444 cat conftest.$ac_ext >&5
5445 ac_cv_func_connect=no
5446 fi
5447 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5448 fi
5449 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5450 echo "${ECHO_T}$ac_cv_func_connect" >&6
5451
5452     if test $ac_cv_func_connect = no; then
5453       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
5454 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
5455 if test "${ac_cv_lib_socket_connect+set}" = set; then
5456   echo $ECHO_N "(cached) $ECHO_C" >&6
5457 else
5458   ac_check_lib_save_LIBS=$LIBS
5459 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5460 cat >conftest.$ac_ext <<_ACEOF
5461 #line $LINENO "configure"
5462 #include "confdefs.h"
5463
5464 /* Override any gcc2 internal prototype to avoid an error.  */
5465 #ifdef __cplusplus
5466 extern "C"
5467 #endif
5468 /* We use char because int might match the return type of a gcc2
5469    builtin and then its argument prototype would still apply.  */
5470 char connect ();
5471 #ifdef F77_DUMMY_MAIN
5472 #  ifdef __cplusplus
5473      extern "C"
5474 #  endif
5475    int F77_DUMMY_MAIN() { return 1; }
5476 #endif
5477 int
5478 main ()
5479 {
5480 connect ();
5481   ;
5482   return 0;
5483 }
5484 _ACEOF
5485 rm -f conftest.$ac_objext conftest$ac_exeext
5486 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5487   (eval $ac_link) 2>&5
5488   ac_status=$?
5489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5490   (exit $ac_status); } &&
5491          { ac_try='test -s conftest$ac_exeext'
5492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5493   (eval $ac_try) 2>&5
5494   ac_status=$?
5495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5496   (exit $ac_status); }; }; then
5497   ac_cv_lib_socket_connect=yes
5498 else
5499   echo "$as_me: failed program was:" >&5
5500 cat conftest.$ac_ext >&5
5501 ac_cv_lib_socket_connect=no
5502 fi
5503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5504 LIBS=$ac_check_lib_save_LIBS
5505 fi
5506 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
5507 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
5508 if test $ac_cv_lib_socket_connect = yes; then
5509   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5510 fi
5511
5512     fi
5513
5514     # Guillermo Gomez says -lposix is necessary on A/UX.
5515     echo "$as_me:$LINENO: checking for remove" >&5
5516 echo $ECHO_N "checking for remove... $ECHO_C" >&6
5517 if test "${ac_cv_func_remove+set}" = set; then
5518   echo $ECHO_N "(cached) $ECHO_C" >&6
5519 else
5520   cat >conftest.$ac_ext <<_ACEOF
5521 #line $LINENO "configure"
5522 #include "confdefs.h"
5523 /* System header to define __stub macros and hopefully few prototypes,
5524     which can conflict with char remove (); below.  */
5525 #include <assert.h>
5526 /* Override any gcc2 internal prototype to avoid an error.  */
5527 #ifdef __cplusplus
5528 extern "C"
5529 #endif
5530 /* We use char because int might match the return type of a gcc2
5531    builtin and then its argument prototype would still apply.  */
5532 char remove ();
5533 char (*f) ();
5534
5535 #ifdef F77_DUMMY_MAIN
5536 #  ifdef __cplusplus
5537      extern "C"
5538 #  endif
5539    int F77_DUMMY_MAIN() { return 1; }
5540 #endif
5541 int
5542 main ()
5543 {
5544 /* The GNU C library defines this for functions which it implements
5545     to always fail with ENOSYS.  Some functions are actually named
5546     something starting with __ and the normal name is an alias.  */
5547 #if defined (__stub_remove) || defined (__stub___remove)
5548 choke me
5549 #else
5550 f = remove;
5551 #endif
5552
5553   ;
5554   return 0;
5555 }
5556 _ACEOF
5557 rm -f conftest.$ac_objext conftest$ac_exeext
5558 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5559   (eval $ac_link) 2>&5
5560   ac_status=$?
5561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5562   (exit $ac_status); } &&
5563          { ac_try='test -s conftest$ac_exeext'
5564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5565   (eval $ac_try) 2>&5
5566   ac_status=$?
5567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5568   (exit $ac_status); }; }; then
5569   ac_cv_func_remove=yes
5570 else
5571   echo "$as_me: failed program was:" >&5
5572 cat conftest.$ac_ext >&5
5573 ac_cv_func_remove=no
5574 fi
5575 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5576 fi
5577 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
5578 echo "${ECHO_T}$ac_cv_func_remove" >&6
5579
5580     if test $ac_cv_func_remove = no; then
5581       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
5582 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
5583 if test "${ac_cv_lib_posix_remove+set}" = set; then
5584   echo $ECHO_N "(cached) $ECHO_C" >&6
5585 else
5586   ac_check_lib_save_LIBS=$LIBS
5587 LIBS="-lposix  $LIBS"
5588 cat >conftest.$ac_ext <<_ACEOF
5589 #line $LINENO "configure"
5590 #include "confdefs.h"
5591
5592 /* Override any gcc2 internal prototype to avoid an error.  */
5593 #ifdef __cplusplus
5594 extern "C"
5595 #endif
5596 /* We use char because int might match the return type of a gcc2
5597    builtin and then its argument prototype would still apply.  */
5598 char remove ();
5599 #ifdef F77_DUMMY_MAIN
5600 #  ifdef __cplusplus
5601      extern "C"
5602 #  endif
5603    int F77_DUMMY_MAIN() { return 1; }
5604 #endif
5605 int
5606 main ()
5607 {
5608 remove ();
5609   ;
5610   return 0;
5611 }
5612 _ACEOF
5613 rm -f conftest.$ac_objext conftest$ac_exeext
5614 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5615   (eval $ac_link) 2>&5
5616   ac_status=$?
5617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5618   (exit $ac_status); } &&
5619          { ac_try='test -s conftest$ac_exeext'
5620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5621   (eval $ac_try) 2>&5
5622   ac_status=$?
5623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5624   (exit $ac_status); }; }; then
5625   ac_cv_lib_posix_remove=yes
5626 else
5627   echo "$as_me: failed program was:" >&5
5628 cat conftest.$ac_ext >&5
5629 ac_cv_lib_posix_remove=no
5630 fi
5631 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5632 LIBS=$ac_check_lib_save_LIBS
5633 fi
5634 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
5635 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
5636 if test $ac_cv_lib_posix_remove = yes; then
5637   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5638 fi
5639
5640     fi
5641
5642     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5643     echo "$as_me:$LINENO: checking for shmat" >&5
5644 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
5645 if test "${ac_cv_func_shmat+set}" = set; then
5646   echo $ECHO_N "(cached) $ECHO_C" >&6
5647 else
5648   cat >conftest.$ac_ext <<_ACEOF
5649 #line $LINENO "configure"
5650 #include "confdefs.h"
5651 /* System header to define __stub macros and hopefully few prototypes,
5652     which can conflict with char shmat (); below.  */
5653 #include <assert.h>
5654 /* Override any gcc2 internal prototype to avoid an error.  */
5655 #ifdef __cplusplus
5656 extern "C"
5657 #endif
5658 /* We use char because int might match the return type of a gcc2
5659    builtin and then its argument prototype would still apply.  */
5660 char shmat ();
5661 char (*f) ();
5662
5663 #ifdef F77_DUMMY_MAIN
5664 #  ifdef __cplusplus
5665      extern "C"
5666 #  endif
5667    int F77_DUMMY_MAIN() { return 1; }
5668 #endif
5669 int
5670 main ()
5671 {
5672 /* The GNU C library defines this for functions which it implements
5673     to always fail with ENOSYS.  Some functions are actually named
5674     something starting with __ and the normal name is an alias.  */
5675 #if defined (__stub_shmat) || defined (__stub___shmat)
5676 choke me
5677 #else
5678 f = shmat;
5679 #endif
5680
5681   ;
5682   return 0;
5683 }
5684 _ACEOF
5685 rm -f conftest.$ac_objext conftest$ac_exeext
5686 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5687   (eval $ac_link) 2>&5
5688   ac_status=$?
5689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5690   (exit $ac_status); } &&
5691          { ac_try='test -s conftest$ac_exeext'
5692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5693   (eval $ac_try) 2>&5
5694   ac_status=$?
5695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5696   (exit $ac_status); }; }; then
5697   ac_cv_func_shmat=yes
5698 else
5699   echo "$as_me: failed program was:" >&5
5700 cat conftest.$ac_ext >&5
5701 ac_cv_func_shmat=no
5702 fi
5703 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5704 fi
5705 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
5706 echo "${ECHO_T}$ac_cv_func_shmat" >&6
5707
5708     if test $ac_cv_func_shmat = no; then
5709       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
5710 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
5711 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
5712   echo $ECHO_N "(cached) $ECHO_C" >&6
5713 else
5714   ac_check_lib_save_LIBS=$LIBS
5715 LIBS="-lipc  $LIBS"
5716 cat >conftest.$ac_ext <<_ACEOF
5717 #line $LINENO "configure"
5718 #include "confdefs.h"
5719
5720 /* Override any gcc2 internal prototype to avoid an error.  */
5721 #ifdef __cplusplus
5722 extern "C"
5723 #endif
5724 /* We use char because int might match the return type of a gcc2
5725    builtin and then its argument prototype would still apply.  */
5726 char shmat ();
5727 #ifdef F77_DUMMY_MAIN
5728 #  ifdef __cplusplus
5729      extern "C"
5730 #  endif
5731    int F77_DUMMY_MAIN() { return 1; }
5732 #endif
5733 int
5734 main ()
5735 {
5736 shmat ();
5737   ;
5738   return 0;
5739 }
5740 _ACEOF
5741 rm -f conftest.$ac_objext conftest$ac_exeext
5742 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5743   (eval $ac_link) 2>&5
5744   ac_status=$?
5745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5746   (exit $ac_status); } &&
5747          { ac_try='test -s conftest$ac_exeext'
5748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5749   (eval $ac_try) 2>&5
5750   ac_status=$?
5751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5752   (exit $ac_status); }; }; then
5753   ac_cv_lib_ipc_shmat=yes
5754 else
5755   echo "$as_me: failed program was:" >&5
5756 cat conftest.$ac_ext >&5
5757 ac_cv_lib_ipc_shmat=no
5758 fi
5759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5760 LIBS=$ac_check_lib_save_LIBS
5761 fi
5762 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
5763 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
5764 if test $ac_cv_lib_ipc_shmat = yes; then
5765   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5766 fi
5767
5768     fi
5769   fi
5770
5771   # Check for libraries that X11R6 Xt/Xaw programs need.
5772   ac_save_LDFLAGS=$LDFLAGS
5773   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5774   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5775   # check for ICE first), but we must link in the order -lSM -lICE or
5776   # we get undefined symbols.  So assume we have SM if we have ICE.
5777   # These have to be linked with before -lX11, unlike the other
5778   # libraries we check for below, so use a different variable.
5779   # John Interrante, Karl Berry
5780   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
5781 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
5782 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
5783   echo $ECHO_N "(cached) $ECHO_C" >&6
5784 else
5785   ac_check_lib_save_LIBS=$LIBS
5786 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5787 cat >conftest.$ac_ext <<_ACEOF
5788 #line $LINENO "configure"
5789 #include "confdefs.h"
5790
5791 /* Override any gcc2 internal prototype to avoid an error.  */
5792 #ifdef __cplusplus
5793 extern "C"
5794 #endif
5795 /* We use char because int might match the return type of a gcc2
5796    builtin and then its argument prototype would still apply.  */
5797 char IceConnectionNumber ();
5798 #ifdef F77_DUMMY_MAIN
5799 #  ifdef __cplusplus
5800      extern "C"
5801 #  endif
5802    int F77_DUMMY_MAIN() { return 1; }
5803 #endif
5804 int
5805 main ()
5806 {
5807 IceConnectionNumber ();
5808   ;
5809   return 0;
5810 }
5811 _ACEOF
5812 rm -f conftest.$ac_objext conftest$ac_exeext
5813 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5814   (eval $ac_link) 2>&5
5815   ac_status=$?
5816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5817   (exit $ac_status); } &&
5818          { ac_try='test -s conftest$ac_exeext'
5819   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5820   (eval $ac_try) 2>&5
5821   ac_status=$?
5822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5823   (exit $ac_status); }; }; then
5824   ac_cv_lib_ICE_IceConnectionNumber=yes
5825 else
5826   echo "$as_me: failed program was:" >&5
5827 cat conftest.$ac_ext >&5
5828 ac_cv_lib_ICE_IceConnectionNumber=no
5829 fi
5830 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5831 LIBS=$ac_check_lib_save_LIBS
5832 fi
5833 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
5834 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
5835 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
5836   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5837 fi
5838
5839   LDFLAGS=$ac_save_LDFLAGS
5840
5841 fi
5842
5843
5844 if test "$have_x" != yes; then
5845   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
5846 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
5847    { (exit 1); exit 1; }; }
5848 fi
5849
5850
5851     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
5852 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
5853 if test "${ac_cv_x_app_defaults+set}" = set; then
5854   echo $ECHO_N "(cached) $ECHO_C" >&6
5855 else
5856
5857   rm -fr conftestdir
5858   if mkdir conftestdir; then
5859     cd conftestdir 2>/dev/null
5860     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5861     cat > Imakefile <<'EOF'
5862 acfindx:
5863         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
5864 EOF
5865     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
5866       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
5867       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5868     fi
5869     cd .. 2>/dev/null
5870     rm -fr conftestdir
5871   fi
5872       if test x"$ac_x_app_defaults" = x; then
5873
5874   # Look for the directory under a standard set of common directories.
5875   # Check X11 before X11Rn because it's often a symlink to the current release.
5876   for ac_dir in                                 \
5877     /usr/X11/lib/app-defaults                   \
5878     /usr/X11R6/lib/app-defaults                 \
5879     /usr/X11R6/lib/X11/app-defaults             \
5880     /usr/X11R5/lib/app-defaults                 \
5881     /usr/X11R5/lib/X11/app-defaults             \
5882     /usr/X11R4/lib/app-defaults                 \
5883     /usr/X11R4/lib/X11/app-defaults             \
5884                                                 \
5885     /usr/lib/X11/app-defaults                   \
5886     /usr/lib/X11R6/app-defaults                 \
5887     /usr/lib/X11R5/app-defaults                 \
5888     /usr/lib/X11R4/app-defaults                 \
5889                                                 \
5890     /usr/local/X11/lib/app-defaults             \
5891     /usr/local/X11R6/lib/app-defaults           \
5892     /usr/local/X11R5/lib/app-defaults           \
5893     /usr/local/X11R4/lib/app-defaults           \
5894                                                 \
5895     /usr/local/lib/X11/app-defaults             \
5896     /usr/local/lib/X11R6/app-defaults           \
5897     /usr/local/lib/X11R6/X11/app-defaults       \
5898     /usr/local/lib/X11R5/app-defaults           \
5899     /usr/local/lib/X11R5/X11/app-defaults       \
5900     /usr/local/lib/X11R4/app-defaults           \
5901     /usr/local/lib/X11R4/X11/app-defaults       \
5902                                                 \
5903     /usr/X386/lib/X11/app-defaults              \
5904     /usr/x386/lib/X11/app-defaults              \
5905     /usr/XFree86/lib/X11/app-defaults           \
5906                                                 \
5907     /usr/lib/X11/app-defaults                   \
5908     /usr/local/lib/X11/app-defaults             \
5909     /usr/unsupported/lib/X11/app-defaults       \
5910     /usr/athena/lib/X11/app-defaults            \
5911     /usr/local/x11r5/lib/X11/app-defaults       \
5912     /usr/lpp/Xamples/lib/X11/app-defaults       \
5913     /lib/usr/lib/X11/app-defaults               \
5914                                                 \
5915     /usr/openwin/lib/app-defaults               \
5916     /usr/openwin/lib/X11/app-defaults           \
5917     /usr/openwin/share/lib/app-defaults         \
5918     /usr/openwin/share/lib/X11/app-defaults     \
5919                                                 \
5920     /X11R6/lib/app-defaults                     \
5921     /X11R5/lib/app-defaults                     \
5922     /X11R4/lib/app-defaults                     \
5923     ; \
5924   do
5925     if test -d "$ac_dir"; then
5926       ac_x_app_defaults=$ac_dir
5927       break
5928     fi
5929   done
5930
5931       fi
5932       if test x"$ac_x_app_defaults" = x; then
5933         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
5934       else
5935         # Record where we found app-defaults for the cache.
5936         ac_cv_x_app_defaults="$ac_x_app_defaults"
5937       fi
5938 fi
5939 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
5940 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
5941     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
5942 case "$host" in
5943     *-hpux*)
5944
5945       # The following arcana was gleaned from conversations with
5946       # Eric Schwartz <erics@col.hp.com>:
5947       #
5948       # On HPUX 10.x, the parts of X that HP considers "standard" live in
5949       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
5950       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
5951       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
5952       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
5953       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
5954       # you don't need any -I or -L arguments.
5955       #
5956       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
5957       # are the same division as 10.x.  However, there are no symlinks to
5958       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
5959       # arguments are always necessary.
5960       #
5961       # However, X11R6 was available on HPUX 9.x as a patch: if that
5962       # patch was installed, then all of X11R6 went in to
5963       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
5964       #
5965       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
5966       # whether R5 was available as a patch; R6 undoubtedly was not.)
5967       #
5968       # So.  We try and use the highest numbered pair of
5969       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
5970       # that are available.  We do not mix and match different versions
5971       # of X.
5972       #
5973       # Question I still don't know the answer to: (do you?)
5974       #
5975       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
5976       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
5977       #     that contrib directory?  Did it contain so-called "standard"
5978       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
5979       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
5980       #     be a situation where one had to reach into the R5 headers and
5981       #     libs to find Xmu?  That is, must both R6 and R5 directories
5982       #     be on the -I and -L lists in that case?
5983       #
5984       for version in X11R6 X11R5 X11R4 ; do
5985         # if either pair of directories exists...
5986         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
5987         then
5988            # if contrib exists, use it...
5989            if test -d /usr/contrib/$version/include ; then
5990              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
5991              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
5992            fi
5993            # if the "standard" one exists, use it.
5994            if test -d /usr/include/$version ; then
5995              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
5996              X_LIBS="$X_LIBS -L/usr/lib/$version"
5997            fi
5998            # since at least one of the pair exists, go no farther.
5999            break
6000         fi
6001       done
6002
6003       # Now find Motif.  Thanks for not making xmkmf find this by
6004       # default, you losers.
6005       #
6006       if test -d /usr/include/Motif2.1 ; then
6007         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6008         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6009       elif test -d /usr/include/Motif1.2 ; then
6010         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6011         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6012       elif test -d /usr/include/Motif1.1 ; then
6013         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6014         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6015       fi
6016
6017       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6018       #
6019       if test -d /opt/graphics/OpenGL/include ; then
6020         # HP-UX 10.20 puts it here
6021         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6022         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6023       elif test -d /opt/Mesa/lib ; then
6024         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6025         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6026       fi
6027
6028
6029       if test -d /opt/xpm/lib/X11 ; then
6030         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6031         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6032       fi
6033
6034       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6035       # in /usr/local/, unless there is already an xscreensaver in
6036       # /usr/local/bin/.  This can be overridden with the --prefix arg
6037       # to configure.  I'm not sure this is the right thing to do, but
6038       # Richard Lloyd says so...
6039       #
6040       if test \! -x /usr/local/bin/xscreensaver ; then
6041         ac_default_prefix=/opt/xscreensaver
6042       fi
6043
6044     ;;
6045     *-solaris*)
6046
6047       # Thanks for not making xmkmf find this by default, pinheads.
6048       # And thanks for moving things around again, too.  Is this
6049       # really the standard location now?  What happened to the
6050       # joke that this kind of thing went in /opt?
6051       # cthomp says "answer: CDE (Common Disorganized Environment)"
6052       #
6053       if test -f /usr/dt/include/Xm/Xm.h ; then
6054         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6055         X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
6056
6057         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6058         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
6059 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
6060 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
6061   echo $ECHO_N "(cached) $ECHO_C" >&6
6062 else
6063   ac_check_lib_save_LIBS=$LIBS
6064 LIBS="-lgen  $LIBS"
6065 cat >conftest.$ac_ext <<_ACEOF
6066 #line $LINENO "configure"
6067 #include "confdefs.h"
6068
6069 /* Override any gcc2 internal prototype to avoid an error.  */
6070 #ifdef __cplusplus
6071 extern "C"
6072 #endif
6073 /* We use char because int might match the return type of a gcc2
6074    builtin and then its argument prototype would still apply.  */
6075 char regcmp ();
6076 #ifdef F77_DUMMY_MAIN
6077 #  ifdef __cplusplus
6078      extern "C"
6079 #  endif
6080    int F77_DUMMY_MAIN() { return 1; }
6081 #endif
6082 int
6083 main ()
6084 {
6085 regcmp ();
6086   ;
6087   return 0;
6088 }
6089 _ACEOF
6090 rm -f conftest.$ac_objext conftest$ac_exeext
6091 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6092   (eval $ac_link) 2>&5
6093   ac_status=$?
6094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6095   (exit $ac_status); } &&
6096          { ac_try='test -s conftest$ac_exeext'
6097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6098   (eval $ac_try) 2>&5
6099   ac_status=$?
6100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6101   (exit $ac_status); }; }; then
6102   ac_cv_lib_gen_regcmp=yes
6103 else
6104   echo "$as_me: failed program was:" >&5
6105 cat conftest.$ac_ext >&5
6106 ac_cv_lib_gen_regcmp=no
6107 fi
6108 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6109 LIBS=$ac_check_lib_save_LIBS
6110 fi
6111 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
6112 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
6113 if test $ac_cv_lib_gen_regcmp = yes; then
6114   X_LIBS="$X_LIBS -lgen"
6115 fi
6116
6117       fi
6118
6119     ;;
6120     *-darwin*)
6121
6122       # On MacOS X (10.x with "fink"), many things are under /sw/.
6123       #
6124       if test -d /sw/include ; then
6125         X_CFLAGS="-I/sw/include $X_CFLAGS"
6126         X_LIBS="-L/sw/lib $X_LIBS"
6127       fi
6128     ;;
6129   esac
6130 echo "$as_me:$LINENO: checking for XPointer" >&5
6131 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
6132 if test "${ac_cv_xpointer+set}" = set; then
6133   echo $ECHO_N "(cached) $ECHO_C" >&6
6134 else
6135
6136   ac_save_CPPFLAGS="$CPPFLAGS"
6137   if test \! -z "$includedir" ; then
6138     CPPFLAGS="$CPPFLAGS -I$includedir"
6139   fi
6140   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6141   cat >conftest.$ac_ext <<_ACEOF
6142 #line $LINENO "configure"
6143 #include "confdefs.h"
6144 #include <X11/Xlib.h>
6145 #ifdef F77_DUMMY_MAIN
6146 #  ifdef __cplusplus
6147      extern "C"
6148 #  endif
6149    int F77_DUMMY_MAIN() { return 1; }
6150 #endif
6151 int
6152 main ()
6153 {
6154 XPointer foo = (XPointer) 0;
6155   ;
6156   return 0;
6157 }
6158 _ACEOF
6159 rm -f conftest.$ac_objext
6160 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6161   (eval $ac_compile) 2>&5
6162   ac_status=$?
6163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6164   (exit $ac_status); } &&
6165          { ac_try='test -s conftest.$ac_objext'
6166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6167   (eval $ac_try) 2>&5
6168   ac_status=$?
6169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6170   (exit $ac_status); }; }; then
6171   ac_cv_xpointer=yes
6172 else
6173   echo "$as_me: failed program was:" >&5
6174 cat conftest.$ac_ext >&5
6175 ac_cv_xpointer=no
6176 fi
6177 rm -f conftest.$ac_objext conftest.$ac_ext
6178   CPPFLAGS="$ac_save_CPPFLAGS"
6179 fi
6180 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
6181 echo "${ECHO_T}$ac_cv_xpointer" >&6
6182   if test "$ac_cv_xpointer" != yes; then
6183    cat >>confdefs.h <<\_ACEOF
6184 #define XPointer char*
6185 _ACEOF
6186
6187   fi
6188
6189
6190 ###############################################################################
6191 #
6192 #       Gettext support
6193 #
6194 ###############################################################################
6195
6196
6197
6198 if test -n ""; then
6199     echo "$as_me:$LINENO: checking for intltool >= " >&5
6200 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
6201
6202     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
6203     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
6204
6205     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
6206
6207
6208     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
6209         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
6210 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
6211     else
6212         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
6213 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
6214         exit 1
6215     fi
6216 fi
6217
6218   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'
6219 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'
6220      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'
6221       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
6222      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'
6223    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'
6224     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'
6225 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'
6226        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'
6227       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'
6228     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'
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242 # Use the tools built into the package, not the ones that are installed.
6243
6244 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
6245 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
6246 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
6247
6248
6249
6250
6251
6252 # Extract the first word of "perl", so it can be a program name with args.
6253 set dummy perl; ac_word=$2
6254 echo "$as_me:$LINENO: checking for $ac_word" >&5
6255 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6256 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
6257   echo $ECHO_N "(cached) $ECHO_C" >&6
6258 else
6259   case $INTLTOOL_PERL in
6260   [\\/]* | ?:[\\/]*)
6261   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
6262   ;;
6263   *)
6264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265 for as_dir in $PATH
6266 do
6267   IFS=$as_save_IFS
6268   test -z "$as_dir" && as_dir=.
6269   for ac_exec_ext in '' $ac_executable_extensions; do
6270   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6271     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
6272     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6273     break 2
6274   fi
6275 done
6276 done
6277
6278   ;;
6279 esac
6280 fi
6281 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
6282
6283 if test -n "$INTLTOOL_PERL"; then
6284   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
6285 echo "${ECHO_T}$INTLTOOL_PERL" >&6
6286 else
6287   echo "$as_me:$LINENO: result: no" >&5
6288 echo "${ECHO_T}no" >&6
6289 fi
6290
6291 if test -z "$INTLTOOL_PERL"; then
6292    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
6293 echo "$as_me: error: perl not found; required for intltool" >&2;}
6294    { (exit 1); exit 1; }; }
6295 fi
6296 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
6297    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
6298 echo "$as_me: error: perl 5.x required for intltool" >&2;}
6299    { (exit 1); exit 1; }; }
6300 fi
6301
6302 # Remove file type tags (using []) from po/POTFILES.
6303
6304
6305
6306
6307
6308
6309
6310 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
6311
6312 ac_config_commands="$ac_config_commands default-1"
6313
6314
6315
6316 GETTEXT_PACKAGE=xscreensaver
6317 cat >>confdefs.h <<_ACEOF
6318 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
6319 _ACEOF
6320
6321 cat >>confdefs.h <<_ACEOF
6322 #define PACKAGE "$GETTEXT_PACKAGE"
6323 _ACEOF
6324
6325
6326
6327 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"
6328 if test -n "$ac_tool_prefix"; then
6329   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6330 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6331 echo "$as_me:$LINENO: checking for $ac_word" >&5
6332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6333 if test "${ac_cv_prog_RANLIB+set}" = set; then
6334   echo $ECHO_N "(cached) $ECHO_C" >&6
6335 else
6336   if test -n "$RANLIB"; then
6337   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6338 else
6339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6340 for as_dir in $PATH
6341 do
6342   IFS=$as_save_IFS
6343   test -z "$as_dir" && as_dir=.
6344   for ac_exec_ext in '' $ac_executable_extensions; do
6345   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6346     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6347     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6348     break 2
6349   fi
6350 done
6351 done
6352
6353 fi
6354 fi
6355 RANLIB=$ac_cv_prog_RANLIB
6356 if test -n "$RANLIB"; then
6357   echo "$as_me:$LINENO: result: $RANLIB" >&5
6358 echo "${ECHO_T}$RANLIB" >&6
6359 else
6360   echo "$as_me:$LINENO: result: no" >&5
6361 echo "${ECHO_T}no" >&6
6362 fi
6363
6364 fi
6365 if test -z "$ac_cv_prog_RANLIB"; then
6366   ac_ct_RANLIB=$RANLIB
6367   # Extract the first word of "ranlib", so it can be a program name with args.
6368 set dummy ranlib; ac_word=$2
6369 echo "$as_me:$LINENO: checking for $ac_word" >&5
6370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6371 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6372   echo $ECHO_N "(cached) $ECHO_C" >&6
6373 else
6374   if test -n "$ac_ct_RANLIB"; then
6375   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6376 else
6377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6378 for as_dir in $PATH
6379 do
6380   IFS=$as_save_IFS
6381   test -z "$as_dir" && as_dir=.
6382   for ac_exec_ext in '' $ac_executable_extensions; do
6383   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6384     ac_cv_prog_ac_ct_RANLIB="ranlib"
6385     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6386     break 2
6387   fi
6388 done
6389 done
6390
6391   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6392 fi
6393 fi
6394 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6395 if test -n "$ac_ct_RANLIB"; then
6396   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6397 echo "${ECHO_T}$ac_ct_RANLIB" >&6
6398 else
6399   echo "$as_me:$LINENO: result: no" >&5
6400 echo "${ECHO_T}no" >&6
6401 fi
6402
6403   RANLIB=$ac_ct_RANLIB
6404 else
6405   RANLIB="$ac_cv_prog_RANLIB"
6406 fi
6407
6408 echo "$as_me:$LINENO: checking for off_t" >&5
6409 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
6410 if test "${ac_cv_type_off_t+set}" = set; then
6411   echo $ECHO_N "(cached) $ECHO_C" >&6
6412 else
6413   cat >conftest.$ac_ext <<_ACEOF
6414 #line $LINENO "configure"
6415 #include "confdefs.h"
6416 $ac_includes_default
6417 #ifdef F77_DUMMY_MAIN
6418 #  ifdef __cplusplus
6419      extern "C"
6420 #  endif
6421    int F77_DUMMY_MAIN() { return 1; }
6422 #endif
6423 int
6424 main ()
6425 {
6426 if ((off_t *) 0)
6427   return 0;
6428 if (sizeof (off_t))
6429   return 0;
6430   ;
6431   return 0;
6432 }
6433 _ACEOF
6434 rm -f conftest.$ac_objext
6435 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6436   (eval $ac_compile) 2>&5
6437   ac_status=$?
6438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6439   (exit $ac_status); } &&
6440          { ac_try='test -s conftest.$ac_objext'
6441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6442   (eval $ac_try) 2>&5
6443   ac_status=$?
6444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6445   (exit $ac_status); }; }; then
6446   ac_cv_type_off_t=yes
6447 else
6448   echo "$as_me: failed program was:" >&5
6449 cat conftest.$ac_ext >&5
6450 ac_cv_type_off_t=no
6451 fi
6452 rm -f conftest.$ac_objext conftest.$ac_ext
6453 fi
6454 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6455 echo "${ECHO_T}$ac_cv_type_off_t" >&6
6456 if test $ac_cv_type_off_t = yes; then
6457   :
6458 else
6459
6460 cat >>confdefs.h <<_ACEOF
6461 #define off_t long
6462 _ACEOF
6463
6464 fi
6465
6466 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6467 # for constant arguments.  Useless!
6468 echo "$as_me:$LINENO: checking for working alloca.h" >&5
6469 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
6470 if test "${ac_cv_working_alloca_h+set}" = set; then
6471   echo $ECHO_N "(cached) $ECHO_C" >&6
6472 else
6473   cat >conftest.$ac_ext <<_ACEOF
6474 #line $LINENO "configure"
6475 #include "confdefs.h"
6476 #include <alloca.h>
6477 #ifdef F77_DUMMY_MAIN
6478 #  ifdef __cplusplus
6479      extern "C"
6480 #  endif
6481    int F77_DUMMY_MAIN() { return 1; }
6482 #endif
6483 int
6484 main ()
6485 {
6486 char *p = (char *) alloca (2 * sizeof (int));
6487   ;
6488   return 0;
6489 }
6490 _ACEOF
6491 rm -f conftest.$ac_objext conftest$ac_exeext
6492 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6493   (eval $ac_link) 2>&5
6494   ac_status=$?
6495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6496   (exit $ac_status); } &&
6497          { ac_try='test -s conftest$ac_exeext'
6498   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6499   (eval $ac_try) 2>&5
6500   ac_status=$?
6501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6502   (exit $ac_status); }; }; then
6503   ac_cv_working_alloca_h=yes
6504 else
6505   echo "$as_me: failed program was:" >&5
6506 cat conftest.$ac_ext >&5
6507 ac_cv_working_alloca_h=no
6508 fi
6509 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6510 fi
6511 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
6512 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
6513 if test $ac_cv_working_alloca_h = yes; then
6514
6515 cat >>confdefs.h <<\_ACEOF
6516 #define HAVE_ALLOCA_H 1
6517 _ACEOF
6518
6519 fi
6520
6521 echo "$as_me:$LINENO: checking for alloca" >&5
6522 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
6523 if test "${ac_cv_func_alloca_works+set}" = set; then
6524   echo $ECHO_N "(cached) $ECHO_C" >&6
6525 else
6526   cat >conftest.$ac_ext <<_ACEOF
6527 #line $LINENO "configure"
6528 #include "confdefs.h"
6529 #ifdef __GNUC__
6530 # define alloca __builtin_alloca
6531 #else
6532 # ifdef _MSC_VER
6533 #  include <malloc.h>
6534 #  define alloca _alloca
6535 # else
6536 #  if HAVE_ALLOCA_H
6537 #   include <alloca.h>
6538 #  else
6539 #   ifdef _AIX
6540  #pragma alloca
6541 #   else
6542 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6543 char *alloca ();
6544 #    endif
6545 #   endif
6546 #  endif
6547 # endif
6548 #endif
6549
6550 #ifdef F77_DUMMY_MAIN
6551 #  ifdef __cplusplus
6552      extern "C"
6553 #  endif
6554    int F77_DUMMY_MAIN() { return 1; }
6555 #endif
6556 int
6557 main ()
6558 {
6559 char *p = (char *) alloca (1);
6560   ;
6561   return 0;
6562 }
6563 _ACEOF
6564 rm -f conftest.$ac_objext conftest$ac_exeext
6565 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6566   (eval $ac_link) 2>&5
6567   ac_status=$?
6568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6569   (exit $ac_status); } &&
6570          { ac_try='test -s conftest$ac_exeext'
6571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6572   (eval $ac_try) 2>&5
6573   ac_status=$?
6574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6575   (exit $ac_status); }; }; then
6576   ac_cv_func_alloca_works=yes
6577 else
6578   echo "$as_me: failed program was:" >&5
6579 cat conftest.$ac_ext >&5
6580 ac_cv_func_alloca_works=no
6581 fi
6582 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6583 fi
6584 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
6585 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
6586
6587 if test $ac_cv_func_alloca_works = yes; then
6588
6589 cat >>confdefs.h <<\_ACEOF
6590 #define HAVE_ALLOCA 1
6591 _ACEOF
6592
6593 else
6594   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6595 # that cause trouble.  Some versions do not even contain alloca or
6596 # contain a buggy version.  If you still want to use their alloca,
6597 # use ar to extract alloca.o from them instead of compiling alloca.c.
6598
6599 ALLOCA=alloca.$ac_objext
6600
6601 cat >>confdefs.h <<\_ACEOF
6602 #define C_ALLOCA 1
6603 _ACEOF
6604
6605
6606 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
6607 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
6608 if test "${ac_cv_os_cray+set}" = set; then
6609   echo $ECHO_N "(cached) $ECHO_C" >&6
6610 else
6611   cat >conftest.$ac_ext <<_ACEOF
6612 #line $LINENO "configure"
6613 #include "confdefs.h"
6614 #if defined(CRAY) && ! defined(CRAY2)
6615 webecray
6616 #else
6617 wenotbecray
6618 #endif
6619
6620 _ACEOF
6621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6622   egrep "webecray" >/dev/null 2>&1; then
6623   ac_cv_os_cray=yes
6624 else
6625   ac_cv_os_cray=no
6626 fi
6627 rm -f conftest*
6628
6629 fi
6630 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
6631 echo "${ECHO_T}$ac_cv_os_cray" >&6
6632 if test $ac_cv_os_cray = yes; then
6633   for ac_func in _getb67 GETB67 getb67; do
6634     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6635 echo "$as_me:$LINENO: checking for $ac_func" >&5
6636 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6637 if eval "test \"\${$as_ac_var+set}\" = set"; then
6638   echo $ECHO_N "(cached) $ECHO_C" >&6
6639 else
6640   cat >conftest.$ac_ext <<_ACEOF
6641 #line $LINENO "configure"
6642 #include "confdefs.h"
6643 /* System header to define __stub macros and hopefully few prototypes,
6644     which can conflict with char $ac_func (); below.  */
6645 #include <assert.h>
6646 /* Override any gcc2 internal prototype to avoid an error.  */
6647 #ifdef __cplusplus
6648 extern "C"
6649 #endif
6650 /* We use char because int might match the return type of a gcc2
6651    builtin and then its argument prototype would still apply.  */
6652 char $ac_func ();
6653 char (*f) ();
6654
6655 #ifdef F77_DUMMY_MAIN
6656 #  ifdef __cplusplus
6657      extern "C"
6658 #  endif
6659    int F77_DUMMY_MAIN() { return 1; }
6660 #endif
6661 int
6662 main ()
6663 {
6664 /* The GNU C library defines this for functions which it implements
6665     to always fail with ENOSYS.  Some functions are actually named
6666     something starting with __ and the normal name is an alias.  */
6667 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6668 choke me
6669 #else
6670 f = $ac_func;
6671 #endif
6672
6673   ;
6674   return 0;
6675 }
6676 _ACEOF
6677 rm -f conftest.$ac_objext conftest$ac_exeext
6678 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6679   (eval $ac_link) 2>&5
6680   ac_status=$?
6681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6682   (exit $ac_status); } &&
6683          { ac_try='test -s conftest$ac_exeext'
6684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6685   (eval $ac_try) 2>&5
6686   ac_status=$?
6687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6688   (exit $ac_status); }; }; then
6689   eval "$as_ac_var=yes"
6690 else
6691   echo "$as_me: failed program was:" >&5
6692 cat conftest.$ac_ext >&5
6693 eval "$as_ac_var=no"
6694 fi
6695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6696 fi
6697 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6698 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6699 if test `eval echo '${'$as_ac_var'}'` = yes; then
6700
6701 cat >>confdefs.h <<_ACEOF
6702 #define CRAY_STACKSEG_END $ac_func
6703 _ACEOF
6704
6705     break
6706 fi
6707
6708   done
6709 fi
6710
6711 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
6712 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
6713 if test "${ac_cv_c_stack_direction+set}" = set; then
6714   echo $ECHO_N "(cached) $ECHO_C" >&6
6715 else
6716   if test "$cross_compiling" = yes; then
6717   ac_cv_c_stack_direction=0
6718 else
6719   cat >conftest.$ac_ext <<_ACEOF
6720 #line $LINENO "configure"
6721 #include "confdefs.h"
6722 int
6723 find_stack_direction ()
6724 {
6725   static char *addr = 0;
6726   auto char dummy;
6727   if (addr == 0)
6728     {
6729       addr = &dummy;
6730       return find_stack_direction ();
6731     }
6732   else
6733     return (&dummy > addr) ? 1 : -1;
6734 }
6735
6736 int
6737 main ()
6738 {
6739   exit (find_stack_direction () < 0);
6740 }
6741 _ACEOF
6742 rm -f conftest$ac_exeext
6743 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6744   (eval $ac_link) 2>&5
6745   ac_status=$?
6746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6747   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6749   (eval $ac_try) 2>&5
6750   ac_status=$?
6751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6752   (exit $ac_status); }; }; then
6753   ac_cv_c_stack_direction=1
6754 else
6755   echo "$as_me: program exited with status $ac_status" >&5
6756 echo "$as_me: failed program was:" >&5
6757 cat conftest.$ac_ext >&5
6758 ( exit $ac_status )
6759 ac_cv_c_stack_direction=-1
6760 fi
6761 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6762 fi
6763 fi
6764 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
6765 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
6766
6767 cat >>confdefs.h <<_ACEOF
6768 #define STACK_DIRECTION $ac_cv_c_stack_direction
6769 _ACEOF
6770
6771
6772 fi
6773
6774
6775
6776 for ac_header in stdlib.h unistd.h
6777 do
6778 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6779 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6780   echo "$as_me:$LINENO: checking for $ac_header" >&5
6781 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6782 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6783   echo $ECHO_N "(cached) $ECHO_C" >&6
6784 fi
6785 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6786 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6787 else
6788   # Is the header compilable?
6789 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6790 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6791 cat >conftest.$ac_ext <<_ACEOF
6792 #line $LINENO "configure"
6793 #include "confdefs.h"
6794 $ac_includes_default
6795 #include <$ac_header>
6796 _ACEOF
6797 rm -f conftest.$ac_objext
6798 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6799   (eval $ac_compile) 2>&5
6800   ac_status=$?
6801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6802   (exit $ac_status); } &&
6803          { ac_try='test -s conftest.$ac_objext'
6804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6805   (eval $ac_try) 2>&5
6806   ac_status=$?
6807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6808   (exit $ac_status); }; }; then
6809   ac_header_compiler=yes
6810 else
6811   echo "$as_me: failed program was:" >&5
6812 cat conftest.$ac_ext >&5
6813 ac_header_compiler=no
6814 fi
6815 rm -f conftest.$ac_objext conftest.$ac_ext
6816 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6817 echo "${ECHO_T}$ac_header_compiler" >&6
6818
6819 # Is the header present?
6820 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6821 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6822 cat >conftest.$ac_ext <<_ACEOF
6823 #line $LINENO "configure"
6824 #include "confdefs.h"
6825 #include <$ac_header>
6826 _ACEOF
6827 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6828   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6829   ac_status=$?
6830   egrep -v '^ *\+' conftest.er1 >conftest.err
6831   rm -f conftest.er1
6832   cat conftest.err >&5
6833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6834   (exit $ac_status); } >/dev/null; then
6835   if test -s conftest.err; then
6836     ac_cpp_err=$ac_c_preproc_warn_flag
6837   else
6838     ac_cpp_err=
6839   fi
6840 else
6841   ac_cpp_err=yes
6842 fi
6843 if test -z "$ac_cpp_err"; then
6844   ac_header_preproc=yes
6845 else
6846   echo "$as_me: failed program was:" >&5
6847   cat conftest.$ac_ext >&5
6848   ac_header_preproc=no
6849 fi
6850 rm -f conftest.err conftest.$ac_ext
6851 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6852 echo "${ECHO_T}$ac_header_preproc" >&6
6853
6854 # So?  What about this header?
6855 case $ac_header_compiler:$ac_header_preproc in
6856   yes:no )
6857     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6858 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6859     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6860 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
6861   no:yes )
6862     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6863 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6864     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6865 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6866     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6867 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
6868 esac
6869 echo "$as_me:$LINENO: checking for $ac_header" >&5
6870 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6871 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6872   echo $ECHO_N "(cached) $ECHO_C" >&6
6873 else
6874   eval "$as_ac_Header=$ac_header_preproc"
6875 fi
6876 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6877 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6878
6879 fi
6880 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6881   cat >>confdefs.h <<_ACEOF
6882 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6883 _ACEOF
6884
6885 fi
6886
6887 done
6888
6889
6890 for ac_func in getpagesize
6891 do
6892 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6893 echo "$as_me:$LINENO: checking for $ac_func" >&5
6894 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6895 if eval "test \"\${$as_ac_var+set}\" = set"; then
6896   echo $ECHO_N "(cached) $ECHO_C" >&6
6897 else
6898   cat >conftest.$ac_ext <<_ACEOF
6899 #line $LINENO "configure"
6900 #include "confdefs.h"
6901 /* System header to define __stub macros and hopefully few prototypes,
6902     which can conflict with char $ac_func (); below.  */
6903 #include <assert.h>
6904 /* Override any gcc2 internal prototype to avoid an error.  */
6905 #ifdef __cplusplus
6906 extern "C"
6907 #endif
6908 /* We use char because int might match the return type of a gcc2
6909    builtin and then its argument prototype would still apply.  */
6910 char $ac_func ();
6911 char (*f) ();
6912
6913 #ifdef F77_DUMMY_MAIN
6914 #  ifdef __cplusplus
6915      extern "C"
6916 #  endif
6917    int F77_DUMMY_MAIN() { return 1; }
6918 #endif
6919 int
6920 main ()
6921 {
6922 /* The GNU C library defines this for functions which it implements
6923     to always fail with ENOSYS.  Some functions are actually named
6924     something starting with __ and the normal name is an alias.  */
6925 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6926 choke me
6927 #else
6928 f = $ac_func;
6929 #endif
6930
6931   ;
6932   return 0;
6933 }
6934 _ACEOF
6935 rm -f conftest.$ac_objext conftest$ac_exeext
6936 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6937   (eval $ac_link) 2>&5
6938   ac_status=$?
6939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6940   (exit $ac_status); } &&
6941          { ac_try='test -s conftest$ac_exeext'
6942   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6943   (eval $ac_try) 2>&5
6944   ac_status=$?
6945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6946   (exit $ac_status); }; }; then
6947   eval "$as_ac_var=yes"
6948 else
6949   echo "$as_me: failed program was:" >&5
6950 cat conftest.$ac_ext >&5
6951 eval "$as_ac_var=no"
6952 fi
6953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6954 fi
6955 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6956 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6957 if test `eval echo '${'$as_ac_var'}'` = yes; then
6958   cat >>confdefs.h <<_ACEOF
6959 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6960 _ACEOF
6961
6962 fi
6963 done
6964
6965 echo "$as_me:$LINENO: checking for working mmap" >&5
6966 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
6967 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
6968   echo $ECHO_N "(cached) $ECHO_C" >&6
6969 else
6970   if test "$cross_compiling" = yes; then
6971   ac_cv_func_mmap_fixed_mapped=no
6972 else
6973   cat >conftest.$ac_ext <<_ACEOF
6974 #line $LINENO "configure"
6975 #include "confdefs.h"
6976 $ac_includes_default
6977 /* malloc might have been renamed as rpl_malloc. */
6978 #undef malloc
6979
6980 /* Thanks to Mike Haertel and Jim Avera for this test.
6981    Here is a matrix of mmap possibilities:
6982         mmap private not fixed
6983         mmap private fixed at somewhere currently unmapped
6984         mmap private fixed at somewhere already mapped
6985         mmap shared not fixed
6986         mmap shared fixed at somewhere currently unmapped
6987         mmap shared fixed at somewhere already mapped
6988    For private mappings, we should verify that changes cannot be read()
6989    back from the file, nor mmap's back from the file at a different
6990    address.  (There have been systems where private was not correctly
6991    implemented like the infamous i386 svr4.0, and systems where the
6992    VM page cache was not coherent with the file system buffer cache
6993    like early versions of FreeBSD and possibly contemporary NetBSD.)
6994    For shared mappings, we should conversely verify that changes get
6995    propagated back to all the places they're supposed to be.
6996
6997    Grep wants private fixed already mapped.
6998    The main things grep needs to know about mmap are:
6999    * does it exist and is it safe to write into the mmap'd area
7000    * how to use it (BSD variants)  */
7001
7002 #include <fcntl.h>
7003 #include <sys/mman.h>
7004
7005 #if !STDC_HEADERS && !HAVE_STDLIB_H
7006 char *malloc ();
7007 #endif
7008
7009 /* This mess was copied from the GNU getpagesize.h.  */
7010 #if !HAVE_GETPAGESIZE
7011 /* Assume that all systems that can run configure have sys/param.h.  */
7012 # if !HAVE_SYS_PARAM_H
7013 #  define HAVE_SYS_PARAM_H 1
7014 # endif
7015
7016 # ifdef _SC_PAGESIZE
7017 #  define getpagesize() sysconf(_SC_PAGESIZE)
7018 # else /* no _SC_PAGESIZE */
7019 #  if HAVE_SYS_PARAM_H
7020 #   include <sys/param.h>
7021 #   ifdef EXEC_PAGESIZE
7022 #    define getpagesize() EXEC_PAGESIZE
7023 #   else /* no EXEC_PAGESIZE */
7024 #    ifdef NBPG
7025 #     define getpagesize() NBPG * CLSIZE
7026 #     ifndef CLSIZE
7027 #      define CLSIZE 1
7028 #     endif /* no CLSIZE */
7029 #    else /* no NBPG */
7030 #     ifdef NBPC
7031 #      define getpagesize() NBPC
7032 #     else /* no NBPC */
7033 #      ifdef PAGESIZE
7034 #       define getpagesize() PAGESIZE
7035 #      endif /* PAGESIZE */
7036 #     endif /* no NBPC */
7037 #    endif /* no NBPG */
7038 #   endif /* no EXEC_PAGESIZE */
7039 #  else /* no HAVE_SYS_PARAM_H */
7040 #   define getpagesize() 8192   /* punt totally */
7041 #  endif /* no HAVE_SYS_PARAM_H */
7042 # endif /* no _SC_PAGESIZE */
7043
7044 #endif /* no HAVE_GETPAGESIZE */
7045
7046 int
7047 main ()
7048 {
7049   char *data, *data2, *data3;
7050   int i, pagesize;
7051   int fd;
7052
7053   pagesize = getpagesize ();
7054
7055   /* First, make a file with some known garbage in it. */
7056   data = (char *) malloc (pagesize);
7057   if (!data)
7058     exit (1);
7059   for (i = 0; i < pagesize; ++i)
7060     *(data + i) = rand ();
7061   umask (0);
7062   fd = creat ("conftest.mmap", 0600);
7063   if (fd < 0)
7064     exit (1);
7065   if (write (fd, data, pagesize) != pagesize)
7066     exit (1);
7067   close (fd);
7068
7069   /* Next, try to mmap the file at a fixed address which already has
7070      something else allocated at it.  If we can, also make sure that
7071      we see the same garbage.  */
7072   fd = open ("conftest.mmap", O_RDWR);
7073   if (fd < 0)
7074     exit (1);
7075   data2 = (char *) malloc (2 * pagesize);
7076   if (!data2)
7077     exit (1);
7078   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7079   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7080                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
7081     exit (1);
7082   for (i = 0; i < pagesize; ++i)
7083     if (*(data + i) != *(data2 + i))
7084       exit (1);
7085
7086   /* Finally, make sure that changes to the mapped area do not
7087      percolate back to the file as seen by read().  (This is a bug on
7088      some variants of i386 svr4.0.)  */
7089   for (i = 0; i < pagesize; ++i)
7090     *(data2 + i) = *(data2 + i) + 1;
7091   data3 = (char *) malloc (pagesize);
7092   if (!data3)
7093     exit (1);
7094   if (read (fd, data3, pagesize) != pagesize)
7095     exit (1);
7096   for (i = 0; i < pagesize; ++i)
7097     if (*(data + i) != *(data3 + i))
7098       exit (1);
7099   close (fd);
7100   exit (0);
7101 }
7102 _ACEOF
7103 rm -f conftest$ac_exeext
7104 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7105   (eval $ac_link) 2>&5
7106   ac_status=$?
7107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7108   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7110   (eval $ac_try) 2>&5
7111   ac_status=$?
7112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7113   (exit $ac_status); }; }; then
7114   ac_cv_func_mmap_fixed_mapped=yes
7115 else
7116   echo "$as_me: program exited with status $ac_status" >&5
7117 echo "$as_me: failed program was:" >&5
7118 cat conftest.$ac_ext >&5
7119 ( exit $ac_status )
7120 ac_cv_func_mmap_fixed_mapped=no
7121 fi
7122 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7123 fi
7124 fi
7125 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
7126 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7127 if test $ac_cv_func_mmap_fixed_mapped = yes; then
7128
7129 cat >>confdefs.h <<\_ACEOF
7130 #define HAVE_MMAP 1
7131 _ACEOF
7132
7133 fi
7134 rm -f conftest.mmap
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
7146 unistd.h sys/param.h
7147 do
7148 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7149 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7150   echo "$as_me:$LINENO: checking for $ac_header" >&5
7151 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7152 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7153   echo $ECHO_N "(cached) $ECHO_C" >&6
7154 fi
7155 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7156 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7157 else
7158   # Is the header compilable?
7159 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7160 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7161 cat >conftest.$ac_ext <<_ACEOF
7162 #line $LINENO "configure"
7163 #include "confdefs.h"
7164 $ac_includes_default
7165 #include <$ac_header>
7166 _ACEOF
7167 rm -f conftest.$ac_objext
7168 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7169   (eval $ac_compile) 2>&5
7170   ac_status=$?
7171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7172   (exit $ac_status); } &&
7173          { ac_try='test -s conftest.$ac_objext'
7174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7175   (eval $ac_try) 2>&5
7176   ac_status=$?
7177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7178   (exit $ac_status); }; }; then
7179   ac_header_compiler=yes
7180 else
7181   echo "$as_me: failed program was:" >&5
7182 cat conftest.$ac_ext >&5
7183 ac_header_compiler=no
7184 fi
7185 rm -f conftest.$ac_objext conftest.$ac_ext
7186 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7187 echo "${ECHO_T}$ac_header_compiler" >&6
7188
7189 # Is the header present?
7190 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7191 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7192 cat >conftest.$ac_ext <<_ACEOF
7193 #line $LINENO "configure"
7194 #include "confdefs.h"
7195 #include <$ac_header>
7196 _ACEOF
7197 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7198   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7199   ac_status=$?
7200   egrep -v '^ *\+' conftest.er1 >conftest.err
7201   rm -f conftest.er1
7202   cat conftest.err >&5
7203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7204   (exit $ac_status); } >/dev/null; then
7205   if test -s conftest.err; then
7206     ac_cpp_err=$ac_c_preproc_warn_flag
7207   else
7208     ac_cpp_err=
7209   fi
7210 else
7211   ac_cpp_err=yes
7212 fi
7213 if test -z "$ac_cpp_err"; then
7214   ac_header_preproc=yes
7215 else
7216   echo "$as_me: failed program was:" >&5
7217   cat conftest.$ac_ext >&5
7218   ac_header_preproc=no
7219 fi
7220 rm -f conftest.err conftest.$ac_ext
7221 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7222 echo "${ECHO_T}$ac_header_preproc" >&6
7223
7224 # So?  What about this header?
7225 case $ac_header_compiler:$ac_header_preproc in
7226   yes:no )
7227     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7228 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7229     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7230 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7231   no:yes )
7232     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7233 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7234     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7235 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7236     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7237 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7238 esac
7239 echo "$as_me:$LINENO: checking for $ac_header" >&5
7240 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7241 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7242   echo $ECHO_N "(cached) $ECHO_C" >&6
7243 else
7244   eval "$as_ac_Header=$ac_header_preproc"
7245 fi
7246 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7247 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7248
7249 fi
7250 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7251   cat >>confdefs.h <<_ACEOF
7252 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7253 _ACEOF
7254
7255 fi
7256
7257 done
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
7271 strdup __argz_count __argz_stringify __argz_next
7272 do
7273 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7274 echo "$as_me:$LINENO: checking for $ac_func" >&5
7275 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7276 if eval "test \"\${$as_ac_var+set}\" = set"; then
7277   echo $ECHO_N "(cached) $ECHO_C" >&6
7278 else
7279   cat >conftest.$ac_ext <<_ACEOF
7280 #line $LINENO "configure"
7281 #include "confdefs.h"
7282 /* System header to define __stub macros and hopefully few prototypes,
7283     which can conflict with char $ac_func (); below.  */
7284 #include <assert.h>
7285 /* Override any gcc2 internal prototype to avoid an error.  */
7286 #ifdef __cplusplus
7287 extern "C"
7288 #endif
7289 /* We use char because int might match the return type of a gcc2
7290    builtin and then its argument prototype would still apply.  */
7291 char $ac_func ();
7292 char (*f) ();
7293
7294 #ifdef F77_DUMMY_MAIN
7295 #  ifdef __cplusplus
7296      extern "C"
7297 #  endif
7298    int F77_DUMMY_MAIN() { return 1; }
7299 #endif
7300 int
7301 main ()
7302 {
7303 /* The GNU C library defines this for functions which it implements
7304     to always fail with ENOSYS.  Some functions are actually named
7305     something starting with __ and the normal name is an alias.  */
7306 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7307 choke me
7308 #else
7309 f = $ac_func;
7310 #endif
7311
7312   ;
7313   return 0;
7314 }
7315 _ACEOF
7316 rm -f conftest.$ac_objext conftest$ac_exeext
7317 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7318   (eval $ac_link) 2>&5
7319   ac_status=$?
7320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7321   (exit $ac_status); } &&
7322          { ac_try='test -s conftest$ac_exeext'
7323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7324   (eval $ac_try) 2>&5
7325   ac_status=$?
7326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7327   (exit $ac_status); }; }; then
7328   eval "$as_ac_var=yes"
7329 else
7330   echo "$as_me: failed program was:" >&5
7331 cat conftest.$ac_ext >&5
7332 eval "$as_ac_var=no"
7333 fi
7334 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7335 fi
7336 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7337 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7338 if test `eval echo '${'$as_ac_var'}'` = yes; then
7339   cat >>confdefs.h <<_ACEOF
7340 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7341 _ACEOF
7342
7343 fi
7344 done
7345
7346
7347    if test $ac_cv_header_locale_h = yes; then
7348     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
7349 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7350 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7351   echo $ECHO_N "(cached) $ECHO_C" >&6
7352 else
7353   cat >conftest.$ac_ext <<_ACEOF
7354 #line $LINENO "configure"
7355 #include "confdefs.h"
7356 #include <locale.h>
7357 #ifdef F77_DUMMY_MAIN
7358 #  ifdef __cplusplus
7359      extern "C"
7360 #  endif
7361    int F77_DUMMY_MAIN() { return 1; }
7362 #endif
7363 int
7364 main ()
7365 {
7366 return LC_MESSAGES
7367   ;
7368   return 0;
7369 }
7370 _ACEOF
7371 rm -f conftest.$ac_objext conftest$ac_exeext
7372 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7373   (eval $ac_link) 2>&5
7374   ac_status=$?
7375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7376   (exit $ac_status); } &&
7377          { ac_try='test -s conftest$ac_exeext'
7378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7379   (eval $ac_try) 2>&5
7380   ac_status=$?
7381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7382   (exit $ac_status); }; }; then
7383   am_cv_val_LC_MESSAGES=yes
7384 else
7385   echo "$as_me: failed program was:" >&5
7386 cat conftest.$ac_ext >&5
7387 am_cv_val_LC_MESSAGES=no
7388 fi
7389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7390 fi
7391 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
7392 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
7393     if test $am_cv_val_LC_MESSAGES = yes; then
7394
7395 cat >>confdefs.h <<\_ACEOF
7396 #define HAVE_LC_MESSAGES 1
7397 _ACEOF
7398
7399     fi
7400   fi
7401      USE_NLS=yes
7402
7403
7404         nls_cv_force_use_gnu_gettext="no"
7405
7406     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7407     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7408                               nls_cv_header_intl=
7409       nls_cv_header_libgt=
7410       CATOBJEXT=NONE
7411
7412       if test "${ac_cv_header_libintl_h+set}" = set; then
7413   echo "$as_me:$LINENO: checking for libintl.h" >&5
7414 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7415 if test "${ac_cv_header_libintl_h+set}" = set; then
7416   echo $ECHO_N "(cached) $ECHO_C" >&6
7417 fi
7418 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7419 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7420 else
7421   # Is the header compilable?
7422 echo "$as_me:$LINENO: checking libintl.h usability" >&5
7423 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
7424 cat >conftest.$ac_ext <<_ACEOF
7425 #line $LINENO "configure"
7426 #include "confdefs.h"
7427 $ac_includes_default
7428 #include <libintl.h>
7429 _ACEOF
7430 rm -f conftest.$ac_objext
7431 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7432   (eval $ac_compile) 2>&5
7433   ac_status=$?
7434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7435   (exit $ac_status); } &&
7436          { ac_try='test -s conftest.$ac_objext'
7437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7438   (eval $ac_try) 2>&5
7439   ac_status=$?
7440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7441   (exit $ac_status); }; }; then
7442   ac_header_compiler=yes
7443 else
7444   echo "$as_me: failed program was:" >&5
7445 cat conftest.$ac_ext >&5
7446 ac_header_compiler=no
7447 fi
7448 rm -f conftest.$ac_objext conftest.$ac_ext
7449 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7450 echo "${ECHO_T}$ac_header_compiler" >&6
7451
7452 # Is the header present?
7453 echo "$as_me:$LINENO: checking libintl.h presence" >&5
7454 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
7455 cat >conftest.$ac_ext <<_ACEOF
7456 #line $LINENO "configure"
7457 #include "confdefs.h"
7458 #include <libintl.h>
7459 _ACEOF
7460 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7461   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7462   ac_status=$?
7463   egrep -v '^ *\+' conftest.er1 >conftest.err
7464   rm -f conftest.er1
7465   cat conftest.err >&5
7466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7467   (exit $ac_status); } >/dev/null; then
7468   if test -s conftest.err; then
7469     ac_cpp_err=$ac_c_preproc_warn_flag
7470   else
7471     ac_cpp_err=
7472   fi
7473 else
7474   ac_cpp_err=yes
7475 fi
7476 if test -z "$ac_cpp_err"; then
7477   ac_header_preproc=yes
7478 else
7479   echo "$as_me: failed program was:" >&5
7480   cat conftest.$ac_ext >&5
7481   ac_header_preproc=no
7482 fi
7483 rm -f conftest.err conftest.$ac_ext
7484 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7485 echo "${ECHO_T}$ac_header_preproc" >&6
7486
7487 # So?  What about this header?
7488 case $ac_header_compiler:$ac_header_preproc in
7489   yes:no )
7490     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
7491 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7492     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7493 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
7494   no:yes )
7495     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
7496 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
7497     { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
7498 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
7499     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7500 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
7501 esac
7502 echo "$as_me:$LINENO: checking for libintl.h" >&5
7503 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7504 if test "${ac_cv_header_libintl_h+set}" = set; then
7505   echo $ECHO_N "(cached) $ECHO_C" >&6
7506 else
7507   ac_cv_header_libintl_h=$ac_header_preproc
7508 fi
7509 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7510 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7511
7512 fi
7513 if test $ac_cv_header_libintl_h = yes; then
7514   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
7515 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
7516 if test "${gt_cv_func_dgettext_libc+set}" = set; then
7517   echo $ECHO_N "(cached) $ECHO_C" >&6
7518 else
7519   cat >conftest.$ac_ext <<_ACEOF
7520 #line $LINENO "configure"
7521 #include "confdefs.h"
7522 #include <libintl.h>
7523 #ifdef F77_DUMMY_MAIN
7524 #  ifdef __cplusplus
7525      extern "C"
7526 #  endif
7527    int F77_DUMMY_MAIN() { return 1; }
7528 #endif
7529 int
7530 main ()
7531 {
7532 return (int) dgettext ("","")
7533   ;
7534   return 0;
7535 }
7536 _ACEOF
7537 rm -f conftest.$ac_objext conftest$ac_exeext
7538 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7539   (eval $ac_link) 2>&5
7540   ac_status=$?
7541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7542   (exit $ac_status); } &&
7543          { ac_try='test -s conftest$ac_exeext'
7544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7545   (eval $ac_try) 2>&5
7546   ac_status=$?
7547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7548   (exit $ac_status); }; }; then
7549   gt_cv_func_dgettext_libc=yes
7550 else
7551   echo "$as_me: failed program was:" >&5
7552 cat conftest.$ac_ext >&5
7553 gt_cv_func_dgettext_libc=no
7554 fi
7555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7556 fi
7557 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
7558 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
7559
7560           if test "$gt_cv_func_dgettext_libc" != "yes"; then
7561             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
7562 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
7563 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
7564   echo $ECHO_N "(cached) $ECHO_C" >&6
7565 else
7566   ac_check_lib_save_LIBS=$LIBS
7567 LIBS="-lintl  $LIBS"
7568 cat >conftest.$ac_ext <<_ACEOF
7569 #line $LINENO "configure"
7570 #include "confdefs.h"
7571
7572 /* Override any gcc2 internal prototype to avoid an error.  */
7573 #ifdef __cplusplus
7574 extern "C"
7575 #endif
7576 /* We use char because int might match the return type of a gcc2
7577    builtin and then its argument prototype would still apply.  */
7578 char bindtextdomain ();
7579 #ifdef F77_DUMMY_MAIN
7580 #  ifdef __cplusplus
7581      extern "C"
7582 #  endif
7583    int F77_DUMMY_MAIN() { return 1; }
7584 #endif
7585 int
7586 main ()
7587 {
7588 bindtextdomain ();
7589   ;
7590   return 0;
7591 }
7592 _ACEOF
7593 rm -f conftest.$ac_objext conftest$ac_exeext
7594 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7595   (eval $ac_link) 2>&5
7596   ac_status=$?
7597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7598   (exit $ac_status); } &&
7599          { ac_try='test -s conftest$ac_exeext'
7600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7601   (eval $ac_try) 2>&5
7602   ac_status=$?
7603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7604   (exit $ac_status); }; }; then
7605   ac_cv_lib_intl_bindtextdomain=yes
7606 else
7607   echo "$as_me: failed program was:" >&5
7608 cat conftest.$ac_ext >&5
7609 ac_cv_lib_intl_bindtextdomain=no
7610 fi
7611 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7612 LIBS=$ac_check_lib_save_LIBS
7613 fi
7614 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
7615 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
7616 if test $ac_cv_lib_intl_bindtextdomain = yes; then
7617   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
7618 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
7619 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
7620   echo $ECHO_N "(cached) $ECHO_C" >&6
7621 else
7622   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
7623 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
7624 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
7625   echo $ECHO_N "(cached) $ECHO_C" >&6
7626 else
7627   ac_check_lib_save_LIBS=$LIBS
7628 LIBS="-lintl  $LIBS"
7629 cat >conftest.$ac_ext <<_ACEOF
7630 #line $LINENO "configure"
7631 #include "confdefs.h"
7632
7633 /* Override any gcc2 internal prototype to avoid an error.  */
7634 #ifdef __cplusplus
7635 extern "C"
7636 #endif
7637 /* We use char because int might match the return type of a gcc2
7638    builtin and then its argument prototype would still apply.  */
7639 char dgettext ();
7640 #ifdef F77_DUMMY_MAIN
7641 #  ifdef __cplusplus
7642      extern "C"
7643 #  endif
7644    int F77_DUMMY_MAIN() { return 1; }
7645 #endif
7646 int
7647 main ()
7648 {
7649 dgettext ();
7650   ;
7651   return 0;
7652 }
7653 _ACEOF
7654 rm -f conftest.$ac_objext conftest$ac_exeext
7655 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7656   (eval $ac_link) 2>&5
7657   ac_status=$?
7658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7659   (exit $ac_status); } &&
7660          { ac_try='test -s conftest$ac_exeext'
7661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7662   (eval $ac_try) 2>&5
7663   ac_status=$?
7664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7665   (exit $ac_status); }; }; then
7666   ac_cv_lib_intl_dgettext=yes
7667 else
7668   echo "$as_me: failed program was:" >&5
7669 cat conftest.$ac_ext >&5
7670 ac_cv_lib_intl_dgettext=no
7671 fi
7672 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7673 LIBS=$ac_check_lib_save_LIBS
7674 fi
7675 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
7676 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
7677 if test $ac_cv_lib_intl_dgettext = yes; then
7678   gt_cv_func_dgettext_libintl=yes
7679 else
7680   gt_cv_func_dgettext_libintl=no
7681 fi
7682
7683 fi
7684 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
7685 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
7686 fi
7687
7688           fi
7689
7690           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7691             LIBS="$LIBS -lintl";
7692           fi
7693
7694           if test "$gt_cv_func_dgettext_libc" = "yes" \
7695             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7696
7697 cat >>confdefs.h <<\_ACEOF
7698 #define HAVE_GETTEXT 1
7699 _ACEOF
7700
7701             # Extract the first word of "msgfmt", so it can be a program name with args.
7702 set dummy msgfmt; ac_word=$2
7703 echo "$as_me:$LINENO: checking for $ac_word" >&5
7704 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7705 if test "${ac_cv_path_MSGFMT+set}" = set; then
7706   echo $ECHO_N "(cached) $ECHO_C" >&6
7707 else
7708   case "$MSGFMT" in
7709   /*)
7710   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7711   ;;
7712   *)
7713   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7714   for ac_dir in $PATH; do
7715     test -z "$ac_dir" && ac_dir=.
7716     if test -f $ac_dir/$ac_word; then
7717       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7718         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7719         break
7720       fi
7721     fi
7722   done
7723   IFS="$ac_save_ifs"
7724   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
7725   ;;
7726 esac
7727 fi
7728 MSGFMT="$ac_cv_path_MSGFMT"
7729 if test -n "$MSGFMT"; then
7730   echo "$as_me:$LINENO: result: $MSGFMT" >&5
7731 echo "${ECHO_T}$MSGFMT" >&6
7732 else
7733   echo "$as_me:$LINENO: result: no" >&5
7734 echo "${ECHO_T}no" >&6
7735 fi
7736             if test "$MSGFMT" != "no"; then
7737
7738 for ac_func in dcgettext
7739 do
7740 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7741 echo "$as_me:$LINENO: checking for $ac_func" >&5
7742 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7743 if eval "test \"\${$as_ac_var+set}\" = set"; then
7744   echo $ECHO_N "(cached) $ECHO_C" >&6
7745 else
7746   cat >conftest.$ac_ext <<_ACEOF
7747 #line $LINENO "configure"
7748 #include "confdefs.h"
7749 /* System header to define __stub macros and hopefully few prototypes,
7750     which can conflict with char $ac_func (); below.  */
7751 #include <assert.h>
7752 /* Override any gcc2 internal prototype to avoid an error.  */
7753 #ifdef __cplusplus
7754 extern "C"
7755 #endif
7756 /* We use char because int might match the return type of a gcc2
7757    builtin and then its argument prototype would still apply.  */
7758 char $ac_func ();
7759 char (*f) ();
7760
7761 #ifdef F77_DUMMY_MAIN
7762 #  ifdef __cplusplus
7763      extern "C"
7764 #  endif
7765    int F77_DUMMY_MAIN() { return 1; }
7766 #endif
7767 int
7768 main ()
7769 {
7770 /* The GNU C library defines this for functions which it implements
7771     to always fail with ENOSYS.  Some functions are actually named
7772     something starting with __ and the normal name is an alias.  */
7773 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7774 choke me
7775 #else
7776 f = $ac_func;
7777 #endif
7778
7779   ;
7780   return 0;
7781 }
7782 _ACEOF
7783 rm -f conftest.$ac_objext conftest$ac_exeext
7784 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7785   (eval $ac_link) 2>&5
7786   ac_status=$?
7787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7788   (exit $ac_status); } &&
7789          { ac_try='test -s conftest$ac_exeext'
7790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7791   (eval $ac_try) 2>&5
7792   ac_status=$?
7793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7794   (exit $ac_status); }; }; then
7795   eval "$as_ac_var=yes"
7796 else
7797   echo "$as_me: failed program was:" >&5
7798 cat conftest.$ac_ext >&5
7799 eval "$as_ac_var=no"
7800 fi
7801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7802 fi
7803 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7804 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7805 if test `eval echo '${'$as_ac_var'}'` = yes; then
7806   cat >>confdefs.h <<_ACEOF
7807 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7808 _ACEOF
7809
7810 fi
7811 done
7812
7813               # Extract the first word of "gmsgfmt", so it can be a program name with args.
7814 set dummy gmsgfmt; ac_word=$2
7815 echo "$as_me:$LINENO: checking for $ac_word" >&5
7816 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7817 if test "${ac_cv_path_GMSGFMT+set}" = set; then
7818   echo $ECHO_N "(cached) $ECHO_C" >&6
7819 else
7820   case $GMSGFMT in
7821   [\\/]* | ?:[\\/]*)
7822   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7823   ;;
7824   *)
7825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7826 for as_dir in $PATH
7827 do
7828   IFS=$as_save_IFS
7829   test -z "$as_dir" && as_dir=.
7830   for ac_exec_ext in '' $ac_executable_extensions; do
7831   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7832     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7833     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7834     break 2
7835   fi
7836 done
7837 done
7838
7839   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7840   ;;
7841 esac
7842 fi
7843 GMSGFMT=$ac_cv_path_GMSGFMT
7844
7845 if test -n "$GMSGFMT"; then
7846   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
7847 echo "${ECHO_T}$GMSGFMT" >&6
7848 else
7849   echo "$as_me:$LINENO: result: no" >&5
7850 echo "${ECHO_T}no" >&6
7851 fi
7852
7853               # Extract the first word of "xgettext", so it can be a program name with args.
7854 set dummy xgettext; ac_word=$2
7855 echo "$as_me:$LINENO: checking for $ac_word" >&5
7856 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7857 if test "${ac_cv_path_XGETTEXT+set}" = set; then
7858   echo $ECHO_N "(cached) $ECHO_C" >&6
7859 else
7860   case "$XGETTEXT" in
7861   /*)
7862   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7863   ;;
7864   *)
7865   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7866   for ac_dir in $PATH; do
7867     test -z "$ac_dir" && ac_dir=.
7868     if test -f $ac_dir/$ac_word; then
7869       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7870         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7871         break
7872       fi
7873     fi
7874   done
7875   IFS="$ac_save_ifs"
7876   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7877   ;;
7878 esac
7879 fi
7880 XGETTEXT="$ac_cv_path_XGETTEXT"
7881 if test -n "$XGETTEXT"; then
7882   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
7883 echo "${ECHO_T}$XGETTEXT" >&6
7884 else
7885   echo "$as_me:$LINENO: result: no" >&5
7886 echo "${ECHO_T}no" >&6
7887 fi
7888
7889               cat >conftest.$ac_ext <<_ACEOF
7890 #line $LINENO "configure"
7891 #include "confdefs.h"
7892
7893 #ifdef F77_DUMMY_MAIN
7894 #  ifdef __cplusplus
7895      extern "C"
7896 #  endif
7897    int F77_DUMMY_MAIN() { return 1; }
7898 #endif
7899 int
7900 main ()
7901 {
7902 extern int _nl_msg_cat_cntr;
7903                              return _nl_msg_cat_cntr
7904   ;
7905   return 0;
7906 }
7907 _ACEOF
7908 rm -f conftest.$ac_objext conftest$ac_exeext
7909 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7910   (eval $ac_link) 2>&5
7911   ac_status=$?
7912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7913   (exit $ac_status); } &&
7914          { ac_try='test -s conftest$ac_exeext'
7915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7916   (eval $ac_try) 2>&5
7917   ac_status=$?
7918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7919   (exit $ac_status); }; }; then
7920   CATOBJEXT=.gmo
7921                  DATADIRNAME=share
7922 else
7923   echo "$as_me: failed program was:" >&5
7924 cat conftest.$ac_ext >&5
7925 CATOBJEXT=.mo
7926                  DATADIRNAME=lib
7927 fi
7928 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7929               INSTOBJEXT=.mo
7930             fi
7931           fi
7932
7933           # Added by Martin Baulig 12/15/98 for libc5 systems
7934           if test "$gt_cv_func_dgettext_libc" != "yes" \
7935             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
7936             INTLLIBS=-lintl
7937             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
7938           fi
7939
7940 fi
7941
7942
7943
7944       if test "$CATOBJEXT" = "NONE"; then
7945                         nls_cv_use_gnu_gettext=yes
7946       fi
7947     fi
7948
7949     if test "$nls_cv_use_gnu_gettext" != "yes"; then
7950
7951 cat >>confdefs.h <<\_ACEOF
7952 #define ENABLE_NLS 1
7953 _ACEOF
7954
7955     else
7956             CATOBJEXT=
7957     fi
7958
7959         if test "$XGETTEXT" != ":"; then
7960                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7961         : ;
7962       else
7963         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
7964 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
7965         XGETTEXT=":"
7966       fi
7967     fi
7968
7969     # We need to process the po/ directory.
7970     POSUB=po
7971
7972     ac_config_commands="$ac_config_commands default-2"
7973
7974
7975                 for lang in $ALL_LINGUAS; do
7976       GMOFILES="$GMOFILES $lang.gmo"
7977       POFILES="$POFILES $lang.po"
7978     done
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992    if test "x$CATOBJEXT" != "x"; then
7993      if test "x$ALL_LINGUAS" = "x"; then
7994        LINGUAS=
7995      else
7996        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
7997 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
7998        NEW_LINGUAS=
7999        for lang in ${LINGUAS=$ALL_LINGUAS}; do
8000          case "$ALL_LINGUAS" in
8001           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
8002          esac
8003        done
8004        LINGUAS=$NEW_LINGUAS
8005        echo "$as_me:$LINENO: result: $LINGUAS" >&5
8006 echo "${ECHO_T}$LINGUAS" >&6
8007      fi
8008
8009           if test -n "$LINGUAS"; then
8010        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8011      fi
8012    fi
8013
8014             test -d po || mkdir po
8015    if test "$CATOBJEXT" = ".cat"; then
8016      if test "${ac_cv_header_linux_version_h+set}" = set; then
8017   echo "$as_me:$LINENO: checking for linux/version.h" >&5
8018 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8019 if test "${ac_cv_header_linux_version_h+set}" = set; then
8020   echo $ECHO_N "(cached) $ECHO_C" >&6
8021 fi
8022 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8023 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8024 else
8025   # Is the header compilable?
8026 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
8027 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
8028 cat >conftest.$ac_ext <<_ACEOF
8029 #line $LINENO "configure"
8030 #include "confdefs.h"
8031 $ac_includes_default
8032 #include <linux/version.h>
8033 _ACEOF
8034 rm -f conftest.$ac_objext
8035 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8036   (eval $ac_compile) 2>&5
8037   ac_status=$?
8038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8039   (exit $ac_status); } &&
8040          { ac_try='test -s conftest.$ac_objext'
8041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8042   (eval $ac_try) 2>&5
8043   ac_status=$?
8044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8045   (exit $ac_status); }; }; then
8046   ac_header_compiler=yes
8047 else
8048   echo "$as_me: failed program was:" >&5
8049 cat conftest.$ac_ext >&5
8050 ac_header_compiler=no
8051 fi
8052 rm -f conftest.$ac_objext conftest.$ac_ext
8053 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8054 echo "${ECHO_T}$ac_header_compiler" >&6
8055
8056 # Is the header present?
8057 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
8058 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
8059 cat >conftest.$ac_ext <<_ACEOF
8060 #line $LINENO "configure"
8061 #include "confdefs.h"
8062 #include <linux/version.h>
8063 _ACEOF
8064 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8065   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8066   ac_status=$?
8067   egrep -v '^ *\+' conftest.er1 >conftest.err
8068   rm -f conftest.er1
8069   cat conftest.err >&5
8070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8071   (exit $ac_status); } >/dev/null; then
8072   if test -s conftest.err; then
8073     ac_cpp_err=$ac_c_preproc_warn_flag
8074   else
8075     ac_cpp_err=
8076   fi
8077 else
8078   ac_cpp_err=yes
8079 fi
8080 if test -z "$ac_cpp_err"; then
8081   ac_header_preproc=yes
8082 else
8083   echo "$as_me: failed program was:" >&5
8084   cat conftest.$ac_ext >&5
8085   ac_header_preproc=no
8086 fi
8087 rm -f conftest.err conftest.$ac_ext
8088 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8089 echo "${ECHO_T}$ac_header_preproc" >&6
8090
8091 # So?  What about this header?
8092 case $ac_header_compiler:$ac_header_preproc in
8093   yes:no )
8094     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
8095 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8096     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8097 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;};;
8098   no:yes )
8099     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
8100 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
8101     { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
8102 echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
8103     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8104 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;};;
8105 esac
8106 echo "$as_me:$LINENO: checking for linux/version.h" >&5
8107 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8108 if test "${ac_cv_header_linux_version_h+set}" = set; then
8109   echo $ECHO_N "(cached) $ECHO_C" >&6
8110 else
8111   ac_cv_header_linux_version_h=$ac_header_preproc
8112 fi
8113 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8114 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8115
8116 fi
8117 if test $ac_cv_header_linux_version_h = yes; then
8118   msgformat=linux
8119 else
8120   msgformat=xopen
8121 fi
8122
8123
8124
8125                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
8126    fi
8127
8128             MKINSTALLDIRS=
8129 #
8130 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
8131 #
8132 #   if test -n "$ac_aux_dir"; then
8133 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8134 #   fi
8135    if test -z "$MKINSTALLDIRS"; then
8136      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8137    fi
8138
8139    # jwz: you know what, screw it.  Let's just use the version that I
8140    # already computed in configure.in, instead of this version that came
8141    # with the i18n crud, ok?
8142    MKINSTALLDIRS="$INSTALL_DIRS"
8143
8144
8145
8146
8147          test -d po || mkdir po
8148    if test "x$srcdir" != "x."; then
8149      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8150        posrcprefix="$srcdir/"
8151      else
8152        posrcprefix="../$srcdir/"
8153      fi
8154    else
8155      posrcprefix="../"
8156    fi
8157    rm -f po/POTFILES
8158    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8159         < $srcdir/po/POTFILES.in > po/POTFILES
8160
8161
8162
8163 ###############################################################################
8164 #
8165 #       Check for -lXmu (some fucked up vendors don't ship it...)
8166 #
8167 ###############################################################################
8168
8169 have_xmu=no
8170
8171   ac_save_CPPFLAGS="$CPPFLAGS"
8172   if test \! -z "$includedir" ; then
8173     CPPFLAGS="$CPPFLAGS -I$includedir"
8174   fi
8175   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8176   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
8177 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
8178 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
8179   echo $ECHO_N "(cached) $ECHO_C" >&6
8180 else
8181   cat >conftest.$ac_ext <<_ACEOF
8182 #line $LINENO "configure"
8183 #include "confdefs.h"
8184 #include <stdlib.h>
8185                    #include <stdio.h>
8186                    #include <X11/Intrinsic.h>
8187
8188 #include <X11/Xmu/Error.h>
8189 _ACEOF
8190 rm -f conftest.$ac_objext
8191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8192   (eval $ac_compile) 2>&5
8193   ac_status=$?
8194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8195   (exit $ac_status); } &&
8196          { ac_try='test -s conftest.$ac_objext'
8197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8198   (eval $ac_try) 2>&5
8199   ac_status=$?
8200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8201   (exit $ac_status); }; }; then
8202   ac_cv_header_X11_Xmu_Error_h=yes
8203 else
8204   echo "$as_me: failed program was:" >&5
8205 cat conftest.$ac_ext >&5
8206 ac_cv_header_X11_Xmu_Error_h=no
8207 fi
8208 rm -f conftest.$ac_objext conftest.$ac_ext
8209 fi
8210 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
8211 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
8212 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
8213   have_xmu=yes
8214 fi
8215
8216
8217   CPPFLAGS="$ac_save_CPPFLAGS"
8218 if test "$have_xmu" = no ; then
8219   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8220   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8221   XMU_LIBS=''
8222 else
8223   XMU_SRCS=''
8224   XMU_OBJS=''
8225   XMU_LIBS='-lXmu'
8226   cat >>confdefs.h <<\_ACEOF
8227 #define HAVE_XMU 1
8228 _ACEOF
8229
8230 fi
8231
8232
8233 ###############################################################################
8234 #
8235 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8236 #       See comp.windows.x FAQ question 124.  The right fix is to
8237 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8238 #
8239 ###############################################################################
8240
8241 if test "$have_xmu" = yes ; then
8242   case "$host" in
8243     *-sunos4*)
8244     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8245 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
8246 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
8247   echo $ECHO_N "(cached) $ECHO_C" >&6
8248 else
8249   ac_save_LDFLAGS="$LDFLAGS"
8250                     if test \! -z "$x_libraries" ; then
8251                       LDFLAGS="$LDFLAGS -L$x_libraries"
8252                     fi
8253                     # Note: this trick never works!  (Generally.)
8254                     # We're only getting away with using AC_TRY_LINK
8255                     # with X libraries because we know it's SunOS.
8256                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8257                     cat >conftest.$ac_ext <<_ACEOF
8258 #line $LINENO "configure"
8259 #include "confdefs.h"
8260
8261 #ifdef F77_DUMMY_MAIN
8262 #  ifdef __cplusplus
8263      extern "C"
8264 #  endif
8265    int F77_DUMMY_MAIN() { return 1; }
8266 #endif
8267 int
8268 main ()
8269 {
8270
8271   ;
8272   return 0;
8273 }
8274 _ACEOF
8275 rm -f conftest.$ac_objext conftest$ac_exeext
8276 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8277   (eval $ac_link) 2>&5
8278   ac_status=$?
8279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8280   (exit $ac_status); } &&
8281          { ac_try='test -s conftest$ac_exeext'
8282   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8283   (eval $ac_try) 2>&5
8284   ac_status=$?
8285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8286   (exit $ac_status); }; }; then
8287   ac_cv_sunos_xmu_bug=no
8288 else
8289   echo "$as_me: failed program was:" >&5
8290 cat conftest.$ac_ext >&5
8291 ac_cv_sunos_xmu_bug=yes
8292 fi
8293 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8294                     LDFLAGS="$ac_save_LDFLAGS"
8295 fi
8296 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
8297 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
8298     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8299       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
8300 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
8301 if test "${ac_cv_ld_static+set}" = set; then
8302   echo $ECHO_N "(cached) $ECHO_C" >&6
8303 else
8304   ac_save_LDFLAGS="$LDFLAGS"
8305                       LDFLAGS="$LDFLAGS -static"
8306                       cat >conftest.$ac_ext <<_ACEOF
8307 #line $LINENO "configure"
8308 #include "confdefs.h"
8309
8310 #ifdef F77_DUMMY_MAIN
8311 #  ifdef __cplusplus
8312      extern "C"
8313 #  endif
8314    int F77_DUMMY_MAIN() { return 1; }
8315 #endif
8316 int
8317 main ()
8318 {
8319
8320   ;
8321   return 0;
8322 }
8323 _ACEOF
8324 rm -f conftest.$ac_objext conftest$ac_exeext
8325 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8326   (eval $ac_link) 2>&5
8327   ac_status=$?
8328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8329   (exit $ac_status); } &&
8330          { ac_try='test -s conftest$ac_exeext'
8331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8332   (eval $ac_try) 2>&5
8333   ac_status=$?
8334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8335   (exit $ac_status); }; }; then
8336   ac_cv_ld_static=yes
8337 else
8338   echo "$as_me: failed program was:" >&5
8339 cat conftest.$ac_ext >&5
8340 ac_cv_ld_static=no
8341 fi
8342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8343                     LDFLAGS="$ac_save_LDFLAGS"
8344 fi
8345 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
8346 echo "${ECHO_T}$ac_cv_ld_static" >&6
8347       if test "$ac_cv_ld_static" = yes ; then
8348         LDFLAGS="$LDFLAGS -static"
8349       else
8350         LDFLAGS="$LDFLAGS -Bstatic"
8351       fi
8352     fi
8353     ;;
8354   esac
8355 fi
8356
8357
8358 ###############################################################################
8359 #
8360 #       Handle the --with-hackdir option
8361 #
8362 ###############################################################################
8363
8364 have_hackdir=yes
8365 with_hackdir_req=unspecified
8366
8367 # Check whether --with-hackdir or --without-hackdir was given.
8368 if test "${with_hackdir+set}" = set; then
8369   withval="$with_hackdir"
8370   with_hackdir="$withval"; with_hackdir_req="$withval"
8371 else
8372   with_hackdir=yes
8373 fi;
8374
8375 if test x"$with_hackdir" = xyes; then
8376   HACKDIR='${exec_prefix}/lib/xscreensaver'
8377 elif test x"$with_hackdir" = xno; then
8378   HACKDIR='${bindir}'
8379 else
8380   # there must be a better way than this...
8381   if test -z "`echo $with_hackdir | sed 's@^/.*@@'`" ; then
8382     # absolute path
8383     HACKDIR=$with_hackdir
8384   else
8385     # relative path
8386     HACKDIR="\${exec_prefix}$with_hackdir"
8387   fi
8388 fi
8389
8390 # canonicalize slashes.
8391 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8392
8393 # This option used to be called --enable-subdir; make sure that is no longer
8394 # used, since configure brain-damagedly ignores unknown --enable options.
8395
8396 obsolete_enable=
8397 # Check whether --enable-subdir or --disable-subdir was given.
8398 if test "${enable_subdir+set}" = set; then
8399   enableval="$enable_subdir"
8400   obsolete_enable=yes
8401 fi;
8402 if test -n "$obsolete_enable"; then
8403   echo "error: the --enable-subdir option has been replaced with"
8404   echo "       the new --with-hackdir option; see \`configure --help'"
8405   echo "       for more information."
8406   exit 1
8407 fi
8408
8409
8410 ###############################################################################
8411 #
8412 #       Handle the --with-configdir option
8413 #
8414 ###############################################################################
8415
8416 have_configdir=yes
8417 with_configdir_req=unspecified
8418
8419 # Check whether --with-configdir or --without-configdir was given.
8420 if test "${with_configdir+set}" = set; then
8421   withval="$with_configdir"
8422   with_configdir="$withval"; with_configdir_req="$withval"
8423 else
8424   with_configdir=yes
8425 fi;
8426
8427 if test x"$with_configdir" = xyes; then
8428   # filled in later...
8429   HACK_CONF_DIR=''
8430 elif test x"$with_configdir" = xno; then
8431   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8432   exit 1
8433 else
8434   # there must be a better way than this...
8435   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8436     # absolute path
8437     HACK_CONF_DIR=$with_configdir
8438   else
8439     # relative path
8440     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8441   fi
8442 fi
8443
8444
8445
8446
8447 ###############################################################################
8448 #
8449 #       Check for the SGI SCREEN_SAVER server extension.
8450 #
8451 ###############################################################################
8452
8453 have_sgi=no
8454 with_sgi_req=unspecified
8455
8456 # Check whether --with-sgi-ext or --without-sgi-ext was given.
8457 if test "${with_sgi_ext+set}" = set; then
8458   withval="$with_sgi_ext"
8459   with_sgi="$withval"; with_sgi_req="$withval"
8460 else
8461   with_sgi=yes
8462 fi;
8463
8464
8465    case "$with_sgi" in
8466     yes) ;;
8467     no)  ;;
8468
8469     /*)
8470      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
8471 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
8472      d=$with_sgi/include
8473      if test -d $d; then
8474        X_CFLAGS="-I$d $X_CFLAGS"
8475        echo "$as_me:$LINENO: result: $d" >&5
8476 echo "${ECHO_T}$d" >&6
8477      else
8478        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8479 echo "${ECHO_T}not found ($d: no such directory)" >&6
8480      fi
8481
8482      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
8483 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
8484      d=$with_sgi/lib
8485      if test -d $d; then
8486        X_LIBS="-L$d $X_LIBS"
8487        echo "$as_me:$LINENO: result: $d" >&5
8488 echo "${ECHO_T}$d" >&6
8489      else
8490        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8491 echo "${ECHO_T}not found ($d: no such directory)" >&6
8492      fi
8493
8494      # replace the directory string with "yes".
8495      with_sgi_req="yes"
8496      with_sgi=$with_sgi_req
8497      ;;
8498
8499     *)
8500      echo ""
8501      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
8502      echo "       If it is a directory, then \`DIR/include' will be added to"
8503      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8504      exit 1
8505      ;;
8506    esac
8507
8508
8509 if test "$with_sgi" = yes; then
8510
8511   ac_save_CPPFLAGS="$CPPFLAGS"
8512   if test \! -z "$includedir" ; then
8513     CPPFLAGS="$CPPFLAGS -I$includedir"
8514   fi
8515   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8516   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
8517 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
8518 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
8519   echo $ECHO_N "(cached) $ECHO_C" >&6
8520 else
8521   cat >conftest.$ac_ext <<_ACEOF
8522 #line $LINENO "configure"
8523 #include "confdefs.h"
8524 #include <X11/Xlib.h>
8525
8526 #include <X11/extensions/XScreenSaver.h>
8527 _ACEOF
8528 rm -f conftest.$ac_objext
8529 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8530   (eval $ac_compile) 2>&5
8531   ac_status=$?
8532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8533   (exit $ac_status); } &&
8534          { ac_try='test -s conftest.$ac_objext'
8535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8536   (eval $ac_try) 2>&5
8537   ac_status=$?
8538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539   (exit $ac_status); }; }; then
8540   ac_cv_header_X11_extensions_XScreenSaver_h=yes
8541 else
8542   echo "$as_me: failed program was:" >&5
8543 cat conftest.$ac_ext >&5
8544 ac_cv_header_X11_extensions_XScreenSaver_h=no
8545 fi
8546 rm -f conftest.$ac_objext conftest.$ac_ext
8547 fi
8548 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
8549 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
8550 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
8551   have_sgi=yes
8552                      cat >>confdefs.h <<\_ACEOF
8553 #define HAVE_SGI_SAVER_EXTENSION 1
8554 _ACEOF
8555
8556 fi
8557
8558
8559   CPPFLAGS="$ac_save_CPPFLAGS"
8560
8561 elif test "$with_sgi" != no; then
8562   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
8563   exit 1
8564 fi
8565
8566
8567 ###############################################################################
8568 #
8569 #       Check for the MIT-SCREEN-SAVER server extension.
8570 #
8571 ###############################################################################
8572
8573 have_mit=no
8574 with_mit_req=unspecified
8575
8576 # Check whether --with-mit-ext or --without-mit-ext was given.
8577 if test "${with_mit_ext+set}" = set; then
8578   withval="$with_mit_ext"
8579   with_mit="$withval"; with_mit_req="$withval"
8580 else
8581   with_mit=yes
8582 fi;
8583
8584
8585    case "$with_mit" in
8586     yes) ;;
8587     no)  ;;
8588
8589     /*)
8590      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER headers" >&5
8591 echo $ECHO_N "checking for MIT-SCREEN-SAVER headers... $ECHO_C" >&6
8592      d=$with_mit/include
8593      if test -d $d; then
8594        X_CFLAGS="-I$d $X_CFLAGS"
8595        echo "$as_me:$LINENO: result: $d" >&5
8596 echo "${ECHO_T}$d" >&6
8597      else
8598        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8599 echo "${ECHO_T}not found ($d: no such directory)" >&6
8600      fi
8601
8602      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER libs" >&5
8603 echo $ECHO_N "checking for MIT-SCREEN-SAVER libs... $ECHO_C" >&6
8604      d=$with_mit/lib
8605      if test -d $d; then
8606        X_LIBS="-L$d $X_LIBS"
8607        echo "$as_me:$LINENO: result: $d" >&5
8608 echo "${ECHO_T}$d" >&6
8609      else
8610        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8611 echo "${ECHO_T}not found ($d: no such directory)" >&6
8612      fi
8613
8614      # replace the directory string with "yes".
8615      with_mit_req="yes"
8616      with_mit=$with_mit_req
8617      ;;
8618
8619     *)
8620      echo ""
8621      echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
8622      echo "       If it is a directory, then \`DIR/include' will be added to"
8623      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8624      exit 1
8625      ;;
8626    esac
8627
8628
8629 if test "$with_mit" = yes; then
8630
8631   ac_save_CPPFLAGS="$CPPFLAGS"
8632   if test \! -z "$includedir" ; then
8633     CPPFLAGS="$CPPFLAGS -I$includedir"
8634   fi
8635   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8636   echo "$as_me:$LINENO: checking for X11/extensions/scrnsaver.h" >&5
8637 echo $ECHO_N "checking for X11/extensions/scrnsaver.h... $ECHO_C" >&6
8638 if test "${ac_cv_header_X11_extensions_scrnsaver_h+set}" = set; then
8639   echo $ECHO_N "(cached) $ECHO_C" >&6
8640 else
8641   cat >conftest.$ac_ext <<_ACEOF
8642 #line $LINENO "configure"
8643 #include "confdefs.h"
8644 #include <X11/Xlib.h>
8645
8646 #include <X11/extensions/scrnsaver.h>
8647 _ACEOF
8648 rm -f conftest.$ac_objext
8649 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8650   (eval $ac_compile) 2>&5
8651   ac_status=$?
8652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8653   (exit $ac_status); } &&
8654          { ac_try='test -s conftest.$ac_objext'
8655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8656   (eval $ac_try) 2>&5
8657   ac_status=$?
8658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8659   (exit $ac_status); }; }; then
8660   ac_cv_header_X11_extensions_scrnsaver_h=yes
8661 else
8662   echo "$as_me: failed program was:" >&5
8663 cat conftest.$ac_ext >&5
8664 ac_cv_header_X11_extensions_scrnsaver_h=no
8665 fi
8666 rm -f conftest.$ac_objext conftest.$ac_ext
8667 fi
8668 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_scrnsaver_h" >&5
8669 echo "${ECHO_T}$ac_cv_header_X11_extensions_scrnsaver_h" >&6
8670 if test $ac_cv_header_X11_extensions_scrnsaver_h = yes; then
8671   have_mit=yes
8672 fi
8673
8674
8675   CPPFLAGS="$ac_save_CPPFLAGS"
8676
8677   # Now check to see if it's really in the library; XF86Free-3.3 ships
8678   # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
8679   #
8680   if test "$have_mit" = yes; then
8681
8682   ac_save_CPPFLAGS="$CPPFLAGS"
8683   ac_save_LDFLAGS="$LDFLAGS"
8684 #  ac_save_LIBS="$LIBS"
8685
8686   if test \! -z "$includedir" ; then
8687     CPPFLAGS="$CPPFLAGS -I$includedir"
8688   fi
8689   # note: $X_CFLAGS includes $x_includes
8690   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8691
8692   if test \! -z "$libdir" ; then
8693     LDFLAGS="$LDFLAGS -L$libdir"
8694   fi
8695   # note: $X_LIBS includes $x_libraries
8696   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8697
8698   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXext" >&5
8699 echo $ECHO_N "checking for XScreenSaverRegister in -lXext... $ECHO_C" >&6
8700 if test "${ac_cv_lib_Xext_XScreenSaverRegister+set}" = set; then
8701   echo $ECHO_N "(cached) $ECHO_C" >&6
8702 else
8703   ac_check_lib_save_LIBS=$LIBS
8704 LIBS="-lXext -lm $LIBS"
8705 cat >conftest.$ac_ext <<_ACEOF
8706 #line $LINENO "configure"
8707 #include "confdefs.h"
8708
8709 /* Override any gcc2 internal prototype to avoid an error.  */
8710 #ifdef __cplusplus
8711 extern "C"
8712 #endif
8713 /* We use char because int might match the return type of a gcc2
8714    builtin and then its argument prototype would still apply.  */
8715 char XScreenSaverRegister ();
8716 #ifdef F77_DUMMY_MAIN
8717 #  ifdef __cplusplus
8718      extern "C"
8719 #  endif
8720    int F77_DUMMY_MAIN() { return 1; }
8721 #endif
8722 int
8723 main ()
8724 {
8725 XScreenSaverRegister ();
8726   ;
8727   return 0;
8728 }
8729 _ACEOF
8730 rm -f conftest.$ac_objext conftest$ac_exeext
8731 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8732   (eval $ac_link) 2>&5
8733   ac_status=$?
8734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8735   (exit $ac_status); } &&
8736          { ac_try='test -s conftest$ac_exeext'
8737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8738   (eval $ac_try) 2>&5
8739   ac_status=$?
8740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8741   (exit $ac_status); }; }; then
8742   ac_cv_lib_Xext_XScreenSaverRegister=yes
8743 else
8744   echo "$as_me: failed program was:" >&5
8745 cat conftest.$ac_ext >&5
8746 ac_cv_lib_Xext_XScreenSaverRegister=no
8747 fi
8748 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8749 LIBS=$ac_check_lib_save_LIBS
8750 fi
8751 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XScreenSaverRegister" >&5
8752 echo "${ECHO_T}$ac_cv_lib_Xext_XScreenSaverRegister" >&6
8753 if test $ac_cv_lib_Xext_XScreenSaverRegister = yes; then
8754   true
8755 else
8756   have_mit=no
8757 fi
8758
8759   CPPFLAGS="$ac_save_CPPFLAGS"
8760   LDFLAGS="$ac_save_LDFLAGS"
8761 #  LIBS="$ac_save_LIBS"
8762
8763
8764     if test "$have_mit" = no; then
8765       # Fuck!  Looks like XF86Free-3.3 actually puts it in XExExt instead
8766       # of in Xext.  Thank you master, may I have another.
8767
8768   ac_save_CPPFLAGS="$CPPFLAGS"
8769   ac_save_LDFLAGS="$LDFLAGS"
8770 #  ac_save_LIBS="$LIBS"
8771
8772   if test \! -z "$includedir" ; then
8773     CPPFLAGS="$CPPFLAGS -I$includedir"
8774   fi
8775   # note: $X_CFLAGS includes $x_includes
8776   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8777
8778   if test \! -z "$libdir" ; then
8779     LDFLAGS="$LDFLAGS -L$libdir"
8780   fi
8781   # note: $X_LIBS includes $x_libraries
8782   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8783
8784   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXExExt" >&5
8785 echo $ECHO_N "checking for XScreenSaverRegister in -lXExExt... $ECHO_C" >&6
8786 if test "${ac_cv_lib_XExExt_XScreenSaverRegister+set}" = set; then
8787   echo $ECHO_N "(cached) $ECHO_C" >&6
8788 else
8789   ac_check_lib_save_LIBS=$LIBS
8790 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
8791 cat >conftest.$ac_ext <<_ACEOF
8792 #line $LINENO "configure"
8793 #include "confdefs.h"
8794
8795 /* Override any gcc2 internal prototype to avoid an error.  */
8796 #ifdef __cplusplus
8797 extern "C"
8798 #endif
8799 /* We use char because int might match the return type of a gcc2
8800    builtin and then its argument prototype would still apply.  */
8801 char XScreenSaverRegister ();
8802 #ifdef F77_DUMMY_MAIN
8803 #  ifdef __cplusplus
8804      extern "C"
8805 #  endif
8806    int F77_DUMMY_MAIN() { return 1; }
8807 #endif
8808 int
8809 main ()
8810 {
8811 XScreenSaverRegister ();
8812   ;
8813   return 0;
8814 }
8815 _ACEOF
8816 rm -f conftest.$ac_objext conftest$ac_exeext
8817 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8818   (eval $ac_link) 2>&5
8819   ac_status=$?
8820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8821   (exit $ac_status); } &&
8822          { ac_try='test -s conftest$ac_exeext'
8823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8824   (eval $ac_try) 2>&5
8825   ac_status=$?
8826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8827   (exit $ac_status); }; }; then
8828   ac_cv_lib_XExExt_XScreenSaverRegister=yes
8829 else
8830   echo "$as_me: failed program was:" >&5
8831 cat conftest.$ac_ext >&5
8832 ac_cv_lib_XExExt_XScreenSaverRegister=no
8833 fi
8834 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8835 LIBS=$ac_check_lib_save_LIBS
8836 fi
8837 echo "$as_me:$LINENO: result: $ac_cv_lib_XExExt_XScreenSaverRegister" >&5
8838 echo "${ECHO_T}$ac_cv_lib_XExExt_XScreenSaverRegister" >&6
8839 if test $ac_cv_lib_XExExt_XScreenSaverRegister = yes; then
8840   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
8841 else
8842   true
8843 fi
8844
8845   CPPFLAGS="$ac_save_CPPFLAGS"
8846   LDFLAGS="$ac_save_LDFLAGS"
8847 #  LIBS="$ac_save_LIBS"
8848
8849     fi
8850
8851     if test "$have_mit" = no; then
8852       # Double fuck!  Looks like some versions of XFree86 (whichever version
8853       # it is that comes with RedHat Linux 2.0 -- I can't find a version
8854       # number) put this garbage in Xss instead of Xext.  Thank you master,
8855       #  may I have another.
8856
8857   ac_save_CPPFLAGS="$CPPFLAGS"
8858   ac_save_LDFLAGS="$LDFLAGS"
8859 #  ac_save_LIBS="$LIBS"
8860
8861   if test \! -z "$includedir" ; then
8862     CPPFLAGS="$CPPFLAGS -I$includedir"
8863   fi
8864   # note: $X_CFLAGS includes $x_includes
8865   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8866
8867   if test \! -z "$libdir" ; then
8868     LDFLAGS="$LDFLAGS -L$libdir"
8869   fi
8870   # note: $X_LIBS includes $x_libraries
8871   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8872
8873   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXss" >&5
8874 echo $ECHO_N "checking for XScreenSaverRegister in -lXss... $ECHO_C" >&6
8875 if test "${ac_cv_lib_Xss_XScreenSaverRegister+set}" = set; then
8876   echo $ECHO_N "(cached) $ECHO_C" >&6
8877 else
8878   ac_check_lib_save_LIBS=$LIBS
8879 LIBS="-lXss -lX11 -lXext -lm $LIBS"
8880 cat >conftest.$ac_ext <<_ACEOF
8881 #line $LINENO "configure"
8882 #include "confdefs.h"
8883
8884 /* Override any gcc2 internal prototype to avoid an error.  */
8885 #ifdef __cplusplus
8886 extern "C"
8887 #endif
8888 /* We use char because int might match the return type of a gcc2
8889    builtin and then its argument prototype would still apply.  */
8890 char XScreenSaverRegister ();
8891 #ifdef F77_DUMMY_MAIN
8892 #  ifdef __cplusplus
8893      extern "C"
8894 #  endif
8895    int F77_DUMMY_MAIN() { return 1; }
8896 #endif
8897 int
8898 main ()
8899 {
8900 XScreenSaverRegister ();
8901   ;
8902   return 0;
8903 }
8904 _ACEOF
8905 rm -f conftest.$ac_objext conftest$ac_exeext
8906 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8907   (eval $ac_link) 2>&5
8908   ac_status=$?
8909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8910   (exit $ac_status); } &&
8911          { ac_try='test -s conftest$ac_exeext'
8912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8913   (eval $ac_try) 2>&5
8914   ac_status=$?
8915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8916   (exit $ac_status); }; }; then
8917   ac_cv_lib_Xss_XScreenSaverRegister=yes
8918 else
8919   echo "$as_me: failed program was:" >&5
8920 cat conftest.$ac_ext >&5
8921 ac_cv_lib_Xss_XScreenSaverRegister=no
8922 fi
8923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8924 LIBS=$ac_check_lib_save_LIBS
8925 fi
8926 echo "$as_me:$LINENO: result: $ac_cv_lib_Xss_XScreenSaverRegister" >&5
8927 echo "${ECHO_T}$ac_cv_lib_Xss_XScreenSaverRegister" >&6
8928 if test $ac_cv_lib_Xss_XScreenSaverRegister = yes; then
8929   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
8930 else
8931   true
8932 fi
8933
8934   CPPFLAGS="$ac_save_CPPFLAGS"
8935   LDFLAGS="$ac_save_LDFLAGS"
8936 #  LIBS="$ac_save_LIBS"
8937
8938     fi
8939
8940   if test "$have_mit" = yes; then
8941     cat >>confdefs.h <<\_ACEOF
8942 #define HAVE_MIT_SAVER_EXTENSION 1
8943 _ACEOF
8944
8945   fi
8946
8947   fi
8948
8949 elif test "$with_mit" != no; then
8950   echo "error: must be yes or no: --with-mit-ext=$with_mit"
8951   exit 1
8952 fi
8953
8954
8955 ###############################################################################
8956 #
8957 #       Check for the XIDLE server extension.
8958 #
8959 ###############################################################################
8960
8961 have_xidle=no
8962 with_xidle_req=unspecified
8963
8964 # Check whether --with-xidle-ext or --without-xidle-ext was given.
8965 if test "${with_xidle_ext+set}" = set; then
8966   withval="$with_xidle_ext"
8967   with_xidle="$withval"; with_xidle_req="$withval"
8968 else
8969   with_xidle=yes
8970 fi;
8971
8972
8973    case "$with_xidle" in
8974     yes) ;;
8975     no)  ;;
8976
8977     /*)
8978      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
8979 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
8980      d=$with_xidle/include
8981      if test -d $d; then
8982        X_CFLAGS="-I$d $X_CFLAGS"
8983        echo "$as_me:$LINENO: result: $d" >&5
8984 echo "${ECHO_T}$d" >&6
8985      else
8986        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8987 echo "${ECHO_T}not found ($d: no such directory)" >&6
8988      fi
8989
8990      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
8991 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
8992      d=$with_xidle/lib
8993      if test -d $d; then
8994        X_LIBS="-L$d $X_LIBS"
8995        echo "$as_me:$LINENO: result: $d" >&5
8996 echo "${ECHO_T}$d" >&6
8997      else
8998        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8999 echo "${ECHO_T}not found ($d: no such directory)" >&6
9000      fi
9001
9002      # replace the directory string with "yes".
9003      with_xidle_req="yes"
9004      with_xidle=$with_xidle_req
9005      ;;
9006
9007     *)
9008      echo ""
9009      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
9010      echo "       If it is a directory, then \`DIR/include' will be added to"
9011      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9012      exit 1
9013      ;;
9014    esac
9015
9016
9017 if test "$with_xidle" = yes; then
9018
9019   ac_save_CPPFLAGS="$CPPFLAGS"
9020   if test \! -z "$includedir" ; then
9021     CPPFLAGS="$CPPFLAGS -I$includedir"
9022   fi
9023   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9024   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
9025 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
9026 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
9027   echo $ECHO_N "(cached) $ECHO_C" >&6
9028 else
9029   cat >conftest.$ac_ext <<_ACEOF
9030 #line $LINENO "configure"
9031 #include "confdefs.h"
9032 #include <X11/Xlib.h>
9033
9034 #include <X11/extensions/xidle.h>
9035 _ACEOF
9036 rm -f conftest.$ac_objext
9037 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9038   (eval $ac_compile) 2>&5
9039   ac_status=$?
9040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9041   (exit $ac_status); } &&
9042          { ac_try='test -s conftest.$ac_objext'
9043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9044   (eval $ac_try) 2>&5
9045   ac_status=$?
9046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9047   (exit $ac_status); }; }; then
9048   ac_cv_header_X11_extensions_xidle_h=yes
9049 else
9050   echo "$as_me: failed program was:" >&5
9051 cat conftest.$ac_ext >&5
9052 ac_cv_header_X11_extensions_xidle_h=no
9053 fi
9054 rm -f conftest.$ac_objext conftest.$ac_ext
9055 fi
9056 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
9057 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
9058 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
9059   have_xidle=yes
9060                      cat >>confdefs.h <<\_ACEOF
9061 #define HAVE_XIDLE_EXTENSION 1
9062 _ACEOF
9063
9064 fi
9065
9066
9067   CPPFLAGS="$ac_save_CPPFLAGS"
9068 elif test "$with_xidle" != no; then
9069   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
9070   exit 1
9071 fi
9072
9073
9074 ###############################################################################
9075 #
9076 #       Check for the SGI-VIDEO-CONTROL server extension.
9077 #
9078 ###############################################################################
9079
9080 have_sgivc=no
9081 with_sgivc_req=unspecified
9082
9083 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
9084 if test "${with_sgivc_ext+set}" = set; then
9085   withval="$with_sgivc_ext"
9086   with_sgivc="$withval"; with_sgivc_req="$withval"
9087 else
9088   with_sgivc=yes
9089 fi;
9090
9091
9092    case "$with_sgivc" in
9093     yes) ;;
9094     no)  ;;
9095
9096     /*)
9097      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
9098 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
9099      d=$with_sgivc/include
9100      if test -d $d; then
9101        X_CFLAGS="-I$d $X_CFLAGS"
9102        echo "$as_me:$LINENO: result: $d" >&5
9103 echo "${ECHO_T}$d" >&6
9104      else
9105        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9106 echo "${ECHO_T}not found ($d: no such directory)" >&6
9107      fi
9108
9109      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
9110 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
9111      d=$with_sgivc/lib
9112      if test -d $d; then
9113        X_LIBS="-L$d $X_LIBS"
9114        echo "$as_me:$LINENO: result: $d" >&5
9115 echo "${ECHO_T}$d" >&6
9116      else
9117        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9118 echo "${ECHO_T}not found ($d: no such directory)" >&6
9119      fi
9120
9121      # replace the directory string with "yes".
9122      with_sgivc_req="yes"
9123      with_sgivc=$with_sgivc_req
9124      ;;
9125
9126     *)
9127      echo ""
9128      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
9129      echo "       If it is a directory, then \`DIR/include' will be added to"
9130      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9131      exit 1
9132      ;;
9133    esac
9134
9135
9136 if test "$with_sgivc" = yes; then
9137
9138   # first check for XSGIvc.h
9139
9140   ac_save_CPPFLAGS="$CPPFLAGS"
9141   if test \! -z "$includedir" ; then
9142     CPPFLAGS="$CPPFLAGS -I$includedir"
9143   fi
9144   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9145   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
9146 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
9147 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
9148   echo $ECHO_N "(cached) $ECHO_C" >&6
9149 else
9150   cat >conftest.$ac_ext <<_ACEOF
9151 #line $LINENO "configure"
9152 #include "confdefs.h"
9153 #include <X11/Xlib.h>
9154
9155 #include <X11/extensions/XSGIvc.h>
9156 _ACEOF
9157 rm -f conftest.$ac_objext
9158 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9159   (eval $ac_compile) 2>&5
9160   ac_status=$?
9161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9162   (exit $ac_status); } &&
9163          { ac_try='test -s conftest.$ac_objext'
9164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9165   (eval $ac_try) 2>&5
9166   ac_status=$?
9167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9168   (exit $ac_status); }; }; then
9169   ac_cv_header_X11_extensions_XSGIvc_h=yes
9170 else
9171   echo "$as_me: failed program was:" >&5
9172 cat conftest.$ac_ext >&5
9173 ac_cv_header_X11_extensions_XSGIvc_h=no
9174 fi
9175 rm -f conftest.$ac_objext conftest.$ac_ext
9176 fi
9177 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
9178 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
9179 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
9180   have_sgivc=yes
9181 fi
9182
9183
9184   CPPFLAGS="$ac_save_CPPFLAGS"
9185
9186   # if that succeeded, then check for the -lXsgivc
9187   if test "$have_sgivc" = yes; then
9188     have_sgivc=no
9189
9190   ac_save_CPPFLAGS="$CPPFLAGS"
9191   ac_save_LDFLAGS="$LDFLAGS"
9192 #  ac_save_LIBS="$LIBS"
9193
9194   if test \! -z "$includedir" ; then
9195     CPPFLAGS="$CPPFLAGS -I$includedir"
9196   fi
9197   # note: $X_CFLAGS includes $x_includes
9198   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9199
9200   if test \! -z "$libdir" ; then
9201     LDFLAGS="$LDFLAGS -L$libdir"
9202   fi
9203   # note: $X_LIBS includes $x_libraries
9204   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9205
9206   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
9207 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
9208 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
9209   echo $ECHO_N "(cached) $ECHO_C" >&6
9210 else
9211   ac_check_lib_save_LIBS=$LIBS
9212 LIBS="-lXsgivc -lXext -lX11 $LIBS"
9213 cat >conftest.$ac_ext <<_ACEOF
9214 #line $LINENO "configure"
9215 #include "confdefs.h"
9216
9217 /* Override any gcc2 internal prototype to avoid an error.  */
9218 #ifdef __cplusplus
9219 extern "C"
9220 #endif
9221 /* We use char because int might match the return type of a gcc2
9222    builtin and then its argument prototype would still apply.  */
9223 char XSGIvcQueryGammaMap ();
9224 #ifdef F77_DUMMY_MAIN
9225 #  ifdef __cplusplus
9226      extern "C"
9227 #  endif
9228    int F77_DUMMY_MAIN() { return 1; }
9229 #endif
9230 int
9231 main ()
9232 {
9233 XSGIvcQueryGammaMap ();
9234   ;
9235   return 0;
9236 }
9237 _ACEOF
9238 rm -f conftest.$ac_objext conftest$ac_exeext
9239 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9240   (eval $ac_link) 2>&5
9241   ac_status=$?
9242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9243   (exit $ac_status); } &&
9244          { ac_try='test -s conftest$ac_exeext'
9245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9246   (eval $ac_try) 2>&5
9247   ac_status=$?
9248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9249   (exit $ac_status); }; }; then
9250   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
9251 else
9252   echo "$as_me: failed program was:" >&5
9253 cat conftest.$ac_ext >&5
9254 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
9255 fi
9256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9257 LIBS=$ac_check_lib_save_LIBS
9258 fi
9259 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
9260 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
9261 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
9262   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
9263 else
9264   true
9265 fi
9266
9267   CPPFLAGS="$ac_save_CPPFLAGS"
9268   LDFLAGS="$ac_save_LDFLAGS"
9269 #  LIBS="$ac_save_LIBS"
9270
9271   fi
9272
9273   # if that succeeded, then we've really got it.
9274   if test "$have_sgivc" = yes; then
9275     cat >>confdefs.h <<\_ACEOF
9276 #define HAVE_SGI_VC_EXTENSION 1
9277 _ACEOF
9278
9279   fi
9280
9281 elif test "$with_sgivc" != no; then
9282   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
9283   exit 1
9284 fi
9285
9286
9287 ###############################################################################
9288 #
9289 #       Check for the DPMS server extension.
9290 #
9291 ###############################################################################
9292
9293 have_dpms=no
9294 with_dpms_req=unspecified
9295
9296 # Check whether --with-dpms-ext or --without-dpms-ext was given.
9297 if test "${with_dpms_ext+set}" = set; then
9298   withval="$with_dpms_ext"
9299   with_dpms="$withval"; with_dpms_req="$withval"
9300 else
9301   with_dpms=yes
9302 fi;
9303
9304
9305    case "$with_dpms" in
9306     yes) ;;
9307     no)  ;;
9308
9309     /*)
9310      echo "$as_me:$LINENO: checking for DPMS headers" >&5
9311 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
9312      d=$with_dpms/include
9313      if test -d $d; then
9314        X_CFLAGS="-I$d $X_CFLAGS"
9315        echo "$as_me:$LINENO: result: $d" >&5
9316 echo "${ECHO_T}$d" >&6
9317      else
9318        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9319 echo "${ECHO_T}not found ($d: no such directory)" >&6
9320      fi
9321
9322      echo "$as_me:$LINENO: checking for DPMS libs" >&5
9323 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
9324      d=$with_dpms/lib
9325      if test -d $d; then
9326        X_LIBS="-L$d $X_LIBS"
9327        echo "$as_me:$LINENO: result: $d" >&5
9328 echo "${ECHO_T}$d" >&6
9329      else
9330        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9331 echo "${ECHO_T}not found ($d: no such directory)" >&6
9332      fi
9333
9334      # replace the directory string with "yes".
9335      with_dpms_req="yes"
9336      with_dpms=$with_dpms_req
9337      ;;
9338
9339     *)
9340      echo ""
9341      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
9342      echo "       If it is a directory, then \`DIR/include' will be added to"
9343      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9344      exit 1
9345      ;;
9346    esac
9347
9348
9349 if test "$with_dpms" = yes; then
9350
9351   # first check for dpms.h
9352
9353   ac_save_CPPFLAGS="$CPPFLAGS"
9354   if test \! -z "$includedir" ; then
9355     CPPFLAGS="$CPPFLAGS -I$includedir"
9356   fi
9357   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9358   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
9359 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
9360 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
9361   echo $ECHO_N "(cached) $ECHO_C" >&6
9362 else
9363   cat >conftest.$ac_ext <<_ACEOF
9364 #line $LINENO "configure"
9365 #include "confdefs.h"
9366 #include <X11/Xlib.h>
9367
9368 #include <X11/extensions/dpms.h>
9369 _ACEOF
9370 rm -f conftest.$ac_objext
9371 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9372   (eval $ac_compile) 2>&5
9373   ac_status=$?
9374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9375   (exit $ac_status); } &&
9376          { ac_try='test -s conftest.$ac_objext'
9377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9378   (eval $ac_try) 2>&5
9379   ac_status=$?
9380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9381   (exit $ac_status); }; }; then
9382   ac_cv_header_X11_extensions_dpms_h=yes
9383 else
9384   echo "$as_me: failed program was:" >&5
9385 cat conftest.$ac_ext >&5
9386 ac_cv_header_X11_extensions_dpms_h=no
9387 fi
9388 rm -f conftest.$ac_objext conftest.$ac_ext
9389 fi
9390 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
9391 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
9392 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
9393   have_dpms=yes
9394 fi
9395
9396
9397   CPPFLAGS="$ac_save_CPPFLAGS"
9398
9399   # if that succeeded, then check for the DPMS code in the libraries
9400   if test "$have_dpms" = yes; then
9401
9402     # first look in -lXext (this is where it is with XFree86 4.0)
9403     have_dpms=no
9404
9405   ac_save_CPPFLAGS="$CPPFLAGS"
9406   ac_save_LDFLAGS="$LDFLAGS"
9407 #  ac_save_LIBS="$LIBS"
9408
9409   if test \! -z "$includedir" ; then
9410     CPPFLAGS="$CPPFLAGS -I$includedir"
9411   fi
9412   # note: $X_CFLAGS includes $x_includes
9413   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9414
9415   if test \! -z "$libdir" ; then
9416     LDFLAGS="$LDFLAGS -L$libdir"
9417   fi
9418   # note: $X_LIBS includes $x_libraries
9419   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9420
9421   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
9422 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
9423 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
9424   echo $ECHO_N "(cached) $ECHO_C" >&6
9425 else
9426   ac_check_lib_save_LIBS=$LIBS
9427 LIBS="-lXext -lXext -lX11 $LIBS"
9428 cat >conftest.$ac_ext <<_ACEOF
9429 #line $LINENO "configure"
9430 #include "confdefs.h"
9431
9432 /* Override any gcc2 internal prototype to avoid an error.  */
9433 #ifdef __cplusplus
9434 extern "C"
9435 #endif
9436 /* We use char because int might match the return type of a gcc2
9437    builtin and then its argument prototype would still apply.  */
9438 char DPMSInfo ();
9439 #ifdef F77_DUMMY_MAIN
9440 #  ifdef __cplusplus
9441      extern "C"
9442 #  endif
9443    int F77_DUMMY_MAIN() { return 1; }
9444 #endif
9445 int
9446 main ()
9447 {
9448 DPMSInfo ();
9449   ;
9450   return 0;
9451 }
9452 _ACEOF
9453 rm -f conftest.$ac_objext conftest$ac_exeext
9454 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9455   (eval $ac_link) 2>&5
9456   ac_status=$?
9457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9458   (exit $ac_status); } &&
9459          { ac_try='test -s conftest$ac_exeext'
9460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9461   (eval $ac_try) 2>&5
9462   ac_status=$?
9463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9464   (exit $ac_status); }; }; then
9465   ac_cv_lib_Xext_DPMSInfo=yes
9466 else
9467   echo "$as_me: failed program was:" >&5
9468 cat conftest.$ac_ext >&5
9469 ac_cv_lib_Xext_DPMSInfo=no
9470 fi
9471 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9472 LIBS=$ac_check_lib_save_LIBS
9473 fi
9474 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
9475 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
9476 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
9477   have_dpms=yes
9478 else
9479   true
9480 fi
9481
9482   CPPFLAGS="$ac_save_CPPFLAGS"
9483   LDFLAGS="$ac_save_LDFLAGS"
9484 #  LIBS="$ac_save_LIBS"
9485
9486
9487     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
9488     if test "$have_dpms" = no; then
9489
9490   ac_save_CPPFLAGS="$CPPFLAGS"
9491   ac_save_LDFLAGS="$LDFLAGS"
9492 #  ac_save_LIBS="$LIBS"
9493
9494   if test \! -z "$includedir" ; then
9495     CPPFLAGS="$CPPFLAGS -I$includedir"
9496   fi
9497   # note: $X_CFLAGS includes $x_includes
9498   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9499
9500   if test \! -z "$libdir" ; then
9501     LDFLAGS="$LDFLAGS -L$libdir"
9502   fi
9503   # note: $X_LIBS includes $x_libraries
9504   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9505
9506   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
9507 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
9508 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
9509   echo $ECHO_N "(cached) $ECHO_C" >&6
9510 else
9511   ac_check_lib_save_LIBS=$LIBS
9512 LIBS="-lXdpms -lXext -lX11 $LIBS"
9513 cat >conftest.$ac_ext <<_ACEOF
9514 #line $LINENO "configure"
9515 #include "confdefs.h"
9516
9517 /* Override any gcc2 internal prototype to avoid an error.  */
9518 #ifdef __cplusplus
9519 extern "C"
9520 #endif
9521 /* We use char because int might match the return type of a gcc2
9522    builtin and then its argument prototype would still apply.  */
9523 char DPMSInfo ();
9524 #ifdef F77_DUMMY_MAIN
9525 #  ifdef __cplusplus
9526      extern "C"
9527 #  endif
9528    int F77_DUMMY_MAIN() { return 1; }
9529 #endif
9530 int
9531 main ()
9532 {
9533 DPMSInfo ();
9534   ;
9535   return 0;
9536 }
9537 _ACEOF
9538 rm -f conftest.$ac_objext conftest$ac_exeext
9539 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9540   (eval $ac_link) 2>&5
9541   ac_status=$?
9542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9543   (exit $ac_status); } &&
9544          { ac_try='test -s conftest$ac_exeext'
9545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9546   (eval $ac_try) 2>&5
9547   ac_status=$?
9548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9549   (exit $ac_status); }; }; then
9550   ac_cv_lib_Xdpms_DPMSInfo=yes
9551 else
9552   echo "$as_me: failed program was:" >&5
9553 cat conftest.$ac_ext >&5
9554 ac_cv_lib_Xdpms_DPMSInfo=no
9555 fi
9556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9557 LIBS=$ac_check_lib_save_LIBS
9558 fi
9559 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
9560 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
9561 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
9562   have_dpms=yes; XDPMS_LIBS="-lXdpms"
9563 else
9564   true
9565 fi
9566
9567   CPPFLAGS="$ac_save_CPPFLAGS"
9568   LDFLAGS="$ac_save_LDFLAGS"
9569 #  LIBS="$ac_save_LIBS"
9570
9571     fi
9572   fi
9573
9574
9575   # if that succeeded, then we've really got it.
9576   if test "$have_dpms" = yes; then
9577     cat >>confdefs.h <<\_ACEOF
9578 #define HAVE_DPMS_EXTENSION 1
9579 _ACEOF
9580
9581   fi
9582
9583 elif test "$with_dpms" != no; then
9584   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
9585   exit 1
9586 fi
9587
9588
9589 ###############################################################################
9590 #
9591 #       Check for the XINERAMA server extension.
9592 #
9593 ###############################################################################
9594
9595 have_xinerama=no
9596 with_xinerama_req=unspecified
9597
9598 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
9599 if test "${with_xinerama_ext+set}" = set; then
9600   withval="$with_xinerama_ext"
9601   with_xinerama="$withval"; with_xinerama_req="$withval"
9602 else
9603   with_xinerama=yes
9604 fi;
9605
9606
9607    case "$with_xinerama" in
9608     yes) ;;
9609     no)  ;;
9610
9611     /*)
9612      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
9613 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
9614      d=$with_xinerama/include
9615      if test -d $d; then
9616        X_CFLAGS="-I$d $X_CFLAGS"
9617        echo "$as_me:$LINENO: result: $d" >&5
9618 echo "${ECHO_T}$d" >&6
9619      else
9620        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9621 echo "${ECHO_T}not found ($d: no such directory)" >&6
9622      fi
9623
9624      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
9625 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
9626      d=$with_xinerama/lib
9627      if test -d $d; then
9628        X_LIBS="-L$d $X_LIBS"
9629        echo "$as_me:$LINENO: result: $d" >&5
9630 echo "${ECHO_T}$d" >&6
9631      else
9632        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9633 echo "${ECHO_T}not found ($d: no such directory)" >&6
9634      fi
9635
9636      # replace the directory string with "yes".
9637      with_xinerama_req="yes"
9638      with_xinerama=$with_xinerama_req
9639      ;;
9640
9641     *)
9642      echo ""
9643      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
9644      echo "       If it is a directory, then \`DIR/include' will be added to"
9645      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9646      exit 1
9647      ;;
9648    esac
9649
9650
9651 if test "$with_xinerama" = yes; then
9652
9653   # first check for Xinerama.h
9654
9655   ac_save_CPPFLAGS="$CPPFLAGS"
9656   if test \! -z "$includedir" ; then
9657     CPPFLAGS="$CPPFLAGS -I$includedir"
9658   fi
9659   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9660   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
9661 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
9662 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
9663   echo $ECHO_N "(cached) $ECHO_C" >&6
9664 else
9665   cat >conftest.$ac_ext <<_ACEOF
9666 #line $LINENO "configure"
9667 #include "confdefs.h"
9668 #include <X11/Xlib.h>
9669
9670 #include <X11/extensions/Xinerama.h>
9671 _ACEOF
9672 rm -f conftest.$ac_objext
9673 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9674   (eval $ac_compile) 2>&5
9675   ac_status=$?
9676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9677   (exit $ac_status); } &&
9678          { ac_try='test -s conftest.$ac_objext'
9679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9680   (eval $ac_try) 2>&5
9681   ac_status=$?
9682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9683   (exit $ac_status); }; }; then
9684   ac_cv_header_X11_extensions_Xinerama_h=yes
9685 else
9686   echo "$as_me: failed program was:" >&5
9687 cat conftest.$ac_ext >&5
9688 ac_cv_header_X11_extensions_Xinerama_h=no
9689 fi
9690 rm -f conftest.$ac_objext conftest.$ac_ext
9691 fi
9692 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
9693 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
9694 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
9695   have_xinerama=yes
9696 fi
9697
9698
9699   CPPFLAGS="$ac_save_CPPFLAGS"
9700
9701   # if that succeeded, then check for the XINERAMA code in the libraries
9702   if test "$have_xinerama" = yes; then
9703
9704     # first look in -lXext
9705     have_xinerama=no
9706
9707   ac_save_CPPFLAGS="$CPPFLAGS"
9708   ac_save_LDFLAGS="$LDFLAGS"
9709 #  ac_save_LIBS="$LIBS"
9710
9711   if test \! -z "$includedir" ; then
9712     CPPFLAGS="$CPPFLAGS -I$includedir"
9713   fi
9714   # note: $X_CFLAGS includes $x_includes
9715   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9716
9717   if test \! -z "$libdir" ; then
9718     LDFLAGS="$LDFLAGS -L$libdir"
9719   fi
9720   # note: $X_LIBS includes $x_libraries
9721   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9722
9723   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXext" >&5
9724 echo $ECHO_N "checking for XineramaQueryExtension in -lXext... $ECHO_C" >&6
9725 if test "${ac_cv_lib_Xext_XineramaQueryExtension+set}" = set; then
9726   echo $ECHO_N "(cached) $ECHO_C" >&6
9727 else
9728   ac_check_lib_save_LIBS=$LIBS
9729 LIBS="-lXext -lXext -lX11 $LIBS"
9730 cat >conftest.$ac_ext <<_ACEOF
9731 #line $LINENO "configure"
9732 #include "confdefs.h"
9733
9734 /* Override any gcc2 internal prototype to avoid an error.  */
9735 #ifdef __cplusplus
9736 extern "C"
9737 #endif
9738 /* We use char because int might match the return type of a gcc2
9739    builtin and then its argument prototype would still apply.  */
9740 char XineramaQueryExtension ();
9741 #ifdef F77_DUMMY_MAIN
9742 #  ifdef __cplusplus
9743      extern "C"
9744 #  endif
9745    int F77_DUMMY_MAIN() { return 1; }
9746 #endif
9747 int
9748 main ()
9749 {
9750 XineramaQueryExtension ();
9751   ;
9752   return 0;
9753 }
9754 _ACEOF
9755 rm -f conftest.$ac_objext conftest$ac_exeext
9756 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9757   (eval $ac_link) 2>&5
9758   ac_status=$?
9759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9760   (exit $ac_status); } &&
9761          { ac_try='test -s conftest$ac_exeext'
9762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9763   (eval $ac_try) 2>&5
9764   ac_status=$?
9765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9766   (exit $ac_status); }; }; then
9767   ac_cv_lib_Xext_XineramaQueryExtension=yes
9768 else
9769   echo "$as_me: failed program was:" >&5
9770 cat conftest.$ac_ext >&5
9771 ac_cv_lib_Xext_XineramaQueryExtension=no
9772 fi
9773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9774 LIBS=$ac_check_lib_save_LIBS
9775 fi
9776 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryExtension" >&5
9777 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryExtension" >&6
9778 if test $ac_cv_lib_Xext_XineramaQueryExtension = yes; then
9779   have_xinerama=yes
9780 else
9781   true
9782 fi
9783
9784   CPPFLAGS="$ac_save_CPPFLAGS"
9785   LDFLAGS="$ac_save_LDFLAGS"
9786 #  LIBS="$ac_save_LIBS"
9787
9788
9789     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
9790     if test "$have_xinerama" = no; then
9791
9792   ac_save_CPPFLAGS="$CPPFLAGS"
9793   ac_save_LDFLAGS="$LDFLAGS"
9794 #  ac_save_LIBS="$LIBS"
9795
9796   if test \! -z "$includedir" ; then
9797     CPPFLAGS="$CPPFLAGS -I$includedir"
9798   fi
9799   # note: $X_CFLAGS includes $x_includes
9800   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9801
9802   if test \! -z "$libdir" ; then
9803     LDFLAGS="$LDFLAGS -L$libdir"
9804   fi
9805   # note: $X_LIBS includes $x_libraries
9806   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9807
9808   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXinerama" >&5
9809 echo $ECHO_N "checking for XineramaQueryExtension in -lXinerama... $ECHO_C" >&6
9810 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then
9811   echo $ECHO_N "(cached) $ECHO_C" >&6
9812 else
9813   ac_check_lib_save_LIBS=$LIBS
9814 LIBS="-lXinerama -lXext -lX11 $LIBS"
9815 cat >conftest.$ac_ext <<_ACEOF
9816 #line $LINENO "configure"
9817 #include "confdefs.h"
9818
9819 /* Override any gcc2 internal prototype to avoid an error.  */
9820 #ifdef __cplusplus
9821 extern "C"
9822 #endif
9823 /* We use char because int might match the return type of a gcc2
9824    builtin and then its argument prototype would still apply.  */
9825 char XineramaQueryExtension ();
9826 #ifdef F77_DUMMY_MAIN
9827 #  ifdef __cplusplus
9828      extern "C"
9829 #  endif
9830    int F77_DUMMY_MAIN() { return 1; }
9831 #endif
9832 int
9833 main ()
9834 {
9835 XineramaQueryExtension ();
9836   ;
9837   return 0;
9838 }
9839 _ACEOF
9840 rm -f conftest.$ac_objext conftest$ac_exeext
9841 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9842   (eval $ac_link) 2>&5
9843   ac_status=$?
9844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9845   (exit $ac_status); } &&
9846          { ac_try='test -s conftest$ac_exeext'
9847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9848   (eval $ac_try) 2>&5
9849   ac_status=$?
9850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9851   (exit $ac_status); }; }; then
9852   ac_cv_lib_Xinerama_XineramaQueryExtension=yes
9853 else
9854   echo "$as_me: failed program was:" >&5
9855 cat conftest.$ac_ext >&5
9856 ac_cv_lib_Xinerama_XineramaQueryExtension=no
9857 fi
9858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9859 LIBS=$ac_check_lib_save_LIBS
9860 fi
9861 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
9862 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6
9863 if test $ac_cv_lib_Xinerama_XineramaQueryExtension = yes; then
9864   have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"
9865 else
9866   true
9867 fi
9868
9869   CPPFLAGS="$ac_save_CPPFLAGS"
9870   LDFLAGS="$ac_save_LDFLAGS"
9871 #  LIBS="$ac_save_LIBS"
9872
9873     fi
9874   fi
9875
9876   # if that succeeded, then we've really got it.
9877   if test "$have_xinerama" = yes; then
9878     cat >>confdefs.h <<\_ACEOF
9879 #define HAVE_XINERAMA 1
9880 _ACEOF
9881
9882   fi
9883
9884 elif test "$with_xinerama" != no; then
9885   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
9886   exit 1
9887 fi
9888
9889
9890 ###############################################################################
9891 #
9892 #       Check for the XF86VMODE server extension (for virtual screens.)
9893 #
9894 ###############################################################################
9895
9896 have_xf86vmode=no
9897 with_xf86vmode_req=unspecified
9898
9899 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
9900 if test "${with_xf86vmode_ext+set}" = set; then
9901   withval="$with_xf86vmode_ext"
9902   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
9903 else
9904   with_xf86vmode=yes
9905 fi;
9906
9907
9908    case "$with_xf86vmode" in
9909     yes) ;;
9910     no)  ;;
9911
9912     /*)
9913      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
9914 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
9915      d=$with_xf86vmode/include
9916      if test -d $d; then
9917        X_CFLAGS="-I$d $X_CFLAGS"
9918        echo "$as_me:$LINENO: result: $d" >&5
9919 echo "${ECHO_T}$d" >&6
9920      else
9921        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9922 echo "${ECHO_T}not found ($d: no such directory)" >&6
9923      fi
9924
9925      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
9926 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
9927      d=$with_xf86vmode/lib
9928      if test -d $d; then
9929        X_LIBS="-L$d $X_LIBS"
9930        echo "$as_me:$LINENO: result: $d" >&5
9931 echo "${ECHO_T}$d" >&6
9932      else
9933        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9934 echo "${ECHO_T}not found ($d: no such directory)" >&6
9935      fi
9936
9937      # replace the directory string with "yes".
9938      with_xf86vmode_req="yes"
9939      with_xf86vmode=$with_xf86vmode_req
9940      ;;
9941
9942     *)
9943      echo ""
9944      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
9945      echo "       If it is a directory, then \`DIR/include' will be added to"
9946      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9947      exit 1
9948      ;;
9949    esac
9950
9951
9952 if test "$with_xf86vmode" = yes; then
9953
9954   # first check for xf86vmode.h
9955
9956   ac_save_CPPFLAGS="$CPPFLAGS"
9957   if test \! -z "$includedir" ; then
9958     CPPFLAGS="$CPPFLAGS -I$includedir"
9959   fi
9960   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9961   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
9962 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
9963 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
9964   echo $ECHO_N "(cached) $ECHO_C" >&6
9965 else
9966   cat >conftest.$ac_ext <<_ACEOF
9967 #line $LINENO "configure"
9968 #include "confdefs.h"
9969 #include <X11/Xlib.h>
9970
9971 #include <X11/extensions/xf86vmode.h>
9972 _ACEOF
9973 rm -f conftest.$ac_objext
9974 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9975   (eval $ac_compile) 2>&5
9976   ac_status=$?
9977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9978   (exit $ac_status); } &&
9979          { ac_try='test -s conftest.$ac_objext'
9980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9981   (eval $ac_try) 2>&5
9982   ac_status=$?
9983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9984   (exit $ac_status); }; }; then
9985   ac_cv_header_X11_extensions_xf86vmode_h=yes
9986 else
9987   echo "$as_me: failed program was:" >&5
9988 cat conftest.$ac_ext >&5
9989 ac_cv_header_X11_extensions_xf86vmode_h=no
9990 fi
9991 rm -f conftest.$ac_objext conftest.$ac_ext
9992 fi
9993 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
9994 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
9995 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
9996   have_xf86vmode=yes
9997 fi
9998
9999
10000   CPPFLAGS="$ac_save_CPPFLAGS"
10001
10002   # if that succeeded, then check for the -lXxf86vm
10003   if test "$have_xf86vmode" = yes; then
10004     have_xf86vmode=no
10005
10006   ac_save_CPPFLAGS="$CPPFLAGS"
10007   ac_save_LDFLAGS="$LDFLAGS"
10008 #  ac_save_LIBS="$LIBS"
10009
10010   if test \! -z "$includedir" ; then
10011     CPPFLAGS="$CPPFLAGS -I$includedir"
10012   fi
10013   # note: $X_CFLAGS includes $x_includes
10014   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10015
10016   if test \! -z "$libdir" ; then
10017     LDFLAGS="$LDFLAGS -L$libdir"
10018   fi
10019   # note: $X_LIBS includes $x_libraries
10020   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10021
10022   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
10023 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
10024 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
10025   echo $ECHO_N "(cached) $ECHO_C" >&6
10026 else
10027   ac_check_lib_save_LIBS=$LIBS
10028 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10029 cat >conftest.$ac_ext <<_ACEOF
10030 #line $LINENO "configure"
10031 #include "confdefs.h"
10032
10033 /* Override any gcc2 internal prototype to avoid an error.  */
10034 #ifdef __cplusplus
10035 extern "C"
10036 #endif
10037 /* We use char because int might match the return type of a gcc2
10038    builtin and then its argument prototype would still apply.  */
10039 char XF86VidModeGetViewPort ();
10040 #ifdef F77_DUMMY_MAIN
10041 #  ifdef __cplusplus
10042      extern "C"
10043 #  endif
10044    int F77_DUMMY_MAIN() { return 1; }
10045 #endif
10046 int
10047 main ()
10048 {
10049 XF86VidModeGetViewPort ();
10050   ;
10051   return 0;
10052 }
10053 _ACEOF
10054 rm -f conftest.$ac_objext conftest$ac_exeext
10055 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10056   (eval $ac_link) 2>&5
10057   ac_status=$?
10058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10059   (exit $ac_status); } &&
10060          { ac_try='test -s conftest$ac_exeext'
10061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10062   (eval $ac_try) 2>&5
10063   ac_status=$?
10064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10065   (exit $ac_status); }; }; then
10066   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
10067 else
10068   echo "$as_me: failed program was:" >&5
10069 cat conftest.$ac_ext >&5
10070 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
10071 fi
10072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10073 LIBS=$ac_check_lib_save_LIBS
10074 fi
10075 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
10076 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
10077 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
10078   have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10079 else
10080   true
10081 fi
10082
10083   CPPFLAGS="$ac_save_CPPFLAGS"
10084   LDFLAGS="$ac_save_LDFLAGS"
10085 #  LIBS="$ac_save_LIBS"
10086
10087   fi
10088
10089   # if that succeeded, then we've really got it.
10090   if test "$have_xf86vmode" = yes; then
10091     cat >>confdefs.h <<\_ACEOF
10092 #define HAVE_XF86VMODE 1
10093 _ACEOF
10094
10095   fi
10096
10097 elif test "$with_xf86vmode" != no; then
10098   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
10099   exit 1
10100 fi
10101
10102
10103 ###############################################################################
10104 #
10105 #       Check for the XF86VMODE server extension (for gamma fading.)
10106 #
10107 ###############################################################################
10108
10109 have_xf86gamma=no
10110 have_xf86gamma_ramp=no
10111 with_xf86gamma_req=unspecified
10112
10113 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
10114 if test "${with_xf86gamma_ext+set}" = set; then
10115   withval="$with_xf86gamma_ext"
10116   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
10117 else
10118   with_xf86gamma=yes
10119 fi;
10120
10121
10122    case "$with_xf86gamma" in
10123     yes) ;;
10124     no)  ;;
10125
10126     /*)
10127      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
10128 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
10129      d=$with_xf86gamma/include
10130      if test -d $d; then
10131        X_CFLAGS="-I$d $X_CFLAGS"
10132        echo "$as_me:$LINENO: result: $d" >&5
10133 echo "${ECHO_T}$d" >&6
10134      else
10135        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10136 echo "${ECHO_T}not found ($d: no such directory)" >&6
10137      fi
10138
10139      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
10140 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
10141      d=$with_xf86gamma/lib
10142      if test -d $d; then
10143        X_LIBS="-L$d $X_LIBS"
10144        echo "$as_me:$LINENO: result: $d" >&5
10145 echo "${ECHO_T}$d" >&6
10146      else
10147        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10148 echo "${ECHO_T}not found ($d: no such directory)" >&6
10149      fi
10150
10151      # replace the directory string with "yes".
10152      with_xf86gamma_req="yes"
10153      with_xf86gamma=$with_xf86gamma_req
10154      ;;
10155
10156     *)
10157      echo ""
10158      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
10159      echo "       If it is a directory, then \`DIR/include' will be added to"
10160      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10161      exit 1
10162      ;;
10163    esac
10164
10165
10166 if test "$with_xf86gamma" = yes; then
10167
10168   # first check for xf86vmode.h, if we haven't already
10169   if test "$have_xf86vmode" = yes; then
10170     have_xf86gamma=yes
10171   else
10172
10173   ac_save_CPPFLAGS="$CPPFLAGS"
10174   if test \! -z "$includedir" ; then
10175     CPPFLAGS="$CPPFLAGS -I$includedir"
10176   fi
10177   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10178   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10179 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10180 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10181   echo $ECHO_N "(cached) $ECHO_C" >&6
10182 else
10183   cat >conftest.$ac_ext <<_ACEOF
10184 #line $LINENO "configure"
10185 #include "confdefs.h"
10186 #include <X11/Xlib.h>
10187
10188 #include <X11/extensions/xf86vmode.h>
10189 _ACEOF
10190 rm -f conftest.$ac_objext
10191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10192   (eval $ac_compile) 2>&5
10193   ac_status=$?
10194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10195   (exit $ac_status); } &&
10196          { ac_try='test -s conftest.$ac_objext'
10197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10198   (eval $ac_try) 2>&5
10199   ac_status=$?
10200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10201   (exit $ac_status); }; }; then
10202   ac_cv_header_X11_extensions_xf86vmode_h=yes
10203 else
10204   echo "$as_me: failed program was:" >&5
10205 cat conftest.$ac_ext >&5
10206 ac_cv_header_X11_extensions_xf86vmode_h=no
10207 fi
10208 rm -f conftest.$ac_objext conftest.$ac_ext
10209 fi
10210 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10211 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10212 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10213   have_xf86gamma=yes
10214 fi
10215
10216
10217   CPPFLAGS="$ac_save_CPPFLAGS"
10218   fi
10219
10220   # if that succeeded, then check for the -lXxf86vm
10221   if test "$have_xf86gamma" = yes; then
10222     have_xf86gamma=no
10223
10224   ac_save_CPPFLAGS="$CPPFLAGS"
10225   ac_save_LDFLAGS="$LDFLAGS"
10226 #  ac_save_LIBS="$LIBS"
10227
10228   if test \! -z "$includedir" ; then
10229     CPPFLAGS="$CPPFLAGS -I$includedir"
10230   fi
10231   # note: $X_CFLAGS includes $x_includes
10232   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10233
10234   if test \! -z "$libdir" ; then
10235     LDFLAGS="$LDFLAGS -L$libdir"
10236   fi
10237   # note: $X_LIBS includes $x_libraries
10238   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10239
10240   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
10241 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
10242 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
10243   echo $ECHO_N "(cached) $ECHO_C" >&6
10244 else
10245   ac_check_lib_save_LIBS=$LIBS
10246 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10247 cat >conftest.$ac_ext <<_ACEOF
10248 #line $LINENO "configure"
10249 #include "confdefs.h"
10250
10251 /* Override any gcc2 internal prototype to avoid an error.  */
10252 #ifdef __cplusplus
10253 extern "C"
10254 #endif
10255 /* We use char because int might match the return type of a gcc2
10256    builtin and then its argument prototype would still apply.  */
10257 char XF86VidModeSetGamma ();
10258 #ifdef F77_DUMMY_MAIN
10259 #  ifdef __cplusplus
10260      extern "C"
10261 #  endif
10262    int F77_DUMMY_MAIN() { return 1; }
10263 #endif
10264 int
10265 main ()
10266 {
10267 XF86VidModeSetGamma ();
10268   ;
10269   return 0;
10270 }
10271 _ACEOF
10272 rm -f conftest.$ac_objext conftest$ac_exeext
10273 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10274   (eval $ac_link) 2>&5
10275   ac_status=$?
10276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10277   (exit $ac_status); } &&
10278          { ac_try='test -s conftest$ac_exeext'
10279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10280   (eval $ac_try) 2>&5
10281   ac_status=$?
10282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10283   (exit $ac_status); }; }; then
10284   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
10285 else
10286   echo "$as_me: failed program was:" >&5
10287 cat conftest.$ac_ext >&5
10288 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
10289 fi
10290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10291 LIBS=$ac_check_lib_save_LIBS
10292 fi
10293 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
10294 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
10295 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
10296   have_xf86gamma=yes
10297 else
10298   true
10299 fi
10300
10301   CPPFLAGS="$ac_save_CPPFLAGS"
10302   LDFLAGS="$ac_save_LDFLAGS"
10303 #  LIBS="$ac_save_LIBS"
10304
10305   fi
10306
10307   # check for the Ramp versions of the functions too.
10308   if test "$have_xf86gamma" = yes; then
10309     have_xf86gamma_ramp=no
10310
10311   ac_save_CPPFLAGS="$CPPFLAGS"
10312   ac_save_LDFLAGS="$LDFLAGS"
10313 #  ac_save_LIBS="$LIBS"
10314
10315   if test \! -z "$includedir" ; then
10316     CPPFLAGS="$CPPFLAGS -I$includedir"
10317   fi
10318   # note: $X_CFLAGS includes $x_includes
10319   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10320
10321   if test \! -z "$libdir" ; then
10322     LDFLAGS="$LDFLAGS -L$libdir"
10323   fi
10324   # note: $X_LIBS includes $x_libraries
10325   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10326
10327   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
10328 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
10329 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
10330   echo $ECHO_N "(cached) $ECHO_C" >&6
10331 else
10332   ac_check_lib_save_LIBS=$LIBS
10333 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10334 cat >conftest.$ac_ext <<_ACEOF
10335 #line $LINENO "configure"
10336 #include "confdefs.h"
10337
10338 /* Override any gcc2 internal prototype to avoid an error.  */
10339 #ifdef __cplusplus
10340 extern "C"
10341 #endif
10342 /* We use char because int might match the return type of a gcc2
10343    builtin and then its argument prototype would still apply.  */
10344 char XF86VidModeSetGammaRamp ();
10345 #ifdef F77_DUMMY_MAIN
10346 #  ifdef __cplusplus
10347      extern "C"
10348 #  endif
10349    int F77_DUMMY_MAIN() { return 1; }
10350 #endif
10351 int
10352 main ()
10353 {
10354 XF86VidModeSetGammaRamp ();
10355   ;
10356   return 0;
10357 }
10358 _ACEOF
10359 rm -f conftest.$ac_objext conftest$ac_exeext
10360 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10361   (eval $ac_link) 2>&5
10362   ac_status=$?
10363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10364   (exit $ac_status); } &&
10365          { ac_try='test -s conftest$ac_exeext'
10366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10367   (eval $ac_try) 2>&5
10368   ac_status=$?
10369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10370   (exit $ac_status); }; }; then
10371   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
10372 else
10373   echo "$as_me: failed program was:" >&5
10374 cat conftest.$ac_ext >&5
10375 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
10376 fi
10377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10378 LIBS=$ac_check_lib_save_LIBS
10379 fi
10380 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
10381 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
10382 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
10383   have_xf86gamma_ramp=yes
10384 else
10385   true
10386 fi
10387
10388   CPPFLAGS="$ac_save_CPPFLAGS"
10389   LDFLAGS="$ac_save_LDFLAGS"
10390 #  LIBS="$ac_save_LIBS"
10391
10392   fi
10393
10394   # if those tests succeeded, then we've really got the functions.
10395   if test "$have_xf86gamma" = yes; then
10396     cat >>confdefs.h <<\_ACEOF
10397 #define HAVE_XF86VMODE_GAMMA 1
10398 _ACEOF
10399
10400   fi
10401
10402   if test "$have_xf86gamma_ramp" = yes; then
10403     cat >>confdefs.h <<\_ACEOF
10404 #define HAVE_XF86VMODE_GAMMA_RAMP 1
10405 _ACEOF
10406
10407   fi
10408
10409   # pull in the lib, if we haven't already
10410   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
10411     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10412   fi
10413
10414 elif test "$with_xf86gamma" != no; then
10415   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
10416   exit 1
10417 fi
10418
10419
10420 ###############################################################################
10421 #
10422 #       Check for HP XHPDisableReset and XHPEnableReset.
10423 #
10424 ###############################################################################
10425
10426
10427   ac_save_CPPFLAGS="$CPPFLAGS"
10428   if test \! -z "$includedir" ; then
10429     CPPFLAGS="$CPPFLAGS -I$includedir"
10430   fi
10431   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10432   cat >conftest.$ac_ext <<_ACEOF
10433 #line $LINENO "configure"
10434 #include "confdefs.h"
10435 #include <X11/XHPlib.h>
10436
10437 _ACEOF
10438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10439   egrep "XHPDisableReset" >/dev/null 2>&1; then
10440   cat >>confdefs.h <<\_ACEOF
10441 #define HAVE_XHPDISABLERESET 1
10442 _ACEOF
10443
10444                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
10445 fi
10446 rm -f conftest*
10447
10448   CPPFLAGS="$ac_save_CPPFLAGS"
10449
10450
10451 ###############################################################################
10452 #
10453 #       Check for /proc/interrupts.
10454 #
10455 ###############################################################################
10456
10457 have_proc_interrupts=no
10458 with_proc_interrupts_req=unspecified
10459
10460 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
10461 if test "${with_proc_interrupts+set}" = set; then
10462   withval="$with_proc_interrupts"
10463   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
10464 else
10465   with_proc_interrupts=yes
10466 fi;
10467
10468 if test "$with_proc_interrupts" = yes; then
10469
10470    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
10471 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
10472 if test "${ac_cv_have_proc_interrupts+set}" = set; then
10473   echo $ECHO_N "(cached) $ECHO_C" >&6
10474 else
10475   ac_cv_have_proc_interrupts=no
10476      if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
10477        ac_cv_have_proc_interrupts=yes
10478      fi
10479
10480 fi
10481 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
10482 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
10483    have_proc_interrupts=$ac_cv_have_proc_interrupts
10484
10485   if test "$have_proc_interrupts" = yes; then
10486     cat >>confdefs.h <<\_ACEOF
10487 #define HAVE_PROC_INTERRUPTS 1
10488 _ACEOF
10489
10490   fi
10491
10492 elif test "$with_proc_interrupts" != no; then
10493   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
10494   exit 1
10495 fi
10496
10497
10498 ###############################################################################
10499 #
10500 #       The --enable-locking option
10501 #
10502 ###############################################################################
10503
10504 # Check whether --enable-locking or --disable-locking was given.
10505 if test "${enable_locking+set}" = set; then
10506   enableval="$enable_locking"
10507   enable_locking="$enableval"
10508 else
10509   enable_locking=yes
10510 fi;
10511 if test "$enable_locking" = yes; then
10512   true
10513 elif test "$enable_locking" = no; then
10514   cat >>confdefs.h <<\_ACEOF
10515 #define NO_LOCKING 1
10516 _ACEOF
10517
10518 else
10519   echo "error: must be yes or no: --enable-locking=$enable_locking"
10520   exit 1
10521 fi
10522
10523
10524
10525 ###############################################################################
10526 #
10527 #       The --enable-vt-locking option
10528 #
10529 ###############################################################################
10530
10531 #ac_vt_lockswitch=no
10532 #AC_ARG_ENABLE(vt-locking,[
10533 #  --enable-vt-locking     Compile in support for locking Virtual Terminals.
10534 #                          This is the default if the system supports it, and
10535 #                          if locking support is included (--enable-locking.)
10536 #  --disable-vt-locking    Do not allow locking of VTs, even if locking is
10537 #                          enabled.],
10538 #  [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
10539 #if test "$enable_vt_locking" = yes; then
10540 #
10541 #  AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
10542 #   [AC_TRY_COMPILE([#include <fcntl.h>
10543 #                   #include <sys/ioctl.h>
10544 #                   #include <sys/vt.h>],
10545 #                  [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
10546 #                  [ac_cv_vt_lockswitch=yes],
10547 #                  [ac_cv_vt_lockswitch=no])])
10548 #  ac_vt_lockswitch=$ac_cv_vt_lockswitch
10549 #
10550 #elif test "$enable_vt_locking" = no; then
10551 #  true
10552 #else
10553 #  echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
10554 #  exit 1
10555 #fi
10556 #
10557 #if test "$ac_vt_lockswitch" = yes; then
10558 #  AC_DEFINE(HAVE_VT_LOCKSWITCH)
10559 #  # the VT_LOCKSWITCH ioctl can only be used when running as root.
10560 #  # #### but it doesn't work yet, so don't worry about that for now.
10561 ##  need_setuid=yes
10562 #fi
10563
10564
10565 ###############################################################################
10566 #
10567 #       Check for PAM.
10568 #
10569 ###############################################################################
10570
10571 case "$host" in
10572   *-solaris*)
10573    # Solaris systems tend to come with PAM misconfigured.
10574    #  Don't build it by default, even if the headers exist.
10575    with_pam_default=no
10576    ;;
10577   *)
10578    # Default to building PAM support on all other systems, if it exists.
10579    with_pam_default=yes
10580   ;;
10581 esac
10582
10583 have_pam=no
10584 with_pam_req=unspecified
10585
10586
10587 # Check whether --with-pam or --without-pam was given.
10588 if test "${with_pam+set}" = set; then
10589   withval="$with_pam"
10590   with_pam="$withval"; with_pam_req="$withval"
10591 else
10592   with_pam=$with_pam_default
10593 fi;
10594
10595
10596    case "$with_pam" in
10597     yes) ;;
10598     no)  ;;
10599
10600     /*)
10601      echo "$as_me:$LINENO: checking for PAM headers" >&5
10602 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
10603      d=$with_pam/include
10604      if test -d $d; then
10605        X_CFLAGS="-I$d $X_CFLAGS"
10606        echo "$as_me:$LINENO: result: $d" >&5
10607 echo "${ECHO_T}$d" >&6
10608      else
10609        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10610 echo "${ECHO_T}not found ($d: no such directory)" >&6
10611      fi
10612
10613      echo "$as_me:$LINENO: checking for PAM libs" >&5
10614 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
10615      d=$with_pam/lib
10616      if test -d $d; then
10617        X_LIBS="-L$d $X_LIBS"
10618        echo "$as_me:$LINENO: result: $d" >&5
10619 echo "${ECHO_T}$d" >&6
10620      else
10621        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10622 echo "${ECHO_T}not found ($d: no such directory)" >&6
10623      fi
10624
10625      # replace the directory string with "yes".
10626      with_pam_req="yes"
10627      with_pam=$with_pam_req
10628      ;;
10629
10630     *)
10631      echo ""
10632      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
10633      echo "       If it is a directory, then \`DIR/include' will be added to"
10634      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10635      exit 1
10636      ;;
10637    esac
10638
10639
10640 if test "$enable_locking" = yes -a "$with_pam" = yes; then
10641   echo "$as_me:$LINENO: checking for PAM" >&5
10642 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
10643 if test "${ac_cv_pam+set}" = set; then
10644   echo $ECHO_N "(cached) $ECHO_C" >&6
10645 else
10646
10647   ac_save_CPPFLAGS="$CPPFLAGS"
10648   if test \! -z "$includedir" ; then
10649     CPPFLAGS="$CPPFLAGS -I$includedir"
10650   fi
10651   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10652   cat >conftest.$ac_ext <<_ACEOF
10653 #line $LINENO "configure"
10654 #include "confdefs.h"
10655 #include <security/pam_appl.h>
10656 #ifdef F77_DUMMY_MAIN
10657 #  ifdef __cplusplus
10658      extern "C"
10659 #  endif
10660    int F77_DUMMY_MAIN() { return 1; }
10661 #endif
10662 int
10663 main ()
10664 {
10665
10666   ;
10667   return 0;
10668 }
10669 _ACEOF
10670 rm -f conftest.$ac_objext
10671 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10672   (eval $ac_compile) 2>&5
10673   ac_status=$?
10674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10675   (exit $ac_status); } &&
10676          { ac_try='test -s conftest.$ac_objext'
10677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10678   (eval $ac_try) 2>&5
10679   ac_status=$?
10680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10681   (exit $ac_status); }; }; then
10682   ac_cv_pam=yes
10683 else
10684   echo "$as_me: failed program was:" >&5
10685 cat conftest.$ac_ext >&5
10686 ac_cv_pam=no
10687 fi
10688 rm -f conftest.$ac_objext conftest.$ac_ext
10689   CPPFLAGS="$ac_save_CPPFLAGS"
10690 fi
10691 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
10692 echo "${ECHO_T}$ac_cv_pam" >&6
10693   if test "$ac_cv_pam" = yes ; then
10694     have_pam=yes
10695     cat >>confdefs.h <<\_ACEOF
10696 #define HAVE_PAM 1
10697 _ACEOF
10698
10699     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
10700
10701     # libpam typically requires dlopen and dlsym.  On FreeBSD,
10702     # those are in libc.  On Linux and Solaris, they're in libdl.
10703     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10704 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10705 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10706   echo $ECHO_N "(cached) $ECHO_C" >&6
10707 else
10708   ac_check_lib_save_LIBS=$LIBS
10709 LIBS="-ldl  $LIBS"
10710 cat >conftest.$ac_ext <<_ACEOF
10711 #line $LINENO "configure"
10712 #include "confdefs.h"
10713
10714 /* Override any gcc2 internal prototype to avoid an error.  */
10715 #ifdef __cplusplus
10716 extern "C"
10717 #endif
10718 /* We use char because int might match the return type of a gcc2
10719    builtin and then its argument prototype would still apply.  */
10720 char dlopen ();
10721 #ifdef F77_DUMMY_MAIN
10722 #  ifdef __cplusplus
10723      extern "C"
10724 #  endif
10725    int F77_DUMMY_MAIN() { return 1; }
10726 #endif
10727 int
10728 main ()
10729 {
10730 dlopen ();
10731   ;
10732   return 0;
10733 }
10734 _ACEOF
10735 rm -f conftest.$ac_objext conftest$ac_exeext
10736 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10737   (eval $ac_link) 2>&5
10738   ac_status=$?
10739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10740   (exit $ac_status); } &&
10741          { ac_try='test -s conftest$ac_exeext'
10742   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10743   (eval $ac_try) 2>&5
10744   ac_status=$?
10745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10746   (exit $ac_status); }; }; then
10747   ac_cv_lib_dl_dlopen=yes
10748 else
10749   echo "$as_me: failed program was:" >&5
10750 cat conftest.$ac_ext >&5
10751 ac_cv_lib_dl_dlopen=no
10752 fi
10753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10754 LIBS=$ac_check_lib_save_LIBS
10755 fi
10756 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10757 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10758 if test $ac_cv_lib_dl_dlopen = yes; then
10759   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
10760 fi
10761
10762
10763     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
10764 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
10765     if test "${ac_cv_pam_strerror_args+set}" = set; then
10766   echo $ECHO_N "(cached) $ECHO_C" >&6
10767 else
10768   cat >conftest.$ac_ext <<_ACEOF
10769 #line $LINENO "configure"
10770 #include "confdefs.h"
10771 #include <stdio.h>
10772                       #include <stdlib.h>
10773                       #include <security/pam_appl.h>
10774 #ifdef F77_DUMMY_MAIN
10775 #  ifdef __cplusplus
10776      extern "C"
10777 #  endif
10778    int F77_DUMMY_MAIN() { return 1; }
10779 #endif
10780 int
10781 main ()
10782 {
10783 pam_handle_t *pamh = 0;
10784                       char *s = pam_strerror(pamh, PAM_SUCCESS);
10785   ;
10786   return 0;
10787 }
10788 _ACEOF
10789 rm -f conftest.$ac_objext
10790 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10791   (eval $ac_compile) 2>&5
10792   ac_status=$?
10793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10794   (exit $ac_status); } &&
10795          { ac_try='test -s conftest.$ac_objext'
10796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10797   (eval $ac_try) 2>&5
10798   ac_status=$?
10799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10800   (exit $ac_status); }; }; then
10801   ac_pam_strerror_args=2
10802 else
10803   echo "$as_me: failed program was:" >&5
10804 cat conftest.$ac_ext >&5
10805 cat >conftest.$ac_ext <<_ACEOF
10806 #line $LINENO "configure"
10807 #include "confdefs.h"
10808 #include <stdio.h>
10809                                       #include <stdlib.h>
10810                                       #include <security/pam_appl.h>
10811 #ifdef F77_DUMMY_MAIN
10812 #  ifdef __cplusplus
10813      extern "C"
10814 #  endif
10815    int F77_DUMMY_MAIN() { return 1; }
10816 #endif
10817 int
10818 main ()
10819 {
10820 char *s =
10821                                        pam_strerror(PAM_SUCCESS);
10822   ;
10823   return 0;
10824 }
10825 _ACEOF
10826 rm -f conftest.$ac_objext
10827 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10828   (eval $ac_compile) 2>&5
10829   ac_status=$?
10830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10831   (exit $ac_status); } &&
10832          { ac_try='test -s conftest.$ac_objext'
10833   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10834   (eval $ac_try) 2>&5
10835   ac_status=$?
10836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10837   (exit $ac_status); }; }; then
10838   ac_pam_strerror_args=1
10839 else
10840   echo "$as_me: failed program was:" >&5
10841 cat conftest.$ac_ext >&5
10842 ac_pam_strerror_args=0
10843 fi
10844 rm -f conftest.$ac_objext conftest.$ac_ext
10845 fi
10846 rm -f conftest.$ac_objext conftest.$ac_ext
10847       ac_cv_pam_strerror_args=$ac_pam_strerror_args
10848 fi
10849
10850     ac_pam_strerror_args=$ac_cv_pam_strerror_args
10851     if test "$ac_pam_strerror_args" = 1 ; then
10852       echo "$as_me:$LINENO: result: one argument" >&5
10853 echo "${ECHO_T}one argument" >&6
10854     elif test "$ac_pam_strerror_args" = 2 ; then
10855       cat >>confdefs.h <<\_ACEOF
10856 #define PAM_STRERROR_TWO_ARGS 1
10857 _ACEOF
10858
10859       echo "$as_me:$LINENO: result: two arguments" >&5
10860 echo "${ECHO_T}two arguments" >&6
10861     else
10862       echo "$as_me:$LINENO: result: unknown" >&5
10863 echo "${ECHO_T}unknown" >&6
10864     fi
10865   fi
10866 fi
10867
10868
10869 ###############################################################################
10870 #
10871 #       Check for Kerberos.
10872 #
10873 ###############################################################################
10874
10875 have_kerberos=no
10876 have_kerberos5=no
10877 with_kerberos_req=unspecified
10878
10879
10880 # Check whether --with-kerberos or --without-kerberos was given.
10881 if test "${with_kerberos+set}" = set; then
10882   withval="$with_kerberos"
10883   with_kerberos="$withval"; with_kerberos_req="$withval"
10884 else
10885   with_kerberos=yes
10886 fi;
10887
10888
10889    case "$with_kerberos" in
10890     yes) ;;
10891     no)  ;;
10892
10893     /*)
10894      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
10895 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
10896      d=$with_kerberos/include
10897      if test -d $d; then
10898        X_CFLAGS="-I$d $X_CFLAGS"
10899        echo "$as_me:$LINENO: result: $d" >&5
10900 echo "${ECHO_T}$d" >&6
10901      else
10902        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10903 echo "${ECHO_T}not found ($d: no such directory)" >&6
10904      fi
10905
10906      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
10907 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
10908      d=$with_kerberos/lib
10909      if test -d $d; then
10910        X_LIBS="-L$d $X_LIBS"
10911        echo "$as_me:$LINENO: result: $d" >&5
10912 echo "${ECHO_T}$d" >&6
10913      else
10914        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10915 echo "${ECHO_T}not found ($d: no such directory)" >&6
10916      fi
10917
10918      # replace the directory string with "yes".
10919      with_kerberos_req="yes"
10920      with_kerberos=$with_kerberos_req
10921      ;;
10922
10923     *)
10924      echo ""
10925      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
10926      echo "       If it is a directory, then \`DIR/include' will be added to"
10927      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10928      exit 1
10929      ;;
10930    esac
10931
10932
10933 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
10934   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
10935 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
10936 if test "${ac_cv_kerberos+set}" = set; then
10937   echo $ECHO_N "(cached) $ECHO_C" >&6
10938 else
10939
10940   ac_save_CPPFLAGS="$CPPFLAGS"
10941   if test \! -z "$includedir" ; then
10942     CPPFLAGS="$CPPFLAGS -I$includedir"
10943   fi
10944   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10945   cat >conftest.$ac_ext <<_ACEOF
10946 #line $LINENO "configure"
10947 #include "confdefs.h"
10948 #include <krb.h>
10949 #ifdef F77_DUMMY_MAIN
10950 #  ifdef __cplusplus
10951      extern "C"
10952 #  endif
10953    int F77_DUMMY_MAIN() { return 1; }
10954 #endif
10955 int
10956 main ()
10957 {
10958
10959   ;
10960   return 0;
10961 }
10962 _ACEOF
10963 rm -f conftest.$ac_objext
10964 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10965   (eval $ac_compile) 2>&5
10966   ac_status=$?
10967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10968   (exit $ac_status); } &&
10969          { ac_try='test -s conftest.$ac_objext'
10970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10971   (eval $ac_try) 2>&5
10972   ac_status=$?
10973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10974   (exit $ac_status); }; }; then
10975   ac_cv_kerberos=yes
10976 else
10977   echo "$as_me: failed program was:" >&5
10978 cat conftest.$ac_ext >&5
10979 ac_cv_kerberos=no
10980 fi
10981 rm -f conftest.$ac_objext conftest.$ac_ext
10982   CPPFLAGS="$ac_save_CPPFLAGS"
10983 fi
10984 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
10985 echo "${ECHO_T}$ac_cv_kerberos" >&6
10986   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
10987 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
10988 if test "${ac_cv_kerberos5+set}" = set; then
10989   echo $ECHO_N "(cached) $ECHO_C" >&6
10990 else
10991
10992   ac_save_CPPFLAGS="$CPPFLAGS"
10993   if test \! -z "$includedir" ; then
10994     CPPFLAGS="$CPPFLAGS -I$includedir"
10995   fi
10996   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10997   cat >conftest.$ac_ext <<_ACEOF
10998 #line $LINENO "configure"
10999 #include "confdefs.h"
11000 #include <kerberosIV/krb.h>
11001 #ifdef F77_DUMMY_MAIN
11002 #  ifdef __cplusplus
11003      extern "C"
11004 #  endif
11005    int F77_DUMMY_MAIN() { return 1; }
11006 #endif
11007 int
11008 main ()
11009 {
11010
11011   ;
11012   return 0;
11013 }
11014 _ACEOF
11015 rm -f conftest.$ac_objext
11016 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11017   (eval $ac_compile) 2>&5
11018   ac_status=$?
11019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11020   (exit $ac_status); } &&
11021          { ac_try='test -s conftest.$ac_objext'
11022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11023   (eval $ac_try) 2>&5
11024   ac_status=$?
11025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11026   (exit $ac_status); }; }; then
11027   ac_cv_kerberos5=yes
11028 else
11029   echo "$as_me: failed program was:" >&5
11030 cat conftest.$ac_ext >&5
11031 ac_cv_kerberos5=no
11032 fi
11033 rm -f conftest.$ac_objext conftest.$ac_ext
11034   CPPFLAGS="$ac_save_CPPFLAGS"
11035 fi
11036 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
11037 echo "${ECHO_T}$ac_cv_kerberos5" >&6
11038
11039   if test "$ac_cv_kerberos" = yes ; then
11040     have_kerberos=yes
11041     cat >>confdefs.h <<\_ACEOF
11042 #define HAVE_KERBEROS 1
11043 _ACEOF
11044
11045   fi
11046
11047   if test "$ac_cv_kerberos5" = yes ; then
11048     have_kerberos=yes
11049     have_kerberos5=yes
11050     cat >>confdefs.h <<\_ACEOF
11051 #define HAVE_KERBEROS 1
11052 _ACEOF
11053
11054     cat >>confdefs.h <<\_ACEOF
11055 #define HAVE_KERBEROS5 1
11056 _ACEOF
11057
11058   fi
11059
11060   if test "$have_kerberos5" = yes ; then
11061     # from Matt Knopp <mhat@infocalypse.netlag.com>
11062     # (who got it from amu@mit.edu)
11063
11064     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
11065
11066     # jwz: MacOS X uses -lkrb5, but not -lcrypt
11067
11068   ac_save_CPPFLAGS="$CPPFLAGS"
11069   ac_save_LDFLAGS="$LDFLAGS"
11070 #  ac_save_LIBS="$LIBS"
11071
11072   if test \! -z "$includedir" ; then
11073     CPPFLAGS="$CPPFLAGS -I$includedir"
11074   fi
11075   # note: $X_CFLAGS includes $x_includes
11076   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11077
11078   if test \! -z "$libdir" ; then
11079     LDFLAGS="$LDFLAGS -L$libdir"
11080   fi
11081   # note: $X_LIBS includes $x_libraries
11082   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11083
11084   echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
11085 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
11086 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
11087   echo $ECHO_N "(cached) $ECHO_C" >&6
11088 else
11089   ac_check_lib_save_LIBS=$LIBS
11090 LIBS="-lcrypt  $LIBS"
11091 cat >conftest.$ac_ext <<_ACEOF
11092 #line $LINENO "configure"
11093 #include "confdefs.h"
11094
11095 /* Override any gcc2 internal prototype to avoid an error.  */
11096 #ifdef __cplusplus
11097 extern "C"
11098 #endif
11099 /* We use char because int might match the return type of a gcc2
11100    builtin and then its argument prototype would still apply.  */
11101 char crypt ();
11102 #ifdef F77_DUMMY_MAIN
11103 #  ifdef __cplusplus
11104      extern "C"
11105 #  endif
11106    int F77_DUMMY_MAIN() { return 1; }
11107 #endif
11108 int
11109 main ()
11110 {
11111 crypt ();
11112   ;
11113   return 0;
11114 }
11115 _ACEOF
11116 rm -f conftest.$ac_objext conftest$ac_exeext
11117 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11118   (eval $ac_link) 2>&5
11119   ac_status=$?
11120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11121   (exit $ac_status); } &&
11122          { ac_try='test -s conftest$ac_exeext'
11123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11124   (eval $ac_try) 2>&5
11125   ac_status=$?
11126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11127   (exit $ac_status); }; }; then
11128   ac_cv_lib_crypt_crypt=yes
11129 else
11130   echo "$as_me: failed program was:" >&5
11131 cat conftest.$ac_ext >&5
11132 ac_cv_lib_crypt_crypt=no
11133 fi
11134 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11135 LIBS=$ac_check_lib_save_LIBS
11136 fi
11137 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
11138 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
11139 if test $ac_cv_lib_crypt_crypt = yes; then
11140   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11141 fi
11142
11143   CPPFLAGS="$ac_save_CPPFLAGS"
11144   LDFLAGS="$ac_save_LDFLAGS"
11145 #  LIBS="$ac_save_LIBS"
11146
11147
11148   elif test "$have_kerberos" = yes ; then
11149     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
11150     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
11151   fi
11152
11153   if test "$have_kerberos" = yes ; then
11154     echo "$as_me:$LINENO: checking for res_search" >&5
11155 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
11156 if test "${ac_cv_func_res_search+set}" = set; then
11157   echo $ECHO_N "(cached) $ECHO_C" >&6
11158 else
11159   cat >conftest.$ac_ext <<_ACEOF
11160 #line $LINENO "configure"
11161 #include "confdefs.h"
11162 /* System header to define __stub macros and hopefully few prototypes,
11163     which can conflict with char res_search (); below.  */
11164 #include <assert.h>
11165 /* Override any gcc2 internal prototype to avoid an error.  */
11166 #ifdef __cplusplus
11167 extern "C"
11168 #endif
11169 /* We use char because int might match the return type of a gcc2
11170    builtin and then its argument prototype would still apply.  */
11171 char res_search ();
11172 char (*f) ();
11173
11174 #ifdef F77_DUMMY_MAIN
11175 #  ifdef __cplusplus
11176      extern "C"
11177 #  endif
11178    int F77_DUMMY_MAIN() { return 1; }
11179 #endif
11180 int
11181 main ()
11182 {
11183 /* The GNU C library defines this for functions which it implements
11184     to always fail with ENOSYS.  Some functions are actually named
11185     something starting with __ and the normal name is an alias.  */
11186 #if defined (__stub_res_search) || defined (__stub___res_search)
11187 choke me
11188 #else
11189 f = res_search;
11190 #endif
11191
11192   ;
11193   return 0;
11194 }
11195 _ACEOF
11196 rm -f conftest.$ac_objext conftest$ac_exeext
11197 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11198   (eval $ac_link) 2>&5
11199   ac_status=$?
11200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11201   (exit $ac_status); } &&
11202          { ac_try='test -s conftest$ac_exeext'
11203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11204   (eval $ac_try) 2>&5
11205   ac_status=$?
11206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11207   (exit $ac_status); }; }; then
11208   ac_cv_func_res_search=yes
11209 else
11210   echo "$as_me: failed program was:" >&5
11211 cat conftest.$ac_ext >&5
11212 ac_cv_func_res_search=no
11213 fi
11214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11215 fi
11216 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
11217 echo "${ECHO_T}$ac_cv_func_res_search" >&6
11218 if test $ac_cv_func_res_search = yes; then
11219   :
11220 else
11221   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
11222 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
11223 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
11224   echo $ECHO_N "(cached) $ECHO_C" >&6
11225 else
11226   ac_check_lib_save_LIBS=$LIBS
11227 LIBS="-lresolv  $LIBS"
11228 cat >conftest.$ac_ext <<_ACEOF
11229 #line $LINENO "configure"
11230 #include "confdefs.h"
11231
11232 /* Override any gcc2 internal prototype to avoid an error.  */
11233 #ifdef __cplusplus
11234 extern "C"
11235 #endif
11236 /* We use char because int might match the return type of a gcc2
11237    builtin and then its argument prototype would still apply.  */
11238 char res_search ();
11239 #ifdef F77_DUMMY_MAIN
11240 #  ifdef __cplusplus
11241      extern "C"
11242 #  endif
11243    int F77_DUMMY_MAIN() { return 1; }
11244 #endif
11245 int
11246 main ()
11247 {
11248 res_search ();
11249   ;
11250   return 0;
11251 }
11252 _ACEOF
11253 rm -f conftest.$ac_objext conftest$ac_exeext
11254 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11255   (eval $ac_link) 2>&5
11256   ac_status=$?
11257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11258   (exit $ac_status); } &&
11259          { ac_try='test -s conftest$ac_exeext'
11260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11261   (eval $ac_try) 2>&5
11262   ac_status=$?
11263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11264   (exit $ac_status); }; }; then
11265   ac_cv_lib_resolv_res_search=yes
11266 else
11267   echo "$as_me: failed program was:" >&5
11268 cat conftest.$ac_ext >&5
11269 ac_cv_lib_resolv_res_search=no
11270 fi
11271 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11272 LIBS=$ac_check_lib_save_LIBS
11273 fi
11274 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
11275 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
11276 if test $ac_cv_lib_resolv_res_search = yes; then
11277   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
11278 else
11279   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
11280 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
11281
11282 fi
11283
11284 fi
11285
11286   fi
11287 fi
11288
11289
11290 ###############################################################################
11291 #
11292 #       Check for the nine billion variants of shadow passwords...
11293 #
11294 ###############################################################################
11295
11296 need_setuid=no
11297
11298 have_shadow=no
11299 with_shadow_req=unspecified
11300
11301
11302 # Check whether --with-shadow or --without-shadow was given.
11303 if test "${with_shadow+set}" = set; then
11304   withval="$with_shadow"
11305   with_shadow="$withval"; with_shadow_req="$withval"
11306 else
11307   with_shadow=yes
11308 fi;
11309
11310
11311    case "$with_shadow" in
11312     yes) ;;
11313     no)  ;;
11314
11315     /*)
11316      echo "$as_me:$LINENO: checking for shadow password headers" >&5
11317 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
11318      d=$with_shadow/include
11319      if test -d $d; then
11320        X_CFLAGS="-I$d $X_CFLAGS"
11321        echo "$as_me:$LINENO: result: $d" >&5
11322 echo "${ECHO_T}$d" >&6
11323      else
11324        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11325 echo "${ECHO_T}not found ($d: no such directory)" >&6
11326      fi
11327
11328      echo "$as_me:$LINENO: checking for shadow password libs" >&5
11329 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
11330      d=$with_shadow/lib
11331      if test -d $d; then
11332        X_LIBS="-L$d $X_LIBS"
11333        echo "$as_me:$LINENO: result: $d" >&5
11334 echo "${ECHO_T}$d" >&6
11335      else
11336        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11337 echo "${ECHO_T}not found ($d: no such directory)" >&6
11338      fi
11339
11340      # replace the directory string with "yes".
11341      with_shadow_req="yes"
11342      with_shadow=$with_shadow_req
11343      ;;
11344
11345     *)
11346      echo ""
11347      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
11348      echo "       If it is a directory, then \`DIR/include' will be added to"
11349      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11350      exit 1
11351      ;;
11352    esac
11353
11354
11355 if test "$enable_locking" = no ; then
11356   with_shadow_req=no
11357   with_shadow=no
11358 fi
11359
11360
11361 ###############################################################################
11362 #
11363 #       Check for Sun "adjunct" passwords.
11364 #
11365 ###############################################################################
11366
11367 if test "$with_shadow" = yes ; then
11368   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
11369 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
11370 if test "${ac_cv_sun_adjunct+set}" = set; then
11371   echo $ECHO_N "(cached) $ECHO_C" >&6
11372 else
11373
11374   ac_save_CPPFLAGS="$CPPFLAGS"
11375   if test \! -z "$includedir" ; then
11376     CPPFLAGS="$CPPFLAGS -I$includedir"
11377   fi
11378   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11379   cat >conftest.$ac_ext <<_ACEOF
11380 #line $LINENO "configure"
11381 #include "confdefs.h"
11382 #include <stdlib.h>
11383                                     #include <unistd.h>
11384                                     #include <sys/types.h>
11385                                     #include <sys/label.h>
11386                                     #include <sys/audit.h>
11387                                     #include <pwdadj.h>
11388 #ifdef F77_DUMMY_MAIN
11389 #  ifdef __cplusplus
11390      extern "C"
11391 #  endif
11392    int F77_DUMMY_MAIN() { return 1; }
11393 #endif
11394 int
11395 main ()
11396 {
11397 struct passwd_adjunct *p = getpwanam("nobody");
11398                        const char *pw = p->pwa_passwd;
11399   ;
11400   return 0;
11401 }
11402 _ACEOF
11403 rm -f conftest.$ac_objext
11404 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11405   (eval $ac_compile) 2>&5
11406   ac_status=$?
11407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11408   (exit $ac_status); } &&
11409          { ac_try='test -s conftest.$ac_objext'
11410   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11411   (eval $ac_try) 2>&5
11412   ac_status=$?
11413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11414   (exit $ac_status); }; }; then
11415   ac_cv_sun_adjunct=yes
11416 else
11417   echo "$as_me: failed program was:" >&5
11418 cat conftest.$ac_ext >&5
11419 ac_cv_sun_adjunct=no
11420 fi
11421 rm -f conftest.$ac_objext conftest.$ac_ext
11422   CPPFLAGS="$ac_save_CPPFLAGS"
11423 fi
11424 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
11425 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
11426   if test "$ac_cv_sun_adjunct" = yes; then
11427     have_shadow_adjunct=yes
11428     have_shadow=yes
11429     need_setuid=yes
11430   fi
11431 fi
11432
11433
11434 ###############################################################################
11435 #
11436 #       Check for DEC and SCO so-called "enhanced" security.
11437 #
11438 ###############################################################################
11439
11440 if test "$with_shadow" = yes ; then
11441   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
11442 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
11443 if test "${ac_cv_enhanced_passwd+set}" = set; then
11444   echo $ECHO_N "(cached) $ECHO_C" >&6
11445 else
11446
11447   ac_save_CPPFLAGS="$CPPFLAGS"
11448   if test \! -z "$includedir" ; then
11449     CPPFLAGS="$CPPFLAGS -I$includedir"
11450   fi
11451   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11452   cat >conftest.$ac_ext <<_ACEOF
11453 #line $LINENO "configure"
11454 #include "confdefs.h"
11455 #include <stdlib.h>
11456                                     #include <unistd.h>
11457                                     #include <sys/types.h>
11458                                     #include <pwd.h>
11459                                     #include <sys/security.h>
11460                                     #include <prot.h>
11461 #ifdef F77_DUMMY_MAIN
11462 #  ifdef __cplusplus
11463      extern "C"
11464 #  endif
11465    int F77_DUMMY_MAIN() { return 1; }
11466 #endif
11467 int
11468 main ()
11469 {
11470 struct pr_passwd *p;
11471                        const char *pw;
11472                        set_auth_parameters(0, 0);
11473                        check_auth_parameters();
11474                        p = getprpwnam("nobody");
11475                        pw = p->ufld.fd_encrypt;
11476   ;
11477   return 0;
11478 }
11479 _ACEOF
11480 rm -f conftest.$ac_objext
11481 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11482   (eval $ac_compile) 2>&5
11483   ac_status=$?
11484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11485   (exit $ac_status); } &&
11486          { ac_try='test -s conftest.$ac_objext'
11487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11488   (eval $ac_try) 2>&5
11489   ac_status=$?
11490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11491   (exit $ac_status); }; }; then
11492   ac_cv_enhanced_passwd=yes
11493 else
11494   echo "$as_me: failed program was:" >&5
11495 cat conftest.$ac_ext >&5
11496 ac_cv_enhanced_passwd=no
11497 fi
11498 rm -f conftest.$ac_objext conftest.$ac_ext
11499   CPPFLAGS="$ac_save_CPPFLAGS"
11500 fi
11501 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
11502 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
11503   if test $ac_cv_enhanced_passwd = yes; then
11504     have_shadow_enhanced=yes
11505     have_shadow=yes
11506     need_setuid=yes
11507
11508     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
11509     # (I'm told it needs -lcurses too, but I don't understand why.)
11510     # But on DEC, it's in -lsecurity.
11511     #
11512     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
11513 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
11514 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
11515   echo $ECHO_N "(cached) $ECHO_C" >&6
11516 else
11517   ac_check_lib_save_LIBS=$LIBS
11518 LIBS="-lprot -lx $LIBS"
11519 cat >conftest.$ac_ext <<_ACEOF
11520 #line $LINENO "configure"
11521 #include "confdefs.h"
11522
11523 /* Override any gcc2 internal prototype to avoid an error.  */
11524 #ifdef __cplusplus
11525 extern "C"
11526 #endif
11527 /* We use char because int might match the return type of a gcc2
11528    builtin and then its argument prototype would still apply.  */
11529 char getprpwnam ();
11530 #ifdef F77_DUMMY_MAIN
11531 #  ifdef __cplusplus
11532      extern "C"
11533 #  endif
11534    int F77_DUMMY_MAIN() { return 1; }
11535 #endif
11536 int
11537 main ()
11538 {
11539 getprpwnam ();
11540   ;
11541   return 0;
11542 }
11543 _ACEOF
11544 rm -f conftest.$ac_objext conftest$ac_exeext
11545 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11546   (eval $ac_link) 2>&5
11547   ac_status=$?
11548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11549   (exit $ac_status); } &&
11550          { ac_try='test -s conftest$ac_exeext'
11551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11552   (eval $ac_try) 2>&5
11553   ac_status=$?
11554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11555   (exit $ac_status); }; }; then
11556   ac_cv_lib_prot_getprpwnam=yes
11557 else
11558   echo "$as_me: failed program was:" >&5
11559 cat conftest.$ac_ext >&5
11560 ac_cv_lib_prot_getprpwnam=no
11561 fi
11562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11563 LIBS=$ac_check_lib_save_LIBS
11564 fi
11565 echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
11566 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
11567 if test $ac_cv_lib_prot_getprpwnam = yes; then
11568   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
11569 else
11570   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
11571 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
11572 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
11573   echo $ECHO_N "(cached) $ECHO_C" >&6
11574 else
11575   ac_check_lib_save_LIBS=$LIBS
11576 LIBS="-lsecurity  $LIBS"
11577 cat >conftest.$ac_ext <<_ACEOF
11578 #line $LINENO "configure"
11579 #include "confdefs.h"
11580
11581 /* Override any gcc2 internal prototype to avoid an error.  */
11582 #ifdef __cplusplus
11583 extern "C"
11584 #endif
11585 /* We use char because int might match the return type of a gcc2
11586    builtin and then its argument prototype would still apply.  */
11587 char getprpwnam ();
11588 #ifdef F77_DUMMY_MAIN
11589 #  ifdef __cplusplus
11590      extern "C"
11591 #  endif
11592    int F77_DUMMY_MAIN() { return 1; }
11593 #endif
11594 int
11595 main ()
11596 {
11597 getprpwnam ();
11598   ;
11599   return 0;
11600 }
11601 _ACEOF
11602 rm -f conftest.$ac_objext conftest$ac_exeext
11603 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11604   (eval $ac_link) 2>&5
11605   ac_status=$?
11606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11607   (exit $ac_status); } &&
11608          { ac_try='test -s conftest$ac_exeext'
11609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11610   (eval $ac_try) 2>&5
11611   ac_status=$?
11612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11613   (exit $ac_status); }; }; then
11614   ac_cv_lib_security_getprpwnam=yes
11615 else
11616   echo "$as_me: failed program was:" >&5
11617 cat conftest.$ac_ext >&5
11618 ac_cv_lib_security_getprpwnam=no
11619 fi
11620 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11621 LIBS=$ac_check_lib_save_LIBS
11622 fi
11623 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
11624 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
11625 if test $ac_cv_lib_security_getprpwnam = yes; then
11626   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
11627 fi
11628
11629 fi
11630
11631   fi
11632 fi
11633
11634 ###############################################################################
11635 #
11636 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
11637 #
11638 ###############################################################################
11639
11640 if test "$with_shadow" = yes ; then
11641   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
11642 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
11643 if test "${ac_cv_hpux_passwd+set}" = set; then
11644   echo $ECHO_N "(cached) $ECHO_C" >&6
11645 else
11646
11647   ac_save_CPPFLAGS="$CPPFLAGS"
11648   if test \! -z "$includedir" ; then
11649     CPPFLAGS="$CPPFLAGS -I$includedir"
11650   fi
11651   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11652   cat >conftest.$ac_ext <<_ACEOF
11653 #line $LINENO "configure"
11654 #include "confdefs.h"
11655 #include <stdlib.h>
11656                                     #include <unistd.h>
11657                                     #include <sys/types.h>
11658                                     #include <pwd.h>
11659                                     #include <hpsecurity.h>
11660                                     #include <prot.h>
11661 #ifdef F77_DUMMY_MAIN
11662 #  ifdef __cplusplus
11663      extern "C"
11664 #  endif
11665    int F77_DUMMY_MAIN() { return 1; }
11666 #endif
11667 int
11668 main ()
11669 {
11670 struct s_passwd *p = getspwnam("nobody");
11671                        const char *pw = p->pw_passwd;
11672   ;
11673   return 0;
11674 }
11675 _ACEOF
11676 rm -f conftest.$ac_objext
11677 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11678   (eval $ac_compile) 2>&5
11679   ac_status=$?
11680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11681   (exit $ac_status); } &&
11682          { ac_try='test -s conftest.$ac_objext'
11683   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11684   (eval $ac_try) 2>&5
11685   ac_status=$?
11686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11687   (exit $ac_status); }; }; then
11688   ac_cv_hpux_passwd=yes
11689 else
11690   echo "$as_me: failed program was:" >&5
11691 cat conftest.$ac_ext >&5
11692 ac_cv_hpux_passwd=no
11693 fi
11694 rm -f conftest.$ac_objext conftest.$ac_ext
11695   CPPFLAGS="$ac_save_CPPFLAGS"
11696 fi
11697 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
11698 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
11699   if test "$ac_cv_hpux_passwd" = yes; then
11700     have_shadow_hpux=yes
11701     have_shadow=yes
11702     need_setuid=yes
11703
11704     # on HPUX, bigcrypt is in -lsec
11705     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
11706 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
11707 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
11708   echo $ECHO_N "(cached) $ECHO_C" >&6
11709 else
11710   ac_check_lib_save_LIBS=$LIBS
11711 LIBS="-lsec  $LIBS"
11712 cat >conftest.$ac_ext <<_ACEOF
11713 #line $LINENO "configure"
11714 #include "confdefs.h"
11715
11716 /* Override any gcc2 internal prototype to avoid an error.  */
11717 #ifdef __cplusplus
11718 extern "C"
11719 #endif
11720 /* We use char because int might match the return type of a gcc2
11721    builtin and then its argument prototype would still apply.  */
11722 char bigcrypt ();
11723 #ifdef F77_DUMMY_MAIN
11724 #  ifdef __cplusplus
11725      extern "C"
11726 #  endif
11727    int F77_DUMMY_MAIN() { return 1; }
11728 #endif
11729 int
11730 main ()
11731 {
11732 bigcrypt ();
11733   ;
11734   return 0;
11735 }
11736 _ACEOF
11737 rm -f conftest.$ac_objext conftest$ac_exeext
11738 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11739   (eval $ac_link) 2>&5
11740   ac_status=$?
11741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11742   (exit $ac_status); } &&
11743          { ac_try='test -s conftest$ac_exeext'
11744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11745   (eval $ac_try) 2>&5
11746   ac_status=$?
11747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11748   (exit $ac_status); }; }; then
11749   ac_cv_lib_sec_bigcrypt=yes
11750 else
11751   echo "$as_me: failed program was:" >&5
11752 cat conftest.$ac_ext >&5
11753 ac_cv_lib_sec_bigcrypt=no
11754 fi
11755 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11756 LIBS=$ac_check_lib_save_LIBS
11757 fi
11758 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
11759 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
11760 if test $ac_cv_lib_sec_bigcrypt = yes; then
11761   PASSWD_LIBS="$PASSWD_LIBS -lsec"
11762 fi
11763
11764   fi
11765 fi
11766
11767
11768 ###############################################################################
11769 #
11770 #       Check for FreeBSD-style shadow passwords.
11771 #
11772 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
11773 #       password systems -- except you only get stuff in the pw_passwd field
11774 #       if the running program is setuid.  So, guess that we've got this
11775 #       lossage to contend with if /etc/master.passwd exists, and default to
11776 #       a setuid installation.
11777 #
11778 ###############################################################################
11779
11780 if test "$with_shadow" = yes ; then
11781   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
11782 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
11783 if test "${ac_cv_master_passwd+set}" = set; then
11784   echo $ECHO_N "(cached) $ECHO_C" >&6
11785 else
11786   if test -f /etc/master.passwd ; then
11787                     ac_cv_master_passwd=yes
11788                   else
11789                     ac_cv_master_passwd=no
11790                   fi
11791 fi
11792 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
11793 echo "${ECHO_T}$ac_cv_master_passwd" >&6
11794   if test "$ac_cv_master_passwd" = yes; then
11795     need_setuid=yes
11796   fi
11797 fi
11798
11799
11800 ###############################################################################
11801 #
11802 #       Check for traditional (ha!) shadow passwords.
11803 #
11804 ###############################################################################
11805
11806 if test "$with_shadow" = yes ; then
11807   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
11808 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
11809 if test "${ac_cv_shadow+set}" = set; then
11810   echo $ECHO_N "(cached) $ECHO_C" >&6
11811 else
11812
11813   ac_save_CPPFLAGS="$CPPFLAGS"
11814   if test \! -z "$includedir" ; then
11815     CPPFLAGS="$CPPFLAGS -I$includedir"
11816   fi
11817   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11818   cat >conftest.$ac_ext <<_ACEOF
11819 #line $LINENO "configure"
11820 #include "confdefs.h"
11821 #include <stdlib.h>
11822                                     #include <unistd.h>
11823                                     #include <sys/types.h>
11824                                     #include <pwd.h>
11825                                     #include <shadow.h>
11826 #ifdef F77_DUMMY_MAIN
11827 #  ifdef __cplusplus
11828      extern "C"
11829 #  endif
11830    int F77_DUMMY_MAIN() { return 1; }
11831 #endif
11832 int
11833 main ()
11834 {
11835 struct spwd *p = getspnam("nobody");
11836                        const char *pw = p->sp_pwdp;
11837   ;
11838   return 0;
11839 }
11840 _ACEOF
11841 rm -f conftest.$ac_objext
11842 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11843   (eval $ac_compile) 2>&5
11844   ac_status=$?
11845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11846   (exit $ac_status); } &&
11847          { ac_try='test -s conftest.$ac_objext'
11848   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11849   (eval $ac_try) 2>&5
11850   ac_status=$?
11851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11852   (exit $ac_status); }; }; then
11853   ac_cv_shadow=yes
11854 else
11855   echo "$as_me: failed program was:" >&5
11856 cat conftest.$ac_ext >&5
11857 ac_cv_shadow=no
11858 fi
11859 rm -f conftest.$ac_objext conftest.$ac_ext
11860   CPPFLAGS="$ac_save_CPPFLAGS"
11861 fi
11862 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
11863 echo "${ECHO_T}$ac_cv_shadow" >&6
11864   if test "$ac_cv_shadow" = yes; then
11865     have_shadow=yes
11866     need_setuid=yes
11867
11868     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
11869     have_getspnam=no
11870     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
11871 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
11872 if test "${ac_cv_lib_c_getspnam+set}" = set; then
11873   echo $ECHO_N "(cached) $ECHO_C" >&6
11874 else
11875   ac_check_lib_save_LIBS=$LIBS
11876 LIBS="-lc  $LIBS"
11877 cat >conftest.$ac_ext <<_ACEOF
11878 #line $LINENO "configure"
11879 #include "confdefs.h"
11880
11881 /* Override any gcc2 internal prototype to avoid an error.  */
11882 #ifdef __cplusplus
11883 extern "C"
11884 #endif
11885 /* We use char because int might match the return type of a gcc2
11886    builtin and then its argument prototype would still apply.  */
11887 char getspnam ();
11888 #ifdef F77_DUMMY_MAIN
11889 #  ifdef __cplusplus
11890      extern "C"
11891 #  endif
11892    int F77_DUMMY_MAIN() { return 1; }
11893 #endif
11894 int
11895 main ()
11896 {
11897 getspnam ();
11898   ;
11899   return 0;
11900 }
11901 _ACEOF
11902 rm -f conftest.$ac_objext conftest$ac_exeext
11903 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11904   (eval $ac_link) 2>&5
11905   ac_status=$?
11906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11907   (exit $ac_status); } &&
11908          { ac_try='test -s conftest$ac_exeext'
11909   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11910   (eval $ac_try) 2>&5
11911   ac_status=$?
11912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11913   (exit $ac_status); }; }; then
11914   ac_cv_lib_c_getspnam=yes
11915 else
11916   echo "$as_me: failed program was:" >&5
11917 cat conftest.$ac_ext >&5
11918 ac_cv_lib_c_getspnam=no
11919 fi
11920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11921 LIBS=$ac_check_lib_save_LIBS
11922 fi
11923 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
11924 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
11925 if test $ac_cv_lib_c_getspnam = yes; then
11926   have_getspnam=yes
11927 fi
11928
11929     if test "$have_getspnam" = no ; then
11930       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
11931 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
11932 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
11933   echo $ECHO_N "(cached) $ECHO_C" >&6
11934 else
11935   ac_check_lib_save_LIBS=$LIBS
11936 LIBS="-lgen  $LIBS"
11937 cat >conftest.$ac_ext <<_ACEOF
11938 #line $LINENO "configure"
11939 #include "confdefs.h"
11940
11941 /* Override any gcc2 internal prototype to avoid an error.  */
11942 #ifdef __cplusplus
11943 extern "C"
11944 #endif
11945 /* We use char because int might match the return type of a gcc2
11946    builtin and then its argument prototype would still apply.  */
11947 char getspnam ();
11948 #ifdef F77_DUMMY_MAIN
11949 #  ifdef __cplusplus
11950      extern "C"
11951 #  endif
11952    int F77_DUMMY_MAIN() { return 1; }
11953 #endif
11954 int
11955 main ()
11956 {
11957 getspnam ();
11958   ;
11959   return 0;
11960 }
11961 _ACEOF
11962 rm -f conftest.$ac_objext conftest$ac_exeext
11963 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11964   (eval $ac_link) 2>&5
11965   ac_status=$?
11966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11967   (exit $ac_status); } &&
11968          { ac_try='test -s conftest$ac_exeext'
11969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11970   (eval $ac_try) 2>&5
11971   ac_status=$?
11972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11973   (exit $ac_status); }; }; then
11974   ac_cv_lib_gen_getspnam=yes
11975 else
11976   echo "$as_me: failed program was:" >&5
11977 cat conftest.$ac_ext >&5
11978 ac_cv_lib_gen_getspnam=no
11979 fi
11980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11981 LIBS=$ac_check_lib_save_LIBS
11982 fi
11983 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
11984 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
11985 if test $ac_cv_lib_gen_getspnam = yes; then
11986   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
11987 fi
11988
11989     fi
11990   fi
11991 fi
11992
11993
11994 ###############################################################################
11995 #
11996 #       Check for other libraries needed for non-shadow passwords.
11997 #
11998 ###############################################################################
11999
12000 if test "$enable_locking" = yes ; then
12001
12002   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
12003   have_crypt=no
12004   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
12005 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
12006 if test "${ac_cv_lib_c_crypt+set}" = set; then
12007   echo $ECHO_N "(cached) $ECHO_C" >&6
12008 else
12009   ac_check_lib_save_LIBS=$LIBS
12010 LIBS="-lc  $LIBS"
12011 cat >conftest.$ac_ext <<_ACEOF
12012 #line $LINENO "configure"
12013 #include "confdefs.h"
12014
12015 /* Override any gcc2 internal prototype to avoid an error.  */
12016 #ifdef __cplusplus
12017 extern "C"
12018 #endif
12019 /* We use char because int might match the return type of a gcc2
12020    builtin and then its argument prototype would still apply.  */
12021 char crypt ();
12022 #ifdef F77_DUMMY_MAIN
12023 #  ifdef __cplusplus
12024      extern "C"
12025 #  endif
12026    int F77_DUMMY_MAIN() { return 1; }
12027 #endif
12028 int
12029 main ()
12030 {
12031 crypt ();
12032   ;
12033   return 0;
12034 }
12035 _ACEOF
12036 rm -f conftest.$ac_objext conftest$ac_exeext
12037 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12038   (eval $ac_link) 2>&5
12039   ac_status=$?
12040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12041   (exit $ac_status); } &&
12042          { ac_try='test -s conftest$ac_exeext'
12043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12044   (eval $ac_try) 2>&5
12045   ac_status=$?
12046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12047   (exit $ac_status); }; }; then
12048   ac_cv_lib_c_crypt=yes
12049 else
12050   echo "$as_me: failed program was:" >&5
12051 cat conftest.$ac_ext >&5
12052 ac_cv_lib_c_crypt=no
12053 fi
12054 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12055 LIBS=$ac_check_lib_save_LIBS
12056 fi
12057 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
12058 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
12059 if test $ac_cv_lib_c_crypt = yes; then
12060   have_crypt=yes
12061 fi
12062
12063   if test "$have_crypt" = no ; then
12064     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
12065 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
12066 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
12067   echo $ECHO_N "(cached) $ECHO_C" >&6
12068 else
12069   ac_check_lib_save_LIBS=$LIBS
12070 LIBS="-lcrypt  $LIBS"
12071 cat >conftest.$ac_ext <<_ACEOF
12072 #line $LINENO "configure"
12073 #include "confdefs.h"
12074
12075 /* Override any gcc2 internal prototype to avoid an error.  */
12076 #ifdef __cplusplus
12077 extern "C"
12078 #endif
12079 /* We use char because int might match the return type of a gcc2
12080    builtin and then its argument prototype would still apply.  */
12081 char crypt ();
12082 #ifdef F77_DUMMY_MAIN
12083 #  ifdef __cplusplus
12084      extern "C"
12085 #  endif
12086    int F77_DUMMY_MAIN() { return 1; }
12087 #endif
12088 int
12089 main ()
12090 {
12091 crypt ();
12092   ;
12093   return 0;
12094 }
12095 _ACEOF
12096 rm -f conftest.$ac_objext conftest$ac_exeext
12097 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12098   (eval $ac_link) 2>&5
12099   ac_status=$?
12100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12101   (exit $ac_status); } &&
12102          { ac_try='test -s conftest$ac_exeext'
12103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12104   (eval $ac_try) 2>&5
12105   ac_status=$?
12106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12107   (exit $ac_status); }; }; then
12108   ac_cv_lib_crypt_crypt=yes
12109 else
12110   echo "$as_me: failed program was:" >&5
12111 cat conftest.$ac_ext >&5
12112 ac_cv_lib_crypt_crypt=no
12113 fi
12114 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12115 LIBS=$ac_check_lib_save_LIBS
12116 fi
12117 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
12118 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
12119 if test $ac_cv_lib_crypt_crypt = yes; then
12120   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
12121 fi
12122
12123   fi
12124 fi
12125
12126
12127 # Most of the above shadow mechanisms will have set need_setuid to yes,
12128 # if they were found.  But, on some systems, we need setuid even when
12129 # using plain old vanilla passwords.
12130 #
12131 if test "$enable_locking" = yes ; then
12132   case "$host" in
12133     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
12134       need_setuid=yes
12135     ;;
12136   esac
12137 fi
12138
12139
12140 if test "$have_shadow_adjunct" = yes ; then
12141   cat >>confdefs.h <<\_ACEOF
12142 #define HAVE_ADJUNCT_PASSWD 1
12143 _ACEOF
12144
12145 elif test "$have_shadow_enhanced" = yes ; then
12146   cat >>confdefs.h <<\_ACEOF
12147 #define HAVE_ENHANCED_PASSWD 1
12148 _ACEOF
12149
12150 elif test "$have_shadow_hpux" = yes ; then
12151   cat >>confdefs.h <<\_ACEOF
12152 #define HAVE_HPUX_PASSWD 1
12153 _ACEOF
12154
12155 elif test "$have_shadow" = yes ; then
12156   cat >>confdefs.h <<\_ACEOF
12157 #define HAVE_SHADOW_PASSWD 1
12158 _ACEOF
12159
12160 fi
12161
12162
12163 ###############################################################################
12164 #
12165 #       Check for -lXm.
12166 #
12167 ###############################################################################
12168
12169 have_motif=no
12170 with_motif_req=unspecified
12171
12172 # Check whether --with-motif or --without-motif was given.
12173 if test "${with_motif+set}" = set; then
12174   withval="$with_motif"
12175   with_motif="$withval"; with_motif_req="$withval"
12176 else
12177   with_motif=yes
12178 fi;
12179
12180
12181    case "$with_motif" in
12182     yes) ;;
12183     no)  ;;
12184
12185     /*)
12186      echo "$as_me:$LINENO: checking for Motif headers" >&5
12187 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
12188      d=$with_motif/include
12189      if test -d $d; then
12190        X_CFLAGS="-I$d $X_CFLAGS"
12191        echo "$as_me:$LINENO: result: $d" >&5
12192 echo "${ECHO_T}$d" >&6
12193      else
12194        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12195 echo "${ECHO_T}not found ($d: no such directory)" >&6
12196      fi
12197
12198      echo "$as_me:$LINENO: checking for Motif libs" >&5
12199 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
12200      d=$with_motif/lib
12201      if test -d $d; then
12202        X_LIBS="-L$d $X_LIBS"
12203        echo "$as_me:$LINENO: result: $d" >&5
12204 echo "${ECHO_T}$d" >&6
12205      else
12206        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12207 echo "${ECHO_T}not found ($d: no such directory)" >&6
12208      fi
12209
12210      # replace the directory string with "yes".
12211      with_motif_req="yes"
12212      with_motif=$with_motif_req
12213      ;;
12214
12215     *)
12216      echo ""
12217      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
12218      echo "       If it is a directory, then \`DIR/include' will be added to"
12219      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12220      exit 1
12221      ;;
12222    esac
12223
12224
12225 if test "$with_motif" != yes -a "$with_motif" != no ; then
12226   echo "error: must be yes or no: --with-motif=$with_motif"
12227   exit 1
12228 fi
12229
12230 if test "$with_motif" = yes; then
12231   have_motif=no
12232
12233   ac_save_CPPFLAGS="$CPPFLAGS"
12234   if test \! -z "$includedir" ; then
12235     CPPFLAGS="$CPPFLAGS -I$includedir"
12236   fi
12237   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12238   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
12239 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
12240 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
12241   echo $ECHO_N "(cached) $ECHO_C" >&6
12242 else
12243   cat >conftest.$ac_ext <<_ACEOF
12244 #line $LINENO "configure"
12245 #include "confdefs.h"
12246 #include <stdlib.h>
12247                      #include <stdio.h>
12248                      #include <X11/Intrinsic.h>
12249
12250 #include <Xm/Xm.h>
12251 _ACEOF
12252 rm -f conftest.$ac_objext
12253 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12254   (eval $ac_compile) 2>&5
12255   ac_status=$?
12256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12257   (exit $ac_status); } &&
12258          { ac_try='test -s conftest.$ac_objext'
12259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12260   (eval $ac_try) 2>&5
12261   ac_status=$?
12262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12263   (exit $ac_status); }; }; then
12264   ac_cv_header_Xm_Xm_h=yes
12265 else
12266   echo "$as_me: failed program was:" >&5
12267 cat conftest.$ac_ext >&5
12268 ac_cv_header_Xm_Xm_h=no
12269 fi
12270 rm -f conftest.$ac_objext conftest.$ac_ext
12271 fi
12272 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
12273 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
12274 if test $ac_cv_header_Xm_Xm_h = yes; then
12275   have_motif=yes
12276                      cat >>confdefs.h <<\_ACEOF
12277 #define HAVE_MOTIF 1
12278 _ACEOF
12279
12280                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
12281 fi
12282
12283
12284   CPPFLAGS="$ac_save_CPPFLAGS"
12285 fi
12286
12287
12288 if test "$have_motif" = yes; then
12289
12290   ac_save_CPPFLAGS="$CPPFLAGS"
12291   if test \! -z "$includedir" ; then
12292     CPPFLAGS="$CPPFLAGS -I$includedir"
12293   fi
12294   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12295   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
12296 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
12297 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
12298   echo $ECHO_N "(cached) $ECHO_C" >&6
12299 else
12300   cat >conftest.$ac_ext <<_ACEOF
12301 #line $LINENO "configure"
12302 #include "confdefs.h"
12303 #include <stdlib.h>
12304                      #include <stdio.h>
12305                      #include <X11/Intrinsic.h>
12306
12307 #include <Xm/ComboBox.h>
12308 _ACEOF
12309 rm -f conftest.$ac_objext
12310 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12311   (eval $ac_compile) 2>&5
12312   ac_status=$?
12313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12314   (exit $ac_status); } &&
12315          { ac_try='test -s conftest.$ac_objext'
12316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12317   (eval $ac_try) 2>&5
12318   ac_status=$?
12319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12320   (exit $ac_status); }; }; then
12321   ac_cv_header_Xm_ComboBox_h=yes
12322 else
12323   echo "$as_me: failed program was:" >&5
12324 cat conftest.$ac_ext >&5
12325 ac_cv_header_Xm_ComboBox_h=no
12326 fi
12327 rm -f conftest.$ac_objext conftest.$ac_ext
12328 fi
12329 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
12330 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
12331 if test $ac_cv_header_Xm_ComboBox_h = yes; then
12332   cat >>confdefs.h <<\_ACEOF
12333 #define HAVE_XMCOMBOBOX 1
12334 _ACEOF
12335
12336 fi
12337
12338
12339   CPPFLAGS="$ac_save_CPPFLAGS"
12340 fi
12341
12342
12343 ###############################################################################
12344 #
12345 #       Check for -lgtk (and Gnome stuff)
12346 #
12347 ###############################################################################
12348
12349 have_gtk=no
12350 have_gtk2=no
12351 with_gtk_req=unspecified
12352
12353 # Check whether --with-gtk or --without-gtk was given.
12354 if test "${with_gtk+set}" = set; then
12355   withval="$with_gtk"
12356   with_gtk="$withval"; with_gtk_req="$withval"
12357 else
12358   with_gtk=yes
12359 fi;
12360
12361 # if --with-gtk=/directory/ was specified, remember that directory so that
12362 # we can also look for the `gtk-config' program in that directory.
12363 case "$with_gtk" in
12364   /*)
12365     gtk_dir="$with_gtk"
12366     ;;
12367   *)
12368     gtk_dir=""
12369     ;;
12370 esac
12371
12372
12373    case "$with_gtk" in
12374     yes) ;;
12375     no)  ;;
12376
12377     /*)
12378      echo "$as_me:$LINENO: checking for Gtk headers" >&5
12379 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
12380      d=$with_gtk/include
12381      if test -d $d; then
12382        X_CFLAGS="-I$d $X_CFLAGS"
12383        echo "$as_me:$LINENO: result: $d" >&5
12384 echo "${ECHO_T}$d" >&6
12385      else
12386        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12387 echo "${ECHO_T}not found ($d: no such directory)" >&6
12388      fi
12389
12390      echo "$as_me:$LINENO: checking for Gtk libs" >&5
12391 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12392      d=$with_gtk/lib
12393      if test -d $d; then
12394        X_LIBS="-L$d $X_LIBS"
12395        echo "$as_me:$LINENO: result: $d" >&5
12396 echo "${ECHO_T}$d" >&6
12397      else
12398        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12399 echo "${ECHO_T}not found ($d: no such directory)" >&6
12400      fi
12401
12402      # replace the directory string with "yes".
12403      with_gtk_req="yes"
12404      with_gtk=$with_gtk_req
12405      ;;
12406
12407     *)
12408      echo ""
12409      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
12410      echo "       If it is a directory, then \`DIR/include' will be added to"
12411      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12412      exit 1
12413      ;;
12414    esac
12415
12416
12417 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
12418   echo "error: must be yes or no: --with-gtk=$with_gtk"
12419   exit 1
12420 fi
12421
12422 have_gnome=no
12423 with_gnome_req=unspecified
12424
12425 # Check whether --with-gnome or --without-gnome was given.
12426 if test "${with_gnome+set}" = set; then
12427   withval="$with_gnome"
12428   with_gnome="$withval"; with_gnome_req="$withval"
12429 else
12430   with_gnome=yes
12431 fi;
12432
12433 # if --with-gnome=/directory/ was specified, remember that directory so that
12434 # we can also look for the `gnome-config' program in that directory.
12435 case "$with_gnome" in
12436   /*)
12437     gnome_dir="$with_gnome"
12438     ;;
12439   *)
12440     gnome_dir=""
12441     ;;
12442 esac
12443
12444
12445    case "$with_gnome" in
12446     yes) ;;
12447     no)  ;;
12448
12449     /*)
12450      echo "$as_me:$LINENO: checking for Gnome headers" >&5
12451 echo $ECHO_N "checking for Gnome headers... $ECHO_C" >&6
12452      d=$with_gnome/include
12453      if test -d $d; then
12454        X_CFLAGS="-I$d $X_CFLAGS"
12455        echo "$as_me:$LINENO: result: $d" >&5
12456 echo "${ECHO_T}$d" >&6
12457      else
12458        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12459 echo "${ECHO_T}not found ($d: no such directory)" >&6
12460      fi
12461
12462      echo "$as_me:$LINENO: checking for Gnome libs" >&5
12463 echo $ECHO_N "checking for Gnome libs... $ECHO_C" >&6
12464      d=$with_gnome/lib
12465      if test -d $d; then
12466        X_LIBS="-L$d $X_LIBS"
12467        echo "$as_me:$LINENO: result: $d" >&5
12468 echo "${ECHO_T}$d" >&6
12469      else
12470        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12471 echo "${ECHO_T}not found ($d: no such directory)" >&6
12472      fi
12473
12474      # replace the directory string with "yes".
12475      with_gnome_req="yes"
12476      with_gnome=$with_gnome_req
12477      ;;
12478
12479     *)
12480      echo ""
12481      echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
12482      echo "       If it is a directory, then \`DIR/include' will be added to"
12483      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12484      exit 1
12485      ;;
12486    esac
12487
12488
12489 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
12490   echo "error: must be yes or no: --with-gnome=$with_gnome"
12491   exit 1
12492 fi
12493
12494 parse_gtk_version_string() {
12495   # M4 sucks!!
12496
12497   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
12498   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
12499
12500   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
12501   if test -z "$ac_gtk_version"; then
12502     ac_gtk_version=unknown
12503     ac_gtk_version_string=unknown
12504   fi
12505 }
12506
12507
12508 jurassic_gtk=no
12509 gtk2_halfassed=no
12510
12511 if test "$with_gtk" = yes; then
12512   have_gtk=no
12513
12514   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
12515   # look in /foo/bin/ for glib-config, gtk-config, and gnome-config.
12516   #
12517   gtk_path="$PATH"
12518
12519   if test ! -z "$gtk_dir"; then
12520     # canonicalize slashes.
12521     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
12522     gtk_path="$foo:$gtk_path"
12523   fi
12524
12525   if test ! -z "$gnome_dir"; then
12526     # canonicalize slashes.
12527     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
12528     gtk_path="$foo:$gtk_path"
12529   fi
12530
12531   for ac_prog in pkg-config
12532 do
12533   # Extract the first word of "$ac_prog", so it can be a program name with args.
12534 set dummy $ac_prog; ac_word=$2
12535 echo "$as_me:$LINENO: checking for $ac_word" >&5
12536 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12537 if test "${ac_cv_path_pkg_config+set}" = set; then
12538   echo $ECHO_N "(cached) $ECHO_C" >&6
12539 else
12540   case $pkg_config in
12541   [\\/]* | ?:[\\/]*)
12542   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
12543   ;;
12544   *)
12545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12546 for as_dir in $gtk_path
12547 do
12548   IFS=$as_save_IFS
12549   test -z "$as_dir" && as_dir=.
12550   for ac_exec_ext in '' $ac_executable_extensions; do
12551   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12552     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
12553     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12554     break 2
12555   fi
12556 done
12557 done
12558
12559   ;;
12560 esac
12561 fi
12562 pkg_config=$ac_cv_path_pkg_config
12563
12564 if test -n "$pkg_config"; then
12565   echo "$as_me:$LINENO: result: $pkg_config" >&5
12566 echo "${ECHO_T}$pkg_config" >&6
12567 else
12568   echo "$as_me:$LINENO: result: no" >&5
12569 echo "${ECHO_T}no" >&6
12570 fi
12571
12572   test -n "$pkg_config" && break
12573 done
12574
12575
12576   if test -n "$pkg_config" ; then
12577     #
12578     # the new way...
12579     # run pkg-config based tests.
12580     #
12581
12582     pkgs=''
12583     pkg_check_version() {
12584       if test "$ok" = yes ; then
12585         req="$1"
12586         min="$2"
12587         echo "$as_me:$LINENO: checking for $req" >&5
12588 echo $ECHO_N "checking for $req... $ECHO_C" >&6
12589         if $pkg_config --exists "$req" ; then
12590           vers=`$pkg_config --modversion "$req"`
12591           if $pkg_config --exists "$req >= $min" ; then
12592             echo "$as_me:$LINENO: result: $vers" >&5
12593 echo "${ECHO_T}$vers" >&6
12594             pkgs="$pkgs $req"
12595             return 1
12596           else
12597             echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
12598 echo "${ECHO_T}$vers (wanted >= $min)" >&6
12599             ok=no
12600             return 0
12601           fi
12602         else
12603           echo "$as_me:$LINENO: result: no" >&5
12604 echo "${ECHO_T}no" >&6
12605           ok=no
12606           return 0
12607         fi
12608       fi
12609     }
12610
12611     ok="yes"
12612     pkg_check_version     gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
12613     pkg_check_version  gmodule-2.0  2.0.0
12614     pkg_check_version   libxml-2.0  2.4.6
12615     pkg_check_version libglade-2.0  1.99.0
12616     have_gtk="$ok"
12617
12618     if test "$have_gtk" = yes; then
12619       have_gtk2=yes
12620       cat >>confdefs.h <<\_ACEOF
12621 #define HAVE_GTK2 1
12622 _ACEOF
12623
12624     else
12625       if test -n "$ac_gtk_version_string" ; then
12626         gtk2_halfassed="$ac_gtk_version_string"
12627         gtk2_halfassed_lib="$req"
12628       fi
12629     fi
12630
12631     if test "$have_gtk" = no; then
12632       #
12633       # we don't have GTK 2.  Let's look for GTK 1.
12634       #
12635       pkgs=''
12636       ok="yes"
12637       pkg_check_version gtk+ 1.2           ; ac_gtk_version_string="$vers"
12638       pkg_check_version glib 1.0
12639       have_gtk="$ok"
12640
12641       # Now check for Gnome...
12642       #
12643       if test "$have_gtk" = yes -a "$with_gnome" = yes; then
12644         old_pkgs="$pkgs"
12645         ok=yes
12646         pkg_check_version capplet    1.0
12647         pkg_check_version gnomeui    1.0
12648         pkg_check_version gdk_pixbuf 0.1
12649         have_gnome="$ok"
12650
12651         if test "$have_gnome" = no; then
12652           pkgs="$old_pkgs"
12653         else
12654           cat >>confdefs.h <<\_ACEOF
12655 #define HAVE_CRAPPLET 1
12656 _ACEOF
12657
12658         fi
12659       fi
12660     fi
12661
12662     if test "$have_gtk" = yes; then
12663       parse_gtk_version_string
12664       jurassic_gtk=no
12665     else
12666       have_gnome=no
12667     fi
12668
12669     if test "$have_gtk" = yes; then
12670       echo "$as_me:$LINENO: checking for Gtk includes" >&5
12671 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
12672 if test "${ac_cv_gtk_config_cflags+set}" = set; then
12673   echo $ECHO_N "(cached) $ECHO_C" >&6
12674 else
12675   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
12676 fi
12677 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
12678 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
12679       echo "$as_me:$LINENO: checking for Gtk libs" >&5
12680 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12681 if test "${ac_cv_gtk_config_libs+set}" = set; then
12682   echo $ECHO_N "(cached) $ECHO_C" >&6
12683 else
12684   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
12685 fi
12686 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
12687 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
12688     fi
12689     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12690     ac_gtk_config_libs=$ac_cv_gtk_config_libs
12691
12692     ac_gnome_config_cflags=$ac_gtk_config_cflags
12693     ac_gnome_config_libs=$ac_gtk_config_libs
12694
12695   else
12696     #
12697     # the old way...
12698     # run {gnome,gtk}-config based tests.
12699     #
12700
12701     for ac_prog in glib12-config glib-config
12702 do
12703   # Extract the first word of "$ac_prog", so it can be a program name with args.
12704 set dummy $ac_prog; ac_word=$2
12705 echo "$as_me:$LINENO: checking for $ac_word" >&5
12706 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12707 if test "${ac_cv_path_glib_config+set}" = set; then
12708   echo $ECHO_N "(cached) $ECHO_C" >&6
12709 else
12710   case $glib_config in
12711   [\\/]* | ?:[\\/]*)
12712   ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
12713   ;;
12714   *)
12715   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12716 for as_dir in $gtk_path
12717 do
12718   IFS=$as_save_IFS
12719   test -z "$as_dir" && as_dir=.
12720   for ac_exec_ext in '' $ac_executable_extensions; do
12721   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12722     ac_cv_path_glib_config="$as_dir/$ac_word$ac_exec_ext"
12723     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12724     break 2
12725   fi
12726 done
12727 done
12728
12729   ;;
12730 esac
12731 fi
12732 glib_config=$ac_cv_path_glib_config
12733
12734 if test -n "$glib_config"; then
12735   echo "$as_me:$LINENO: result: $glib_config" >&5
12736 echo "${ECHO_T}$glib_config" >&6
12737 else
12738   echo "$as_me:$LINENO: result: no" >&5
12739 echo "${ECHO_T}no" >&6
12740 fi
12741
12742   test -n "$glib_config" && break
12743 done
12744
12745     for ac_prog in gtk12-config  gtk-config
12746 do
12747   # Extract the first word of "$ac_prog", so it can be a program name with args.
12748 set dummy $ac_prog; ac_word=$2
12749 echo "$as_me:$LINENO: checking for $ac_word" >&5
12750 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12751 if test "${ac_cv_path_gtk_config+set}" = set; then
12752   echo $ECHO_N "(cached) $ECHO_C" >&6
12753 else
12754   case $gtk_config in
12755   [\\/]* | ?:[\\/]*)
12756   ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
12757   ;;
12758   *)
12759   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12760 for as_dir in $gtk_path
12761 do
12762   IFS=$as_save_IFS
12763   test -z "$as_dir" && as_dir=.
12764   for ac_exec_ext in '' $ac_executable_extensions; do
12765   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12766     ac_cv_path_gtk_config="$as_dir/$ac_word$ac_exec_ext"
12767     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12768     break 2
12769   fi
12770 done
12771 done
12772
12773   ;;
12774 esac
12775 fi
12776 gtk_config=$ac_cv_path_gtk_config
12777
12778 if test -n "$gtk_config"; then
12779   echo "$as_me:$LINENO: result: $gtk_config" >&5
12780 echo "${ECHO_T}$gtk_config" >&6
12781 else
12782   echo "$as_me:$LINENO: result: no" >&5
12783 echo "${ECHO_T}no" >&6
12784 fi
12785
12786   test -n "$gtk_config" && break
12787 done
12788
12789
12790     if test "$with_gnome" = yes; then
12791       for ac_prog in gnome-config
12792 do
12793   # Extract the first word of "$ac_prog", so it can be a program name with args.
12794 set dummy $ac_prog; ac_word=$2
12795 echo "$as_me:$LINENO: checking for $ac_word" >&5
12796 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12797 if test "${ac_cv_path_gnome_config+set}" = set; then
12798   echo $ECHO_N "(cached) $ECHO_C" >&6
12799 else
12800   case $gnome_config in
12801   [\\/]* | ?:[\\/]*)
12802   ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
12803   ;;
12804   *)
12805   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12806 for as_dir in $gtk_path
12807 do
12808   IFS=$as_save_IFS
12809   test -z "$as_dir" && as_dir=.
12810   for ac_exec_ext in '' $ac_executable_extensions; do
12811   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12812     ac_cv_path_gnome_config="$as_dir/$ac_word$ac_exec_ext"
12813     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12814     break 2
12815   fi
12816 done
12817 done
12818
12819   ;;
12820 esac
12821 fi
12822 gnome_config=$ac_cv_path_gnome_config
12823
12824 if test -n "$gnome_config"; then
12825   echo "$as_me:$LINENO: result: $gnome_config" >&5
12826 echo "${ECHO_T}$gnome_config" >&6
12827 else
12828   echo "$as_me:$LINENO: result: no" >&5
12829 echo "${ECHO_T}no" >&6
12830 fi
12831
12832   test -n "$gnome_config" && break
12833 done
12834
12835     fi
12836
12837     if test -n "$glib_config" -a  -n "$gtk_config" ; then
12838       have_gtk=yes
12839       if test "$with_gnome" = yes -a -n "$gnome_config" ; then
12840         have_gnome=yes
12841       fi
12842     fi
12843
12844     if test "$have_gtk" = yes; then
12845       echo "$as_me:$LINENO: checking Gtk version number" >&5
12846 echo $ECHO_N "checking Gtk version number... $ECHO_C" >&6
12847 if test "${ac_cv_gtk_version_string+set}" = set; then
12848   echo $ECHO_N "(cached) $ECHO_C" >&6
12849 else
12850   ac_cv_gtk_version_string=`$gtk_config --version`
12851 fi
12852 echo "$as_me:$LINENO: result: $ac_cv_gtk_version_string" >&5
12853 echo "${ECHO_T}$ac_cv_gtk_version_string" >&6
12854       ac_gtk_version_string=$ac_cv_gtk_version_string
12855       parse_gtk_version_string
12856     fi
12857
12858     if test "$have_gtk" = yes; then
12859       if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
12860       then
12861         have_gtk=no
12862         have_gnome=no
12863         jurassic_gtk=yes
12864       fi
12865     fi
12866
12867     if test "$have_gtk" = yes; then
12868       echo "$as_me:$LINENO: checking for Gtk includes" >&5
12869 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
12870 if test "${ac_cv_gtk_config_cflags+set}" = set; then
12871   echo $ECHO_N "(cached) $ECHO_C" >&6
12872 else
12873   ac_cv_gtk_config_cflags=`$gtk_config --cflags`
12874 fi
12875 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
12876 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
12877       echo "$as_me:$LINENO: checking for Gtk libs" >&5
12878 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12879 if test "${ac_cv_gtk_config_libs+set}" = set; then
12880   echo $ECHO_N "(cached) $ECHO_C" >&6
12881 else
12882   ac_cv_gtk_config_libs=`$gtk_config --libs`
12883 fi
12884 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
12885 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
12886     fi
12887     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12888     ac_gtk_config_libs=$ac_cv_gtk_config_libs
12889
12890     # Check for Gnome Capplet support.
12891     # Note that this is only needed with Gnome 1.x, not Gnome 2.x.
12892     # In a Gnome 2.x world, libcapplet will not exist.
12893     # (In fact, this likely won't even be checked, since in a Gnome 2.x
12894     # world, we will probably be up in the "$pkg_config" branch instead
12895     # of here in the "$gnome_config" branch.)
12896     #
12897     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
12898       gnome_config_libs="gtk capplet gnomeui gdk_pixbuf"
12899       echo "$as_me:$LINENO: checking for Gnome capplet includes" >&5
12900 echo $ECHO_N "checking for Gnome capplet includes... $ECHO_C" >&6
12901       if test "${ac_cv_gnome_config_cflags+set}" = set; then
12902   echo $ECHO_N "(cached) $ECHO_C" >&6
12903 else
12904   if ( $gnome_config --cflags $gnome_config_libs 2>&1 | \
12905               grep Unknown >/dev/null ) ; then
12906            ac_cv_gnome_config_cflags=''
12907          else
12908           ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
12909          fi
12910 fi
12911
12912       ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
12913       if test "$ac_gnome_config_cflags" = "" ; then
12914         have_gnome=no
12915         echo "$as_me:$LINENO: result: no" >&5
12916 echo "${ECHO_T}no" >&6
12917       else
12918         echo "$as_me:$LINENO: result: $ac_gnome_config_cflags" >&5
12919 echo "${ECHO_T}$ac_gnome_config_cflags" >&6
12920       fi
12921     fi
12922
12923     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
12924       echo "$as_me:$LINENO: checking for Gnome capplet libs" >&5
12925 echo $ECHO_N "checking for Gnome capplet libs... $ECHO_C" >&6
12926       if test "${ac_cv_gnome_config_libs+set}" = set; then
12927   echo $ECHO_N "(cached) $ECHO_C" >&6
12928 else
12929   if ( $gnome_config --libs $gnome_config_libs 2>&1 |
12930               grep Unknown >/dev/null ) ; then
12931            ac_cv_gnome_config_libs=''
12932          else
12933            ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
12934          fi
12935 fi
12936
12937       ac_gnome_config_libs=$ac_cv_gnome_config_libs
12938       if test "$ac_gnome_config_libs" = "" ; then
12939         have_gnome=no
12940         echo "$as_me:$LINENO: result: no" >&5
12941 echo "${ECHO_T}no" >&6
12942       else
12943         echo "$as_me:$LINENO: result: $ac_gnome_config_libs" >&5
12944 echo "${ECHO_T}$ac_gnome_config_libs" >&6
12945       fi
12946     fi
12947
12948     # If we have Gnome, then override the gtk-config values with
12949     # the gnome-config values.
12950     #
12951     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
12952       ac_gtk_config_cflags=$ac_gnome_config_cflags
12953       ac_gtk_config_libs=$ac_gnome_config_libs
12954       cat >>confdefs.h <<\_ACEOF
12955 #define HAVE_CRAPPLET 1
12956 _ACEOF
12957
12958     fi
12959
12960   fi   # end of {gnome,gtk}-config based tests
12961
12962   if test "$have_gtk" = yes -a "$have_gtk2" = no; then
12963     # check for this function that was not in libcapplet 1.2.
12964     # (only needed in Gnome/Gtk 1.x, not Gnome/Gtk 2.x)
12965
12966   ac_save_CPPFLAGS="$CPPFLAGS"
12967   ac_save_LDFLAGS="$LDFLAGS"
12968 #  ac_save_LIBS="$LIBS"
12969
12970   if test \! -z "$includedir" ; then
12971     CPPFLAGS="$CPPFLAGS -I$includedir"
12972   fi
12973   # note: $X_CFLAGS includes $x_includes
12974   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12975
12976   if test \! -z "$libdir" ; then
12977     LDFLAGS="$LDFLAGS -L$libdir"
12978   fi
12979   # note: $X_LIBS includes $x_libraries
12980   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12981
12982   echo "$as_me:$LINENO: checking for capplet_widget_changes_are_immediate in -lcapplet" >&5
12983 echo $ECHO_N "checking for capplet_widget_changes_are_immediate in -lcapplet... $ECHO_C" >&6
12984 if test "${ac_cv_lib_capplet_capplet_widget_changes_are_immediate+set}" = set; then
12985   echo $ECHO_N "(cached) $ECHO_C" >&6
12986 else
12987   ac_check_lib_save_LIBS=$LIBS
12988 LIBS="-lcapplet $ac_gnome_config_libs $LIBS"
12989 cat >conftest.$ac_ext <<_ACEOF
12990 #line $LINENO "configure"
12991 #include "confdefs.h"
12992
12993 /* Override any gcc2 internal prototype to avoid an error.  */
12994 #ifdef __cplusplus
12995 extern "C"
12996 #endif
12997 /* We use char because int might match the return type of a gcc2
12998    builtin and then its argument prototype would still apply.  */
12999 char capplet_widget_changes_are_immediate ();
13000 #ifdef F77_DUMMY_MAIN
13001 #  ifdef __cplusplus
13002      extern "C"
13003 #  endif
13004    int F77_DUMMY_MAIN() { return 1; }
13005 #endif
13006 int
13007 main ()
13008 {
13009 capplet_widget_changes_are_immediate ();
13010   ;
13011   return 0;
13012 }
13013 _ACEOF
13014 rm -f conftest.$ac_objext conftest$ac_exeext
13015 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13016   (eval $ac_link) 2>&5
13017   ac_status=$?
13018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13019   (exit $ac_status); } &&
13020          { ac_try='test -s conftest$ac_exeext'
13021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13022   (eval $ac_try) 2>&5
13023   ac_status=$?
13024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13025   (exit $ac_status); }; }; then
13026   ac_cv_lib_capplet_capplet_widget_changes_are_immediate=yes
13027 else
13028   echo "$as_me: failed program was:" >&5
13029 cat conftest.$ac_ext >&5
13030 ac_cv_lib_capplet_capplet_widget_changes_are_immediate=no
13031 fi
13032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13033 LIBS=$ac_check_lib_save_LIBS
13034 fi
13035 echo "$as_me:$LINENO: result: $ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&5
13036 echo "${ECHO_T}$ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&6
13037 if test $ac_cv_lib_capplet_capplet_widget_changes_are_immediate = yes; then
13038   cat >>confdefs.h <<\_ACEOF
13039 #define HAVE_CRAPPLET_IMMEDIATE 1
13040 _ACEOF
13041
13042 else
13043   true
13044 fi
13045
13046   CPPFLAGS="$ac_save_CPPFLAGS"
13047   LDFLAGS="$ac_save_LDFLAGS"
13048 #  LIBS="$ac_save_LIBS"
13049
13050   fi
13051
13052
13053   GNOME_DATADIR=""
13054   if test "$have_gtk" = yes; then
13055     if test -n "$pkg_config"; then
13056       if test "$have_gtk2" = yes; then
13057         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
13058       else
13059         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+`
13060       fi
13061     else
13062       GNOME_DATADIR=`$gtk_config --prefix`
13063     fi
13064     GNOME_DATADIR="$GNOME_DATADIR/share"
13065   fi
13066
13067   # .desktop files go in different places in Gnome 1.x and Gnome 2.x...
13068   if test "$have_gtk2" = yes; then
13069     GNOME_PANELDIR='$(GNOME_PANELDIR2)'
13070   else
13071     GNOME_PANELDIR='$(GNOME_PANELDIR1)'
13072   fi
13073
13074
13075   if test "$have_gtk" = yes; then
13076     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
13077     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
13078     cat >>confdefs.h <<\_ACEOF
13079 #define HAVE_GTK 1
13080 _ACEOF
13081
13082
13083     if test "$have_gtk2" = yes; then
13084       GTK_EXTRA_OBJS=""
13085     else
13086       GTK_EXTRA_OBJS="\$(GTK_EXTRA_OBJS)"
13087     fi
13088   fi
13089
13090 fi
13091
13092
13093 # Check for the Gnome Help Browser.
13094 #
13095 if test "$have_gtk" = yes; then
13096   for ac_prog in yelp gnome-help-browser
13097 do
13098   # Extract the first word of "$ac_prog", so it can be a program name with args.
13099 set dummy $ac_prog; ac_word=$2
13100 echo "$as_me:$LINENO: checking for $ac_word" >&5
13101 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13102 if test "${ac_cv_prog_have_gnome_help+set}" = set; then
13103   echo $ECHO_N "(cached) $ECHO_C" >&6
13104 else
13105   if test -n "$have_gnome_help"; then
13106   ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
13107 else
13108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13109 for as_dir in $PATH
13110 do
13111   IFS=$as_save_IFS
13112   test -z "$as_dir" && as_dir=.
13113   for ac_exec_ext in '' $ac_executable_extensions; do
13114   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13115     ac_cv_prog_have_gnome_help="$ac_prog"
13116     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13117     break 2
13118   fi
13119 done
13120 done
13121
13122 fi
13123 fi
13124 have_gnome_help=$ac_cv_prog_have_gnome_help
13125 if test -n "$have_gnome_help"; then
13126   echo "$as_me:$LINENO: result: $have_gnome_help" >&5
13127 echo "${ECHO_T}$have_gnome_help" >&6
13128 else
13129   echo "$as_me:$LINENO: result: no" >&5
13130 echo "${ECHO_T}no" >&6
13131 fi
13132
13133   test -n "$have_gnome_help" && break
13134 done
13135 test -n "$have_gnome_help" || have_gnome_help="no"
13136
13137   if test "$have_gnome_help" != no; then
13138     have_gnome_help=yes
13139   fi
13140 fi
13141
13142
13143 ###############################################################################
13144 #
13145 #       Check for -lxml
13146 #
13147 ###############################################################################
13148
13149 have_xml=no
13150 with_xml_req=unspecified
13151 xml_halfassed=no
13152
13153 # Check whether --with-xml or --without-xml was given.
13154 if test "${with_xml+set}" = set; then
13155   withval="$with_xml"
13156   with_xml="$withval"; with_xml_req="$withval"
13157 else
13158   with_xml=yes
13159 fi;
13160
13161 # if --with-xml=/directory/ was specified, remember that directory so that
13162 # we can also look for the `xml-config' program in that directory.
13163 case "$with_xml" in
13164   /*)
13165     xml_dir="$with_xml"
13166     ;;
13167   *)
13168     xml_dir=""
13169     ;;
13170 esac
13171
13172
13173    case "$with_xml" in
13174     yes) ;;
13175     no)  ;;
13176
13177     /*)
13178      echo "$as_me:$LINENO: checking for XML headers" >&5
13179 echo $ECHO_N "checking for XML headers... $ECHO_C" >&6
13180      d=$with_xml/include
13181      if test -d $d; then
13182        X_CFLAGS="-I$d $X_CFLAGS"
13183        echo "$as_me:$LINENO: result: $d" >&5
13184 echo "${ECHO_T}$d" >&6
13185      else
13186        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13187 echo "${ECHO_T}not found ($d: no such directory)" >&6
13188      fi
13189
13190      echo "$as_me:$LINENO: checking for XML libs" >&5
13191 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13192      d=$with_xml/lib
13193      if test -d $d; then
13194        X_LIBS="-L$d $X_LIBS"
13195        echo "$as_me:$LINENO: result: $d" >&5
13196 echo "${ECHO_T}$d" >&6
13197      else
13198        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13199 echo "${ECHO_T}not found ($d: no such directory)" >&6
13200      fi
13201
13202      # replace the directory string with "yes".
13203      with_xml_req="yes"
13204      with_xml=$with_xml_req
13205      ;;
13206
13207     *)
13208      echo ""
13209      echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory."
13210      echo "       If it is a directory, then \`DIR/include' will be added to"
13211      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13212      exit 1
13213      ;;
13214    esac
13215
13216
13217 if test "$with_xml" != yes -a "$with_xml" != no ; then
13218   echo "error: must be yes or no: --with-xml=$with_xml"
13219   exit 1
13220 fi
13221
13222 if test "$with_xml" = yes; then
13223   have_xml=no
13224   have_old_xml=no
13225
13226   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
13227   # look in /foo/bin/ for for xml-config.
13228   #
13229   xml_path="$PATH"
13230
13231   if test ! -z "$gtk_dir"; then
13232     # canonicalize slashes.
13233     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
13234     xml_path="$foo:$xml_path"
13235   fi
13236
13237   if test ! -z "$gnome_dir"; then
13238     # canonicalize slashes.
13239     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
13240     xml_path="$foo:$xml_path"
13241   fi
13242
13243   if test -n "$pkg_config" ; then
13244     #
13245     # the new way...
13246     # run pkg-config based tests.
13247     #
13248     pkgs=""
13249     ok="yes"
13250
13251     # If we have Gtk 2.x, then *only* XML 2.x will work.
13252     # If we have Gtk 1.x, or don't have Gtk at all, then
13253     # either XML 1.x or 2.x will work.
13254
13255     # First check for XML 2.x.
13256     #
13257     pkg_check_version libxml-2.0 2.4.6
13258
13259     # If that didn't work (we don't have XML 2.x) and we *don't* have
13260     # Gtk 2.x, then check to see if we have XML 1.x
13261     #
13262     if test "$ok" = no -a "$have_gtk2" = no; then
13263       ok=yes
13264       pkg_check_version libxml 1.0
13265     fi
13266
13267     have_xml="$ok"
13268
13269     if test "$have_xml" = yes; then
13270       echo "$as_me:$LINENO: checking for XML includes" >&5
13271 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
13272 if test "${ac_cv_xml_config_cflags+set}" = set; then
13273   echo $ECHO_N "(cached) $ECHO_C" >&6
13274 else
13275   ac_cv_xml_config_cflags=`$pkg_config --cflags $pkgs`
13276 fi
13277 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
13278 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
13279       echo "$as_me:$LINENO: checking for XML libs" >&5
13280 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13281 if test "${ac_cv_xml_config_libs+set}" = set; then
13282   echo $ECHO_N "(cached) $ECHO_C" >&6
13283 else
13284   ac_cv_xml_config_libs=`$pkg_config --libs $pkgs`
13285 fi
13286 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
13287 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
13288       ac_xml_config_cflags=$ac_cv_xml_config_cflags
13289       ac_xml_config_libs=$ac_cv_xml_config_libs
13290     fi
13291
13292   else
13293     #
13294     # the old way...
13295     # run {xml2,xml}-config based tests.
13296     #
13297
13298     for ac_prog in xml2-config xml-config
13299 do
13300   # Extract the first word of "$ac_prog", so it can be a program name with args.
13301 set dummy $ac_prog; ac_word=$2
13302 echo "$as_me:$LINENO: checking for $ac_word" >&5
13303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13304 if test "${ac_cv_path_xml_config+set}" = set; then
13305   echo $ECHO_N "(cached) $ECHO_C" >&6
13306 else
13307   case $xml_config in
13308   [\\/]* | ?:[\\/]*)
13309   ac_cv_path_xml_config="$xml_config" # Let the user override the test with a path.
13310   ;;
13311   *)
13312   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13313 for as_dir in $xml_path
13314 do
13315   IFS=$as_save_IFS
13316   test -z "$as_dir" && as_dir=.
13317   for ac_exec_ext in '' $ac_executable_extensions; do
13318   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13319     ac_cv_path_xml_config="$as_dir/$ac_word$ac_exec_ext"
13320     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13321     break 2
13322   fi
13323 done
13324 done
13325
13326   ;;
13327 esac
13328 fi
13329 xml_config=$ac_cv_path_xml_config
13330
13331 if test -n "$xml_config"; then
13332   echo "$as_me:$LINENO: result: $xml_config" >&5
13333 echo "${ECHO_T}$xml_config" >&6
13334 else
13335   echo "$as_me:$LINENO: result: no" >&5
13336 echo "${ECHO_T}no" >&6
13337 fi
13338
13339   test -n "$xml_config" && break
13340 done
13341
13342
13343     # If we found the xml-config program, run it to get flags.
13344     #
13345     if test -n "$xml_config" ; then
13346       echo "$as_me:$LINENO: checking for XML includes" >&5
13347 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
13348 if test "${ac_cv_xml_config_cflags+set}" = set; then
13349   echo $ECHO_N "(cached) $ECHO_C" >&6
13350 else
13351   ac_cv_xml_config_cflags=`$xml_config --cflags`
13352 fi
13353 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
13354 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
13355       echo "$as_me:$LINENO: checking for XML libs" >&5
13356 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13357 if test "${ac_cv_xml_config_libs+set}" = set; then
13358   echo $ECHO_N "(cached) $ECHO_C" >&6
13359 else
13360   ac_cv_xml_config_libs=`$xml_config --libs`
13361 fi
13362 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
13363 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
13364       ac_xml_config_cflags=$ac_cv_xml_config_cflags
13365       ac_xml_config_libs=$ac_cv_xml_config_libs
13366     fi
13367
13368     ac_save_xml_CPPFLAGS="$CPPFLAGS"
13369     CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags"
13370
13371     # first try <libxml/parser.h> which is the new way...
13372     #
13373
13374   ac_save_CPPFLAGS="$CPPFLAGS"
13375   if test \! -z "$includedir" ; then
13376     CPPFLAGS="$CPPFLAGS -I$includedir"
13377   fi
13378   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13379   echo "$as_me:$LINENO: checking for libxml/xmlIO.h" >&5
13380 echo $ECHO_N "checking for libxml/xmlIO.h... $ECHO_C" >&6
13381 if test "${ac_cv_header_libxml_xmlIO_h+set}" = set; then
13382   echo $ECHO_N "(cached) $ECHO_C" >&6
13383 else
13384   cat >conftest.$ac_ext <<_ACEOF
13385 #line $LINENO "configure"
13386 #include "confdefs.h"
13387 #include <libxml/parser.h>
13388
13389 #include <libxml/xmlIO.h>
13390 _ACEOF
13391 rm -f conftest.$ac_objext
13392 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13393   (eval $ac_compile) 2>&5
13394   ac_status=$?
13395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13396   (exit $ac_status); } &&
13397          { ac_try='test -s conftest.$ac_objext'
13398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13399   (eval $ac_try) 2>&5
13400   ac_status=$?
13401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13402   (exit $ac_status); }; }; then
13403   ac_cv_header_libxml_xmlIO_h=yes
13404 else
13405   echo "$as_me: failed program was:" >&5
13406 cat conftest.$ac_ext >&5
13407 ac_cv_header_libxml_xmlIO_h=no
13408 fi
13409 rm -f conftest.$ac_objext conftest.$ac_ext
13410 fi
13411 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlIO_h" >&5
13412 echo "${ECHO_T}$ac_cv_header_libxml_xmlIO_h" >&6
13413 if test $ac_cv_header_libxml_xmlIO_h = yes; then
13414   have_xml=yes
13415 fi
13416
13417
13418   CPPFLAGS="$ac_save_CPPFLAGS"
13419
13420     # if that didn't work, then try just <parser.h> which is the old way...
13421     #
13422     if test "$have_xml" = no; then
13423
13424   ac_save_CPPFLAGS="$CPPFLAGS"
13425   if test \! -z "$includedir" ; then
13426     CPPFLAGS="$CPPFLAGS -I$includedir"
13427   fi
13428   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13429   echo "$as_me:$LINENO: checking for xmlIO.h" >&5
13430 echo $ECHO_N "checking for xmlIO.h... $ECHO_C" >&6
13431 if test "${ac_cv_header_xmlIO_h+set}" = set; then
13432   echo $ECHO_N "(cached) $ECHO_C" >&6
13433 else
13434   cat >conftest.$ac_ext <<_ACEOF
13435 #line $LINENO "configure"
13436 #include "confdefs.h"
13437 #include <parser.h>
13438
13439 #include <xmlIO.h>
13440 _ACEOF
13441 rm -f conftest.$ac_objext
13442 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13443   (eval $ac_compile) 2>&5
13444   ac_status=$?
13445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13446   (exit $ac_status); } &&
13447          { ac_try='test -s conftest.$ac_objext'
13448   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13449   (eval $ac_try) 2>&5
13450   ac_status=$?
13451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13452   (exit $ac_status); }; }; then
13453   ac_cv_header_xmlIO_h=yes
13454 else
13455   echo "$as_me: failed program was:" >&5
13456 cat conftest.$ac_ext >&5
13457 ac_cv_header_xmlIO_h=no
13458 fi
13459 rm -f conftest.$ac_objext conftest.$ac_ext
13460 fi
13461 echo "$as_me:$LINENO: result: $ac_cv_header_xmlIO_h" >&5
13462 echo "${ECHO_T}$ac_cv_header_xmlIO_h" >&6
13463 if test $ac_cv_header_xmlIO_h = yes; then
13464   have_xml=yes; have_old_xml=yes
13465 fi
13466
13467
13468   CPPFLAGS="$ac_save_CPPFLAGS"
13469     fi
13470
13471     CPPFLAGS="$ac_save_xml_CPPFLAGS"
13472   fi
13473
13474
13475   have_zlib=no
13476   if test "$have_xml" = yes; then
13477     # we have the XML headers; now make sure zlib is around.
13478     # yes, it's stupid we have to do this too, but there is
13479     # dependency screwage in Gnome.
13480
13481   ac_save_CPPFLAGS="$CPPFLAGS"
13482   ac_save_LDFLAGS="$LDFLAGS"
13483 #  ac_save_LIBS="$LIBS"
13484
13485   if test \! -z "$includedir" ; then
13486     CPPFLAGS="$CPPFLAGS -I$includedir"
13487   fi
13488   # note: $X_CFLAGS includes $x_includes
13489   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13490
13491   if test \! -z "$libdir" ; then
13492     LDFLAGS="$LDFLAGS -L$libdir"
13493   fi
13494   # note: $X_LIBS includes $x_libraries
13495   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13496
13497   echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5
13498 echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
13499 if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
13500   echo $ECHO_N "(cached) $ECHO_C" >&6
13501 else
13502   ac_check_lib_save_LIBS=$LIBS
13503 LIBS="-lz  $LIBS"
13504 cat >conftest.$ac_ext <<_ACEOF
13505 #line $LINENO "configure"
13506 #include "confdefs.h"
13507
13508 /* Override any gcc2 internal prototype to avoid an error.  */
13509 #ifdef __cplusplus
13510 extern "C"
13511 #endif
13512 /* We use char because int might match the return type of a gcc2
13513    builtin and then its argument prototype would still apply.  */
13514 char zlibVersion ();
13515 #ifdef F77_DUMMY_MAIN
13516 #  ifdef __cplusplus
13517      extern "C"
13518 #  endif
13519    int F77_DUMMY_MAIN() { return 1; }
13520 #endif
13521 int
13522 main ()
13523 {
13524 zlibVersion ();
13525   ;
13526   return 0;
13527 }
13528 _ACEOF
13529 rm -f conftest.$ac_objext conftest$ac_exeext
13530 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13531   (eval $ac_link) 2>&5
13532   ac_status=$?
13533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13534   (exit $ac_status); } &&
13535          { ac_try='test -s conftest$ac_exeext'
13536   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13537   (eval $ac_try) 2>&5
13538   ac_status=$?
13539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13540   (exit $ac_status); }; }; then
13541   ac_cv_lib_z_zlibVersion=yes
13542 else
13543   echo "$as_me: failed program was:" >&5
13544 cat conftest.$ac_ext >&5
13545 ac_cv_lib_z_zlibVersion=no
13546 fi
13547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13548 LIBS=$ac_check_lib_save_LIBS
13549 fi
13550 echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5
13551 echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
13552 if test $ac_cv_lib_z_zlibVersion = yes; then
13553   have_zlib=yes
13554 fi
13555
13556   CPPFLAGS="$ac_save_CPPFLAGS"
13557   LDFLAGS="$ac_save_LDFLAGS"
13558 #  LIBS="$ac_save_LIBS"
13559
13560     if test "$have_zlib" = no; then
13561       xml_halfassed=yes
13562       have_xml=no
13563     fi
13564   fi
13565
13566   if test "$have_xml" = yes; then
13567     # we have the header, now check for the library
13568     have_xml=no
13569     xml_halfassed=yes
13570
13571   ac_save_CPPFLAGS="$CPPFLAGS"
13572   ac_save_LDFLAGS="$LDFLAGS"
13573 #  ac_save_LIBS="$LIBS"
13574
13575   if test \! -z "$includedir" ; then
13576     CPPFLAGS="$CPPFLAGS -I$includedir"
13577   fi
13578   # note: $X_CFLAGS includes $x_includes
13579   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13580
13581   if test \! -z "$libdir" ; then
13582     LDFLAGS="$LDFLAGS -L$libdir"
13583   fi
13584   # note: $X_LIBS includes $x_libraries
13585   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13586
13587   echo "$as_me:$LINENO: checking for xmlParseChunk in -lc" >&5
13588 echo $ECHO_N "checking for xmlParseChunk in -lc... $ECHO_C" >&6
13589 if test "${ac_cv_lib_c_xmlParseChunk+set}" = set; then
13590   echo $ECHO_N "(cached) $ECHO_C" >&6
13591 else
13592   ac_check_lib_save_LIBS=$LIBS
13593 LIBS="-lc $ac_xml_config_libs $LIBS"
13594 cat >conftest.$ac_ext <<_ACEOF
13595 #line $LINENO "configure"
13596 #include "confdefs.h"
13597
13598 /* Override any gcc2 internal prototype to avoid an error.  */
13599 #ifdef __cplusplus
13600 extern "C"
13601 #endif
13602 /* We use char because int might match the return type of a gcc2
13603    builtin and then its argument prototype would still apply.  */
13604 char xmlParseChunk ();
13605 #ifdef F77_DUMMY_MAIN
13606 #  ifdef __cplusplus
13607      extern "C"
13608 #  endif
13609    int F77_DUMMY_MAIN() { return 1; }
13610 #endif
13611 int
13612 main ()
13613 {
13614 xmlParseChunk ();
13615   ;
13616   return 0;
13617 }
13618 _ACEOF
13619 rm -f conftest.$ac_objext conftest$ac_exeext
13620 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13621   (eval $ac_link) 2>&5
13622   ac_status=$?
13623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13624   (exit $ac_status); } &&
13625          { ac_try='test -s conftest$ac_exeext'
13626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13627   (eval $ac_try) 2>&5
13628   ac_status=$?
13629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13630   (exit $ac_status); }; }; then
13631   ac_cv_lib_c_xmlParseChunk=yes
13632 else
13633   echo "$as_me: failed program was:" >&5
13634 cat conftest.$ac_ext >&5
13635 ac_cv_lib_c_xmlParseChunk=no
13636 fi
13637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13638 LIBS=$ac_check_lib_save_LIBS
13639 fi
13640 echo "$as_me:$LINENO: result: $ac_cv_lib_c_xmlParseChunk" >&5
13641 echo "${ECHO_T}$ac_cv_lib_c_xmlParseChunk" >&6
13642 if test $ac_cv_lib_c_xmlParseChunk = yes; then
13643   have_xml=yes
13644                     xml_halfassed=no
13645                     XML_LIBS="$ac_xml_config_libs"
13646                     cat >>confdefs.h <<\_ACEOF
13647 #define HAVE_XML 1
13648 _ACEOF
13649
13650 else
13651   true
13652 fi
13653
13654   CPPFLAGS="$ac_save_CPPFLAGS"
13655   LDFLAGS="$ac_save_LDFLAGS"
13656 #  LIBS="$ac_save_LIBS"
13657
13658   fi
13659
13660   if test "$have_xml" = yes; then
13661     INCLUDES="$INCLUDES $ac_xml_config_cflags"
13662     GTK_LIBS="$GTK_LIBS $ac_xml_config_libs"
13663     cat >>confdefs.h <<\_ACEOF
13664 #define HAVE_XML 1
13665 _ACEOF
13666
13667     if test "$have_old_xml" = yes; then
13668       cat >>confdefs.h <<\_ACEOF
13669 #define HAVE_OLD_XML_HEADERS 1
13670 _ACEOF
13671
13672     fi
13673   fi
13674
13675 fi
13676
13677
13678 ###############################################################################
13679 #
13680 #       Checking whether Motif is really Lesstif.
13681 #
13682 ###############################################################################
13683
13684 have_lesstif=no
13685 if test "$have_motif" = yes ; then
13686   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
13687 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
13688 if test "${ac_cv_have_lesstif+set}" = set; then
13689   echo $ECHO_N "(cached) $ECHO_C" >&6
13690 else
13691
13692   ac_save_CPPFLAGS="$CPPFLAGS"
13693   if test \! -z "$includedir" ; then
13694     CPPFLAGS="$CPPFLAGS -I$includedir"
13695   fi
13696   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13697   cat >conftest.$ac_ext <<_ACEOF
13698 #line $LINENO "configure"
13699 #include "confdefs.h"
13700 #include <Xm/Xm.h>
13701 #ifdef F77_DUMMY_MAIN
13702 #  ifdef __cplusplus
13703      extern "C"
13704 #  endif
13705    int F77_DUMMY_MAIN() { return 1; }
13706 #endif
13707 int
13708 main ()
13709 {
13710 long vers = LesstifVersion;
13711   ;
13712   return 0;
13713 }
13714 _ACEOF
13715 rm -f conftest.$ac_objext
13716 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13717   (eval $ac_compile) 2>&5
13718   ac_status=$?
13719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13720   (exit $ac_status); } &&
13721          { ac_try='test -s conftest.$ac_objext'
13722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13723   (eval $ac_try) 2>&5
13724   ac_status=$?
13725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13726   (exit $ac_status); }; }; then
13727   ac_cv_have_lesstif=yes
13728 else
13729   echo "$as_me: failed program was:" >&5
13730 cat conftest.$ac_ext >&5
13731 ac_cv_have_lesstif=no
13732 fi
13733 rm -f conftest.$ac_objext conftest.$ac_ext
13734   CPPFLAGS="$ac_save_CPPFLAGS"
13735 fi
13736 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
13737 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
13738   have_lesstif=$ac_cv_have_lesstif
13739 fi
13740
13741
13742 lesstif_version=unknown
13743 lesstif_version_string=unknown
13744
13745 if test "$have_lesstif" = yes ; then
13746   ltv=unknown
13747   echo unknown > conftest-lt
13748   echo "$as_me:$LINENO: checking LessTif version number" >&5
13749 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
13750 if test "${ac_cv_lesstif_version_string+set}" = set; then
13751   echo $ECHO_N "(cached) $ECHO_C" >&6
13752 else
13753
13754   ac_save_CPPFLAGS="$CPPFLAGS"
13755   if test \! -z "$includedir" ; then
13756     CPPFLAGS="$CPPFLAGS -I$includedir"
13757   fi
13758   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13759   if test "$cross_compiling" = yes; then
13760   ac_cv_lesstif_version=unknown
13761                      ac_cv_lesstif_version_string=unknown
13762 else
13763   cat >conftest.$ac_ext <<_ACEOF
13764 #line $LINENO "configure"
13765 #include "confdefs.h"
13766 #include <stdio.h>
13767                      #include <Xm/Xm.h>
13768                      int main() {
13769                        FILE *f = fopen("conftest-lt", "w");
13770                        if (!f) exit(1);
13771                        fprintf(f, "%d %d.%d\n", LesstifVersion,
13772                           LESSTIF_VERSION, LESSTIF_REVISION);
13773                        fclose(f);
13774                        exit(0);
13775                      }
13776 _ACEOF
13777 rm -f conftest$ac_exeext
13778 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13779   (eval $ac_link) 2>&5
13780   ac_status=$?
13781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13782   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13783   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13784   (eval $ac_try) 2>&5
13785   ac_status=$?
13786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13787   (exit $ac_status); }; }; then
13788   ltv=`cat conftest-lt`
13789                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
13790                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
13791 else
13792   echo "$as_me: program exited with status $ac_status" >&5
13793 echo "$as_me: failed program was:" >&5
13794 cat conftest.$ac_ext >&5
13795 ( exit $ac_status )
13796 ac_cv_lesstif_version=unknown
13797                      ac_cv_lesstif_version_string=unknown
13798 fi
13799 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13800 fi
13801   CPPFLAGS="$ac_save_CPPFLAGS"
13802 fi
13803 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
13804 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
13805   rm -f conftest-lt
13806   lesstif_version=$ac_cv_lesstif_version
13807   lesstif_version_string=$ac_cv_lesstif_version_string
13808
13809 fi
13810
13811
13812 if test "$have_motif" = yes ; then
13813   mtv=unknown
13814   echo unknown > conftest-mt
13815   echo "$as_me:$LINENO: checking Motif version number" >&5
13816 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
13817 if test "${ac_cv_motif_version_string+set}" = set; then
13818   echo $ECHO_N "(cached) $ECHO_C" >&6
13819 else
13820
13821   ac_save_CPPFLAGS="$CPPFLAGS"
13822   if test \! -z "$includedir" ; then
13823     CPPFLAGS="$CPPFLAGS -I$includedir"
13824   fi
13825   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13826   if test "$cross_compiling" = yes; then
13827   ac_cv_motif_version=unknown
13828                      ac_cv_motif_version_string=unknown
13829 else
13830   cat >conftest.$ac_ext <<_ACEOF
13831 #line $LINENO "configure"
13832 #include "confdefs.h"
13833 #include <stdio.h>
13834                      #include <Xm/Xm.h>
13835                      int main() {
13836                        FILE *f = fopen("conftest-mt", "w");
13837                        if (!f) exit(1);
13838                        fprintf(f, "%d %d.%d\n", XmVersion,
13839                           XmVERSION, XmREVISION);
13840                        fclose(f);
13841                        exit(0);
13842                      }
13843 _ACEOF
13844 rm -f conftest$ac_exeext
13845 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13846   (eval $ac_link) 2>&5
13847   ac_status=$?
13848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13849   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13850   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13851   (eval $ac_try) 2>&5
13852   ac_status=$?
13853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13854   (exit $ac_status); }; }; then
13855   mtv=`cat conftest-mt`
13856                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
13857                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
13858 else
13859   echo "$as_me: program exited with status $ac_status" >&5
13860 echo "$as_me: failed program was:" >&5
13861 cat conftest.$ac_ext >&5
13862 ( exit $ac_status )
13863 ac_cv_motif_version=unknown
13864                      ac_cv_motif_version_string=unknown
13865 fi
13866 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13867 fi
13868   CPPFLAGS="$ac_save_CPPFLAGS"
13869 fi
13870 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
13871 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
13872   rm -f conftest-mt
13873   motif_version=$ac_cv_motif_version
13874   motif_version_string=$ac_cv_motif_version_string
13875
13876 fi
13877
13878
13879 ###############################################################################
13880 #
13881 #       Checking whether Motif requires -lXpm.
13882 #
13883 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
13884 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
13885 #       of the library whether to build the XPM code into libXm, or whether
13886 #       to rely on an external libXm.  So the only way to tell whether XPM is
13887 #       a link-time requirement is to examine libXm.a, which is very
13888 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
13889 #       always link against XPM if the XPM lib exists (and this will be a
13890 #       no-op if libXm happens to already have the XPM code in it.)
13891 #
13892 ###############################################################################
13893
13894 motif_requires_xpm=no
13895 if test "$have_motif" = yes ; then
13896    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
13897 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
13898    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
13899    then
13900      motif_requires_xpm=yes
13901      echo "$as_me:$LINENO: result: maybe" >&5
13902 echo "${ECHO_T}maybe" >&6
13903    else
13904      echo "$as_me:$LINENO: result: no" >&5
13905 echo "${ECHO_T}no" >&6
13906    fi
13907 fi
13908
13909
13910 ###############################################################################
13911 #
13912 #       Checking whether Motif requires -lXp.
13913 #
13914 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
13915 #       Extension".   Why this extension isn't in -lXext with all the others,
13916 #       I have no idea.
13917 #
13918 ###############################################################################
13919
13920 have_xp_ext=no
13921 if test "$have_motif" = yes ; then
13922    have_xp_ext=no
13923
13924   ac_save_CPPFLAGS="$CPPFLAGS"
13925   ac_save_LDFLAGS="$LDFLAGS"
13926 #  ac_save_LIBS="$LIBS"
13927
13928   if test \! -z "$includedir" ; then
13929     CPPFLAGS="$CPPFLAGS -I$includedir"
13930   fi
13931   # note: $X_CFLAGS includes $x_includes
13932   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13933
13934   if test \! -z "$libdir" ; then
13935     LDFLAGS="$LDFLAGS -L$libdir"
13936   fi
13937   # note: $X_LIBS includes $x_libraries
13938   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13939
13940   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
13941 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
13942 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
13943   echo $ECHO_N "(cached) $ECHO_C" >&6
13944 else
13945   ac_check_lib_save_LIBS=$LIBS
13946 LIBS="-lXp -lX11 -lXext -lm $LIBS"
13947 cat >conftest.$ac_ext <<_ACEOF
13948 #line $LINENO "configure"
13949 #include "confdefs.h"
13950
13951 /* Override any gcc2 internal prototype to avoid an error.  */
13952 #ifdef __cplusplus
13953 extern "C"
13954 #endif
13955 /* We use char because int might match the return type of a gcc2
13956    builtin and then its argument prototype would still apply.  */
13957 char XpQueryExtension ();
13958 #ifdef F77_DUMMY_MAIN
13959 #  ifdef __cplusplus
13960      extern "C"
13961 #  endif
13962    int F77_DUMMY_MAIN() { return 1; }
13963 #endif
13964 int
13965 main ()
13966 {
13967 XpQueryExtension ();
13968   ;
13969   return 0;
13970 }
13971 _ACEOF
13972 rm -f conftest.$ac_objext conftest$ac_exeext
13973 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13974   (eval $ac_link) 2>&5
13975   ac_status=$?
13976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13977   (exit $ac_status); } &&
13978          { ac_try='test -s conftest$ac_exeext'
13979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13980   (eval $ac_try) 2>&5
13981   ac_status=$?
13982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13983   (exit $ac_status); }; }; then
13984   ac_cv_lib_Xp_XpQueryExtension=yes
13985 else
13986   echo "$as_me: failed program was:" >&5
13987 cat conftest.$ac_ext >&5
13988 ac_cv_lib_Xp_XpQueryExtension=no
13989 fi
13990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13991 LIBS=$ac_check_lib_save_LIBS
13992 fi
13993 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
13994 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
13995 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
13996   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
13997 else
13998   true
13999 fi
14000
14001   CPPFLAGS="$ac_save_CPPFLAGS"
14002   LDFLAGS="$ac_save_LDFLAGS"
14003 #  LIBS="$ac_save_LIBS"
14004
14005 fi
14006
14007
14008 ###############################################################################
14009 #
14010 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
14011 #
14012 ###############################################################################
14013
14014 have_xintl=no
14015 if test "$have_motif" = yes ; then
14016
14017   ac_save_CPPFLAGS="$CPPFLAGS"
14018   ac_save_LDFLAGS="$LDFLAGS"
14019 #  ac_save_LIBS="$LIBS"
14020
14021   if test \! -z "$includedir" ; then
14022     CPPFLAGS="$CPPFLAGS -I$includedir"
14023   fi
14024   # note: $X_CFLAGS includes $x_includes
14025   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14026
14027   if test \! -z "$libdir" ; then
14028     LDFLAGS="$LDFLAGS -L$libdir"
14029   fi
14030   # note: $X_LIBS includes $x_libraries
14031   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14032
14033   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
14034 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
14035 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
14036   echo $ECHO_N "(cached) $ECHO_C" >&6
14037 else
14038   ac_check_lib_save_LIBS=$LIBS
14039 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
14040 cat >conftest.$ac_ext <<_ACEOF
14041 #line $LINENO "configure"
14042 #include "confdefs.h"
14043
14044 /* Override any gcc2 internal prototype to avoid an error.  */
14045 #ifdef __cplusplus
14046 extern "C"
14047 #endif
14048 /* We use char because int might match the return type of a gcc2
14049    builtin and then its argument prototype would still apply.  */
14050 char _Xsetlocale ();
14051 #ifdef F77_DUMMY_MAIN
14052 #  ifdef __cplusplus
14053      extern "C"
14054 #  endif
14055    int F77_DUMMY_MAIN() { return 1; }
14056 #endif
14057 int
14058 main ()
14059 {
14060 _Xsetlocale ();
14061   ;
14062   return 0;
14063 }
14064 _ACEOF
14065 rm -f conftest.$ac_objext conftest$ac_exeext
14066 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14067   (eval $ac_link) 2>&5
14068   ac_status=$?
14069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14070   (exit $ac_status); } &&
14071          { ac_try='test -s conftest$ac_exeext'
14072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14073   (eval $ac_try) 2>&5
14074   ac_status=$?
14075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14076   (exit $ac_status); }; }; then
14077   ac_cv_lib_Xintl__Xsetlocale=yes
14078 else
14079   echo "$as_me: failed program was:" >&5
14080 cat conftest.$ac_ext >&5
14081 ac_cv_lib_Xintl__Xsetlocale=no
14082 fi
14083 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14084 LIBS=$ac_check_lib_save_LIBS
14085 fi
14086 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
14087 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
14088 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
14089   have_xintl=yes
14090 else
14091   have_xintl=no
14092 fi
14093
14094   CPPFLAGS="$ac_save_CPPFLAGS"
14095   LDFLAGS="$ac_save_LDFLAGS"
14096 #  LIBS="$ac_save_LIBS"
14097
14098   if test "$have_xintl" = yes; then
14099     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
14100   fi
14101 fi
14102
14103
14104 ###############################################################################
14105 #
14106 #       Check for -lGL or -lMesaGL.
14107 #
14108 ###############################################################################
14109
14110 have_gl=no
14111 ac_have_mesa_gl=no
14112 with_gl_req=unspecified
14113 gl_halfassed=no
14114
14115 # Check whether --with-gl or --without-gl was given.
14116 if test "${with_gl+set}" = set; then
14117   withval="$with_gl"
14118   with_gl="$withval"; with_gl_req="$withval"
14119 else
14120   with_gl=yes
14121 fi;
14122
14123
14124    case "$with_gl" in
14125     yes) ;;
14126     no)  ;;
14127
14128     /*)
14129      echo "$as_me:$LINENO: checking for GL headers" >&5
14130 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
14131      d=$with_gl/include
14132      if test -d $d; then
14133        X_CFLAGS="-I$d $X_CFLAGS"
14134        echo "$as_me:$LINENO: result: $d" >&5
14135 echo "${ECHO_T}$d" >&6
14136      else
14137        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14138 echo "${ECHO_T}not found ($d: no such directory)" >&6
14139      fi
14140
14141      echo "$as_me:$LINENO: checking for GL libs" >&5
14142 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
14143      d=$with_gl/lib
14144      if test -d $d; then
14145        X_LIBS="-L$d $X_LIBS"
14146        echo "$as_me:$LINENO: result: $d" >&5
14147 echo "${ECHO_T}$d" >&6
14148      else
14149        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14150 echo "${ECHO_T}not found ($d: no such directory)" >&6
14151      fi
14152
14153      # replace the directory string with "yes".
14154      with_gl_req="yes"
14155      with_gl=$with_gl_req
14156      ;;
14157
14158     *)
14159      echo ""
14160      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
14161      echo "       If it is a directory, then \`DIR/include' will be added to"
14162      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14163      exit 1
14164      ;;
14165    esac
14166
14167
14168 ac_mesagl_version=unknown
14169 ac_mesagl_version_string=unknown
14170
14171 if test "$with_gl" = yes; then
14172
14173   ac_save_CPPFLAGS="$CPPFLAGS"
14174   if test \! -z "$includedir" ; then
14175     CPPFLAGS="$CPPFLAGS -I$includedir"
14176   fi
14177   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14178   if test "${ac_cv_header_GL_gl_h+set}" = set; then
14179   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
14180 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
14181 if test "${ac_cv_header_GL_gl_h+set}" = set; then
14182   echo $ECHO_N "(cached) $ECHO_C" >&6
14183 fi
14184 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
14185 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
14186 else
14187   # Is the header compilable?
14188 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
14189 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
14190 cat >conftest.$ac_ext <<_ACEOF
14191 #line $LINENO "configure"
14192 #include "confdefs.h"
14193 $ac_includes_default
14194 #include <GL/gl.h>
14195 _ACEOF
14196 rm -f conftest.$ac_objext
14197 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14198   (eval $ac_compile) 2>&5
14199   ac_status=$?
14200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14201   (exit $ac_status); } &&
14202          { ac_try='test -s conftest.$ac_objext'
14203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14204   (eval $ac_try) 2>&5
14205   ac_status=$?
14206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14207   (exit $ac_status); }; }; then
14208   ac_header_compiler=yes
14209 else
14210   echo "$as_me: failed program was:" >&5
14211 cat conftest.$ac_ext >&5
14212 ac_header_compiler=no
14213 fi
14214 rm -f conftest.$ac_objext conftest.$ac_ext
14215 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14216 echo "${ECHO_T}$ac_header_compiler" >&6
14217
14218 # Is the header present?
14219 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
14220 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
14221 cat >conftest.$ac_ext <<_ACEOF
14222 #line $LINENO "configure"
14223 #include "confdefs.h"
14224 #include <GL/gl.h>
14225 _ACEOF
14226 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14227   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14228   ac_status=$?
14229   egrep -v '^ *\+' conftest.er1 >conftest.err
14230   rm -f conftest.er1
14231   cat conftest.err >&5
14232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14233   (exit $ac_status); } >/dev/null; then
14234   if test -s conftest.err; then
14235     ac_cpp_err=$ac_c_preproc_warn_flag
14236   else
14237     ac_cpp_err=
14238   fi
14239 else
14240   ac_cpp_err=yes
14241 fi
14242 if test -z "$ac_cpp_err"; then
14243   ac_header_preproc=yes
14244 else
14245   echo "$as_me: failed program was:" >&5
14246   cat conftest.$ac_ext >&5
14247   ac_header_preproc=no
14248 fi
14249 rm -f conftest.err conftest.$ac_ext
14250 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14251 echo "${ECHO_T}$ac_header_preproc" >&6
14252
14253 # So?  What about this header?
14254 case $ac_header_compiler:$ac_header_preproc in
14255   yes:no )
14256     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
14257 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14258     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
14259 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;};;
14260   no:yes )
14261     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
14262 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
14263     { echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5
14264 echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;}
14265     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
14266 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;};;
14267 esac
14268 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
14269 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
14270 if test "${ac_cv_header_GL_gl_h+set}" = set; then
14271   echo $ECHO_N "(cached) $ECHO_C" >&6
14272 else
14273   ac_cv_header_GL_gl_h=$ac_header_preproc
14274 fi
14275 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
14276 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
14277
14278 fi
14279 if test $ac_cv_header_GL_gl_h = yes; then
14280   have_gl=yes
14281 else
14282   have_gl=no
14283 fi
14284
14285
14286   CPPFLAGS="$ac_save_CPPFLAGS"
14287   if test "$have_gl" = yes ; then
14288
14289   ac_save_CPPFLAGS="$CPPFLAGS"
14290   if test \! -z "$includedir" ; then
14291     CPPFLAGS="$CPPFLAGS -I$includedir"
14292   fi
14293   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14294   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
14295 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
14296 if test "${ac_cv_header_GL_glx_h+set}" = set; then
14297   echo $ECHO_N "(cached) $ECHO_C" >&6
14298 else
14299   cat >conftest.$ac_ext <<_ACEOF
14300 #line $LINENO "configure"
14301 #include "confdefs.h"
14302 #include <GL/gl.h>
14303
14304 #include <GL/glx.h>
14305 _ACEOF
14306 rm -f conftest.$ac_objext
14307 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14308   (eval $ac_compile) 2>&5
14309   ac_status=$?
14310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14311   (exit $ac_status); } &&
14312          { ac_try='test -s conftest.$ac_objext'
14313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14314   (eval $ac_try) 2>&5
14315   ac_status=$?
14316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14317   (exit $ac_status); }; }; then
14318   ac_cv_header_GL_glx_h=yes
14319 else
14320   echo "$as_me: failed program was:" >&5
14321 cat conftest.$ac_ext >&5
14322 ac_cv_header_GL_glx_h=no
14323 fi
14324 rm -f conftest.$ac_objext conftest.$ac_ext
14325 fi
14326 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
14327 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
14328 if test $ac_cv_header_GL_glx_h = yes; then
14329   have_gl=yes
14330 else
14331   have_gl=no
14332 fi
14333
14334
14335   CPPFLAGS="$ac_save_CPPFLAGS"
14336   fi
14337
14338   # If we have the headers, try and figure out which vendor it's from.
14339   #
14340   if test "$have_gl" = yes ; then
14341
14342     # We need to know whether it's MesaGL so that we know which libraries
14343     # to link against.
14344     #
14345     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
14346 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
14347 if test "${ac_cv_have_mesa_gl+set}" = set; then
14348   echo $ECHO_N "(cached) $ECHO_C" >&6
14349 else
14350   ac_cv_have_mesa_gl=no
14351
14352   ac_save_CPPFLAGS="$CPPFLAGS"
14353   if test \! -z "$includedir" ; then
14354     CPPFLAGS="$CPPFLAGS -I$includedir"
14355   fi
14356   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14357   cat >conftest.$ac_ext <<_ACEOF
14358 #line $LINENO "configure"
14359 #include "confdefs.h"
14360 #include <GL/glx.h>
14361
14362 _ACEOF
14363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14364   egrep "Mesa|MESA" >/dev/null 2>&1; then
14365   ac_cv_have_mesa_gl=yes
14366 fi
14367 rm -f conftest*
14368
14369   CPPFLAGS="$ac_save_CPPFLAGS"
14370
14371 fi
14372 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
14373 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
14374     ac_have_mesa_gl=$ac_cv_have_mesa_gl
14375
14376
14377     gl_lib_1=""
14378     GL_LIBS=""
14379
14380
14381     # Some versions of MesaGL are compiled to require -lpthread.
14382     # So if the Mesa headers exist, and -lpthread exists, then always
14383     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
14384     #
14385     if test "$ac_have_mesa_gl" = yes; then
14386       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14387 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
14388 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
14389   echo $ECHO_N "(cached) $ECHO_C" >&6
14390 else
14391   ac_check_lib_save_LIBS=$LIBS
14392 LIBS="-lpthread  $LIBS"
14393 cat >conftest.$ac_ext <<_ACEOF
14394 #line $LINENO "configure"
14395 #include "confdefs.h"
14396
14397 /* Override any gcc2 internal prototype to avoid an error.  */
14398 #ifdef __cplusplus
14399 extern "C"
14400 #endif
14401 /* We use char because int might match the return type of a gcc2
14402    builtin and then its argument prototype would still apply.  */
14403 char pthread_create ();
14404 #ifdef F77_DUMMY_MAIN
14405 #  ifdef __cplusplus
14406      extern "C"
14407 #  endif
14408    int F77_DUMMY_MAIN() { return 1; }
14409 #endif
14410 int
14411 main ()
14412 {
14413 pthread_create ();
14414   ;
14415   return 0;
14416 }
14417 _ACEOF
14418 rm -f conftest.$ac_objext conftest$ac_exeext
14419 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14420   (eval $ac_link) 2>&5
14421   ac_status=$?
14422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14423   (exit $ac_status); } &&
14424          { ac_try='test -s conftest$ac_exeext'
14425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14426   (eval $ac_try) 2>&5
14427   ac_status=$?
14428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14429   (exit $ac_status); }; }; then
14430   ac_cv_lib_pthread_pthread_create=yes
14431 else
14432   echo "$as_me: failed program was:" >&5
14433 cat conftest.$ac_ext >&5
14434 ac_cv_lib_pthread_pthread_create=no
14435 fi
14436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14437 LIBS=$ac_check_lib_save_LIBS
14438 fi
14439 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
14440 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
14441 if test $ac_cv_lib_pthread_pthread_create = yes; then
14442   GL_LIBS="-lpthread"
14443 fi
14444
14445     fi
14446
14447
14448     # If we have Mesa headers, check to see if we can link against -lMesaGL.
14449     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
14450     # Else, warn that GL is busted.  (We have the headers, but no libs.)
14451     #
14452
14453     if test "$ac_have_mesa_gl" = yes ; then
14454
14455   ac_save_CPPFLAGS="$CPPFLAGS"
14456   ac_save_LDFLAGS="$LDFLAGS"
14457 #  ac_save_LIBS="$LIBS"
14458
14459   if test \! -z "$includedir" ; then
14460     CPPFLAGS="$CPPFLAGS -I$includedir"
14461   fi
14462   # note: $X_CFLAGS includes $x_includes
14463   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14464
14465   if test \! -z "$libdir" ; then
14466     LDFLAGS="$LDFLAGS -L$libdir"
14467   fi
14468   # note: $X_LIBS includes $x_libraries
14469   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14470
14471   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
14472 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
14473 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
14474   echo $ECHO_N "(cached) $ECHO_C" >&6
14475 else
14476   ac_check_lib_save_LIBS=$LIBS
14477 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
14478 cat >conftest.$ac_ext <<_ACEOF
14479 #line $LINENO "configure"
14480 #include "confdefs.h"
14481
14482 /* Override any gcc2 internal prototype to avoid an error.  */
14483 #ifdef __cplusplus
14484 extern "C"
14485 #endif
14486 /* We use char because int might match the return type of a gcc2
14487    builtin and then its argument prototype would still apply.  */
14488 char glXCreateContext ();
14489 #ifdef F77_DUMMY_MAIN
14490 #  ifdef __cplusplus
14491      extern "C"
14492 #  endif
14493    int F77_DUMMY_MAIN() { return 1; }
14494 #endif
14495 int
14496 main ()
14497 {
14498 glXCreateContext ();
14499   ;
14500   return 0;
14501 }
14502 _ACEOF
14503 rm -f conftest.$ac_objext conftest$ac_exeext
14504 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14505   (eval $ac_link) 2>&5
14506   ac_status=$?
14507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14508   (exit $ac_status); } &&
14509          { ac_try='test -s conftest$ac_exeext'
14510   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14511   (eval $ac_try) 2>&5
14512   ac_status=$?
14513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14514   (exit $ac_status); }; }; then
14515   ac_cv_lib_MesaGL_glXCreateContext=yes
14516 else
14517   echo "$as_me: failed program was:" >&5
14518 cat conftest.$ac_ext >&5
14519 ac_cv_lib_MesaGL_glXCreateContext=no
14520 fi
14521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14522 LIBS=$ac_check_lib_save_LIBS
14523 fi
14524 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
14525 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
14526 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
14527   gl_lib_1="MesaGL"
14528                       GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
14529 fi
14530
14531   CPPFLAGS="$ac_save_CPPFLAGS"
14532   LDFLAGS="$ac_save_LDFLAGS"
14533 #  LIBS="$ac_save_LIBS"
14534
14535     fi
14536
14537     if test "$gl_lib_1" = "" ; then
14538
14539   ac_save_CPPFLAGS="$CPPFLAGS"
14540   ac_save_LDFLAGS="$LDFLAGS"
14541 #  ac_save_LIBS="$LIBS"
14542
14543   if test \! -z "$includedir" ; then
14544     CPPFLAGS="$CPPFLAGS -I$includedir"
14545   fi
14546   # note: $X_CFLAGS includes $x_includes
14547   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14548
14549   if test \! -z "$libdir" ; then
14550     LDFLAGS="$LDFLAGS -L$libdir"
14551   fi
14552   # note: $X_LIBS includes $x_libraries
14553   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14554
14555   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
14556 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
14557 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
14558   echo $ECHO_N "(cached) $ECHO_C" >&6
14559 else
14560   ac_check_lib_save_LIBS=$LIBS
14561 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
14562 cat >conftest.$ac_ext <<_ACEOF
14563 #line $LINENO "configure"
14564 #include "confdefs.h"
14565
14566 /* Override any gcc2 internal prototype to avoid an error.  */
14567 #ifdef __cplusplus
14568 extern "C"
14569 #endif
14570 /* We use char because int might match the return type of a gcc2
14571    builtin and then its argument prototype would still apply.  */
14572 char glXCreateContext ();
14573 #ifdef F77_DUMMY_MAIN
14574 #  ifdef __cplusplus
14575      extern "C"
14576 #  endif
14577    int F77_DUMMY_MAIN() { return 1; }
14578 #endif
14579 int
14580 main ()
14581 {
14582 glXCreateContext ();
14583   ;
14584   return 0;
14585 }
14586 _ACEOF
14587 rm -f conftest.$ac_objext conftest$ac_exeext
14588 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14589   (eval $ac_link) 2>&5
14590   ac_status=$?
14591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14592   (exit $ac_status); } &&
14593          { ac_try='test -s conftest$ac_exeext'
14594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14595   (eval $ac_try) 2>&5
14596   ac_status=$?
14597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14598   (exit $ac_status); }; }; then
14599   ac_cv_lib_GL_glXCreateContext=yes
14600 else
14601   echo "$as_me: failed program was:" >&5
14602 cat conftest.$ac_ext >&5
14603 ac_cv_lib_GL_glXCreateContext=no
14604 fi
14605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14606 LIBS=$ac_check_lib_save_LIBS
14607 fi
14608 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
14609 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
14610 if test $ac_cv_lib_GL_glXCreateContext = yes; then
14611   gl_lib_1="GL"
14612                       GL_LIBS="-lGL -lGLU $GL_LIBS"
14613 fi
14614
14615   CPPFLAGS="$ac_save_CPPFLAGS"
14616   LDFLAGS="$ac_save_LDFLAGS"
14617 #  LIBS="$ac_save_LIBS"
14618
14619     fi
14620
14621     if test "$gl_lib_1" = "" ; then
14622       # we have headers, but no libs -- bail.
14623       have_gl=no
14624       ac_have_mesa_gl=no
14625       gl_halfassed=yes
14626     else
14627       # linking works -- we can build the GL hacks.
14628       cat >>confdefs.h <<\_ACEOF
14629 #define HAVE_GL 1
14630 _ACEOF
14631
14632       if test "$ac_have_mesa_gl" = yes ; then
14633         cat >>confdefs.h <<\_ACEOF
14634 #define HAVE_MESA_GL 1
14635 _ACEOF
14636
14637       fi
14638     fi
14639   fi
14640
14641
14642   # Now that we know we have GL headers and libs, do some more GL testing.
14643   #
14644
14645   if test "$have_gl" = yes ; then
14646     # If it's MesaGL, we'd like to issue a warning if the version number
14647     # is less than or equal to 2.6, because that version had a security bug.
14648     #
14649     if test "$ac_have_mesa_gl" = yes; then
14650
14651       echo "$as_me:$LINENO: checking MesaGL version number" >&5
14652 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
14653 if test "${ac_cv_mesagl_version_string+set}" = set; then
14654   echo $ECHO_N "(cached) $ECHO_C" >&6
14655 else
14656   cat > conftest.$ac_ext <<EOF
14657 #line 14663 "configure"
14658 #include "confdefs.h"
14659 #include <GL/gl.h>
14660 #ifndef MESA_MAJOR_VERSION
14661 # include <GL/xmesa.h>
14662 # ifdef XMESA_MAJOR_VERSION
14663    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
14664       we have to check the XMesa version number (the number of the X protocol
14665       support, which seems to be the same as the Mesa version number.)
14666     */
14667 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
14668 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
14669 # else
14670    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
14671       so we have no way of telling what version of Mesa this is at all.
14672       So, we'll guess that the osmesa version (the "offscreen protocol")
14673       is less than or equal to the real mesa version number.  Except that
14674       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
14675       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
14676     */
14677 # include <GL/osmesa.h>
14678 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
14679 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
14680 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
14681 #   undef MESA_MINOR_VERSION
14682 #   define MESA_MINOR_VERSION 4 or newer, probably?
14683 #  endif
14684 # endif
14685 #endif
14686 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
14687 EOF
14688
14689          ac_save_CPPFLAGS="$CPPFLAGS"
14690          if test \! -z "$includedir" ; then
14691            CPPFLAGS="$CPPFLAGS -I$includedir"
14692          fi
14693          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14694
14695          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
14696
14697          # M4 sucks!!
14698
14699           mglv=`echo "$mglv" | sed -n \
14700              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
14701
14702
14703          rm -f conftest.$ac_ext
14704
14705          CPPFLAGS="$ac_save_CPPFLAGS"
14706
14707          if test "$mglv" = ""; then
14708            ac_mesagl_version=unknown
14709            ac_mesagl_version_string=unknown
14710          else
14711            ac_mesagl_version_string="$mglv"
14712            # M4 sucks!!
14713
14714            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
14715            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
14716
14717            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
14718            if test -z "$ac_mesagl_version"; then
14719              ac_mesagl_version=unknown
14720              ac_mesagl_version_string=unknown
14721            fi
14722          fi
14723          ac_cv_mesagl_version=$ac_mesagl_version
14724          ac_cv_mesagl_version_string=$ac_mesagl_version_string
14725
14726 fi
14727 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
14728 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
14729       ac_mesagl_version=$ac_cv_mesagl_version
14730       ac_mesagl_version_string=$ac_cv_mesagl_version_string
14731     fi
14732
14733
14734     # Check for OpenGL 1.1 features.
14735     #
14736
14737   ac_save_CPPFLAGS="$CPPFLAGS"
14738   ac_save_LDFLAGS="$LDFLAGS"
14739 #  ac_save_LIBS="$LIBS"
14740
14741   if test \! -z "$includedir" ; then
14742     CPPFLAGS="$CPPFLAGS -I$includedir"
14743   fi
14744   # note: $X_CFLAGS includes $x_includes
14745   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14746
14747   if test \! -z "$libdir" ; then
14748     LDFLAGS="$LDFLAGS -L$libdir"
14749   fi
14750   # note: $X_LIBS includes $x_libraries
14751   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14752
14753   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
14754 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
14755 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
14756 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14757   echo $ECHO_N "(cached) $ECHO_C" >&6
14758 else
14759   ac_check_lib_save_LIBS=$LIBS
14760 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
14761 cat >conftest.$ac_ext <<_ACEOF
14762 #line $LINENO "configure"
14763 #include "confdefs.h"
14764
14765 /* Override any gcc2 internal prototype to avoid an error.  */
14766 #ifdef __cplusplus
14767 extern "C"
14768 #endif
14769 /* We use char because int might match the return type of a gcc2
14770    builtin and then its argument prototype would still apply.  */
14771 char glBindTexture ();
14772 #ifdef F77_DUMMY_MAIN
14773 #  ifdef __cplusplus
14774      extern "C"
14775 #  endif
14776    int F77_DUMMY_MAIN() { return 1; }
14777 #endif
14778 int
14779 main ()
14780 {
14781 glBindTexture ();
14782   ;
14783   return 0;
14784 }
14785 _ACEOF
14786 rm -f conftest.$ac_objext conftest$ac_exeext
14787 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14788   (eval $ac_link) 2>&5
14789   ac_status=$?
14790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14791   (exit $ac_status); } &&
14792          { ac_try='test -s conftest$ac_exeext'
14793   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14794   (eval $ac_try) 2>&5
14795   ac_status=$?
14796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14797   (exit $ac_status); }; }; then
14798   eval "$as_ac_Lib=yes"
14799 else
14800   echo "$as_me: failed program was:" >&5
14801 cat conftest.$ac_ext >&5
14802 eval "$as_ac_Lib=no"
14803 fi
14804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14805 LIBS=$ac_check_lib_save_LIBS
14806 fi
14807 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14808 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14809 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14810   cat >>confdefs.h <<\_ACEOF
14811 #define HAVE_GLBINDTEXTURE 1
14812 _ACEOF
14813
14814 else
14815   true
14816 fi
14817
14818   CPPFLAGS="$ac_save_CPPFLAGS"
14819   LDFLAGS="$ac_save_LDFLAGS"
14820 #  LIBS="$ac_save_LIBS"
14821
14822   fi
14823
14824 elif test "$with_gl" != no; then
14825   echo "error: must be yes or no: --with-gl=$with_gl"
14826   exit 1
14827 fi
14828
14829
14830 ###############################################################################
14831 #
14832 #       Check for -lgle.
14833 #
14834 ###############################################################################
14835
14836 have_gle=no
14837 with_gle_req=unspecified
14838 gle_halfassed=no
14839
14840 # Check whether --with-gle or --without-gle was given.
14841 if test "${with_gle+set}" = set; then
14842   withval="$with_gle"
14843   with_gle="$withval"; with_gle_req="$withval"
14844 else
14845   with_gle=yes
14846 fi;
14847
14848
14849    case "$with_gle" in
14850     yes) ;;
14851     no)  ;;
14852
14853     /*)
14854      echo "$as_me:$LINENO: checking for GLE headers" >&5
14855 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
14856      d=$with_gle/include
14857      if test -d $d; then
14858        X_CFLAGS="-I$d $X_CFLAGS"
14859        echo "$as_me:$LINENO: result: $d" >&5
14860 echo "${ECHO_T}$d" >&6
14861      else
14862        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14863 echo "${ECHO_T}not found ($d: no such directory)" >&6
14864      fi
14865
14866      echo "$as_me:$LINENO: checking for GLE libs" >&5
14867 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
14868      d=$with_gle/lib
14869      if test -d $d; then
14870        X_LIBS="-L$d $X_LIBS"
14871        echo "$as_me:$LINENO: result: $d" >&5
14872 echo "${ECHO_T}$d" >&6
14873      else
14874        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14875 echo "${ECHO_T}not found ($d: no such directory)" >&6
14876      fi
14877
14878      # replace the directory string with "yes".
14879      with_gle_req="yes"
14880      with_gle=$with_gle_req
14881      ;;
14882
14883     *)
14884      echo ""
14885      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
14886      echo "       If it is a directory, then \`DIR/include' will be added to"
14887      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14888      exit 1
14889      ;;
14890    esac
14891
14892
14893 GLE_LIBS=""
14894
14895 if test "$have_gl" = no ; then
14896  true
14897 elif test "$with_gle" = yes; then
14898
14899
14900   ac_save_CPPFLAGS="$CPPFLAGS"
14901   if test \! -z "$includedir" ; then
14902     CPPFLAGS="$CPPFLAGS -I$includedir"
14903   fi
14904   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14905   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
14906 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
14907 if test "${ac_cv_header_GL_gle_h+set}" = set; then
14908   echo $ECHO_N "(cached) $ECHO_C" >&6
14909 else
14910   cat >conftest.$ac_ext <<_ACEOF
14911 #line $LINENO "configure"
14912 #include "confdefs.h"
14913 #include <GL/gl.h>
14914
14915 #include <GL/gle.h>
14916 _ACEOF
14917 rm -f conftest.$ac_objext
14918 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14919   (eval $ac_compile) 2>&5
14920   ac_status=$?
14921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14922   (exit $ac_status); } &&
14923          { ac_try='test -s conftest.$ac_objext'
14924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14925   (eval $ac_try) 2>&5
14926   ac_status=$?
14927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14928   (exit $ac_status); }; }; then
14929   ac_cv_header_GL_gle_h=yes
14930 else
14931   echo "$as_me: failed program was:" >&5
14932 cat conftest.$ac_ext >&5
14933 ac_cv_header_GL_gle_h=no
14934 fi
14935 rm -f conftest.$ac_objext conftest.$ac_ext
14936 fi
14937 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
14938 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
14939 if test $ac_cv_header_GL_gle_h = yes; then
14940   have_gle3=yes
14941 else
14942   have_gle3=no
14943 fi
14944
14945
14946   CPPFLAGS="$ac_save_CPPFLAGS"
14947   if test "$have_gle3" = yes ; then
14948     have_gle=yes;
14949   else
14950
14951   ac_save_CPPFLAGS="$CPPFLAGS"
14952   if test \! -z "$includedir" ; then
14953     CPPFLAGS="$CPPFLAGS -I$includedir"
14954   fi
14955   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14956   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
14957 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
14958 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
14959   echo $ECHO_N "(cached) $ECHO_C" >&6
14960 else
14961   cat >conftest.$ac_ext <<_ACEOF
14962 #line $LINENO "configure"
14963 #include "confdefs.h"
14964 #include <GL/gl.h>
14965
14966 #include <GL/gutil.h>
14967 _ACEOF
14968 rm -f conftest.$ac_objext
14969 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14970   (eval $ac_compile) 2>&5
14971   ac_status=$?
14972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14973   (exit $ac_status); } &&
14974          { ac_try='test -s conftest.$ac_objext'
14975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14976   (eval $ac_try) 2>&5
14977   ac_status=$?
14978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14979   (exit $ac_status); }; }; then
14980   ac_cv_header_GL_gutil_h=yes
14981 else
14982   echo "$as_me: failed program was:" >&5
14983 cat conftest.$ac_ext >&5
14984 ac_cv_header_GL_gutil_h=no
14985 fi
14986 rm -f conftest.$ac_objext conftest.$ac_ext
14987 fi
14988 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
14989 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
14990 if test $ac_cv_header_GL_gutil_h = yes; then
14991   have_gle=yes
14992 else
14993   have_gle=no
14994 fi
14995
14996
14997   CPPFLAGS="$ac_save_CPPFLAGS"
14998     if test "$have_gle" = yes ; then
14999
15000   ac_save_CPPFLAGS="$CPPFLAGS"
15001   if test \! -z "$includedir" ; then
15002     CPPFLAGS="$CPPFLAGS -I$includedir"
15003   fi
15004   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15005   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
15006 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
15007 if test "${ac_cv_header_GL_tube_h+set}" = set; then
15008   echo $ECHO_N "(cached) $ECHO_C" >&6
15009 else
15010   cat >conftest.$ac_ext <<_ACEOF
15011 #line $LINENO "configure"
15012 #include "confdefs.h"
15013 #include <GL/gl.h>
15014
15015 #include <GL/tube.h>
15016 _ACEOF
15017 rm -f conftest.$ac_objext
15018 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15019   (eval $ac_compile) 2>&5
15020   ac_status=$?
15021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15022   (exit $ac_status); } &&
15023          { ac_try='test -s conftest.$ac_objext'
15024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15025   (eval $ac_try) 2>&5
15026   ac_status=$?
15027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15028   (exit $ac_status); }; }; then
15029   ac_cv_header_GL_tube_h=yes
15030 else
15031   echo "$as_me: failed program was:" >&5
15032 cat conftest.$ac_ext >&5
15033 ac_cv_header_GL_tube_h=no
15034 fi
15035 rm -f conftest.$ac_objext conftest.$ac_ext
15036 fi
15037 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
15038 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
15039 if test $ac_cv_header_GL_tube_h = yes; then
15040   have_gle=yes
15041 else
15042   have_gle=no
15043 fi
15044
15045
15046   CPPFLAGS="$ac_save_CPPFLAGS"
15047     fi
15048   fi
15049
15050   if test "$have_gle" = yes ; then
15051     have_gle=no
15052     gle_halfassed=yes
15053
15054   ac_save_CPPFLAGS="$CPPFLAGS"
15055   ac_save_LDFLAGS="$LDFLAGS"
15056 #  ac_save_LIBS="$LIBS"
15057
15058   if test \! -z "$includedir" ; then
15059     CPPFLAGS="$CPPFLAGS -I$includedir"
15060   fi
15061   # note: $X_CFLAGS includes $x_includes
15062   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15063
15064   if test \! -z "$libdir" ; then
15065     LDFLAGS="$LDFLAGS -L$libdir"
15066   fi
15067   # note: $X_LIBS includes $x_libraries
15068   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15069
15070   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
15071 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
15072 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
15073   echo $ECHO_N "(cached) $ECHO_C" >&6
15074 else
15075   ac_check_lib_save_LIBS=$LIBS
15076 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
15077 cat >conftest.$ac_ext <<_ACEOF
15078 #line $LINENO "configure"
15079 #include "confdefs.h"
15080
15081 /* Override any gcc2 internal prototype to avoid an error.  */
15082 #ifdef __cplusplus
15083 extern "C"
15084 #endif
15085 /* We use char because int might match the return type of a gcc2
15086    builtin and then its argument prototype would still apply.  */
15087 char gleCreateGC ();
15088 #ifdef F77_DUMMY_MAIN
15089 #  ifdef __cplusplus
15090      extern "C"
15091 #  endif
15092    int F77_DUMMY_MAIN() { return 1; }
15093 #endif
15094 int
15095 main ()
15096 {
15097 gleCreateGC ();
15098   ;
15099   return 0;
15100 }
15101 _ACEOF
15102 rm -f conftest.$ac_objext conftest$ac_exeext
15103 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15104   (eval $ac_link) 2>&5
15105   ac_status=$?
15106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15107   (exit $ac_status); } &&
15108          { ac_try='test -s conftest$ac_exeext'
15109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15110   (eval $ac_try) 2>&5
15111   ac_status=$?
15112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15113   (exit $ac_status); }; }; then
15114   ac_cv_lib_gle_gleCreateGC=yes
15115 else
15116   echo "$as_me: failed program was:" >&5
15117 cat conftest.$ac_ext >&5
15118 ac_cv_lib_gle_gleCreateGC=no
15119 fi
15120 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15121 LIBS=$ac_check_lib_save_LIBS
15122 fi
15123 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
15124 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
15125 if test $ac_cv_lib_gle_gleCreateGC = yes; then
15126   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
15127 fi
15128
15129   CPPFLAGS="$ac_save_CPPFLAGS"
15130   LDFLAGS="$ac_save_LDFLAGS"
15131 #  LIBS="$ac_save_LIBS"
15132
15133   fi
15134   if test "$have_gle" = yes ; then
15135     have_gle=no
15136     gle_halfassed=yes
15137
15138     # sometimes the libmatrix stuff is included in libgle.  look there first.
15139 #
15140 # I don't get it.  For some reason, this test passes on SGI, as if
15141 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
15142 # Yet the link is succeeding.  Why???
15143 #
15144 #    AC_CHECK_X_LIB(gle, uview_direction_d,
15145 #                   [have_gle=yes; gle_halfassed=no],
15146 #                   [], $GL_LIBS -lX11 -lXext -lm)
15147
15148     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
15149     # *sigh*
15150     if test "$have_gle3" = yes ; then
15151
15152   ac_save_CPPFLAGS="$CPPFLAGS"
15153   ac_save_LDFLAGS="$LDFLAGS"
15154 #  ac_save_LIBS="$LIBS"
15155
15156   if test \! -z "$includedir" ; then
15157     CPPFLAGS="$CPPFLAGS -I$includedir"
15158   fi
15159   # note: $X_CFLAGS includes $x_includes
15160   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15161
15162   if test \! -z "$libdir" ; then
15163     LDFLAGS="$LDFLAGS -L$libdir"
15164   fi
15165   # note: $X_LIBS includes $x_libraries
15166   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15167
15168   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
15169 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
15170 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
15171   echo $ECHO_N "(cached) $ECHO_C" >&6
15172 else
15173   ac_check_lib_save_LIBS=$LIBS
15174 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
15175 cat >conftest.$ac_ext <<_ACEOF
15176 #line $LINENO "configure"
15177 #include "confdefs.h"
15178
15179 /* Override any gcc2 internal prototype to avoid an error.  */
15180 #ifdef __cplusplus
15181 extern "C"
15182 #endif
15183 /* We use char because int might match the return type of a gcc2
15184    builtin and then its argument prototype would still apply.  */
15185 char uview_direction ();
15186 #ifdef F77_DUMMY_MAIN
15187 #  ifdef __cplusplus
15188      extern "C"
15189 #  endif
15190    int F77_DUMMY_MAIN() { return 1; }
15191 #endif
15192 int
15193 main ()
15194 {
15195 uview_direction ();
15196   ;
15197   return 0;
15198 }
15199 _ACEOF
15200 rm -f conftest.$ac_objext conftest$ac_exeext
15201 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15202   (eval $ac_link) 2>&5
15203   ac_status=$?
15204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15205   (exit $ac_status); } &&
15206          { ac_try='test -s conftest$ac_exeext'
15207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15208   (eval $ac_try) 2>&5
15209   ac_status=$?
15210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15211   (exit $ac_status); }; }; then
15212   ac_cv_lib_gle_uview_direction=yes
15213 else
15214   echo "$as_me: failed program was:" >&5
15215 cat conftest.$ac_ext >&5
15216 ac_cv_lib_gle_uview_direction=no
15217 fi
15218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15219 LIBS=$ac_check_lib_save_LIBS
15220 fi
15221 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
15222 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
15223 if test $ac_cv_lib_gle_uview_direction = yes; then
15224   have_gle=yes; gle_halfassed=no
15225 fi
15226
15227   CPPFLAGS="$ac_save_CPPFLAGS"
15228   LDFLAGS="$ac_save_LDFLAGS"
15229 #  LIBS="$ac_save_LIBS"
15230
15231     fi
15232     # if it wasn't in libgle, then look in libmatrix.
15233     if test "$have_gle" = no ; then
15234
15235   ac_save_CPPFLAGS="$CPPFLAGS"
15236   ac_save_LDFLAGS="$LDFLAGS"
15237 #  ac_save_LIBS="$LIBS"
15238
15239   if test \! -z "$includedir" ; then
15240     CPPFLAGS="$CPPFLAGS -I$includedir"
15241   fi
15242   # note: $X_CFLAGS includes $x_includes
15243   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15244
15245   if test \! -z "$libdir" ; then
15246     LDFLAGS="$LDFLAGS -L$libdir"
15247   fi
15248   # note: $X_LIBS includes $x_libraries
15249   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15250
15251   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
15252 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
15253 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
15254   echo $ECHO_N "(cached) $ECHO_C" >&6
15255 else
15256   ac_check_lib_save_LIBS=$LIBS
15257 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
15258 cat >conftest.$ac_ext <<_ACEOF
15259 #line $LINENO "configure"
15260 #include "confdefs.h"
15261
15262 /* Override any gcc2 internal prototype to avoid an error.  */
15263 #ifdef __cplusplus
15264 extern "C"
15265 #endif
15266 /* We use char because int might match the return type of a gcc2
15267    builtin and then its argument prototype would still apply.  */
15268 char uview_direction_d ();
15269 #ifdef F77_DUMMY_MAIN
15270 #  ifdef __cplusplus
15271      extern "C"
15272 #  endif
15273    int F77_DUMMY_MAIN() { return 1; }
15274 #endif
15275 int
15276 main ()
15277 {
15278 uview_direction_d ();
15279   ;
15280   return 0;
15281 }
15282 _ACEOF
15283 rm -f conftest.$ac_objext conftest$ac_exeext
15284 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15285   (eval $ac_link) 2>&5
15286   ac_status=$?
15287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15288   (exit $ac_status); } &&
15289          { ac_try='test -s conftest$ac_exeext'
15290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15291   (eval $ac_try) 2>&5
15292   ac_status=$?
15293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15294   (exit $ac_status); }; }; then
15295   ac_cv_lib_matrix_uview_direction_d=yes
15296 else
15297   echo "$as_me: failed program was:" >&5
15298 cat conftest.$ac_ext >&5
15299 ac_cv_lib_matrix_uview_direction_d=no
15300 fi
15301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15302 LIBS=$ac_check_lib_save_LIBS
15303 fi
15304 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
15305 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
15306 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
15307   have_gle=yes; gle_halfassed=no;
15308                       GLE_LIBS="$GLE_LIBS -lmatrix"
15309 fi
15310
15311   CPPFLAGS="$ac_save_CPPFLAGS"
15312   LDFLAGS="$ac_save_LDFLAGS"
15313 #  LIBS="$ac_save_LIBS"
15314
15315     fi
15316   fi
15317
15318   if test "$have_gle" = yes ; then
15319     cat >>confdefs.h <<\_ACEOF
15320 #define HAVE_GLE 1
15321 _ACEOF
15322
15323     if test "$have_gle3" = yes ; then
15324       cat >>confdefs.h <<\_ACEOF
15325 #define HAVE_GLE3 1
15326 _ACEOF
15327
15328     fi
15329   fi
15330
15331 elif test "$with_gle" != no; then
15332   echo "error: must be yes or no: --with-gle=$with_gle"
15333   exit 1
15334
15335 fi
15336
15337
15338
15339 ###############################################################################
15340 #
15341 #       Check for -lXpm.
15342 #
15343 ###############################################################################
15344
15345 have_xpm=no
15346 with_xpm_req=unspecified
15347
15348 # Check whether --with-xpm or --without-xpm was given.
15349 if test "${with_xpm+set}" = set; then
15350   withval="$with_xpm"
15351   with_xpm="$withval"; with_xpm_req="$withval"
15352 else
15353   with_xpm=yes
15354 fi;
15355
15356
15357    case "$with_xpm" in
15358     yes) ;;
15359     no)  ;;
15360
15361     /*)
15362      echo "$as_me:$LINENO: checking for XPM headers" >&5
15363 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
15364      d=$with_xpm/include
15365      if test -d $d; then
15366        X_CFLAGS="-I$d $X_CFLAGS"
15367        echo "$as_me:$LINENO: result: $d" >&5
15368 echo "${ECHO_T}$d" >&6
15369      else
15370        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15371 echo "${ECHO_T}not found ($d: no such directory)" >&6
15372      fi
15373
15374      echo "$as_me:$LINENO: checking for XPM libs" >&5
15375 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
15376      d=$with_xpm/lib
15377      if test -d $d; then
15378        X_LIBS="-L$d $X_LIBS"
15379        echo "$as_me:$LINENO: result: $d" >&5
15380 echo "${ECHO_T}$d" >&6
15381      else
15382        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15383 echo "${ECHO_T}not found ($d: no such directory)" >&6
15384      fi
15385
15386      # replace the directory string with "yes".
15387      with_xpm_req="yes"
15388      with_xpm=$with_xpm_req
15389      ;;
15390
15391     *)
15392      echo ""
15393      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
15394      echo "       If it is a directory, then \`DIR/include' will be added to"
15395      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15396      exit 1
15397      ;;
15398    esac
15399
15400
15401 if test "$with_xpm" = yes; then
15402
15403   ac_save_CPPFLAGS="$CPPFLAGS"
15404   if test \! -z "$includedir" ; then
15405     CPPFLAGS="$CPPFLAGS -I$includedir"
15406   fi
15407   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15408   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
15409 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
15410 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
15411   echo $ECHO_N "(cached) $ECHO_C" >&6
15412 else
15413   cat >conftest.$ac_ext <<_ACEOF
15414 #line $LINENO "configure"
15415 #include "confdefs.h"
15416 #include <X11/Xlib.h>
15417
15418 #include <X11/xpm.h>
15419 _ACEOF
15420 rm -f conftest.$ac_objext
15421 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15422   (eval $ac_compile) 2>&5
15423   ac_status=$?
15424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15425   (exit $ac_status); } &&
15426          { ac_try='test -s conftest.$ac_objext'
15427   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15428   (eval $ac_try) 2>&5
15429   ac_status=$?
15430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15431   (exit $ac_status); }; }; then
15432   ac_cv_header_X11_xpm_h=yes
15433 else
15434   echo "$as_me: failed program was:" >&5
15435 cat conftest.$ac_ext >&5
15436 ac_cv_header_X11_xpm_h=no
15437 fi
15438 rm -f conftest.$ac_objext conftest.$ac_ext
15439 fi
15440 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
15441 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
15442 if test $ac_cv_header_X11_xpm_h = yes; then
15443   have_xpm=yes
15444                     cat >>confdefs.h <<\_ACEOF
15445 #define HAVE_XPM 1
15446 _ACEOF
15447
15448                     XPM_LIBS="-lXpm"
15449 fi
15450
15451
15452   CPPFLAGS="$ac_save_CPPFLAGS"
15453 elif test "$with_xpm" != no; then
15454   echo "error: must be yes or no: --with-xpm=$with_xpm"
15455   exit 1
15456 fi
15457
15458 # See comment near $motif_requires_xpm, above.
15459 # Need to do this here, after both Motif and XPM have been checked for.
15460 #
15461 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
15462   if test "$motif_requires_xpm" = yes ; then
15463     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
15464   fi
15465 fi
15466
15467 ###############################################################################
15468 #
15469 #       Check for -lgdk_pixbuf.
15470 #
15471 ###############################################################################
15472
15473 have_gdk_pixbuf=no
15474 with_gdk_pixbuf_req=unspecified
15475
15476 # Check whether --with-pixbuf or --without-pixbuf was given.
15477 if test "${with_pixbuf+set}" = set; then
15478   withval="$with_pixbuf"
15479   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
15480 else
15481   with_gdk_pixbuf=yes
15482 fi;
15483
15484 # if --with-pixbuf=/directory/ was specified, remember that directory so that
15485 # we can also look for the `gdk-pixbuf-config' program in that directory.
15486 case "$with_gdk_pixbuf" in
15487   /*)
15488     gdk_pixbuf_dir="$with_gdk_pixbuf"
15489     ;;
15490   *)
15491     gdk_pixbuf_dir=""
15492     ;;
15493 esac
15494
15495
15496    case "$with_gdk_pixbuf" in
15497     yes) ;;
15498     no)  ;;
15499
15500     /*)
15501      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
15502 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
15503      d=$with_gdk_pixbuf/include
15504      if test -d $d; then
15505        X_CFLAGS="-I$d $X_CFLAGS"
15506        echo "$as_me:$LINENO: result: $d" >&5
15507 echo "${ECHO_T}$d" >&6
15508      else
15509        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15510 echo "${ECHO_T}not found ($d: no such directory)" >&6
15511      fi
15512
15513      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
15514 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
15515      d=$with_gdk_pixbuf/lib
15516      if test -d $d; then
15517        X_LIBS="-L$d $X_LIBS"
15518        echo "$as_me:$LINENO: result: $d" >&5
15519 echo "${ECHO_T}$d" >&6
15520      else
15521        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15522 echo "${ECHO_T}not found ($d: no such directory)" >&6
15523      fi
15524
15525      # replace the directory string with "yes".
15526      with_gdk_pixbuf_req="yes"
15527      with_gdk_pixbuf=$with_gdk_pixbuf_req
15528      ;;
15529
15530     *)
15531      echo ""
15532      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
15533      echo "       If it is a directory, then \`DIR/include' will be added to"
15534      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15535      exit 1
15536      ;;
15537    esac
15538
15539
15540 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
15541   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
15542   exit 1
15543 fi
15544
15545 if test "$with_gdk_pixbuf" = yes; then
15546   have_gdk_pixbuf=no
15547   have_gdk_pixbuf2=no
15548
15549   if test -n "$pkg_config" ; then
15550     #
15551     # the new way...
15552     # run pkg-config based tests.
15553     #
15554     pkgs=''
15555     ok="yes"
15556
15557     # If we have Gtk 2.x, then *only* gdk-pixbuf 2.x will work.
15558     # If we have Gtk 1.x, then *only* gdk-pixbuf 1.x will work.
15559     # If we don't have Gtk at all, then either will work.
15560
15561     if test "$have_gtk" = no -o "$have_gtk2" = yes; then
15562       #
15563       # we don't have Gtk; or we have Gtk 2.x.  Check for pixbuf 2.x.
15564       #
15565       pkg_check_version gdk-pixbuf-2.0      2.0.0
15566       pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
15567       have_gdk_pixbuf="$ok"
15568       have_gdk_pixbuf2="$ok"
15569     fi
15570
15571     if test "$have_gtk" = no -o "$have_gtk2" = no; then
15572       #
15573       # we don't have Gtk; or we have Gtk 1.x.
15574       # If we don't have pixbuf 2.x, then check for pixbuf 1.x.
15575       #
15576       if test "$have_gdk_pixbuf2" = no; then
15577         pkgs=''
15578         ok="yes"
15579         pkg_check_version gdk-pixbuf      0.0
15580         pkg_check_version gdk-pixbuf-xlib 0.0
15581         have_gdk_pixbuf="$ok"
15582       fi
15583     fi
15584
15585     if test "$have_gdk_pixbuf" = yes; then
15586       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
15587 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
15588 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
15589   echo $ECHO_N "(cached) $ECHO_C" >&6
15590 else
15591   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
15592 fi
15593 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
15594 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
15595       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
15596 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
15597 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
15598   echo $ECHO_N "(cached) $ECHO_C" >&6
15599 else
15600   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
15601 fi
15602 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
15603 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
15604     fi
15605     ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
15606     ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
15607   fi
15608
15609
15610   if test "$have_gdk_pixbuf" = no; then
15611     #
15612     # the old way...
15613     # run gdk-pixbuf-config based tests.
15614     # note that we can't assume that the existence of "pkg-config" means
15615     # that we don't have to look for gdk-pixbuf-config -- in Gnome 1.4,
15616     # pkg-config exists, but doesn't know about pixbuf.
15617     #
15618
15619     # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
15620     # look in /foo/bin/ for for gdk-pixbuf-config.
15621     #
15622     gdk_pixbuf_path="$PATH"
15623
15624     if test ! -z "$gtk_dir"; then
15625       # canonicalize slashes.
15626       foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15627       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
15628     fi
15629
15630     if test ! -z "$gnome_dir"; then
15631       # canonicalize slashes.
15632       foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
15633       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
15634     fi
15635
15636     for ac_prog in gdk-pixbuf-config
15637 do
15638   # Extract the first word of "$ac_prog", so it can be a program name with args.
15639 set dummy $ac_prog; ac_word=$2
15640 echo "$as_me:$LINENO: checking for $ac_word" >&5
15641 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15642 if test "${ac_cv_path_gdk_pixbuf_config+set}" = set; then
15643   echo $ECHO_N "(cached) $ECHO_C" >&6
15644 else
15645   case $gdk_pixbuf_config in
15646   [\\/]* | ?:[\\/]*)
15647   ac_cv_path_gdk_pixbuf_config="$gdk_pixbuf_config" # Let the user override the test with a path.
15648   ;;
15649   *)
15650   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15651 for as_dir in $gdk_pixbuf_path
15652 do
15653   IFS=$as_save_IFS
15654   test -z "$as_dir" && as_dir=.
15655   for ac_exec_ext in '' $ac_executable_extensions; do
15656   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15657     ac_cv_path_gdk_pixbuf_config="$as_dir/$ac_word$ac_exec_ext"
15658     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15659     break 2
15660   fi
15661 done
15662 done
15663
15664   ;;
15665 esac
15666 fi
15667 gdk_pixbuf_config=$ac_cv_path_gdk_pixbuf_config
15668
15669 if test -n "$gdk_pixbuf_config"; then
15670   echo "$as_me:$LINENO: result: $gdk_pixbuf_config" >&5
15671 echo "${ECHO_T}$gdk_pixbuf_config" >&6
15672 else
15673   echo "$as_me:$LINENO: result: no" >&5
15674 echo "${ECHO_T}no" >&6
15675 fi
15676
15677   test -n "$gdk_pixbuf_config" && break
15678 done
15679
15680
15681     # If we found the gdk-pixbuf-config program, run it to get flags.
15682     #
15683     if test -n "$gdk_pixbuf_config" ; then
15684       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
15685 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
15686 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
15687   echo $ECHO_N "(cached) $ECHO_C" >&6
15688 else
15689   ac_cv_gdk_pixbuf_config_cflags=`$gdk_pixbuf_config --cflags`
15690 fi
15691 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
15692 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
15693       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
15694 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
15695 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
15696   echo $ECHO_N "(cached) $ECHO_C" >&6
15697 else
15698   ac_cv_gdk_pixbuf_config_libs=`$gdk_pixbuf_config --libs`
15699 fi
15700 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
15701 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
15702
15703       # note that "gdk-pixbuf-config --libs" produces a link line including
15704       # -lgdk_pixbuf, but there's no way to get it to produce one that also
15705       # includes -lgdk_pixbuf_xlib.  Since we don't know *exactly* what the
15706       # name of the library will be, construct it with sed...
15707       # M4 sucks!!
15708
15709       ac_cv_gdk_pixbuf_config_libs=`echo $ac_cv_gdk_pixbuf_config_libs | \
15710        sed 's@ \(-lgdk_pixbuf\([-_a-zA-Z0-9.]*\)\) @ \1 -lgdk_pixbuf_xlib\2 @'`
15711
15712
15713       ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
15714       ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
15715     fi
15716   fi
15717
15718   ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
15719   CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
15720
15721   if test "$have_gdk_pixbuf" = no; then
15722     #
15723     # we appear to have pixbuf; check for headers/libs to be sure.
15724     #
15725
15726     have_gdk_pixbuf=no
15727
15728     # check for header A...
15729
15730   ac_save_CPPFLAGS="$CPPFLAGS"
15731   if test \! -z "$includedir" ; then
15732     CPPFLAGS="$CPPFLAGS -I$includedir"
15733   fi
15734   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15735   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15736   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
15737 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
15738 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15739   echo $ECHO_N "(cached) $ECHO_C" >&6
15740 fi
15741 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
15742 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
15743 else
15744   # Is the header compilable?
15745 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
15746 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
15747 cat >conftest.$ac_ext <<_ACEOF
15748 #line $LINENO "configure"
15749 #include "confdefs.h"
15750 $ac_includes_default
15751 #include <gdk-pixbuf/gdk-pixbuf.h>
15752 _ACEOF
15753 rm -f conftest.$ac_objext
15754 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15755   (eval $ac_compile) 2>&5
15756   ac_status=$?
15757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15758   (exit $ac_status); } &&
15759          { ac_try='test -s conftest.$ac_objext'
15760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15761   (eval $ac_try) 2>&5
15762   ac_status=$?
15763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15764   (exit $ac_status); }; }; then
15765   ac_header_compiler=yes
15766 else
15767   echo "$as_me: failed program was:" >&5
15768 cat conftest.$ac_ext >&5
15769 ac_header_compiler=no
15770 fi
15771 rm -f conftest.$ac_objext conftest.$ac_ext
15772 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15773 echo "${ECHO_T}$ac_header_compiler" >&6
15774
15775 # Is the header present?
15776 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
15777 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
15778 cat >conftest.$ac_ext <<_ACEOF
15779 #line $LINENO "configure"
15780 #include "confdefs.h"
15781 #include <gdk-pixbuf/gdk-pixbuf.h>
15782 _ACEOF
15783 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15784   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15785   ac_status=$?
15786   egrep -v '^ *\+' conftest.er1 >conftest.err
15787   rm -f conftest.er1
15788   cat conftest.err >&5
15789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15790   (exit $ac_status); } >/dev/null; then
15791   if test -s conftest.err; then
15792     ac_cpp_err=$ac_c_preproc_warn_flag
15793   else
15794     ac_cpp_err=
15795   fi
15796 else
15797   ac_cpp_err=yes
15798 fi
15799 if test -z "$ac_cpp_err"; then
15800   ac_header_preproc=yes
15801 else
15802   echo "$as_me: failed program was:" >&5
15803   cat conftest.$ac_ext >&5
15804   ac_header_preproc=no
15805 fi
15806 rm -f conftest.err conftest.$ac_ext
15807 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15808 echo "${ECHO_T}$ac_header_preproc" >&6
15809
15810 # So?  What about this header?
15811 case $ac_header_compiler:$ac_header_preproc in
15812   yes:no )
15813     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
15814 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15815     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
15816 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;};;
15817   no:yes )
15818     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
15819 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
15820     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&5
15821 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&2;}
15822     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
15823 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;};;
15824 esac
15825 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
15826 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
15827 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15828   echo $ECHO_N "(cached) $ECHO_C" >&6
15829 else
15830   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
15831 fi
15832 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
15833 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
15834
15835 fi
15836 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
15837   have_gdk_pixbuf=yes
15838 fi
15839
15840
15841   CPPFLAGS="$ac_save_CPPFLAGS"
15842
15843     # if that worked, check for header B...
15844     if test "$have_gdk_pixbuf" = yes; then
15845       have_gdk_pixbuf=no
15846       gdk_pixbuf_halfassed=yes
15847
15848   ac_save_CPPFLAGS="$CPPFLAGS"
15849   if test \! -z "$includedir" ; then
15850     CPPFLAGS="$CPPFLAGS -I$includedir"
15851   fi
15852   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15853   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
15854   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
15855 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
15856 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
15857   echo $ECHO_N "(cached) $ECHO_C" >&6
15858 fi
15859 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
15860 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
15861 else
15862   # Is the header compilable?
15863 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
15864 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
15865 cat >conftest.$ac_ext <<_ACEOF
15866 #line $LINENO "configure"
15867 #include "confdefs.h"
15868 $ac_includes_default
15869 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
15870 _ACEOF
15871 rm -f conftest.$ac_objext
15872 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15873   (eval $ac_compile) 2>&5
15874   ac_status=$?
15875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15876   (exit $ac_status); } &&
15877          { ac_try='test -s conftest.$ac_objext'
15878   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15879   (eval $ac_try) 2>&5
15880   ac_status=$?
15881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15882   (exit $ac_status); }; }; then
15883   ac_header_compiler=yes
15884 else
15885   echo "$as_me: failed program was:" >&5
15886 cat conftest.$ac_ext >&5
15887 ac_header_compiler=no
15888 fi
15889 rm -f conftest.$ac_objext conftest.$ac_ext
15890 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15891 echo "${ECHO_T}$ac_header_compiler" >&6
15892
15893 # Is the header present?
15894 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
15895 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
15896 cat >conftest.$ac_ext <<_ACEOF
15897 #line $LINENO "configure"
15898 #include "confdefs.h"
15899 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
15900 _ACEOF
15901 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15902   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15903   ac_status=$?
15904   egrep -v '^ *\+' conftest.er1 >conftest.err
15905   rm -f conftest.er1
15906   cat conftest.err >&5
15907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15908   (exit $ac_status); } >/dev/null; then
15909   if test -s conftest.err; then
15910     ac_cpp_err=$ac_c_preproc_warn_flag
15911   else
15912     ac_cpp_err=
15913   fi
15914 else
15915   ac_cpp_err=yes
15916 fi
15917 if test -z "$ac_cpp_err"; then
15918   ac_header_preproc=yes
15919 else
15920   echo "$as_me: failed program was:" >&5
15921   cat conftest.$ac_ext >&5
15922   ac_header_preproc=no
15923 fi
15924 rm -f conftest.err conftest.$ac_ext
15925 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15926 echo "${ECHO_T}$ac_header_preproc" >&6
15927
15928 # So?  What about this header?
15929 case $ac_header_compiler:$ac_header_preproc in
15930   yes:no )
15931     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15932 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15933     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
15934 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
15935   no:yes )
15936     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
15937 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
15938     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
15939 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
15940     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
15941 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
15942 esac
15943 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
15944 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
15945 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
15946   echo $ECHO_N "(cached) $ECHO_C" >&6
15947 else
15948   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
15949 fi
15950 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
15951 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
15952
15953 fi
15954 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
15955   have_gdk_pixbuf=yes
15956                          gdk_pixbuf_halfassed=no
15957 fi
15958
15959
15960   CPPFLAGS="$ac_save_CPPFLAGS"
15961
15962       # yay, it has a new name in Gtk 2.x...
15963       if test "$have_gdk_pixbuf" = no; then
15964         have_gdk_pixbuf=no
15965         gdk_pixbuf_halfassed=yes
15966
15967   ac_save_CPPFLAGS="$CPPFLAGS"
15968   if test \! -z "$includedir" ; then
15969     CPPFLAGS="$CPPFLAGS -I$includedir"
15970   fi
15971   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15972   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
15973   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
15974 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
15975 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
15976   echo $ECHO_N "(cached) $ECHO_C" >&6
15977 fi
15978 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
15979 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
15980 else
15981   # Is the header compilable?
15982 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
15983 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
15984 cat >conftest.$ac_ext <<_ACEOF
15985 #line $LINENO "configure"
15986 #include "confdefs.h"
15987 $ac_includes_default
15988 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
15989 _ACEOF
15990 rm -f conftest.$ac_objext
15991 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15992   (eval $ac_compile) 2>&5
15993   ac_status=$?
15994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15995   (exit $ac_status); } &&
15996          { ac_try='test -s conftest.$ac_objext'
15997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15998   (eval $ac_try) 2>&5
15999   ac_status=$?
16000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16001   (exit $ac_status); }; }; then
16002   ac_header_compiler=yes
16003 else
16004   echo "$as_me: failed program was:" >&5
16005 cat conftest.$ac_ext >&5
16006 ac_header_compiler=no
16007 fi
16008 rm -f conftest.$ac_objext conftest.$ac_ext
16009 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16010 echo "${ECHO_T}$ac_header_compiler" >&6
16011
16012 # Is the header present?
16013 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
16014 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
16015 cat >conftest.$ac_ext <<_ACEOF
16016 #line $LINENO "configure"
16017 #include "confdefs.h"
16018 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
16019 _ACEOF
16020 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16021   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16022   ac_status=$?
16023   egrep -v '^ *\+' conftest.er1 >conftest.err
16024   rm -f conftest.er1
16025   cat conftest.err >&5
16026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16027   (exit $ac_status); } >/dev/null; then
16028   if test -s conftest.err; then
16029     ac_cpp_err=$ac_c_preproc_warn_flag
16030   else
16031     ac_cpp_err=
16032   fi
16033 else
16034   ac_cpp_err=yes
16035 fi
16036 if test -z "$ac_cpp_err"; then
16037   ac_header_preproc=yes
16038 else
16039   echo "$as_me: failed program was:" >&5
16040   cat conftest.$ac_ext >&5
16041   ac_header_preproc=no
16042 fi
16043 rm -f conftest.err conftest.$ac_ext
16044 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16045 echo "${ECHO_T}$ac_header_preproc" >&6
16046
16047 # So?  What about this header?
16048 case $ac_header_compiler:$ac_header_preproc in
16049   yes:no )
16050     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16051 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16052     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16053 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
16054   no:yes )
16055     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
16056 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
16057     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
16058 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
16059     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16060 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
16061 esac
16062 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
16063 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16064 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16065   echo $ECHO_N "(cached) $ECHO_C" >&6
16066 else
16067   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
16068 fi
16069 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
16070 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
16071
16072 fi
16073 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
16074   have_gdk_pixbuf=yes
16075                            gdk_pixbuf_halfassed=no
16076 fi
16077
16078
16079   CPPFLAGS="$ac_save_CPPFLAGS"
16080       fi
16081     fi
16082   fi
16083
16084   CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
16085
16086   if test "$have_gdk_pixbuf" = yes; then
16087     # we have the headers, now check for the libraries
16088     have_gdk_pixbuf=no
16089     gdk_pixbuf_halfassed=yes
16090
16091     # library A...
16092
16093   ac_save_CPPFLAGS="$CPPFLAGS"
16094   ac_save_LDFLAGS="$LDFLAGS"
16095 #  ac_save_LIBS="$LIBS"
16096
16097   if test \! -z "$includedir" ; then
16098     CPPFLAGS="$CPPFLAGS -I$includedir"
16099   fi
16100   # note: $X_CFLAGS includes $x_includes
16101   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16102
16103   if test \! -z "$libdir" ; then
16104     LDFLAGS="$LDFLAGS -L$libdir"
16105   fi
16106   # note: $X_LIBS includes $x_libraries
16107   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16108
16109   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
16110 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
16111 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
16112   echo $ECHO_N "(cached) $ECHO_C" >&6
16113 else
16114   ac_check_lib_save_LIBS=$LIBS
16115 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
16116 cat >conftest.$ac_ext <<_ACEOF
16117 #line $LINENO "configure"
16118 #include "confdefs.h"
16119
16120 /* Override any gcc2 internal prototype to avoid an error.  */
16121 #ifdef __cplusplus
16122 extern "C"
16123 #endif
16124 /* We use char because int might match the return type of a gcc2
16125    builtin and then its argument prototype would still apply.  */
16126 char gdk_pixbuf_new_from_file ();
16127 #ifdef F77_DUMMY_MAIN
16128 #  ifdef __cplusplus
16129      extern "C"
16130 #  endif
16131    int F77_DUMMY_MAIN() { return 1; }
16132 #endif
16133 int
16134 main ()
16135 {
16136 gdk_pixbuf_new_from_file ();
16137   ;
16138   return 0;
16139 }
16140 _ACEOF
16141 rm -f conftest.$ac_objext conftest$ac_exeext
16142 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16143   (eval $ac_link) 2>&5
16144   ac_status=$?
16145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16146   (exit $ac_status); } &&
16147          { ac_try='test -s conftest$ac_exeext'
16148   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16149   (eval $ac_try) 2>&5
16150   ac_status=$?
16151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16152   (exit $ac_status); }; }; then
16153   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
16154 else
16155   echo "$as_me: failed program was:" >&5
16156 cat conftest.$ac_ext >&5
16157 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
16158 fi
16159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16160 LIBS=$ac_check_lib_save_LIBS
16161 fi
16162 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
16163 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
16164 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
16165   have_gdk_pixbuf=yes
16166 fi
16167
16168   CPPFLAGS="$ac_save_CPPFLAGS"
16169   LDFLAGS="$ac_save_LDFLAGS"
16170 #  LIBS="$ac_save_LIBS"
16171
16172     # library B...
16173     if test "$have_gdk_pixbuf" = yes; then
16174       have_gdk_pixbuf=no
16175
16176   ac_save_CPPFLAGS="$CPPFLAGS"
16177   ac_save_LDFLAGS="$LDFLAGS"
16178 #  ac_save_LIBS="$LIBS"
16179
16180   if test \! -z "$includedir" ; then
16181     CPPFLAGS="$CPPFLAGS -I$includedir"
16182   fi
16183   # note: $X_CFLAGS includes $x_includes
16184   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16185
16186   if test \! -z "$libdir" ; then
16187     LDFLAGS="$LDFLAGS -L$libdir"
16188   fi
16189   # note: $X_LIBS includes $x_libraries
16190   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16191
16192   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
16193 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
16194 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
16195   echo $ECHO_N "(cached) $ECHO_C" >&6
16196 else
16197   ac_check_lib_save_LIBS=$LIBS
16198 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
16199 cat >conftest.$ac_ext <<_ACEOF
16200 #line $LINENO "configure"
16201 #include "confdefs.h"
16202
16203 /* Override any gcc2 internal prototype to avoid an error.  */
16204 #ifdef __cplusplus
16205 extern "C"
16206 #endif
16207 /* We use char because int might match the return type of a gcc2
16208    builtin and then its argument prototype would still apply.  */
16209 char gdk_pixbuf_xlib_init ();
16210 #ifdef F77_DUMMY_MAIN
16211 #  ifdef __cplusplus
16212      extern "C"
16213 #  endif
16214    int F77_DUMMY_MAIN() { return 1; }
16215 #endif
16216 int
16217 main ()
16218 {
16219 gdk_pixbuf_xlib_init ();
16220   ;
16221   return 0;
16222 }
16223 _ACEOF
16224 rm -f conftest.$ac_objext conftest$ac_exeext
16225 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16226   (eval $ac_link) 2>&5
16227   ac_status=$?
16228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16229   (exit $ac_status); } &&
16230          { ac_try='test -s conftest$ac_exeext'
16231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16232   (eval $ac_try) 2>&5
16233   ac_status=$?
16234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16235   (exit $ac_status); }; }; then
16236   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
16237 else
16238   echo "$as_me: failed program was:" >&5
16239 cat conftest.$ac_ext >&5
16240 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
16241 fi
16242 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16243 LIBS=$ac_check_lib_save_LIBS
16244 fi
16245 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
16246 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
16247 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
16248   have_gdk_pixbuf=yes
16249                       gdk_pixbuf_halfassed=no
16250 fi
16251
16252   CPPFLAGS="$ac_save_CPPFLAGS"
16253   LDFLAGS="$ac_save_LDFLAGS"
16254 #  LIBS="$ac_save_LIBS"
16255
16256     fi
16257   fi
16258
16259   if test "$have_gdk_pixbuf" = yes; then
16260     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
16261     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
16262     cat >>confdefs.h <<\_ACEOF
16263 #define HAVE_GDK_PIXBUF 1
16264 _ACEOF
16265
16266   else
16267     have_gdk_pixbuf2=no
16268   fi
16269 fi
16270
16271
16272 ###############################################################################
16273 #
16274 #       Check for -ljpeg
16275 #
16276 ###############################################################################
16277
16278 have_jpeg=no
16279 with_jpeg_req=unspecified
16280 jpeg_halfassed=no
16281
16282 # Check whether --with-jpeg or --without-jpeg was given.
16283 if test "${with_jpeg+set}" = set; then
16284   withval="$with_jpeg"
16285   with_jpeg="$withval"; with_jpeg_req="$withval"
16286 else
16287   with_jpeg=yes
16288 fi;
16289
16290
16291    case "$with_jpeg" in
16292     yes) ;;
16293     no)  ;;
16294
16295     /*)
16296      echo "$as_me:$LINENO: checking for JPEG headers" >&5
16297 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
16298      d=$with_jpeg/include
16299      if test -d $d; then
16300        X_CFLAGS="-I$d $X_CFLAGS"
16301        echo "$as_me:$LINENO: result: $d" >&5
16302 echo "${ECHO_T}$d" >&6
16303      else
16304        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16305 echo "${ECHO_T}not found ($d: no such directory)" >&6
16306      fi
16307
16308      echo "$as_me:$LINENO: checking for JPEG libs" >&5
16309 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
16310      d=$with_jpeg/lib
16311      if test -d $d; then
16312        X_LIBS="-L$d $X_LIBS"
16313        echo "$as_me:$LINENO: result: $d" >&5
16314 echo "${ECHO_T}$d" >&6
16315      else
16316        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16317 echo "${ECHO_T}not found ($d: no such directory)" >&6
16318      fi
16319
16320      # replace the directory string with "yes".
16321      with_jpeg_req="yes"
16322      with_jpeg=$with_jpeg_req
16323      ;;
16324
16325     *)
16326      echo ""
16327      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
16328      echo "       If it is a directory, then \`DIR/include' will be added to"
16329      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16330      exit 1
16331      ;;
16332    esac
16333
16334
16335 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
16336   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
16337   exit 1
16338 fi
16339
16340 if test "$with_jpeg" = yes; then
16341
16342   have_jpeg=no
16343
16344   ac_save_CPPFLAGS="$CPPFLAGS"
16345   if test \! -z "$includedir" ; then
16346     CPPFLAGS="$CPPFLAGS -I$includedir"
16347   fi
16348   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16349   if test "${ac_cv_header_jpeglib_h+set}" = set; then
16350   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
16351 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
16352 if test "${ac_cv_header_jpeglib_h+set}" = set; then
16353   echo $ECHO_N "(cached) $ECHO_C" >&6
16354 fi
16355 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
16356 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
16357 else
16358   # Is the header compilable?
16359 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
16360 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
16361 cat >conftest.$ac_ext <<_ACEOF
16362 #line $LINENO "configure"
16363 #include "confdefs.h"
16364 $ac_includes_default
16365 #include <jpeglib.h>
16366 _ACEOF
16367 rm -f conftest.$ac_objext
16368 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16369   (eval $ac_compile) 2>&5
16370   ac_status=$?
16371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16372   (exit $ac_status); } &&
16373          { ac_try='test -s conftest.$ac_objext'
16374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16375   (eval $ac_try) 2>&5
16376   ac_status=$?
16377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16378   (exit $ac_status); }; }; then
16379   ac_header_compiler=yes
16380 else
16381   echo "$as_me: failed program was:" >&5
16382 cat conftest.$ac_ext >&5
16383 ac_header_compiler=no
16384 fi
16385 rm -f conftest.$ac_objext conftest.$ac_ext
16386 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16387 echo "${ECHO_T}$ac_header_compiler" >&6
16388
16389 # Is the header present?
16390 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
16391 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
16392 cat >conftest.$ac_ext <<_ACEOF
16393 #line $LINENO "configure"
16394 #include "confdefs.h"
16395 #include <jpeglib.h>
16396 _ACEOF
16397 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16398   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16399   ac_status=$?
16400   egrep -v '^ *\+' conftest.er1 >conftest.err
16401   rm -f conftest.er1
16402   cat conftest.err >&5
16403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16404   (exit $ac_status); } >/dev/null; then
16405   if test -s conftest.err; then
16406     ac_cpp_err=$ac_c_preproc_warn_flag
16407   else
16408     ac_cpp_err=
16409   fi
16410 else
16411   ac_cpp_err=yes
16412 fi
16413 if test -z "$ac_cpp_err"; then
16414   ac_header_preproc=yes
16415 else
16416   echo "$as_me: failed program was:" >&5
16417   cat conftest.$ac_ext >&5
16418   ac_header_preproc=no
16419 fi
16420 rm -f conftest.err conftest.$ac_ext
16421 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16422 echo "${ECHO_T}$ac_header_preproc" >&6
16423
16424 # So?  What about this header?
16425 case $ac_header_compiler:$ac_header_preproc in
16426   yes:no )
16427     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16428 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16429     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
16430 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;};;
16431   no:yes )
16432     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
16433 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
16434     { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5
16435 echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;}
16436     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
16437 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;};;
16438 esac
16439 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
16440 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
16441 if test "${ac_cv_header_jpeglib_h+set}" = set; then
16442   echo $ECHO_N "(cached) $ECHO_C" >&6
16443 else
16444   ac_cv_header_jpeglib_h=$ac_header_preproc
16445 fi
16446 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
16447 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
16448
16449 fi
16450 if test $ac_cv_header_jpeglib_h = yes; then
16451   have_jpeg=yes
16452 fi
16453
16454
16455   CPPFLAGS="$ac_save_CPPFLAGS"
16456
16457   if test "$have_jpeg" = yes; then
16458     # we have the header, now check for the library
16459     have_jpeg=no
16460     jpeg_halfassed=yes
16461
16462   ac_save_CPPFLAGS="$CPPFLAGS"
16463   ac_save_LDFLAGS="$LDFLAGS"
16464 #  ac_save_LIBS="$LIBS"
16465
16466   if test \! -z "$includedir" ; then
16467     CPPFLAGS="$CPPFLAGS -I$includedir"
16468   fi
16469   # note: $X_CFLAGS includes $x_includes
16470   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16471
16472   if test \! -z "$libdir" ; then
16473     LDFLAGS="$LDFLAGS -L$libdir"
16474   fi
16475   # note: $X_LIBS includes $x_libraries
16476   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16477
16478   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
16479 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
16480 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
16481   echo $ECHO_N "(cached) $ECHO_C" >&6
16482 else
16483   ac_check_lib_save_LIBS=$LIBS
16484 LIBS="-ljpeg  $LIBS"
16485 cat >conftest.$ac_ext <<_ACEOF
16486 #line $LINENO "configure"
16487 #include "confdefs.h"
16488
16489 /* Override any gcc2 internal prototype to avoid an error.  */
16490 #ifdef __cplusplus
16491 extern "C"
16492 #endif
16493 /* We use char because int might match the return type of a gcc2
16494    builtin and then its argument prototype would still apply.  */
16495 char jpeg_start_compress ();
16496 #ifdef F77_DUMMY_MAIN
16497 #  ifdef __cplusplus
16498      extern "C"
16499 #  endif
16500    int F77_DUMMY_MAIN() { return 1; }
16501 #endif
16502 int
16503 main ()
16504 {
16505 jpeg_start_compress ();
16506   ;
16507   return 0;
16508 }
16509 _ACEOF
16510 rm -f conftest.$ac_objext conftest$ac_exeext
16511 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16512   (eval $ac_link) 2>&5
16513   ac_status=$?
16514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16515   (exit $ac_status); } &&
16516          { ac_try='test -s conftest$ac_exeext'
16517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16518   (eval $ac_try) 2>&5
16519   ac_status=$?
16520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16521   (exit $ac_status); }; }; then
16522   ac_cv_lib_jpeg_jpeg_start_compress=yes
16523 else
16524   echo "$as_me: failed program was:" >&5
16525 cat conftest.$ac_ext >&5
16526 ac_cv_lib_jpeg_jpeg_start_compress=no
16527 fi
16528 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16529 LIBS=$ac_check_lib_save_LIBS
16530 fi
16531 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
16532 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
16533 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
16534   have_jpeg=yes
16535                     jpeg_halfassed=no
16536                     JPEG_LIBS="-ljpeg"
16537                     cat >>confdefs.h <<\_ACEOF
16538 #define HAVE_JPEGLIB 1
16539 _ACEOF
16540
16541 fi
16542
16543   CPPFLAGS="$ac_save_CPPFLAGS"
16544   LDFLAGS="$ac_save_LDFLAGS"
16545 #  LIBS="$ac_save_LIBS"
16546
16547   fi
16548 fi
16549
16550
16551 ###############################################################################
16552 #
16553 #       Check for the XSHM server extension.
16554 #
16555 ###############################################################################
16556
16557 have_xshm=no
16558 with_xshm_req=unspecified
16559
16560 # Check whether --with-xshm-ext or --without-xshm-ext was given.
16561 if test "${with_xshm_ext+set}" = set; then
16562   withval="$with_xshm_ext"
16563   with_xshm="$withval"; with_xshm_req="$withval"
16564 else
16565   with_xshm=yes
16566 fi;
16567
16568
16569    case "$with_xshm" in
16570     yes) ;;
16571     no)  ;;
16572
16573     /*)
16574      echo "$as_me:$LINENO: checking for XSHM headers" >&5
16575 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
16576      d=$with_xshm/include
16577      if test -d $d; then
16578        X_CFLAGS="-I$d $X_CFLAGS"
16579        echo "$as_me:$LINENO: result: $d" >&5
16580 echo "${ECHO_T}$d" >&6
16581      else
16582        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16583 echo "${ECHO_T}not found ($d: no such directory)" >&6
16584      fi
16585
16586      echo "$as_me:$LINENO: checking for XSHM libs" >&5
16587 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
16588      d=$with_xshm/lib
16589      if test -d $d; then
16590        X_LIBS="-L$d $X_LIBS"
16591        echo "$as_me:$LINENO: result: $d" >&5
16592 echo "${ECHO_T}$d" >&6
16593      else
16594        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16595 echo "${ECHO_T}not found ($d: no such directory)" >&6
16596      fi
16597
16598      # replace the directory string with "yes".
16599      with_xshm_req="yes"
16600      with_xshm=$with_xshm_req
16601      ;;
16602
16603     *)
16604      echo ""
16605      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
16606      echo "       If it is a directory, then \`DIR/include' will be added to"
16607      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16608      exit 1
16609      ;;
16610    esac
16611
16612
16613 if test "$with_xshm" = yes; then
16614
16615   # first check for Xshm.h.
16616
16617   ac_save_CPPFLAGS="$CPPFLAGS"
16618   if test \! -z "$includedir" ; then
16619     CPPFLAGS="$CPPFLAGS -I$includedir"
16620   fi
16621   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16622   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
16623 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
16624 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
16625   echo $ECHO_N "(cached) $ECHO_C" >&6
16626 else
16627   cat >conftest.$ac_ext <<_ACEOF
16628 #line $LINENO "configure"
16629 #include "confdefs.h"
16630 #include <X11/Xlib.h>
16631
16632 #include <X11/extensions/XShm.h>
16633 _ACEOF
16634 rm -f conftest.$ac_objext
16635 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16636   (eval $ac_compile) 2>&5
16637   ac_status=$?
16638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16639   (exit $ac_status); } &&
16640          { ac_try='test -s conftest.$ac_objext'
16641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16642   (eval $ac_try) 2>&5
16643   ac_status=$?
16644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16645   (exit $ac_status); }; }; then
16646   ac_cv_header_X11_extensions_XShm_h=yes
16647 else
16648   echo "$as_me: failed program was:" >&5
16649 cat conftest.$ac_ext >&5
16650 ac_cv_header_X11_extensions_XShm_h=no
16651 fi
16652 rm -f conftest.$ac_objext conftest.$ac_ext
16653 fi
16654 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
16655 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
16656 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
16657   have_xshm=yes
16658 fi
16659
16660
16661   CPPFLAGS="$ac_save_CPPFLAGS"
16662
16663   # if that succeeded, then check for sys/ipc.h.
16664   if test "$have_xshm" = yes; then
16665     have_xshm=no
16666
16667   ac_save_CPPFLAGS="$CPPFLAGS"
16668   if test \! -z "$includedir" ; then
16669     CPPFLAGS="$CPPFLAGS -I$includedir"
16670   fi
16671   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16672   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16673   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
16674 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
16675 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16676   echo $ECHO_N "(cached) $ECHO_C" >&6
16677 fi
16678 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
16679 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
16680 else
16681   # Is the header compilable?
16682 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
16683 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
16684 cat >conftest.$ac_ext <<_ACEOF
16685 #line $LINENO "configure"
16686 #include "confdefs.h"
16687 $ac_includes_default
16688 #include <sys/ipc.h>
16689 _ACEOF
16690 rm -f conftest.$ac_objext
16691 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16692   (eval $ac_compile) 2>&5
16693   ac_status=$?
16694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16695   (exit $ac_status); } &&
16696          { ac_try='test -s conftest.$ac_objext'
16697   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16698   (eval $ac_try) 2>&5
16699   ac_status=$?
16700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16701   (exit $ac_status); }; }; then
16702   ac_header_compiler=yes
16703 else
16704   echo "$as_me: failed program was:" >&5
16705 cat conftest.$ac_ext >&5
16706 ac_header_compiler=no
16707 fi
16708 rm -f conftest.$ac_objext conftest.$ac_ext
16709 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16710 echo "${ECHO_T}$ac_header_compiler" >&6
16711
16712 # Is the header present?
16713 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
16714 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
16715 cat >conftest.$ac_ext <<_ACEOF
16716 #line $LINENO "configure"
16717 #include "confdefs.h"
16718 #include <sys/ipc.h>
16719 _ACEOF
16720 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16721   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16722   ac_status=$?
16723   egrep -v '^ *\+' conftest.er1 >conftest.err
16724   rm -f conftest.er1
16725   cat conftest.err >&5
16726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16727   (exit $ac_status); } >/dev/null; then
16728   if test -s conftest.err; then
16729     ac_cpp_err=$ac_c_preproc_warn_flag
16730   else
16731     ac_cpp_err=
16732   fi
16733 else
16734   ac_cpp_err=yes
16735 fi
16736 if test -z "$ac_cpp_err"; then
16737   ac_header_preproc=yes
16738 else
16739   echo "$as_me: failed program was:" >&5
16740   cat conftest.$ac_ext >&5
16741   ac_header_preproc=no
16742 fi
16743 rm -f conftest.err conftest.$ac_ext
16744 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16745 echo "${ECHO_T}$ac_header_preproc" >&6
16746
16747 # So?  What about this header?
16748 case $ac_header_compiler:$ac_header_preproc in
16749   yes:no )
16750     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
16751 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16752     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
16753 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;};;
16754   no:yes )
16755     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
16756 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
16757     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&5
16758 echo "$as_me: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&2;}
16759     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
16760 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;};;
16761 esac
16762 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
16763 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
16764 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16765   echo $ECHO_N "(cached) $ECHO_C" >&6
16766 else
16767   ac_cv_header_sys_ipc_h=$ac_header_preproc
16768 fi
16769 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
16770 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
16771
16772 fi
16773 if test $ac_cv_header_sys_ipc_h = yes; then
16774   have_xshm=yes
16775 fi
16776
16777
16778   CPPFLAGS="$ac_save_CPPFLAGS"
16779   fi
16780
16781   # if that succeeded, then check for sys/shm.h.
16782   if test "$have_xshm" = yes; then
16783     have_xshm=no
16784
16785   ac_save_CPPFLAGS="$CPPFLAGS"
16786   if test \! -z "$includedir" ; then
16787     CPPFLAGS="$CPPFLAGS -I$includedir"
16788   fi
16789   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16790   if test "${ac_cv_header_sys_shm_h+set}" = set; then
16791   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
16792 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
16793 if test "${ac_cv_header_sys_shm_h+set}" = set; then
16794   echo $ECHO_N "(cached) $ECHO_C" >&6
16795 fi
16796 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
16797 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
16798 else
16799   # Is the header compilable?
16800 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
16801 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
16802 cat >conftest.$ac_ext <<_ACEOF
16803 #line $LINENO "configure"
16804 #include "confdefs.h"
16805 $ac_includes_default
16806 #include <sys/shm.h>
16807 _ACEOF
16808 rm -f conftest.$ac_objext
16809 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16810   (eval $ac_compile) 2>&5
16811   ac_status=$?
16812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16813   (exit $ac_status); } &&
16814          { ac_try='test -s conftest.$ac_objext'
16815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16816   (eval $ac_try) 2>&5
16817   ac_status=$?
16818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16819   (exit $ac_status); }; }; then
16820   ac_header_compiler=yes
16821 else
16822   echo "$as_me: failed program was:" >&5
16823 cat conftest.$ac_ext >&5
16824 ac_header_compiler=no
16825 fi
16826 rm -f conftest.$ac_objext conftest.$ac_ext
16827 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16828 echo "${ECHO_T}$ac_header_compiler" >&6
16829
16830 # Is the header present?
16831 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
16832 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
16833 cat >conftest.$ac_ext <<_ACEOF
16834 #line $LINENO "configure"
16835 #include "confdefs.h"
16836 #include <sys/shm.h>
16837 _ACEOF
16838 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16839   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16840   ac_status=$?
16841   egrep -v '^ *\+' conftest.er1 >conftest.err
16842   rm -f conftest.er1
16843   cat conftest.err >&5
16844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16845   (exit $ac_status); } >/dev/null; then
16846   if test -s conftest.err; then
16847     ac_cpp_err=$ac_c_preproc_warn_flag
16848   else
16849     ac_cpp_err=
16850   fi
16851 else
16852   ac_cpp_err=yes
16853 fi
16854 if test -z "$ac_cpp_err"; then
16855   ac_header_preproc=yes
16856 else
16857   echo "$as_me: failed program was:" >&5
16858   cat conftest.$ac_ext >&5
16859   ac_header_preproc=no
16860 fi
16861 rm -f conftest.err conftest.$ac_ext
16862 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16863 echo "${ECHO_T}$ac_header_preproc" >&6
16864
16865 # So?  What about this header?
16866 case $ac_header_compiler:$ac_header_preproc in
16867   yes:no )
16868     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
16869 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16870     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
16871 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;};;
16872   no:yes )
16873     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
16874 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
16875     { echo "$as_me:$LINENO: WARNING: sys/shm.h: check for missing prerequisite headers?" >&5
16876 echo "$as_me: WARNING: sys/shm.h: check for missing prerequisite headers?" >&2;}
16877     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
16878 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;};;
16879 esac
16880 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
16881 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
16882 if test "${ac_cv_header_sys_shm_h+set}" = set; then
16883   echo $ECHO_N "(cached) $ECHO_C" >&6
16884 else
16885   ac_cv_header_sys_shm_h=$ac_header_preproc
16886 fi
16887 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
16888 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
16889
16890 fi
16891 if test $ac_cv_header_sys_shm_h = yes; then
16892   have_xshm=yes
16893 fi
16894
16895
16896   CPPFLAGS="$ac_save_CPPFLAGS"
16897   fi
16898
16899   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
16900   # to exist, but the library code to not exist.  And even better, the library
16901   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
16902   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
16903   # that's not quite right, but close enough.)
16904   #
16905   case "$host" in
16906     *-aix*)
16907       if  `uname -v` -eq 3 ; then
16908         have_xshm=no
16909
16910   ac_save_CPPFLAGS="$CPPFLAGS"
16911   ac_save_LDFLAGS="$LDFLAGS"
16912 #  ac_save_LIBS="$LIBS"
16913
16914   if test \! -z "$includedir" ; then
16915     CPPFLAGS="$CPPFLAGS -I$includedir"
16916   fi
16917   # note: $X_CFLAGS includes $x_includes
16918   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16919
16920   if test \! -z "$libdir" ; then
16921     LDFLAGS="$LDFLAGS -L$libdir"
16922   fi
16923   # note: $X_LIBS includes $x_libraries
16924   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16925
16926   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
16927 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
16928 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
16929   echo $ECHO_N "(cached) $ECHO_C" >&6
16930 else
16931   ac_check_lib_save_LIBS=$LIBS
16932 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
16933 cat >conftest.$ac_ext <<_ACEOF
16934 #line $LINENO "configure"
16935 #include "confdefs.h"
16936
16937 /* Override any gcc2 internal prototype to avoid an error.  */
16938 #ifdef __cplusplus
16939 extern "C"
16940 #endif
16941 /* We use char because int might match the return type of a gcc2
16942    builtin and then its argument prototype would still apply.  */
16943 char XShmQueryExtension ();
16944 #ifdef F77_DUMMY_MAIN
16945 #  ifdef __cplusplus
16946      extern "C"
16947 #  endif
16948    int F77_DUMMY_MAIN() { return 1; }
16949 #endif
16950 int
16951 main ()
16952 {
16953 XShmQueryExtension ();
16954   ;
16955   return 0;
16956 }
16957 _ACEOF
16958 rm -f conftest.$ac_objext conftest$ac_exeext
16959 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16960   (eval $ac_link) 2>&5
16961   ac_status=$?
16962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16963   (exit $ac_status); } &&
16964          { ac_try='test -s conftest$ac_exeext'
16965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16966   (eval $ac_try) 2>&5
16967   ac_status=$?
16968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16969   (exit $ac_status); }; }; then
16970   ac_cv_lib_XextSam_XShmQueryExtension=yes
16971 else
16972   echo "$as_me: failed program was:" >&5
16973 cat conftest.$ac_ext >&5
16974 ac_cv_lib_XextSam_XShmQueryExtension=no
16975 fi
16976 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16977 LIBS=$ac_check_lib_save_LIBS
16978 fi
16979 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
16980 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
16981 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
16982   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
16983 else
16984   true
16985 fi
16986
16987   CPPFLAGS="$ac_save_CPPFLAGS"
16988   LDFLAGS="$ac_save_LDFLAGS"
16989 #  LIBS="$ac_save_LIBS"
16990
16991       fi
16992     ;;
16993   esac
16994
16995   # if that succeeded, then we've really got it.
16996   if test "$have_xshm" = yes; then
16997     cat >>confdefs.h <<\_ACEOF
16998 #define HAVE_XSHM_EXTENSION 1
16999 _ACEOF
17000
17001   fi
17002
17003 elif test "$with_xshm" != no; then
17004   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
17005   exit 1
17006 fi
17007
17008
17009 ###############################################################################
17010 #
17011 #       Check for the DOUBLE-BUFFER server extension.
17012 #
17013 ###############################################################################
17014
17015 have_xdbe=no
17016 with_xdbe_req=unspecified
17017
17018 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
17019 if test "${with_xdbe_ext+set}" = set; then
17020   withval="$with_xdbe_ext"
17021   with_xdbe="$withval"; with_xdbe_req="$withval"
17022 else
17023   with_xdbe=yes
17024 fi;
17025
17026
17027    case "$with_xdbe" in
17028     yes) ;;
17029     no)  ;;
17030
17031     /*)
17032      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
17033 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
17034      d=$with_xdbe/include
17035      if test -d $d; then
17036        X_CFLAGS="-I$d $X_CFLAGS"
17037        echo "$as_me:$LINENO: result: $d" >&5
17038 echo "${ECHO_T}$d" >&6
17039      else
17040        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17041 echo "${ECHO_T}not found ($d: no such directory)" >&6
17042      fi
17043
17044      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
17045 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
17046      d=$with_xdbe/lib
17047      if test -d $d; then
17048        X_LIBS="-L$d $X_LIBS"
17049        echo "$as_me:$LINENO: result: $d" >&5
17050 echo "${ECHO_T}$d" >&6
17051      else
17052        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17053 echo "${ECHO_T}not found ($d: no such directory)" >&6
17054      fi
17055
17056      # replace the directory string with "yes".
17057      with_xdbe_req="yes"
17058      with_xdbe=$with_xdbe_req
17059      ;;
17060
17061     *)
17062      echo ""
17063      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
17064      echo "       If it is a directory, then \`DIR/include' will be added to"
17065      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17066      exit 1
17067      ;;
17068    esac
17069
17070
17071 if test "$with_xdbe" = yes; then
17072
17073
17074   ac_save_CPPFLAGS="$CPPFLAGS"
17075   if test \! -z "$includedir" ; then
17076     CPPFLAGS="$CPPFLAGS -I$includedir"
17077   fi
17078   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17079   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
17080 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
17081 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
17082   echo $ECHO_N "(cached) $ECHO_C" >&6
17083 else
17084   cat >conftest.$ac_ext <<_ACEOF
17085 #line $LINENO "configure"
17086 #include "confdefs.h"
17087 #include <X11/Xlib.h>
17088
17089 #include <X11/extensions/Xdbe.h>
17090 _ACEOF
17091 rm -f conftest.$ac_objext
17092 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17093   (eval $ac_compile) 2>&5
17094   ac_status=$?
17095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17096   (exit $ac_status); } &&
17097          { ac_try='test -s conftest.$ac_objext'
17098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17099   (eval $ac_try) 2>&5
17100   ac_status=$?
17101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17102   (exit $ac_status); }; }; then
17103   ac_cv_header_X11_extensions_Xdbe_h=yes
17104 else
17105   echo "$as_me: failed program was:" >&5
17106 cat conftest.$ac_ext >&5
17107 ac_cv_header_X11_extensions_Xdbe_h=no
17108 fi
17109 rm -f conftest.$ac_objext conftest.$ac_ext
17110 fi
17111 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
17112 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
17113 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
17114   have_xdbe=yes
17115 fi
17116
17117
17118   CPPFLAGS="$ac_save_CPPFLAGS"
17119   if test "$have_xdbe" = yes; then
17120     cat >>confdefs.h <<\_ACEOF
17121 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
17122 _ACEOF
17123
17124   fi
17125
17126 elif test "$with_xdbe" != no; then
17127   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
17128   exit 1
17129 fi
17130
17131
17132 ###############################################################################
17133 #
17134 #       Check for the SGI XReadDisplay server extension.
17135 #
17136 #       Note: this has to be down here, rather than up with the other server
17137 #       extension tests, so that the output of `configure --help' is in the
17138 #       right order.  Arrgh!
17139 #
17140 ###############################################################################
17141
17142 have_readdisplay=no
17143 with_readdisplay_req=unspecified
17144
17145 # Check whether --with-readdisplay or --without-readdisplay was given.
17146 if test "${with_readdisplay+set}" = set; then
17147   withval="$with_readdisplay"
17148   with_readdisplay="$withval"; with_readdisplay_req="$withval"
17149 else
17150   with_readdisplay=yes
17151 fi;
17152
17153
17154    case "$with_readdisplay" in
17155     yes) ;;
17156     no)  ;;
17157
17158     /*)
17159      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
17160 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
17161      d=$with_readdisplay/include
17162      if test -d $d; then
17163        X_CFLAGS="-I$d $X_CFLAGS"
17164        echo "$as_me:$LINENO: result: $d" >&5
17165 echo "${ECHO_T}$d" >&6
17166      else
17167        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17168 echo "${ECHO_T}not found ($d: no such directory)" >&6
17169      fi
17170
17171      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
17172 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
17173      d=$with_readdisplay/lib
17174      if test -d $d; then
17175        X_LIBS="-L$d $X_LIBS"
17176        echo "$as_me:$LINENO: result: $d" >&5
17177 echo "${ECHO_T}$d" >&6
17178      else
17179        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17180 echo "${ECHO_T}not found ($d: no such directory)" >&6
17181      fi
17182
17183      # replace the directory string with "yes".
17184      with_readdisplay_req="yes"
17185      with_readdisplay=$with_readdisplay_req
17186      ;;
17187
17188     *)
17189      echo ""
17190      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
17191      echo "       If it is a directory, then \`DIR/include' will be added to"
17192      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17193      exit 1
17194      ;;
17195    esac
17196
17197
17198 if test "$with_readdisplay" = yes; then
17199
17200   ac_save_CPPFLAGS="$CPPFLAGS"
17201   if test \! -z "$includedir" ; then
17202     CPPFLAGS="$CPPFLAGS -I$includedir"
17203   fi
17204   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17205   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
17206 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
17207 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
17208   echo $ECHO_N "(cached) $ECHO_C" >&6
17209 else
17210   cat >conftest.$ac_ext <<_ACEOF
17211 #line $LINENO "configure"
17212 #include "confdefs.h"
17213 #include <X11/Xlib.h>
17214
17215 #include <X11/extensions/readdisplay.h>
17216 _ACEOF
17217 rm -f conftest.$ac_objext
17218 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17219   (eval $ac_compile) 2>&5
17220   ac_status=$?
17221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17222   (exit $ac_status); } &&
17223          { ac_try='test -s conftest.$ac_objext'
17224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17225   (eval $ac_try) 2>&5
17226   ac_status=$?
17227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17228   (exit $ac_status); }; }; then
17229   ac_cv_header_X11_extensions_readdisplay_h=yes
17230 else
17231   echo "$as_me: failed program was:" >&5
17232 cat conftest.$ac_ext >&5
17233 ac_cv_header_X11_extensions_readdisplay_h=no
17234 fi
17235 rm -f conftest.$ac_objext conftest.$ac_ext
17236 fi
17237 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
17238 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
17239 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
17240   cat >>confdefs.h <<\_ACEOF
17241 #define HAVE_READ_DISPLAY_EXTENSION 1
17242 _ACEOF
17243
17244 fi
17245
17246
17247   CPPFLAGS="$ac_save_CPPFLAGS"
17248 elif test "$with_readdisplay" != no; then
17249   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
17250   exit 1
17251 fi
17252
17253
17254 ###############################################################################
17255 #
17256 #       Check for a program to generate random text.
17257 #
17258 #       Zippy is funnier than the idiocy generally spat out by `fortune',
17259 #       so first see if "fortune zippy" works.  Else, use plain "fortune".
17260 #
17261 #       We used to dig around in Emacs to look for the "yow" program, but
17262 #       most people who have Emacs also have "fortune zippy", so nevermind.
17263 #
17264 ###############################################################################
17265
17266 with_fortune_req=""
17267
17268 # Check whether --with-fortune or --without-fortune was given.
17269 if test "${with_fortune+set}" = set; then
17270   withval="$with_fortune"
17271   with_fortune_req="$withval"; with_fortune="$withval"
17272 else
17273   with_fortune=yes
17274 fi;
17275
17276 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
17277   with_fortune=""
17278   with_fortune_req=""
17279 fi
17280
17281 if test -n "$with_fortune_req" ; then
17282   ac_cv_fortune_program=""
17283   case "$with_fortune_req" in
17284     /*)
17285
17286       set dummy $with_fortune_req ; fortune_tmp=$2
17287       echo "$as_me:$LINENO: checking for $fortune_tmp" >&5
17288 echo $ECHO_N "checking for $fortune_tmp... $ECHO_C" >&6
17289       if test -x "$fortune_tmp" ; then
17290         echo "$as_me:$LINENO: result: yes" >&5
17291 echo "${ECHO_T}yes" >&6
17292       else
17293         echo "$as_me:$LINENO: result: no" >&5
17294 echo "${ECHO_T}no" >&6
17295         with_fortune=""
17296       fi
17297     ;;
17298     *)
17299       set dummy $with_fortune_req ; fortune_tmp=$2
17300       # don't cache
17301       unset ac_cv_path_fortune_tmp
17302       # Extract the first word of "$fortune_tmp", so it can be a program name with args.
17303 set dummy $fortune_tmp; ac_word=$2
17304 echo "$as_me:$LINENO: checking for $ac_word" >&5
17305 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17306 if test "${ac_cv_path_fortune_tmp+set}" = set; then
17307   echo $ECHO_N "(cached) $ECHO_C" >&6
17308 else
17309   case $fortune_tmp in
17310   [\\/]* | ?:[\\/]*)
17311   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
17312   ;;
17313   *)
17314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17315 for as_dir in $PATH
17316 do
17317   IFS=$as_save_IFS
17318   test -z "$as_dir" && as_dir=.
17319   for ac_exec_ext in '' $ac_executable_extensions; do
17320   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17321     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
17322     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17323     break 2
17324   fi
17325 done
17326 done
17327
17328   ;;
17329 esac
17330 fi
17331 fortune_tmp=$ac_cv_path_fortune_tmp
17332
17333 if test -n "$fortune_tmp"; then
17334   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17335 echo "${ECHO_T}$fortune_tmp" >&6
17336 else
17337   echo "$as_me:$LINENO: result: no" >&5
17338 echo "${ECHO_T}no" >&6
17339 fi
17340
17341       if test -z "$fortune_tmp" ; then
17342         with_fortune=""
17343       fi
17344     ;;
17345   esac
17346   ac_cv_fortune_program="$with_fortune"
17347
17348 elif test -n "$ac_cv_fortune_program"; then
17349   echo "$as_me:$LINENO: result: checking for fortune... (cached) $ac_cv_fortune_program" >&5
17350 echo "${ECHO_T}checking for fortune... (cached) $ac_cv_fortune_program" >&6
17351 fi
17352
17353 unset ac_cv_path_fortune_tmp
17354 unset fortune_tmp
17355
17356 if test -z "$ac_cv_fortune_program" ; then
17357
17358   # first look for fortune in /usr/games/ (and use absolute path)
17359   for ac_prog in fortune
17360 do
17361   # Extract the first word of "$ac_prog", so it can be a program name with args.
17362 set dummy $ac_prog; ac_word=$2
17363 echo "$as_me:$LINENO: checking for $ac_word" >&5
17364 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17365 if test "${ac_cv_path_fortune_tmp+set}" = set; then
17366   echo $ECHO_N "(cached) $ECHO_C" >&6
17367 else
17368   case $fortune_tmp in
17369   [\\/]* | ?:[\\/]*)
17370   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
17371   ;;
17372   *)
17373   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17374 as_dummy=""/usr/games""
17375 for as_dir in $as_dummy
17376 do
17377   IFS=$as_save_IFS
17378   test -z "$as_dir" && as_dir=.
17379   for ac_exec_ext in '' $ac_executable_extensions; do
17380   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17381     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
17382     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17383     break 2
17384   fi
17385 done
17386 done
17387
17388   ;;
17389 esac
17390 fi
17391 fortune_tmp=$ac_cv_path_fortune_tmp
17392
17393 if test -n "$fortune_tmp"; then
17394   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17395 echo "${ECHO_T}$fortune_tmp" >&6
17396 else
17397   echo "$as_me:$LINENO: result: no" >&5
17398 echo "${ECHO_T}no" >&6
17399 fi
17400
17401   test -n "$fortune_tmp" && break
17402 done
17403
17404
17405   # if it's not there, look on $PATH (and don't use absolute path)
17406   if test -z "$fortune_tmp" ; then
17407      for ac_prog in fortune
17408 do
17409   # Extract the first word of "$ac_prog", so it can be a program name with args.
17410 set dummy $ac_prog; ac_word=$2
17411 echo "$as_me:$LINENO: checking for $ac_word" >&5
17412 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17413 if test "${ac_cv_prog_fortune_tmp+set}" = set; then
17414   echo $ECHO_N "(cached) $ECHO_C" >&6
17415 else
17416   if test -n "$fortune_tmp"; then
17417   ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
17418 else
17419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17420 for as_dir in $PATH
17421 do
17422   IFS=$as_save_IFS
17423   test -z "$as_dir" && as_dir=.
17424   for ac_exec_ext in '' $ac_executable_extensions; do
17425   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17426     ac_cv_prog_fortune_tmp="$ac_prog"
17427     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17428     break 2
17429   fi
17430 done
17431 done
17432
17433 fi
17434 fi
17435 fortune_tmp=$ac_cv_prog_fortune_tmp
17436 if test -n "$fortune_tmp"; then
17437   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17438 echo "${ECHO_T}$fortune_tmp" >&6
17439 else
17440   echo "$as_me:$LINENO: result: no" >&5
17441 echo "${ECHO_T}no" >&6
17442 fi
17443
17444   test -n "$fortune_tmp" && break
17445 done
17446
17447   fi
17448
17449   # if we didn't find anything, then just assume /usr/games/
17450   if test -z "$fortune_tmp" ; then
17451      fortune_tmp="/usr/games/fortune"
17452   fi
17453
17454   ac_cv_fortune_program="$fortune_tmp"
17455
17456   # now check to see whether "fortune zippy" works.
17457   #
17458   fortune_tmp="$fortune_tmp zippy"
17459   echo "$as_me:$LINENO: checking for zippy quotes" >&5
17460 echo $ECHO_N "checking for zippy quotes... $ECHO_C" >&6
17461   if ( $fortune_tmp >/dev/null 2>&1 ); then
17462     ac_cv_fortune_program="$fortune_tmp"
17463     echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17464 echo "${ECHO_T}$fortune_tmp" >&6
17465   else
17466     echo "$as_me:$LINENO: result: no" >&5
17467 echo "${ECHO_T}no" >&6
17468   fi
17469
17470 fi
17471
17472 unset ac_cv_path_fortune_tmp
17473 unset fortune_tmp
17474
17475 cat >>confdefs.h <<_ACEOF
17476 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
17477 _ACEOF
17478
17479
17480
17481 ###############################################################################
17482 #
17483 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
17484 #       This should be safe, but let's give people the option.
17485 #
17486 ###############################################################################
17487
17488 setuid_hacks_default=no
17489 setuid_hacks="$setuid_hacks_default"
17490
17491 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
17492 if test "${with_setuid_hacks+set}" = set; then
17493   withval="$with_setuid_hacks"
17494   setuid_hacks="$withval"
17495 else
17496   setuid_hacks="$setuid_hacks_default"
17497 fi;
17498
17499
17500    case "$setuid_hacks" in
17501     yes) ;;
17502     no)  ;;
17503
17504     /*)
17505      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
17506 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
17507      d=$setuid_hacks/include
17508      if test -d $d; then
17509        X_CFLAGS="-I$d $X_CFLAGS"
17510        echo "$as_me:$LINENO: result: $d" >&5
17511 echo "${ECHO_T}$d" >&6
17512      else
17513        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17514 echo "${ECHO_T}not found ($d: no such directory)" >&6
17515      fi
17516
17517      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
17518 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
17519      d=$setuid_hacks/lib
17520      if test -d $d; then
17521        X_LIBS="-L$d $X_LIBS"
17522        echo "$as_me:$LINENO: result: $d" >&5
17523 echo "${ECHO_T}$d" >&6
17524      else
17525        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17526 echo "${ECHO_T}not found ($d: no such directory)" >&6
17527      fi
17528
17529      # replace the directory string with "yes".
17530      setuid_hacks_req="yes"
17531      setuid_hacks=$setuid_hacks_req
17532      ;;
17533
17534     *)
17535      echo ""
17536      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
17537      echo "       If it is a directory, then \`DIR/include' will be added to"
17538      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17539      exit 1
17540      ;;
17541    esac
17542
17543
17544 if test "$setuid_hacks" = yes; then
17545   true
17546 elif test "$setuid_hacks" != no; then
17547   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
17548   exit 1
17549 fi
17550
17551
17552 ###############################################################################
17553 #
17554 #       Done testing.  Now, set up the various -I and -L variables,
17555 #       and decide which GUI program to build by default.
17556 #
17557 ###############################################################################
17558
17559 DEPEND=makedepend
17560 DEPEND_FLAGS=
17561 DEPEND_DEFINES=
17562
17563
17564 if test \! -z "$includedir" ; then
17565   INCLUDES="$INCLUDES -I$includedir"
17566 fi
17567
17568 if test \! -z "$libdir" ; then
17569   LDFLAGS="$LDFLAGS -L$libdir"
17570 fi
17571
17572
17573 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
17574 ALL_DEMO_PROGRAMS=
17575 if test "$have_motif" = yes; then
17576   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
17577   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
17578 fi
17579 if test "$have_gtk" = yes; then
17580   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
17581   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
17582 fi
17583
17584
17585 if test "$have_kerberos" = yes; then
17586   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
17587   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
17588 fi
17589 if test "$have_pam" = yes; then
17590   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
17591   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
17592   INSTALL_PAM="install-pam"
17593 fi
17594   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
17595   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
17596
17597
17598 if test "$enable_locking" = yes; then
17599   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
17600   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
17601 else
17602   LOCK_SRCS='$(NOLOCK_SRCS_1)'
17603   LOCK_OBJS='$(NOLOCK_OBJS_1)'
17604 fi
17605
17606 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
17607
17608 if test "$need_setuid" = yes; then
17609   NEED_SETUID=yes
17610 else
17611   NEED_SETUID=no
17612 fi
17613
17614 if test "$setuid_hacks" = yes; then
17615   SETUID_HACKS=yes
17616 else
17617   SETUID_HACKS=no
17618 fi
17619
17620 tab='   '
17621 if test "$have_gl" = yes; then
17622   GL_EXES='$(GL_EXES)'
17623   GL_UTIL_EXES='$(GL_UTIL_EXES)'
17624   GL_MEN='$(GL_MEN)'
17625   GL_KLUDGE="${tab}  "
17626 else
17627   GL_KLUDGE="-${tab}  "
17628 fi
17629
17630 if test "$have_gle" = yes; then
17631   GLE_EXES='$(GLE_EXES)'
17632   GLE_KLUDGE="${tab}   "
17633 else
17634   GLE_KLUDGE="-${tab}   "
17635 fi
17636
17637 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
17638  JPEG_EXES='$(JPEG_EXES)'
17639 fi
17640
17641
17642 # Another substitution in the XScreenSaver.ad.in file:
17643 #
17644 if test "$have_gnome_help" = yes; then
17645   GNOMEHELP_Y=''
17646   GNOMEHELP_N='!    '
17647 else
17648   GNOMEHELP_Y='!    '
17649   GNOMEHELP_N=''
17650 fi
17651
17652
17653 # Now that we know whether we have Gnome, we can decide where the XML
17654 # config files get installed.
17655 #
17656 if test -z "$HACK_CONF_DIR" ; then
17657   if test -n "$GNOME_DATADIR" ; then
17658     HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
17659   else
17660     HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
17661   fi
17662 fi
17663
17664
17665
17666 # After computing $HACK_CONF_DIR, make sure $GLADE_DATADIR has a value
17667 # so that we know where to install the Gtk pixmaps.
17668 #
17669 # It should usually be "/usr/share/pixmaps/", but we can't just use
17670 # "$(prefix)/share/pixmaps" because that would usually result in
17671 # "/usr/X11R6/share/pixmaps/", which is wrong.  It needs to be the
17672 # Gnome/Gtk prefix, not the overall prefix.
17673 #
17674 if test -n "$GNOME_DATADIR" ; then
17675   GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver'
17676 elif test "$have_gtk" = yes; then
17677   if test -n "$pkg_config"; then
17678     if test "$have_gtk2" = yes; then
17679       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
17680     else
17681       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+`
17682     fi
17683   else
17684     GLADE_DATADIR=`$gtk_config --prefix`
17685   fi
17686   GLADE_DATADIR="$GLADE_DATADIR/share/xscreensaver"
17687 else
17688   GLADE_DATADIR=''
17689 fi
17690
17691
17692 # Set PO_DATADIR to something sensible.
17693 #
17694 echo "$as_me:$LINENO: checking for locale directory" >&5
17695 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
17696 if test -n "$GNOME_DATADIR" ; then
17697   PO_DATADIR="$GNOME_DATADIR"
17698 elif test "$have_gtk" = yes; then
17699   if test -n "$pkg_config"; then
17700     if test "$have_gtk2" = yes; then
17701       PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
17702     else
17703       PO_DATADIR=`$pkg_config --variable=prefix gtk+`
17704     fi
17705   else
17706     PO_DATADIR=`$gtk_config --prefix`
17707   fi
17708   PO_DATADIR="$PO_DATADIR/share"
17709 fi
17710
17711 if test -z "$PO_DATADIR" ; then
17712   #
17713   # #### Total fucking kludge --
17714   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
17715   # but of course we need to expand all the nested variables to do that...
17716   #
17717   dd=$datadir
17718   eval dd=${dd}
17719   eval dd=${dd}
17720   eval dd=${dd}
17721   eval dd=${dd}
17722   eval dd=${dd}
17723   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
17724 fi
17725
17726 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
17727 echo "${ECHO_T}$PO_DATADIR/locale" >&6
17728
17729
17730 # canonicalize slashes.
17731 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
17732
17733 # gcc 3.0 likes to issue this warning for every file:
17734 #
17735 # cc1: warning: changing search order for system directory "/usr/local/include"
17736 # cc1: warning:   as it has already been specified as a non-system directory
17737 #
17738 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
17739 # Which *should* be totally redundant, and thus an ok thing to delete?
17740 #
17741 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
17742
17743
17744 ###############################################################################
17745 #
17746 #       Perform substitutions and write Makefiles.
17747 #
17748 ###############################################################################
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798 APPDEFAULTS=$ac_x_app_defaults
17799
17800
17801
17802
17803
17804
17805
17806 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"
17807 cat >confcache <<\_ACEOF
17808 # This file is a shell script that caches the results of configure
17809 # tests run on this system so they can be shared between configure
17810 # scripts and configure runs, see configure's option --config-cache.
17811 # It is not useful on other systems.  If it contains results you don't
17812 # want to keep, you may remove or edit it.
17813 #
17814 # config.status only pays attention to the cache file if you give it
17815 # the --recheck option to rerun configure.
17816 #
17817 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17818 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17819 # following values.
17820
17821 _ACEOF
17822
17823 # The following way of writing the cache mishandles newlines in values,
17824 # but we know of no workaround that is simple, portable, and efficient.
17825 # So, don't put newlines in cache variables' values.
17826 # Ultrix sh set writes to stderr and can't be redirected directly,
17827 # and sets the high bit in the cache file unless we assign to the vars.
17828 {
17829   (set) 2>&1 |
17830     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17831     *ac_space=\ *)
17832       # `set' does not quote correctly, so add quotes (double-quote
17833       # substitution turns \\\\ into \\, and sed turns \\ into \).
17834       sed -n \
17835         "s/'/'\\\\''/g;
17836           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17837       ;;
17838     *)
17839       # `set' quotes correctly as required by POSIX, so do not add quotes.
17840       sed -n \
17841         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17842       ;;
17843     esac;
17844 } |
17845   sed '
17846      t clear
17847      : clear
17848      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17849      t end
17850      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17851      : end' >>confcache
17852 if cmp -s $cache_file confcache; then :; else
17853   if test -w $cache_file; then
17854     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17855     cat confcache >$cache_file
17856   else
17857     echo "not updating unwritable cache $cache_file"
17858   fi
17859 fi
17860 rm -f confcache
17861
17862 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17863 # Let make expand exec_prefix.
17864 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17865
17866 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17867 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17868 # trailing colons and then remove the whole line if VPATH becomes empty
17869 # (actually we leave an empty line to preserve line numbers).
17870 if test "x$srcdir" = x.; then
17871   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17872 s/:*\$(srcdir):*/:/;
17873 s/:*\${srcdir}:*/:/;
17874 s/:*@srcdir@:*/:/;
17875 s/^\([^=]*=[    ]*\):*/\1/;
17876 s/:*$//;
17877 s/^[^=]*=[      ]*$//;
17878 }'
17879 fi
17880
17881 DEFS=-DHAVE_CONFIG_H
17882
17883
17884
17885         mv -f po/POTFILES po/POTFILES.tmp
17886         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
17887         rm -f po/POTFILES.tmp
17888
17889
17890
17891 : ${CONFIG_STATUS=./config.status}
17892 ac_clean_files_save=$ac_clean_files
17893 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17894 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17895 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17896 cat >$CONFIG_STATUS <<_ACEOF
17897 #! $SHELL
17898 # Generated by $as_me.
17899 # Run this file to recreate the current configuration.
17900 # Compiler output produced by configure, useful for debugging
17901 # configure, is in config.log if it exists.
17902
17903 debug=false
17904 SHELL=\${CONFIG_SHELL-$SHELL}
17905 _ACEOF
17906
17907 cat >>$CONFIG_STATUS <<\_ACEOF
17908
17909 ## --------------------- ##
17910 ## M4sh Initialization.  ##
17911 ## --------------------- ##
17912
17913 # Be Bourne compatible
17914 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17915   emulate sh
17916   NULLCMD=:
17917 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17918   set -o posix
17919 fi
17920
17921 # NLS nuisances.
17922 # Support unset when possible.
17923 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17924   as_unset=unset
17925 else
17926   as_unset=false
17927 fi
17928
17929 (set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17930     { $as_unset LANG || test "${LANG+set}" != set; } ||
17931       { LANG=C; export LANG; }
17932 (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17933     { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17934       { LC_ALL=C; export LC_ALL; }
17935 (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17936     { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17937       { LC_TIME=C; export LC_TIME; }
17938 (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17939     { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17940       { LC_CTYPE=C; export LC_CTYPE; }
17941 (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17942     { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17943       { LANGUAGE=C; export LANGUAGE; }
17944 (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17945     { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17946       { LC_COLLATE=C; export LC_COLLATE; }
17947 (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17948     { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17949       { LC_NUMERIC=C; export LC_NUMERIC; }
17950 (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17951     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17952       { LC_MESSAGES=C; export LC_MESSAGES; }
17953
17954
17955 # Name of the executable.
17956 as_me=`(basename "$0") 2>/dev/null ||
17957 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17958          X"$0" : 'X\(//\)$' \| \
17959          X"$0" : 'X\(/\)$' \| \
17960          .     : '\(.\)' 2>/dev/null ||
17961 echo X/"$0" |
17962     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17963           /^X\/\(\/\/\)$/{ s//\1/; q; }
17964           /^X\/\(\/\).*/{ s//\1/; q; }
17965           s/.*/./; q'`
17966
17967 # PATH needs CR, and LINENO needs CR and PATH.
17968 # Avoid depending upon Character Ranges.
17969 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17970 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17971 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17972 as_cr_digits='0123456789'
17973 as_cr_alnum=$as_cr_Letters$as_cr_digits
17974
17975 # The user is always right.
17976 if test "${PATH_SEPARATOR+set}" != set; then
17977   echo "#! /bin/sh" >conftest.sh
17978   echo  "exit 0"   >>conftest.sh
17979   chmod +x conftest.sh
17980   if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
17981     PATH_SEPARATOR=';'
17982   else
17983     PATH_SEPARATOR=:
17984   fi
17985   rm -f conftest.sh
17986 fi
17987
17988
17989   as_lineno_1=$LINENO
17990   as_lineno_2=$LINENO
17991   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17992   test "x$as_lineno_1" != "x$as_lineno_2" &&
17993   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
17994   # Find who we are.  Look in the path if we contain no path at all
17995   # relative or not.
17996   case $0 in
17997     *[\\/]* ) as_myself=$0 ;;
17998     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17999 for as_dir in $PATH
18000 do
18001   IFS=$as_save_IFS
18002   test -z "$as_dir" && as_dir=.
18003   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18004 done
18005
18006        ;;
18007   esac
18008   # We did not find ourselves, most probably we were run as `sh COMMAND'
18009   # in which case we are not to be found in the path.
18010   if test "x$as_myself" = x; then
18011     as_myself=$0
18012   fi
18013   if test ! -f "$as_myself"; then
18014     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18015 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18016    { (exit 1); exit 1; }; }
18017   fi
18018   case $CONFIG_SHELL in
18019   '')
18020     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18021 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18022 do
18023   IFS=$as_save_IFS
18024   test -z "$as_dir" && as_dir=.
18025   for as_base in sh bash ksh sh5; do
18026          case $as_dir in
18027          /*)
18028            if ("$as_dir/$as_base" -c '
18029   as_lineno_1=$LINENO
18030   as_lineno_2=$LINENO
18031   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18032   test "x$as_lineno_1" != "x$as_lineno_2" &&
18033   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
18034              CONFIG_SHELL=$as_dir/$as_base
18035              export CONFIG_SHELL
18036              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18037            fi;;
18038          esac
18039        done
18040 done
18041 ;;
18042   esac
18043
18044   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18045   # uniformly replaced by the line number.  The first 'sed' inserts a
18046   # line-number line before each line; the second 'sed' does the real
18047   # work.  The second script uses 'N' to pair each line-number line
18048   # with the numbered line, and appends trailing '-' during
18049   # substitution so that $LINENO is not a special case at line end.
18050   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18051   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
18052   sed '=' <$as_myself |
18053     sed '
18054       N
18055       s,$,-,
18056       : loop
18057       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18058       t loop
18059       s,-$,,
18060       s,^['$as_cr_digits']*\n,,
18061     ' >$as_me.lineno &&
18062   chmod +x $as_me.lineno ||
18063     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18064 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18065    { (exit 1); exit 1; }; }
18066
18067   # Don't try to exec as it changes $[0], causing all sort of problems
18068   # (the dirname of $[0] is not the place where we might find the
18069   # original and so on.  Autoconf is especially sensible to this).
18070   . ./$as_me.lineno
18071   # Exit status is that of the last command.
18072   exit
18073 }
18074
18075
18076 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18077   *c*,-n*) ECHO_N= ECHO_C='
18078 ' ECHO_T='      ' ;;
18079   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18080   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
18081 esac
18082
18083 if expr a : '\(a\)' >/dev/null 2>&1; then
18084   as_expr=expr
18085 else
18086   as_expr=false
18087 fi
18088
18089 rm -f conf$$ conf$$.exe conf$$.file
18090 echo >conf$$.file
18091 if ln -s conf$$.file conf$$ 2>/dev/null; then
18092   # We could just check for DJGPP; but this test a) works b) is more generic
18093   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18094   if test -f conf$$.exe; then
18095     # Don't use ln at all; we don't have any links
18096     as_ln_s='cp -p'
18097   else
18098     as_ln_s='ln -s'
18099   fi
18100 elif ln conf$$.file conf$$ 2>/dev/null; then
18101   as_ln_s=ln
18102 else
18103   as_ln_s='cp -p'
18104 fi
18105 rm -f conf$$ conf$$.exe conf$$.file
18106
18107 as_executable_p="test -f"
18108
18109 # Sed expression to map a string onto a valid CPP name.
18110 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18111
18112 # Sed expression to map a string onto a valid variable name.
18113 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18114
18115
18116 # IFS
18117 # We need space, tab and new line, in precisely that order.
18118 as_nl='
18119 '
18120 IFS="   $as_nl"
18121
18122 # CDPATH.
18123 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
18124
18125 exec 6>&1
18126
18127 # Open the log real soon, to keep \$[0] and so on meaningful, and to
18128 # report actual input values of CONFIG_FILES etc. instead of their
18129 # values after options handling.  Logging --version etc. is OK.
18130 exec 5>>config.log
18131 {
18132   echo
18133   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18134 ## Running $as_me. ##
18135 _ASBOX
18136 } >&5
18137 cat >&5 <<_CSEOF
18138
18139 This file was extended by $as_me, which was
18140 generated by GNU Autoconf 2.53.  Invocation command line was
18141
18142   CONFIG_FILES    = $CONFIG_FILES
18143   CONFIG_HEADERS  = $CONFIG_HEADERS
18144   CONFIG_LINKS    = $CONFIG_LINKS
18145   CONFIG_COMMANDS = $CONFIG_COMMANDS
18146   $ $0 $@
18147
18148 _CSEOF
18149 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18150 echo >&5
18151 _ACEOF
18152
18153 # Files that config.status was made for.
18154 if test -n "$ac_config_files"; then
18155   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18156 fi
18157
18158 if test -n "$ac_config_headers"; then
18159   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18160 fi
18161
18162 if test -n "$ac_config_links"; then
18163   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18164 fi
18165
18166 if test -n "$ac_config_commands"; then
18167   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18168 fi
18169
18170 cat >>$CONFIG_STATUS <<\_ACEOF
18171
18172 ac_cs_usage="\
18173 \`$as_me' instantiates files from templates according to the
18174 current configuration.
18175
18176 Usage: $0 [OPTIONS] [FILE]...
18177
18178   -h, --help       print this help, then exit
18179   -V, --version    print version number, then exit
18180   -d, --debug      don't remove temporary files
18181       --recheck    update $as_me by reconfiguring in the same conditions
18182   --file=FILE[:TEMPLATE]
18183                    instantiate the configuration file FILE
18184   --header=FILE[:TEMPLATE]
18185                    instantiate the configuration header FILE
18186
18187 Configuration files:
18188 $config_files
18189
18190 Configuration headers:
18191 $config_headers
18192
18193 Configuration commands:
18194 $config_commands
18195
18196 Report bugs to <bug-autoconf@gnu.org>."
18197 _ACEOF
18198
18199 cat >>$CONFIG_STATUS <<_ACEOF
18200 ac_cs_version="\\
18201 config.status
18202 configured by $0, generated by GNU Autoconf 2.53,
18203   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18204
18205 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18206 Free Software Foundation, Inc.
18207 This config.status script is free software; the Free Software Foundation
18208 gives unlimited permission to copy, distribute and modify it."
18209 srcdir=$srcdir
18210 INSTALL="$INSTALL"
18211 _ACEOF
18212
18213 cat >>$CONFIG_STATUS <<\_ACEOF
18214 # If no file are specified by the user, then we need to provide default
18215 # value.  By we need to know if files were specified by the user.
18216 ac_need_defaults=:
18217 while test $# != 0
18218 do
18219   case $1 in
18220   --*=*)
18221     ac_option=`expr "x$1" : 'x\([^=]*\)='`
18222     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18223     shift
18224     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18225     shift
18226     ;;
18227   -*);;
18228   *) # This is not an option, so the user has probably given explicit
18229      # arguments.
18230      ac_need_defaults=false;;
18231   esac
18232
18233   case $1 in
18234   # Handling of the options.
18235 _ACEOF
18236 cat >>$CONFIG_STATUS <<_ACEOF
18237   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18238     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18239     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18240 _ACEOF
18241 cat >>$CONFIG_STATUS <<\_ACEOF
18242   --version | --vers* | -V )
18243     echo "$ac_cs_version"; exit 0 ;;
18244   --he | --h)
18245     # Conflict between --help and --header
18246     { { echo "$as_me:$LINENO: error: ambiguous option: $1
18247 Try \`$0 --help' for more information." >&5
18248 echo "$as_me: error: ambiguous option: $1
18249 Try \`$0 --help' for more information." >&2;}
18250    { (exit 1); exit 1; }; };;
18251   --help | --hel | -h )
18252     echo "$ac_cs_usage"; exit 0 ;;
18253   --debug | --d* | -d )
18254     debug=: ;;
18255   --file | --fil | --fi | --f )
18256     shift
18257     CONFIG_FILES="$CONFIG_FILES $1"
18258     ac_need_defaults=false;;
18259   --header | --heade | --head | --hea )
18260     shift
18261     CONFIG_HEADERS="$CONFIG_HEADERS $1"
18262     ac_need_defaults=false;;
18263
18264   # This is an error.
18265   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18266 Try \`$0 --help' for more information." >&5
18267 echo "$as_me: error: unrecognized option: $1
18268 Try \`$0 --help' for more information." >&2;}
18269    { (exit 1); exit 1; }; } ;;
18270
18271   *) ac_config_targets="$ac_config_targets $1" ;;
18272
18273   esac
18274   shift
18275 done
18276
18277 _ACEOF
18278
18279 cat >>$CONFIG_STATUS <<_ACEOF
18280 #
18281 # INIT-COMMANDS section.
18282 #
18283
18284 INTLTOOL_PERL=${INTLTOOL_PERL}
18285
18286
18287 _ACEOF
18288
18289
18290
18291 cat >>$CONFIG_STATUS <<\_ACEOF
18292 for ac_config_target in $ac_config_targets
18293 do
18294   case "$ac_config_target" in
18295   # Handling of arguments.
18296   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18297   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
18298   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
18299   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
18300   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
18301   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
18302   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
18303   "driver/xscreensaver.kss" ) CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.kss" ;;
18304   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
18305   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
18306   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
18307   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18308 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18309    { (exit 1); exit 1; }; };;
18310   esac
18311 done
18312
18313 # If the user did not use the arguments to specify the items to instantiate,
18314 # then the envvar interface is used.  Set only those that are not.
18315 # We use the long form for the default assignment because of an extremely
18316 # bizarre bug on SunOS 4.1.3.
18317 if $ac_need_defaults; then
18318   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18319   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18320   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18321 fi
18322
18323 # Create a temporary directory, and hook for its removal unless debugging.
18324 $debug ||
18325 {
18326   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18327   trap '{ (exit 1); exit 1; }' 1 2 13 15
18328 }
18329
18330 # Create a (secure) tmp directory for tmp files.
18331 : ${TMPDIR=/tmp}
18332 {
18333   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18334   test -n "$tmp" && test -d "$tmp"
18335 }  ||
18336 {
18337   tmp=$TMPDIR/cs$$-$RANDOM
18338   (umask 077 && mkdir $tmp)
18339 } ||
18340 {
18341    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18342    { (exit 1); exit 1; }
18343 }
18344
18345 _ACEOF
18346
18347 cat >>$CONFIG_STATUS <<_ACEOF
18348
18349 #
18350 # CONFIG_FILES section.
18351 #
18352
18353 # No need to generate the scripts if there are no CONFIG_FILES.
18354 # This happens for instance when ./config.status config.h
18355 if test -n "\$CONFIG_FILES"; then
18356   # Protect against being on the right side of a sed subst in config.status.
18357   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18358    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18359 s,@SHELL@,$SHELL,;t t
18360 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18361 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18362 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18363 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18364 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18365 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18366 s,@exec_prefix@,$exec_prefix,;t t
18367 s,@prefix@,$prefix,;t t
18368 s,@program_transform_name@,$program_transform_name,;t t
18369 s,@bindir@,$bindir,;t t
18370 s,@sbindir@,$sbindir,;t t
18371 s,@libexecdir@,$libexecdir,;t t
18372 s,@datadir@,$datadir,;t t
18373 s,@sysconfdir@,$sysconfdir,;t t
18374 s,@sharedstatedir@,$sharedstatedir,;t t
18375 s,@localstatedir@,$localstatedir,;t t
18376 s,@libdir@,$libdir,;t t
18377 s,@includedir@,$includedir,;t t
18378 s,@oldincludedir@,$oldincludedir,;t t
18379 s,@infodir@,$infodir,;t t
18380 s,@mandir@,$mandir,;t t
18381 s,@build_alias@,$build_alias,;t t
18382 s,@host_alias@,$host_alias,;t t
18383 s,@target_alias@,$target_alias,;t t
18384 s,@DEFS@,$DEFS,;t t
18385 s,@ECHO_C@,$ECHO_C,;t t
18386 s,@ECHO_N@,$ECHO_N,;t t
18387 s,@ECHO_T@,$ECHO_T,;t t
18388 s,@LIBS@,$LIBS,;t t
18389 s,@build@,$build,;t t
18390 s,@build_cpu@,$build_cpu,;t t
18391 s,@build_vendor@,$build_vendor,;t t
18392 s,@build_os@,$build_os,;t t
18393 s,@host@,$host,;t t
18394 s,@host_cpu@,$host_cpu,;t t
18395 s,@host_vendor@,$host_vendor,;t t
18396 s,@host_os@,$host_os,;t t
18397 s,@CC@,$CC,;t t
18398 s,@CFLAGS@,$CFLAGS,;t t
18399 s,@LDFLAGS@,$LDFLAGS,;t t
18400 s,@CPPFLAGS@,$CPPFLAGS,;t t
18401 s,@ac_ct_CC@,$ac_ct_CC,;t t
18402 s,@EXEEXT@,$EXEEXT,;t t
18403 s,@OBJEXT@,$OBJEXT,;t t
18404 s,@CPP@,$CPP,;t t
18405 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18406 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18407 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18408 s,@SET_MAKE@,$SET_MAKE,;t t
18409 s,@PERL@,$PERL,;t t
18410 s,@X_CFLAGS@,$X_CFLAGS,;t t
18411 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
18412 s,@X_LIBS@,$X_LIBS,;t t
18413 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
18414 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
18415 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
18416 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
18417 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
18418 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
18419 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
18420 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
18421 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
18422 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
18423 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
18424 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
18425 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
18426 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
18427 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
18428 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
18429 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
18430 s,@RANLIB@,$RANLIB,;t t
18431 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18432 s,@ALLOCA@,$ALLOCA,;t t
18433 s,@USE_NLS@,$USE_NLS,;t t
18434 s,@MSGFMT@,$MSGFMT,;t t
18435 s,@GMSGFMT@,$GMSGFMT,;t t
18436 s,@XGETTEXT@,$XGETTEXT,;t t
18437 s,@CATALOGS@,$CATALOGS,;t t
18438 s,@CATOBJEXT@,$CATOBJEXT,;t t
18439 s,@DATADIRNAME@,$DATADIRNAME,;t t
18440 s,@GMOFILES@,$GMOFILES,;t t
18441 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
18442 s,@INTLDEPS@,$INTLDEPS,;t t
18443 s,@INTLLIBS@,$INTLLIBS,;t t
18444 s,@INTLOBJS@,$INTLOBJS,;t t
18445 s,@POFILES@,$POFILES,;t t
18446 s,@POSUB@,$POSUB,;t t
18447 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
18448 s,@pkg_config@,$pkg_config,;t t
18449 s,@glib_config@,$glib_config,;t t
18450 s,@gtk_config@,$gtk_config,;t t
18451 s,@gnome_config@,$gnome_config,;t t
18452 s,@have_gnome_help@,$have_gnome_help,;t t
18453 s,@xml_config@,$xml_config,;t t
18454 s,@gdk_pixbuf_config@,$gdk_pixbuf_config,;t t
18455 s,@fortune_tmp@,$fortune_tmp,;t t
18456 s,@INCLUDES@,$INCLUDES,;t t
18457 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
18458 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
18459 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
18460 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
18461 s,@GTK_LIBS@,$GTK_LIBS,;t t
18462 s,@XML_LIBS@,$XML_LIBS,;t t
18463 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
18464 s,@HACK_LIBS@,$HACK_LIBS,;t t
18465 s,@XPM_LIBS@,$XPM_LIBS,;t t
18466 s,@GL_LIBS@,$GL_LIBS,;t t
18467 s,@GLE_LIBS@,$GLE_LIBS,;t t
18468 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
18469 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
18470 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
18471 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
18472 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
18473 s,@NEED_SETUID@,$NEED_SETUID,;t t
18474 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
18475 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
18476 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
18477 s,@XMU_SRCS@,$XMU_SRCS,;t t
18478 s,@XMU_OBJS@,$XMU_OBJS,;t t
18479 s,@XMU_LIBS@,$XMU_LIBS,;t t
18480 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
18481 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
18482 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
18483 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
18484 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
18485 s,@JPEG_EXES@,$JPEG_EXES,;t t
18486 s,@GL_EXES@,$GL_EXES,;t t
18487 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
18488 s,@GL_MEN@,$GL_MEN,;t t
18489 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
18490 s,@GLE_EXES@,$GLE_EXES,;t t
18491 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
18492 s,@GNOMEHELP_Y@,$GNOMEHELP_Y,;t t
18493 s,@GNOMEHELP_N@,$GNOMEHELP_N,;t t
18494 s,@HACKDIR@,$HACKDIR,;t t
18495 s,@GNOME_DATADIR@,$GNOME_DATADIR,;t t
18496 s,@GLADE_DATADIR@,$GLADE_DATADIR,;t t
18497 s,@PO_DATADIR@,$PO_DATADIR,;t t
18498 s,@GNOME_PANELDIR@,$GNOME_PANELDIR,;t t
18499 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
18500 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
18501 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
18502 s,@DEPEND@,$DEPEND,;t t
18503 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
18504 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
18505 CEOF
18506
18507 _ACEOF
18508
18509   cat >>$CONFIG_STATUS <<\_ACEOF
18510   # Split the substitutions into bite-sized pieces for seds with
18511   # small command number limits, like on Digital OSF/1 and HP-UX.
18512   ac_max_sed_lines=48
18513   ac_sed_frag=1 # Number of current file.
18514   ac_beg=1 # First line for current file.
18515   ac_end=$ac_max_sed_lines # Line after last line for current file.
18516   ac_more_lines=:
18517   ac_sed_cmds=
18518   while $ac_more_lines; do
18519     if test $ac_beg -gt 1; then
18520       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18521     else
18522       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18523     fi
18524     if test ! -s $tmp/subs.frag; then
18525       ac_more_lines=false
18526     else
18527       # The purpose of the label and of the branching condition is to
18528       # speed up the sed processing (if there are no `@' at all, there
18529       # is no need to browse any of the substitutions).
18530       # These are the two extra sed commands mentioned above.
18531       (echo ':t
18532   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18533       if test -z "$ac_sed_cmds"; then
18534         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18535       else
18536         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18537       fi
18538       ac_sed_frag=`expr $ac_sed_frag + 1`
18539       ac_beg=$ac_end
18540       ac_end=`expr $ac_end + $ac_max_sed_lines`
18541     fi
18542   done
18543   if test -z "$ac_sed_cmds"; then
18544     ac_sed_cmds=cat
18545   fi
18546 fi # test -n "$CONFIG_FILES"
18547
18548 _ACEOF
18549 cat >>$CONFIG_STATUS <<\_ACEOF
18550 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18551   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18552   case $ac_file in
18553   - | *:- | *:-:* ) # input from stdin
18554         cat >$tmp/stdin
18555         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18556         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18557   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18558         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18559   * )   ac_file_in=$ac_file.in ;;
18560   esac
18561
18562   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18563   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18564 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18565          X"$ac_file" : 'X\(//\)[^/]' \| \
18566          X"$ac_file" : 'X\(//\)$' \| \
18567          X"$ac_file" : 'X\(/\)' \| \
18568          .     : '\(.\)' 2>/dev/null ||
18569 echo X"$ac_file" |
18570     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18571           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18572           /^X\(\/\/\)$/{ s//\1/; q; }
18573           /^X\(\/\).*/{ s//\1/; q; }
18574           s/.*/./; q'`
18575   { case "$ac_dir" in
18576   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18577   *)                      as_incr_dir=.;;
18578 esac
18579 as_dummy="$ac_dir"
18580 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18581   case $as_mkdir_dir in
18582     # Skip DOS drivespec
18583     ?:) as_incr_dir=$as_mkdir_dir ;;
18584     *)
18585       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18586       test -d "$as_incr_dir" ||
18587         mkdir "$as_incr_dir" ||
18588         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18589 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18590    { (exit 1); exit 1; }; }
18591     ;;
18592   esac
18593 done; }
18594
18595   ac_builddir=.
18596
18597 if test "$ac_dir" != .; then
18598   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18599   # A "../" for each directory in $ac_dir_suffix.
18600   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18601 else
18602   ac_dir_suffix= ac_top_builddir=
18603 fi
18604
18605 case $srcdir in
18606   .)  # No --srcdir option.  We are building in place.
18607     ac_srcdir=.
18608     if test -z "$ac_top_builddir"; then
18609        ac_top_srcdir=.
18610     else
18611        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18612     fi ;;
18613   [\\/]* | ?:[\\/]* )  # Absolute path.
18614     ac_srcdir=$srcdir$ac_dir_suffix;
18615     ac_top_srcdir=$srcdir ;;
18616   *) # Relative path.
18617     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18618     ac_top_srcdir=$ac_top_builddir$srcdir ;;
18619 esac
18620 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18621 # absolute.
18622 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
18623 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
18624 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18625 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18626
18627
18628   case $INSTALL in
18629   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18630   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18631   esac
18632
18633   if test x"$ac_file" != x-; then
18634     { echo "$as_me:$LINENO: creating $ac_file" >&5
18635 echo "$as_me: creating $ac_file" >&6;}
18636     rm -f "$ac_file"
18637   fi
18638   # Let's still pretend it is `configure' which instantiates (i.e., don't
18639   # use $as_me), people would be surprised to read:
18640   #    /* config.h.  Generated by config.status.  */
18641   if test x"$ac_file" = x-; then
18642     configure_input=
18643   else
18644     configure_input="$ac_file.  "
18645   fi
18646   configure_input=$configure_input"Generated from `echo $ac_file_in |
18647                                      sed 's,.*/,,'` by configure."
18648
18649   # First look for the input files in the build tree, otherwise in the
18650   # src tree.
18651   ac_file_inputs=`IFS=:
18652     for f in $ac_file_in; do
18653       case $f in
18654       -) echo $tmp/stdin ;;
18655       [\\/$]*)
18656          # Absolute (can't be DOS-style, as IFS=:)
18657          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18658 echo "$as_me: error: cannot find input file: $f" >&2;}
18659    { (exit 1); exit 1; }; }
18660          echo $f;;
18661       *) # Relative
18662          if test -f "$f"; then
18663            # Build tree
18664            echo $f
18665          elif test -f "$srcdir/$f"; then
18666            # Source tree
18667            echo $srcdir/$f
18668          else
18669            # /dev/null tree
18670            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18671 echo "$as_me: error: cannot find input file: $f" >&2;}
18672    { (exit 1); exit 1; }; }
18673          fi;;
18674       esac
18675     done` || { (exit 1); exit 1; }
18676 _ACEOF
18677 cat >>$CONFIG_STATUS <<_ACEOF
18678   sed "$ac_vpsub
18679 $extrasub
18680 _ACEOF
18681 cat >>$CONFIG_STATUS <<\_ACEOF
18682 :t
18683 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18684 s,@configure_input@,$configure_input,;t t
18685 s,@srcdir@,$ac_srcdir,;t t
18686 s,@abs_srcdir@,$ac_abs_srcdir,;t t
18687 s,@top_srcdir@,$ac_top_srcdir,;t t
18688 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18689 s,@builddir@,$ac_builddir,;t t
18690 s,@abs_builddir@,$ac_abs_builddir,;t t
18691 s,@top_builddir@,$ac_top_builddir,;t t
18692 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18693 s,@INSTALL@,$ac_INSTALL,;t t
18694 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18695   rm -f $tmp/stdin
18696   if test x"$ac_file" != x-; then
18697     mv $tmp/out $ac_file
18698   else
18699     cat $tmp/out
18700     rm -f $tmp/out
18701   fi
18702
18703 done
18704 _ACEOF
18705 cat >>$CONFIG_STATUS <<\_ACEOF
18706
18707 #
18708 # CONFIG_HEADER section.
18709 #
18710
18711 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18712 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18713 #
18714 # ac_d sets the value in "#define NAME VALUE" lines.
18715 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18716 ac_dB='[        ].*$,\1#\2'
18717 ac_dC=' '
18718 ac_dD=',;t'
18719 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18720 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18721 ac_uB='$,\1#\2define\3'
18722 ac_uC=' '
18723 ac_uD=',;t'
18724
18725 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18726   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18727   case $ac_file in
18728   - | *:- | *:-:* ) # input from stdin
18729         cat >$tmp/stdin
18730         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18731         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18732   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18733         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18734   * )   ac_file_in=$ac_file.in ;;
18735   esac
18736
18737   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18738 echo "$as_me: creating $ac_file" >&6;}
18739
18740   # First look for the input files in the build tree, otherwise in the
18741   # src tree.
18742   ac_file_inputs=`IFS=:
18743     for f in $ac_file_in; do
18744       case $f in
18745       -) echo $tmp/stdin ;;
18746       [\\/$]*)
18747          # Absolute (can't be DOS-style, as IFS=:)
18748          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18749 echo "$as_me: error: cannot find input file: $f" >&2;}
18750    { (exit 1); exit 1; }; }
18751          echo $f;;
18752       *) # Relative
18753          if test -f "$f"; then
18754            # Build tree
18755            echo $f
18756          elif test -f "$srcdir/$f"; then
18757            # Source tree
18758            echo $srcdir/$f
18759          else
18760            # /dev/null tree
18761            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18762 echo "$as_me: error: cannot find input file: $f" >&2;}
18763    { (exit 1); exit 1; }; }
18764          fi;;
18765       esac
18766     done` || { (exit 1); exit 1; }
18767   # Remove the trailing spaces.
18768   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18769
18770 _ACEOF
18771
18772 # Transform confdefs.h into two sed scripts, `conftest.defines' and
18773 # `conftest.undefs', that substitutes the proper values into
18774 # config.h.in to produce config.h.  The first handles `#define'
18775 # templates, and the second `#undef' templates.
18776 # And first: Protect against being on the right side of a sed subst in
18777 # config.status.  Protect against being in an unquoted here document
18778 # in config.status.
18779 rm -f conftest.defines conftest.undefs
18780 # Using a here document instead of a string reduces the quoting nightmare.
18781 # Putting comments in sed scripts is not portable.
18782 #
18783 # `end' is used to avoid that the second main sed command (meant for
18784 # 0-ary CPP macros) applies to n-ary macro definitions.
18785 # See the Autoconf documentation for `clear'.
18786 cat >confdef2sed.sed <<\_ACEOF
18787 s/[\\&,]/\\&/g
18788 s,[\\$`],\\&,g
18789 t clear
18790 : clear
18791 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18792 t end
18793 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18794 : end
18795 _ACEOF
18796 # If some macros were called several times there might be several times
18797 # the same #defines, which is useless.  Nevertheless, we may not want to
18798 # sort them, since we want the *last* AC-DEFINE to be honored.
18799 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18800 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18801 rm -f confdef2sed.sed
18802
18803 # This sed command replaces #undef with comments.  This is necessary, for
18804 # example, in the case of _POSIX_SOURCE, which is predefined and required
18805 # on some systems where configure will not decide to define it.
18806 cat >>conftest.undefs <<\_ACEOF
18807 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18808 _ACEOF
18809
18810 # Break up conftest.defines because some shells have a limit on the size
18811 # of here documents, and old seds have small limits too (100 cmds).
18812 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
18813 echo '  if egrep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
18814 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18815 echo '  :' >>$CONFIG_STATUS
18816 rm -f conftest.tail
18817 while grep . conftest.defines >/dev/null
18818 do
18819   # Write a limited-size here document to $tmp/defines.sed.
18820   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18821   # Speed up: don't consider the non `#define' lines.
18822   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
18823   # Work around the forget-to-reset-the-flag bug.
18824   echo 't clr' >>$CONFIG_STATUS
18825   echo ': clr' >>$CONFIG_STATUS
18826   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
18827   echo 'CEOF
18828   sed -f $tmp/defines.sed $tmp/in >$tmp/out
18829   rm -f $tmp/in
18830   mv $tmp/out $tmp/in
18831 ' >>$CONFIG_STATUS
18832   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18833   rm -f conftest.defines
18834   mv conftest.tail conftest.defines
18835 done
18836 rm -f conftest.defines
18837 echo '  fi # egrep' >>$CONFIG_STATUS
18838 echo >>$CONFIG_STATUS
18839
18840 # Break up conftest.undefs because some shells have a limit on the size
18841 # of here documents, and old seds have small limits too (100 cmds).
18842 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
18843 rm -f conftest.tail
18844 while grep . conftest.undefs >/dev/null
18845 do
18846   # Write a limited-size here document to $tmp/undefs.sed.
18847   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18848   # Speed up: don't consider the non `#undef'
18849   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
18850   # Work around the forget-to-reset-the-flag bug.
18851   echo 't clr' >>$CONFIG_STATUS
18852   echo ': clr' >>$CONFIG_STATUS
18853   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18854   echo 'CEOF
18855   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18856   rm -f $tmp/in
18857   mv $tmp/out $tmp/in
18858 ' >>$CONFIG_STATUS
18859   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18860   rm -f conftest.undefs
18861   mv conftest.tail conftest.undefs
18862 done
18863 rm -f conftest.undefs
18864
18865 cat >>$CONFIG_STATUS <<\_ACEOF
18866   # Let's still pretend it is `configure' which instantiates (i.e., don't
18867   # use $as_me), people would be surprised to read:
18868   #    /* config.h.  Generated by config.status.  */
18869   if test x"$ac_file" = x-; then
18870     echo "/* Generated by configure.  */" >$tmp/config.h
18871   else
18872     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
18873   fi
18874   cat $tmp/in >>$tmp/config.h
18875   rm -f $tmp/in
18876   if test x"$ac_file" != x-; then
18877     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18878       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18879 echo "$as_me: $ac_file is unchanged" >&6;}
18880     else
18881       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18882 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18883          X"$ac_file" : 'X\(//\)[^/]' \| \
18884          X"$ac_file" : 'X\(//\)$' \| \
18885          X"$ac_file" : 'X\(/\)' \| \
18886          .     : '\(.\)' 2>/dev/null ||
18887 echo X"$ac_file" |
18888     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18889           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18890           /^X\(\/\/\)$/{ s//\1/; q; }
18891           /^X\(\/\).*/{ s//\1/; q; }
18892           s/.*/./; q'`
18893       { case "$ac_dir" in
18894   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18895   *)                      as_incr_dir=.;;
18896 esac
18897 as_dummy="$ac_dir"
18898 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18899   case $as_mkdir_dir in
18900     # Skip DOS drivespec
18901     ?:) as_incr_dir=$as_mkdir_dir ;;
18902     *)
18903       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18904       test -d "$as_incr_dir" ||
18905         mkdir "$as_incr_dir" ||
18906         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18907 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18908    { (exit 1); exit 1; }; }
18909     ;;
18910   esac
18911 done; }
18912
18913       rm -f $ac_file
18914       mv $tmp/config.h $ac_file
18915     fi
18916   else
18917     cat $tmp/config.h
18918     rm -f $tmp/config.h
18919   fi
18920 done
18921 _ACEOF
18922 cat >>$CONFIG_STATUS <<\_ACEOF
18923
18924 #
18925 # CONFIG_COMMANDS section.
18926 #
18927 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18928   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18929   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18930   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
18931 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18932          X"$ac_dest" : 'X\(//\)[^/]' \| \
18933          X"$ac_dest" : 'X\(//\)$' \| \
18934          X"$ac_dest" : 'X\(/\)' \| \
18935          .     : '\(.\)' 2>/dev/null ||
18936 echo X"$ac_dest" |
18937     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18938           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18939           /^X\(\/\/\)$/{ s//\1/; q; }
18940           /^X\(\/\).*/{ s//\1/; q; }
18941           s/.*/./; q'`
18942   ac_builddir=.
18943
18944 if test "$ac_dir" != .; then
18945   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18946   # A "../" for each directory in $ac_dir_suffix.
18947   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18948 else
18949   ac_dir_suffix= ac_top_builddir=
18950 fi
18951
18952 case $srcdir in
18953   .)  # No --srcdir option.  We are building in place.
18954     ac_srcdir=.
18955     if test -z "$ac_top_builddir"; then
18956        ac_top_srcdir=.
18957     else
18958        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18959     fi ;;
18960   [\\/]* | ?:[\\/]* )  # Absolute path.
18961     ac_srcdir=$srcdir$ac_dir_suffix;
18962     ac_top_srcdir=$srcdir ;;
18963   *) # Relative path.
18964     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18965     ac_top_srcdir=$ac_top_builddir$srcdir ;;
18966 esac
18967 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18968 # absolute.
18969 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
18970 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
18971 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18972 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18973
18974
18975   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
18976 echo "$as_me: executing $ac_dest commands" >&6;}
18977   case $ac_dest in
18978     default-1 )
18979
18980 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
18981 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
18982   rm -f intltool-extract.out
18983 else
18984   mv -f intltool-extract.out intltool-extract
18985 fi
18986 chmod ugo+x intltool-extract
18987 chmod u+w intltool-extract
18988
18989 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
18990 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
18991   rm -f intltool-merge.out
18992 else
18993   mv -f intltool-merge.out intltool-merge
18994 fi
18995 chmod ugo+x intltool-merge
18996 chmod u+w intltool-merge
18997
18998 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
18999 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
19000   rm -f intltool-update.out
19001 else
19002   mv -f intltool-update.out intltool-update
19003 fi
19004 chmod ugo+x intltool-update
19005 chmod u+w intltool-update
19006
19007  ;;
19008     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
19009         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
19010       esac ;;
19011   esac
19012 done
19013 _ACEOF
19014
19015 cat >>$CONFIG_STATUS <<\_ACEOF
19016
19017 { (exit 0); exit 0; }
19018 _ACEOF
19019 chmod +x $CONFIG_STATUS
19020 ac_clean_files=$ac_clean_files_save
19021
19022
19023 # configure is writing to config.log, and then calls config.status.
19024 # config.status does its own redirection, appending to config.log.
19025 # Unfortunately, on DOS this fails, as config.log is still kept open
19026 # by configure, so config.status won't be able to write to it; its
19027 # output is simply discarded.  So we exec the FD to /dev/null,
19028 # effectively closing config.log, so it can be properly (re)opened and
19029 # appended to by config.status.  When coming back to configure, we
19030 # need to make the FD available again.
19031 if test "$no_create" != yes; then
19032   ac_cs_success=:
19033   exec 5>/dev/null
19034   $SHELL $CONFIG_STATUS || ac_cs_success=false
19035   exec 5>>config.log
19036   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19037   # would make configure fail if this is the last instruction.
19038   $ac_cs_success || { (exit 1); exit 1; }
19039 fi
19040
19041
19042 ###############################################################################
19043 #
19044 #       Print some warnings at the end.
19045 #
19046 ###############################################################################
19047
19048 warn_prefix_1="    Warning:"
19049 warn_prefix_2="       Note:"
19050 warn_prefix="$warn_prefix_1"
19051
19052 warning=no
19053 warnsep='    #################################################################'
19054
19055 warnpre() {
19056   if test "$warning" = no ; then
19057     echo '' ; echo "$warnsep" ; echo ''
19058     warning=yes
19059   fi
19060 }
19061
19062 warn() {
19063   warnpre
19064   if test "$warning" = long ; then echo '' ; fi
19065   warning=yes
19066   rest="$@"
19067   echo "$warn_prefix $rest"
19068 }
19069
19070 warnL() {
19071   was=$warning
19072   warnpre
19073   warning=yes
19074   if test "$was" != no ; then echo '' ; fi
19075   rest="$@"
19076   echo "$warn_prefix $rest"
19077 }
19078
19079 warn2() {
19080   rest="$@"
19081   echo "             $rest"
19082   warning=long
19083 }
19084
19085 note() {
19086   warn_prefix="$warn_prefix_2"
19087   warn $@
19088   warn_prefix="$warn_prefix_1"
19089 }
19090
19091 noteL() {
19092   warn_prefix="$warn_prefix_2"
19093   warnL $@
19094   warn_prefix="$warn_prefix_1"
19095 }
19096
19097
19098 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
19099   warn 'The SGI saver extension was requested, but was not found.'
19100 fi
19101
19102 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
19103   warn 'The MIT saver extension was requested, but was not found.'
19104 fi
19105
19106 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
19107   warn 'The XIdle extension was requested, but was not found.'
19108 fi
19109
19110 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
19111   warn 'The XSHM extension was requested, but was not found.'
19112 fi
19113
19114 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
19115   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
19116 fi
19117
19118 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
19119   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
19120 fi
19121
19122 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
19123   warn 'The DPMS extension was requested, but was not found.'
19124 fi
19125
19126 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
19127   warn 'The Xinerama extension was requested, but was not found.'
19128 fi
19129
19130 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
19131   warn 'The XF86VMODE extension was requested, but was not found.'
19132 fi
19133
19134 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
19135   warn "Checking of /proc/interrupts was requested, but it's bogus."
19136 fi
19137
19138
19139 if test "$have_motif" = no -a "$have_gtk" = no; then
19140   warnL "Neither Motif nor Gtk seem to be available;"
19141   warn2 "the \`xscreensaver-demo' program requires one of these."
19142
19143 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
19144   warnL "Use of Motif was requested, but it wasn't found;"
19145   warn2 "Gtk will be used instead."
19146
19147 elif test "$jurassic_gtk" = yes ; then
19148
19149   pref_gtk=1.2
19150
19151   v="$ac_gtk_version_string"
19152   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
19153     warnL "Use of Gtk was requested, but its version number is unknown;"
19154   elif test "$with_gtk_req" = yes ; then
19155     warnL "Use of Gtk was requested, but it is version $v;"
19156   else
19157     warnL "Gtk was found on this system, but it is version $v;"
19158   fi
19159
19160   warn2 "Gtk $pref_gtk or newer is required.  Motif will be used instead."
19161
19162 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
19163   warnL "Use of Gtk was requested, but it wasn't found."
19164   if test "$have_motif" = yes; then
19165     warn2 "Motif will be used instead."
19166   fi
19167 fi
19168
19169 if test "$gtk2_halfassed" != no ; then
19170   warnL "GTK version $gtk2_halfassed was found, but at least one supporting"
19171   warn2 "library ($gtk2_halfassed_lib) was not, so GTK 2.x can't be used."
19172   v="$ac_gtk_version_string"
19173   warn2 "GTK $v is also installed, so it will be used instead."
19174   warn2 "Please read the above output and the \`config.log' file"
19175   warn2 "for more details."
19176 fi
19177
19178
19179 if test "$with_gnome_req" = yes -a "$have_gnome" = no ; then
19180   warn  'Use of the Gnome Control Panel was requested, but the necessary'
19181   warn2 'headers and/or libraries were not found.'
19182 fi
19183
19184 if test "$have_gtk" = yes ; then
19185   if test "$have_xml" = no ; then
19186     if test "$with_xml_req" = yes ; then
19187       warn  'Use of the XML library was requested, but the necessary'
19188       warn2 'headers and/or libraries were not found.'
19189     else
19190       warn  'GTK is being used, but the XML library was not found.'
19191     fi
19192
19193     if test "$xml_halfassed" = yes ; then
19194
19195       if test "$have_zlib" = yes ; then
19196         which="XML libraries"
19197       else
19198         which="\`zlib' library"
19199       fi
19200
19201       echo ''
19202       warn2 'More specifically, we found the headers, but not the'
19203       warn2 "$which; so either XML is half-installed on this"
19204       warn2 "system, or something else went wrong.  The \`config.log'"
19205       warn2 'file might contain some clues.'
19206     fi
19207
19208     echo ''
19209     warn2 "Without XML, the per-display-mode \`Settings' dialogs"
19210     warn2 'will not be available.  Specify the location of the XML'
19211     warn2 'library through the --with-xml option to configure.'
19212   fi
19213 fi
19214
19215 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
19216   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
19217   warn2 "headers were not found.  That can't be good.  Please"
19218   warn2 "install the GDK-Pixbuf development kit and re-configure."
19219 fi
19220
19221 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
19222
19223   preferred_lesstif=0.92
19224
19225   if test "$lesstif_version" = unknown; then
19226     warnL "Unable to determine the LessTif version number!"
19227     warn2 "Make sure you are using version $preferred_lesstif or newer."
19228     warn2 "See <http://www.lesstif.org/>."
19229
19230   elif test \! $lesstif_version -gt 82; then
19231     warnL "LessTif version $lesstif_version_string is being used."
19232     warn2 "LessTif versions 0.82 and earlier are too buggy to"
19233     warn2 "use with XScreenSaver; it is strongly recommended"
19234     warn2 "that you upgrade to at least version $preferred_lesstif!"
19235     warn2 "See <http://www.lesstif.org/>."
19236   fi
19237 fi
19238
19239
19240 if test "$have_motif" = yes -a "$have_gtk" = no ; then
19241   warn  'Motif is being used, and GTK is not.'
19242   echo  ''
19243   warn2 'Though the Motif front-end to xscreensaver is still'
19244   warn2 'maintained, it is no longer being updated with new'
19245   warn2 'features: all new development on the xscreensaver-demo'
19246   warn2 'program is happening in the GTK version, and not in the'
19247   warn2 'Motif version.  It is recommended that you build against'
19248   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
19249 fi
19250
19251
19252 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
19253   warnL 'Use of XPM was requested, but it was not found.'
19254 fi
19255
19256 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
19257   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
19258 fi
19259
19260 if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \
19261    test "$gdk_pixbuf_halfassed" = yes; then
19262
19263   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
19264     true
19265   elif test "$with_xpm_req" = no ; then
19266     warnL 'The XPM library is not being used.'
19267   else
19268     warnL 'The XPM library was not found.'
19269   fi
19270
19271   if test "$with_gdk_pixbuf_req" = yes ; then
19272     true
19273   elif test "$with_gdk_pixbuf_req" = no ; then
19274     warnL 'The GDK-Pixbuf library is not being used.'
19275   else
19276     warnL 'The GDK-Pixbuf library was not found.'
19277   fi
19278
19279   if test "$gdk_pixbuf_halfassed" = yes ; then
19280     echo ''
19281     warn2 'More specifically, we found the headers, but not the'
19282     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
19283     warn2 "system, or something else went wrong.  The \`config.log'"
19284     warn2 'file might contain some clues.'
19285   fi
19286
19287   echo ''
19288   warn2 'Some of the demos will not be as colorful as they'
19289   warn2 'could be.  You should consider installing Pixbuf or'
19290   warn2 'XPM and re-running configure.  The Pixbuf library is'
19291   warn2 'a part of GNOME.  The XPM library comes with most'
19292   warn2 'X11 installations; you can also find it at the X11'
19293   warn2 'archive sites, such as <http://sunsite.unc.edu/>.'
19294   echo  ''
19295   warn2 'GDK-Pixbuf is recommended over XPM, as it provides'
19296   warn2 'support for more image formats.'
19297 fi
19298
19299
19300 if test "$have_jpeg" = no ; then
19301   if test "$with_jpeg_req" = yes ; then
19302     warnL 'Use of libjpeg was requested, but it was not found.'
19303   elif test "$with_jpeg_req" = no ; then
19304     noteL 'The JPEG library is not being used.'
19305   else
19306     noteL 'The JPEG library was not found.'
19307   fi
19308
19309   if test "$jpeg_halfassed" = yes ; then
19310     echo ''
19311     warn2 'More specifically, we found the headers, but not the'
19312     warn2 'library; so either JPEG is half-installed on this'
19313     warn2 "system, or something else went wrong.  The \`config.log'"
19314     warn2 'file might contain some clues.'
19315     echo ''
19316   fi
19317
19318   warn2 "This means the \`webcollage' program will be much slower."
19319 fi
19320
19321
19322 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
19323   preferred_mesagl=3.4
19324   mgv="$ac_mesagl_version_string"
19325   pgl="$preferred_mesagl"
19326
19327   if test "$ac_mesagl_version" = unknown; then
19328     warnL "Unable to determine the MesaGL version number!"
19329     warn2 "Make sure you are using version $preferred_mesagl or newer."
19330
19331   elif test \! "$ac_mesagl_version" -gt 2006; then
19332     warnL "MesaGL version number is $mgv --"
19333     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
19334     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
19335
19336   elif test \! "$ac_mesagl_version" -gt 3003; then
19337     warnL "MesaGL version number is $mgv --"
19338     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
19339     warn2 "that you upgrade to $pgl or newer."
19340   fi
19341 fi
19342
19343 if test "$have_gl" = no ; then
19344   if test "$with_gl_req" = yes ; then
19345     warnL 'Use of GL was requested, but it was not found.'
19346   elif test "$with_gl_req" = no ; then
19347     noteL 'The OpenGL 3D library is not being used.'
19348   else
19349     noteL 'The OpenGL 3D library was not found.'
19350   fi
19351
19352   if test "$gl_halfassed" = yes ; then
19353     echo ''
19354     warn2 'More specifically, we found the headers, but not the'
19355     warn2 'libraries; so either GL is half-installed on this'
19356     warn2 "system, or something else went wrong.  The \`config.log'"
19357     warn2 'file might contain some clues.'
19358   fi
19359
19360   echo ''
19361   warn2 'Those demos which use 3D will not be built or installed.'
19362   warn2 'You might want to consider installing OpenGL and'
19363   warn2 "re-running configure.  If your vendor doesn't ship"
19364   warn2 'their own implementation of OpenGL, you can get a free'
19365   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
19366   warn2 'info, see <http://www.opengl.org/>.'
19367
19368 fi
19369
19370
19371 if test "$have_gl" = yes -a "$have_gle" = no ; then
19372
19373  # nobody cares about this; don't print the warning unless it was
19374  # requested and not found, or halfway-found.
19375  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
19376
19377   if test "$with_gle_req" = yes ; then
19378     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
19379     warn2 'it was not found (though the OpenGL library was found, and'
19380     warn2 'is being used.)'
19381   elif test "$with_gle_req" = no ; then
19382     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
19383     warn2 'library is not.'
19384   else
19385     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
19386     warn2 'was not.'
19387   fi
19388
19389   if test "$gle_halfassed" = yes ; then
19390     echo ''
19391     warn2 'More specifically, we found the headers, but not the'
19392     warn2 'libraries; so either GLE is half-installed on this'
19393     warn2 "system, or something else went wrong.  The \`config.log'"
19394     warn2 'file might contain some clues.'
19395   fi
19396
19397   echo ''
19398   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
19399   warn2 'will not be built or installed.  You might want to consider'
19400   warn2 'installing GLE and re-running configure.  You can find the'
19401   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
19402   warn2 'OpenGL info, see <http://www.opengl.org/>.'
19403
19404  fi
19405 fi
19406
19407
19408 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
19409   warn 'Use of XReadDisplay was requested, but it was not found.'
19410 fi
19411
19412 if test -n "$with_fortune_req"; then
19413   if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
19414     warnL "$with_fortune_req was requested as the Fortune program,"
19415     warn2 "but was not found.  The default will be used instead."
19416   fi
19417 fi
19418
19419 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
19420   warn 'Use of Kerberos was requested, but it was not found.'
19421 fi
19422
19423 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
19424   warn 'Use of PAM was requested, but it was not found.'
19425 fi
19426
19427 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
19428   warn 'Use of shadow passwords was requested, but they were not found.'
19429 fi
19430
19431
19432 # You are in a twisty maze of namespaces and syntaxes, all alike.
19433 # Fuck the skull of Unix.
19434 #
19435 eval bindir=${bindir}
19436 eval bindir=${bindir}
19437 eval bindir=${bindir}
19438 eval bindir=${bindir}
19439 eval bindir=${bindir}
19440 eval bindir=${bindir}
19441 eval HACKDIR=${HACKDIR}
19442 eval HACKDIR=${HACKDIR}
19443 eval HACKDIR=${HACKDIR}
19444 eval HACKDIR=${HACKDIR}
19445 eval HACKDIR=${HACKDIR}
19446 eval HACKDIR=${HACKDIR}
19447 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19448 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19449 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19450 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19451 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19452 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19453
19454 # canonicalize slashes.
19455 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
19456 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
19457 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
19458
19459
19460 # Sanity check the hackdir
19461 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
19462   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
19463     echo ""
19464     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
19465                    There will be an executable installed with that name, so
19466                    that can't be the name of a directory as well.  Please
19467                    re-configure with a different directory name." >&5
19468 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
19469                    There will be an executable installed with that name, so
19470                    that can't be the name of a directory as well.  Please
19471                    re-configure with a different directory name." >&2;}
19472    { (exit 1); exit 1; }; }
19473   fi
19474 done
19475
19476
19477 do_dir_warning=no
19478
19479 # Now let's see if there's a previous RPM version already installed.  Blargh!
19480
19481 # M4 sucks!!
19482
19483 rpmv=`(rpm -qv xscreensaver) 2>/dev/null | \
19484       sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
19485
19486
19487 if test \! -z "$rpmv" ; then
19488   rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
19489   rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
19490
19491   warning=no
19492   warnL "There is already an installed RPM of xscreensaver $rpmv"
19493   warn2 "on this system.  You might want to remove it (with"
19494   warn2 '"rpm -ve xscreensaver") before running "make install"'
19495   warn2 "from this directory."
19496   echo ""
19497   warn2 "Alternately, you could build this version of xscreensaver"
19498   warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
19499   warn2 "file is included.  See the RPM documentation for more info."
19500   echo ""
19501
19502   if test "$rpmbdir" = "$rpmhdir" ; then
19503     warn2 "The RPM version was installed in $rpmbdir/."
19504   else
19505     warn2 "The RPM version was installed in $rpmbdir/,"
19506     warn2 "with demos in $rpmhdir/."
19507   fi
19508
19509   do_dir_warning=yes
19510 fi
19511
19512
19513 if test "${bindir}" = "${HACKDIR}" ; then
19514   do_dir_warning=yes
19515 fi
19516
19517 if test "$do_dir_warning" = yes; then
19518   echo ""
19519   echo "$warnsep"
19520   echo ""
19521   echo '      When you run "make install", the "xscreensaver",'
19522   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
19523   echo "      will be installed in ${bindir}/."
19524   echo ""
19525   echo "      The various graphics demos (150+ different executables) will"
19526   echo "      be installed in ${HACKDIR}/."
19527   echo ""
19528   echo "      If you would prefer the demos to be installed elsewhere,"
19529   echo "      you should re-run configure with the --with-hackdir=DIR"
19530   echo "      option.  For more information, run \`./configure --help'."
19531   warning=yes
19532 fi
19533
19534 if test "$warning" != no; then
19535   echo '' ; echo "$warnsep" ; echo ''
19536 fi
19537
19538 if test "$do_dir_warning" = no; then
19539   if test "$warning" = no; then
19540     echo ''
19541   fi
19542   echo "User programs will be installed in ${bindir}/"
19543   echo "Screen savers will be installed in ${HACKDIR}/"
19544   echo "Configuration will be installed in ${HACK_CONF_DIR}/"
19545   echo ''
19546 fi