d9ba45ce9e42fb3690fd2f6a92b9a398573221f8
[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 create directory trees.
1321 #
1322 ###############################################################################
1323
1324
1325
1326
1327 ###############################################################################
1328 #
1329 #       Function to check whether gettimeofday() exists, and how to call it.
1330 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1331 #
1332 ###############################################################################
1333
1334
1335
1336
1337 ###############################################################################
1338 #
1339 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1340 #
1341 ###############################################################################
1342
1343 # M4 sucks!!  perl sucks too!!
1344
1345 perl_version_cmd='print $]'
1346
1347
1348
1349
1350
1351 ###############################################################################
1352 #
1353 #       Function to demand "bc".  Losers.
1354 #
1355 ###############################################################################
1356
1357
1358
1359 ###############################################################################
1360 #
1361 #       Functions to check how to do ICMP PING requests.
1362 #
1363 ###############################################################################
1364
1365
1366
1367
1368
1369
1370 ###############################################################################
1371 #
1372 #       Functions to check for various X11 crap.
1373 #
1374 ###############################################################################
1375
1376 # Try and find the app-defaults directory.
1377 # It sucks that autoconf doesn't do this already...
1378 #
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389 # Random special-cases for X on certain pathological OSes.
1390 # You know who you are.
1391 #
1392
1393
1394
1395
1396 ###############################################################################
1397 #
1398 #       Some utility functions to make checking for X things easier.
1399 #
1400 ###############################################################################
1401
1402 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1403 #
1404
1405
1406 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1407 #
1408
1409
1410 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1411 #
1412
1413
1414
1415 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1416 # Use this sparingly; it probably doesn't work very well on X programs.
1417 #
1418
1419
1420 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1421 # (But not the -L directories!)
1422 #
1423
1424
1425
1426
1427 # Usage: HANDLE_X_PATH_ARG([variable_name],
1428 #                          [--command-line-option],
1429 #                          [descriptive string])
1430 #
1431 # All of the --with options take three forms:
1432 #
1433 #   --with-foo (or --with-foo=yes)
1434 #   --without-foo (or --with-foo=no)
1435 #   --with-foo=/DIR
1436 #
1437 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1438 # a directory (string beginning with a slash) it checks to see whether
1439 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1440 # as appropriate.
1441 #
1442
1443
1444
1445
1446 ###############################################################################
1447 ###############################################################################
1448 #
1449 #       End of function definitions.  Now start actually executing stuff.
1450 #
1451 ###############################################################################
1452 ###############################################################################
1453
1454 # random compiler setup
1455 ac_aux_dir=
1456 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1457   if test -f $ac_dir/install-sh; then
1458     ac_aux_dir=$ac_dir
1459     ac_install_sh="$ac_aux_dir/install-sh -c"
1460     break
1461   elif test -f $ac_dir/install.sh; then
1462     ac_aux_dir=$ac_dir
1463     ac_install_sh="$ac_aux_dir/install.sh -c"
1464     break
1465   elif test -f $ac_dir/shtool; then
1466     ac_aux_dir=$ac_dir
1467     ac_install_sh="$ac_aux_dir/shtool install -c"
1468     break
1469   fi
1470 done
1471 if test -z "$ac_aux_dir"; then
1472   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1473 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1474    { (exit 1); exit 1; }; }
1475 fi
1476 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1477 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1478 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1479
1480 # Make sure we can run config.sub.
1481 $ac_config_sub sun4 >/dev/null 2>&1 ||
1482   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1483 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1484    { (exit 1); exit 1; }; }
1485
1486 echo "$as_me:$LINENO: checking build system type" >&5
1487 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1488 if test "${ac_cv_build+set}" = set; then
1489   echo $ECHO_N "(cached) $ECHO_C" >&6
1490 else
1491   ac_cv_build_alias=$build_alias
1492 test -z "$ac_cv_build_alias" &&
1493   ac_cv_build_alias=`$ac_config_guess`
1494 test -z "$ac_cv_build_alias" &&
1495   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1496 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1497    { (exit 1); exit 1; }; }
1498 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1499   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1500 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1501    { (exit 1); exit 1; }; }
1502
1503 fi
1504 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1505 echo "${ECHO_T}$ac_cv_build" >&6
1506 build=$ac_cv_build
1507 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1508 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1509 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1510
1511
1512 echo "$as_me:$LINENO: checking host system type" >&5
1513 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1514 if test "${ac_cv_host+set}" = set; then
1515   echo $ECHO_N "(cached) $ECHO_C" >&6
1516 else
1517   ac_cv_host_alias=$host_alias
1518 test -z "$ac_cv_host_alias" &&
1519   ac_cv_host_alias=$ac_cv_build_alias
1520 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1521   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1522 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1523    { (exit 1); exit 1; }; }
1524
1525 fi
1526 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1527 echo "${ECHO_T}$ac_cv_host" >&6
1528 host=$ac_cv_host
1529 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1530 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1531 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1532
1533
1534
1535 ac_ext=c
1536 ac_cpp='$CPP $CPPFLAGS'
1537 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1538 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1539 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1540 if test -n "$ac_tool_prefix"; then
1541   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1542 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1543 echo "$as_me:$LINENO: checking for $ac_word" >&5
1544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1545 if test "${ac_cv_prog_CC+set}" = set; then
1546   echo $ECHO_N "(cached) $ECHO_C" >&6
1547 else
1548   if test -n "$CC"; then
1549   ac_cv_prog_CC="$CC" # Let the user override the test.
1550 else
1551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1552 for as_dir in $PATH
1553 do
1554   IFS=$as_save_IFS
1555   test -z "$as_dir" && as_dir=.
1556   for ac_exec_ext in '' $ac_executable_extensions; do
1557   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1558     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1559     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1560     break 2
1561   fi
1562 done
1563 done
1564
1565 fi
1566 fi
1567 CC=$ac_cv_prog_CC
1568 if test -n "$CC"; then
1569   echo "$as_me:$LINENO: result: $CC" >&5
1570 echo "${ECHO_T}$CC" >&6
1571 else
1572   echo "$as_me:$LINENO: result: no" >&5
1573 echo "${ECHO_T}no" >&6
1574 fi
1575
1576 fi
1577 if test -z "$ac_cv_prog_CC"; then
1578   ac_ct_CC=$CC
1579   # Extract the first word of "gcc", so it can be a program name with args.
1580 set dummy gcc; ac_word=$2
1581 echo "$as_me:$LINENO: checking for $ac_word" >&5
1582 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1583 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1584   echo $ECHO_N "(cached) $ECHO_C" >&6
1585 else
1586   if test -n "$ac_ct_CC"; then
1587   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1588 else
1589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1590 for as_dir in $PATH
1591 do
1592   IFS=$as_save_IFS
1593   test -z "$as_dir" && as_dir=.
1594   for ac_exec_ext in '' $ac_executable_extensions; do
1595   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1596     ac_cv_prog_ac_ct_CC="gcc"
1597     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1598     break 2
1599   fi
1600 done
1601 done
1602
1603 fi
1604 fi
1605 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1606 if test -n "$ac_ct_CC"; then
1607   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1608 echo "${ECHO_T}$ac_ct_CC" >&6
1609 else
1610   echo "$as_me:$LINENO: result: no" >&5
1611 echo "${ECHO_T}no" >&6
1612 fi
1613
1614   CC=$ac_ct_CC
1615 else
1616   CC="$ac_cv_prog_CC"
1617 fi
1618
1619 if test -z "$CC"; then
1620   if test -n "$ac_tool_prefix"; then
1621   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1622 set dummy ${ac_tool_prefix}cc; ac_word=$2
1623 echo "$as_me:$LINENO: checking for $ac_word" >&5
1624 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1625 if test "${ac_cv_prog_CC+set}" = set; then
1626   echo $ECHO_N "(cached) $ECHO_C" >&6
1627 else
1628   if test -n "$CC"; then
1629   ac_cv_prog_CC="$CC" # Let the user override the test.
1630 else
1631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1632 for as_dir in $PATH
1633 do
1634   IFS=$as_save_IFS
1635   test -z "$as_dir" && as_dir=.
1636   for ac_exec_ext in '' $ac_executable_extensions; do
1637   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1638     ac_cv_prog_CC="${ac_tool_prefix}cc"
1639     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1640     break 2
1641   fi
1642 done
1643 done
1644
1645 fi
1646 fi
1647 CC=$ac_cv_prog_CC
1648 if test -n "$CC"; then
1649   echo "$as_me:$LINENO: result: $CC" >&5
1650 echo "${ECHO_T}$CC" >&6
1651 else
1652   echo "$as_me:$LINENO: result: no" >&5
1653 echo "${ECHO_T}no" >&6
1654 fi
1655
1656 fi
1657 if test -z "$ac_cv_prog_CC"; then
1658   ac_ct_CC=$CC
1659   # Extract the first word of "cc", so it can be a program name with args.
1660 set dummy cc; ac_word=$2
1661 echo "$as_me:$LINENO: checking for $ac_word" >&5
1662 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1663 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1664   echo $ECHO_N "(cached) $ECHO_C" >&6
1665 else
1666   if test -n "$ac_ct_CC"; then
1667   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1668 else
1669 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1670 for as_dir in $PATH
1671 do
1672   IFS=$as_save_IFS
1673   test -z "$as_dir" && as_dir=.
1674   for ac_exec_ext in '' $ac_executable_extensions; do
1675   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1676     ac_cv_prog_ac_ct_CC="cc"
1677     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1678     break 2
1679   fi
1680 done
1681 done
1682
1683 fi
1684 fi
1685 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1686 if test -n "$ac_ct_CC"; then
1687   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1688 echo "${ECHO_T}$ac_ct_CC" >&6
1689 else
1690   echo "$as_me:$LINENO: result: no" >&5
1691 echo "${ECHO_T}no" >&6
1692 fi
1693
1694   CC=$ac_ct_CC
1695 else
1696   CC="$ac_cv_prog_CC"
1697 fi
1698
1699 fi
1700 if test -z "$CC"; then
1701   # Extract the first word of "cc", so it can be a program name with args.
1702 set dummy cc; ac_word=$2
1703 echo "$as_me:$LINENO: checking for $ac_word" >&5
1704 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1705 if test "${ac_cv_prog_CC+set}" = set; then
1706   echo $ECHO_N "(cached) $ECHO_C" >&6
1707 else
1708   if test -n "$CC"; then
1709   ac_cv_prog_CC="$CC" # Let the user override the test.
1710 else
1711   ac_prog_rejected=no
1712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1713 for as_dir in $PATH
1714 do
1715   IFS=$as_save_IFS
1716   test -z "$as_dir" && as_dir=.
1717   for ac_exec_ext in '' $ac_executable_extensions; do
1718   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1719     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1720        ac_prog_rejected=yes
1721        continue
1722      fi
1723     ac_cv_prog_CC="cc"
1724     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1725     break 2
1726   fi
1727 done
1728 done
1729
1730 if test $ac_prog_rejected = yes; then
1731   # We found a bogon in the path, so make sure we never use it.
1732   set dummy $ac_cv_prog_CC
1733   shift
1734   if test $# != 0; then
1735     # We chose a different compiler from the bogus one.
1736     # However, it has the same basename, so the bogon will be chosen
1737     # first if we set CC to just the basename; use the full file name.
1738     shift
1739     set dummy "$as_dir/$ac_word" ${1+"$@"}
1740     shift
1741     ac_cv_prog_CC="$@"
1742   fi
1743 fi
1744 fi
1745 fi
1746 CC=$ac_cv_prog_CC
1747 if test -n "$CC"; then
1748   echo "$as_me:$LINENO: result: $CC" >&5
1749 echo "${ECHO_T}$CC" >&6
1750 else
1751   echo "$as_me:$LINENO: result: no" >&5
1752 echo "${ECHO_T}no" >&6
1753 fi
1754
1755 fi
1756 if test -z "$CC"; then
1757   if test -n "$ac_tool_prefix"; then
1758   for ac_prog in cl
1759   do
1760     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1761 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1762 echo "$as_me:$LINENO: checking for $ac_word" >&5
1763 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1764 if test "${ac_cv_prog_CC+set}" = set; then
1765   echo $ECHO_N "(cached) $ECHO_C" >&6
1766 else
1767   if test -n "$CC"; then
1768   ac_cv_prog_CC="$CC" # Let the user override the test.
1769 else
1770 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1771 for as_dir in $PATH
1772 do
1773   IFS=$as_save_IFS
1774   test -z "$as_dir" && as_dir=.
1775   for ac_exec_ext in '' $ac_executable_extensions; do
1776   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1777     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1778     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1779     break 2
1780   fi
1781 done
1782 done
1783
1784 fi
1785 fi
1786 CC=$ac_cv_prog_CC
1787 if test -n "$CC"; then
1788   echo "$as_me:$LINENO: result: $CC" >&5
1789 echo "${ECHO_T}$CC" >&6
1790 else
1791   echo "$as_me:$LINENO: result: no" >&5
1792 echo "${ECHO_T}no" >&6
1793 fi
1794
1795     test -n "$CC" && break
1796   done
1797 fi
1798 if test -z "$CC"; then
1799   ac_ct_CC=$CC
1800   for ac_prog in cl
1801 do
1802   # Extract the first word of "$ac_prog", so it can be a program name with args.
1803 set dummy $ac_prog; ac_word=$2
1804 echo "$as_me:$LINENO: checking for $ac_word" >&5
1805 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1806 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1807   echo $ECHO_N "(cached) $ECHO_C" >&6
1808 else
1809   if test -n "$ac_ct_CC"; then
1810   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1811 else
1812 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1813 for as_dir in $PATH
1814 do
1815   IFS=$as_save_IFS
1816   test -z "$as_dir" && as_dir=.
1817   for ac_exec_ext in '' $ac_executable_extensions; do
1818   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1819     ac_cv_prog_ac_ct_CC="$ac_prog"
1820     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1821     break 2
1822   fi
1823 done
1824 done
1825
1826 fi
1827 fi
1828 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1829 if test -n "$ac_ct_CC"; then
1830   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1831 echo "${ECHO_T}$ac_ct_CC" >&6
1832 else
1833   echo "$as_me:$LINENO: result: no" >&5
1834 echo "${ECHO_T}no" >&6
1835 fi
1836
1837   test -n "$ac_ct_CC" && break
1838 done
1839
1840   CC=$ac_ct_CC
1841 fi
1842
1843 fi
1844
1845
1846 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1847 echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1848    { (exit 1); exit 1; }; }
1849
1850 # Provide some information about the compiler.
1851 echo "$as_me:$LINENO:" \
1852      "checking for C compiler version" >&5
1853 ac_compiler=`set X $ac_compile; echo $2`
1854 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1855   (eval $ac_compiler --version </dev/null >&5) 2>&5
1856   ac_status=$?
1857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1858   (exit $ac_status); }
1859 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1860   (eval $ac_compiler -v </dev/null >&5) 2>&5
1861   ac_status=$?
1862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1863   (exit $ac_status); }
1864 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1865   (eval $ac_compiler -V </dev/null >&5) 2>&5
1866   ac_status=$?
1867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1868   (exit $ac_status); }
1869
1870 cat >conftest.$ac_ext <<_ACEOF
1871 #line $LINENO "configure"
1872 #include "confdefs.h"
1873
1874 #ifdef F77_DUMMY_MAIN
1875 #  ifdef __cplusplus
1876      extern "C"
1877 #  endif
1878    int F77_DUMMY_MAIN() { return 1; }
1879 #endif
1880 int
1881 main ()
1882 {
1883
1884   ;
1885   return 0;
1886 }
1887 _ACEOF
1888 ac_clean_files_save=$ac_clean_files
1889 ac_clean_files="$ac_clean_files a.out a.exe"
1890 # Try to create an executable without -o first, disregard a.out.
1891 # It will help us diagnose broken compilers, and finding out an intuition
1892 # of exeext.
1893 echo "$as_me:$LINENO: checking for C compiler default output" >&5
1894 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1895 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1896 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1897   (eval $ac_link_default) 2>&5
1898   ac_status=$?
1899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1900   (exit $ac_status); }; then
1901   # Find the output, starting from the most likely.  This scheme is
1902 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1903 # resort.
1904
1905 # Be careful to initialize this variable, since it used to be cached.
1906 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1907 ac_cv_exeext=
1908 for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1909                 ls a.out conftest 2>/dev/null;
1910                 ls a.* conftest.* 2>/dev/null`; do
1911   case $ac_file in
1912     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1913     a.out ) # We found the default executable, but exeext='' is most
1914             # certainly right.
1915             break;;
1916     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1917           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1918           export ac_cv_exeext
1919           break;;
1920     * ) break;;
1921   esac
1922 done
1923 else
1924   echo "$as_me: failed program was:" >&5
1925 cat conftest.$ac_ext >&5
1926 { { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
1927 echo "$as_me: error: C compiler cannot create executables" >&2;}
1928    { (exit 77); exit 77; }; }
1929 fi
1930
1931 ac_exeext=$ac_cv_exeext
1932 echo "$as_me:$LINENO: result: $ac_file" >&5
1933 echo "${ECHO_T}$ac_file" >&6
1934
1935 # Check the compiler produces executables we can run.  If not, either
1936 # the compiler is broken, or we cross compile.
1937 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1938 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1939 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1940 # If not cross compiling, check that we can run a simple program.
1941 if test "$cross_compiling" != yes; then
1942   if { ac_try='./$ac_file'
1943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1944   (eval $ac_try) 2>&5
1945   ac_status=$?
1946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1947   (exit $ac_status); }; }; then
1948     cross_compiling=no
1949   else
1950     if test "$cross_compiling" = maybe; then
1951         cross_compiling=yes
1952     else
1953         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1954 If you meant to cross compile, use \`--host'." >&5
1955 echo "$as_me: error: cannot run C compiled programs.
1956 If you meant to cross compile, use \`--host'." >&2;}
1957    { (exit 1); exit 1; }; }
1958     fi
1959   fi
1960 fi
1961 echo "$as_me:$LINENO: result: yes" >&5
1962 echo "${ECHO_T}yes" >&6
1963
1964 rm -f a.out a.exe conftest$ac_cv_exeext
1965 ac_clean_files=$ac_clean_files_save
1966 # Check the compiler produces executables we can run.  If not, either
1967 # the compiler is broken, or we cross compile.
1968 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1969 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1970 echo "$as_me:$LINENO: result: $cross_compiling" >&5
1971 echo "${ECHO_T}$cross_compiling" >&6
1972
1973 echo "$as_me:$LINENO: checking for suffix of executables" >&5
1974 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1975 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1976   (eval $ac_link) 2>&5
1977   ac_status=$?
1978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1979   (exit $ac_status); }; then
1980   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1981 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1982 # work properly (i.e., refer to `conftest.exe'), while it won't with
1983 # `rm'.
1984 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1985   case $ac_file in
1986     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1987     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1988           export ac_cv_exeext
1989           break;;
1990     * ) break;;
1991   esac
1992 done
1993 else
1994   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1995 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1996    { (exit 1); exit 1; }; }
1997 fi
1998
1999 rm -f conftest$ac_cv_exeext
2000 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2001 echo "${ECHO_T}$ac_cv_exeext" >&6
2002
2003 rm -f conftest.$ac_ext
2004 EXEEXT=$ac_cv_exeext
2005 ac_exeext=$EXEEXT
2006 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2007 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2008 if test "${ac_cv_objext+set}" = set; then
2009   echo $ECHO_N "(cached) $ECHO_C" >&6
2010 else
2011   cat >conftest.$ac_ext <<_ACEOF
2012 #line $LINENO "configure"
2013 #include "confdefs.h"
2014
2015 #ifdef F77_DUMMY_MAIN
2016 #  ifdef __cplusplus
2017      extern "C"
2018 #  endif
2019    int F77_DUMMY_MAIN() { return 1; }
2020 #endif
2021 int
2022 main ()
2023 {
2024
2025   ;
2026   return 0;
2027 }
2028 _ACEOF
2029 rm -f conftest.o conftest.obj
2030 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2031   (eval $ac_compile) 2>&5
2032   ac_status=$?
2033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2034   (exit $ac_status); }; then
2035   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2036   case $ac_file in
2037     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2038     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2039        break;;
2040   esac
2041 done
2042 else
2043   echo "$as_me: failed program was:" >&5
2044 cat conftest.$ac_ext >&5
2045 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2046 echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2047    { (exit 1); exit 1; }; }
2048 fi
2049
2050 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2051 fi
2052 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2053 echo "${ECHO_T}$ac_cv_objext" >&6
2054 OBJEXT=$ac_cv_objext
2055 ac_objext=$OBJEXT
2056 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2057 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2058 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2059   echo $ECHO_N "(cached) $ECHO_C" >&6
2060 else
2061   cat >conftest.$ac_ext <<_ACEOF
2062 #line $LINENO "configure"
2063 #include "confdefs.h"
2064
2065 #ifdef F77_DUMMY_MAIN
2066 #  ifdef __cplusplus
2067      extern "C"
2068 #  endif
2069    int F77_DUMMY_MAIN() { return 1; }
2070 #endif
2071 int
2072 main ()
2073 {
2074 #ifndef __GNUC__
2075        choke me
2076 #endif
2077
2078   ;
2079   return 0;
2080 }
2081 _ACEOF
2082 rm -f conftest.$ac_objext
2083 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2084   (eval $ac_compile) 2>&5
2085   ac_status=$?
2086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2087   (exit $ac_status); } &&
2088          { ac_try='test -s conftest.$ac_objext'
2089   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2090   (eval $ac_try) 2>&5
2091   ac_status=$?
2092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2093   (exit $ac_status); }; }; then
2094   ac_compiler_gnu=yes
2095 else
2096   echo "$as_me: failed program was:" >&5
2097 cat conftest.$ac_ext >&5
2098 ac_compiler_gnu=no
2099 fi
2100 rm -f conftest.$ac_objext conftest.$ac_ext
2101 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2102
2103 fi
2104 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2105 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2106 GCC=`test $ac_compiler_gnu = yes && echo yes`
2107 ac_test_CFLAGS=${CFLAGS+set}
2108 ac_save_CFLAGS=$CFLAGS
2109 CFLAGS="-g"
2110 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2111 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2112 if test "${ac_cv_prog_cc_g+set}" = set; then
2113   echo $ECHO_N "(cached) $ECHO_C" >&6
2114 else
2115   cat >conftest.$ac_ext <<_ACEOF
2116 #line $LINENO "configure"
2117 #include "confdefs.h"
2118
2119 #ifdef F77_DUMMY_MAIN
2120 #  ifdef __cplusplus
2121      extern "C"
2122 #  endif
2123    int F77_DUMMY_MAIN() { return 1; }
2124 #endif
2125 int
2126 main ()
2127 {
2128
2129   ;
2130   return 0;
2131 }
2132 _ACEOF
2133 rm -f conftest.$ac_objext
2134 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2135   (eval $ac_compile) 2>&5
2136   ac_status=$?
2137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2138   (exit $ac_status); } &&
2139          { ac_try='test -s conftest.$ac_objext'
2140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2141   (eval $ac_try) 2>&5
2142   ac_status=$?
2143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2144   (exit $ac_status); }; }; then
2145   ac_cv_prog_cc_g=yes
2146 else
2147   echo "$as_me: failed program was:" >&5
2148 cat conftest.$ac_ext >&5
2149 ac_cv_prog_cc_g=no
2150 fi
2151 rm -f conftest.$ac_objext conftest.$ac_ext
2152 fi
2153 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2154 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2155 if test "$ac_test_CFLAGS" = set; then
2156   CFLAGS=$ac_save_CFLAGS
2157 elif test $ac_cv_prog_cc_g = yes; then
2158   if test "$GCC" = yes; then
2159     CFLAGS="-g -O2"
2160   else
2161     CFLAGS="-g"
2162   fi
2163 else
2164   if test "$GCC" = yes; then
2165     CFLAGS="-O2"
2166   else
2167     CFLAGS=
2168   fi
2169 fi
2170 # Some people use a C++ compiler to compile C.  Since we use `exit',
2171 # in C++ we need to declare it.  In case someone uses the same compiler
2172 # for both compiling C and C++ we need to have the C++ compiler decide
2173 # the declaration of exit, since it's the most demanding environment.
2174 cat >conftest.$ac_ext <<_ACEOF
2175 #ifndef __cplusplus
2176   choke me
2177 #endif
2178 _ACEOF
2179 rm -f conftest.$ac_objext
2180 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2181   (eval $ac_compile) 2>&5
2182   ac_status=$?
2183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2184   (exit $ac_status); } &&
2185          { ac_try='test -s conftest.$ac_objext'
2186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2187   (eval $ac_try) 2>&5
2188   ac_status=$?
2189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2190   (exit $ac_status); }; }; then
2191   for ac_declaration in \
2192    ''\
2193    '#include <stdlib.h>' \
2194    'extern "C" void std::exit (int) throw (); using std::exit;' \
2195    'extern "C" void std::exit (int); using std::exit;' \
2196    'extern "C" void exit (int) throw ();' \
2197    'extern "C" void exit (int);' \
2198    'void exit (int);'
2199 do
2200   cat >conftest.$ac_ext <<_ACEOF
2201 #line $LINENO "configure"
2202 #include "confdefs.h"
2203 #include <stdlib.h>
2204 $ac_declaration
2205 #ifdef F77_DUMMY_MAIN
2206 #  ifdef __cplusplus
2207      extern "C"
2208 #  endif
2209    int F77_DUMMY_MAIN() { return 1; }
2210 #endif
2211 int
2212 main ()
2213 {
2214 exit (42);
2215   ;
2216   return 0;
2217 }
2218 _ACEOF
2219 rm -f conftest.$ac_objext
2220 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2221   (eval $ac_compile) 2>&5
2222   ac_status=$?
2223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2224   (exit $ac_status); } &&
2225          { ac_try='test -s conftest.$ac_objext'
2226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2227   (eval $ac_try) 2>&5
2228   ac_status=$?
2229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2230   (exit $ac_status); }; }; then
2231   :
2232 else
2233   echo "$as_me: failed program was:" >&5
2234 cat conftest.$ac_ext >&5
2235 continue
2236 fi
2237 rm -f conftest.$ac_objext conftest.$ac_ext
2238   cat >conftest.$ac_ext <<_ACEOF
2239 #line $LINENO "configure"
2240 #include "confdefs.h"
2241 $ac_declaration
2242 #ifdef F77_DUMMY_MAIN
2243 #  ifdef __cplusplus
2244      extern "C"
2245 #  endif
2246    int F77_DUMMY_MAIN() { return 1; }
2247 #endif
2248 int
2249 main ()
2250 {
2251 exit (42);
2252   ;
2253   return 0;
2254 }
2255 _ACEOF
2256 rm -f conftest.$ac_objext
2257 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2258   (eval $ac_compile) 2>&5
2259   ac_status=$?
2260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2261   (exit $ac_status); } &&
2262          { ac_try='test -s conftest.$ac_objext'
2263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2264   (eval $ac_try) 2>&5
2265   ac_status=$?
2266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2267   (exit $ac_status); }; }; then
2268   break
2269 else
2270   echo "$as_me: failed program was:" >&5
2271 cat conftest.$ac_ext >&5
2272 fi
2273 rm -f conftest.$ac_objext conftest.$ac_ext
2274 done
2275 rm -f conftest*
2276 if test -n "$ac_declaration"; then
2277   echo '#ifdef __cplusplus' >>confdefs.h
2278   echo $ac_declaration      >>confdefs.h
2279   echo '#endif'             >>confdefs.h
2280 fi
2281
2282 else
2283   echo "$as_me: failed program was:" >&5
2284 cat conftest.$ac_ext >&5
2285 fi
2286 rm -f conftest.$ac_objext conftest.$ac_ext
2287 ac_ext=c
2288 ac_cpp='$CPP $CPPFLAGS'
2289 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2290 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2291 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2292
2293
2294   if test -z "$GCC"; then
2295     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2296 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2297     case "$host" in
2298       *-hpux* )
2299         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2300 echo "${ECHO_T}HPUX: adding -Ae" >&6
2301         CC="$CC -Ae"
2302       ;;
2303       *-aix* )
2304         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2305 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2306         CC="$CC -qlanglvl=ansi -qhalt=e"
2307       ;;
2308
2309       *-dec-* )
2310         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2311 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2312         CC="$CC -std1"
2313       ;;
2314
2315       *)
2316         echo "$as_me:$LINENO: result: no idea" >&5
2317 echo "${ECHO_T}no idea" >&6
2318       ;;
2319     esac
2320   fi
2321
2322   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2323 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2324   if test "$cross_compiling" = yes; then
2325   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2326 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2327    { (exit 1); exit 1; }; }
2328 else
2329   cat >conftest.$ac_ext <<_ACEOF
2330 #line $LINENO "configure"
2331 #include "confdefs.h"
2332  main(int ac, char **av) { return 0; }
2333 _ACEOF
2334 rm -f conftest$ac_exeext
2335 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2336   (eval $ac_link) 2>&5
2337   ac_status=$?
2338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2339   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2341   (eval $ac_try) 2>&5
2342   ac_status=$?
2343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2344   (exit $ac_status); }; }; then
2345   echo "$as_me:$LINENO: result: yes" >&5
2346 echo "${ECHO_T}yes" >&6
2347 else
2348   echo "$as_me: program exited with status $ac_status" >&5
2349 echo "$as_me: failed program was:" >&5
2350 cat conftest.$ac_ext >&5
2351 ( exit $ac_status )
2352 echo "$as_me:$LINENO: result: no" >&5
2353 echo "${ECHO_T}no" >&6
2354      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2355 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2356    { (exit 1); exit 1; }; }
2357 fi
2358 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2359 fi
2360
2361   if test -n "$GCC"; then
2362     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2363 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2364     CC="$CC -Wall -Wstrict-prototypes -Wnested-externs"
2365   else
2366     case "$host" in
2367       *-irix5* |*-irix6.0-3* )
2368         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2369 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2370         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2371       ;;
2372 #     *-dec-osf* )
2373 #       if test -z "$GCC"; then
2374 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2375 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2376 #       fi
2377 #     ;;
2378     esac
2379   fi
2380
2381 if test -n "$GCC"; then
2382    if test -n "$GCC"; then
2383    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2384 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2385 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2386   echo $ECHO_N "(cached) $ECHO_C" >&6
2387 else
2388   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
2389           grep unrecognized >/dev/null ); then
2390        ac_cv_gcc_accepts_std=no
2391      else
2392        ac_cv_gcc_accepts_std=yes
2393      fi
2394 fi
2395 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2396 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2397    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2398   fi
2399
2400    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2401 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2402    #
2403    # The reason that // comments are banned from xscreensaver is that gcc is
2404    # basically the only compiler in the world that supports them in C code.
2405    # All other vendors support them only in their C++ compilers, not in their
2406    # ANSI C compilers.  This means that it's a portability problem: every time
2407    # these comments have snuck into the xscreensaver source code, I've gotten
2408    # complaints about it the next day.  So we turn off support for them in gcc
2409    # as well to prevent them from accidentially slipping in.
2410    #
2411    if test "$ac_gcc_accepts_std" = yes ; then
2412      #
2413      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2414      # (That appears to be the only additional preprocessor symbol
2415      # it defines, in addition to the syntax changes it makes.)
2416      #
2417      # -std=gnu89 is no good, because // comments were a GNU extension
2418      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2419      # with -std=gnu89 but not with -std=c89.)
2420      #
2421      CC="$CC -std=c89 -U__STRICT_ANSI__"
2422    else
2423      # The old way:
2424      CC="$CC -Wp,-lang-c89"
2425    fi
2426   fi
2427
2428 ac_ext=c
2429 ac_cpp='$CPP $CPPFLAGS'
2430 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2431 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2432 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2433 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2434 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2435 # On Suns, sometimes $CPP names a directory.
2436 if test -n "$CPP" && test -d "$CPP"; then
2437   CPP=
2438 fi
2439 if test -z "$CPP"; then
2440   if test "${ac_cv_prog_CPP+set}" = set; then
2441   echo $ECHO_N "(cached) $ECHO_C" >&6
2442 else
2443       # Double quotes because CPP needs to be expanded
2444     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2445     do
2446       ac_preproc_ok=false
2447 for ac_c_preproc_warn_flag in '' yes
2448 do
2449   # Use a header file that comes with gcc, so configuring glibc
2450   # with a fresh cross-compiler works.
2451   # On the NeXT, cc -E runs the code through the compiler's parser,
2452   # not just through cpp. "Syntax error" is here to catch this case.
2453   cat >conftest.$ac_ext <<_ACEOF
2454 #line $LINENO "configure"
2455 #include "confdefs.h"
2456 #include <assert.h>
2457                      Syntax error
2458 _ACEOF
2459 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2460   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2461   ac_status=$?
2462   egrep -v '^ *\+' conftest.er1 >conftest.err
2463   rm -f conftest.er1
2464   cat conftest.err >&5
2465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2466   (exit $ac_status); } >/dev/null; then
2467   if test -s conftest.err; then
2468     ac_cpp_err=$ac_c_preproc_warn_flag
2469   else
2470     ac_cpp_err=
2471   fi
2472 else
2473   ac_cpp_err=yes
2474 fi
2475 if test -z "$ac_cpp_err"; then
2476   :
2477 else
2478   echo "$as_me: failed program was:" >&5
2479   cat conftest.$ac_ext >&5
2480   # Broken: fails on valid input.
2481 continue
2482 fi
2483 rm -f conftest.err conftest.$ac_ext
2484
2485   # OK, works on sane cases.  Now check whether non-existent headers
2486   # can be detected and how.
2487   cat >conftest.$ac_ext <<_ACEOF
2488 #line $LINENO "configure"
2489 #include "confdefs.h"
2490 #include <ac_nonexistent.h>
2491 _ACEOF
2492 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2493   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2494   ac_status=$?
2495   egrep -v '^ *\+' conftest.er1 >conftest.err
2496   rm -f conftest.er1
2497   cat conftest.err >&5
2498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2499   (exit $ac_status); } >/dev/null; then
2500   if test -s conftest.err; then
2501     ac_cpp_err=$ac_c_preproc_warn_flag
2502   else
2503     ac_cpp_err=
2504   fi
2505 else
2506   ac_cpp_err=yes
2507 fi
2508 if test -z "$ac_cpp_err"; then
2509   # Broken: success on invalid input.
2510 continue
2511 else
2512   echo "$as_me: failed program was:" >&5
2513   cat conftest.$ac_ext >&5
2514   # Passes both tests.
2515 ac_preproc_ok=:
2516 break
2517 fi
2518 rm -f conftest.err conftest.$ac_ext
2519
2520 done
2521 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2522 rm -f conftest.err conftest.$ac_ext
2523 if $ac_preproc_ok; then
2524   break
2525 fi
2526
2527     done
2528     ac_cv_prog_CPP=$CPP
2529
2530 fi
2531   CPP=$ac_cv_prog_CPP
2532 else
2533   ac_cv_prog_CPP=$CPP
2534 fi
2535 echo "$as_me:$LINENO: result: $CPP" >&5
2536 echo "${ECHO_T}$CPP" >&6
2537 ac_preproc_ok=false
2538 for ac_c_preproc_warn_flag in '' yes
2539 do
2540   # Use a header file that comes with gcc, so configuring glibc
2541   # with a fresh cross-compiler works.
2542   # On the NeXT, cc -E runs the code through the compiler's parser,
2543   # not just through cpp. "Syntax error" is here to catch this case.
2544   cat >conftest.$ac_ext <<_ACEOF
2545 #line $LINENO "configure"
2546 #include "confdefs.h"
2547 #include <assert.h>
2548                      Syntax error
2549 _ACEOF
2550 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2551   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2552   ac_status=$?
2553   egrep -v '^ *\+' conftest.er1 >conftest.err
2554   rm -f conftest.er1
2555   cat conftest.err >&5
2556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2557   (exit $ac_status); } >/dev/null; then
2558   if test -s conftest.err; then
2559     ac_cpp_err=$ac_c_preproc_warn_flag
2560   else
2561     ac_cpp_err=
2562   fi
2563 else
2564   ac_cpp_err=yes
2565 fi
2566 if test -z "$ac_cpp_err"; then
2567   :
2568 else
2569   echo "$as_me: failed program was:" >&5
2570   cat conftest.$ac_ext >&5
2571   # Broken: fails on valid input.
2572 continue
2573 fi
2574 rm -f conftest.err conftest.$ac_ext
2575
2576   # OK, works on sane cases.  Now check whether non-existent headers
2577   # can be detected and how.
2578   cat >conftest.$ac_ext <<_ACEOF
2579 #line $LINENO "configure"
2580 #include "confdefs.h"
2581 #include <ac_nonexistent.h>
2582 _ACEOF
2583 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2584   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2585   ac_status=$?
2586   egrep -v '^ *\+' conftest.er1 >conftest.err
2587   rm -f conftest.er1
2588   cat conftest.err >&5
2589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2590   (exit $ac_status); } >/dev/null; then
2591   if test -s conftest.err; then
2592     ac_cpp_err=$ac_c_preproc_warn_flag
2593   else
2594     ac_cpp_err=
2595   fi
2596 else
2597   ac_cpp_err=yes
2598 fi
2599 if test -z "$ac_cpp_err"; then
2600   # Broken: success on invalid input.
2601 continue
2602 else
2603   echo "$as_me: failed program was:" >&5
2604   cat conftest.$ac_ext >&5
2605   # Passes both tests.
2606 ac_preproc_ok=:
2607 break
2608 fi
2609 rm -f conftest.err conftest.$ac_ext
2610
2611 done
2612 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2613 rm -f conftest.err conftest.$ac_ext
2614 if $ac_preproc_ok; then
2615   :
2616 else
2617   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2618 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2619    { (exit 1); exit 1; }; }
2620 fi
2621
2622 ac_ext=c
2623 ac_cpp='$CPP $CPPFLAGS'
2624 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2625 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2626 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2627
2628 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2629 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2630 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2631   echo $ECHO_N "(cached) $ECHO_C" >&6
2632 else
2633   ac_cv_prog_cc_stdc=no
2634 ac_save_CC=$CC
2635 cat >conftest.$ac_ext <<_ACEOF
2636 #line $LINENO "configure"
2637 #include "confdefs.h"
2638 #include <stdarg.h>
2639 #include <stdio.h>
2640 #include <sys/types.h>
2641 #include <sys/stat.h>
2642 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2643 struct buf { int x; };
2644 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2645 static char *e (p, i)
2646      char **p;
2647      int i;
2648 {
2649   return p[i];
2650 }
2651 static char *f (char * (*g) (char **, int), char **p, ...)
2652 {
2653   char *s;
2654   va_list v;
2655   va_start (v,p);
2656   s = g (p, va_arg (v,int));
2657   va_end (v);
2658   return s;
2659 }
2660 int test (int i, double x);
2661 struct s1 {int (*f) (int a);};
2662 struct s2 {int (*f) (double a);};
2663 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2664 int argc;
2665 char **argv;
2666 #ifdef F77_DUMMY_MAIN
2667 #  ifdef __cplusplus
2668      extern "C"
2669 #  endif
2670    int F77_DUMMY_MAIN() { return 1; }
2671 #endif
2672 int
2673 main ()
2674 {
2675 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2676   ;
2677   return 0;
2678 }
2679 _ACEOF
2680 # Don't try gcc -ansi; that turns off useful extensions and
2681 # breaks some systems' header files.
2682 # AIX                   -qlanglvl=ansi
2683 # Ultrix and OSF/1      -std1
2684 # HP-UX 10.20 and later -Ae
2685 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2686 # SVR4                  -Xc -D__EXTENSIONS__
2687 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2688 do
2689   CC="$ac_save_CC $ac_arg"
2690   rm -f conftest.$ac_objext
2691 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2692   (eval $ac_compile) 2>&5
2693   ac_status=$?
2694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2695   (exit $ac_status); } &&
2696          { ac_try='test -s conftest.$ac_objext'
2697   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2698   (eval $ac_try) 2>&5
2699   ac_status=$?
2700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2701   (exit $ac_status); }; }; then
2702   ac_cv_prog_cc_stdc=$ac_arg
2703 break
2704 else
2705   echo "$as_me: failed program was:" >&5
2706 cat conftest.$ac_ext >&5
2707 fi
2708 rm -f conftest.$ac_objext
2709 done
2710 rm -f conftest.$ac_ext conftest.$ac_objext
2711 CC=$ac_save_CC
2712
2713 fi
2714
2715 case "x$ac_cv_prog_cc_stdc" in
2716   x|xno)
2717     echo "$as_me:$LINENO: result: none needed" >&5
2718 echo "${ECHO_T}none needed" >&6 ;;
2719   *)
2720     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2721 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2722     CC="$CC $ac_cv_prog_cc_stdc" ;;
2723 esac
2724
2725 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
2726 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2727 if test "${ac_cv_c_const+set}" = set; then
2728   echo $ECHO_N "(cached) $ECHO_C" >&6
2729 else
2730   cat >conftest.$ac_ext <<_ACEOF
2731 #line $LINENO "configure"
2732 #include "confdefs.h"
2733
2734 #ifdef F77_DUMMY_MAIN
2735 #  ifdef __cplusplus
2736      extern "C"
2737 #  endif
2738    int F77_DUMMY_MAIN() { return 1; }
2739 #endif
2740 int
2741 main ()
2742 {
2743 /* FIXME: Include the comments suggested by Paul. */
2744 #ifndef __cplusplus
2745   /* Ultrix mips cc rejects this.  */
2746   typedef int charset[2];
2747   const charset x;
2748   /* SunOS 4.1.1 cc rejects this.  */
2749   char const *const *ccp;
2750   char **p;
2751   /* NEC SVR4.0.2 mips cc rejects this.  */
2752   struct point {int x, y;};
2753   static struct point const zero = {0,0};
2754   /* AIX XL C 1.02.0.0 rejects this.
2755      It does not let you subtract one const X* pointer from another in
2756      an arm of an if-expression whose if-part is not a constant
2757      expression */
2758   const char *g = "string";
2759   ccp = &g + (g ? g-g : 0);
2760   /* HPUX 7.0 cc rejects these. */
2761   ++ccp;
2762   p = (char**) ccp;
2763   ccp = (char const *const *) p;
2764   { /* SCO 3.2v4 cc rejects this.  */
2765     char *t;
2766     char const *s = 0 ? (char *) 0 : (char const *) 0;
2767
2768     *t++ = 0;
2769   }
2770   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2771     int x[] = {25, 17};
2772     const int *foo = &x[0];
2773     ++foo;
2774   }
2775   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2776     typedef const int *iptr;
2777     iptr p = 0;
2778     ++p;
2779   }
2780   { /* AIX XL C 1.02.0.0 rejects this saying
2781        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2782     struct s { int j; const int *ap[3]; };
2783     struct s *b; b->j = 5;
2784   }
2785   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2786     const int foo = 10;
2787   }
2788 #endif
2789
2790   ;
2791   return 0;
2792 }
2793 _ACEOF
2794 rm -f conftest.$ac_objext
2795 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2796   (eval $ac_compile) 2>&5
2797   ac_status=$?
2798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2799   (exit $ac_status); } &&
2800          { ac_try='test -s conftest.$ac_objext'
2801   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2802   (eval $ac_try) 2>&5
2803   ac_status=$?
2804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2805   (exit $ac_status); }; }; then
2806   ac_cv_c_const=yes
2807 else
2808   echo "$as_me: failed program was:" >&5
2809 cat conftest.$ac_ext >&5
2810 ac_cv_c_const=no
2811 fi
2812 rm -f conftest.$ac_objext conftest.$ac_ext
2813 fi
2814 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
2815 echo "${ECHO_T}$ac_cv_c_const" >&6
2816 if test $ac_cv_c_const = no; then
2817
2818 cat >>confdefs.h <<\_ACEOF
2819 #define const
2820 _ACEOF
2821
2822 fi
2823
2824 echo "$as_me:$LINENO: checking for inline" >&5
2825 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2826 if test "${ac_cv_c_inline+set}" = set; then
2827   echo $ECHO_N "(cached) $ECHO_C" >&6
2828 else
2829   ac_cv_c_inline=no
2830 for ac_kw in inline __inline__ __inline; do
2831   cat >conftest.$ac_ext <<_ACEOF
2832 #line $LINENO "configure"
2833 #include "confdefs.h"
2834 #ifndef __cplusplus
2835 static $ac_kw int static_foo () {return 0; }
2836 $ac_kw int foo () {return 0; }
2837 #endif
2838
2839 _ACEOF
2840 rm -f conftest.$ac_objext
2841 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2842   (eval $ac_compile) 2>&5
2843   ac_status=$?
2844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2845   (exit $ac_status); } &&
2846          { ac_try='test -s conftest.$ac_objext'
2847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2848   (eval $ac_try) 2>&5
2849   ac_status=$?
2850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2851   (exit $ac_status); }; }; then
2852   ac_cv_c_inline=$ac_kw; break
2853 else
2854   echo "$as_me: failed program was:" >&5
2855 cat conftest.$ac_ext >&5
2856 fi
2857 rm -f conftest.$ac_objext conftest.$ac_ext
2858 done
2859
2860 fi
2861 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
2862 echo "${ECHO_T}$ac_cv_c_inline" >&6
2863 case $ac_cv_c_inline in
2864   inline | yes) ;;
2865   no)
2866 cat >>confdefs.h <<\_ACEOF
2867 #define inline
2868 _ACEOF
2869  ;;
2870   *)  cat >>confdefs.h <<_ACEOF
2871 #define inline $ac_cv_c_inline
2872 _ACEOF
2873  ;;
2874 esac
2875
2876
2877 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
2878   echo "$as_me:$LINENO: checking for bc" >&5
2879 echo $ECHO_N "checking for bc... $ECHO_C" >&6
2880   if test "$ac_bc_result" = "15" ; then
2881     echo "$as_me:$LINENO: result: yes" >&5
2882 echo "${ECHO_T}yes" >&6
2883   else
2884     echo "$as_me:$LINENO: result: no" >&5
2885 echo "${ECHO_T}no" >&6
2886     echo ''
2887     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
2888                   part of Unix since the 1970s.  Come back when your vendor
2889                   has grown a clue." >&5
2890 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
2891                   part of Unix since the 1970s.  Come back when your vendor
2892                   has grown a clue." >&2;}
2893    { (exit 1); exit 1; }; }
2894   fi
2895
2896
2897 # stuff for Makefiles
2898 # Find a good install program.  We prefer a C program (faster),
2899 # so one script is as good as another.  But avoid the broken or
2900 # incompatible versions:
2901 # SysV /etc/install, /usr/sbin/install
2902 # SunOS /usr/etc/install
2903 # IRIX /sbin/install
2904 # AIX /bin/install
2905 # AmigaOS /C/install, which installs bootblocks on floppy discs
2906 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2907 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2908 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2909 # ./install, which can be erroneously created by make from ./install.sh.
2910 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2911 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2912 if test -z "$INSTALL"; then
2913 if test "${ac_cv_path_install+set}" = set; then
2914   echo $ECHO_N "(cached) $ECHO_C" >&6
2915 else
2916   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2917 for as_dir in $PATH
2918 do
2919   IFS=$as_save_IFS
2920   test -z "$as_dir" && as_dir=.
2921   # Account for people who put trailing slashes in PATH elements.
2922 case $as_dir/ in
2923   ./ | .// | /cC/* | \
2924   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2925   /usr/ucb/* ) ;;
2926   *)
2927     # OSF1 and SCO ODT 3.0 have their own names for install.
2928     # Don't use installbsd from OSF since it installs stuff as root
2929     # by default.
2930     for ac_prog in ginstall scoinst install; do
2931       for ac_exec_ext in '' $ac_executable_extensions; do
2932         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2933           if test $ac_prog = install &&
2934             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2935             # AIX install.  It has an incompatible calling convention.
2936             :
2937           elif test $ac_prog = install &&
2938             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2939             # program-specific install script used by HP pwplus--don't use.
2940             :
2941           else
2942             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2943             break 3
2944           fi
2945         fi
2946       done
2947     done
2948     ;;
2949 esac
2950 done
2951
2952
2953 fi
2954   if test "${ac_cv_path_install+set}" = set; then
2955     INSTALL=$ac_cv_path_install
2956   else
2957     # As a last resort, use the slow shell script.  We don't cache a
2958     # path for INSTALL within a source directory, because that will
2959     # break other packages using the cache if that directory is
2960     # removed, or if the path is relative.
2961     INSTALL=$ac_install_sh
2962   fi
2963 fi
2964 echo "$as_me:$LINENO: result: $INSTALL" >&5
2965 echo "${ECHO_T}$INSTALL" >&6
2966
2967 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2968 # It thinks the first close brace ends the variable substitution.
2969 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2970
2971 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2972
2973 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2974
2975 echo "$as_me:$LINENO: checking whether \\"\${INSTALL} -d\\" creates intermediate directories" >&5
2976 echo $ECHO_N "checking whether \\"\${INSTALL} -d\\" creates intermediate directories... $ECHO_C" >&6
2977 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
2978   echo $ECHO_N "(cached) $ECHO_C" >&6
2979 else
2980   ac_cv_install_d_creates_dirs=no
2981      rm -rf conftestdir
2982      if mkdir conftestdir; then
2983        cd conftestdir 2>/dev/null
2984        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
2985        if test -d dir1/dir2/. ; then
2986          ac_cv_install_d_creates_dirs=yes
2987        fi
2988        cd .. 2>/dev/null
2989        rm -rf conftestdir
2990      fi
2991
2992 fi
2993 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
2994 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
2995
2996   if test "$ac_cv_install_d_creates_dirs" = no ; then
2997     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
2998 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
2999 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
3000   echo $ECHO_N "(cached) $ECHO_C" >&6
3001 else
3002   ac_cv_mkdir_p_creates_dirs=no
3003        rm -rf conftestdir
3004        if mkdir conftestdir; then
3005          cd conftestdir 2>/dev/null
3006          mkdir -p dir1/dir2 >/dev/null 2>&1
3007          if test -d dir1/dir2/. ; then
3008            ac_cv_mkdir_p_creates_dirs=yes
3009          fi
3010          cd .. 2>/dev/null
3011          rm -rf conftestdir
3012        fi
3013
3014 fi
3015 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3016 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3017   fi
3018
3019   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3020     INSTALL_DIRS='${INSTALL} -d'
3021   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3022     INSTALL_DIRS='mkdir -p'
3023   else
3024     # any other ideas?
3025     INSTALL_DIRS='${INSTALL} -d'
3026   fi
3027
3028 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5
3029 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3030 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3031 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3032   echo $ECHO_N "(cached) $ECHO_C" >&6
3033 else
3034   cat >conftest.make <<\_ACEOF
3035 all:
3036         @echo 'ac_maketemp="${MAKE}"'
3037 _ACEOF
3038 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3039 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3040 if test -n "$ac_maketemp"; then
3041   eval ac_cv_prog_make_${ac_make}_set=yes
3042 else
3043   eval ac_cv_prog_make_${ac_make}_set=no
3044 fi
3045 rm -f conftest.make
3046 fi
3047 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3048   echo "$as_me:$LINENO: result: yes" >&5
3049 echo "${ECHO_T}yes" >&6
3050   SET_MAKE=
3051 else
3052   echo "$as_me:$LINENO: result: no" >&5
3053 echo "${ECHO_T}no" >&6
3054   SET_MAKE="MAKE=${MAKE-make}"
3055 fi
3056
3057
3058 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3059 # That's wrong: it should be set to '${INSTALL}', so that one can
3060 # implement the "install-strip" target properly (strip executables,
3061 # but do not try to strip scripts.)
3062 #
3063 INSTALL_SCRIPT='${INSTALL}'
3064
3065 # random libc stuff
3066
3067 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3068 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3069 if test "${ac_cv_header_stdc+set}" = set; then
3070   echo $ECHO_N "(cached) $ECHO_C" >&6
3071 else
3072   cat >conftest.$ac_ext <<_ACEOF
3073 #line $LINENO "configure"
3074 #include "confdefs.h"
3075 #include <stdlib.h>
3076 #include <stdarg.h>
3077 #include <string.h>
3078 #include <float.h>
3079
3080 _ACEOF
3081 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3082   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3083   ac_status=$?
3084   egrep -v '^ *\+' conftest.er1 >conftest.err
3085   rm -f conftest.er1
3086   cat conftest.err >&5
3087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3088   (exit $ac_status); } >/dev/null; then
3089   if test -s conftest.err; then
3090     ac_cpp_err=$ac_c_preproc_warn_flag
3091   else
3092     ac_cpp_err=
3093   fi
3094 else
3095   ac_cpp_err=yes
3096 fi
3097 if test -z "$ac_cpp_err"; then
3098   ac_cv_header_stdc=yes
3099 else
3100   echo "$as_me: failed program was:" >&5
3101   cat conftest.$ac_ext >&5
3102   ac_cv_header_stdc=no
3103 fi
3104 rm -f conftest.err conftest.$ac_ext
3105
3106 if test $ac_cv_header_stdc = yes; then
3107   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3108   cat >conftest.$ac_ext <<_ACEOF
3109 #line $LINENO "configure"
3110 #include "confdefs.h"
3111 #include <string.h>
3112
3113 _ACEOF
3114 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3115   egrep "memchr" >/dev/null 2>&1; then
3116   :
3117 else
3118   ac_cv_header_stdc=no
3119 fi
3120 rm -f conftest*
3121
3122 fi
3123
3124 if test $ac_cv_header_stdc = yes; then
3125   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3126   cat >conftest.$ac_ext <<_ACEOF
3127 #line $LINENO "configure"
3128 #include "confdefs.h"
3129 #include <stdlib.h>
3130
3131 _ACEOF
3132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3133   egrep "free" >/dev/null 2>&1; then
3134   :
3135 else
3136   ac_cv_header_stdc=no
3137 fi
3138 rm -f conftest*
3139
3140 fi
3141
3142 if test $ac_cv_header_stdc = yes; then
3143   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3144   if test "$cross_compiling" = yes; then
3145   :
3146 else
3147   cat >conftest.$ac_ext <<_ACEOF
3148 #line $LINENO "configure"
3149 #include "confdefs.h"
3150 #include <ctype.h>
3151 #if ((' ' & 0x0FF) == 0x020)
3152 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3153 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3154 #else
3155 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3156                      || ('j' <= (c) && (c) <= 'r') \
3157                      || ('s' <= (c) && (c) <= 'z'))
3158 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3159 #endif
3160
3161 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3162 int
3163 main ()
3164 {
3165   int i;
3166   for (i = 0; i < 256; i++)
3167     if (XOR (islower (i), ISLOWER (i))
3168         || toupper (i) != TOUPPER (i))
3169       exit(2);
3170   exit (0);
3171 }
3172 _ACEOF
3173 rm -f conftest$ac_exeext
3174 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3175   (eval $ac_link) 2>&5
3176   ac_status=$?
3177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3178   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3180   (eval $ac_try) 2>&5
3181   ac_status=$?
3182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3183   (exit $ac_status); }; }; then
3184   :
3185 else
3186   echo "$as_me: program exited with status $ac_status" >&5
3187 echo "$as_me: failed program was:" >&5
3188 cat conftest.$ac_ext >&5
3189 ( exit $ac_status )
3190 ac_cv_header_stdc=no
3191 fi
3192 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3193 fi
3194 fi
3195 fi
3196 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3197 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3198 if test $ac_cv_header_stdc = yes; then
3199
3200 cat >>confdefs.h <<\_ACEOF
3201 #define STDC_HEADERS 1
3202 _ACEOF
3203
3204 fi
3205
3206 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3217                   inttypes.h stdint.h unistd.h
3218 do
3219 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3220 echo "$as_me:$LINENO: checking for $ac_header" >&5
3221 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3222 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3223   echo $ECHO_N "(cached) $ECHO_C" >&6
3224 else
3225   cat >conftest.$ac_ext <<_ACEOF
3226 #line $LINENO "configure"
3227 #include "confdefs.h"
3228 $ac_includes_default
3229
3230 #include <$ac_header>
3231 _ACEOF
3232 rm -f conftest.$ac_objext
3233 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3234   (eval $ac_compile) 2>&5
3235   ac_status=$?
3236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3237   (exit $ac_status); } &&
3238          { ac_try='test -s conftest.$ac_objext'
3239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3240   (eval $ac_try) 2>&5
3241   ac_status=$?
3242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3243   (exit $ac_status); }; }; then
3244   eval "$as_ac_Header=yes"
3245 else
3246   echo "$as_me: failed program was:" >&5
3247 cat conftest.$ac_ext >&5
3248 eval "$as_ac_Header=no"
3249 fi
3250 rm -f conftest.$ac_objext conftest.$ac_ext
3251 fi
3252 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3253 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3254 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3255   cat >>confdefs.h <<_ACEOF
3256 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3257 _ACEOF
3258
3259 fi
3260
3261 done
3262
3263
3264
3265 for ac_header in unistd.h
3266 do
3267 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3268 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3269   echo "$as_me:$LINENO: checking for $ac_header" >&5
3270 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3271 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3272   echo $ECHO_N "(cached) $ECHO_C" >&6
3273 fi
3274 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3275 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3276 else
3277   # Is the header compilable?
3278 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3279 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3280 cat >conftest.$ac_ext <<_ACEOF
3281 #line $LINENO "configure"
3282 #include "confdefs.h"
3283 $ac_includes_default
3284 #include <$ac_header>
3285 _ACEOF
3286 rm -f conftest.$ac_objext
3287 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3288   (eval $ac_compile) 2>&5
3289   ac_status=$?
3290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3291   (exit $ac_status); } &&
3292          { ac_try='test -s conftest.$ac_objext'
3293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3294   (eval $ac_try) 2>&5
3295   ac_status=$?
3296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3297   (exit $ac_status); }; }; then
3298   ac_header_compiler=yes
3299 else
3300   echo "$as_me: failed program was:" >&5
3301 cat conftest.$ac_ext >&5
3302 ac_header_compiler=no
3303 fi
3304 rm -f conftest.$ac_objext conftest.$ac_ext
3305 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3306 echo "${ECHO_T}$ac_header_compiler" >&6
3307
3308 # Is the header present?
3309 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3310 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3311 cat >conftest.$ac_ext <<_ACEOF
3312 #line $LINENO "configure"
3313 #include "confdefs.h"
3314 #include <$ac_header>
3315 _ACEOF
3316 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3317   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3318   ac_status=$?
3319   egrep -v '^ *\+' conftest.er1 >conftest.err
3320   rm -f conftest.er1
3321   cat conftest.err >&5
3322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3323   (exit $ac_status); } >/dev/null; then
3324   if test -s conftest.err; then
3325     ac_cpp_err=$ac_c_preproc_warn_flag
3326   else
3327     ac_cpp_err=
3328   fi
3329 else
3330   ac_cpp_err=yes
3331 fi
3332 if test -z "$ac_cpp_err"; then
3333   ac_header_preproc=yes
3334 else
3335   echo "$as_me: failed program was:" >&5
3336   cat conftest.$ac_ext >&5
3337   ac_header_preproc=no
3338 fi
3339 rm -f conftest.err conftest.$ac_ext
3340 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3341 echo "${ECHO_T}$ac_header_preproc" >&6
3342
3343 # So?  What about this header?
3344 case $ac_header_compiler:$ac_header_preproc in
3345   yes:no )
3346     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3347 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3348     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3349 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3350   no:yes )
3351     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3352 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3353     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3354 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3355     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3356 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3357 esac
3358 echo "$as_me:$LINENO: checking for $ac_header" >&5
3359 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3360 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3361   echo $ECHO_N "(cached) $ECHO_C" >&6
3362 else
3363   eval "$as_ac_Header=$ac_header_preproc"
3364 fi
3365 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3366 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3367
3368 fi
3369 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3370   cat >>confdefs.h <<_ACEOF
3371 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3372 _ACEOF
3373
3374 fi
3375
3376 done
3377
3378 echo "$as_me:$LINENO: checking for mode_t" >&5
3379 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3380 if test "${ac_cv_type_mode_t+set}" = set; then
3381   echo $ECHO_N "(cached) $ECHO_C" >&6
3382 else
3383   cat >conftest.$ac_ext <<_ACEOF
3384 #line $LINENO "configure"
3385 #include "confdefs.h"
3386 $ac_includes_default
3387 #ifdef F77_DUMMY_MAIN
3388 #  ifdef __cplusplus
3389      extern "C"
3390 #  endif
3391    int F77_DUMMY_MAIN() { return 1; }
3392 #endif
3393 int
3394 main ()
3395 {
3396 if ((mode_t *) 0)
3397   return 0;
3398 if (sizeof (mode_t))
3399   return 0;
3400   ;
3401   return 0;
3402 }
3403 _ACEOF
3404 rm -f conftest.$ac_objext
3405 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3406   (eval $ac_compile) 2>&5
3407   ac_status=$?
3408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3409   (exit $ac_status); } &&
3410          { ac_try='test -s conftest.$ac_objext'
3411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3412   (eval $ac_try) 2>&5
3413   ac_status=$?
3414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3415   (exit $ac_status); }; }; then
3416   ac_cv_type_mode_t=yes
3417 else
3418   echo "$as_me: failed program was:" >&5
3419 cat conftest.$ac_ext >&5
3420 ac_cv_type_mode_t=no
3421 fi
3422 rm -f conftest.$ac_objext conftest.$ac_ext
3423 fi
3424 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
3425 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3426 if test $ac_cv_type_mode_t = yes; then
3427   :
3428 else
3429
3430 cat >>confdefs.h <<_ACEOF
3431 #define mode_t int
3432 _ACEOF
3433
3434 fi
3435
3436 echo "$as_me:$LINENO: checking for pid_t" >&5
3437 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
3438 if test "${ac_cv_type_pid_t+set}" = set; then
3439   echo $ECHO_N "(cached) $ECHO_C" >&6
3440 else
3441   cat >conftest.$ac_ext <<_ACEOF
3442 #line $LINENO "configure"
3443 #include "confdefs.h"
3444 $ac_includes_default
3445 #ifdef F77_DUMMY_MAIN
3446 #  ifdef __cplusplus
3447      extern "C"
3448 #  endif
3449    int F77_DUMMY_MAIN() { return 1; }
3450 #endif
3451 int
3452 main ()
3453 {
3454 if ((pid_t *) 0)
3455   return 0;
3456 if (sizeof (pid_t))
3457   return 0;
3458   ;
3459   return 0;
3460 }
3461 _ACEOF
3462 rm -f conftest.$ac_objext
3463 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3464   (eval $ac_compile) 2>&5
3465   ac_status=$?
3466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3467   (exit $ac_status); } &&
3468          { ac_try='test -s conftest.$ac_objext'
3469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3470   (eval $ac_try) 2>&5
3471   ac_status=$?
3472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3473   (exit $ac_status); }; }; then
3474   ac_cv_type_pid_t=yes
3475 else
3476   echo "$as_me: failed program was:" >&5
3477 cat conftest.$ac_ext >&5
3478 ac_cv_type_pid_t=no
3479 fi
3480 rm -f conftest.$ac_objext conftest.$ac_ext
3481 fi
3482 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
3483 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3484 if test $ac_cv_type_pid_t = yes; then
3485   :
3486 else
3487
3488 cat >>confdefs.h <<_ACEOF
3489 #define pid_t int
3490 _ACEOF
3491
3492 fi
3493
3494 echo "$as_me:$LINENO: checking for size_t" >&5
3495 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
3496 if test "${ac_cv_type_size_t+set}" = set; then
3497   echo $ECHO_N "(cached) $ECHO_C" >&6
3498 else
3499   cat >conftest.$ac_ext <<_ACEOF
3500 #line $LINENO "configure"
3501 #include "confdefs.h"
3502 $ac_includes_default
3503 #ifdef F77_DUMMY_MAIN
3504 #  ifdef __cplusplus
3505      extern "C"
3506 #  endif
3507    int F77_DUMMY_MAIN() { return 1; }
3508 #endif
3509 int
3510 main ()
3511 {
3512 if ((size_t *) 0)
3513   return 0;
3514 if (sizeof (size_t))
3515   return 0;
3516   ;
3517   return 0;
3518 }
3519 _ACEOF
3520 rm -f conftest.$ac_objext
3521 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3522   (eval $ac_compile) 2>&5
3523   ac_status=$?
3524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3525   (exit $ac_status); } &&
3526          { ac_try='test -s conftest.$ac_objext'
3527   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3528   (eval $ac_try) 2>&5
3529   ac_status=$?
3530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3531   (exit $ac_status); }; }; then
3532   ac_cv_type_size_t=yes
3533 else
3534   echo "$as_me: failed program was:" >&5
3535 cat conftest.$ac_ext >&5
3536 ac_cv_type_size_t=no
3537 fi
3538 rm -f conftest.$ac_objext conftest.$ac_ext
3539 fi
3540 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
3541 echo "${ECHO_T}$ac_cv_type_size_t" >&6
3542 if test $ac_cv_type_size_t = yes; then
3543   :
3544 else
3545
3546 cat >>confdefs.h <<_ACEOF
3547 #define size_t unsigned
3548 _ACEOF
3549
3550 fi
3551
3552 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
3553 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
3554 if test "${ac_cv_type_signal+set}" = set; then
3555   echo $ECHO_N "(cached) $ECHO_C" >&6
3556 else
3557   cat >conftest.$ac_ext <<_ACEOF
3558 #line $LINENO "configure"
3559 #include "confdefs.h"
3560 #include <sys/types.h>
3561 #include <signal.h>
3562 #ifdef signal
3563 # undef signal
3564 #endif
3565 #ifdef __cplusplus
3566 extern "C" void (*signal (int, void (*)(int)))(int);
3567 #else
3568 void (*signal ()) ();
3569 #endif
3570
3571 #ifdef F77_DUMMY_MAIN
3572 #  ifdef __cplusplus
3573      extern "C"
3574 #  endif
3575    int F77_DUMMY_MAIN() { return 1; }
3576 #endif
3577 int
3578 main ()
3579 {
3580 int i;
3581   ;
3582   return 0;
3583 }
3584 _ACEOF
3585 rm -f conftest.$ac_objext
3586 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3587   (eval $ac_compile) 2>&5
3588   ac_status=$?
3589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3590   (exit $ac_status); } &&
3591          { ac_try='test -s conftest.$ac_objext'
3592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3593   (eval $ac_try) 2>&5
3594   ac_status=$?
3595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3596   (exit $ac_status); }; }; then
3597   ac_cv_type_signal=void
3598 else
3599   echo "$as_me: failed program was:" >&5
3600 cat conftest.$ac_ext >&5
3601 ac_cv_type_signal=int
3602 fi
3603 rm -f conftest.$ac_objext conftest.$ac_ext
3604 fi
3605 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
3606 echo "${ECHO_T}$ac_cv_type_signal" >&6
3607
3608 cat >>confdefs.h <<_ACEOF
3609 #define RETSIGTYPE $ac_cv_type_signal
3610 _ACEOF
3611
3612
3613 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
3614 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3615 if test "${ac_cv_header_time+set}" = set; then
3616   echo $ECHO_N "(cached) $ECHO_C" >&6
3617 else
3618   cat >conftest.$ac_ext <<_ACEOF
3619 #line $LINENO "configure"
3620 #include "confdefs.h"
3621 #include <sys/types.h>
3622 #include <sys/time.h>
3623 #include <time.h>
3624
3625 #ifdef F77_DUMMY_MAIN
3626 #  ifdef __cplusplus
3627      extern "C"
3628 #  endif
3629    int F77_DUMMY_MAIN() { return 1; }
3630 #endif
3631 int
3632 main ()
3633 {
3634 if ((struct tm *) 0)
3635 return 0;
3636   ;
3637   return 0;
3638 }
3639 _ACEOF
3640 rm -f conftest.$ac_objext
3641 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3642   (eval $ac_compile) 2>&5
3643   ac_status=$?
3644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3645   (exit $ac_status); } &&
3646          { ac_try='test -s conftest.$ac_objext'
3647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3648   (eval $ac_try) 2>&5
3649   ac_status=$?
3650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3651   (exit $ac_status); }; }; then
3652   ac_cv_header_time=yes
3653 else
3654   echo "$as_me: failed program was:" >&5
3655 cat conftest.$ac_ext >&5
3656 ac_cv_header_time=no
3657 fi
3658 rm -f conftest.$ac_objext conftest.$ac_ext
3659 fi
3660 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
3661 echo "${ECHO_T}$ac_cv_header_time" >&6
3662 if test $ac_cv_header_time = yes; then
3663
3664 cat >>confdefs.h <<\_ACEOF
3665 #define TIME_WITH_SYS_TIME 1
3666 _ACEOF
3667
3668 fi
3669
3670 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
3671 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
3672 if test "${ac_cv_header_sys_wait_h+set}" = set; then
3673   echo $ECHO_N "(cached) $ECHO_C" >&6
3674 else
3675   cat >conftest.$ac_ext <<_ACEOF
3676 #line $LINENO "configure"
3677 #include "confdefs.h"
3678 #include <sys/types.h>
3679 #include <sys/wait.h>
3680 #ifndef WEXITSTATUS
3681 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3682 #endif
3683 #ifndef WIFEXITED
3684 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3685 #endif
3686
3687 #ifdef F77_DUMMY_MAIN
3688 #  ifdef __cplusplus
3689      extern "C"
3690 #  endif
3691    int F77_DUMMY_MAIN() { return 1; }
3692 #endif
3693 int
3694 main ()
3695 {
3696   int s;
3697   wait (&s);
3698   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3699   ;
3700   return 0;
3701 }
3702 _ACEOF
3703 rm -f conftest.$ac_objext
3704 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3705   (eval $ac_compile) 2>&5
3706   ac_status=$?
3707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3708   (exit $ac_status); } &&
3709          { ac_try='test -s conftest.$ac_objext'
3710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3711   (eval $ac_try) 2>&5
3712   ac_status=$?
3713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3714   (exit $ac_status); }; }; then
3715   ac_cv_header_sys_wait_h=yes
3716 else
3717   echo "$as_me: failed program was:" >&5
3718 cat conftest.$ac_ext >&5
3719 ac_cv_header_sys_wait_h=no
3720 fi
3721 rm -f conftest.$ac_objext conftest.$ac_ext
3722 fi
3723 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3724 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3725 if test $ac_cv_header_sys_wait_h = yes; then
3726
3727 cat >>confdefs.h <<\_ACEOF
3728 #define HAVE_SYS_WAIT_H 1
3729 _ACEOF
3730
3731 fi
3732
3733
3734
3735
3736
3737
3738 ac_header_dirent=no
3739 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3740   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3741 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3742 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3743 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3744   echo $ECHO_N "(cached) $ECHO_C" >&6
3745 else
3746   cat >conftest.$ac_ext <<_ACEOF
3747 #line $LINENO "configure"
3748 #include "confdefs.h"
3749 #include <sys/types.h>
3750 #include <$ac_hdr>
3751
3752 #ifdef F77_DUMMY_MAIN
3753 #  ifdef __cplusplus
3754      extern "C"
3755 #  endif
3756    int F77_DUMMY_MAIN() { return 1; }
3757 #endif
3758 int
3759 main ()
3760 {
3761 if ((DIR *) 0)
3762 return 0;
3763   ;
3764   return 0;
3765 }
3766 _ACEOF
3767 rm -f conftest.$ac_objext
3768 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3769   (eval $ac_compile) 2>&5
3770   ac_status=$?
3771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3772   (exit $ac_status); } &&
3773          { ac_try='test -s conftest.$ac_objext'
3774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3775   (eval $ac_try) 2>&5
3776   ac_status=$?
3777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3778   (exit $ac_status); }; }; then
3779   eval "$as_ac_Header=yes"
3780 else
3781   echo "$as_me: failed program was:" >&5
3782 cat conftest.$ac_ext >&5
3783 eval "$as_ac_Header=no"
3784 fi
3785 rm -f conftest.$ac_objext conftest.$ac_ext
3786 fi
3787 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3788 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3789 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3790   cat >>confdefs.h <<_ACEOF
3791 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
3792 _ACEOF
3793
3794 ac_header_dirent=$ac_hdr; break
3795 fi
3796
3797 done
3798 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3799 if test $ac_header_dirent = dirent.h; then
3800   echo "$as_me:$LINENO: checking for library containing opendir" >&5
3801 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
3802 if test "${ac_cv_search_opendir+set}" = set; then
3803   echo $ECHO_N "(cached) $ECHO_C" >&6
3804 else
3805   ac_func_search_save_LIBS=$LIBS
3806 ac_cv_search_opendir=no
3807 cat >conftest.$ac_ext <<_ACEOF
3808 #line $LINENO "configure"
3809 #include "confdefs.h"
3810
3811 /* Override any gcc2 internal prototype to avoid an error.  */
3812 #ifdef __cplusplus
3813 extern "C"
3814 #endif
3815 /* We use char because int might match the return type of a gcc2
3816    builtin and then its argument prototype would still apply.  */
3817 char opendir ();
3818 #ifdef F77_DUMMY_MAIN
3819 #  ifdef __cplusplus
3820      extern "C"
3821 #  endif
3822    int F77_DUMMY_MAIN() { return 1; }
3823 #endif
3824 int
3825 main ()
3826 {
3827 opendir ();
3828   ;
3829   return 0;
3830 }
3831 _ACEOF
3832 rm -f conftest.$ac_objext conftest$ac_exeext
3833 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3834   (eval $ac_link) 2>&5
3835   ac_status=$?
3836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3837   (exit $ac_status); } &&
3838          { ac_try='test -s conftest$ac_exeext'
3839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3840   (eval $ac_try) 2>&5
3841   ac_status=$?
3842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3843   (exit $ac_status); }; }; then
3844   ac_cv_search_opendir="none required"
3845 else
3846   echo "$as_me: failed program was:" >&5
3847 cat conftest.$ac_ext >&5
3848 fi
3849 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3850 if test "$ac_cv_search_opendir" = no; then
3851   for ac_lib in dir; do
3852     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3853     cat >conftest.$ac_ext <<_ACEOF
3854 #line $LINENO "configure"
3855 #include "confdefs.h"
3856
3857 /* Override any gcc2 internal prototype to avoid an error.  */
3858 #ifdef __cplusplus
3859 extern "C"
3860 #endif
3861 /* We use char because int might match the return type of a gcc2
3862    builtin and then its argument prototype would still apply.  */
3863 char opendir ();
3864 #ifdef F77_DUMMY_MAIN
3865 #  ifdef __cplusplus
3866      extern "C"
3867 #  endif
3868    int F77_DUMMY_MAIN() { return 1; }
3869 #endif
3870 int
3871 main ()
3872 {
3873 opendir ();
3874   ;
3875   return 0;
3876 }
3877 _ACEOF
3878 rm -f conftest.$ac_objext conftest$ac_exeext
3879 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3880   (eval $ac_link) 2>&5
3881   ac_status=$?
3882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3883   (exit $ac_status); } &&
3884          { ac_try='test -s conftest$ac_exeext'
3885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3886   (eval $ac_try) 2>&5
3887   ac_status=$?
3888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3889   (exit $ac_status); }; }; then
3890   ac_cv_search_opendir="-l$ac_lib"
3891 break
3892 else
3893   echo "$as_me: failed program was:" >&5
3894 cat conftest.$ac_ext >&5
3895 fi
3896 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3897   done
3898 fi
3899 LIBS=$ac_func_search_save_LIBS
3900 fi
3901 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
3902 echo "${ECHO_T}$ac_cv_search_opendir" >&6
3903 if test "$ac_cv_search_opendir" != no; then
3904   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
3905
3906 fi
3907
3908 else
3909   echo "$as_me:$LINENO: checking for library containing opendir" >&5
3910 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
3911 if test "${ac_cv_search_opendir+set}" = set; then
3912   echo $ECHO_N "(cached) $ECHO_C" >&6
3913 else
3914   ac_func_search_save_LIBS=$LIBS
3915 ac_cv_search_opendir=no
3916 cat >conftest.$ac_ext <<_ACEOF
3917 #line $LINENO "configure"
3918 #include "confdefs.h"
3919
3920 /* Override any gcc2 internal prototype to avoid an error.  */
3921 #ifdef __cplusplus
3922 extern "C"
3923 #endif
3924 /* We use char because int might match the return type of a gcc2
3925    builtin and then its argument prototype would still apply.  */
3926 char opendir ();
3927 #ifdef F77_DUMMY_MAIN
3928 #  ifdef __cplusplus
3929      extern "C"
3930 #  endif
3931    int F77_DUMMY_MAIN() { return 1; }
3932 #endif
3933 int
3934 main ()
3935 {
3936 opendir ();
3937   ;
3938   return 0;
3939 }
3940 _ACEOF
3941 rm -f conftest.$ac_objext conftest$ac_exeext
3942 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3943   (eval $ac_link) 2>&5
3944   ac_status=$?
3945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946   (exit $ac_status); } &&
3947          { ac_try='test -s conftest$ac_exeext'
3948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3949   (eval $ac_try) 2>&5
3950   ac_status=$?
3951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3952   (exit $ac_status); }; }; then
3953   ac_cv_search_opendir="none required"
3954 else
3955   echo "$as_me: failed program was:" >&5
3956 cat conftest.$ac_ext >&5
3957 fi
3958 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3959 if test "$ac_cv_search_opendir" = no; then
3960   for ac_lib in x; do
3961     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3962     cat >conftest.$ac_ext <<_ACEOF
3963 #line $LINENO "configure"
3964 #include "confdefs.h"
3965
3966 /* Override any gcc2 internal prototype to avoid an error.  */
3967 #ifdef __cplusplus
3968 extern "C"
3969 #endif
3970 /* We use char because int might match the return type of a gcc2
3971    builtin and then its argument prototype would still apply.  */
3972 char opendir ();
3973 #ifdef F77_DUMMY_MAIN
3974 #  ifdef __cplusplus
3975      extern "C"
3976 #  endif
3977    int F77_DUMMY_MAIN() { return 1; }
3978 #endif
3979 int
3980 main ()
3981 {
3982 opendir ();
3983   ;
3984   return 0;
3985 }
3986 _ACEOF
3987 rm -f conftest.$ac_objext conftest$ac_exeext
3988 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3989   (eval $ac_link) 2>&5
3990   ac_status=$?
3991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3992   (exit $ac_status); } &&
3993          { ac_try='test -s conftest$ac_exeext'
3994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3995   (eval $ac_try) 2>&5
3996   ac_status=$?
3997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3998   (exit $ac_status); }; }; then
3999   ac_cv_search_opendir="-l$ac_lib"
4000 break
4001 else
4002   echo "$as_me: failed program was:" >&5
4003 cat conftest.$ac_ext >&5
4004 fi
4005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4006   done
4007 fi
4008 LIBS=$ac_func_search_save_LIBS
4009 fi
4010 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4011 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4012 if test "$ac_cv_search_opendir" != no; then
4013   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4014
4015 fi
4016
4017 fi
4018
4019 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4020 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4021   if test "${ac_cv_gettimeofday_args+set}" = set; then
4022   echo $ECHO_N "(cached) $ECHO_C" >&6
4023 else
4024   cat >conftest.$ac_ext <<_ACEOF
4025 #line $LINENO "configure"
4026 #include "confdefs.h"
4027 #include <stdlib.h>
4028                     #include <sys/time.h>
4029 #ifdef F77_DUMMY_MAIN
4030 #  ifdef __cplusplus
4031      extern "C"
4032 #  endif
4033    int F77_DUMMY_MAIN() { return 1; }
4034 #endif
4035 int
4036 main ()
4037 {
4038 struct timeval tv; struct timezone tzp;
4039                     gettimeofday(&tv, &tzp);
4040   ;
4041   return 0;
4042 }
4043 _ACEOF
4044 rm -f conftest.$ac_objext
4045 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4046   (eval $ac_compile) 2>&5
4047   ac_status=$?
4048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4049   (exit $ac_status); } &&
4050          { ac_try='test -s conftest.$ac_objext'
4051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4052   (eval $ac_try) 2>&5
4053   ac_status=$?
4054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4055   (exit $ac_status); }; }; then
4056   ac_gettimeofday_args=2
4057 else
4058   echo "$as_me: failed program was:" >&5
4059 cat conftest.$ac_ext >&5
4060 cat >conftest.$ac_ext <<_ACEOF
4061 #line $LINENO "configure"
4062 #include "confdefs.h"
4063 #include <stdlib.h>
4064                                     #include <sys/time.h>
4065 #ifdef F77_DUMMY_MAIN
4066 #  ifdef __cplusplus
4067      extern "C"
4068 #  endif
4069    int F77_DUMMY_MAIN() { return 1; }
4070 #endif
4071 int
4072 main ()
4073 {
4074 struct timeval tv; gettimeofday(&tv);
4075   ;
4076   return 0;
4077 }
4078 _ACEOF
4079 rm -f conftest.$ac_objext
4080 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4081   (eval $ac_compile) 2>&5
4082   ac_status=$?
4083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4084   (exit $ac_status); } &&
4085          { ac_try='test -s conftest.$ac_objext'
4086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4087   (eval $ac_try) 2>&5
4088   ac_status=$?
4089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4090   (exit $ac_status); }; }; then
4091   ac_gettimeofday_args=1
4092 else
4093   echo "$as_me: failed program was:" >&5
4094 cat conftest.$ac_ext >&5
4095 ac_gettimeofday_args=0
4096 fi
4097 rm -f conftest.$ac_objext conftest.$ac_ext
4098 fi
4099 rm -f conftest.$ac_objext conftest.$ac_ext
4100     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4101 fi
4102
4103   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4104   if test "$ac_gettimeofday_args" = 1 ; then
4105     cat >>confdefs.h <<\_ACEOF
4106 #define HAVE_GETTIMEOFDAY 1
4107 _ACEOF
4108
4109     echo "$as_me:$LINENO: result: one argument" >&5
4110 echo "${ECHO_T}one argument" >&6
4111   elif test "$ac_gettimeofday_args" = 2 ; then
4112     cat >>confdefs.h <<\_ACEOF
4113 #define HAVE_GETTIMEOFDAY 1
4114 _ACEOF
4115
4116     cat >>confdefs.h <<\_ACEOF
4117 #define GETTIMEOFDAY_TWO_ARGS 1
4118 _ACEOF
4119
4120     echo "$as_me:$LINENO: result: two arguments" >&5
4121 echo "${ECHO_T}two arguments" >&6
4122   else
4123     echo "$as_me:$LINENO: result: unknown" >&5
4124 echo "${ECHO_T}unknown" >&6
4125   fi
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4137 do
4138 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4139 echo "$as_me:$LINENO: checking for $ac_func" >&5
4140 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4141 if eval "test \"\${$as_ac_var+set}\" = set"; then
4142   echo $ECHO_N "(cached) $ECHO_C" >&6
4143 else
4144   cat >conftest.$ac_ext <<_ACEOF
4145 #line $LINENO "configure"
4146 #include "confdefs.h"
4147 /* System header to define __stub macros and hopefully few prototypes,
4148     which can conflict with char $ac_func (); below.  */
4149 #include <assert.h>
4150 /* Override any gcc2 internal prototype to avoid an error.  */
4151 #ifdef __cplusplus
4152 extern "C"
4153 #endif
4154 /* We use char because int might match the return type of a gcc2
4155    builtin and then its argument prototype would still apply.  */
4156 char $ac_func ();
4157 char (*f) ();
4158
4159 #ifdef F77_DUMMY_MAIN
4160 #  ifdef __cplusplus
4161      extern "C"
4162 #  endif
4163    int F77_DUMMY_MAIN() { return 1; }
4164 #endif
4165 int
4166 main ()
4167 {
4168 /* The GNU C library defines this for functions which it implements
4169     to always fail with ENOSYS.  Some functions are actually named
4170     something starting with __ and the normal name is an alias.  */
4171 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4172 choke me
4173 #else
4174 f = $ac_func;
4175 #endif
4176
4177   ;
4178   return 0;
4179 }
4180 _ACEOF
4181 rm -f conftest.$ac_objext conftest$ac_exeext
4182 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4183   (eval $ac_link) 2>&5
4184   ac_status=$?
4185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4186   (exit $ac_status); } &&
4187          { ac_try='test -s conftest$ac_exeext'
4188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4189   (eval $ac_try) 2>&5
4190   ac_status=$?
4191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4192   (exit $ac_status); }; }; then
4193   eval "$as_ac_var=yes"
4194 else
4195   echo "$as_me: failed program was:" >&5
4196 cat conftest.$ac_ext >&5
4197 eval "$as_ac_var=no"
4198 fi
4199 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4200 fi
4201 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4202 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4203 if test `eval echo '${'$as_ac_var'}'` = yes; then
4204   cat >>confdefs.h <<_ACEOF
4205 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4206 _ACEOF
4207
4208 fi
4209 done
4210
4211
4212
4213
4214
4215
4216 for ac_func in sigaction syslog realpath setrlimit
4217 do
4218 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4219 echo "$as_me:$LINENO: checking for $ac_func" >&5
4220 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4221 if eval "test \"\${$as_ac_var+set}\" = set"; then
4222   echo $ECHO_N "(cached) $ECHO_C" >&6
4223 else
4224   cat >conftest.$ac_ext <<_ACEOF
4225 #line $LINENO "configure"
4226 #include "confdefs.h"
4227 /* System header to define __stub macros and hopefully few prototypes,
4228     which can conflict with char $ac_func (); below.  */
4229 #include <assert.h>
4230 /* Override any gcc2 internal prototype to avoid an error.  */
4231 #ifdef __cplusplus
4232 extern "C"
4233 #endif
4234 /* We use char because int might match the return type of a gcc2
4235    builtin and then its argument prototype would still apply.  */
4236 char $ac_func ();
4237 char (*f) ();
4238
4239 #ifdef F77_DUMMY_MAIN
4240 #  ifdef __cplusplus
4241      extern "C"
4242 #  endif
4243    int F77_DUMMY_MAIN() { return 1; }
4244 #endif
4245 int
4246 main ()
4247 {
4248 /* The GNU C library defines this for functions which it implements
4249     to always fail with ENOSYS.  Some functions are actually named
4250     something starting with __ and the normal name is an alias.  */
4251 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4252 choke me
4253 #else
4254 f = $ac_func;
4255 #endif
4256
4257   ;
4258   return 0;
4259 }
4260 _ACEOF
4261 rm -f conftest.$ac_objext conftest$ac_exeext
4262 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4263   (eval $ac_link) 2>&5
4264   ac_status=$?
4265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4266   (exit $ac_status); } &&
4267          { ac_try='test -s conftest$ac_exeext'
4268   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4269   (eval $ac_try) 2>&5
4270   ac_status=$?
4271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4272   (exit $ac_status); }; }; then
4273   eval "$as_ac_var=yes"
4274 else
4275   echo "$as_me: failed program was:" >&5
4276 cat conftest.$ac_ext >&5
4277 eval "$as_ac_var=no"
4278 fi
4279 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4280 fi
4281 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4282 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4283 if test `eval echo '${'$as_ac_var'}'` = yes; then
4284   cat >>confdefs.h <<_ACEOF
4285 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4286 _ACEOF
4287
4288 fi
4289 done
4290
4291 echo "$as_me:$LINENO: checking for struct icmp" >&5
4292 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
4293 if test "${ac_cv_have_icmp+set}" = set; then
4294   echo $ECHO_N "(cached) $ECHO_C" >&6
4295 else
4296   cat >conftest.$ac_ext <<_ACEOF
4297 #line $LINENO "configure"
4298 #include "confdefs.h"
4299 #include <stdlib.h>
4300                    #include <stdio.h>
4301                    #include <math.h>
4302                    #include <unistd.h>
4303                    #include <limits.h>
4304                    #include <signal.h>
4305                    #include <fcntl.h>
4306                    #include <sys/types.h>
4307                    #include <sys/time.h>
4308                    #include <sys/ipc.h>
4309                    #include <sys/shm.h>
4310                    #include <sys/socket.h>
4311                    #include <netinet/in_systm.h>
4312                    #include <netinet/in.h>
4313                    #include <netinet/ip.h>
4314                    #include <netinet/ip_icmp.h>
4315                    #include <netinet/udp.h>
4316                    #include <arpa/inet.h>
4317                    #include <netdb.h>
4318 #ifdef F77_DUMMY_MAIN
4319 #  ifdef __cplusplus
4320      extern "C"
4321 #  endif
4322    int F77_DUMMY_MAIN() { return 1; }
4323 #endif
4324 int
4325 main ()
4326 {
4327 struct icmp i;
4328                    struct sockaddr s;
4329                    struct sockaddr_in si;
4330                    struct ip ip;
4331                    i.icmp_type = ICMP_ECHO;
4332                    i.icmp_code = 0;
4333                    i.icmp_cksum = 0;
4334                    i.icmp_id = 0;
4335                    i.icmp_seq = 0;
4336                    si.sin_family = AF_INET;
4337                    #if defined(__DECC) || defined(_IP_VHL)
4338                    ip.ip_vhl = 0;
4339                    #else
4340                    ip.ip_hl = 0;
4341                    #endif
4342
4343   ;
4344   return 0;
4345 }
4346 _ACEOF
4347 rm -f conftest.$ac_objext
4348 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4349   (eval $ac_compile) 2>&5
4350   ac_status=$?
4351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4352   (exit $ac_status); } &&
4353          { ac_try='test -s conftest.$ac_objext'
4354   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4355   (eval $ac_try) 2>&5
4356   ac_status=$?
4357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4358   (exit $ac_status); }; }; then
4359   ac_cv_have_icmp=yes
4360 else
4361   echo "$as_me: failed program was:" >&5
4362 cat conftest.$ac_ext >&5
4363 ac_cv_have_icmp=no
4364 fi
4365 rm -f conftest.$ac_objext conftest.$ac_ext
4366 fi
4367 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
4368 echo "${ECHO_T}$ac_cv_have_icmp" >&6
4369  if test "$ac_cv_have_icmp" = yes ; then
4370    cat >>confdefs.h <<\_ACEOF
4371 #define HAVE_ICMP 1
4372 _ACEOF
4373
4374  fi
4375 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
4376 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
4377 if test "${ac_cv_have_icmphdr+set}" = set; then
4378   echo $ECHO_N "(cached) $ECHO_C" >&6
4379 else
4380   cat >conftest.$ac_ext <<_ACEOF
4381 #line $LINENO "configure"
4382 #include "confdefs.h"
4383 #include <stdlib.h>
4384                    #include <stdio.h>
4385                    #include <math.h>
4386                    #include <unistd.h>
4387                    #include <limits.h>
4388                    #include <signal.h>
4389                    #include <fcntl.h>
4390                    #include <sys/types.h>
4391                    #include <sys/time.h>
4392                    #include <sys/ipc.h>
4393                    #include <sys/shm.h>
4394                    #include <sys/socket.h>
4395                    #include <netinet/in_systm.h>
4396                    #include <netinet/in.h>
4397                    #include <netinet/ip.h>
4398                    #include <netinet/ip_icmp.h>
4399                    #include <netinet/udp.h>
4400                    #include <arpa/inet.h>
4401                    #include <netdb.h>
4402 #ifdef F77_DUMMY_MAIN
4403 #  ifdef __cplusplus
4404      extern "C"
4405 #  endif
4406    int F77_DUMMY_MAIN() { return 1; }
4407 #endif
4408 int
4409 main ()
4410 {
4411 struct icmphdr i;
4412                    struct sockaddr s;
4413                    struct sockaddr_in si;
4414                    struct ip ip;
4415                    i.type = ICMP_ECHO;
4416                    i.code = 0;
4417                    i.checksum = 0;
4418                    i.un.echo.id = 0;
4419                    i.un.echo.sequence = 0;
4420                    si.sin_family = AF_INET;
4421                    ip.ip_hl = 0;
4422   ;
4423   return 0;
4424 }
4425 _ACEOF
4426 rm -f conftest.$ac_objext
4427 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4428   (eval $ac_compile) 2>&5
4429   ac_status=$?
4430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4431   (exit $ac_status); } &&
4432          { ac_try='test -s conftest.$ac_objext'
4433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4434   (eval $ac_try) 2>&5
4435   ac_status=$?
4436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4437   (exit $ac_status); }; }; then
4438   ac_cv_have_icmphdr=yes
4439 else
4440   echo "$as_me: failed program was:" >&5
4441 cat conftest.$ac_ext >&5
4442 ac_cv_have_icmphdr=no
4443 fi
4444 rm -f conftest.$ac_objext conftest.$ac_ext
4445 fi
4446 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
4447 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
4448  if test "$ac_cv_have_icmphdr" = yes ; then
4449    cat >>confdefs.h <<\_ACEOF
4450 #define HAVE_ICMPHDR 1
4451 _ACEOF
4452
4453  fi
4454
4455
4456 for ac_header in crypt.h sys/select.h
4457 do
4458 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4459 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4460   echo "$as_me:$LINENO: checking for $ac_header" >&5
4461 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4462 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4463   echo $ECHO_N "(cached) $ECHO_C" >&6
4464 fi
4465 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4466 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4467 else
4468   # Is the header compilable?
4469 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4470 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4471 cat >conftest.$ac_ext <<_ACEOF
4472 #line $LINENO "configure"
4473 #include "confdefs.h"
4474 $ac_includes_default
4475 #include <$ac_header>
4476 _ACEOF
4477 rm -f conftest.$ac_objext
4478 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4479   (eval $ac_compile) 2>&5
4480   ac_status=$?
4481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4482   (exit $ac_status); } &&
4483          { ac_try='test -s conftest.$ac_objext'
4484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4485   (eval $ac_try) 2>&5
4486   ac_status=$?
4487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4488   (exit $ac_status); }; }; then
4489   ac_header_compiler=yes
4490 else
4491   echo "$as_me: failed program was:" >&5
4492 cat conftest.$ac_ext >&5
4493 ac_header_compiler=no
4494 fi
4495 rm -f conftest.$ac_objext conftest.$ac_ext
4496 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4497 echo "${ECHO_T}$ac_header_compiler" >&6
4498
4499 # Is the header present?
4500 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4501 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4502 cat >conftest.$ac_ext <<_ACEOF
4503 #line $LINENO "configure"
4504 #include "confdefs.h"
4505 #include <$ac_header>
4506 _ACEOF
4507 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4508   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4509   ac_status=$?
4510   egrep -v '^ *\+' conftest.er1 >conftest.err
4511   rm -f conftest.er1
4512   cat conftest.err >&5
4513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4514   (exit $ac_status); } >/dev/null; then
4515   if test -s conftest.err; then
4516     ac_cpp_err=$ac_c_preproc_warn_flag
4517   else
4518     ac_cpp_err=
4519   fi
4520 else
4521   ac_cpp_err=yes
4522 fi
4523 if test -z "$ac_cpp_err"; then
4524   ac_header_preproc=yes
4525 else
4526   echo "$as_me: failed program was:" >&5
4527   cat conftest.$ac_ext >&5
4528   ac_header_preproc=no
4529 fi
4530 rm -f conftest.err conftest.$ac_ext
4531 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4532 echo "${ECHO_T}$ac_header_preproc" >&6
4533
4534 # So?  What about this header?
4535 case $ac_header_compiler:$ac_header_preproc in
4536   yes:no )
4537     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4538 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4539     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4540 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4541   no:yes )
4542     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4543 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4544     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4545 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4546     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4547 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4548 esac
4549 echo "$as_me:$LINENO: checking for $ac_header" >&5
4550 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4551 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4552   echo $ECHO_N "(cached) $ECHO_C" >&6
4553 else
4554   eval "$as_ac_Header=$ac_header_preproc"
4555 fi
4556 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4557 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4558
4559 fi
4560 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4561   cat >>confdefs.h <<_ACEOF
4562 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4563 _ACEOF
4564
4565 fi
4566
4567 done
4568
4569 for ac_prog in perl5 perl
4570 do
4571   # Extract the first word of "$ac_prog", so it can be a program name with args.
4572 set dummy $ac_prog; ac_word=$2
4573 echo "$as_me:$LINENO: checking for $ac_word" >&5
4574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4575 if test "${ac_cv_path_PERL+set}" = set; then
4576   echo $ECHO_N "(cached) $ECHO_C" >&6
4577 else
4578   case $PERL in
4579   [\\/]* | ?:[\\/]*)
4580   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4581   ;;
4582   *)
4583   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4584 for as_dir in $PATH
4585 do
4586   IFS=$as_save_IFS
4587   test -z "$as_dir" && as_dir=.
4588   for ac_exec_ext in '' $ac_executable_extensions; do
4589   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4590     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4591     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4592     break 2
4593   fi
4594 done
4595 done
4596
4597   ;;
4598 esac
4599 fi
4600 PERL=$ac_cv_path_PERL
4601
4602 if test -n "$PERL"; then
4603   echo "$as_me:$LINENO: result: $PERL" >&5
4604 echo "${ECHO_T}$PERL" >&6
4605 else
4606   echo "$as_me:$LINENO: result: no" >&5
4607 echo "${ECHO_T}no" >&6
4608 fi
4609
4610   test -n "$PERL" && break
4611 done
4612
4613   if test -z "$PERL" ; then
4614     PERL_VERSION=0
4615   else
4616     echo "$as_me:$LINENO: checking perl version" >&5
4617 echo $ECHO_N "checking perl version... $ECHO_C" >&6
4618 if test "${ac_cv_perl_version+set}" = set; then
4619   echo $ECHO_N "(cached) $ECHO_C" >&6
4620 else
4621   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
4622 fi
4623 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
4624 echo "${ECHO_T}$ac_cv_perl_version" >&6
4625     PERL_VERSION=$ac_cv_perl_version
4626   fi
4627
4628
4629 if test -z "$PERL" ; then
4630   # don't let it be blank...
4631   PERL=/usr/bin/perl
4632 fi
4633
4634 echo "$as_me:$LINENO: checking for X" >&5
4635 echo $ECHO_N "checking for X... $ECHO_C" >&6
4636
4637
4638 # Check whether --with-x or --without-x was given.
4639 if test "${with_x+set}" = set; then
4640   withval="$with_x"
4641
4642 fi;
4643 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4644 if test "x$with_x" = xno; then
4645   # The user explicitly disabled X.
4646   have_x=disabled
4647 else
4648   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4649     # Both variables are already set.
4650     have_x=yes
4651   else
4652     if test "${ac_cv_have_x+set}" = set; then
4653   echo $ECHO_N "(cached) $ECHO_C" >&6
4654 else
4655   # One or both of the vars are not set, and there is no cached value.
4656 ac_x_includes=no ac_x_libraries=no
4657 rm -fr conftest.dir
4658 if mkdir conftest.dir; then
4659   cd conftest.dir
4660   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4661   cat >Imakefile <<'_ACEOF'
4662 acfindx:
4663         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4664 _ACEOF
4665   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4666     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4667     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4668     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4669     for ac_extension in a so sl; do
4670       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4671          test -f $ac_im_libdir/libX11.$ac_extension; then
4672         ac_im_usrlibdir=$ac_im_libdir; break
4673       fi
4674     done
4675     # Screen out bogus values from the imake configuration.  They are
4676     # bogus both because they are the default anyway, and because
4677     # using them would break gcc on systems where it needs fixed includes.
4678     case $ac_im_incroot in
4679         /usr/include) ;;
4680         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4681     esac
4682     case $ac_im_usrlibdir in
4683         /usr/lib | /lib) ;;
4684         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4685     esac
4686   fi
4687   cd ..
4688   rm -fr conftest.dir
4689 fi
4690
4691 # Standard set of common directories for X headers.
4692 # Check X11 before X11Rn because it is often a symlink to the current release.
4693 ac_x_header_dirs='
4694 /usr/X11/include
4695 /usr/X11R6/include
4696 /usr/X11R5/include
4697 /usr/X11R4/include
4698
4699 /usr/include/X11
4700 /usr/include/X11R6
4701 /usr/include/X11R5
4702 /usr/include/X11R4
4703
4704 /usr/local/X11/include
4705 /usr/local/X11R6/include
4706 /usr/local/X11R5/include
4707 /usr/local/X11R4/include
4708
4709 /usr/local/include/X11
4710 /usr/local/include/X11R6
4711 /usr/local/include/X11R5
4712 /usr/local/include/X11R4
4713
4714 /usr/X386/include
4715 /usr/x386/include
4716 /usr/XFree86/include/X11
4717
4718 /usr/include
4719 /usr/local/include
4720 /usr/unsupported/include
4721 /usr/athena/include
4722 /usr/local/x11r5/include
4723 /usr/lpp/Xamples/include
4724
4725 /usr/openwin/include
4726 /usr/openwin/share/include'
4727
4728 if test "$ac_x_includes" = no; then
4729   # Guess where to find include files, by looking for Intrinsic.h.
4730   # First, try using that file with no special directory specified.
4731   cat >conftest.$ac_ext <<_ACEOF
4732 #line $LINENO "configure"
4733 #include "confdefs.h"
4734 #include <X11/Intrinsic.h>
4735 _ACEOF
4736 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4737   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4738   ac_status=$?
4739   egrep -v '^ *\+' conftest.er1 >conftest.err
4740   rm -f conftest.er1
4741   cat conftest.err >&5
4742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4743   (exit $ac_status); } >/dev/null; then
4744   if test -s conftest.err; then
4745     ac_cpp_err=$ac_c_preproc_warn_flag
4746   else
4747     ac_cpp_err=
4748   fi
4749 else
4750   ac_cpp_err=yes
4751 fi
4752 if test -z "$ac_cpp_err"; then
4753   # We can compile using X headers with no special include directory.
4754 ac_x_includes=
4755 else
4756   echo "$as_me: failed program was:" >&5
4757   cat conftest.$ac_ext >&5
4758   for ac_dir in $ac_x_header_dirs; do
4759   if test -r "$ac_dir/X11/Intrinsic.h"; then
4760     ac_x_includes=$ac_dir
4761     break
4762   fi
4763 done
4764 fi
4765 rm -f conftest.err conftest.$ac_ext
4766 fi # $ac_x_includes = no
4767
4768 if test "$ac_x_libraries" = no; then
4769   # Check for the libraries.
4770   # See if we find them without any special options.
4771   # Don't add to $LIBS permanently.
4772   ac_save_LIBS=$LIBS
4773   LIBS="-lXt $LIBS"
4774   cat >conftest.$ac_ext <<_ACEOF
4775 #line $LINENO "configure"
4776 #include "confdefs.h"
4777 #include <X11/Intrinsic.h>
4778 #ifdef F77_DUMMY_MAIN
4779 #  ifdef __cplusplus
4780      extern "C"
4781 #  endif
4782    int F77_DUMMY_MAIN() { return 1; }
4783 #endif
4784 int
4785 main ()
4786 {
4787 XtMalloc (0)
4788   ;
4789   return 0;
4790 }
4791 _ACEOF
4792 rm -f conftest.$ac_objext conftest$ac_exeext
4793 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4794   (eval $ac_link) 2>&5
4795   ac_status=$?
4796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4797   (exit $ac_status); } &&
4798          { ac_try='test -s conftest$ac_exeext'
4799   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4800   (eval $ac_try) 2>&5
4801   ac_status=$?
4802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4803   (exit $ac_status); }; }; then
4804   LIBS=$ac_save_LIBS
4805 # We can link X programs with no special library path.
4806 ac_x_libraries=
4807 else
4808   echo "$as_me: failed program was:" >&5
4809 cat conftest.$ac_ext >&5
4810 LIBS=$ac_save_LIBS
4811 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
4812 do
4813   # Don't even attempt the hair of trying to link an X program!
4814   for ac_extension in a so sl; do
4815     if test -r $ac_dir/libXt.$ac_extension; then
4816       ac_x_libraries=$ac_dir
4817       break 2
4818     fi
4819   done
4820 done
4821 fi
4822 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4823 fi # $ac_x_libraries = no
4824
4825 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
4826   # Didn't find X anywhere.  Cache the known absence of X.
4827   ac_cv_have_x="have_x=no"
4828 else
4829   # Record where we found X for the cache.
4830   ac_cv_have_x="have_x=yes \
4831                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4832 fi
4833 fi
4834
4835   fi
4836   eval "$ac_cv_have_x"
4837 fi # $with_x != no
4838
4839 if test "$have_x" != yes; then
4840   echo "$as_me:$LINENO: result: $have_x" >&5
4841 echo "${ECHO_T}$have_x" >&6
4842   no_x=yes
4843 else
4844   # If each of the values was on the command line, it overrides each guess.
4845   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4846   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4847   # Update the cache value to reflect the command line values.
4848   ac_cv_have_x="have_x=yes \
4849                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4850   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
4851 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
4852 fi
4853
4854 if test "$no_x" = yes; then
4855   # Not all programs may use this symbol, but it does not hurt to define it.
4856
4857 cat >>confdefs.h <<\_ACEOF
4858 #define X_DISPLAY_MISSING 1
4859 _ACEOF
4860
4861   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4862 else
4863   if test -n "$x_includes"; then
4864     X_CFLAGS="$X_CFLAGS -I$x_includes"
4865   fi
4866
4867   # It would also be nice to do this for all -L options, not just this one.
4868   if test -n "$x_libraries"; then
4869     X_LIBS="$X_LIBS -L$x_libraries"
4870     # For Solaris; some versions of Sun CC require a space after -R and
4871     # others require no space.  Words are not sufficient . . . .
4872     case `(uname -sr) 2>/dev/null` in
4873     "SunOS 5"*)
4874       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
4875 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
4876       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
4877       cat >conftest.$ac_ext <<_ACEOF
4878 #line $LINENO "configure"
4879 #include "confdefs.h"
4880
4881 #ifdef F77_DUMMY_MAIN
4882 #  ifdef __cplusplus
4883      extern "C"
4884 #  endif
4885    int F77_DUMMY_MAIN() { return 1; }
4886 #endif
4887 int
4888 main ()
4889 {
4890
4891   ;
4892   return 0;
4893 }
4894 _ACEOF
4895 rm -f conftest.$ac_objext conftest$ac_exeext
4896 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4897   (eval $ac_link) 2>&5
4898   ac_status=$?
4899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4900   (exit $ac_status); } &&
4901          { ac_try='test -s conftest$ac_exeext'
4902   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4903   (eval $ac_try) 2>&5
4904   ac_status=$?
4905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4906   (exit $ac_status); }; }; then
4907   ac_R_nospace=yes
4908 else
4909   echo "$as_me: failed program was:" >&5
4910 cat conftest.$ac_ext >&5
4911 ac_R_nospace=no
4912 fi
4913 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4914       if test $ac_R_nospace = yes; then
4915         echo "$as_me:$LINENO: result: no" >&5
4916 echo "${ECHO_T}no" >&6
4917         X_LIBS="$X_LIBS -R$x_libraries"
4918       else
4919         LIBS="$ac_xsave_LIBS -R $x_libraries"
4920         cat >conftest.$ac_ext <<_ACEOF
4921 #line $LINENO "configure"
4922 #include "confdefs.h"
4923
4924 #ifdef F77_DUMMY_MAIN
4925 #  ifdef __cplusplus
4926      extern "C"
4927 #  endif
4928    int F77_DUMMY_MAIN() { return 1; }
4929 #endif
4930 int
4931 main ()
4932 {
4933
4934   ;
4935   return 0;
4936 }
4937 _ACEOF
4938 rm -f conftest.$ac_objext conftest$ac_exeext
4939 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4940   (eval $ac_link) 2>&5
4941   ac_status=$?
4942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4943   (exit $ac_status); } &&
4944          { ac_try='test -s conftest$ac_exeext'
4945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4946   (eval $ac_try) 2>&5
4947   ac_status=$?
4948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4949   (exit $ac_status); }; }; then
4950   ac_R_space=yes
4951 else
4952   echo "$as_me: failed program was:" >&5
4953 cat conftest.$ac_ext >&5
4954 ac_R_space=no
4955 fi
4956 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4957         if test $ac_R_space = yes; then
4958           echo "$as_me:$LINENO: result: yes" >&5
4959 echo "${ECHO_T}yes" >&6
4960           X_LIBS="$X_LIBS -R $x_libraries"
4961         else
4962           echo "$as_me:$LINENO: result: neither works" >&5
4963 echo "${ECHO_T}neither works" >&6
4964         fi
4965       fi
4966       LIBS=$ac_xsave_LIBS
4967     esac
4968   fi
4969
4970   # Check for system-dependent libraries X programs must link with.
4971   # Do this before checking for the system-independent R6 libraries
4972   # (-lICE), since we may need -lsocket or whatever for X linking.
4973
4974   if test "$ISC" = yes; then
4975     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4976   else
4977     # Martyn Johnson says this is needed for Ultrix, if the X
4978     # libraries were built with DECnet support.  And Karl Berry says
4979     # the Alpha needs dnet_stub (dnet does not exist).
4980     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
4981     cat >conftest.$ac_ext <<_ACEOF
4982 #line $LINENO "configure"
4983 #include "confdefs.h"
4984
4985 /* Override any gcc2 internal prototype to avoid an error.  */
4986 #ifdef __cplusplus
4987 extern "C"
4988 #endif
4989 /* We use char because int might match the return type of a gcc2
4990    builtin and then its argument prototype would still apply.  */
4991 char XOpenDisplay ();
4992 #ifdef F77_DUMMY_MAIN
4993 #  ifdef __cplusplus
4994      extern "C"
4995 #  endif
4996    int F77_DUMMY_MAIN() { return 1; }
4997 #endif
4998 int
4999 main ()
5000 {
5001 XOpenDisplay ();
5002   ;
5003   return 0;
5004 }
5005 _ACEOF
5006 rm -f conftest.$ac_objext conftest$ac_exeext
5007 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5008   (eval $ac_link) 2>&5
5009   ac_status=$?
5010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5011   (exit $ac_status); } &&
5012          { ac_try='test -s conftest$ac_exeext'
5013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5014   (eval $ac_try) 2>&5
5015   ac_status=$?
5016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5017   (exit $ac_status); }; }; then
5018   :
5019 else
5020   echo "$as_me: failed program was:" >&5
5021 cat conftest.$ac_ext >&5
5022 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5023 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5024 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5025   echo $ECHO_N "(cached) $ECHO_C" >&6
5026 else
5027   ac_check_lib_save_LIBS=$LIBS
5028 LIBS="-ldnet  $LIBS"
5029 cat >conftest.$ac_ext <<_ACEOF
5030 #line $LINENO "configure"
5031 #include "confdefs.h"
5032
5033 /* Override any gcc2 internal prototype to avoid an error.  */
5034 #ifdef __cplusplus
5035 extern "C"
5036 #endif
5037 /* We use char because int might match the return type of a gcc2
5038    builtin and then its argument prototype would still apply.  */
5039 char dnet_ntoa ();
5040 #ifdef F77_DUMMY_MAIN
5041 #  ifdef __cplusplus
5042      extern "C"
5043 #  endif
5044    int F77_DUMMY_MAIN() { return 1; }
5045 #endif
5046 int
5047 main ()
5048 {
5049 dnet_ntoa ();
5050   ;
5051   return 0;
5052 }
5053 _ACEOF
5054 rm -f conftest.$ac_objext conftest$ac_exeext
5055 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5056   (eval $ac_link) 2>&5
5057   ac_status=$?
5058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5059   (exit $ac_status); } &&
5060          { ac_try='test -s conftest$ac_exeext'
5061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5062   (eval $ac_try) 2>&5
5063   ac_status=$?
5064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065   (exit $ac_status); }; }; then
5066   ac_cv_lib_dnet_dnet_ntoa=yes
5067 else
5068   echo "$as_me: failed program was:" >&5
5069 cat conftest.$ac_ext >&5
5070 ac_cv_lib_dnet_dnet_ntoa=no
5071 fi
5072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5073 LIBS=$ac_check_lib_save_LIBS
5074 fi
5075 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5076 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5077 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5078   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5079 fi
5080
5081     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5082       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5083 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5084 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5085   echo $ECHO_N "(cached) $ECHO_C" >&6
5086 else
5087   ac_check_lib_save_LIBS=$LIBS
5088 LIBS="-ldnet_stub  $LIBS"
5089 cat >conftest.$ac_ext <<_ACEOF
5090 #line $LINENO "configure"
5091 #include "confdefs.h"
5092
5093 /* Override any gcc2 internal prototype to avoid an error.  */
5094 #ifdef __cplusplus
5095 extern "C"
5096 #endif
5097 /* We use char because int might match the return type of a gcc2
5098    builtin and then its argument prototype would still apply.  */
5099 char dnet_ntoa ();
5100 #ifdef F77_DUMMY_MAIN
5101 #  ifdef __cplusplus
5102      extern "C"
5103 #  endif
5104    int F77_DUMMY_MAIN() { return 1; }
5105 #endif
5106 int
5107 main ()
5108 {
5109 dnet_ntoa ();
5110   ;
5111   return 0;
5112 }
5113 _ACEOF
5114 rm -f conftest.$ac_objext conftest$ac_exeext
5115 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5116   (eval $ac_link) 2>&5
5117   ac_status=$?
5118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5119   (exit $ac_status); } &&
5120          { ac_try='test -s conftest$ac_exeext'
5121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5122   (eval $ac_try) 2>&5
5123   ac_status=$?
5124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5125   (exit $ac_status); }; }; then
5126   ac_cv_lib_dnet_stub_dnet_ntoa=yes
5127 else
5128   echo "$as_me: failed program was:" >&5
5129 cat conftest.$ac_ext >&5
5130 ac_cv_lib_dnet_stub_dnet_ntoa=no
5131 fi
5132 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5133 LIBS=$ac_check_lib_save_LIBS
5134 fi
5135 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5136 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5137 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5138   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5139 fi
5140
5141     fi
5142 fi
5143 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5144     LIBS="$ac_xsave_LIBS"
5145
5146     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5147     # to get the SysV transport functions.
5148     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5149     # needs -lnsl.
5150     # The nsl library prevents programs from opening the X display
5151     # on Irix 5.2, according to T.E. Dickey.
5152     # The functions gethostbyname, getservbyname, and inet_addr are
5153     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5154     echo "$as_me:$LINENO: checking for gethostbyname" >&5
5155 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5156 if test "${ac_cv_func_gethostbyname+set}" = set; then
5157   echo $ECHO_N "(cached) $ECHO_C" >&6
5158 else
5159   cat >conftest.$ac_ext <<_ACEOF
5160 #line $LINENO "configure"
5161 #include "confdefs.h"
5162 /* System header to define __stub macros and hopefully few prototypes,
5163     which can conflict with char gethostbyname (); below.  */
5164 #include <assert.h>
5165 /* Override any gcc2 internal prototype to avoid an error.  */
5166 #ifdef __cplusplus
5167 extern "C"
5168 #endif
5169 /* We use char because int might match the return type of a gcc2
5170    builtin and then its argument prototype would still apply.  */
5171 char gethostbyname ();
5172 char (*f) ();
5173
5174 #ifdef F77_DUMMY_MAIN
5175 #  ifdef __cplusplus
5176      extern "C"
5177 #  endif
5178    int F77_DUMMY_MAIN() { return 1; }
5179 #endif
5180 int
5181 main ()
5182 {
5183 /* The GNU C library defines this for functions which it implements
5184     to always fail with ENOSYS.  Some functions are actually named
5185     something starting with __ and the normal name is an alias.  */
5186 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5187 choke me
5188 #else
5189 f = gethostbyname;
5190 #endif
5191
5192   ;
5193   return 0;
5194 }
5195 _ACEOF
5196 rm -f conftest.$ac_objext conftest$ac_exeext
5197 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5198   (eval $ac_link) 2>&5
5199   ac_status=$?
5200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5201   (exit $ac_status); } &&
5202          { ac_try='test -s conftest$ac_exeext'
5203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5204   (eval $ac_try) 2>&5
5205   ac_status=$?
5206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5207   (exit $ac_status); }; }; then
5208   ac_cv_func_gethostbyname=yes
5209 else
5210   echo "$as_me: failed program was:" >&5
5211 cat conftest.$ac_ext >&5
5212 ac_cv_func_gethostbyname=no
5213 fi
5214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5215 fi
5216 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5217 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5218
5219     if test $ac_cv_func_gethostbyname = no; then
5220       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5221 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5222 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5223   echo $ECHO_N "(cached) $ECHO_C" >&6
5224 else
5225   ac_check_lib_save_LIBS=$LIBS
5226 LIBS="-lnsl  $LIBS"
5227 cat >conftest.$ac_ext <<_ACEOF
5228 #line $LINENO "configure"
5229 #include "confdefs.h"
5230
5231 /* Override any gcc2 internal prototype to avoid an error.  */
5232 #ifdef __cplusplus
5233 extern "C"
5234 #endif
5235 /* We use char because int might match the return type of a gcc2
5236    builtin and then its argument prototype would still apply.  */
5237 char gethostbyname ();
5238 #ifdef F77_DUMMY_MAIN
5239 #  ifdef __cplusplus
5240      extern "C"
5241 #  endif
5242    int F77_DUMMY_MAIN() { return 1; }
5243 #endif
5244 int
5245 main ()
5246 {
5247 gethostbyname ();
5248   ;
5249   return 0;
5250 }
5251 _ACEOF
5252 rm -f conftest.$ac_objext conftest$ac_exeext
5253 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5254   (eval $ac_link) 2>&5
5255   ac_status=$?
5256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5257   (exit $ac_status); } &&
5258          { ac_try='test -s conftest$ac_exeext'
5259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5260   (eval $ac_try) 2>&5
5261   ac_status=$?
5262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5263   (exit $ac_status); }; }; then
5264   ac_cv_lib_nsl_gethostbyname=yes
5265 else
5266   echo "$as_me: failed program was:" >&5
5267 cat conftest.$ac_ext >&5
5268 ac_cv_lib_nsl_gethostbyname=no
5269 fi
5270 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5271 LIBS=$ac_check_lib_save_LIBS
5272 fi
5273 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5274 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5275 if test $ac_cv_lib_nsl_gethostbyname = yes; then
5276   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5277 fi
5278
5279       if test $ac_cv_lib_nsl_gethostbyname = no; then
5280         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5281 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5282 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5283   echo $ECHO_N "(cached) $ECHO_C" >&6
5284 else
5285   ac_check_lib_save_LIBS=$LIBS
5286 LIBS="-lbsd  $LIBS"
5287 cat >conftest.$ac_ext <<_ACEOF
5288 #line $LINENO "configure"
5289 #include "confdefs.h"
5290
5291 /* Override any gcc2 internal prototype to avoid an error.  */
5292 #ifdef __cplusplus
5293 extern "C"
5294 #endif
5295 /* We use char because int might match the return type of a gcc2
5296    builtin and then its argument prototype would still apply.  */
5297 char gethostbyname ();
5298 #ifdef F77_DUMMY_MAIN
5299 #  ifdef __cplusplus
5300      extern "C"
5301 #  endif
5302    int F77_DUMMY_MAIN() { return 1; }
5303 #endif
5304 int
5305 main ()
5306 {
5307 gethostbyname ();
5308   ;
5309   return 0;
5310 }
5311 _ACEOF
5312 rm -f conftest.$ac_objext conftest$ac_exeext
5313 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5314   (eval $ac_link) 2>&5
5315   ac_status=$?
5316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5317   (exit $ac_status); } &&
5318          { ac_try='test -s conftest$ac_exeext'
5319   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5320   (eval $ac_try) 2>&5
5321   ac_status=$?
5322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5323   (exit $ac_status); }; }; then
5324   ac_cv_lib_bsd_gethostbyname=yes
5325 else
5326   echo "$as_me: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
5328 ac_cv_lib_bsd_gethostbyname=no
5329 fi
5330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5331 LIBS=$ac_check_lib_save_LIBS
5332 fi
5333 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
5334 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
5335 if test $ac_cv_lib_bsd_gethostbyname = yes; then
5336   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5337 fi
5338
5339       fi
5340     fi
5341
5342     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5343     # socket/setsockopt and other routines are undefined under SCO ODT
5344     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5345     # on later versions), says Simon Leinen: it contains gethostby*
5346     # variants that don't use the nameserver (or something).  -lsocket
5347     # must be given before -lnsl if both are needed.  We assume that
5348     # if connect needs -lnsl, so does gethostbyname.
5349     echo "$as_me:$LINENO: checking for connect" >&5
5350 echo $ECHO_N "checking for connect... $ECHO_C" >&6
5351 if test "${ac_cv_func_connect+set}" = set; then
5352   echo $ECHO_N "(cached) $ECHO_C" >&6
5353 else
5354   cat >conftest.$ac_ext <<_ACEOF
5355 #line $LINENO "configure"
5356 #include "confdefs.h"
5357 /* System header to define __stub macros and hopefully few prototypes,
5358     which can conflict with char connect (); below.  */
5359 #include <assert.h>
5360 /* Override any gcc2 internal prototype to avoid an error.  */
5361 #ifdef __cplusplus
5362 extern "C"
5363 #endif
5364 /* We use char because int might match the return type of a gcc2
5365    builtin and then its argument prototype would still apply.  */
5366 char connect ();
5367 char (*f) ();
5368
5369 #ifdef F77_DUMMY_MAIN
5370 #  ifdef __cplusplus
5371      extern "C"
5372 #  endif
5373    int F77_DUMMY_MAIN() { return 1; }
5374 #endif
5375 int
5376 main ()
5377 {
5378 /* The GNU C library defines this for functions which it implements
5379     to always fail with ENOSYS.  Some functions are actually named
5380     something starting with __ and the normal name is an alias.  */
5381 #if defined (__stub_connect) || defined (__stub___connect)
5382 choke me
5383 #else
5384 f = connect;
5385 #endif
5386
5387   ;
5388   return 0;
5389 }
5390 _ACEOF
5391 rm -f conftest.$ac_objext conftest$ac_exeext
5392 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5393   (eval $ac_link) 2>&5
5394   ac_status=$?
5395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5396   (exit $ac_status); } &&
5397          { ac_try='test -s conftest$ac_exeext'
5398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5399   (eval $ac_try) 2>&5
5400   ac_status=$?
5401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5402   (exit $ac_status); }; }; then
5403   ac_cv_func_connect=yes
5404 else
5405   echo "$as_me: failed program was:" >&5
5406 cat conftest.$ac_ext >&5
5407 ac_cv_func_connect=no
5408 fi
5409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5410 fi
5411 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5412 echo "${ECHO_T}$ac_cv_func_connect" >&6
5413
5414     if test $ac_cv_func_connect = no; then
5415       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
5416 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
5417 if test "${ac_cv_lib_socket_connect+set}" = set; then
5418   echo $ECHO_N "(cached) $ECHO_C" >&6
5419 else
5420   ac_check_lib_save_LIBS=$LIBS
5421 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5422 cat >conftest.$ac_ext <<_ACEOF
5423 #line $LINENO "configure"
5424 #include "confdefs.h"
5425
5426 /* Override any gcc2 internal prototype to avoid an error.  */
5427 #ifdef __cplusplus
5428 extern "C"
5429 #endif
5430 /* We use char because int might match the return type of a gcc2
5431    builtin and then its argument prototype would still apply.  */
5432 char connect ();
5433 #ifdef F77_DUMMY_MAIN
5434 #  ifdef __cplusplus
5435      extern "C"
5436 #  endif
5437    int F77_DUMMY_MAIN() { return 1; }
5438 #endif
5439 int
5440 main ()
5441 {
5442 connect ();
5443   ;
5444   return 0;
5445 }
5446 _ACEOF
5447 rm -f conftest.$ac_objext conftest$ac_exeext
5448 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5449   (eval $ac_link) 2>&5
5450   ac_status=$?
5451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5452   (exit $ac_status); } &&
5453          { ac_try='test -s conftest$ac_exeext'
5454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5455   (eval $ac_try) 2>&5
5456   ac_status=$?
5457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5458   (exit $ac_status); }; }; then
5459   ac_cv_lib_socket_connect=yes
5460 else
5461   echo "$as_me: failed program was:" >&5
5462 cat conftest.$ac_ext >&5
5463 ac_cv_lib_socket_connect=no
5464 fi
5465 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5466 LIBS=$ac_check_lib_save_LIBS
5467 fi
5468 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
5469 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
5470 if test $ac_cv_lib_socket_connect = yes; then
5471   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5472 fi
5473
5474     fi
5475
5476     # Guillermo Gomez says -lposix is necessary on A/UX.
5477     echo "$as_me:$LINENO: checking for remove" >&5
5478 echo $ECHO_N "checking for remove... $ECHO_C" >&6
5479 if test "${ac_cv_func_remove+set}" = set; then
5480   echo $ECHO_N "(cached) $ECHO_C" >&6
5481 else
5482   cat >conftest.$ac_ext <<_ACEOF
5483 #line $LINENO "configure"
5484 #include "confdefs.h"
5485 /* System header to define __stub macros and hopefully few prototypes,
5486     which can conflict with char remove (); below.  */
5487 #include <assert.h>
5488 /* Override any gcc2 internal prototype to avoid an error.  */
5489 #ifdef __cplusplus
5490 extern "C"
5491 #endif
5492 /* We use char because int might match the return type of a gcc2
5493    builtin and then its argument prototype would still apply.  */
5494 char remove ();
5495 char (*f) ();
5496
5497 #ifdef F77_DUMMY_MAIN
5498 #  ifdef __cplusplus
5499      extern "C"
5500 #  endif
5501    int F77_DUMMY_MAIN() { return 1; }
5502 #endif
5503 int
5504 main ()
5505 {
5506 /* The GNU C library defines this for functions which it implements
5507     to always fail with ENOSYS.  Some functions are actually named
5508     something starting with __ and the normal name is an alias.  */
5509 #if defined (__stub_remove) || defined (__stub___remove)
5510 choke me
5511 #else
5512 f = remove;
5513 #endif
5514
5515   ;
5516   return 0;
5517 }
5518 _ACEOF
5519 rm -f conftest.$ac_objext conftest$ac_exeext
5520 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5521   (eval $ac_link) 2>&5
5522   ac_status=$?
5523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5524   (exit $ac_status); } &&
5525          { ac_try='test -s conftest$ac_exeext'
5526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5527   (eval $ac_try) 2>&5
5528   ac_status=$?
5529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5530   (exit $ac_status); }; }; then
5531   ac_cv_func_remove=yes
5532 else
5533   echo "$as_me: failed program was:" >&5
5534 cat conftest.$ac_ext >&5
5535 ac_cv_func_remove=no
5536 fi
5537 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5538 fi
5539 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
5540 echo "${ECHO_T}$ac_cv_func_remove" >&6
5541
5542     if test $ac_cv_func_remove = no; then
5543       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
5544 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
5545 if test "${ac_cv_lib_posix_remove+set}" = set; then
5546   echo $ECHO_N "(cached) $ECHO_C" >&6
5547 else
5548   ac_check_lib_save_LIBS=$LIBS
5549 LIBS="-lposix  $LIBS"
5550 cat >conftest.$ac_ext <<_ACEOF
5551 #line $LINENO "configure"
5552 #include "confdefs.h"
5553
5554 /* Override any gcc2 internal prototype to avoid an error.  */
5555 #ifdef __cplusplus
5556 extern "C"
5557 #endif
5558 /* We use char because int might match the return type of a gcc2
5559    builtin and then its argument prototype would still apply.  */
5560 char remove ();
5561 #ifdef F77_DUMMY_MAIN
5562 #  ifdef __cplusplus
5563      extern "C"
5564 #  endif
5565    int F77_DUMMY_MAIN() { return 1; }
5566 #endif
5567 int
5568 main ()
5569 {
5570 remove ();
5571   ;
5572   return 0;
5573 }
5574 _ACEOF
5575 rm -f conftest.$ac_objext conftest$ac_exeext
5576 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5577   (eval $ac_link) 2>&5
5578   ac_status=$?
5579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5580   (exit $ac_status); } &&
5581          { ac_try='test -s conftest$ac_exeext'
5582   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5583   (eval $ac_try) 2>&5
5584   ac_status=$?
5585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5586   (exit $ac_status); }; }; then
5587   ac_cv_lib_posix_remove=yes
5588 else
5589   echo "$as_me: failed program was:" >&5
5590 cat conftest.$ac_ext >&5
5591 ac_cv_lib_posix_remove=no
5592 fi
5593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5594 LIBS=$ac_check_lib_save_LIBS
5595 fi
5596 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
5597 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
5598 if test $ac_cv_lib_posix_remove = yes; then
5599   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5600 fi
5601
5602     fi
5603
5604     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5605     echo "$as_me:$LINENO: checking for shmat" >&5
5606 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
5607 if test "${ac_cv_func_shmat+set}" = set; then
5608   echo $ECHO_N "(cached) $ECHO_C" >&6
5609 else
5610   cat >conftest.$ac_ext <<_ACEOF
5611 #line $LINENO "configure"
5612 #include "confdefs.h"
5613 /* System header to define __stub macros and hopefully few prototypes,
5614     which can conflict with char shmat (); below.  */
5615 #include <assert.h>
5616 /* Override any gcc2 internal prototype to avoid an error.  */
5617 #ifdef __cplusplus
5618 extern "C"
5619 #endif
5620 /* We use char because int might match the return type of a gcc2
5621    builtin and then its argument prototype would still apply.  */
5622 char shmat ();
5623 char (*f) ();
5624
5625 #ifdef F77_DUMMY_MAIN
5626 #  ifdef __cplusplus
5627      extern "C"
5628 #  endif
5629    int F77_DUMMY_MAIN() { return 1; }
5630 #endif
5631 int
5632 main ()
5633 {
5634 /* The GNU C library defines this for functions which it implements
5635     to always fail with ENOSYS.  Some functions are actually named
5636     something starting with __ and the normal name is an alias.  */
5637 #if defined (__stub_shmat) || defined (__stub___shmat)
5638 choke me
5639 #else
5640 f = shmat;
5641 #endif
5642
5643   ;
5644   return 0;
5645 }
5646 _ACEOF
5647 rm -f conftest.$ac_objext conftest$ac_exeext
5648 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5649   (eval $ac_link) 2>&5
5650   ac_status=$?
5651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5652   (exit $ac_status); } &&
5653          { ac_try='test -s conftest$ac_exeext'
5654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5655   (eval $ac_try) 2>&5
5656   ac_status=$?
5657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5658   (exit $ac_status); }; }; then
5659   ac_cv_func_shmat=yes
5660 else
5661   echo "$as_me: failed program was:" >&5
5662 cat conftest.$ac_ext >&5
5663 ac_cv_func_shmat=no
5664 fi
5665 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5666 fi
5667 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
5668 echo "${ECHO_T}$ac_cv_func_shmat" >&6
5669
5670     if test $ac_cv_func_shmat = no; then
5671       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
5672 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
5673 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
5674   echo $ECHO_N "(cached) $ECHO_C" >&6
5675 else
5676   ac_check_lib_save_LIBS=$LIBS
5677 LIBS="-lipc  $LIBS"
5678 cat >conftest.$ac_ext <<_ACEOF
5679 #line $LINENO "configure"
5680 #include "confdefs.h"
5681
5682 /* Override any gcc2 internal prototype to avoid an error.  */
5683 #ifdef __cplusplus
5684 extern "C"
5685 #endif
5686 /* We use char because int might match the return type of a gcc2
5687    builtin and then its argument prototype would still apply.  */
5688 char shmat ();
5689 #ifdef F77_DUMMY_MAIN
5690 #  ifdef __cplusplus
5691      extern "C"
5692 #  endif
5693    int F77_DUMMY_MAIN() { return 1; }
5694 #endif
5695 int
5696 main ()
5697 {
5698 shmat ();
5699   ;
5700   return 0;
5701 }
5702 _ACEOF
5703 rm -f conftest.$ac_objext conftest$ac_exeext
5704 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5705   (eval $ac_link) 2>&5
5706   ac_status=$?
5707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5708   (exit $ac_status); } &&
5709          { ac_try='test -s conftest$ac_exeext'
5710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5711   (eval $ac_try) 2>&5
5712   ac_status=$?
5713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5714   (exit $ac_status); }; }; then
5715   ac_cv_lib_ipc_shmat=yes
5716 else
5717   echo "$as_me: failed program was:" >&5
5718 cat conftest.$ac_ext >&5
5719 ac_cv_lib_ipc_shmat=no
5720 fi
5721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5722 LIBS=$ac_check_lib_save_LIBS
5723 fi
5724 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
5725 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
5726 if test $ac_cv_lib_ipc_shmat = yes; then
5727   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5728 fi
5729
5730     fi
5731   fi
5732
5733   # Check for libraries that X11R6 Xt/Xaw programs need.
5734   ac_save_LDFLAGS=$LDFLAGS
5735   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5736   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5737   # check for ICE first), but we must link in the order -lSM -lICE or
5738   # we get undefined symbols.  So assume we have SM if we have ICE.
5739   # These have to be linked with before -lX11, unlike the other
5740   # libraries we check for below, so use a different variable.
5741   # John Interrante, Karl Berry
5742   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
5743 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
5744 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
5745   echo $ECHO_N "(cached) $ECHO_C" >&6
5746 else
5747   ac_check_lib_save_LIBS=$LIBS
5748 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5749 cat >conftest.$ac_ext <<_ACEOF
5750 #line $LINENO "configure"
5751 #include "confdefs.h"
5752
5753 /* Override any gcc2 internal prototype to avoid an error.  */
5754 #ifdef __cplusplus
5755 extern "C"
5756 #endif
5757 /* We use char because int might match the return type of a gcc2
5758    builtin and then its argument prototype would still apply.  */
5759 char IceConnectionNumber ();
5760 #ifdef F77_DUMMY_MAIN
5761 #  ifdef __cplusplus
5762      extern "C"
5763 #  endif
5764    int F77_DUMMY_MAIN() { return 1; }
5765 #endif
5766 int
5767 main ()
5768 {
5769 IceConnectionNumber ();
5770   ;
5771   return 0;
5772 }
5773 _ACEOF
5774 rm -f conftest.$ac_objext conftest$ac_exeext
5775 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5776   (eval $ac_link) 2>&5
5777   ac_status=$?
5778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5779   (exit $ac_status); } &&
5780          { ac_try='test -s conftest$ac_exeext'
5781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5782   (eval $ac_try) 2>&5
5783   ac_status=$?
5784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5785   (exit $ac_status); }; }; then
5786   ac_cv_lib_ICE_IceConnectionNumber=yes
5787 else
5788   echo "$as_me: failed program was:" >&5
5789 cat conftest.$ac_ext >&5
5790 ac_cv_lib_ICE_IceConnectionNumber=no
5791 fi
5792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5793 LIBS=$ac_check_lib_save_LIBS
5794 fi
5795 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
5796 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
5797 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
5798   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5799 fi
5800
5801   LDFLAGS=$ac_save_LDFLAGS
5802
5803 fi
5804
5805
5806 if test "$have_x" != yes; then
5807   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
5808 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
5809    { (exit 1); exit 1; }; }
5810 fi
5811
5812
5813     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
5814 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
5815 if test "${ac_cv_x_app_defaults+set}" = set; then
5816   echo $ECHO_N "(cached) $ECHO_C" >&6
5817 else
5818
5819   rm -fr conftestdir
5820   if mkdir conftestdir; then
5821     cd conftestdir 2>/dev/null
5822     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5823     cat > Imakefile <<'EOF'
5824 acfindx:
5825         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
5826 EOF
5827     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
5828       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
5829       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5830     fi
5831     cd .. 2>/dev/null
5832     rm -fr conftestdir
5833   fi
5834       if test x"$ac_x_app_defaults" = x; then
5835
5836   # Look for the directory under a standard set of common directories.
5837   # Check X11 before X11Rn because it's often a symlink to the current release.
5838   for ac_dir in                                 \
5839     /usr/X11/lib/app-defaults                   \
5840     /usr/X11R6/lib/app-defaults                 \
5841     /usr/X11R6/lib/X11/app-defaults             \
5842     /usr/X11R5/lib/app-defaults                 \
5843     /usr/X11R5/lib/X11/app-defaults             \
5844     /usr/X11R4/lib/app-defaults                 \
5845     /usr/X11R4/lib/X11/app-defaults             \
5846                                                 \
5847     /usr/lib/X11/app-defaults                   \
5848     /usr/lib/X11R6/app-defaults                 \
5849     /usr/lib/X11R5/app-defaults                 \
5850     /usr/lib/X11R4/app-defaults                 \
5851                                                 \
5852     /usr/local/X11/lib/app-defaults             \
5853     /usr/local/X11R6/lib/app-defaults           \
5854     /usr/local/X11R5/lib/app-defaults           \
5855     /usr/local/X11R4/lib/app-defaults           \
5856                                                 \
5857     /usr/local/lib/X11/app-defaults             \
5858     /usr/local/lib/X11R6/app-defaults           \
5859     /usr/local/lib/X11R6/X11/app-defaults       \
5860     /usr/local/lib/X11R5/app-defaults           \
5861     /usr/local/lib/X11R5/X11/app-defaults       \
5862     /usr/local/lib/X11R4/app-defaults           \
5863     /usr/local/lib/X11R4/X11/app-defaults       \
5864                                                 \
5865     /usr/X386/lib/X11/app-defaults              \
5866     /usr/x386/lib/X11/app-defaults              \
5867     /usr/XFree86/lib/X11/app-defaults           \
5868                                                 \
5869     /usr/lib/X11/app-defaults                   \
5870     /usr/local/lib/X11/app-defaults             \
5871     /usr/unsupported/lib/X11/app-defaults       \
5872     /usr/athena/lib/X11/app-defaults            \
5873     /usr/local/x11r5/lib/X11/app-defaults       \
5874     /usr/lpp/Xamples/lib/X11/app-defaults       \
5875     /lib/usr/lib/X11/app-defaults               \
5876                                                 \
5877     /usr/openwin/lib/app-defaults               \
5878     /usr/openwin/lib/X11/app-defaults           \
5879     /usr/openwin/share/lib/app-defaults         \
5880     /usr/openwin/share/lib/X11/app-defaults     \
5881                                                 \
5882     /X11R6/lib/app-defaults                     \
5883     /X11R5/lib/app-defaults                     \
5884     /X11R4/lib/app-defaults                     \
5885     ; \
5886   do
5887     if test -d "$ac_dir"; then
5888       ac_x_app_defaults=$ac_dir
5889       break
5890     fi
5891   done
5892
5893       fi
5894       if test x"$ac_x_app_defaults" = x; then
5895         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
5896       else
5897         # Record where we found app-defaults for the cache.
5898         ac_cv_x_app_defaults="$ac_x_app_defaults"
5899       fi
5900 fi
5901 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
5902 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
5903     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
5904 case "$host" in
5905     *-hpux*)
5906
5907       # The following arcana was gleaned from conversations with
5908       # Eric Schwartz <erics@col.hp.com>:
5909       #
5910       # On HPUX 10.x, the parts of X that HP considers "standard" live in
5911       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
5912       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
5913       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
5914       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
5915       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
5916       # you don't need any -I or -L arguments.
5917       #
5918       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
5919       # are the same division as 10.x.  However, there are no symlinks to
5920       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
5921       # arguments are always necessary.
5922       #
5923       # However, X11R6 was available on HPUX 9.x as a patch: if that
5924       # patch was installed, then all of X11R6 went in to
5925       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
5926       #
5927       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
5928       # whether R5 was available as a patch; R6 undoubtedly was not.)
5929       #
5930       # So.  We try and use the highest numbered pair of
5931       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
5932       # that are available.  We do not mix and match different versions
5933       # of X.
5934       #
5935       # Question I still don't know the answer to: (do you?)
5936       #
5937       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
5938       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
5939       #     that contrib directory?  Did it contain so-called "standard"
5940       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
5941       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
5942       #     be a situation where one had to reach into the R5 headers and
5943       #     libs to find Xmu?  That is, must both R6 and R5 directories
5944       #     be on the -I and -L lists in that case?
5945       #
5946       for version in X11R6 X11R5 X11R4 ; do
5947         # if either pair of directories exists...
5948         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
5949         then
5950            # if contrib exists, use it...
5951            if test -d /usr/contrib/$version/include ; then
5952              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
5953              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
5954            fi
5955            # if the "standard" one exists, use it.
5956            if test -d /usr/include/$version ; then
5957              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
5958              X_LIBS="$X_LIBS -L/usr/lib/$version"
5959            fi
5960            # since at least one of the pair exists, go no farther.
5961            break
5962         fi
5963       done
5964
5965       # Now find Motif.  Thanks for not making xmkmf find this by
5966       # default, you losers.
5967       #
5968       if test -d /usr/include/Motif2.1 ; then
5969         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
5970         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
5971       elif test -d /usr/include/Motif1.2 ; then
5972         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
5973         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
5974       elif test -d /usr/include/Motif1.1 ; then
5975         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
5976         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
5977       fi
5978
5979       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
5980       #
5981       if test -d /opt/graphics/OpenGL/include ; then
5982         # HP-UX 10.20 puts it here
5983         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
5984         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
5985       elif test -d /opt/Mesa/lib ; then
5986         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
5987         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
5988       fi
5989
5990
5991       if test -d /opt/xpm/lib/X11 ; then
5992         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
5993         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
5994       fi
5995
5996       # On HPUX, default to installing in /opt/xscreensaver/ instead of
5997       # in /usr/local/, unless there is already an xscreensaver in
5998       # /usr/local/bin/.  This can be overridden with the --prefix arg
5999       # to configure.  I'm not sure this is the right thing to do, but
6000       # Richard Lloyd says so...
6001       #
6002       if test \! -x /usr/local/bin/xscreensaver ; then
6003         ac_default_prefix=/opt/xscreensaver
6004       fi
6005
6006     ;;
6007     *-solaris*)
6008
6009       # Thanks for not making xmkmf find this by default, pinheads.
6010       # And thanks for moving things around again, too.  Is this
6011       # really the standard location now?  What happened to the
6012       # joke that this kind of thing went in /opt?
6013       # cthomp says "answer: CDE (Common Disorganized Environment)"
6014       #
6015       if test -f /usr/dt/include/Xm/Xm.h ; then
6016         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6017         X_LIBS="$X_LIBS -L/usr/dt/lib -R:/usr/dt/lib"
6018
6019         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6020         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
6021 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
6022 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
6023   echo $ECHO_N "(cached) $ECHO_C" >&6
6024 else
6025   ac_check_lib_save_LIBS=$LIBS
6026 LIBS="-lgen  $LIBS"
6027 cat >conftest.$ac_ext <<_ACEOF
6028 #line $LINENO "configure"
6029 #include "confdefs.h"
6030
6031 /* Override any gcc2 internal prototype to avoid an error.  */
6032 #ifdef __cplusplus
6033 extern "C"
6034 #endif
6035 /* We use char because int might match the return type of a gcc2
6036    builtin and then its argument prototype would still apply.  */
6037 char regcmp ();
6038 #ifdef F77_DUMMY_MAIN
6039 #  ifdef __cplusplus
6040      extern "C"
6041 #  endif
6042    int F77_DUMMY_MAIN() { return 1; }
6043 #endif
6044 int
6045 main ()
6046 {
6047 regcmp ();
6048   ;
6049   return 0;
6050 }
6051 _ACEOF
6052 rm -f conftest.$ac_objext conftest$ac_exeext
6053 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6054   (eval $ac_link) 2>&5
6055   ac_status=$?
6056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6057   (exit $ac_status); } &&
6058          { ac_try='test -s conftest$ac_exeext'
6059   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6060   (eval $ac_try) 2>&5
6061   ac_status=$?
6062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6063   (exit $ac_status); }; }; then
6064   ac_cv_lib_gen_regcmp=yes
6065 else
6066   echo "$as_me: failed program was:" >&5
6067 cat conftest.$ac_ext >&5
6068 ac_cv_lib_gen_regcmp=no
6069 fi
6070 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6071 LIBS=$ac_check_lib_save_LIBS
6072 fi
6073 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
6074 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
6075 if test $ac_cv_lib_gen_regcmp = yes; then
6076   X_LIBS="$X_LIBS -lgen"
6077 fi
6078
6079       fi
6080     ;;
6081   esac
6082 echo "$as_me:$LINENO: checking for XPointer" >&5
6083 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
6084 if test "${ac_cv_xpointer+set}" = set; then
6085   echo $ECHO_N "(cached) $ECHO_C" >&6
6086 else
6087
6088   ac_save_CPPFLAGS="$CPPFLAGS"
6089   if test \! -z "$includedir" ; then
6090     CPPFLAGS="$CPPFLAGS -I$includedir"
6091   fi
6092   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6093   cat >conftest.$ac_ext <<_ACEOF
6094 #line $LINENO "configure"
6095 #include "confdefs.h"
6096 #include <X11/Xlib.h>
6097 #ifdef F77_DUMMY_MAIN
6098 #  ifdef __cplusplus
6099      extern "C"
6100 #  endif
6101    int F77_DUMMY_MAIN() { return 1; }
6102 #endif
6103 int
6104 main ()
6105 {
6106 XPointer foo = (XPointer) 0;
6107   ;
6108   return 0;
6109 }
6110 _ACEOF
6111 rm -f conftest.$ac_objext
6112 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6113   (eval $ac_compile) 2>&5
6114   ac_status=$?
6115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6116   (exit $ac_status); } &&
6117          { ac_try='test -s conftest.$ac_objext'
6118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6119   (eval $ac_try) 2>&5
6120   ac_status=$?
6121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6122   (exit $ac_status); }; }; then
6123   ac_cv_xpointer=yes
6124 else
6125   echo "$as_me: failed program was:" >&5
6126 cat conftest.$ac_ext >&5
6127 ac_cv_xpointer=no
6128 fi
6129 rm -f conftest.$ac_objext conftest.$ac_ext
6130   CPPFLAGS="$ac_save_CPPFLAGS"
6131 fi
6132 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
6133 echo "${ECHO_T}$ac_cv_xpointer" >&6
6134   if test "$ac_cv_xpointer" != yes; then
6135    cat >>confdefs.h <<\_ACEOF
6136 #define XPointer char*
6137 _ACEOF
6138
6139   fi
6140
6141
6142 ###############################################################################
6143 #
6144 #       Gettext support
6145 #
6146 ###############################################################################
6147
6148
6149
6150 if test -n ""; then
6151     echo "$as_me:$LINENO: checking for intltool >= " >&5
6152 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
6153
6154     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
6155     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
6156
6157     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
6158
6159
6160     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
6161         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
6162 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
6163     else
6164         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
6165 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
6166         exit 1
6167     fi
6168 fi
6169
6170   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'
6171 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'
6172      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'
6173       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
6174      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'
6175    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'
6176     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'
6177 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'
6178        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'
6179       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'
6180     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'
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194 # Use the tools built into the package, not the ones that are installed.
6195
6196 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
6197 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
6198 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
6199
6200
6201
6202
6203
6204 # Extract the first word of "perl", so it can be a program name with args.
6205 set dummy perl; ac_word=$2
6206 echo "$as_me:$LINENO: checking for $ac_word" >&5
6207 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6208 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
6209   echo $ECHO_N "(cached) $ECHO_C" >&6
6210 else
6211   case $INTLTOOL_PERL in
6212   [\\/]* | ?:[\\/]*)
6213   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
6214   ;;
6215   *)
6216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6217 for as_dir in $PATH
6218 do
6219   IFS=$as_save_IFS
6220   test -z "$as_dir" && as_dir=.
6221   for ac_exec_ext in '' $ac_executable_extensions; do
6222   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6223     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
6224     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6225     break 2
6226   fi
6227 done
6228 done
6229
6230   ;;
6231 esac
6232 fi
6233 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
6234
6235 if test -n "$INTLTOOL_PERL"; then
6236   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
6237 echo "${ECHO_T}$INTLTOOL_PERL" >&6
6238 else
6239   echo "$as_me:$LINENO: result: no" >&5
6240 echo "${ECHO_T}no" >&6
6241 fi
6242
6243 if test -z "$INTLTOOL_PERL"; then
6244    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
6245 echo "$as_me: error: perl not found; required for intltool" >&2;}
6246    { (exit 1); exit 1; }; }
6247 fi
6248 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
6249    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
6250 echo "$as_me: error: perl 5.x required for intltool" >&2;}
6251    { (exit 1); exit 1; }; }
6252 fi
6253
6254 # Remove file type tags (using []) from po/POTFILES.
6255
6256
6257
6258
6259
6260
6261
6262 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
6263
6264 ac_config_commands="$ac_config_commands default-1"
6265
6266
6267
6268 GETTEXT_PACKAGE=xscreensaver
6269 cat >>confdefs.h <<_ACEOF
6270 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
6271 _ACEOF
6272
6273 cat >>confdefs.h <<_ACEOF
6274 #define PACKAGE "$GETTEXT_PACKAGE"
6275 _ACEOF
6276
6277
6278
6279 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"
6280 if test -n "$ac_tool_prefix"; then
6281   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6282 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6283 echo "$as_me:$LINENO: checking for $ac_word" >&5
6284 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6285 if test "${ac_cv_prog_RANLIB+set}" = set; then
6286   echo $ECHO_N "(cached) $ECHO_C" >&6
6287 else
6288   if test -n "$RANLIB"; then
6289   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6290 else
6291 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6292 for as_dir in $PATH
6293 do
6294   IFS=$as_save_IFS
6295   test -z "$as_dir" && as_dir=.
6296   for ac_exec_ext in '' $ac_executable_extensions; do
6297   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6298     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6299     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6300     break 2
6301   fi
6302 done
6303 done
6304
6305 fi
6306 fi
6307 RANLIB=$ac_cv_prog_RANLIB
6308 if test -n "$RANLIB"; then
6309   echo "$as_me:$LINENO: result: $RANLIB" >&5
6310 echo "${ECHO_T}$RANLIB" >&6
6311 else
6312   echo "$as_me:$LINENO: result: no" >&5
6313 echo "${ECHO_T}no" >&6
6314 fi
6315
6316 fi
6317 if test -z "$ac_cv_prog_RANLIB"; then
6318   ac_ct_RANLIB=$RANLIB
6319   # Extract the first word of "ranlib", so it can be a program name with args.
6320 set dummy ranlib; ac_word=$2
6321 echo "$as_me:$LINENO: checking for $ac_word" >&5
6322 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6323 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6324   echo $ECHO_N "(cached) $ECHO_C" >&6
6325 else
6326   if test -n "$ac_ct_RANLIB"; then
6327   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6328 else
6329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330 for as_dir in $PATH
6331 do
6332   IFS=$as_save_IFS
6333   test -z "$as_dir" && as_dir=.
6334   for ac_exec_ext in '' $ac_executable_extensions; do
6335   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6336     ac_cv_prog_ac_ct_RANLIB="ranlib"
6337     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6338     break 2
6339   fi
6340 done
6341 done
6342
6343   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6344 fi
6345 fi
6346 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6347 if test -n "$ac_ct_RANLIB"; then
6348   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6349 echo "${ECHO_T}$ac_ct_RANLIB" >&6
6350 else
6351   echo "$as_me:$LINENO: result: no" >&5
6352 echo "${ECHO_T}no" >&6
6353 fi
6354
6355   RANLIB=$ac_ct_RANLIB
6356 else
6357   RANLIB="$ac_cv_prog_RANLIB"
6358 fi
6359
6360 echo "$as_me:$LINENO: checking for off_t" >&5
6361 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
6362 if test "${ac_cv_type_off_t+set}" = set; then
6363   echo $ECHO_N "(cached) $ECHO_C" >&6
6364 else
6365   cat >conftest.$ac_ext <<_ACEOF
6366 #line $LINENO "configure"
6367 #include "confdefs.h"
6368 $ac_includes_default
6369 #ifdef F77_DUMMY_MAIN
6370 #  ifdef __cplusplus
6371      extern "C"
6372 #  endif
6373    int F77_DUMMY_MAIN() { return 1; }
6374 #endif
6375 int
6376 main ()
6377 {
6378 if ((off_t *) 0)
6379   return 0;
6380 if (sizeof (off_t))
6381   return 0;
6382   ;
6383   return 0;
6384 }
6385 _ACEOF
6386 rm -f conftest.$ac_objext
6387 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6388   (eval $ac_compile) 2>&5
6389   ac_status=$?
6390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6391   (exit $ac_status); } &&
6392          { ac_try='test -s conftest.$ac_objext'
6393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6394   (eval $ac_try) 2>&5
6395   ac_status=$?
6396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6397   (exit $ac_status); }; }; then
6398   ac_cv_type_off_t=yes
6399 else
6400   echo "$as_me: failed program was:" >&5
6401 cat conftest.$ac_ext >&5
6402 ac_cv_type_off_t=no
6403 fi
6404 rm -f conftest.$ac_objext conftest.$ac_ext
6405 fi
6406 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6407 echo "${ECHO_T}$ac_cv_type_off_t" >&6
6408 if test $ac_cv_type_off_t = yes; then
6409   :
6410 else
6411
6412 cat >>confdefs.h <<_ACEOF
6413 #define off_t long
6414 _ACEOF
6415
6416 fi
6417
6418 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6419 # for constant arguments.  Useless!
6420 echo "$as_me:$LINENO: checking for working alloca.h" >&5
6421 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
6422 if test "${ac_cv_working_alloca_h+set}" = set; then
6423   echo $ECHO_N "(cached) $ECHO_C" >&6
6424 else
6425   cat >conftest.$ac_ext <<_ACEOF
6426 #line $LINENO "configure"
6427 #include "confdefs.h"
6428 #include <alloca.h>
6429 #ifdef F77_DUMMY_MAIN
6430 #  ifdef __cplusplus
6431      extern "C"
6432 #  endif
6433    int F77_DUMMY_MAIN() { return 1; }
6434 #endif
6435 int
6436 main ()
6437 {
6438 char *p = (char *) alloca (2 * sizeof (int));
6439   ;
6440   return 0;
6441 }
6442 _ACEOF
6443 rm -f conftest.$ac_objext conftest$ac_exeext
6444 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6445   (eval $ac_link) 2>&5
6446   ac_status=$?
6447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6448   (exit $ac_status); } &&
6449          { ac_try='test -s conftest$ac_exeext'
6450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6451   (eval $ac_try) 2>&5
6452   ac_status=$?
6453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6454   (exit $ac_status); }; }; then
6455   ac_cv_working_alloca_h=yes
6456 else
6457   echo "$as_me: failed program was:" >&5
6458 cat conftest.$ac_ext >&5
6459 ac_cv_working_alloca_h=no
6460 fi
6461 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6462 fi
6463 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
6464 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
6465 if test $ac_cv_working_alloca_h = yes; then
6466
6467 cat >>confdefs.h <<\_ACEOF
6468 #define HAVE_ALLOCA_H 1
6469 _ACEOF
6470
6471 fi
6472
6473 echo "$as_me:$LINENO: checking for alloca" >&5
6474 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
6475 if test "${ac_cv_func_alloca_works+set}" = set; then
6476   echo $ECHO_N "(cached) $ECHO_C" >&6
6477 else
6478   cat >conftest.$ac_ext <<_ACEOF
6479 #line $LINENO "configure"
6480 #include "confdefs.h"
6481 #ifdef __GNUC__
6482 # define alloca __builtin_alloca
6483 #else
6484 # ifdef _MSC_VER
6485 #  include <malloc.h>
6486 #  define alloca _alloca
6487 # else
6488 #  if HAVE_ALLOCA_H
6489 #   include <alloca.h>
6490 #  else
6491 #   ifdef _AIX
6492  #pragma alloca
6493 #   else
6494 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6495 char *alloca ();
6496 #    endif
6497 #   endif
6498 #  endif
6499 # endif
6500 #endif
6501
6502 #ifdef F77_DUMMY_MAIN
6503 #  ifdef __cplusplus
6504      extern "C"
6505 #  endif
6506    int F77_DUMMY_MAIN() { return 1; }
6507 #endif
6508 int
6509 main ()
6510 {
6511 char *p = (char *) alloca (1);
6512   ;
6513   return 0;
6514 }
6515 _ACEOF
6516 rm -f conftest.$ac_objext conftest$ac_exeext
6517 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6518   (eval $ac_link) 2>&5
6519   ac_status=$?
6520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6521   (exit $ac_status); } &&
6522          { ac_try='test -s conftest$ac_exeext'
6523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6524   (eval $ac_try) 2>&5
6525   ac_status=$?
6526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6527   (exit $ac_status); }; }; then
6528   ac_cv_func_alloca_works=yes
6529 else
6530   echo "$as_me: failed program was:" >&5
6531 cat conftest.$ac_ext >&5
6532 ac_cv_func_alloca_works=no
6533 fi
6534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6535 fi
6536 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
6537 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
6538
6539 if test $ac_cv_func_alloca_works = yes; then
6540
6541 cat >>confdefs.h <<\_ACEOF
6542 #define HAVE_ALLOCA 1
6543 _ACEOF
6544
6545 else
6546   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6547 # that cause trouble.  Some versions do not even contain alloca or
6548 # contain a buggy version.  If you still want to use their alloca,
6549 # use ar to extract alloca.o from them instead of compiling alloca.c.
6550
6551 ALLOCA=alloca.$ac_objext
6552
6553 cat >>confdefs.h <<\_ACEOF
6554 #define C_ALLOCA 1
6555 _ACEOF
6556
6557
6558 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
6559 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
6560 if test "${ac_cv_os_cray+set}" = set; then
6561   echo $ECHO_N "(cached) $ECHO_C" >&6
6562 else
6563   cat >conftest.$ac_ext <<_ACEOF
6564 #line $LINENO "configure"
6565 #include "confdefs.h"
6566 #if defined(CRAY) && ! defined(CRAY2)
6567 webecray
6568 #else
6569 wenotbecray
6570 #endif
6571
6572 _ACEOF
6573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6574   egrep "webecray" >/dev/null 2>&1; then
6575   ac_cv_os_cray=yes
6576 else
6577   ac_cv_os_cray=no
6578 fi
6579 rm -f conftest*
6580
6581 fi
6582 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
6583 echo "${ECHO_T}$ac_cv_os_cray" >&6
6584 if test $ac_cv_os_cray = yes; then
6585   for ac_func in _getb67 GETB67 getb67; do
6586     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6587 echo "$as_me:$LINENO: checking for $ac_func" >&5
6588 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6589 if eval "test \"\${$as_ac_var+set}\" = set"; then
6590   echo $ECHO_N "(cached) $ECHO_C" >&6
6591 else
6592   cat >conftest.$ac_ext <<_ACEOF
6593 #line $LINENO "configure"
6594 #include "confdefs.h"
6595 /* System header to define __stub macros and hopefully few prototypes,
6596     which can conflict with char $ac_func (); below.  */
6597 #include <assert.h>
6598 /* Override any gcc2 internal prototype to avoid an error.  */
6599 #ifdef __cplusplus
6600 extern "C"
6601 #endif
6602 /* We use char because int might match the return type of a gcc2
6603    builtin and then its argument prototype would still apply.  */
6604 char $ac_func ();
6605 char (*f) ();
6606
6607 #ifdef F77_DUMMY_MAIN
6608 #  ifdef __cplusplus
6609      extern "C"
6610 #  endif
6611    int F77_DUMMY_MAIN() { return 1; }
6612 #endif
6613 int
6614 main ()
6615 {
6616 /* The GNU C library defines this for functions which it implements
6617     to always fail with ENOSYS.  Some functions are actually named
6618     something starting with __ and the normal name is an alias.  */
6619 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6620 choke me
6621 #else
6622 f = $ac_func;
6623 #endif
6624
6625   ;
6626   return 0;
6627 }
6628 _ACEOF
6629 rm -f conftest.$ac_objext conftest$ac_exeext
6630 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6631   (eval $ac_link) 2>&5
6632   ac_status=$?
6633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6634   (exit $ac_status); } &&
6635          { ac_try='test -s conftest$ac_exeext'
6636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6637   (eval $ac_try) 2>&5
6638   ac_status=$?
6639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6640   (exit $ac_status); }; }; then
6641   eval "$as_ac_var=yes"
6642 else
6643   echo "$as_me: failed program was:" >&5
6644 cat conftest.$ac_ext >&5
6645 eval "$as_ac_var=no"
6646 fi
6647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6648 fi
6649 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6650 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6651 if test `eval echo '${'$as_ac_var'}'` = yes; then
6652
6653 cat >>confdefs.h <<_ACEOF
6654 #define CRAY_STACKSEG_END $ac_func
6655 _ACEOF
6656
6657     break
6658 fi
6659
6660   done
6661 fi
6662
6663 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
6664 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
6665 if test "${ac_cv_c_stack_direction+set}" = set; then
6666   echo $ECHO_N "(cached) $ECHO_C" >&6
6667 else
6668   if test "$cross_compiling" = yes; then
6669   ac_cv_c_stack_direction=0
6670 else
6671   cat >conftest.$ac_ext <<_ACEOF
6672 #line $LINENO "configure"
6673 #include "confdefs.h"
6674 int
6675 find_stack_direction ()
6676 {
6677   static char *addr = 0;
6678   auto char dummy;
6679   if (addr == 0)
6680     {
6681       addr = &dummy;
6682       return find_stack_direction ();
6683     }
6684   else
6685     return (&dummy > addr) ? 1 : -1;
6686 }
6687
6688 int
6689 main ()
6690 {
6691   exit (find_stack_direction () < 0);
6692 }
6693 _ACEOF
6694 rm -f conftest$ac_exeext
6695 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6696   (eval $ac_link) 2>&5
6697   ac_status=$?
6698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6699   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6701   (eval $ac_try) 2>&5
6702   ac_status=$?
6703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6704   (exit $ac_status); }; }; then
6705   ac_cv_c_stack_direction=1
6706 else
6707   echo "$as_me: program exited with status $ac_status" >&5
6708 echo "$as_me: failed program was:" >&5
6709 cat conftest.$ac_ext >&5
6710 ( exit $ac_status )
6711 ac_cv_c_stack_direction=-1
6712 fi
6713 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6714 fi
6715 fi
6716 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
6717 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
6718
6719 cat >>confdefs.h <<_ACEOF
6720 #define STACK_DIRECTION $ac_cv_c_stack_direction
6721 _ACEOF
6722
6723
6724 fi
6725
6726
6727
6728 for ac_header in stdlib.h unistd.h
6729 do
6730 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6731 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6732   echo "$as_me:$LINENO: checking for $ac_header" >&5
6733 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6734 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6735   echo $ECHO_N "(cached) $ECHO_C" >&6
6736 fi
6737 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6738 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6739 else
6740   # Is the header compilable?
6741 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6742 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6743 cat >conftest.$ac_ext <<_ACEOF
6744 #line $LINENO "configure"
6745 #include "confdefs.h"
6746 $ac_includes_default
6747 #include <$ac_header>
6748 _ACEOF
6749 rm -f conftest.$ac_objext
6750 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6751   (eval $ac_compile) 2>&5
6752   ac_status=$?
6753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6754   (exit $ac_status); } &&
6755          { ac_try='test -s conftest.$ac_objext'
6756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6757   (eval $ac_try) 2>&5
6758   ac_status=$?
6759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6760   (exit $ac_status); }; }; then
6761   ac_header_compiler=yes
6762 else
6763   echo "$as_me: failed program was:" >&5
6764 cat conftest.$ac_ext >&5
6765 ac_header_compiler=no
6766 fi
6767 rm -f conftest.$ac_objext conftest.$ac_ext
6768 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6769 echo "${ECHO_T}$ac_header_compiler" >&6
6770
6771 # Is the header present?
6772 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6773 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6774 cat >conftest.$ac_ext <<_ACEOF
6775 #line $LINENO "configure"
6776 #include "confdefs.h"
6777 #include <$ac_header>
6778 _ACEOF
6779 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6780   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6781   ac_status=$?
6782   egrep -v '^ *\+' conftest.er1 >conftest.err
6783   rm -f conftest.er1
6784   cat conftest.err >&5
6785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6786   (exit $ac_status); } >/dev/null; then
6787   if test -s conftest.err; then
6788     ac_cpp_err=$ac_c_preproc_warn_flag
6789   else
6790     ac_cpp_err=
6791   fi
6792 else
6793   ac_cpp_err=yes
6794 fi
6795 if test -z "$ac_cpp_err"; then
6796   ac_header_preproc=yes
6797 else
6798   echo "$as_me: failed program was:" >&5
6799   cat conftest.$ac_ext >&5
6800   ac_header_preproc=no
6801 fi
6802 rm -f conftest.err conftest.$ac_ext
6803 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6804 echo "${ECHO_T}$ac_header_preproc" >&6
6805
6806 # So?  What about this header?
6807 case $ac_header_compiler:$ac_header_preproc in
6808   yes:no )
6809     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6810 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6811     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6812 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
6813   no:yes )
6814     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6815 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6816     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6817 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6818     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6819 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
6820 esac
6821 echo "$as_me:$LINENO: checking for $ac_header" >&5
6822 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6823 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6824   echo $ECHO_N "(cached) $ECHO_C" >&6
6825 else
6826   eval "$as_ac_Header=$ac_header_preproc"
6827 fi
6828 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6829 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6830
6831 fi
6832 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6833   cat >>confdefs.h <<_ACEOF
6834 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6835 _ACEOF
6836
6837 fi
6838
6839 done
6840
6841
6842 for ac_func in getpagesize
6843 do
6844 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6845 echo "$as_me:$LINENO: checking for $ac_func" >&5
6846 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6847 if eval "test \"\${$as_ac_var+set}\" = set"; then
6848   echo $ECHO_N "(cached) $ECHO_C" >&6
6849 else
6850   cat >conftest.$ac_ext <<_ACEOF
6851 #line $LINENO "configure"
6852 #include "confdefs.h"
6853 /* System header to define __stub macros and hopefully few prototypes,
6854     which can conflict with char $ac_func (); below.  */
6855 #include <assert.h>
6856 /* Override any gcc2 internal prototype to avoid an error.  */
6857 #ifdef __cplusplus
6858 extern "C"
6859 #endif
6860 /* We use char because int might match the return type of a gcc2
6861    builtin and then its argument prototype would still apply.  */
6862 char $ac_func ();
6863 char (*f) ();
6864
6865 #ifdef F77_DUMMY_MAIN
6866 #  ifdef __cplusplus
6867      extern "C"
6868 #  endif
6869    int F77_DUMMY_MAIN() { return 1; }
6870 #endif
6871 int
6872 main ()
6873 {
6874 /* The GNU C library defines this for functions which it implements
6875     to always fail with ENOSYS.  Some functions are actually named
6876     something starting with __ and the normal name is an alias.  */
6877 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6878 choke me
6879 #else
6880 f = $ac_func;
6881 #endif
6882
6883   ;
6884   return 0;
6885 }
6886 _ACEOF
6887 rm -f conftest.$ac_objext conftest$ac_exeext
6888 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6889   (eval $ac_link) 2>&5
6890   ac_status=$?
6891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6892   (exit $ac_status); } &&
6893          { ac_try='test -s conftest$ac_exeext'
6894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6895   (eval $ac_try) 2>&5
6896   ac_status=$?
6897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6898   (exit $ac_status); }; }; then
6899   eval "$as_ac_var=yes"
6900 else
6901   echo "$as_me: failed program was:" >&5
6902 cat conftest.$ac_ext >&5
6903 eval "$as_ac_var=no"
6904 fi
6905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6906 fi
6907 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6908 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6909 if test `eval echo '${'$as_ac_var'}'` = yes; then
6910   cat >>confdefs.h <<_ACEOF
6911 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6912 _ACEOF
6913
6914 fi
6915 done
6916
6917 echo "$as_me:$LINENO: checking for working mmap" >&5
6918 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
6919 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
6920   echo $ECHO_N "(cached) $ECHO_C" >&6
6921 else
6922   if test "$cross_compiling" = yes; then
6923   ac_cv_func_mmap_fixed_mapped=no
6924 else
6925   cat >conftest.$ac_ext <<_ACEOF
6926 #line $LINENO "configure"
6927 #include "confdefs.h"
6928 $ac_includes_default
6929 /* malloc might have been renamed as rpl_malloc. */
6930 #undef malloc
6931
6932 /* Thanks to Mike Haertel and Jim Avera for this test.
6933    Here is a matrix of mmap possibilities:
6934         mmap private not fixed
6935         mmap private fixed at somewhere currently unmapped
6936         mmap private fixed at somewhere already mapped
6937         mmap shared not fixed
6938         mmap shared fixed at somewhere currently unmapped
6939         mmap shared fixed at somewhere already mapped
6940    For private mappings, we should verify that changes cannot be read()
6941    back from the file, nor mmap's back from the file at a different
6942    address.  (There have been systems where private was not correctly
6943    implemented like the infamous i386 svr4.0, and systems where the
6944    VM page cache was not coherent with the file system buffer cache
6945    like early versions of FreeBSD and possibly contemporary NetBSD.)
6946    For shared mappings, we should conversely verify that changes get
6947    propagated back to all the places they're supposed to be.
6948
6949    Grep wants private fixed already mapped.
6950    The main things grep needs to know about mmap are:
6951    * does it exist and is it safe to write into the mmap'd area
6952    * how to use it (BSD variants)  */
6953
6954 #include <fcntl.h>
6955 #include <sys/mman.h>
6956
6957 #if !STDC_HEADERS && !HAVE_STDLIB_H
6958 char *malloc ();
6959 #endif
6960
6961 /* This mess was copied from the GNU getpagesize.h.  */
6962 #if !HAVE_GETPAGESIZE
6963 /* Assume that all systems that can run configure have sys/param.h.  */
6964 # if !HAVE_SYS_PARAM_H
6965 #  define HAVE_SYS_PARAM_H 1
6966 # endif
6967
6968 # ifdef _SC_PAGESIZE
6969 #  define getpagesize() sysconf(_SC_PAGESIZE)
6970 # else /* no _SC_PAGESIZE */
6971 #  if HAVE_SYS_PARAM_H
6972 #   include <sys/param.h>
6973 #   ifdef EXEC_PAGESIZE
6974 #    define getpagesize() EXEC_PAGESIZE
6975 #   else /* no EXEC_PAGESIZE */
6976 #    ifdef NBPG
6977 #     define getpagesize() NBPG * CLSIZE
6978 #     ifndef CLSIZE
6979 #      define CLSIZE 1
6980 #     endif /* no CLSIZE */
6981 #    else /* no NBPG */
6982 #     ifdef NBPC
6983 #      define getpagesize() NBPC
6984 #     else /* no NBPC */
6985 #      ifdef PAGESIZE
6986 #       define getpagesize() PAGESIZE
6987 #      endif /* PAGESIZE */
6988 #     endif /* no NBPC */
6989 #    endif /* no NBPG */
6990 #   endif /* no EXEC_PAGESIZE */
6991 #  else /* no HAVE_SYS_PARAM_H */
6992 #   define getpagesize() 8192   /* punt totally */
6993 #  endif /* no HAVE_SYS_PARAM_H */
6994 # endif /* no _SC_PAGESIZE */
6995
6996 #endif /* no HAVE_GETPAGESIZE */
6997
6998 int
6999 main ()
7000 {
7001   char *data, *data2, *data3;
7002   int i, pagesize;
7003   int fd;
7004
7005   pagesize = getpagesize ();
7006
7007   /* First, make a file with some known garbage in it. */
7008   data = (char *) malloc (pagesize);
7009   if (!data)
7010     exit (1);
7011   for (i = 0; i < pagesize; ++i)
7012     *(data + i) = rand ();
7013   umask (0);
7014   fd = creat ("conftest.mmap", 0600);
7015   if (fd < 0)
7016     exit (1);
7017   if (write (fd, data, pagesize) != pagesize)
7018     exit (1);
7019   close (fd);
7020
7021   /* Next, try to mmap the file at a fixed address which already has
7022      something else allocated at it.  If we can, also make sure that
7023      we see the same garbage.  */
7024   fd = open ("conftest.mmap", O_RDWR);
7025   if (fd < 0)
7026     exit (1);
7027   data2 = (char *) malloc (2 * pagesize);
7028   if (!data2)
7029     exit (1);
7030   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7031   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7032                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
7033     exit (1);
7034   for (i = 0; i < pagesize; ++i)
7035     if (*(data + i) != *(data2 + i))
7036       exit (1);
7037
7038   /* Finally, make sure that changes to the mapped area do not
7039      percolate back to the file as seen by read().  (This is a bug on
7040      some variants of i386 svr4.0.)  */
7041   for (i = 0; i < pagesize; ++i)
7042     *(data2 + i) = *(data2 + i) + 1;
7043   data3 = (char *) malloc (pagesize);
7044   if (!data3)
7045     exit (1);
7046   if (read (fd, data3, pagesize) != pagesize)
7047     exit (1);
7048   for (i = 0; i < pagesize; ++i)
7049     if (*(data + i) != *(data3 + i))
7050       exit (1);
7051   close (fd);
7052   exit (0);
7053 }
7054 _ACEOF
7055 rm -f conftest$ac_exeext
7056 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7057   (eval $ac_link) 2>&5
7058   ac_status=$?
7059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7060   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7062   (eval $ac_try) 2>&5
7063   ac_status=$?
7064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7065   (exit $ac_status); }; }; then
7066   ac_cv_func_mmap_fixed_mapped=yes
7067 else
7068   echo "$as_me: program exited with status $ac_status" >&5
7069 echo "$as_me: failed program was:" >&5
7070 cat conftest.$ac_ext >&5
7071 ( exit $ac_status )
7072 ac_cv_func_mmap_fixed_mapped=no
7073 fi
7074 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7075 fi
7076 fi
7077 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
7078 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7079 if test $ac_cv_func_mmap_fixed_mapped = yes; then
7080
7081 cat >>confdefs.h <<\_ACEOF
7082 #define HAVE_MMAP 1
7083 _ACEOF
7084
7085 fi
7086 rm -f conftest.mmap
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
7098 unistd.h sys/param.h
7099 do
7100 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7101 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7102   echo "$as_me:$LINENO: checking for $ac_header" >&5
7103 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7104 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7105   echo $ECHO_N "(cached) $ECHO_C" >&6
7106 fi
7107 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7108 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7109 else
7110   # Is the header compilable?
7111 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7112 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7113 cat >conftest.$ac_ext <<_ACEOF
7114 #line $LINENO "configure"
7115 #include "confdefs.h"
7116 $ac_includes_default
7117 #include <$ac_header>
7118 _ACEOF
7119 rm -f conftest.$ac_objext
7120 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7121   (eval $ac_compile) 2>&5
7122   ac_status=$?
7123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7124   (exit $ac_status); } &&
7125          { ac_try='test -s conftest.$ac_objext'
7126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7127   (eval $ac_try) 2>&5
7128   ac_status=$?
7129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7130   (exit $ac_status); }; }; then
7131   ac_header_compiler=yes
7132 else
7133   echo "$as_me: failed program was:" >&5
7134 cat conftest.$ac_ext >&5
7135 ac_header_compiler=no
7136 fi
7137 rm -f conftest.$ac_objext conftest.$ac_ext
7138 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7139 echo "${ECHO_T}$ac_header_compiler" >&6
7140
7141 # Is the header present?
7142 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7143 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7144 cat >conftest.$ac_ext <<_ACEOF
7145 #line $LINENO "configure"
7146 #include "confdefs.h"
7147 #include <$ac_header>
7148 _ACEOF
7149 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7150   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7151   ac_status=$?
7152   egrep -v '^ *\+' conftest.er1 >conftest.err
7153   rm -f conftest.er1
7154   cat conftest.err >&5
7155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7156   (exit $ac_status); } >/dev/null; then
7157   if test -s conftest.err; then
7158     ac_cpp_err=$ac_c_preproc_warn_flag
7159   else
7160     ac_cpp_err=
7161   fi
7162 else
7163   ac_cpp_err=yes
7164 fi
7165 if test -z "$ac_cpp_err"; then
7166   ac_header_preproc=yes
7167 else
7168   echo "$as_me: failed program was:" >&5
7169   cat conftest.$ac_ext >&5
7170   ac_header_preproc=no
7171 fi
7172 rm -f conftest.err conftest.$ac_ext
7173 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7174 echo "${ECHO_T}$ac_header_preproc" >&6
7175
7176 # So?  What about this header?
7177 case $ac_header_compiler:$ac_header_preproc in
7178   yes:no )
7179     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7180 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7181     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7182 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7183   no:yes )
7184     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7185 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7186     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7187 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7188     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7189 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7190 esac
7191 echo "$as_me:$LINENO: checking for $ac_header" >&5
7192 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7193 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7194   echo $ECHO_N "(cached) $ECHO_C" >&6
7195 else
7196   eval "$as_ac_Header=$ac_header_preproc"
7197 fi
7198 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7199 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7200
7201 fi
7202 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7203   cat >>confdefs.h <<_ACEOF
7204 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7205 _ACEOF
7206
7207 fi
7208
7209 done
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
7223 strdup __argz_count __argz_stringify __argz_next
7224 do
7225 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7226 echo "$as_me:$LINENO: checking for $ac_func" >&5
7227 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7228 if eval "test \"\${$as_ac_var+set}\" = set"; then
7229   echo $ECHO_N "(cached) $ECHO_C" >&6
7230 else
7231   cat >conftest.$ac_ext <<_ACEOF
7232 #line $LINENO "configure"
7233 #include "confdefs.h"
7234 /* System header to define __stub macros and hopefully few prototypes,
7235     which can conflict with char $ac_func (); below.  */
7236 #include <assert.h>
7237 /* Override any gcc2 internal prototype to avoid an error.  */
7238 #ifdef __cplusplus
7239 extern "C"
7240 #endif
7241 /* We use char because int might match the return type of a gcc2
7242    builtin and then its argument prototype would still apply.  */
7243 char $ac_func ();
7244 char (*f) ();
7245
7246 #ifdef F77_DUMMY_MAIN
7247 #  ifdef __cplusplus
7248      extern "C"
7249 #  endif
7250    int F77_DUMMY_MAIN() { return 1; }
7251 #endif
7252 int
7253 main ()
7254 {
7255 /* The GNU C library defines this for functions which it implements
7256     to always fail with ENOSYS.  Some functions are actually named
7257     something starting with __ and the normal name is an alias.  */
7258 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7259 choke me
7260 #else
7261 f = $ac_func;
7262 #endif
7263
7264   ;
7265   return 0;
7266 }
7267 _ACEOF
7268 rm -f conftest.$ac_objext conftest$ac_exeext
7269 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7270   (eval $ac_link) 2>&5
7271   ac_status=$?
7272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7273   (exit $ac_status); } &&
7274          { ac_try='test -s conftest$ac_exeext'
7275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7276   (eval $ac_try) 2>&5
7277   ac_status=$?
7278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7279   (exit $ac_status); }; }; then
7280   eval "$as_ac_var=yes"
7281 else
7282   echo "$as_me: failed program was:" >&5
7283 cat conftest.$ac_ext >&5
7284 eval "$as_ac_var=no"
7285 fi
7286 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7287 fi
7288 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7289 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7290 if test `eval echo '${'$as_ac_var'}'` = yes; then
7291   cat >>confdefs.h <<_ACEOF
7292 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7293 _ACEOF
7294
7295 fi
7296 done
7297
7298
7299    if test $ac_cv_header_locale_h = yes; then
7300     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
7301 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7302 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7303   echo $ECHO_N "(cached) $ECHO_C" >&6
7304 else
7305   cat >conftest.$ac_ext <<_ACEOF
7306 #line $LINENO "configure"
7307 #include "confdefs.h"
7308 #include <locale.h>
7309 #ifdef F77_DUMMY_MAIN
7310 #  ifdef __cplusplus
7311      extern "C"
7312 #  endif
7313    int F77_DUMMY_MAIN() { return 1; }
7314 #endif
7315 int
7316 main ()
7317 {
7318 return LC_MESSAGES
7319   ;
7320   return 0;
7321 }
7322 _ACEOF
7323 rm -f conftest.$ac_objext conftest$ac_exeext
7324 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7325   (eval $ac_link) 2>&5
7326   ac_status=$?
7327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328   (exit $ac_status); } &&
7329          { ac_try='test -s conftest$ac_exeext'
7330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7331   (eval $ac_try) 2>&5
7332   ac_status=$?
7333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7334   (exit $ac_status); }; }; then
7335   am_cv_val_LC_MESSAGES=yes
7336 else
7337   echo "$as_me: failed program was:" >&5
7338 cat conftest.$ac_ext >&5
7339 am_cv_val_LC_MESSAGES=no
7340 fi
7341 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7342 fi
7343 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
7344 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
7345     if test $am_cv_val_LC_MESSAGES = yes; then
7346
7347 cat >>confdefs.h <<\_ACEOF
7348 #define HAVE_LC_MESSAGES 1
7349 _ACEOF
7350
7351     fi
7352   fi
7353      USE_NLS=yes
7354
7355
7356         nls_cv_force_use_gnu_gettext="no"
7357
7358     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7359     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7360                               nls_cv_header_intl=
7361       nls_cv_header_libgt=
7362       CATOBJEXT=NONE
7363
7364       if test "${ac_cv_header_libintl_h+set}" = set; then
7365   echo "$as_me:$LINENO: checking for libintl.h" >&5
7366 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7367 if test "${ac_cv_header_libintl_h+set}" = set; then
7368   echo $ECHO_N "(cached) $ECHO_C" >&6
7369 fi
7370 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7371 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7372 else
7373   # Is the header compilable?
7374 echo "$as_me:$LINENO: checking libintl.h usability" >&5
7375 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
7376 cat >conftest.$ac_ext <<_ACEOF
7377 #line $LINENO "configure"
7378 #include "confdefs.h"
7379 $ac_includes_default
7380 #include <libintl.h>
7381 _ACEOF
7382 rm -f conftest.$ac_objext
7383 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7384   (eval $ac_compile) 2>&5
7385   ac_status=$?
7386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7387   (exit $ac_status); } &&
7388          { ac_try='test -s conftest.$ac_objext'
7389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7390   (eval $ac_try) 2>&5
7391   ac_status=$?
7392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7393   (exit $ac_status); }; }; then
7394   ac_header_compiler=yes
7395 else
7396   echo "$as_me: failed program was:" >&5
7397 cat conftest.$ac_ext >&5
7398 ac_header_compiler=no
7399 fi
7400 rm -f conftest.$ac_objext conftest.$ac_ext
7401 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7402 echo "${ECHO_T}$ac_header_compiler" >&6
7403
7404 # Is the header present?
7405 echo "$as_me:$LINENO: checking libintl.h presence" >&5
7406 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
7407 cat >conftest.$ac_ext <<_ACEOF
7408 #line $LINENO "configure"
7409 #include "confdefs.h"
7410 #include <libintl.h>
7411 _ACEOF
7412 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7413   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7414   ac_status=$?
7415   egrep -v '^ *\+' conftest.er1 >conftest.err
7416   rm -f conftest.er1
7417   cat conftest.err >&5
7418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7419   (exit $ac_status); } >/dev/null; then
7420   if test -s conftest.err; then
7421     ac_cpp_err=$ac_c_preproc_warn_flag
7422   else
7423     ac_cpp_err=
7424   fi
7425 else
7426   ac_cpp_err=yes
7427 fi
7428 if test -z "$ac_cpp_err"; then
7429   ac_header_preproc=yes
7430 else
7431   echo "$as_me: failed program was:" >&5
7432   cat conftest.$ac_ext >&5
7433   ac_header_preproc=no
7434 fi
7435 rm -f conftest.err conftest.$ac_ext
7436 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7437 echo "${ECHO_T}$ac_header_preproc" >&6
7438
7439 # So?  What about this header?
7440 case $ac_header_compiler:$ac_header_preproc in
7441   yes:no )
7442     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
7443 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7444     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7445 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
7446   no:yes )
7447     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
7448 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
7449     { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
7450 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
7451     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7452 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
7453 esac
7454 echo "$as_me:$LINENO: checking for libintl.h" >&5
7455 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7456 if test "${ac_cv_header_libintl_h+set}" = set; then
7457   echo $ECHO_N "(cached) $ECHO_C" >&6
7458 else
7459   ac_cv_header_libintl_h=$ac_header_preproc
7460 fi
7461 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7462 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7463
7464 fi
7465 if test $ac_cv_header_libintl_h = yes; then
7466   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
7467 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
7468 if test "${gt_cv_func_dgettext_libc+set}" = set; then
7469   echo $ECHO_N "(cached) $ECHO_C" >&6
7470 else
7471   cat >conftest.$ac_ext <<_ACEOF
7472 #line $LINENO "configure"
7473 #include "confdefs.h"
7474 #include <libintl.h>
7475 #ifdef F77_DUMMY_MAIN
7476 #  ifdef __cplusplus
7477      extern "C"
7478 #  endif
7479    int F77_DUMMY_MAIN() { return 1; }
7480 #endif
7481 int
7482 main ()
7483 {
7484 return (int) dgettext ("","")
7485   ;
7486   return 0;
7487 }
7488 _ACEOF
7489 rm -f conftest.$ac_objext conftest$ac_exeext
7490 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7491   (eval $ac_link) 2>&5
7492   ac_status=$?
7493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7494   (exit $ac_status); } &&
7495          { ac_try='test -s conftest$ac_exeext'
7496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7497   (eval $ac_try) 2>&5
7498   ac_status=$?
7499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7500   (exit $ac_status); }; }; then
7501   gt_cv_func_dgettext_libc=yes
7502 else
7503   echo "$as_me: failed program was:" >&5
7504 cat conftest.$ac_ext >&5
7505 gt_cv_func_dgettext_libc=no
7506 fi
7507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7508 fi
7509 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
7510 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
7511
7512           if test "$gt_cv_func_dgettext_libc" != "yes"; then
7513             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
7514 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
7515 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
7516   echo $ECHO_N "(cached) $ECHO_C" >&6
7517 else
7518   ac_check_lib_save_LIBS=$LIBS
7519 LIBS="-lintl  $LIBS"
7520 cat >conftest.$ac_ext <<_ACEOF
7521 #line $LINENO "configure"
7522 #include "confdefs.h"
7523
7524 /* Override any gcc2 internal prototype to avoid an error.  */
7525 #ifdef __cplusplus
7526 extern "C"
7527 #endif
7528 /* We use char because int might match the return type of a gcc2
7529    builtin and then its argument prototype would still apply.  */
7530 char bindtextdomain ();
7531 #ifdef F77_DUMMY_MAIN
7532 #  ifdef __cplusplus
7533      extern "C"
7534 #  endif
7535    int F77_DUMMY_MAIN() { return 1; }
7536 #endif
7537 int
7538 main ()
7539 {
7540 bindtextdomain ();
7541   ;
7542   return 0;
7543 }
7544 _ACEOF
7545 rm -f conftest.$ac_objext conftest$ac_exeext
7546 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7547   (eval $ac_link) 2>&5
7548   ac_status=$?
7549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7550   (exit $ac_status); } &&
7551          { ac_try='test -s conftest$ac_exeext'
7552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7553   (eval $ac_try) 2>&5
7554   ac_status=$?
7555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7556   (exit $ac_status); }; }; then
7557   ac_cv_lib_intl_bindtextdomain=yes
7558 else
7559   echo "$as_me: failed program was:" >&5
7560 cat conftest.$ac_ext >&5
7561 ac_cv_lib_intl_bindtextdomain=no
7562 fi
7563 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7564 LIBS=$ac_check_lib_save_LIBS
7565 fi
7566 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
7567 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
7568 if test $ac_cv_lib_intl_bindtextdomain = yes; then
7569   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
7570 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
7571 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
7572   echo $ECHO_N "(cached) $ECHO_C" >&6
7573 else
7574   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
7575 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
7576 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
7577   echo $ECHO_N "(cached) $ECHO_C" >&6
7578 else
7579   ac_check_lib_save_LIBS=$LIBS
7580 LIBS="-lintl  $LIBS"
7581 cat >conftest.$ac_ext <<_ACEOF
7582 #line $LINENO "configure"
7583 #include "confdefs.h"
7584
7585 /* Override any gcc2 internal prototype to avoid an error.  */
7586 #ifdef __cplusplus
7587 extern "C"
7588 #endif
7589 /* We use char because int might match the return type of a gcc2
7590    builtin and then its argument prototype would still apply.  */
7591 char dgettext ();
7592 #ifdef F77_DUMMY_MAIN
7593 #  ifdef __cplusplus
7594      extern "C"
7595 #  endif
7596    int F77_DUMMY_MAIN() { return 1; }
7597 #endif
7598 int
7599 main ()
7600 {
7601 dgettext ();
7602   ;
7603   return 0;
7604 }
7605 _ACEOF
7606 rm -f conftest.$ac_objext conftest$ac_exeext
7607 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7608   (eval $ac_link) 2>&5
7609   ac_status=$?
7610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7611   (exit $ac_status); } &&
7612          { ac_try='test -s conftest$ac_exeext'
7613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7614   (eval $ac_try) 2>&5
7615   ac_status=$?
7616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7617   (exit $ac_status); }; }; then
7618   ac_cv_lib_intl_dgettext=yes
7619 else
7620   echo "$as_me: failed program was:" >&5
7621 cat conftest.$ac_ext >&5
7622 ac_cv_lib_intl_dgettext=no
7623 fi
7624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7625 LIBS=$ac_check_lib_save_LIBS
7626 fi
7627 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
7628 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
7629 if test $ac_cv_lib_intl_dgettext = yes; then
7630   gt_cv_func_dgettext_libintl=yes
7631 else
7632   gt_cv_func_dgettext_libintl=no
7633 fi
7634
7635 fi
7636 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
7637 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
7638 fi
7639
7640           fi
7641
7642           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7643             LIBS="$LIBS -lintl";
7644           fi
7645
7646           if test "$gt_cv_func_dgettext_libc" = "yes" \
7647             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7648
7649 cat >>confdefs.h <<\_ACEOF
7650 #define HAVE_GETTEXT 1
7651 _ACEOF
7652
7653             # Extract the first word of "msgfmt", so it can be a program name with args.
7654 set dummy msgfmt; ac_word=$2
7655 echo "$as_me:$LINENO: checking for $ac_word" >&5
7656 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7657 if test "${ac_cv_path_MSGFMT+set}" = set; then
7658   echo $ECHO_N "(cached) $ECHO_C" >&6
7659 else
7660   case "$MSGFMT" in
7661   /*)
7662   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7663   ;;
7664   *)
7665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7666   for ac_dir in $PATH; do
7667     test -z "$ac_dir" && ac_dir=.
7668     if test -f $ac_dir/$ac_word; then
7669       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
7670         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
7671         break
7672       fi
7673     fi
7674   done
7675   IFS="$ac_save_ifs"
7676   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
7677   ;;
7678 esac
7679 fi
7680 MSGFMT="$ac_cv_path_MSGFMT"
7681 if test -n "$MSGFMT"; then
7682   echo "$as_me:$LINENO: result: $MSGFMT" >&5
7683 echo "${ECHO_T}$MSGFMT" >&6
7684 else
7685   echo "$as_me:$LINENO: result: no" >&5
7686 echo "${ECHO_T}no" >&6
7687 fi
7688             if test "$MSGFMT" != "no"; then
7689
7690 for ac_func in dcgettext
7691 do
7692 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7693 echo "$as_me:$LINENO: checking for $ac_func" >&5
7694 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7695 if eval "test \"\${$as_ac_var+set}\" = set"; then
7696   echo $ECHO_N "(cached) $ECHO_C" >&6
7697 else
7698   cat >conftest.$ac_ext <<_ACEOF
7699 #line $LINENO "configure"
7700 #include "confdefs.h"
7701 /* System header to define __stub macros and hopefully few prototypes,
7702     which can conflict with char $ac_func (); below.  */
7703 #include <assert.h>
7704 /* Override any gcc2 internal prototype to avoid an error.  */
7705 #ifdef __cplusplus
7706 extern "C"
7707 #endif
7708 /* We use char because int might match the return type of a gcc2
7709    builtin and then its argument prototype would still apply.  */
7710 char $ac_func ();
7711 char (*f) ();
7712
7713 #ifdef F77_DUMMY_MAIN
7714 #  ifdef __cplusplus
7715      extern "C"
7716 #  endif
7717    int F77_DUMMY_MAIN() { return 1; }
7718 #endif
7719 int
7720 main ()
7721 {
7722 /* The GNU C library defines this for functions which it implements
7723     to always fail with ENOSYS.  Some functions are actually named
7724     something starting with __ and the normal name is an alias.  */
7725 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7726 choke me
7727 #else
7728 f = $ac_func;
7729 #endif
7730
7731   ;
7732   return 0;
7733 }
7734 _ACEOF
7735 rm -f conftest.$ac_objext conftest$ac_exeext
7736 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7737   (eval $ac_link) 2>&5
7738   ac_status=$?
7739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7740   (exit $ac_status); } &&
7741          { ac_try='test -s conftest$ac_exeext'
7742   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7743   (eval $ac_try) 2>&5
7744   ac_status=$?
7745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7746   (exit $ac_status); }; }; then
7747   eval "$as_ac_var=yes"
7748 else
7749   echo "$as_me: failed program was:" >&5
7750 cat conftest.$ac_ext >&5
7751 eval "$as_ac_var=no"
7752 fi
7753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7754 fi
7755 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7756 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7757 if test `eval echo '${'$as_ac_var'}'` = yes; then
7758   cat >>confdefs.h <<_ACEOF
7759 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7760 _ACEOF
7761
7762 fi
7763 done
7764
7765               # Extract the first word of "gmsgfmt", so it can be a program name with args.
7766 set dummy gmsgfmt; ac_word=$2
7767 echo "$as_me:$LINENO: checking for $ac_word" >&5
7768 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7769 if test "${ac_cv_path_GMSGFMT+set}" = set; then
7770   echo $ECHO_N "(cached) $ECHO_C" >&6
7771 else
7772   case $GMSGFMT in
7773   [\\/]* | ?:[\\/]*)
7774   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7775   ;;
7776   *)
7777   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7778 for as_dir in $PATH
7779 do
7780   IFS=$as_save_IFS
7781   test -z "$as_dir" && as_dir=.
7782   for ac_exec_ext in '' $ac_executable_extensions; do
7783   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7784     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
7785     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7786     break 2
7787   fi
7788 done
7789 done
7790
7791   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7792   ;;
7793 esac
7794 fi
7795 GMSGFMT=$ac_cv_path_GMSGFMT
7796
7797 if test -n "$GMSGFMT"; then
7798   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
7799 echo "${ECHO_T}$GMSGFMT" >&6
7800 else
7801   echo "$as_me:$LINENO: result: no" >&5
7802 echo "${ECHO_T}no" >&6
7803 fi
7804
7805               # Extract the first word of "xgettext", so it can be a program name with args.
7806 set dummy xgettext; ac_word=$2
7807 echo "$as_me:$LINENO: checking for $ac_word" >&5
7808 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7809 if test "${ac_cv_path_XGETTEXT+set}" = set; then
7810   echo $ECHO_N "(cached) $ECHO_C" >&6
7811 else
7812   case "$XGETTEXT" in
7813   /*)
7814   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7815   ;;
7816   *)
7817   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7818   for ac_dir in $PATH; do
7819     test -z "$ac_dir" && ac_dir=.
7820     if test -f $ac_dir/$ac_word; then
7821       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
7822         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
7823         break
7824       fi
7825     fi
7826   done
7827   IFS="$ac_save_ifs"
7828   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7829   ;;
7830 esac
7831 fi
7832 XGETTEXT="$ac_cv_path_XGETTEXT"
7833 if test -n "$XGETTEXT"; then
7834   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
7835 echo "${ECHO_T}$XGETTEXT" >&6
7836 else
7837   echo "$as_me:$LINENO: result: no" >&5
7838 echo "${ECHO_T}no" >&6
7839 fi
7840
7841               cat >conftest.$ac_ext <<_ACEOF
7842 #line $LINENO "configure"
7843 #include "confdefs.h"
7844
7845 #ifdef F77_DUMMY_MAIN
7846 #  ifdef __cplusplus
7847      extern "C"
7848 #  endif
7849    int F77_DUMMY_MAIN() { return 1; }
7850 #endif
7851 int
7852 main ()
7853 {
7854 extern int _nl_msg_cat_cntr;
7855                              return _nl_msg_cat_cntr
7856   ;
7857   return 0;
7858 }
7859 _ACEOF
7860 rm -f conftest.$ac_objext conftest$ac_exeext
7861 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7862   (eval $ac_link) 2>&5
7863   ac_status=$?
7864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7865   (exit $ac_status); } &&
7866          { ac_try='test -s conftest$ac_exeext'
7867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7868   (eval $ac_try) 2>&5
7869   ac_status=$?
7870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7871   (exit $ac_status); }; }; then
7872   CATOBJEXT=.gmo
7873                  DATADIRNAME=share
7874 else
7875   echo "$as_me: failed program was:" >&5
7876 cat conftest.$ac_ext >&5
7877 CATOBJEXT=.mo
7878                  DATADIRNAME=lib
7879 fi
7880 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7881               INSTOBJEXT=.mo
7882             fi
7883           fi
7884
7885           # Added by Martin Baulig 12/15/98 for libc5 systems
7886           if test "$gt_cv_func_dgettext_libc" != "yes" \
7887             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
7888             INTLLIBS=-lintl
7889             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
7890           fi
7891
7892 fi
7893
7894
7895
7896       if test "$CATOBJEXT" = "NONE"; then
7897                         nls_cv_use_gnu_gettext=yes
7898       fi
7899     fi
7900
7901     if test "$nls_cv_use_gnu_gettext" != "yes"; then
7902
7903 cat >>confdefs.h <<\_ACEOF
7904 #define ENABLE_NLS 1
7905 _ACEOF
7906
7907     else
7908             CATOBJEXT=
7909     fi
7910
7911         if test "$XGETTEXT" != ":"; then
7912                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7913         : ;
7914       else
7915         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
7916 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
7917         XGETTEXT=":"
7918       fi
7919     fi
7920
7921     # We need to process the po/ directory.
7922     POSUB=po
7923
7924     ac_config_commands="$ac_config_commands default-2"
7925
7926
7927                 for lang in $ALL_LINGUAS; do
7928       GMOFILES="$GMOFILES $lang.gmo"
7929       POFILES="$POFILES $lang.po"
7930     done
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944    if test "x$CATOBJEXT" != "x"; then
7945      if test "x$ALL_LINGUAS" = "x"; then
7946        LINGUAS=
7947      else
7948        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
7949 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
7950        NEW_LINGUAS=
7951        for lang in ${LINGUAS=$ALL_LINGUAS}; do
7952          case "$ALL_LINGUAS" in
7953           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
7954          esac
7955        done
7956        LINGUAS=$NEW_LINGUAS
7957        echo "$as_me:$LINENO: result: $LINGUAS" >&5
7958 echo "${ECHO_T}$LINGUAS" >&6
7959      fi
7960
7961           if test -n "$LINGUAS"; then
7962        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7963      fi
7964    fi
7965
7966             test -d po || mkdir po
7967    if test "$CATOBJEXT" = ".cat"; then
7968      if test "${ac_cv_header_linux_version_h+set}" = set; then
7969   echo "$as_me:$LINENO: checking for linux/version.h" >&5
7970 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
7971 if test "${ac_cv_header_linux_version_h+set}" = set; then
7972   echo $ECHO_N "(cached) $ECHO_C" >&6
7973 fi
7974 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
7975 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
7976 else
7977   # Is the header compilable?
7978 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
7979 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
7980 cat >conftest.$ac_ext <<_ACEOF
7981 #line $LINENO "configure"
7982 #include "confdefs.h"
7983 $ac_includes_default
7984 #include <linux/version.h>
7985 _ACEOF
7986 rm -f conftest.$ac_objext
7987 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7988   (eval $ac_compile) 2>&5
7989   ac_status=$?
7990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7991   (exit $ac_status); } &&
7992          { ac_try='test -s conftest.$ac_objext'
7993   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7994   (eval $ac_try) 2>&5
7995   ac_status=$?
7996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7997   (exit $ac_status); }; }; then
7998   ac_header_compiler=yes
7999 else
8000   echo "$as_me: failed program was:" >&5
8001 cat conftest.$ac_ext >&5
8002 ac_header_compiler=no
8003 fi
8004 rm -f conftest.$ac_objext conftest.$ac_ext
8005 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8006 echo "${ECHO_T}$ac_header_compiler" >&6
8007
8008 # Is the header present?
8009 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
8010 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
8011 cat >conftest.$ac_ext <<_ACEOF
8012 #line $LINENO "configure"
8013 #include "confdefs.h"
8014 #include <linux/version.h>
8015 _ACEOF
8016 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8017   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8018   ac_status=$?
8019   egrep -v '^ *\+' conftest.er1 >conftest.err
8020   rm -f conftest.er1
8021   cat conftest.err >&5
8022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8023   (exit $ac_status); } >/dev/null; then
8024   if test -s conftest.err; then
8025     ac_cpp_err=$ac_c_preproc_warn_flag
8026   else
8027     ac_cpp_err=
8028   fi
8029 else
8030   ac_cpp_err=yes
8031 fi
8032 if test -z "$ac_cpp_err"; then
8033   ac_header_preproc=yes
8034 else
8035   echo "$as_me: failed program was:" >&5
8036   cat conftest.$ac_ext >&5
8037   ac_header_preproc=no
8038 fi
8039 rm -f conftest.err conftest.$ac_ext
8040 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8041 echo "${ECHO_T}$ac_header_preproc" >&6
8042
8043 # So?  What about this header?
8044 case $ac_header_compiler:$ac_header_preproc in
8045   yes:no )
8046     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
8047 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8048     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8049 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;};;
8050   no:yes )
8051     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
8052 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
8053     { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
8054 echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
8055     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8056 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;};;
8057 esac
8058 echo "$as_me:$LINENO: checking for linux/version.h" >&5
8059 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8060 if test "${ac_cv_header_linux_version_h+set}" = set; then
8061   echo $ECHO_N "(cached) $ECHO_C" >&6
8062 else
8063   ac_cv_header_linux_version_h=$ac_header_preproc
8064 fi
8065 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8066 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8067
8068 fi
8069 if test $ac_cv_header_linux_version_h = yes; then
8070   msgformat=linux
8071 else
8072   msgformat=xopen
8073 fi
8074
8075
8076
8077                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
8078    fi
8079
8080             MKINSTALLDIRS=
8081 #
8082 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
8083 #
8084 #   if test -n "$ac_aux_dir"; then
8085 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8086 #   fi
8087    if test -z "$MKINSTALLDIRS"; then
8088      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8089    fi
8090
8091    # jwz: you know what, screw it.  Let's just use the version that I
8092    # already computed in configure.in, instead of this version that came
8093    # with the i18n crud, ok?
8094    MKINSTALLDIRS="$INSTALL_DIRS"
8095
8096
8097
8098
8099          test -d po || mkdir po
8100    if test "x$srcdir" != "x."; then
8101      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8102        posrcprefix="$srcdir/"
8103      else
8104        posrcprefix="../$srcdir/"
8105      fi
8106    else
8107      posrcprefix="../"
8108    fi
8109    rm -f po/POTFILES
8110    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8111         < $srcdir/po/POTFILES.in > po/POTFILES
8112
8113
8114
8115 ###############################################################################
8116 #
8117 #       Check for -lXmu (some fucked up vendors don't ship it...)
8118 #
8119 ###############################################################################
8120
8121 have_xmu=no
8122
8123   ac_save_CPPFLAGS="$CPPFLAGS"
8124   if test \! -z "$includedir" ; then
8125     CPPFLAGS="$CPPFLAGS -I$includedir"
8126   fi
8127   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8128   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
8129 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
8130 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
8131   echo $ECHO_N "(cached) $ECHO_C" >&6
8132 else
8133   cat >conftest.$ac_ext <<_ACEOF
8134 #line $LINENO "configure"
8135 #include "confdefs.h"
8136 #include <stdlib.h>
8137                    #include <stdio.h>
8138                    #include <X11/Intrinsic.h>
8139
8140 #include <X11/Xmu/Error.h>
8141 _ACEOF
8142 rm -f conftest.$ac_objext
8143 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8144   (eval $ac_compile) 2>&5
8145   ac_status=$?
8146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8147   (exit $ac_status); } &&
8148          { ac_try='test -s conftest.$ac_objext'
8149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8150   (eval $ac_try) 2>&5
8151   ac_status=$?
8152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8153   (exit $ac_status); }; }; then
8154   ac_cv_header_X11_Xmu_Error_h=yes
8155 else
8156   echo "$as_me: failed program was:" >&5
8157 cat conftest.$ac_ext >&5
8158 ac_cv_header_X11_Xmu_Error_h=no
8159 fi
8160 rm -f conftest.$ac_objext conftest.$ac_ext
8161 fi
8162 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
8163 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
8164 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
8165   have_xmu=yes
8166 fi
8167
8168
8169   CPPFLAGS="$ac_save_CPPFLAGS"
8170 if test "$have_xmu" = no ; then
8171   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8172   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8173   XMU_LIBS=''
8174 else
8175   XMU_SRCS=''
8176   XMU_OBJS=''
8177   XMU_LIBS='-lXmu'
8178   cat >>confdefs.h <<\_ACEOF
8179 #define HAVE_XMU 1
8180 _ACEOF
8181
8182 fi
8183
8184
8185 ###############################################################################
8186 #
8187 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8188 #       See comp.windows.x FAQ question 124.  The right fix is to
8189 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8190 #
8191 ###############################################################################
8192
8193 if test "$have_xmu" = yes ; then
8194   case "$host" in
8195     *-sunos4*)
8196     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8197 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
8198 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
8199   echo $ECHO_N "(cached) $ECHO_C" >&6
8200 else
8201   ac_save_LDFLAGS="$LDFLAGS"
8202                     if test \! -z "$x_libraries" ; then
8203                       LDFLAGS="$LDFLAGS -L$x_libraries"
8204                     fi
8205                     # Note: this trick never works!  (Generally.)
8206                     # We're only getting away with using AC_TRY_LINK
8207                     # with X libraries because we know it's SunOS.
8208                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8209                     cat >conftest.$ac_ext <<_ACEOF
8210 #line $LINENO "configure"
8211 #include "confdefs.h"
8212
8213 #ifdef F77_DUMMY_MAIN
8214 #  ifdef __cplusplus
8215      extern "C"
8216 #  endif
8217    int F77_DUMMY_MAIN() { return 1; }
8218 #endif
8219 int
8220 main ()
8221 {
8222
8223   ;
8224   return 0;
8225 }
8226 _ACEOF
8227 rm -f conftest.$ac_objext conftest$ac_exeext
8228 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8229   (eval $ac_link) 2>&5
8230   ac_status=$?
8231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8232   (exit $ac_status); } &&
8233          { ac_try='test -s conftest$ac_exeext'
8234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8235   (eval $ac_try) 2>&5
8236   ac_status=$?
8237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8238   (exit $ac_status); }; }; then
8239   ac_cv_sunos_xmu_bug=no
8240 else
8241   echo "$as_me: failed program was:" >&5
8242 cat conftest.$ac_ext >&5
8243 ac_cv_sunos_xmu_bug=yes
8244 fi
8245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8246                     LDFLAGS="$ac_save_LDFLAGS"
8247 fi
8248 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
8249 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
8250     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8251       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
8252 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
8253 if test "${ac_cv_ld_static+set}" = set; then
8254   echo $ECHO_N "(cached) $ECHO_C" >&6
8255 else
8256   ac_save_LDFLAGS="$LDFLAGS"
8257                       LDFLAGS="$LDFLAGS -static"
8258                       cat >conftest.$ac_ext <<_ACEOF
8259 #line $LINENO "configure"
8260 #include "confdefs.h"
8261
8262 #ifdef F77_DUMMY_MAIN
8263 #  ifdef __cplusplus
8264      extern "C"
8265 #  endif
8266    int F77_DUMMY_MAIN() { return 1; }
8267 #endif
8268 int
8269 main ()
8270 {
8271
8272   ;
8273   return 0;
8274 }
8275 _ACEOF
8276 rm -f conftest.$ac_objext conftest$ac_exeext
8277 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8278   (eval $ac_link) 2>&5
8279   ac_status=$?
8280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8281   (exit $ac_status); } &&
8282          { ac_try='test -s conftest$ac_exeext'
8283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8284   (eval $ac_try) 2>&5
8285   ac_status=$?
8286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8287   (exit $ac_status); }; }; then
8288   ac_cv_ld_static=yes
8289 else
8290   echo "$as_me: failed program was:" >&5
8291 cat conftest.$ac_ext >&5
8292 ac_cv_ld_static=no
8293 fi
8294 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8295                     LDFLAGS="$ac_save_LDFLAGS"
8296 fi
8297 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
8298 echo "${ECHO_T}$ac_cv_ld_static" >&6
8299       if test "$ac_cv_ld_static" = yes ; then
8300         LDFLAGS="$LDFLAGS -static"
8301       else
8302         LDFLAGS="$LDFLAGS -Bstatic"
8303       fi
8304     fi
8305     ;;
8306   esac
8307 fi
8308
8309
8310 ###############################################################################
8311 #
8312 #       Handle the --with-hackdir option
8313 #
8314 ###############################################################################
8315
8316 have_hackdir=yes
8317 with_hackdir_req=unspecified
8318
8319 # Check whether --with-hackdir or --without-hackdir was given.
8320 if test "${with_hackdir+set}" = set; then
8321   withval="$with_hackdir"
8322   with_hackdir="$withval"; with_hackdir_req="$withval"
8323 else
8324   with_hackdir=yes
8325 fi;
8326
8327 if test x"$with_hackdir" = xyes; then
8328   HACKDIR='${exec_prefix}/lib/xscreensaver'
8329 elif test x"$with_hackdir" = xno; then
8330   HACKDIR='${bindir}'
8331 else
8332   # there must be a better way than this...
8333   if test -z "`echo $with_hackdir | sed 's@^/.*@@'`" ; then
8334     # absolute path
8335     HACKDIR=$with_hackdir
8336   else
8337     # relative path
8338     HACKDIR="\${exec_prefix}$with_hackdir"
8339   fi
8340 fi
8341
8342 # canonicalize slashes.
8343 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8344
8345 # This option used to be called --enable-subdir; make sure that is no longer
8346 # used, since configure brain-damagedly ignores unknown --enable options.
8347
8348 obsolete_enable=
8349 # Check whether --enable-subdir or --disable-subdir was given.
8350 if test "${enable_subdir+set}" = set; then
8351   enableval="$enable_subdir"
8352   obsolete_enable=yes
8353 fi;
8354 if test -n "$obsolete_enable"; then
8355   echo "error: the --enable-subdir option has been replaced with"
8356   echo "       the new --with-hackdir option; see \`configure --help'"
8357   echo "       for more information."
8358   exit 1
8359 fi
8360
8361
8362 ###############################################################################
8363 #
8364 #       Handle the --with-configdir option
8365 #
8366 ###############################################################################
8367
8368 have_configdir=yes
8369 with_configdir_req=unspecified
8370
8371 # Check whether --with-configdir or --without-configdir was given.
8372 if test "${with_configdir+set}" = set; then
8373   withval="$with_configdir"
8374   with_configdir="$withval"; with_configdir_req="$withval"
8375 else
8376   with_configdir=yes
8377 fi;
8378
8379 if test x"$with_configdir" = xyes; then
8380   # filled in later...
8381   HACK_CONF_DIR=''
8382 elif test x"$with_configdir" = xno; then
8383   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8384   exit 1
8385 else
8386   # there must be a better way than this...
8387   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8388     # absolute path
8389     HACK_CONF_DIR=$with_configdir
8390   else
8391     # relative path
8392     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8393   fi
8394 fi
8395
8396
8397
8398
8399 ###############################################################################
8400 #
8401 #       Check for the SGI SCREEN_SAVER server extension.
8402 #
8403 ###############################################################################
8404
8405 have_sgi=no
8406 with_sgi_req=unspecified
8407
8408 # Check whether --with-sgi-ext or --without-sgi-ext was given.
8409 if test "${with_sgi_ext+set}" = set; then
8410   withval="$with_sgi_ext"
8411   with_sgi="$withval"; with_sgi_req="$withval"
8412 else
8413   with_sgi=yes
8414 fi;
8415
8416
8417    case "$with_sgi" in
8418     yes) ;;
8419     no)  ;;
8420
8421     /*)
8422      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
8423 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
8424      d=$with_sgi/include
8425      if test -d $d; then
8426        X_CFLAGS="-I$d $X_CFLAGS"
8427        echo "$as_me:$LINENO: result: $d" >&5
8428 echo "${ECHO_T}$d" >&6
8429      else
8430        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8431 echo "${ECHO_T}not found ($d: no such directory)" >&6
8432      fi
8433
8434      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
8435 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
8436      d=$with_sgi/lib
8437      if test -d $d; then
8438        X_LIBS="-L$d $X_LIBS"
8439        echo "$as_me:$LINENO: result: $d" >&5
8440 echo "${ECHO_T}$d" >&6
8441      else
8442        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8443 echo "${ECHO_T}not found ($d: no such directory)" >&6
8444      fi
8445
8446      # replace the directory string with "yes".
8447      with_sgi_req="yes"
8448      with_sgi=$with_sgi_req
8449      ;;
8450
8451     *)
8452      echo ""
8453      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
8454      echo "       If it is a directory, then \`DIR/include' will be added to"
8455      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8456      exit 1
8457      ;;
8458    esac
8459
8460
8461 if test "$with_sgi" = yes; then
8462
8463   ac_save_CPPFLAGS="$CPPFLAGS"
8464   if test \! -z "$includedir" ; then
8465     CPPFLAGS="$CPPFLAGS -I$includedir"
8466   fi
8467   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8468   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
8469 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
8470 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
8471   echo $ECHO_N "(cached) $ECHO_C" >&6
8472 else
8473   cat >conftest.$ac_ext <<_ACEOF
8474 #line $LINENO "configure"
8475 #include "confdefs.h"
8476 #include <X11/Xlib.h>
8477
8478 #include <X11/extensions/XScreenSaver.h>
8479 _ACEOF
8480 rm -f conftest.$ac_objext
8481 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8482   (eval $ac_compile) 2>&5
8483   ac_status=$?
8484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8485   (exit $ac_status); } &&
8486          { ac_try='test -s conftest.$ac_objext'
8487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8488   (eval $ac_try) 2>&5
8489   ac_status=$?
8490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491   (exit $ac_status); }; }; then
8492   ac_cv_header_X11_extensions_XScreenSaver_h=yes
8493 else
8494   echo "$as_me: failed program was:" >&5
8495 cat conftest.$ac_ext >&5
8496 ac_cv_header_X11_extensions_XScreenSaver_h=no
8497 fi
8498 rm -f conftest.$ac_objext conftest.$ac_ext
8499 fi
8500 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
8501 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
8502 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
8503   have_sgi=yes
8504                      cat >>confdefs.h <<\_ACEOF
8505 #define HAVE_SGI_SAVER_EXTENSION 1
8506 _ACEOF
8507
8508 fi
8509
8510
8511   CPPFLAGS="$ac_save_CPPFLAGS"
8512
8513 elif test "$with_sgi" != no; then
8514   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
8515   exit 1
8516 fi
8517
8518
8519 ###############################################################################
8520 #
8521 #       Check for the MIT-SCREEN-SAVER server extension.
8522 #
8523 ###############################################################################
8524
8525 have_mit=no
8526 with_mit_req=unspecified
8527
8528 # Check whether --with-mit-ext or --without-mit-ext was given.
8529 if test "${with_mit_ext+set}" = set; then
8530   withval="$with_mit_ext"
8531   with_mit="$withval"; with_mit_req="$withval"
8532 else
8533   with_mit=yes
8534 fi;
8535
8536
8537    case "$with_mit" in
8538     yes) ;;
8539     no)  ;;
8540
8541     /*)
8542      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER headers" >&5
8543 echo $ECHO_N "checking for MIT-SCREEN-SAVER headers... $ECHO_C" >&6
8544      d=$with_mit/include
8545      if test -d $d; then
8546        X_CFLAGS="-I$d $X_CFLAGS"
8547        echo "$as_me:$LINENO: result: $d" >&5
8548 echo "${ECHO_T}$d" >&6
8549      else
8550        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8551 echo "${ECHO_T}not found ($d: no such directory)" >&6
8552      fi
8553
8554      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER libs" >&5
8555 echo $ECHO_N "checking for MIT-SCREEN-SAVER libs... $ECHO_C" >&6
8556      d=$with_mit/lib
8557      if test -d $d; then
8558        X_LIBS="-L$d $X_LIBS"
8559        echo "$as_me:$LINENO: result: $d" >&5
8560 echo "${ECHO_T}$d" >&6
8561      else
8562        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8563 echo "${ECHO_T}not found ($d: no such directory)" >&6
8564      fi
8565
8566      # replace the directory string with "yes".
8567      with_mit_req="yes"
8568      with_mit=$with_mit_req
8569      ;;
8570
8571     *)
8572      echo ""
8573      echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
8574      echo "       If it is a directory, then \`DIR/include' will be added to"
8575      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8576      exit 1
8577      ;;
8578    esac
8579
8580
8581 if test "$with_mit" = yes; then
8582
8583   ac_save_CPPFLAGS="$CPPFLAGS"
8584   if test \! -z "$includedir" ; then
8585     CPPFLAGS="$CPPFLAGS -I$includedir"
8586   fi
8587   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8588   echo "$as_me:$LINENO: checking for X11/extensions/scrnsaver.h" >&5
8589 echo $ECHO_N "checking for X11/extensions/scrnsaver.h... $ECHO_C" >&6
8590 if test "${ac_cv_header_X11_extensions_scrnsaver_h+set}" = set; then
8591   echo $ECHO_N "(cached) $ECHO_C" >&6
8592 else
8593   cat >conftest.$ac_ext <<_ACEOF
8594 #line $LINENO "configure"
8595 #include "confdefs.h"
8596 #include <X11/Xlib.h>
8597
8598 #include <X11/extensions/scrnsaver.h>
8599 _ACEOF
8600 rm -f conftest.$ac_objext
8601 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8602   (eval $ac_compile) 2>&5
8603   ac_status=$?
8604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8605   (exit $ac_status); } &&
8606          { ac_try='test -s conftest.$ac_objext'
8607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8608   (eval $ac_try) 2>&5
8609   ac_status=$?
8610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8611   (exit $ac_status); }; }; then
8612   ac_cv_header_X11_extensions_scrnsaver_h=yes
8613 else
8614   echo "$as_me: failed program was:" >&5
8615 cat conftest.$ac_ext >&5
8616 ac_cv_header_X11_extensions_scrnsaver_h=no
8617 fi
8618 rm -f conftest.$ac_objext conftest.$ac_ext
8619 fi
8620 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_scrnsaver_h" >&5
8621 echo "${ECHO_T}$ac_cv_header_X11_extensions_scrnsaver_h" >&6
8622 if test $ac_cv_header_X11_extensions_scrnsaver_h = yes; then
8623   have_mit=yes
8624 fi
8625
8626
8627   CPPFLAGS="$ac_save_CPPFLAGS"
8628
8629   # Now check to see if it's really in the library; XF86Free-3.3 ships
8630   # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
8631   #
8632   if test "$have_mit" = yes; then
8633
8634   ac_save_CPPFLAGS="$CPPFLAGS"
8635   ac_save_LDFLAGS="$LDFLAGS"
8636 #  ac_save_LIBS="$LIBS"
8637
8638   if test \! -z "$includedir" ; then
8639     CPPFLAGS="$CPPFLAGS -I$includedir"
8640   fi
8641   # note: $X_CFLAGS includes $x_includes
8642   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8643
8644   if test \! -z "$libdir" ; then
8645     LDFLAGS="$LDFLAGS -L$libdir"
8646   fi
8647   # note: $X_LIBS includes $x_libraries
8648   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8649
8650   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXext" >&5
8651 echo $ECHO_N "checking for XScreenSaverRegister in -lXext... $ECHO_C" >&6
8652 if test "${ac_cv_lib_Xext_XScreenSaverRegister+set}" = set; then
8653   echo $ECHO_N "(cached) $ECHO_C" >&6
8654 else
8655   ac_check_lib_save_LIBS=$LIBS
8656 LIBS="-lXext -lm $LIBS"
8657 cat >conftest.$ac_ext <<_ACEOF
8658 #line $LINENO "configure"
8659 #include "confdefs.h"
8660
8661 /* Override any gcc2 internal prototype to avoid an error.  */
8662 #ifdef __cplusplus
8663 extern "C"
8664 #endif
8665 /* We use char because int might match the return type of a gcc2
8666    builtin and then its argument prototype would still apply.  */
8667 char XScreenSaverRegister ();
8668 #ifdef F77_DUMMY_MAIN
8669 #  ifdef __cplusplus
8670      extern "C"
8671 #  endif
8672    int F77_DUMMY_MAIN() { return 1; }
8673 #endif
8674 int
8675 main ()
8676 {
8677 XScreenSaverRegister ();
8678   ;
8679   return 0;
8680 }
8681 _ACEOF
8682 rm -f conftest.$ac_objext conftest$ac_exeext
8683 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8684   (eval $ac_link) 2>&5
8685   ac_status=$?
8686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8687   (exit $ac_status); } &&
8688          { ac_try='test -s conftest$ac_exeext'
8689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8690   (eval $ac_try) 2>&5
8691   ac_status=$?
8692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8693   (exit $ac_status); }; }; then
8694   ac_cv_lib_Xext_XScreenSaverRegister=yes
8695 else
8696   echo "$as_me: failed program was:" >&5
8697 cat conftest.$ac_ext >&5
8698 ac_cv_lib_Xext_XScreenSaverRegister=no
8699 fi
8700 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8701 LIBS=$ac_check_lib_save_LIBS
8702 fi
8703 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XScreenSaverRegister" >&5
8704 echo "${ECHO_T}$ac_cv_lib_Xext_XScreenSaverRegister" >&6
8705 if test $ac_cv_lib_Xext_XScreenSaverRegister = yes; then
8706   true
8707 else
8708   have_mit=no
8709 fi
8710
8711   CPPFLAGS="$ac_save_CPPFLAGS"
8712   LDFLAGS="$ac_save_LDFLAGS"
8713 #  LIBS="$ac_save_LIBS"
8714
8715
8716     if test "$have_mit" = no; then
8717       # Fuck!  Looks like XF86Free-3.3 actually puts it in XExExt instead
8718       # of in Xext.  Thank you master, may I have another.
8719
8720   ac_save_CPPFLAGS="$CPPFLAGS"
8721   ac_save_LDFLAGS="$LDFLAGS"
8722 #  ac_save_LIBS="$LIBS"
8723
8724   if test \! -z "$includedir" ; then
8725     CPPFLAGS="$CPPFLAGS -I$includedir"
8726   fi
8727   # note: $X_CFLAGS includes $x_includes
8728   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8729
8730   if test \! -z "$libdir" ; then
8731     LDFLAGS="$LDFLAGS -L$libdir"
8732   fi
8733   # note: $X_LIBS includes $x_libraries
8734   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8735
8736   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXExExt" >&5
8737 echo $ECHO_N "checking for XScreenSaverRegister in -lXExExt... $ECHO_C" >&6
8738 if test "${ac_cv_lib_XExExt_XScreenSaverRegister+set}" = set; then
8739   echo $ECHO_N "(cached) $ECHO_C" >&6
8740 else
8741   ac_check_lib_save_LIBS=$LIBS
8742 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
8743 cat >conftest.$ac_ext <<_ACEOF
8744 #line $LINENO "configure"
8745 #include "confdefs.h"
8746
8747 /* Override any gcc2 internal prototype to avoid an error.  */
8748 #ifdef __cplusplus
8749 extern "C"
8750 #endif
8751 /* We use char because int might match the return type of a gcc2
8752    builtin and then its argument prototype would still apply.  */
8753 char XScreenSaverRegister ();
8754 #ifdef F77_DUMMY_MAIN
8755 #  ifdef __cplusplus
8756      extern "C"
8757 #  endif
8758    int F77_DUMMY_MAIN() { return 1; }
8759 #endif
8760 int
8761 main ()
8762 {
8763 XScreenSaverRegister ();
8764   ;
8765   return 0;
8766 }
8767 _ACEOF
8768 rm -f conftest.$ac_objext conftest$ac_exeext
8769 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8770   (eval $ac_link) 2>&5
8771   ac_status=$?
8772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8773   (exit $ac_status); } &&
8774          { ac_try='test -s conftest$ac_exeext'
8775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8776   (eval $ac_try) 2>&5
8777   ac_status=$?
8778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8779   (exit $ac_status); }; }; then
8780   ac_cv_lib_XExExt_XScreenSaverRegister=yes
8781 else
8782   echo "$as_me: failed program was:" >&5
8783 cat conftest.$ac_ext >&5
8784 ac_cv_lib_XExExt_XScreenSaverRegister=no
8785 fi
8786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8787 LIBS=$ac_check_lib_save_LIBS
8788 fi
8789 echo "$as_me:$LINENO: result: $ac_cv_lib_XExExt_XScreenSaverRegister" >&5
8790 echo "${ECHO_T}$ac_cv_lib_XExExt_XScreenSaverRegister" >&6
8791 if test $ac_cv_lib_XExExt_XScreenSaverRegister = yes; then
8792   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
8793 else
8794   true
8795 fi
8796
8797   CPPFLAGS="$ac_save_CPPFLAGS"
8798   LDFLAGS="$ac_save_LDFLAGS"
8799 #  LIBS="$ac_save_LIBS"
8800
8801     fi
8802
8803     if test "$have_mit" = no; then
8804       # Double fuck!  Looks like some versions of XFree86 (whichever version
8805       # it is that comes with RedHat Linux 2.0 -- I can't find a version
8806       # number) put this garbage in Xss instead of Xext.  Thank you master,
8807       #  may I have another.
8808
8809   ac_save_CPPFLAGS="$CPPFLAGS"
8810   ac_save_LDFLAGS="$LDFLAGS"
8811 #  ac_save_LIBS="$LIBS"
8812
8813   if test \! -z "$includedir" ; then
8814     CPPFLAGS="$CPPFLAGS -I$includedir"
8815   fi
8816   # note: $X_CFLAGS includes $x_includes
8817   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8818
8819   if test \! -z "$libdir" ; then
8820     LDFLAGS="$LDFLAGS -L$libdir"
8821   fi
8822   # note: $X_LIBS includes $x_libraries
8823   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
8824
8825   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXss" >&5
8826 echo $ECHO_N "checking for XScreenSaverRegister in -lXss... $ECHO_C" >&6
8827 if test "${ac_cv_lib_Xss_XScreenSaverRegister+set}" = set; then
8828   echo $ECHO_N "(cached) $ECHO_C" >&6
8829 else
8830   ac_check_lib_save_LIBS=$LIBS
8831 LIBS="-lXss -lX11 -lXext -lm $LIBS"
8832 cat >conftest.$ac_ext <<_ACEOF
8833 #line $LINENO "configure"
8834 #include "confdefs.h"
8835
8836 /* Override any gcc2 internal prototype to avoid an error.  */
8837 #ifdef __cplusplus
8838 extern "C"
8839 #endif
8840 /* We use char because int might match the return type of a gcc2
8841    builtin and then its argument prototype would still apply.  */
8842 char XScreenSaverRegister ();
8843 #ifdef F77_DUMMY_MAIN
8844 #  ifdef __cplusplus
8845      extern "C"
8846 #  endif
8847    int F77_DUMMY_MAIN() { return 1; }
8848 #endif
8849 int
8850 main ()
8851 {
8852 XScreenSaverRegister ();
8853   ;
8854   return 0;
8855 }
8856 _ACEOF
8857 rm -f conftest.$ac_objext conftest$ac_exeext
8858 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8859   (eval $ac_link) 2>&5
8860   ac_status=$?
8861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8862   (exit $ac_status); } &&
8863          { ac_try='test -s conftest$ac_exeext'
8864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8865   (eval $ac_try) 2>&5
8866   ac_status=$?
8867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8868   (exit $ac_status); }; }; then
8869   ac_cv_lib_Xss_XScreenSaverRegister=yes
8870 else
8871   echo "$as_me: failed program was:" >&5
8872 cat conftest.$ac_ext >&5
8873 ac_cv_lib_Xss_XScreenSaverRegister=no
8874 fi
8875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8876 LIBS=$ac_check_lib_save_LIBS
8877 fi
8878 echo "$as_me:$LINENO: result: $ac_cv_lib_Xss_XScreenSaverRegister" >&5
8879 echo "${ECHO_T}$ac_cv_lib_Xss_XScreenSaverRegister" >&6
8880 if test $ac_cv_lib_Xss_XScreenSaverRegister = yes; then
8881   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
8882 else
8883   true
8884 fi
8885
8886   CPPFLAGS="$ac_save_CPPFLAGS"
8887   LDFLAGS="$ac_save_LDFLAGS"
8888 #  LIBS="$ac_save_LIBS"
8889
8890     fi
8891
8892   if test "$have_mit" = yes; then
8893     cat >>confdefs.h <<\_ACEOF
8894 #define HAVE_MIT_SAVER_EXTENSION 1
8895 _ACEOF
8896
8897   fi
8898
8899   fi
8900
8901 elif test "$with_mit" != no; then
8902   echo "error: must be yes or no: --with-mit-ext=$with_mit"
8903   exit 1
8904 fi
8905
8906
8907 ###############################################################################
8908 #
8909 #       Check for the XIDLE server extension.
8910 #
8911 ###############################################################################
8912
8913 have_xidle=no
8914 with_xidle_req=unspecified
8915
8916 # Check whether --with-xidle-ext or --without-xidle-ext was given.
8917 if test "${with_xidle_ext+set}" = set; then
8918   withval="$with_xidle_ext"
8919   with_xidle="$withval"; with_xidle_req="$withval"
8920 else
8921   with_xidle=yes
8922 fi;
8923
8924
8925    case "$with_xidle" in
8926     yes) ;;
8927     no)  ;;
8928
8929     /*)
8930      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
8931 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
8932      d=$with_xidle/include
8933      if test -d $d; then
8934        X_CFLAGS="-I$d $X_CFLAGS"
8935        echo "$as_me:$LINENO: result: $d" >&5
8936 echo "${ECHO_T}$d" >&6
8937      else
8938        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8939 echo "${ECHO_T}not found ($d: no such directory)" >&6
8940      fi
8941
8942      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
8943 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
8944      d=$with_xidle/lib
8945      if test -d $d; then
8946        X_LIBS="-L$d $X_LIBS"
8947        echo "$as_me:$LINENO: result: $d" >&5
8948 echo "${ECHO_T}$d" >&6
8949      else
8950        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8951 echo "${ECHO_T}not found ($d: no such directory)" >&6
8952      fi
8953
8954      # replace the directory string with "yes".
8955      with_xidle_req="yes"
8956      with_xidle=$with_xidle_req
8957      ;;
8958
8959     *)
8960      echo ""
8961      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
8962      echo "       If it is a directory, then \`DIR/include' will be added to"
8963      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8964      exit 1
8965      ;;
8966    esac
8967
8968
8969 if test "$with_xidle" = yes; then
8970
8971   ac_save_CPPFLAGS="$CPPFLAGS"
8972   if test \! -z "$includedir" ; then
8973     CPPFLAGS="$CPPFLAGS -I$includedir"
8974   fi
8975   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8976   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
8977 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
8978 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
8979   echo $ECHO_N "(cached) $ECHO_C" >&6
8980 else
8981   cat >conftest.$ac_ext <<_ACEOF
8982 #line $LINENO "configure"
8983 #include "confdefs.h"
8984 #include <X11/Xlib.h>
8985
8986 #include <X11/extensions/xidle.h>
8987 _ACEOF
8988 rm -f conftest.$ac_objext
8989 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8990   (eval $ac_compile) 2>&5
8991   ac_status=$?
8992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8993   (exit $ac_status); } &&
8994          { ac_try='test -s conftest.$ac_objext'
8995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8996   (eval $ac_try) 2>&5
8997   ac_status=$?
8998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8999   (exit $ac_status); }; }; then
9000   ac_cv_header_X11_extensions_xidle_h=yes
9001 else
9002   echo "$as_me: failed program was:" >&5
9003 cat conftest.$ac_ext >&5
9004 ac_cv_header_X11_extensions_xidle_h=no
9005 fi
9006 rm -f conftest.$ac_objext conftest.$ac_ext
9007 fi
9008 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
9009 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
9010 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
9011   have_xidle=yes
9012                      cat >>confdefs.h <<\_ACEOF
9013 #define HAVE_XIDLE_EXTENSION 1
9014 _ACEOF
9015
9016 fi
9017
9018
9019   CPPFLAGS="$ac_save_CPPFLAGS"
9020 elif test "$with_xidle" != no; then
9021   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
9022   exit 1
9023 fi
9024
9025
9026 ###############################################################################
9027 #
9028 #       Check for the SGI-VIDEO-CONTROL server extension.
9029 #
9030 ###############################################################################
9031
9032 have_sgivc=no
9033 with_sgivc_req=unspecified
9034
9035 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
9036 if test "${with_sgivc_ext+set}" = set; then
9037   withval="$with_sgivc_ext"
9038   with_sgivc="$withval"; with_sgivc_req="$withval"
9039 else
9040   with_sgivc=yes
9041 fi;
9042
9043
9044    case "$with_sgivc" in
9045     yes) ;;
9046     no)  ;;
9047
9048     /*)
9049      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
9050 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
9051      d=$with_sgivc/include
9052      if test -d $d; then
9053        X_CFLAGS="-I$d $X_CFLAGS"
9054        echo "$as_me:$LINENO: result: $d" >&5
9055 echo "${ECHO_T}$d" >&6
9056      else
9057        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9058 echo "${ECHO_T}not found ($d: no such directory)" >&6
9059      fi
9060
9061      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
9062 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
9063      d=$with_sgivc/lib
9064      if test -d $d; then
9065        X_LIBS="-L$d $X_LIBS"
9066        echo "$as_me:$LINENO: result: $d" >&5
9067 echo "${ECHO_T}$d" >&6
9068      else
9069        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9070 echo "${ECHO_T}not found ($d: no such directory)" >&6
9071      fi
9072
9073      # replace the directory string with "yes".
9074      with_sgivc_req="yes"
9075      with_sgivc=$with_sgivc_req
9076      ;;
9077
9078     *)
9079      echo ""
9080      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
9081      echo "       If it is a directory, then \`DIR/include' will be added to"
9082      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9083      exit 1
9084      ;;
9085    esac
9086
9087
9088 if test "$with_sgivc" = yes; then
9089
9090   # first check for XSGIvc.h
9091
9092   ac_save_CPPFLAGS="$CPPFLAGS"
9093   if test \! -z "$includedir" ; then
9094     CPPFLAGS="$CPPFLAGS -I$includedir"
9095   fi
9096   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9097   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
9098 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
9099 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
9100   echo $ECHO_N "(cached) $ECHO_C" >&6
9101 else
9102   cat >conftest.$ac_ext <<_ACEOF
9103 #line $LINENO "configure"
9104 #include "confdefs.h"
9105 #include <X11/Xlib.h>
9106
9107 #include <X11/extensions/XSGIvc.h>
9108 _ACEOF
9109 rm -f conftest.$ac_objext
9110 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9111   (eval $ac_compile) 2>&5
9112   ac_status=$?
9113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9114   (exit $ac_status); } &&
9115          { ac_try='test -s conftest.$ac_objext'
9116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9117   (eval $ac_try) 2>&5
9118   ac_status=$?
9119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9120   (exit $ac_status); }; }; then
9121   ac_cv_header_X11_extensions_XSGIvc_h=yes
9122 else
9123   echo "$as_me: failed program was:" >&5
9124 cat conftest.$ac_ext >&5
9125 ac_cv_header_X11_extensions_XSGIvc_h=no
9126 fi
9127 rm -f conftest.$ac_objext conftest.$ac_ext
9128 fi
9129 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
9130 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
9131 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
9132   have_sgivc=yes
9133 fi
9134
9135
9136   CPPFLAGS="$ac_save_CPPFLAGS"
9137
9138   # if that succeeded, then check for the -lXsgivc
9139   if test "$have_sgivc" = yes; then
9140     have_sgivc=no
9141
9142   ac_save_CPPFLAGS="$CPPFLAGS"
9143   ac_save_LDFLAGS="$LDFLAGS"
9144 #  ac_save_LIBS="$LIBS"
9145
9146   if test \! -z "$includedir" ; then
9147     CPPFLAGS="$CPPFLAGS -I$includedir"
9148   fi
9149   # note: $X_CFLAGS includes $x_includes
9150   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9151
9152   if test \! -z "$libdir" ; then
9153     LDFLAGS="$LDFLAGS -L$libdir"
9154   fi
9155   # note: $X_LIBS includes $x_libraries
9156   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9157
9158   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
9159 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
9160 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
9161   echo $ECHO_N "(cached) $ECHO_C" >&6
9162 else
9163   ac_check_lib_save_LIBS=$LIBS
9164 LIBS="-lXsgivc -lXext -lX11 $LIBS"
9165 cat >conftest.$ac_ext <<_ACEOF
9166 #line $LINENO "configure"
9167 #include "confdefs.h"
9168
9169 /* Override any gcc2 internal prototype to avoid an error.  */
9170 #ifdef __cplusplus
9171 extern "C"
9172 #endif
9173 /* We use char because int might match the return type of a gcc2
9174    builtin and then its argument prototype would still apply.  */
9175 char XSGIvcQueryGammaMap ();
9176 #ifdef F77_DUMMY_MAIN
9177 #  ifdef __cplusplus
9178      extern "C"
9179 #  endif
9180    int F77_DUMMY_MAIN() { return 1; }
9181 #endif
9182 int
9183 main ()
9184 {
9185 XSGIvcQueryGammaMap ();
9186   ;
9187   return 0;
9188 }
9189 _ACEOF
9190 rm -f conftest.$ac_objext conftest$ac_exeext
9191 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9192   (eval $ac_link) 2>&5
9193   ac_status=$?
9194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9195   (exit $ac_status); } &&
9196          { ac_try='test -s conftest$ac_exeext'
9197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9198   (eval $ac_try) 2>&5
9199   ac_status=$?
9200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9201   (exit $ac_status); }; }; then
9202   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
9203 else
9204   echo "$as_me: failed program was:" >&5
9205 cat conftest.$ac_ext >&5
9206 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
9207 fi
9208 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9209 LIBS=$ac_check_lib_save_LIBS
9210 fi
9211 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
9212 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
9213 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
9214   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
9215 else
9216   true
9217 fi
9218
9219   CPPFLAGS="$ac_save_CPPFLAGS"
9220   LDFLAGS="$ac_save_LDFLAGS"
9221 #  LIBS="$ac_save_LIBS"
9222
9223   fi
9224
9225   # if that succeeded, then we've really got it.
9226   if test "$have_sgivc" = yes; then
9227     cat >>confdefs.h <<\_ACEOF
9228 #define HAVE_SGI_VC_EXTENSION 1
9229 _ACEOF
9230
9231   fi
9232
9233 elif test "$with_sgivc" != no; then
9234   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
9235   exit 1
9236 fi
9237
9238
9239 ###############################################################################
9240 #
9241 #       Check for the DPMS server extension.
9242 #
9243 ###############################################################################
9244
9245 have_dpms=no
9246 with_dpms_req=unspecified
9247
9248 # Check whether --with-dpms-ext or --without-dpms-ext was given.
9249 if test "${with_dpms_ext+set}" = set; then
9250   withval="$with_dpms_ext"
9251   with_dpms="$withval"; with_dpms_req="$withval"
9252 else
9253   with_dpms=yes
9254 fi;
9255
9256
9257    case "$with_dpms" in
9258     yes) ;;
9259     no)  ;;
9260
9261     /*)
9262      echo "$as_me:$LINENO: checking for DPMS headers" >&5
9263 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
9264      d=$with_dpms/include
9265      if test -d $d; then
9266        X_CFLAGS="-I$d $X_CFLAGS"
9267        echo "$as_me:$LINENO: result: $d" >&5
9268 echo "${ECHO_T}$d" >&6
9269      else
9270        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9271 echo "${ECHO_T}not found ($d: no such directory)" >&6
9272      fi
9273
9274      echo "$as_me:$LINENO: checking for DPMS libs" >&5
9275 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
9276      d=$with_dpms/lib
9277      if test -d $d; then
9278        X_LIBS="-L$d $X_LIBS"
9279        echo "$as_me:$LINENO: result: $d" >&5
9280 echo "${ECHO_T}$d" >&6
9281      else
9282        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9283 echo "${ECHO_T}not found ($d: no such directory)" >&6
9284      fi
9285
9286      # replace the directory string with "yes".
9287      with_dpms_req="yes"
9288      with_dpms=$with_dpms_req
9289      ;;
9290
9291     *)
9292      echo ""
9293      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
9294      echo "       If it is a directory, then \`DIR/include' will be added to"
9295      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9296      exit 1
9297      ;;
9298    esac
9299
9300
9301 if test "$with_dpms" = yes; then
9302
9303   # first check for dpms.h
9304
9305   ac_save_CPPFLAGS="$CPPFLAGS"
9306   if test \! -z "$includedir" ; then
9307     CPPFLAGS="$CPPFLAGS -I$includedir"
9308   fi
9309   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9310   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
9311 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
9312 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
9313   echo $ECHO_N "(cached) $ECHO_C" >&6
9314 else
9315   cat >conftest.$ac_ext <<_ACEOF
9316 #line $LINENO "configure"
9317 #include "confdefs.h"
9318 #include <X11/Xlib.h>
9319
9320 #include <X11/extensions/dpms.h>
9321 _ACEOF
9322 rm -f conftest.$ac_objext
9323 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9324   (eval $ac_compile) 2>&5
9325   ac_status=$?
9326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9327   (exit $ac_status); } &&
9328          { ac_try='test -s conftest.$ac_objext'
9329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9330   (eval $ac_try) 2>&5
9331   ac_status=$?
9332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9333   (exit $ac_status); }; }; then
9334   ac_cv_header_X11_extensions_dpms_h=yes
9335 else
9336   echo "$as_me: failed program was:" >&5
9337 cat conftest.$ac_ext >&5
9338 ac_cv_header_X11_extensions_dpms_h=no
9339 fi
9340 rm -f conftest.$ac_objext conftest.$ac_ext
9341 fi
9342 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
9343 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
9344 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
9345   have_dpms=yes
9346 fi
9347
9348
9349   CPPFLAGS="$ac_save_CPPFLAGS"
9350
9351   # if that succeeded, then check for the DPMS code in the libraries
9352   if test "$have_dpms" = yes; then
9353
9354     # first look in -lXext (this is where it is with XFree86 4.0)
9355     have_dpms=no
9356
9357   ac_save_CPPFLAGS="$CPPFLAGS"
9358   ac_save_LDFLAGS="$LDFLAGS"
9359 #  ac_save_LIBS="$LIBS"
9360
9361   if test \! -z "$includedir" ; then
9362     CPPFLAGS="$CPPFLAGS -I$includedir"
9363   fi
9364   # note: $X_CFLAGS includes $x_includes
9365   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9366
9367   if test \! -z "$libdir" ; then
9368     LDFLAGS="$LDFLAGS -L$libdir"
9369   fi
9370   # note: $X_LIBS includes $x_libraries
9371   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9372
9373   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
9374 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
9375 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
9376   echo $ECHO_N "(cached) $ECHO_C" >&6
9377 else
9378   ac_check_lib_save_LIBS=$LIBS
9379 LIBS="-lXext -lXext -lX11 $LIBS"
9380 cat >conftest.$ac_ext <<_ACEOF
9381 #line $LINENO "configure"
9382 #include "confdefs.h"
9383
9384 /* Override any gcc2 internal prototype to avoid an error.  */
9385 #ifdef __cplusplus
9386 extern "C"
9387 #endif
9388 /* We use char because int might match the return type of a gcc2
9389    builtin and then its argument prototype would still apply.  */
9390 char DPMSInfo ();
9391 #ifdef F77_DUMMY_MAIN
9392 #  ifdef __cplusplus
9393      extern "C"
9394 #  endif
9395    int F77_DUMMY_MAIN() { return 1; }
9396 #endif
9397 int
9398 main ()
9399 {
9400 DPMSInfo ();
9401   ;
9402   return 0;
9403 }
9404 _ACEOF
9405 rm -f conftest.$ac_objext conftest$ac_exeext
9406 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9407   (eval $ac_link) 2>&5
9408   ac_status=$?
9409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9410   (exit $ac_status); } &&
9411          { ac_try='test -s conftest$ac_exeext'
9412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9413   (eval $ac_try) 2>&5
9414   ac_status=$?
9415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9416   (exit $ac_status); }; }; then
9417   ac_cv_lib_Xext_DPMSInfo=yes
9418 else
9419   echo "$as_me: failed program was:" >&5
9420 cat conftest.$ac_ext >&5
9421 ac_cv_lib_Xext_DPMSInfo=no
9422 fi
9423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9424 LIBS=$ac_check_lib_save_LIBS
9425 fi
9426 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
9427 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
9428 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
9429   have_dpms=yes
9430 else
9431   true
9432 fi
9433
9434   CPPFLAGS="$ac_save_CPPFLAGS"
9435   LDFLAGS="$ac_save_LDFLAGS"
9436 #  LIBS="$ac_save_LIBS"
9437
9438
9439     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
9440     if test "$have_dpms" = no; then
9441
9442   ac_save_CPPFLAGS="$CPPFLAGS"
9443   ac_save_LDFLAGS="$LDFLAGS"
9444 #  ac_save_LIBS="$LIBS"
9445
9446   if test \! -z "$includedir" ; then
9447     CPPFLAGS="$CPPFLAGS -I$includedir"
9448   fi
9449   # note: $X_CFLAGS includes $x_includes
9450   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9451
9452   if test \! -z "$libdir" ; then
9453     LDFLAGS="$LDFLAGS -L$libdir"
9454   fi
9455   # note: $X_LIBS includes $x_libraries
9456   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9457
9458   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
9459 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
9460 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
9461   echo $ECHO_N "(cached) $ECHO_C" >&6
9462 else
9463   ac_check_lib_save_LIBS=$LIBS
9464 LIBS="-lXdpms -lXext -lX11 $LIBS"
9465 cat >conftest.$ac_ext <<_ACEOF
9466 #line $LINENO "configure"
9467 #include "confdefs.h"
9468
9469 /* Override any gcc2 internal prototype to avoid an error.  */
9470 #ifdef __cplusplus
9471 extern "C"
9472 #endif
9473 /* We use char because int might match the return type of a gcc2
9474    builtin and then its argument prototype would still apply.  */
9475 char DPMSInfo ();
9476 #ifdef F77_DUMMY_MAIN
9477 #  ifdef __cplusplus
9478      extern "C"
9479 #  endif
9480    int F77_DUMMY_MAIN() { return 1; }
9481 #endif
9482 int
9483 main ()
9484 {
9485 DPMSInfo ();
9486   ;
9487   return 0;
9488 }
9489 _ACEOF
9490 rm -f conftest.$ac_objext conftest$ac_exeext
9491 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9492   (eval $ac_link) 2>&5
9493   ac_status=$?
9494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9495   (exit $ac_status); } &&
9496          { ac_try='test -s conftest$ac_exeext'
9497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9498   (eval $ac_try) 2>&5
9499   ac_status=$?
9500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9501   (exit $ac_status); }; }; then
9502   ac_cv_lib_Xdpms_DPMSInfo=yes
9503 else
9504   echo "$as_me: failed program was:" >&5
9505 cat conftest.$ac_ext >&5
9506 ac_cv_lib_Xdpms_DPMSInfo=no
9507 fi
9508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9509 LIBS=$ac_check_lib_save_LIBS
9510 fi
9511 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
9512 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
9513 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
9514   have_dpms=yes; XDPMS_LIBS="-lXdpms"
9515 else
9516   true
9517 fi
9518
9519   CPPFLAGS="$ac_save_CPPFLAGS"
9520   LDFLAGS="$ac_save_LDFLAGS"
9521 #  LIBS="$ac_save_LIBS"
9522
9523     fi
9524   fi
9525
9526
9527   # if that succeeded, then we've really got it.
9528   if test "$have_dpms" = yes; then
9529     cat >>confdefs.h <<\_ACEOF
9530 #define HAVE_DPMS_EXTENSION 1
9531 _ACEOF
9532
9533   fi
9534
9535 elif test "$with_dpms" != no; then
9536   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
9537   exit 1
9538 fi
9539
9540
9541 ###############################################################################
9542 #
9543 #       Check for the XINERAMA server extension.
9544 #
9545 ###############################################################################
9546
9547 have_xinerama=no
9548 with_xinerama_req=unspecified
9549
9550 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
9551 if test "${with_xinerama_ext+set}" = set; then
9552   withval="$with_xinerama_ext"
9553   with_xinerama="$withval"; with_xinerama_req="$withval"
9554 else
9555   with_xinerama=yes
9556 fi;
9557
9558
9559    case "$with_xinerama" in
9560     yes) ;;
9561     no)  ;;
9562
9563     /*)
9564      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
9565 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
9566      d=$with_xinerama/include
9567      if test -d $d; then
9568        X_CFLAGS="-I$d $X_CFLAGS"
9569        echo "$as_me:$LINENO: result: $d" >&5
9570 echo "${ECHO_T}$d" >&6
9571      else
9572        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9573 echo "${ECHO_T}not found ($d: no such directory)" >&6
9574      fi
9575
9576      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
9577 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
9578      d=$with_xinerama/lib
9579      if test -d $d; then
9580        X_LIBS="-L$d $X_LIBS"
9581        echo "$as_me:$LINENO: result: $d" >&5
9582 echo "${ECHO_T}$d" >&6
9583      else
9584        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9585 echo "${ECHO_T}not found ($d: no such directory)" >&6
9586      fi
9587
9588      # replace the directory string with "yes".
9589      with_xinerama_req="yes"
9590      with_xinerama=$with_xinerama_req
9591      ;;
9592
9593     *)
9594      echo ""
9595      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
9596      echo "       If it is a directory, then \`DIR/include' will be added to"
9597      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9598      exit 1
9599      ;;
9600    esac
9601
9602
9603 if test "$with_xinerama" = yes; then
9604
9605   # first check for Xinerama.h
9606
9607   ac_save_CPPFLAGS="$CPPFLAGS"
9608   if test \! -z "$includedir" ; then
9609     CPPFLAGS="$CPPFLAGS -I$includedir"
9610   fi
9611   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9612   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
9613 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
9614 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
9615   echo $ECHO_N "(cached) $ECHO_C" >&6
9616 else
9617   cat >conftest.$ac_ext <<_ACEOF
9618 #line $LINENO "configure"
9619 #include "confdefs.h"
9620 #include <X11/Xlib.h>
9621
9622 #include <X11/extensions/Xinerama.h>
9623 _ACEOF
9624 rm -f conftest.$ac_objext
9625 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9626   (eval $ac_compile) 2>&5
9627   ac_status=$?
9628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9629   (exit $ac_status); } &&
9630          { ac_try='test -s conftest.$ac_objext'
9631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9632   (eval $ac_try) 2>&5
9633   ac_status=$?
9634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9635   (exit $ac_status); }; }; then
9636   ac_cv_header_X11_extensions_Xinerama_h=yes
9637 else
9638   echo "$as_me: failed program was:" >&5
9639 cat conftest.$ac_ext >&5
9640 ac_cv_header_X11_extensions_Xinerama_h=no
9641 fi
9642 rm -f conftest.$ac_objext conftest.$ac_ext
9643 fi
9644 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
9645 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
9646 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
9647   have_xinerama=yes
9648 fi
9649
9650
9651   CPPFLAGS="$ac_save_CPPFLAGS"
9652
9653   # if that succeeded, then check for the XINERAMA code in the libraries
9654   if test "$have_xinerama" = yes; then
9655
9656     # first look in -lXext
9657     have_xinerama=no
9658
9659   ac_save_CPPFLAGS="$CPPFLAGS"
9660   ac_save_LDFLAGS="$LDFLAGS"
9661 #  ac_save_LIBS="$LIBS"
9662
9663   if test \! -z "$includedir" ; then
9664     CPPFLAGS="$CPPFLAGS -I$includedir"
9665   fi
9666   # note: $X_CFLAGS includes $x_includes
9667   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9668
9669   if test \! -z "$libdir" ; then
9670     LDFLAGS="$LDFLAGS -L$libdir"
9671   fi
9672   # note: $X_LIBS includes $x_libraries
9673   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9674
9675   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXext" >&5
9676 echo $ECHO_N "checking for XineramaQueryExtension in -lXext... $ECHO_C" >&6
9677 if test "${ac_cv_lib_Xext_XineramaQueryExtension+set}" = set; then
9678   echo $ECHO_N "(cached) $ECHO_C" >&6
9679 else
9680   ac_check_lib_save_LIBS=$LIBS
9681 LIBS="-lXext -lXext -lX11 $LIBS"
9682 cat >conftest.$ac_ext <<_ACEOF
9683 #line $LINENO "configure"
9684 #include "confdefs.h"
9685
9686 /* Override any gcc2 internal prototype to avoid an error.  */
9687 #ifdef __cplusplus
9688 extern "C"
9689 #endif
9690 /* We use char because int might match the return type of a gcc2
9691    builtin and then its argument prototype would still apply.  */
9692 char XineramaQueryExtension ();
9693 #ifdef F77_DUMMY_MAIN
9694 #  ifdef __cplusplus
9695      extern "C"
9696 #  endif
9697    int F77_DUMMY_MAIN() { return 1; }
9698 #endif
9699 int
9700 main ()
9701 {
9702 XineramaQueryExtension ();
9703   ;
9704   return 0;
9705 }
9706 _ACEOF
9707 rm -f conftest.$ac_objext conftest$ac_exeext
9708 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9709   (eval $ac_link) 2>&5
9710   ac_status=$?
9711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9712   (exit $ac_status); } &&
9713          { ac_try='test -s conftest$ac_exeext'
9714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9715   (eval $ac_try) 2>&5
9716   ac_status=$?
9717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9718   (exit $ac_status); }; }; then
9719   ac_cv_lib_Xext_XineramaQueryExtension=yes
9720 else
9721   echo "$as_me: failed program was:" >&5
9722 cat conftest.$ac_ext >&5
9723 ac_cv_lib_Xext_XineramaQueryExtension=no
9724 fi
9725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9726 LIBS=$ac_check_lib_save_LIBS
9727 fi
9728 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryExtension" >&5
9729 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryExtension" >&6
9730 if test $ac_cv_lib_Xext_XineramaQueryExtension = yes; then
9731   have_xinerama=yes
9732 else
9733   true
9734 fi
9735
9736   CPPFLAGS="$ac_save_CPPFLAGS"
9737   LDFLAGS="$ac_save_LDFLAGS"
9738 #  LIBS="$ac_save_LIBS"
9739
9740
9741     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
9742     if test "$have_xinerama" = no; then
9743
9744   ac_save_CPPFLAGS="$CPPFLAGS"
9745   ac_save_LDFLAGS="$LDFLAGS"
9746 #  ac_save_LIBS="$LIBS"
9747
9748   if test \! -z "$includedir" ; then
9749     CPPFLAGS="$CPPFLAGS -I$includedir"
9750   fi
9751   # note: $X_CFLAGS includes $x_includes
9752   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9753
9754   if test \! -z "$libdir" ; then
9755     LDFLAGS="$LDFLAGS -L$libdir"
9756   fi
9757   # note: $X_LIBS includes $x_libraries
9758   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9759
9760   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXinerama" >&5
9761 echo $ECHO_N "checking for XineramaQueryExtension in -lXinerama... $ECHO_C" >&6
9762 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then
9763   echo $ECHO_N "(cached) $ECHO_C" >&6
9764 else
9765   ac_check_lib_save_LIBS=$LIBS
9766 LIBS="-lXinerama -lXext -lX11 $LIBS"
9767 cat >conftest.$ac_ext <<_ACEOF
9768 #line $LINENO "configure"
9769 #include "confdefs.h"
9770
9771 /* Override any gcc2 internal prototype to avoid an error.  */
9772 #ifdef __cplusplus
9773 extern "C"
9774 #endif
9775 /* We use char because int might match the return type of a gcc2
9776    builtin and then its argument prototype would still apply.  */
9777 char XineramaQueryExtension ();
9778 #ifdef F77_DUMMY_MAIN
9779 #  ifdef __cplusplus
9780      extern "C"
9781 #  endif
9782    int F77_DUMMY_MAIN() { return 1; }
9783 #endif
9784 int
9785 main ()
9786 {
9787 XineramaQueryExtension ();
9788   ;
9789   return 0;
9790 }
9791 _ACEOF
9792 rm -f conftest.$ac_objext conftest$ac_exeext
9793 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9794   (eval $ac_link) 2>&5
9795   ac_status=$?
9796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9797   (exit $ac_status); } &&
9798          { ac_try='test -s conftest$ac_exeext'
9799   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9800   (eval $ac_try) 2>&5
9801   ac_status=$?
9802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9803   (exit $ac_status); }; }; then
9804   ac_cv_lib_Xinerama_XineramaQueryExtension=yes
9805 else
9806   echo "$as_me: failed program was:" >&5
9807 cat conftest.$ac_ext >&5
9808 ac_cv_lib_Xinerama_XineramaQueryExtension=no
9809 fi
9810 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9811 LIBS=$ac_check_lib_save_LIBS
9812 fi
9813 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
9814 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6
9815 if test $ac_cv_lib_Xinerama_XineramaQueryExtension = yes; then
9816   have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"
9817 else
9818   true
9819 fi
9820
9821   CPPFLAGS="$ac_save_CPPFLAGS"
9822   LDFLAGS="$ac_save_LDFLAGS"
9823 #  LIBS="$ac_save_LIBS"
9824
9825     fi
9826   fi
9827
9828   # if that succeeded, then we've really got it.
9829   if test "$have_xinerama" = yes; then
9830     cat >>confdefs.h <<\_ACEOF
9831 #define HAVE_XINERAMA 1
9832 _ACEOF
9833
9834   fi
9835
9836 elif test "$with_xinerama" != no; then
9837   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
9838   exit 1
9839 fi
9840
9841
9842 ###############################################################################
9843 #
9844 #       Check for the XF86VMODE server extension (for virtual screens.)
9845 #
9846 ###############################################################################
9847
9848 have_xf86vmode=no
9849 with_xf86vmode_req=unspecified
9850
9851 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
9852 if test "${with_xf86vmode_ext+set}" = set; then
9853   withval="$with_xf86vmode_ext"
9854   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
9855 else
9856   with_xf86vmode=yes
9857 fi;
9858
9859
9860    case "$with_xf86vmode" in
9861     yes) ;;
9862     no)  ;;
9863
9864     /*)
9865      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
9866 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
9867      d=$with_xf86vmode/include
9868      if test -d $d; then
9869        X_CFLAGS="-I$d $X_CFLAGS"
9870        echo "$as_me:$LINENO: result: $d" >&5
9871 echo "${ECHO_T}$d" >&6
9872      else
9873        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9874 echo "${ECHO_T}not found ($d: no such directory)" >&6
9875      fi
9876
9877      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
9878 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
9879      d=$with_xf86vmode/lib
9880      if test -d $d; then
9881        X_LIBS="-L$d $X_LIBS"
9882        echo "$as_me:$LINENO: result: $d" >&5
9883 echo "${ECHO_T}$d" >&6
9884      else
9885        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9886 echo "${ECHO_T}not found ($d: no such directory)" >&6
9887      fi
9888
9889      # replace the directory string with "yes".
9890      with_xf86vmode_req="yes"
9891      with_xf86vmode=$with_xf86vmode_req
9892      ;;
9893
9894     *)
9895      echo ""
9896      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
9897      echo "       If it is a directory, then \`DIR/include' will be added to"
9898      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9899      exit 1
9900      ;;
9901    esac
9902
9903
9904 if test "$with_xf86vmode" = yes; then
9905
9906   # first check for xf86vmode.h
9907
9908   ac_save_CPPFLAGS="$CPPFLAGS"
9909   if test \! -z "$includedir" ; then
9910     CPPFLAGS="$CPPFLAGS -I$includedir"
9911   fi
9912   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9913   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
9914 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
9915 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
9916   echo $ECHO_N "(cached) $ECHO_C" >&6
9917 else
9918   cat >conftest.$ac_ext <<_ACEOF
9919 #line $LINENO "configure"
9920 #include "confdefs.h"
9921 #include <X11/Xlib.h>
9922
9923 #include <X11/extensions/xf86vmode.h>
9924 _ACEOF
9925 rm -f conftest.$ac_objext
9926 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9927   (eval $ac_compile) 2>&5
9928   ac_status=$?
9929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9930   (exit $ac_status); } &&
9931          { ac_try='test -s conftest.$ac_objext'
9932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9933   (eval $ac_try) 2>&5
9934   ac_status=$?
9935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9936   (exit $ac_status); }; }; then
9937   ac_cv_header_X11_extensions_xf86vmode_h=yes
9938 else
9939   echo "$as_me: failed program was:" >&5
9940 cat conftest.$ac_ext >&5
9941 ac_cv_header_X11_extensions_xf86vmode_h=no
9942 fi
9943 rm -f conftest.$ac_objext conftest.$ac_ext
9944 fi
9945 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
9946 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
9947 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
9948   have_xf86vmode=yes
9949 fi
9950
9951
9952   CPPFLAGS="$ac_save_CPPFLAGS"
9953
9954   # if that succeeded, then check for the -lXxf86vm
9955   if test "$have_xf86vmode" = yes; then
9956     have_xf86vmode=no
9957
9958   ac_save_CPPFLAGS="$CPPFLAGS"
9959   ac_save_LDFLAGS="$LDFLAGS"
9960 #  ac_save_LIBS="$LIBS"
9961
9962   if test \! -z "$includedir" ; then
9963     CPPFLAGS="$CPPFLAGS -I$includedir"
9964   fi
9965   # note: $X_CFLAGS includes $x_includes
9966   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9967
9968   if test \! -z "$libdir" ; then
9969     LDFLAGS="$LDFLAGS -L$libdir"
9970   fi
9971   # note: $X_LIBS includes $x_libraries
9972   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9973
9974   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
9975 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
9976 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
9977   echo $ECHO_N "(cached) $ECHO_C" >&6
9978 else
9979   ac_check_lib_save_LIBS=$LIBS
9980 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
9981 cat >conftest.$ac_ext <<_ACEOF
9982 #line $LINENO "configure"
9983 #include "confdefs.h"
9984
9985 /* Override any gcc2 internal prototype to avoid an error.  */
9986 #ifdef __cplusplus
9987 extern "C"
9988 #endif
9989 /* We use char because int might match the return type of a gcc2
9990    builtin and then its argument prototype would still apply.  */
9991 char XF86VidModeGetViewPort ();
9992 #ifdef F77_DUMMY_MAIN
9993 #  ifdef __cplusplus
9994      extern "C"
9995 #  endif
9996    int F77_DUMMY_MAIN() { return 1; }
9997 #endif
9998 int
9999 main ()
10000 {
10001 XF86VidModeGetViewPort ();
10002   ;
10003   return 0;
10004 }
10005 _ACEOF
10006 rm -f conftest.$ac_objext conftest$ac_exeext
10007 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10008   (eval $ac_link) 2>&5
10009   ac_status=$?
10010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10011   (exit $ac_status); } &&
10012          { ac_try='test -s conftest$ac_exeext'
10013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10014   (eval $ac_try) 2>&5
10015   ac_status=$?
10016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017   (exit $ac_status); }; }; then
10018   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
10019 else
10020   echo "$as_me: failed program was:" >&5
10021 cat conftest.$ac_ext >&5
10022 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
10023 fi
10024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10025 LIBS=$ac_check_lib_save_LIBS
10026 fi
10027 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
10028 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
10029 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
10030   have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10031 else
10032   true
10033 fi
10034
10035   CPPFLAGS="$ac_save_CPPFLAGS"
10036   LDFLAGS="$ac_save_LDFLAGS"
10037 #  LIBS="$ac_save_LIBS"
10038
10039   fi
10040
10041   # if that succeeded, then we've really got it.
10042   if test "$have_xf86vmode" = yes; then
10043     cat >>confdefs.h <<\_ACEOF
10044 #define HAVE_XF86VMODE 1
10045 _ACEOF
10046
10047   fi
10048
10049 elif test "$with_xf86vmode" != no; then
10050   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
10051   exit 1
10052 fi
10053
10054
10055 ###############################################################################
10056 #
10057 #       Check for the XF86VMODE server extension (for gamma fading.)
10058 #
10059 ###############################################################################
10060
10061 have_xf86gamma=no
10062 have_xf86gamma_ramp=no
10063 with_xf86gamma_req=unspecified
10064
10065 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
10066 if test "${with_xf86gamma_ext+set}" = set; then
10067   withval="$with_xf86gamma_ext"
10068   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
10069 else
10070   with_xf86gamma=yes
10071 fi;
10072
10073
10074    case "$with_xf86gamma" in
10075     yes) ;;
10076     no)  ;;
10077
10078     /*)
10079      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
10080 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
10081      d=$with_xf86gamma/include
10082      if test -d $d; then
10083        X_CFLAGS="-I$d $X_CFLAGS"
10084        echo "$as_me:$LINENO: result: $d" >&5
10085 echo "${ECHO_T}$d" >&6
10086      else
10087        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10088 echo "${ECHO_T}not found ($d: no such directory)" >&6
10089      fi
10090
10091      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
10092 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
10093      d=$with_xf86gamma/lib
10094      if test -d $d; then
10095        X_LIBS="-L$d $X_LIBS"
10096        echo "$as_me:$LINENO: result: $d" >&5
10097 echo "${ECHO_T}$d" >&6
10098      else
10099        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10100 echo "${ECHO_T}not found ($d: no such directory)" >&6
10101      fi
10102
10103      # replace the directory string with "yes".
10104      with_xf86gamma_req="yes"
10105      with_xf86gamma=$with_xf86gamma_req
10106      ;;
10107
10108     *)
10109      echo ""
10110      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
10111      echo "       If it is a directory, then \`DIR/include' will be added to"
10112      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10113      exit 1
10114      ;;
10115    esac
10116
10117
10118 if test "$with_xf86gamma" = yes; then
10119
10120   # first check for xf86vmode.h, if we haven't already
10121   if test "$have_xf86vmode" = yes; then
10122     have_xf86gamma=yes
10123   else
10124
10125   ac_save_CPPFLAGS="$CPPFLAGS"
10126   if test \! -z "$includedir" ; then
10127     CPPFLAGS="$CPPFLAGS -I$includedir"
10128   fi
10129   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10130   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10131 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10132 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10133   echo $ECHO_N "(cached) $ECHO_C" >&6
10134 else
10135   cat >conftest.$ac_ext <<_ACEOF
10136 #line $LINENO "configure"
10137 #include "confdefs.h"
10138 #include <X11/Xlib.h>
10139
10140 #include <X11/extensions/xf86vmode.h>
10141 _ACEOF
10142 rm -f conftest.$ac_objext
10143 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10144   (eval $ac_compile) 2>&5
10145   ac_status=$?
10146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10147   (exit $ac_status); } &&
10148          { ac_try='test -s conftest.$ac_objext'
10149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10150   (eval $ac_try) 2>&5
10151   ac_status=$?
10152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153   (exit $ac_status); }; }; then
10154   ac_cv_header_X11_extensions_xf86vmode_h=yes
10155 else
10156   echo "$as_me: failed program was:" >&5
10157 cat conftest.$ac_ext >&5
10158 ac_cv_header_X11_extensions_xf86vmode_h=no
10159 fi
10160 rm -f conftest.$ac_objext conftest.$ac_ext
10161 fi
10162 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10163 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10164 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10165   have_xf86gamma=yes
10166 fi
10167
10168
10169   CPPFLAGS="$ac_save_CPPFLAGS"
10170   fi
10171
10172   # if that succeeded, then check for the -lXxf86vm
10173   if test "$have_xf86gamma" = yes; then
10174     have_xf86gamma=no
10175
10176   ac_save_CPPFLAGS="$CPPFLAGS"
10177   ac_save_LDFLAGS="$LDFLAGS"
10178 #  ac_save_LIBS="$LIBS"
10179
10180   if test \! -z "$includedir" ; then
10181     CPPFLAGS="$CPPFLAGS -I$includedir"
10182   fi
10183   # note: $X_CFLAGS includes $x_includes
10184   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10185
10186   if test \! -z "$libdir" ; then
10187     LDFLAGS="$LDFLAGS -L$libdir"
10188   fi
10189   # note: $X_LIBS includes $x_libraries
10190   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10191
10192   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
10193 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
10194 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
10195   echo $ECHO_N "(cached) $ECHO_C" >&6
10196 else
10197   ac_check_lib_save_LIBS=$LIBS
10198 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10199 cat >conftest.$ac_ext <<_ACEOF
10200 #line $LINENO "configure"
10201 #include "confdefs.h"
10202
10203 /* Override any gcc2 internal prototype to avoid an error.  */
10204 #ifdef __cplusplus
10205 extern "C"
10206 #endif
10207 /* We use char because int might match the return type of a gcc2
10208    builtin and then its argument prototype would still apply.  */
10209 char XF86VidModeSetGamma ();
10210 #ifdef F77_DUMMY_MAIN
10211 #  ifdef __cplusplus
10212      extern "C"
10213 #  endif
10214    int F77_DUMMY_MAIN() { return 1; }
10215 #endif
10216 int
10217 main ()
10218 {
10219 XF86VidModeSetGamma ();
10220   ;
10221   return 0;
10222 }
10223 _ACEOF
10224 rm -f conftest.$ac_objext conftest$ac_exeext
10225 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10226   (eval $ac_link) 2>&5
10227   ac_status=$?
10228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10229   (exit $ac_status); } &&
10230          { ac_try='test -s conftest$ac_exeext'
10231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10232   (eval $ac_try) 2>&5
10233   ac_status=$?
10234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10235   (exit $ac_status); }; }; then
10236   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
10237 else
10238   echo "$as_me: failed program was:" >&5
10239 cat conftest.$ac_ext >&5
10240 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
10241 fi
10242 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10243 LIBS=$ac_check_lib_save_LIBS
10244 fi
10245 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
10246 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
10247 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
10248   have_xf86gamma=yes
10249 else
10250   true
10251 fi
10252
10253   CPPFLAGS="$ac_save_CPPFLAGS"
10254   LDFLAGS="$ac_save_LDFLAGS"
10255 #  LIBS="$ac_save_LIBS"
10256
10257   fi
10258
10259   # check for the Ramp versions of the functions too.
10260   if test "$have_xf86gamma" = yes; then
10261     have_xf86gamma_ramp=no
10262
10263   ac_save_CPPFLAGS="$CPPFLAGS"
10264   ac_save_LDFLAGS="$LDFLAGS"
10265 #  ac_save_LIBS="$LIBS"
10266
10267   if test \! -z "$includedir" ; then
10268     CPPFLAGS="$CPPFLAGS -I$includedir"
10269   fi
10270   # note: $X_CFLAGS includes $x_includes
10271   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10272
10273   if test \! -z "$libdir" ; then
10274     LDFLAGS="$LDFLAGS -L$libdir"
10275   fi
10276   # note: $X_LIBS includes $x_libraries
10277   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10278
10279   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
10280 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
10281 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
10282   echo $ECHO_N "(cached) $ECHO_C" >&6
10283 else
10284   ac_check_lib_save_LIBS=$LIBS
10285 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10286 cat >conftest.$ac_ext <<_ACEOF
10287 #line $LINENO "configure"
10288 #include "confdefs.h"
10289
10290 /* Override any gcc2 internal prototype to avoid an error.  */
10291 #ifdef __cplusplus
10292 extern "C"
10293 #endif
10294 /* We use char because int might match the return type of a gcc2
10295    builtin and then its argument prototype would still apply.  */
10296 char XF86VidModeSetGammaRamp ();
10297 #ifdef F77_DUMMY_MAIN
10298 #  ifdef __cplusplus
10299      extern "C"
10300 #  endif
10301    int F77_DUMMY_MAIN() { return 1; }
10302 #endif
10303 int
10304 main ()
10305 {
10306 XF86VidModeSetGammaRamp ();
10307   ;
10308   return 0;
10309 }
10310 _ACEOF
10311 rm -f conftest.$ac_objext conftest$ac_exeext
10312 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10313   (eval $ac_link) 2>&5
10314   ac_status=$?
10315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10316   (exit $ac_status); } &&
10317          { ac_try='test -s conftest$ac_exeext'
10318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10319   (eval $ac_try) 2>&5
10320   ac_status=$?
10321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10322   (exit $ac_status); }; }; then
10323   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
10324 else
10325   echo "$as_me: failed program was:" >&5
10326 cat conftest.$ac_ext >&5
10327 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
10328 fi
10329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10330 LIBS=$ac_check_lib_save_LIBS
10331 fi
10332 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
10333 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
10334 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
10335   have_xf86gamma_ramp=yes
10336 else
10337   true
10338 fi
10339
10340   CPPFLAGS="$ac_save_CPPFLAGS"
10341   LDFLAGS="$ac_save_LDFLAGS"
10342 #  LIBS="$ac_save_LIBS"
10343
10344   fi
10345
10346   # if those tests succeeded, then we've really got the functions.
10347   if test "$have_xf86gamma" = yes; then
10348     cat >>confdefs.h <<\_ACEOF
10349 #define HAVE_XF86VMODE_GAMMA 1
10350 _ACEOF
10351
10352   fi
10353
10354   if test "$have_xf86gamma_ramp" = yes; then
10355     cat >>confdefs.h <<\_ACEOF
10356 #define HAVE_XF86VMODE_GAMMA_RAMP 1
10357 _ACEOF
10358
10359   fi
10360
10361   # pull in the lib, if we haven't already
10362   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
10363     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10364   fi
10365
10366 elif test "$with_xf86gamma" != no; then
10367   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
10368   exit 1
10369 fi
10370
10371
10372 ###############################################################################
10373 #
10374 #       Check for HP XHPDisableReset and XHPEnableReset.
10375 #
10376 ###############################################################################
10377
10378
10379   ac_save_CPPFLAGS="$CPPFLAGS"
10380   if test \! -z "$includedir" ; then
10381     CPPFLAGS="$CPPFLAGS -I$includedir"
10382   fi
10383   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10384   cat >conftest.$ac_ext <<_ACEOF
10385 #line $LINENO "configure"
10386 #include "confdefs.h"
10387 #include <X11/XHPlib.h>
10388
10389 _ACEOF
10390 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10391   egrep "XHPDisableReset" >/dev/null 2>&1; then
10392   cat >>confdefs.h <<\_ACEOF
10393 #define HAVE_XHPDISABLERESET 1
10394 _ACEOF
10395
10396                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
10397 fi
10398 rm -f conftest*
10399
10400   CPPFLAGS="$ac_save_CPPFLAGS"
10401
10402
10403 ###############################################################################
10404 #
10405 #       Check for /proc/interrupts.
10406 #
10407 ###############################################################################
10408
10409 have_proc_interrupts=no
10410 with_proc_interrupts_req=unspecified
10411
10412 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
10413 if test "${with_proc_interrupts+set}" = set; then
10414   withval="$with_proc_interrupts"
10415   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
10416 else
10417   with_proc_interrupts=yes
10418 fi;
10419
10420 if test "$with_proc_interrupts" = yes; then
10421
10422    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
10423 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
10424 if test "${ac_cv_have_proc_interrupts+set}" = set; then
10425   echo $ECHO_N "(cached) $ECHO_C" >&6
10426 else
10427   ac_cv_have_proc_interrupts=no
10428      if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
10429        ac_cv_have_proc_interrupts=yes
10430      fi
10431
10432 fi
10433 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
10434 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
10435    have_proc_interrupts=$ac_cv_have_proc_interrupts
10436
10437   if test "$have_proc_interrupts" = yes; then
10438     cat >>confdefs.h <<\_ACEOF
10439 #define HAVE_PROC_INTERRUPTS 1
10440 _ACEOF
10441
10442   fi
10443
10444 elif test "$with_proc_interrupts" != no; then
10445   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
10446   exit 1
10447 fi
10448
10449
10450 ###############################################################################
10451 #
10452 #       The --enable-locking option
10453 #
10454 ###############################################################################
10455
10456 # Check whether --enable-locking or --disable-locking was given.
10457 if test "${enable_locking+set}" = set; then
10458   enableval="$enable_locking"
10459   enable_locking="$enableval"
10460 else
10461   enable_locking=yes
10462 fi;
10463 if test "$enable_locking" = yes; then
10464   true
10465 elif test "$enable_locking" = no; then
10466   cat >>confdefs.h <<\_ACEOF
10467 #define NO_LOCKING 1
10468 _ACEOF
10469
10470 else
10471   echo "error: must be yes or no: --enable-locking=$enable_locking"
10472   exit 1
10473 fi
10474
10475
10476
10477 ###############################################################################
10478 #
10479 #       The --enable-vt-locking option
10480 #
10481 ###############################################################################
10482
10483 #ac_vt_lockswitch=no
10484 #AC_ARG_ENABLE(vt-locking,[
10485 #  --enable-vt-locking     Compile in support for locking Virtual Terminals.
10486 #                          This is the default if the system supports it, and
10487 #                          if locking support is included (--enable-locking.)
10488 #  --disable-vt-locking    Do not allow locking of VTs, even if locking is
10489 #                          enabled.],
10490 #  [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
10491 #if test "$enable_vt_locking" = yes; then
10492 #
10493 #  AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
10494 #   [AC_TRY_COMPILE([#include <fcntl.h>
10495 #                   #include <sys/ioctl.h>
10496 #                   #include <sys/vt.h>],
10497 #                  [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
10498 #                  [ac_cv_vt_lockswitch=yes],
10499 #                  [ac_cv_vt_lockswitch=no])])
10500 #  ac_vt_lockswitch=$ac_cv_vt_lockswitch
10501 #
10502 #elif test "$enable_vt_locking" = no; then
10503 #  true
10504 #else
10505 #  echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
10506 #  exit 1
10507 #fi
10508 #
10509 #if test "$ac_vt_lockswitch" = yes; then
10510 #  AC_DEFINE(HAVE_VT_LOCKSWITCH)
10511 #  # the VT_LOCKSWITCH ioctl can only be used when running as root.
10512 #  # #### but it doesn't work yet, so don't worry about that for now.
10513 ##  need_setuid=yes
10514 #fi
10515
10516
10517 ###############################################################################
10518 #
10519 #       Check for PAM.
10520 #
10521 ###############################################################################
10522
10523 case "$host" in
10524   *-solaris*)
10525    # Solaris systems tend to come with PAM misconfigured.
10526    #  Don't build it by default, even if the headers exist.
10527    with_pam_default=no
10528    ;;
10529   *)
10530    # Default to building PAM support on all other systems, if it exists.
10531    with_pam_default=yes
10532   ;;
10533 esac
10534
10535 have_pam=no
10536 with_pam_req=unspecified
10537
10538
10539 # Check whether --with-pam or --without-pam was given.
10540 if test "${with_pam+set}" = set; then
10541   withval="$with_pam"
10542   with_pam="$withval"; with_pam_req="$withval"
10543 else
10544   with_pam=$with_pam_default
10545 fi;
10546
10547
10548    case "$with_pam" in
10549     yes) ;;
10550     no)  ;;
10551
10552     /*)
10553      echo "$as_me:$LINENO: checking for PAM headers" >&5
10554 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
10555      d=$with_pam/include
10556      if test -d $d; then
10557        X_CFLAGS="-I$d $X_CFLAGS"
10558        echo "$as_me:$LINENO: result: $d" >&5
10559 echo "${ECHO_T}$d" >&6
10560      else
10561        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10562 echo "${ECHO_T}not found ($d: no such directory)" >&6
10563      fi
10564
10565      echo "$as_me:$LINENO: checking for PAM libs" >&5
10566 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
10567      d=$with_pam/lib
10568      if test -d $d; then
10569        X_LIBS="-L$d $X_LIBS"
10570        echo "$as_me:$LINENO: result: $d" >&5
10571 echo "${ECHO_T}$d" >&6
10572      else
10573        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10574 echo "${ECHO_T}not found ($d: no such directory)" >&6
10575      fi
10576
10577      # replace the directory string with "yes".
10578      with_pam_req="yes"
10579      with_pam=$with_pam_req
10580      ;;
10581
10582     *)
10583      echo ""
10584      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
10585      echo "       If it is a directory, then \`DIR/include' will be added to"
10586      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10587      exit 1
10588      ;;
10589    esac
10590
10591
10592 if test "$enable_locking" = yes -a "$with_pam" = yes; then
10593   echo "$as_me:$LINENO: checking for PAM" >&5
10594 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
10595 if test "${ac_cv_pam+set}" = set; then
10596   echo $ECHO_N "(cached) $ECHO_C" >&6
10597 else
10598
10599   ac_save_CPPFLAGS="$CPPFLAGS"
10600   if test \! -z "$includedir" ; then
10601     CPPFLAGS="$CPPFLAGS -I$includedir"
10602   fi
10603   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10604   cat >conftest.$ac_ext <<_ACEOF
10605 #line $LINENO "configure"
10606 #include "confdefs.h"
10607 #include <security/pam_appl.h>
10608 #ifdef F77_DUMMY_MAIN
10609 #  ifdef __cplusplus
10610      extern "C"
10611 #  endif
10612    int F77_DUMMY_MAIN() { return 1; }
10613 #endif
10614 int
10615 main ()
10616 {
10617
10618   ;
10619   return 0;
10620 }
10621 _ACEOF
10622 rm -f conftest.$ac_objext
10623 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10624   (eval $ac_compile) 2>&5
10625   ac_status=$?
10626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10627   (exit $ac_status); } &&
10628          { ac_try='test -s conftest.$ac_objext'
10629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10630   (eval $ac_try) 2>&5
10631   ac_status=$?
10632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10633   (exit $ac_status); }; }; then
10634   ac_cv_pam=yes
10635 else
10636   echo "$as_me: failed program was:" >&5
10637 cat conftest.$ac_ext >&5
10638 ac_cv_pam=no
10639 fi
10640 rm -f conftest.$ac_objext conftest.$ac_ext
10641   CPPFLAGS="$ac_save_CPPFLAGS"
10642 fi
10643 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
10644 echo "${ECHO_T}$ac_cv_pam" >&6
10645   if test "$ac_cv_pam" = yes ; then
10646     have_pam=yes
10647     cat >>confdefs.h <<\_ACEOF
10648 #define HAVE_PAM 1
10649 _ACEOF
10650
10651     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
10652
10653     # libpam typically requires dlopen and dlsym.  On FreeBSD,
10654     # those are in libc.  On Linux and Solaris, they're in libdl.
10655     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10656 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10657 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10658   echo $ECHO_N "(cached) $ECHO_C" >&6
10659 else
10660   ac_check_lib_save_LIBS=$LIBS
10661 LIBS="-ldl  $LIBS"
10662 cat >conftest.$ac_ext <<_ACEOF
10663 #line $LINENO "configure"
10664 #include "confdefs.h"
10665
10666 /* Override any gcc2 internal prototype to avoid an error.  */
10667 #ifdef __cplusplus
10668 extern "C"
10669 #endif
10670 /* We use char because int might match the return type of a gcc2
10671    builtin and then its argument prototype would still apply.  */
10672 char dlopen ();
10673 #ifdef F77_DUMMY_MAIN
10674 #  ifdef __cplusplus
10675      extern "C"
10676 #  endif
10677    int F77_DUMMY_MAIN() { return 1; }
10678 #endif
10679 int
10680 main ()
10681 {
10682 dlopen ();
10683   ;
10684   return 0;
10685 }
10686 _ACEOF
10687 rm -f conftest.$ac_objext conftest$ac_exeext
10688 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10689   (eval $ac_link) 2>&5
10690   ac_status=$?
10691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10692   (exit $ac_status); } &&
10693          { ac_try='test -s conftest$ac_exeext'
10694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10695   (eval $ac_try) 2>&5
10696   ac_status=$?
10697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10698   (exit $ac_status); }; }; then
10699   ac_cv_lib_dl_dlopen=yes
10700 else
10701   echo "$as_me: failed program was:" >&5
10702 cat conftest.$ac_ext >&5
10703 ac_cv_lib_dl_dlopen=no
10704 fi
10705 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10706 LIBS=$ac_check_lib_save_LIBS
10707 fi
10708 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10709 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10710 if test $ac_cv_lib_dl_dlopen = yes; then
10711   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
10712 fi
10713
10714
10715     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
10716 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
10717     if test "${ac_cv_pam_strerror_args+set}" = set; then
10718   echo $ECHO_N "(cached) $ECHO_C" >&6
10719 else
10720   cat >conftest.$ac_ext <<_ACEOF
10721 #line $LINENO "configure"
10722 #include "confdefs.h"
10723 #include <stdio.h>
10724                       #include <stdlib.h>
10725                       #include <security/pam_appl.h>
10726 #ifdef F77_DUMMY_MAIN
10727 #  ifdef __cplusplus
10728      extern "C"
10729 #  endif
10730    int F77_DUMMY_MAIN() { return 1; }
10731 #endif
10732 int
10733 main ()
10734 {
10735 pam_handle_t *pamh = 0;
10736                       char *s = pam_strerror(pamh, PAM_SUCCESS);
10737   ;
10738   return 0;
10739 }
10740 _ACEOF
10741 rm -f conftest.$ac_objext
10742 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10743   (eval $ac_compile) 2>&5
10744   ac_status=$?
10745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10746   (exit $ac_status); } &&
10747          { ac_try='test -s conftest.$ac_objext'
10748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10749   (eval $ac_try) 2>&5
10750   ac_status=$?
10751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10752   (exit $ac_status); }; }; then
10753   ac_pam_strerror_args=2
10754 else
10755   echo "$as_me: failed program was:" >&5
10756 cat conftest.$ac_ext >&5
10757 cat >conftest.$ac_ext <<_ACEOF
10758 #line $LINENO "configure"
10759 #include "confdefs.h"
10760 #include <stdio.h>
10761                                       #include <stdlib.h>
10762                                       #include <security/pam_appl.h>
10763 #ifdef F77_DUMMY_MAIN
10764 #  ifdef __cplusplus
10765      extern "C"
10766 #  endif
10767    int F77_DUMMY_MAIN() { return 1; }
10768 #endif
10769 int
10770 main ()
10771 {
10772 char *s =
10773                                        pam_strerror(PAM_SUCCESS);
10774   ;
10775   return 0;
10776 }
10777 _ACEOF
10778 rm -f conftest.$ac_objext
10779 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10780   (eval $ac_compile) 2>&5
10781   ac_status=$?
10782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10783   (exit $ac_status); } &&
10784          { ac_try='test -s conftest.$ac_objext'
10785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10786   (eval $ac_try) 2>&5
10787   ac_status=$?
10788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10789   (exit $ac_status); }; }; then
10790   ac_pam_strerror_args=1
10791 else
10792   echo "$as_me: failed program was:" >&5
10793 cat conftest.$ac_ext >&5
10794 ac_pam_strerror_args=0
10795 fi
10796 rm -f conftest.$ac_objext conftest.$ac_ext
10797 fi
10798 rm -f conftest.$ac_objext conftest.$ac_ext
10799       ac_cv_pam_strerror_args=$ac_pam_strerror_args
10800 fi
10801
10802     ac_pam_strerror_args=$ac_cv_pam_strerror_args
10803     if test "$ac_pam_strerror_args" = 1 ; then
10804       echo "$as_me:$LINENO: result: one argument" >&5
10805 echo "${ECHO_T}one argument" >&6
10806     elif test "$ac_pam_strerror_args" = 2 ; then
10807       cat >>confdefs.h <<\_ACEOF
10808 #define PAM_STRERROR_TWO_ARGS 1
10809 _ACEOF
10810
10811       echo "$as_me:$LINENO: result: two arguments" >&5
10812 echo "${ECHO_T}two arguments" >&6
10813     else
10814       echo "$as_me:$LINENO: result: unknown" >&5
10815 echo "${ECHO_T}unknown" >&6
10816     fi
10817   fi
10818 fi
10819
10820
10821 ###############################################################################
10822 #
10823 #       Check for Kerberos.
10824 #
10825 ###############################################################################
10826
10827 have_kerberos=no
10828 have_kerberos5=no
10829 with_kerberos_req=unspecified
10830
10831
10832 # Check whether --with-kerberos or --without-kerberos was given.
10833 if test "${with_kerberos+set}" = set; then
10834   withval="$with_kerberos"
10835   with_kerberos="$withval"; with_kerberos_req="$withval"
10836 else
10837   with_kerberos=yes
10838 fi;
10839
10840
10841    case "$with_kerberos" in
10842     yes) ;;
10843     no)  ;;
10844
10845     /*)
10846      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
10847 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
10848      d=$with_kerberos/include
10849      if test -d $d; then
10850        X_CFLAGS="-I$d $X_CFLAGS"
10851        echo "$as_me:$LINENO: result: $d" >&5
10852 echo "${ECHO_T}$d" >&6
10853      else
10854        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10855 echo "${ECHO_T}not found ($d: no such directory)" >&6
10856      fi
10857
10858      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
10859 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
10860      d=$with_kerberos/lib
10861      if test -d $d; then
10862        X_LIBS="-L$d $X_LIBS"
10863        echo "$as_me:$LINENO: result: $d" >&5
10864 echo "${ECHO_T}$d" >&6
10865      else
10866        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10867 echo "${ECHO_T}not found ($d: no such directory)" >&6
10868      fi
10869
10870      # replace the directory string with "yes".
10871      with_kerberos_req="yes"
10872      with_kerberos=$with_kerberos_req
10873      ;;
10874
10875     *)
10876      echo ""
10877      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
10878      echo "       If it is a directory, then \`DIR/include' will be added to"
10879      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10880      exit 1
10881      ;;
10882    esac
10883
10884
10885 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
10886   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
10887 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
10888 if test "${ac_cv_kerberos+set}" = set; then
10889   echo $ECHO_N "(cached) $ECHO_C" >&6
10890 else
10891
10892   ac_save_CPPFLAGS="$CPPFLAGS"
10893   if test \! -z "$includedir" ; then
10894     CPPFLAGS="$CPPFLAGS -I$includedir"
10895   fi
10896   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10897   cat >conftest.$ac_ext <<_ACEOF
10898 #line $LINENO "configure"
10899 #include "confdefs.h"
10900 #include <krb.h>
10901 #ifdef F77_DUMMY_MAIN
10902 #  ifdef __cplusplus
10903      extern "C"
10904 #  endif
10905    int F77_DUMMY_MAIN() { return 1; }
10906 #endif
10907 int
10908 main ()
10909 {
10910
10911   ;
10912   return 0;
10913 }
10914 _ACEOF
10915 rm -f conftest.$ac_objext
10916 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10917   (eval $ac_compile) 2>&5
10918   ac_status=$?
10919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10920   (exit $ac_status); } &&
10921          { ac_try='test -s conftest.$ac_objext'
10922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10923   (eval $ac_try) 2>&5
10924   ac_status=$?
10925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10926   (exit $ac_status); }; }; then
10927   ac_cv_kerberos=yes
10928 else
10929   echo "$as_me: failed program was:" >&5
10930 cat conftest.$ac_ext >&5
10931 ac_cv_kerberos=no
10932 fi
10933 rm -f conftest.$ac_objext conftest.$ac_ext
10934   CPPFLAGS="$ac_save_CPPFLAGS"
10935 fi
10936 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
10937 echo "${ECHO_T}$ac_cv_kerberos" >&6
10938   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
10939 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
10940 if test "${ac_cv_kerberos5+set}" = set; then
10941   echo $ECHO_N "(cached) $ECHO_C" >&6
10942 else
10943
10944   ac_save_CPPFLAGS="$CPPFLAGS"
10945   if test \! -z "$includedir" ; then
10946     CPPFLAGS="$CPPFLAGS -I$includedir"
10947   fi
10948   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10949   cat >conftest.$ac_ext <<_ACEOF
10950 #line $LINENO "configure"
10951 #include "confdefs.h"
10952 #include <kerberosIV/krb.h>
10953 #ifdef F77_DUMMY_MAIN
10954 #  ifdef __cplusplus
10955      extern "C"
10956 #  endif
10957    int F77_DUMMY_MAIN() { return 1; }
10958 #endif
10959 int
10960 main ()
10961 {
10962
10963   ;
10964   return 0;
10965 }
10966 _ACEOF
10967 rm -f conftest.$ac_objext
10968 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10969   (eval $ac_compile) 2>&5
10970   ac_status=$?
10971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10972   (exit $ac_status); } &&
10973          { ac_try='test -s conftest.$ac_objext'
10974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10975   (eval $ac_try) 2>&5
10976   ac_status=$?
10977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10978   (exit $ac_status); }; }; then
10979   ac_cv_kerberos5=yes
10980 else
10981   echo "$as_me: failed program was:" >&5
10982 cat conftest.$ac_ext >&5
10983 ac_cv_kerberos5=no
10984 fi
10985 rm -f conftest.$ac_objext conftest.$ac_ext
10986   CPPFLAGS="$ac_save_CPPFLAGS"
10987 fi
10988 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
10989 echo "${ECHO_T}$ac_cv_kerberos5" >&6
10990
10991   if test "$ac_cv_kerberos" = yes ; then
10992     have_kerberos=yes
10993     cat >>confdefs.h <<\_ACEOF
10994 #define HAVE_KERBEROS 1
10995 _ACEOF
10996
10997   fi
10998
10999   if test "$ac_cv_kerberos5" = yes ; then
11000     have_kerberos=yes
11001     have_kerberos5=yes
11002     cat >>confdefs.h <<\_ACEOF
11003 #define HAVE_KERBEROS 1
11004 _ACEOF
11005
11006     cat >>confdefs.h <<\_ACEOF
11007 #define HAVE_KERBEROS5 1
11008 _ACEOF
11009
11010   fi
11011
11012   if test "$have_kerberos5" = yes ; then
11013     # from Matt Knopp <mhat@infocalypse.netlag.com>
11014     # (who got it from amu@mit.edu)
11015     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcrypt -lcom_err"
11016   elif test "$have_kerberos" = yes ; then
11017     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
11018     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
11019   fi
11020
11021   if test "$have_kerberos" = yes ; then
11022     echo "$as_me:$LINENO: checking for res_search" >&5
11023 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
11024 if test "${ac_cv_func_res_search+set}" = set; then
11025   echo $ECHO_N "(cached) $ECHO_C" >&6
11026 else
11027   cat >conftest.$ac_ext <<_ACEOF
11028 #line $LINENO "configure"
11029 #include "confdefs.h"
11030 /* System header to define __stub macros and hopefully few prototypes,
11031     which can conflict with char res_search (); below.  */
11032 #include <assert.h>
11033 /* Override any gcc2 internal prototype to avoid an error.  */
11034 #ifdef __cplusplus
11035 extern "C"
11036 #endif
11037 /* We use char because int might match the return type of a gcc2
11038    builtin and then its argument prototype would still apply.  */
11039 char res_search ();
11040 char (*f) ();
11041
11042 #ifdef F77_DUMMY_MAIN
11043 #  ifdef __cplusplus
11044      extern "C"
11045 #  endif
11046    int F77_DUMMY_MAIN() { return 1; }
11047 #endif
11048 int
11049 main ()
11050 {
11051 /* The GNU C library defines this for functions which it implements
11052     to always fail with ENOSYS.  Some functions are actually named
11053     something starting with __ and the normal name is an alias.  */
11054 #if defined (__stub_res_search) || defined (__stub___res_search)
11055 choke me
11056 #else
11057 f = res_search;
11058 #endif
11059
11060   ;
11061   return 0;
11062 }
11063 _ACEOF
11064 rm -f conftest.$ac_objext conftest$ac_exeext
11065 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11066   (eval $ac_link) 2>&5
11067   ac_status=$?
11068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11069   (exit $ac_status); } &&
11070          { ac_try='test -s conftest$ac_exeext'
11071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11072   (eval $ac_try) 2>&5
11073   ac_status=$?
11074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11075   (exit $ac_status); }; }; then
11076   ac_cv_func_res_search=yes
11077 else
11078   echo "$as_me: failed program was:" >&5
11079 cat conftest.$ac_ext >&5
11080 ac_cv_func_res_search=no
11081 fi
11082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11083 fi
11084 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
11085 echo "${ECHO_T}$ac_cv_func_res_search" >&6
11086 if test $ac_cv_func_res_search = yes; then
11087   :
11088 else
11089   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
11090 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
11091 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
11092   echo $ECHO_N "(cached) $ECHO_C" >&6
11093 else
11094   ac_check_lib_save_LIBS=$LIBS
11095 LIBS="-lresolv  $LIBS"
11096 cat >conftest.$ac_ext <<_ACEOF
11097 #line $LINENO "configure"
11098 #include "confdefs.h"
11099
11100 /* Override any gcc2 internal prototype to avoid an error.  */
11101 #ifdef __cplusplus
11102 extern "C"
11103 #endif
11104 /* We use char because int might match the return type of a gcc2
11105    builtin and then its argument prototype would still apply.  */
11106 char res_search ();
11107 #ifdef F77_DUMMY_MAIN
11108 #  ifdef __cplusplus
11109      extern "C"
11110 #  endif
11111    int F77_DUMMY_MAIN() { return 1; }
11112 #endif
11113 int
11114 main ()
11115 {
11116 res_search ();
11117   ;
11118   return 0;
11119 }
11120 _ACEOF
11121 rm -f conftest.$ac_objext conftest$ac_exeext
11122 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11123   (eval $ac_link) 2>&5
11124   ac_status=$?
11125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11126   (exit $ac_status); } &&
11127          { ac_try='test -s conftest$ac_exeext'
11128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11129   (eval $ac_try) 2>&5
11130   ac_status=$?
11131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11132   (exit $ac_status); }; }; then
11133   ac_cv_lib_resolv_res_search=yes
11134 else
11135   echo "$as_me: failed program was:" >&5
11136 cat conftest.$ac_ext >&5
11137 ac_cv_lib_resolv_res_search=no
11138 fi
11139 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11140 LIBS=$ac_check_lib_save_LIBS
11141 fi
11142 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
11143 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
11144 if test $ac_cv_lib_resolv_res_search = yes; then
11145   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
11146 else
11147   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
11148 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
11149
11150 fi
11151
11152 fi
11153
11154   fi
11155 fi
11156
11157
11158 ###############################################################################
11159 #
11160 #       Check for the nine billion variants of shadow passwords...
11161 #
11162 ###############################################################################
11163
11164 need_setuid=no
11165
11166 have_shadow=no
11167 with_shadow_req=unspecified
11168
11169
11170 # Check whether --with-shadow or --without-shadow was given.
11171 if test "${with_shadow+set}" = set; then
11172   withval="$with_shadow"
11173   with_shadow="$withval"; with_shadow_req="$withval"
11174 else
11175   with_shadow=yes
11176 fi;
11177
11178
11179    case "$with_shadow" in
11180     yes) ;;
11181     no)  ;;
11182
11183     /*)
11184      echo "$as_me:$LINENO: checking for shadow password headers" >&5
11185 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
11186      d=$with_shadow/include
11187      if test -d $d; then
11188        X_CFLAGS="-I$d $X_CFLAGS"
11189        echo "$as_me:$LINENO: result: $d" >&5
11190 echo "${ECHO_T}$d" >&6
11191      else
11192        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11193 echo "${ECHO_T}not found ($d: no such directory)" >&6
11194      fi
11195
11196      echo "$as_me:$LINENO: checking for shadow password libs" >&5
11197 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
11198      d=$with_shadow/lib
11199      if test -d $d; then
11200        X_LIBS="-L$d $X_LIBS"
11201        echo "$as_me:$LINENO: result: $d" >&5
11202 echo "${ECHO_T}$d" >&6
11203      else
11204        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11205 echo "${ECHO_T}not found ($d: no such directory)" >&6
11206      fi
11207
11208      # replace the directory string with "yes".
11209      with_shadow_req="yes"
11210      with_shadow=$with_shadow_req
11211      ;;
11212
11213     *)
11214      echo ""
11215      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
11216      echo "       If it is a directory, then \`DIR/include' will be added to"
11217      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11218      exit 1
11219      ;;
11220    esac
11221
11222
11223 if test "$enable_locking" = no ; then
11224   with_shadow_req=no
11225   with_shadow=no
11226 fi
11227
11228
11229 ###############################################################################
11230 #
11231 #       Check for Sun "adjunct" passwords.
11232 #
11233 ###############################################################################
11234
11235 if test "$with_shadow" = yes ; then
11236   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
11237 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
11238 if test "${ac_cv_sun_adjunct+set}" = set; then
11239   echo $ECHO_N "(cached) $ECHO_C" >&6
11240 else
11241
11242   ac_save_CPPFLAGS="$CPPFLAGS"
11243   if test \! -z "$includedir" ; then
11244     CPPFLAGS="$CPPFLAGS -I$includedir"
11245   fi
11246   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11247   cat >conftest.$ac_ext <<_ACEOF
11248 #line $LINENO "configure"
11249 #include "confdefs.h"
11250 #include <stdlib.h>
11251                                     #include <unistd.h>
11252                                     #include <sys/types.h>
11253                                     #include <sys/label.h>
11254                                     #include <sys/audit.h>
11255                                     #include <pwdadj.h>
11256 #ifdef F77_DUMMY_MAIN
11257 #  ifdef __cplusplus
11258      extern "C"
11259 #  endif
11260    int F77_DUMMY_MAIN() { return 1; }
11261 #endif
11262 int
11263 main ()
11264 {
11265 struct passwd_adjunct *p = getpwanam("nobody");
11266                        const char *pw = p->pwa_passwd;
11267   ;
11268   return 0;
11269 }
11270 _ACEOF
11271 rm -f conftest.$ac_objext
11272 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11273   (eval $ac_compile) 2>&5
11274   ac_status=$?
11275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11276   (exit $ac_status); } &&
11277          { ac_try='test -s conftest.$ac_objext'
11278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11279   (eval $ac_try) 2>&5
11280   ac_status=$?
11281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11282   (exit $ac_status); }; }; then
11283   ac_cv_sun_adjunct=yes
11284 else
11285   echo "$as_me: failed program was:" >&5
11286 cat conftest.$ac_ext >&5
11287 ac_cv_sun_adjunct=no
11288 fi
11289 rm -f conftest.$ac_objext conftest.$ac_ext
11290   CPPFLAGS="$ac_save_CPPFLAGS"
11291 fi
11292 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
11293 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
11294   if test "$ac_cv_sun_adjunct" = yes; then
11295     have_shadow_adjunct=yes
11296     have_shadow=yes
11297     need_setuid=yes
11298   fi
11299 fi
11300
11301
11302 ###############################################################################
11303 #
11304 #       Check for DEC and SCO so-called "enhanced" security.
11305 #
11306 ###############################################################################
11307
11308 if test "$with_shadow" = yes ; then
11309   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
11310 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
11311 if test "${ac_cv_enhanced_passwd+set}" = set; then
11312   echo $ECHO_N "(cached) $ECHO_C" >&6
11313 else
11314
11315   ac_save_CPPFLAGS="$CPPFLAGS"
11316   if test \! -z "$includedir" ; then
11317     CPPFLAGS="$CPPFLAGS -I$includedir"
11318   fi
11319   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11320   cat >conftest.$ac_ext <<_ACEOF
11321 #line $LINENO "configure"
11322 #include "confdefs.h"
11323 #include <stdlib.h>
11324                                     #include <unistd.h>
11325                                     #include <sys/types.h>
11326                                     #include <pwd.h>
11327                                     #include <sys/security.h>
11328                                     #include <prot.h>
11329 #ifdef F77_DUMMY_MAIN
11330 #  ifdef __cplusplus
11331      extern "C"
11332 #  endif
11333    int F77_DUMMY_MAIN() { return 1; }
11334 #endif
11335 int
11336 main ()
11337 {
11338 struct pr_passwd *p;
11339                        const char *pw;
11340                        set_auth_parameters(0, 0);
11341                        check_auth_parameters();
11342                        p = getprpwnam("nobody");
11343                        pw = p->ufld.fd_encrypt;
11344   ;
11345   return 0;
11346 }
11347 _ACEOF
11348 rm -f conftest.$ac_objext
11349 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11350   (eval $ac_compile) 2>&5
11351   ac_status=$?
11352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11353   (exit $ac_status); } &&
11354          { ac_try='test -s conftest.$ac_objext'
11355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11356   (eval $ac_try) 2>&5
11357   ac_status=$?
11358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11359   (exit $ac_status); }; }; then
11360   ac_cv_enhanced_passwd=yes
11361 else
11362   echo "$as_me: failed program was:" >&5
11363 cat conftest.$ac_ext >&5
11364 ac_cv_enhanced_passwd=no
11365 fi
11366 rm -f conftest.$ac_objext conftest.$ac_ext
11367   CPPFLAGS="$ac_save_CPPFLAGS"
11368 fi
11369 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
11370 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
11371   if test $ac_cv_enhanced_passwd = yes; then
11372     have_shadow_enhanced=yes
11373     have_shadow=yes
11374     need_setuid=yes
11375
11376     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
11377     # (I'm told it needs -lcurses too, but I don't understand why.)
11378     # But on DEC, it's in -lsecurity.
11379     #
11380     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
11381 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
11382 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
11383   echo $ECHO_N "(cached) $ECHO_C" >&6
11384 else
11385   ac_check_lib_save_LIBS=$LIBS
11386 LIBS="-lprot -lx $LIBS"
11387 cat >conftest.$ac_ext <<_ACEOF
11388 #line $LINENO "configure"
11389 #include "confdefs.h"
11390
11391 /* Override any gcc2 internal prototype to avoid an error.  */
11392 #ifdef __cplusplus
11393 extern "C"
11394 #endif
11395 /* We use char because int might match the return type of a gcc2
11396    builtin and then its argument prototype would still apply.  */
11397 char getprpwnam ();
11398 #ifdef F77_DUMMY_MAIN
11399 #  ifdef __cplusplus
11400      extern "C"
11401 #  endif
11402    int F77_DUMMY_MAIN() { return 1; }
11403 #endif
11404 int
11405 main ()
11406 {
11407 getprpwnam ();
11408   ;
11409   return 0;
11410 }
11411 _ACEOF
11412 rm -f conftest.$ac_objext conftest$ac_exeext
11413 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11414   (eval $ac_link) 2>&5
11415   ac_status=$?
11416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11417   (exit $ac_status); } &&
11418          { ac_try='test -s conftest$ac_exeext'
11419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11420   (eval $ac_try) 2>&5
11421   ac_status=$?
11422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11423   (exit $ac_status); }; }; then
11424   ac_cv_lib_prot_getprpwnam=yes
11425 else
11426   echo "$as_me: failed program was:" >&5
11427 cat conftest.$ac_ext >&5
11428 ac_cv_lib_prot_getprpwnam=no
11429 fi
11430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11431 LIBS=$ac_check_lib_save_LIBS
11432 fi
11433 echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
11434 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
11435 if test $ac_cv_lib_prot_getprpwnam = yes; then
11436   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
11437 else
11438   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
11439 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
11440 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
11441   echo $ECHO_N "(cached) $ECHO_C" >&6
11442 else
11443   ac_check_lib_save_LIBS=$LIBS
11444 LIBS="-lsecurity  $LIBS"
11445 cat >conftest.$ac_ext <<_ACEOF
11446 #line $LINENO "configure"
11447 #include "confdefs.h"
11448
11449 /* Override any gcc2 internal prototype to avoid an error.  */
11450 #ifdef __cplusplus
11451 extern "C"
11452 #endif
11453 /* We use char because int might match the return type of a gcc2
11454    builtin and then its argument prototype would still apply.  */
11455 char getprpwnam ();
11456 #ifdef F77_DUMMY_MAIN
11457 #  ifdef __cplusplus
11458      extern "C"
11459 #  endif
11460    int F77_DUMMY_MAIN() { return 1; }
11461 #endif
11462 int
11463 main ()
11464 {
11465 getprpwnam ();
11466   ;
11467   return 0;
11468 }
11469 _ACEOF
11470 rm -f conftest.$ac_objext conftest$ac_exeext
11471 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11472   (eval $ac_link) 2>&5
11473   ac_status=$?
11474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11475   (exit $ac_status); } &&
11476          { ac_try='test -s conftest$ac_exeext'
11477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11478   (eval $ac_try) 2>&5
11479   ac_status=$?
11480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11481   (exit $ac_status); }; }; then
11482   ac_cv_lib_security_getprpwnam=yes
11483 else
11484   echo "$as_me: failed program was:" >&5
11485 cat conftest.$ac_ext >&5
11486 ac_cv_lib_security_getprpwnam=no
11487 fi
11488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11489 LIBS=$ac_check_lib_save_LIBS
11490 fi
11491 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
11492 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
11493 if test $ac_cv_lib_security_getprpwnam = yes; then
11494   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
11495 fi
11496
11497 fi
11498
11499   fi
11500 fi
11501
11502 ###############################################################################
11503 #
11504 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
11505 #
11506 ###############################################################################
11507
11508 if test "$with_shadow" = yes ; then
11509   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
11510 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
11511 if test "${ac_cv_hpux_passwd+set}" = set; then
11512   echo $ECHO_N "(cached) $ECHO_C" >&6
11513 else
11514
11515   ac_save_CPPFLAGS="$CPPFLAGS"
11516   if test \! -z "$includedir" ; then
11517     CPPFLAGS="$CPPFLAGS -I$includedir"
11518   fi
11519   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11520   cat >conftest.$ac_ext <<_ACEOF
11521 #line $LINENO "configure"
11522 #include "confdefs.h"
11523 #include <stdlib.h>
11524                                     #include <unistd.h>
11525                                     #include <sys/types.h>
11526                                     #include <pwd.h>
11527                                     #include <hpsecurity.h>
11528                                     #include <prot.h>
11529 #ifdef F77_DUMMY_MAIN
11530 #  ifdef __cplusplus
11531      extern "C"
11532 #  endif
11533    int F77_DUMMY_MAIN() { return 1; }
11534 #endif
11535 int
11536 main ()
11537 {
11538 struct s_passwd *p = getspwnam("nobody");
11539                        const char *pw = p->pw_passwd;
11540   ;
11541   return 0;
11542 }
11543 _ACEOF
11544 rm -f conftest.$ac_objext
11545 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11546   (eval $ac_compile) 2>&5
11547   ac_status=$?
11548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11549   (exit $ac_status); } &&
11550          { ac_try='test -s conftest.$ac_objext'
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_hpux_passwd=yes
11557 else
11558   echo "$as_me: failed program was:" >&5
11559 cat conftest.$ac_ext >&5
11560 ac_cv_hpux_passwd=no
11561 fi
11562 rm -f conftest.$ac_objext conftest.$ac_ext
11563   CPPFLAGS="$ac_save_CPPFLAGS"
11564 fi
11565 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
11566 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
11567   if test "$ac_cv_hpux_passwd" = yes; then
11568     have_shadow_hpux=yes
11569     have_shadow=yes
11570     need_setuid=yes
11571
11572     # on HPUX, bigcrypt is in -lsec
11573     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
11574 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
11575 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
11576   echo $ECHO_N "(cached) $ECHO_C" >&6
11577 else
11578   ac_check_lib_save_LIBS=$LIBS
11579 LIBS="-lsec  $LIBS"
11580 cat >conftest.$ac_ext <<_ACEOF
11581 #line $LINENO "configure"
11582 #include "confdefs.h"
11583
11584 /* Override any gcc2 internal prototype to avoid an error.  */
11585 #ifdef __cplusplus
11586 extern "C"
11587 #endif
11588 /* We use char because int might match the return type of a gcc2
11589    builtin and then its argument prototype would still apply.  */
11590 char bigcrypt ();
11591 #ifdef F77_DUMMY_MAIN
11592 #  ifdef __cplusplus
11593      extern "C"
11594 #  endif
11595    int F77_DUMMY_MAIN() { return 1; }
11596 #endif
11597 int
11598 main ()
11599 {
11600 bigcrypt ();
11601   ;
11602   return 0;
11603 }
11604 _ACEOF
11605 rm -f conftest.$ac_objext conftest$ac_exeext
11606 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11607   (eval $ac_link) 2>&5
11608   ac_status=$?
11609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11610   (exit $ac_status); } &&
11611          { ac_try='test -s conftest$ac_exeext'
11612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11613   (eval $ac_try) 2>&5
11614   ac_status=$?
11615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11616   (exit $ac_status); }; }; then
11617   ac_cv_lib_sec_bigcrypt=yes
11618 else
11619   echo "$as_me: failed program was:" >&5
11620 cat conftest.$ac_ext >&5
11621 ac_cv_lib_sec_bigcrypt=no
11622 fi
11623 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11624 LIBS=$ac_check_lib_save_LIBS
11625 fi
11626 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
11627 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
11628 if test $ac_cv_lib_sec_bigcrypt = yes; then
11629   PASSWD_LIBS="$PASSWD_LIBS -lsec"
11630 fi
11631
11632   fi
11633 fi
11634
11635
11636 ###############################################################################
11637 #
11638 #       Check for FreeBSD-style shadow passwords.
11639 #
11640 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
11641 #       password systems -- except you only get stuff in the pw_passwd field
11642 #       if the running program is setuid.  So, guess that we've got this
11643 #       lossage to contend with if /etc/master.passwd exists, and default to
11644 #       a setuid installation.
11645 #
11646 ###############################################################################
11647
11648 if test "$with_shadow" = yes ; then
11649   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
11650 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
11651 if test "${ac_cv_master_passwd+set}" = set; then
11652   echo $ECHO_N "(cached) $ECHO_C" >&6
11653 else
11654   if test -f /etc/master.passwd ; then
11655                     ac_cv_master_passwd=yes
11656                   else
11657                     ac_cv_master_passwd=no
11658                   fi
11659 fi
11660 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
11661 echo "${ECHO_T}$ac_cv_master_passwd" >&6
11662   if test "$ac_cv_master_passwd" = yes; then
11663     need_setuid=yes
11664   fi
11665 fi
11666
11667
11668 ###############################################################################
11669 #
11670 #       Check for traditional (ha!) shadow passwords.
11671 #
11672 ###############################################################################
11673
11674 if test "$with_shadow" = yes ; then
11675   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
11676 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
11677 if test "${ac_cv_shadow+set}" = set; then
11678   echo $ECHO_N "(cached) $ECHO_C" >&6
11679 else
11680
11681   ac_save_CPPFLAGS="$CPPFLAGS"
11682   if test \! -z "$includedir" ; then
11683     CPPFLAGS="$CPPFLAGS -I$includedir"
11684   fi
11685   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11686   cat >conftest.$ac_ext <<_ACEOF
11687 #line $LINENO "configure"
11688 #include "confdefs.h"
11689 #include <stdlib.h>
11690                                     #include <unistd.h>
11691                                     #include <sys/types.h>
11692                                     #include <pwd.h>
11693                                     #include <shadow.h>
11694 #ifdef F77_DUMMY_MAIN
11695 #  ifdef __cplusplus
11696      extern "C"
11697 #  endif
11698    int F77_DUMMY_MAIN() { return 1; }
11699 #endif
11700 int
11701 main ()
11702 {
11703 struct spwd *p = getspnam("nobody");
11704                        const char *pw = p->sp_pwdp;
11705   ;
11706   return 0;
11707 }
11708 _ACEOF
11709 rm -f conftest.$ac_objext
11710 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11711   (eval $ac_compile) 2>&5
11712   ac_status=$?
11713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11714   (exit $ac_status); } &&
11715          { ac_try='test -s conftest.$ac_objext'
11716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11717   (eval $ac_try) 2>&5
11718   ac_status=$?
11719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11720   (exit $ac_status); }; }; then
11721   ac_cv_shadow=yes
11722 else
11723   echo "$as_me: failed program was:" >&5
11724 cat conftest.$ac_ext >&5
11725 ac_cv_shadow=no
11726 fi
11727 rm -f conftest.$ac_objext conftest.$ac_ext
11728   CPPFLAGS="$ac_save_CPPFLAGS"
11729 fi
11730 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
11731 echo "${ECHO_T}$ac_cv_shadow" >&6
11732   if test "$ac_cv_shadow" = yes; then
11733     have_shadow=yes
11734     need_setuid=yes
11735
11736     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
11737     have_getspnam=no
11738     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
11739 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
11740 if test "${ac_cv_lib_c_getspnam+set}" = set; then
11741   echo $ECHO_N "(cached) $ECHO_C" >&6
11742 else
11743   ac_check_lib_save_LIBS=$LIBS
11744 LIBS="-lc  $LIBS"
11745 cat >conftest.$ac_ext <<_ACEOF
11746 #line $LINENO "configure"
11747 #include "confdefs.h"
11748
11749 /* Override any gcc2 internal prototype to avoid an error.  */
11750 #ifdef __cplusplus
11751 extern "C"
11752 #endif
11753 /* We use char because int might match the return type of a gcc2
11754    builtin and then its argument prototype would still apply.  */
11755 char getspnam ();
11756 #ifdef F77_DUMMY_MAIN
11757 #  ifdef __cplusplus
11758      extern "C"
11759 #  endif
11760    int F77_DUMMY_MAIN() { return 1; }
11761 #endif
11762 int
11763 main ()
11764 {
11765 getspnam ();
11766   ;
11767   return 0;
11768 }
11769 _ACEOF
11770 rm -f conftest.$ac_objext conftest$ac_exeext
11771 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11772   (eval $ac_link) 2>&5
11773   ac_status=$?
11774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11775   (exit $ac_status); } &&
11776          { ac_try='test -s conftest$ac_exeext'
11777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11778   (eval $ac_try) 2>&5
11779   ac_status=$?
11780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11781   (exit $ac_status); }; }; then
11782   ac_cv_lib_c_getspnam=yes
11783 else
11784   echo "$as_me: failed program was:" >&5
11785 cat conftest.$ac_ext >&5
11786 ac_cv_lib_c_getspnam=no
11787 fi
11788 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11789 LIBS=$ac_check_lib_save_LIBS
11790 fi
11791 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
11792 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
11793 if test $ac_cv_lib_c_getspnam = yes; then
11794   have_getspnam=yes
11795 fi
11796
11797     if test "$have_getspnam" = no ; then
11798       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
11799 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
11800 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
11801   echo $ECHO_N "(cached) $ECHO_C" >&6
11802 else
11803   ac_check_lib_save_LIBS=$LIBS
11804 LIBS="-lgen  $LIBS"
11805 cat >conftest.$ac_ext <<_ACEOF
11806 #line $LINENO "configure"
11807 #include "confdefs.h"
11808
11809 /* Override any gcc2 internal prototype to avoid an error.  */
11810 #ifdef __cplusplus
11811 extern "C"
11812 #endif
11813 /* We use char because int might match the return type of a gcc2
11814    builtin and then its argument prototype would still apply.  */
11815 char getspnam ();
11816 #ifdef F77_DUMMY_MAIN
11817 #  ifdef __cplusplus
11818      extern "C"
11819 #  endif
11820    int F77_DUMMY_MAIN() { return 1; }
11821 #endif
11822 int
11823 main ()
11824 {
11825 getspnam ();
11826   ;
11827   return 0;
11828 }
11829 _ACEOF
11830 rm -f conftest.$ac_objext conftest$ac_exeext
11831 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11832   (eval $ac_link) 2>&5
11833   ac_status=$?
11834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11835   (exit $ac_status); } &&
11836          { ac_try='test -s conftest$ac_exeext'
11837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11838   (eval $ac_try) 2>&5
11839   ac_status=$?
11840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11841   (exit $ac_status); }; }; then
11842   ac_cv_lib_gen_getspnam=yes
11843 else
11844   echo "$as_me: failed program was:" >&5
11845 cat conftest.$ac_ext >&5
11846 ac_cv_lib_gen_getspnam=no
11847 fi
11848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11849 LIBS=$ac_check_lib_save_LIBS
11850 fi
11851 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
11852 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
11853 if test $ac_cv_lib_gen_getspnam = yes; then
11854   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
11855 fi
11856
11857     fi
11858   fi
11859 fi
11860
11861
11862 ###############################################################################
11863 #
11864 #       Check for other libraries needed for non-shadow passwords.
11865 #
11866 ###############################################################################
11867
11868 if test "$enable_locking" = yes ; then
11869
11870   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
11871   have_crypt=no
11872   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
11873 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
11874 if test "${ac_cv_lib_c_crypt+set}" = set; then
11875   echo $ECHO_N "(cached) $ECHO_C" >&6
11876 else
11877   ac_check_lib_save_LIBS=$LIBS
11878 LIBS="-lc  $LIBS"
11879 cat >conftest.$ac_ext <<_ACEOF
11880 #line $LINENO "configure"
11881 #include "confdefs.h"
11882
11883 /* Override any gcc2 internal prototype to avoid an error.  */
11884 #ifdef __cplusplus
11885 extern "C"
11886 #endif
11887 /* We use char because int might match the return type of a gcc2
11888    builtin and then its argument prototype would still apply.  */
11889 char crypt ();
11890 #ifdef F77_DUMMY_MAIN
11891 #  ifdef __cplusplus
11892      extern "C"
11893 #  endif
11894    int F77_DUMMY_MAIN() { return 1; }
11895 #endif
11896 int
11897 main ()
11898 {
11899 crypt ();
11900   ;
11901   return 0;
11902 }
11903 _ACEOF
11904 rm -f conftest.$ac_objext conftest$ac_exeext
11905 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11906   (eval $ac_link) 2>&5
11907   ac_status=$?
11908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11909   (exit $ac_status); } &&
11910          { ac_try='test -s conftest$ac_exeext'
11911   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11912   (eval $ac_try) 2>&5
11913   ac_status=$?
11914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11915   (exit $ac_status); }; }; then
11916   ac_cv_lib_c_crypt=yes
11917 else
11918   echo "$as_me: failed program was:" >&5
11919 cat conftest.$ac_ext >&5
11920 ac_cv_lib_c_crypt=no
11921 fi
11922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11923 LIBS=$ac_check_lib_save_LIBS
11924 fi
11925 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
11926 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
11927 if test $ac_cv_lib_c_crypt = yes; then
11928   have_crypt=yes
11929 fi
11930
11931   if test "$have_crypt" = no ; then
11932     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
11933 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
11934 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
11935   echo $ECHO_N "(cached) $ECHO_C" >&6
11936 else
11937   ac_check_lib_save_LIBS=$LIBS
11938 LIBS="-lcrypt  $LIBS"
11939 cat >conftest.$ac_ext <<_ACEOF
11940 #line $LINENO "configure"
11941 #include "confdefs.h"
11942
11943 /* Override any gcc2 internal prototype to avoid an error.  */
11944 #ifdef __cplusplus
11945 extern "C"
11946 #endif
11947 /* We use char because int might match the return type of a gcc2
11948    builtin and then its argument prototype would still apply.  */
11949 char crypt ();
11950 #ifdef F77_DUMMY_MAIN
11951 #  ifdef __cplusplus
11952      extern "C"
11953 #  endif
11954    int F77_DUMMY_MAIN() { return 1; }
11955 #endif
11956 int
11957 main ()
11958 {
11959 crypt ();
11960   ;
11961   return 0;
11962 }
11963 _ACEOF
11964 rm -f conftest.$ac_objext conftest$ac_exeext
11965 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11966   (eval $ac_link) 2>&5
11967   ac_status=$?
11968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11969   (exit $ac_status); } &&
11970          { ac_try='test -s conftest$ac_exeext'
11971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11972   (eval $ac_try) 2>&5
11973   ac_status=$?
11974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11975   (exit $ac_status); }; }; then
11976   ac_cv_lib_crypt_crypt=yes
11977 else
11978   echo "$as_me: failed program was:" >&5
11979 cat conftest.$ac_ext >&5
11980 ac_cv_lib_crypt_crypt=no
11981 fi
11982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11983 LIBS=$ac_check_lib_save_LIBS
11984 fi
11985 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
11986 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
11987 if test $ac_cv_lib_crypt_crypt = yes; then
11988   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11989 fi
11990
11991   fi
11992 fi
11993
11994
11995 # Most of the above shadow mechanisms will have set need_setuid to yes,
11996 # if they were found.  But, on some systems, we need setuid even when
11997 # using plain old vanilla passwords.
11998 #
11999 if test "$enable_locking" = yes ; then
12000   case "$host" in
12001     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
12002       need_setuid=yes
12003     ;;
12004   esac
12005 fi
12006
12007
12008 if test "$have_shadow_adjunct" = yes ; then
12009   cat >>confdefs.h <<\_ACEOF
12010 #define HAVE_ADJUNCT_PASSWD 1
12011 _ACEOF
12012
12013 elif test "$have_shadow_enhanced" = yes ; then
12014   cat >>confdefs.h <<\_ACEOF
12015 #define HAVE_ENHANCED_PASSWD 1
12016 _ACEOF
12017
12018 elif test "$have_shadow_hpux" = yes ; then
12019   cat >>confdefs.h <<\_ACEOF
12020 #define HAVE_HPUX_PASSWD 1
12021 _ACEOF
12022
12023 elif test "$have_shadow" = yes ; then
12024   cat >>confdefs.h <<\_ACEOF
12025 #define HAVE_SHADOW_PASSWD 1
12026 _ACEOF
12027
12028 fi
12029
12030
12031 ###############################################################################
12032 #
12033 #       Check for -lXm.
12034 #
12035 ###############################################################################
12036
12037 have_motif=no
12038 with_motif_req=unspecified
12039
12040 # Check whether --with-motif or --without-motif was given.
12041 if test "${with_motif+set}" = set; then
12042   withval="$with_motif"
12043   with_motif="$withval"; with_motif_req="$withval"
12044 else
12045   with_motif=yes
12046 fi;
12047
12048
12049    case "$with_motif" in
12050     yes) ;;
12051     no)  ;;
12052
12053     /*)
12054      echo "$as_me:$LINENO: checking for Motif headers" >&5
12055 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
12056      d=$with_motif/include
12057      if test -d $d; then
12058        X_CFLAGS="-I$d $X_CFLAGS"
12059        echo "$as_me:$LINENO: result: $d" >&5
12060 echo "${ECHO_T}$d" >&6
12061      else
12062        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12063 echo "${ECHO_T}not found ($d: no such directory)" >&6
12064      fi
12065
12066      echo "$as_me:$LINENO: checking for Motif libs" >&5
12067 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
12068      d=$with_motif/lib
12069      if test -d $d; then
12070        X_LIBS="-L$d $X_LIBS"
12071        echo "$as_me:$LINENO: result: $d" >&5
12072 echo "${ECHO_T}$d" >&6
12073      else
12074        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12075 echo "${ECHO_T}not found ($d: no such directory)" >&6
12076      fi
12077
12078      # replace the directory string with "yes".
12079      with_motif_req="yes"
12080      with_motif=$with_motif_req
12081      ;;
12082
12083     *)
12084      echo ""
12085      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
12086      echo "       If it is a directory, then \`DIR/include' will be added to"
12087      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12088      exit 1
12089      ;;
12090    esac
12091
12092
12093 if test "$with_motif" != yes -a "$with_motif" != no ; then
12094   echo "error: must be yes or no: --with-motif=$with_motif"
12095   exit 1
12096 fi
12097
12098 if test "$with_motif" = yes; then
12099   have_motif=no
12100
12101   ac_save_CPPFLAGS="$CPPFLAGS"
12102   if test \! -z "$includedir" ; then
12103     CPPFLAGS="$CPPFLAGS -I$includedir"
12104   fi
12105   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12106   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
12107 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
12108 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
12109   echo $ECHO_N "(cached) $ECHO_C" >&6
12110 else
12111   cat >conftest.$ac_ext <<_ACEOF
12112 #line $LINENO "configure"
12113 #include "confdefs.h"
12114 #include <stdlib.h>
12115                      #include <stdio.h>
12116                      #include <X11/Intrinsic.h>
12117
12118 #include <Xm/Xm.h>
12119 _ACEOF
12120 rm -f conftest.$ac_objext
12121 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12122   (eval $ac_compile) 2>&5
12123   ac_status=$?
12124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12125   (exit $ac_status); } &&
12126          { ac_try='test -s conftest.$ac_objext'
12127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12128   (eval $ac_try) 2>&5
12129   ac_status=$?
12130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12131   (exit $ac_status); }; }; then
12132   ac_cv_header_Xm_Xm_h=yes
12133 else
12134   echo "$as_me: failed program was:" >&5
12135 cat conftest.$ac_ext >&5
12136 ac_cv_header_Xm_Xm_h=no
12137 fi
12138 rm -f conftest.$ac_objext conftest.$ac_ext
12139 fi
12140 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
12141 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
12142 if test $ac_cv_header_Xm_Xm_h = yes; then
12143   have_motif=yes
12144                      cat >>confdefs.h <<\_ACEOF
12145 #define HAVE_MOTIF 1
12146 _ACEOF
12147
12148                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
12149 fi
12150
12151
12152   CPPFLAGS="$ac_save_CPPFLAGS"
12153 fi
12154
12155
12156 if test "$have_motif" = yes; then
12157
12158   ac_save_CPPFLAGS="$CPPFLAGS"
12159   if test \! -z "$includedir" ; then
12160     CPPFLAGS="$CPPFLAGS -I$includedir"
12161   fi
12162   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12163   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
12164 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
12165 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
12166   echo $ECHO_N "(cached) $ECHO_C" >&6
12167 else
12168   cat >conftest.$ac_ext <<_ACEOF
12169 #line $LINENO "configure"
12170 #include "confdefs.h"
12171 #include <stdlib.h>
12172                      #include <stdio.h>
12173                      #include <X11/Intrinsic.h>
12174
12175 #include <Xm/ComboBox.h>
12176 _ACEOF
12177 rm -f conftest.$ac_objext
12178 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12179   (eval $ac_compile) 2>&5
12180   ac_status=$?
12181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12182   (exit $ac_status); } &&
12183          { ac_try='test -s conftest.$ac_objext'
12184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12185   (eval $ac_try) 2>&5
12186   ac_status=$?
12187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12188   (exit $ac_status); }; }; then
12189   ac_cv_header_Xm_ComboBox_h=yes
12190 else
12191   echo "$as_me: failed program was:" >&5
12192 cat conftest.$ac_ext >&5
12193 ac_cv_header_Xm_ComboBox_h=no
12194 fi
12195 rm -f conftest.$ac_objext conftest.$ac_ext
12196 fi
12197 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
12198 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
12199 if test $ac_cv_header_Xm_ComboBox_h = yes; then
12200   cat >>confdefs.h <<\_ACEOF
12201 #define HAVE_XMCOMBOBOX 1
12202 _ACEOF
12203
12204 fi
12205
12206
12207   CPPFLAGS="$ac_save_CPPFLAGS"
12208 fi
12209
12210
12211 ###############################################################################
12212 #
12213 #       Check for -lgtk (and Gnome stuff)
12214 #
12215 ###############################################################################
12216
12217 have_gtk=no
12218 have_gtk2=no
12219 with_gtk_req=unspecified
12220
12221 # Check whether --with-gtk or --without-gtk was given.
12222 if test "${with_gtk+set}" = set; then
12223   withval="$with_gtk"
12224   with_gtk="$withval"; with_gtk_req="$withval"
12225 else
12226   with_gtk=yes
12227 fi;
12228
12229 # if --with-gtk=/directory/ was specified, remember that directory so that
12230 # we can also look for the `gtk-config' program in that directory.
12231 case "$with_gtk" in
12232   /*)
12233     gtk_dir="$with_gtk"
12234     ;;
12235   *)
12236     gtk_dir=""
12237     ;;
12238 esac
12239
12240
12241    case "$with_gtk" in
12242     yes) ;;
12243     no)  ;;
12244
12245     /*)
12246      echo "$as_me:$LINENO: checking for Gtk headers" >&5
12247 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
12248      d=$with_gtk/include
12249      if test -d $d; then
12250        X_CFLAGS="-I$d $X_CFLAGS"
12251        echo "$as_me:$LINENO: result: $d" >&5
12252 echo "${ECHO_T}$d" >&6
12253      else
12254        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12255 echo "${ECHO_T}not found ($d: no such directory)" >&6
12256      fi
12257
12258      echo "$as_me:$LINENO: checking for Gtk libs" >&5
12259 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12260      d=$with_gtk/lib
12261      if test -d $d; then
12262        X_LIBS="-L$d $X_LIBS"
12263        echo "$as_me:$LINENO: result: $d" >&5
12264 echo "${ECHO_T}$d" >&6
12265      else
12266        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12267 echo "${ECHO_T}not found ($d: no such directory)" >&6
12268      fi
12269
12270      # replace the directory string with "yes".
12271      with_gtk_req="yes"
12272      with_gtk=$with_gtk_req
12273      ;;
12274
12275     *)
12276      echo ""
12277      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
12278      echo "       If it is a directory, then \`DIR/include' will be added to"
12279      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12280      exit 1
12281      ;;
12282    esac
12283
12284
12285 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
12286   echo "error: must be yes or no: --with-gtk=$with_gtk"
12287   exit 1
12288 fi
12289
12290 have_gnome=no
12291 with_gnome_req=unspecified
12292
12293 # Check whether --with-gnome or --without-gnome was given.
12294 if test "${with_gnome+set}" = set; then
12295   withval="$with_gnome"
12296   with_gnome="$withval"; with_gnome_req="$withval"
12297 else
12298   with_gnome=yes
12299 fi;
12300
12301 # if --with-gnome=/directory/ was specified, remember that directory so that
12302 # we can also look for the `gnome-config' program in that directory.
12303 case "$with_gnome" in
12304   /*)
12305     gnome_dir="$with_gnome"
12306     ;;
12307   *)
12308     gnome_dir=""
12309     ;;
12310 esac
12311
12312
12313    case "$with_gnome" in
12314     yes) ;;
12315     no)  ;;
12316
12317     /*)
12318      echo "$as_me:$LINENO: checking for Gnome headers" >&5
12319 echo $ECHO_N "checking for Gnome headers... $ECHO_C" >&6
12320      d=$with_gnome/include
12321      if test -d $d; then
12322        X_CFLAGS="-I$d $X_CFLAGS"
12323        echo "$as_me:$LINENO: result: $d" >&5
12324 echo "${ECHO_T}$d" >&6
12325      else
12326        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12327 echo "${ECHO_T}not found ($d: no such directory)" >&6
12328      fi
12329
12330      echo "$as_me:$LINENO: checking for Gnome libs" >&5
12331 echo $ECHO_N "checking for Gnome libs... $ECHO_C" >&6
12332      d=$with_gnome/lib
12333      if test -d $d; then
12334        X_LIBS="-L$d $X_LIBS"
12335        echo "$as_me:$LINENO: result: $d" >&5
12336 echo "${ECHO_T}$d" >&6
12337      else
12338        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12339 echo "${ECHO_T}not found ($d: no such directory)" >&6
12340      fi
12341
12342      # replace the directory string with "yes".
12343      with_gnome_req="yes"
12344      with_gnome=$with_gnome_req
12345      ;;
12346
12347     *)
12348      echo ""
12349      echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
12350      echo "       If it is a directory, then \`DIR/include' will be added to"
12351      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12352      exit 1
12353      ;;
12354    esac
12355
12356
12357 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
12358   echo "error: must be yes or no: --with-gnome=$with_gnome"
12359   exit 1
12360 fi
12361
12362 parse_gtk_version_string() {
12363   # M4 sucks!!
12364
12365   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
12366   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
12367
12368   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
12369   if test -z "$ac_gtk_version"; then
12370     ac_gtk_version=unknown
12371     ac_gtk_version_string=unknown
12372   fi
12373 }
12374
12375
12376 jurassic_gtk=no
12377 gtk2_halfassed=no
12378
12379 if test "$with_gtk" = yes; then
12380   have_gtk=no
12381
12382   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
12383   # look in /foo/bin/ for glib-config, gtk-config, and gnome-config.
12384   #
12385   gtk_path="$PATH"
12386
12387   if test ! -z "$gtk_dir"; then
12388     # canonicalize slashes.
12389     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
12390     gtk_path="$foo:$gtk_path"
12391   fi
12392
12393   if test ! -z "$gnome_dir"; then
12394     # canonicalize slashes.
12395     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
12396     gtk_path="$foo:$gtk_path"
12397   fi
12398
12399   for ac_prog in pkg-config
12400 do
12401   # Extract the first word of "$ac_prog", so it can be a program name with args.
12402 set dummy $ac_prog; ac_word=$2
12403 echo "$as_me:$LINENO: checking for $ac_word" >&5
12404 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12405 if test "${ac_cv_path_pkg_config+set}" = set; then
12406   echo $ECHO_N "(cached) $ECHO_C" >&6
12407 else
12408   case $pkg_config in
12409   [\\/]* | ?:[\\/]*)
12410   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
12411   ;;
12412   *)
12413   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12414 for as_dir in $gtk_path
12415 do
12416   IFS=$as_save_IFS
12417   test -z "$as_dir" && as_dir=.
12418   for ac_exec_ext in '' $ac_executable_extensions; do
12419   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12420     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
12421     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12422     break 2
12423   fi
12424 done
12425 done
12426
12427   ;;
12428 esac
12429 fi
12430 pkg_config=$ac_cv_path_pkg_config
12431
12432 if test -n "$pkg_config"; then
12433   echo "$as_me:$LINENO: result: $pkg_config" >&5
12434 echo "${ECHO_T}$pkg_config" >&6
12435 else
12436   echo "$as_me:$LINENO: result: no" >&5
12437 echo "${ECHO_T}no" >&6
12438 fi
12439
12440   test -n "$pkg_config" && break
12441 done
12442
12443
12444   if test -n "$pkg_config" ; then
12445     #
12446     # the new way...
12447     # run pkg-config based tests.
12448     #
12449
12450     pkgs=''
12451     pkg_check_version() {
12452       if test "$ok" = yes ; then
12453         req="$1"
12454         min="$2"
12455         echo "$as_me:$LINENO: checking for $req" >&5
12456 echo $ECHO_N "checking for $req... $ECHO_C" >&6
12457         if $pkg_config --exists "$req" ; then
12458           vers=`$pkg_config --modversion "$req"`
12459           if $pkg_config --exists "$req >= $min" ; then
12460             echo "$as_me:$LINENO: result: $vers" >&5
12461 echo "${ECHO_T}$vers" >&6
12462             pkgs="$pkgs $req"
12463             return 1
12464           else
12465             echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
12466 echo "${ECHO_T}$vers (wanted >= $min)" >&6
12467             ok=no
12468             return 0
12469           fi
12470         else
12471           echo "$as_me:$LINENO: result: no" >&5
12472 echo "${ECHO_T}no" >&6
12473           ok=no
12474           return 0
12475         fi
12476       fi
12477     }
12478
12479     ok="yes"
12480     pkg_check_version     gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
12481     pkg_check_version  gmodule-2.0  2.0.0
12482     pkg_check_version   libxml-2.0  2.4.6
12483     pkg_check_version libglade-2.0  1.99.0
12484     have_gtk="$ok"
12485
12486     if test "$have_gtk" = yes; then
12487       have_gtk2=yes
12488       cat >>confdefs.h <<\_ACEOF
12489 #define HAVE_GTK2 1
12490 _ACEOF
12491
12492     else
12493       if test -n "$ac_gtk_version_string" ; then
12494         gtk2_halfassed="$ac_gtk_version_string"
12495         gtk2_halfassed_lib="$req"
12496       fi
12497     fi
12498
12499     if test "$have_gtk" = no; then
12500       #
12501       # we don't have GTK 2.  Let's look for GTK 1.
12502       #
12503       pkgs=''
12504       ok="yes"
12505       pkg_check_version gtk+ 1.2           ; ac_gtk_version_string="$vers"
12506       pkg_check_version glib 1.0
12507       have_gtk="$ok"
12508
12509       # Now check for Gnome...
12510       #
12511       if test "$have_gtk" = yes -a "$with_gnome" = yes; then
12512         old_pkgs="$pkgs"
12513         ok=yes
12514         pkg_check_version capplet    1.0
12515         pkg_check_version gnomeui    1.0
12516         pkg_check_version gdk_pixbuf 0.1
12517         have_gnome="$ok"
12518
12519         if test "$have_gnome" = no; then
12520           pkgs="$old_pkgs"
12521         else
12522           cat >>confdefs.h <<\_ACEOF
12523 #define HAVE_CRAPPLET 1
12524 _ACEOF
12525
12526         fi
12527       fi
12528     fi
12529
12530     if test "$have_gtk" = yes; then
12531       parse_gtk_version_string
12532       jurassic_gtk=no
12533     else
12534       have_gnome=no
12535     fi
12536
12537     if test "$have_gtk" = yes; then
12538       echo "$as_me:$LINENO: checking for Gtk includes" >&5
12539 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
12540 if test "${ac_cv_gtk_config_cflags+set}" = set; then
12541   echo $ECHO_N "(cached) $ECHO_C" >&6
12542 else
12543   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
12544 fi
12545 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
12546 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
12547       echo "$as_me:$LINENO: checking for Gtk libs" >&5
12548 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12549 if test "${ac_cv_gtk_config_libs+set}" = set; then
12550   echo $ECHO_N "(cached) $ECHO_C" >&6
12551 else
12552   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
12553 fi
12554 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
12555 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
12556     fi
12557     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12558     ac_gtk_config_libs=$ac_cv_gtk_config_libs
12559
12560     ac_gnome_config_cflags=$ac_gtk_config_cflags
12561     ac_gnome_config_libs=$ac_gtk_config_libs
12562
12563   else
12564     #
12565     # the old way...
12566     # run {gnome,gtk}-config based tests.
12567     #
12568
12569     for ac_prog in glib12-config glib-config
12570 do
12571   # Extract the first word of "$ac_prog", so it can be a program name with args.
12572 set dummy $ac_prog; ac_word=$2
12573 echo "$as_me:$LINENO: checking for $ac_word" >&5
12574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12575 if test "${ac_cv_path_glib_config+set}" = set; then
12576   echo $ECHO_N "(cached) $ECHO_C" >&6
12577 else
12578   case $glib_config in
12579   [\\/]* | ?:[\\/]*)
12580   ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
12581   ;;
12582   *)
12583   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12584 for as_dir in $gtk_path
12585 do
12586   IFS=$as_save_IFS
12587   test -z "$as_dir" && as_dir=.
12588   for ac_exec_ext in '' $ac_executable_extensions; do
12589   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12590     ac_cv_path_glib_config="$as_dir/$ac_word$ac_exec_ext"
12591     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12592     break 2
12593   fi
12594 done
12595 done
12596
12597   ;;
12598 esac
12599 fi
12600 glib_config=$ac_cv_path_glib_config
12601
12602 if test -n "$glib_config"; then
12603   echo "$as_me:$LINENO: result: $glib_config" >&5
12604 echo "${ECHO_T}$glib_config" >&6
12605 else
12606   echo "$as_me:$LINENO: result: no" >&5
12607 echo "${ECHO_T}no" >&6
12608 fi
12609
12610   test -n "$glib_config" && break
12611 done
12612
12613     for ac_prog in gtk12-config  gtk-config
12614 do
12615   # Extract the first word of "$ac_prog", so it can be a program name with args.
12616 set dummy $ac_prog; ac_word=$2
12617 echo "$as_me:$LINENO: checking for $ac_word" >&5
12618 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12619 if test "${ac_cv_path_gtk_config+set}" = set; then
12620   echo $ECHO_N "(cached) $ECHO_C" >&6
12621 else
12622   case $gtk_config in
12623   [\\/]* | ?:[\\/]*)
12624   ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
12625   ;;
12626   *)
12627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12628 for as_dir in $gtk_path
12629 do
12630   IFS=$as_save_IFS
12631   test -z "$as_dir" && as_dir=.
12632   for ac_exec_ext in '' $ac_executable_extensions; do
12633   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12634     ac_cv_path_gtk_config="$as_dir/$ac_word$ac_exec_ext"
12635     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12636     break 2
12637   fi
12638 done
12639 done
12640
12641   ;;
12642 esac
12643 fi
12644 gtk_config=$ac_cv_path_gtk_config
12645
12646 if test -n "$gtk_config"; then
12647   echo "$as_me:$LINENO: result: $gtk_config" >&5
12648 echo "${ECHO_T}$gtk_config" >&6
12649 else
12650   echo "$as_me:$LINENO: result: no" >&5
12651 echo "${ECHO_T}no" >&6
12652 fi
12653
12654   test -n "$gtk_config" && break
12655 done
12656
12657
12658     if test "$with_gnome" = yes; then
12659       for ac_prog in gnome-config
12660 do
12661   # Extract the first word of "$ac_prog", so it can be a program name with args.
12662 set dummy $ac_prog; ac_word=$2
12663 echo "$as_me:$LINENO: checking for $ac_word" >&5
12664 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12665 if test "${ac_cv_path_gnome_config+set}" = set; then
12666   echo $ECHO_N "(cached) $ECHO_C" >&6
12667 else
12668   case $gnome_config in
12669   [\\/]* | ?:[\\/]*)
12670   ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
12671   ;;
12672   *)
12673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12674 for as_dir in $gtk_path
12675 do
12676   IFS=$as_save_IFS
12677   test -z "$as_dir" && as_dir=.
12678   for ac_exec_ext in '' $ac_executable_extensions; do
12679   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12680     ac_cv_path_gnome_config="$as_dir/$ac_word$ac_exec_ext"
12681     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12682     break 2
12683   fi
12684 done
12685 done
12686
12687   ;;
12688 esac
12689 fi
12690 gnome_config=$ac_cv_path_gnome_config
12691
12692 if test -n "$gnome_config"; then
12693   echo "$as_me:$LINENO: result: $gnome_config" >&5
12694 echo "${ECHO_T}$gnome_config" >&6
12695 else
12696   echo "$as_me:$LINENO: result: no" >&5
12697 echo "${ECHO_T}no" >&6
12698 fi
12699
12700   test -n "$gnome_config" && break
12701 done
12702
12703     fi
12704
12705     if test -n "$glib_config" -a  -n "$gtk_config" ; then
12706       have_gtk=yes
12707       if test "$with_gnome" = yes -a -n "$gnome_config" ; then
12708         have_gnome=yes
12709       fi
12710     fi
12711
12712     if test "$have_gtk" = yes; then
12713       echo "$as_me:$LINENO: checking Gtk version number" >&5
12714 echo $ECHO_N "checking Gtk version number... $ECHO_C" >&6
12715 if test "${ac_cv_gtk_version_string+set}" = set; then
12716   echo $ECHO_N "(cached) $ECHO_C" >&6
12717 else
12718   ac_cv_gtk_version_string=`$gtk_config --version`
12719 fi
12720 echo "$as_me:$LINENO: result: $ac_cv_gtk_version_string" >&5
12721 echo "${ECHO_T}$ac_cv_gtk_version_string" >&6
12722       ac_gtk_version_string=$ac_cv_gtk_version_string
12723     fi
12724
12725     parse_gtk_version_string
12726
12727     if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
12728     then
12729       have_gtk=no
12730       have_gnome=no
12731       jurassic_gtk=yes
12732     fi
12733
12734     if test "$have_gtk" = yes; then
12735       echo "$as_me:$LINENO: checking for Gtk includes" >&5
12736 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
12737 if test "${ac_cv_gtk_config_cflags+set}" = set; then
12738   echo $ECHO_N "(cached) $ECHO_C" >&6
12739 else
12740   ac_cv_gtk_config_cflags=`$gtk_config --cflags`
12741 fi
12742 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
12743 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
12744       echo "$as_me:$LINENO: checking for Gtk libs" >&5
12745 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
12746 if test "${ac_cv_gtk_config_libs+set}" = set; then
12747   echo $ECHO_N "(cached) $ECHO_C" >&6
12748 else
12749   ac_cv_gtk_config_libs=`$gtk_config --libs`
12750 fi
12751 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
12752 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
12753     fi
12754     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
12755     ac_gtk_config_libs=$ac_cv_gtk_config_libs
12756
12757     # Check for Gnome Capplet support.
12758     # Note that this is only needed with Gnome 1.x, not Gnome 2.x.
12759     # In a Gnome 2.x world, libcapplet will not exist.
12760     # (In fact, this likely won't even be checked, since in a Gnome 2.x
12761     # world, we will probably be up in the "$pkg_config" branch instead
12762     # of here in the "$gnome_config" branch.)
12763     #
12764     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
12765       gnome_config_libs="gtk capplet gnomeui gdk_pixbuf"
12766       echo "$as_me:$LINENO: checking for Gnome capplet includes" >&5
12767 echo $ECHO_N "checking for Gnome capplet includes... $ECHO_C" >&6
12768       if test "${ac_cv_gnome_config_cflags+set}" = set; then
12769   echo $ECHO_N "(cached) $ECHO_C" >&6
12770 else
12771   if ( $gnome_config --cflags $gnome_config_libs >/dev/null 2>&1 | \
12772               grep Unknown >/dev/null ) ; then
12773            ac_cv_gnome_config_cflags=''
12774          else
12775           ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
12776          fi
12777 fi
12778
12779       ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
12780       if test "$ac_gnome_config_cflags" = "" ; then
12781         have_gnome=no
12782         echo "$as_me:$LINENO: result: no" >&5
12783 echo "${ECHO_T}no" >&6
12784       else
12785         echo "$as_me:$LINENO: result: $ac_gnome_config_cflags" >&5
12786 echo "${ECHO_T}$ac_gnome_config_cflags" >&6
12787       fi
12788     fi
12789
12790     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
12791       echo "$as_me:$LINENO: checking for Gnome capplet libs" >&5
12792 echo $ECHO_N "checking for Gnome capplet libs... $ECHO_C" >&6
12793       if test "${ac_cv_gnome_config_libs+set}" = set; then
12794   echo $ECHO_N "(cached) $ECHO_C" >&6
12795 else
12796   if ( $gnome_config --libs $gnome_config_libs >/dev/null 2>&1 |
12797               grep Unknown >/dev/null ) ; then
12798            ac_cv_gnome_config_libs=''
12799          else
12800            ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
12801          fi
12802 fi
12803
12804       ac_gnome_config_libs=$ac_cv_gnome_config_libs
12805       if test "$ac_gnome_config_libs" = "" ; then
12806         have_gnome=no
12807         echo "$as_me:$LINENO: result: no" >&5
12808 echo "${ECHO_T}no" >&6
12809       else
12810         echo "$as_me:$LINENO: result: $ac_gnome_config_libs" >&5
12811 echo "${ECHO_T}$ac_gnome_config_libs" >&6
12812       fi
12813     fi
12814
12815     # If we have Gnome, then override the gtk-config values with
12816     # the gnome-config values.
12817     #
12818     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
12819       ac_gtk_config_cflags=$ac_gnome_config_cflags
12820       ac_gtk_config_libs=$ac_gnome_config_libs
12821       cat >>confdefs.h <<\_ACEOF
12822 #define HAVE_CRAPPLET 1
12823 _ACEOF
12824
12825     fi
12826
12827   fi   # end of {gnome,gtk}-config based tests
12828
12829   if test "$have_gtk" = yes -a "$have_gtk2" = no; then
12830     # check for this function that was not in libcapplet 1.2.
12831     # (only needed in Gnome/Gtk 1.x, not Gnome/Gtk 2.x)
12832
12833   ac_save_CPPFLAGS="$CPPFLAGS"
12834   ac_save_LDFLAGS="$LDFLAGS"
12835 #  ac_save_LIBS="$LIBS"
12836
12837   if test \! -z "$includedir" ; then
12838     CPPFLAGS="$CPPFLAGS -I$includedir"
12839   fi
12840   # note: $X_CFLAGS includes $x_includes
12841   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12842
12843   if test \! -z "$libdir" ; then
12844     LDFLAGS="$LDFLAGS -L$libdir"
12845   fi
12846   # note: $X_LIBS includes $x_libraries
12847   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12848
12849   echo "$as_me:$LINENO: checking for capplet_widget_changes_are_immediate in -lcapplet" >&5
12850 echo $ECHO_N "checking for capplet_widget_changes_are_immediate in -lcapplet... $ECHO_C" >&6
12851 if test "${ac_cv_lib_capplet_capplet_widget_changes_are_immediate+set}" = set; then
12852   echo $ECHO_N "(cached) $ECHO_C" >&6
12853 else
12854   ac_check_lib_save_LIBS=$LIBS
12855 LIBS="-lcapplet $ac_gnome_config_libs $LIBS"
12856 cat >conftest.$ac_ext <<_ACEOF
12857 #line $LINENO "configure"
12858 #include "confdefs.h"
12859
12860 /* Override any gcc2 internal prototype to avoid an error.  */
12861 #ifdef __cplusplus
12862 extern "C"
12863 #endif
12864 /* We use char because int might match the return type of a gcc2
12865    builtin and then its argument prototype would still apply.  */
12866 char capplet_widget_changes_are_immediate ();
12867 #ifdef F77_DUMMY_MAIN
12868 #  ifdef __cplusplus
12869      extern "C"
12870 #  endif
12871    int F77_DUMMY_MAIN() { return 1; }
12872 #endif
12873 int
12874 main ()
12875 {
12876 capplet_widget_changes_are_immediate ();
12877   ;
12878   return 0;
12879 }
12880 _ACEOF
12881 rm -f conftest.$ac_objext conftest$ac_exeext
12882 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12883   (eval $ac_link) 2>&5
12884   ac_status=$?
12885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12886   (exit $ac_status); } &&
12887          { ac_try='test -s conftest$ac_exeext'
12888   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12889   (eval $ac_try) 2>&5
12890   ac_status=$?
12891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12892   (exit $ac_status); }; }; then
12893   ac_cv_lib_capplet_capplet_widget_changes_are_immediate=yes
12894 else
12895   echo "$as_me: failed program was:" >&5
12896 cat conftest.$ac_ext >&5
12897 ac_cv_lib_capplet_capplet_widget_changes_are_immediate=no
12898 fi
12899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12900 LIBS=$ac_check_lib_save_LIBS
12901 fi
12902 echo "$as_me:$LINENO: result: $ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&5
12903 echo "${ECHO_T}$ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&6
12904 if test $ac_cv_lib_capplet_capplet_widget_changes_are_immediate = yes; then
12905   cat >>confdefs.h <<\_ACEOF
12906 #define HAVE_CRAPPLET_IMMEDIATE 1
12907 _ACEOF
12908
12909 else
12910   true
12911 fi
12912
12913   CPPFLAGS="$ac_save_CPPFLAGS"
12914   LDFLAGS="$ac_save_LDFLAGS"
12915 #  LIBS="$ac_save_LIBS"
12916
12917   fi
12918
12919
12920   GNOME_DATADIR=""
12921   if test "$have_gtk" = yes; then
12922     if test -n "$pkg_config"; then
12923       if test "$have_gtk2" = yes; then
12924         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
12925       else
12926         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+`
12927       fi
12928     else
12929       GNOME_DATADIR=`$gtk_config --prefix`
12930     fi
12931     GNOME_DATADIR="$GNOME_DATADIR/share"
12932   fi
12933
12934   # .desktop files go in different places in Gnome 1.x and Gnome 2.x...
12935   if test "$have_gtk2" = yes; then
12936     GNOME_PANELDIR='$(GNOME_PANELDIR2)'
12937   else
12938     GNOME_PANELDIR='$(GNOME_PANELDIR1)'
12939   fi
12940
12941
12942   if test "$have_gtk" = yes; then
12943     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
12944     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
12945     cat >>confdefs.h <<\_ACEOF
12946 #define HAVE_GTK 1
12947 _ACEOF
12948
12949
12950     if test "$have_gtk2" = yes; then
12951       GTK_EXTRA_OBJS=""
12952     else
12953       GTK_EXTRA_OBJS="\$(GTK_EXTRA_OBJS)"
12954     fi
12955   fi
12956
12957 fi
12958
12959
12960 # Check for the Gnome Help Browser.
12961 #
12962 if test "$have_gtk" = yes; then
12963   for ac_prog in yelp gnome-help-browser
12964 do
12965   # Extract the first word of "$ac_prog", so it can be a program name with args.
12966 set dummy $ac_prog; ac_word=$2
12967 echo "$as_me:$LINENO: checking for $ac_word" >&5
12968 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12969 if test "${ac_cv_prog_have_gnome_help+set}" = set; then
12970   echo $ECHO_N "(cached) $ECHO_C" >&6
12971 else
12972   if test -n "$have_gnome_help"; then
12973   ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
12974 else
12975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12976 for as_dir in $PATH
12977 do
12978   IFS=$as_save_IFS
12979   test -z "$as_dir" && as_dir=.
12980   for ac_exec_ext in '' $ac_executable_extensions; do
12981   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12982     ac_cv_prog_have_gnome_help="$ac_prog"
12983     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12984     break 2
12985   fi
12986 done
12987 done
12988
12989 fi
12990 fi
12991 have_gnome_help=$ac_cv_prog_have_gnome_help
12992 if test -n "$have_gnome_help"; then
12993   echo "$as_me:$LINENO: result: $have_gnome_help" >&5
12994 echo "${ECHO_T}$have_gnome_help" >&6
12995 else
12996   echo "$as_me:$LINENO: result: no" >&5
12997 echo "${ECHO_T}no" >&6
12998 fi
12999
13000   test -n "$have_gnome_help" && break
13001 done
13002 test -n "$have_gnome_help" || have_gnome_help="no"
13003
13004   if test "$have_gnome_help" != no; then
13005     have_gnome_help=yes
13006   fi
13007 fi
13008
13009
13010 ###############################################################################
13011 #
13012 #       Check for -lxml
13013 #
13014 ###############################################################################
13015
13016 have_xml=no
13017 with_xml_req=unspecified
13018 xml_halfassed=no
13019
13020 # Check whether --with-xml or --without-xml was given.
13021 if test "${with_xml+set}" = set; then
13022   withval="$with_xml"
13023   with_xml="$withval"; with_xml_req="$withval"
13024 else
13025   with_xml=yes
13026 fi;
13027
13028 # if --with-xml=/directory/ was specified, remember that directory so that
13029 # we can also look for the `xml-config' program in that directory.
13030 case "$with_xml" in
13031   /*)
13032     xml_dir="$with_xml"
13033     ;;
13034   *)
13035     xml_dir=""
13036     ;;
13037 esac
13038
13039
13040    case "$with_xml" in
13041     yes) ;;
13042     no)  ;;
13043
13044     /*)
13045      echo "$as_me:$LINENO: checking for XML headers" >&5
13046 echo $ECHO_N "checking for XML headers... $ECHO_C" >&6
13047      d=$with_xml/include
13048      if test -d $d; then
13049        X_CFLAGS="-I$d $X_CFLAGS"
13050        echo "$as_me:$LINENO: result: $d" >&5
13051 echo "${ECHO_T}$d" >&6
13052      else
13053        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13054 echo "${ECHO_T}not found ($d: no such directory)" >&6
13055      fi
13056
13057      echo "$as_me:$LINENO: checking for XML libs" >&5
13058 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13059      d=$with_xml/lib
13060      if test -d $d; then
13061        X_LIBS="-L$d $X_LIBS"
13062        echo "$as_me:$LINENO: result: $d" >&5
13063 echo "${ECHO_T}$d" >&6
13064      else
13065        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13066 echo "${ECHO_T}not found ($d: no such directory)" >&6
13067      fi
13068
13069      # replace the directory string with "yes".
13070      with_xml_req="yes"
13071      with_xml=$with_xml_req
13072      ;;
13073
13074     *)
13075      echo ""
13076      echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory."
13077      echo "       If it is a directory, then \`DIR/include' will be added to"
13078      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13079      exit 1
13080      ;;
13081    esac
13082
13083
13084 if test "$with_xml" != yes -a "$with_xml" != no ; then
13085   echo "error: must be yes or no: --with-xml=$with_xml"
13086   exit 1
13087 fi
13088
13089 if test "$with_xml" = yes; then
13090   have_xml=no
13091   have_old_xml=no
13092
13093   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
13094   # look in /foo/bin/ for for xml-config.
13095   #
13096   xml_path="$PATH"
13097
13098   if test ! -z "$gtk_dir"; then
13099     # canonicalize slashes.
13100     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
13101     xml_path="$foo:$xml_path"
13102   fi
13103
13104   if test ! -z "$gnome_dir"; then
13105     # canonicalize slashes.
13106     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
13107     xml_path="$foo:$xml_path"
13108   fi
13109
13110   if test -n "$pkg_config" ; then
13111     #
13112     # the new way...
13113     # run pkg-config based tests.
13114     #
13115     pkgs=""
13116     ok="yes"
13117
13118     # If we have Gtk 2.x, then *only* XML 2.x will work.
13119     # If we have Gtk 1.x, or don't have Gtk at all, then
13120     # either XML 1.x or 2.x will work.
13121
13122     # First check for XML 2.x.
13123     #
13124     pkg_check_version libxml-2.0 2.4.6
13125
13126     # If that didn't work (we don't have XML 2.x) and we *don't* have
13127     # Gtk 2.x, then check to see if we have XML 1.x
13128     #
13129     if test "$ok" = no -a "$have_gtk2" = no; then
13130       ok=yes
13131       pkg_check_version libxml 1.0
13132     fi
13133
13134     have_xml="$ok"
13135
13136     if test "$have_xml" = yes; then
13137       echo "$as_me:$LINENO: checking for XML includes" >&5
13138 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
13139 if test "${ac_cv_xml_config_cflags+set}" = set; then
13140   echo $ECHO_N "(cached) $ECHO_C" >&6
13141 else
13142   ac_cv_xml_config_cflags=`$pkg_config --cflags $pkgs`
13143 fi
13144 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
13145 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
13146       echo "$as_me:$LINENO: checking for XML libs" >&5
13147 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13148 if test "${ac_cv_xml_config_libs+set}" = set; then
13149   echo $ECHO_N "(cached) $ECHO_C" >&6
13150 else
13151   ac_cv_xml_config_libs=`$pkg_config --libs $pkgs`
13152 fi
13153 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
13154 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
13155       ac_xml_config_cflags=$ac_cv_xml_config_cflags
13156       ac_xml_config_libs=$ac_cv_xml_config_libs
13157     fi
13158
13159   else
13160     #
13161     # the old way...
13162     # run {xml2,xml}-config based tests.
13163     #
13164
13165     for ac_prog in xml2-config xml-config
13166 do
13167   # Extract the first word of "$ac_prog", so it can be a program name with args.
13168 set dummy $ac_prog; ac_word=$2
13169 echo "$as_me:$LINENO: checking for $ac_word" >&5
13170 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13171 if test "${ac_cv_path_xml_config+set}" = set; then
13172   echo $ECHO_N "(cached) $ECHO_C" >&6
13173 else
13174   case $xml_config in
13175   [\\/]* | ?:[\\/]*)
13176   ac_cv_path_xml_config="$xml_config" # Let the user override the test with a path.
13177   ;;
13178   *)
13179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13180 for as_dir in $xml_path
13181 do
13182   IFS=$as_save_IFS
13183   test -z "$as_dir" && as_dir=.
13184   for ac_exec_ext in '' $ac_executable_extensions; do
13185   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13186     ac_cv_path_xml_config="$as_dir/$ac_word$ac_exec_ext"
13187     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13188     break 2
13189   fi
13190 done
13191 done
13192
13193   ;;
13194 esac
13195 fi
13196 xml_config=$ac_cv_path_xml_config
13197
13198 if test -n "$xml_config"; then
13199   echo "$as_me:$LINENO: result: $xml_config" >&5
13200 echo "${ECHO_T}$xml_config" >&6
13201 else
13202   echo "$as_me:$LINENO: result: no" >&5
13203 echo "${ECHO_T}no" >&6
13204 fi
13205
13206   test -n "$xml_config" && break
13207 done
13208
13209
13210     # If we found the xml-config program, run it to get flags.
13211     #
13212     if test -n "$xml_config" ; then
13213       echo "$as_me:$LINENO: checking for XML includes" >&5
13214 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
13215 if test "${ac_cv_xml_config_cflags+set}" = set; then
13216   echo $ECHO_N "(cached) $ECHO_C" >&6
13217 else
13218   ac_cv_xml_config_cflags=`$xml_config --cflags`
13219 fi
13220 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
13221 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
13222       echo "$as_me:$LINENO: checking for XML libs" >&5
13223 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13224 if test "${ac_cv_xml_config_libs+set}" = set; then
13225   echo $ECHO_N "(cached) $ECHO_C" >&6
13226 else
13227   ac_cv_xml_config_libs=`$xml_config --libs`
13228 fi
13229 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
13230 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
13231       ac_xml_config_cflags=$ac_cv_xml_config_cflags
13232       ac_xml_config_libs=$ac_cv_xml_config_libs
13233     fi
13234
13235     ac_save_xml_CPPFLAGS="$CPPFLAGS"
13236     CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags"
13237
13238     # first try <libxml/parser.h> which is the new way...
13239     #
13240
13241   ac_save_CPPFLAGS="$CPPFLAGS"
13242   if test \! -z "$includedir" ; then
13243     CPPFLAGS="$CPPFLAGS -I$includedir"
13244   fi
13245   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13246   echo "$as_me:$LINENO: checking for libxml/xmlIO.h" >&5
13247 echo $ECHO_N "checking for libxml/xmlIO.h... $ECHO_C" >&6
13248 if test "${ac_cv_header_libxml_xmlIO_h+set}" = set; then
13249   echo $ECHO_N "(cached) $ECHO_C" >&6
13250 else
13251   cat >conftest.$ac_ext <<_ACEOF
13252 #line $LINENO "configure"
13253 #include "confdefs.h"
13254 #include <libxml/parser.h>
13255
13256 #include <libxml/xmlIO.h>
13257 _ACEOF
13258 rm -f conftest.$ac_objext
13259 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13260   (eval $ac_compile) 2>&5
13261   ac_status=$?
13262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13263   (exit $ac_status); } &&
13264          { ac_try='test -s conftest.$ac_objext'
13265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13266   (eval $ac_try) 2>&5
13267   ac_status=$?
13268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13269   (exit $ac_status); }; }; then
13270   ac_cv_header_libxml_xmlIO_h=yes
13271 else
13272   echo "$as_me: failed program was:" >&5
13273 cat conftest.$ac_ext >&5
13274 ac_cv_header_libxml_xmlIO_h=no
13275 fi
13276 rm -f conftest.$ac_objext conftest.$ac_ext
13277 fi
13278 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlIO_h" >&5
13279 echo "${ECHO_T}$ac_cv_header_libxml_xmlIO_h" >&6
13280 if test $ac_cv_header_libxml_xmlIO_h = yes; then
13281   have_xml=yes
13282 fi
13283
13284
13285   CPPFLAGS="$ac_save_CPPFLAGS"
13286
13287     # if that didn't work, then try just <parser.h> which is the old way...
13288     #
13289     if test "$have_xml" = no; then
13290
13291   ac_save_CPPFLAGS="$CPPFLAGS"
13292   if test \! -z "$includedir" ; then
13293     CPPFLAGS="$CPPFLAGS -I$includedir"
13294   fi
13295   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13296   echo "$as_me:$LINENO: checking for xmlIO.h" >&5
13297 echo $ECHO_N "checking for xmlIO.h... $ECHO_C" >&6
13298 if test "${ac_cv_header_xmlIO_h+set}" = set; then
13299   echo $ECHO_N "(cached) $ECHO_C" >&6
13300 else
13301   cat >conftest.$ac_ext <<_ACEOF
13302 #line $LINENO "configure"
13303 #include "confdefs.h"
13304 #include <parser.h>
13305
13306 #include <xmlIO.h>
13307 _ACEOF
13308 rm -f conftest.$ac_objext
13309 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13310   (eval $ac_compile) 2>&5
13311   ac_status=$?
13312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13313   (exit $ac_status); } &&
13314          { ac_try='test -s conftest.$ac_objext'
13315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13316   (eval $ac_try) 2>&5
13317   ac_status=$?
13318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13319   (exit $ac_status); }; }; then
13320   ac_cv_header_xmlIO_h=yes
13321 else
13322   echo "$as_me: failed program was:" >&5
13323 cat conftest.$ac_ext >&5
13324 ac_cv_header_xmlIO_h=no
13325 fi
13326 rm -f conftest.$ac_objext conftest.$ac_ext
13327 fi
13328 echo "$as_me:$LINENO: result: $ac_cv_header_xmlIO_h" >&5
13329 echo "${ECHO_T}$ac_cv_header_xmlIO_h" >&6
13330 if test $ac_cv_header_xmlIO_h = yes; then
13331   have_xml=yes; have_old_xml=yes
13332 fi
13333
13334
13335   CPPFLAGS="$ac_save_CPPFLAGS"
13336     fi
13337
13338     CPPFLAGS="$ac_save_xml_CPPFLAGS"
13339   fi
13340
13341
13342   have_zlib=no
13343   if test "$have_xml" = yes; then
13344     # we have the XML headers; now make sure zlib is around.
13345     # yes, it's stupid we have to do this too, but there is
13346     # dependency screwage in Gnome.
13347
13348   ac_save_CPPFLAGS="$CPPFLAGS"
13349   ac_save_LDFLAGS="$LDFLAGS"
13350 #  ac_save_LIBS="$LIBS"
13351
13352   if test \! -z "$includedir" ; then
13353     CPPFLAGS="$CPPFLAGS -I$includedir"
13354   fi
13355   # note: $X_CFLAGS includes $x_includes
13356   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13357
13358   if test \! -z "$libdir" ; then
13359     LDFLAGS="$LDFLAGS -L$libdir"
13360   fi
13361   # note: $X_LIBS includes $x_libraries
13362   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13363
13364   echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5
13365 echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
13366 if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
13367   echo $ECHO_N "(cached) $ECHO_C" >&6
13368 else
13369   ac_check_lib_save_LIBS=$LIBS
13370 LIBS="-lz  $LIBS"
13371 cat >conftest.$ac_ext <<_ACEOF
13372 #line $LINENO "configure"
13373 #include "confdefs.h"
13374
13375 /* Override any gcc2 internal prototype to avoid an error.  */
13376 #ifdef __cplusplus
13377 extern "C"
13378 #endif
13379 /* We use char because int might match the return type of a gcc2
13380    builtin and then its argument prototype would still apply.  */
13381 char zlibVersion ();
13382 #ifdef F77_DUMMY_MAIN
13383 #  ifdef __cplusplus
13384      extern "C"
13385 #  endif
13386    int F77_DUMMY_MAIN() { return 1; }
13387 #endif
13388 int
13389 main ()
13390 {
13391 zlibVersion ();
13392   ;
13393   return 0;
13394 }
13395 _ACEOF
13396 rm -f conftest.$ac_objext conftest$ac_exeext
13397 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13398   (eval $ac_link) 2>&5
13399   ac_status=$?
13400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13401   (exit $ac_status); } &&
13402          { ac_try='test -s conftest$ac_exeext'
13403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13404   (eval $ac_try) 2>&5
13405   ac_status=$?
13406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13407   (exit $ac_status); }; }; then
13408   ac_cv_lib_z_zlibVersion=yes
13409 else
13410   echo "$as_me: failed program was:" >&5
13411 cat conftest.$ac_ext >&5
13412 ac_cv_lib_z_zlibVersion=no
13413 fi
13414 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13415 LIBS=$ac_check_lib_save_LIBS
13416 fi
13417 echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5
13418 echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
13419 if test $ac_cv_lib_z_zlibVersion = yes; then
13420   have_zlib=yes
13421 fi
13422
13423   CPPFLAGS="$ac_save_CPPFLAGS"
13424   LDFLAGS="$ac_save_LDFLAGS"
13425 #  LIBS="$ac_save_LIBS"
13426
13427     if test "$have_zlib" = no; then
13428       xml_halfassed=yes
13429       have_xml=no
13430     fi
13431   fi
13432
13433   if test "$have_xml" = yes; then
13434     # we have the header, now check for the library
13435     have_xml=no
13436     xml_halfassed=yes
13437
13438   ac_save_CPPFLAGS="$CPPFLAGS"
13439   ac_save_LDFLAGS="$LDFLAGS"
13440 #  ac_save_LIBS="$LIBS"
13441
13442   if test \! -z "$includedir" ; then
13443     CPPFLAGS="$CPPFLAGS -I$includedir"
13444   fi
13445   # note: $X_CFLAGS includes $x_includes
13446   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13447
13448   if test \! -z "$libdir" ; then
13449     LDFLAGS="$LDFLAGS -L$libdir"
13450   fi
13451   # note: $X_LIBS includes $x_libraries
13452   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13453
13454   echo "$as_me:$LINENO: checking for xmlParseChunk in -lc" >&5
13455 echo $ECHO_N "checking for xmlParseChunk in -lc... $ECHO_C" >&6
13456 if test "${ac_cv_lib_c_xmlParseChunk+set}" = set; then
13457   echo $ECHO_N "(cached) $ECHO_C" >&6
13458 else
13459   ac_check_lib_save_LIBS=$LIBS
13460 LIBS="-lc $ac_xml_config_libs $LIBS"
13461 cat >conftest.$ac_ext <<_ACEOF
13462 #line $LINENO "configure"
13463 #include "confdefs.h"
13464
13465 /* Override any gcc2 internal prototype to avoid an error.  */
13466 #ifdef __cplusplus
13467 extern "C"
13468 #endif
13469 /* We use char because int might match the return type of a gcc2
13470    builtin and then its argument prototype would still apply.  */
13471 char xmlParseChunk ();
13472 #ifdef F77_DUMMY_MAIN
13473 #  ifdef __cplusplus
13474      extern "C"
13475 #  endif
13476    int F77_DUMMY_MAIN() { return 1; }
13477 #endif
13478 int
13479 main ()
13480 {
13481 xmlParseChunk ();
13482   ;
13483   return 0;
13484 }
13485 _ACEOF
13486 rm -f conftest.$ac_objext conftest$ac_exeext
13487 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13488   (eval $ac_link) 2>&5
13489   ac_status=$?
13490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13491   (exit $ac_status); } &&
13492          { ac_try='test -s conftest$ac_exeext'
13493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13494   (eval $ac_try) 2>&5
13495   ac_status=$?
13496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13497   (exit $ac_status); }; }; then
13498   ac_cv_lib_c_xmlParseChunk=yes
13499 else
13500   echo "$as_me: failed program was:" >&5
13501 cat conftest.$ac_ext >&5
13502 ac_cv_lib_c_xmlParseChunk=no
13503 fi
13504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13505 LIBS=$ac_check_lib_save_LIBS
13506 fi
13507 echo "$as_me:$LINENO: result: $ac_cv_lib_c_xmlParseChunk" >&5
13508 echo "${ECHO_T}$ac_cv_lib_c_xmlParseChunk" >&6
13509 if test $ac_cv_lib_c_xmlParseChunk = yes; then
13510   have_xml=yes
13511                     xml_halfassed=no
13512                     XML_LIBS="$ac_xml_config_libs"
13513                     cat >>confdefs.h <<\_ACEOF
13514 #define HAVE_XML 1
13515 _ACEOF
13516
13517 else
13518   true
13519 fi
13520
13521   CPPFLAGS="$ac_save_CPPFLAGS"
13522   LDFLAGS="$ac_save_LDFLAGS"
13523 #  LIBS="$ac_save_LIBS"
13524
13525   fi
13526
13527   if test "$have_xml" = yes; then
13528     INCLUDES="$INCLUDES $ac_xml_config_cflags"
13529     GTK_LIBS="$GTK_LIBS $ac_xml_config_libs"
13530     cat >>confdefs.h <<\_ACEOF
13531 #define HAVE_XML 1
13532 _ACEOF
13533
13534     if test "$have_old_xml" = yes; then
13535       cat >>confdefs.h <<\_ACEOF
13536 #define HAVE_OLD_XML_HEADERS 1
13537 _ACEOF
13538
13539     fi
13540   fi
13541
13542 fi
13543
13544
13545 ###############################################################################
13546 #
13547 #       Checking whether Motif is really Lesstif.
13548 #
13549 ###############################################################################
13550
13551 have_lesstif=no
13552 if test "$have_motif" = yes ; then
13553   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
13554 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
13555 if test "${ac_cv_have_lesstif+set}" = set; then
13556   echo $ECHO_N "(cached) $ECHO_C" >&6
13557 else
13558
13559   ac_save_CPPFLAGS="$CPPFLAGS"
13560   if test \! -z "$includedir" ; then
13561     CPPFLAGS="$CPPFLAGS -I$includedir"
13562   fi
13563   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13564   cat >conftest.$ac_ext <<_ACEOF
13565 #line $LINENO "configure"
13566 #include "confdefs.h"
13567 #include <Xm/Xm.h>
13568 #ifdef F77_DUMMY_MAIN
13569 #  ifdef __cplusplus
13570      extern "C"
13571 #  endif
13572    int F77_DUMMY_MAIN() { return 1; }
13573 #endif
13574 int
13575 main ()
13576 {
13577 long vers = LesstifVersion;
13578   ;
13579   return 0;
13580 }
13581 _ACEOF
13582 rm -f conftest.$ac_objext
13583 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13584   (eval $ac_compile) 2>&5
13585   ac_status=$?
13586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13587   (exit $ac_status); } &&
13588          { ac_try='test -s conftest.$ac_objext'
13589   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13590   (eval $ac_try) 2>&5
13591   ac_status=$?
13592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13593   (exit $ac_status); }; }; then
13594   ac_cv_have_lesstif=yes
13595 else
13596   echo "$as_me: failed program was:" >&5
13597 cat conftest.$ac_ext >&5
13598 ac_cv_have_lesstif=no
13599 fi
13600 rm -f conftest.$ac_objext conftest.$ac_ext
13601   CPPFLAGS="$ac_save_CPPFLAGS"
13602 fi
13603 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
13604 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
13605   have_lesstif=$ac_cv_have_lesstif
13606 fi
13607
13608
13609 lesstif_version=unknown
13610 lesstif_version_string=unknown
13611
13612 if test "$have_lesstif" = yes ; then
13613   ltv=unknown
13614   echo unknown > conftest-lt
13615   echo "$as_me:$LINENO: checking LessTif version number" >&5
13616 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
13617 if test "${ac_cv_lesstif_version_string+set}" = set; then
13618   echo $ECHO_N "(cached) $ECHO_C" >&6
13619 else
13620
13621   ac_save_CPPFLAGS="$CPPFLAGS"
13622   if test \! -z "$includedir" ; then
13623     CPPFLAGS="$CPPFLAGS -I$includedir"
13624   fi
13625   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13626   if test "$cross_compiling" = yes; then
13627   ac_cv_lesstif_version=unknown
13628                      ac_cv_lesstif_version_string=unknown
13629 else
13630   cat >conftest.$ac_ext <<_ACEOF
13631 #line $LINENO "configure"
13632 #include "confdefs.h"
13633 #include <stdio.h>
13634                      #include <Xm/Xm.h>
13635                      int main() {
13636                        FILE *f = fopen("conftest-lt", "w");
13637                        if (!f) exit(1);
13638                        fprintf(f, "%d %d.%d\n", LesstifVersion,
13639                           LESSTIF_VERSION, LESSTIF_REVISION);
13640                        fclose(f);
13641                        exit(0);
13642                      }
13643 _ACEOF
13644 rm -f conftest$ac_exeext
13645 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13646   (eval $ac_link) 2>&5
13647   ac_status=$?
13648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13649   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13650   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13651   (eval $ac_try) 2>&5
13652   ac_status=$?
13653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13654   (exit $ac_status); }; }; then
13655   ltv=`cat conftest-lt`
13656                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
13657                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
13658 else
13659   echo "$as_me: program exited with status $ac_status" >&5
13660 echo "$as_me: failed program was:" >&5
13661 cat conftest.$ac_ext >&5
13662 ( exit $ac_status )
13663 ac_cv_lesstif_version=unknown
13664                      ac_cv_lesstif_version_string=unknown
13665 fi
13666 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13667 fi
13668   CPPFLAGS="$ac_save_CPPFLAGS"
13669 fi
13670 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
13671 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
13672   rm -f conftest-lt
13673   lesstif_version=$ac_cv_lesstif_version
13674   lesstif_version_string=$ac_cv_lesstif_version_string
13675
13676 fi
13677
13678
13679 if test "$have_motif" = yes ; then
13680   mtv=unknown
13681   echo unknown > conftest-mt
13682   echo "$as_me:$LINENO: checking Motif version number" >&5
13683 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
13684 if test "${ac_cv_motif_version_string+set}" = set; then
13685   echo $ECHO_N "(cached) $ECHO_C" >&6
13686 else
13687
13688   ac_save_CPPFLAGS="$CPPFLAGS"
13689   if test \! -z "$includedir" ; then
13690     CPPFLAGS="$CPPFLAGS -I$includedir"
13691   fi
13692   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13693   if test "$cross_compiling" = yes; then
13694   ac_cv_motif_version=unknown
13695                      ac_cv_motif_version_string=unknown
13696 else
13697   cat >conftest.$ac_ext <<_ACEOF
13698 #line $LINENO "configure"
13699 #include "confdefs.h"
13700 #include <stdio.h>
13701                      #include <Xm/Xm.h>
13702                      int main() {
13703                        FILE *f = fopen("conftest-mt", "w");
13704                        if (!f) exit(1);
13705                        fprintf(f, "%d %d.%d\n", XmVersion,
13706                           XmVERSION, XmREVISION);
13707                        fclose(f);
13708                        exit(0);
13709                      }
13710 _ACEOF
13711 rm -f conftest$ac_exeext
13712 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13713   (eval $ac_link) 2>&5
13714   ac_status=$?
13715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13716   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13718   (eval $ac_try) 2>&5
13719   ac_status=$?
13720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13721   (exit $ac_status); }; }; then
13722   mtv=`cat conftest-mt`
13723                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
13724                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
13725 else
13726   echo "$as_me: program exited with status $ac_status" >&5
13727 echo "$as_me: failed program was:" >&5
13728 cat conftest.$ac_ext >&5
13729 ( exit $ac_status )
13730 ac_cv_motif_version=unknown
13731                      ac_cv_motif_version_string=unknown
13732 fi
13733 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13734 fi
13735   CPPFLAGS="$ac_save_CPPFLAGS"
13736 fi
13737 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
13738 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
13739   rm -f conftest-mt
13740   motif_version=$ac_cv_motif_version
13741   motif_version_string=$ac_cv_motif_version_string
13742
13743 fi
13744
13745
13746 ###############################################################################
13747 #
13748 #       Checking whether Motif requires -lXpm.
13749 #
13750 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
13751 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
13752 #       of the library whether to build the XPM code into libXm, or whether
13753 #       to rely on an external libXm.  So the only way to tell whether XPM is
13754 #       a link-time requirement is to examine libXm.a, which is very
13755 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
13756 #       always link against XPM if the XPM lib exists (and this will be a
13757 #       no-op if libXm happens to already have the XPM code in it.)
13758 #
13759 ###############################################################################
13760
13761 motif_requires_xpm=no
13762 if test "$have_motif" = yes ; then
13763    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
13764 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
13765    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
13766    then
13767      motif_requires_xpm=yes
13768      echo "$as_me:$LINENO: result: maybe" >&5
13769 echo "${ECHO_T}maybe" >&6
13770    else
13771      echo "$as_me:$LINENO: result: no" >&5
13772 echo "${ECHO_T}no" >&6
13773    fi
13774 fi
13775
13776
13777 ###############################################################################
13778 #
13779 #       Checking whether Motif requires -lXp.
13780 #
13781 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
13782 #       Extension".   Why this extension isn't in -lXext with all the others,
13783 #       I have no idea.
13784 #
13785 ###############################################################################
13786
13787 have_xp_ext=no
13788 if test "$have_motif" = yes ; then
13789    have_xp_ext=no
13790
13791   ac_save_CPPFLAGS="$CPPFLAGS"
13792   ac_save_LDFLAGS="$LDFLAGS"
13793 #  ac_save_LIBS="$LIBS"
13794
13795   if test \! -z "$includedir" ; then
13796     CPPFLAGS="$CPPFLAGS -I$includedir"
13797   fi
13798   # note: $X_CFLAGS includes $x_includes
13799   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13800
13801   if test \! -z "$libdir" ; then
13802     LDFLAGS="$LDFLAGS -L$libdir"
13803   fi
13804   # note: $X_LIBS includes $x_libraries
13805   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13806
13807   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
13808 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
13809 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
13810   echo $ECHO_N "(cached) $ECHO_C" >&6
13811 else
13812   ac_check_lib_save_LIBS=$LIBS
13813 LIBS="-lXp -lX11 -lXext -lm $LIBS"
13814 cat >conftest.$ac_ext <<_ACEOF
13815 #line $LINENO "configure"
13816 #include "confdefs.h"
13817
13818 /* Override any gcc2 internal prototype to avoid an error.  */
13819 #ifdef __cplusplus
13820 extern "C"
13821 #endif
13822 /* We use char because int might match the return type of a gcc2
13823    builtin and then its argument prototype would still apply.  */
13824 char XpQueryExtension ();
13825 #ifdef F77_DUMMY_MAIN
13826 #  ifdef __cplusplus
13827      extern "C"
13828 #  endif
13829    int F77_DUMMY_MAIN() { return 1; }
13830 #endif
13831 int
13832 main ()
13833 {
13834 XpQueryExtension ();
13835   ;
13836   return 0;
13837 }
13838 _ACEOF
13839 rm -f conftest.$ac_objext conftest$ac_exeext
13840 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13841   (eval $ac_link) 2>&5
13842   ac_status=$?
13843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13844   (exit $ac_status); } &&
13845          { ac_try='test -s conftest$ac_exeext'
13846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13847   (eval $ac_try) 2>&5
13848   ac_status=$?
13849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13850   (exit $ac_status); }; }; then
13851   ac_cv_lib_Xp_XpQueryExtension=yes
13852 else
13853   echo "$as_me: failed program was:" >&5
13854 cat conftest.$ac_ext >&5
13855 ac_cv_lib_Xp_XpQueryExtension=no
13856 fi
13857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13858 LIBS=$ac_check_lib_save_LIBS
13859 fi
13860 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
13861 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
13862 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
13863   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
13864 else
13865   true
13866 fi
13867
13868   CPPFLAGS="$ac_save_CPPFLAGS"
13869   LDFLAGS="$ac_save_LDFLAGS"
13870 #  LIBS="$ac_save_LIBS"
13871
13872 fi
13873
13874
13875 ###############################################################################
13876 #
13877 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
13878 #
13879 ###############################################################################
13880
13881 have_xintl=no
13882 if test "$have_motif" = yes ; then
13883
13884   ac_save_CPPFLAGS="$CPPFLAGS"
13885   ac_save_LDFLAGS="$LDFLAGS"
13886 #  ac_save_LIBS="$LIBS"
13887
13888   if test \! -z "$includedir" ; then
13889     CPPFLAGS="$CPPFLAGS -I$includedir"
13890   fi
13891   # note: $X_CFLAGS includes $x_includes
13892   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13893
13894   if test \! -z "$libdir" ; then
13895     LDFLAGS="$LDFLAGS -L$libdir"
13896   fi
13897   # note: $X_LIBS includes $x_libraries
13898   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13899
13900   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
13901 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
13902 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
13903   echo $ECHO_N "(cached) $ECHO_C" >&6
13904 else
13905   ac_check_lib_save_LIBS=$LIBS
13906 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
13907 cat >conftest.$ac_ext <<_ACEOF
13908 #line $LINENO "configure"
13909 #include "confdefs.h"
13910
13911 /* Override any gcc2 internal prototype to avoid an error.  */
13912 #ifdef __cplusplus
13913 extern "C"
13914 #endif
13915 /* We use char because int might match the return type of a gcc2
13916    builtin and then its argument prototype would still apply.  */
13917 char _Xsetlocale ();
13918 #ifdef F77_DUMMY_MAIN
13919 #  ifdef __cplusplus
13920      extern "C"
13921 #  endif
13922    int F77_DUMMY_MAIN() { return 1; }
13923 #endif
13924 int
13925 main ()
13926 {
13927 _Xsetlocale ();
13928   ;
13929   return 0;
13930 }
13931 _ACEOF
13932 rm -f conftest.$ac_objext conftest$ac_exeext
13933 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13934   (eval $ac_link) 2>&5
13935   ac_status=$?
13936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13937   (exit $ac_status); } &&
13938          { ac_try='test -s conftest$ac_exeext'
13939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13940   (eval $ac_try) 2>&5
13941   ac_status=$?
13942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13943   (exit $ac_status); }; }; then
13944   ac_cv_lib_Xintl__Xsetlocale=yes
13945 else
13946   echo "$as_me: failed program was:" >&5
13947 cat conftest.$ac_ext >&5
13948 ac_cv_lib_Xintl__Xsetlocale=no
13949 fi
13950 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13951 LIBS=$ac_check_lib_save_LIBS
13952 fi
13953 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
13954 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
13955 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
13956   have_xintl=yes
13957 else
13958   have_xintl=no
13959 fi
13960
13961   CPPFLAGS="$ac_save_CPPFLAGS"
13962   LDFLAGS="$ac_save_LDFLAGS"
13963 #  LIBS="$ac_save_LIBS"
13964
13965   if test "$have_xintl" = yes; then
13966     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
13967   fi
13968 fi
13969
13970
13971 ###############################################################################
13972 #
13973 #       Check for -lGL or -lMesaGL.
13974 #
13975 ###############################################################################
13976
13977 have_gl=no
13978 ac_have_mesa_gl=no
13979 with_gl_req=unspecified
13980 gl_halfassed=no
13981
13982 # Check whether --with-gl or --without-gl was given.
13983 if test "${with_gl+set}" = set; then
13984   withval="$with_gl"
13985   with_gl="$withval"; with_gl_req="$withval"
13986 else
13987   with_gl=yes
13988 fi;
13989
13990
13991    case "$with_gl" in
13992     yes) ;;
13993     no)  ;;
13994
13995     /*)
13996      echo "$as_me:$LINENO: checking for GL headers" >&5
13997 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
13998      d=$with_gl/include
13999      if test -d $d; then
14000        X_CFLAGS="-I$d $X_CFLAGS"
14001        echo "$as_me:$LINENO: result: $d" >&5
14002 echo "${ECHO_T}$d" >&6
14003      else
14004        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14005 echo "${ECHO_T}not found ($d: no such directory)" >&6
14006      fi
14007
14008      echo "$as_me:$LINENO: checking for GL libs" >&5
14009 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
14010      d=$with_gl/lib
14011      if test -d $d; then
14012        X_LIBS="-L$d $X_LIBS"
14013        echo "$as_me:$LINENO: result: $d" >&5
14014 echo "${ECHO_T}$d" >&6
14015      else
14016        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14017 echo "${ECHO_T}not found ($d: no such directory)" >&6
14018      fi
14019
14020      # replace the directory string with "yes".
14021      with_gl_req="yes"
14022      with_gl=$with_gl_req
14023      ;;
14024
14025     *)
14026      echo ""
14027      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
14028      echo "       If it is a directory, then \`DIR/include' will be added to"
14029      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14030      exit 1
14031      ;;
14032    esac
14033
14034
14035 ac_mesagl_version=unknown
14036 ac_mesagl_version_string=unknown
14037
14038 if test "$with_gl" = yes; then
14039
14040   ac_save_CPPFLAGS="$CPPFLAGS"
14041   if test \! -z "$includedir" ; then
14042     CPPFLAGS="$CPPFLAGS -I$includedir"
14043   fi
14044   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14045   if test "${ac_cv_header_GL_gl_h+set}" = set; then
14046   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
14047 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
14048 if test "${ac_cv_header_GL_gl_h+set}" = set; then
14049   echo $ECHO_N "(cached) $ECHO_C" >&6
14050 fi
14051 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
14052 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
14053 else
14054   # Is the header compilable?
14055 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
14056 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
14057 cat >conftest.$ac_ext <<_ACEOF
14058 #line $LINENO "configure"
14059 #include "confdefs.h"
14060 $ac_includes_default
14061 #include <GL/gl.h>
14062 _ACEOF
14063 rm -f conftest.$ac_objext
14064 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14065   (eval $ac_compile) 2>&5
14066   ac_status=$?
14067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14068   (exit $ac_status); } &&
14069          { ac_try='test -s conftest.$ac_objext'
14070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14071   (eval $ac_try) 2>&5
14072   ac_status=$?
14073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14074   (exit $ac_status); }; }; then
14075   ac_header_compiler=yes
14076 else
14077   echo "$as_me: failed program was:" >&5
14078 cat conftest.$ac_ext >&5
14079 ac_header_compiler=no
14080 fi
14081 rm -f conftest.$ac_objext conftest.$ac_ext
14082 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14083 echo "${ECHO_T}$ac_header_compiler" >&6
14084
14085 # Is the header present?
14086 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
14087 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
14088 cat >conftest.$ac_ext <<_ACEOF
14089 #line $LINENO "configure"
14090 #include "confdefs.h"
14091 #include <GL/gl.h>
14092 _ACEOF
14093 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14094   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14095   ac_status=$?
14096   egrep -v '^ *\+' conftest.er1 >conftest.err
14097   rm -f conftest.er1
14098   cat conftest.err >&5
14099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14100   (exit $ac_status); } >/dev/null; then
14101   if test -s conftest.err; then
14102     ac_cpp_err=$ac_c_preproc_warn_flag
14103   else
14104     ac_cpp_err=
14105   fi
14106 else
14107   ac_cpp_err=yes
14108 fi
14109 if test -z "$ac_cpp_err"; then
14110   ac_header_preproc=yes
14111 else
14112   echo "$as_me: failed program was:" >&5
14113   cat conftest.$ac_ext >&5
14114   ac_header_preproc=no
14115 fi
14116 rm -f conftest.err conftest.$ac_ext
14117 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14118 echo "${ECHO_T}$ac_header_preproc" >&6
14119
14120 # So?  What about this header?
14121 case $ac_header_compiler:$ac_header_preproc in
14122   yes:no )
14123     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
14124 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14125     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
14126 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;};;
14127   no:yes )
14128     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
14129 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
14130     { echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5
14131 echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;}
14132     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
14133 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;};;
14134 esac
14135 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
14136 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
14137 if test "${ac_cv_header_GL_gl_h+set}" = set; then
14138   echo $ECHO_N "(cached) $ECHO_C" >&6
14139 else
14140   ac_cv_header_GL_gl_h=$ac_header_preproc
14141 fi
14142 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
14143 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
14144
14145 fi
14146 if test $ac_cv_header_GL_gl_h = yes; then
14147   have_gl=yes
14148 else
14149   have_gl=no
14150 fi
14151
14152
14153   CPPFLAGS="$ac_save_CPPFLAGS"
14154   if test "$have_gl" = yes ; then
14155
14156   ac_save_CPPFLAGS="$CPPFLAGS"
14157   if test \! -z "$includedir" ; then
14158     CPPFLAGS="$CPPFLAGS -I$includedir"
14159   fi
14160   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14161   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
14162 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
14163 if test "${ac_cv_header_GL_glx_h+set}" = set; then
14164   echo $ECHO_N "(cached) $ECHO_C" >&6
14165 else
14166   cat >conftest.$ac_ext <<_ACEOF
14167 #line $LINENO "configure"
14168 #include "confdefs.h"
14169 #include <GL/gl.h>
14170
14171 #include <GL/glx.h>
14172 _ACEOF
14173 rm -f conftest.$ac_objext
14174 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14175   (eval $ac_compile) 2>&5
14176   ac_status=$?
14177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14178   (exit $ac_status); } &&
14179          { ac_try='test -s conftest.$ac_objext'
14180   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14181   (eval $ac_try) 2>&5
14182   ac_status=$?
14183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14184   (exit $ac_status); }; }; then
14185   ac_cv_header_GL_glx_h=yes
14186 else
14187   echo "$as_me: failed program was:" >&5
14188 cat conftest.$ac_ext >&5
14189 ac_cv_header_GL_glx_h=no
14190 fi
14191 rm -f conftest.$ac_objext conftest.$ac_ext
14192 fi
14193 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
14194 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
14195 if test $ac_cv_header_GL_glx_h = yes; then
14196   have_gl=yes
14197 else
14198   have_gl=no
14199 fi
14200
14201
14202   CPPFLAGS="$ac_save_CPPFLAGS"
14203   fi
14204
14205   # If we have the headers, try and figure out which vendor it's from.
14206   #
14207   if test "$have_gl" = yes ; then
14208
14209     # We need to know whether it's MesaGL so that we know which libraries
14210     # to link against.
14211     #
14212     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
14213 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
14214 if test "${ac_cv_have_mesa_gl+set}" = set; then
14215   echo $ECHO_N "(cached) $ECHO_C" >&6
14216 else
14217   ac_cv_have_mesa_gl=no
14218
14219   ac_save_CPPFLAGS="$CPPFLAGS"
14220   if test \! -z "$includedir" ; then
14221     CPPFLAGS="$CPPFLAGS -I$includedir"
14222   fi
14223   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14224   cat >conftest.$ac_ext <<_ACEOF
14225 #line $LINENO "configure"
14226 #include "confdefs.h"
14227 #include <GL/glx.h>
14228
14229 _ACEOF
14230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14231   egrep "Mesa|MESA" >/dev/null 2>&1; then
14232   ac_cv_have_mesa_gl=yes
14233 fi
14234 rm -f conftest*
14235
14236   CPPFLAGS="$ac_save_CPPFLAGS"
14237
14238 fi
14239 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
14240 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
14241     ac_have_mesa_gl=$ac_cv_have_mesa_gl
14242
14243
14244     gl_lib_1=""
14245     GL_LIBS=""
14246
14247
14248     # Some versions of MesaGL are compiled to require -lpthread.
14249     # So if the Mesa headers exist, and -lpthread exists, then always
14250     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
14251     #
14252     if test "$ac_have_mesa_gl" = yes; then
14253       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14254 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
14255 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
14256   echo $ECHO_N "(cached) $ECHO_C" >&6
14257 else
14258   ac_check_lib_save_LIBS=$LIBS
14259 LIBS="-lpthread  $LIBS"
14260 cat >conftest.$ac_ext <<_ACEOF
14261 #line $LINENO "configure"
14262 #include "confdefs.h"
14263
14264 /* Override any gcc2 internal prototype to avoid an error.  */
14265 #ifdef __cplusplus
14266 extern "C"
14267 #endif
14268 /* We use char because int might match the return type of a gcc2
14269    builtin and then its argument prototype would still apply.  */
14270 char pthread_create ();
14271 #ifdef F77_DUMMY_MAIN
14272 #  ifdef __cplusplus
14273      extern "C"
14274 #  endif
14275    int F77_DUMMY_MAIN() { return 1; }
14276 #endif
14277 int
14278 main ()
14279 {
14280 pthread_create ();
14281   ;
14282   return 0;
14283 }
14284 _ACEOF
14285 rm -f conftest.$ac_objext conftest$ac_exeext
14286 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14287   (eval $ac_link) 2>&5
14288   ac_status=$?
14289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14290   (exit $ac_status); } &&
14291          { ac_try='test -s conftest$ac_exeext'
14292   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14293   (eval $ac_try) 2>&5
14294   ac_status=$?
14295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14296   (exit $ac_status); }; }; then
14297   ac_cv_lib_pthread_pthread_create=yes
14298 else
14299   echo "$as_me: failed program was:" >&5
14300 cat conftest.$ac_ext >&5
14301 ac_cv_lib_pthread_pthread_create=no
14302 fi
14303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14304 LIBS=$ac_check_lib_save_LIBS
14305 fi
14306 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
14307 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
14308 if test $ac_cv_lib_pthread_pthread_create = yes; then
14309   GL_LIBS="-lpthread"
14310 fi
14311
14312     fi
14313
14314
14315     # If we have Mesa headers, check to see if we can link against -lMesaGL.
14316     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
14317     # Else, warn that GL is busted.  (We have the headers, but no libs.)
14318     #
14319
14320     if test "$ac_have_mesa_gl" = yes ; then
14321
14322   ac_save_CPPFLAGS="$CPPFLAGS"
14323   ac_save_LDFLAGS="$LDFLAGS"
14324 #  ac_save_LIBS="$LIBS"
14325
14326   if test \! -z "$includedir" ; then
14327     CPPFLAGS="$CPPFLAGS -I$includedir"
14328   fi
14329   # note: $X_CFLAGS includes $x_includes
14330   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14331
14332   if test \! -z "$libdir" ; then
14333     LDFLAGS="$LDFLAGS -L$libdir"
14334   fi
14335   # note: $X_LIBS includes $x_libraries
14336   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14337
14338   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
14339 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
14340 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
14341   echo $ECHO_N "(cached) $ECHO_C" >&6
14342 else
14343   ac_check_lib_save_LIBS=$LIBS
14344 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
14345 cat >conftest.$ac_ext <<_ACEOF
14346 #line $LINENO "configure"
14347 #include "confdefs.h"
14348
14349 /* Override any gcc2 internal prototype to avoid an error.  */
14350 #ifdef __cplusplus
14351 extern "C"
14352 #endif
14353 /* We use char because int might match the return type of a gcc2
14354    builtin and then its argument prototype would still apply.  */
14355 char glXCreateContext ();
14356 #ifdef F77_DUMMY_MAIN
14357 #  ifdef __cplusplus
14358      extern "C"
14359 #  endif
14360    int F77_DUMMY_MAIN() { return 1; }
14361 #endif
14362 int
14363 main ()
14364 {
14365 glXCreateContext ();
14366   ;
14367   return 0;
14368 }
14369 _ACEOF
14370 rm -f conftest.$ac_objext conftest$ac_exeext
14371 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14372   (eval $ac_link) 2>&5
14373   ac_status=$?
14374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14375   (exit $ac_status); } &&
14376          { ac_try='test -s conftest$ac_exeext'
14377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14378   (eval $ac_try) 2>&5
14379   ac_status=$?
14380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14381   (exit $ac_status); }; }; then
14382   ac_cv_lib_MesaGL_glXCreateContext=yes
14383 else
14384   echo "$as_me: failed program was:" >&5
14385 cat conftest.$ac_ext >&5
14386 ac_cv_lib_MesaGL_glXCreateContext=no
14387 fi
14388 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14389 LIBS=$ac_check_lib_save_LIBS
14390 fi
14391 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
14392 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
14393 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
14394   gl_lib_1="MesaGL"
14395                       GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
14396 fi
14397
14398   CPPFLAGS="$ac_save_CPPFLAGS"
14399   LDFLAGS="$ac_save_LDFLAGS"
14400 #  LIBS="$ac_save_LIBS"
14401
14402     fi
14403
14404     if test "$gl_lib_1" = "" ; then
14405
14406   ac_save_CPPFLAGS="$CPPFLAGS"
14407   ac_save_LDFLAGS="$LDFLAGS"
14408 #  ac_save_LIBS="$LIBS"
14409
14410   if test \! -z "$includedir" ; then
14411     CPPFLAGS="$CPPFLAGS -I$includedir"
14412   fi
14413   # note: $X_CFLAGS includes $x_includes
14414   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14415
14416   if test \! -z "$libdir" ; then
14417     LDFLAGS="$LDFLAGS -L$libdir"
14418   fi
14419   # note: $X_LIBS includes $x_libraries
14420   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14421
14422   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
14423 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
14424 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
14425   echo $ECHO_N "(cached) $ECHO_C" >&6
14426 else
14427   ac_check_lib_save_LIBS=$LIBS
14428 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
14429 cat >conftest.$ac_ext <<_ACEOF
14430 #line $LINENO "configure"
14431 #include "confdefs.h"
14432
14433 /* Override any gcc2 internal prototype to avoid an error.  */
14434 #ifdef __cplusplus
14435 extern "C"
14436 #endif
14437 /* We use char because int might match the return type of a gcc2
14438    builtin and then its argument prototype would still apply.  */
14439 char glXCreateContext ();
14440 #ifdef F77_DUMMY_MAIN
14441 #  ifdef __cplusplus
14442      extern "C"
14443 #  endif
14444    int F77_DUMMY_MAIN() { return 1; }
14445 #endif
14446 int
14447 main ()
14448 {
14449 glXCreateContext ();
14450   ;
14451   return 0;
14452 }
14453 _ACEOF
14454 rm -f conftest.$ac_objext conftest$ac_exeext
14455 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14456   (eval $ac_link) 2>&5
14457   ac_status=$?
14458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14459   (exit $ac_status); } &&
14460          { ac_try='test -s conftest$ac_exeext'
14461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14462   (eval $ac_try) 2>&5
14463   ac_status=$?
14464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14465   (exit $ac_status); }; }; then
14466   ac_cv_lib_GL_glXCreateContext=yes
14467 else
14468   echo "$as_me: failed program was:" >&5
14469 cat conftest.$ac_ext >&5
14470 ac_cv_lib_GL_glXCreateContext=no
14471 fi
14472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14473 LIBS=$ac_check_lib_save_LIBS
14474 fi
14475 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
14476 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
14477 if test $ac_cv_lib_GL_glXCreateContext = yes; then
14478   gl_lib_1="GL"
14479                       GL_LIBS="-lGL -lGLU $GL_LIBS"
14480 fi
14481
14482   CPPFLAGS="$ac_save_CPPFLAGS"
14483   LDFLAGS="$ac_save_LDFLAGS"
14484 #  LIBS="$ac_save_LIBS"
14485
14486     fi
14487
14488     if test "$gl_lib_1" = "" ; then
14489       # we have headers, but no libs -- bail.
14490       have_gl=no
14491       ac_have_mesa_gl=no
14492       gl_halfassed=yes
14493     else
14494       # linking works -- we can build the GL hacks.
14495       cat >>confdefs.h <<\_ACEOF
14496 #define HAVE_GL 1
14497 _ACEOF
14498
14499       if test "$ac_have_mesa_gl" = yes ; then
14500         cat >>confdefs.h <<\_ACEOF
14501 #define HAVE_MESA_GL 1
14502 _ACEOF
14503
14504       fi
14505     fi
14506   fi
14507
14508
14509   # Now that we know we have GL headers and libs, do some more GL testing.
14510   #
14511
14512   if test "$have_gl" = yes ; then
14513     # If it's MesaGL, we'd like to issue a warning if the version number
14514     # is less than or equal to 2.6, because that version had a security bug.
14515     #
14516     if test "$ac_have_mesa_gl" = yes; then
14517
14518       echo "$as_me:$LINENO: checking MesaGL version number" >&5
14519 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
14520 if test "${ac_cv_mesagl_version_string+set}" = set; then
14521   echo $ECHO_N "(cached) $ECHO_C" >&6
14522 else
14523   cat > conftest.$ac_ext <<EOF
14524 #line 14530 "configure"
14525 #include "confdefs.h"
14526 #include <GL/gl.h>
14527 #ifndef MESA_MAJOR_VERSION
14528 # include <GL/xmesa.h>
14529 # define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
14530 # define MESA_MINOR_VERSION XMESA_MINOR_VERSION
14531 #endif
14532 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
14533 EOF
14534
14535          ac_save_CPPFLAGS="$CPPFLAGS"
14536          if test \! -z "$includedir" ; then
14537            CPPFLAGS="$CPPFLAGS -I$includedir"
14538          fi
14539          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14540
14541          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
14542
14543          # M4 sucks!!
14544
14545           mglv=`echo "$mglv" | sed -n \
14546              's/^configure:.*\([0-9][0-9]*\).*\([0-9][0-9]*\).*$/\1.\2/p'`
14547
14548
14549          rm -f conftest.$ac_ext
14550
14551          CPPFLAGS="$ac_save_CPPFLAGS"
14552
14553          if test "$mglv" = ""; then
14554            ac_mesagl_version=unknown
14555            ac_mesagl_version_string=unknown
14556          else
14557            ac_mesagl_version_string=$mglv
14558            maj=`echo $mglv | sed -n 's/\..*//p'`
14559            min=`echo $mglv | sed -n 's/.*\.//p'`
14560            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
14561            if test -z "$ac_mesagl_version"; then
14562              ac_mesagl_version=unknown
14563              ac_mesagl_version_string=unknown
14564            fi
14565          fi
14566          ac_cv_mesagl_version=$ac_mesagl_version
14567          ac_cv_mesagl_version_string=$ac_mesagl_version_string
14568
14569 fi
14570 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
14571 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
14572       ac_mesagl_version=$ac_cv_mesagl_version
14573       ac_mesagl_version_string=$ac_cv_mesagl_version_string
14574     fi
14575
14576
14577     # Check for OpenGL 1.1 features.
14578     #
14579
14580   ac_save_CPPFLAGS="$CPPFLAGS"
14581   ac_save_LDFLAGS="$LDFLAGS"
14582 #  ac_save_LIBS="$LIBS"
14583
14584   if test \! -z "$includedir" ; then
14585     CPPFLAGS="$CPPFLAGS -I$includedir"
14586   fi
14587   # note: $X_CFLAGS includes $x_includes
14588   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14589
14590   if test \! -z "$libdir" ; then
14591     LDFLAGS="$LDFLAGS -L$libdir"
14592   fi
14593   # note: $X_LIBS includes $x_libraries
14594   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14595
14596   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
14597 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
14598 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
14599 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14600   echo $ECHO_N "(cached) $ECHO_C" >&6
14601 else
14602   ac_check_lib_save_LIBS=$LIBS
14603 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
14604 cat >conftest.$ac_ext <<_ACEOF
14605 #line $LINENO "configure"
14606 #include "confdefs.h"
14607
14608 /* Override any gcc2 internal prototype to avoid an error.  */
14609 #ifdef __cplusplus
14610 extern "C"
14611 #endif
14612 /* We use char because int might match the return type of a gcc2
14613    builtin and then its argument prototype would still apply.  */
14614 char glBindTexture ();
14615 #ifdef F77_DUMMY_MAIN
14616 #  ifdef __cplusplus
14617      extern "C"
14618 #  endif
14619    int F77_DUMMY_MAIN() { return 1; }
14620 #endif
14621 int
14622 main ()
14623 {
14624 glBindTexture ();
14625   ;
14626   return 0;
14627 }
14628 _ACEOF
14629 rm -f conftest.$ac_objext conftest$ac_exeext
14630 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14631   (eval $ac_link) 2>&5
14632   ac_status=$?
14633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14634   (exit $ac_status); } &&
14635          { ac_try='test -s conftest$ac_exeext'
14636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14637   (eval $ac_try) 2>&5
14638   ac_status=$?
14639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14640   (exit $ac_status); }; }; then
14641   eval "$as_ac_Lib=yes"
14642 else
14643   echo "$as_me: failed program was:" >&5
14644 cat conftest.$ac_ext >&5
14645 eval "$as_ac_Lib=no"
14646 fi
14647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14648 LIBS=$ac_check_lib_save_LIBS
14649 fi
14650 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14651 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14652 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14653   cat >>confdefs.h <<\_ACEOF
14654 #define HAVE_GLBINDTEXTURE 1
14655 _ACEOF
14656
14657 else
14658   true
14659 fi
14660
14661   CPPFLAGS="$ac_save_CPPFLAGS"
14662   LDFLAGS="$ac_save_LDFLAGS"
14663 #  LIBS="$ac_save_LIBS"
14664
14665   fi
14666
14667 elif test "$with_gl" != no; then
14668   echo "error: must be yes or no: --with-gl=$with_gl"
14669   exit 1
14670 fi
14671
14672
14673 ###############################################################################
14674 #
14675 #       Check for -lgle.
14676 #
14677 ###############################################################################
14678
14679 have_gle=no
14680 with_gle_req=unspecified
14681 gle_halfassed=no
14682
14683 # Check whether --with-gle or --without-gle was given.
14684 if test "${with_gle+set}" = set; then
14685   withval="$with_gle"
14686   with_gle="$withval"; with_gle_req="$withval"
14687 else
14688   with_gle=yes
14689 fi;
14690
14691
14692    case "$with_gle" in
14693     yes) ;;
14694     no)  ;;
14695
14696     /*)
14697      echo "$as_me:$LINENO: checking for GLE headers" >&5
14698 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
14699      d=$with_gle/include
14700      if test -d $d; then
14701        X_CFLAGS="-I$d $X_CFLAGS"
14702        echo "$as_me:$LINENO: result: $d" >&5
14703 echo "${ECHO_T}$d" >&6
14704      else
14705        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14706 echo "${ECHO_T}not found ($d: no such directory)" >&6
14707      fi
14708
14709      echo "$as_me:$LINENO: checking for GLE libs" >&5
14710 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
14711      d=$with_gle/lib
14712      if test -d $d; then
14713        X_LIBS="-L$d $X_LIBS"
14714        echo "$as_me:$LINENO: result: $d" >&5
14715 echo "${ECHO_T}$d" >&6
14716      else
14717        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14718 echo "${ECHO_T}not found ($d: no such directory)" >&6
14719      fi
14720
14721      # replace the directory string with "yes".
14722      with_gle_req="yes"
14723      with_gle=$with_gle_req
14724      ;;
14725
14726     *)
14727      echo ""
14728      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
14729      echo "       If it is a directory, then \`DIR/include' will be added to"
14730      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14731      exit 1
14732      ;;
14733    esac
14734
14735
14736 GLE_LIBS=""
14737
14738 if test "$have_gl" = no ; then
14739  true
14740 elif test "$with_gle" = yes; then
14741
14742
14743   ac_save_CPPFLAGS="$CPPFLAGS"
14744   if test \! -z "$includedir" ; then
14745     CPPFLAGS="$CPPFLAGS -I$includedir"
14746   fi
14747   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14748   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
14749 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
14750 if test "${ac_cv_header_GL_gle_h+set}" = set; then
14751   echo $ECHO_N "(cached) $ECHO_C" >&6
14752 else
14753   cat >conftest.$ac_ext <<_ACEOF
14754 #line $LINENO "configure"
14755 #include "confdefs.h"
14756 #include <GL/gl.h>
14757
14758 #include <GL/gle.h>
14759 _ACEOF
14760 rm -f conftest.$ac_objext
14761 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14762   (eval $ac_compile) 2>&5
14763   ac_status=$?
14764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14765   (exit $ac_status); } &&
14766          { ac_try='test -s conftest.$ac_objext'
14767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14768   (eval $ac_try) 2>&5
14769   ac_status=$?
14770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14771   (exit $ac_status); }; }; then
14772   ac_cv_header_GL_gle_h=yes
14773 else
14774   echo "$as_me: failed program was:" >&5
14775 cat conftest.$ac_ext >&5
14776 ac_cv_header_GL_gle_h=no
14777 fi
14778 rm -f conftest.$ac_objext conftest.$ac_ext
14779 fi
14780 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
14781 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
14782 if test $ac_cv_header_GL_gle_h = yes; then
14783   have_gle3=yes
14784 else
14785   have_gle3=no
14786 fi
14787
14788
14789   CPPFLAGS="$ac_save_CPPFLAGS"
14790   if test "$have_gle3" = yes ; then
14791     have_gle=yes;
14792   else
14793
14794   ac_save_CPPFLAGS="$CPPFLAGS"
14795   if test \! -z "$includedir" ; then
14796     CPPFLAGS="$CPPFLAGS -I$includedir"
14797   fi
14798   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14799   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
14800 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
14801 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
14802   echo $ECHO_N "(cached) $ECHO_C" >&6
14803 else
14804   cat >conftest.$ac_ext <<_ACEOF
14805 #line $LINENO "configure"
14806 #include "confdefs.h"
14807 #include <GL/gl.h>
14808
14809 #include <GL/gutil.h>
14810 _ACEOF
14811 rm -f conftest.$ac_objext
14812 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14813   (eval $ac_compile) 2>&5
14814   ac_status=$?
14815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14816   (exit $ac_status); } &&
14817          { ac_try='test -s conftest.$ac_objext'
14818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14819   (eval $ac_try) 2>&5
14820   ac_status=$?
14821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14822   (exit $ac_status); }; }; then
14823   ac_cv_header_GL_gutil_h=yes
14824 else
14825   echo "$as_me: failed program was:" >&5
14826 cat conftest.$ac_ext >&5
14827 ac_cv_header_GL_gutil_h=no
14828 fi
14829 rm -f conftest.$ac_objext conftest.$ac_ext
14830 fi
14831 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
14832 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
14833 if test $ac_cv_header_GL_gutil_h = yes; then
14834   have_gle=yes
14835 else
14836   have_gle=no
14837 fi
14838
14839
14840   CPPFLAGS="$ac_save_CPPFLAGS"
14841     if test "$have_gle" = yes ; then
14842
14843   ac_save_CPPFLAGS="$CPPFLAGS"
14844   if test \! -z "$includedir" ; then
14845     CPPFLAGS="$CPPFLAGS -I$includedir"
14846   fi
14847   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14848   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
14849 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
14850 if test "${ac_cv_header_GL_tube_h+set}" = set; then
14851   echo $ECHO_N "(cached) $ECHO_C" >&6
14852 else
14853   cat >conftest.$ac_ext <<_ACEOF
14854 #line $LINENO "configure"
14855 #include "confdefs.h"
14856 #include <GL/gl.h>
14857
14858 #include <GL/tube.h>
14859 _ACEOF
14860 rm -f conftest.$ac_objext
14861 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14862   (eval $ac_compile) 2>&5
14863   ac_status=$?
14864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14865   (exit $ac_status); } &&
14866          { ac_try='test -s conftest.$ac_objext'
14867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14868   (eval $ac_try) 2>&5
14869   ac_status=$?
14870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14871   (exit $ac_status); }; }; then
14872   ac_cv_header_GL_tube_h=yes
14873 else
14874   echo "$as_me: failed program was:" >&5
14875 cat conftest.$ac_ext >&5
14876 ac_cv_header_GL_tube_h=no
14877 fi
14878 rm -f conftest.$ac_objext conftest.$ac_ext
14879 fi
14880 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
14881 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
14882 if test $ac_cv_header_GL_tube_h = yes; then
14883   have_gle=yes
14884 else
14885   have_gle=no
14886 fi
14887
14888
14889   CPPFLAGS="$ac_save_CPPFLAGS"
14890     fi
14891   fi
14892
14893   if test "$have_gle" = yes ; then
14894     have_gle=no
14895     gle_halfassed=yes
14896
14897   ac_save_CPPFLAGS="$CPPFLAGS"
14898   ac_save_LDFLAGS="$LDFLAGS"
14899 #  ac_save_LIBS="$LIBS"
14900
14901   if test \! -z "$includedir" ; then
14902     CPPFLAGS="$CPPFLAGS -I$includedir"
14903   fi
14904   # note: $X_CFLAGS includes $x_includes
14905   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14906
14907   if test \! -z "$libdir" ; then
14908     LDFLAGS="$LDFLAGS -L$libdir"
14909   fi
14910   # note: $X_LIBS includes $x_libraries
14911   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14912
14913   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
14914 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
14915 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
14916   echo $ECHO_N "(cached) $ECHO_C" >&6
14917 else
14918   ac_check_lib_save_LIBS=$LIBS
14919 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
14920 cat >conftest.$ac_ext <<_ACEOF
14921 #line $LINENO "configure"
14922 #include "confdefs.h"
14923
14924 /* Override any gcc2 internal prototype to avoid an error.  */
14925 #ifdef __cplusplus
14926 extern "C"
14927 #endif
14928 /* We use char because int might match the return type of a gcc2
14929    builtin and then its argument prototype would still apply.  */
14930 char gleCreateGC ();
14931 #ifdef F77_DUMMY_MAIN
14932 #  ifdef __cplusplus
14933      extern "C"
14934 #  endif
14935    int F77_DUMMY_MAIN() { return 1; }
14936 #endif
14937 int
14938 main ()
14939 {
14940 gleCreateGC ();
14941   ;
14942   return 0;
14943 }
14944 _ACEOF
14945 rm -f conftest.$ac_objext conftest$ac_exeext
14946 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14947   (eval $ac_link) 2>&5
14948   ac_status=$?
14949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14950   (exit $ac_status); } &&
14951          { ac_try='test -s conftest$ac_exeext'
14952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14953   (eval $ac_try) 2>&5
14954   ac_status=$?
14955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14956   (exit $ac_status); }; }; then
14957   ac_cv_lib_gle_gleCreateGC=yes
14958 else
14959   echo "$as_me: failed program was:" >&5
14960 cat conftest.$ac_ext >&5
14961 ac_cv_lib_gle_gleCreateGC=no
14962 fi
14963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14964 LIBS=$ac_check_lib_save_LIBS
14965 fi
14966 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
14967 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
14968 if test $ac_cv_lib_gle_gleCreateGC = yes; then
14969   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
14970 fi
14971
14972   CPPFLAGS="$ac_save_CPPFLAGS"
14973   LDFLAGS="$ac_save_LDFLAGS"
14974 #  LIBS="$ac_save_LIBS"
14975
14976   fi
14977   if test "$have_gle" = yes ; then
14978     have_gle=no
14979     gle_halfassed=yes
14980
14981     # sometimes the libmatrix stuff is included in libgle.  look there first.
14982 #
14983 # I don't get it.  For some reason, this test passes on SGI, as if
14984 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
14985 # Yet the link is succeeding.  Why???
14986 #
14987 #    AC_CHECK_X_LIB(gle, uview_direction_d,
14988 #                   [have_gle=yes; gle_halfassed=no],
14989 #                   [], $GL_LIBS -lX11 -lXext -lm)
14990
14991     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
14992     # *sigh*
14993     if test "$have_gle3" = yes ; then
14994
14995   ac_save_CPPFLAGS="$CPPFLAGS"
14996   ac_save_LDFLAGS="$LDFLAGS"
14997 #  ac_save_LIBS="$LIBS"
14998
14999   if test \! -z "$includedir" ; then
15000     CPPFLAGS="$CPPFLAGS -I$includedir"
15001   fi
15002   # note: $X_CFLAGS includes $x_includes
15003   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15004
15005   if test \! -z "$libdir" ; then
15006     LDFLAGS="$LDFLAGS -L$libdir"
15007   fi
15008   # note: $X_LIBS includes $x_libraries
15009   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15010
15011   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
15012 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
15013 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
15014   echo $ECHO_N "(cached) $ECHO_C" >&6
15015 else
15016   ac_check_lib_save_LIBS=$LIBS
15017 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
15018 cat >conftest.$ac_ext <<_ACEOF
15019 #line $LINENO "configure"
15020 #include "confdefs.h"
15021
15022 /* Override any gcc2 internal prototype to avoid an error.  */
15023 #ifdef __cplusplus
15024 extern "C"
15025 #endif
15026 /* We use char because int might match the return type of a gcc2
15027    builtin and then its argument prototype would still apply.  */
15028 char uview_direction ();
15029 #ifdef F77_DUMMY_MAIN
15030 #  ifdef __cplusplus
15031      extern "C"
15032 #  endif
15033    int F77_DUMMY_MAIN() { return 1; }
15034 #endif
15035 int
15036 main ()
15037 {
15038 uview_direction ();
15039   ;
15040   return 0;
15041 }
15042 _ACEOF
15043 rm -f conftest.$ac_objext conftest$ac_exeext
15044 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15045   (eval $ac_link) 2>&5
15046   ac_status=$?
15047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15048   (exit $ac_status); } &&
15049          { ac_try='test -s conftest$ac_exeext'
15050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15051   (eval $ac_try) 2>&5
15052   ac_status=$?
15053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15054   (exit $ac_status); }; }; then
15055   ac_cv_lib_gle_uview_direction=yes
15056 else
15057   echo "$as_me: failed program was:" >&5
15058 cat conftest.$ac_ext >&5
15059 ac_cv_lib_gle_uview_direction=no
15060 fi
15061 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15062 LIBS=$ac_check_lib_save_LIBS
15063 fi
15064 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
15065 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
15066 if test $ac_cv_lib_gle_uview_direction = yes; then
15067   have_gle=yes; gle_halfassed=no
15068 fi
15069
15070   CPPFLAGS="$ac_save_CPPFLAGS"
15071   LDFLAGS="$ac_save_LDFLAGS"
15072 #  LIBS="$ac_save_LIBS"
15073
15074     fi
15075     # if it wasn't in libgle, then look in libmatrix.
15076     if test "$have_gle" = no ; then
15077
15078   ac_save_CPPFLAGS="$CPPFLAGS"
15079   ac_save_LDFLAGS="$LDFLAGS"
15080 #  ac_save_LIBS="$LIBS"
15081
15082   if test \! -z "$includedir" ; then
15083     CPPFLAGS="$CPPFLAGS -I$includedir"
15084   fi
15085   # note: $X_CFLAGS includes $x_includes
15086   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15087
15088   if test \! -z "$libdir" ; then
15089     LDFLAGS="$LDFLAGS -L$libdir"
15090   fi
15091   # note: $X_LIBS includes $x_libraries
15092   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15093
15094   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
15095 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
15096 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
15097   echo $ECHO_N "(cached) $ECHO_C" >&6
15098 else
15099   ac_check_lib_save_LIBS=$LIBS
15100 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
15101 cat >conftest.$ac_ext <<_ACEOF
15102 #line $LINENO "configure"
15103 #include "confdefs.h"
15104
15105 /* Override any gcc2 internal prototype to avoid an error.  */
15106 #ifdef __cplusplus
15107 extern "C"
15108 #endif
15109 /* We use char because int might match the return type of a gcc2
15110    builtin and then its argument prototype would still apply.  */
15111 char uview_direction_d ();
15112 #ifdef F77_DUMMY_MAIN
15113 #  ifdef __cplusplus
15114      extern "C"
15115 #  endif
15116    int F77_DUMMY_MAIN() { return 1; }
15117 #endif
15118 int
15119 main ()
15120 {
15121 uview_direction_d ();
15122   ;
15123   return 0;
15124 }
15125 _ACEOF
15126 rm -f conftest.$ac_objext conftest$ac_exeext
15127 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15128   (eval $ac_link) 2>&5
15129   ac_status=$?
15130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15131   (exit $ac_status); } &&
15132          { ac_try='test -s conftest$ac_exeext'
15133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15134   (eval $ac_try) 2>&5
15135   ac_status=$?
15136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15137   (exit $ac_status); }; }; then
15138   ac_cv_lib_matrix_uview_direction_d=yes
15139 else
15140   echo "$as_me: failed program was:" >&5
15141 cat conftest.$ac_ext >&5
15142 ac_cv_lib_matrix_uview_direction_d=no
15143 fi
15144 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15145 LIBS=$ac_check_lib_save_LIBS
15146 fi
15147 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
15148 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
15149 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
15150   have_gle=yes; gle_halfassed=no;
15151                       GLE_LIBS="$GLE_LIBS -lmatrix"
15152 fi
15153
15154   CPPFLAGS="$ac_save_CPPFLAGS"
15155   LDFLAGS="$ac_save_LDFLAGS"
15156 #  LIBS="$ac_save_LIBS"
15157
15158     fi
15159   fi
15160
15161   if test "$have_gle" = yes ; then
15162     cat >>confdefs.h <<\_ACEOF
15163 #define HAVE_GLE 1
15164 _ACEOF
15165
15166     if test "$have_gle3" = yes ; then
15167       cat >>confdefs.h <<\_ACEOF
15168 #define HAVE_GLE3 1
15169 _ACEOF
15170
15171     fi
15172   fi
15173
15174 elif test "$with_gle" != no; then
15175   echo "error: must be yes or no: --with-gle=$with_gle"
15176   exit 1
15177
15178 fi
15179
15180
15181
15182 ###############################################################################
15183 #
15184 #       Check for -lXpm.
15185 #
15186 ###############################################################################
15187
15188 have_xpm=no
15189 with_xpm_req=unspecified
15190
15191 # Check whether --with-xpm or --without-xpm was given.
15192 if test "${with_xpm+set}" = set; then
15193   withval="$with_xpm"
15194   with_xpm="$withval"; with_xpm_req="$withval"
15195 else
15196   with_xpm=yes
15197 fi;
15198
15199
15200    case "$with_xpm" in
15201     yes) ;;
15202     no)  ;;
15203
15204     /*)
15205      echo "$as_me:$LINENO: checking for XPM headers" >&5
15206 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
15207      d=$with_xpm/include
15208      if test -d $d; then
15209        X_CFLAGS="-I$d $X_CFLAGS"
15210        echo "$as_me:$LINENO: result: $d" >&5
15211 echo "${ECHO_T}$d" >&6
15212      else
15213        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15214 echo "${ECHO_T}not found ($d: no such directory)" >&6
15215      fi
15216
15217      echo "$as_me:$LINENO: checking for XPM libs" >&5
15218 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
15219      d=$with_xpm/lib
15220      if test -d $d; then
15221        X_LIBS="-L$d $X_LIBS"
15222        echo "$as_me:$LINENO: result: $d" >&5
15223 echo "${ECHO_T}$d" >&6
15224      else
15225        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15226 echo "${ECHO_T}not found ($d: no such directory)" >&6
15227      fi
15228
15229      # replace the directory string with "yes".
15230      with_xpm_req="yes"
15231      with_xpm=$with_xpm_req
15232      ;;
15233
15234     *)
15235      echo ""
15236      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
15237      echo "       If it is a directory, then \`DIR/include' will be added to"
15238      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15239      exit 1
15240      ;;
15241    esac
15242
15243
15244 if test "$with_xpm" = yes; then
15245
15246   ac_save_CPPFLAGS="$CPPFLAGS"
15247   if test \! -z "$includedir" ; then
15248     CPPFLAGS="$CPPFLAGS -I$includedir"
15249   fi
15250   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15251   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
15252 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
15253 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
15254   echo $ECHO_N "(cached) $ECHO_C" >&6
15255 else
15256   cat >conftest.$ac_ext <<_ACEOF
15257 #line $LINENO "configure"
15258 #include "confdefs.h"
15259 #include <X11/Xlib.h>
15260
15261 #include <X11/xpm.h>
15262 _ACEOF
15263 rm -f conftest.$ac_objext
15264 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15265   (eval $ac_compile) 2>&5
15266   ac_status=$?
15267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15268   (exit $ac_status); } &&
15269          { ac_try='test -s conftest.$ac_objext'
15270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15271   (eval $ac_try) 2>&5
15272   ac_status=$?
15273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15274   (exit $ac_status); }; }; then
15275   ac_cv_header_X11_xpm_h=yes
15276 else
15277   echo "$as_me: failed program was:" >&5
15278 cat conftest.$ac_ext >&5
15279 ac_cv_header_X11_xpm_h=no
15280 fi
15281 rm -f conftest.$ac_objext conftest.$ac_ext
15282 fi
15283 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
15284 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
15285 if test $ac_cv_header_X11_xpm_h = yes; then
15286   have_xpm=yes
15287                     cat >>confdefs.h <<\_ACEOF
15288 #define HAVE_XPM 1
15289 _ACEOF
15290
15291                     XPM_LIBS="-lXpm"
15292 fi
15293
15294
15295   CPPFLAGS="$ac_save_CPPFLAGS"
15296 elif test "$with_xpm" != no; then
15297   echo "error: must be yes or no: --with-xpm=$with_xpm"
15298   exit 1
15299 fi
15300
15301 # See comment near $motif_requires_xpm, above.
15302 # Need to do this here, after both Motif and XPM have been checked for.
15303 #
15304 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
15305   if test "$motif_requires_xpm" = yes ; then
15306     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
15307   fi
15308 fi
15309
15310
15311 ###############################################################################
15312 #
15313 #       Check for -lgdk_pixbuf.
15314 #
15315 ###############################################################################
15316
15317 have_gdk_pixbuf=no
15318 with_gdk_pixbuf_req=unspecified
15319
15320 # Check whether --with-pixbuf or --without-pixbuf was given.
15321 if test "${with_pixbuf+set}" = set; then
15322   withval="$with_pixbuf"
15323   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
15324 else
15325   with_gdk_pixbuf=yes
15326 fi;
15327
15328 # if --with-pixbuf=/directory/ was specified, remember that directory so that
15329 # we can also look for the `gdk-pixbuf-config' program in that directory.
15330 case "$with_gdk_pixbuf" in
15331   /*)
15332     gdk_pixbuf_dir="$with_gdk_pixbuf"
15333     ;;
15334   *)
15335     gdk_pixbuf_dir=""
15336     ;;
15337 esac
15338
15339
15340    case "$with_gdk_pixbuf" in
15341     yes) ;;
15342     no)  ;;
15343
15344     /*)
15345      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
15346 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
15347      d=$with_gdk_pixbuf/include
15348      if test -d $d; then
15349        X_CFLAGS="-I$d $X_CFLAGS"
15350        echo "$as_me:$LINENO: result: $d" >&5
15351 echo "${ECHO_T}$d" >&6
15352      else
15353        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15354 echo "${ECHO_T}not found ($d: no such directory)" >&6
15355      fi
15356
15357      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
15358 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
15359      d=$with_gdk_pixbuf/lib
15360      if test -d $d; then
15361        X_LIBS="-L$d $X_LIBS"
15362        echo "$as_me:$LINENO: result: $d" >&5
15363 echo "${ECHO_T}$d" >&6
15364      else
15365        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15366 echo "${ECHO_T}not found ($d: no such directory)" >&6
15367      fi
15368
15369      # replace the directory string with "yes".
15370      with_gdk_pixbuf_req="yes"
15371      with_gdk_pixbuf=$with_gdk_pixbuf_req
15372      ;;
15373
15374     *)
15375      echo ""
15376      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
15377      echo "       If it is a directory, then \`DIR/include' will be added to"
15378      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15379      exit 1
15380      ;;
15381    esac
15382
15383
15384 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
15385   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
15386   exit 1
15387 fi
15388
15389 if test "$with_gdk_pixbuf" = yes; then
15390   have_gdk_pixbuf=no
15391   have_gdk_pixbuf2=no
15392
15393   if test -n "$pkg_config" ; then
15394     #
15395     # the new way...
15396     # run pkg-config based tests.
15397     #
15398     pkgs=''
15399     ok="yes"
15400
15401     # If we have Gtk 2.x, then *only* gdk-pixbuf 2.x will work.
15402     # If we have Gtk 1.x, then *only* gdk-pixbuf 1.x will work.
15403     # If we don't have Gtk at all, then either will work.
15404
15405     if test "$have_gtk" = no -o "$have_gtk2" = yes; then
15406       #
15407       # we don't have Gtk; or we have Gtk 2.x.  Check for pixbuf 2.x.
15408       #
15409       pkg_check_version gdk-pixbuf-2.0      2.0.0
15410       pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
15411       have_gdk_pixbuf="$ok"
15412       have_gdk_pixbuf2="$ok"
15413     fi
15414
15415     if test "$have_gtk" = no -o "$have_gtk2" = no; then
15416       #
15417       # we don't have Gtk; or we have Gtk 1.x.
15418       # If we don't have pixbuf 2.x, then check for pixbuf 1.x.
15419       #
15420       if test "$have_gdk_pixbuf2" = no; then
15421         pkgs=''
15422         ok="yes"
15423         pkg_check_version gdk-pixbuf      0.0
15424         pkg_check_version gdk-pixbuf-xlib 0.0
15425         have_gdk_pixbuf="$ok"
15426       fi
15427     fi
15428
15429     if test "$have_gdk_pixbuf" = yes; then
15430       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
15431 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
15432 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
15433   echo $ECHO_N "(cached) $ECHO_C" >&6
15434 else
15435   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
15436 fi
15437 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
15438 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
15439       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
15440 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
15441 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
15442   echo $ECHO_N "(cached) $ECHO_C" >&6
15443 else
15444   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
15445 fi
15446 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
15447 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
15448     fi
15449     ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
15450     ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
15451   fi
15452
15453
15454   if test "$have_gdk_pixbuf" = no; then
15455     #
15456     # the old way...
15457     # run gdk-pixbuf-config based tests.
15458     # note that we can't assume that the existence of "pkg-config" means
15459     # that we don't have to look for gdk-pixbuf-config -- in Gnome 1.4,
15460     # pkg-config exists, but doesn't know about pixbuf.
15461     #
15462
15463     # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
15464     # look in /foo/bin/ for for gdk-pixbuf-config.
15465     #
15466     gdk_pixbuf_path="$PATH"
15467
15468     if test ! -z "$gtk_dir"; then
15469       # canonicalize slashes.
15470       foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15471       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
15472     fi
15473
15474     if test ! -z "$gnome_dir"; then
15475       # canonicalize slashes.
15476       foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
15477       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
15478     fi
15479
15480     for ac_prog in gdk-pixbuf-config
15481 do
15482   # Extract the first word of "$ac_prog", so it can be a program name with args.
15483 set dummy $ac_prog; ac_word=$2
15484 echo "$as_me:$LINENO: checking for $ac_word" >&5
15485 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15486 if test "${ac_cv_path_gdk_pixbuf_config+set}" = set; then
15487   echo $ECHO_N "(cached) $ECHO_C" >&6
15488 else
15489   case $gdk_pixbuf_config in
15490   [\\/]* | ?:[\\/]*)
15491   ac_cv_path_gdk_pixbuf_config="$gdk_pixbuf_config" # Let the user override the test with a path.
15492   ;;
15493   *)
15494   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15495 for as_dir in $gdk_pixbuf_path
15496 do
15497   IFS=$as_save_IFS
15498   test -z "$as_dir" && as_dir=.
15499   for ac_exec_ext in '' $ac_executable_extensions; do
15500   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15501     ac_cv_path_gdk_pixbuf_config="$as_dir/$ac_word$ac_exec_ext"
15502     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15503     break 2
15504   fi
15505 done
15506 done
15507
15508   ;;
15509 esac
15510 fi
15511 gdk_pixbuf_config=$ac_cv_path_gdk_pixbuf_config
15512
15513 if test -n "$gdk_pixbuf_config"; then
15514   echo "$as_me:$LINENO: result: $gdk_pixbuf_config" >&5
15515 echo "${ECHO_T}$gdk_pixbuf_config" >&6
15516 else
15517   echo "$as_me:$LINENO: result: no" >&5
15518 echo "${ECHO_T}no" >&6
15519 fi
15520
15521   test -n "$gdk_pixbuf_config" && break
15522 done
15523
15524
15525     # If we found the gdk-pixbuf-config program, run it to get flags.
15526     #
15527     if test -n "$gdk_pixbuf_config" ; then
15528       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
15529 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
15530 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
15531   echo $ECHO_N "(cached) $ECHO_C" >&6
15532 else
15533   ac_cv_gdk_pixbuf_config_cflags=`$gdk_pixbuf_config --cflags`
15534 fi
15535 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
15536 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
15537       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
15538 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
15539 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
15540   echo $ECHO_N "(cached) $ECHO_C" >&6
15541 else
15542   ac_cv_gdk_pixbuf_config_libs=`$gdk_pixbuf_config --libs`
15543 fi
15544 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
15545 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
15546
15547       # note that "gdk-pixbuf-config --libs" produces a link line including
15548       # -lgdk_pixbuf, but there's no way to get it to produce one that also
15549       # includes -lgdk_pixbuf_xlib.  Since we don't know *exactly* what the
15550       # name of the library will be, construct it with sed...
15551       # M4 sucks!!
15552
15553       ac_cv_gdk_pixbuf_config_libs=`echo $ac_cv_gdk_pixbuf_config_libs | \
15554        sed 's@ \(-lgdk_pixbuf\([-_a-zA-Z0-9.]*\)\) @ \1 -lgdk_pixbuf_xlib\2 @'`
15555
15556
15557       ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
15558       ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
15559     fi
15560   fi
15561
15562   ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
15563   CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
15564
15565   if test "$have_gdk_pixbuf" = no; then
15566     #
15567     # we appear to have pixbuf; check for headers/libs to be sure.
15568     #
15569
15570     have_gdk_pixbuf=no
15571
15572     # check for header A...
15573
15574   ac_save_CPPFLAGS="$CPPFLAGS"
15575   if test \! -z "$includedir" ; then
15576     CPPFLAGS="$CPPFLAGS -I$includedir"
15577   fi
15578   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15579   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15580   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
15581 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
15582 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15583   echo $ECHO_N "(cached) $ECHO_C" >&6
15584 fi
15585 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
15586 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
15587 else
15588   # Is the header compilable?
15589 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
15590 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
15591 cat >conftest.$ac_ext <<_ACEOF
15592 #line $LINENO "configure"
15593 #include "confdefs.h"
15594 $ac_includes_default
15595 #include <gdk-pixbuf/gdk-pixbuf.h>
15596 _ACEOF
15597 rm -f conftest.$ac_objext
15598 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15599   (eval $ac_compile) 2>&5
15600   ac_status=$?
15601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15602   (exit $ac_status); } &&
15603          { ac_try='test -s conftest.$ac_objext'
15604   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15605   (eval $ac_try) 2>&5
15606   ac_status=$?
15607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15608   (exit $ac_status); }; }; then
15609   ac_header_compiler=yes
15610 else
15611   echo "$as_me: failed program was:" >&5
15612 cat conftest.$ac_ext >&5
15613 ac_header_compiler=no
15614 fi
15615 rm -f conftest.$ac_objext conftest.$ac_ext
15616 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15617 echo "${ECHO_T}$ac_header_compiler" >&6
15618
15619 # Is the header present?
15620 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
15621 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
15622 cat >conftest.$ac_ext <<_ACEOF
15623 #line $LINENO "configure"
15624 #include "confdefs.h"
15625 #include <gdk-pixbuf/gdk-pixbuf.h>
15626 _ACEOF
15627 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15628   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15629   ac_status=$?
15630   egrep -v '^ *\+' conftest.er1 >conftest.err
15631   rm -f conftest.er1
15632   cat conftest.err >&5
15633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15634   (exit $ac_status); } >/dev/null; then
15635   if test -s conftest.err; then
15636     ac_cpp_err=$ac_c_preproc_warn_flag
15637   else
15638     ac_cpp_err=
15639   fi
15640 else
15641   ac_cpp_err=yes
15642 fi
15643 if test -z "$ac_cpp_err"; then
15644   ac_header_preproc=yes
15645 else
15646   echo "$as_me: failed program was:" >&5
15647   cat conftest.$ac_ext >&5
15648   ac_header_preproc=no
15649 fi
15650 rm -f conftest.err conftest.$ac_ext
15651 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15652 echo "${ECHO_T}$ac_header_preproc" >&6
15653
15654 # So?  What about this header?
15655 case $ac_header_compiler:$ac_header_preproc in
15656   yes:no )
15657     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
15658 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15659     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
15660 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;};;
15661   no:yes )
15662     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
15663 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
15664     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&5
15665 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&2;}
15666     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
15667 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;};;
15668 esac
15669 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
15670 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
15671 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
15672   echo $ECHO_N "(cached) $ECHO_C" >&6
15673 else
15674   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
15675 fi
15676 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
15677 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
15678
15679 fi
15680 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
15681   have_gdk_pixbuf=yes
15682 fi
15683
15684
15685   CPPFLAGS="$ac_save_CPPFLAGS"
15686
15687     # if that worked, check for header B...
15688     if test "$have_gdk_pixbuf" = yes; then
15689       have_gdk_pixbuf=no
15690       gdk_pixbuf_halfassed=yes
15691
15692   ac_save_CPPFLAGS="$CPPFLAGS"
15693   if test \! -z "$includedir" ; then
15694     CPPFLAGS="$CPPFLAGS -I$includedir"
15695   fi
15696   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15697   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
15698   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
15699 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
15700 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
15701   echo $ECHO_N "(cached) $ECHO_C" >&6
15702 fi
15703 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
15704 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
15705 else
15706   # Is the header compilable?
15707 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
15708 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
15709 cat >conftest.$ac_ext <<_ACEOF
15710 #line $LINENO "configure"
15711 #include "confdefs.h"
15712 $ac_includes_default
15713 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
15714 _ACEOF
15715 rm -f conftest.$ac_objext
15716 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15717   (eval $ac_compile) 2>&5
15718   ac_status=$?
15719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15720   (exit $ac_status); } &&
15721          { ac_try='test -s conftest.$ac_objext'
15722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15723   (eval $ac_try) 2>&5
15724   ac_status=$?
15725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15726   (exit $ac_status); }; }; then
15727   ac_header_compiler=yes
15728 else
15729   echo "$as_me: failed program was:" >&5
15730 cat conftest.$ac_ext >&5
15731 ac_header_compiler=no
15732 fi
15733 rm -f conftest.$ac_objext conftest.$ac_ext
15734 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15735 echo "${ECHO_T}$ac_header_compiler" >&6
15736
15737 # Is the header present?
15738 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
15739 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
15740 cat >conftest.$ac_ext <<_ACEOF
15741 #line $LINENO "configure"
15742 #include "confdefs.h"
15743 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
15744 _ACEOF
15745 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15746   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15747   ac_status=$?
15748   egrep -v '^ *\+' conftest.er1 >conftest.err
15749   rm -f conftest.er1
15750   cat conftest.err >&5
15751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15752   (exit $ac_status); } >/dev/null; then
15753   if test -s conftest.err; then
15754     ac_cpp_err=$ac_c_preproc_warn_flag
15755   else
15756     ac_cpp_err=
15757   fi
15758 else
15759   ac_cpp_err=yes
15760 fi
15761 if test -z "$ac_cpp_err"; then
15762   ac_header_preproc=yes
15763 else
15764   echo "$as_me: failed program was:" >&5
15765   cat conftest.$ac_ext >&5
15766   ac_header_preproc=no
15767 fi
15768 rm -f conftest.err conftest.$ac_ext
15769 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15770 echo "${ECHO_T}$ac_header_preproc" >&6
15771
15772 # So?  What about this header?
15773 case $ac_header_compiler:$ac_header_preproc in
15774   yes:no )
15775     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15776 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15777     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
15778 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
15779   no:yes )
15780     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
15781 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
15782     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
15783 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
15784     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
15785 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
15786 esac
15787 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
15788 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
15789 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
15790   echo $ECHO_N "(cached) $ECHO_C" >&6
15791 else
15792   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
15793 fi
15794 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
15795 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
15796
15797 fi
15798 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
15799   have_gdk_pixbuf=yes
15800                          gdk_pixbuf_halfassed=no
15801 fi
15802
15803
15804   CPPFLAGS="$ac_save_CPPFLAGS"
15805
15806       # yay, it has a new name in Gtk 2.x...
15807       if test "$have_gdk_pixbuf" = no; then
15808         have_gdk_pixbuf=no
15809         gdk_pixbuf_halfassed=yes
15810
15811   ac_save_CPPFLAGS="$CPPFLAGS"
15812   if test \! -z "$includedir" ; then
15813     CPPFLAGS="$CPPFLAGS -I$includedir"
15814   fi
15815   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15816   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
15817   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
15818 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
15819 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
15820   echo $ECHO_N "(cached) $ECHO_C" >&6
15821 fi
15822 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
15823 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
15824 else
15825   # Is the header compilable?
15826 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
15827 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
15828 cat >conftest.$ac_ext <<_ACEOF
15829 #line $LINENO "configure"
15830 #include "confdefs.h"
15831 $ac_includes_default
15832 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
15833 _ACEOF
15834 rm -f conftest.$ac_objext
15835 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15836   (eval $ac_compile) 2>&5
15837   ac_status=$?
15838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15839   (exit $ac_status); } &&
15840          { ac_try='test -s conftest.$ac_objext'
15841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15842   (eval $ac_try) 2>&5
15843   ac_status=$?
15844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15845   (exit $ac_status); }; }; then
15846   ac_header_compiler=yes
15847 else
15848   echo "$as_me: failed program was:" >&5
15849 cat conftest.$ac_ext >&5
15850 ac_header_compiler=no
15851 fi
15852 rm -f conftest.$ac_objext conftest.$ac_ext
15853 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15854 echo "${ECHO_T}$ac_header_compiler" >&6
15855
15856 # Is the header present?
15857 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
15858 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
15859 cat >conftest.$ac_ext <<_ACEOF
15860 #line $LINENO "configure"
15861 #include "confdefs.h"
15862 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
15863 _ACEOF
15864 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15865   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15866   ac_status=$?
15867   egrep -v '^ *\+' conftest.er1 >conftest.err
15868   rm -f conftest.er1
15869   cat conftest.err >&5
15870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15871   (exit $ac_status); } >/dev/null; then
15872   if test -s conftest.err; then
15873     ac_cpp_err=$ac_c_preproc_warn_flag
15874   else
15875     ac_cpp_err=
15876   fi
15877 else
15878   ac_cpp_err=yes
15879 fi
15880 if test -z "$ac_cpp_err"; then
15881   ac_header_preproc=yes
15882 else
15883   echo "$as_me: failed program was:" >&5
15884   cat conftest.$ac_ext >&5
15885   ac_header_preproc=no
15886 fi
15887 rm -f conftest.err conftest.$ac_ext
15888 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15889 echo "${ECHO_T}$ac_header_preproc" >&6
15890
15891 # So?  What about this header?
15892 case $ac_header_compiler:$ac_header_preproc in
15893   yes:no )
15894     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15895 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15896     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
15897 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
15898   no:yes )
15899     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
15900 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
15901     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
15902 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
15903     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
15904 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;};;
15905 esac
15906 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
15907 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
15908 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
15909   echo $ECHO_N "(cached) $ECHO_C" >&6
15910 else
15911   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
15912 fi
15913 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
15914 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
15915
15916 fi
15917 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
15918   have_gdk_pixbuf=yes
15919                            gdk_pixbuf_halfassed=no
15920 fi
15921
15922
15923   CPPFLAGS="$ac_save_CPPFLAGS"
15924       fi
15925     fi
15926   fi
15927
15928   CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
15929
15930   if test "$have_gdk_pixbuf" = yes; then
15931     # we have the headers, now check for the libraries
15932     have_gdk_pixbuf=no
15933     gdk_pixbuf_halfassed=yes
15934
15935     # library A...
15936
15937   ac_save_CPPFLAGS="$CPPFLAGS"
15938   ac_save_LDFLAGS="$LDFLAGS"
15939 #  ac_save_LIBS="$LIBS"
15940
15941   if test \! -z "$includedir" ; then
15942     CPPFLAGS="$CPPFLAGS -I$includedir"
15943   fi
15944   # note: $X_CFLAGS includes $x_includes
15945   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15946
15947   if test \! -z "$libdir" ; then
15948     LDFLAGS="$LDFLAGS -L$libdir"
15949   fi
15950   # note: $X_LIBS includes $x_libraries
15951   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15952
15953   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
15954 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
15955 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
15956   echo $ECHO_N "(cached) $ECHO_C" >&6
15957 else
15958   ac_check_lib_save_LIBS=$LIBS
15959 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
15960 cat >conftest.$ac_ext <<_ACEOF
15961 #line $LINENO "configure"
15962 #include "confdefs.h"
15963
15964 /* Override any gcc2 internal prototype to avoid an error.  */
15965 #ifdef __cplusplus
15966 extern "C"
15967 #endif
15968 /* We use char because int might match the return type of a gcc2
15969    builtin and then its argument prototype would still apply.  */
15970 char gdk_pixbuf_new_from_file ();
15971 #ifdef F77_DUMMY_MAIN
15972 #  ifdef __cplusplus
15973      extern "C"
15974 #  endif
15975    int F77_DUMMY_MAIN() { return 1; }
15976 #endif
15977 int
15978 main ()
15979 {
15980 gdk_pixbuf_new_from_file ();
15981   ;
15982   return 0;
15983 }
15984 _ACEOF
15985 rm -f conftest.$ac_objext conftest$ac_exeext
15986 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15987   (eval $ac_link) 2>&5
15988   ac_status=$?
15989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15990   (exit $ac_status); } &&
15991          { ac_try='test -s conftest$ac_exeext'
15992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15993   (eval $ac_try) 2>&5
15994   ac_status=$?
15995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15996   (exit $ac_status); }; }; then
15997   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
15998 else
15999   echo "$as_me: failed program was:" >&5
16000 cat conftest.$ac_ext >&5
16001 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
16002 fi
16003 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16004 LIBS=$ac_check_lib_save_LIBS
16005 fi
16006 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
16007 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
16008 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
16009   have_gdk_pixbuf=yes
16010 fi
16011
16012   CPPFLAGS="$ac_save_CPPFLAGS"
16013   LDFLAGS="$ac_save_LDFLAGS"
16014 #  LIBS="$ac_save_LIBS"
16015
16016     # library B...
16017     if test "$have_gdk_pixbuf" = yes; then
16018       have_gdk_pixbuf=no
16019
16020   ac_save_CPPFLAGS="$CPPFLAGS"
16021   ac_save_LDFLAGS="$LDFLAGS"
16022 #  ac_save_LIBS="$LIBS"
16023
16024   if test \! -z "$includedir" ; then
16025     CPPFLAGS="$CPPFLAGS -I$includedir"
16026   fi
16027   # note: $X_CFLAGS includes $x_includes
16028   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16029
16030   if test \! -z "$libdir" ; then
16031     LDFLAGS="$LDFLAGS -L$libdir"
16032   fi
16033   # note: $X_LIBS includes $x_libraries
16034   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16035
16036   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
16037 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
16038 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
16039   echo $ECHO_N "(cached) $ECHO_C" >&6
16040 else
16041   ac_check_lib_save_LIBS=$LIBS
16042 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
16043 cat >conftest.$ac_ext <<_ACEOF
16044 #line $LINENO "configure"
16045 #include "confdefs.h"
16046
16047 /* Override any gcc2 internal prototype to avoid an error.  */
16048 #ifdef __cplusplus
16049 extern "C"
16050 #endif
16051 /* We use char because int might match the return type of a gcc2
16052    builtin and then its argument prototype would still apply.  */
16053 char gdk_pixbuf_xlib_init ();
16054 #ifdef F77_DUMMY_MAIN
16055 #  ifdef __cplusplus
16056      extern "C"
16057 #  endif
16058    int F77_DUMMY_MAIN() { return 1; }
16059 #endif
16060 int
16061 main ()
16062 {
16063 gdk_pixbuf_xlib_init ();
16064   ;
16065   return 0;
16066 }
16067 _ACEOF
16068 rm -f conftest.$ac_objext conftest$ac_exeext
16069 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16070   (eval $ac_link) 2>&5
16071   ac_status=$?
16072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16073   (exit $ac_status); } &&
16074          { ac_try='test -s conftest$ac_exeext'
16075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16076   (eval $ac_try) 2>&5
16077   ac_status=$?
16078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16079   (exit $ac_status); }; }; then
16080   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
16081 else
16082   echo "$as_me: failed program was:" >&5
16083 cat conftest.$ac_ext >&5
16084 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
16085 fi
16086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16087 LIBS=$ac_check_lib_save_LIBS
16088 fi
16089 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
16090 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
16091 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
16092   have_gdk_pixbuf=yes
16093                       gdk_pixbuf_halfassed=no
16094 fi
16095
16096   CPPFLAGS="$ac_save_CPPFLAGS"
16097   LDFLAGS="$ac_save_LDFLAGS"
16098 #  LIBS="$ac_save_LIBS"
16099
16100     fi
16101   fi
16102
16103   if test "$have_gdk_pixbuf" = yes; then
16104     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
16105     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
16106     cat >>confdefs.h <<\_ACEOF
16107 #define HAVE_GDK_PIXBUF 1
16108 _ACEOF
16109
16110   else
16111     have_gdk_pixbuf2=no
16112   fi
16113 fi
16114
16115
16116 ###############################################################################
16117 #
16118 #       Check for -ljpeg
16119 #
16120 ###############################################################################
16121
16122 have_jpeg=no
16123 with_jpeg_req=unspecified
16124 jpeg_halfassed=no
16125
16126 # Check whether --with-jpeg or --without-jpeg was given.
16127 if test "${with_jpeg+set}" = set; then
16128   withval="$with_jpeg"
16129   with_jpeg="$withval"; with_jpeg_req="$withval"
16130 else
16131   with_jpeg=yes
16132 fi;
16133
16134
16135    case "$with_jpeg" in
16136     yes) ;;
16137     no)  ;;
16138
16139     /*)
16140      echo "$as_me:$LINENO: checking for JPEG headers" >&5
16141 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
16142      d=$with_jpeg/include
16143      if test -d $d; then
16144        X_CFLAGS="-I$d $X_CFLAGS"
16145        echo "$as_me:$LINENO: result: $d" >&5
16146 echo "${ECHO_T}$d" >&6
16147      else
16148        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16149 echo "${ECHO_T}not found ($d: no such directory)" >&6
16150      fi
16151
16152      echo "$as_me:$LINENO: checking for JPEG libs" >&5
16153 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
16154      d=$with_jpeg/lib
16155      if test -d $d; then
16156        X_LIBS="-L$d $X_LIBS"
16157        echo "$as_me:$LINENO: result: $d" >&5
16158 echo "${ECHO_T}$d" >&6
16159      else
16160        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16161 echo "${ECHO_T}not found ($d: no such directory)" >&6
16162      fi
16163
16164      # replace the directory string with "yes".
16165      with_jpeg_req="yes"
16166      with_jpeg=$with_jpeg_req
16167      ;;
16168
16169     *)
16170      echo ""
16171      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
16172      echo "       If it is a directory, then \`DIR/include' will be added to"
16173      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16174      exit 1
16175      ;;
16176    esac
16177
16178
16179 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
16180   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
16181   exit 1
16182 fi
16183
16184 if test "$with_jpeg" = yes; then
16185
16186   have_jpeg=no
16187
16188   ac_save_CPPFLAGS="$CPPFLAGS"
16189   if test \! -z "$includedir" ; then
16190     CPPFLAGS="$CPPFLAGS -I$includedir"
16191   fi
16192   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16193   if test "${ac_cv_header_jpeglib_h+set}" = set; then
16194   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
16195 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
16196 if test "${ac_cv_header_jpeglib_h+set}" = set; then
16197   echo $ECHO_N "(cached) $ECHO_C" >&6
16198 fi
16199 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
16200 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
16201 else
16202   # Is the header compilable?
16203 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
16204 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
16205 cat >conftest.$ac_ext <<_ACEOF
16206 #line $LINENO "configure"
16207 #include "confdefs.h"
16208 $ac_includes_default
16209 #include <jpeglib.h>
16210 _ACEOF
16211 rm -f conftest.$ac_objext
16212 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16213   (eval $ac_compile) 2>&5
16214   ac_status=$?
16215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16216   (exit $ac_status); } &&
16217          { ac_try='test -s conftest.$ac_objext'
16218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16219   (eval $ac_try) 2>&5
16220   ac_status=$?
16221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16222   (exit $ac_status); }; }; then
16223   ac_header_compiler=yes
16224 else
16225   echo "$as_me: failed program was:" >&5
16226 cat conftest.$ac_ext >&5
16227 ac_header_compiler=no
16228 fi
16229 rm -f conftest.$ac_objext conftest.$ac_ext
16230 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16231 echo "${ECHO_T}$ac_header_compiler" >&6
16232
16233 # Is the header present?
16234 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
16235 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
16236 cat >conftest.$ac_ext <<_ACEOF
16237 #line $LINENO "configure"
16238 #include "confdefs.h"
16239 #include <jpeglib.h>
16240 _ACEOF
16241 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16242   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16243   ac_status=$?
16244   egrep -v '^ *\+' conftest.er1 >conftest.err
16245   rm -f conftest.er1
16246   cat conftest.err >&5
16247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16248   (exit $ac_status); } >/dev/null; then
16249   if test -s conftest.err; then
16250     ac_cpp_err=$ac_c_preproc_warn_flag
16251   else
16252     ac_cpp_err=
16253   fi
16254 else
16255   ac_cpp_err=yes
16256 fi
16257 if test -z "$ac_cpp_err"; then
16258   ac_header_preproc=yes
16259 else
16260   echo "$as_me: failed program was:" >&5
16261   cat conftest.$ac_ext >&5
16262   ac_header_preproc=no
16263 fi
16264 rm -f conftest.err conftest.$ac_ext
16265 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16266 echo "${ECHO_T}$ac_header_preproc" >&6
16267
16268 # So?  What about this header?
16269 case $ac_header_compiler:$ac_header_preproc in
16270   yes:no )
16271     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16272 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16273     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
16274 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;};;
16275   no:yes )
16276     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
16277 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
16278     { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5
16279 echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;}
16280     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
16281 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;};;
16282 esac
16283 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
16284 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
16285 if test "${ac_cv_header_jpeglib_h+set}" = set; then
16286   echo $ECHO_N "(cached) $ECHO_C" >&6
16287 else
16288   ac_cv_header_jpeglib_h=$ac_header_preproc
16289 fi
16290 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
16291 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
16292
16293 fi
16294 if test $ac_cv_header_jpeglib_h = yes; then
16295   have_jpeg=yes
16296 fi
16297
16298
16299   CPPFLAGS="$ac_save_CPPFLAGS"
16300
16301   if test "$have_jpeg" = yes; then
16302     # we have the header, now check for the library
16303     have_jpeg=no
16304     jpeg_halfassed=yes
16305
16306   ac_save_CPPFLAGS="$CPPFLAGS"
16307   ac_save_LDFLAGS="$LDFLAGS"
16308 #  ac_save_LIBS="$LIBS"
16309
16310   if test \! -z "$includedir" ; then
16311     CPPFLAGS="$CPPFLAGS -I$includedir"
16312   fi
16313   # note: $X_CFLAGS includes $x_includes
16314   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16315
16316   if test \! -z "$libdir" ; then
16317     LDFLAGS="$LDFLAGS -L$libdir"
16318   fi
16319   # note: $X_LIBS includes $x_libraries
16320   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16321
16322   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
16323 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
16324 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
16325   echo $ECHO_N "(cached) $ECHO_C" >&6
16326 else
16327   ac_check_lib_save_LIBS=$LIBS
16328 LIBS="-ljpeg  $LIBS"
16329 cat >conftest.$ac_ext <<_ACEOF
16330 #line $LINENO "configure"
16331 #include "confdefs.h"
16332
16333 /* Override any gcc2 internal prototype to avoid an error.  */
16334 #ifdef __cplusplus
16335 extern "C"
16336 #endif
16337 /* We use char because int might match the return type of a gcc2
16338    builtin and then its argument prototype would still apply.  */
16339 char jpeg_start_compress ();
16340 #ifdef F77_DUMMY_MAIN
16341 #  ifdef __cplusplus
16342      extern "C"
16343 #  endif
16344    int F77_DUMMY_MAIN() { return 1; }
16345 #endif
16346 int
16347 main ()
16348 {
16349 jpeg_start_compress ();
16350   ;
16351   return 0;
16352 }
16353 _ACEOF
16354 rm -f conftest.$ac_objext conftest$ac_exeext
16355 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16356   (eval $ac_link) 2>&5
16357   ac_status=$?
16358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16359   (exit $ac_status); } &&
16360          { ac_try='test -s conftest$ac_exeext'
16361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16362   (eval $ac_try) 2>&5
16363   ac_status=$?
16364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16365   (exit $ac_status); }; }; then
16366   ac_cv_lib_jpeg_jpeg_start_compress=yes
16367 else
16368   echo "$as_me: failed program was:" >&5
16369 cat conftest.$ac_ext >&5
16370 ac_cv_lib_jpeg_jpeg_start_compress=no
16371 fi
16372 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16373 LIBS=$ac_check_lib_save_LIBS
16374 fi
16375 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
16376 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
16377 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
16378   have_jpeg=yes
16379                     jpeg_halfassed=no
16380                     JPEG_LIBS="-ljpeg"
16381                     cat >>confdefs.h <<\_ACEOF
16382 #define HAVE_JPEGLIB 1
16383 _ACEOF
16384
16385 fi
16386
16387   CPPFLAGS="$ac_save_CPPFLAGS"
16388   LDFLAGS="$ac_save_LDFLAGS"
16389 #  LIBS="$ac_save_LIBS"
16390
16391   fi
16392 fi
16393
16394
16395 ###############################################################################
16396 #
16397 #       Check for the XSHM server extension.
16398 #
16399 ###############################################################################
16400
16401 have_xshm=no
16402 with_xshm_req=unspecified
16403
16404 # Check whether --with-xshm-ext or --without-xshm-ext was given.
16405 if test "${with_xshm_ext+set}" = set; then
16406   withval="$with_xshm_ext"
16407   with_xshm="$withval"; with_xshm_req="$withval"
16408 else
16409   with_xshm=yes
16410 fi;
16411
16412
16413    case "$with_xshm" in
16414     yes) ;;
16415     no)  ;;
16416
16417     /*)
16418      echo "$as_me:$LINENO: checking for XSHM headers" >&5
16419 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
16420      d=$with_xshm/include
16421      if test -d $d; then
16422        X_CFLAGS="-I$d $X_CFLAGS"
16423        echo "$as_me:$LINENO: result: $d" >&5
16424 echo "${ECHO_T}$d" >&6
16425      else
16426        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16427 echo "${ECHO_T}not found ($d: no such directory)" >&6
16428      fi
16429
16430      echo "$as_me:$LINENO: checking for XSHM libs" >&5
16431 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
16432      d=$with_xshm/lib
16433      if test -d $d; then
16434        X_LIBS="-L$d $X_LIBS"
16435        echo "$as_me:$LINENO: result: $d" >&5
16436 echo "${ECHO_T}$d" >&6
16437      else
16438        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16439 echo "${ECHO_T}not found ($d: no such directory)" >&6
16440      fi
16441
16442      # replace the directory string with "yes".
16443      with_xshm_req="yes"
16444      with_xshm=$with_xshm_req
16445      ;;
16446
16447     *)
16448      echo ""
16449      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
16450      echo "       If it is a directory, then \`DIR/include' will be added to"
16451      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16452      exit 1
16453      ;;
16454    esac
16455
16456
16457 if test "$with_xshm" = yes; then
16458
16459   # first check for Xshm.h.
16460
16461   ac_save_CPPFLAGS="$CPPFLAGS"
16462   if test \! -z "$includedir" ; then
16463     CPPFLAGS="$CPPFLAGS -I$includedir"
16464   fi
16465   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16466   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
16467 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
16468 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
16469   echo $ECHO_N "(cached) $ECHO_C" >&6
16470 else
16471   cat >conftest.$ac_ext <<_ACEOF
16472 #line $LINENO "configure"
16473 #include "confdefs.h"
16474 #include <X11/Xlib.h>
16475
16476 #include <X11/extensions/XShm.h>
16477 _ACEOF
16478 rm -f conftest.$ac_objext
16479 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16480   (eval $ac_compile) 2>&5
16481   ac_status=$?
16482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16483   (exit $ac_status); } &&
16484          { ac_try='test -s conftest.$ac_objext'
16485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16486   (eval $ac_try) 2>&5
16487   ac_status=$?
16488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16489   (exit $ac_status); }; }; then
16490   ac_cv_header_X11_extensions_XShm_h=yes
16491 else
16492   echo "$as_me: failed program was:" >&5
16493 cat conftest.$ac_ext >&5
16494 ac_cv_header_X11_extensions_XShm_h=no
16495 fi
16496 rm -f conftest.$ac_objext conftest.$ac_ext
16497 fi
16498 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
16499 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
16500 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
16501   have_xshm=yes
16502 fi
16503
16504
16505   CPPFLAGS="$ac_save_CPPFLAGS"
16506
16507   # if that succeeded, then check for sys/ipc.h.
16508   if test "$have_xshm" = yes; then
16509     have_xshm=no
16510
16511   ac_save_CPPFLAGS="$CPPFLAGS"
16512   if test \! -z "$includedir" ; then
16513     CPPFLAGS="$CPPFLAGS -I$includedir"
16514   fi
16515   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16516   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16517   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
16518 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
16519 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16520   echo $ECHO_N "(cached) $ECHO_C" >&6
16521 fi
16522 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
16523 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
16524 else
16525   # Is the header compilable?
16526 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
16527 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
16528 cat >conftest.$ac_ext <<_ACEOF
16529 #line $LINENO "configure"
16530 #include "confdefs.h"
16531 $ac_includes_default
16532 #include <sys/ipc.h>
16533 _ACEOF
16534 rm -f conftest.$ac_objext
16535 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16536   (eval $ac_compile) 2>&5
16537   ac_status=$?
16538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16539   (exit $ac_status); } &&
16540          { ac_try='test -s conftest.$ac_objext'
16541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16542   (eval $ac_try) 2>&5
16543   ac_status=$?
16544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16545   (exit $ac_status); }; }; then
16546   ac_header_compiler=yes
16547 else
16548   echo "$as_me: failed program was:" >&5
16549 cat conftest.$ac_ext >&5
16550 ac_header_compiler=no
16551 fi
16552 rm -f conftest.$ac_objext conftest.$ac_ext
16553 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16554 echo "${ECHO_T}$ac_header_compiler" >&6
16555
16556 # Is the header present?
16557 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
16558 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
16559 cat >conftest.$ac_ext <<_ACEOF
16560 #line $LINENO "configure"
16561 #include "confdefs.h"
16562 #include <sys/ipc.h>
16563 _ACEOF
16564 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16565   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16566   ac_status=$?
16567   egrep -v '^ *\+' conftest.er1 >conftest.err
16568   rm -f conftest.er1
16569   cat conftest.err >&5
16570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16571   (exit $ac_status); } >/dev/null; then
16572   if test -s conftest.err; then
16573     ac_cpp_err=$ac_c_preproc_warn_flag
16574   else
16575     ac_cpp_err=
16576   fi
16577 else
16578   ac_cpp_err=yes
16579 fi
16580 if test -z "$ac_cpp_err"; then
16581   ac_header_preproc=yes
16582 else
16583   echo "$as_me: failed program was:" >&5
16584   cat conftest.$ac_ext >&5
16585   ac_header_preproc=no
16586 fi
16587 rm -f conftest.err conftest.$ac_ext
16588 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16589 echo "${ECHO_T}$ac_header_preproc" >&6
16590
16591 # So?  What about this header?
16592 case $ac_header_compiler:$ac_header_preproc in
16593   yes:no )
16594     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
16595 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16596     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
16597 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;};;
16598   no:yes )
16599     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
16600 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
16601     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&5
16602 echo "$as_me: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&2;}
16603     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
16604 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;};;
16605 esac
16606 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
16607 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
16608 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
16609   echo $ECHO_N "(cached) $ECHO_C" >&6
16610 else
16611   ac_cv_header_sys_ipc_h=$ac_header_preproc
16612 fi
16613 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
16614 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
16615
16616 fi
16617 if test $ac_cv_header_sys_ipc_h = yes; then
16618   have_xshm=yes
16619 fi
16620
16621
16622   CPPFLAGS="$ac_save_CPPFLAGS"
16623   fi
16624
16625   # if that succeeded, then check for sys/shm.h.
16626   if test "$have_xshm" = yes; then
16627     have_xshm=no
16628
16629   ac_save_CPPFLAGS="$CPPFLAGS"
16630   if test \! -z "$includedir" ; then
16631     CPPFLAGS="$CPPFLAGS -I$includedir"
16632   fi
16633   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16634   if test "${ac_cv_header_sys_shm_h+set}" = set; then
16635   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
16636 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
16637 if test "${ac_cv_header_sys_shm_h+set}" = set; then
16638   echo $ECHO_N "(cached) $ECHO_C" >&6
16639 fi
16640 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
16641 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
16642 else
16643   # Is the header compilable?
16644 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
16645 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
16646 cat >conftest.$ac_ext <<_ACEOF
16647 #line $LINENO "configure"
16648 #include "confdefs.h"
16649 $ac_includes_default
16650 #include <sys/shm.h>
16651 _ACEOF
16652 rm -f conftest.$ac_objext
16653 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16654   (eval $ac_compile) 2>&5
16655   ac_status=$?
16656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16657   (exit $ac_status); } &&
16658          { ac_try='test -s conftest.$ac_objext'
16659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16660   (eval $ac_try) 2>&5
16661   ac_status=$?
16662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16663   (exit $ac_status); }; }; then
16664   ac_header_compiler=yes
16665 else
16666   echo "$as_me: failed program was:" >&5
16667 cat conftest.$ac_ext >&5
16668 ac_header_compiler=no
16669 fi
16670 rm -f conftest.$ac_objext conftest.$ac_ext
16671 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16672 echo "${ECHO_T}$ac_header_compiler" >&6
16673
16674 # Is the header present?
16675 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
16676 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
16677 cat >conftest.$ac_ext <<_ACEOF
16678 #line $LINENO "configure"
16679 #include "confdefs.h"
16680 #include <sys/shm.h>
16681 _ACEOF
16682 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16683   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16684   ac_status=$?
16685   egrep -v '^ *\+' conftest.er1 >conftest.err
16686   rm -f conftest.er1
16687   cat conftest.err >&5
16688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16689   (exit $ac_status); } >/dev/null; then
16690   if test -s conftest.err; then
16691     ac_cpp_err=$ac_c_preproc_warn_flag
16692   else
16693     ac_cpp_err=
16694   fi
16695 else
16696   ac_cpp_err=yes
16697 fi
16698 if test -z "$ac_cpp_err"; then
16699   ac_header_preproc=yes
16700 else
16701   echo "$as_me: failed program was:" >&5
16702   cat conftest.$ac_ext >&5
16703   ac_header_preproc=no
16704 fi
16705 rm -f conftest.err conftest.$ac_ext
16706 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16707 echo "${ECHO_T}$ac_header_preproc" >&6
16708
16709 # So?  What about this header?
16710 case $ac_header_compiler:$ac_header_preproc in
16711   yes:no )
16712     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
16713 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16714     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
16715 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;};;
16716   no:yes )
16717     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
16718 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
16719     { echo "$as_me:$LINENO: WARNING: sys/shm.h: check for missing prerequisite headers?" >&5
16720 echo "$as_me: WARNING: sys/shm.h: check for missing prerequisite headers?" >&2;}
16721     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
16722 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;};;
16723 esac
16724 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
16725 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
16726 if test "${ac_cv_header_sys_shm_h+set}" = set; then
16727   echo $ECHO_N "(cached) $ECHO_C" >&6
16728 else
16729   ac_cv_header_sys_shm_h=$ac_header_preproc
16730 fi
16731 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
16732 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
16733
16734 fi
16735 if test $ac_cv_header_sys_shm_h = yes; then
16736   have_xshm=yes
16737 fi
16738
16739
16740   CPPFLAGS="$ac_save_CPPFLAGS"
16741   fi
16742
16743   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
16744   # to exist, but the library code to not exist.  And even better, the library
16745   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
16746   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
16747   # that's not quite right, but close enough.)
16748   #
16749   case "$host" in
16750     *-aix*)
16751       if  `uname -v` -eq 3 ; then
16752         have_xshm=no
16753
16754   ac_save_CPPFLAGS="$CPPFLAGS"
16755   ac_save_LDFLAGS="$LDFLAGS"
16756 #  ac_save_LIBS="$LIBS"
16757
16758   if test \! -z "$includedir" ; then
16759     CPPFLAGS="$CPPFLAGS -I$includedir"
16760   fi
16761   # note: $X_CFLAGS includes $x_includes
16762   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16763
16764   if test \! -z "$libdir" ; then
16765     LDFLAGS="$LDFLAGS -L$libdir"
16766   fi
16767   # note: $X_LIBS includes $x_libraries
16768   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16769
16770   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
16771 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
16772 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
16773   echo $ECHO_N "(cached) $ECHO_C" >&6
16774 else
16775   ac_check_lib_save_LIBS=$LIBS
16776 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
16777 cat >conftest.$ac_ext <<_ACEOF
16778 #line $LINENO "configure"
16779 #include "confdefs.h"
16780
16781 /* Override any gcc2 internal prototype to avoid an error.  */
16782 #ifdef __cplusplus
16783 extern "C"
16784 #endif
16785 /* We use char because int might match the return type of a gcc2
16786    builtin and then its argument prototype would still apply.  */
16787 char XShmQueryExtension ();
16788 #ifdef F77_DUMMY_MAIN
16789 #  ifdef __cplusplus
16790      extern "C"
16791 #  endif
16792    int F77_DUMMY_MAIN() { return 1; }
16793 #endif
16794 int
16795 main ()
16796 {
16797 XShmQueryExtension ();
16798   ;
16799   return 0;
16800 }
16801 _ACEOF
16802 rm -f conftest.$ac_objext conftest$ac_exeext
16803 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16804   (eval $ac_link) 2>&5
16805   ac_status=$?
16806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16807   (exit $ac_status); } &&
16808          { ac_try='test -s conftest$ac_exeext'
16809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16810   (eval $ac_try) 2>&5
16811   ac_status=$?
16812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16813   (exit $ac_status); }; }; then
16814   ac_cv_lib_XextSam_XShmQueryExtension=yes
16815 else
16816   echo "$as_me: failed program was:" >&5
16817 cat conftest.$ac_ext >&5
16818 ac_cv_lib_XextSam_XShmQueryExtension=no
16819 fi
16820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16821 LIBS=$ac_check_lib_save_LIBS
16822 fi
16823 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
16824 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
16825 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
16826   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
16827 else
16828   true
16829 fi
16830
16831   CPPFLAGS="$ac_save_CPPFLAGS"
16832   LDFLAGS="$ac_save_LDFLAGS"
16833 #  LIBS="$ac_save_LIBS"
16834
16835       fi
16836     ;;
16837   esac
16838
16839   # if that succeeded, then we've really got it.
16840   if test "$have_xshm" = yes; then
16841     cat >>confdefs.h <<\_ACEOF
16842 #define HAVE_XSHM_EXTENSION 1
16843 _ACEOF
16844
16845   fi
16846
16847 elif test "$with_xshm" != no; then
16848   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
16849   exit 1
16850 fi
16851
16852
16853 ###############################################################################
16854 #
16855 #       Check for the DOUBLE-BUFFER server extension.
16856 #
16857 ###############################################################################
16858
16859 have_xdbe=no
16860 with_xdbe_req=unspecified
16861
16862 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
16863 if test "${with_xdbe_ext+set}" = set; then
16864   withval="$with_xdbe_ext"
16865   with_xdbe="$withval"; with_xdbe_req="$withval"
16866 else
16867   with_xdbe=yes
16868 fi;
16869
16870
16871    case "$with_xdbe" in
16872     yes) ;;
16873     no)  ;;
16874
16875     /*)
16876      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
16877 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
16878      d=$with_xdbe/include
16879      if test -d $d; then
16880        X_CFLAGS="-I$d $X_CFLAGS"
16881        echo "$as_me:$LINENO: result: $d" >&5
16882 echo "${ECHO_T}$d" >&6
16883      else
16884        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16885 echo "${ECHO_T}not found ($d: no such directory)" >&6
16886      fi
16887
16888      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
16889 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
16890      d=$with_xdbe/lib
16891      if test -d $d; then
16892        X_LIBS="-L$d $X_LIBS"
16893        echo "$as_me:$LINENO: result: $d" >&5
16894 echo "${ECHO_T}$d" >&6
16895      else
16896        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16897 echo "${ECHO_T}not found ($d: no such directory)" >&6
16898      fi
16899
16900      # replace the directory string with "yes".
16901      with_xdbe_req="yes"
16902      with_xdbe=$with_xdbe_req
16903      ;;
16904
16905     *)
16906      echo ""
16907      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
16908      echo "       If it is a directory, then \`DIR/include' will be added to"
16909      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16910      exit 1
16911      ;;
16912    esac
16913
16914
16915 if test "$with_xdbe" = yes; then
16916
16917
16918   ac_save_CPPFLAGS="$CPPFLAGS"
16919   if test \! -z "$includedir" ; then
16920     CPPFLAGS="$CPPFLAGS -I$includedir"
16921   fi
16922   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16923   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
16924 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
16925 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
16926   echo $ECHO_N "(cached) $ECHO_C" >&6
16927 else
16928   cat >conftest.$ac_ext <<_ACEOF
16929 #line $LINENO "configure"
16930 #include "confdefs.h"
16931 #include <X11/Xlib.h>
16932
16933 #include <X11/extensions/Xdbe.h>
16934 _ACEOF
16935 rm -f conftest.$ac_objext
16936 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16937   (eval $ac_compile) 2>&5
16938   ac_status=$?
16939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16940   (exit $ac_status); } &&
16941          { ac_try='test -s conftest.$ac_objext'
16942   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16943   (eval $ac_try) 2>&5
16944   ac_status=$?
16945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16946   (exit $ac_status); }; }; then
16947   ac_cv_header_X11_extensions_Xdbe_h=yes
16948 else
16949   echo "$as_me: failed program was:" >&5
16950 cat conftest.$ac_ext >&5
16951 ac_cv_header_X11_extensions_Xdbe_h=no
16952 fi
16953 rm -f conftest.$ac_objext conftest.$ac_ext
16954 fi
16955 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
16956 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
16957 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
16958   have_xdbe=yes
16959 fi
16960
16961
16962   CPPFLAGS="$ac_save_CPPFLAGS"
16963   if test "$have_xdbe" = yes; then
16964     cat >>confdefs.h <<\_ACEOF
16965 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
16966 _ACEOF
16967
16968   fi
16969
16970 elif test "$with_xdbe" != no; then
16971   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
16972   exit 1
16973 fi
16974
16975
16976 ###############################################################################
16977 #
16978 #       Check for the SGI XReadDisplay server extension.
16979 #
16980 #       Note: this has to be down here, rather than up with the other server
16981 #       extension tests, so that the output of `configure --help' is in the
16982 #       right order.  Arrgh!
16983 #
16984 ###############################################################################
16985
16986 have_readdisplay=no
16987 with_readdisplay_req=unspecified
16988
16989 # Check whether --with-readdisplay or --without-readdisplay was given.
16990 if test "${with_readdisplay+set}" = set; then
16991   withval="$with_readdisplay"
16992   with_readdisplay="$withval"; with_readdisplay_req="$withval"
16993 else
16994   with_readdisplay=yes
16995 fi;
16996
16997
16998    case "$with_readdisplay" in
16999     yes) ;;
17000     no)  ;;
17001
17002     /*)
17003      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
17004 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
17005      d=$with_readdisplay/include
17006      if test -d $d; then
17007        X_CFLAGS="-I$d $X_CFLAGS"
17008        echo "$as_me:$LINENO: result: $d" >&5
17009 echo "${ECHO_T}$d" >&6
17010      else
17011        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17012 echo "${ECHO_T}not found ($d: no such directory)" >&6
17013      fi
17014
17015      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
17016 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
17017      d=$with_readdisplay/lib
17018      if test -d $d; then
17019        X_LIBS="-L$d $X_LIBS"
17020        echo "$as_me:$LINENO: result: $d" >&5
17021 echo "${ECHO_T}$d" >&6
17022      else
17023        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17024 echo "${ECHO_T}not found ($d: no such directory)" >&6
17025      fi
17026
17027      # replace the directory string with "yes".
17028      with_readdisplay_req="yes"
17029      with_readdisplay=$with_readdisplay_req
17030      ;;
17031
17032     *)
17033      echo ""
17034      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
17035      echo "       If it is a directory, then \`DIR/include' will be added to"
17036      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17037      exit 1
17038      ;;
17039    esac
17040
17041
17042 if test "$with_readdisplay" = yes; then
17043
17044   ac_save_CPPFLAGS="$CPPFLAGS"
17045   if test \! -z "$includedir" ; then
17046     CPPFLAGS="$CPPFLAGS -I$includedir"
17047   fi
17048   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17049   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
17050 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
17051 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
17052   echo $ECHO_N "(cached) $ECHO_C" >&6
17053 else
17054   cat >conftest.$ac_ext <<_ACEOF
17055 #line $LINENO "configure"
17056 #include "confdefs.h"
17057 #include <X11/Xlib.h>
17058
17059 #include <X11/extensions/readdisplay.h>
17060 _ACEOF
17061 rm -f conftest.$ac_objext
17062 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17063   (eval $ac_compile) 2>&5
17064   ac_status=$?
17065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17066   (exit $ac_status); } &&
17067          { ac_try='test -s conftest.$ac_objext'
17068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17069   (eval $ac_try) 2>&5
17070   ac_status=$?
17071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17072   (exit $ac_status); }; }; then
17073   ac_cv_header_X11_extensions_readdisplay_h=yes
17074 else
17075   echo "$as_me: failed program was:" >&5
17076 cat conftest.$ac_ext >&5
17077 ac_cv_header_X11_extensions_readdisplay_h=no
17078 fi
17079 rm -f conftest.$ac_objext conftest.$ac_ext
17080 fi
17081 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
17082 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
17083 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
17084   cat >>confdefs.h <<\_ACEOF
17085 #define HAVE_READ_DISPLAY_EXTENSION 1
17086 _ACEOF
17087
17088 fi
17089
17090
17091   CPPFLAGS="$ac_save_CPPFLAGS"
17092 elif test "$with_readdisplay" != no; then
17093   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
17094   exit 1
17095 fi
17096
17097
17098 ###############################################################################
17099 #
17100 #       Check for a program to generate random text.
17101 #
17102 #       Zippy is funnier than the idiocy generally spat out by `fortune',
17103 #       so first see if "fortune zippy" works.  Else, use plain "fortune".
17104 #
17105 #       We used to dig around in Emacs to look for the "yow" program, but
17106 #       most people who have Emacs also have "fortune zippy", so nevermind.
17107 #
17108 ###############################################################################
17109
17110 with_fortune_req=""
17111
17112 # Check whether --with-fortune or --without-fortune was given.
17113 if test "${with_fortune+set}" = set; then
17114   withval="$with_fortune"
17115   with_fortune_req="$withval"; with_fortune="$withval"
17116 else
17117   with_fortune=yes
17118 fi;
17119
17120 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
17121   with_fortune=""
17122   with_fortune_req=""
17123 fi
17124
17125 if test -n "$with_fortune_req" ; then
17126   ac_cv_fortune_program=""
17127   case "$with_fortune_req" in
17128     /*)
17129
17130       set dummy $with_fortune_req ; fortune_tmp=$2
17131       echo "$as_me:$LINENO: checking for $fortune_tmp" >&5
17132 echo $ECHO_N "checking for $fortune_tmp... $ECHO_C" >&6
17133       if test -x "$fortune_tmp" ; then
17134         echo "$as_me:$LINENO: result: yes" >&5
17135 echo "${ECHO_T}yes" >&6
17136       else
17137         echo "$as_me:$LINENO: result: no" >&5
17138 echo "${ECHO_T}no" >&6
17139         with_fortune=""
17140       fi
17141     ;;
17142     *)
17143       set dummy $with_fortune_req ; fortune_tmp=$2
17144       # don't cache
17145       unset ac_cv_path_fortune_tmp
17146       # Extract the first word of "$fortune_tmp", so it can be a program name with args.
17147 set dummy $fortune_tmp; ac_word=$2
17148 echo "$as_me:$LINENO: checking for $ac_word" >&5
17149 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17150 if test "${ac_cv_path_fortune_tmp+set}" = set; then
17151   echo $ECHO_N "(cached) $ECHO_C" >&6
17152 else
17153   case $fortune_tmp in
17154   [\\/]* | ?:[\\/]*)
17155   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
17156   ;;
17157   *)
17158   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17159 for as_dir in $PATH
17160 do
17161   IFS=$as_save_IFS
17162   test -z "$as_dir" && as_dir=.
17163   for ac_exec_ext in '' $ac_executable_extensions; do
17164   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17165     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
17166     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17167     break 2
17168   fi
17169 done
17170 done
17171
17172   ;;
17173 esac
17174 fi
17175 fortune_tmp=$ac_cv_path_fortune_tmp
17176
17177 if test -n "$fortune_tmp"; then
17178   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17179 echo "${ECHO_T}$fortune_tmp" >&6
17180 else
17181   echo "$as_me:$LINENO: result: no" >&5
17182 echo "${ECHO_T}no" >&6
17183 fi
17184
17185       if test -z "$fortune_tmp" ; then
17186         with_fortune=""
17187       fi
17188     ;;
17189   esac
17190   ac_cv_fortune_program="$with_fortune"
17191
17192 elif test -n "$ac_cv_fortune_program"; then
17193   echo "$as_me:$LINENO: result: checking for fortune... (cached) $ac_cv_fortune_program" >&5
17194 echo "${ECHO_T}checking for fortune... (cached) $ac_cv_fortune_program" >&6
17195 fi
17196
17197 unset ac_cv_path_fortune_tmp
17198 unset fortune_tmp
17199
17200 if test -z "$ac_cv_fortune_program" ; then
17201
17202   # first look for fortune in /usr/games/ (and use absolute path)
17203   for ac_prog in fortune
17204 do
17205   # Extract the first word of "$ac_prog", so it can be a program name with args.
17206 set dummy $ac_prog; ac_word=$2
17207 echo "$as_me:$LINENO: checking for $ac_word" >&5
17208 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17209 if test "${ac_cv_path_fortune_tmp+set}" = set; then
17210   echo $ECHO_N "(cached) $ECHO_C" >&6
17211 else
17212   case $fortune_tmp in
17213   [\\/]* | ?:[\\/]*)
17214   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
17215   ;;
17216   *)
17217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17218 as_dummy=""/usr/games""
17219 for as_dir in $as_dummy
17220 do
17221   IFS=$as_save_IFS
17222   test -z "$as_dir" && as_dir=.
17223   for ac_exec_ext in '' $ac_executable_extensions; do
17224   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17225     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
17226     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17227     break 2
17228   fi
17229 done
17230 done
17231
17232   ;;
17233 esac
17234 fi
17235 fortune_tmp=$ac_cv_path_fortune_tmp
17236
17237 if test -n "$fortune_tmp"; then
17238   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17239 echo "${ECHO_T}$fortune_tmp" >&6
17240 else
17241   echo "$as_me:$LINENO: result: no" >&5
17242 echo "${ECHO_T}no" >&6
17243 fi
17244
17245   test -n "$fortune_tmp" && break
17246 done
17247
17248
17249   # if it's not there, look on $PATH (and don't use absolute path)
17250   if test -z "$fortune_tmp" ; then
17251      for ac_prog in fortune
17252 do
17253   # Extract the first word of "$ac_prog", so it can be a program name with args.
17254 set dummy $ac_prog; ac_word=$2
17255 echo "$as_me:$LINENO: checking for $ac_word" >&5
17256 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17257 if test "${ac_cv_prog_fortune_tmp+set}" = set; then
17258   echo $ECHO_N "(cached) $ECHO_C" >&6
17259 else
17260   if test -n "$fortune_tmp"; then
17261   ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
17262 else
17263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17264 for as_dir in $PATH
17265 do
17266   IFS=$as_save_IFS
17267   test -z "$as_dir" && as_dir=.
17268   for ac_exec_ext in '' $ac_executable_extensions; do
17269   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17270     ac_cv_prog_fortune_tmp="$ac_prog"
17271     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17272     break 2
17273   fi
17274 done
17275 done
17276
17277 fi
17278 fi
17279 fortune_tmp=$ac_cv_prog_fortune_tmp
17280 if test -n "$fortune_tmp"; then
17281   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17282 echo "${ECHO_T}$fortune_tmp" >&6
17283 else
17284   echo "$as_me:$LINENO: result: no" >&5
17285 echo "${ECHO_T}no" >&6
17286 fi
17287
17288   test -n "$fortune_tmp" && break
17289 done
17290
17291   fi
17292
17293   # if we didn't find anything, then just assume /usr/games/
17294   if test -z "$fortune_tmp" ; then
17295      fortune_tmp="/usr/games/fortune"
17296   fi
17297
17298   ac_cv_fortune_program="$fortune_tmp"
17299
17300   # now check to see whether "fortune zippy" works.
17301   #
17302   fortune_tmp="$fortune_tmp zippy"
17303   echo "$as_me:$LINENO: checking for zippy quotes" >&5
17304 echo $ECHO_N "checking for zippy quotes... $ECHO_C" >&6
17305   if ( $fortune_tmp >/dev/null 2>&1 ); then
17306     ac_cv_fortune_program="$fortune_tmp"
17307     echo "$as_me:$LINENO: result: $fortune_tmp" >&5
17308 echo "${ECHO_T}$fortune_tmp" >&6
17309   else
17310     echo "$as_me:$LINENO: result: no" >&5
17311 echo "${ECHO_T}no" >&6
17312   fi
17313
17314 fi
17315
17316 unset ac_cv_path_fortune_tmp
17317 unset fortune_tmp
17318
17319 cat >>confdefs.h <<_ACEOF
17320 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
17321 _ACEOF
17322
17323
17324
17325 ###############################################################################
17326 #
17327 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
17328 #       This should be safe, but let's give people the option.
17329 #
17330 ###############################################################################
17331
17332 setuid_hacks_default=no
17333 setuid_hacks="$setuid_hacks_default"
17334
17335 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
17336 if test "${with_setuid_hacks+set}" = set; then
17337   withval="$with_setuid_hacks"
17338   setuid_hacks="$withval"
17339 else
17340   setuid_hacks="$setuid_hacks_default"
17341 fi;
17342
17343
17344    case "$setuid_hacks" in
17345     yes) ;;
17346     no)  ;;
17347
17348     /*)
17349      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
17350 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
17351      d=$setuid_hacks/include
17352      if test -d $d; then
17353        X_CFLAGS="-I$d $X_CFLAGS"
17354        echo "$as_me:$LINENO: result: $d" >&5
17355 echo "${ECHO_T}$d" >&6
17356      else
17357        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17358 echo "${ECHO_T}not found ($d: no such directory)" >&6
17359      fi
17360
17361      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
17362 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
17363      d=$setuid_hacks/lib
17364      if test -d $d; then
17365        X_LIBS="-L$d $X_LIBS"
17366        echo "$as_me:$LINENO: result: $d" >&5
17367 echo "${ECHO_T}$d" >&6
17368      else
17369        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17370 echo "${ECHO_T}not found ($d: no such directory)" >&6
17371      fi
17372
17373      # replace the directory string with "yes".
17374      setuid_hacks_req="yes"
17375      setuid_hacks=$setuid_hacks_req
17376      ;;
17377
17378     *)
17379      echo ""
17380      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
17381      echo "       If it is a directory, then \`DIR/include' will be added to"
17382      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17383      exit 1
17384      ;;
17385    esac
17386
17387
17388 if test "$setuid_hacks" = yes; then
17389   true
17390 elif test "$setuid_hacks" != no; then
17391   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
17392   exit 1
17393 fi
17394
17395
17396 ###############################################################################
17397 #
17398 #       Done testing.  Now, set up the various -I and -L variables,
17399 #       and decide which GUI program to build by default.
17400 #
17401 ###############################################################################
17402
17403 DEPEND=makedepend
17404 DEPEND_FLAGS=
17405 DEPEND_DEFINES=
17406
17407
17408 if test \! -z "$includedir" ; then
17409   INCLUDES="$INCLUDES -I$includedir"
17410 fi
17411
17412 if test \! -z "$libdir" ; then
17413   LDFLAGS="$LDFLAGS -L$libdir"
17414 fi
17415
17416
17417 PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
17418 ALL_DEMO_PROGRAMS=
17419 if test "$have_motif" = yes; then
17420   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
17421   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
17422 fi
17423 if test "$have_gtk" = yes; then
17424   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
17425   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
17426 fi
17427
17428
17429 if test "$have_kerberos" = yes; then
17430   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
17431   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
17432 fi
17433 if test "$have_pam" = yes; then
17434   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
17435   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
17436   INSTALL_PAM="install-pam"
17437 fi
17438   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
17439   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
17440
17441
17442 if test "$enable_locking" = yes; then
17443   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
17444   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
17445 else
17446   LOCK_SRCS='$(NOLOCK_SRCS_1)'
17447   LOCK_OBJS='$(NOLOCK_OBJS_1)'
17448 fi
17449
17450 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
17451
17452 if test "$need_setuid" = yes; then
17453   NEED_SETUID=yes
17454 else
17455   NEED_SETUID=no
17456 fi
17457
17458 if test "$setuid_hacks" = yes; then
17459   SETUID_HACKS=yes
17460 else
17461   SETUID_HACKS=no
17462 fi
17463
17464 tab='   '
17465 if test "$have_gl" = yes; then
17466   GL_EXES='$(GL_EXES)'
17467   GL_UTIL_EXES='$(GL_UTIL_EXES)'
17468   GL_MEN='$(GL_MEN)'
17469   GL_KLUDGE="${tab}  "
17470 else
17471   GL_KLUDGE="-${tab}  "
17472 fi
17473
17474 if test "$have_gle" = yes; then
17475   GLE_EXES='$(GLE_EXES)'
17476   GLE_MEN='$(GLE_MEN)'
17477   GLE_KLUDGE="${tab}   "
17478 else
17479   GLE_KLUDGE="-${tab}   "
17480 fi
17481
17482 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
17483  JPEG_EXES='$(JPEG_EXES)'
17484 fi
17485
17486
17487 # Another substitution in the XScreenSaver.ad.in file:
17488 #
17489 if test "$have_gnome_help" = yes; then
17490   GNOMEHELP_Y=''
17491   GNOMEHELP_N='!    '
17492 else
17493   GNOMEHELP_Y='!    '
17494   GNOMEHELP_N=''
17495 fi
17496
17497
17498 # Now that we know whether we have Gnome, we can decide where the XML
17499 # config files get installed.
17500 #
17501 if test -z "$HACK_CONF_DIR" ; then
17502   if test -n "$GNOME_DATADIR" ; then
17503     HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
17504   else
17505     HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
17506   fi
17507 fi
17508
17509
17510
17511 # After computing $HACK_CONF_DIR, make sure $GLADE_DATADIR has a value
17512 # so that we know where to install the Gtk pixmaps.
17513 #
17514 # It should usually be "/usr/share/pixmaps/", but we can't just use
17515 # "$(prefix)/share/pixmaps" because that would usually result in
17516 # "/usr/X11R6/share/pixmaps/", which is wrong.  It needs to be the
17517 # Gnome/Gtk prefix, not the overall prefix.
17518 #
17519 if test -n "$GNOME_DATADIR" ; then
17520   GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver'
17521 elif test "$have_gtk" = yes; then
17522   if test -n "$pkg_config"; then
17523     if test "$have_gtk2" = yes; then
17524       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
17525     else
17526       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+`
17527     fi
17528   else
17529     GLADE_DATADIR=`$gtk_config --prefix`
17530   fi
17531   GLADE_DATADIR="$GLADE_DATADIR/share/xscreensaver"
17532 else
17533   GLADE_DATADIR=''
17534 fi
17535
17536
17537 # Set PO_DATADIR to something sensible.
17538 #
17539 echo "$as_me:$LINENO: checking for locale directory" >&5
17540 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
17541 if test -n "$GNOME_DATADIR" ; then
17542   PO_DATADIR="$GNOME_DATADIR"
17543 elif test "$have_gtk" = yes; then
17544   if test -n "$pkg_config"; then
17545     if test "$have_gtk2" = yes; then
17546       PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
17547     else
17548       PO_DATADIR=`$pkg_config --variable=prefix gtk+`
17549     fi
17550   else
17551     PO_DATADIR=`$gtk_config --prefix`
17552   fi
17553   PO_DATADIR="$PO_DATADIR/share"
17554 fi
17555
17556 if test -z "$PO_DATADIR" ; then
17557   #
17558   # #### Total fucking kludge --
17559   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
17560   # but of course we need to expand all the nested variables to do that...
17561   #
17562   dd=$datadir
17563   eval dd=${dd}
17564   eval dd=${dd}
17565   eval dd=${dd}
17566   eval dd=${dd}
17567   eval dd=${dd}
17568   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
17569 fi
17570
17571 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
17572 echo "${ECHO_T}$PO_DATADIR/locale" >&6
17573
17574
17575 # canonicalize slashes.
17576 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
17577
17578 # gcc 3.0 likes to issue this warning for every file:
17579 #
17580 # cc1: warning: changing search order for system directory "/usr/local/include"
17581 # cc1: warning:   as it has already been specified as a non-system directory
17582 #
17583 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
17584 # Which *should* be totally redundant, and thus an ok thing to delete?
17585 #
17586 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
17587
17588
17589 ###############################################################################
17590 #
17591 #       Perform substitutions and write Makefiles.
17592 #
17593 ###############################################################################
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644 APPDEFAULTS=$ac_x_app_defaults
17645
17646
17647
17648
17649
17650
17651
17652 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"
17653 cat >confcache <<\_ACEOF
17654 # This file is a shell script that caches the results of configure
17655 # tests run on this system so they can be shared between configure
17656 # scripts and configure runs, see configure's option --config-cache.
17657 # It is not useful on other systems.  If it contains results you don't
17658 # want to keep, you may remove or edit it.
17659 #
17660 # config.status only pays attention to the cache file if you give it
17661 # the --recheck option to rerun configure.
17662 #
17663 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17664 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17665 # following values.
17666
17667 _ACEOF
17668
17669 # The following way of writing the cache mishandles newlines in values,
17670 # but we know of no workaround that is simple, portable, and efficient.
17671 # So, don't put newlines in cache variables' values.
17672 # Ultrix sh set writes to stderr and can't be redirected directly,
17673 # and sets the high bit in the cache file unless we assign to the vars.
17674 {
17675   (set) 2>&1 |
17676     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17677     *ac_space=\ *)
17678       # `set' does not quote correctly, so add quotes (double-quote
17679       # substitution turns \\\\ into \\, and sed turns \\ into \).
17680       sed -n \
17681         "s/'/'\\\\''/g;
17682           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17683       ;;
17684     *)
17685       # `set' quotes correctly as required by POSIX, so do not add quotes.
17686       sed -n \
17687         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17688       ;;
17689     esac;
17690 } |
17691   sed '
17692      t clear
17693      : clear
17694      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17695      t end
17696      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17697      : end' >>confcache
17698 if cmp -s $cache_file confcache; then :; else
17699   if test -w $cache_file; then
17700     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17701     cat confcache >$cache_file
17702   else
17703     echo "not updating unwritable cache $cache_file"
17704   fi
17705 fi
17706 rm -f confcache
17707
17708 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17709 # Let make expand exec_prefix.
17710 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17711
17712 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17713 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17714 # trailing colons and then remove the whole line if VPATH becomes empty
17715 # (actually we leave an empty line to preserve line numbers).
17716 if test "x$srcdir" = x.; then
17717   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17718 s/:*\$(srcdir):*/:/;
17719 s/:*\${srcdir}:*/:/;
17720 s/:*@srcdir@:*/:/;
17721 s/^\([^=]*=[    ]*\):*/\1/;
17722 s/:*$//;
17723 s/^[^=]*=[      ]*$//;
17724 }'
17725 fi
17726
17727 DEFS=-DHAVE_CONFIG_H
17728
17729
17730
17731         mv -f po/POTFILES po/POTFILES.tmp
17732         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
17733         rm -f po/POTFILES.tmp
17734
17735
17736
17737 : ${CONFIG_STATUS=./config.status}
17738 ac_clean_files_save=$ac_clean_files
17739 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17740 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17741 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17742 cat >$CONFIG_STATUS <<_ACEOF
17743 #! $SHELL
17744 # Generated by $as_me.
17745 # Run this file to recreate the current configuration.
17746 # Compiler output produced by configure, useful for debugging
17747 # configure, is in config.log if it exists.
17748
17749 debug=false
17750 SHELL=\${CONFIG_SHELL-$SHELL}
17751 _ACEOF
17752
17753 cat >>$CONFIG_STATUS <<\_ACEOF
17754
17755 ## --------------------- ##
17756 ## M4sh Initialization.  ##
17757 ## --------------------- ##
17758
17759 # Be Bourne compatible
17760 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17761   emulate sh
17762   NULLCMD=:
17763 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17764   set -o posix
17765 fi
17766
17767 # NLS nuisances.
17768 # Support unset when possible.
17769 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17770   as_unset=unset
17771 else
17772   as_unset=false
17773 fi
17774
17775 (set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17776     { $as_unset LANG || test "${LANG+set}" != set; } ||
17777       { LANG=C; export LANG; }
17778 (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17779     { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17780       { LC_ALL=C; export LC_ALL; }
17781 (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17782     { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17783       { LC_TIME=C; export LC_TIME; }
17784 (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17785     { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17786       { LC_CTYPE=C; export LC_CTYPE; }
17787 (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17788     { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17789       { LANGUAGE=C; export LANGUAGE; }
17790 (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17791     { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17792       { LC_COLLATE=C; export LC_COLLATE; }
17793 (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17794     { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17795       { LC_NUMERIC=C; export LC_NUMERIC; }
17796 (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17797     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17798       { LC_MESSAGES=C; export LC_MESSAGES; }
17799
17800
17801 # Name of the executable.
17802 as_me=`(basename "$0") 2>/dev/null ||
17803 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17804          X"$0" : 'X\(//\)$' \| \
17805          X"$0" : 'X\(/\)$' \| \
17806          .     : '\(.\)' 2>/dev/null ||
17807 echo X/"$0" |
17808     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17809           /^X\/\(\/\/\)$/{ s//\1/; q; }
17810           /^X\/\(\/\).*/{ s//\1/; q; }
17811           s/.*/./; q'`
17812
17813 # PATH needs CR, and LINENO needs CR and PATH.
17814 # Avoid depending upon Character Ranges.
17815 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17816 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17817 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17818 as_cr_digits='0123456789'
17819 as_cr_alnum=$as_cr_Letters$as_cr_digits
17820
17821 # The user is always right.
17822 if test "${PATH_SEPARATOR+set}" != set; then
17823   echo "#! /bin/sh" >conftest.sh
17824   echo  "exit 0"   >>conftest.sh
17825   chmod +x conftest.sh
17826   if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
17827     PATH_SEPARATOR=';'
17828   else
17829     PATH_SEPARATOR=:
17830   fi
17831   rm -f conftest.sh
17832 fi
17833
17834
17835   as_lineno_1=$LINENO
17836   as_lineno_2=$LINENO
17837   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17838   test "x$as_lineno_1" != "x$as_lineno_2" &&
17839   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
17840   # Find who we are.  Look in the path if we contain no path at all
17841   # relative or not.
17842   case $0 in
17843     *[\\/]* ) as_myself=$0 ;;
17844     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17845 for as_dir in $PATH
17846 do
17847   IFS=$as_save_IFS
17848   test -z "$as_dir" && as_dir=.
17849   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17850 done
17851
17852        ;;
17853   esac
17854   # We did not find ourselves, most probably we were run as `sh COMMAND'
17855   # in which case we are not to be found in the path.
17856   if test "x$as_myself" = x; then
17857     as_myself=$0
17858   fi
17859   if test ! -f "$as_myself"; then
17860     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17861 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17862    { (exit 1); exit 1; }; }
17863   fi
17864   case $CONFIG_SHELL in
17865   '')
17866     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17867 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17868 do
17869   IFS=$as_save_IFS
17870   test -z "$as_dir" && as_dir=.
17871   for as_base in sh bash ksh sh5; do
17872          case $as_dir in
17873          /*)
17874            if ("$as_dir/$as_base" -c '
17875   as_lineno_1=$LINENO
17876   as_lineno_2=$LINENO
17877   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17878   test "x$as_lineno_1" != "x$as_lineno_2" &&
17879   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
17880              CONFIG_SHELL=$as_dir/$as_base
17881              export CONFIG_SHELL
17882              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17883            fi;;
17884          esac
17885        done
17886 done
17887 ;;
17888   esac
17889
17890   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17891   # uniformly replaced by the line number.  The first 'sed' inserts a
17892   # line-number line before each line; the second 'sed' does the real
17893   # work.  The second script uses 'N' to pair each line-number line
17894   # with the numbered line, and appends trailing '-' during
17895   # substitution so that $LINENO is not a special case at line end.
17896   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17897   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
17898   sed '=' <$as_myself |
17899     sed '
17900       N
17901       s,$,-,
17902       : loop
17903       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17904       t loop
17905       s,-$,,
17906       s,^['$as_cr_digits']*\n,,
17907     ' >$as_me.lineno &&
17908   chmod +x $as_me.lineno ||
17909     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17910 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17911    { (exit 1); exit 1; }; }
17912
17913   # Don't try to exec as it changes $[0], causing all sort of problems
17914   # (the dirname of $[0] is not the place where we might find the
17915   # original and so on.  Autoconf is especially sensible to this).
17916   . ./$as_me.lineno
17917   # Exit status is that of the last command.
17918   exit
17919 }
17920
17921
17922 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17923   *c*,-n*) ECHO_N= ECHO_C='
17924 ' ECHO_T='      ' ;;
17925   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17926   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
17927 esac
17928
17929 if expr a : '\(a\)' >/dev/null 2>&1; then
17930   as_expr=expr
17931 else
17932   as_expr=false
17933 fi
17934
17935 rm -f conf$$ conf$$.exe conf$$.file
17936 echo >conf$$.file
17937 if ln -s conf$$.file conf$$ 2>/dev/null; then
17938   # We could just check for DJGPP; but this test a) works b) is more generic
17939   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17940   if test -f conf$$.exe; then
17941     # Don't use ln at all; we don't have any links
17942     as_ln_s='cp -p'
17943   else
17944     as_ln_s='ln -s'
17945   fi
17946 elif ln conf$$.file conf$$ 2>/dev/null; then
17947   as_ln_s=ln
17948 else
17949   as_ln_s='cp -p'
17950 fi
17951 rm -f conf$$ conf$$.exe conf$$.file
17952
17953 as_executable_p="test -f"
17954
17955 # Sed expression to map a string onto a valid CPP name.
17956 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17957
17958 # Sed expression to map a string onto a valid variable name.
17959 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17960
17961
17962 # IFS
17963 # We need space, tab and new line, in precisely that order.
17964 as_nl='
17965 '
17966 IFS="   $as_nl"
17967
17968 # CDPATH.
17969 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
17970
17971 exec 6>&1
17972
17973 # Open the log real soon, to keep \$[0] and so on meaningful, and to
17974 # report actual input values of CONFIG_FILES etc. instead of their
17975 # values after options handling.  Logging --version etc. is OK.
17976 exec 5>>config.log
17977 {
17978   echo
17979   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17980 ## Running $as_me. ##
17981 _ASBOX
17982 } >&5
17983 cat >&5 <<_CSEOF
17984
17985 This file was extended by $as_me, which was
17986 generated by GNU Autoconf 2.53.  Invocation command line was
17987
17988   CONFIG_FILES    = $CONFIG_FILES
17989   CONFIG_HEADERS  = $CONFIG_HEADERS
17990   CONFIG_LINKS    = $CONFIG_LINKS
17991   CONFIG_COMMANDS = $CONFIG_COMMANDS
17992   $ $0 $@
17993
17994 _CSEOF
17995 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17996 echo >&5
17997 _ACEOF
17998
17999 # Files that config.status was made for.
18000 if test -n "$ac_config_files"; then
18001   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18002 fi
18003
18004 if test -n "$ac_config_headers"; then
18005   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18006 fi
18007
18008 if test -n "$ac_config_links"; then
18009   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18010 fi
18011
18012 if test -n "$ac_config_commands"; then
18013   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18014 fi
18015
18016 cat >>$CONFIG_STATUS <<\_ACEOF
18017
18018 ac_cs_usage="\
18019 \`$as_me' instantiates files from templates according to the
18020 current configuration.
18021
18022 Usage: $0 [OPTIONS] [FILE]...
18023
18024   -h, --help       print this help, then exit
18025   -V, --version    print version number, then exit
18026   -d, --debug      don't remove temporary files
18027       --recheck    update $as_me by reconfiguring in the same conditions
18028   --file=FILE[:TEMPLATE]
18029                    instantiate the configuration file FILE
18030   --header=FILE[:TEMPLATE]
18031                    instantiate the configuration header FILE
18032
18033 Configuration files:
18034 $config_files
18035
18036 Configuration headers:
18037 $config_headers
18038
18039 Configuration commands:
18040 $config_commands
18041
18042 Report bugs to <bug-autoconf@gnu.org>."
18043 _ACEOF
18044
18045 cat >>$CONFIG_STATUS <<_ACEOF
18046 ac_cs_version="\\
18047 config.status
18048 configured by $0, generated by GNU Autoconf 2.53,
18049   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18050
18051 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18052 Free Software Foundation, Inc.
18053 This config.status script is free software; the Free Software Foundation
18054 gives unlimited permission to copy, distribute and modify it."
18055 srcdir=$srcdir
18056 INSTALL="$INSTALL"
18057 _ACEOF
18058
18059 cat >>$CONFIG_STATUS <<\_ACEOF
18060 # If no file are specified by the user, then we need to provide default
18061 # value.  By we need to know if files were specified by the user.
18062 ac_need_defaults=:
18063 while test $# != 0
18064 do
18065   case $1 in
18066   --*=*)
18067     ac_option=`expr "x$1" : 'x\([^=]*\)='`
18068     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18069     shift
18070     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18071     shift
18072     ;;
18073   -*);;
18074   *) # This is not an option, so the user has probably given explicit
18075      # arguments.
18076      ac_need_defaults=false;;
18077   esac
18078
18079   case $1 in
18080   # Handling of the options.
18081 _ACEOF
18082 cat >>$CONFIG_STATUS <<_ACEOF
18083   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18084     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18085     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18086 _ACEOF
18087 cat >>$CONFIG_STATUS <<\_ACEOF
18088   --version | --vers* | -V )
18089     echo "$ac_cs_version"; exit 0 ;;
18090   --he | --h)
18091     # Conflict between --help and --header
18092     { { echo "$as_me:$LINENO: error: ambiguous option: $1
18093 Try \`$0 --help' for more information." >&5
18094 echo "$as_me: error: ambiguous option: $1
18095 Try \`$0 --help' for more information." >&2;}
18096    { (exit 1); exit 1; }; };;
18097   --help | --hel | -h )
18098     echo "$ac_cs_usage"; exit 0 ;;
18099   --debug | --d* | -d )
18100     debug=: ;;
18101   --file | --fil | --fi | --f )
18102     shift
18103     CONFIG_FILES="$CONFIG_FILES $1"
18104     ac_need_defaults=false;;
18105   --header | --heade | --head | --hea )
18106     shift
18107     CONFIG_HEADERS="$CONFIG_HEADERS $1"
18108     ac_need_defaults=false;;
18109
18110   # This is an error.
18111   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18112 Try \`$0 --help' for more information." >&5
18113 echo "$as_me: error: unrecognized option: $1
18114 Try \`$0 --help' for more information." >&2;}
18115    { (exit 1); exit 1; }; } ;;
18116
18117   *) ac_config_targets="$ac_config_targets $1" ;;
18118
18119   esac
18120   shift
18121 done
18122
18123 _ACEOF
18124
18125 cat >>$CONFIG_STATUS <<_ACEOF
18126 #
18127 # INIT-COMMANDS section.
18128 #
18129
18130 INTLTOOL_PERL=${INTLTOOL_PERL}
18131
18132
18133 _ACEOF
18134
18135
18136
18137 cat >>$CONFIG_STATUS <<\_ACEOF
18138 for ac_config_target in $ac_config_targets
18139 do
18140   case "$ac_config_target" in
18141   # Handling of arguments.
18142   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18143   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
18144   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
18145   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
18146   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
18147   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
18148   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
18149   "driver/xscreensaver.kss" ) CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.kss" ;;
18150   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
18151   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
18152   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
18153   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18154 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18155    { (exit 1); exit 1; }; };;
18156   esac
18157 done
18158
18159 # If the user did not use the arguments to specify the items to instantiate,
18160 # then the envvar interface is used.  Set only those that are not.
18161 # We use the long form for the default assignment because of an extremely
18162 # bizarre bug on SunOS 4.1.3.
18163 if $ac_need_defaults; then
18164   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18165   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18166   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18167 fi
18168
18169 # Create a temporary directory, and hook for its removal unless debugging.
18170 $debug ||
18171 {
18172   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18173   trap '{ (exit 1); exit 1; }' 1 2 13 15
18174 }
18175
18176 # Create a (secure) tmp directory for tmp files.
18177 : ${TMPDIR=/tmp}
18178 {
18179   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18180   test -n "$tmp" && test -d "$tmp"
18181 }  ||
18182 {
18183   tmp=$TMPDIR/cs$$-$RANDOM
18184   (umask 077 && mkdir $tmp)
18185 } ||
18186 {
18187    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18188    { (exit 1); exit 1; }
18189 }
18190
18191 _ACEOF
18192
18193 cat >>$CONFIG_STATUS <<_ACEOF
18194
18195 #
18196 # CONFIG_FILES section.
18197 #
18198
18199 # No need to generate the scripts if there are no CONFIG_FILES.
18200 # This happens for instance when ./config.status config.h
18201 if test -n "\$CONFIG_FILES"; then
18202   # Protect against being on the right side of a sed subst in config.status.
18203   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18204    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18205 s,@SHELL@,$SHELL,;t t
18206 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18207 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18208 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18209 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18210 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18211 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18212 s,@exec_prefix@,$exec_prefix,;t t
18213 s,@prefix@,$prefix,;t t
18214 s,@program_transform_name@,$program_transform_name,;t t
18215 s,@bindir@,$bindir,;t t
18216 s,@sbindir@,$sbindir,;t t
18217 s,@libexecdir@,$libexecdir,;t t
18218 s,@datadir@,$datadir,;t t
18219 s,@sysconfdir@,$sysconfdir,;t t
18220 s,@sharedstatedir@,$sharedstatedir,;t t
18221 s,@localstatedir@,$localstatedir,;t t
18222 s,@libdir@,$libdir,;t t
18223 s,@includedir@,$includedir,;t t
18224 s,@oldincludedir@,$oldincludedir,;t t
18225 s,@infodir@,$infodir,;t t
18226 s,@mandir@,$mandir,;t t
18227 s,@build_alias@,$build_alias,;t t
18228 s,@host_alias@,$host_alias,;t t
18229 s,@target_alias@,$target_alias,;t t
18230 s,@DEFS@,$DEFS,;t t
18231 s,@ECHO_C@,$ECHO_C,;t t
18232 s,@ECHO_N@,$ECHO_N,;t t
18233 s,@ECHO_T@,$ECHO_T,;t t
18234 s,@LIBS@,$LIBS,;t t
18235 s,@build@,$build,;t t
18236 s,@build_cpu@,$build_cpu,;t t
18237 s,@build_vendor@,$build_vendor,;t t
18238 s,@build_os@,$build_os,;t t
18239 s,@host@,$host,;t t
18240 s,@host_cpu@,$host_cpu,;t t
18241 s,@host_vendor@,$host_vendor,;t t
18242 s,@host_os@,$host_os,;t t
18243 s,@CC@,$CC,;t t
18244 s,@CFLAGS@,$CFLAGS,;t t
18245 s,@LDFLAGS@,$LDFLAGS,;t t
18246 s,@CPPFLAGS@,$CPPFLAGS,;t t
18247 s,@ac_ct_CC@,$ac_ct_CC,;t t
18248 s,@EXEEXT@,$EXEEXT,;t t
18249 s,@OBJEXT@,$OBJEXT,;t t
18250 s,@CPP@,$CPP,;t t
18251 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18252 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18253 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18254 s,@SET_MAKE@,$SET_MAKE,;t t
18255 s,@PERL@,$PERL,;t t
18256 s,@X_CFLAGS@,$X_CFLAGS,;t t
18257 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
18258 s,@X_LIBS@,$X_LIBS,;t t
18259 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
18260 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
18261 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
18262 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
18263 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
18264 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
18265 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
18266 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
18267 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
18268 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
18269 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
18270 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
18271 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
18272 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
18273 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
18274 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
18275 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
18276 s,@RANLIB@,$RANLIB,;t t
18277 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18278 s,@ALLOCA@,$ALLOCA,;t t
18279 s,@USE_NLS@,$USE_NLS,;t t
18280 s,@MSGFMT@,$MSGFMT,;t t
18281 s,@GMSGFMT@,$GMSGFMT,;t t
18282 s,@XGETTEXT@,$XGETTEXT,;t t
18283 s,@CATALOGS@,$CATALOGS,;t t
18284 s,@CATOBJEXT@,$CATOBJEXT,;t t
18285 s,@DATADIRNAME@,$DATADIRNAME,;t t
18286 s,@GMOFILES@,$GMOFILES,;t t
18287 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
18288 s,@INTLDEPS@,$INTLDEPS,;t t
18289 s,@INTLLIBS@,$INTLLIBS,;t t
18290 s,@INTLOBJS@,$INTLOBJS,;t t
18291 s,@POFILES@,$POFILES,;t t
18292 s,@POSUB@,$POSUB,;t t
18293 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
18294 s,@pkg_config@,$pkg_config,;t t
18295 s,@glib_config@,$glib_config,;t t
18296 s,@gtk_config@,$gtk_config,;t t
18297 s,@gnome_config@,$gnome_config,;t t
18298 s,@have_gnome_help@,$have_gnome_help,;t t
18299 s,@xml_config@,$xml_config,;t t
18300 s,@gdk_pixbuf_config@,$gdk_pixbuf_config,;t t
18301 s,@fortune_tmp@,$fortune_tmp,;t t
18302 s,@INCLUDES@,$INCLUDES,;t t
18303 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
18304 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
18305 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
18306 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
18307 s,@GTK_LIBS@,$GTK_LIBS,;t t
18308 s,@XML_LIBS@,$XML_LIBS,;t t
18309 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
18310 s,@HACK_LIBS@,$HACK_LIBS,;t t
18311 s,@XPM_LIBS@,$XPM_LIBS,;t t
18312 s,@GL_LIBS@,$GL_LIBS,;t t
18313 s,@GLE_LIBS@,$GLE_LIBS,;t t
18314 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
18315 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
18316 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
18317 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
18318 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
18319 s,@NEED_SETUID@,$NEED_SETUID,;t t
18320 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
18321 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
18322 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
18323 s,@XMU_SRCS@,$XMU_SRCS,;t t
18324 s,@XMU_OBJS@,$XMU_OBJS,;t t
18325 s,@XMU_LIBS@,$XMU_LIBS,;t t
18326 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
18327 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
18328 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
18329 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
18330 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
18331 s,@JPEG_EXES@,$JPEG_EXES,;t t
18332 s,@GL_EXES@,$GL_EXES,;t t
18333 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
18334 s,@GL_MEN@,$GL_MEN,;t t
18335 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
18336 s,@GLE_EXES@,$GLE_EXES,;t t
18337 s,@GLE_MEN@,$GLE_MEN,;t t
18338 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
18339 s,@GNOMEHELP_Y@,$GNOMEHELP_Y,;t t
18340 s,@GNOMEHELP_N@,$GNOMEHELP_N,;t t
18341 s,@HACKDIR@,$HACKDIR,;t t
18342 s,@GNOME_DATADIR@,$GNOME_DATADIR,;t t
18343 s,@GLADE_DATADIR@,$GLADE_DATADIR,;t t
18344 s,@PO_DATADIR@,$PO_DATADIR,;t t
18345 s,@GNOME_PANELDIR@,$GNOME_PANELDIR,;t t
18346 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
18347 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
18348 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
18349 s,@DEPEND@,$DEPEND,;t t
18350 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
18351 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
18352 CEOF
18353
18354 _ACEOF
18355
18356   cat >>$CONFIG_STATUS <<\_ACEOF
18357   # Split the substitutions into bite-sized pieces for seds with
18358   # small command number limits, like on Digital OSF/1 and HP-UX.
18359   ac_max_sed_lines=48
18360   ac_sed_frag=1 # Number of current file.
18361   ac_beg=1 # First line for current file.
18362   ac_end=$ac_max_sed_lines # Line after last line for current file.
18363   ac_more_lines=:
18364   ac_sed_cmds=
18365   while $ac_more_lines; do
18366     if test $ac_beg -gt 1; then
18367       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18368     else
18369       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18370     fi
18371     if test ! -s $tmp/subs.frag; then
18372       ac_more_lines=false
18373     else
18374       # The purpose of the label and of the branching condition is to
18375       # speed up the sed processing (if there are no `@' at all, there
18376       # is no need to browse any of the substitutions).
18377       # These are the two extra sed commands mentioned above.
18378       (echo ':t
18379   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18380       if test -z "$ac_sed_cmds"; then
18381         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18382       else
18383         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18384       fi
18385       ac_sed_frag=`expr $ac_sed_frag + 1`
18386       ac_beg=$ac_end
18387       ac_end=`expr $ac_end + $ac_max_sed_lines`
18388     fi
18389   done
18390   if test -z "$ac_sed_cmds"; then
18391     ac_sed_cmds=cat
18392   fi
18393 fi # test -n "$CONFIG_FILES"
18394
18395 _ACEOF
18396 cat >>$CONFIG_STATUS <<\_ACEOF
18397 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18398   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18399   case $ac_file in
18400   - | *:- | *:-:* ) # input from stdin
18401         cat >$tmp/stdin
18402         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18403         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18404   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18405         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18406   * )   ac_file_in=$ac_file.in ;;
18407   esac
18408
18409   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18410   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18411 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18412          X"$ac_file" : 'X\(//\)[^/]' \| \
18413          X"$ac_file" : 'X\(//\)$' \| \
18414          X"$ac_file" : 'X\(/\)' \| \
18415          .     : '\(.\)' 2>/dev/null ||
18416 echo X"$ac_file" |
18417     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18418           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18419           /^X\(\/\/\)$/{ s//\1/; q; }
18420           /^X\(\/\).*/{ s//\1/; q; }
18421           s/.*/./; q'`
18422   { case "$ac_dir" in
18423   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18424   *)                      as_incr_dir=.;;
18425 esac
18426 as_dummy="$ac_dir"
18427 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18428   case $as_mkdir_dir in
18429     # Skip DOS drivespec
18430     ?:) as_incr_dir=$as_mkdir_dir ;;
18431     *)
18432       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18433       test -d "$as_incr_dir" ||
18434         mkdir "$as_incr_dir" ||
18435         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18436 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18437    { (exit 1); exit 1; }; }
18438     ;;
18439   esac
18440 done; }
18441
18442   ac_builddir=.
18443
18444 if test "$ac_dir" != .; then
18445   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18446   # A "../" for each directory in $ac_dir_suffix.
18447   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18448 else
18449   ac_dir_suffix= ac_top_builddir=
18450 fi
18451
18452 case $srcdir in
18453   .)  # No --srcdir option.  We are building in place.
18454     ac_srcdir=.
18455     if test -z "$ac_top_builddir"; then
18456        ac_top_srcdir=.
18457     else
18458        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18459     fi ;;
18460   [\\/]* | ?:[\\/]* )  # Absolute path.
18461     ac_srcdir=$srcdir$ac_dir_suffix;
18462     ac_top_srcdir=$srcdir ;;
18463   *) # Relative path.
18464     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18465     ac_top_srcdir=$ac_top_builddir$srcdir ;;
18466 esac
18467 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18468 # absolute.
18469 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
18470 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
18471 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18472 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18473
18474
18475   case $INSTALL in
18476   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18477   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18478   esac
18479
18480   if test x"$ac_file" != x-; then
18481     { echo "$as_me:$LINENO: creating $ac_file" >&5
18482 echo "$as_me: creating $ac_file" >&6;}
18483     rm -f "$ac_file"
18484   fi
18485   # Let's still pretend it is `configure' which instantiates (i.e., don't
18486   # use $as_me), people would be surprised to read:
18487   #    /* config.h.  Generated by config.status.  */
18488   if test x"$ac_file" = x-; then
18489     configure_input=
18490   else
18491     configure_input="$ac_file.  "
18492   fi
18493   configure_input=$configure_input"Generated from `echo $ac_file_in |
18494                                      sed 's,.*/,,'` by configure."
18495
18496   # First look for the input files in the build tree, otherwise in the
18497   # src tree.
18498   ac_file_inputs=`IFS=:
18499     for f in $ac_file_in; do
18500       case $f in
18501       -) echo $tmp/stdin ;;
18502       [\\/$]*)
18503          # Absolute (can't be DOS-style, as IFS=:)
18504          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18505 echo "$as_me: error: cannot find input file: $f" >&2;}
18506    { (exit 1); exit 1; }; }
18507          echo $f;;
18508       *) # Relative
18509          if test -f "$f"; then
18510            # Build tree
18511            echo $f
18512          elif test -f "$srcdir/$f"; then
18513            # Source tree
18514            echo $srcdir/$f
18515          else
18516            # /dev/null tree
18517            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18518 echo "$as_me: error: cannot find input file: $f" >&2;}
18519    { (exit 1); exit 1; }; }
18520          fi;;
18521       esac
18522     done` || { (exit 1); exit 1; }
18523 _ACEOF
18524 cat >>$CONFIG_STATUS <<_ACEOF
18525   sed "$ac_vpsub
18526 $extrasub
18527 _ACEOF
18528 cat >>$CONFIG_STATUS <<\_ACEOF
18529 :t
18530 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18531 s,@configure_input@,$configure_input,;t t
18532 s,@srcdir@,$ac_srcdir,;t t
18533 s,@abs_srcdir@,$ac_abs_srcdir,;t t
18534 s,@top_srcdir@,$ac_top_srcdir,;t t
18535 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18536 s,@builddir@,$ac_builddir,;t t
18537 s,@abs_builddir@,$ac_abs_builddir,;t t
18538 s,@top_builddir@,$ac_top_builddir,;t t
18539 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18540 s,@INSTALL@,$ac_INSTALL,;t t
18541 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18542   rm -f $tmp/stdin
18543   if test x"$ac_file" != x-; then
18544     mv $tmp/out $ac_file
18545   else
18546     cat $tmp/out
18547     rm -f $tmp/out
18548   fi
18549
18550 done
18551 _ACEOF
18552 cat >>$CONFIG_STATUS <<\_ACEOF
18553
18554 #
18555 # CONFIG_HEADER section.
18556 #
18557
18558 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18559 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18560 #
18561 # ac_d sets the value in "#define NAME VALUE" lines.
18562 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18563 ac_dB='[        ].*$,\1#\2'
18564 ac_dC=' '
18565 ac_dD=',;t'
18566 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18567 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18568 ac_uB='$,\1#\2define\3'
18569 ac_uC=' '
18570 ac_uD=',;t'
18571
18572 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18573   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18574   case $ac_file in
18575   - | *:- | *:-:* ) # input from stdin
18576         cat >$tmp/stdin
18577         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18578         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18579   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18580         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18581   * )   ac_file_in=$ac_file.in ;;
18582   esac
18583
18584   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18585 echo "$as_me: creating $ac_file" >&6;}
18586
18587   # First look for the input files in the build tree, otherwise in the
18588   # src tree.
18589   ac_file_inputs=`IFS=:
18590     for f in $ac_file_in; do
18591       case $f in
18592       -) echo $tmp/stdin ;;
18593       [\\/$]*)
18594          # Absolute (can't be DOS-style, as IFS=:)
18595          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18596 echo "$as_me: error: cannot find input file: $f" >&2;}
18597    { (exit 1); exit 1; }; }
18598          echo $f;;
18599       *) # Relative
18600          if test -f "$f"; then
18601            # Build tree
18602            echo $f
18603          elif test -f "$srcdir/$f"; then
18604            # Source tree
18605            echo $srcdir/$f
18606          else
18607            # /dev/null tree
18608            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18609 echo "$as_me: error: cannot find input file: $f" >&2;}
18610    { (exit 1); exit 1; }; }
18611          fi;;
18612       esac
18613     done` || { (exit 1); exit 1; }
18614   # Remove the trailing spaces.
18615   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18616
18617 _ACEOF
18618
18619 # Transform confdefs.h into two sed scripts, `conftest.defines' and
18620 # `conftest.undefs', that substitutes the proper values into
18621 # config.h.in to produce config.h.  The first handles `#define'
18622 # templates, and the second `#undef' templates.
18623 # And first: Protect against being on the right side of a sed subst in
18624 # config.status.  Protect against being in an unquoted here document
18625 # in config.status.
18626 rm -f conftest.defines conftest.undefs
18627 # Using a here document instead of a string reduces the quoting nightmare.
18628 # Putting comments in sed scripts is not portable.
18629 #
18630 # `end' is used to avoid that the second main sed command (meant for
18631 # 0-ary CPP macros) applies to n-ary macro definitions.
18632 # See the Autoconf documentation for `clear'.
18633 cat >confdef2sed.sed <<\_ACEOF
18634 s/[\\&,]/\\&/g
18635 s,[\\$`],\\&,g
18636 t clear
18637 : clear
18638 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18639 t end
18640 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18641 : end
18642 _ACEOF
18643 # If some macros were called several times there might be several times
18644 # the same #defines, which is useless.  Nevertheless, we may not want to
18645 # sort them, since we want the *last* AC-DEFINE to be honored.
18646 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18647 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18648 rm -f confdef2sed.sed
18649
18650 # This sed command replaces #undef with comments.  This is necessary, for
18651 # example, in the case of _POSIX_SOURCE, which is predefined and required
18652 # on some systems where configure will not decide to define it.
18653 cat >>conftest.undefs <<\_ACEOF
18654 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18655 _ACEOF
18656
18657 # Break up conftest.defines because some shells have a limit on the size
18658 # of here documents, and old seds have small limits too (100 cmds).
18659 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
18660 echo '  if egrep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
18661 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18662 echo '  :' >>$CONFIG_STATUS
18663 rm -f conftest.tail
18664 while grep . conftest.defines >/dev/null
18665 do
18666   # Write a limited-size here document to $tmp/defines.sed.
18667   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18668   # Speed up: don't consider the non `#define' lines.
18669   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
18670   # Work around the forget-to-reset-the-flag bug.
18671   echo 't clr' >>$CONFIG_STATUS
18672   echo ': clr' >>$CONFIG_STATUS
18673   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
18674   echo 'CEOF
18675   sed -f $tmp/defines.sed $tmp/in >$tmp/out
18676   rm -f $tmp/in
18677   mv $tmp/out $tmp/in
18678 ' >>$CONFIG_STATUS
18679   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18680   rm -f conftest.defines
18681   mv conftest.tail conftest.defines
18682 done
18683 rm -f conftest.defines
18684 echo '  fi # egrep' >>$CONFIG_STATUS
18685 echo >>$CONFIG_STATUS
18686
18687 # Break up conftest.undefs because some shells have a limit on the size
18688 # of here documents, and old seds have small limits too (100 cmds).
18689 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
18690 rm -f conftest.tail
18691 while grep . conftest.undefs >/dev/null
18692 do
18693   # Write a limited-size here document to $tmp/undefs.sed.
18694   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18695   # Speed up: don't consider the non `#undef'
18696   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
18697   # Work around the forget-to-reset-the-flag bug.
18698   echo 't clr' >>$CONFIG_STATUS
18699   echo ': clr' >>$CONFIG_STATUS
18700   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18701   echo 'CEOF
18702   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18703   rm -f $tmp/in
18704   mv $tmp/out $tmp/in
18705 ' >>$CONFIG_STATUS
18706   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18707   rm -f conftest.undefs
18708   mv conftest.tail conftest.undefs
18709 done
18710 rm -f conftest.undefs
18711
18712 cat >>$CONFIG_STATUS <<\_ACEOF
18713   # Let's still pretend it is `configure' which instantiates (i.e., don't
18714   # use $as_me), people would be surprised to read:
18715   #    /* config.h.  Generated by config.status.  */
18716   if test x"$ac_file" = x-; then
18717     echo "/* Generated by configure.  */" >$tmp/config.h
18718   else
18719     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
18720   fi
18721   cat $tmp/in >>$tmp/config.h
18722   rm -f $tmp/in
18723   if test x"$ac_file" != x-; then
18724     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18725       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18726 echo "$as_me: $ac_file is unchanged" >&6;}
18727     else
18728       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18729 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18730          X"$ac_file" : 'X\(//\)[^/]' \| \
18731          X"$ac_file" : 'X\(//\)$' \| \
18732          X"$ac_file" : 'X\(/\)' \| \
18733          .     : '\(.\)' 2>/dev/null ||
18734 echo X"$ac_file" |
18735     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18736           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18737           /^X\(\/\/\)$/{ s//\1/; q; }
18738           /^X\(\/\).*/{ s//\1/; q; }
18739           s/.*/./; q'`
18740       { case "$ac_dir" in
18741   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18742   *)                      as_incr_dir=.;;
18743 esac
18744 as_dummy="$ac_dir"
18745 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18746   case $as_mkdir_dir in
18747     # Skip DOS drivespec
18748     ?:) as_incr_dir=$as_mkdir_dir ;;
18749     *)
18750       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18751       test -d "$as_incr_dir" ||
18752         mkdir "$as_incr_dir" ||
18753         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18754 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18755    { (exit 1); exit 1; }; }
18756     ;;
18757   esac
18758 done; }
18759
18760       rm -f $ac_file
18761       mv $tmp/config.h $ac_file
18762     fi
18763   else
18764     cat $tmp/config.h
18765     rm -f $tmp/config.h
18766   fi
18767 done
18768 _ACEOF
18769 cat >>$CONFIG_STATUS <<\_ACEOF
18770
18771 #
18772 # CONFIG_COMMANDS section.
18773 #
18774 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18775   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18776   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18777   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
18778 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18779          X"$ac_dest" : 'X\(//\)[^/]' \| \
18780          X"$ac_dest" : 'X\(//\)$' \| \
18781          X"$ac_dest" : 'X\(/\)' \| \
18782          .     : '\(.\)' 2>/dev/null ||
18783 echo X"$ac_dest" |
18784     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18785           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18786           /^X\(\/\/\)$/{ s//\1/; q; }
18787           /^X\(\/\).*/{ s//\1/; q; }
18788           s/.*/./; q'`
18789   ac_builddir=.
18790
18791 if test "$ac_dir" != .; then
18792   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18793   # A "../" for each directory in $ac_dir_suffix.
18794   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18795 else
18796   ac_dir_suffix= ac_top_builddir=
18797 fi
18798
18799 case $srcdir in
18800   .)  # No --srcdir option.  We are building in place.
18801     ac_srcdir=.
18802     if test -z "$ac_top_builddir"; then
18803        ac_top_srcdir=.
18804     else
18805        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18806     fi ;;
18807   [\\/]* | ?:[\\/]* )  # Absolute path.
18808     ac_srcdir=$srcdir$ac_dir_suffix;
18809     ac_top_srcdir=$srcdir ;;
18810   *) # Relative path.
18811     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18812     ac_top_srcdir=$ac_top_builddir$srcdir ;;
18813 esac
18814 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18815 # absolute.
18816 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
18817 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
18818 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18819 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18820
18821
18822   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
18823 echo "$as_me: executing $ac_dest commands" >&6;}
18824   case $ac_dest in
18825     default-1 )
18826
18827 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
18828 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
18829   rm -f intltool-extract.out
18830 else
18831   mv -f intltool-extract.out intltool-extract
18832 fi
18833 chmod ugo+x intltool-extract
18834 chmod u+w intltool-extract
18835
18836 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
18837 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
18838   rm -f intltool-merge.out
18839 else
18840   mv -f intltool-merge.out intltool-merge
18841 fi
18842 chmod ugo+x intltool-merge
18843 chmod u+w intltool-merge
18844
18845 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
18846 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
18847   rm -f intltool-update.out
18848 else
18849   mv -f intltool-update.out intltool-update
18850 fi
18851 chmod ugo+x intltool-update
18852 chmod u+w intltool-update
18853
18854  ;;
18855     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
18856         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
18857       esac ;;
18858   esac
18859 done
18860 _ACEOF
18861
18862 cat >>$CONFIG_STATUS <<\_ACEOF
18863
18864 { (exit 0); exit 0; }
18865 _ACEOF
18866 chmod +x $CONFIG_STATUS
18867 ac_clean_files=$ac_clean_files_save
18868
18869
18870 # configure is writing to config.log, and then calls config.status.
18871 # config.status does its own redirection, appending to config.log.
18872 # Unfortunately, on DOS this fails, as config.log is still kept open
18873 # by configure, so config.status won't be able to write to it; its
18874 # output is simply discarded.  So we exec the FD to /dev/null,
18875 # effectively closing config.log, so it can be properly (re)opened and
18876 # appended to by config.status.  When coming back to configure, we
18877 # need to make the FD available again.
18878 if test "$no_create" != yes; then
18879   ac_cs_success=:
18880   exec 5>/dev/null
18881   $SHELL $CONFIG_STATUS || ac_cs_success=false
18882   exec 5>>config.log
18883   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18884   # would make configure fail if this is the last instruction.
18885   $ac_cs_success || { (exit 1); exit 1; }
18886 fi
18887
18888
18889 ###############################################################################
18890 #
18891 #       Print some warnings at the end.
18892 #
18893 ###############################################################################
18894
18895 warn_prefix_1="    Warning:"
18896 warn_prefix_2="       Note:"
18897 warn_prefix="$warn_prefix_1"
18898
18899 warning=no
18900 warnsep='    #################################################################'
18901
18902 warnpre() {
18903   if test "$warning" = no ; then
18904     echo '' ; echo "$warnsep" ; echo ''
18905     warning=yes
18906   fi
18907 }
18908
18909 warn() {
18910   warnpre
18911   if test "$warning" = long ; then echo '' ; fi
18912   warning=yes
18913   rest="$@"
18914   echo "$warn_prefix $rest"
18915 }
18916
18917 warnL() {
18918   was=$warning
18919   warnpre
18920   warning=yes
18921   if test "$was" != no ; then echo '' ; fi
18922   rest="$@"
18923   echo "$warn_prefix $rest"
18924 }
18925
18926 warn2() {
18927   rest="$@"
18928   echo "             $rest"
18929   warning=long
18930 }
18931
18932 note() {
18933   warn_prefix="$warn_prefix_2"
18934   warn $@
18935   warn_prefix="$warn_prefix_1"
18936 }
18937
18938 noteL() {
18939   warn_prefix="$warn_prefix_2"
18940   warnL $@
18941   warn_prefix="$warn_prefix_1"
18942 }
18943
18944
18945 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
18946   warn 'The SGI saver extension was requested, but was not found.'
18947 fi
18948
18949 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
18950   warn 'The MIT saver extension was requested, but was not found.'
18951 fi
18952
18953 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
18954   warn 'The XIdle extension was requested, but was not found.'
18955 fi
18956
18957 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
18958   warn 'The XSHM extension was requested, but was not found.'
18959 fi
18960
18961 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
18962   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
18963 fi
18964
18965 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
18966   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
18967 fi
18968
18969 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
18970   warn 'The DPMS extension was requested, but was not found.'
18971 fi
18972
18973 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
18974   warn 'The Xinerama extension was requested, but was not found.'
18975 fi
18976
18977 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
18978   warn 'The XF86VMODE extension was requested, but was not found.'
18979 fi
18980
18981 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
18982   warn "Checking of /proc/interrupts was requested, but it's bogus."
18983 fi
18984
18985
18986 if test "$have_motif" = no -a "$have_gtk" = no; then
18987   warnL "Neither Motif nor Gtk seem to be available;"
18988   warn2 "the \`xscreensaver-demo' program requires one of these."
18989
18990 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
18991   warnL "Use of Motif was requested, but it wasn't found;"
18992   warn2 "Gtk will be used instead."
18993
18994 elif test "$jurassic_gtk" = yes ; then
18995
18996   pref_gtk=1.2
18997
18998   v="$ac_gtk_version_string"
18999   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
19000     warnL "Use of Gtk was requested, but its version number is unknown;"
19001   elif test "$with_gtk_req" = yes ; then
19002     warnL "Use of Gtk was requested, but it is version $v;"
19003   else
19004     warnL "Gtk was found on this system, but it is version $v;"
19005   fi
19006
19007   warn2 "Gtk $pref_gtk or newer is required.  Motif will be used instead."
19008
19009 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
19010   warnL "Use of Gtk was requested, but it wasn't found."
19011   if test "$have_motif" = yes; then
19012     warn2 "Motif will be used instead."
19013   fi
19014 fi
19015
19016 if test "$gtk2_halfassed" != no ; then
19017   warnL "GTK version $gtk2_halfassed was found, but at least one supporting"
19018   warn2 "library ($gtk2_halfassed_lib) was not, so GTK 2.x can't be used."
19019   v="$ac_gtk_version_string"
19020   warn2 "GTK $v is also installed, so it will be used instead."
19021   warn2 "Please read the above output and the \`config.log' file"
19022   warn2 "for more details."
19023 fi
19024
19025
19026 if test "$with_gnome_req" = yes -a "$have_gnome" = no ; then
19027   warn  'Use of the Gnome Control Panel was requested, but the necessary'
19028   warn2 'headers and/or libraries were not found.'
19029 fi
19030
19031 if test "$have_gtk" = yes ; then
19032   if test "$have_xml" = no ; then
19033     if test "$with_xml_req" = yes ; then
19034       warn  'Use of the XML library was requested, but the necessary'
19035       warn2 'headers and/or libraries were not found.'
19036     else
19037       warn  'GTK is being used, but the XML library was not found.'
19038     fi
19039
19040     if test "$xml_halfassed" = yes ; then
19041
19042       if test "$have_zlib" = yes ; then
19043         which="XML libraries"
19044       else
19045         which="\`zlib' library"
19046       fi
19047
19048       echo ''
19049       warn2 'More specifically, we found the headers, but not the'
19050       warn2 "$which; so either XML is half-installed on this"
19051       warn2 "system, or something else went wrong.  The \`config.log'"
19052       warn2 'file might contain some clues.'
19053     fi
19054
19055     echo ''
19056     warn2 "Without XML, the per-display-mode \`Settings' dialogs"
19057     warn2 'will not be available.  Specify the location of the XML'
19058     warn2 'library through the --with-xml option to configure.'
19059   fi
19060 fi
19061
19062 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
19063   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
19064   warn2 "headers were not found.  That can't be good.  Please"
19065   warn2 "install the GDK-Pixbuf development kit and re-configure."
19066 fi
19067
19068 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
19069
19070   preferred_lesstif=0.92
19071
19072   if test "$lesstif_version" = unknown; then
19073     warnL "Unable to determine the LessTif version number!"
19074     warn2 "Make sure you are using version $preferred_lesstif or newer."
19075     warn2 "See <http://www.lesstif.org/>."
19076
19077   elif test \! $lesstif_version -gt 82; then
19078     warnL "LessTif version $lesstif_version_string is being used."
19079     warn2 "LessTif versions 0.82 and earlier are too buggy to"
19080     warn2 "use with XScreenSaver; it is strongly recommended"
19081     warn2 "that you upgrade to at least version $preferred_lesstif!"
19082     warn2 "See <http://www.lesstif.org/>."
19083   fi
19084 fi
19085
19086
19087 if test "$have_motif" = yes -a "$have_gtk" = no ; then
19088   warn  'Motif is being used, and GTK is not.'
19089   echo  ''
19090   warn2 'Though the Motif front-end to xscreensaver is still'
19091   warn2 'maintained, it is no longer being updated with new'
19092   warn2 'features: all new development on the xscreensaver-demo'
19093   warn2 'program is happening in the GTK version, and not in the'
19094   warn2 'Motif version.  It is recommended that you build against'
19095   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
19096 fi
19097
19098
19099 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
19100   warnL 'Use of XPM was requested, but it was not found.'
19101 fi
19102
19103 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
19104   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
19105 fi
19106
19107 if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \
19108    test "$gdk_pixbuf_halfassed" = yes; then
19109
19110   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
19111     true
19112   elif test "$with_xpm_req" = no ; then
19113     warnL 'The XPM library is not being used.'
19114   else
19115     warnL 'The XPM library was not found.'
19116   fi
19117
19118   if test "$with_gdk_pixbuf_req" = yes ; then
19119     true
19120   elif test "$with_gdk_pixbuf_req" = no ; then
19121     warnL 'The GDK-Pixbuf library is not being used.'
19122   else
19123     warnL 'The GDK-Pixbuf library was not found.'
19124   fi
19125
19126   if test "$gdk_pixbuf_halfassed" = yes ; then
19127     echo ''
19128     warn2 'More specifically, we found the headers, but not the'
19129     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
19130     warn2 "system, or something else went wrong.  The \`config.log'"
19131     warn2 'file might contain some clues.'
19132   fi
19133
19134   echo ''
19135   warn2 'Some of the demos will not be as colorful as they'
19136   warn2 'could be.  You should consider installing Pixbuf or'
19137   warn2 'XPM and re-running configure.  (Remember to delete'
19138   warn2 'the config.cache file first.)  The Pixbuf library is'
19139   warn2 'a part of GNOME.  The XPM library comes with most'
19140   warn2 'X11 installations; you can also find it at the X11'
19141   warn2 'archive sites, such as <http://sunsite.unc.edu/>.'
19142   echo  ''
19143   warn2 'GDK-Pixbuf is recommended over XPM, as it provides'
19144   warn2 'support for more image formats.'
19145 fi
19146
19147
19148 if test "$have_jpeg" = no ; then
19149   if test "$with_jpeg_req" = yes ; then
19150     warnL 'Use of libjpeg was requested, but it was not found.'
19151   elif test "$with_jpeg_req" = no ; then
19152     noteL 'The JPEG library is not being used.'
19153   else
19154     noteL 'The JPEG library was not found.'
19155   fi
19156
19157   if test "$jpeg_halfassed" = yes ; then
19158     echo ''
19159     warn2 'More specifically, we found the headers, but not the'
19160     warn2 'library; so either JPEG is half-installed on this'
19161     warn2 "system, or something else went wrong.  The \`config.log'"
19162     warn2 'file might contain some clues.'
19163     echo ''
19164   fi
19165
19166   warn2 "This means the \`webcollage' program will be much slower."
19167 fi
19168
19169
19170 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
19171   preferred_mesagl=3.4
19172   mgv="$ac_mesagl_version_string"
19173   pgl="$preferred_mesagl"
19174
19175   if test "$ac_mesagl_version" = unknown; then
19176     warnL "Unable to determine the MesaGL version number!"
19177     warn2 "Make sure you are using version $preferred_mesagl or newer."
19178
19179   elif test \! "$ac_mesagl_version" -gt 2006; then
19180     warnL "MesaGL version $mgv is being used.  MesaGL 2.6 and earlier"
19181     warn2 "have a security bug.  It is strongly recommended that you"
19182     warn2 "upgrade to at least version $preferred_mesagl."
19183
19184   elif test \! "$ac_mesagl_version" -gt 3003; then
19185     warnL "MesaGL version $mgv is being used.  That version has some"
19186     warn2 "bugs; it is recommended that you upgrade to $pgl or newer."
19187   fi
19188 fi
19189
19190 if test "$have_gl" = no ; then
19191   if test "$with_gl_req" = yes ; then
19192     warnL 'Use of GL was requested, but it was not found.'
19193   elif test "$with_gl_req" = no ; then
19194     noteL 'The OpenGL 3D library is not being used.'
19195   else
19196     noteL 'The OpenGL 3D library was not found.'
19197   fi
19198
19199   if test "$gl_halfassed" = yes ; then
19200     echo ''
19201     warn2 'More specifically, we found the headers, but not the'
19202     warn2 'libraries; so either GL is half-installed on this'
19203     warn2 "system, or something else went wrong.  The \`config.log'"
19204     warn2 'file might contain some clues.'
19205   fi
19206
19207   echo ''
19208   warn2 'Those demos which use 3D will not be built or installed.'
19209   warn2 'You might want to consider installing OpenGL and'
19210   warn2 're-running configure.  (Remember to delete the'
19211   warn2 "config.cache file first.)  If your vendor doesn't ship"
19212   warn2 'their own implementation of OpenGL, you can get a free'
19213   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
19214   warn2 'info, see <http://www.opengl.org/>.'
19215
19216 fi
19217
19218
19219 if test "$have_gl" = yes -a "$have_gle" = no ; then
19220   if test "$with_gle_req" = yes ; then
19221     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
19222     warn2 'it was not found (though the OpenGL library was found, and'
19223     warn2 'is being used.)'
19224   elif test "$with_gle_req" = no ; then
19225     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
19226     warn2 'library is not.'
19227   else
19228     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
19229     warn2 'was not.'
19230   fi
19231
19232   if test "$gle_halfassed" = yes ; then
19233     echo ''
19234     warn2 'More specifically, we found the headers, but not the'
19235     warn2 'libraries; so either GLE is half-installed on this'
19236     warn2 "system, or something else went wrong.  The \`config.log'"
19237     warn2 'file might contain some clues.'
19238   fi
19239
19240   echo ''
19241   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
19242   warn2 'will not be built or installed.  You might want to consider'
19243   warn2 'installing GLE and re-running configure.  (Remember to delete'
19244   warn2 'the config.cache file first.)  You can find the GLE library'
19245   warn2 'at <http://www.linas.org/gle/>.  For general OpenGL info,'
19246   warn2 'see <http://www.opengl.org/>.'
19247
19248 fi
19249
19250
19251 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
19252   warn 'Use of XReadDisplay was requested, but it was not found.'
19253 fi
19254
19255 if test -n "$with_fortune_req"; then
19256   if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
19257     warnL "$with_fortune_req was requested as the Fortune program,"
19258     warn2 "but was not found.  The default will be used instead."
19259   fi
19260 fi
19261
19262 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
19263   warn 'Use of Kerberos was requested, but it was not found.'
19264 fi
19265
19266 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
19267   warn 'Use of PAM was requested, but it was not found.'
19268 fi
19269
19270 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
19271   warn 'Use of shadow passwords was requested, but they were not found.'
19272 fi
19273
19274
19275 # You are in a twisty maze of namespaces and syntaxes, all alike.
19276 # Fuck the skull of Unix.
19277 #
19278 eval bindir=${bindir}
19279 eval bindir=${bindir}
19280 eval bindir=${bindir}
19281 eval bindir=${bindir}
19282 eval bindir=${bindir}
19283 eval bindir=${bindir}
19284 eval HACKDIR=${HACKDIR}
19285 eval HACKDIR=${HACKDIR}
19286 eval HACKDIR=${HACKDIR}
19287 eval HACKDIR=${HACKDIR}
19288 eval HACKDIR=${HACKDIR}
19289 eval HACKDIR=${HACKDIR}
19290 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19291 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19292 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19293 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19294 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19295 eval HACK_CONF_DIR=${HACK_CONF_DIR}
19296
19297 # canonicalize slashes.
19298 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
19299 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
19300 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
19301
19302
19303 # Sanity check the hackdir
19304 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
19305   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
19306     echo ""
19307     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
19308                    There will be an executable installed with that name, so
19309                    that can't be the name of a directory as well.  Please
19310                    re-configure with a different directory name." >&5
19311 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
19312                    There will be an executable installed with that name, so
19313                    that can't be the name of a directory as well.  Please
19314                    re-configure with a different directory name." >&2;}
19315    { (exit 1); exit 1; }; }
19316   fi
19317 done
19318
19319
19320 do_dir_warning=no
19321
19322 # Now let's see if there's a previous RPM version already installed.  Blargh!
19323
19324 # M4 sucks!!
19325
19326 rpmv=`(rpm -qv xscreensaver) 2>/dev/null | \
19327       sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
19328
19329
19330 if test \! -z "$rpmv" ; then
19331   rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
19332   rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
19333
19334   warning=no
19335   warnL "There is already an installed RPM of xscreensaver $rpmv"
19336   warn2 "on this system.  You might want to remove it (with"
19337   warn2 '"rpm -ve xscreensaver") before running "make install"'
19338   warn2 "from this directory."
19339   echo ""
19340   warn2 "Alternately, you could build this version of xscreensaver"
19341   warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
19342   warn2 "file is included.  See the RPM documentation for more info."
19343   echo ""
19344
19345   if test "$rpmbdir" = "$rpmhdir" ; then
19346     warn2 "The RPM version was installed in $rpmbdir/."
19347   else
19348     warn2 "The RPM version was installed in $rpmbdir/,"
19349     warn2 "with demos in $rpmhdir/."
19350   fi
19351
19352   do_dir_warning=yes
19353 fi
19354
19355
19356 if test "${bindir}" = "${HACKDIR}" ; then
19357   do_dir_warning=yes
19358 fi
19359
19360 if test "$do_dir_warning" = yes; then
19361   echo ""
19362   echo "$warnsep"
19363   echo ""
19364   echo '      When you run "make install", the "xscreensaver",'
19365   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
19366   echo "      will be installed in ${bindir}/."
19367   echo ""
19368   echo "      The various graphics demos (140+ different executables) will"
19369   echo "      be installed in ${HACKDIR}/."
19370   echo ""
19371   echo "      If you would prefer the demos to be installed elsewhere,"
19372   echo "      you should re-run configure with the --with-hackdir=DIR"
19373   echo "      option.  For more information, run \`./configure --help'."
19374   warning=yes
19375 fi
19376
19377 if test "$warning" != no; then
19378   echo '' ; echo "$warnsep" ; echo ''
19379 fi
19380
19381 if test "$do_dir_warning" = no; then
19382   if test "$warning" = no; then
19383     echo ''
19384   fi
19385   echo "User programs will be installed in ${bindir}/"
19386   echo "Screen savers will be installed in ${HACKDIR}/"
19387   echo "Configuration will be installed in ${HACK_CONF_DIR}/"
19388   echo ''
19389 fi