b8c26708b83ada18ebd6e3b0d38871c7621b401f
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59.
4 #
5 # Copyright (C) 2003 Free Software Foundation, Inc.
6 # This configure script is free software; the Free Software Foundation
7 # gives unlimited permission to copy, distribute and modify it.
8 ## --------------------- ##
9 ## M4sh Initialization.  ##
10 ## --------------------- ##
11
12 # Be Bourne compatible
13 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14   emulate sh
15   NULLCMD=:
16   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17   # is contrary to our usage.  Disable this feature.
18   alias -g '${1+"$@"}'='"$@"'
19 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20   set -o posix
21 fi
22 DUALCASE=1; export DUALCASE # for MKS sh
23
24 # Support unset when possible.
25 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26   as_unset=unset
27 else
28   as_unset=false
29 fi
30
31
32 # Work around bugs in pre-3.0 UWIN ksh.
33 $as_unset ENV MAIL MAILPATH
34 PS1='$ '
35 PS2='> '
36 PS4='+ '
37
38 # NLS nuisances.
39 for as_var in \
40   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42   LC_TELEPHONE LC_TIME
43 do
44   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
45     eval $as_var=C; export $as_var
46   else
47     $as_unset $as_var
48   fi
49 done
50
51 # Required to use basename.
52 if expr a : '\(a\)' >/dev/null 2>&1; then
53   as_expr=expr
54 else
55   as_expr=false
56 fi
57
58 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59   as_basename=basename
60 else
61   as_basename=false
62 fi
63
64
65 # Name of the executable.
66 as_me=`$as_basename "$0" ||
67 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68          X"$0" : 'X\(//\)$' \| \
69          X"$0" : 'X\(/\)$' \| \
70          .     : '\(.\)' 2>/dev/null ||
71 echo X/"$0" |
72     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73           /^X\/\(\/\/\)$/{ s//\1/; q; }
74           /^X\/\(\/\).*/{ s//\1/; q; }
75           s/.*/./; q'`
76
77
78 # PATH needs CR, and LINENO needs CR and PATH.
79 # Avoid depending upon Character Ranges.
80 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83 as_cr_digits='0123456789'
84 as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86 # The user is always right.
87 if test "${PATH_SEPARATOR+set}" != set; then
88   echo "#! /bin/sh" >conf$$.sh
89   echo  "exit 0"   >>conf$$.sh
90   chmod +x conf$$.sh
91   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92     PATH_SEPARATOR=';'
93   else
94     PATH_SEPARATOR=:
95   fi
96   rm -f conf$$.sh
97 fi
98
99
100   as_lineno_1=$LINENO
101   as_lineno_2=$LINENO
102   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103   test "x$as_lineno_1" != "x$as_lineno_2" &&
104   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
105   # Find who we are.  Look in the path if we contain no path at all
106   # relative or not.
107   case $0 in
108     *[\\/]* ) as_myself=$0 ;;
109     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110 for as_dir in $PATH
111 do
112   IFS=$as_save_IFS
113   test -z "$as_dir" && as_dir=.
114   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115 done
116
117        ;;
118   esac
119   # We did not find ourselves, most probably we were run as `sh COMMAND'
120   # in which case we are not to be found in the path.
121   if test "x$as_myself" = x; then
122     as_myself=$0
123   fi
124   if test ! -f "$as_myself"; then
125     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126    { (exit 1); exit 1; }; }
127   fi
128   case $CONFIG_SHELL in
129   '')
130     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132 do
133   IFS=$as_save_IFS
134   test -z "$as_dir" && as_dir=.
135   for as_base in sh bash ksh sh5; do
136          case $as_dir in
137          /*)
138            if ("$as_dir/$as_base" -c '
139   as_lineno_1=$LINENO
140   as_lineno_2=$LINENO
141   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142   test "x$as_lineno_1" != "x$as_lineno_2" &&
143   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
144              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146              CONFIG_SHELL=$as_dir/$as_base
147              export CONFIG_SHELL
148              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149            fi;;
150          esac
151        done
152 done
153 ;;
154   esac
155
156   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157   # uniformly replaced by the line number.  The first 'sed' inserts a
158   # line-number line before each line; the second 'sed' does the real
159   # work.  The second script uses 'N' to pair each line-number line
160   # with the numbered line, and appends trailing '-' during
161   # substitution so that $LINENO is not a special case at line end.
162   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
164   sed '=' <$as_myself |
165     sed '
166       N
167       s,$,-,
168       : loop
169       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170       t loop
171       s,-$,,
172       s,^['$as_cr_digits']*\n,,
173     ' >$as_me.lineno &&
174   chmod +x $as_me.lineno ||
175     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176    { (exit 1); exit 1; }; }
177
178   # Don't try to exec as it changes $[0], causing all sort of problems
179   # (the dirname of $[0] is not the place where we might find the
180   # original and so on.  Autoconf is especially sensible to this).
181   . ./$as_me.lineno
182   # Exit status is that of the last command.
183   exit
184 }
185
186
187 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188   *c*,-n*) ECHO_N= ECHO_C='
189 ' ECHO_T='      ' ;;
190   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
192 esac
193
194 if expr a : '\(a\)' >/dev/null 2>&1; then
195   as_expr=expr
196 else
197   as_expr=false
198 fi
199
200 rm -f conf$$ conf$$.exe conf$$.file
201 echo >conf$$.file
202 if ln -s conf$$.file conf$$ 2>/dev/null; then
203   # We could just check for DJGPP; but this test a) works b) is more generic
204   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205   if test -f conf$$.exe; then
206     # Don't use ln at all; we don't have any links
207     as_ln_s='cp -p'
208   else
209     as_ln_s='ln -s'
210   fi
211 elif ln conf$$.file conf$$ 2>/dev/null; then
212   as_ln_s=ln
213 else
214   as_ln_s='cp -p'
215 fi
216 rm -f conf$$ conf$$.exe conf$$.file
217
218 if mkdir -p . 2>/dev/null; then
219   as_mkdir_p=:
220 else
221   test -d ./-p && rmdir ./-p
222   as_mkdir_p=false
223 fi
224
225 as_executable_p="test -f"
226
227 # Sed expression to map a string onto a valid CPP name.
228 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
229
230 # Sed expression to map a string onto a valid variable name.
231 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
232
233
234 # IFS
235 # We need space, tab and new line, in precisely that order.
236 as_nl='
237 '
238 IFS="   $as_nl"
239
240 # CDPATH.
241 $as_unset CDPATH
242
243
244 # Name of the host.
245 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246 # so uname gets run too.
247 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249 exec 6>&1
250
251 #
252 # Initializations.
253 #
254 ac_default_prefix=/usr/local
255 ac_config_libobj_dir=.
256 cross_compiling=no
257 subdirs=
258 MFLAGS=
259 MAKEFLAGS=
260 SHELL=${CONFIG_SHELL-/bin/sh}
261
262 # Maximum number of lines to put in a shell here document.
263 # This variable seems obsolete.  It should probably be removed, and
264 # only ac_max_sed_lines should be used.
265 : ${ac_max_here_lines=38}
266
267 # Identity of this package.
268 PACKAGE_NAME=
269 PACKAGE_TARNAME=
270 PACKAGE_VERSION=
271 PACKAGE_STRING=
272 PACKAGE_BUGREPORT=
273
274 ac_unique_file="driver/subprocs.c"
275 # Factoring default headers for most tests.
276 ac_includes_default="\
277 #include <stdio.h>
278 #if HAVE_SYS_TYPES_H
279 # include <sys/types.h>
280 #endif
281 #if HAVE_SYS_STAT_H
282 # include <sys/stat.h>
283 #endif
284 #if STDC_HEADERS
285 # include <stdlib.h>
286 # include <stddef.h>
287 #else
288 # if HAVE_STDLIB_H
289 #  include <stdlib.h>
290 # endif
291 #endif
292 #if HAVE_STRING_H
293 # if !STDC_HEADERS && HAVE_MEMORY_H
294 #  include <memory.h>
295 # endif
296 # include <string.h>
297 #endif
298 #if HAVE_STRINGS_H
299 # include <strings.h>
300 #endif
301 #if HAVE_INTTYPES_H
302 # include <inttypes.h>
303 #else
304 # if HAVE_STDINT_H
305 #  include <stdint.h>
306 # endif
307 #endif
308 #if HAVE_UNISTD_H
309 # include <unistd.h>
310 #endif"
311
312 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE EGREP PERL X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XML_RULE INTLTOOL_CAVES_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL GETTEXT_PACKAGE RANLIB ac_ct_RANLIB ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB MKINSTALLDIRS pkg_config have_gnome_help fortune_tmp INCLUDES PREFERRED_DEMO_PROGRAM ALL_DEMO_PROGRAMS SAVER_LIBS MOTIF_LIBS GTK_LIBS XML_LIBS JPEG_LIBS HACK_LIBS XPM_LIBS PTY_LIBS GL_LIBS GLE_LIBS XDPMS_LIBS PASSWD_LIBS INSTALL_SETUID SETUID_HACKS INSTALL_DIRS NEED_SETUID INSTALL_PAM OBJCC EXES_OSX SCRIPTS_OSX MEN_OSX PASSWD_SRCS PASSWD_OBJS XMU_SRCS XMU_OBJS XMU_LIBS SAVER_GL_SRCS SAVER_GL_OBJS SAVER_GL_LIBS LOCK_SRCS LOCK_OBJS JPEG_EXES GL_EXES GL_UTIL_EXES GL_MEN GL_KLUDGE GLE_EXES GLE_KLUDGE GNOMEHELP_Y GNOMEHELP_N HACKDIR GNOME_DATADIR GLADE_DATADIR PO_DATADIR GNOME_PANELDIR HACK_CONF_DIR GTK_EXTRA_OBJS APPDEFAULTS DEPEND DEPEND_FLAGS DEPEND_DEFINES LIBOBJS LTLIBOBJS'
313 ac_subst_files=''
314
315 # Initialize some variables set by options.
316 ac_init_help=
317 ac_init_version=false
318 # The variables have the same names as the options, with
319 # dashes changed to underlines.
320 cache_file=/dev/null
321 exec_prefix=NONE
322 no_create=
323 no_recursion=
324 prefix=NONE
325 program_prefix=NONE
326 program_suffix=NONE
327 program_transform_name=s,x,x,
328 silent=
329 site=
330 srcdir=
331 verbose=
332 x_includes=NONE
333 x_libraries=NONE
334
335 # Installation directory options.
336 # These are left unexpanded so users can "make install exec_prefix=/foo"
337 # and all the variables that are supposed to be based on exec_prefix
338 # by default will actually change.
339 # Use braces instead of parens because sh, perl, etc. also accept them.
340 bindir='${exec_prefix}/bin'
341 sbindir='${exec_prefix}/sbin'
342 libexecdir='${exec_prefix}/libexec'
343 datadir='${prefix}/share'
344 sysconfdir='${prefix}/etc'
345 sharedstatedir='${prefix}/com'
346 localstatedir='${prefix}/var'
347 libdir='${exec_prefix}/lib'
348 includedir='${prefix}/include'
349 oldincludedir='/usr/include'
350 infodir='${prefix}/info'
351 mandir='${prefix}/man'
352
353 ac_prev=
354 for ac_option
355 do
356   # If the previous option needs an argument, assign it.
357   if test -n "$ac_prev"; then
358     eval "$ac_prev=\$ac_option"
359     ac_prev=
360     continue
361   fi
362
363   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
364
365   # Accept the important Cygnus configure options, so we can diagnose typos.
366
367   case $ac_option in
368
369   -bindir | --bindir | --bindi | --bind | --bin | --bi)
370     ac_prev=bindir ;;
371   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
372     bindir=$ac_optarg ;;
373
374   -build | --build | --buil | --bui | --bu)
375     ac_prev=build_alias ;;
376   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
377     build_alias=$ac_optarg ;;
378
379   -cache-file | --cache-file | --cache-fil | --cache-fi \
380   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381     ac_prev=cache_file ;;
382   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
384     cache_file=$ac_optarg ;;
385
386   --config-cache | -C)
387     cache_file=config.cache ;;
388
389   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390     ac_prev=datadir ;;
391   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392   | --da=*)
393     datadir=$ac_optarg ;;
394
395   -disable-* | --disable-*)
396     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
397     # Reject names that are not valid shell variable names.
398     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400    { (exit 1); exit 1; }; }
401     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402     eval "enable_$ac_feature=no" ;;
403
404   -enable-* | --enable-*)
405     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
406     # Reject names that are not valid shell variable names.
407     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409    { (exit 1); exit 1; }; }
410     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411     case $ac_option in
412       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
413       *) ac_optarg=yes ;;
414     esac
415     eval "enable_$ac_feature='$ac_optarg'" ;;
416
417   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419   | --exec | --exe | --ex)
420     ac_prev=exec_prefix ;;
421   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423   | --exec=* | --exe=* | --ex=*)
424     exec_prefix=$ac_optarg ;;
425
426   -gas | --gas | --ga | --g)
427     # Obsolete; use --with-gas.
428     with_gas=yes ;;
429
430   -help | --help | --hel | --he | -h)
431     ac_init_help=long ;;
432   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433     ac_init_help=recursive ;;
434   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435     ac_init_help=short ;;
436
437   -host | --host | --hos | --ho)
438     ac_prev=host_alias ;;
439   -host=* | --host=* | --hos=* | --ho=*)
440     host_alias=$ac_optarg ;;
441
442   -includedir | --includedir | --includedi | --included | --include \
443   | --includ | --inclu | --incl | --inc)
444     ac_prev=includedir ;;
445   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446   | --includ=* | --inclu=* | --incl=* | --inc=*)
447     includedir=$ac_optarg ;;
448
449   -infodir | --infodir | --infodi | --infod | --info | --inf)
450     ac_prev=infodir ;;
451   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
452     infodir=$ac_optarg ;;
453
454   -libdir | --libdir | --libdi | --libd)
455     ac_prev=libdir ;;
456   -libdir=* | --libdir=* | --libdi=* | --libd=*)
457     libdir=$ac_optarg ;;
458
459   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460   | --libexe | --libex | --libe)
461     ac_prev=libexecdir ;;
462   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463   | --libexe=* | --libex=* | --libe=*)
464     libexecdir=$ac_optarg ;;
465
466   -localstatedir | --localstatedir | --localstatedi | --localstated \
467   | --localstate | --localstat | --localsta | --localst \
468   | --locals | --local | --loca | --loc | --lo)
469     ac_prev=localstatedir ;;
470   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
473     localstatedir=$ac_optarg ;;
474
475   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476     ac_prev=mandir ;;
477   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
478     mandir=$ac_optarg ;;
479
480   -nfp | --nfp | --nf)
481     # Obsolete; use --without-fp.
482     with_fp=no ;;
483
484   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
485   | --no-cr | --no-c | -n)
486     no_create=yes ;;
487
488   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490     no_recursion=yes ;;
491
492   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494   | --oldin | --oldi | --old | --ol | --o)
495     ac_prev=oldincludedir ;;
496   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
499     oldincludedir=$ac_optarg ;;
500
501   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502     ac_prev=prefix ;;
503   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
504     prefix=$ac_optarg ;;
505
506   -program-prefix | --program-prefix | --program-prefi | --program-pref \
507   | --program-pre | --program-pr | --program-p)
508     ac_prev=program_prefix ;;
509   -program-prefix=* | --program-prefix=* | --program-prefi=* \
510   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
511     program_prefix=$ac_optarg ;;
512
513   -program-suffix | --program-suffix | --program-suffi | --program-suff \
514   | --program-suf | --program-su | --program-s)
515     ac_prev=program_suffix ;;
516   -program-suffix=* | --program-suffix=* | --program-suffi=* \
517   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
518     program_suffix=$ac_optarg ;;
519
520   -program-transform-name | --program-transform-name \
521   | --program-transform-nam | --program-transform-na \
522   | --program-transform-n | --program-transform- \
523   | --program-transform | --program-transfor \
524   | --program-transfo | --program-transf \
525   | --program-trans | --program-tran \
526   | --progr-tra | --program-tr | --program-t)
527     ac_prev=program_transform_name ;;
528   -program-transform-name=* | --program-transform-name=* \
529   | --program-transform-nam=* | --program-transform-na=* \
530   | --program-transform-n=* | --program-transform-=* \
531   | --program-transform=* | --program-transfor=* \
532   | --program-transfo=* | --program-transf=* \
533   | --program-trans=* | --program-tran=* \
534   | --progr-tra=* | --program-tr=* | --program-t=*)
535     program_transform_name=$ac_optarg ;;
536
537   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538   | -silent | --silent | --silen | --sile | --sil)
539     silent=yes ;;
540
541   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542     ac_prev=sbindir ;;
543   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544   | --sbi=* | --sb=*)
545     sbindir=$ac_optarg ;;
546
547   -sharedstatedir | --sharedstatedir | --sharedstatedi \
548   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549   | --sharedst | --shareds | --shared | --share | --shar \
550   | --sha | --sh)
551     ac_prev=sharedstatedir ;;
552   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555   | --sha=* | --sh=*)
556     sharedstatedir=$ac_optarg ;;
557
558   -site | --site | --sit)
559     ac_prev=site ;;
560   -site=* | --site=* | --sit=*)
561     site=$ac_optarg ;;
562
563   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564     ac_prev=srcdir ;;
565   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
566     srcdir=$ac_optarg ;;
567
568   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569   | --syscon | --sysco | --sysc | --sys | --sy)
570     ac_prev=sysconfdir ;;
571   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
573     sysconfdir=$ac_optarg ;;
574
575   -target | --target | --targe | --targ | --tar | --ta | --t)
576     ac_prev=target_alias ;;
577   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
578     target_alias=$ac_optarg ;;
579
580   -v | -verbose | --verbose | --verbos | --verbo | --verb)
581     verbose=yes ;;
582
583   -version | --version | --versio | --versi | --vers | -V)
584     ac_init_version=: ;;
585
586   -with-* | --with-*)
587     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
588     # Reject names that are not valid shell variable names.
589     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590       { echo "$as_me: error: invalid package name: $ac_package" >&2
591    { (exit 1); exit 1; }; }
592     ac_package=`echo $ac_package| sed 's/-/_/g'`
593     case $ac_option in
594       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
595       *) ac_optarg=yes ;;
596     esac
597     eval "with_$ac_package='$ac_optarg'" ;;
598
599   -without-* | --without-*)
600     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
601     # Reject names that are not valid shell variable names.
602     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603       { echo "$as_me: error: invalid package name: $ac_package" >&2
604    { (exit 1); exit 1; }; }
605     ac_package=`echo $ac_package | sed 's/-/_/g'`
606     eval "with_$ac_package=no" ;;
607
608   --x)
609     # Obsolete; use --with-x.
610     with_x=yes ;;
611
612   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613   | --x-incl | --x-inc | --x-in | --x-i)
614     ac_prev=x_includes ;;
615   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
617     x_includes=$ac_optarg ;;
618
619   -x-libraries | --x-libraries | --x-librarie | --x-librari \
620   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621     ac_prev=x_libraries ;;
622   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
624     x_libraries=$ac_optarg ;;
625
626   -*) { echo "$as_me: error: unrecognized option: $ac_option
627 Try \`$0 --help' for more information." >&2
628    { (exit 1); exit 1; }; }
629     ;;
630
631   *=*)
632     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633     # Reject names that are not valid shell variable names.
634     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636    { (exit 1); exit 1; }; }
637     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638     eval "$ac_envvar='$ac_optarg'"
639     export $ac_envvar ;;
640
641   *)
642     # FIXME: should be removed in autoconf 3.0.
643     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
647     ;;
648
649   esac
650 done
651
652 if test -n "$ac_prev"; then
653   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654   { echo "$as_me: error: missing argument to $ac_option" >&2
655    { (exit 1); exit 1; }; }
656 fi
657
658 # Be sure to have absolute paths.
659 for ac_var in exec_prefix prefix
660 do
661   eval ac_val=$`echo $ac_var`
662   case $ac_val in
663     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665    { (exit 1); exit 1; }; };;
666   esac
667 done
668
669 # Be sure to have absolute paths.
670 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671               localstatedir libdir includedir oldincludedir infodir mandir
672 do
673   eval ac_val=$`echo $ac_var`
674   case $ac_val in
675     [\\/$]* | ?:[\\/]* ) ;;
676     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677    { (exit 1); exit 1; }; };;
678   esac
679 done
680
681 # There might be people who depend on the old broken behavior: `$host'
682 # used to hold the argument of --host etc.
683 # FIXME: To remove some day.
684 build=$build_alias
685 host=$host_alias
686 target=$target_alias
687
688 # FIXME: To remove some day.
689 if test "x$host_alias" != x; then
690   if test "x$build_alias" = x; then
691     cross_compiling=maybe
692     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693     If a cross compiler is detected then cross compile mode will be used." >&2
694   elif test "x$build_alias" != "x$host_alias"; then
695     cross_compiling=yes
696   fi
697 fi
698
699 ac_tool_prefix=
700 test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702 test "$silent" = yes && exec 6>/dev/null
703
704
705 # Find the source files, if location was not specified.
706 if test -z "$srcdir"; then
707   ac_srcdir_defaulted=yes
708   # Try the directory containing this script, then its parent.
709   ac_confdir=`(dirname "$0") 2>/dev/null ||
710 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
711          X"$0" : 'X\(//\)[^/]' \| \
712          X"$0" : 'X\(//\)$' \| \
713          X"$0" : 'X\(/\)' \| \
714          .     : '\(.\)' 2>/dev/null ||
715 echo X"$0" |
716     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718           /^X\(\/\/\)$/{ s//\1/; q; }
719           /^X\(\/\).*/{ s//\1/; q; }
720           s/.*/./; q'`
721   srcdir=$ac_confdir
722   if test ! -r $srcdir/$ac_unique_file; then
723     srcdir=..
724   fi
725 else
726   ac_srcdir_defaulted=no
727 fi
728 if test ! -r $srcdir/$ac_unique_file; then
729   if test "$ac_srcdir_defaulted" = yes; then
730     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731    { (exit 1); exit 1; }; }
732   else
733     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734    { (exit 1); exit 1; }; }
735   fi
736 fi
737 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739    { (exit 1); exit 1; }; }
740 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741 ac_env_build_alias_set=${build_alias+set}
742 ac_env_build_alias_value=$build_alias
743 ac_cv_env_build_alias_set=${build_alias+set}
744 ac_cv_env_build_alias_value=$build_alias
745 ac_env_host_alias_set=${host_alias+set}
746 ac_env_host_alias_value=$host_alias
747 ac_cv_env_host_alias_set=${host_alias+set}
748 ac_cv_env_host_alias_value=$host_alias
749 ac_env_target_alias_set=${target_alias+set}
750 ac_env_target_alias_value=$target_alias
751 ac_cv_env_target_alias_set=${target_alias+set}
752 ac_cv_env_target_alias_value=$target_alias
753 ac_env_CC_set=${CC+set}
754 ac_env_CC_value=$CC
755 ac_cv_env_CC_set=${CC+set}
756 ac_cv_env_CC_value=$CC
757 ac_env_CFLAGS_set=${CFLAGS+set}
758 ac_env_CFLAGS_value=$CFLAGS
759 ac_cv_env_CFLAGS_set=${CFLAGS+set}
760 ac_cv_env_CFLAGS_value=$CFLAGS
761 ac_env_LDFLAGS_set=${LDFLAGS+set}
762 ac_env_LDFLAGS_value=$LDFLAGS
763 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764 ac_cv_env_LDFLAGS_value=$LDFLAGS
765 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766 ac_env_CPPFLAGS_value=$CPPFLAGS
767 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769 ac_env_CPP_set=${CPP+set}
770 ac_env_CPP_value=$CPP
771 ac_cv_env_CPP_set=${CPP+set}
772 ac_cv_env_CPP_value=$CPP
773
774 #
775 # Report the --help message.
776 #
777 if test "$ac_init_help" = "long"; then
778   # Omit some internal or obsolete options to make the list less imposing.
779   # This message is too long to be a string in the A/UX 3.1 sh.
780   cat <<_ACEOF
781 \`configure' configures this package to adapt to many kinds of systems.
782
783 Usage: $0 [OPTION]... [VAR=VALUE]...
784
785 To assign environment variables (e.g., CC, CFLAGS...), specify them as
786 VAR=VALUE.  See below for descriptions of some of the useful variables.
787
788 Defaults for the options are specified in brackets.
789
790
791 Configuration:
792
793   -h, --help              display this help and exit
794       --help=short        display options specific to this package
795       --help=recursive    display the short help of all the included packages
796   -V, --version           display version information and exit
797   -q, --quiet, --silent   do not print \`checking...' messages
798       --cache-file=FILE   cache test results in FILE [disabled]
799   -C, --config-cache      alias for \`--cache-file=config.cache'
800   -n, --no-create         do not create output files
801       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
802
803 _ACEOF
804
805   cat <<_ACEOF
806 Installation directories:
807   --prefix=PREFIX         install architecture-independent files in PREFIX
808                           [$ac_default_prefix]
809   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
810                           [PREFIX]
811
812 By default, \`make install' will install all the files in
813 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
814 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
815 for instance \`--prefix=\$HOME'.
816
817 For better control, use the options below.
818
819 Fine tuning of the installation directories:
820   --bindir=DIR           user executables [EPREFIX/bin]
821   --libdir=DIR           object code libraries [EPREFIX/lib]
822   --includedir=DIR       C header files [PREFIX/include]
823   --x-includes=DIR        X include files are in DIR
824   --x-libraries=DIR       X library files are in DIR
825   --mandir=DIR           man documentation [PREFIX/man]
826 _ACEOF
827
828   cat <<\_ACEOF
829
830 X features:
831   --x-includes=DIR    X include files are in DIR
832   --x-libraries=DIR   X library files are in DIR
833
834 System types:
835   --build=BUILD     configure for building on BUILD [guessed]
836   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
837 _ACEOF
838 fi
839
840 if test -n "$ac_init_help"; then
841
842   cat <<\_ACEOF
843
844 Optional Features:
845   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
846   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
847
848
849 Screen locking options:
850
851   --enable-locking        Compile in support for locking the display.
852   --disable-locking       Do not allow locking at all.
853
854 Optional Packages:
855   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
856   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
857 Installation options:
858
859   --with-hackdir=DIR      Where to install the hundreds of demo executables.
860                           Default: `PREFIX/lib/xscreensaver/'
861   --with-configdir=DIR    Where to install the data files that describe each
862                           of the display modes to the GUI.
863                           Default: `GTK_PREFIX/control-center/screensavers/'
864                           or `PREFIX/lib/xscreensaver/config/', depending on
865                           whether GTK is available.
866
867 Except where noted, all of the --with options below can also take a
868 directory argument: for example, `--with-motif=/opt/Motif'.  That would
869 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
870 to be added to the -L list, assuming those directories exist.
871
872 By default, support for each of these options will be built in, if the
873 relevant library routines exist.  At run time, they will then be used
874 only if the X server being used supports them.  Each --with option has
875 a corresponding --without option, to override building support for them
876 at all.
877
878 Screen blanking and idle-detection options:
879
880   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
881   --with-mit-ext          Include support for the MIT-SCREEN-SAVER extension.
882   --with-xidle-ext        Include support for the XIDLE extension.
883   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
884   --with-dpms-ext         Include support for the DPMS extension.
885   --with-xinerama-ext     Include support for the XINERAMA extension.
886   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
887   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
888   --with-randr-ext        Include support for the X Resize+Rotate extension.
889   --with-proc-interrupts  Include support for consulting the /proc/interrupts
890                           file to notice keyboard activity.
891   --with-pam              Include support for PAM (Pluggable Auth Modules.)
892   --with-kerberos         Include support for Kerberos authentication.
893   --with-shadow           Include support for shadow password authentication.
894   --with-passwd-helper    Include support for an external password
895                           verification helper program.
896
897 User interface options:
898
899   --with-gtk              Use the Gtk toolkit for the user interface.
900   --with-motif            Use the Motif toolkit for the user interface
901                           (not recommended.)
902
903 Graphics options:
904
905   --with-gl               Build those demos which depend on OpenGL.
906   --with-gle              Build those demos which depend on GLE
907                           (the OpenGL "extrusion" library.)
908   --with-pixbuf           Include support for the GDK-Pixbuf library in some
909                           demos, which will make it possible for them to read
910                           GIF, JPEG, and PNG files as well.
911   --with-xpm              Include support for XPM files in some demos.
912                           (Not needed if Pixbuf is used.)
913   --with-jpeg             Include support for the JPEG library.
914   --with-xshm-ext         Include support for the Shared Memory extension.
915   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
916   --with-readdisplay      Include support for the XReadDisplay extension.
917
918   --with-fortune=PROGRAM  Some demos are able to run an external program and
919                           display its text; this names the program to use by
920                           default (though it can be overridden with X
921                           resources.)  Default is "/usr/games/fortune".
922   --with-setuid-hacks     Allow some demos to be installed `setuid root'
923                           (which is needed in order to ping other hosts.)
924
925
926 Some influential environment variables:
927   CC          C compiler command
928   CFLAGS      C compiler flags
929   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
930               nonstandard directory <lib dir>
931   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
932               headers in a nonstandard directory <include dir>
933   CPP         C preprocessor
934
935 Use these variables to override the choices made by `configure' or to help
936 it to find libraries and programs with nonstandard names/locations.
937
938 _ACEOF
939 fi
940
941 if test "$ac_init_help" = "recursive"; then
942   # If there are subdirs, report their specific --help.
943   ac_popdir=`pwd`
944   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
945     test -d $ac_dir || continue
946     ac_builddir=.
947
948 if test "$ac_dir" != .; then
949   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
950   # A "../" for each directory in $ac_dir_suffix.
951   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
952 else
953   ac_dir_suffix= ac_top_builddir=
954 fi
955
956 case $srcdir in
957   .)  # No --srcdir option.  We are building in place.
958     ac_srcdir=.
959     if test -z "$ac_top_builddir"; then
960        ac_top_srcdir=.
961     else
962        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
963     fi ;;
964   [\\/]* | ?:[\\/]* )  # Absolute path.
965     ac_srcdir=$srcdir$ac_dir_suffix;
966     ac_top_srcdir=$srcdir ;;
967   *) # Relative path.
968     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
969     ac_top_srcdir=$ac_top_builddir$srcdir ;;
970 esac
971
972 # Do not use `cd foo && pwd` to compute absolute paths, because
973 # the directories may not exist.
974 case `pwd` in
975 .) ac_abs_builddir="$ac_dir";;
976 *)
977   case "$ac_dir" in
978   .) ac_abs_builddir=`pwd`;;
979   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
980   *) ac_abs_builddir=`pwd`/"$ac_dir";;
981   esac;;
982 esac
983 case $ac_abs_builddir in
984 .) ac_abs_top_builddir=${ac_top_builddir}.;;
985 *)
986   case ${ac_top_builddir}. in
987   .) ac_abs_top_builddir=$ac_abs_builddir;;
988   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
989   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
990   esac;;
991 esac
992 case $ac_abs_builddir in
993 .) ac_abs_srcdir=$ac_srcdir;;
994 *)
995   case $ac_srcdir in
996   .) ac_abs_srcdir=$ac_abs_builddir;;
997   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
998   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
999   esac;;
1000 esac
1001 case $ac_abs_builddir in
1002 .) ac_abs_top_srcdir=$ac_top_srcdir;;
1003 *)
1004   case $ac_top_srcdir in
1005   .) ac_abs_top_srcdir=$ac_abs_builddir;;
1006   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1007   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1008   esac;;
1009 esac
1010
1011     cd $ac_dir
1012     # Check for guested configure; otherwise get Cygnus style configure.
1013     if test -f $ac_srcdir/configure.gnu; then
1014       echo
1015       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1016     elif test -f $ac_srcdir/configure; then
1017       echo
1018       $SHELL $ac_srcdir/configure  --help=recursive
1019     elif test -f $ac_srcdir/configure.ac ||
1020            test -f $ac_srcdir/configure.in; then
1021       echo
1022       $ac_configure --help
1023     else
1024       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1025     fi
1026     cd $ac_popdir
1027   done
1028 fi
1029
1030 test -n "$ac_init_help" && exit 0
1031 if $ac_init_version; then
1032   cat <<\_ACEOF
1033
1034 Copyright (C) 2003 Free Software Foundation, Inc.
1035 This configure script is free software; the Free Software Foundation
1036 gives unlimited permission to copy, distribute and modify it.
1037 _ACEOF
1038   exit 0
1039 fi
1040 exec 5>config.log
1041 cat >&5 <<_ACEOF
1042 This file contains any messages produced by compilers while
1043 running configure, to aid debugging if configure makes a mistake.
1044
1045 It was created by $as_me, which was
1046 generated by GNU Autoconf 2.59.  Invocation command line was
1047
1048   $ $0 $@
1049
1050 _ACEOF
1051 {
1052 cat <<_ASUNAME
1053 ## --------- ##
1054 ## Platform. ##
1055 ## --------- ##
1056
1057 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1058 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1059 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1060 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1061 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1062
1063 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1064 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1065
1066 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1067 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1068 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1069 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1070 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1071 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1072 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1073
1074 _ASUNAME
1075
1076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1077 for as_dir in $PATH
1078 do
1079   IFS=$as_save_IFS
1080   test -z "$as_dir" && as_dir=.
1081   echo "PATH: $as_dir"
1082 done
1083
1084 } >&5
1085
1086 cat >&5 <<_ACEOF
1087
1088
1089 ## ----------- ##
1090 ## Core tests. ##
1091 ## ----------- ##
1092
1093 _ACEOF
1094
1095
1096 # Keep a trace of the command line.
1097 # Strip out --no-create and --no-recursion so they do not pile up.
1098 # Strip out --silent because we don't want to record it for future runs.
1099 # Also quote any args containing shell meta-characters.
1100 # Make two passes to allow for proper duplicate-argument suppression.
1101 ac_configure_args=
1102 ac_configure_args0=
1103 ac_configure_args1=
1104 ac_sep=
1105 ac_must_keep_next=false
1106 for ac_pass in 1 2
1107 do
1108   for ac_arg
1109   do
1110     case $ac_arg in
1111     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1112     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1113     | -silent | --silent | --silen | --sile | --sil)
1114       continue ;;
1115     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1116       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1117     esac
1118     case $ac_pass in
1119     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1120     2)
1121       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1122       if test $ac_must_keep_next = true; then
1123         ac_must_keep_next=false # Got value, back to normal.
1124       else
1125         case $ac_arg in
1126           *=* | --config-cache | -C | -disable-* | --disable-* \
1127           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1128           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1129           | -with-* | --with-* | -without-* | --without-* | --x)
1130             case "$ac_configure_args0 " in
1131               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1132             esac
1133             ;;
1134           -* ) ac_must_keep_next=true ;;
1135         esac
1136       fi
1137       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1138       # Get rid of the leading space.
1139       ac_sep=" "
1140       ;;
1141     esac
1142   done
1143 done
1144 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1145 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1146
1147 # When interrupted or exit'd, cleanup temporary files, and complete
1148 # config.log.  We remove comments because anyway the quotes in there
1149 # would cause problems or look ugly.
1150 # WARNING: Be sure not to use single quotes in there, as some shells,
1151 # such as our DU 5.0 friend, will then `close' the trap.
1152 trap 'exit_status=$?
1153   # Save into config.log some information that might help in debugging.
1154   {
1155     echo
1156
1157     cat <<\_ASBOX
1158 ## ---------------- ##
1159 ## Cache variables. ##
1160 ## ---------------- ##
1161 _ASBOX
1162     echo
1163     # The following way of writing the cache mishandles newlines in values,
1164 {
1165   (set) 2>&1 |
1166     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1167     *ac_space=\ *)
1168       sed -n \
1169         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1170           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1171       ;;
1172     *)
1173       sed -n \
1174         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1175       ;;
1176     esac;
1177 }
1178     echo
1179
1180     cat <<\_ASBOX
1181 ## ----------------- ##
1182 ## Output variables. ##
1183 ## ----------------- ##
1184 _ASBOX
1185     echo
1186     for ac_var in $ac_subst_vars
1187     do
1188       eval ac_val=$`echo $ac_var`
1189       echo "$ac_var='"'"'$ac_val'"'"'"
1190     done | sort
1191     echo
1192
1193     if test -n "$ac_subst_files"; then
1194       cat <<\_ASBOX
1195 ## ------------- ##
1196 ## Output files. ##
1197 ## ------------- ##
1198 _ASBOX
1199       echo
1200       for ac_var in $ac_subst_files
1201       do
1202         eval ac_val=$`echo $ac_var`
1203         echo "$ac_var='"'"'$ac_val'"'"'"
1204       done | sort
1205       echo
1206     fi
1207
1208     if test -s confdefs.h; then
1209       cat <<\_ASBOX
1210 ## ----------- ##
1211 ## confdefs.h. ##
1212 ## ----------- ##
1213 _ASBOX
1214       echo
1215       sed "/^$/d" confdefs.h | sort
1216       echo
1217     fi
1218     test "$ac_signal" != 0 &&
1219       echo "$as_me: caught signal $ac_signal"
1220     echo "$as_me: exit $exit_status"
1221   } >&5
1222   rm -f core *.core &&
1223   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1224     exit $exit_status
1225      ' 0
1226 for ac_signal in 1 2 13 15; do
1227   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1228 done
1229 ac_signal=0
1230
1231 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1232 rm -rf conftest* confdefs.h
1233 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1234 echo >confdefs.h
1235
1236 # Predefined preprocessor variables.
1237
1238 cat >>confdefs.h <<_ACEOF
1239 #define PACKAGE_NAME "$PACKAGE_NAME"
1240 _ACEOF
1241
1242
1243 cat >>confdefs.h <<_ACEOF
1244 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1245 _ACEOF
1246
1247
1248 cat >>confdefs.h <<_ACEOF
1249 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1250 _ACEOF
1251
1252
1253 cat >>confdefs.h <<_ACEOF
1254 #define PACKAGE_STRING "$PACKAGE_STRING"
1255 _ACEOF
1256
1257
1258 cat >>confdefs.h <<_ACEOF
1259 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1260 _ACEOF
1261
1262
1263 # Let the site file select an alternate cache file if it wants to.
1264 # Prefer explicitly selected file to automatically selected ones.
1265 if test -z "$CONFIG_SITE"; then
1266   if test "x$prefix" != xNONE; then
1267     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1268   else
1269     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1270   fi
1271 fi
1272 for ac_site_file in $CONFIG_SITE; do
1273   if test -r "$ac_site_file"; then
1274     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1275 echo "$as_me: loading site script $ac_site_file" >&6;}
1276     sed 's/^/| /' "$ac_site_file" >&5
1277     . "$ac_site_file"
1278   fi
1279 done
1280
1281 if test -r "$cache_file"; then
1282   # Some versions of bash will fail to source /dev/null (special
1283   # files actually), so we avoid doing that.
1284   if test -f "$cache_file"; then
1285     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1286 echo "$as_me: loading cache $cache_file" >&6;}
1287     case $cache_file in
1288       [\\/]* | ?:[\\/]* ) . $cache_file;;
1289       *)                      . ./$cache_file;;
1290     esac
1291   fi
1292 else
1293   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1294 echo "$as_me: creating cache $cache_file" >&6;}
1295   >$cache_file
1296 fi
1297
1298 # Check that the precious variables saved in the cache have kept the same
1299 # value.
1300 ac_cache_corrupted=false
1301 for ac_var in `(set) 2>&1 |
1302                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1303   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1304   eval ac_new_set=\$ac_env_${ac_var}_set
1305   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1306   eval ac_new_val="\$ac_env_${ac_var}_value"
1307   case $ac_old_set,$ac_new_set in
1308     set,)
1309       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1310 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1311       ac_cache_corrupted=: ;;
1312     ,set)
1313       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1314 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1315       ac_cache_corrupted=: ;;
1316     ,);;
1317     *)
1318       if test "x$ac_old_val" != "x$ac_new_val"; then
1319         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1320 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1321         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1322 echo "$as_me:   former value:  $ac_old_val" >&2;}
1323         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1324 echo "$as_me:   current value: $ac_new_val" >&2;}
1325         ac_cache_corrupted=:
1326       fi;;
1327   esac
1328   # Pass precious variables to config.status.
1329   if test "$ac_new_set" = set; then
1330     case $ac_new_val in
1331     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1332       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1333     *) ac_arg=$ac_var=$ac_new_val ;;
1334     esac
1335     case " $ac_configure_args " in
1336       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1337       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1338     esac
1339   fi
1340 done
1341 if $ac_cache_corrupted; then
1342   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1343 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1344   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1345 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1346    { (exit 1); exit 1; }; }
1347 fi
1348
1349 ac_ext=c
1350 ac_cpp='$CPP $CPPFLAGS'
1351 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1352 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1353 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373           ac_config_headers="$ac_config_headers config.h"
1374
1375
1376 echo "current directory: `pwd`"
1377 echo "command line was: $0 $@"
1378
1379
1380 # After checking to see that --srcdir is correct (which AC_INIT does)
1381 # check for some random other files that come later in the tar file,
1382 # to make sure everything is here.
1383 #
1384 for d in driver utils hacks hacks/glx ; do
1385   f=$srcdir/$d/Makefile.in
1386   if test \! -r $f ; then
1387     echo ""
1388     echo "ERROR: The package is incomplete: $f does not exist."
1389     echo "       This probably means that your download was truncated."
1390     echo ""
1391     exit 1
1392   fi
1393 done
1394
1395 ###############################################################################
1396 #
1397 #       Function to figure out how to run the compiler.
1398 #
1399 ###############################################################################
1400
1401
1402
1403
1404 ###############################################################################
1405 #
1406 #       Functions to figure out how to disable // comments in ANSI C code.
1407 #
1408 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
1409 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
1410 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
1411 #       so much for compatibility!)
1412 #
1413 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
1414 #       declarations preceed statements, without resorting to "-pedantic".
1415 #       This means that there is no way to get gcc3 to issue warnings that
1416 #       ensure that your code complies with the ANSI/ISO C89 standard, without
1417 #       also drowning in totally useless warnings.  Thank you master may I
1418 #       have another.
1419 #
1420 #       So, I give up, let's just use -pedantic.
1421 #
1422 ###############################################################################
1423
1424
1425
1426
1427
1428
1429 ###############################################################################
1430 #
1431 #       Function to figure out how to turn off Objective C on MacOS X.
1432 #       (We have to do this to work around an Apple-specific gcc bug.)
1433 #
1434 ###############################################################################
1435
1436
1437
1438
1439
1440
1441 ###############################################################################
1442 #
1443 #       Function to figure out how to create directory trees.
1444 #
1445 ###############################################################################
1446
1447
1448
1449
1450 ###############################################################################
1451 #
1452 #       Function to check whether gettimeofday() exists, and how to call it.
1453 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1454 #
1455 ###############################################################################
1456
1457
1458
1459
1460 ###############################################################################
1461 #
1462 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1463 #
1464 ###############################################################################
1465
1466 # M4 sucks!!  perl sucks too!!
1467
1468 perl_version_cmd='print $]'
1469
1470
1471
1472
1473
1474 ###############################################################################
1475 #
1476 #       Function to demand "bc".  Losers.
1477 #
1478 ###############################################################################
1479
1480
1481
1482 ###############################################################################
1483 #
1484 #       Functions to check how to do ICMP PING requests.
1485 #
1486 ###############################################################################
1487
1488
1489
1490
1491
1492
1493 ###############################################################################
1494 #
1495 #       Functions to check for various X11 crap.
1496 #
1497 ###############################################################################
1498
1499 # Try and find the app-defaults directory.
1500 # It sucks that autoconf doesn't do this already...
1501 #
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512 # Random special-cases for X on certain pathological OSes.
1513 # You know who you are.
1514 #
1515
1516
1517
1518
1519 ###############################################################################
1520 #
1521 #       Some utility functions to make checking for X things easier.
1522 #
1523 ###############################################################################
1524
1525 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1526 #
1527
1528
1529 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1530 #
1531
1532
1533 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1534 #
1535
1536
1537
1538 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1539 # Use this sparingly; it probably doesn't work very well on X programs.
1540 #
1541
1542
1543 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1544 # (But not the -L directories!)
1545 #
1546
1547
1548
1549
1550 # Usage: HANDLE_X_PATH_ARG([variable_name],
1551 #                          [--command-line-option],
1552 #                          [descriptive string])
1553 #
1554 # All of the --with options take three forms:
1555 #
1556 #   --with-foo (or --with-foo=yes)
1557 #   --without-foo (or --with-foo=no)
1558 #   --with-foo=/DIR
1559 #
1560 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1561 # a directory (string beginning with a slash) it checks to see whether
1562 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1563 # as appropriate.
1564 #
1565
1566
1567
1568
1569 ###############################################################################
1570 ###############################################################################
1571 #
1572 #       End of function definitions.  Now start actually executing stuff.
1573 #
1574 ###############################################################################
1575 ###############################################################################
1576
1577 # random compiler setup
1578 ac_aux_dir=
1579 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1580   if test -f $ac_dir/install-sh; then
1581     ac_aux_dir=$ac_dir
1582     ac_install_sh="$ac_aux_dir/install-sh -c"
1583     break
1584   elif test -f $ac_dir/install.sh; then
1585     ac_aux_dir=$ac_dir
1586     ac_install_sh="$ac_aux_dir/install.sh -c"
1587     break
1588   elif test -f $ac_dir/shtool; then
1589     ac_aux_dir=$ac_dir
1590     ac_install_sh="$ac_aux_dir/shtool install -c"
1591     break
1592   fi
1593 done
1594 if test -z "$ac_aux_dir"; then
1595   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1596 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1597    { (exit 1); exit 1; }; }
1598 fi
1599 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1600 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1601 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1602
1603 # Make sure we can run config.sub.
1604 $ac_config_sub sun4 >/dev/null 2>&1 ||
1605   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1606 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1607    { (exit 1); exit 1; }; }
1608
1609 echo "$as_me:$LINENO: checking build system type" >&5
1610 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1611 if test "${ac_cv_build+set}" = set; then
1612   echo $ECHO_N "(cached) $ECHO_C" >&6
1613 else
1614   ac_cv_build_alias=$build_alias
1615 test -z "$ac_cv_build_alias" &&
1616   ac_cv_build_alias=`$ac_config_guess`
1617 test -z "$ac_cv_build_alias" &&
1618   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1619 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1620    { (exit 1); exit 1; }; }
1621 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1622   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1623 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1624    { (exit 1); exit 1; }; }
1625
1626 fi
1627 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1628 echo "${ECHO_T}$ac_cv_build" >&6
1629 build=$ac_cv_build
1630 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1631 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1632 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1633
1634
1635 echo "$as_me:$LINENO: checking host system type" >&5
1636 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1637 if test "${ac_cv_host+set}" = set; then
1638   echo $ECHO_N "(cached) $ECHO_C" >&6
1639 else
1640   ac_cv_host_alias=$host_alias
1641 test -z "$ac_cv_host_alias" &&
1642   ac_cv_host_alias=$ac_cv_build_alias
1643 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1644   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1645 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1646    { (exit 1); exit 1; }; }
1647
1648 fi
1649 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1650 echo "${ECHO_T}$ac_cv_host" >&6
1651 host=$ac_cv_host
1652 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1653 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1654 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1655
1656
1657
1658 ac_ext=c
1659 ac_cpp='$CPP $CPPFLAGS'
1660 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1661 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1663 if test -n "$ac_tool_prefix"; then
1664   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1665 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1666 echo "$as_me:$LINENO: checking for $ac_word" >&5
1667 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1668 if test "${ac_cv_prog_CC+set}" = set; then
1669   echo $ECHO_N "(cached) $ECHO_C" >&6
1670 else
1671   if test -n "$CC"; then
1672   ac_cv_prog_CC="$CC" # Let the user override the test.
1673 else
1674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1675 for as_dir in $PATH
1676 do
1677   IFS=$as_save_IFS
1678   test -z "$as_dir" && as_dir=.
1679   for ac_exec_ext in '' $ac_executable_extensions; do
1680   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1681     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1682     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1683     break 2
1684   fi
1685 done
1686 done
1687
1688 fi
1689 fi
1690 CC=$ac_cv_prog_CC
1691 if test -n "$CC"; then
1692   echo "$as_me:$LINENO: result: $CC" >&5
1693 echo "${ECHO_T}$CC" >&6
1694 else
1695   echo "$as_me:$LINENO: result: no" >&5
1696 echo "${ECHO_T}no" >&6
1697 fi
1698
1699 fi
1700 if test -z "$ac_cv_prog_CC"; then
1701   ac_ct_CC=$CC
1702   # Extract the first word of "gcc", so it can be a program name with args.
1703 set dummy gcc; ac_word=$2
1704 echo "$as_me:$LINENO: checking for $ac_word" >&5
1705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1706 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1707   echo $ECHO_N "(cached) $ECHO_C" >&6
1708 else
1709   if test -n "$ac_ct_CC"; then
1710   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1711 else
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     ac_cv_prog_ac_ct_CC="gcc"
1720     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1721     break 2
1722   fi
1723 done
1724 done
1725
1726 fi
1727 fi
1728 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1729 if test -n "$ac_ct_CC"; then
1730   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1731 echo "${ECHO_T}$ac_ct_CC" >&6
1732 else
1733   echo "$as_me:$LINENO: result: no" >&5
1734 echo "${ECHO_T}no" >&6
1735 fi
1736
1737   CC=$ac_ct_CC
1738 else
1739   CC="$ac_cv_prog_CC"
1740 fi
1741
1742 if test -z "$CC"; then
1743   if test -n "$ac_tool_prefix"; then
1744   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1745 set dummy ${ac_tool_prefix}cc; ac_word=$2
1746 echo "$as_me:$LINENO: checking for $ac_word" >&5
1747 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1748 if test "${ac_cv_prog_CC+set}" = set; then
1749   echo $ECHO_N "(cached) $ECHO_C" >&6
1750 else
1751   if test -n "$CC"; then
1752   ac_cv_prog_CC="$CC" # Let the user override the test.
1753 else
1754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1755 for as_dir in $PATH
1756 do
1757   IFS=$as_save_IFS
1758   test -z "$as_dir" && as_dir=.
1759   for ac_exec_ext in '' $ac_executable_extensions; do
1760   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1761     ac_cv_prog_CC="${ac_tool_prefix}cc"
1762     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1763     break 2
1764   fi
1765 done
1766 done
1767
1768 fi
1769 fi
1770 CC=$ac_cv_prog_CC
1771 if test -n "$CC"; then
1772   echo "$as_me:$LINENO: result: $CC" >&5
1773 echo "${ECHO_T}$CC" >&6
1774 else
1775   echo "$as_me:$LINENO: result: no" >&5
1776 echo "${ECHO_T}no" >&6
1777 fi
1778
1779 fi
1780 if test -z "$ac_cv_prog_CC"; then
1781   ac_ct_CC=$CC
1782   # Extract the first word of "cc", so it can be a program name with args.
1783 set dummy cc; ac_word=$2
1784 echo "$as_me:$LINENO: checking for $ac_word" >&5
1785 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1786 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1787   echo $ECHO_N "(cached) $ECHO_C" >&6
1788 else
1789   if test -n "$ac_ct_CC"; then
1790   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1791 else
1792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1793 for as_dir in $PATH
1794 do
1795   IFS=$as_save_IFS
1796   test -z "$as_dir" && as_dir=.
1797   for ac_exec_ext in '' $ac_executable_extensions; do
1798   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1799     ac_cv_prog_ac_ct_CC="cc"
1800     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1801     break 2
1802   fi
1803 done
1804 done
1805
1806 fi
1807 fi
1808 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1809 if test -n "$ac_ct_CC"; then
1810   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1811 echo "${ECHO_T}$ac_ct_CC" >&6
1812 else
1813   echo "$as_me:$LINENO: result: no" >&5
1814 echo "${ECHO_T}no" >&6
1815 fi
1816
1817   CC=$ac_ct_CC
1818 else
1819   CC="$ac_cv_prog_CC"
1820 fi
1821
1822 fi
1823 if test -z "$CC"; then
1824   # Extract the first word of "cc", so it can be a program name with args.
1825 set dummy cc; ac_word=$2
1826 echo "$as_me:$LINENO: checking for $ac_word" >&5
1827 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1828 if test "${ac_cv_prog_CC+set}" = set; then
1829   echo $ECHO_N "(cached) $ECHO_C" >&6
1830 else
1831   if test -n "$CC"; then
1832   ac_cv_prog_CC="$CC" # Let the user override the test.
1833 else
1834   ac_prog_rejected=no
1835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1836 for as_dir in $PATH
1837 do
1838   IFS=$as_save_IFS
1839   test -z "$as_dir" && as_dir=.
1840   for ac_exec_ext in '' $ac_executable_extensions; do
1841   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1842     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1843        ac_prog_rejected=yes
1844        continue
1845      fi
1846     ac_cv_prog_CC="cc"
1847     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1848     break 2
1849   fi
1850 done
1851 done
1852
1853 if test $ac_prog_rejected = yes; then
1854   # We found a bogon in the path, so make sure we never use it.
1855   set dummy $ac_cv_prog_CC
1856   shift
1857   if test $# != 0; then
1858     # We chose a different compiler from the bogus one.
1859     # However, it has the same basename, so the bogon will be chosen
1860     # first if we set CC to just the basename; use the full file name.
1861     shift
1862     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1863   fi
1864 fi
1865 fi
1866 fi
1867 CC=$ac_cv_prog_CC
1868 if test -n "$CC"; then
1869   echo "$as_me:$LINENO: result: $CC" >&5
1870 echo "${ECHO_T}$CC" >&6
1871 else
1872   echo "$as_me:$LINENO: result: no" >&5
1873 echo "${ECHO_T}no" >&6
1874 fi
1875
1876 fi
1877 if test -z "$CC"; then
1878   if test -n "$ac_tool_prefix"; then
1879   for ac_prog in cl
1880   do
1881     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1882 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1883 echo "$as_me:$LINENO: checking for $ac_word" >&5
1884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1885 if test "${ac_cv_prog_CC+set}" = set; then
1886   echo $ECHO_N "(cached) $ECHO_C" >&6
1887 else
1888   if test -n "$CC"; then
1889   ac_cv_prog_CC="$CC" # Let the user override the test.
1890 else
1891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1892 for as_dir in $PATH
1893 do
1894   IFS=$as_save_IFS
1895   test -z "$as_dir" && as_dir=.
1896   for ac_exec_ext in '' $ac_executable_extensions; do
1897   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1898     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1899     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1900     break 2
1901   fi
1902 done
1903 done
1904
1905 fi
1906 fi
1907 CC=$ac_cv_prog_CC
1908 if test -n "$CC"; then
1909   echo "$as_me:$LINENO: result: $CC" >&5
1910 echo "${ECHO_T}$CC" >&6
1911 else
1912   echo "$as_me:$LINENO: result: no" >&5
1913 echo "${ECHO_T}no" >&6
1914 fi
1915
1916     test -n "$CC" && break
1917   done
1918 fi
1919 if test -z "$CC"; then
1920   ac_ct_CC=$CC
1921   for ac_prog in cl
1922 do
1923   # Extract the first word of "$ac_prog", so it can be a program name with args.
1924 set dummy $ac_prog; ac_word=$2
1925 echo "$as_me:$LINENO: checking for $ac_word" >&5
1926 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1927 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1928   echo $ECHO_N "(cached) $ECHO_C" >&6
1929 else
1930   if test -n "$ac_ct_CC"; then
1931   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1932 else
1933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1934 for as_dir in $PATH
1935 do
1936   IFS=$as_save_IFS
1937   test -z "$as_dir" && as_dir=.
1938   for ac_exec_ext in '' $ac_executable_extensions; do
1939   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1940     ac_cv_prog_ac_ct_CC="$ac_prog"
1941     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1942     break 2
1943   fi
1944 done
1945 done
1946
1947 fi
1948 fi
1949 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1950 if test -n "$ac_ct_CC"; then
1951   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1952 echo "${ECHO_T}$ac_ct_CC" >&6
1953 else
1954   echo "$as_me:$LINENO: result: no" >&5
1955 echo "${ECHO_T}no" >&6
1956 fi
1957
1958   test -n "$ac_ct_CC" && break
1959 done
1960
1961   CC=$ac_ct_CC
1962 fi
1963
1964 fi
1965
1966
1967 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1968 See \`config.log' for more details." >&5
1969 echo "$as_me: error: no acceptable C compiler found in \$PATH
1970 See \`config.log' for more details." >&2;}
1971    { (exit 1); exit 1; }; }
1972
1973 # Provide some information about the compiler.
1974 echo "$as_me:$LINENO:" \
1975      "checking for C compiler version" >&5
1976 ac_compiler=`set X $ac_compile; echo $2`
1977 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1978   (eval $ac_compiler --version </dev/null >&5) 2>&5
1979   ac_status=$?
1980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1981   (exit $ac_status); }
1982 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1983   (eval $ac_compiler -v </dev/null >&5) 2>&5
1984   ac_status=$?
1985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1986   (exit $ac_status); }
1987 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1988   (eval $ac_compiler -V </dev/null >&5) 2>&5
1989   ac_status=$?
1990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1991   (exit $ac_status); }
1992
1993 cat >conftest.$ac_ext <<_ACEOF
1994 /* confdefs.h.  */
1995 _ACEOF
1996 cat confdefs.h >>conftest.$ac_ext
1997 cat >>conftest.$ac_ext <<_ACEOF
1998 /* end confdefs.h.  */
1999
2000 int
2001 main ()
2002 {
2003
2004   ;
2005   return 0;
2006 }
2007 _ACEOF
2008 ac_clean_files_save=$ac_clean_files
2009 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2010 # Try to create an executable without -o first, disregard a.out.
2011 # It will help us diagnose broken compilers, and finding out an intuition
2012 # of exeext.
2013 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2014 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2015 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2016 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2017   (eval $ac_link_default) 2>&5
2018   ac_status=$?
2019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2020   (exit $ac_status); }; then
2021   # Find the output, starting from the most likely.  This scheme is
2022 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2023 # resort.
2024
2025 # Be careful to initialize this variable, since it used to be cached.
2026 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2027 ac_cv_exeext=
2028 # b.out is created by i960 compilers.
2029 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2030 do
2031   test -f "$ac_file" || continue
2032   case $ac_file in
2033     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2034         ;;
2035     conftest.$ac_ext )
2036         # This is the source file.
2037         ;;
2038     [ab].out )
2039         # We found the default executable, but exeext='' is most
2040         # certainly right.
2041         break;;
2042     *.* )
2043         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2044         # FIXME: I believe we export ac_cv_exeext for Libtool,
2045         # but it would be cool to find out if it's true.  Does anybody
2046         # maintain Libtool? --akim.
2047         export ac_cv_exeext
2048         break;;
2049     * )
2050         break;;
2051   esac
2052 done
2053 else
2054   echo "$as_me: failed program was:" >&5
2055 sed 's/^/| /' conftest.$ac_ext >&5
2056
2057 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2058 See \`config.log' for more details." >&5
2059 echo "$as_me: error: C compiler cannot create executables
2060 See \`config.log' for more details." >&2;}
2061    { (exit 77); exit 77; }; }
2062 fi
2063
2064 ac_exeext=$ac_cv_exeext
2065 echo "$as_me:$LINENO: result: $ac_file" >&5
2066 echo "${ECHO_T}$ac_file" >&6
2067
2068 # Check the compiler produces executables we can run.  If not, either
2069 # the compiler is broken, or we cross compile.
2070 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2071 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2072 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2073 # If not cross compiling, check that we can run a simple program.
2074 if test "$cross_compiling" != yes; then
2075   if { ac_try='./$ac_file'
2076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2077   (eval $ac_try) 2>&5
2078   ac_status=$?
2079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2080   (exit $ac_status); }; }; then
2081     cross_compiling=no
2082   else
2083     if test "$cross_compiling" = maybe; then
2084         cross_compiling=yes
2085     else
2086         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2087 If you meant to cross compile, use \`--host'.
2088 See \`config.log' for more details." >&5
2089 echo "$as_me: error: cannot run C compiled programs.
2090 If you meant to cross compile, use \`--host'.
2091 See \`config.log' for more details." >&2;}
2092    { (exit 1); exit 1; }; }
2093     fi
2094   fi
2095 fi
2096 echo "$as_me:$LINENO: result: yes" >&5
2097 echo "${ECHO_T}yes" >&6
2098
2099 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2100 ac_clean_files=$ac_clean_files_save
2101 # Check the compiler produces executables we can run.  If not, either
2102 # the compiler is broken, or we cross compile.
2103 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2104 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2105 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2106 echo "${ECHO_T}$cross_compiling" >&6
2107
2108 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2109 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2110 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2111   (eval $ac_link) 2>&5
2112   ac_status=$?
2113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2114   (exit $ac_status); }; then
2115   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2116 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2117 # work properly (i.e., refer to `conftest.exe'), while it won't with
2118 # `rm'.
2119 for ac_file in conftest.exe conftest conftest.*; do
2120   test -f "$ac_file" || continue
2121   case $ac_file in
2122     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2123     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2124           export ac_cv_exeext
2125           break;;
2126     * ) break;;
2127   esac
2128 done
2129 else
2130   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2131 See \`config.log' for more details." >&5
2132 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2133 See \`config.log' for more details." >&2;}
2134    { (exit 1); exit 1; }; }
2135 fi
2136
2137 rm -f conftest$ac_cv_exeext
2138 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2139 echo "${ECHO_T}$ac_cv_exeext" >&6
2140
2141 rm -f conftest.$ac_ext
2142 EXEEXT=$ac_cv_exeext
2143 ac_exeext=$EXEEXT
2144 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2145 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2146 if test "${ac_cv_objext+set}" = set; then
2147   echo $ECHO_N "(cached) $ECHO_C" >&6
2148 else
2149   cat >conftest.$ac_ext <<_ACEOF
2150 /* confdefs.h.  */
2151 _ACEOF
2152 cat confdefs.h >>conftest.$ac_ext
2153 cat >>conftest.$ac_ext <<_ACEOF
2154 /* end confdefs.h.  */
2155
2156 int
2157 main ()
2158 {
2159
2160   ;
2161   return 0;
2162 }
2163 _ACEOF
2164 rm -f conftest.o conftest.obj
2165 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2166   (eval $ac_compile) 2>&5
2167   ac_status=$?
2168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2169   (exit $ac_status); }; then
2170   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2171   case $ac_file in
2172     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2173     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2174        break;;
2175   esac
2176 done
2177 else
2178   echo "$as_me: failed program was:" >&5
2179 sed 's/^/| /' conftest.$ac_ext >&5
2180
2181 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2182 See \`config.log' for more details." >&5
2183 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2184 See \`config.log' for more details." >&2;}
2185    { (exit 1); exit 1; }; }
2186 fi
2187
2188 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2189 fi
2190 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2191 echo "${ECHO_T}$ac_cv_objext" >&6
2192 OBJEXT=$ac_cv_objext
2193 ac_objext=$OBJEXT
2194 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2195 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2196 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2197   echo $ECHO_N "(cached) $ECHO_C" >&6
2198 else
2199   cat >conftest.$ac_ext <<_ACEOF
2200 /* confdefs.h.  */
2201 _ACEOF
2202 cat confdefs.h >>conftest.$ac_ext
2203 cat >>conftest.$ac_ext <<_ACEOF
2204 /* end confdefs.h.  */
2205
2206 int
2207 main ()
2208 {
2209 #ifndef __GNUC__
2210        choke me
2211 #endif
2212
2213   ;
2214   return 0;
2215 }
2216 _ACEOF
2217 rm -f conftest.$ac_objext
2218 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2219   (eval $ac_compile) 2>conftest.er1
2220   ac_status=$?
2221   grep -v '^ *+' conftest.er1 >conftest.err
2222   rm -f conftest.er1
2223   cat conftest.err >&5
2224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2225   (exit $ac_status); } &&
2226          { ac_try='test -z "$ac_c_werror_flag"
2227                          || test ! -s conftest.err'
2228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2229   (eval $ac_try) 2>&5
2230   ac_status=$?
2231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2232   (exit $ac_status); }; } &&
2233          { ac_try='test -s conftest.$ac_objext'
2234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2235   (eval $ac_try) 2>&5
2236   ac_status=$?
2237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2238   (exit $ac_status); }; }; then
2239   ac_compiler_gnu=yes
2240 else
2241   echo "$as_me: failed program was:" >&5
2242 sed 's/^/| /' conftest.$ac_ext >&5
2243
2244 ac_compiler_gnu=no
2245 fi
2246 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2247 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2248
2249 fi
2250 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2251 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2252 GCC=`test $ac_compiler_gnu = yes && echo yes`
2253 ac_test_CFLAGS=${CFLAGS+set}
2254 ac_save_CFLAGS=$CFLAGS
2255 CFLAGS="-g"
2256 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2257 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2258 if test "${ac_cv_prog_cc_g+set}" = set; then
2259   echo $ECHO_N "(cached) $ECHO_C" >&6
2260 else
2261   cat >conftest.$ac_ext <<_ACEOF
2262 /* confdefs.h.  */
2263 _ACEOF
2264 cat confdefs.h >>conftest.$ac_ext
2265 cat >>conftest.$ac_ext <<_ACEOF
2266 /* end confdefs.h.  */
2267
2268 int
2269 main ()
2270 {
2271
2272   ;
2273   return 0;
2274 }
2275 _ACEOF
2276 rm -f conftest.$ac_objext
2277 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2278   (eval $ac_compile) 2>conftest.er1
2279   ac_status=$?
2280   grep -v '^ *+' conftest.er1 >conftest.err
2281   rm -f conftest.er1
2282   cat conftest.err >&5
2283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2284   (exit $ac_status); } &&
2285          { ac_try='test -z "$ac_c_werror_flag"
2286                          || test ! -s conftest.err'
2287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2288   (eval $ac_try) 2>&5
2289   ac_status=$?
2290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2291   (exit $ac_status); }; } &&
2292          { ac_try='test -s conftest.$ac_objext'
2293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2294   (eval $ac_try) 2>&5
2295   ac_status=$?
2296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2297   (exit $ac_status); }; }; then
2298   ac_cv_prog_cc_g=yes
2299 else
2300   echo "$as_me: failed program was:" >&5
2301 sed 's/^/| /' conftest.$ac_ext >&5
2302
2303 ac_cv_prog_cc_g=no
2304 fi
2305 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2306 fi
2307 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2308 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2309 if test "$ac_test_CFLAGS" = set; then
2310   CFLAGS=$ac_save_CFLAGS
2311 elif test $ac_cv_prog_cc_g = yes; then
2312   if test "$GCC" = yes; then
2313     CFLAGS="-g -O2"
2314   else
2315     CFLAGS="-g"
2316   fi
2317 else
2318   if test "$GCC" = yes; then
2319     CFLAGS="-O2"
2320   else
2321     CFLAGS=
2322   fi
2323 fi
2324 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2325 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2326 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2327   echo $ECHO_N "(cached) $ECHO_C" >&6
2328 else
2329   ac_cv_prog_cc_stdc=no
2330 ac_save_CC=$CC
2331 cat >conftest.$ac_ext <<_ACEOF
2332 /* confdefs.h.  */
2333 _ACEOF
2334 cat confdefs.h >>conftest.$ac_ext
2335 cat >>conftest.$ac_ext <<_ACEOF
2336 /* end confdefs.h.  */
2337 #include <stdarg.h>
2338 #include <stdio.h>
2339 #include <sys/types.h>
2340 #include <sys/stat.h>
2341 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2342 struct buf { int x; };
2343 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2344 static char *e (p, i)
2345      char **p;
2346      int i;
2347 {
2348   return p[i];
2349 }
2350 static char *f (char * (*g) (char **, int), char **p, ...)
2351 {
2352   char *s;
2353   va_list v;
2354   va_start (v,p);
2355   s = g (p, va_arg (v,int));
2356   va_end (v);
2357   return s;
2358 }
2359
2360 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2361    function prototypes and stuff, but not '\xHH' hex character constants.
2362    These don't provoke an error unfortunately, instead are silently treated
2363    as 'x'.  The following induces an error, until -std1 is added to get
2364    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2365    array size at least.  It's necessary to write '\x00'==0 to get something
2366    that's true only with -std1.  */
2367 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2368
2369 int test (int i, double x);
2370 struct s1 {int (*f) (int a);};
2371 struct s2 {int (*f) (double a);};
2372 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2373 int argc;
2374 char **argv;
2375 int
2376 main ()
2377 {
2378 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2379   ;
2380   return 0;
2381 }
2382 _ACEOF
2383 # Don't try gcc -ansi; that turns off useful extensions and
2384 # breaks some systems' header files.
2385 # AIX                   -qlanglvl=ansi
2386 # Ultrix and OSF/1      -std1
2387 # HP-UX 10.20 and later -Ae
2388 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2389 # SVR4                  -Xc -D__EXTENSIONS__
2390 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2391 do
2392   CC="$ac_save_CC $ac_arg"
2393   rm -f conftest.$ac_objext
2394 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2395   (eval $ac_compile) 2>conftest.er1
2396   ac_status=$?
2397   grep -v '^ *+' conftest.er1 >conftest.err
2398   rm -f conftest.er1
2399   cat conftest.err >&5
2400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2401   (exit $ac_status); } &&
2402          { ac_try='test -z "$ac_c_werror_flag"
2403                          || test ! -s conftest.err'
2404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2405   (eval $ac_try) 2>&5
2406   ac_status=$?
2407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2408   (exit $ac_status); }; } &&
2409          { ac_try='test -s conftest.$ac_objext'
2410   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2411   (eval $ac_try) 2>&5
2412   ac_status=$?
2413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2414   (exit $ac_status); }; }; then
2415   ac_cv_prog_cc_stdc=$ac_arg
2416 break
2417 else
2418   echo "$as_me: failed program was:" >&5
2419 sed 's/^/| /' conftest.$ac_ext >&5
2420
2421 fi
2422 rm -f conftest.err conftest.$ac_objext
2423 done
2424 rm -f conftest.$ac_ext conftest.$ac_objext
2425 CC=$ac_save_CC
2426
2427 fi
2428
2429 case "x$ac_cv_prog_cc_stdc" in
2430   x|xno)
2431     echo "$as_me:$LINENO: result: none needed" >&5
2432 echo "${ECHO_T}none needed" >&6 ;;
2433   *)
2434     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2435 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2436     CC="$CC $ac_cv_prog_cc_stdc" ;;
2437 esac
2438
2439 # Some people use a C++ compiler to compile C.  Since we use `exit',
2440 # in C++ we need to declare it.  In case someone uses the same compiler
2441 # for both compiling C and C++ we need to have the C++ compiler decide
2442 # the declaration of exit, since it's the most demanding environment.
2443 cat >conftest.$ac_ext <<_ACEOF
2444 #ifndef __cplusplus
2445   choke me
2446 #endif
2447 _ACEOF
2448 rm -f conftest.$ac_objext
2449 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2450   (eval $ac_compile) 2>conftest.er1
2451   ac_status=$?
2452   grep -v '^ *+' conftest.er1 >conftest.err
2453   rm -f conftest.er1
2454   cat conftest.err >&5
2455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2456   (exit $ac_status); } &&
2457          { ac_try='test -z "$ac_c_werror_flag"
2458                          || test ! -s conftest.err'
2459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2460   (eval $ac_try) 2>&5
2461   ac_status=$?
2462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2463   (exit $ac_status); }; } &&
2464          { ac_try='test -s conftest.$ac_objext'
2465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2466   (eval $ac_try) 2>&5
2467   ac_status=$?
2468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2469   (exit $ac_status); }; }; then
2470   for ac_declaration in \
2471    '' \
2472    'extern "C" void std::exit (int) throw (); using std::exit;' \
2473    'extern "C" void std::exit (int); using std::exit;' \
2474    'extern "C" void exit (int) throw ();' \
2475    'extern "C" void exit (int);' \
2476    'void exit (int);'
2477 do
2478   cat >conftest.$ac_ext <<_ACEOF
2479 /* confdefs.h.  */
2480 _ACEOF
2481 cat confdefs.h >>conftest.$ac_ext
2482 cat >>conftest.$ac_ext <<_ACEOF
2483 /* end confdefs.h.  */
2484 $ac_declaration
2485 #include <stdlib.h>
2486 int
2487 main ()
2488 {
2489 exit (42);
2490   ;
2491   return 0;
2492 }
2493 _ACEOF
2494 rm -f conftest.$ac_objext
2495 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2496   (eval $ac_compile) 2>conftest.er1
2497   ac_status=$?
2498   grep -v '^ *+' conftest.er1 >conftest.err
2499   rm -f conftest.er1
2500   cat conftest.err >&5
2501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2502   (exit $ac_status); } &&
2503          { ac_try='test -z "$ac_c_werror_flag"
2504                          || test ! -s conftest.err'
2505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2506   (eval $ac_try) 2>&5
2507   ac_status=$?
2508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2509   (exit $ac_status); }; } &&
2510          { ac_try='test -s conftest.$ac_objext'
2511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2512   (eval $ac_try) 2>&5
2513   ac_status=$?
2514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2515   (exit $ac_status); }; }; then
2516   :
2517 else
2518   echo "$as_me: failed program was:" >&5
2519 sed 's/^/| /' conftest.$ac_ext >&5
2520
2521 continue
2522 fi
2523 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2524   cat >conftest.$ac_ext <<_ACEOF
2525 /* confdefs.h.  */
2526 _ACEOF
2527 cat confdefs.h >>conftest.$ac_ext
2528 cat >>conftest.$ac_ext <<_ACEOF
2529 /* end confdefs.h.  */
2530 $ac_declaration
2531 int
2532 main ()
2533 {
2534 exit (42);
2535   ;
2536   return 0;
2537 }
2538 _ACEOF
2539 rm -f conftest.$ac_objext
2540 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2541   (eval $ac_compile) 2>conftest.er1
2542   ac_status=$?
2543   grep -v '^ *+' conftest.er1 >conftest.err
2544   rm -f conftest.er1
2545   cat conftest.err >&5
2546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2547   (exit $ac_status); } &&
2548          { ac_try='test -z "$ac_c_werror_flag"
2549                          || test ! -s conftest.err'
2550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2551   (eval $ac_try) 2>&5
2552   ac_status=$?
2553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2554   (exit $ac_status); }; } &&
2555          { ac_try='test -s conftest.$ac_objext'
2556   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2557   (eval $ac_try) 2>&5
2558   ac_status=$?
2559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2560   (exit $ac_status); }; }; then
2561   break
2562 else
2563   echo "$as_me: failed program was:" >&5
2564 sed 's/^/| /' conftest.$ac_ext >&5
2565
2566 fi
2567 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2568 done
2569 rm -f conftest*
2570 if test -n "$ac_declaration"; then
2571   echo '#ifdef __cplusplus' >>confdefs.h
2572   echo $ac_declaration      >>confdefs.h
2573   echo '#endif'             >>confdefs.h
2574 fi
2575
2576 else
2577   echo "$as_me: failed program was:" >&5
2578 sed 's/^/| /' conftest.$ac_ext >&5
2579
2580 fi
2581 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2582 ac_ext=c
2583 ac_cpp='$CPP $CPPFLAGS'
2584 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2585 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2586 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2587
2588
2589   if test -z "$GCC"; then
2590     # not using GCC
2591     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2592 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2593     case "$host" in
2594       *-hpux* )
2595         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2596 echo "${ECHO_T}HPUX: adding -Ae" >&6
2597         CC="$CC -Ae"
2598       ;;
2599       *-aix* )
2600         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2601 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2602         CC="$CC -qlanglvl=ansi -qhalt=e"
2603       ;;
2604       *-dec-* )
2605         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2606 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2607         CC="$CC -std1"
2608       ;;
2609       *)
2610         echo "$as_me:$LINENO: result: no idea" >&5
2611 echo "${ECHO_T}no idea" >&6
2612       ;;
2613     esac
2614   else
2615     # using GCC
2616     case "$host" in
2617       *-solaris*)
2618         echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
2619 echo "${ECHO_T}Solaris: adding -D__EXTENSIONS__" >&6
2620         CC="$CC -D__EXTENSIONS__"
2621       ;;
2622     esac
2623   fi
2624
2625   OBJCC="$CC"
2626
2627   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2628 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2629   if test "$cross_compiling" = yes; then
2630   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2631 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2632    { (exit 1); exit 1; }; }
2633 else
2634   cat >conftest.$ac_ext <<_ACEOF
2635 /* confdefs.h.  */
2636 _ACEOF
2637 cat confdefs.h >>conftest.$ac_ext
2638 cat >>conftest.$ac_ext <<_ACEOF
2639 /* end confdefs.h.  */
2640  main(int ac, char **av) { return 0; }
2641 _ACEOF
2642 rm -f conftest$ac_exeext
2643 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2644   (eval $ac_link) 2>&5
2645   ac_status=$?
2646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2647   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2649   (eval $ac_try) 2>&5
2650   ac_status=$?
2651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2652   (exit $ac_status); }; }; then
2653   echo "$as_me:$LINENO: result: yes" >&5
2654 echo "${ECHO_T}yes" >&6
2655 else
2656   echo "$as_me: program exited with status $ac_status" >&5
2657 echo "$as_me: failed program was:" >&5
2658 sed 's/^/| /' conftest.$ac_ext >&5
2659
2660 ( exit $ac_status )
2661 echo "$as_me:$LINENO: result: no" >&5
2662 echo "${ECHO_T}no" >&6
2663      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2664 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2665    { (exit 1); exit 1; }; }
2666 fi
2667 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2668 fi
2669
2670   if test -n "$GCC"; then
2671     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2672 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2673     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs"
2674     OBJCC="$OBJCC -Wall"
2675     # supposedly gcc 3.4 will have "-Wdeclaration-after-statement"
2676     # and then perhaps we can do without -pedantic?
2677   else
2678     case "$host" in
2679       *-irix5* |*-irix6.0-3* )
2680         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2681 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2682         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2683       ;;
2684 #     *-dec-osf* )
2685 #       if test -z "$GCC"; then
2686 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2687 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2688 #       fi
2689 #     ;;
2690     esac
2691   fi
2692
2693 if test -n "$GCC"; then
2694    if test -n "$GCC"; then
2695    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2696 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2697 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2698   echo $ECHO_N "(cached) $ECHO_C" >&6
2699 else
2700   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
2701           grep unrecognized >/dev/null ); then
2702        ac_cv_gcc_accepts_std=no
2703      else
2704        ac_cv_gcc_accepts_std=yes
2705      fi
2706 fi
2707 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2708 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2709    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2710   fi
2711
2712    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2713 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2714    #
2715    # The reason that // comments are banned from xscreensaver is that gcc is
2716    # basically the only compiler in the world that supports them in C code.
2717    # All other vendors support them only in their C++ compilers, not in their
2718    # ANSI C compilers.  This means that it's a portability problem: every time
2719    # these comments have snuck into the xscreensaver source code, I've gotten
2720    # complaints about it the next day.  So we turn off support for them in gcc
2721    # as well to prevent them from accidentially slipping in.
2722    #
2723    if test "$ac_gcc_accepts_std" = yes ; then
2724      #
2725      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2726      # (That appears to be the only additional preprocessor symbol
2727      # it defines, in addition to the syntax changes it makes.)
2728      #
2729      # -std=gnu89 is no good, because // comments were a GNU extension
2730      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2731      # with -std=gnu89 but not with -std=c89.)
2732      #
2733      CC="$CC -std=c89 -U__STRICT_ANSI__"
2734    else
2735      # The old way:
2736      CC="$CC -Wp,-lang-c89"
2737    fi
2738   fi
2739
2740 if test -n "$GCC"; then
2741    if test -n "$GCC"; then
2742    echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
2743 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6
2744 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
2745   echo $ECHO_N "(cached) $ECHO_C" >&6
2746 else
2747   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
2748           grep unrecognized >/dev/null ); then
2749        ac_cv_gcc_accepts_no_cpp_precomp=no
2750      else
2751        ac_cv_gcc_accepts_no_cpp_precomp=yes
2752      fi
2753 fi
2754 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
2755 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6
2756    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
2757   fi
2758
2759    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
2760      echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
2761 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6
2762      CC="$CC -no-cpp-precomp"
2763    fi
2764   fi
2765
2766 ac_ext=c
2767 ac_cpp='$CPP $CPPFLAGS'
2768 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2769 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2770 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2771 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2772 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2773 # On Suns, sometimes $CPP names a directory.
2774 if test -n "$CPP" && test -d "$CPP"; then
2775   CPP=
2776 fi
2777 if test -z "$CPP"; then
2778   if test "${ac_cv_prog_CPP+set}" = set; then
2779   echo $ECHO_N "(cached) $ECHO_C" >&6
2780 else
2781       # Double quotes because CPP needs to be expanded
2782     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2783     do
2784       ac_preproc_ok=false
2785 for ac_c_preproc_warn_flag in '' yes
2786 do
2787   # Use a header file that comes with gcc, so configuring glibc
2788   # with a fresh cross-compiler works.
2789   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2790   # <limits.h> exists even on freestanding compilers.
2791   # On the NeXT, cc -E runs the code through the compiler's parser,
2792   # not just through cpp. "Syntax error" is here to catch this case.
2793   cat >conftest.$ac_ext <<_ACEOF
2794 /* confdefs.h.  */
2795 _ACEOF
2796 cat confdefs.h >>conftest.$ac_ext
2797 cat >>conftest.$ac_ext <<_ACEOF
2798 /* end confdefs.h.  */
2799 #ifdef __STDC__
2800 # include <limits.h>
2801 #else
2802 # include <assert.h>
2803 #endif
2804                      Syntax error
2805 _ACEOF
2806 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2807   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2808   ac_status=$?
2809   grep -v '^ *+' conftest.er1 >conftest.err
2810   rm -f conftest.er1
2811   cat conftest.err >&5
2812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2813   (exit $ac_status); } >/dev/null; then
2814   if test -s conftest.err; then
2815     ac_cpp_err=$ac_c_preproc_warn_flag
2816     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2817   else
2818     ac_cpp_err=
2819   fi
2820 else
2821   ac_cpp_err=yes
2822 fi
2823 if test -z "$ac_cpp_err"; then
2824   :
2825 else
2826   echo "$as_me: failed program was:" >&5
2827 sed 's/^/| /' conftest.$ac_ext >&5
2828
2829   # Broken: fails on valid input.
2830 continue
2831 fi
2832 rm -f conftest.err conftest.$ac_ext
2833
2834   # OK, works on sane cases.  Now check whether non-existent headers
2835   # can be detected and how.
2836   cat >conftest.$ac_ext <<_ACEOF
2837 /* confdefs.h.  */
2838 _ACEOF
2839 cat confdefs.h >>conftest.$ac_ext
2840 cat >>conftest.$ac_ext <<_ACEOF
2841 /* end confdefs.h.  */
2842 #include <ac_nonexistent.h>
2843 _ACEOF
2844 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2845   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2846   ac_status=$?
2847   grep -v '^ *+' conftest.er1 >conftest.err
2848   rm -f conftest.er1
2849   cat conftest.err >&5
2850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2851   (exit $ac_status); } >/dev/null; then
2852   if test -s conftest.err; then
2853     ac_cpp_err=$ac_c_preproc_warn_flag
2854     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2855   else
2856     ac_cpp_err=
2857   fi
2858 else
2859   ac_cpp_err=yes
2860 fi
2861 if test -z "$ac_cpp_err"; then
2862   # Broken: success on invalid input.
2863 continue
2864 else
2865   echo "$as_me: failed program was:" >&5
2866 sed 's/^/| /' conftest.$ac_ext >&5
2867
2868   # Passes both tests.
2869 ac_preproc_ok=:
2870 break
2871 fi
2872 rm -f conftest.err conftest.$ac_ext
2873
2874 done
2875 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2876 rm -f conftest.err conftest.$ac_ext
2877 if $ac_preproc_ok; then
2878   break
2879 fi
2880
2881     done
2882     ac_cv_prog_CPP=$CPP
2883
2884 fi
2885   CPP=$ac_cv_prog_CPP
2886 else
2887   ac_cv_prog_CPP=$CPP
2888 fi
2889 echo "$as_me:$LINENO: result: $CPP" >&5
2890 echo "${ECHO_T}$CPP" >&6
2891 ac_preproc_ok=false
2892 for ac_c_preproc_warn_flag in '' yes
2893 do
2894   # Use a header file that comes with gcc, so configuring glibc
2895   # with a fresh cross-compiler works.
2896   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2897   # <limits.h> exists even on freestanding compilers.
2898   # On the NeXT, cc -E runs the code through the compiler's parser,
2899   # not just through cpp. "Syntax error" is here to catch this case.
2900   cat >conftest.$ac_ext <<_ACEOF
2901 /* confdefs.h.  */
2902 _ACEOF
2903 cat confdefs.h >>conftest.$ac_ext
2904 cat >>conftest.$ac_ext <<_ACEOF
2905 /* end confdefs.h.  */
2906 #ifdef __STDC__
2907 # include <limits.h>
2908 #else
2909 # include <assert.h>
2910 #endif
2911                      Syntax error
2912 _ACEOF
2913 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2914   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2915   ac_status=$?
2916   grep -v '^ *+' conftest.er1 >conftest.err
2917   rm -f conftest.er1
2918   cat conftest.err >&5
2919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2920   (exit $ac_status); } >/dev/null; then
2921   if test -s conftest.err; then
2922     ac_cpp_err=$ac_c_preproc_warn_flag
2923     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2924   else
2925     ac_cpp_err=
2926   fi
2927 else
2928   ac_cpp_err=yes
2929 fi
2930 if test -z "$ac_cpp_err"; then
2931   :
2932 else
2933   echo "$as_me: failed program was:" >&5
2934 sed 's/^/| /' conftest.$ac_ext >&5
2935
2936   # Broken: fails on valid input.
2937 continue
2938 fi
2939 rm -f conftest.err conftest.$ac_ext
2940
2941   # OK, works on sane cases.  Now check whether non-existent headers
2942   # can be detected and how.
2943   cat >conftest.$ac_ext <<_ACEOF
2944 /* confdefs.h.  */
2945 _ACEOF
2946 cat confdefs.h >>conftest.$ac_ext
2947 cat >>conftest.$ac_ext <<_ACEOF
2948 /* end confdefs.h.  */
2949 #include <ac_nonexistent.h>
2950 _ACEOF
2951 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2952   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2953   ac_status=$?
2954   grep -v '^ *+' conftest.er1 >conftest.err
2955   rm -f conftest.er1
2956   cat conftest.err >&5
2957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2958   (exit $ac_status); } >/dev/null; then
2959   if test -s conftest.err; then
2960     ac_cpp_err=$ac_c_preproc_warn_flag
2961     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2962   else
2963     ac_cpp_err=
2964   fi
2965 else
2966   ac_cpp_err=yes
2967 fi
2968 if test -z "$ac_cpp_err"; then
2969   # Broken: success on invalid input.
2970 continue
2971 else
2972   echo "$as_me: failed program was:" >&5
2973 sed 's/^/| /' conftest.$ac_ext >&5
2974
2975   # Passes both tests.
2976 ac_preproc_ok=:
2977 break
2978 fi
2979 rm -f conftest.err conftest.$ac_ext
2980
2981 done
2982 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2983 rm -f conftest.err conftest.$ac_ext
2984 if $ac_preproc_ok; then
2985   :
2986 else
2987   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2988 See \`config.log' for more details." >&5
2989 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2990 See \`config.log' for more details." >&2;}
2991    { (exit 1); exit 1; }; }
2992 fi
2993
2994 ac_ext=c
2995 ac_cpp='$CPP $CPPFLAGS'
2996 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2997 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2998 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2999
3000 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3001 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3002 if test "${ac_cv_c_const+set}" = set; then
3003   echo $ECHO_N "(cached) $ECHO_C" >&6
3004 else
3005   cat >conftest.$ac_ext <<_ACEOF
3006 /* confdefs.h.  */
3007 _ACEOF
3008 cat confdefs.h >>conftest.$ac_ext
3009 cat >>conftest.$ac_ext <<_ACEOF
3010 /* end confdefs.h.  */
3011
3012 int
3013 main ()
3014 {
3015 /* FIXME: Include the comments suggested by Paul. */
3016 #ifndef __cplusplus
3017   /* Ultrix mips cc rejects this.  */
3018   typedef int charset[2];
3019   const charset x;
3020   /* SunOS 4.1.1 cc rejects this.  */
3021   char const *const *ccp;
3022   char **p;
3023   /* NEC SVR4.0.2 mips cc rejects this.  */
3024   struct point {int x, y;};
3025   static struct point const zero = {0,0};
3026   /* AIX XL C 1.02.0.0 rejects this.
3027      It does not let you subtract one const X* pointer from another in
3028      an arm of an if-expression whose if-part is not a constant
3029      expression */
3030   const char *g = "string";
3031   ccp = &g + (g ? g-g : 0);
3032   /* HPUX 7.0 cc rejects these. */
3033   ++ccp;
3034   p = (char**) ccp;
3035   ccp = (char const *const *) p;
3036   { /* SCO 3.2v4 cc rejects this.  */
3037     char *t;
3038     char const *s = 0 ? (char *) 0 : (char const *) 0;
3039
3040     *t++ = 0;
3041   }
3042   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3043     int x[] = {25, 17};
3044     const int *foo = &x[0];
3045     ++foo;
3046   }
3047   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3048     typedef const int *iptr;
3049     iptr p = 0;
3050     ++p;
3051   }
3052   { /* AIX XL C 1.02.0.0 rejects this saying
3053        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3054     struct s { int j; const int *ap[3]; };
3055     struct s *b; b->j = 5;
3056   }
3057   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3058     const int foo = 10;
3059   }
3060 #endif
3061
3062   ;
3063   return 0;
3064 }
3065 _ACEOF
3066 rm -f conftest.$ac_objext
3067 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3068   (eval $ac_compile) 2>conftest.er1
3069   ac_status=$?
3070   grep -v '^ *+' conftest.er1 >conftest.err
3071   rm -f conftest.er1
3072   cat conftest.err >&5
3073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3074   (exit $ac_status); } &&
3075          { ac_try='test -z "$ac_c_werror_flag"
3076                          || test ! -s conftest.err'
3077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3078   (eval $ac_try) 2>&5
3079   ac_status=$?
3080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3081   (exit $ac_status); }; } &&
3082          { ac_try='test -s conftest.$ac_objext'
3083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3084   (eval $ac_try) 2>&5
3085   ac_status=$?
3086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3087   (exit $ac_status); }; }; then
3088   ac_cv_c_const=yes
3089 else
3090   echo "$as_me: failed program was:" >&5
3091 sed 's/^/| /' conftest.$ac_ext >&5
3092
3093 ac_cv_c_const=no
3094 fi
3095 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3096 fi
3097 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3098 echo "${ECHO_T}$ac_cv_c_const" >&6
3099 if test $ac_cv_c_const = no; then
3100
3101 cat >>confdefs.h <<\_ACEOF
3102 #define const
3103 _ACEOF
3104
3105 fi
3106
3107 echo "$as_me:$LINENO: checking for inline" >&5
3108 echo $ECHO_N "checking for inline... $ECHO_C" >&6
3109 if test "${ac_cv_c_inline+set}" = set; then
3110   echo $ECHO_N "(cached) $ECHO_C" >&6
3111 else
3112   ac_cv_c_inline=no
3113 for ac_kw in inline __inline__ __inline; do
3114   cat >conftest.$ac_ext <<_ACEOF
3115 /* confdefs.h.  */
3116 _ACEOF
3117 cat confdefs.h >>conftest.$ac_ext
3118 cat >>conftest.$ac_ext <<_ACEOF
3119 /* end confdefs.h.  */
3120 #ifndef __cplusplus
3121 typedef int foo_t;
3122 static $ac_kw foo_t static_foo () {return 0; }
3123 $ac_kw foo_t foo () {return 0; }
3124 #endif
3125
3126 _ACEOF
3127 rm -f conftest.$ac_objext
3128 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3129   (eval $ac_compile) 2>conftest.er1
3130   ac_status=$?
3131   grep -v '^ *+' conftest.er1 >conftest.err
3132   rm -f conftest.er1
3133   cat conftest.err >&5
3134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3135   (exit $ac_status); } &&
3136          { ac_try='test -z "$ac_c_werror_flag"
3137                          || test ! -s conftest.err'
3138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3139   (eval $ac_try) 2>&5
3140   ac_status=$?
3141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3142   (exit $ac_status); }; } &&
3143          { ac_try='test -s conftest.$ac_objext'
3144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3145   (eval $ac_try) 2>&5
3146   ac_status=$?
3147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3148   (exit $ac_status); }; }; then
3149   ac_cv_c_inline=$ac_kw; break
3150 else
3151   echo "$as_me: failed program was:" >&5
3152 sed 's/^/| /' conftest.$ac_ext >&5
3153
3154 fi
3155 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3156 done
3157
3158 fi
3159 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3160 echo "${ECHO_T}$ac_cv_c_inline" >&6
3161
3162
3163 case $ac_cv_c_inline in
3164   inline | yes) ;;
3165   *)
3166     case $ac_cv_c_inline in
3167       no) ac_val=;;
3168       *) ac_val=$ac_cv_c_inline;;
3169     esac
3170     cat >>confdefs.h <<_ACEOF
3171 #ifndef __cplusplus
3172 #define inline $ac_val
3173 #endif
3174 _ACEOF
3175     ;;
3176 esac
3177
3178
3179 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3180   echo "$as_me:$LINENO: checking for bc" >&5
3181 echo $ECHO_N "checking for bc... $ECHO_C" >&6
3182   if test "$ac_bc_result" = "15" ; then
3183     echo "$as_me:$LINENO: result: yes" >&5
3184 echo "${ECHO_T}yes" >&6
3185   else
3186     echo "$as_me:$LINENO: result: no" >&5
3187 echo "${ECHO_T}no" >&6
3188     echo ''
3189     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3190                   part of Unix since the 1970s.  Come back when your vendor
3191                   has grown a clue." >&5
3192 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3193                   part of Unix since the 1970s.  Come back when your vendor
3194                   has grown a clue." >&2;}
3195    { (exit 1); exit 1; }; }
3196   fi
3197
3198
3199 # stuff for Makefiles
3200 # Find a good install program.  We prefer a C program (faster),
3201 # so one script is as good as another.  But avoid the broken or
3202 # incompatible versions:
3203 # SysV /etc/install, /usr/sbin/install
3204 # SunOS /usr/etc/install
3205 # IRIX /sbin/install
3206 # AIX /bin/install
3207 # AmigaOS /C/install, which installs bootblocks on floppy discs
3208 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3209 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3210 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3211 # OS/2's system install, which has a completely different semantic
3212 # ./install, which can be erroneously created by make from ./install.sh.
3213 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3214 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3215 if test -z "$INSTALL"; then
3216 if test "${ac_cv_path_install+set}" = set; then
3217   echo $ECHO_N "(cached) $ECHO_C" >&6
3218 else
3219   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3220 for as_dir in $PATH
3221 do
3222   IFS=$as_save_IFS
3223   test -z "$as_dir" && as_dir=.
3224   # Account for people who put trailing slashes in PATH elements.
3225 case $as_dir/ in
3226   ./ | .// | /cC/* | \
3227   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3228   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3229   /usr/ucb/* ) ;;
3230   *)
3231     # OSF1 and SCO ODT 3.0 have their own names for install.
3232     # Don't use installbsd from OSF since it installs stuff as root
3233     # by default.
3234     for ac_prog in ginstall scoinst install; do
3235       for ac_exec_ext in '' $ac_executable_extensions; do
3236         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3237           if test $ac_prog = install &&
3238             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3239             # AIX install.  It has an incompatible calling convention.
3240             :
3241           elif test $ac_prog = install &&
3242             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3243             # program-specific install script used by HP pwplus--don't use.
3244             :
3245           else
3246             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3247             break 3
3248           fi
3249         fi
3250       done
3251     done
3252     ;;
3253 esac
3254 done
3255
3256
3257 fi
3258   if test "${ac_cv_path_install+set}" = set; then
3259     INSTALL=$ac_cv_path_install
3260   else
3261     # As a last resort, use the slow shell script.  We don't cache a
3262     # path for INSTALL within a source directory, because that will
3263     # break other packages using the cache if that directory is
3264     # removed, or if the path is relative.
3265     INSTALL=$ac_install_sh
3266   fi
3267 fi
3268 echo "$as_me:$LINENO: result: $INSTALL" >&5
3269 echo "${ECHO_T}$INSTALL" >&6
3270
3271 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3272 # It thinks the first close brace ends the variable substitution.
3273 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3274
3275 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3276
3277 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3278
3279 echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
3280 echo $ECHO_N "checking whether \"\${INSTALL} -d\" creates intermediate directories... $ECHO_C" >&6
3281 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
3282   echo $ECHO_N "(cached) $ECHO_C" >&6
3283 else
3284   ac_cv_install_d_creates_dirs=no
3285      rm -rf conftestdir
3286      if mkdir conftestdir; then
3287        cd conftestdir 2>/dev/null
3288        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
3289        if test -d dir1/dir2/. ; then
3290          ac_cv_install_d_creates_dirs=yes
3291        fi
3292        cd .. 2>/dev/null
3293        rm -rf conftestdir
3294      fi
3295
3296 fi
3297 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
3298 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
3299
3300   if test "$ac_cv_install_d_creates_dirs" = no ; then
3301     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
3302 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
3303 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
3304   echo $ECHO_N "(cached) $ECHO_C" >&6
3305 else
3306   ac_cv_mkdir_p_creates_dirs=no
3307        rm -rf conftestdir
3308        if mkdir conftestdir; then
3309          cd conftestdir 2>/dev/null
3310          mkdir -p dir1/dir2 >/dev/null 2>&1
3311          if test -d dir1/dir2/. ; then
3312            ac_cv_mkdir_p_creates_dirs=yes
3313          fi
3314          cd .. 2>/dev/null
3315          rm -rf conftestdir
3316        fi
3317
3318 fi
3319 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3320 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3321   fi
3322
3323   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3324     INSTALL_DIRS='${INSTALL} -d'
3325   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3326     INSTALL_DIRS='mkdir -p'
3327   else
3328     # any other ideas?
3329     INSTALL_DIRS='${INSTALL} -d'
3330   fi
3331
3332 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3333 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3334 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
3335 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3336   echo $ECHO_N "(cached) $ECHO_C" >&6
3337 else
3338   cat >conftest.make <<\_ACEOF
3339 all:
3340         @echo 'ac_maketemp="$(MAKE)"'
3341 _ACEOF
3342 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3343 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3344 if test -n "$ac_maketemp"; then
3345   eval ac_cv_prog_make_${ac_make}_set=yes
3346 else
3347   eval ac_cv_prog_make_${ac_make}_set=no
3348 fi
3349 rm -f conftest.make
3350 fi
3351 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3352   echo "$as_me:$LINENO: result: yes" >&5
3353 echo "${ECHO_T}yes" >&6
3354   SET_MAKE=
3355 else
3356   echo "$as_me:$LINENO: result: no" >&5
3357 echo "${ECHO_T}no" >&6
3358   SET_MAKE="MAKE=${MAKE-make}"
3359 fi
3360
3361
3362 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3363 # That's wrong: it should be set to '${INSTALL}', so that one can
3364 # implement the "install-strip" target properly (strip executables,
3365 # but do not try to strip scripts.)
3366 #
3367 INSTALL_SCRIPT='${INSTALL}'
3368
3369 # random libc stuff
3370
3371 echo "$as_me:$LINENO: checking for egrep" >&5
3372 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3373 if test "${ac_cv_prog_egrep+set}" = set; then
3374   echo $ECHO_N "(cached) $ECHO_C" >&6
3375 else
3376   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3377     then ac_cv_prog_egrep='grep -E'
3378     else ac_cv_prog_egrep='egrep'
3379     fi
3380 fi
3381 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3382 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3383  EGREP=$ac_cv_prog_egrep
3384
3385
3386 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3387 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3388 if test "${ac_cv_header_stdc+set}" = set; then
3389   echo $ECHO_N "(cached) $ECHO_C" >&6
3390 else
3391   cat >conftest.$ac_ext <<_ACEOF
3392 /* confdefs.h.  */
3393 _ACEOF
3394 cat confdefs.h >>conftest.$ac_ext
3395 cat >>conftest.$ac_ext <<_ACEOF
3396 /* end confdefs.h.  */
3397 #include <stdlib.h>
3398 #include <stdarg.h>
3399 #include <string.h>
3400 #include <float.h>
3401
3402 int
3403 main ()
3404 {
3405
3406   ;
3407   return 0;
3408 }
3409 _ACEOF
3410 rm -f conftest.$ac_objext
3411 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3412   (eval $ac_compile) 2>conftest.er1
3413   ac_status=$?
3414   grep -v '^ *+' conftest.er1 >conftest.err
3415   rm -f conftest.er1
3416   cat conftest.err >&5
3417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3418   (exit $ac_status); } &&
3419          { ac_try='test -z "$ac_c_werror_flag"
3420                          || test ! -s conftest.err'
3421   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3422   (eval $ac_try) 2>&5
3423   ac_status=$?
3424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3425   (exit $ac_status); }; } &&
3426          { ac_try='test -s conftest.$ac_objext'
3427   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3428   (eval $ac_try) 2>&5
3429   ac_status=$?
3430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3431   (exit $ac_status); }; }; then
3432   ac_cv_header_stdc=yes
3433 else
3434   echo "$as_me: failed program was:" >&5
3435 sed 's/^/| /' conftest.$ac_ext >&5
3436
3437 ac_cv_header_stdc=no
3438 fi
3439 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3440
3441 if test $ac_cv_header_stdc = yes; then
3442   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3443   cat >conftest.$ac_ext <<_ACEOF
3444 /* confdefs.h.  */
3445 _ACEOF
3446 cat confdefs.h >>conftest.$ac_ext
3447 cat >>conftest.$ac_ext <<_ACEOF
3448 /* end confdefs.h.  */
3449 #include <string.h>
3450
3451 _ACEOF
3452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3453   $EGREP "memchr" >/dev/null 2>&1; then
3454   :
3455 else
3456   ac_cv_header_stdc=no
3457 fi
3458 rm -f conftest*
3459
3460 fi
3461
3462 if test $ac_cv_header_stdc = yes; then
3463   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3464   cat >conftest.$ac_ext <<_ACEOF
3465 /* confdefs.h.  */
3466 _ACEOF
3467 cat confdefs.h >>conftest.$ac_ext
3468 cat >>conftest.$ac_ext <<_ACEOF
3469 /* end confdefs.h.  */
3470 #include <stdlib.h>
3471
3472 _ACEOF
3473 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3474   $EGREP "free" >/dev/null 2>&1; then
3475   :
3476 else
3477   ac_cv_header_stdc=no
3478 fi
3479 rm -f conftest*
3480
3481 fi
3482
3483 if test $ac_cv_header_stdc = yes; then
3484   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3485   if test "$cross_compiling" = yes; then
3486   :
3487 else
3488   cat >conftest.$ac_ext <<_ACEOF
3489 /* confdefs.h.  */
3490 _ACEOF
3491 cat confdefs.h >>conftest.$ac_ext
3492 cat >>conftest.$ac_ext <<_ACEOF
3493 /* end confdefs.h.  */
3494 #include <ctype.h>
3495 #if ((' ' & 0x0FF) == 0x020)
3496 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3497 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3498 #else
3499 # define ISLOWER(c) \
3500                    (('a' <= (c) && (c) <= 'i') \
3501                      || ('j' <= (c) && (c) <= 'r') \
3502                      || ('s' <= (c) && (c) <= 'z'))
3503 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3504 #endif
3505
3506 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3507 int
3508 main ()
3509 {
3510   int i;
3511   for (i = 0; i < 256; i++)
3512     if (XOR (islower (i), ISLOWER (i))
3513         || toupper (i) != TOUPPER (i))
3514       exit(2);
3515   exit (0);
3516 }
3517 _ACEOF
3518 rm -f conftest$ac_exeext
3519 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3520   (eval $ac_link) 2>&5
3521   ac_status=$?
3522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3523   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3525   (eval $ac_try) 2>&5
3526   ac_status=$?
3527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3528   (exit $ac_status); }; }; then
3529   :
3530 else
3531   echo "$as_me: program exited with status $ac_status" >&5
3532 echo "$as_me: failed program was:" >&5
3533 sed 's/^/| /' conftest.$ac_ext >&5
3534
3535 ( exit $ac_status )
3536 ac_cv_header_stdc=no
3537 fi
3538 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3539 fi
3540 fi
3541 fi
3542 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3543 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3544 if test $ac_cv_header_stdc = yes; then
3545
3546 cat >>confdefs.h <<\_ACEOF
3547 #define STDC_HEADERS 1
3548 _ACEOF
3549
3550 fi
3551
3552 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3563                   inttypes.h stdint.h unistd.h
3564 do
3565 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3566 echo "$as_me:$LINENO: checking for $ac_header" >&5
3567 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3568 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3569   echo $ECHO_N "(cached) $ECHO_C" >&6
3570 else
3571   cat >conftest.$ac_ext <<_ACEOF
3572 /* confdefs.h.  */
3573 _ACEOF
3574 cat confdefs.h >>conftest.$ac_ext
3575 cat >>conftest.$ac_ext <<_ACEOF
3576 /* end confdefs.h.  */
3577 $ac_includes_default
3578
3579 #include <$ac_header>
3580 _ACEOF
3581 rm -f conftest.$ac_objext
3582 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3583   (eval $ac_compile) 2>conftest.er1
3584   ac_status=$?
3585   grep -v '^ *+' conftest.er1 >conftest.err
3586   rm -f conftest.er1
3587   cat conftest.err >&5
3588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3589   (exit $ac_status); } &&
3590          { ac_try='test -z "$ac_c_werror_flag"
3591                          || test ! -s conftest.err'
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); }; } &&
3597          { ac_try='test -s conftest.$ac_objext'
3598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3599   (eval $ac_try) 2>&5
3600   ac_status=$?
3601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3602   (exit $ac_status); }; }; then
3603   eval "$as_ac_Header=yes"
3604 else
3605   echo "$as_me: failed program was:" >&5
3606 sed 's/^/| /' conftest.$ac_ext >&5
3607
3608 eval "$as_ac_Header=no"
3609 fi
3610 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3611 fi
3612 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3613 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3614 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3615   cat >>confdefs.h <<_ACEOF
3616 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3617 _ACEOF
3618
3619 fi
3620
3621 done
3622
3623
3624
3625 for ac_header in unistd.h
3626 do
3627 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3628 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3629   echo "$as_me:$LINENO: checking for $ac_header" >&5
3630 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3631 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3632   echo $ECHO_N "(cached) $ECHO_C" >&6
3633 fi
3634 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3635 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3636 else
3637   # Is the header compilable?
3638 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3639 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3640 cat >conftest.$ac_ext <<_ACEOF
3641 /* confdefs.h.  */
3642 _ACEOF
3643 cat confdefs.h >>conftest.$ac_ext
3644 cat >>conftest.$ac_ext <<_ACEOF
3645 /* end confdefs.h.  */
3646 $ac_includes_default
3647 #include <$ac_header>
3648 _ACEOF
3649 rm -f conftest.$ac_objext
3650 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3651   (eval $ac_compile) 2>conftest.er1
3652   ac_status=$?
3653   grep -v '^ *+' conftest.er1 >conftest.err
3654   rm -f conftest.er1
3655   cat conftest.err >&5
3656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3657   (exit $ac_status); } &&
3658          { ac_try='test -z "$ac_c_werror_flag"
3659                          || test ! -s conftest.err'
3660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3661   (eval $ac_try) 2>&5
3662   ac_status=$?
3663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3664   (exit $ac_status); }; } &&
3665          { ac_try='test -s conftest.$ac_objext'
3666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3667   (eval $ac_try) 2>&5
3668   ac_status=$?
3669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3670   (exit $ac_status); }; }; then
3671   ac_header_compiler=yes
3672 else
3673   echo "$as_me: failed program was:" >&5
3674 sed 's/^/| /' conftest.$ac_ext >&5
3675
3676 ac_header_compiler=no
3677 fi
3678 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3679 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3680 echo "${ECHO_T}$ac_header_compiler" >&6
3681
3682 # Is the header present?
3683 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3684 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3685 cat >conftest.$ac_ext <<_ACEOF
3686 /* confdefs.h.  */
3687 _ACEOF
3688 cat confdefs.h >>conftest.$ac_ext
3689 cat >>conftest.$ac_ext <<_ACEOF
3690 /* end confdefs.h.  */
3691 #include <$ac_header>
3692 _ACEOF
3693 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3694   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3695   ac_status=$?
3696   grep -v '^ *+' conftest.er1 >conftest.err
3697   rm -f conftest.er1
3698   cat conftest.err >&5
3699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3700   (exit $ac_status); } >/dev/null; then
3701   if test -s conftest.err; then
3702     ac_cpp_err=$ac_c_preproc_warn_flag
3703     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3704   else
3705     ac_cpp_err=
3706   fi
3707 else
3708   ac_cpp_err=yes
3709 fi
3710 if test -z "$ac_cpp_err"; then
3711   ac_header_preproc=yes
3712 else
3713   echo "$as_me: failed program was:" >&5
3714 sed 's/^/| /' conftest.$ac_ext >&5
3715
3716   ac_header_preproc=no
3717 fi
3718 rm -f conftest.err conftest.$ac_ext
3719 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3720 echo "${ECHO_T}$ac_header_preproc" >&6
3721
3722 # So?  What about this header?
3723 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3724   yes:no: )
3725     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3726 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3727     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
3728 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
3729     ac_header_preproc=yes
3730     ;;
3731   no:yes:* )
3732     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3733 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3734     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
3735 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
3736     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
3737 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
3738     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
3739 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
3740     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3741 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3742     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
3743 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
3744     (
3745       cat <<\_ASBOX
3746 ## ------------------------------------------ ##
3747 ## Report this to the AC_PACKAGE_NAME lists.  ##
3748 ## ------------------------------------------ ##
3749 _ASBOX
3750     ) |
3751       sed "s/^/$as_me: WARNING:     /" >&2
3752     ;;
3753 esac
3754 echo "$as_me:$LINENO: checking for $ac_header" >&5
3755 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3756 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3757   echo $ECHO_N "(cached) $ECHO_C" >&6
3758 else
3759   eval "$as_ac_Header=\$ac_header_preproc"
3760 fi
3761 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3762 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3763
3764 fi
3765 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3766   cat >>confdefs.h <<_ACEOF
3767 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3768 _ACEOF
3769
3770 fi
3771
3772 done
3773
3774 echo "$as_me:$LINENO: checking for mode_t" >&5
3775 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3776 if test "${ac_cv_type_mode_t+set}" = set; then
3777   echo $ECHO_N "(cached) $ECHO_C" >&6
3778 else
3779   cat >conftest.$ac_ext <<_ACEOF
3780 /* confdefs.h.  */
3781 _ACEOF
3782 cat confdefs.h >>conftest.$ac_ext
3783 cat >>conftest.$ac_ext <<_ACEOF
3784 /* end confdefs.h.  */
3785 $ac_includes_default
3786 int
3787 main ()
3788 {
3789 if ((mode_t *) 0)
3790   return 0;
3791 if (sizeof (mode_t))
3792   return 0;
3793   ;
3794   return 0;
3795 }
3796 _ACEOF
3797 rm -f conftest.$ac_objext
3798 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3799   (eval $ac_compile) 2>conftest.er1
3800   ac_status=$?
3801   grep -v '^ *+' conftest.er1 >conftest.err
3802   rm -f conftest.er1
3803   cat conftest.err >&5
3804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3805   (exit $ac_status); } &&
3806          { ac_try='test -z "$ac_c_werror_flag"
3807                          || test ! -s conftest.err'
3808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3809   (eval $ac_try) 2>&5
3810   ac_status=$?
3811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3812   (exit $ac_status); }; } &&
3813          { ac_try='test -s conftest.$ac_objext'
3814   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3815   (eval $ac_try) 2>&5
3816   ac_status=$?
3817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3818   (exit $ac_status); }; }; then
3819   ac_cv_type_mode_t=yes
3820 else
3821   echo "$as_me: failed program was:" >&5
3822 sed 's/^/| /' conftest.$ac_ext >&5
3823
3824 ac_cv_type_mode_t=no
3825 fi
3826 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3827 fi
3828 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
3829 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3830 if test $ac_cv_type_mode_t = yes; then
3831   :
3832 else
3833
3834 cat >>confdefs.h <<_ACEOF
3835 #define mode_t int
3836 _ACEOF
3837
3838 fi
3839
3840 echo "$as_me:$LINENO: checking for pid_t" >&5
3841 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
3842 if test "${ac_cv_type_pid_t+set}" = set; then
3843   echo $ECHO_N "(cached) $ECHO_C" >&6
3844 else
3845   cat >conftest.$ac_ext <<_ACEOF
3846 /* confdefs.h.  */
3847 _ACEOF
3848 cat confdefs.h >>conftest.$ac_ext
3849 cat >>conftest.$ac_ext <<_ACEOF
3850 /* end confdefs.h.  */
3851 $ac_includes_default
3852 int
3853 main ()
3854 {
3855 if ((pid_t *) 0)
3856   return 0;
3857 if (sizeof (pid_t))
3858   return 0;
3859   ;
3860   return 0;
3861 }
3862 _ACEOF
3863 rm -f conftest.$ac_objext
3864 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3865   (eval $ac_compile) 2>conftest.er1
3866   ac_status=$?
3867   grep -v '^ *+' conftest.er1 >conftest.err
3868   rm -f conftest.er1
3869   cat conftest.err >&5
3870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3871   (exit $ac_status); } &&
3872          { ac_try='test -z "$ac_c_werror_flag"
3873                          || test ! -s conftest.err'
3874   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3875   (eval $ac_try) 2>&5
3876   ac_status=$?
3877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3878   (exit $ac_status); }; } &&
3879          { ac_try='test -s conftest.$ac_objext'
3880   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3881   (eval $ac_try) 2>&5
3882   ac_status=$?
3883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3884   (exit $ac_status); }; }; then
3885   ac_cv_type_pid_t=yes
3886 else
3887   echo "$as_me: failed program was:" >&5
3888 sed 's/^/| /' conftest.$ac_ext >&5
3889
3890 ac_cv_type_pid_t=no
3891 fi
3892 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3893 fi
3894 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
3895 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3896 if test $ac_cv_type_pid_t = yes; then
3897   :
3898 else
3899
3900 cat >>confdefs.h <<_ACEOF
3901 #define pid_t int
3902 _ACEOF
3903
3904 fi
3905
3906 echo "$as_me:$LINENO: checking for size_t" >&5
3907 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
3908 if test "${ac_cv_type_size_t+set}" = set; then
3909   echo $ECHO_N "(cached) $ECHO_C" >&6
3910 else
3911   cat >conftest.$ac_ext <<_ACEOF
3912 /* confdefs.h.  */
3913 _ACEOF
3914 cat confdefs.h >>conftest.$ac_ext
3915 cat >>conftest.$ac_ext <<_ACEOF
3916 /* end confdefs.h.  */
3917 $ac_includes_default
3918 int
3919 main ()
3920 {
3921 if ((size_t *) 0)
3922   return 0;
3923 if (sizeof (size_t))
3924   return 0;
3925   ;
3926   return 0;
3927 }
3928 _ACEOF
3929 rm -f conftest.$ac_objext
3930 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3931   (eval $ac_compile) 2>conftest.er1
3932   ac_status=$?
3933   grep -v '^ *+' conftest.er1 >conftest.err
3934   rm -f conftest.er1
3935   cat conftest.err >&5
3936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3937   (exit $ac_status); } &&
3938          { ac_try='test -z "$ac_c_werror_flag"
3939                          || test ! -s conftest.err'
3940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3941   (eval $ac_try) 2>&5
3942   ac_status=$?
3943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3944   (exit $ac_status); }; } &&
3945          { ac_try='test -s conftest.$ac_objext'
3946   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3947   (eval $ac_try) 2>&5
3948   ac_status=$?
3949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3950   (exit $ac_status); }; }; then
3951   ac_cv_type_size_t=yes
3952 else
3953   echo "$as_me: failed program was:" >&5
3954 sed 's/^/| /' conftest.$ac_ext >&5
3955
3956 ac_cv_type_size_t=no
3957 fi
3958 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3959 fi
3960 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
3961 echo "${ECHO_T}$ac_cv_type_size_t" >&6
3962 if test $ac_cv_type_size_t = yes; then
3963   :
3964 else
3965
3966 cat >>confdefs.h <<_ACEOF
3967 #define size_t unsigned
3968 _ACEOF
3969
3970 fi
3971
3972 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
3973 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
3974 if test "${ac_cv_type_signal+set}" = set; then
3975   echo $ECHO_N "(cached) $ECHO_C" >&6
3976 else
3977   cat >conftest.$ac_ext <<_ACEOF
3978 /* confdefs.h.  */
3979 _ACEOF
3980 cat confdefs.h >>conftest.$ac_ext
3981 cat >>conftest.$ac_ext <<_ACEOF
3982 /* end confdefs.h.  */
3983 #include <sys/types.h>
3984 #include <signal.h>
3985 #ifdef signal
3986 # undef signal
3987 #endif
3988 #ifdef __cplusplus
3989 extern "C" void (*signal (int, void (*)(int)))(int);
3990 #else
3991 void (*signal ()) ();
3992 #endif
3993
3994 int
3995 main ()
3996 {
3997 int i;
3998   ;
3999   return 0;
4000 }
4001 _ACEOF
4002 rm -f conftest.$ac_objext
4003 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4004   (eval $ac_compile) 2>conftest.er1
4005   ac_status=$?
4006   grep -v '^ *+' conftest.er1 >conftest.err
4007   rm -f conftest.er1
4008   cat conftest.err >&5
4009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4010   (exit $ac_status); } &&
4011          { ac_try='test -z "$ac_c_werror_flag"
4012                          || test ! -s conftest.err'
4013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4014   (eval $ac_try) 2>&5
4015   ac_status=$?
4016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4017   (exit $ac_status); }; } &&
4018          { ac_try='test -s conftest.$ac_objext'
4019   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4020   (eval $ac_try) 2>&5
4021   ac_status=$?
4022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4023   (exit $ac_status); }; }; then
4024   ac_cv_type_signal=void
4025 else
4026   echo "$as_me: failed program was:" >&5
4027 sed 's/^/| /' conftest.$ac_ext >&5
4028
4029 ac_cv_type_signal=int
4030 fi
4031 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4032 fi
4033 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4034 echo "${ECHO_T}$ac_cv_type_signal" >&6
4035
4036 cat >>confdefs.h <<_ACEOF
4037 #define RETSIGTYPE $ac_cv_type_signal
4038 _ACEOF
4039
4040
4041 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4042 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4043 if test "${ac_cv_header_time+set}" = set; then
4044   echo $ECHO_N "(cached) $ECHO_C" >&6
4045 else
4046   cat >conftest.$ac_ext <<_ACEOF
4047 /* confdefs.h.  */
4048 _ACEOF
4049 cat confdefs.h >>conftest.$ac_ext
4050 cat >>conftest.$ac_ext <<_ACEOF
4051 /* end confdefs.h.  */
4052 #include <sys/types.h>
4053 #include <sys/time.h>
4054 #include <time.h>
4055
4056 int
4057 main ()
4058 {
4059 if ((struct tm *) 0)
4060 return 0;
4061   ;
4062   return 0;
4063 }
4064 _ACEOF
4065 rm -f conftest.$ac_objext
4066 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4067   (eval $ac_compile) 2>conftest.er1
4068   ac_status=$?
4069   grep -v '^ *+' conftest.er1 >conftest.err
4070   rm -f conftest.er1
4071   cat conftest.err >&5
4072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4073   (exit $ac_status); } &&
4074          { ac_try='test -z "$ac_c_werror_flag"
4075                          || test ! -s conftest.err'
4076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4077   (eval $ac_try) 2>&5
4078   ac_status=$?
4079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4080   (exit $ac_status); }; } &&
4081          { ac_try='test -s conftest.$ac_objext'
4082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4083   (eval $ac_try) 2>&5
4084   ac_status=$?
4085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4086   (exit $ac_status); }; }; then
4087   ac_cv_header_time=yes
4088 else
4089   echo "$as_me: failed program was:" >&5
4090 sed 's/^/| /' conftest.$ac_ext >&5
4091
4092 ac_cv_header_time=no
4093 fi
4094 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4095 fi
4096 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
4097 echo "${ECHO_T}$ac_cv_header_time" >&6
4098 if test $ac_cv_header_time = yes; then
4099
4100 cat >>confdefs.h <<\_ACEOF
4101 #define TIME_WITH_SYS_TIME 1
4102 _ACEOF
4103
4104 fi
4105
4106 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
4107 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4108 if test "${ac_cv_header_sys_wait_h+set}" = set; then
4109   echo $ECHO_N "(cached) $ECHO_C" >&6
4110 else
4111   cat >conftest.$ac_ext <<_ACEOF
4112 /* confdefs.h.  */
4113 _ACEOF
4114 cat confdefs.h >>conftest.$ac_ext
4115 cat >>conftest.$ac_ext <<_ACEOF
4116 /* end confdefs.h.  */
4117 #include <sys/types.h>
4118 #include <sys/wait.h>
4119 #ifndef WEXITSTATUS
4120 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4121 #endif
4122 #ifndef WIFEXITED
4123 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4124 #endif
4125
4126 int
4127 main ()
4128 {
4129   int s;
4130   wait (&s);
4131   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4132   ;
4133   return 0;
4134 }
4135 _ACEOF
4136 rm -f conftest.$ac_objext
4137 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4138   (eval $ac_compile) 2>conftest.er1
4139   ac_status=$?
4140   grep -v '^ *+' conftest.er1 >conftest.err
4141   rm -f conftest.er1
4142   cat conftest.err >&5
4143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4144   (exit $ac_status); } &&
4145          { ac_try='test -z "$ac_c_werror_flag"
4146                          || test ! -s conftest.err'
4147   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4148   (eval $ac_try) 2>&5
4149   ac_status=$?
4150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4151   (exit $ac_status); }; } &&
4152          { ac_try='test -s conftest.$ac_objext'
4153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4154   (eval $ac_try) 2>&5
4155   ac_status=$?
4156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4157   (exit $ac_status); }; }; then
4158   ac_cv_header_sys_wait_h=yes
4159 else
4160   echo "$as_me: failed program was:" >&5
4161 sed 's/^/| /' conftest.$ac_ext >&5
4162
4163 ac_cv_header_sys_wait_h=no
4164 fi
4165 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4166 fi
4167 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
4168 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
4169 if test $ac_cv_header_sys_wait_h = yes; then
4170
4171 cat >>confdefs.h <<\_ACEOF
4172 #define HAVE_SYS_WAIT_H 1
4173 _ACEOF
4174
4175 fi
4176
4177
4178
4179
4180
4181
4182 ac_header_dirent=no
4183 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4184   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4185 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4186 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4187 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4188   echo $ECHO_N "(cached) $ECHO_C" >&6
4189 else
4190   cat >conftest.$ac_ext <<_ACEOF
4191 /* confdefs.h.  */
4192 _ACEOF
4193 cat confdefs.h >>conftest.$ac_ext
4194 cat >>conftest.$ac_ext <<_ACEOF
4195 /* end confdefs.h.  */
4196 #include <sys/types.h>
4197 #include <$ac_hdr>
4198
4199 int
4200 main ()
4201 {
4202 if ((DIR *) 0)
4203 return 0;
4204   ;
4205   return 0;
4206 }
4207 _ACEOF
4208 rm -f conftest.$ac_objext
4209 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4210   (eval $ac_compile) 2>conftest.er1
4211   ac_status=$?
4212   grep -v '^ *+' conftest.er1 >conftest.err
4213   rm -f conftest.er1
4214   cat conftest.err >&5
4215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4216   (exit $ac_status); } &&
4217          { ac_try='test -z "$ac_c_werror_flag"
4218                          || test ! -s conftest.err'
4219   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4220   (eval $ac_try) 2>&5
4221   ac_status=$?
4222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4223   (exit $ac_status); }; } &&
4224          { ac_try='test -s conftest.$ac_objext'
4225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4226   (eval $ac_try) 2>&5
4227   ac_status=$?
4228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4229   (exit $ac_status); }; }; then
4230   eval "$as_ac_Header=yes"
4231 else
4232   echo "$as_me: failed program was:" >&5
4233 sed 's/^/| /' conftest.$ac_ext >&5
4234
4235 eval "$as_ac_Header=no"
4236 fi
4237 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4238 fi
4239 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4240 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4241 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4242   cat >>confdefs.h <<_ACEOF
4243 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4244 _ACEOF
4245
4246 ac_header_dirent=$ac_hdr; break
4247 fi
4248
4249 done
4250 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4251 if test $ac_header_dirent = dirent.h; then
4252   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4253 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4254 if test "${ac_cv_search_opendir+set}" = set; then
4255   echo $ECHO_N "(cached) $ECHO_C" >&6
4256 else
4257   ac_func_search_save_LIBS=$LIBS
4258 ac_cv_search_opendir=no
4259 cat >conftest.$ac_ext <<_ACEOF
4260 /* confdefs.h.  */
4261 _ACEOF
4262 cat confdefs.h >>conftest.$ac_ext
4263 cat >>conftest.$ac_ext <<_ACEOF
4264 /* end confdefs.h.  */
4265
4266 /* Override any gcc2 internal prototype to avoid an error.  */
4267 #ifdef __cplusplus
4268 extern "C"
4269 #endif
4270 /* We use char because int might match the return type of a gcc2
4271    builtin and then its argument prototype would still apply.  */
4272 char opendir ();
4273 int
4274 main ()
4275 {
4276 opendir ();
4277   ;
4278   return 0;
4279 }
4280 _ACEOF
4281 rm -f conftest.$ac_objext conftest$ac_exeext
4282 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4283   (eval $ac_link) 2>conftest.er1
4284   ac_status=$?
4285   grep -v '^ *+' conftest.er1 >conftest.err
4286   rm -f conftest.er1
4287   cat conftest.err >&5
4288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4289   (exit $ac_status); } &&
4290          { ac_try='test -z "$ac_c_werror_flag"
4291                          || test ! -s conftest.err'
4292   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4293   (eval $ac_try) 2>&5
4294   ac_status=$?
4295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4296   (exit $ac_status); }; } &&
4297          { ac_try='test -s conftest$ac_exeext'
4298   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4299   (eval $ac_try) 2>&5
4300   ac_status=$?
4301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4302   (exit $ac_status); }; }; then
4303   ac_cv_search_opendir="none required"
4304 else
4305   echo "$as_me: failed program was:" >&5
4306 sed 's/^/| /' conftest.$ac_ext >&5
4307
4308 fi
4309 rm -f conftest.err conftest.$ac_objext \
4310       conftest$ac_exeext conftest.$ac_ext
4311 if test "$ac_cv_search_opendir" = no; then
4312   for ac_lib in dir; do
4313     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4314     cat >conftest.$ac_ext <<_ACEOF
4315 /* confdefs.h.  */
4316 _ACEOF
4317 cat confdefs.h >>conftest.$ac_ext
4318 cat >>conftest.$ac_ext <<_ACEOF
4319 /* end confdefs.h.  */
4320
4321 /* Override any gcc2 internal prototype to avoid an error.  */
4322 #ifdef __cplusplus
4323 extern "C"
4324 #endif
4325 /* We use char because int might match the return type of a gcc2
4326    builtin and then its argument prototype would still apply.  */
4327 char opendir ();
4328 int
4329 main ()
4330 {
4331 opendir ();
4332   ;
4333   return 0;
4334 }
4335 _ACEOF
4336 rm -f conftest.$ac_objext conftest$ac_exeext
4337 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4338   (eval $ac_link) 2>conftest.er1
4339   ac_status=$?
4340   grep -v '^ *+' conftest.er1 >conftest.err
4341   rm -f conftest.er1
4342   cat conftest.err >&5
4343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4344   (exit $ac_status); } &&
4345          { ac_try='test -z "$ac_c_werror_flag"
4346                          || test ! -s conftest.err'
4347   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4348   (eval $ac_try) 2>&5
4349   ac_status=$?
4350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4351   (exit $ac_status); }; } &&
4352          { ac_try='test -s conftest$ac_exeext'
4353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4354   (eval $ac_try) 2>&5
4355   ac_status=$?
4356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4357   (exit $ac_status); }; }; then
4358   ac_cv_search_opendir="-l$ac_lib"
4359 break
4360 else
4361   echo "$as_me: failed program was:" >&5
4362 sed 's/^/| /' conftest.$ac_ext >&5
4363
4364 fi
4365 rm -f conftest.err conftest.$ac_objext \
4366       conftest$ac_exeext conftest.$ac_ext
4367   done
4368 fi
4369 LIBS=$ac_func_search_save_LIBS
4370 fi
4371 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4372 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4373 if test "$ac_cv_search_opendir" != no; then
4374   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4375
4376 fi
4377
4378 else
4379   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4380 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4381 if test "${ac_cv_search_opendir+set}" = set; then
4382   echo $ECHO_N "(cached) $ECHO_C" >&6
4383 else
4384   ac_func_search_save_LIBS=$LIBS
4385 ac_cv_search_opendir=no
4386 cat >conftest.$ac_ext <<_ACEOF
4387 /* confdefs.h.  */
4388 _ACEOF
4389 cat confdefs.h >>conftest.$ac_ext
4390 cat >>conftest.$ac_ext <<_ACEOF
4391 /* end confdefs.h.  */
4392
4393 /* Override any gcc2 internal prototype to avoid an error.  */
4394 #ifdef __cplusplus
4395 extern "C"
4396 #endif
4397 /* We use char because int might match the return type of a gcc2
4398    builtin and then its argument prototype would still apply.  */
4399 char opendir ();
4400 int
4401 main ()
4402 {
4403 opendir ();
4404   ;
4405   return 0;
4406 }
4407 _ACEOF
4408 rm -f conftest.$ac_objext conftest$ac_exeext
4409 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4410   (eval $ac_link) 2>conftest.er1
4411   ac_status=$?
4412   grep -v '^ *+' conftest.er1 >conftest.err
4413   rm -f conftest.er1
4414   cat conftest.err >&5
4415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4416   (exit $ac_status); } &&
4417          { ac_try='test -z "$ac_c_werror_flag"
4418                          || test ! -s conftest.err'
4419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4420   (eval $ac_try) 2>&5
4421   ac_status=$?
4422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4423   (exit $ac_status); }; } &&
4424          { ac_try='test -s conftest$ac_exeext'
4425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4426   (eval $ac_try) 2>&5
4427   ac_status=$?
4428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4429   (exit $ac_status); }; }; then
4430   ac_cv_search_opendir="none required"
4431 else
4432   echo "$as_me: failed program was:" >&5
4433 sed 's/^/| /' conftest.$ac_ext >&5
4434
4435 fi
4436 rm -f conftest.err conftest.$ac_objext \
4437       conftest$ac_exeext conftest.$ac_ext
4438 if test "$ac_cv_search_opendir" = no; then
4439   for ac_lib in x; do
4440     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4441     cat >conftest.$ac_ext <<_ACEOF
4442 /* confdefs.h.  */
4443 _ACEOF
4444 cat confdefs.h >>conftest.$ac_ext
4445 cat >>conftest.$ac_ext <<_ACEOF
4446 /* end confdefs.h.  */
4447
4448 /* Override any gcc2 internal prototype to avoid an error.  */
4449 #ifdef __cplusplus
4450 extern "C"
4451 #endif
4452 /* We use char because int might match the return type of a gcc2
4453    builtin and then its argument prototype would still apply.  */
4454 char opendir ();
4455 int
4456 main ()
4457 {
4458 opendir ();
4459   ;
4460   return 0;
4461 }
4462 _ACEOF
4463 rm -f conftest.$ac_objext conftest$ac_exeext
4464 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4465   (eval $ac_link) 2>conftest.er1
4466   ac_status=$?
4467   grep -v '^ *+' conftest.er1 >conftest.err
4468   rm -f conftest.er1
4469   cat conftest.err >&5
4470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4471   (exit $ac_status); } &&
4472          { ac_try='test -z "$ac_c_werror_flag"
4473                          || test ! -s conftest.err'
4474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4475   (eval $ac_try) 2>&5
4476   ac_status=$?
4477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4478   (exit $ac_status); }; } &&
4479          { ac_try='test -s conftest$ac_exeext'
4480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4481   (eval $ac_try) 2>&5
4482   ac_status=$?
4483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484   (exit $ac_status); }; }; then
4485   ac_cv_search_opendir="-l$ac_lib"
4486 break
4487 else
4488   echo "$as_me: failed program was:" >&5
4489 sed 's/^/| /' conftest.$ac_ext >&5
4490
4491 fi
4492 rm -f conftest.err conftest.$ac_objext \
4493       conftest$ac_exeext conftest.$ac_ext
4494   done
4495 fi
4496 LIBS=$ac_func_search_save_LIBS
4497 fi
4498 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4499 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4500 if test "$ac_cv_search_opendir" != no; then
4501   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4502
4503 fi
4504
4505 fi
4506
4507 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4508 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4509   if test "${ac_cv_gettimeofday_args+set}" = set; then
4510   echo $ECHO_N "(cached) $ECHO_C" >&6
4511 else
4512   cat >conftest.$ac_ext <<_ACEOF
4513 /* confdefs.h.  */
4514 _ACEOF
4515 cat confdefs.h >>conftest.$ac_ext
4516 cat >>conftest.$ac_ext <<_ACEOF
4517 /* end confdefs.h.  */
4518 #include <stdlib.h>
4519                     #include <sys/time.h>
4520 int
4521 main ()
4522 {
4523 struct timeval tv; struct timezone tzp;
4524                     gettimeofday(&tv, &tzp);
4525   ;
4526   return 0;
4527 }
4528 _ACEOF
4529 rm -f conftest.$ac_objext
4530 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4531   (eval $ac_compile) 2>conftest.er1
4532   ac_status=$?
4533   grep -v '^ *+' conftest.er1 >conftest.err
4534   rm -f conftest.er1
4535   cat conftest.err >&5
4536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4537   (exit $ac_status); } &&
4538          { ac_try='test -z "$ac_c_werror_flag"
4539                          || test ! -s conftest.err'
4540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4541   (eval $ac_try) 2>&5
4542   ac_status=$?
4543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4544   (exit $ac_status); }; } &&
4545          { ac_try='test -s conftest.$ac_objext'
4546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4547   (eval $ac_try) 2>&5
4548   ac_status=$?
4549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4550   (exit $ac_status); }; }; then
4551   ac_gettimeofday_args=2
4552 else
4553   echo "$as_me: failed program was:" >&5
4554 sed 's/^/| /' conftest.$ac_ext >&5
4555
4556 cat >conftest.$ac_ext <<_ACEOF
4557 /* confdefs.h.  */
4558 _ACEOF
4559 cat confdefs.h >>conftest.$ac_ext
4560 cat >>conftest.$ac_ext <<_ACEOF
4561 /* end confdefs.h.  */
4562 #include <stdlib.h>
4563                                     #include <sys/time.h>
4564 int
4565 main ()
4566 {
4567 struct timeval tv; gettimeofday(&tv);
4568   ;
4569   return 0;
4570 }
4571 _ACEOF
4572 rm -f conftest.$ac_objext
4573 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4574   (eval $ac_compile) 2>conftest.er1
4575   ac_status=$?
4576   grep -v '^ *+' conftest.er1 >conftest.err
4577   rm -f conftest.er1
4578   cat conftest.err >&5
4579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4580   (exit $ac_status); } &&
4581          { ac_try='test -z "$ac_c_werror_flag"
4582                          || test ! -s conftest.err'
4583   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4584   (eval $ac_try) 2>&5
4585   ac_status=$?
4586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4587   (exit $ac_status); }; } &&
4588          { ac_try='test -s conftest.$ac_objext'
4589   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4590   (eval $ac_try) 2>&5
4591   ac_status=$?
4592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4593   (exit $ac_status); }; }; then
4594   ac_gettimeofday_args=1
4595 else
4596   echo "$as_me: failed program was:" >&5
4597 sed 's/^/| /' conftest.$ac_ext >&5
4598
4599 ac_gettimeofday_args=0
4600 fi
4601 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4602 fi
4603 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4604     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4605 fi
4606
4607   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4608   if test "$ac_gettimeofday_args" = 1 ; then
4609     cat >>confdefs.h <<\_ACEOF
4610 #define HAVE_GETTIMEOFDAY 1
4611 _ACEOF
4612
4613     echo "$as_me:$LINENO: result: one argument" >&5
4614 echo "${ECHO_T}one argument" >&6
4615   elif test "$ac_gettimeofday_args" = 2 ; then
4616     cat >>confdefs.h <<\_ACEOF
4617 #define HAVE_GETTIMEOFDAY 1
4618 _ACEOF
4619
4620     cat >>confdefs.h <<\_ACEOF
4621 #define GETTIMEOFDAY_TWO_ARGS 1
4622 _ACEOF
4623
4624     echo "$as_me:$LINENO: result: two arguments" >&5
4625 echo "${ECHO_T}two arguments" >&6
4626   else
4627     echo "$as_me:$LINENO: result: unknown" >&5
4628 echo "${ECHO_T}unknown" >&6
4629   fi
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4641 do
4642 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4643 echo "$as_me:$LINENO: checking for $ac_func" >&5
4644 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4645 if eval "test \"\${$as_ac_var+set}\" = set"; then
4646   echo $ECHO_N "(cached) $ECHO_C" >&6
4647 else
4648   cat >conftest.$ac_ext <<_ACEOF
4649 /* confdefs.h.  */
4650 _ACEOF
4651 cat confdefs.h >>conftest.$ac_ext
4652 cat >>conftest.$ac_ext <<_ACEOF
4653 /* end confdefs.h.  */
4654 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4655    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4656 #define $ac_func innocuous_$ac_func
4657
4658 /* System header to define __stub macros and hopefully few prototypes,
4659     which can conflict with char $ac_func (); below.
4660     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4661     <limits.h> exists even on freestanding compilers.  */
4662
4663 #ifdef __STDC__
4664 # include <limits.h>
4665 #else
4666 # include <assert.h>
4667 #endif
4668
4669 #undef $ac_func
4670
4671 /* Override any gcc2 internal prototype to avoid an error.  */
4672 #ifdef __cplusplus
4673 extern "C"
4674 {
4675 #endif
4676 /* We use char because int might match the return type of a gcc2
4677    builtin and then its argument prototype would still apply.  */
4678 char $ac_func ();
4679 /* The GNU C library defines this for functions which it implements
4680     to always fail with ENOSYS.  Some functions are actually named
4681     something starting with __ and the normal name is an alias.  */
4682 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4683 choke me
4684 #else
4685 char (*f) () = $ac_func;
4686 #endif
4687 #ifdef __cplusplus
4688 }
4689 #endif
4690
4691 int
4692 main ()
4693 {
4694 return f != $ac_func;
4695   ;
4696   return 0;
4697 }
4698 _ACEOF
4699 rm -f conftest.$ac_objext conftest$ac_exeext
4700 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4701   (eval $ac_link) 2>conftest.er1
4702   ac_status=$?
4703   grep -v '^ *+' conftest.er1 >conftest.err
4704   rm -f conftest.er1
4705   cat conftest.err >&5
4706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4707   (exit $ac_status); } &&
4708          { ac_try='test -z "$ac_c_werror_flag"
4709                          || test ! -s conftest.err'
4710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4711   (eval $ac_try) 2>&5
4712   ac_status=$?
4713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4714   (exit $ac_status); }; } &&
4715          { ac_try='test -s conftest$ac_exeext'
4716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4717   (eval $ac_try) 2>&5
4718   ac_status=$?
4719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4720   (exit $ac_status); }; }; then
4721   eval "$as_ac_var=yes"
4722 else
4723   echo "$as_me: failed program was:" >&5
4724 sed 's/^/| /' conftest.$ac_ext >&5
4725
4726 eval "$as_ac_var=no"
4727 fi
4728 rm -f conftest.err conftest.$ac_objext \
4729       conftest$ac_exeext conftest.$ac_ext
4730 fi
4731 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4732 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4733 if test `eval echo '${'$as_ac_var'}'` = yes; then
4734   cat >>confdefs.h <<_ACEOF
4735 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4736 _ACEOF
4737
4738 fi
4739 done
4740
4741
4742
4743
4744
4745 for ac_func in sigaction syslog realpath setrlimit
4746 do
4747 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4748 echo "$as_me:$LINENO: checking for $ac_func" >&5
4749 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4750 if eval "test \"\${$as_ac_var+set}\" = set"; then
4751   echo $ECHO_N "(cached) $ECHO_C" >&6
4752 else
4753   cat >conftest.$ac_ext <<_ACEOF
4754 /* confdefs.h.  */
4755 _ACEOF
4756 cat confdefs.h >>conftest.$ac_ext
4757 cat >>conftest.$ac_ext <<_ACEOF
4758 /* end confdefs.h.  */
4759 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4760    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4761 #define $ac_func innocuous_$ac_func
4762
4763 /* System header to define __stub macros and hopefully few prototypes,
4764     which can conflict with char $ac_func (); below.
4765     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4766     <limits.h> exists even on freestanding compilers.  */
4767
4768 #ifdef __STDC__
4769 # include <limits.h>
4770 #else
4771 # include <assert.h>
4772 #endif
4773
4774 #undef $ac_func
4775
4776 /* Override any gcc2 internal prototype to avoid an error.  */
4777 #ifdef __cplusplus
4778 extern "C"
4779 {
4780 #endif
4781 /* We use char because int might match the return type of a gcc2
4782    builtin and then its argument prototype would still apply.  */
4783 char $ac_func ();
4784 /* The GNU C library defines this for functions which it implements
4785     to always fail with ENOSYS.  Some functions are actually named
4786     something starting with __ and the normal name is an alias.  */
4787 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4788 choke me
4789 #else
4790 char (*f) () = $ac_func;
4791 #endif
4792 #ifdef __cplusplus
4793 }
4794 #endif
4795
4796 int
4797 main ()
4798 {
4799 return f != $ac_func;
4800   ;
4801   return 0;
4802 }
4803 _ACEOF
4804 rm -f conftest.$ac_objext conftest$ac_exeext
4805 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4806   (eval $ac_link) 2>conftest.er1
4807   ac_status=$?
4808   grep -v '^ *+' conftest.er1 >conftest.err
4809   rm -f conftest.er1
4810   cat conftest.err >&5
4811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4812   (exit $ac_status); } &&
4813          { ac_try='test -z "$ac_c_werror_flag"
4814                          || test ! -s conftest.err'
4815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4816   (eval $ac_try) 2>&5
4817   ac_status=$?
4818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4819   (exit $ac_status); }; } &&
4820          { ac_try='test -s conftest$ac_exeext'
4821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4822   (eval $ac_try) 2>&5
4823   ac_status=$?
4824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4825   (exit $ac_status); }; }; then
4826   eval "$as_ac_var=yes"
4827 else
4828   echo "$as_me: failed program was:" >&5
4829 sed 's/^/| /' conftest.$ac_ext >&5
4830
4831 eval "$as_ac_var=no"
4832 fi
4833 rm -f conftest.err conftest.$ac_objext \
4834       conftest$ac_exeext conftest.$ac_ext
4835 fi
4836 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4837 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4838 if test `eval echo '${'$as_ac_var'}'` = yes; then
4839   cat >>confdefs.h <<_ACEOF
4840 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4841 _ACEOF
4842
4843 fi
4844 done
4845
4846 echo "$as_me:$LINENO: checking for struct icmp" >&5
4847 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
4848 if test "${ac_cv_have_icmp+set}" = set; then
4849   echo $ECHO_N "(cached) $ECHO_C" >&6
4850 else
4851   cat >conftest.$ac_ext <<_ACEOF
4852 /* confdefs.h.  */
4853 _ACEOF
4854 cat confdefs.h >>conftest.$ac_ext
4855 cat >>conftest.$ac_ext <<_ACEOF
4856 /* end confdefs.h.  */
4857 #include <stdlib.h>
4858                    #include <stdio.h>
4859                    #include <math.h>
4860                    #include <unistd.h>
4861                    #include <limits.h>
4862                    #include <signal.h>
4863                    #include <fcntl.h>
4864                    #include <sys/types.h>
4865                    #include <sys/time.h>
4866                    #include <sys/ipc.h>
4867                    #include <sys/shm.h>
4868                    #include <sys/socket.h>
4869                    #include <netinet/in_systm.h>
4870                    #include <netinet/in.h>
4871                    #include <netinet/ip.h>
4872                    #include <netinet/ip_icmp.h>
4873                    #include <netinet/udp.h>
4874                    #include <arpa/inet.h>
4875                    #include <netdb.h>
4876 int
4877 main ()
4878 {
4879 struct icmp i;
4880                    struct sockaddr s;
4881                    struct sockaddr_in si;
4882                    struct ip ip;
4883                    i.icmp_type = ICMP_ECHO;
4884                    i.icmp_code = 0;
4885                    i.icmp_cksum = 0;
4886                    i.icmp_id = 0;
4887                    i.icmp_seq = 0;
4888                    si.sin_family = AF_INET;
4889                    #if defined(__DECC) || defined(_IP_VHL)
4890                    ip.ip_vhl = 0;
4891                    #else
4892                    ip.ip_hl = 0;
4893                    #endif
4894
4895   ;
4896   return 0;
4897 }
4898 _ACEOF
4899 rm -f conftest.$ac_objext
4900 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4901   (eval $ac_compile) 2>conftest.er1
4902   ac_status=$?
4903   grep -v '^ *+' conftest.er1 >conftest.err
4904   rm -f conftest.er1
4905   cat conftest.err >&5
4906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4907   (exit $ac_status); } &&
4908          { ac_try='test -z "$ac_c_werror_flag"
4909                          || test ! -s conftest.err'
4910   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4911   (eval $ac_try) 2>&5
4912   ac_status=$?
4913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4914   (exit $ac_status); }; } &&
4915          { ac_try='test -s conftest.$ac_objext'
4916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4917   (eval $ac_try) 2>&5
4918   ac_status=$?
4919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4920   (exit $ac_status); }; }; then
4921   ac_cv_have_icmp=yes
4922 else
4923   echo "$as_me: failed program was:" >&5
4924 sed 's/^/| /' conftest.$ac_ext >&5
4925
4926 ac_cv_have_icmp=no
4927 fi
4928 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4929 fi
4930 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
4931 echo "${ECHO_T}$ac_cv_have_icmp" >&6
4932  if test "$ac_cv_have_icmp" = yes ; then
4933    cat >>confdefs.h <<\_ACEOF
4934 #define HAVE_ICMP 1
4935 _ACEOF
4936
4937  fi
4938 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
4939 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
4940 if test "${ac_cv_have_icmphdr+set}" = set; then
4941   echo $ECHO_N "(cached) $ECHO_C" >&6
4942 else
4943   cat >conftest.$ac_ext <<_ACEOF
4944 /* confdefs.h.  */
4945 _ACEOF
4946 cat confdefs.h >>conftest.$ac_ext
4947 cat >>conftest.$ac_ext <<_ACEOF
4948 /* end confdefs.h.  */
4949 #include <stdlib.h>
4950                    #include <stdio.h>
4951                    #include <math.h>
4952                    #include <unistd.h>
4953                    #include <limits.h>
4954                    #include <signal.h>
4955                    #include <fcntl.h>
4956                    #include <sys/types.h>
4957                    #include <sys/time.h>
4958                    #include <sys/ipc.h>
4959                    #include <sys/shm.h>
4960                    #include <sys/socket.h>
4961                    #include <netinet/in_systm.h>
4962                    #include <netinet/in.h>
4963                    #include <netinet/ip.h>
4964                    #include <netinet/ip_icmp.h>
4965                    #include <netinet/udp.h>
4966                    #include <arpa/inet.h>
4967                    #include <netdb.h>
4968 int
4969 main ()
4970 {
4971 struct icmphdr i;
4972                    struct sockaddr s;
4973                    struct sockaddr_in si;
4974                    struct ip ip;
4975                    i.type = ICMP_ECHO;
4976                    i.code = 0;
4977                    i.checksum = 0;
4978                    i.un.echo.id = 0;
4979                    i.un.echo.sequence = 0;
4980                    si.sin_family = AF_INET;
4981                    ip.ip_hl = 0;
4982   ;
4983   return 0;
4984 }
4985 _ACEOF
4986 rm -f conftest.$ac_objext
4987 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4988   (eval $ac_compile) 2>conftest.er1
4989   ac_status=$?
4990   grep -v '^ *+' conftest.er1 >conftest.err
4991   rm -f conftest.er1
4992   cat conftest.err >&5
4993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4994   (exit $ac_status); } &&
4995          { ac_try='test -z "$ac_c_werror_flag"
4996                          || test ! -s conftest.err'
4997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4998   (eval $ac_try) 2>&5
4999   ac_status=$?
5000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5001   (exit $ac_status); }; } &&
5002          { ac_try='test -s conftest.$ac_objext'
5003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5004   (eval $ac_try) 2>&5
5005   ac_status=$?
5006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5007   (exit $ac_status); }; }; then
5008   ac_cv_have_icmphdr=yes
5009 else
5010   echo "$as_me: failed program was:" >&5
5011 sed 's/^/| /' conftest.$ac_ext >&5
5012
5013 ac_cv_have_icmphdr=no
5014 fi
5015 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5016 fi
5017 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
5018 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
5019  if test "$ac_cv_have_icmphdr" = yes ; then
5020    cat >>confdefs.h <<\_ACEOF
5021 #define HAVE_ICMPHDR 1
5022 _ACEOF
5023
5024  fi
5025
5026
5027 for ac_header in crypt.h sys/select.h
5028 do
5029 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5030 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5031   echo "$as_me:$LINENO: checking for $ac_header" >&5
5032 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5033 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5034   echo $ECHO_N "(cached) $ECHO_C" >&6
5035 fi
5036 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5037 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5038 else
5039   # Is the header compilable?
5040 echo "$as_me:$LINENO: checking $ac_header usability" >&5
5041 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5042 cat >conftest.$ac_ext <<_ACEOF
5043 /* confdefs.h.  */
5044 _ACEOF
5045 cat confdefs.h >>conftest.$ac_ext
5046 cat >>conftest.$ac_ext <<_ACEOF
5047 /* end confdefs.h.  */
5048 $ac_includes_default
5049 #include <$ac_header>
5050 _ACEOF
5051 rm -f conftest.$ac_objext
5052 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5053   (eval $ac_compile) 2>conftest.er1
5054   ac_status=$?
5055   grep -v '^ *+' conftest.er1 >conftest.err
5056   rm -f conftest.er1
5057   cat conftest.err >&5
5058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5059   (exit $ac_status); } &&
5060          { ac_try='test -z "$ac_c_werror_flag"
5061                          || test ! -s conftest.err'
5062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5063   (eval $ac_try) 2>&5
5064   ac_status=$?
5065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5066   (exit $ac_status); }; } &&
5067          { ac_try='test -s conftest.$ac_objext'
5068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5069   (eval $ac_try) 2>&5
5070   ac_status=$?
5071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5072   (exit $ac_status); }; }; then
5073   ac_header_compiler=yes
5074 else
5075   echo "$as_me: failed program was:" >&5
5076 sed 's/^/| /' conftest.$ac_ext >&5
5077
5078 ac_header_compiler=no
5079 fi
5080 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5081 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5082 echo "${ECHO_T}$ac_header_compiler" >&6
5083
5084 # Is the header present?
5085 echo "$as_me:$LINENO: checking $ac_header presence" >&5
5086 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5087 cat >conftest.$ac_ext <<_ACEOF
5088 /* confdefs.h.  */
5089 _ACEOF
5090 cat confdefs.h >>conftest.$ac_ext
5091 cat >>conftest.$ac_ext <<_ACEOF
5092 /* end confdefs.h.  */
5093 #include <$ac_header>
5094 _ACEOF
5095 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5096   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5097   ac_status=$?
5098   grep -v '^ *+' conftest.er1 >conftest.err
5099   rm -f conftest.er1
5100   cat conftest.err >&5
5101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5102   (exit $ac_status); } >/dev/null; then
5103   if test -s conftest.err; then
5104     ac_cpp_err=$ac_c_preproc_warn_flag
5105     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5106   else
5107     ac_cpp_err=
5108   fi
5109 else
5110   ac_cpp_err=yes
5111 fi
5112 if test -z "$ac_cpp_err"; then
5113   ac_header_preproc=yes
5114 else
5115   echo "$as_me: failed program was:" >&5
5116 sed 's/^/| /' conftest.$ac_ext >&5
5117
5118   ac_header_preproc=no
5119 fi
5120 rm -f conftest.err conftest.$ac_ext
5121 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5122 echo "${ECHO_T}$ac_header_preproc" >&6
5123
5124 # So?  What about this header?
5125 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5126   yes:no: )
5127     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5128 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5129     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5130 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5131     ac_header_preproc=yes
5132     ;;
5133   no:yes:* )
5134     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5135 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5136     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
5137 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
5138     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5139 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5140     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
5141 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
5142     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5143 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5144     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5145 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5146     (
5147       cat <<\_ASBOX
5148 ## ------------------------------------------ ##
5149 ## Report this to the AC_PACKAGE_NAME lists.  ##
5150 ## ------------------------------------------ ##
5151 _ASBOX
5152     ) |
5153       sed "s/^/$as_me: WARNING:     /" >&2
5154     ;;
5155 esac
5156 echo "$as_me:$LINENO: checking for $ac_header" >&5
5157 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5158 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5159   echo $ECHO_N "(cached) $ECHO_C" >&6
5160 else
5161   eval "$as_ac_Header=\$ac_header_preproc"
5162 fi
5163 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5164 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5165
5166 fi
5167 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5168   cat >>confdefs.h <<_ACEOF
5169 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5170 _ACEOF
5171
5172 fi
5173
5174 done
5175
5176 for ac_prog in perl5 perl
5177 do
5178   # Extract the first word of "$ac_prog", so it can be a program name with args.
5179 set dummy $ac_prog; ac_word=$2
5180 echo "$as_me:$LINENO: checking for $ac_word" >&5
5181 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5182 if test "${ac_cv_path_PERL+set}" = set; then
5183   echo $ECHO_N "(cached) $ECHO_C" >&6
5184 else
5185   case $PERL in
5186   [\\/]* | ?:[\\/]*)
5187   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5188   ;;
5189   *)
5190   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5191 for as_dir in $PATH
5192 do
5193   IFS=$as_save_IFS
5194   test -z "$as_dir" && as_dir=.
5195   for ac_exec_ext in '' $ac_executable_extensions; do
5196   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5197     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5198     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5199     break 2
5200   fi
5201 done
5202 done
5203
5204   ;;
5205 esac
5206 fi
5207 PERL=$ac_cv_path_PERL
5208
5209 if test -n "$PERL"; then
5210   echo "$as_me:$LINENO: result: $PERL" >&5
5211 echo "${ECHO_T}$PERL" >&6
5212 else
5213   echo "$as_me:$LINENO: result: no" >&5
5214 echo "${ECHO_T}no" >&6
5215 fi
5216
5217   test -n "$PERL" && break
5218 done
5219
5220   if test -z "$PERL" ; then
5221     PERL_VERSION=0
5222   else
5223     echo "$as_me:$LINENO: checking perl version" >&5
5224 echo $ECHO_N "checking perl version... $ECHO_C" >&6
5225 if test "${ac_cv_perl_version+set}" = set; then
5226   echo $ECHO_N "(cached) $ECHO_C" >&6
5227 else
5228   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
5229 fi
5230 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
5231 echo "${ECHO_T}$ac_cv_perl_version" >&6
5232     PERL_VERSION=$ac_cv_perl_version
5233   fi
5234
5235
5236 if test -z "$PERL" ; then
5237   # don't let it be blank...
5238   PERL=/usr/bin/perl
5239 fi
5240
5241 echo "$as_me:$LINENO: checking for X" >&5
5242 echo $ECHO_N "checking for X... $ECHO_C" >&6
5243
5244
5245 # Check whether --with-x or --without-x was given.
5246 if test "${with_x+set}" = set; then
5247   withval="$with_x"
5248
5249 fi;
5250 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5251 if test "x$with_x" = xno; then
5252   # The user explicitly disabled X.
5253   have_x=disabled
5254 else
5255   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5256     # Both variables are already set.
5257     have_x=yes
5258   else
5259     if test "${ac_cv_have_x+set}" = set; then
5260   echo $ECHO_N "(cached) $ECHO_C" >&6
5261 else
5262   # One or both of the vars are not set, and there is no cached value.
5263 ac_x_includes=no ac_x_libraries=no
5264 rm -fr conftest.dir
5265 if mkdir conftest.dir; then
5266   cd conftest.dir
5267   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5268   cat >Imakefile <<'_ACEOF'
5269 acfindx:
5270         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5271 _ACEOF
5272   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5273     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5274     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5275     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5276     for ac_extension in a so sl; do
5277       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5278          test -f $ac_im_libdir/libX11.$ac_extension; then
5279         ac_im_usrlibdir=$ac_im_libdir; break
5280       fi
5281     done
5282     # Screen out bogus values from the imake configuration.  They are
5283     # bogus both because they are the default anyway, and because
5284     # using them would break gcc on systems where it needs fixed includes.
5285     case $ac_im_incroot in
5286         /usr/include) ;;
5287         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
5288     esac
5289     case $ac_im_usrlibdir in
5290         /usr/lib | /lib) ;;
5291         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
5292     esac
5293   fi
5294   cd ..
5295   rm -fr conftest.dir
5296 fi
5297
5298 # Standard set of common directories for X headers.
5299 # Check X11 before X11Rn because it is often a symlink to the current release.
5300 ac_x_header_dirs='
5301 /usr/X11/include
5302 /usr/X11R6/include
5303 /usr/X11R5/include
5304 /usr/X11R4/include
5305
5306 /usr/include/X11
5307 /usr/include/X11R6
5308 /usr/include/X11R5
5309 /usr/include/X11R4
5310
5311 /usr/local/X11/include
5312 /usr/local/X11R6/include
5313 /usr/local/X11R5/include
5314 /usr/local/X11R4/include
5315
5316 /usr/local/include/X11
5317 /usr/local/include/X11R6
5318 /usr/local/include/X11R5
5319 /usr/local/include/X11R4
5320
5321 /usr/X386/include
5322 /usr/x386/include
5323 /usr/XFree86/include/X11
5324
5325 /usr/include
5326 /usr/local/include
5327 /usr/unsupported/include
5328 /usr/athena/include
5329 /usr/local/x11r5/include
5330 /usr/lpp/Xamples/include
5331
5332 /usr/openwin/include
5333 /usr/openwin/share/include'
5334
5335 if test "$ac_x_includes" = no; then
5336   # Guess where to find include files, by looking for Intrinsic.h.
5337   # First, try using that file with no special directory specified.
5338   cat >conftest.$ac_ext <<_ACEOF
5339 /* confdefs.h.  */
5340 _ACEOF
5341 cat confdefs.h >>conftest.$ac_ext
5342 cat >>conftest.$ac_ext <<_ACEOF
5343 /* end confdefs.h.  */
5344 #include <X11/Intrinsic.h>
5345 _ACEOF
5346 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5347   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5348   ac_status=$?
5349   grep -v '^ *+' conftest.er1 >conftest.err
5350   rm -f conftest.er1
5351   cat conftest.err >&5
5352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5353   (exit $ac_status); } >/dev/null; then
5354   if test -s conftest.err; then
5355     ac_cpp_err=$ac_c_preproc_warn_flag
5356     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5357   else
5358     ac_cpp_err=
5359   fi
5360 else
5361   ac_cpp_err=yes
5362 fi
5363 if test -z "$ac_cpp_err"; then
5364   # We can compile using X headers with no special include directory.
5365 ac_x_includes=
5366 else
5367   echo "$as_me: failed program was:" >&5
5368 sed 's/^/| /' conftest.$ac_ext >&5
5369
5370   for ac_dir in $ac_x_header_dirs; do
5371   if test -r "$ac_dir/X11/Intrinsic.h"; then
5372     ac_x_includes=$ac_dir
5373     break
5374   fi
5375 done
5376 fi
5377 rm -f conftest.err conftest.$ac_ext
5378 fi # $ac_x_includes = no
5379
5380 if test "$ac_x_libraries" = no; then
5381   # Check for the libraries.
5382   # See if we find them without any special options.
5383   # Don't add to $LIBS permanently.
5384   ac_save_LIBS=$LIBS
5385   LIBS="-lXt $LIBS"
5386   cat >conftest.$ac_ext <<_ACEOF
5387 /* confdefs.h.  */
5388 _ACEOF
5389 cat confdefs.h >>conftest.$ac_ext
5390 cat >>conftest.$ac_ext <<_ACEOF
5391 /* end confdefs.h.  */
5392 #include <X11/Intrinsic.h>
5393 int
5394 main ()
5395 {
5396 XtMalloc (0)
5397   ;
5398   return 0;
5399 }
5400 _ACEOF
5401 rm -f conftest.$ac_objext conftest$ac_exeext
5402 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5403   (eval $ac_link) 2>conftest.er1
5404   ac_status=$?
5405   grep -v '^ *+' conftest.er1 >conftest.err
5406   rm -f conftest.er1
5407   cat conftest.err >&5
5408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5409   (exit $ac_status); } &&
5410          { ac_try='test -z "$ac_c_werror_flag"
5411                          || test ! -s conftest.err'
5412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5413   (eval $ac_try) 2>&5
5414   ac_status=$?
5415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5416   (exit $ac_status); }; } &&
5417          { ac_try='test -s conftest$ac_exeext'
5418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5419   (eval $ac_try) 2>&5
5420   ac_status=$?
5421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5422   (exit $ac_status); }; }; then
5423   LIBS=$ac_save_LIBS
5424 # We can link X programs with no special library path.
5425 ac_x_libraries=
5426 else
5427   echo "$as_me: failed program was:" >&5
5428 sed 's/^/| /' conftest.$ac_ext >&5
5429
5430 LIBS=$ac_save_LIBS
5431 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5432 do
5433   # Don't even attempt the hair of trying to link an X program!
5434   for ac_extension in a so sl; do
5435     if test -r $ac_dir/libXt.$ac_extension; then
5436       ac_x_libraries=$ac_dir
5437       break 2
5438     fi
5439   done
5440 done
5441 fi
5442 rm -f conftest.err conftest.$ac_objext \
5443       conftest$ac_exeext conftest.$ac_ext
5444 fi # $ac_x_libraries = no
5445
5446 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
5447   # Didn't find X anywhere.  Cache the known absence of X.
5448   ac_cv_have_x="have_x=no"
5449 else
5450   # Record where we found X for the cache.
5451   ac_cv_have_x="have_x=yes \
5452                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5453 fi
5454 fi
5455
5456   fi
5457   eval "$ac_cv_have_x"
5458 fi # $with_x != no
5459
5460 if test "$have_x" != yes; then
5461   echo "$as_me:$LINENO: result: $have_x" >&5
5462 echo "${ECHO_T}$have_x" >&6
5463   no_x=yes
5464 else
5465   # If each of the values was on the command line, it overrides each guess.
5466   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5467   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5468   # Update the cache value to reflect the command line values.
5469   ac_cv_have_x="have_x=yes \
5470                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5471   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
5472 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5473 fi
5474
5475 if test "$no_x" = yes; then
5476   # Not all programs may use this symbol, but it does not hurt to define it.
5477
5478 cat >>confdefs.h <<\_ACEOF
5479 #define X_DISPLAY_MISSING 1
5480 _ACEOF
5481
5482   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5483 else
5484   if test -n "$x_includes"; then
5485     X_CFLAGS="$X_CFLAGS -I$x_includes"
5486   fi
5487
5488   # It would also be nice to do this for all -L options, not just this one.
5489   if test -n "$x_libraries"; then
5490     X_LIBS="$X_LIBS -L$x_libraries"
5491     # For Solaris; some versions of Sun CC require a space after -R and
5492     # others require no space.  Words are not sufficient . . . .
5493     case `(uname -sr) 2>/dev/null` in
5494     "SunOS 5"*)
5495       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
5496 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
5497       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
5498       cat >conftest.$ac_ext <<_ACEOF
5499 /* confdefs.h.  */
5500 _ACEOF
5501 cat confdefs.h >>conftest.$ac_ext
5502 cat >>conftest.$ac_ext <<_ACEOF
5503 /* end confdefs.h.  */
5504
5505 int
5506 main ()
5507 {
5508
5509   ;
5510   return 0;
5511 }
5512 _ACEOF
5513 rm -f conftest.$ac_objext conftest$ac_exeext
5514 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5515   (eval $ac_link) 2>conftest.er1
5516   ac_status=$?
5517   grep -v '^ *+' conftest.er1 >conftest.err
5518   rm -f conftest.er1
5519   cat conftest.err >&5
5520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5521   (exit $ac_status); } &&
5522          { ac_try='test -z "$ac_c_werror_flag"
5523                          || test ! -s conftest.err'
5524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5525   (eval $ac_try) 2>&5
5526   ac_status=$?
5527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5528   (exit $ac_status); }; } &&
5529          { ac_try='test -s conftest$ac_exeext'
5530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5531   (eval $ac_try) 2>&5
5532   ac_status=$?
5533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5534   (exit $ac_status); }; }; then
5535   ac_R_nospace=yes
5536 else
5537   echo "$as_me: failed program was:" >&5
5538 sed 's/^/| /' conftest.$ac_ext >&5
5539
5540 ac_R_nospace=no
5541 fi
5542 rm -f conftest.err conftest.$ac_objext \
5543       conftest$ac_exeext conftest.$ac_ext
5544       if test $ac_R_nospace = yes; then
5545         echo "$as_me:$LINENO: result: no" >&5
5546 echo "${ECHO_T}no" >&6
5547         X_LIBS="$X_LIBS -R$x_libraries"
5548       else
5549         LIBS="$ac_xsave_LIBS -R $x_libraries"
5550         cat >conftest.$ac_ext <<_ACEOF
5551 /* confdefs.h.  */
5552 _ACEOF
5553 cat confdefs.h >>conftest.$ac_ext
5554 cat >>conftest.$ac_ext <<_ACEOF
5555 /* end confdefs.h.  */
5556
5557 int
5558 main ()
5559 {
5560
5561   ;
5562   return 0;
5563 }
5564 _ACEOF
5565 rm -f conftest.$ac_objext conftest$ac_exeext
5566 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5567   (eval $ac_link) 2>conftest.er1
5568   ac_status=$?
5569   grep -v '^ *+' conftest.er1 >conftest.err
5570   rm -f conftest.er1
5571   cat conftest.err >&5
5572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5573   (exit $ac_status); } &&
5574          { ac_try='test -z "$ac_c_werror_flag"
5575                          || test ! -s conftest.err'
5576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5577   (eval $ac_try) 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_R_space=yes
5588 else
5589   echo "$as_me: failed program was:" >&5
5590 sed 's/^/| /' conftest.$ac_ext >&5
5591
5592 ac_R_space=no
5593 fi
5594 rm -f conftest.err conftest.$ac_objext \
5595       conftest$ac_exeext conftest.$ac_ext
5596         if test $ac_R_space = yes; then
5597           echo "$as_me:$LINENO: result: yes" >&5
5598 echo "${ECHO_T}yes" >&6
5599           X_LIBS="$X_LIBS -R $x_libraries"
5600         else
5601           echo "$as_me:$LINENO: result: neither works" >&5
5602 echo "${ECHO_T}neither works" >&6
5603         fi
5604       fi
5605       LIBS=$ac_xsave_LIBS
5606     esac
5607   fi
5608
5609   # Check for system-dependent libraries X programs must link with.
5610   # Do this before checking for the system-independent R6 libraries
5611   # (-lICE), since we may need -lsocket or whatever for X linking.
5612
5613   if test "$ISC" = yes; then
5614     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5615   else
5616     # Martyn Johnson says this is needed for Ultrix, if the X
5617     # libraries were built with DECnet support.  And Karl Berry says
5618     # the Alpha needs dnet_stub (dnet does not exist).
5619     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5620     cat >conftest.$ac_ext <<_ACEOF
5621 /* confdefs.h.  */
5622 _ACEOF
5623 cat confdefs.h >>conftest.$ac_ext
5624 cat >>conftest.$ac_ext <<_ACEOF
5625 /* end confdefs.h.  */
5626
5627 /* Override any gcc2 internal prototype to avoid an error.  */
5628 #ifdef __cplusplus
5629 extern "C"
5630 #endif
5631 /* We use char because int might match the return type of a gcc2
5632    builtin and then its argument prototype would still apply.  */
5633 char XOpenDisplay ();
5634 int
5635 main ()
5636 {
5637 XOpenDisplay ();
5638   ;
5639   return 0;
5640 }
5641 _ACEOF
5642 rm -f conftest.$ac_objext conftest$ac_exeext
5643 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5644   (eval $ac_link) 2>conftest.er1
5645   ac_status=$?
5646   grep -v '^ *+' conftest.er1 >conftest.err
5647   rm -f conftest.er1
5648   cat conftest.err >&5
5649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5650   (exit $ac_status); } &&
5651          { ac_try='test -z "$ac_c_werror_flag"
5652                          || test ! -s conftest.err'
5653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5654   (eval $ac_try) 2>&5
5655   ac_status=$?
5656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5657   (exit $ac_status); }; } &&
5658          { ac_try='test -s conftest$ac_exeext'
5659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5660   (eval $ac_try) 2>&5
5661   ac_status=$?
5662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5663   (exit $ac_status); }; }; then
5664   :
5665 else
5666   echo "$as_me: failed program was:" >&5
5667 sed 's/^/| /' conftest.$ac_ext >&5
5668
5669 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5670 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5671 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5672   echo $ECHO_N "(cached) $ECHO_C" >&6
5673 else
5674   ac_check_lib_save_LIBS=$LIBS
5675 LIBS="-ldnet  $LIBS"
5676 cat >conftest.$ac_ext <<_ACEOF
5677 /* confdefs.h.  */
5678 _ACEOF
5679 cat confdefs.h >>conftest.$ac_ext
5680 cat >>conftest.$ac_ext <<_ACEOF
5681 /* end confdefs.h.  */
5682
5683 /* Override any gcc2 internal prototype to avoid an error.  */
5684 #ifdef __cplusplus
5685 extern "C"
5686 #endif
5687 /* We use char because int might match the return type of a gcc2
5688    builtin and then its argument prototype would still apply.  */
5689 char dnet_ntoa ();
5690 int
5691 main ()
5692 {
5693 dnet_ntoa ();
5694   ;
5695   return 0;
5696 }
5697 _ACEOF
5698 rm -f conftest.$ac_objext conftest$ac_exeext
5699 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5700   (eval $ac_link) 2>conftest.er1
5701   ac_status=$?
5702   grep -v '^ *+' conftest.er1 >conftest.err
5703   rm -f conftest.er1
5704   cat conftest.err >&5
5705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5706   (exit $ac_status); } &&
5707          { ac_try='test -z "$ac_c_werror_flag"
5708                          || test ! -s conftest.err'
5709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5710   (eval $ac_try) 2>&5
5711   ac_status=$?
5712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5713   (exit $ac_status); }; } &&
5714          { ac_try='test -s conftest$ac_exeext'
5715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5716   (eval $ac_try) 2>&5
5717   ac_status=$?
5718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5719   (exit $ac_status); }; }; then
5720   ac_cv_lib_dnet_dnet_ntoa=yes
5721 else
5722   echo "$as_me: failed program was:" >&5
5723 sed 's/^/| /' conftest.$ac_ext >&5
5724
5725 ac_cv_lib_dnet_dnet_ntoa=no
5726 fi
5727 rm -f conftest.err conftest.$ac_objext \
5728       conftest$ac_exeext conftest.$ac_ext
5729 LIBS=$ac_check_lib_save_LIBS
5730 fi
5731 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5732 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5733 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5734   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5735 fi
5736
5737     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5738       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5739 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5740 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5741   echo $ECHO_N "(cached) $ECHO_C" >&6
5742 else
5743   ac_check_lib_save_LIBS=$LIBS
5744 LIBS="-ldnet_stub  $LIBS"
5745 cat >conftest.$ac_ext <<_ACEOF
5746 /* confdefs.h.  */
5747 _ACEOF
5748 cat confdefs.h >>conftest.$ac_ext
5749 cat >>conftest.$ac_ext <<_ACEOF
5750 /* end confdefs.h.  */
5751
5752 /* Override any gcc2 internal prototype to avoid an error.  */
5753 #ifdef __cplusplus
5754 extern "C"
5755 #endif
5756 /* We use char because int might match the return type of a gcc2
5757    builtin and then its argument prototype would still apply.  */
5758 char dnet_ntoa ();
5759 int
5760 main ()
5761 {
5762 dnet_ntoa ();
5763   ;
5764   return 0;
5765 }
5766 _ACEOF
5767 rm -f conftest.$ac_objext conftest$ac_exeext
5768 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5769   (eval $ac_link) 2>conftest.er1
5770   ac_status=$?
5771   grep -v '^ *+' conftest.er1 >conftest.err
5772   rm -f conftest.er1
5773   cat conftest.err >&5
5774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5775   (exit $ac_status); } &&
5776          { ac_try='test -z "$ac_c_werror_flag"
5777                          || test ! -s conftest.err'
5778   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5779   (eval $ac_try) 2>&5
5780   ac_status=$?
5781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5782   (exit $ac_status); }; } &&
5783          { ac_try='test -s conftest$ac_exeext'
5784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5785   (eval $ac_try) 2>&5
5786   ac_status=$?
5787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5788   (exit $ac_status); }; }; then
5789   ac_cv_lib_dnet_stub_dnet_ntoa=yes
5790 else
5791   echo "$as_me: failed program was:" >&5
5792 sed 's/^/| /' conftest.$ac_ext >&5
5793
5794 ac_cv_lib_dnet_stub_dnet_ntoa=no
5795 fi
5796 rm -f conftest.err conftest.$ac_objext \
5797       conftest$ac_exeext conftest.$ac_ext
5798 LIBS=$ac_check_lib_save_LIBS
5799 fi
5800 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5801 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5802 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5803   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5804 fi
5805
5806     fi
5807 fi
5808 rm -f conftest.err conftest.$ac_objext \
5809       conftest$ac_exeext conftest.$ac_ext
5810     LIBS="$ac_xsave_LIBS"
5811
5812     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5813     # to get the SysV transport functions.
5814     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5815     # needs -lnsl.
5816     # The nsl library prevents programs from opening the X display
5817     # on Irix 5.2, according to T.E. Dickey.
5818     # The functions gethostbyname, getservbyname, and inet_addr are
5819     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5820     echo "$as_me:$LINENO: checking for gethostbyname" >&5
5821 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5822 if test "${ac_cv_func_gethostbyname+set}" = set; then
5823   echo $ECHO_N "(cached) $ECHO_C" >&6
5824 else
5825   cat >conftest.$ac_ext <<_ACEOF
5826 /* confdefs.h.  */
5827 _ACEOF
5828 cat confdefs.h >>conftest.$ac_ext
5829 cat >>conftest.$ac_ext <<_ACEOF
5830 /* end confdefs.h.  */
5831 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5832    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5833 #define gethostbyname innocuous_gethostbyname
5834
5835 /* System header to define __stub macros and hopefully few prototypes,
5836     which can conflict with char gethostbyname (); below.
5837     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5838     <limits.h> exists even on freestanding compilers.  */
5839
5840 #ifdef __STDC__
5841 # include <limits.h>
5842 #else
5843 # include <assert.h>
5844 #endif
5845
5846 #undef gethostbyname
5847
5848 /* Override any gcc2 internal prototype to avoid an error.  */
5849 #ifdef __cplusplus
5850 extern "C"
5851 {
5852 #endif
5853 /* We use char because int might match the return type of a gcc2
5854    builtin and then its argument prototype would still apply.  */
5855 char gethostbyname ();
5856 /* The GNU C library defines this for functions which it implements
5857     to always fail with ENOSYS.  Some functions are actually named
5858     something starting with __ and the normal name is an alias.  */
5859 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5860 choke me
5861 #else
5862 char (*f) () = gethostbyname;
5863 #endif
5864 #ifdef __cplusplus
5865 }
5866 #endif
5867
5868 int
5869 main ()
5870 {
5871 return f != gethostbyname;
5872   ;
5873   return 0;
5874 }
5875 _ACEOF
5876 rm -f conftest.$ac_objext conftest$ac_exeext
5877 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5878   (eval $ac_link) 2>conftest.er1
5879   ac_status=$?
5880   grep -v '^ *+' conftest.er1 >conftest.err
5881   rm -f conftest.er1
5882   cat conftest.err >&5
5883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5884   (exit $ac_status); } &&
5885          { ac_try='test -z "$ac_c_werror_flag"
5886                          || test ! -s conftest.err'
5887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5888   (eval $ac_try) 2>&5
5889   ac_status=$?
5890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5891   (exit $ac_status); }; } &&
5892          { ac_try='test -s conftest$ac_exeext'
5893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5894   (eval $ac_try) 2>&5
5895   ac_status=$?
5896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5897   (exit $ac_status); }; }; then
5898   ac_cv_func_gethostbyname=yes
5899 else
5900   echo "$as_me: failed program was:" >&5
5901 sed 's/^/| /' conftest.$ac_ext >&5
5902
5903 ac_cv_func_gethostbyname=no
5904 fi
5905 rm -f conftest.err conftest.$ac_objext \
5906       conftest$ac_exeext conftest.$ac_ext
5907 fi
5908 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5909 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5910
5911     if test $ac_cv_func_gethostbyname = no; then
5912       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5913 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5914 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5915   echo $ECHO_N "(cached) $ECHO_C" >&6
5916 else
5917   ac_check_lib_save_LIBS=$LIBS
5918 LIBS="-lnsl  $LIBS"
5919 cat >conftest.$ac_ext <<_ACEOF
5920 /* confdefs.h.  */
5921 _ACEOF
5922 cat confdefs.h >>conftest.$ac_ext
5923 cat >>conftest.$ac_ext <<_ACEOF
5924 /* end confdefs.h.  */
5925
5926 /* Override any gcc2 internal prototype to avoid an error.  */
5927 #ifdef __cplusplus
5928 extern "C"
5929 #endif
5930 /* We use char because int might match the return type of a gcc2
5931    builtin and then its argument prototype would still apply.  */
5932 char gethostbyname ();
5933 int
5934 main ()
5935 {
5936 gethostbyname ();
5937   ;
5938   return 0;
5939 }
5940 _ACEOF
5941 rm -f conftest.$ac_objext conftest$ac_exeext
5942 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5943   (eval $ac_link) 2>conftest.er1
5944   ac_status=$?
5945   grep -v '^ *+' conftest.er1 >conftest.err
5946   rm -f conftest.er1
5947   cat conftest.err >&5
5948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5949   (exit $ac_status); } &&
5950          { ac_try='test -z "$ac_c_werror_flag"
5951                          || test ! -s conftest.err'
5952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5953   (eval $ac_try) 2>&5
5954   ac_status=$?
5955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5956   (exit $ac_status); }; } &&
5957          { ac_try='test -s conftest$ac_exeext'
5958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5959   (eval $ac_try) 2>&5
5960   ac_status=$?
5961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5962   (exit $ac_status); }; }; then
5963   ac_cv_lib_nsl_gethostbyname=yes
5964 else
5965   echo "$as_me: failed program was:" >&5
5966 sed 's/^/| /' conftest.$ac_ext >&5
5967
5968 ac_cv_lib_nsl_gethostbyname=no
5969 fi
5970 rm -f conftest.err conftest.$ac_objext \
5971       conftest$ac_exeext conftest.$ac_ext
5972 LIBS=$ac_check_lib_save_LIBS
5973 fi
5974 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5975 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5976 if test $ac_cv_lib_nsl_gethostbyname = yes; then
5977   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5978 fi
5979
5980       if test $ac_cv_lib_nsl_gethostbyname = no; then
5981         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5982 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5983 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5984   echo $ECHO_N "(cached) $ECHO_C" >&6
5985 else
5986   ac_check_lib_save_LIBS=$LIBS
5987 LIBS="-lbsd  $LIBS"
5988 cat >conftest.$ac_ext <<_ACEOF
5989 /* confdefs.h.  */
5990 _ACEOF
5991 cat confdefs.h >>conftest.$ac_ext
5992 cat >>conftest.$ac_ext <<_ACEOF
5993 /* end confdefs.h.  */
5994
5995 /* Override any gcc2 internal prototype to avoid an error.  */
5996 #ifdef __cplusplus
5997 extern "C"
5998 #endif
5999 /* We use char because int might match the return type of a gcc2
6000    builtin and then its argument prototype would still apply.  */
6001 char gethostbyname ();
6002 int
6003 main ()
6004 {
6005 gethostbyname ();
6006   ;
6007   return 0;
6008 }
6009 _ACEOF
6010 rm -f conftest.$ac_objext conftest$ac_exeext
6011 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6012   (eval $ac_link) 2>conftest.er1
6013   ac_status=$?
6014   grep -v '^ *+' conftest.er1 >conftest.err
6015   rm -f conftest.er1
6016   cat conftest.err >&5
6017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6018   (exit $ac_status); } &&
6019          { ac_try='test -z "$ac_c_werror_flag"
6020                          || test ! -s conftest.err'
6021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6022   (eval $ac_try) 2>&5
6023   ac_status=$?
6024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6025   (exit $ac_status); }; } &&
6026          { ac_try='test -s conftest$ac_exeext'
6027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6028   (eval $ac_try) 2>&5
6029   ac_status=$?
6030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6031   (exit $ac_status); }; }; then
6032   ac_cv_lib_bsd_gethostbyname=yes
6033 else
6034   echo "$as_me: failed program was:" >&5
6035 sed 's/^/| /' conftest.$ac_ext >&5
6036
6037 ac_cv_lib_bsd_gethostbyname=no
6038 fi
6039 rm -f conftest.err conftest.$ac_objext \
6040       conftest$ac_exeext conftest.$ac_ext
6041 LIBS=$ac_check_lib_save_LIBS
6042 fi
6043 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6044 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
6045 if test $ac_cv_lib_bsd_gethostbyname = yes; then
6046   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6047 fi
6048
6049       fi
6050     fi
6051
6052     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6053     # socket/setsockopt and other routines are undefined under SCO ODT
6054     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6055     # on later versions), says Simon Leinen: it contains gethostby*
6056     # variants that don't use the name server (or something).  -lsocket
6057     # must be given before -lnsl if both are needed.  We assume that
6058     # if connect needs -lnsl, so does gethostbyname.
6059     echo "$as_me:$LINENO: checking for connect" >&5
6060 echo $ECHO_N "checking for connect... $ECHO_C" >&6
6061 if test "${ac_cv_func_connect+set}" = set; then
6062   echo $ECHO_N "(cached) $ECHO_C" >&6
6063 else
6064   cat >conftest.$ac_ext <<_ACEOF
6065 /* confdefs.h.  */
6066 _ACEOF
6067 cat confdefs.h >>conftest.$ac_ext
6068 cat >>conftest.$ac_ext <<_ACEOF
6069 /* end confdefs.h.  */
6070 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
6071    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6072 #define connect innocuous_connect
6073
6074 /* System header to define __stub macros and hopefully few prototypes,
6075     which can conflict with char connect (); below.
6076     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6077     <limits.h> exists even on freestanding compilers.  */
6078
6079 #ifdef __STDC__
6080 # include <limits.h>
6081 #else
6082 # include <assert.h>
6083 #endif
6084
6085 #undef connect
6086
6087 /* Override any gcc2 internal prototype to avoid an error.  */
6088 #ifdef __cplusplus
6089 extern "C"
6090 {
6091 #endif
6092 /* We use char because int might match the return type of a gcc2
6093    builtin and then its argument prototype would still apply.  */
6094 char connect ();
6095 /* The GNU C library defines this for functions which it implements
6096     to always fail with ENOSYS.  Some functions are actually named
6097     something starting with __ and the normal name is an alias.  */
6098 #if defined (__stub_connect) || defined (__stub___connect)
6099 choke me
6100 #else
6101 char (*f) () = connect;
6102 #endif
6103 #ifdef __cplusplus
6104 }
6105 #endif
6106
6107 int
6108 main ()
6109 {
6110 return f != connect;
6111   ;
6112   return 0;
6113 }
6114 _ACEOF
6115 rm -f conftest.$ac_objext conftest$ac_exeext
6116 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6117   (eval $ac_link) 2>conftest.er1
6118   ac_status=$?
6119   grep -v '^ *+' conftest.er1 >conftest.err
6120   rm -f conftest.er1
6121   cat conftest.err >&5
6122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6123   (exit $ac_status); } &&
6124          { ac_try='test -z "$ac_c_werror_flag"
6125                          || test ! -s conftest.err'
6126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6127   (eval $ac_try) 2>&5
6128   ac_status=$?
6129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6130   (exit $ac_status); }; } &&
6131          { ac_try='test -s conftest$ac_exeext'
6132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6133   (eval $ac_try) 2>&5
6134   ac_status=$?
6135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6136   (exit $ac_status); }; }; then
6137   ac_cv_func_connect=yes
6138 else
6139   echo "$as_me: failed program was:" >&5
6140 sed 's/^/| /' conftest.$ac_ext >&5
6141
6142 ac_cv_func_connect=no
6143 fi
6144 rm -f conftest.err conftest.$ac_objext \
6145       conftest$ac_exeext conftest.$ac_ext
6146 fi
6147 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
6148 echo "${ECHO_T}$ac_cv_func_connect" >&6
6149
6150     if test $ac_cv_func_connect = no; then
6151       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
6152 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
6153 if test "${ac_cv_lib_socket_connect+set}" = set; then
6154   echo $ECHO_N "(cached) $ECHO_C" >&6
6155 else
6156   ac_check_lib_save_LIBS=$LIBS
6157 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6158 cat >conftest.$ac_ext <<_ACEOF
6159 /* confdefs.h.  */
6160 _ACEOF
6161 cat confdefs.h >>conftest.$ac_ext
6162 cat >>conftest.$ac_ext <<_ACEOF
6163 /* end confdefs.h.  */
6164
6165 /* Override any gcc2 internal prototype to avoid an error.  */
6166 #ifdef __cplusplus
6167 extern "C"
6168 #endif
6169 /* We use char because int might match the return type of a gcc2
6170    builtin and then its argument prototype would still apply.  */
6171 char connect ();
6172 int
6173 main ()
6174 {
6175 connect ();
6176   ;
6177   return 0;
6178 }
6179 _ACEOF
6180 rm -f conftest.$ac_objext conftest$ac_exeext
6181 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6182   (eval $ac_link) 2>conftest.er1
6183   ac_status=$?
6184   grep -v '^ *+' conftest.er1 >conftest.err
6185   rm -f conftest.er1
6186   cat conftest.err >&5
6187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6188   (exit $ac_status); } &&
6189          { ac_try='test -z "$ac_c_werror_flag"
6190                          || test ! -s conftest.err'
6191   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6192   (eval $ac_try) 2>&5
6193   ac_status=$?
6194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6195   (exit $ac_status); }; } &&
6196          { ac_try='test -s conftest$ac_exeext'
6197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6198   (eval $ac_try) 2>&5
6199   ac_status=$?
6200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6201   (exit $ac_status); }; }; then
6202   ac_cv_lib_socket_connect=yes
6203 else
6204   echo "$as_me: failed program was:" >&5
6205 sed 's/^/| /' conftest.$ac_ext >&5
6206
6207 ac_cv_lib_socket_connect=no
6208 fi
6209 rm -f conftest.err conftest.$ac_objext \
6210       conftest$ac_exeext conftest.$ac_ext
6211 LIBS=$ac_check_lib_save_LIBS
6212 fi
6213 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
6214 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
6215 if test $ac_cv_lib_socket_connect = yes; then
6216   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6217 fi
6218
6219     fi
6220
6221     # Guillermo Gomez says -lposix is necessary on A/UX.
6222     echo "$as_me:$LINENO: checking for remove" >&5
6223 echo $ECHO_N "checking for remove... $ECHO_C" >&6
6224 if test "${ac_cv_func_remove+set}" = set; then
6225   echo $ECHO_N "(cached) $ECHO_C" >&6
6226 else
6227   cat >conftest.$ac_ext <<_ACEOF
6228 /* confdefs.h.  */
6229 _ACEOF
6230 cat confdefs.h >>conftest.$ac_ext
6231 cat >>conftest.$ac_ext <<_ACEOF
6232 /* end confdefs.h.  */
6233 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
6234    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6235 #define remove innocuous_remove
6236
6237 /* System header to define __stub macros and hopefully few prototypes,
6238     which can conflict with char remove (); below.
6239     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6240     <limits.h> exists even on freestanding compilers.  */
6241
6242 #ifdef __STDC__
6243 # include <limits.h>
6244 #else
6245 # include <assert.h>
6246 #endif
6247
6248 #undef remove
6249
6250 /* Override any gcc2 internal prototype to avoid an error.  */
6251 #ifdef __cplusplus
6252 extern "C"
6253 {
6254 #endif
6255 /* We use char because int might match the return type of a gcc2
6256    builtin and then its argument prototype would still apply.  */
6257 char remove ();
6258 /* The GNU C library defines this for functions which it implements
6259     to always fail with ENOSYS.  Some functions are actually named
6260     something starting with __ and the normal name is an alias.  */
6261 #if defined (__stub_remove) || defined (__stub___remove)
6262 choke me
6263 #else
6264 char (*f) () = remove;
6265 #endif
6266 #ifdef __cplusplus
6267 }
6268 #endif
6269
6270 int
6271 main ()
6272 {
6273 return f != remove;
6274   ;
6275   return 0;
6276 }
6277 _ACEOF
6278 rm -f conftest.$ac_objext conftest$ac_exeext
6279 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6280   (eval $ac_link) 2>conftest.er1
6281   ac_status=$?
6282   grep -v '^ *+' conftest.er1 >conftest.err
6283   rm -f conftest.er1
6284   cat conftest.err >&5
6285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6286   (exit $ac_status); } &&
6287          { ac_try='test -z "$ac_c_werror_flag"
6288                          || test ! -s conftest.err'
6289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6290   (eval $ac_try) 2>&5
6291   ac_status=$?
6292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6293   (exit $ac_status); }; } &&
6294          { ac_try='test -s conftest$ac_exeext'
6295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6296   (eval $ac_try) 2>&5
6297   ac_status=$?
6298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6299   (exit $ac_status); }; }; then
6300   ac_cv_func_remove=yes
6301 else
6302   echo "$as_me: failed program was:" >&5
6303 sed 's/^/| /' conftest.$ac_ext >&5
6304
6305 ac_cv_func_remove=no
6306 fi
6307 rm -f conftest.err conftest.$ac_objext \
6308       conftest$ac_exeext conftest.$ac_ext
6309 fi
6310 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
6311 echo "${ECHO_T}$ac_cv_func_remove" >&6
6312
6313     if test $ac_cv_func_remove = no; then
6314       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
6315 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
6316 if test "${ac_cv_lib_posix_remove+set}" = set; then
6317   echo $ECHO_N "(cached) $ECHO_C" >&6
6318 else
6319   ac_check_lib_save_LIBS=$LIBS
6320 LIBS="-lposix  $LIBS"
6321 cat >conftest.$ac_ext <<_ACEOF
6322 /* confdefs.h.  */
6323 _ACEOF
6324 cat confdefs.h >>conftest.$ac_ext
6325 cat >>conftest.$ac_ext <<_ACEOF
6326 /* end confdefs.h.  */
6327
6328 /* Override any gcc2 internal prototype to avoid an error.  */
6329 #ifdef __cplusplus
6330 extern "C"
6331 #endif
6332 /* We use char because int might match the return type of a gcc2
6333    builtin and then its argument prototype would still apply.  */
6334 char remove ();
6335 int
6336 main ()
6337 {
6338 remove ();
6339   ;
6340   return 0;
6341 }
6342 _ACEOF
6343 rm -f conftest.$ac_objext conftest$ac_exeext
6344 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6345   (eval $ac_link) 2>conftest.er1
6346   ac_status=$?
6347   grep -v '^ *+' conftest.er1 >conftest.err
6348   rm -f conftest.er1
6349   cat conftest.err >&5
6350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6351   (exit $ac_status); } &&
6352          { ac_try='test -z "$ac_c_werror_flag"
6353                          || test ! -s conftest.err'
6354   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6355   (eval $ac_try) 2>&5
6356   ac_status=$?
6357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6358   (exit $ac_status); }; } &&
6359          { ac_try='test -s conftest$ac_exeext'
6360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6361   (eval $ac_try) 2>&5
6362   ac_status=$?
6363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6364   (exit $ac_status); }; }; then
6365   ac_cv_lib_posix_remove=yes
6366 else
6367   echo "$as_me: failed program was:" >&5
6368 sed 's/^/| /' conftest.$ac_ext >&5
6369
6370 ac_cv_lib_posix_remove=no
6371 fi
6372 rm -f conftest.err conftest.$ac_objext \
6373       conftest$ac_exeext conftest.$ac_ext
6374 LIBS=$ac_check_lib_save_LIBS
6375 fi
6376 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
6377 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
6378 if test $ac_cv_lib_posix_remove = yes; then
6379   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6380 fi
6381
6382     fi
6383
6384     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6385     echo "$as_me:$LINENO: checking for shmat" >&5
6386 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
6387 if test "${ac_cv_func_shmat+set}" = set; then
6388   echo $ECHO_N "(cached) $ECHO_C" >&6
6389 else
6390   cat >conftest.$ac_ext <<_ACEOF
6391 /* confdefs.h.  */
6392 _ACEOF
6393 cat confdefs.h >>conftest.$ac_ext
6394 cat >>conftest.$ac_ext <<_ACEOF
6395 /* end confdefs.h.  */
6396 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
6397    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6398 #define shmat innocuous_shmat
6399
6400 /* System header to define __stub macros and hopefully few prototypes,
6401     which can conflict with char shmat (); below.
6402     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6403     <limits.h> exists even on freestanding compilers.  */
6404
6405 #ifdef __STDC__
6406 # include <limits.h>
6407 #else
6408 # include <assert.h>
6409 #endif
6410
6411 #undef shmat
6412
6413 /* Override any gcc2 internal prototype to avoid an error.  */
6414 #ifdef __cplusplus
6415 extern "C"
6416 {
6417 #endif
6418 /* We use char because int might match the return type of a gcc2
6419    builtin and then its argument prototype would still apply.  */
6420 char shmat ();
6421 /* The GNU C library defines this for functions which it implements
6422     to always fail with ENOSYS.  Some functions are actually named
6423     something starting with __ and the normal name is an alias.  */
6424 #if defined (__stub_shmat) || defined (__stub___shmat)
6425 choke me
6426 #else
6427 char (*f) () = shmat;
6428 #endif
6429 #ifdef __cplusplus
6430 }
6431 #endif
6432
6433 int
6434 main ()
6435 {
6436 return f != shmat;
6437   ;
6438   return 0;
6439 }
6440 _ACEOF
6441 rm -f conftest.$ac_objext conftest$ac_exeext
6442 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6443   (eval $ac_link) 2>conftest.er1
6444   ac_status=$?
6445   grep -v '^ *+' conftest.er1 >conftest.err
6446   rm -f conftest.er1
6447   cat conftest.err >&5
6448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6449   (exit $ac_status); } &&
6450          { ac_try='test -z "$ac_c_werror_flag"
6451                          || test ! -s conftest.err'
6452   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6453   (eval $ac_try) 2>&5
6454   ac_status=$?
6455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6456   (exit $ac_status); }; } &&
6457          { ac_try='test -s conftest$ac_exeext'
6458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6459   (eval $ac_try) 2>&5
6460   ac_status=$?
6461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6462   (exit $ac_status); }; }; then
6463   ac_cv_func_shmat=yes
6464 else
6465   echo "$as_me: failed program was:" >&5
6466 sed 's/^/| /' conftest.$ac_ext >&5
6467
6468 ac_cv_func_shmat=no
6469 fi
6470 rm -f conftest.err conftest.$ac_objext \
6471       conftest$ac_exeext conftest.$ac_ext
6472 fi
6473 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
6474 echo "${ECHO_T}$ac_cv_func_shmat" >&6
6475
6476     if test $ac_cv_func_shmat = no; then
6477       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
6478 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
6479 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
6480   echo $ECHO_N "(cached) $ECHO_C" >&6
6481 else
6482   ac_check_lib_save_LIBS=$LIBS
6483 LIBS="-lipc  $LIBS"
6484 cat >conftest.$ac_ext <<_ACEOF
6485 /* confdefs.h.  */
6486 _ACEOF
6487 cat confdefs.h >>conftest.$ac_ext
6488 cat >>conftest.$ac_ext <<_ACEOF
6489 /* end confdefs.h.  */
6490
6491 /* Override any gcc2 internal prototype to avoid an error.  */
6492 #ifdef __cplusplus
6493 extern "C"
6494 #endif
6495 /* We use char because int might match the return type of a gcc2
6496    builtin and then its argument prototype would still apply.  */
6497 char shmat ();
6498 int
6499 main ()
6500 {
6501 shmat ();
6502   ;
6503   return 0;
6504 }
6505 _ACEOF
6506 rm -f conftest.$ac_objext conftest$ac_exeext
6507 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6508   (eval $ac_link) 2>conftest.er1
6509   ac_status=$?
6510   grep -v '^ *+' conftest.er1 >conftest.err
6511   rm -f conftest.er1
6512   cat conftest.err >&5
6513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6514   (exit $ac_status); } &&
6515          { ac_try='test -z "$ac_c_werror_flag"
6516                          || test ! -s conftest.err'
6517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6518   (eval $ac_try) 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_lib_ipc_shmat=yes
6529 else
6530   echo "$as_me: failed program was:" >&5
6531 sed 's/^/| /' conftest.$ac_ext >&5
6532
6533 ac_cv_lib_ipc_shmat=no
6534 fi
6535 rm -f conftest.err conftest.$ac_objext \
6536       conftest$ac_exeext conftest.$ac_ext
6537 LIBS=$ac_check_lib_save_LIBS
6538 fi
6539 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
6540 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
6541 if test $ac_cv_lib_ipc_shmat = yes; then
6542   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6543 fi
6544
6545     fi
6546   fi
6547
6548   # Check for libraries that X11R6 Xt/Xaw programs need.
6549   ac_save_LDFLAGS=$LDFLAGS
6550   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6551   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6552   # check for ICE first), but we must link in the order -lSM -lICE or
6553   # we get undefined symbols.  So assume we have SM if we have ICE.
6554   # These have to be linked with before -lX11, unlike the other
6555   # libraries we check for below, so use a different variable.
6556   # John Interrante, Karl Berry
6557   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
6558 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
6559 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
6560   echo $ECHO_N "(cached) $ECHO_C" >&6
6561 else
6562   ac_check_lib_save_LIBS=$LIBS
6563 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6564 cat >conftest.$ac_ext <<_ACEOF
6565 /* confdefs.h.  */
6566 _ACEOF
6567 cat confdefs.h >>conftest.$ac_ext
6568 cat >>conftest.$ac_ext <<_ACEOF
6569 /* end confdefs.h.  */
6570
6571 /* Override any gcc2 internal prototype to avoid an error.  */
6572 #ifdef __cplusplus
6573 extern "C"
6574 #endif
6575 /* We use char because int might match the return type of a gcc2
6576    builtin and then its argument prototype would still apply.  */
6577 char IceConnectionNumber ();
6578 int
6579 main ()
6580 {
6581 IceConnectionNumber ();
6582   ;
6583   return 0;
6584 }
6585 _ACEOF
6586 rm -f conftest.$ac_objext conftest$ac_exeext
6587 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6588   (eval $ac_link) 2>conftest.er1
6589   ac_status=$?
6590   grep -v '^ *+' conftest.er1 >conftest.err
6591   rm -f conftest.er1
6592   cat conftest.err >&5
6593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6594   (exit $ac_status); } &&
6595          { ac_try='test -z "$ac_c_werror_flag"
6596                          || test ! -s conftest.err'
6597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6598   (eval $ac_try) 2>&5
6599   ac_status=$?
6600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6601   (exit $ac_status); }; } &&
6602          { ac_try='test -s conftest$ac_exeext'
6603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6604   (eval $ac_try) 2>&5
6605   ac_status=$?
6606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6607   (exit $ac_status); }; }; then
6608   ac_cv_lib_ICE_IceConnectionNumber=yes
6609 else
6610   echo "$as_me: failed program was:" >&5
6611 sed 's/^/| /' conftest.$ac_ext >&5
6612
6613 ac_cv_lib_ICE_IceConnectionNumber=no
6614 fi
6615 rm -f conftest.err conftest.$ac_objext \
6616       conftest$ac_exeext conftest.$ac_ext
6617 LIBS=$ac_check_lib_save_LIBS
6618 fi
6619 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6620 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
6621 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
6622   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6623 fi
6624
6625   LDFLAGS=$ac_save_LDFLAGS
6626
6627 fi
6628
6629
6630 if test "$have_x" != yes; then
6631   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
6632 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
6633    { (exit 1); exit 1; }; }
6634 fi
6635
6636
6637     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
6638 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
6639 if test "${ac_cv_x_app_defaults+set}" = set; then
6640   echo $ECHO_N "(cached) $ECHO_C" >&6
6641 else
6642
6643   rm -fr conftestdir
6644   if mkdir conftestdir; then
6645     cd conftestdir 2>/dev/null
6646     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6647     cat > Imakefile <<'EOF'
6648 acfindx:
6649         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
6650 EOF
6651     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
6652       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
6653       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6654     fi
6655     cd .. 2>/dev/null
6656     rm -fr conftestdir
6657   fi
6658       if test x"$ac_x_app_defaults" = x; then
6659
6660   # Look for the directory under a standard set of common directories.
6661   # Check X11 before X11Rn because it's often a symlink to the current release.
6662   for ac_dir in                                 \
6663     /usr/X11/lib/app-defaults                   \
6664     /usr/X11R6/lib/app-defaults                 \
6665     /usr/X11R6/lib/X11/app-defaults             \
6666     /usr/X11R5/lib/app-defaults                 \
6667     /usr/X11R5/lib/X11/app-defaults             \
6668     /usr/X11R4/lib/app-defaults                 \
6669     /usr/X11R4/lib/X11/app-defaults             \
6670                                                 \
6671     /usr/lib/X11/app-defaults                   \
6672     /usr/lib/X11R6/app-defaults                 \
6673     /usr/lib/X11R5/app-defaults                 \
6674     /usr/lib/X11R4/app-defaults                 \
6675                                                 \
6676     /usr/local/X11/lib/app-defaults             \
6677     /usr/local/X11R6/lib/app-defaults           \
6678     /usr/local/X11R5/lib/app-defaults           \
6679     /usr/local/X11R4/lib/app-defaults           \
6680                                                 \
6681     /usr/local/lib/X11/app-defaults             \
6682     /usr/local/lib/X11R6/app-defaults           \
6683     /usr/local/lib/X11R6/X11/app-defaults       \
6684     /usr/local/lib/X11R5/app-defaults           \
6685     /usr/local/lib/X11R5/X11/app-defaults       \
6686     /usr/local/lib/X11R4/app-defaults           \
6687     /usr/local/lib/X11R4/X11/app-defaults       \
6688                                                 \
6689     /usr/X386/lib/X11/app-defaults              \
6690     /usr/x386/lib/X11/app-defaults              \
6691     /usr/XFree86/lib/X11/app-defaults           \
6692                                                 \
6693     /usr/lib/X11/app-defaults                   \
6694     /usr/local/lib/X11/app-defaults             \
6695     /usr/unsupported/lib/X11/app-defaults       \
6696     /usr/athena/lib/X11/app-defaults            \
6697     /usr/local/x11r5/lib/X11/app-defaults       \
6698     /usr/lpp/Xamples/lib/X11/app-defaults       \
6699     /lib/usr/lib/X11/app-defaults               \
6700                                                 \
6701     /usr/openwin/lib/app-defaults               \
6702     /usr/openwin/lib/X11/app-defaults           \
6703     /usr/openwin/share/lib/app-defaults         \
6704     /usr/openwin/share/lib/X11/app-defaults     \
6705                                                 \
6706     /X11R6/lib/app-defaults                     \
6707     /X11R5/lib/app-defaults                     \
6708     /X11R4/lib/app-defaults                     \
6709     ; \
6710   do
6711     if test -d "$ac_dir"; then
6712       ac_x_app_defaults=$ac_dir
6713       break
6714     fi
6715   done
6716
6717       fi
6718       if test x"$ac_x_app_defaults" = x; then
6719         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
6720       else
6721         # Record where we found app-defaults for the cache.
6722         ac_cv_x_app_defaults="$ac_x_app_defaults"
6723       fi
6724 fi
6725 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
6726 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
6727     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
6728 case "$host" in
6729     *-hpux*)
6730
6731       # The following arcana was gleaned from conversations with
6732       # Eric Schwartz <erics@col.hp.com>:
6733       #
6734       # On HPUX 10.x, the parts of X that HP considers "standard" live in
6735       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6736       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6737       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6738       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6739       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6740       # you don't need any -I or -L arguments.
6741       #
6742       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6743       # are the same division as 10.x.  However, there are no symlinks to
6744       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6745       # arguments are always necessary.
6746       #
6747       # However, X11R6 was available on HPUX 9.x as a patch: if that
6748       # patch was installed, then all of X11R6 went in to
6749       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6750       #
6751       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6752       # whether R5 was available as a patch; R6 undoubtedly was not.)
6753       #
6754       # So.  We try and use the highest numbered pair of
6755       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6756       # that are available.  We do not mix and match different versions
6757       # of X.
6758       #
6759       # Question I still don't know the answer to: (do you?)
6760       #
6761       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6762       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6763       #     that contrib directory?  Did it contain so-called "standard"
6764       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6765       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6766       #     be a situation where one had to reach into the R5 headers and
6767       #     libs to find Xmu?  That is, must both R6 and R5 directories
6768       #     be on the -I and -L lists in that case?
6769       #
6770       for version in X11R6 X11R5 X11R4 ; do
6771         # if either pair of directories exists...
6772         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6773         then
6774            # if contrib exists, use it...
6775            if test -d /usr/contrib/$version/include ; then
6776              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6777              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6778            fi
6779            # if the "standard" one exists, use it.
6780            if test -d /usr/include/$version ; then
6781              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6782              X_LIBS="$X_LIBS -L/usr/lib/$version"
6783            fi
6784            # since at least one of the pair exists, go no farther.
6785            break
6786         fi
6787       done
6788
6789       # Now find Motif.  Thanks for not making xmkmf find this by
6790       # default, you losers.
6791       #
6792       if test -d /usr/include/Motif2.1 ; then
6793         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6794         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6795       elif test -d /usr/include/Motif1.2 ; then
6796         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6797         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6798       elif test -d /usr/include/Motif1.1 ; then
6799         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6800         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6801       fi
6802
6803       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6804       #
6805       if test -d /opt/graphics/OpenGL/include ; then
6806         # HP-UX 10.20 puts it here
6807         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6808         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6809       elif test -d /opt/Mesa/lib ; then
6810         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6811         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6812       fi
6813
6814
6815       if test -d /opt/xpm/lib/X11 ; then
6816         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6817         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6818       fi
6819
6820       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6821       # in /usr/local/, unless there is already an xscreensaver in
6822       # /usr/local/bin/.  This can be overridden with the --prefix arg
6823       # to configure.  I'm not sure this is the right thing to do, but
6824       # Richard Lloyd says so...
6825       #
6826       if test \! -x /usr/local/bin/xscreensaver ; then
6827         ac_default_prefix=/opt/xscreensaver
6828       fi
6829
6830     ;;
6831     *-solaris*)
6832
6833       # Thanks for not making xmkmf find this by default, pinheads.
6834       # And thanks for moving things around again, too.  Is this
6835       # really the standard location now?  What happened to the
6836       # joke that this kind of thing went in /opt?
6837       # cthomp says "answer: CDE (Common Disorganized Environment)"
6838       #
6839       if test -f /usr/dt/include/Xm/Xm.h ; then
6840         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6841         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
6842
6843         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6844         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
6845 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
6846 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
6847   echo $ECHO_N "(cached) $ECHO_C" >&6
6848 else
6849   ac_check_lib_save_LIBS=$LIBS
6850 LIBS="-lgen  $LIBS"
6851 cat >conftest.$ac_ext <<_ACEOF
6852 /* confdefs.h.  */
6853 _ACEOF
6854 cat confdefs.h >>conftest.$ac_ext
6855 cat >>conftest.$ac_ext <<_ACEOF
6856 /* end confdefs.h.  */
6857
6858 /* Override any gcc2 internal prototype to avoid an error.  */
6859 #ifdef __cplusplus
6860 extern "C"
6861 #endif
6862 /* We use char because int might match the return type of a gcc2
6863    builtin and then its argument prototype would still apply.  */
6864 char regcmp ();
6865 int
6866 main ()
6867 {
6868 regcmp ();
6869   ;
6870   return 0;
6871 }
6872 _ACEOF
6873 rm -f conftest.$ac_objext conftest$ac_exeext
6874 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6875   (eval $ac_link) 2>conftest.er1
6876   ac_status=$?
6877   grep -v '^ *+' conftest.er1 >conftest.err
6878   rm -f conftest.er1
6879   cat conftest.err >&5
6880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6881   (exit $ac_status); } &&
6882          { ac_try='test -z "$ac_c_werror_flag"
6883                          || test ! -s conftest.err'
6884   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6885   (eval $ac_try) 2>&5
6886   ac_status=$?
6887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6888   (exit $ac_status); }; } &&
6889          { ac_try='test -s conftest$ac_exeext'
6890   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6891   (eval $ac_try) 2>&5
6892   ac_status=$?
6893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6894   (exit $ac_status); }; }; then
6895   ac_cv_lib_gen_regcmp=yes
6896 else
6897   echo "$as_me: failed program was:" >&5
6898 sed 's/^/| /' conftest.$ac_ext >&5
6899
6900 ac_cv_lib_gen_regcmp=no
6901 fi
6902 rm -f conftest.err conftest.$ac_objext \
6903       conftest$ac_exeext conftest.$ac_ext
6904 LIBS=$ac_check_lib_save_LIBS
6905 fi
6906 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
6907 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
6908 if test $ac_cv_lib_gen_regcmp = yes; then
6909   MOTIF_LIBS="$MOTIF_LIBS -lgen"
6910 fi
6911
6912       fi
6913
6914     ;;
6915     *-darwin*)
6916
6917       # On MacOS X (10.x with "fink"), many things are under /sw/.
6918       #
6919       if test -d /sw/include ; then
6920         X_CFLAGS="-I/sw/include $X_CFLAGS"
6921         X_LIBS="-L/sw/lib $X_LIBS"
6922       fi
6923     ;;
6924   esac
6925 echo "$as_me:$LINENO: checking for XPointer" >&5
6926 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
6927 if test "${ac_cv_xpointer+set}" = set; then
6928   echo $ECHO_N "(cached) $ECHO_C" >&6
6929 else
6930
6931   ac_save_CPPFLAGS="$CPPFLAGS"
6932   if test \! -z "$includedir" ; then
6933     CPPFLAGS="$CPPFLAGS -I$includedir"
6934   fi
6935   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6936   cat >conftest.$ac_ext <<_ACEOF
6937 /* confdefs.h.  */
6938 _ACEOF
6939 cat confdefs.h >>conftest.$ac_ext
6940 cat >>conftest.$ac_ext <<_ACEOF
6941 /* end confdefs.h.  */
6942 #include <X11/Xlib.h>
6943 int
6944 main ()
6945 {
6946 XPointer foo = (XPointer) 0;
6947   ;
6948   return 0;
6949 }
6950 _ACEOF
6951 rm -f conftest.$ac_objext
6952 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6953   (eval $ac_compile) 2>conftest.er1
6954   ac_status=$?
6955   grep -v '^ *+' conftest.er1 >conftest.err
6956   rm -f conftest.er1
6957   cat conftest.err >&5
6958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6959   (exit $ac_status); } &&
6960          { ac_try='test -z "$ac_c_werror_flag"
6961                          || test ! -s conftest.err'
6962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6963   (eval $ac_try) 2>&5
6964   ac_status=$?
6965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6966   (exit $ac_status); }; } &&
6967          { ac_try='test -s conftest.$ac_objext'
6968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6969   (eval $ac_try) 2>&5
6970   ac_status=$?
6971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6972   (exit $ac_status); }; }; then
6973   ac_cv_xpointer=yes
6974 else
6975   echo "$as_me: failed program was:" >&5
6976 sed 's/^/| /' conftest.$ac_ext >&5
6977
6978 ac_cv_xpointer=no
6979 fi
6980 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6981   CPPFLAGS="$ac_save_CPPFLAGS"
6982 fi
6983 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
6984 echo "${ECHO_T}$ac_cv_xpointer" >&6
6985   if test "$ac_cv_xpointer" != yes; then
6986    cat >>confdefs.h <<\_ACEOF
6987 #define XPointer char*
6988 _ACEOF
6989
6990   fi
6991
6992 echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
6993 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6
6994   ac_macosx=no
6995   case "$host" in
6996     *-apple-darwin* )
6997       ac_macosx=yes
6998     ;;
6999   esac
7000 echo "$as_me:$LINENO: result: $ac_macosx" >&5
7001 echo "${ECHO_T}$ac_macosx" >&6
7002
7003
7004
7005 ###############################################################################
7006 #
7007 #       Gettext support
7008 #
7009 ###############################################################################
7010
7011
7012
7013 if test -n ""; then
7014     echo "$as_me:$LINENO: checking for intltool >= " >&5
7015 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
7016
7017     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
7018     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
7019
7020     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
7021
7022
7023     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
7024         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
7025 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
7026     else
7027         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
7028 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
7029         exit 1
7030     fi
7031 fi
7032
7033   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'
7034 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'
7035      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'
7036       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
7037      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'
7038    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'
7039     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'
7040 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'
7041        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'
7042       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'
7043     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'
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057 # Use the tools built into the package, not the ones that are installed.
7058
7059 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
7060 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
7061 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
7062
7063
7064
7065
7066
7067 # Extract the first word of "perl", so it can be a program name with args.
7068 set dummy perl; ac_word=$2
7069 echo "$as_me:$LINENO: checking for $ac_word" >&5
7070 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7071 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
7072   echo $ECHO_N "(cached) $ECHO_C" >&6
7073 else
7074   case $INTLTOOL_PERL in
7075   [\\/]* | ?:[\\/]*)
7076   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
7077   ;;
7078   *)
7079   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7080 for as_dir in $PATH
7081 do
7082   IFS=$as_save_IFS
7083   test -z "$as_dir" && as_dir=.
7084   for ac_exec_ext in '' $ac_executable_extensions; do
7085   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7086     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
7087     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7088     break 2
7089   fi
7090 done
7091 done
7092
7093   ;;
7094 esac
7095 fi
7096 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
7097
7098 if test -n "$INTLTOOL_PERL"; then
7099   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
7100 echo "${ECHO_T}$INTLTOOL_PERL" >&6
7101 else
7102   echo "$as_me:$LINENO: result: no" >&5
7103 echo "${ECHO_T}no" >&6
7104 fi
7105
7106 if test -z "$INTLTOOL_PERL"; then
7107    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
7108 echo "$as_me: error: perl not found; required for intltool" >&2;}
7109    { (exit 1); exit 1; }; }
7110 fi
7111 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7112    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
7113 echo "$as_me: error: perl 5.x required for intltool" >&2;}
7114    { (exit 1); exit 1; }; }
7115 fi
7116
7117 # Remove file type tags (using []) from po/POTFILES.
7118
7119
7120
7121
7122
7123
7124
7125 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7126
7127           ac_config_commands="$ac_config_commands default-1"
7128
7129
7130
7131 GETTEXT_PACKAGE=xscreensaver
7132 cat >>confdefs.h <<_ACEOF
7133 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7134 _ACEOF
7135
7136 cat >>confdefs.h <<_ACEOF
7137 #define PACKAGE "$GETTEXT_PACKAGE"
7138 _ACEOF
7139
7140
7141
7142 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"
7143 if test -n "$ac_tool_prefix"; then
7144   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7145 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7146 echo "$as_me:$LINENO: checking for $ac_word" >&5
7147 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7148 if test "${ac_cv_prog_RANLIB+set}" = set; then
7149   echo $ECHO_N "(cached) $ECHO_C" >&6
7150 else
7151   if test -n "$RANLIB"; then
7152   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7153 else
7154 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7155 for as_dir in $PATH
7156 do
7157   IFS=$as_save_IFS
7158   test -z "$as_dir" && as_dir=.
7159   for ac_exec_ext in '' $ac_executable_extensions; do
7160   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7161     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7162     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7163     break 2
7164   fi
7165 done
7166 done
7167
7168 fi
7169 fi
7170 RANLIB=$ac_cv_prog_RANLIB
7171 if test -n "$RANLIB"; then
7172   echo "$as_me:$LINENO: result: $RANLIB" >&5
7173 echo "${ECHO_T}$RANLIB" >&6
7174 else
7175   echo "$as_me:$LINENO: result: no" >&5
7176 echo "${ECHO_T}no" >&6
7177 fi
7178
7179 fi
7180 if test -z "$ac_cv_prog_RANLIB"; then
7181   ac_ct_RANLIB=$RANLIB
7182   # Extract the first word of "ranlib", so it can be a program name with args.
7183 set dummy ranlib; ac_word=$2
7184 echo "$as_me:$LINENO: checking for $ac_word" >&5
7185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7186 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7187   echo $ECHO_N "(cached) $ECHO_C" >&6
7188 else
7189   if test -n "$ac_ct_RANLIB"; then
7190   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7191 else
7192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7193 for as_dir in $PATH
7194 do
7195   IFS=$as_save_IFS
7196   test -z "$as_dir" && as_dir=.
7197   for ac_exec_ext in '' $ac_executable_extensions; do
7198   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7199     ac_cv_prog_ac_ct_RANLIB="ranlib"
7200     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7201     break 2
7202   fi
7203 done
7204 done
7205
7206   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7207 fi
7208 fi
7209 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7210 if test -n "$ac_ct_RANLIB"; then
7211   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7212 echo "${ECHO_T}$ac_ct_RANLIB" >&6
7213 else
7214   echo "$as_me:$LINENO: result: no" >&5
7215 echo "${ECHO_T}no" >&6
7216 fi
7217
7218   RANLIB=$ac_ct_RANLIB
7219 else
7220   RANLIB="$ac_cv_prog_RANLIB"
7221 fi
7222
7223 echo "$as_me:$LINENO: checking for off_t" >&5
7224 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
7225 if test "${ac_cv_type_off_t+set}" = set; then
7226   echo $ECHO_N "(cached) $ECHO_C" >&6
7227 else
7228   cat >conftest.$ac_ext <<_ACEOF
7229 /* confdefs.h.  */
7230 _ACEOF
7231 cat confdefs.h >>conftest.$ac_ext
7232 cat >>conftest.$ac_ext <<_ACEOF
7233 /* end confdefs.h.  */
7234 $ac_includes_default
7235 int
7236 main ()
7237 {
7238 if ((off_t *) 0)
7239   return 0;
7240 if (sizeof (off_t))
7241   return 0;
7242   ;
7243   return 0;
7244 }
7245 _ACEOF
7246 rm -f conftest.$ac_objext
7247 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7248   (eval $ac_compile) 2>conftest.er1
7249   ac_status=$?
7250   grep -v '^ *+' conftest.er1 >conftest.err
7251   rm -f conftest.er1
7252   cat conftest.err >&5
7253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7254   (exit $ac_status); } &&
7255          { ac_try='test -z "$ac_c_werror_flag"
7256                          || test ! -s conftest.err'
7257   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7258   (eval $ac_try) 2>&5
7259   ac_status=$?
7260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7261   (exit $ac_status); }; } &&
7262          { ac_try='test -s conftest.$ac_objext'
7263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7264   (eval $ac_try) 2>&5
7265   ac_status=$?
7266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7267   (exit $ac_status); }; }; then
7268   ac_cv_type_off_t=yes
7269 else
7270   echo "$as_me: failed program was:" >&5
7271 sed 's/^/| /' conftest.$ac_ext >&5
7272
7273 ac_cv_type_off_t=no
7274 fi
7275 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7276 fi
7277 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
7278 echo "${ECHO_T}$ac_cv_type_off_t" >&6
7279 if test $ac_cv_type_off_t = yes; then
7280   :
7281 else
7282
7283 cat >>confdefs.h <<_ACEOF
7284 #define off_t long
7285 _ACEOF
7286
7287 fi
7288
7289 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7290 # for constant arguments.  Useless!
7291 echo "$as_me:$LINENO: checking for working alloca.h" >&5
7292 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7293 if test "${ac_cv_working_alloca_h+set}" = set; then
7294   echo $ECHO_N "(cached) $ECHO_C" >&6
7295 else
7296   cat >conftest.$ac_ext <<_ACEOF
7297 /* confdefs.h.  */
7298 _ACEOF
7299 cat confdefs.h >>conftest.$ac_ext
7300 cat >>conftest.$ac_ext <<_ACEOF
7301 /* end confdefs.h.  */
7302 #include <alloca.h>
7303 int
7304 main ()
7305 {
7306 char *p = (char *) alloca (2 * sizeof (int));
7307   ;
7308   return 0;
7309 }
7310 _ACEOF
7311 rm -f conftest.$ac_objext conftest$ac_exeext
7312 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7313   (eval $ac_link) 2>conftest.er1
7314   ac_status=$?
7315   grep -v '^ *+' conftest.er1 >conftest.err
7316   rm -f conftest.er1
7317   cat conftest.err >&5
7318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7319   (exit $ac_status); } &&
7320          { ac_try='test -z "$ac_c_werror_flag"
7321                          || test ! -s conftest.err'
7322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7323   (eval $ac_try) 2>&5
7324   ac_status=$?
7325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7326   (exit $ac_status); }; } &&
7327          { ac_try='test -s conftest$ac_exeext'
7328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7329   (eval $ac_try) 2>&5
7330   ac_status=$?
7331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7332   (exit $ac_status); }; }; then
7333   ac_cv_working_alloca_h=yes
7334 else
7335   echo "$as_me: failed program was:" >&5
7336 sed 's/^/| /' conftest.$ac_ext >&5
7337
7338 ac_cv_working_alloca_h=no
7339 fi
7340 rm -f conftest.err conftest.$ac_objext \
7341       conftest$ac_exeext conftest.$ac_ext
7342 fi
7343 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
7344 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7345 if test $ac_cv_working_alloca_h = yes; then
7346
7347 cat >>confdefs.h <<\_ACEOF
7348 #define HAVE_ALLOCA_H 1
7349 _ACEOF
7350
7351 fi
7352
7353 echo "$as_me:$LINENO: checking for alloca" >&5
7354 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7355 if test "${ac_cv_func_alloca_works+set}" = set; then
7356   echo $ECHO_N "(cached) $ECHO_C" >&6
7357 else
7358   cat >conftest.$ac_ext <<_ACEOF
7359 /* confdefs.h.  */
7360 _ACEOF
7361 cat confdefs.h >>conftest.$ac_ext
7362 cat >>conftest.$ac_ext <<_ACEOF
7363 /* end confdefs.h.  */
7364 #ifdef __GNUC__
7365 # define alloca __builtin_alloca
7366 #else
7367 # ifdef _MSC_VER
7368 #  include <malloc.h>
7369 #  define alloca _alloca
7370 # else
7371 #  if HAVE_ALLOCA_H
7372 #   include <alloca.h>
7373 #  else
7374 #   ifdef _AIX
7375  #pragma alloca
7376 #   else
7377 #    ifndef alloca /* predefined by HP cc +Olibcalls */
7378 char *alloca ();
7379 #    endif
7380 #   endif
7381 #  endif
7382 # endif
7383 #endif
7384
7385 int
7386 main ()
7387 {
7388 char *p = (char *) alloca (1);
7389   ;
7390   return 0;
7391 }
7392 _ACEOF
7393 rm -f conftest.$ac_objext conftest$ac_exeext
7394 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7395   (eval $ac_link) 2>conftest.er1
7396   ac_status=$?
7397   grep -v '^ *+' conftest.er1 >conftest.err
7398   rm -f conftest.er1
7399   cat conftest.err >&5
7400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7401   (exit $ac_status); } &&
7402          { ac_try='test -z "$ac_c_werror_flag"
7403                          || test ! -s conftest.err'
7404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7405   (eval $ac_try) 2>&5
7406   ac_status=$?
7407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7408   (exit $ac_status); }; } &&
7409          { ac_try='test -s conftest$ac_exeext'
7410   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7411   (eval $ac_try) 2>&5
7412   ac_status=$?
7413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7414   (exit $ac_status); }; }; then
7415   ac_cv_func_alloca_works=yes
7416 else
7417   echo "$as_me: failed program was:" >&5
7418 sed 's/^/| /' conftest.$ac_ext >&5
7419
7420 ac_cv_func_alloca_works=no
7421 fi
7422 rm -f conftest.err conftest.$ac_objext \
7423       conftest$ac_exeext conftest.$ac_ext
7424 fi
7425 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
7426 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
7427
7428 if test $ac_cv_func_alloca_works = yes; then
7429
7430 cat >>confdefs.h <<\_ACEOF
7431 #define HAVE_ALLOCA 1
7432 _ACEOF
7433
7434 else
7435   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7436 # that cause trouble.  Some versions do not even contain alloca or
7437 # contain a buggy version.  If you still want to use their alloca,
7438 # use ar to extract alloca.o from them instead of compiling alloca.c.
7439
7440 ALLOCA=alloca.$ac_objext
7441
7442 cat >>confdefs.h <<\_ACEOF
7443 #define C_ALLOCA 1
7444 _ACEOF
7445
7446
7447 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
7448 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
7449 if test "${ac_cv_os_cray+set}" = set; then
7450   echo $ECHO_N "(cached) $ECHO_C" >&6
7451 else
7452   cat >conftest.$ac_ext <<_ACEOF
7453 /* confdefs.h.  */
7454 _ACEOF
7455 cat confdefs.h >>conftest.$ac_ext
7456 cat >>conftest.$ac_ext <<_ACEOF
7457 /* end confdefs.h.  */
7458 #if defined(CRAY) && ! defined(CRAY2)
7459 webecray
7460 #else
7461 wenotbecray
7462 #endif
7463
7464 _ACEOF
7465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7466   $EGREP "webecray" >/dev/null 2>&1; then
7467   ac_cv_os_cray=yes
7468 else
7469   ac_cv_os_cray=no
7470 fi
7471 rm -f conftest*
7472
7473 fi
7474 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
7475 echo "${ECHO_T}$ac_cv_os_cray" >&6
7476 if test $ac_cv_os_cray = yes; then
7477   for ac_func in _getb67 GETB67 getb67; do
7478     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7479 echo "$as_me:$LINENO: checking for $ac_func" >&5
7480 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7481 if eval "test \"\${$as_ac_var+set}\" = set"; then
7482   echo $ECHO_N "(cached) $ECHO_C" >&6
7483 else
7484   cat >conftest.$ac_ext <<_ACEOF
7485 /* confdefs.h.  */
7486 _ACEOF
7487 cat confdefs.h >>conftest.$ac_ext
7488 cat >>conftest.$ac_ext <<_ACEOF
7489 /* end confdefs.h.  */
7490 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7491    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7492 #define $ac_func innocuous_$ac_func
7493
7494 /* System header to define __stub macros and hopefully few prototypes,
7495     which can conflict with char $ac_func (); below.
7496     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7497     <limits.h> exists even on freestanding compilers.  */
7498
7499 #ifdef __STDC__
7500 # include <limits.h>
7501 #else
7502 # include <assert.h>
7503 #endif
7504
7505 #undef $ac_func
7506
7507 /* Override any gcc2 internal prototype to avoid an error.  */
7508 #ifdef __cplusplus
7509 extern "C"
7510 {
7511 #endif
7512 /* We use char because int might match the return type of a gcc2
7513    builtin and then its argument prototype would still apply.  */
7514 char $ac_func ();
7515 /* The GNU C library defines this for functions which it implements
7516     to always fail with ENOSYS.  Some functions are actually named
7517     something starting with __ and the normal name is an alias.  */
7518 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7519 choke me
7520 #else
7521 char (*f) () = $ac_func;
7522 #endif
7523 #ifdef __cplusplus
7524 }
7525 #endif
7526
7527 int
7528 main ()
7529 {
7530 return f != $ac_func;
7531   ;
7532   return 0;
7533 }
7534 _ACEOF
7535 rm -f conftest.$ac_objext conftest$ac_exeext
7536 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7537   (eval $ac_link) 2>conftest.er1
7538   ac_status=$?
7539   grep -v '^ *+' conftest.er1 >conftest.err
7540   rm -f conftest.er1
7541   cat conftest.err >&5
7542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7543   (exit $ac_status); } &&
7544          { ac_try='test -z "$ac_c_werror_flag"
7545                          || test ! -s conftest.err'
7546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7547   (eval $ac_try) 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   eval "$as_ac_var=yes"
7558 else
7559   echo "$as_me: failed program was:" >&5
7560 sed 's/^/| /' conftest.$ac_ext >&5
7561
7562 eval "$as_ac_var=no"
7563 fi
7564 rm -f conftest.err conftest.$ac_objext \
7565       conftest$ac_exeext conftest.$ac_ext
7566 fi
7567 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7568 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7569 if test `eval echo '${'$as_ac_var'}'` = yes; then
7570
7571 cat >>confdefs.h <<_ACEOF
7572 #define CRAY_STACKSEG_END $ac_func
7573 _ACEOF
7574
7575     break
7576 fi
7577
7578   done
7579 fi
7580
7581 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
7582 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7583 if test "${ac_cv_c_stack_direction+set}" = set; then
7584   echo $ECHO_N "(cached) $ECHO_C" >&6
7585 else
7586   if test "$cross_compiling" = yes; then
7587   ac_cv_c_stack_direction=0
7588 else
7589   cat >conftest.$ac_ext <<_ACEOF
7590 /* confdefs.h.  */
7591 _ACEOF
7592 cat confdefs.h >>conftest.$ac_ext
7593 cat >>conftest.$ac_ext <<_ACEOF
7594 /* end confdefs.h.  */
7595 int
7596 find_stack_direction ()
7597 {
7598   static char *addr = 0;
7599   auto char dummy;
7600   if (addr == 0)
7601     {
7602       addr = &dummy;
7603       return find_stack_direction ();
7604     }
7605   else
7606     return (&dummy > addr) ? 1 : -1;
7607 }
7608
7609 int
7610 main ()
7611 {
7612   exit (find_stack_direction () < 0);
7613 }
7614 _ACEOF
7615 rm -f conftest$ac_exeext
7616 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7617   (eval $ac_link) 2>&5
7618   ac_status=$?
7619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7620   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7622   (eval $ac_try) 2>&5
7623   ac_status=$?
7624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7625   (exit $ac_status); }; }; then
7626   ac_cv_c_stack_direction=1
7627 else
7628   echo "$as_me: program exited with status $ac_status" >&5
7629 echo "$as_me: failed program was:" >&5
7630 sed 's/^/| /' conftest.$ac_ext >&5
7631
7632 ( exit $ac_status )
7633 ac_cv_c_stack_direction=-1
7634 fi
7635 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7636 fi
7637 fi
7638 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
7639 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
7640
7641 cat >>confdefs.h <<_ACEOF
7642 #define STACK_DIRECTION $ac_cv_c_stack_direction
7643 _ACEOF
7644
7645
7646 fi
7647
7648
7649
7650 for ac_header in stdlib.h unistd.h
7651 do
7652 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7653 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7654   echo "$as_me:$LINENO: checking for $ac_header" >&5
7655 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7656 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7657   echo $ECHO_N "(cached) $ECHO_C" >&6
7658 fi
7659 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7660 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7661 else
7662   # Is the header compilable?
7663 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7664 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7665 cat >conftest.$ac_ext <<_ACEOF
7666 /* confdefs.h.  */
7667 _ACEOF
7668 cat confdefs.h >>conftest.$ac_ext
7669 cat >>conftest.$ac_ext <<_ACEOF
7670 /* end confdefs.h.  */
7671 $ac_includes_default
7672 #include <$ac_header>
7673 _ACEOF
7674 rm -f conftest.$ac_objext
7675 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7676   (eval $ac_compile) 2>conftest.er1
7677   ac_status=$?
7678   grep -v '^ *+' conftest.er1 >conftest.err
7679   rm -f conftest.er1
7680   cat conftest.err >&5
7681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7682   (exit $ac_status); } &&
7683          { ac_try='test -z "$ac_c_werror_flag"
7684                          || test ! -s conftest.err'
7685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7686   (eval $ac_try) 2>&5
7687   ac_status=$?
7688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7689   (exit $ac_status); }; } &&
7690          { ac_try='test -s conftest.$ac_objext'
7691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7692   (eval $ac_try) 2>&5
7693   ac_status=$?
7694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7695   (exit $ac_status); }; }; then
7696   ac_header_compiler=yes
7697 else
7698   echo "$as_me: failed program was:" >&5
7699 sed 's/^/| /' conftest.$ac_ext >&5
7700
7701 ac_header_compiler=no
7702 fi
7703 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7704 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7705 echo "${ECHO_T}$ac_header_compiler" >&6
7706
7707 # Is the header present?
7708 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7709 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7710 cat >conftest.$ac_ext <<_ACEOF
7711 /* confdefs.h.  */
7712 _ACEOF
7713 cat confdefs.h >>conftest.$ac_ext
7714 cat >>conftest.$ac_ext <<_ACEOF
7715 /* end confdefs.h.  */
7716 #include <$ac_header>
7717 _ACEOF
7718 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7719   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7720   ac_status=$?
7721   grep -v '^ *+' conftest.er1 >conftest.err
7722   rm -f conftest.er1
7723   cat conftest.err >&5
7724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7725   (exit $ac_status); } >/dev/null; then
7726   if test -s conftest.err; then
7727     ac_cpp_err=$ac_c_preproc_warn_flag
7728     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7729   else
7730     ac_cpp_err=
7731   fi
7732 else
7733   ac_cpp_err=yes
7734 fi
7735 if test -z "$ac_cpp_err"; then
7736   ac_header_preproc=yes
7737 else
7738   echo "$as_me: failed program was:" >&5
7739 sed 's/^/| /' conftest.$ac_ext >&5
7740
7741   ac_header_preproc=no
7742 fi
7743 rm -f conftest.err conftest.$ac_ext
7744 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7745 echo "${ECHO_T}$ac_header_preproc" >&6
7746
7747 # So?  What about this header?
7748 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7749   yes:no: )
7750     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7751 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7752     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7753 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7754     ac_header_preproc=yes
7755     ;;
7756   no:yes:* )
7757     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7758 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7759     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7760 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7761     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7762 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7763     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7764 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7765     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7766 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7767     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7768 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7769     (
7770       cat <<\_ASBOX
7771 ## ------------------------------------------ ##
7772 ## Report this to the AC_PACKAGE_NAME lists.  ##
7773 ## ------------------------------------------ ##
7774 _ASBOX
7775     ) |
7776       sed "s/^/$as_me: WARNING:     /" >&2
7777     ;;
7778 esac
7779 echo "$as_me:$LINENO: checking for $ac_header" >&5
7780 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7781 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7782   echo $ECHO_N "(cached) $ECHO_C" >&6
7783 else
7784   eval "$as_ac_Header=\$ac_header_preproc"
7785 fi
7786 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7787 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7788
7789 fi
7790 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7791   cat >>confdefs.h <<_ACEOF
7792 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7793 _ACEOF
7794
7795 fi
7796
7797 done
7798
7799
7800 for ac_func in getpagesize
7801 do
7802 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7803 echo "$as_me:$LINENO: checking for $ac_func" >&5
7804 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7805 if eval "test \"\${$as_ac_var+set}\" = set"; then
7806   echo $ECHO_N "(cached) $ECHO_C" >&6
7807 else
7808   cat >conftest.$ac_ext <<_ACEOF
7809 /* confdefs.h.  */
7810 _ACEOF
7811 cat confdefs.h >>conftest.$ac_ext
7812 cat >>conftest.$ac_ext <<_ACEOF
7813 /* end confdefs.h.  */
7814 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7815    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7816 #define $ac_func innocuous_$ac_func
7817
7818 /* System header to define __stub macros and hopefully few prototypes,
7819     which can conflict with char $ac_func (); below.
7820     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7821     <limits.h> exists even on freestanding compilers.  */
7822
7823 #ifdef __STDC__
7824 # include <limits.h>
7825 #else
7826 # include <assert.h>
7827 #endif
7828
7829 #undef $ac_func
7830
7831 /* Override any gcc2 internal prototype to avoid an error.  */
7832 #ifdef __cplusplus
7833 extern "C"
7834 {
7835 #endif
7836 /* We use char because int might match the return type of a gcc2
7837    builtin and then its argument prototype would still apply.  */
7838 char $ac_func ();
7839 /* The GNU C library defines this for functions which it implements
7840     to always fail with ENOSYS.  Some functions are actually named
7841     something starting with __ and the normal name is an alias.  */
7842 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7843 choke me
7844 #else
7845 char (*f) () = $ac_func;
7846 #endif
7847 #ifdef __cplusplus
7848 }
7849 #endif
7850
7851 int
7852 main ()
7853 {
7854 return f != $ac_func;
7855   ;
7856   return 0;
7857 }
7858 _ACEOF
7859 rm -f conftest.$ac_objext conftest$ac_exeext
7860 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7861   (eval $ac_link) 2>conftest.er1
7862   ac_status=$?
7863   grep -v '^ *+' conftest.er1 >conftest.err
7864   rm -f conftest.er1
7865   cat conftest.err >&5
7866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7867   (exit $ac_status); } &&
7868          { ac_try='test -z "$ac_c_werror_flag"
7869                          || test ! -s conftest.err'
7870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7871   (eval $ac_try) 2>&5
7872   ac_status=$?
7873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7874   (exit $ac_status); }; } &&
7875          { ac_try='test -s conftest$ac_exeext'
7876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7877   (eval $ac_try) 2>&5
7878   ac_status=$?
7879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7880   (exit $ac_status); }; }; then
7881   eval "$as_ac_var=yes"
7882 else
7883   echo "$as_me: failed program was:" >&5
7884 sed 's/^/| /' conftest.$ac_ext >&5
7885
7886 eval "$as_ac_var=no"
7887 fi
7888 rm -f conftest.err conftest.$ac_objext \
7889       conftest$ac_exeext conftest.$ac_ext
7890 fi
7891 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7892 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7893 if test `eval echo '${'$as_ac_var'}'` = yes; then
7894   cat >>confdefs.h <<_ACEOF
7895 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7896 _ACEOF
7897
7898 fi
7899 done
7900
7901 echo "$as_me:$LINENO: checking for working mmap" >&5
7902 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7903 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7904   echo $ECHO_N "(cached) $ECHO_C" >&6
7905 else
7906   if test "$cross_compiling" = yes; then
7907   ac_cv_func_mmap_fixed_mapped=no
7908 else
7909   cat >conftest.$ac_ext <<_ACEOF
7910 /* confdefs.h.  */
7911 _ACEOF
7912 cat confdefs.h >>conftest.$ac_ext
7913 cat >>conftest.$ac_ext <<_ACEOF
7914 /* end confdefs.h.  */
7915 $ac_includes_default
7916 /* malloc might have been renamed as rpl_malloc. */
7917 #undef malloc
7918
7919 /* Thanks to Mike Haertel and Jim Avera for this test.
7920    Here is a matrix of mmap possibilities:
7921         mmap private not fixed
7922         mmap private fixed at somewhere currently unmapped
7923         mmap private fixed at somewhere already mapped
7924         mmap shared not fixed
7925         mmap shared fixed at somewhere currently unmapped
7926         mmap shared fixed at somewhere already mapped
7927    For private mappings, we should verify that changes cannot be read()
7928    back from the file, nor mmap's back from the file at a different
7929    address.  (There have been systems where private was not correctly
7930    implemented like the infamous i386 svr4.0, and systems where the
7931    VM page cache was not coherent with the file system buffer cache
7932    like early versions of FreeBSD and possibly contemporary NetBSD.)
7933    For shared mappings, we should conversely verify that changes get
7934    propagated back to all the places they're supposed to be.
7935
7936    Grep wants private fixed already mapped.
7937    The main things grep needs to know about mmap are:
7938    * does it exist and is it safe to write into the mmap'd area
7939    * how to use it (BSD variants)  */
7940
7941 #include <fcntl.h>
7942 #include <sys/mman.h>
7943
7944 #if !STDC_HEADERS && !HAVE_STDLIB_H
7945 char *malloc ();
7946 #endif
7947
7948 /* This mess was copied from the GNU getpagesize.h.  */
7949 #if !HAVE_GETPAGESIZE
7950 /* Assume that all systems that can run configure have sys/param.h.  */
7951 # if !HAVE_SYS_PARAM_H
7952 #  define HAVE_SYS_PARAM_H 1
7953 # endif
7954
7955 # ifdef _SC_PAGESIZE
7956 #  define getpagesize() sysconf(_SC_PAGESIZE)
7957 # else /* no _SC_PAGESIZE */
7958 #  if HAVE_SYS_PARAM_H
7959 #   include <sys/param.h>
7960 #   ifdef EXEC_PAGESIZE
7961 #    define getpagesize() EXEC_PAGESIZE
7962 #   else /* no EXEC_PAGESIZE */
7963 #    ifdef NBPG
7964 #     define getpagesize() NBPG * CLSIZE
7965 #     ifndef CLSIZE
7966 #      define CLSIZE 1
7967 #     endif /* no CLSIZE */
7968 #    else /* no NBPG */
7969 #     ifdef NBPC
7970 #      define getpagesize() NBPC
7971 #     else /* no NBPC */
7972 #      ifdef PAGESIZE
7973 #       define getpagesize() PAGESIZE
7974 #      endif /* PAGESIZE */
7975 #     endif /* no NBPC */
7976 #    endif /* no NBPG */
7977 #   endif /* no EXEC_PAGESIZE */
7978 #  else /* no HAVE_SYS_PARAM_H */
7979 #   define getpagesize() 8192   /* punt totally */
7980 #  endif /* no HAVE_SYS_PARAM_H */
7981 # endif /* no _SC_PAGESIZE */
7982
7983 #endif /* no HAVE_GETPAGESIZE */
7984
7985 int
7986 main ()
7987 {
7988   char *data, *data2, *data3;
7989   int i, pagesize;
7990   int fd;
7991
7992   pagesize = getpagesize ();
7993
7994   /* First, make a file with some known garbage in it. */
7995   data = (char *) malloc (pagesize);
7996   if (!data)
7997     exit (1);
7998   for (i = 0; i < pagesize; ++i)
7999     *(data + i) = rand ();
8000   umask (0);
8001   fd = creat ("conftest.mmap", 0600);
8002   if (fd < 0)
8003     exit (1);
8004   if (write (fd, data, pagesize) != pagesize)
8005     exit (1);
8006   close (fd);
8007
8008   /* Next, try to mmap the file at a fixed address which already has
8009      something else allocated at it.  If we can, also make sure that
8010      we see the same garbage.  */
8011   fd = open ("conftest.mmap", O_RDWR);
8012   if (fd < 0)
8013     exit (1);
8014   data2 = (char *) malloc (2 * pagesize);
8015   if (!data2)
8016     exit (1);
8017   data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
8018   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8019                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8020     exit (1);
8021   for (i = 0; i < pagesize; ++i)
8022     if (*(data + i) != *(data2 + i))
8023       exit (1);
8024
8025   /* Finally, make sure that changes to the mapped area do not
8026      percolate back to the file as seen by read().  (This is a bug on
8027      some variants of i386 svr4.0.)  */
8028   for (i = 0; i < pagesize; ++i)
8029     *(data2 + i) = *(data2 + i) + 1;
8030   data3 = (char *) malloc (pagesize);
8031   if (!data3)
8032     exit (1);
8033   if (read (fd, data3, pagesize) != pagesize)
8034     exit (1);
8035   for (i = 0; i < pagesize; ++i)
8036     if (*(data + i) != *(data3 + i))
8037       exit (1);
8038   close (fd);
8039   exit (0);
8040 }
8041 _ACEOF
8042 rm -f conftest$ac_exeext
8043 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8044   (eval $ac_link) 2>&5
8045   ac_status=$?
8046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8047   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8049   (eval $ac_try) 2>&5
8050   ac_status=$?
8051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8052   (exit $ac_status); }; }; then
8053   ac_cv_func_mmap_fixed_mapped=yes
8054 else
8055   echo "$as_me: program exited with status $ac_status" >&5
8056 echo "$as_me: failed program was:" >&5
8057 sed 's/^/| /' conftest.$ac_ext >&5
8058
8059 ( exit $ac_status )
8060 ac_cv_func_mmap_fixed_mapped=no
8061 fi
8062 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8063 fi
8064 fi
8065 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8066 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8067 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8068
8069 cat >>confdefs.h <<\_ACEOF
8070 #define HAVE_MMAP 1
8071 _ACEOF
8072
8073 fi
8074 rm -f conftest.mmap
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
8086 unistd.h sys/param.h
8087 do
8088 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8089 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8090   echo "$as_me:$LINENO: checking for $ac_header" >&5
8091 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8092 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8093   echo $ECHO_N "(cached) $ECHO_C" >&6
8094 fi
8095 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8096 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8097 else
8098   # Is the header compilable?
8099 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8100 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8101 cat >conftest.$ac_ext <<_ACEOF
8102 /* confdefs.h.  */
8103 _ACEOF
8104 cat confdefs.h >>conftest.$ac_ext
8105 cat >>conftest.$ac_ext <<_ACEOF
8106 /* end confdefs.h.  */
8107 $ac_includes_default
8108 #include <$ac_header>
8109 _ACEOF
8110 rm -f conftest.$ac_objext
8111 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8112   (eval $ac_compile) 2>conftest.er1
8113   ac_status=$?
8114   grep -v '^ *+' conftest.er1 >conftest.err
8115   rm -f conftest.er1
8116   cat conftest.err >&5
8117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8118   (exit $ac_status); } &&
8119          { ac_try='test -z "$ac_c_werror_flag"
8120                          || test ! -s conftest.err'
8121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8122   (eval $ac_try) 2>&5
8123   ac_status=$?
8124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8125   (exit $ac_status); }; } &&
8126          { ac_try='test -s conftest.$ac_objext'
8127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8128   (eval $ac_try) 2>&5
8129   ac_status=$?
8130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8131   (exit $ac_status); }; }; then
8132   ac_header_compiler=yes
8133 else
8134   echo "$as_me: failed program was:" >&5
8135 sed 's/^/| /' conftest.$ac_ext >&5
8136
8137 ac_header_compiler=no
8138 fi
8139 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8140 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8141 echo "${ECHO_T}$ac_header_compiler" >&6
8142
8143 # Is the header present?
8144 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8145 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8146 cat >conftest.$ac_ext <<_ACEOF
8147 /* confdefs.h.  */
8148 _ACEOF
8149 cat confdefs.h >>conftest.$ac_ext
8150 cat >>conftest.$ac_ext <<_ACEOF
8151 /* end confdefs.h.  */
8152 #include <$ac_header>
8153 _ACEOF
8154 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8155   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8156   ac_status=$?
8157   grep -v '^ *+' conftest.er1 >conftest.err
8158   rm -f conftest.er1
8159   cat conftest.err >&5
8160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8161   (exit $ac_status); } >/dev/null; then
8162   if test -s conftest.err; then
8163     ac_cpp_err=$ac_c_preproc_warn_flag
8164     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8165   else
8166     ac_cpp_err=
8167   fi
8168 else
8169   ac_cpp_err=yes
8170 fi
8171 if test -z "$ac_cpp_err"; then
8172   ac_header_preproc=yes
8173 else
8174   echo "$as_me: failed program was:" >&5
8175 sed 's/^/| /' conftest.$ac_ext >&5
8176
8177   ac_header_preproc=no
8178 fi
8179 rm -f conftest.err conftest.$ac_ext
8180 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8181 echo "${ECHO_T}$ac_header_preproc" >&6
8182
8183 # So?  What about this header?
8184 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8185   yes:no: )
8186     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8187 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8188     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8189 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8190     ac_header_preproc=yes
8191     ;;
8192   no:yes:* )
8193     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8194 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8195     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8196 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8197     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8198 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8199     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8200 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8201     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8202 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8203     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8204 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8205     (
8206       cat <<\_ASBOX
8207 ## ------------------------------------------ ##
8208 ## Report this to the AC_PACKAGE_NAME lists.  ##
8209 ## ------------------------------------------ ##
8210 _ASBOX
8211     ) |
8212       sed "s/^/$as_me: WARNING:     /" >&2
8213     ;;
8214 esac
8215 echo "$as_me:$LINENO: checking for $ac_header" >&5
8216 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8217 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8218   echo $ECHO_N "(cached) $ECHO_C" >&6
8219 else
8220   eval "$as_ac_Header=\$ac_header_preproc"
8221 fi
8222 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8223 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8224
8225 fi
8226 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8227   cat >>confdefs.h <<_ACEOF
8228 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8229 _ACEOF
8230
8231 fi
8232
8233 done
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
8247 strdup __argz_count __argz_stringify __argz_next
8248 do
8249 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8250 echo "$as_me:$LINENO: checking for $ac_func" >&5
8251 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8252 if eval "test \"\${$as_ac_var+set}\" = set"; then
8253   echo $ECHO_N "(cached) $ECHO_C" >&6
8254 else
8255   cat >conftest.$ac_ext <<_ACEOF
8256 /* confdefs.h.  */
8257 _ACEOF
8258 cat confdefs.h >>conftest.$ac_ext
8259 cat >>conftest.$ac_ext <<_ACEOF
8260 /* end confdefs.h.  */
8261 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8262    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8263 #define $ac_func innocuous_$ac_func
8264
8265 /* System header to define __stub macros and hopefully few prototypes,
8266     which can conflict with char $ac_func (); below.
8267     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8268     <limits.h> exists even on freestanding compilers.  */
8269
8270 #ifdef __STDC__
8271 # include <limits.h>
8272 #else
8273 # include <assert.h>
8274 #endif
8275
8276 #undef $ac_func
8277
8278 /* Override any gcc2 internal prototype to avoid an error.  */
8279 #ifdef __cplusplus
8280 extern "C"
8281 {
8282 #endif
8283 /* We use char because int might match the return type of a gcc2
8284    builtin and then its argument prototype would still apply.  */
8285 char $ac_func ();
8286 /* The GNU C library defines this for functions which it implements
8287     to always fail with ENOSYS.  Some functions are actually named
8288     something starting with __ and the normal name is an alias.  */
8289 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8290 choke me
8291 #else
8292 char (*f) () = $ac_func;
8293 #endif
8294 #ifdef __cplusplus
8295 }
8296 #endif
8297
8298 int
8299 main ()
8300 {
8301 return f != $ac_func;
8302   ;
8303   return 0;
8304 }
8305 _ACEOF
8306 rm -f conftest.$ac_objext conftest$ac_exeext
8307 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8308   (eval $ac_link) 2>conftest.er1
8309   ac_status=$?
8310   grep -v '^ *+' conftest.er1 >conftest.err
8311   rm -f conftest.er1
8312   cat conftest.err >&5
8313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8314   (exit $ac_status); } &&
8315          { ac_try='test -z "$ac_c_werror_flag"
8316                          || test ! -s conftest.err'
8317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8318   (eval $ac_try) 2>&5
8319   ac_status=$?
8320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8321   (exit $ac_status); }; } &&
8322          { ac_try='test -s conftest$ac_exeext'
8323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8324   (eval $ac_try) 2>&5
8325   ac_status=$?
8326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8327   (exit $ac_status); }; }; then
8328   eval "$as_ac_var=yes"
8329 else
8330   echo "$as_me: failed program was:" >&5
8331 sed 's/^/| /' conftest.$ac_ext >&5
8332
8333 eval "$as_ac_var=no"
8334 fi
8335 rm -f conftest.err conftest.$ac_objext \
8336       conftest$ac_exeext conftest.$ac_ext
8337 fi
8338 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8339 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8340 if test `eval echo '${'$as_ac_var'}'` = yes; then
8341   cat >>confdefs.h <<_ACEOF
8342 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8343 _ACEOF
8344
8345 fi
8346 done
8347
8348
8349    if test $ac_cv_header_locale_h = yes; then
8350     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
8351 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
8352 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
8353   echo $ECHO_N "(cached) $ECHO_C" >&6
8354 else
8355   cat >conftest.$ac_ext <<_ACEOF
8356 /* confdefs.h.  */
8357 _ACEOF
8358 cat confdefs.h >>conftest.$ac_ext
8359 cat >>conftest.$ac_ext <<_ACEOF
8360 /* end confdefs.h.  */
8361 #include <locale.h>
8362 int
8363 main ()
8364 {
8365 return LC_MESSAGES
8366   ;
8367   return 0;
8368 }
8369 _ACEOF
8370 rm -f conftest.$ac_objext conftest$ac_exeext
8371 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8372   (eval $ac_link) 2>conftest.er1
8373   ac_status=$?
8374   grep -v '^ *+' conftest.er1 >conftest.err
8375   rm -f conftest.er1
8376   cat conftest.err >&5
8377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8378   (exit $ac_status); } &&
8379          { ac_try='test -z "$ac_c_werror_flag"
8380                          || test ! -s conftest.err'
8381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8382   (eval $ac_try) 2>&5
8383   ac_status=$?
8384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8385   (exit $ac_status); }; } &&
8386          { ac_try='test -s conftest$ac_exeext'
8387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8388   (eval $ac_try) 2>&5
8389   ac_status=$?
8390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8391   (exit $ac_status); }; }; then
8392   am_cv_val_LC_MESSAGES=yes
8393 else
8394   echo "$as_me: failed program was:" >&5
8395 sed 's/^/| /' conftest.$ac_ext >&5
8396
8397 am_cv_val_LC_MESSAGES=no
8398 fi
8399 rm -f conftest.err conftest.$ac_objext \
8400       conftest$ac_exeext conftest.$ac_ext
8401 fi
8402 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
8403 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
8404     if test $am_cv_val_LC_MESSAGES = yes; then
8405
8406 cat >>confdefs.h <<\_ACEOF
8407 #define HAVE_LC_MESSAGES 1
8408 _ACEOF
8409
8410     fi
8411   fi
8412      USE_NLS=yes
8413
8414
8415         nls_cv_force_use_gnu_gettext="no"
8416
8417     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
8418     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
8419                               nls_cv_header_intl=
8420       nls_cv_header_libgt=
8421       CATOBJEXT=NONE
8422
8423       if test "${ac_cv_header_libintl_h+set}" = set; then
8424   echo "$as_me:$LINENO: checking for libintl.h" >&5
8425 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
8426 if test "${ac_cv_header_libintl_h+set}" = set; then
8427   echo $ECHO_N "(cached) $ECHO_C" >&6
8428 fi
8429 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
8430 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
8431 else
8432   # Is the header compilable?
8433 echo "$as_me:$LINENO: checking libintl.h usability" >&5
8434 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
8435 cat >conftest.$ac_ext <<_ACEOF
8436 /* confdefs.h.  */
8437 _ACEOF
8438 cat confdefs.h >>conftest.$ac_ext
8439 cat >>conftest.$ac_ext <<_ACEOF
8440 /* end confdefs.h.  */
8441 $ac_includes_default
8442 #include <libintl.h>
8443 _ACEOF
8444 rm -f conftest.$ac_objext
8445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8446   (eval $ac_compile) 2>conftest.er1
8447   ac_status=$?
8448   grep -v '^ *+' conftest.er1 >conftest.err
8449   rm -f conftest.er1
8450   cat conftest.err >&5
8451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8452   (exit $ac_status); } &&
8453          { ac_try='test -z "$ac_c_werror_flag"
8454                          || test ! -s conftest.err'
8455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8456   (eval $ac_try) 2>&5
8457   ac_status=$?
8458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8459   (exit $ac_status); }; } &&
8460          { ac_try='test -s conftest.$ac_objext'
8461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8462   (eval $ac_try) 2>&5
8463   ac_status=$?
8464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8465   (exit $ac_status); }; }; then
8466   ac_header_compiler=yes
8467 else
8468   echo "$as_me: failed program was:" >&5
8469 sed 's/^/| /' conftest.$ac_ext >&5
8470
8471 ac_header_compiler=no
8472 fi
8473 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8474 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8475 echo "${ECHO_T}$ac_header_compiler" >&6
8476
8477 # Is the header present?
8478 echo "$as_me:$LINENO: checking libintl.h presence" >&5
8479 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
8480 cat >conftest.$ac_ext <<_ACEOF
8481 /* confdefs.h.  */
8482 _ACEOF
8483 cat confdefs.h >>conftest.$ac_ext
8484 cat >>conftest.$ac_ext <<_ACEOF
8485 /* end confdefs.h.  */
8486 #include <libintl.h>
8487 _ACEOF
8488 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8489   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8490   ac_status=$?
8491   grep -v '^ *+' conftest.er1 >conftest.err
8492   rm -f conftest.er1
8493   cat conftest.err >&5
8494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8495   (exit $ac_status); } >/dev/null; then
8496   if test -s conftest.err; then
8497     ac_cpp_err=$ac_c_preproc_warn_flag
8498     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8499   else
8500     ac_cpp_err=
8501   fi
8502 else
8503   ac_cpp_err=yes
8504 fi
8505 if test -z "$ac_cpp_err"; then
8506   ac_header_preproc=yes
8507 else
8508   echo "$as_me: failed program was:" >&5
8509 sed 's/^/| /' conftest.$ac_ext >&5
8510
8511   ac_header_preproc=no
8512 fi
8513 rm -f conftest.err conftest.$ac_ext
8514 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8515 echo "${ECHO_T}$ac_header_preproc" >&6
8516
8517 # So?  What about this header?
8518 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8519   yes:no: )
8520     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
8521 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8522     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
8523 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
8524     ac_header_preproc=yes
8525     ;;
8526   no:yes:* )
8527     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
8528 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
8529     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
8530 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
8531     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
8532 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
8533     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
8534 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
8535     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
8536 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
8537     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
8538 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
8539     (
8540       cat <<\_ASBOX
8541 ## ------------------------------------------ ##
8542 ## Report this to the AC_PACKAGE_NAME lists.  ##
8543 ## ------------------------------------------ ##
8544 _ASBOX
8545     ) |
8546       sed "s/^/$as_me: WARNING:     /" >&2
8547     ;;
8548 esac
8549 echo "$as_me:$LINENO: checking for libintl.h" >&5
8550 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
8551 if test "${ac_cv_header_libintl_h+set}" = set; then
8552   echo $ECHO_N "(cached) $ECHO_C" >&6
8553 else
8554   ac_cv_header_libintl_h=$ac_header_preproc
8555 fi
8556 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
8557 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
8558
8559 fi
8560 if test $ac_cv_header_libintl_h = yes; then
8561   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
8562 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
8563 if test "${gt_cv_func_dgettext_libc+set}" = set; then
8564   echo $ECHO_N "(cached) $ECHO_C" >&6
8565 else
8566   cat >conftest.$ac_ext <<_ACEOF
8567 /* confdefs.h.  */
8568 _ACEOF
8569 cat confdefs.h >>conftest.$ac_ext
8570 cat >>conftest.$ac_ext <<_ACEOF
8571 /* end confdefs.h.  */
8572 #include <libintl.h>
8573 int
8574 main ()
8575 {
8576 return (int) dgettext ("","")
8577   ;
8578   return 0;
8579 }
8580 _ACEOF
8581 rm -f conftest.$ac_objext conftest$ac_exeext
8582 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8583   (eval $ac_link) 2>conftest.er1
8584   ac_status=$?
8585   grep -v '^ *+' conftest.er1 >conftest.err
8586   rm -f conftest.er1
8587   cat conftest.err >&5
8588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8589   (exit $ac_status); } &&
8590          { ac_try='test -z "$ac_c_werror_flag"
8591                          || test ! -s conftest.err'
8592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8593   (eval $ac_try) 2>&5
8594   ac_status=$?
8595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8596   (exit $ac_status); }; } &&
8597          { ac_try='test -s conftest$ac_exeext'
8598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8599   (eval $ac_try) 2>&5
8600   ac_status=$?
8601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8602   (exit $ac_status); }; }; then
8603   gt_cv_func_dgettext_libc=yes
8604 else
8605   echo "$as_me: failed program was:" >&5
8606 sed 's/^/| /' conftest.$ac_ext >&5
8607
8608 gt_cv_func_dgettext_libc=no
8609 fi
8610 rm -f conftest.err conftest.$ac_objext \
8611       conftest$ac_exeext conftest.$ac_ext
8612 fi
8613 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
8614 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
8615
8616           if test "$gt_cv_func_dgettext_libc" != "yes"; then
8617             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
8618 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
8619 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
8620   echo $ECHO_N "(cached) $ECHO_C" >&6
8621 else
8622   ac_check_lib_save_LIBS=$LIBS
8623 LIBS="-lintl  $LIBS"
8624 cat >conftest.$ac_ext <<_ACEOF
8625 /* confdefs.h.  */
8626 _ACEOF
8627 cat confdefs.h >>conftest.$ac_ext
8628 cat >>conftest.$ac_ext <<_ACEOF
8629 /* end confdefs.h.  */
8630
8631 /* Override any gcc2 internal prototype to avoid an error.  */
8632 #ifdef __cplusplus
8633 extern "C"
8634 #endif
8635 /* We use char because int might match the return type of a gcc2
8636    builtin and then its argument prototype would still apply.  */
8637 char bindtextdomain ();
8638 int
8639 main ()
8640 {
8641 bindtextdomain ();
8642   ;
8643   return 0;
8644 }
8645 _ACEOF
8646 rm -f conftest.$ac_objext conftest$ac_exeext
8647 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8648   (eval $ac_link) 2>conftest.er1
8649   ac_status=$?
8650   grep -v '^ *+' conftest.er1 >conftest.err
8651   rm -f conftest.er1
8652   cat conftest.err >&5
8653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8654   (exit $ac_status); } &&
8655          { ac_try='test -z "$ac_c_werror_flag"
8656                          || test ! -s conftest.err'
8657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8658   (eval $ac_try) 2>&5
8659   ac_status=$?
8660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8661   (exit $ac_status); }; } &&
8662          { ac_try='test -s conftest$ac_exeext'
8663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8664   (eval $ac_try) 2>&5
8665   ac_status=$?
8666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8667   (exit $ac_status); }; }; then
8668   ac_cv_lib_intl_bindtextdomain=yes
8669 else
8670   echo "$as_me: failed program was:" >&5
8671 sed 's/^/| /' conftest.$ac_ext >&5
8672
8673 ac_cv_lib_intl_bindtextdomain=no
8674 fi
8675 rm -f conftest.err conftest.$ac_objext \
8676       conftest$ac_exeext conftest.$ac_ext
8677 LIBS=$ac_check_lib_save_LIBS
8678 fi
8679 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
8680 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
8681 if test $ac_cv_lib_intl_bindtextdomain = yes; then
8682   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
8683 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
8684 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
8685   echo $ECHO_N "(cached) $ECHO_C" >&6
8686 else
8687   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
8688 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
8689 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
8690   echo $ECHO_N "(cached) $ECHO_C" >&6
8691 else
8692   ac_check_lib_save_LIBS=$LIBS
8693 LIBS="-lintl  $LIBS"
8694 cat >conftest.$ac_ext <<_ACEOF
8695 /* confdefs.h.  */
8696 _ACEOF
8697 cat confdefs.h >>conftest.$ac_ext
8698 cat >>conftest.$ac_ext <<_ACEOF
8699 /* end confdefs.h.  */
8700
8701 /* Override any gcc2 internal prototype to avoid an error.  */
8702 #ifdef __cplusplus
8703 extern "C"
8704 #endif
8705 /* We use char because int might match the return type of a gcc2
8706    builtin and then its argument prototype would still apply.  */
8707 char dgettext ();
8708 int
8709 main ()
8710 {
8711 dgettext ();
8712   ;
8713   return 0;
8714 }
8715 _ACEOF
8716 rm -f conftest.$ac_objext conftest$ac_exeext
8717 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8718   (eval $ac_link) 2>conftest.er1
8719   ac_status=$?
8720   grep -v '^ *+' conftest.er1 >conftest.err
8721   rm -f conftest.er1
8722   cat conftest.err >&5
8723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8724   (exit $ac_status); } &&
8725          { ac_try='test -z "$ac_c_werror_flag"
8726                          || test ! -s conftest.err'
8727   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8728   (eval $ac_try) 2>&5
8729   ac_status=$?
8730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8731   (exit $ac_status); }; } &&
8732          { ac_try='test -s conftest$ac_exeext'
8733   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8734   (eval $ac_try) 2>&5
8735   ac_status=$?
8736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8737   (exit $ac_status); }; }; then
8738   ac_cv_lib_intl_dgettext=yes
8739 else
8740   echo "$as_me: failed program was:" >&5
8741 sed 's/^/| /' conftest.$ac_ext >&5
8742
8743 ac_cv_lib_intl_dgettext=no
8744 fi
8745 rm -f conftest.err conftest.$ac_objext \
8746       conftest$ac_exeext conftest.$ac_ext
8747 LIBS=$ac_check_lib_save_LIBS
8748 fi
8749 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
8750 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
8751 if test $ac_cv_lib_intl_dgettext = yes; then
8752   gt_cv_func_dgettext_libintl=yes
8753 else
8754   gt_cv_func_dgettext_libintl=no
8755 fi
8756
8757 fi
8758 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
8759 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
8760 fi
8761
8762           fi
8763
8764           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
8765             LIBS="$LIBS -lintl";
8766           fi
8767
8768           if test "$gt_cv_func_dgettext_libc" = "yes" \
8769             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
8770
8771 cat >>confdefs.h <<\_ACEOF
8772 #define HAVE_GETTEXT 1
8773 _ACEOF
8774
8775             # Extract the first word of "msgfmt", so it can be a program name with args.
8776 set dummy msgfmt; ac_word=$2
8777 echo "$as_me:$LINENO: checking for $ac_word" >&5
8778 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8779 if test "${ac_cv_path_MSGFMT+set}" = set; then
8780   echo $ECHO_N "(cached) $ECHO_C" >&6
8781 else
8782   case "$MSGFMT" in
8783   /*)
8784   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8785   ;;
8786   *)
8787   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8788   for ac_dir in $PATH; do
8789     test -z "$ac_dir" && ac_dir=.
8790     if test -f $ac_dir/$ac_word; then
8791       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
8792         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
8793         break
8794       fi
8795     fi
8796   done
8797   IFS="$ac_save_ifs"
8798   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
8799   ;;
8800 esac
8801 fi
8802 MSGFMT="$ac_cv_path_MSGFMT"
8803 if test -n "$MSGFMT"; then
8804   echo "$as_me:$LINENO: result: $MSGFMT" >&5
8805 echo "${ECHO_T}$MSGFMT" >&6
8806 else
8807   echo "$as_me:$LINENO: result: no" >&5
8808 echo "${ECHO_T}no" >&6
8809 fi
8810             if test "$MSGFMT" != "no"; then
8811
8812 for ac_func in dcgettext
8813 do
8814 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8815 echo "$as_me:$LINENO: checking for $ac_func" >&5
8816 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8817 if eval "test \"\${$as_ac_var+set}\" = set"; then
8818   echo $ECHO_N "(cached) $ECHO_C" >&6
8819 else
8820   cat >conftest.$ac_ext <<_ACEOF
8821 /* confdefs.h.  */
8822 _ACEOF
8823 cat confdefs.h >>conftest.$ac_ext
8824 cat >>conftest.$ac_ext <<_ACEOF
8825 /* end confdefs.h.  */
8826 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8827    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8828 #define $ac_func innocuous_$ac_func
8829
8830 /* System header to define __stub macros and hopefully few prototypes,
8831     which can conflict with char $ac_func (); below.
8832     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8833     <limits.h> exists even on freestanding compilers.  */
8834
8835 #ifdef __STDC__
8836 # include <limits.h>
8837 #else
8838 # include <assert.h>
8839 #endif
8840
8841 #undef $ac_func
8842
8843 /* Override any gcc2 internal prototype to avoid an error.  */
8844 #ifdef __cplusplus
8845 extern "C"
8846 {
8847 #endif
8848 /* We use char because int might match the return type of a gcc2
8849    builtin and then its argument prototype would still apply.  */
8850 char $ac_func ();
8851 /* The GNU C library defines this for functions which it implements
8852     to always fail with ENOSYS.  Some functions are actually named
8853     something starting with __ and the normal name is an alias.  */
8854 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8855 choke me
8856 #else
8857 char (*f) () = $ac_func;
8858 #endif
8859 #ifdef __cplusplus
8860 }
8861 #endif
8862
8863 int
8864 main ()
8865 {
8866 return f != $ac_func;
8867   ;
8868   return 0;
8869 }
8870 _ACEOF
8871 rm -f conftest.$ac_objext conftest$ac_exeext
8872 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8873   (eval $ac_link) 2>conftest.er1
8874   ac_status=$?
8875   grep -v '^ *+' conftest.er1 >conftest.err
8876   rm -f conftest.er1
8877   cat conftest.err >&5
8878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8879   (exit $ac_status); } &&
8880          { ac_try='test -z "$ac_c_werror_flag"
8881                          || test ! -s conftest.err'
8882   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8883   (eval $ac_try) 2>&5
8884   ac_status=$?
8885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8886   (exit $ac_status); }; } &&
8887          { ac_try='test -s conftest$ac_exeext'
8888   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8889   (eval $ac_try) 2>&5
8890   ac_status=$?
8891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8892   (exit $ac_status); }; }; then
8893   eval "$as_ac_var=yes"
8894 else
8895   echo "$as_me: failed program was:" >&5
8896 sed 's/^/| /' conftest.$ac_ext >&5
8897
8898 eval "$as_ac_var=no"
8899 fi
8900 rm -f conftest.err conftest.$ac_objext \
8901       conftest$ac_exeext conftest.$ac_ext
8902 fi
8903 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8904 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8905 if test `eval echo '${'$as_ac_var'}'` = yes; then
8906   cat >>confdefs.h <<_ACEOF
8907 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8908 _ACEOF
8909
8910 fi
8911 done
8912
8913               # Extract the first word of "gmsgfmt", so it can be a program name with args.
8914 set dummy gmsgfmt; ac_word=$2
8915 echo "$as_me:$LINENO: checking for $ac_word" >&5
8916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8917 if test "${ac_cv_path_GMSGFMT+set}" = set; then
8918   echo $ECHO_N "(cached) $ECHO_C" >&6
8919 else
8920   case $GMSGFMT in
8921   [\\/]* | ?:[\\/]*)
8922   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8923   ;;
8924   *)
8925   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8926 for as_dir in $PATH
8927 do
8928   IFS=$as_save_IFS
8929   test -z "$as_dir" && as_dir=.
8930   for ac_exec_ext in '' $ac_executable_extensions; do
8931   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8932     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
8933     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8934     break 2
8935   fi
8936 done
8937 done
8938
8939   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8940   ;;
8941 esac
8942 fi
8943 GMSGFMT=$ac_cv_path_GMSGFMT
8944
8945 if test -n "$GMSGFMT"; then
8946   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
8947 echo "${ECHO_T}$GMSGFMT" >&6
8948 else
8949   echo "$as_me:$LINENO: result: no" >&5
8950 echo "${ECHO_T}no" >&6
8951 fi
8952
8953               # Extract the first word of "xgettext", so it can be a program name with args.
8954 set dummy xgettext; ac_word=$2
8955 echo "$as_me:$LINENO: checking for $ac_word" >&5
8956 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8957 if test "${ac_cv_path_XGETTEXT+set}" = set; then
8958   echo $ECHO_N "(cached) $ECHO_C" >&6
8959 else
8960   case "$XGETTEXT" in
8961   /*)
8962   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8963   ;;
8964   *)
8965   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8966   for ac_dir in $PATH; do
8967     test -z "$ac_dir" && ac_dir=.
8968     if test -f $ac_dir/$ac_word; then
8969       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8970         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8971         break
8972       fi
8973     fi
8974   done
8975   IFS="$ac_save_ifs"
8976   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8977   ;;
8978 esac
8979 fi
8980 XGETTEXT="$ac_cv_path_XGETTEXT"
8981 if test -n "$XGETTEXT"; then
8982   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
8983 echo "${ECHO_T}$XGETTEXT" >&6
8984 else
8985   echo "$as_me:$LINENO: result: no" >&5
8986 echo "${ECHO_T}no" >&6
8987 fi
8988
8989               cat >conftest.$ac_ext <<_ACEOF
8990 /* confdefs.h.  */
8991 _ACEOF
8992 cat confdefs.h >>conftest.$ac_ext
8993 cat >>conftest.$ac_ext <<_ACEOF
8994 /* end confdefs.h.  */
8995
8996 int
8997 main ()
8998 {
8999 extern int _nl_msg_cat_cntr;
9000                              return _nl_msg_cat_cntr
9001   ;
9002   return 0;
9003 }
9004 _ACEOF
9005 rm -f conftest.$ac_objext conftest$ac_exeext
9006 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9007   (eval $ac_link) 2>conftest.er1
9008   ac_status=$?
9009   grep -v '^ *+' conftest.er1 >conftest.err
9010   rm -f conftest.er1
9011   cat conftest.err >&5
9012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9013   (exit $ac_status); } &&
9014          { ac_try='test -z "$ac_c_werror_flag"
9015                          || test ! -s conftest.err'
9016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9017   (eval $ac_try) 2>&5
9018   ac_status=$?
9019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9020   (exit $ac_status); }; } &&
9021          { ac_try='test -s conftest$ac_exeext'
9022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9023   (eval $ac_try) 2>&5
9024   ac_status=$?
9025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9026   (exit $ac_status); }; }; then
9027   CATOBJEXT=.gmo
9028                  DATADIRNAME=share
9029 else
9030   echo "$as_me: failed program was:" >&5
9031 sed 's/^/| /' conftest.$ac_ext >&5
9032
9033 CATOBJEXT=.mo
9034                  DATADIRNAME=lib
9035 fi
9036 rm -f conftest.err conftest.$ac_objext \
9037       conftest$ac_exeext conftest.$ac_ext
9038               INSTOBJEXT=.mo
9039             fi
9040           fi
9041
9042           # Added by Martin Baulig 12/15/98 for libc5 systems
9043           if test "$gt_cv_func_dgettext_libc" != "yes" \
9044             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
9045             INTLLIBS=-lintl
9046             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
9047           fi
9048
9049 fi
9050
9051
9052
9053       if test "$CATOBJEXT" = "NONE"; then
9054                         nls_cv_use_gnu_gettext=yes
9055       fi
9056     fi
9057
9058     if test "$nls_cv_use_gnu_gettext" != "yes"; then
9059
9060 cat >>confdefs.h <<\_ACEOF
9061 #define ENABLE_NLS 1
9062 _ACEOF
9063
9064     else
9065             CATOBJEXT=
9066     fi
9067
9068         if test "$XGETTEXT" != ":"; then
9069                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9070         : ;
9071       else
9072         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
9073 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
9074         XGETTEXT=":"
9075       fi
9076     fi
9077
9078     # We need to process the po/ directory.
9079     POSUB=po
9080
9081               ac_config_commands="$ac_config_commands default-2"
9082
9083
9084                 for lang in $ALL_LINGUAS; do
9085       GMOFILES="$GMOFILES $lang.gmo"
9086       POFILES="$POFILES $lang.po"
9087     done
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101    if test "x$CATOBJEXT" != "x"; then
9102      if test "x$ALL_LINGUAS" = "x"; then
9103        LINGUAS=
9104      else
9105        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9106 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
9107        NEW_LINGUAS=
9108        for lang in ${LINGUAS=$ALL_LINGUAS}; do
9109          case "$ALL_LINGUAS" in
9110           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
9111          esac
9112        done
9113        LINGUAS=$NEW_LINGUAS
9114        echo "$as_me:$LINENO: result: $LINGUAS" >&5
9115 echo "${ECHO_T}$LINGUAS" >&6
9116      fi
9117
9118           if test -n "$LINGUAS"; then
9119        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9120      fi
9121    fi
9122
9123             test -d po || mkdir po
9124    if test "$CATOBJEXT" = ".cat"; then
9125      if test "${ac_cv_header_linux_version_h+set}" = set; then
9126   echo "$as_me:$LINENO: checking for linux/version.h" >&5
9127 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
9128 if test "${ac_cv_header_linux_version_h+set}" = set; then
9129   echo $ECHO_N "(cached) $ECHO_C" >&6
9130 fi
9131 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9132 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
9133 else
9134   # Is the header compilable?
9135 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
9136 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
9137 cat >conftest.$ac_ext <<_ACEOF
9138 /* confdefs.h.  */
9139 _ACEOF
9140 cat confdefs.h >>conftest.$ac_ext
9141 cat >>conftest.$ac_ext <<_ACEOF
9142 /* end confdefs.h.  */
9143 $ac_includes_default
9144 #include <linux/version.h>
9145 _ACEOF
9146 rm -f conftest.$ac_objext
9147 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9148   (eval $ac_compile) 2>conftest.er1
9149   ac_status=$?
9150   grep -v '^ *+' conftest.er1 >conftest.err
9151   rm -f conftest.er1
9152   cat conftest.err >&5
9153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9154   (exit $ac_status); } &&
9155          { ac_try='test -z "$ac_c_werror_flag"
9156                          || test ! -s conftest.err'
9157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9158   (eval $ac_try) 2>&5
9159   ac_status=$?
9160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9161   (exit $ac_status); }; } &&
9162          { ac_try='test -s conftest.$ac_objext'
9163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9164   (eval $ac_try) 2>&5
9165   ac_status=$?
9166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9167   (exit $ac_status); }; }; then
9168   ac_header_compiler=yes
9169 else
9170   echo "$as_me: failed program was:" >&5
9171 sed 's/^/| /' conftest.$ac_ext >&5
9172
9173 ac_header_compiler=no
9174 fi
9175 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9176 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9177 echo "${ECHO_T}$ac_header_compiler" >&6
9178
9179 # Is the header present?
9180 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
9181 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
9182 cat >conftest.$ac_ext <<_ACEOF
9183 /* confdefs.h.  */
9184 _ACEOF
9185 cat confdefs.h >>conftest.$ac_ext
9186 cat >>conftest.$ac_ext <<_ACEOF
9187 /* end confdefs.h.  */
9188 #include <linux/version.h>
9189 _ACEOF
9190 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9191   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9192   ac_status=$?
9193   grep -v '^ *+' conftest.er1 >conftest.err
9194   rm -f conftest.er1
9195   cat conftest.err >&5
9196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9197   (exit $ac_status); } >/dev/null; then
9198   if test -s conftest.err; then
9199     ac_cpp_err=$ac_c_preproc_warn_flag
9200     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9201   else
9202     ac_cpp_err=
9203   fi
9204 else
9205   ac_cpp_err=yes
9206 fi
9207 if test -z "$ac_cpp_err"; then
9208   ac_header_preproc=yes
9209 else
9210   echo "$as_me: failed program was:" >&5
9211 sed 's/^/| /' conftest.$ac_ext >&5
9212
9213   ac_header_preproc=no
9214 fi
9215 rm -f conftest.err conftest.$ac_ext
9216 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9217 echo "${ECHO_T}$ac_header_preproc" >&6
9218
9219 # So?  What about this header?
9220 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9221   yes:no: )
9222     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
9223 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9224     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
9225 echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
9226     ac_header_preproc=yes
9227     ;;
9228   no:yes:* )
9229     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
9230 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
9231     { echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
9232 echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
9233     { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
9234 echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
9235     { echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
9236 echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9237     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
9238 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
9239     { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
9240 echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
9241     (
9242       cat <<\_ASBOX
9243 ## ------------------------------------------ ##
9244 ## Report this to the AC_PACKAGE_NAME lists.  ##
9245 ## ------------------------------------------ ##
9246 _ASBOX
9247     ) |
9248       sed "s/^/$as_me: WARNING:     /" >&2
9249     ;;
9250 esac
9251 echo "$as_me:$LINENO: checking for linux/version.h" >&5
9252 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
9253 if test "${ac_cv_header_linux_version_h+set}" = set; then
9254   echo $ECHO_N "(cached) $ECHO_C" >&6
9255 else
9256   ac_cv_header_linux_version_h=$ac_header_preproc
9257 fi
9258 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9259 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
9260
9261 fi
9262 if test $ac_cv_header_linux_version_h = yes; then
9263   msgformat=linux
9264 else
9265   msgformat=xopen
9266 fi
9267
9268
9269
9270                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
9271    fi
9272
9273             MKINSTALLDIRS=
9274 #
9275 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
9276 #
9277 #   if test -n "$ac_aux_dir"; then
9278 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
9279 #   fi
9280    if test -z "$MKINSTALLDIRS"; then
9281      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
9282    fi
9283
9284    # jwz: you know what, screw it.  Let's just use the version that I
9285    # already computed in configure.in, instead of this version that came
9286    # with the i18n crud, ok?
9287    MKINSTALLDIRS="$INSTALL_DIRS"
9288
9289
9290
9291
9292          test -d po || mkdir po
9293    if test "x$srcdir" != "x."; then
9294      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
9295        posrcprefix="$srcdir/"
9296      else
9297        posrcprefix="../$srcdir/"
9298      fi
9299    else
9300      posrcprefix="../"
9301    fi
9302    rm -f po/POTFILES
9303    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
9304         < $srcdir/po/POTFILES.in > po/POTFILES
9305
9306 MKINSTALLDIRS="$INSTALL_DIRS"
9307
9308
9309 ###############################################################################
9310 #
9311 #       Check for -lXmu (some fucked up vendors don't ship it...)
9312 #
9313 ###############################################################################
9314
9315 have_xmu=no
9316
9317   ac_save_CPPFLAGS="$CPPFLAGS"
9318   if test \! -z "$includedir" ; then
9319     CPPFLAGS="$CPPFLAGS -I$includedir"
9320   fi
9321   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9322   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
9323 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
9324 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
9325   echo $ECHO_N "(cached) $ECHO_C" >&6
9326 else
9327   cat >conftest.$ac_ext <<_ACEOF
9328 /* confdefs.h.  */
9329 _ACEOF
9330 cat confdefs.h >>conftest.$ac_ext
9331 cat >>conftest.$ac_ext <<_ACEOF
9332 /* end confdefs.h.  */
9333 #include <stdlib.h>
9334                    #include <stdio.h>
9335                    #include <X11/Intrinsic.h>
9336
9337 #include <X11/Xmu/Error.h>
9338 _ACEOF
9339 rm -f conftest.$ac_objext
9340 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9341   (eval $ac_compile) 2>conftest.er1
9342   ac_status=$?
9343   grep -v '^ *+' conftest.er1 >conftest.err
9344   rm -f conftest.er1
9345   cat conftest.err >&5
9346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9347   (exit $ac_status); } &&
9348          { ac_try='test -z "$ac_c_werror_flag"
9349                          || test ! -s conftest.err'
9350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9351   (eval $ac_try) 2>&5
9352   ac_status=$?
9353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9354   (exit $ac_status); }; } &&
9355          { ac_try='test -s conftest.$ac_objext'
9356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9357   (eval $ac_try) 2>&5
9358   ac_status=$?
9359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9360   (exit $ac_status); }; }; then
9361   ac_cv_header_X11_Xmu_Error_h=yes
9362 else
9363   echo "$as_me: failed program was:" >&5
9364 sed 's/^/| /' conftest.$ac_ext >&5
9365
9366 ac_cv_header_X11_Xmu_Error_h=no
9367 fi
9368 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9369 fi
9370 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
9371 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
9372 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
9373   have_xmu=yes
9374 fi
9375
9376
9377   CPPFLAGS="$ac_save_CPPFLAGS"
9378 if test "$have_xmu" = no ; then
9379   XMU_SRCS='$(UTILS_SRC)/xmu.c'
9380   XMU_OBJS='$(UTILS_BIN)/xmu.o'
9381   XMU_LIBS=''
9382 else
9383   XMU_SRCS=''
9384   XMU_OBJS=''
9385   XMU_LIBS='-lXmu'
9386   cat >>confdefs.h <<\_ACEOF
9387 #define HAVE_XMU 1
9388 _ACEOF
9389
9390 fi
9391
9392
9393 ###############################################################################
9394 #
9395 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
9396 #       See comp.windows.x FAQ question 124.  The right fix is to
9397 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
9398 #
9399 ###############################################################################
9400
9401 if test "$have_xmu" = yes ; then
9402   case "$host" in
9403     *-sunos4*)
9404     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
9405 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
9406 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
9407   echo $ECHO_N "(cached) $ECHO_C" >&6
9408 else
9409   ac_save_LDFLAGS="$LDFLAGS"
9410                     if test \! -z "$x_libraries" ; then
9411                       LDFLAGS="$LDFLAGS -L$x_libraries"
9412                     fi
9413                     # Note: this trick never works!  (Generally.)
9414                     # We're only getting away with using AC_TRY_LINK
9415                     # with X libraries because we know it's SunOS.
9416                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
9417                     cat >conftest.$ac_ext <<_ACEOF
9418 /* confdefs.h.  */
9419 _ACEOF
9420 cat confdefs.h >>conftest.$ac_ext
9421 cat >>conftest.$ac_ext <<_ACEOF
9422 /* end confdefs.h.  */
9423
9424 int
9425 main ()
9426 {
9427
9428   ;
9429   return 0;
9430 }
9431 _ACEOF
9432 rm -f conftest.$ac_objext conftest$ac_exeext
9433 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9434   (eval $ac_link) 2>conftest.er1
9435   ac_status=$?
9436   grep -v '^ *+' conftest.er1 >conftest.err
9437   rm -f conftest.er1
9438   cat conftest.err >&5
9439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9440   (exit $ac_status); } &&
9441          { ac_try='test -z "$ac_c_werror_flag"
9442                          || test ! -s conftest.err'
9443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9444   (eval $ac_try) 2>&5
9445   ac_status=$?
9446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9447   (exit $ac_status); }; } &&
9448          { ac_try='test -s conftest$ac_exeext'
9449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9450   (eval $ac_try) 2>&5
9451   ac_status=$?
9452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9453   (exit $ac_status); }; }; then
9454   ac_cv_sunos_xmu_bug=no
9455 else
9456   echo "$as_me: failed program was:" >&5
9457 sed 's/^/| /' conftest.$ac_ext >&5
9458
9459 ac_cv_sunos_xmu_bug=yes
9460 fi
9461 rm -f conftest.err conftest.$ac_objext \
9462       conftest$ac_exeext conftest.$ac_ext
9463                     LDFLAGS="$ac_save_LDFLAGS"
9464 fi
9465 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
9466 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
9467     if test "$ac_cv_sunos_xmu_bug" = yes ; then
9468       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
9469 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
9470 if test "${ac_cv_ld_static+set}" = set; then
9471   echo $ECHO_N "(cached) $ECHO_C" >&6
9472 else
9473   ac_save_LDFLAGS="$LDFLAGS"
9474                       LDFLAGS="$LDFLAGS -static"
9475                       cat >conftest.$ac_ext <<_ACEOF
9476 /* confdefs.h.  */
9477 _ACEOF
9478 cat confdefs.h >>conftest.$ac_ext
9479 cat >>conftest.$ac_ext <<_ACEOF
9480 /* end confdefs.h.  */
9481
9482 int
9483 main ()
9484 {
9485
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>conftest.er1
9493   ac_status=$?
9494   grep -v '^ *+' conftest.er1 >conftest.err
9495   rm -f conftest.er1
9496   cat conftest.err >&5
9497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9498   (exit $ac_status); } &&
9499          { ac_try='test -z "$ac_c_werror_flag"
9500                          || test ! -s conftest.err'
9501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9502   (eval $ac_try) 2>&5
9503   ac_status=$?
9504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9505   (exit $ac_status); }; } &&
9506          { ac_try='test -s conftest$ac_exeext'
9507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9508   (eval $ac_try) 2>&5
9509   ac_status=$?
9510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9511   (exit $ac_status); }; }; then
9512   ac_cv_ld_static=yes
9513 else
9514   echo "$as_me: failed program was:" >&5
9515 sed 's/^/| /' conftest.$ac_ext >&5
9516
9517 ac_cv_ld_static=no
9518 fi
9519 rm -f conftest.err conftest.$ac_objext \
9520       conftest$ac_exeext conftest.$ac_ext
9521                     LDFLAGS="$ac_save_LDFLAGS"
9522 fi
9523 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
9524 echo "${ECHO_T}$ac_cv_ld_static" >&6
9525       if test "$ac_cv_ld_static" = yes ; then
9526         LDFLAGS="$LDFLAGS -static"
9527       else
9528         LDFLAGS="$LDFLAGS -Bstatic"
9529       fi
9530     fi
9531     ;;
9532   esac
9533 fi
9534
9535
9536 ###############################################################################
9537 #
9538 #       Handle the --with-hackdir option
9539 #
9540 ###############################################################################
9541
9542 have_hackdir=yes
9543 with_hackdir_req=unspecified
9544
9545 # Check whether --with-hackdir or --without-hackdir was given.
9546 if test "${with_hackdir+set}" = set; then
9547   withval="$with_hackdir"
9548   with_hackdir="$withval"; with_hackdir_req="$withval"
9549 else
9550   with_hackdir=yes
9551 fi;
9552
9553 if test x"$with_hackdir" = xyes; then
9554   HACKDIR='${exec_prefix}/lib/xscreensaver'
9555 elif test x"$with_hackdir" = xno; then
9556   HACKDIR='${bindir}'
9557 else
9558   # there must be a better way than this...
9559   if test -z "`echo $with_hackdir | sed 's@^/.*@@'`" ; then
9560     # absolute path
9561     HACKDIR=$with_hackdir
9562   else
9563     # relative path
9564     HACKDIR="\${exec_prefix}$with_hackdir"
9565   fi
9566 fi
9567
9568 # canonicalize slashes.
9569 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
9570
9571 # This option used to be called --enable-subdir; make sure that is no longer
9572 # used, since configure brain-damagedly ignores unknown --enable options.
9573
9574 obsolete_enable=
9575 # Check whether --enable-subdir or --disable-subdir was given.
9576 if test "${enable_subdir+set}" = set; then
9577   enableval="$enable_subdir"
9578   obsolete_enable=yes
9579 fi;
9580 if test -n "$obsolete_enable"; then
9581   echo "error: the --enable-subdir option has been replaced with"
9582   echo "       the new --with-hackdir option; see \`configure --help'"
9583   echo "       for more information."
9584   exit 1
9585 fi
9586
9587
9588 ###############################################################################
9589 #
9590 #       Handle the --with-configdir option
9591 #
9592 ###############################################################################
9593
9594 have_configdir=yes
9595 with_configdir_req=unspecified
9596
9597 # Check whether --with-configdir or --without-configdir was given.
9598 if test "${with_configdir+set}" = set; then
9599   withval="$with_configdir"
9600   with_configdir="$withval"; with_configdir_req="$withval"
9601 else
9602   with_configdir=yes
9603 fi;
9604
9605 if test x"$with_configdir" = xyes; then
9606   # filled in later...
9607   HACK_CONF_DIR=''
9608 elif test x"$with_configdir" = xno; then
9609   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
9610   exit 1
9611 else
9612   # there must be a better way than this...
9613   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
9614     # absolute path
9615     HACK_CONF_DIR=$with_configdir
9616   else
9617     # relative path
9618     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
9619   fi
9620 fi
9621
9622
9623
9624
9625 ###############################################################################
9626 #
9627 #       Check for the SGI SCREEN_SAVER server extension.
9628 #
9629 ###############################################################################
9630
9631 have_sgi=no
9632 with_sgi_req=unspecified
9633
9634 # Check whether --with-sgi-ext or --without-sgi-ext was given.
9635 if test "${with_sgi_ext+set}" = set; then
9636   withval="$with_sgi_ext"
9637   with_sgi="$withval"; with_sgi_req="$withval"
9638 else
9639   with_sgi=yes
9640 fi;
9641
9642
9643    case "$with_sgi" in
9644     yes) ;;
9645     no)  ;;
9646
9647     /*)
9648      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
9649 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
9650      d=$with_sgi/include
9651      if test -d $d; then
9652        X_CFLAGS="-I$d $X_CFLAGS"
9653        echo "$as_me:$LINENO: result: $d" >&5
9654 echo "${ECHO_T}$d" >&6
9655      else
9656        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9657 echo "${ECHO_T}not found ($d: no such directory)" >&6
9658      fi
9659
9660      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
9661 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
9662      d=$with_sgi/lib
9663      if test -d $d; then
9664        X_LIBS="-L$d $X_LIBS"
9665        echo "$as_me:$LINENO: result: $d" >&5
9666 echo "${ECHO_T}$d" >&6
9667      else
9668        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9669 echo "${ECHO_T}not found ($d: no such directory)" >&6
9670      fi
9671
9672      # replace the directory string with "yes".
9673      with_sgi_req="yes"
9674      with_sgi=$with_sgi_req
9675      ;;
9676
9677     *)
9678      echo ""
9679      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
9680      echo "       If it is a directory, then \`DIR/include' will be added to"
9681      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9682      exit 1
9683      ;;
9684    esac
9685
9686
9687 if test "$with_sgi" = yes; then
9688
9689   ac_save_CPPFLAGS="$CPPFLAGS"
9690   if test \! -z "$includedir" ; then
9691     CPPFLAGS="$CPPFLAGS -I$includedir"
9692   fi
9693   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9694   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
9695 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
9696 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
9697   echo $ECHO_N "(cached) $ECHO_C" >&6
9698 else
9699   cat >conftest.$ac_ext <<_ACEOF
9700 /* confdefs.h.  */
9701 _ACEOF
9702 cat confdefs.h >>conftest.$ac_ext
9703 cat >>conftest.$ac_ext <<_ACEOF
9704 /* end confdefs.h.  */
9705 #include <X11/Xlib.h>
9706
9707 #include <X11/extensions/XScreenSaver.h>
9708 _ACEOF
9709 rm -f conftest.$ac_objext
9710 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9711   (eval $ac_compile) 2>conftest.er1
9712   ac_status=$?
9713   grep -v '^ *+' conftest.er1 >conftest.err
9714   rm -f conftest.er1
9715   cat conftest.err >&5
9716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9717   (exit $ac_status); } &&
9718          { ac_try='test -z "$ac_c_werror_flag"
9719                          || test ! -s conftest.err'
9720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9721   (eval $ac_try) 2>&5
9722   ac_status=$?
9723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9724   (exit $ac_status); }; } &&
9725          { ac_try='test -s conftest.$ac_objext'
9726   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9727   (eval $ac_try) 2>&5
9728   ac_status=$?
9729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9730   (exit $ac_status); }; }; then
9731   ac_cv_header_X11_extensions_XScreenSaver_h=yes
9732 else
9733   echo "$as_me: failed program was:" >&5
9734 sed 's/^/| /' conftest.$ac_ext >&5
9735
9736 ac_cv_header_X11_extensions_XScreenSaver_h=no
9737 fi
9738 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9739 fi
9740 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
9741 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
9742 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
9743   have_sgi=yes
9744                      cat >>confdefs.h <<\_ACEOF
9745 #define HAVE_SGI_SAVER_EXTENSION 1
9746 _ACEOF
9747
9748 fi
9749
9750
9751   CPPFLAGS="$ac_save_CPPFLAGS"
9752
9753 elif test "$with_sgi" != no; then
9754   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
9755   exit 1
9756 fi
9757
9758
9759 ###############################################################################
9760 #
9761 #       Check for the MIT-SCREEN-SAVER server extension.
9762 #
9763 ###############################################################################
9764
9765 have_mit=no
9766 with_mit_req=unspecified
9767
9768 # Check whether --with-mit-ext or --without-mit-ext was given.
9769 if test "${with_mit_ext+set}" = set; then
9770   withval="$with_mit_ext"
9771   with_mit="$withval"; with_mit_req="$withval"
9772 else
9773   with_mit=yes
9774 fi;
9775
9776
9777    case "$with_mit" in
9778     yes) ;;
9779     no)  ;;
9780
9781     /*)
9782      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER headers" >&5
9783 echo $ECHO_N "checking for MIT-SCREEN-SAVER headers... $ECHO_C" >&6
9784      d=$with_mit/include
9785      if test -d $d; then
9786        X_CFLAGS="-I$d $X_CFLAGS"
9787        echo "$as_me:$LINENO: result: $d" >&5
9788 echo "${ECHO_T}$d" >&6
9789      else
9790        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9791 echo "${ECHO_T}not found ($d: no such directory)" >&6
9792      fi
9793
9794      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER libs" >&5
9795 echo $ECHO_N "checking for MIT-SCREEN-SAVER libs... $ECHO_C" >&6
9796      d=$with_mit/lib
9797      if test -d $d; then
9798        X_LIBS="-L$d $X_LIBS"
9799        echo "$as_me:$LINENO: result: $d" >&5
9800 echo "${ECHO_T}$d" >&6
9801      else
9802        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9803 echo "${ECHO_T}not found ($d: no such directory)" >&6
9804      fi
9805
9806      # replace the directory string with "yes".
9807      with_mit_req="yes"
9808      with_mit=$with_mit_req
9809      ;;
9810
9811     *)
9812      echo ""
9813      echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
9814      echo "       If it is a directory, then \`DIR/include' will be added to"
9815      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9816      exit 1
9817      ;;
9818    esac
9819
9820
9821 if test "$with_mit" = yes; then
9822
9823   ac_save_CPPFLAGS="$CPPFLAGS"
9824   if test \! -z "$includedir" ; then
9825     CPPFLAGS="$CPPFLAGS -I$includedir"
9826   fi
9827   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9828   echo "$as_me:$LINENO: checking for X11/extensions/scrnsaver.h" >&5
9829 echo $ECHO_N "checking for X11/extensions/scrnsaver.h... $ECHO_C" >&6
9830 if test "${ac_cv_header_X11_extensions_scrnsaver_h+set}" = set; then
9831   echo $ECHO_N "(cached) $ECHO_C" >&6
9832 else
9833   cat >conftest.$ac_ext <<_ACEOF
9834 /* confdefs.h.  */
9835 _ACEOF
9836 cat confdefs.h >>conftest.$ac_ext
9837 cat >>conftest.$ac_ext <<_ACEOF
9838 /* end confdefs.h.  */
9839 #include <X11/Xlib.h>
9840
9841 #include <X11/extensions/scrnsaver.h>
9842 _ACEOF
9843 rm -f conftest.$ac_objext
9844 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9845   (eval $ac_compile) 2>conftest.er1
9846   ac_status=$?
9847   grep -v '^ *+' conftest.er1 >conftest.err
9848   rm -f conftest.er1
9849   cat conftest.err >&5
9850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9851   (exit $ac_status); } &&
9852          { ac_try='test -z "$ac_c_werror_flag"
9853                          || test ! -s conftest.err'
9854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9855   (eval $ac_try) 2>&5
9856   ac_status=$?
9857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9858   (exit $ac_status); }; } &&
9859          { ac_try='test -s conftest.$ac_objext'
9860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9861   (eval $ac_try) 2>&5
9862   ac_status=$?
9863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9864   (exit $ac_status); }; }; then
9865   ac_cv_header_X11_extensions_scrnsaver_h=yes
9866 else
9867   echo "$as_me: failed program was:" >&5
9868 sed 's/^/| /' conftest.$ac_ext >&5
9869
9870 ac_cv_header_X11_extensions_scrnsaver_h=no
9871 fi
9872 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9873 fi
9874 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_scrnsaver_h" >&5
9875 echo "${ECHO_T}$ac_cv_header_X11_extensions_scrnsaver_h" >&6
9876 if test $ac_cv_header_X11_extensions_scrnsaver_h = yes; then
9877   have_mit=yes
9878 fi
9879
9880
9881   CPPFLAGS="$ac_save_CPPFLAGS"
9882
9883   # Now check to see if it's really in the library; XF86Free-3.3 ships
9884   # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
9885   #
9886   if test "$have_mit" = yes; then
9887
9888   ac_save_CPPFLAGS="$CPPFLAGS"
9889   ac_save_LDFLAGS="$LDFLAGS"
9890 #  ac_save_LIBS="$LIBS"
9891
9892   if test \! -z "$includedir" ; then
9893     CPPFLAGS="$CPPFLAGS -I$includedir"
9894   fi
9895   # note: $X_CFLAGS includes $x_includes
9896   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9897
9898   if test \! -z "$libdir" ; then
9899     LDFLAGS="$LDFLAGS -L$libdir"
9900   fi
9901   # note: $X_LIBS includes $x_libraries
9902   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9903
9904   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXext" >&5
9905 echo $ECHO_N "checking for XScreenSaverRegister in -lXext... $ECHO_C" >&6
9906 if test "${ac_cv_lib_Xext_XScreenSaverRegister+set}" = set; then
9907   echo $ECHO_N "(cached) $ECHO_C" >&6
9908 else
9909   ac_check_lib_save_LIBS=$LIBS
9910 LIBS="-lXext -lm $LIBS"
9911 cat >conftest.$ac_ext <<_ACEOF
9912 /* confdefs.h.  */
9913 _ACEOF
9914 cat confdefs.h >>conftest.$ac_ext
9915 cat >>conftest.$ac_ext <<_ACEOF
9916 /* end confdefs.h.  */
9917
9918 /* Override any gcc2 internal prototype to avoid an error.  */
9919 #ifdef __cplusplus
9920 extern "C"
9921 #endif
9922 /* We use char because int might match the return type of a gcc2
9923    builtin and then its argument prototype would still apply.  */
9924 char XScreenSaverRegister ();
9925 int
9926 main ()
9927 {
9928 XScreenSaverRegister ();
9929   ;
9930   return 0;
9931 }
9932 _ACEOF
9933 rm -f conftest.$ac_objext conftest$ac_exeext
9934 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9935   (eval $ac_link) 2>conftest.er1
9936   ac_status=$?
9937   grep -v '^ *+' conftest.er1 >conftest.err
9938   rm -f conftest.er1
9939   cat conftest.err >&5
9940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9941   (exit $ac_status); } &&
9942          { ac_try='test -z "$ac_c_werror_flag"
9943                          || test ! -s conftest.err'
9944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9945   (eval $ac_try) 2>&5
9946   ac_status=$?
9947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9948   (exit $ac_status); }; } &&
9949          { ac_try='test -s conftest$ac_exeext'
9950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9951   (eval $ac_try) 2>&5
9952   ac_status=$?
9953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9954   (exit $ac_status); }; }; then
9955   ac_cv_lib_Xext_XScreenSaverRegister=yes
9956 else
9957   echo "$as_me: failed program was:" >&5
9958 sed 's/^/| /' conftest.$ac_ext >&5
9959
9960 ac_cv_lib_Xext_XScreenSaverRegister=no
9961 fi
9962 rm -f conftest.err conftest.$ac_objext \
9963       conftest$ac_exeext conftest.$ac_ext
9964 LIBS=$ac_check_lib_save_LIBS
9965 fi
9966 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XScreenSaverRegister" >&5
9967 echo "${ECHO_T}$ac_cv_lib_Xext_XScreenSaverRegister" >&6
9968 if test $ac_cv_lib_Xext_XScreenSaverRegister = yes; then
9969   true
9970 else
9971   have_mit=no
9972 fi
9973
9974   CPPFLAGS="$ac_save_CPPFLAGS"
9975   LDFLAGS="$ac_save_LDFLAGS"
9976 #  LIBS="$ac_save_LIBS"
9977
9978
9979     if test "$have_mit" = no; then
9980       # Fuck!  Looks like XF86Free-3.3 actually puts it in XExExt instead
9981       # of in Xext.  Thank you master, may I have another.
9982
9983   ac_save_CPPFLAGS="$CPPFLAGS"
9984   ac_save_LDFLAGS="$LDFLAGS"
9985 #  ac_save_LIBS="$LIBS"
9986
9987   if test \! -z "$includedir" ; then
9988     CPPFLAGS="$CPPFLAGS -I$includedir"
9989   fi
9990   # note: $X_CFLAGS includes $x_includes
9991   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9992
9993   if test \! -z "$libdir" ; then
9994     LDFLAGS="$LDFLAGS -L$libdir"
9995   fi
9996   # note: $X_LIBS includes $x_libraries
9997   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9998
9999   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXExExt" >&5
10000 echo $ECHO_N "checking for XScreenSaverRegister in -lXExExt... $ECHO_C" >&6
10001 if test "${ac_cv_lib_XExExt_XScreenSaverRegister+set}" = set; then
10002   echo $ECHO_N "(cached) $ECHO_C" >&6
10003 else
10004   ac_check_lib_save_LIBS=$LIBS
10005 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
10006 cat >conftest.$ac_ext <<_ACEOF
10007 /* confdefs.h.  */
10008 _ACEOF
10009 cat confdefs.h >>conftest.$ac_ext
10010 cat >>conftest.$ac_ext <<_ACEOF
10011 /* end confdefs.h.  */
10012
10013 /* Override any gcc2 internal prototype to avoid an error.  */
10014 #ifdef __cplusplus
10015 extern "C"
10016 #endif
10017 /* We use char because int might match the return type of a gcc2
10018    builtin and then its argument prototype would still apply.  */
10019 char XScreenSaverRegister ();
10020 int
10021 main ()
10022 {
10023 XScreenSaverRegister ();
10024   ;
10025   return 0;
10026 }
10027 _ACEOF
10028 rm -f conftest.$ac_objext conftest$ac_exeext
10029 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10030   (eval $ac_link) 2>conftest.er1
10031   ac_status=$?
10032   grep -v '^ *+' conftest.er1 >conftest.err
10033   rm -f conftest.er1
10034   cat conftest.err >&5
10035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10036   (exit $ac_status); } &&
10037          { ac_try='test -z "$ac_c_werror_flag"
10038                          || test ! -s conftest.err'
10039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10040   (eval $ac_try) 2>&5
10041   ac_status=$?
10042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10043   (exit $ac_status); }; } &&
10044          { ac_try='test -s conftest$ac_exeext'
10045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10046   (eval $ac_try) 2>&5
10047   ac_status=$?
10048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10049   (exit $ac_status); }; }; then
10050   ac_cv_lib_XExExt_XScreenSaverRegister=yes
10051 else
10052   echo "$as_me: failed program was:" >&5
10053 sed 's/^/| /' conftest.$ac_ext >&5
10054
10055 ac_cv_lib_XExExt_XScreenSaverRegister=no
10056 fi
10057 rm -f conftest.err conftest.$ac_objext \
10058       conftest$ac_exeext conftest.$ac_ext
10059 LIBS=$ac_check_lib_save_LIBS
10060 fi
10061 echo "$as_me:$LINENO: result: $ac_cv_lib_XExExt_XScreenSaverRegister" >&5
10062 echo "${ECHO_T}$ac_cv_lib_XExExt_XScreenSaverRegister" >&6
10063 if test $ac_cv_lib_XExExt_XScreenSaverRegister = yes; then
10064   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
10065 else
10066   true
10067 fi
10068
10069   CPPFLAGS="$ac_save_CPPFLAGS"
10070   LDFLAGS="$ac_save_LDFLAGS"
10071 #  LIBS="$ac_save_LIBS"
10072
10073     fi
10074
10075     if test "$have_mit" = no; then
10076       # Double fuck!  Looks like some versions of XFree86 (whichever version
10077       # it is that comes with RedHat Linux 2.0 -- I can't find a version
10078       # number) put this garbage in Xss instead of Xext.  Thank you master,
10079       #  may I have another.
10080
10081   ac_save_CPPFLAGS="$CPPFLAGS"
10082   ac_save_LDFLAGS="$LDFLAGS"
10083 #  ac_save_LIBS="$LIBS"
10084
10085   if test \! -z "$includedir" ; then
10086     CPPFLAGS="$CPPFLAGS -I$includedir"
10087   fi
10088   # note: $X_CFLAGS includes $x_includes
10089   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10090
10091   if test \! -z "$libdir" ; then
10092     LDFLAGS="$LDFLAGS -L$libdir"
10093   fi
10094   # note: $X_LIBS includes $x_libraries
10095   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10096
10097   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXss" >&5
10098 echo $ECHO_N "checking for XScreenSaverRegister in -lXss... $ECHO_C" >&6
10099 if test "${ac_cv_lib_Xss_XScreenSaverRegister+set}" = set; then
10100   echo $ECHO_N "(cached) $ECHO_C" >&6
10101 else
10102   ac_check_lib_save_LIBS=$LIBS
10103 LIBS="-lXss -lX11 -lXext -lm $LIBS"
10104 cat >conftest.$ac_ext <<_ACEOF
10105 /* confdefs.h.  */
10106 _ACEOF
10107 cat confdefs.h >>conftest.$ac_ext
10108 cat >>conftest.$ac_ext <<_ACEOF
10109 /* end confdefs.h.  */
10110
10111 /* Override any gcc2 internal prototype to avoid an error.  */
10112 #ifdef __cplusplus
10113 extern "C"
10114 #endif
10115 /* We use char because int might match the return type of a gcc2
10116    builtin and then its argument prototype would still apply.  */
10117 char XScreenSaverRegister ();
10118 int
10119 main ()
10120 {
10121 XScreenSaverRegister ();
10122   ;
10123   return 0;
10124 }
10125 _ACEOF
10126 rm -f conftest.$ac_objext conftest$ac_exeext
10127 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10128   (eval $ac_link) 2>conftest.er1
10129   ac_status=$?
10130   grep -v '^ *+' conftest.er1 >conftest.err
10131   rm -f conftest.er1
10132   cat conftest.err >&5
10133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10134   (exit $ac_status); } &&
10135          { ac_try='test -z "$ac_c_werror_flag"
10136                          || test ! -s conftest.err'
10137   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10138   (eval $ac_try) 2>&5
10139   ac_status=$?
10140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10141   (exit $ac_status); }; } &&
10142          { ac_try='test -s conftest$ac_exeext'
10143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10144   (eval $ac_try) 2>&5
10145   ac_status=$?
10146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10147   (exit $ac_status); }; }; then
10148   ac_cv_lib_Xss_XScreenSaverRegister=yes
10149 else
10150   echo "$as_me: failed program was:" >&5
10151 sed 's/^/| /' conftest.$ac_ext >&5
10152
10153 ac_cv_lib_Xss_XScreenSaverRegister=no
10154 fi
10155 rm -f conftest.err conftest.$ac_objext \
10156       conftest$ac_exeext conftest.$ac_ext
10157 LIBS=$ac_check_lib_save_LIBS
10158 fi
10159 echo "$as_me:$LINENO: result: $ac_cv_lib_Xss_XScreenSaverRegister" >&5
10160 echo "${ECHO_T}$ac_cv_lib_Xss_XScreenSaverRegister" >&6
10161 if test $ac_cv_lib_Xss_XScreenSaverRegister = yes; then
10162   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
10163 else
10164   true
10165 fi
10166
10167   CPPFLAGS="$ac_save_CPPFLAGS"
10168   LDFLAGS="$ac_save_LDFLAGS"
10169 #  LIBS="$ac_save_LIBS"
10170
10171     fi
10172
10173   if test "$have_mit" = yes; then
10174     cat >>confdefs.h <<\_ACEOF
10175 #define HAVE_MIT_SAVER_EXTENSION 1
10176 _ACEOF
10177
10178   fi
10179
10180   fi
10181
10182 elif test "$with_mit" != no; then
10183   echo "error: must be yes or no: --with-mit-ext=$with_mit"
10184   exit 1
10185 fi
10186
10187
10188 ###############################################################################
10189 #
10190 #       Check for the XIDLE server extension.
10191 #
10192 ###############################################################################
10193
10194 have_xidle=no
10195 with_xidle_req=unspecified
10196
10197 # Check whether --with-xidle-ext or --without-xidle-ext was given.
10198 if test "${with_xidle_ext+set}" = set; then
10199   withval="$with_xidle_ext"
10200   with_xidle="$withval"; with_xidle_req="$withval"
10201 else
10202   with_xidle=yes
10203 fi;
10204
10205
10206    case "$with_xidle" in
10207     yes) ;;
10208     no)  ;;
10209
10210     /*)
10211      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
10212 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
10213      d=$with_xidle/include
10214      if test -d $d; then
10215        X_CFLAGS="-I$d $X_CFLAGS"
10216        echo "$as_me:$LINENO: result: $d" >&5
10217 echo "${ECHO_T}$d" >&6
10218      else
10219        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10220 echo "${ECHO_T}not found ($d: no such directory)" >&6
10221      fi
10222
10223      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
10224 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
10225      d=$with_xidle/lib
10226      if test -d $d; then
10227        X_LIBS="-L$d $X_LIBS"
10228        echo "$as_me:$LINENO: result: $d" >&5
10229 echo "${ECHO_T}$d" >&6
10230      else
10231        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10232 echo "${ECHO_T}not found ($d: no such directory)" >&6
10233      fi
10234
10235      # replace the directory string with "yes".
10236      with_xidle_req="yes"
10237      with_xidle=$with_xidle_req
10238      ;;
10239
10240     *)
10241      echo ""
10242      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
10243      echo "       If it is a directory, then \`DIR/include' will be added to"
10244      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10245      exit 1
10246      ;;
10247    esac
10248
10249
10250 if test "$with_xidle" = yes; then
10251
10252   ac_save_CPPFLAGS="$CPPFLAGS"
10253   if test \! -z "$includedir" ; then
10254     CPPFLAGS="$CPPFLAGS -I$includedir"
10255   fi
10256   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10257   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
10258 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
10259 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
10260   echo $ECHO_N "(cached) $ECHO_C" >&6
10261 else
10262   cat >conftest.$ac_ext <<_ACEOF
10263 /* confdefs.h.  */
10264 _ACEOF
10265 cat confdefs.h >>conftest.$ac_ext
10266 cat >>conftest.$ac_ext <<_ACEOF
10267 /* end confdefs.h.  */
10268 #include <X11/Xlib.h>
10269
10270 #include <X11/extensions/xidle.h>
10271 _ACEOF
10272 rm -f conftest.$ac_objext
10273 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10274   (eval $ac_compile) 2>conftest.er1
10275   ac_status=$?
10276   grep -v '^ *+' conftest.er1 >conftest.err
10277   rm -f conftest.er1
10278   cat conftest.err >&5
10279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10280   (exit $ac_status); } &&
10281          { ac_try='test -z "$ac_c_werror_flag"
10282                          || test ! -s conftest.err'
10283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10284   (eval $ac_try) 2>&5
10285   ac_status=$?
10286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10287   (exit $ac_status); }; } &&
10288          { ac_try='test -s conftest.$ac_objext'
10289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10290   (eval $ac_try) 2>&5
10291   ac_status=$?
10292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10293   (exit $ac_status); }; }; then
10294   ac_cv_header_X11_extensions_xidle_h=yes
10295 else
10296   echo "$as_me: failed program was:" >&5
10297 sed 's/^/| /' conftest.$ac_ext >&5
10298
10299 ac_cv_header_X11_extensions_xidle_h=no
10300 fi
10301 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10302 fi
10303 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
10304 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
10305 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
10306   have_xidle=yes
10307                      cat >>confdefs.h <<\_ACEOF
10308 #define HAVE_XIDLE_EXTENSION 1
10309 _ACEOF
10310
10311 fi
10312
10313
10314   CPPFLAGS="$ac_save_CPPFLAGS"
10315 elif test "$with_xidle" != no; then
10316   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
10317   exit 1
10318 fi
10319
10320
10321 ###############################################################################
10322 #
10323 #       Check for the SGI-VIDEO-CONTROL server extension.
10324 #
10325 ###############################################################################
10326
10327 have_sgivc=no
10328 with_sgivc_req=unspecified
10329
10330 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
10331 if test "${with_sgivc_ext+set}" = set; then
10332   withval="$with_sgivc_ext"
10333   with_sgivc="$withval"; with_sgivc_req="$withval"
10334 else
10335   with_sgivc=yes
10336 fi;
10337
10338
10339    case "$with_sgivc" in
10340     yes) ;;
10341     no)  ;;
10342
10343     /*)
10344      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
10345 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
10346      d=$with_sgivc/include
10347      if test -d $d; then
10348        X_CFLAGS="-I$d $X_CFLAGS"
10349        echo "$as_me:$LINENO: result: $d" >&5
10350 echo "${ECHO_T}$d" >&6
10351      else
10352        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10353 echo "${ECHO_T}not found ($d: no such directory)" >&6
10354      fi
10355
10356      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
10357 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
10358      d=$with_sgivc/lib
10359      if test -d $d; then
10360        X_LIBS="-L$d $X_LIBS"
10361        echo "$as_me:$LINENO: result: $d" >&5
10362 echo "${ECHO_T}$d" >&6
10363      else
10364        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10365 echo "${ECHO_T}not found ($d: no such directory)" >&6
10366      fi
10367
10368      # replace the directory string with "yes".
10369      with_sgivc_req="yes"
10370      with_sgivc=$with_sgivc_req
10371      ;;
10372
10373     *)
10374      echo ""
10375      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
10376      echo "       If it is a directory, then \`DIR/include' will be added to"
10377      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10378      exit 1
10379      ;;
10380    esac
10381
10382
10383 if test "$with_sgivc" = yes; then
10384
10385   # first check for XSGIvc.h
10386
10387   ac_save_CPPFLAGS="$CPPFLAGS"
10388   if test \! -z "$includedir" ; then
10389     CPPFLAGS="$CPPFLAGS -I$includedir"
10390   fi
10391   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10392   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
10393 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
10394 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
10395   echo $ECHO_N "(cached) $ECHO_C" >&6
10396 else
10397   cat >conftest.$ac_ext <<_ACEOF
10398 /* confdefs.h.  */
10399 _ACEOF
10400 cat confdefs.h >>conftest.$ac_ext
10401 cat >>conftest.$ac_ext <<_ACEOF
10402 /* end confdefs.h.  */
10403 #include <X11/Xlib.h>
10404
10405 #include <X11/extensions/XSGIvc.h>
10406 _ACEOF
10407 rm -f conftest.$ac_objext
10408 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10409   (eval $ac_compile) 2>conftest.er1
10410   ac_status=$?
10411   grep -v '^ *+' conftest.er1 >conftest.err
10412   rm -f conftest.er1
10413   cat conftest.err >&5
10414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10415   (exit $ac_status); } &&
10416          { ac_try='test -z "$ac_c_werror_flag"
10417                          || test ! -s conftest.err'
10418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10419   (eval $ac_try) 2>&5
10420   ac_status=$?
10421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10422   (exit $ac_status); }; } &&
10423          { ac_try='test -s conftest.$ac_objext'
10424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10425   (eval $ac_try) 2>&5
10426   ac_status=$?
10427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10428   (exit $ac_status); }; }; then
10429   ac_cv_header_X11_extensions_XSGIvc_h=yes
10430 else
10431   echo "$as_me: failed program was:" >&5
10432 sed 's/^/| /' conftest.$ac_ext >&5
10433
10434 ac_cv_header_X11_extensions_XSGIvc_h=no
10435 fi
10436 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10437 fi
10438 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
10439 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
10440 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
10441   have_sgivc=yes
10442 fi
10443
10444
10445   CPPFLAGS="$ac_save_CPPFLAGS"
10446
10447   # if that succeeded, then check for the -lXsgivc
10448   if test "$have_sgivc" = yes; then
10449     have_sgivc=no
10450
10451   ac_save_CPPFLAGS="$CPPFLAGS"
10452   ac_save_LDFLAGS="$LDFLAGS"
10453 #  ac_save_LIBS="$LIBS"
10454
10455   if test \! -z "$includedir" ; then
10456     CPPFLAGS="$CPPFLAGS -I$includedir"
10457   fi
10458   # note: $X_CFLAGS includes $x_includes
10459   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10460
10461   if test \! -z "$libdir" ; then
10462     LDFLAGS="$LDFLAGS -L$libdir"
10463   fi
10464   # note: $X_LIBS includes $x_libraries
10465   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10466
10467   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
10468 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
10469 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
10470   echo $ECHO_N "(cached) $ECHO_C" >&6
10471 else
10472   ac_check_lib_save_LIBS=$LIBS
10473 LIBS="-lXsgivc -lXext -lX11 $LIBS"
10474 cat >conftest.$ac_ext <<_ACEOF
10475 /* confdefs.h.  */
10476 _ACEOF
10477 cat confdefs.h >>conftest.$ac_ext
10478 cat >>conftest.$ac_ext <<_ACEOF
10479 /* end confdefs.h.  */
10480
10481 /* Override any gcc2 internal prototype to avoid an error.  */
10482 #ifdef __cplusplus
10483 extern "C"
10484 #endif
10485 /* We use char because int might match the return type of a gcc2
10486    builtin and then its argument prototype would still apply.  */
10487 char XSGIvcQueryGammaMap ();
10488 int
10489 main ()
10490 {
10491 XSGIvcQueryGammaMap ();
10492   ;
10493   return 0;
10494 }
10495 _ACEOF
10496 rm -f conftest.$ac_objext conftest$ac_exeext
10497 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10498   (eval $ac_link) 2>conftest.er1
10499   ac_status=$?
10500   grep -v '^ *+' conftest.er1 >conftest.err
10501   rm -f conftest.er1
10502   cat conftest.err >&5
10503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10504   (exit $ac_status); } &&
10505          { ac_try='test -z "$ac_c_werror_flag"
10506                          || test ! -s conftest.err'
10507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10508   (eval $ac_try) 2>&5
10509   ac_status=$?
10510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10511   (exit $ac_status); }; } &&
10512          { ac_try='test -s conftest$ac_exeext'
10513   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10514   (eval $ac_try) 2>&5
10515   ac_status=$?
10516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10517   (exit $ac_status); }; }; then
10518   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
10519 else
10520   echo "$as_me: failed program was:" >&5
10521 sed 's/^/| /' conftest.$ac_ext >&5
10522
10523 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
10524 fi
10525 rm -f conftest.err conftest.$ac_objext \
10526       conftest$ac_exeext conftest.$ac_ext
10527 LIBS=$ac_check_lib_save_LIBS
10528 fi
10529 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
10530 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
10531 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
10532   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
10533 else
10534   true
10535 fi
10536
10537   CPPFLAGS="$ac_save_CPPFLAGS"
10538   LDFLAGS="$ac_save_LDFLAGS"
10539 #  LIBS="$ac_save_LIBS"
10540
10541   fi
10542
10543   # if that succeeded, then we've really got it.
10544   if test "$have_sgivc" = yes; then
10545     cat >>confdefs.h <<\_ACEOF
10546 #define HAVE_SGI_VC_EXTENSION 1
10547 _ACEOF
10548
10549   fi
10550
10551 elif test "$with_sgivc" != no; then
10552   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10553   exit 1
10554 fi
10555
10556
10557 ###############################################################################
10558 #
10559 #       Check for the DPMS server extension.
10560 #
10561 ###############################################################################
10562
10563 have_dpms=no
10564 with_dpms_req=unspecified
10565
10566 # Check whether --with-dpms-ext or --without-dpms-ext was given.
10567 if test "${with_dpms_ext+set}" = set; then
10568   withval="$with_dpms_ext"
10569   with_dpms="$withval"; with_dpms_req="$withval"
10570 else
10571   with_dpms=yes
10572 fi;
10573
10574
10575    case "$with_dpms" in
10576     yes) ;;
10577     no)  ;;
10578
10579     /*)
10580      echo "$as_me:$LINENO: checking for DPMS headers" >&5
10581 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
10582      d=$with_dpms/include
10583      if test -d $d; then
10584        X_CFLAGS="-I$d $X_CFLAGS"
10585        echo "$as_me:$LINENO: result: $d" >&5
10586 echo "${ECHO_T}$d" >&6
10587      else
10588        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10589 echo "${ECHO_T}not found ($d: no such directory)" >&6
10590      fi
10591
10592      echo "$as_me:$LINENO: checking for DPMS libs" >&5
10593 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
10594      d=$with_dpms/lib
10595      if test -d $d; then
10596        X_LIBS="-L$d $X_LIBS"
10597        echo "$as_me:$LINENO: result: $d" >&5
10598 echo "${ECHO_T}$d" >&6
10599      else
10600        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10601 echo "${ECHO_T}not found ($d: no such directory)" >&6
10602      fi
10603
10604      # replace the directory string with "yes".
10605      with_dpms_req="yes"
10606      with_dpms=$with_dpms_req
10607      ;;
10608
10609     *)
10610      echo ""
10611      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
10612      echo "       If it is a directory, then \`DIR/include' will be added to"
10613      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10614      exit 1
10615      ;;
10616    esac
10617
10618
10619 if test "$with_dpms" = yes; then
10620
10621   # first check for dpms.h
10622
10623   ac_save_CPPFLAGS="$CPPFLAGS"
10624   if test \! -z "$includedir" ; then
10625     CPPFLAGS="$CPPFLAGS -I$includedir"
10626   fi
10627   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10628   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
10629 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
10630 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
10631   echo $ECHO_N "(cached) $ECHO_C" >&6
10632 else
10633   cat >conftest.$ac_ext <<_ACEOF
10634 /* confdefs.h.  */
10635 _ACEOF
10636 cat confdefs.h >>conftest.$ac_ext
10637 cat >>conftest.$ac_ext <<_ACEOF
10638 /* end confdefs.h.  */
10639 #include <X11/Xlib.h>
10640                      #include <X11/Xmd.h>
10641
10642 #include <X11/extensions/dpms.h>
10643 _ACEOF
10644 rm -f conftest.$ac_objext
10645 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10646   (eval $ac_compile) 2>conftest.er1
10647   ac_status=$?
10648   grep -v '^ *+' conftest.er1 >conftest.err
10649   rm -f conftest.er1
10650   cat conftest.err >&5
10651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10652   (exit $ac_status); } &&
10653          { ac_try='test -z "$ac_c_werror_flag"
10654                          || test ! -s conftest.err'
10655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10656   (eval $ac_try) 2>&5
10657   ac_status=$?
10658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10659   (exit $ac_status); }; } &&
10660          { ac_try='test -s conftest.$ac_objext'
10661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10662   (eval $ac_try) 2>&5
10663   ac_status=$?
10664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10665   (exit $ac_status); }; }; then
10666   ac_cv_header_X11_extensions_dpms_h=yes
10667 else
10668   echo "$as_me: failed program was:" >&5
10669 sed 's/^/| /' conftest.$ac_ext >&5
10670
10671 ac_cv_header_X11_extensions_dpms_h=no
10672 fi
10673 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10674 fi
10675 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
10676 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
10677 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
10678   have_dpms=yes
10679 fi
10680
10681
10682   CPPFLAGS="$ac_save_CPPFLAGS"
10683
10684   # if that succeeded, then check for the DPMS code in the libraries
10685   if test "$have_dpms" = yes; then
10686
10687     # first look in -lXext (this is where it is with XFree86 4.0)
10688     have_dpms=no
10689
10690   ac_save_CPPFLAGS="$CPPFLAGS"
10691   ac_save_LDFLAGS="$LDFLAGS"
10692 #  ac_save_LIBS="$LIBS"
10693
10694   if test \! -z "$includedir" ; then
10695     CPPFLAGS="$CPPFLAGS -I$includedir"
10696   fi
10697   # note: $X_CFLAGS includes $x_includes
10698   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10699
10700   if test \! -z "$libdir" ; then
10701     LDFLAGS="$LDFLAGS -L$libdir"
10702   fi
10703   # note: $X_LIBS includes $x_libraries
10704   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10705
10706   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
10707 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
10708 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
10709   echo $ECHO_N "(cached) $ECHO_C" >&6
10710 else
10711   ac_check_lib_save_LIBS=$LIBS
10712 LIBS="-lXext -lXext -lX11 $LIBS"
10713 cat >conftest.$ac_ext <<_ACEOF
10714 /* confdefs.h.  */
10715 _ACEOF
10716 cat confdefs.h >>conftest.$ac_ext
10717 cat >>conftest.$ac_ext <<_ACEOF
10718 /* end confdefs.h.  */
10719
10720 /* Override any gcc2 internal prototype to avoid an error.  */
10721 #ifdef __cplusplus
10722 extern "C"
10723 #endif
10724 /* We use char because int might match the return type of a gcc2
10725    builtin and then its argument prototype would still apply.  */
10726 char DPMSInfo ();
10727 int
10728 main ()
10729 {
10730 DPMSInfo ();
10731   ;
10732   return 0;
10733 }
10734 _ACEOF
10735 rm -f conftest.$ac_objext conftest$ac_exeext
10736 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10737   (eval $ac_link) 2>conftest.er1
10738   ac_status=$?
10739   grep -v '^ *+' conftest.er1 >conftest.err
10740   rm -f conftest.er1
10741   cat conftest.err >&5
10742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10743   (exit $ac_status); } &&
10744          { ac_try='test -z "$ac_c_werror_flag"
10745                          || test ! -s conftest.err'
10746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10747   (eval $ac_try) 2>&5
10748   ac_status=$?
10749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10750   (exit $ac_status); }; } &&
10751          { ac_try='test -s conftest$ac_exeext'
10752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10753   (eval $ac_try) 2>&5
10754   ac_status=$?
10755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10756   (exit $ac_status); }; }; then
10757   ac_cv_lib_Xext_DPMSInfo=yes
10758 else
10759   echo "$as_me: failed program was:" >&5
10760 sed 's/^/| /' conftest.$ac_ext >&5
10761
10762 ac_cv_lib_Xext_DPMSInfo=no
10763 fi
10764 rm -f conftest.err conftest.$ac_objext \
10765       conftest$ac_exeext conftest.$ac_ext
10766 LIBS=$ac_check_lib_save_LIBS
10767 fi
10768 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
10769 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
10770 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
10771   have_dpms=yes
10772 else
10773   true
10774 fi
10775
10776   CPPFLAGS="$ac_save_CPPFLAGS"
10777   LDFLAGS="$ac_save_LDFLAGS"
10778 #  LIBS="$ac_save_LIBS"
10779
10780
10781     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
10782     if test "$have_dpms" = no; then
10783
10784   ac_save_CPPFLAGS="$CPPFLAGS"
10785   ac_save_LDFLAGS="$LDFLAGS"
10786 #  ac_save_LIBS="$LIBS"
10787
10788   if test \! -z "$includedir" ; then
10789     CPPFLAGS="$CPPFLAGS -I$includedir"
10790   fi
10791   # note: $X_CFLAGS includes $x_includes
10792   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10793
10794   if test \! -z "$libdir" ; then
10795     LDFLAGS="$LDFLAGS -L$libdir"
10796   fi
10797   # note: $X_LIBS includes $x_libraries
10798   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10799
10800   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
10801 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
10802 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
10803   echo $ECHO_N "(cached) $ECHO_C" >&6
10804 else
10805   ac_check_lib_save_LIBS=$LIBS
10806 LIBS="-lXdpms -lXext -lX11 $LIBS"
10807 cat >conftest.$ac_ext <<_ACEOF
10808 /* confdefs.h.  */
10809 _ACEOF
10810 cat confdefs.h >>conftest.$ac_ext
10811 cat >>conftest.$ac_ext <<_ACEOF
10812 /* end confdefs.h.  */
10813
10814 /* Override any gcc2 internal prototype to avoid an error.  */
10815 #ifdef __cplusplus
10816 extern "C"
10817 #endif
10818 /* We use char because int might match the return type of a gcc2
10819    builtin and then its argument prototype would still apply.  */
10820 char DPMSInfo ();
10821 int
10822 main ()
10823 {
10824 DPMSInfo ();
10825   ;
10826   return 0;
10827 }
10828 _ACEOF
10829 rm -f conftest.$ac_objext conftest$ac_exeext
10830 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10831   (eval $ac_link) 2>conftest.er1
10832   ac_status=$?
10833   grep -v '^ *+' conftest.er1 >conftest.err
10834   rm -f conftest.er1
10835   cat conftest.err >&5
10836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10837   (exit $ac_status); } &&
10838          { ac_try='test -z "$ac_c_werror_flag"
10839                          || test ! -s conftest.err'
10840   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10841   (eval $ac_try) 2>&5
10842   ac_status=$?
10843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10844   (exit $ac_status); }; } &&
10845          { ac_try='test -s conftest$ac_exeext'
10846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10847   (eval $ac_try) 2>&5
10848   ac_status=$?
10849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10850   (exit $ac_status); }; }; then
10851   ac_cv_lib_Xdpms_DPMSInfo=yes
10852 else
10853   echo "$as_me: failed program was:" >&5
10854 sed 's/^/| /' conftest.$ac_ext >&5
10855
10856 ac_cv_lib_Xdpms_DPMSInfo=no
10857 fi
10858 rm -f conftest.err conftest.$ac_objext \
10859       conftest$ac_exeext conftest.$ac_ext
10860 LIBS=$ac_check_lib_save_LIBS
10861 fi
10862 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
10863 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
10864 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
10865   have_dpms=yes; XDPMS_LIBS="-lXdpms"
10866 else
10867   true
10868 fi
10869
10870   CPPFLAGS="$ac_save_CPPFLAGS"
10871   LDFLAGS="$ac_save_LDFLAGS"
10872 #  LIBS="$ac_save_LIBS"
10873
10874     fi
10875   fi
10876
10877
10878   # if that succeeded, then we've really got it.
10879   if test "$have_dpms" = yes; then
10880     cat >>confdefs.h <<\_ACEOF
10881 #define HAVE_DPMS_EXTENSION 1
10882 _ACEOF
10883
10884   fi
10885
10886 elif test "$with_dpms" != no; then
10887   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
10888   exit 1
10889 fi
10890
10891
10892 ###############################################################################
10893 #
10894 #       Check for the XINERAMA server extension.
10895 #
10896 ###############################################################################
10897
10898 have_xinerama=no
10899 with_xinerama_req=unspecified
10900
10901 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
10902 if test "${with_xinerama_ext+set}" = set; then
10903   withval="$with_xinerama_ext"
10904   with_xinerama="$withval"; with_xinerama_req="$withval"
10905 else
10906   with_xinerama=yes
10907 fi;
10908
10909
10910    case "$with_xinerama" in
10911     yes) ;;
10912     no)  ;;
10913
10914     /*)
10915      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
10916 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
10917      d=$with_xinerama/include
10918      if test -d $d; then
10919        X_CFLAGS="-I$d $X_CFLAGS"
10920        echo "$as_me:$LINENO: result: $d" >&5
10921 echo "${ECHO_T}$d" >&6
10922      else
10923        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10924 echo "${ECHO_T}not found ($d: no such directory)" >&6
10925      fi
10926
10927      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
10928 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
10929      d=$with_xinerama/lib
10930      if test -d $d; then
10931        X_LIBS="-L$d $X_LIBS"
10932        echo "$as_me:$LINENO: result: $d" >&5
10933 echo "${ECHO_T}$d" >&6
10934      else
10935        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10936 echo "${ECHO_T}not found ($d: no such directory)" >&6
10937      fi
10938
10939      # replace the directory string with "yes".
10940      with_xinerama_req="yes"
10941      with_xinerama=$with_xinerama_req
10942      ;;
10943
10944     *)
10945      echo ""
10946      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
10947      echo "       If it is a directory, then \`DIR/include' will be added to"
10948      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10949      exit 1
10950      ;;
10951    esac
10952
10953
10954 if test "$with_xinerama" = yes; then
10955
10956   # first check for Xinerama.h
10957
10958   ac_save_CPPFLAGS="$CPPFLAGS"
10959   if test \! -z "$includedir" ; then
10960     CPPFLAGS="$CPPFLAGS -I$includedir"
10961   fi
10962   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10963   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
10964 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
10965 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
10966   echo $ECHO_N "(cached) $ECHO_C" >&6
10967 else
10968   cat >conftest.$ac_ext <<_ACEOF
10969 /* confdefs.h.  */
10970 _ACEOF
10971 cat confdefs.h >>conftest.$ac_ext
10972 cat >>conftest.$ac_ext <<_ACEOF
10973 /* end confdefs.h.  */
10974 #include <X11/Xlib.h>
10975
10976 #include <X11/extensions/Xinerama.h>
10977 _ACEOF
10978 rm -f conftest.$ac_objext
10979 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10980   (eval $ac_compile) 2>conftest.er1
10981   ac_status=$?
10982   grep -v '^ *+' conftest.er1 >conftest.err
10983   rm -f conftest.er1
10984   cat conftest.err >&5
10985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10986   (exit $ac_status); } &&
10987          { ac_try='test -z "$ac_c_werror_flag"
10988                          || test ! -s conftest.err'
10989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10990   (eval $ac_try) 2>&5
10991   ac_status=$?
10992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10993   (exit $ac_status); }; } &&
10994          { ac_try='test -s conftest.$ac_objext'
10995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10996   (eval $ac_try) 2>&5
10997   ac_status=$?
10998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10999   (exit $ac_status); }; }; then
11000   ac_cv_header_X11_extensions_Xinerama_h=yes
11001 else
11002   echo "$as_me: failed program was:" >&5
11003 sed 's/^/| /' conftest.$ac_ext >&5
11004
11005 ac_cv_header_X11_extensions_Xinerama_h=no
11006 fi
11007 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11008 fi
11009 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11010 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
11011 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
11012   have_xinerama=yes
11013 fi
11014
11015
11016   CPPFLAGS="$ac_save_CPPFLAGS"
11017
11018   # if that succeeded, then check for the XINERAMA code in the libraries
11019   if test "$have_xinerama" = yes; then
11020
11021     # first look in -lXext
11022     have_xinerama=no
11023
11024   ac_save_CPPFLAGS="$CPPFLAGS"
11025   ac_save_LDFLAGS="$LDFLAGS"
11026 #  ac_save_LIBS="$LIBS"
11027
11028   if test \! -z "$includedir" ; then
11029     CPPFLAGS="$CPPFLAGS -I$includedir"
11030   fi
11031   # note: $X_CFLAGS includes $x_includes
11032   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11033
11034   if test \! -z "$libdir" ; then
11035     LDFLAGS="$LDFLAGS -L$libdir"
11036   fi
11037   # note: $X_LIBS includes $x_libraries
11038   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11039
11040   echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11041 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6
11042 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11043   echo $ECHO_N "(cached) $ECHO_C" >&6
11044 else
11045   ac_check_lib_save_LIBS=$LIBS
11046 LIBS="-lXext -lXext -lX11 $LIBS"
11047 cat >conftest.$ac_ext <<_ACEOF
11048 /* confdefs.h.  */
11049 _ACEOF
11050 cat confdefs.h >>conftest.$ac_ext
11051 cat >>conftest.$ac_ext <<_ACEOF
11052 /* end confdefs.h.  */
11053
11054 /* Override any gcc2 internal prototype to avoid an error.  */
11055 #ifdef __cplusplus
11056 extern "C"
11057 #endif
11058 /* We use char because int might match the return type of a gcc2
11059    builtin and then its argument prototype would still apply.  */
11060 char XineramaQueryScreens ();
11061 int
11062 main ()
11063 {
11064 XineramaQueryScreens ();
11065   ;
11066   return 0;
11067 }
11068 _ACEOF
11069 rm -f conftest.$ac_objext conftest$ac_exeext
11070 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11071   (eval $ac_link) 2>conftest.er1
11072   ac_status=$?
11073   grep -v '^ *+' conftest.er1 >conftest.err
11074   rm -f conftest.er1
11075   cat conftest.err >&5
11076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11077   (exit $ac_status); } &&
11078          { ac_try='test -z "$ac_c_werror_flag"
11079                          || test ! -s conftest.err'
11080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11081   (eval $ac_try) 2>&5
11082   ac_status=$?
11083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11084   (exit $ac_status); }; } &&
11085          { ac_try='test -s conftest$ac_exeext'
11086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11087   (eval $ac_try) 2>&5
11088   ac_status=$?
11089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11090   (exit $ac_status); }; }; then
11091   ac_cv_lib_Xext_XineramaQueryScreens=yes
11092 else
11093   echo "$as_me: failed program was:" >&5
11094 sed 's/^/| /' conftest.$ac_ext >&5
11095
11096 ac_cv_lib_Xext_XineramaQueryScreens=no
11097 fi
11098 rm -f conftest.err conftest.$ac_objext \
11099       conftest$ac_exeext conftest.$ac_ext
11100 LIBS=$ac_check_lib_save_LIBS
11101 fi
11102 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11103 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6
11104 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
11105   have_xinerama=yes
11106 else
11107   true
11108 fi
11109
11110   CPPFLAGS="$ac_save_CPPFLAGS"
11111   LDFLAGS="$ac_save_LDFLAGS"
11112 #  LIBS="$ac_save_LIBS"
11113
11114
11115     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11116     if test "$have_xinerama" = no; then
11117
11118   ac_save_CPPFLAGS="$CPPFLAGS"
11119   ac_save_LDFLAGS="$LDFLAGS"
11120 #  ac_save_LIBS="$LIBS"
11121
11122   if test \! -z "$includedir" ; then
11123     CPPFLAGS="$CPPFLAGS -I$includedir"
11124   fi
11125   # note: $X_CFLAGS includes $x_includes
11126   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11127
11128   if test \! -z "$libdir" ; then
11129     LDFLAGS="$LDFLAGS -L$libdir"
11130   fi
11131   # note: $X_LIBS includes $x_libraries
11132   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11133
11134   echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11135 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
11136 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11137   echo $ECHO_N "(cached) $ECHO_C" >&6
11138 else
11139   ac_check_lib_save_LIBS=$LIBS
11140 LIBS="-lXinerama -lXext -lX11 $LIBS"
11141 cat >conftest.$ac_ext <<_ACEOF
11142 /* confdefs.h.  */
11143 _ACEOF
11144 cat confdefs.h >>conftest.$ac_ext
11145 cat >>conftest.$ac_ext <<_ACEOF
11146 /* end confdefs.h.  */
11147
11148 /* Override any gcc2 internal prototype to avoid an error.  */
11149 #ifdef __cplusplus
11150 extern "C"
11151 #endif
11152 /* We use char because int might match the return type of a gcc2
11153    builtin and then its argument prototype would still apply.  */
11154 char XineramaQueryScreens ();
11155 int
11156 main ()
11157 {
11158 XineramaQueryScreens ();
11159   ;
11160   return 0;
11161 }
11162 _ACEOF
11163 rm -f conftest.$ac_objext conftest$ac_exeext
11164 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11165   (eval $ac_link) 2>conftest.er1
11166   ac_status=$?
11167   grep -v '^ *+' conftest.er1 >conftest.err
11168   rm -f conftest.er1
11169   cat conftest.err >&5
11170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11171   (exit $ac_status); } &&
11172          { ac_try='test -z "$ac_c_werror_flag"
11173                          || test ! -s conftest.err'
11174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11175   (eval $ac_try) 2>&5
11176   ac_status=$?
11177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11178   (exit $ac_status); }; } &&
11179          { ac_try='test -s conftest$ac_exeext'
11180   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11181   (eval $ac_try) 2>&5
11182   ac_status=$?
11183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11184   (exit $ac_status); }; }; then
11185   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11186 else
11187   echo "$as_me: failed program was:" >&5
11188 sed 's/^/| /' conftest.$ac_ext >&5
11189
11190 ac_cv_lib_Xinerama_XineramaQueryScreens=no
11191 fi
11192 rm -f conftest.err conftest.$ac_objext \
11193       conftest$ac_exeext conftest.$ac_ext
11194 LIBS=$ac_check_lib_save_LIBS
11195 fi
11196 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11197 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
11198 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
11199   have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"
11200 else
11201   true
11202 fi
11203
11204   CPPFLAGS="$ac_save_CPPFLAGS"
11205   LDFLAGS="$ac_save_LDFLAGS"
11206 #  LIBS="$ac_save_LIBS"
11207
11208     fi
11209   fi
11210
11211   # if that succeeded, then we've really got it.
11212   if test "$have_xinerama" = yes; then
11213     cat >>confdefs.h <<\_ACEOF
11214 #define HAVE_XINERAMA 1
11215 _ACEOF
11216
11217   fi
11218
11219 elif test "$with_xinerama" != no; then
11220   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
11221   exit 1
11222 fi
11223
11224
11225 ###############################################################################
11226 #
11227 #       Check for the XF86VMODE server extension (for virtual screens.)
11228 #
11229 ###############################################################################
11230
11231 have_xf86vmode=no
11232 with_xf86vmode_req=unspecified
11233
11234 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
11235 if test "${with_xf86vmode_ext+set}" = set; then
11236   withval="$with_xf86vmode_ext"
11237   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
11238 else
11239   with_xf86vmode=yes
11240 fi;
11241
11242
11243    case "$with_xf86vmode" in
11244     yes) ;;
11245     no)  ;;
11246
11247     /*)
11248      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
11249 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
11250      d=$with_xf86vmode/include
11251      if test -d $d; then
11252        X_CFLAGS="-I$d $X_CFLAGS"
11253        echo "$as_me:$LINENO: result: $d" >&5
11254 echo "${ECHO_T}$d" >&6
11255      else
11256        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11257 echo "${ECHO_T}not found ($d: no such directory)" >&6
11258      fi
11259
11260      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
11261 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
11262      d=$with_xf86vmode/lib
11263      if test -d $d; then
11264        X_LIBS="-L$d $X_LIBS"
11265        echo "$as_me:$LINENO: result: $d" >&5
11266 echo "${ECHO_T}$d" >&6
11267      else
11268        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11269 echo "${ECHO_T}not found ($d: no such directory)" >&6
11270      fi
11271
11272      # replace the directory string with "yes".
11273      with_xf86vmode_req="yes"
11274      with_xf86vmode=$with_xf86vmode_req
11275      ;;
11276
11277     *)
11278      echo ""
11279      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
11280      echo "       If it is a directory, then \`DIR/include' will be added to"
11281      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11282      exit 1
11283      ;;
11284    esac
11285
11286
11287 VIDMODE_LIBS=""
11288
11289 if test "$with_xf86vmode" = yes; then
11290
11291   # first check for xf86vmode.h
11292
11293   ac_save_CPPFLAGS="$CPPFLAGS"
11294   if test \! -z "$includedir" ; then
11295     CPPFLAGS="$CPPFLAGS -I$includedir"
11296   fi
11297   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11298   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11299 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
11300 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11301   echo $ECHO_N "(cached) $ECHO_C" >&6
11302 else
11303   cat >conftest.$ac_ext <<_ACEOF
11304 /* confdefs.h.  */
11305 _ACEOF
11306 cat confdefs.h >>conftest.$ac_ext
11307 cat >>conftest.$ac_ext <<_ACEOF
11308 /* end confdefs.h.  */
11309 #include <X11/Xlib.h>
11310
11311 #include <X11/extensions/xf86vmode.h>
11312 _ACEOF
11313 rm -f conftest.$ac_objext
11314 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11315   (eval $ac_compile) 2>conftest.er1
11316   ac_status=$?
11317   grep -v '^ *+' conftest.er1 >conftest.err
11318   rm -f conftest.er1
11319   cat conftest.err >&5
11320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11321   (exit $ac_status); } &&
11322          { ac_try='test -z "$ac_c_werror_flag"
11323                          || test ! -s conftest.err'
11324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11325   (eval $ac_try) 2>&5
11326   ac_status=$?
11327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11328   (exit $ac_status); }; } &&
11329          { ac_try='test -s conftest.$ac_objext'
11330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11331   (eval $ac_try) 2>&5
11332   ac_status=$?
11333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11334   (exit $ac_status); }; }; then
11335   ac_cv_header_X11_extensions_xf86vmode_h=yes
11336 else
11337   echo "$as_me: failed program was:" >&5
11338 sed 's/^/| /' conftest.$ac_ext >&5
11339
11340 ac_cv_header_X11_extensions_xf86vmode_h=no
11341 fi
11342 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11343 fi
11344 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11345 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
11346 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11347   have_xf86vmode=yes
11348 fi
11349
11350
11351   CPPFLAGS="$ac_save_CPPFLAGS"
11352
11353   # if that succeeded, then check for the -lXxf86vm
11354   if test "$have_xf86vmode" = yes; then
11355     have_xf86vmode=no
11356
11357   ac_save_CPPFLAGS="$CPPFLAGS"
11358   ac_save_LDFLAGS="$LDFLAGS"
11359 #  ac_save_LIBS="$LIBS"
11360
11361   if test \! -z "$includedir" ; then
11362     CPPFLAGS="$CPPFLAGS -I$includedir"
11363   fi
11364   # note: $X_CFLAGS includes $x_includes
11365   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11366
11367   if test \! -z "$libdir" ; then
11368     LDFLAGS="$LDFLAGS -L$libdir"
11369   fi
11370   # note: $X_LIBS includes $x_libraries
11371   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11372
11373   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
11374 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
11375 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
11376   echo $ECHO_N "(cached) $ECHO_C" >&6
11377 else
11378   ac_check_lib_save_LIBS=$LIBS
11379 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11380 cat >conftest.$ac_ext <<_ACEOF
11381 /* confdefs.h.  */
11382 _ACEOF
11383 cat confdefs.h >>conftest.$ac_ext
11384 cat >>conftest.$ac_ext <<_ACEOF
11385 /* end confdefs.h.  */
11386
11387 /* Override any gcc2 internal prototype to avoid an error.  */
11388 #ifdef __cplusplus
11389 extern "C"
11390 #endif
11391 /* We use char because int might match the return type of a gcc2
11392    builtin and then its argument prototype would still apply.  */
11393 char XF86VidModeGetViewPort ();
11394 int
11395 main ()
11396 {
11397 XF86VidModeGetViewPort ();
11398   ;
11399   return 0;
11400 }
11401 _ACEOF
11402 rm -f conftest.$ac_objext conftest$ac_exeext
11403 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11404   (eval $ac_link) 2>conftest.er1
11405   ac_status=$?
11406   grep -v '^ *+' conftest.er1 >conftest.err
11407   rm -f conftest.er1
11408   cat conftest.err >&5
11409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11410   (exit $ac_status); } &&
11411          { ac_try='test -z "$ac_c_werror_flag"
11412                          || test ! -s conftest.err'
11413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11414   (eval $ac_try) 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_Xxf86vm_XF86VidModeGetViewPort=yes
11425 else
11426   echo "$as_me: failed program was:" >&5
11427 sed 's/^/| /' conftest.$ac_ext >&5
11428
11429 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
11430 fi
11431 rm -f conftest.err conftest.$ac_objext \
11432       conftest$ac_exeext conftest.$ac_ext
11433 LIBS=$ac_check_lib_save_LIBS
11434 fi
11435 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
11436 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
11437 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
11438   have_xf86vmode=yes;
11439                    VIDMODE_LIBS="-lXxf86vm";
11440                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
11441 else
11442   true
11443 fi
11444
11445   CPPFLAGS="$ac_save_CPPFLAGS"
11446   LDFLAGS="$ac_save_LDFLAGS"
11447 #  LIBS="$ac_save_LIBS"
11448
11449   fi
11450
11451   # if that succeeded, then we've really got it.
11452   if test "$have_xf86vmode" = yes; then
11453     cat >>confdefs.h <<\_ACEOF
11454 #define HAVE_XF86VMODE 1
11455 _ACEOF
11456
11457   fi
11458
11459 elif test "$with_xf86vmode" != no; then
11460   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
11461   exit 1
11462 fi
11463
11464
11465 ###############################################################################
11466 #
11467 #       Check for the XF86VMODE server extension (for gamma fading.)
11468 #
11469 ###############################################################################
11470
11471 have_xf86gamma=no
11472 have_xf86gamma_ramp=no
11473 with_xf86gamma_req=unspecified
11474
11475 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
11476 if test "${with_xf86gamma_ext+set}" = set; then
11477   withval="$with_xf86gamma_ext"
11478   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
11479 else
11480   with_xf86gamma=yes
11481 fi;
11482
11483
11484    case "$with_xf86gamma" in
11485     yes) ;;
11486     no)  ;;
11487
11488     /*)
11489      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
11490 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
11491      d=$with_xf86gamma/include
11492      if test -d $d; then
11493        X_CFLAGS="-I$d $X_CFLAGS"
11494        echo "$as_me:$LINENO: result: $d" >&5
11495 echo "${ECHO_T}$d" >&6
11496      else
11497        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11498 echo "${ECHO_T}not found ($d: no such directory)" >&6
11499      fi
11500
11501      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
11502 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
11503      d=$with_xf86gamma/lib
11504      if test -d $d; then
11505        X_LIBS="-L$d $X_LIBS"
11506        echo "$as_me:$LINENO: result: $d" >&5
11507 echo "${ECHO_T}$d" >&6
11508      else
11509        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11510 echo "${ECHO_T}not found ($d: no such directory)" >&6
11511      fi
11512
11513      # replace the directory string with "yes".
11514      with_xf86gamma_req="yes"
11515      with_xf86gamma=$with_xf86gamma_req
11516      ;;
11517
11518     *)
11519      echo ""
11520      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
11521      echo "       If it is a directory, then \`DIR/include' will be added to"
11522      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11523      exit 1
11524      ;;
11525    esac
11526
11527
11528 if test "$with_xf86gamma" = yes; then
11529
11530   # first check for xf86vmode.h, if we haven't already
11531   if test "$have_xf86vmode" = yes; then
11532     have_xf86gamma=yes
11533   else
11534
11535   ac_save_CPPFLAGS="$CPPFLAGS"
11536   if test \! -z "$includedir" ; then
11537     CPPFLAGS="$CPPFLAGS -I$includedir"
11538   fi
11539   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11540   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11541 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
11542 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11543   echo $ECHO_N "(cached) $ECHO_C" >&6
11544 else
11545   cat >conftest.$ac_ext <<_ACEOF
11546 /* confdefs.h.  */
11547 _ACEOF
11548 cat confdefs.h >>conftest.$ac_ext
11549 cat >>conftest.$ac_ext <<_ACEOF
11550 /* end confdefs.h.  */
11551 #include <X11/Xlib.h>
11552
11553 #include <X11/extensions/xf86vmode.h>
11554 _ACEOF
11555 rm -f conftest.$ac_objext
11556 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11557   (eval $ac_compile) 2>conftest.er1
11558   ac_status=$?
11559   grep -v '^ *+' conftest.er1 >conftest.err
11560   rm -f conftest.er1
11561   cat conftest.err >&5
11562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11563   (exit $ac_status); } &&
11564          { ac_try='test -z "$ac_c_werror_flag"
11565                          || test ! -s conftest.err'
11566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11567   (eval $ac_try) 2>&5
11568   ac_status=$?
11569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11570   (exit $ac_status); }; } &&
11571          { ac_try='test -s conftest.$ac_objext'
11572   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11573   (eval $ac_try) 2>&5
11574   ac_status=$?
11575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11576   (exit $ac_status); }; }; then
11577   ac_cv_header_X11_extensions_xf86vmode_h=yes
11578 else
11579   echo "$as_me: failed program was:" >&5
11580 sed 's/^/| /' conftest.$ac_ext >&5
11581
11582 ac_cv_header_X11_extensions_xf86vmode_h=no
11583 fi
11584 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11585 fi
11586 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11587 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
11588 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11589   have_xf86gamma=yes
11590 fi
11591
11592
11593   CPPFLAGS="$ac_save_CPPFLAGS"
11594   fi
11595
11596   # if that succeeded, then check for the -lXxf86vm
11597   if test "$have_xf86gamma" = yes; then
11598     have_xf86gamma=no
11599
11600   ac_save_CPPFLAGS="$CPPFLAGS"
11601   ac_save_LDFLAGS="$LDFLAGS"
11602 #  ac_save_LIBS="$LIBS"
11603
11604   if test \! -z "$includedir" ; then
11605     CPPFLAGS="$CPPFLAGS -I$includedir"
11606   fi
11607   # note: $X_CFLAGS includes $x_includes
11608   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11609
11610   if test \! -z "$libdir" ; then
11611     LDFLAGS="$LDFLAGS -L$libdir"
11612   fi
11613   # note: $X_LIBS includes $x_libraries
11614   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11615
11616   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
11617 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
11618 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
11619   echo $ECHO_N "(cached) $ECHO_C" >&6
11620 else
11621   ac_check_lib_save_LIBS=$LIBS
11622 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11623 cat >conftest.$ac_ext <<_ACEOF
11624 /* confdefs.h.  */
11625 _ACEOF
11626 cat confdefs.h >>conftest.$ac_ext
11627 cat >>conftest.$ac_ext <<_ACEOF
11628 /* end confdefs.h.  */
11629
11630 /* Override any gcc2 internal prototype to avoid an error.  */
11631 #ifdef __cplusplus
11632 extern "C"
11633 #endif
11634 /* We use char because int might match the return type of a gcc2
11635    builtin and then its argument prototype would still apply.  */
11636 char XF86VidModeSetGamma ();
11637 int
11638 main ()
11639 {
11640 XF86VidModeSetGamma ();
11641   ;
11642   return 0;
11643 }
11644 _ACEOF
11645 rm -f conftest.$ac_objext conftest$ac_exeext
11646 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11647   (eval $ac_link) 2>conftest.er1
11648   ac_status=$?
11649   grep -v '^ *+' conftest.er1 >conftest.err
11650   rm -f conftest.er1
11651   cat conftest.err >&5
11652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11653   (exit $ac_status); } &&
11654          { ac_try='test -z "$ac_c_werror_flag"
11655                          || test ! -s conftest.err'
11656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11657   (eval $ac_try) 2>&5
11658   ac_status=$?
11659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11660   (exit $ac_status); }; } &&
11661          { ac_try='test -s conftest$ac_exeext'
11662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11663   (eval $ac_try) 2>&5
11664   ac_status=$?
11665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11666   (exit $ac_status); }; }; then
11667   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
11668 else
11669   echo "$as_me: failed program was:" >&5
11670 sed 's/^/| /' conftest.$ac_ext >&5
11671
11672 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
11673 fi
11674 rm -f conftest.err conftest.$ac_objext \
11675       conftest$ac_exeext conftest.$ac_ext
11676 LIBS=$ac_check_lib_save_LIBS
11677 fi
11678 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
11679 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
11680 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
11681   have_xf86gamma=yes
11682 else
11683   true
11684 fi
11685
11686   CPPFLAGS="$ac_save_CPPFLAGS"
11687   LDFLAGS="$ac_save_LDFLAGS"
11688 #  LIBS="$ac_save_LIBS"
11689
11690   fi
11691
11692   # check for the Ramp versions of the functions too.
11693   if test "$have_xf86gamma" = yes; then
11694     have_xf86gamma_ramp=no
11695
11696   ac_save_CPPFLAGS="$CPPFLAGS"
11697   ac_save_LDFLAGS="$LDFLAGS"
11698 #  ac_save_LIBS="$LIBS"
11699
11700   if test \! -z "$includedir" ; then
11701     CPPFLAGS="$CPPFLAGS -I$includedir"
11702   fi
11703   # note: $X_CFLAGS includes $x_includes
11704   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11705
11706   if test \! -z "$libdir" ; then
11707     LDFLAGS="$LDFLAGS -L$libdir"
11708   fi
11709   # note: $X_LIBS includes $x_libraries
11710   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11711
11712   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
11713 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
11714 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
11715   echo $ECHO_N "(cached) $ECHO_C" >&6
11716 else
11717   ac_check_lib_save_LIBS=$LIBS
11718 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11719 cat >conftest.$ac_ext <<_ACEOF
11720 /* confdefs.h.  */
11721 _ACEOF
11722 cat confdefs.h >>conftest.$ac_ext
11723 cat >>conftest.$ac_ext <<_ACEOF
11724 /* end confdefs.h.  */
11725
11726 /* Override any gcc2 internal prototype to avoid an error.  */
11727 #ifdef __cplusplus
11728 extern "C"
11729 #endif
11730 /* We use char because int might match the return type of a gcc2
11731    builtin and then its argument prototype would still apply.  */
11732 char XF86VidModeSetGammaRamp ();
11733 int
11734 main ()
11735 {
11736 XF86VidModeSetGammaRamp ();
11737   ;
11738   return 0;
11739 }
11740 _ACEOF
11741 rm -f conftest.$ac_objext conftest$ac_exeext
11742 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11743   (eval $ac_link) 2>conftest.er1
11744   ac_status=$?
11745   grep -v '^ *+' conftest.er1 >conftest.err
11746   rm -f conftest.er1
11747   cat conftest.err >&5
11748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11749   (exit $ac_status); } &&
11750          { ac_try='test -z "$ac_c_werror_flag"
11751                          || test ! -s conftest.err'
11752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11753   (eval $ac_try) 2>&5
11754   ac_status=$?
11755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11756   (exit $ac_status); }; } &&
11757          { ac_try='test -s conftest$ac_exeext'
11758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11759   (eval $ac_try) 2>&5
11760   ac_status=$?
11761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11762   (exit $ac_status); }; }; then
11763   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
11764 else
11765   echo "$as_me: failed program was:" >&5
11766 sed 's/^/| /' conftest.$ac_ext >&5
11767
11768 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
11769 fi
11770 rm -f conftest.err conftest.$ac_objext \
11771       conftest$ac_exeext conftest.$ac_ext
11772 LIBS=$ac_check_lib_save_LIBS
11773 fi
11774 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
11775 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
11776 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
11777   have_xf86gamma_ramp=yes
11778 else
11779   true
11780 fi
11781
11782   CPPFLAGS="$ac_save_CPPFLAGS"
11783   LDFLAGS="$ac_save_LDFLAGS"
11784 #  LIBS="$ac_save_LIBS"
11785
11786   fi
11787
11788   # if those tests succeeded, then we've really got the functions.
11789   if test "$have_xf86gamma" = yes; then
11790     cat >>confdefs.h <<\_ACEOF
11791 #define HAVE_XF86VMODE_GAMMA 1
11792 _ACEOF
11793
11794   fi
11795
11796   if test "$have_xf86gamma_ramp" = yes; then
11797     cat >>confdefs.h <<\_ACEOF
11798 #define HAVE_XF86VMODE_GAMMA_RAMP 1
11799 _ACEOF
11800
11801   fi
11802
11803   # pull in the lib, if we haven't already
11804   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
11805     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
11806   fi
11807
11808 elif test "$with_xf86gamma" != no; then
11809   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
11810   exit 1
11811 fi
11812
11813
11814 ###############################################################################
11815 #
11816 #       Check for the RANDR (Resize and Rotate) server extension.
11817 #
11818 #       We need this to detect when the resolution of the desktop
11819 #       has changed out from under us (this is a newer, different
11820 #       mechanism than the XF86VMODE virtual viewports.)
11821 #
11822 ###############################################################################
11823
11824 have_randr=no
11825 with_randr_req=unspecified
11826
11827 # Check whether --with-randr-ext or --without-randr-ext was given.
11828 if test "${with_randr_ext+set}" = set; then
11829   withval="$with_randr_ext"
11830   with_randr="$withval"; with_randr_req="$withval"
11831 else
11832   with_randr=yes
11833 fi;
11834
11835
11836    case "$with_randr" in
11837     yes) ;;
11838     no)  ;;
11839
11840     /*)
11841      echo "$as_me:$LINENO: checking for RANDR headers" >&5
11842 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6
11843      d=$with_randr/include
11844      if test -d $d; then
11845        X_CFLAGS="-I$d $X_CFLAGS"
11846        echo "$as_me:$LINENO: result: $d" >&5
11847 echo "${ECHO_T}$d" >&6
11848      else
11849        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11850 echo "${ECHO_T}not found ($d: no such directory)" >&6
11851      fi
11852
11853      echo "$as_me:$LINENO: checking for RANDR libs" >&5
11854 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6
11855      d=$with_randr/lib
11856      if test -d $d; then
11857        X_LIBS="-L$d $X_LIBS"
11858        echo "$as_me:$LINENO: result: $d" >&5
11859 echo "${ECHO_T}$d" >&6
11860      else
11861        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11862 echo "${ECHO_T}not found ($d: no such directory)" >&6
11863      fi
11864
11865      # replace the directory string with "yes".
11866      with_randr_req="yes"
11867      with_randr=$with_randr_req
11868      ;;
11869
11870     *)
11871      echo ""
11872      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
11873      echo "       If it is a directory, then \`DIR/include' will be added to"
11874      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11875      exit 1
11876      ;;
11877    esac
11878
11879
11880 if test "$with_randr" = yes; then
11881
11882   # first check for Randr.h
11883
11884   ac_save_CPPFLAGS="$CPPFLAGS"
11885   if test \! -z "$includedir" ; then
11886     CPPFLAGS="$CPPFLAGS -I$includedir"
11887   fi
11888   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11889   echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
11890 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6
11891 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
11892   echo $ECHO_N "(cached) $ECHO_C" >&6
11893 else
11894   cat >conftest.$ac_ext <<_ACEOF
11895 /* confdefs.h.  */
11896 _ACEOF
11897 cat confdefs.h >>conftest.$ac_ext
11898 cat >>conftest.$ac_ext <<_ACEOF
11899 /* end confdefs.h.  */
11900 #include <X11/Xlib.h>
11901
11902 #include <X11/extensions/Xrandr.h>
11903 _ACEOF
11904 rm -f conftest.$ac_objext
11905 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11906   (eval $ac_compile) 2>conftest.er1
11907   ac_status=$?
11908   grep -v '^ *+' conftest.er1 >conftest.err
11909   rm -f conftest.er1
11910   cat conftest.err >&5
11911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11912   (exit $ac_status); } &&
11913          { ac_try='test -z "$ac_c_werror_flag"
11914                          || test ! -s conftest.err'
11915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11916   (eval $ac_try) 2>&5
11917   ac_status=$?
11918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11919   (exit $ac_status); }; } &&
11920          { ac_try='test -s conftest.$ac_objext'
11921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11922   (eval $ac_try) 2>&5
11923   ac_status=$?
11924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11925   (exit $ac_status); }; }; then
11926   ac_cv_header_X11_extensions_Xrandr_h=yes
11927 else
11928   echo "$as_me: failed program was:" >&5
11929 sed 's/^/| /' conftest.$ac_ext >&5
11930
11931 ac_cv_header_X11_extensions_Xrandr_h=no
11932 fi
11933 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11934 fi
11935 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
11936 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6
11937 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
11938   have_randr=yes
11939 fi
11940
11941
11942   CPPFLAGS="$ac_save_CPPFLAGS"
11943
11944   # if that succeeded, then check for the XRR code in the libraries
11945   if test "$have_randr" = yes; then
11946
11947     # RANDR probably needs -lXrender
11948     xrender_libs=
11949
11950   ac_save_CPPFLAGS="$CPPFLAGS"
11951   ac_save_LDFLAGS="$LDFLAGS"
11952 #  ac_save_LIBS="$LIBS"
11953
11954   if test \! -z "$includedir" ; then
11955     CPPFLAGS="$CPPFLAGS -I$includedir"
11956   fi
11957   # note: $X_CFLAGS includes $x_includes
11958   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11959
11960   if test \! -z "$libdir" ; then
11961     LDFLAGS="$LDFLAGS -L$libdir"
11962   fi
11963   # note: $X_LIBS includes $x_libraries
11964   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11965
11966   echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
11967 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6
11968 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
11969   echo $ECHO_N "(cached) $ECHO_C" >&6
11970 else
11971   ac_check_lib_save_LIBS=$LIBS
11972 LIBS="-lXrender -lXext -lX11 $LIBS"
11973 cat >conftest.$ac_ext <<_ACEOF
11974 /* confdefs.h.  */
11975 _ACEOF
11976 cat confdefs.h >>conftest.$ac_ext
11977 cat >>conftest.$ac_ext <<_ACEOF
11978 /* end confdefs.h.  */
11979
11980 /* Override any gcc2 internal prototype to avoid an error.  */
11981 #ifdef __cplusplus
11982 extern "C"
11983 #endif
11984 /* We use char because int might match the return type of a gcc2
11985    builtin and then its argument prototype would still apply.  */
11986 char XRenderSetSubpixelOrder ();
11987 int
11988 main ()
11989 {
11990 XRenderSetSubpixelOrder ();
11991   ;
11992   return 0;
11993 }
11994 _ACEOF
11995 rm -f conftest.$ac_objext conftest$ac_exeext
11996 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11997   (eval $ac_link) 2>conftest.er1
11998   ac_status=$?
11999   grep -v '^ *+' conftest.er1 >conftest.err
12000   rm -f conftest.er1
12001   cat conftest.err >&5
12002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12003   (exit $ac_status); } &&
12004          { ac_try='test -z "$ac_c_werror_flag"
12005                          || test ! -s conftest.err'
12006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12007   (eval $ac_try) 2>&5
12008   ac_status=$?
12009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12010   (exit $ac_status); }; } &&
12011          { ac_try='test -s conftest$ac_exeext'
12012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12013   (eval $ac_try) 2>&5
12014   ac_status=$?
12015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12016   (exit $ac_status); }; }; then
12017   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
12018 else
12019   echo "$as_me: failed program was:" >&5
12020 sed 's/^/| /' conftest.$ac_ext >&5
12021
12022 ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
12023 fi
12024 rm -f conftest.err conftest.$ac_objext \
12025       conftest$ac_exeext conftest.$ac_ext
12026 LIBS=$ac_check_lib_save_LIBS
12027 fi
12028 echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
12029 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6
12030 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
12031   xrender_libs="-lXrender"
12032 else
12033   true
12034 fi
12035
12036   CPPFLAGS="$ac_save_CPPFLAGS"
12037   LDFLAGS="$ac_save_LDFLAGS"
12038 #  LIBS="$ac_save_LIBS"
12039
12040
12041     # first look for RANDR in -lXext
12042     have_randr=no
12043
12044   ac_save_CPPFLAGS="$CPPFLAGS"
12045   ac_save_LDFLAGS="$LDFLAGS"
12046 #  ac_save_LIBS="$LIBS"
12047
12048   if test \! -z "$includedir" ; then
12049     CPPFLAGS="$CPPFLAGS -I$includedir"
12050   fi
12051   # note: $X_CFLAGS includes $x_includes
12052   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12053
12054   if test \! -z "$libdir" ; then
12055     LDFLAGS="$LDFLAGS -L$libdir"
12056   fi
12057   # note: $X_LIBS includes $x_libraries
12058   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12059
12060   echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
12061 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6
12062 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
12063   echo $ECHO_N "(cached) $ECHO_C" >&6
12064 else
12065   ac_check_lib_save_LIBS=$LIBS
12066 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
12067 cat >conftest.$ac_ext <<_ACEOF
12068 /* confdefs.h.  */
12069 _ACEOF
12070 cat confdefs.h >>conftest.$ac_ext
12071 cat >>conftest.$ac_ext <<_ACEOF
12072 /* end confdefs.h.  */
12073
12074 /* Override any gcc2 internal prototype to avoid an error.  */
12075 #ifdef __cplusplus
12076 extern "C"
12077 #endif
12078 /* We use char because int might match the return type of a gcc2
12079    builtin and then its argument prototype would still apply.  */
12080 char XRRGetScreenInfo ();
12081 int
12082 main ()
12083 {
12084 XRRGetScreenInfo ();
12085   ;
12086   return 0;
12087 }
12088 _ACEOF
12089 rm -f conftest.$ac_objext conftest$ac_exeext
12090 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12091   (eval $ac_link) 2>conftest.er1
12092   ac_status=$?
12093   grep -v '^ *+' conftest.er1 >conftest.err
12094   rm -f conftest.er1
12095   cat conftest.err >&5
12096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12097   (exit $ac_status); } &&
12098          { ac_try='test -z "$ac_c_werror_flag"
12099                          || test ! -s conftest.err'
12100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12101   (eval $ac_try) 2>&5
12102   ac_status=$?
12103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12104   (exit $ac_status); }; } &&
12105          { ac_try='test -s conftest$ac_exeext'
12106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12107   (eval $ac_try) 2>&5
12108   ac_status=$?
12109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12110   (exit $ac_status); }; }; then
12111   ac_cv_lib_Xext_XRRGetScreenInfo=yes
12112 else
12113   echo "$as_me: failed program was:" >&5
12114 sed 's/^/| /' conftest.$ac_ext >&5
12115
12116 ac_cv_lib_Xext_XRRGetScreenInfo=no
12117 fi
12118 rm -f conftest.err conftest.$ac_objext \
12119       conftest$ac_exeext conftest.$ac_ext
12120 LIBS=$ac_check_lib_save_LIBS
12121 fi
12122 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
12123 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6
12124 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
12125   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
12126 else
12127   true
12128 fi
12129
12130   CPPFLAGS="$ac_save_CPPFLAGS"
12131   LDFLAGS="$ac_save_LDFLAGS"
12132 #  LIBS="$ac_save_LIBS"
12133
12134
12135     # if that failed, look in -lXrandr
12136     if test "$have_randr" = no; then
12137
12138   ac_save_CPPFLAGS="$CPPFLAGS"
12139   ac_save_LDFLAGS="$LDFLAGS"
12140 #  ac_save_LIBS="$LIBS"
12141
12142   if test \! -z "$includedir" ; then
12143     CPPFLAGS="$CPPFLAGS -I$includedir"
12144   fi
12145   # note: $X_CFLAGS includes $x_includes
12146   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12147
12148   if test \! -z "$libdir" ; then
12149     LDFLAGS="$LDFLAGS -L$libdir"
12150   fi
12151   # note: $X_LIBS includes $x_libraries
12152   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12153
12154   echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12155 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6
12156 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12157   echo $ECHO_N "(cached) $ECHO_C" >&6
12158 else
12159   ac_check_lib_save_LIBS=$LIBS
12160 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12161 cat >conftest.$ac_ext <<_ACEOF
12162 /* confdefs.h.  */
12163 _ACEOF
12164 cat confdefs.h >>conftest.$ac_ext
12165 cat >>conftest.$ac_ext <<_ACEOF
12166 /* end confdefs.h.  */
12167
12168 /* Override any gcc2 internal prototype to avoid an error.  */
12169 #ifdef __cplusplus
12170 extern "C"
12171 #endif
12172 /* We use char because int might match the return type of a gcc2
12173    builtin and then its argument prototype would still apply.  */
12174 char XRRGetScreenInfo ();
12175 int
12176 main ()
12177 {
12178 XRRGetScreenInfo ();
12179   ;
12180   return 0;
12181 }
12182 _ACEOF
12183 rm -f conftest.$ac_objext conftest$ac_exeext
12184 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12185   (eval $ac_link) 2>conftest.er1
12186   ac_status=$?
12187   grep -v '^ *+' conftest.er1 >conftest.err
12188   rm -f conftest.er1
12189   cat conftest.err >&5
12190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12191   (exit $ac_status); } &&
12192          { ac_try='test -z "$ac_c_werror_flag"
12193                          || test ! -s conftest.err'
12194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12195   (eval $ac_try) 2>&5
12196   ac_status=$?
12197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12198   (exit $ac_status); }; } &&
12199          { ac_try='test -s conftest$ac_exeext'
12200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12201   (eval $ac_try) 2>&5
12202   ac_status=$?
12203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12204   (exit $ac_status); }; }; then
12205   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
12206 else
12207   echo "$as_me: failed program was:" >&5
12208 sed 's/^/| /' conftest.$ac_ext >&5
12209
12210 ac_cv_lib_Xrandr_XRRGetScreenInfo=no
12211 fi
12212 rm -f conftest.err conftest.$ac_objext \
12213       conftest$ac_exeext conftest.$ac_ext
12214 LIBS=$ac_check_lib_save_LIBS
12215 fi
12216 echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
12217 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6
12218 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
12219   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
12220 else
12221   true
12222 fi
12223
12224   CPPFLAGS="$ac_save_CPPFLAGS"
12225   LDFLAGS="$ac_save_LDFLAGS"
12226 #  LIBS="$ac_save_LIBS"
12227
12228     fi
12229   fi
12230
12231   # if that succeeded, then we've really got it.
12232   if test "$have_randr" = yes; then
12233     cat >>confdefs.h <<\_ACEOF
12234 #define HAVE_RANDR 1
12235 _ACEOF
12236
12237   fi
12238
12239 elif test "$with_randr" != no; then
12240   echo "error: must be yes or no: --with-randr-ext=$with_randr"
12241   exit 1
12242 fi
12243
12244
12245 ###############################################################################
12246 #
12247 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
12248 #       using other XF86 stuff.)
12249 #
12250 ###############################################################################
12251
12252 have_xf86miscsetgrabkeysstate=no
12253 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
12254
12255   ac_save_CPPFLAGS="$CPPFLAGS"
12256   ac_save_LDFLAGS="$LDFLAGS"
12257 #  ac_save_LIBS="$LIBS"
12258
12259   if test \! -z "$includedir" ; then
12260     CPPFLAGS="$CPPFLAGS -I$includedir"
12261   fi
12262   # note: $X_CFLAGS includes $x_includes
12263   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12264
12265   if test \! -z "$libdir" ; then
12266     LDFLAGS="$LDFLAGS -L$libdir"
12267   fi
12268   # note: $X_LIBS includes $x_libraries
12269   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12270
12271   echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
12272 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6
12273 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
12274   echo $ECHO_N "(cached) $ECHO_C" >&6
12275 else
12276   ac_check_lib_save_LIBS=$LIBS
12277 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
12278 cat >conftest.$ac_ext <<_ACEOF
12279 /* confdefs.h.  */
12280 _ACEOF
12281 cat confdefs.h >>conftest.$ac_ext
12282 cat >>conftest.$ac_ext <<_ACEOF
12283 /* end confdefs.h.  */
12284
12285 /* Override any gcc2 internal prototype to avoid an error.  */
12286 #ifdef __cplusplus
12287 extern "C"
12288 #endif
12289 /* We use char because int might match the return type of a gcc2
12290    builtin and then its argument prototype would still apply.  */
12291 char XF86MiscSetGrabKeysState ();
12292 int
12293 main ()
12294 {
12295 XF86MiscSetGrabKeysState ();
12296   ;
12297   return 0;
12298 }
12299 _ACEOF
12300 rm -f conftest.$ac_objext conftest$ac_exeext
12301 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12302   (eval $ac_link) 2>conftest.er1
12303   ac_status=$?
12304   grep -v '^ *+' conftest.er1 >conftest.err
12305   rm -f conftest.er1
12306   cat conftest.err >&5
12307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12308   (exit $ac_status); } &&
12309          { ac_try='test -z "$ac_c_werror_flag"
12310                          || test ! -s conftest.err'
12311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12312   (eval $ac_try) 2>&5
12313   ac_status=$?
12314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12315   (exit $ac_status); }; } &&
12316          { ac_try='test -s conftest$ac_exeext'
12317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12318   (eval $ac_try) 2>&5
12319   ac_status=$?
12320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12321   (exit $ac_status); }; }; then
12322   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
12323 else
12324   echo "$as_me: failed program was:" >&5
12325 sed 's/^/| /' conftest.$ac_ext >&5
12326
12327 ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
12328 fi
12329 rm -f conftest.err conftest.$ac_objext \
12330       conftest$ac_exeext conftest.$ac_ext
12331 LIBS=$ac_check_lib_save_LIBS
12332 fi
12333 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
12334 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6
12335 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
12336   have_xf86miscsetgrabkeysstate=yes
12337 else
12338   true
12339 fi
12340
12341   CPPFLAGS="$ac_save_CPPFLAGS"
12342   LDFLAGS="$ac_save_LDFLAGS"
12343 #  LIBS="$ac_save_LIBS"
12344
12345   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
12346     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
12347     cat >>confdefs.h <<\_ACEOF
12348 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
12349 _ACEOF
12350
12351   fi
12352 fi
12353
12354
12355 ###############################################################################
12356 #
12357 #       Check for HP XHPDisableReset and XHPEnableReset.
12358 #
12359 ###############################################################################
12360
12361 echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
12362 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6
12363
12364   ac_save_CPPFLAGS="$CPPFLAGS"
12365   if test \! -z "$includedir" ; then
12366     CPPFLAGS="$CPPFLAGS -I$includedir"
12367   fi
12368   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12369   cat >conftest.$ac_ext <<_ACEOF
12370 /* confdefs.h.  */
12371 _ACEOF
12372 cat confdefs.h >>conftest.$ac_ext
12373 cat >>conftest.$ac_ext <<_ACEOF
12374 /* end confdefs.h.  */
12375 #include <X11/XHPlib.h>
12376
12377 _ACEOF
12378 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12379   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
12380   cat >>confdefs.h <<\_ACEOF
12381 #define HAVE_XHPDISABLERESET 1
12382 _ACEOF
12383
12384                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
12385                    echo "$as_me:$LINENO: result: yes" >&5
12386 echo "${ECHO_T}yes" >&6
12387 else
12388   echo "$as_me:$LINENO: result: no" >&5
12389 echo "${ECHO_T}no" >&6
12390 fi
12391 rm -f conftest*
12392
12393   CPPFLAGS="$ac_save_CPPFLAGS"
12394
12395
12396 ###############################################################################
12397 #
12398 #       Check for /proc/interrupts.
12399 #
12400 ###############################################################################
12401
12402 have_proc_interrupts=no
12403 with_proc_interrupts_req=unspecified
12404
12405 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
12406 if test "${with_proc_interrupts+set}" = set; then
12407   withval="$with_proc_interrupts"
12408   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
12409 else
12410   with_proc_interrupts=yes
12411 fi;
12412
12413 if test "$with_proc_interrupts" = yes; then
12414
12415    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
12416 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
12417 if test "${ac_cv_have_proc_interrupts+set}" = set; then
12418   echo $ECHO_N "(cached) $ECHO_C" >&6
12419 else
12420   ac_cv_have_proc_interrupts=no
12421      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
12422        ac_cv_have_proc_interrupts=yes
12423      fi
12424
12425 fi
12426 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
12427 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
12428    have_proc_interrupts=$ac_cv_have_proc_interrupts
12429
12430   if test "$have_proc_interrupts" = yes; then
12431     cat >>confdefs.h <<\_ACEOF
12432 #define HAVE_PROC_INTERRUPTS 1
12433 _ACEOF
12434
12435   fi
12436
12437 elif test "$with_proc_interrupts" != no; then
12438   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
12439   exit 1
12440 fi
12441
12442
12443 ###############################################################################
12444 #
12445 #       The --enable-locking option
12446 #
12447 ###############################################################################
12448
12449 # Check whether --enable-locking or --disable-locking was given.
12450 if test "${enable_locking+set}" = set; then
12451   enableval="$enable_locking"
12452   enable_locking="$enableval"
12453 else
12454   enable_locking=yes
12455 fi;
12456 if test "$enable_locking" = yes; then
12457   true
12458 elif test "$enable_locking" = no; then
12459   cat >>confdefs.h <<\_ACEOF
12460 #define NO_LOCKING 1
12461 _ACEOF
12462
12463 else
12464   echo "error: must be yes or no: --enable-locking=$enable_locking"
12465   exit 1
12466 fi
12467
12468 # We can't lock on MacOS X, so don't even bother compiling in support for it.
12469 #
12470 if test "$ac_macosx" = yes; then
12471   if test "$enable_locking" = yes; then
12472     echo "$as_me:$LINENO: result: locking disabled: it doesn't work on MacOS X" >&5
12473 echo "${ECHO_T}locking disabled: it doesn't work on MacOS X" >&6
12474     enable_locking=no
12475     cat >>confdefs.h <<\_ACEOF
12476 #define NO_LOCKING 1
12477 _ACEOF
12478
12479   fi
12480 fi
12481
12482
12483 ###############################################################################
12484 #
12485 #       The --enable-vt-locking option
12486 #
12487 ###############################################################################
12488
12489 #ac_vt_lockswitch=no
12490 #AC_ARG_ENABLE(vt-locking,[
12491 #  --enable-vt-locking     Compile in support for locking Virtual Terminals.
12492 #                          This is the default if the system supports it, and
12493 #                          if locking support is included (--enable-locking.)
12494 #  --disable-vt-locking    Do not allow locking of VTs, even if locking is
12495 #                          enabled.],
12496 #  [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
12497 #if test "$enable_vt_locking" = yes; then
12498 #
12499 #  AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
12500 #   [AC_TRY_COMPILE([#include <fcntl.h>
12501 #                   #include <sys/ioctl.h>
12502 #                   #include <sys/vt.h>],
12503 #                  [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
12504 #                  [ac_cv_vt_lockswitch=yes],
12505 #                  [ac_cv_vt_lockswitch=no])])
12506 #  ac_vt_lockswitch=$ac_cv_vt_lockswitch
12507 #
12508 #elif test "$enable_vt_locking" = no; then
12509 #  true
12510 #else
12511 #  echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
12512 #  exit 1
12513 #fi
12514 #
12515 #if test "$ac_vt_lockswitch" = yes; then
12516 #  AC_DEFINE(HAVE_VT_LOCKSWITCH)
12517 #  # the VT_LOCKSWITCH ioctl can only be used when running as root.
12518 #  # #### but it doesn't work yet, so don't worry about that for now.
12519 ##  need_setuid=yes
12520 #fi
12521
12522
12523 ###############################################################################
12524 #
12525 #       Check for PAM.
12526 #
12527 ###############################################################################
12528
12529 case "$host" in
12530   *-solaris*)
12531    # Solaris systems tend to come with PAM misconfigured.
12532    #  Don't build it by default, even if the headers exist.
12533    with_pam_default=no
12534    ;;
12535   *)
12536    # Default to building PAM support on all other systems, if it exists.
12537    with_pam_default=yes
12538   ;;
12539 esac
12540
12541 have_pam=no
12542 with_pam_req=unspecified
12543
12544
12545 # Check whether --with-pam or --without-pam was given.
12546 if test "${with_pam+set}" = set; then
12547   withval="$with_pam"
12548   with_pam="$withval"; with_pam_req="$withval"
12549 else
12550   with_pam=$with_pam_default
12551 fi;
12552
12553
12554    case "$with_pam" in
12555     yes) ;;
12556     no)  ;;
12557
12558     /*)
12559      echo "$as_me:$LINENO: checking for PAM headers" >&5
12560 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
12561      d=$with_pam/include
12562      if test -d $d; then
12563        X_CFLAGS="-I$d $X_CFLAGS"
12564        echo "$as_me:$LINENO: result: $d" >&5
12565 echo "${ECHO_T}$d" >&6
12566      else
12567        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12568 echo "${ECHO_T}not found ($d: no such directory)" >&6
12569      fi
12570
12571      echo "$as_me:$LINENO: checking for PAM libs" >&5
12572 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
12573      d=$with_pam/lib
12574      if test -d $d; then
12575        X_LIBS="-L$d $X_LIBS"
12576        echo "$as_me:$LINENO: result: $d" >&5
12577 echo "${ECHO_T}$d" >&6
12578      else
12579        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12580 echo "${ECHO_T}not found ($d: no such directory)" >&6
12581      fi
12582
12583      # replace the directory string with "yes".
12584      with_pam_req="yes"
12585      with_pam=$with_pam_req
12586      ;;
12587
12588     *)
12589      echo ""
12590      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
12591      echo "       If it is a directory, then \`DIR/include' will be added to"
12592      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12593      exit 1
12594      ;;
12595    esac
12596
12597
12598 if test "$enable_locking" = yes -a "$with_pam" = yes; then
12599   echo "$as_me:$LINENO: checking for PAM" >&5
12600 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
12601 if test "${ac_cv_pam+set}" = set; then
12602   echo $ECHO_N "(cached) $ECHO_C" >&6
12603 else
12604
12605   ac_save_CPPFLAGS="$CPPFLAGS"
12606   if test \! -z "$includedir" ; then
12607     CPPFLAGS="$CPPFLAGS -I$includedir"
12608   fi
12609   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12610   cat >conftest.$ac_ext <<_ACEOF
12611 /* confdefs.h.  */
12612 _ACEOF
12613 cat confdefs.h >>conftest.$ac_ext
12614 cat >>conftest.$ac_ext <<_ACEOF
12615 /* end confdefs.h.  */
12616 #include <security/pam_appl.h>
12617 int
12618 main ()
12619 {
12620
12621   ;
12622   return 0;
12623 }
12624 _ACEOF
12625 rm -f conftest.$ac_objext
12626 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12627   (eval $ac_compile) 2>conftest.er1
12628   ac_status=$?
12629   grep -v '^ *+' conftest.er1 >conftest.err
12630   rm -f conftest.er1
12631   cat conftest.err >&5
12632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12633   (exit $ac_status); } &&
12634          { ac_try='test -z "$ac_c_werror_flag"
12635                          || test ! -s conftest.err'
12636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12637   (eval $ac_try) 2>&5
12638   ac_status=$?
12639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12640   (exit $ac_status); }; } &&
12641          { ac_try='test -s conftest.$ac_objext'
12642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12643   (eval $ac_try) 2>&5
12644   ac_status=$?
12645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12646   (exit $ac_status); }; }; then
12647   ac_cv_pam=yes
12648 else
12649   echo "$as_me: failed program was:" >&5
12650 sed 's/^/| /' conftest.$ac_ext >&5
12651
12652 ac_cv_pam=no
12653 fi
12654 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12655   CPPFLAGS="$ac_save_CPPFLAGS"
12656 fi
12657 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
12658 echo "${ECHO_T}$ac_cv_pam" >&6
12659   if test "$ac_cv_pam" = yes ; then
12660     have_pam=yes
12661     cat >>confdefs.h <<\_ACEOF
12662 #define HAVE_PAM 1
12663 _ACEOF
12664
12665     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
12666
12667     # libpam typically requires dlopen and dlsym.  On FreeBSD,
12668     # those are in libc.  On Linux and Solaris, they're in libdl.
12669     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12670 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
12671 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12672   echo $ECHO_N "(cached) $ECHO_C" >&6
12673 else
12674   ac_check_lib_save_LIBS=$LIBS
12675 LIBS="-ldl  $LIBS"
12676 cat >conftest.$ac_ext <<_ACEOF
12677 /* confdefs.h.  */
12678 _ACEOF
12679 cat confdefs.h >>conftest.$ac_ext
12680 cat >>conftest.$ac_ext <<_ACEOF
12681 /* end confdefs.h.  */
12682
12683 /* Override any gcc2 internal prototype to avoid an error.  */
12684 #ifdef __cplusplus
12685 extern "C"
12686 #endif
12687 /* We use char because int might match the return type of a gcc2
12688    builtin and then its argument prototype would still apply.  */
12689 char dlopen ();
12690 int
12691 main ()
12692 {
12693 dlopen ();
12694   ;
12695   return 0;
12696 }
12697 _ACEOF
12698 rm -f conftest.$ac_objext conftest$ac_exeext
12699 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12700   (eval $ac_link) 2>conftest.er1
12701   ac_status=$?
12702   grep -v '^ *+' conftest.er1 >conftest.err
12703   rm -f conftest.er1
12704   cat conftest.err >&5
12705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12706   (exit $ac_status); } &&
12707          { ac_try='test -z "$ac_c_werror_flag"
12708                          || test ! -s conftest.err'
12709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12710   (eval $ac_try) 2>&5
12711   ac_status=$?
12712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12713   (exit $ac_status); }; } &&
12714          { ac_try='test -s conftest$ac_exeext'
12715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12716   (eval $ac_try) 2>&5
12717   ac_status=$?
12718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12719   (exit $ac_status); }; }; then
12720   ac_cv_lib_dl_dlopen=yes
12721 else
12722   echo "$as_me: failed program was:" >&5
12723 sed 's/^/| /' conftest.$ac_ext >&5
12724
12725 ac_cv_lib_dl_dlopen=no
12726 fi
12727 rm -f conftest.err conftest.$ac_objext \
12728       conftest$ac_exeext conftest.$ac_ext
12729 LIBS=$ac_check_lib_save_LIBS
12730 fi
12731 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12732 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
12733 if test $ac_cv_lib_dl_dlopen = yes; then
12734   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
12735 fi
12736
12737
12738     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
12739     have_timedwait=no
12740     echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
12741 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6
12742 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
12743   echo $ECHO_N "(cached) $ECHO_C" >&6
12744 else
12745   ac_check_lib_save_LIBS=$LIBS
12746 LIBS="-lc  $LIBS"
12747 cat >conftest.$ac_ext <<_ACEOF
12748 /* confdefs.h.  */
12749 _ACEOF
12750 cat confdefs.h >>conftest.$ac_ext
12751 cat >>conftest.$ac_ext <<_ACEOF
12752 /* end confdefs.h.  */
12753
12754 /* Override any gcc2 internal prototype to avoid an error.  */
12755 #ifdef __cplusplus
12756 extern "C"
12757 #endif
12758 /* We use char because int might match the return type of a gcc2
12759    builtin and then its argument prototype would still apply.  */
12760 char sigtimedwait ();
12761 int
12762 main ()
12763 {
12764 sigtimedwait ();
12765   ;
12766   return 0;
12767 }
12768 _ACEOF
12769 rm -f conftest.$ac_objext conftest$ac_exeext
12770 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12771   (eval $ac_link) 2>conftest.er1
12772   ac_status=$?
12773   grep -v '^ *+' conftest.er1 >conftest.err
12774   rm -f conftest.er1
12775   cat conftest.err >&5
12776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12777   (exit $ac_status); } &&
12778          { ac_try='test -z "$ac_c_werror_flag"
12779                          || test ! -s conftest.err'
12780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12781   (eval $ac_try) 2>&5
12782   ac_status=$?
12783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12784   (exit $ac_status); }; } &&
12785          { ac_try='test -s conftest$ac_exeext'
12786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12787   (eval $ac_try) 2>&5
12788   ac_status=$?
12789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12790   (exit $ac_status); }; }; then
12791   ac_cv_lib_c_sigtimedwait=yes
12792 else
12793   echo "$as_me: failed program was:" >&5
12794 sed 's/^/| /' conftest.$ac_ext >&5
12795
12796 ac_cv_lib_c_sigtimedwait=no
12797 fi
12798 rm -f conftest.err conftest.$ac_objext \
12799       conftest$ac_exeext conftest.$ac_ext
12800 LIBS=$ac_check_lib_save_LIBS
12801 fi
12802 echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
12803 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6
12804 if test $ac_cv_lib_c_sigtimedwait = yes; then
12805   have_timedwait=yes
12806 fi
12807
12808     if test "$have_timedwait" = no ; then
12809       echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
12810 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6
12811 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
12812   echo $ECHO_N "(cached) $ECHO_C" >&6
12813 else
12814   ac_check_lib_save_LIBS=$LIBS
12815 LIBS="-lrt  $LIBS"
12816 cat >conftest.$ac_ext <<_ACEOF
12817 /* confdefs.h.  */
12818 _ACEOF
12819 cat confdefs.h >>conftest.$ac_ext
12820 cat >>conftest.$ac_ext <<_ACEOF
12821 /* end confdefs.h.  */
12822
12823 /* Override any gcc2 internal prototype to avoid an error.  */
12824 #ifdef __cplusplus
12825 extern "C"
12826 #endif
12827 /* We use char because int might match the return type of a gcc2
12828    builtin and then its argument prototype would still apply.  */
12829 char sigtimedwait ();
12830 int
12831 main ()
12832 {
12833 sigtimedwait ();
12834   ;
12835   return 0;
12836 }
12837 _ACEOF
12838 rm -f conftest.$ac_objext conftest$ac_exeext
12839 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12840   (eval $ac_link) 2>conftest.er1
12841   ac_status=$?
12842   grep -v '^ *+' conftest.er1 >conftest.err
12843   rm -f conftest.er1
12844   cat conftest.err >&5
12845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12846   (exit $ac_status); } &&
12847          { ac_try='test -z "$ac_c_werror_flag"
12848                          || test ! -s conftest.err'
12849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12850   (eval $ac_try) 2>&5
12851   ac_status=$?
12852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12853   (exit $ac_status); }; } &&
12854          { ac_try='test -s conftest$ac_exeext'
12855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12856   (eval $ac_try) 2>&5
12857   ac_status=$?
12858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12859   (exit $ac_status); }; }; then
12860   ac_cv_lib_rt_sigtimedwait=yes
12861 else
12862   echo "$as_me: failed program was:" >&5
12863 sed 's/^/| /' conftest.$ac_ext >&5
12864
12865 ac_cv_lib_rt_sigtimedwait=no
12866 fi
12867 rm -f conftest.err conftest.$ac_objext \
12868       conftest$ac_exeext conftest.$ac_ext
12869 LIBS=$ac_check_lib_save_LIBS
12870 fi
12871 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
12872 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6
12873 if test $ac_cv_lib_rt_sigtimedwait = yes; then
12874   PASSWD_LIBS="${PASSWD_LIBS} -lrt"
12875 fi
12876
12877     fi
12878
12879     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
12880 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
12881     if test "${ac_cv_pam_strerror_args+set}" = set; then
12882   echo $ECHO_N "(cached) $ECHO_C" >&6
12883 else
12884   cat >conftest.$ac_ext <<_ACEOF
12885 /* confdefs.h.  */
12886 _ACEOF
12887 cat confdefs.h >>conftest.$ac_ext
12888 cat >>conftest.$ac_ext <<_ACEOF
12889 /* end confdefs.h.  */
12890 #include <stdio.h>
12891                       #include <stdlib.h>
12892                       #include <security/pam_appl.h>
12893 int
12894 main ()
12895 {
12896 pam_handle_t *pamh = 0;
12897                       char *s = pam_strerror(pamh, PAM_SUCCESS);
12898   ;
12899   return 0;
12900 }
12901 _ACEOF
12902 rm -f conftest.$ac_objext
12903 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12904   (eval $ac_compile) 2>conftest.er1
12905   ac_status=$?
12906   grep -v '^ *+' conftest.er1 >conftest.err
12907   rm -f conftest.er1
12908   cat conftest.err >&5
12909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12910   (exit $ac_status); } &&
12911          { ac_try='test -z "$ac_c_werror_flag"
12912                          || test ! -s conftest.err'
12913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12914   (eval $ac_try) 2>&5
12915   ac_status=$?
12916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12917   (exit $ac_status); }; } &&
12918          { ac_try='test -s conftest.$ac_objext'
12919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12920   (eval $ac_try) 2>&5
12921   ac_status=$?
12922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12923   (exit $ac_status); }; }; then
12924   ac_pam_strerror_args=2
12925 else
12926   echo "$as_me: failed program was:" >&5
12927 sed 's/^/| /' conftest.$ac_ext >&5
12928
12929 cat >conftest.$ac_ext <<_ACEOF
12930 /* confdefs.h.  */
12931 _ACEOF
12932 cat confdefs.h >>conftest.$ac_ext
12933 cat >>conftest.$ac_ext <<_ACEOF
12934 /* end confdefs.h.  */
12935 #include <stdio.h>
12936                                       #include <stdlib.h>
12937                                       #include <security/pam_appl.h>
12938 int
12939 main ()
12940 {
12941 char *s =
12942                                        pam_strerror(PAM_SUCCESS);
12943   ;
12944   return 0;
12945 }
12946 _ACEOF
12947 rm -f conftest.$ac_objext
12948 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12949   (eval $ac_compile) 2>conftest.er1
12950   ac_status=$?
12951   grep -v '^ *+' conftest.er1 >conftest.err
12952   rm -f conftest.er1
12953   cat conftest.err >&5
12954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12955   (exit $ac_status); } &&
12956          { ac_try='test -z "$ac_c_werror_flag"
12957                          || test ! -s conftest.err'
12958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12959   (eval $ac_try) 2>&5
12960   ac_status=$?
12961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12962   (exit $ac_status); }; } &&
12963          { ac_try='test -s conftest.$ac_objext'
12964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12965   (eval $ac_try) 2>&5
12966   ac_status=$?
12967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12968   (exit $ac_status); }; }; then
12969   ac_pam_strerror_args=1
12970 else
12971   echo "$as_me: failed program was:" >&5
12972 sed 's/^/| /' conftest.$ac_ext >&5
12973
12974 ac_pam_strerror_args=0
12975 fi
12976 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12977 fi
12978 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12979       ac_cv_pam_strerror_args=$ac_pam_strerror_args
12980 fi
12981
12982     ac_pam_strerror_args=$ac_cv_pam_strerror_args
12983     if test "$ac_pam_strerror_args" = 1 ; then
12984       echo "$as_me:$LINENO: result: one argument" >&5
12985 echo "${ECHO_T}one argument" >&6
12986     elif test "$ac_pam_strerror_args" = 2 ; then
12987       cat >>confdefs.h <<\_ACEOF
12988 #define PAM_STRERROR_TWO_ARGS 1
12989 _ACEOF
12990
12991       echo "$as_me:$LINENO: result: two arguments" >&5
12992 echo "${ECHO_T}two arguments" >&6
12993     else
12994       echo "$as_me:$LINENO: result: unknown" >&5
12995 echo "${ECHO_T}unknown" >&6
12996     fi
12997   fi
12998 fi
12999
13000
13001 ###############################################################################
13002 #
13003 #       Check for Kerberos.
13004 #
13005 ###############################################################################
13006
13007 have_kerberos=no
13008 have_kerberos5=no
13009 with_kerberos_req=unspecified
13010
13011
13012 # Check whether --with-kerberos or --without-kerberos was given.
13013 if test "${with_kerberos+set}" = set; then
13014   withval="$with_kerberos"
13015   with_kerberos="$withval"; with_kerberos_req="$withval"
13016 else
13017   with_kerberos=yes
13018 fi;
13019
13020
13021    case "$with_kerberos" in
13022     yes) ;;
13023     no)  ;;
13024
13025     /*)
13026      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
13027 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
13028      d=$with_kerberos/include
13029      if test -d $d; then
13030        X_CFLAGS="-I$d $X_CFLAGS"
13031        echo "$as_me:$LINENO: result: $d" >&5
13032 echo "${ECHO_T}$d" >&6
13033      else
13034        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13035 echo "${ECHO_T}not found ($d: no such directory)" >&6
13036      fi
13037
13038      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
13039 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
13040      d=$with_kerberos/lib
13041      if test -d $d; then
13042        X_LIBS="-L$d $X_LIBS"
13043        echo "$as_me:$LINENO: result: $d" >&5
13044 echo "${ECHO_T}$d" >&6
13045      else
13046        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13047 echo "${ECHO_T}not found ($d: no such directory)" >&6
13048      fi
13049
13050      # replace the directory string with "yes".
13051      with_kerberos_req="yes"
13052      with_kerberos=$with_kerberos_req
13053      ;;
13054
13055     *)
13056      echo ""
13057      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
13058      echo "       If it is a directory, then \`DIR/include' will be added to"
13059      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13060      exit 1
13061      ;;
13062    esac
13063
13064
13065 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
13066   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
13067 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
13068 if test "${ac_cv_kerberos+set}" = set; then
13069   echo $ECHO_N "(cached) $ECHO_C" >&6
13070 else
13071
13072   ac_save_CPPFLAGS="$CPPFLAGS"
13073   if test \! -z "$includedir" ; then
13074     CPPFLAGS="$CPPFLAGS -I$includedir"
13075   fi
13076   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13077   cat >conftest.$ac_ext <<_ACEOF
13078 /* confdefs.h.  */
13079 _ACEOF
13080 cat confdefs.h >>conftest.$ac_ext
13081 cat >>conftest.$ac_ext <<_ACEOF
13082 /* end confdefs.h.  */
13083 #include <krb.h>
13084 int
13085 main ()
13086 {
13087
13088   ;
13089   return 0;
13090 }
13091 _ACEOF
13092 rm -f conftest.$ac_objext
13093 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13094   (eval $ac_compile) 2>conftest.er1
13095   ac_status=$?
13096   grep -v '^ *+' conftest.er1 >conftest.err
13097   rm -f conftest.er1
13098   cat conftest.err >&5
13099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13100   (exit $ac_status); } &&
13101          { ac_try='test -z "$ac_c_werror_flag"
13102                          || test ! -s conftest.err'
13103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13104   (eval $ac_try) 2>&5
13105   ac_status=$?
13106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13107   (exit $ac_status); }; } &&
13108          { ac_try='test -s conftest.$ac_objext'
13109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13110   (eval $ac_try) 2>&5
13111   ac_status=$?
13112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13113   (exit $ac_status); }; }; then
13114   ac_cv_kerberos=yes
13115 else
13116   echo "$as_me: failed program was:" >&5
13117 sed 's/^/| /' conftest.$ac_ext >&5
13118
13119 ac_cv_kerberos=no
13120 fi
13121 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13122   CPPFLAGS="$ac_save_CPPFLAGS"
13123 fi
13124 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
13125 echo "${ECHO_T}$ac_cv_kerberos" >&6
13126   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
13127 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
13128 if test "${ac_cv_kerberos5+set}" = set; then
13129   echo $ECHO_N "(cached) $ECHO_C" >&6
13130 else
13131
13132   ac_save_CPPFLAGS="$CPPFLAGS"
13133   if test \! -z "$includedir" ; then
13134     CPPFLAGS="$CPPFLAGS -I$includedir"
13135   fi
13136   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13137   cat >conftest.$ac_ext <<_ACEOF
13138 /* confdefs.h.  */
13139 _ACEOF
13140 cat confdefs.h >>conftest.$ac_ext
13141 cat >>conftest.$ac_ext <<_ACEOF
13142 /* end confdefs.h.  */
13143 #include <kerberosIV/krb.h>
13144 int
13145 main ()
13146 {
13147
13148   ;
13149   return 0;
13150 }
13151 _ACEOF
13152 rm -f conftest.$ac_objext
13153 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13154   (eval $ac_compile) 2>conftest.er1
13155   ac_status=$?
13156   grep -v '^ *+' conftest.er1 >conftest.err
13157   rm -f conftest.er1
13158   cat conftest.err >&5
13159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13160   (exit $ac_status); } &&
13161          { ac_try='test -z "$ac_c_werror_flag"
13162                          || test ! -s conftest.err'
13163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13164   (eval $ac_try) 2>&5
13165   ac_status=$?
13166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13167   (exit $ac_status); }; } &&
13168          { ac_try='test -s conftest.$ac_objext'
13169   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13170   (eval $ac_try) 2>&5
13171   ac_status=$?
13172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13173   (exit $ac_status); }; }; then
13174   ac_cv_kerberos5=yes
13175 else
13176   echo "$as_me: failed program was:" >&5
13177 sed 's/^/| /' conftest.$ac_ext >&5
13178
13179 ac_cv_kerberos5=no
13180 fi
13181 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13182   CPPFLAGS="$ac_save_CPPFLAGS"
13183 fi
13184 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
13185 echo "${ECHO_T}$ac_cv_kerberos5" >&6
13186
13187   if test "$ac_cv_kerberos" = yes ; then
13188     have_kerberos=yes
13189     cat >>confdefs.h <<\_ACEOF
13190 #define HAVE_KERBEROS 1
13191 _ACEOF
13192
13193   fi
13194
13195   if test "$ac_cv_kerberos5" = yes ; then
13196
13197     # Andrew Snare <ajs@pigpond.com> wrote:
13198     #
13199     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
13200     # (krb4) was also available.  This turns out not to be the case with
13201     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
13202     # is optional.
13203     #
13204     # So, disable kerberosV support if libkrb4 can't be found.
13205     # This is not the best solution, but it makes the compile not fail.
13206     #
13207
13208   ac_save_CPPFLAGS="$CPPFLAGS"
13209   ac_save_LDFLAGS="$LDFLAGS"
13210 #  ac_save_LIBS="$LIBS"
13211
13212   if test \! -z "$includedir" ; then
13213     CPPFLAGS="$CPPFLAGS -I$includedir"
13214   fi
13215   # note: $X_CFLAGS includes $x_includes
13216   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13217
13218   if test \! -z "$libdir" ; then
13219     LDFLAGS="$LDFLAGS -L$libdir"
13220   fi
13221   # note: $X_LIBS includes $x_libraries
13222   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13223
13224   echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
13225 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6
13226 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
13227   echo $ECHO_N "(cached) $ECHO_C" >&6
13228 else
13229   ac_check_lib_save_LIBS=$LIBS
13230 LIBS="-lkrb4  $LIBS"
13231 cat >conftest.$ac_ext <<_ACEOF
13232 /* confdefs.h.  */
13233 _ACEOF
13234 cat confdefs.h >>conftest.$ac_ext
13235 cat >>conftest.$ac_ext <<_ACEOF
13236 /* end confdefs.h.  */
13237
13238 /* Override any gcc2 internal prototype to avoid an error.  */
13239 #ifdef __cplusplus
13240 extern "C"
13241 #endif
13242 /* We use char because int might match the return type of a gcc2
13243    builtin and then its argument prototype would still apply.  */
13244 char krb_get_tf_realm ();
13245 int
13246 main ()
13247 {
13248 krb_get_tf_realm ();
13249   ;
13250   return 0;
13251 }
13252 _ACEOF
13253 rm -f conftest.$ac_objext conftest$ac_exeext
13254 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13255   (eval $ac_link) 2>conftest.er1
13256   ac_status=$?
13257   grep -v '^ *+' conftest.er1 >conftest.err
13258   rm -f conftest.er1
13259   cat conftest.err >&5
13260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13261   (exit $ac_status); } &&
13262          { ac_try='test -z "$ac_c_werror_flag"
13263                          || test ! -s conftest.err'
13264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13265   (eval $ac_try) 2>&5
13266   ac_status=$?
13267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13268   (exit $ac_status); }; } &&
13269          { ac_try='test -s conftest$ac_exeext'
13270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13271   (eval $ac_try) 2>&5
13272   ac_status=$?
13273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13274   (exit $ac_status); }; }; then
13275   ac_cv_lib_krb4_krb_get_tf_realm=yes
13276 else
13277   echo "$as_me: failed program was:" >&5
13278 sed 's/^/| /' conftest.$ac_ext >&5
13279
13280 ac_cv_lib_krb4_krb_get_tf_realm=no
13281 fi
13282 rm -f conftest.err conftest.$ac_objext \
13283       conftest$ac_exeext conftest.$ac_ext
13284 LIBS=$ac_check_lib_save_LIBS
13285 fi
13286 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
13287 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6
13288 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
13289   have_kerberos=yes
13290 else
13291   have_kerberos=no
13292 fi
13293
13294   CPPFLAGS="$ac_save_CPPFLAGS"
13295   LDFLAGS="$ac_save_LDFLAGS"
13296 #  LIBS="$ac_save_LIBS"
13297
13298     if test "$have_kerberos" = yes ; then
13299       have_kerberos5=yes
13300       cat >>confdefs.h <<\_ACEOF
13301 #define HAVE_KERBEROS 1
13302 _ACEOF
13303
13304       cat >>confdefs.h <<\_ACEOF
13305 #define HAVE_KERBEROS5 1
13306 _ACEOF
13307
13308     else
13309       have_kerberos5=no
13310       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
13311 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
13312     fi
13313
13314   fi
13315
13316   if test "$have_kerberos5" = yes ; then
13317     # from Matt Knopp <mhat@infocalypse.netlag.com>
13318     # (who got it from amu@mit.edu)
13319
13320     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
13321
13322     # jwz: MacOS X uses -lkrb5, but not -lcrypt
13323
13324   ac_save_CPPFLAGS="$CPPFLAGS"
13325   ac_save_LDFLAGS="$LDFLAGS"
13326 #  ac_save_LIBS="$LIBS"
13327
13328   if test \! -z "$includedir" ; then
13329     CPPFLAGS="$CPPFLAGS -I$includedir"
13330   fi
13331   # note: $X_CFLAGS includes $x_includes
13332   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13333
13334   if test \! -z "$libdir" ; then
13335     LDFLAGS="$LDFLAGS -L$libdir"
13336   fi
13337   # note: $X_LIBS includes $x_libraries
13338   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13339
13340   echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
13341 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
13342 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
13343   echo $ECHO_N "(cached) $ECHO_C" >&6
13344 else
13345   ac_check_lib_save_LIBS=$LIBS
13346 LIBS="-lcrypt  $LIBS"
13347 cat >conftest.$ac_ext <<_ACEOF
13348 /* confdefs.h.  */
13349 _ACEOF
13350 cat confdefs.h >>conftest.$ac_ext
13351 cat >>conftest.$ac_ext <<_ACEOF
13352 /* end confdefs.h.  */
13353
13354 /* Override any gcc2 internal prototype to avoid an error.  */
13355 #ifdef __cplusplus
13356 extern "C"
13357 #endif
13358 /* We use char because int might match the return type of a gcc2
13359    builtin and then its argument prototype would still apply.  */
13360 char crypt ();
13361 int
13362 main ()
13363 {
13364 crypt ();
13365   ;
13366   return 0;
13367 }
13368 _ACEOF
13369 rm -f conftest.$ac_objext conftest$ac_exeext
13370 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13371   (eval $ac_link) 2>conftest.er1
13372   ac_status=$?
13373   grep -v '^ *+' conftest.er1 >conftest.err
13374   rm -f conftest.er1
13375   cat conftest.err >&5
13376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13377   (exit $ac_status); } &&
13378          { ac_try='test -z "$ac_c_werror_flag"
13379                          || test ! -s conftest.err'
13380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13381   (eval $ac_try) 2>&5
13382   ac_status=$?
13383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13384   (exit $ac_status); }; } &&
13385          { ac_try='test -s conftest$ac_exeext'
13386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13387   (eval $ac_try) 2>&5
13388   ac_status=$?
13389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13390   (exit $ac_status); }; }; then
13391   ac_cv_lib_crypt_crypt=yes
13392 else
13393   echo "$as_me: failed program was:" >&5
13394 sed 's/^/| /' conftest.$ac_ext >&5
13395
13396 ac_cv_lib_crypt_crypt=no
13397 fi
13398 rm -f conftest.err conftest.$ac_objext \
13399       conftest$ac_exeext conftest.$ac_ext
13400 LIBS=$ac_check_lib_save_LIBS
13401 fi
13402 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
13403 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
13404 if test $ac_cv_lib_crypt_crypt = yes; then
13405   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
13406 fi
13407
13408   CPPFLAGS="$ac_save_CPPFLAGS"
13409   LDFLAGS="$ac_save_LDFLAGS"
13410 #  LIBS="$ac_save_LIBS"
13411
13412
13413   elif test "$have_kerberos" = yes ; then
13414     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
13415     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
13416   fi
13417
13418   if test "$have_kerberos" = yes ; then
13419     echo "$as_me:$LINENO: checking for res_search" >&5
13420 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
13421 if test "${ac_cv_func_res_search+set}" = set; then
13422   echo $ECHO_N "(cached) $ECHO_C" >&6
13423 else
13424   cat >conftest.$ac_ext <<_ACEOF
13425 /* confdefs.h.  */
13426 _ACEOF
13427 cat confdefs.h >>conftest.$ac_ext
13428 cat >>conftest.$ac_ext <<_ACEOF
13429 /* end confdefs.h.  */
13430 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
13431    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13432 #define res_search innocuous_res_search
13433
13434 /* System header to define __stub macros and hopefully few prototypes,
13435     which can conflict with char res_search (); below.
13436     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13437     <limits.h> exists even on freestanding compilers.  */
13438
13439 #ifdef __STDC__
13440 # include <limits.h>
13441 #else
13442 # include <assert.h>
13443 #endif
13444
13445 #undef res_search
13446
13447 /* Override any gcc2 internal prototype to avoid an error.  */
13448 #ifdef __cplusplus
13449 extern "C"
13450 {
13451 #endif
13452 /* We use char because int might match the return type of a gcc2
13453    builtin and then its argument prototype would still apply.  */
13454 char res_search ();
13455 /* The GNU C library defines this for functions which it implements
13456     to always fail with ENOSYS.  Some functions are actually named
13457     something starting with __ and the normal name is an alias.  */
13458 #if defined (__stub_res_search) || defined (__stub___res_search)
13459 choke me
13460 #else
13461 char (*f) () = res_search;
13462 #endif
13463 #ifdef __cplusplus
13464 }
13465 #endif
13466
13467 int
13468 main ()
13469 {
13470 return f != res_search;
13471   ;
13472   return 0;
13473 }
13474 _ACEOF
13475 rm -f conftest.$ac_objext conftest$ac_exeext
13476 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13477   (eval $ac_link) 2>conftest.er1
13478   ac_status=$?
13479   grep -v '^ *+' conftest.er1 >conftest.err
13480   rm -f conftest.er1
13481   cat conftest.err >&5
13482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13483   (exit $ac_status); } &&
13484          { ac_try='test -z "$ac_c_werror_flag"
13485                          || test ! -s conftest.err'
13486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13487   (eval $ac_try) 2>&5
13488   ac_status=$?
13489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13490   (exit $ac_status); }; } &&
13491          { ac_try='test -s conftest$ac_exeext'
13492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13493   (eval $ac_try) 2>&5
13494   ac_status=$?
13495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13496   (exit $ac_status); }; }; then
13497   ac_cv_func_res_search=yes
13498 else
13499   echo "$as_me: failed program was:" >&5
13500 sed 's/^/| /' conftest.$ac_ext >&5
13501
13502 ac_cv_func_res_search=no
13503 fi
13504 rm -f conftest.err conftest.$ac_objext \
13505       conftest$ac_exeext conftest.$ac_ext
13506 fi
13507 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
13508 echo "${ECHO_T}$ac_cv_func_res_search" >&6
13509 if test $ac_cv_func_res_search = yes; then
13510   :
13511 else
13512   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
13513 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
13514 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
13515   echo $ECHO_N "(cached) $ECHO_C" >&6
13516 else
13517   ac_check_lib_save_LIBS=$LIBS
13518 LIBS="-lresolv  $LIBS"
13519 cat >conftest.$ac_ext <<_ACEOF
13520 /* confdefs.h.  */
13521 _ACEOF
13522 cat confdefs.h >>conftest.$ac_ext
13523 cat >>conftest.$ac_ext <<_ACEOF
13524 /* end confdefs.h.  */
13525
13526 /* Override any gcc2 internal prototype to avoid an error.  */
13527 #ifdef __cplusplus
13528 extern "C"
13529 #endif
13530 /* We use char because int might match the return type of a gcc2
13531    builtin and then its argument prototype would still apply.  */
13532 char res_search ();
13533 int
13534 main ()
13535 {
13536 res_search ();
13537   ;
13538   return 0;
13539 }
13540 _ACEOF
13541 rm -f conftest.$ac_objext conftest$ac_exeext
13542 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13543   (eval $ac_link) 2>conftest.er1
13544   ac_status=$?
13545   grep -v '^ *+' conftest.er1 >conftest.err
13546   rm -f conftest.er1
13547   cat conftest.err >&5
13548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13549   (exit $ac_status); } &&
13550          { ac_try='test -z "$ac_c_werror_flag"
13551                          || test ! -s conftest.err'
13552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13553   (eval $ac_try) 2>&5
13554   ac_status=$?
13555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13556   (exit $ac_status); }; } &&
13557          { ac_try='test -s conftest$ac_exeext'
13558   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13559   (eval $ac_try) 2>&5
13560   ac_status=$?
13561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13562   (exit $ac_status); }; }; then
13563   ac_cv_lib_resolv_res_search=yes
13564 else
13565   echo "$as_me: failed program was:" >&5
13566 sed 's/^/| /' conftest.$ac_ext >&5
13567
13568 ac_cv_lib_resolv_res_search=no
13569 fi
13570 rm -f conftest.err conftest.$ac_objext \
13571       conftest$ac_exeext conftest.$ac_ext
13572 LIBS=$ac_check_lib_save_LIBS
13573 fi
13574 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
13575 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
13576 if test $ac_cv_lib_resolv_res_search = yes; then
13577   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
13578 else
13579   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
13580 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
13581
13582 fi
13583
13584 fi
13585
13586   fi
13587 fi
13588
13589
13590 ###############################################################################
13591 #
13592 #       Check for the nine billion variants of shadow passwords...
13593 #
13594 ###############################################################################
13595
13596 need_setuid=no
13597
13598 have_shadow=no
13599 with_shadow_req=unspecified
13600
13601
13602 # Check whether --with-shadow or --without-shadow was given.
13603 if test "${with_shadow+set}" = set; then
13604   withval="$with_shadow"
13605   with_shadow="$withval"; with_shadow_req="$withval"
13606 else
13607   with_shadow=yes
13608 fi;
13609
13610
13611    case "$with_shadow" in
13612     yes) ;;
13613     no)  ;;
13614
13615     /*)
13616      echo "$as_me:$LINENO: checking for shadow password headers" >&5
13617 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
13618      d=$with_shadow/include
13619      if test -d $d; then
13620        X_CFLAGS="-I$d $X_CFLAGS"
13621        echo "$as_me:$LINENO: result: $d" >&5
13622 echo "${ECHO_T}$d" >&6
13623      else
13624        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13625 echo "${ECHO_T}not found ($d: no such directory)" >&6
13626      fi
13627
13628      echo "$as_me:$LINENO: checking for shadow password libs" >&5
13629 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
13630      d=$with_shadow/lib
13631      if test -d $d; then
13632        X_LIBS="-L$d $X_LIBS"
13633        echo "$as_me:$LINENO: result: $d" >&5
13634 echo "${ECHO_T}$d" >&6
13635      else
13636        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13637 echo "${ECHO_T}not found ($d: no such directory)" >&6
13638      fi
13639
13640      # replace the directory string with "yes".
13641      with_shadow_req="yes"
13642      with_shadow=$with_shadow_req
13643      ;;
13644
13645     *)
13646      echo ""
13647      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
13648      echo "       If it is a directory, then \`DIR/include' will be added to"
13649      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13650      exit 1
13651      ;;
13652    esac
13653
13654
13655 if test "$enable_locking" = no ; then
13656   with_shadow_req=no
13657   with_shadow=no
13658 fi
13659
13660
13661 ###############################################################################
13662 #
13663 #       Check for Sun "adjunct" passwords.
13664 #
13665 ###############################################################################
13666
13667 if test "$with_shadow" = yes ; then
13668   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
13669 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
13670 if test "${ac_cv_sun_adjunct+set}" = set; then
13671   echo $ECHO_N "(cached) $ECHO_C" >&6
13672 else
13673
13674   ac_save_CPPFLAGS="$CPPFLAGS"
13675   if test \! -z "$includedir" ; then
13676     CPPFLAGS="$CPPFLAGS -I$includedir"
13677   fi
13678   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13679   cat >conftest.$ac_ext <<_ACEOF
13680 /* confdefs.h.  */
13681 _ACEOF
13682 cat confdefs.h >>conftest.$ac_ext
13683 cat >>conftest.$ac_ext <<_ACEOF
13684 /* end confdefs.h.  */
13685 #include <stdlib.h>
13686                                     #include <unistd.h>
13687                                     #include <sys/types.h>
13688                                     #include <sys/label.h>
13689                                     #include <sys/audit.h>
13690                                     #include <pwdadj.h>
13691 int
13692 main ()
13693 {
13694 struct passwd_adjunct *p = getpwanam("nobody");
13695                        const char *pw = p->pwa_passwd;
13696   ;
13697   return 0;
13698 }
13699 _ACEOF
13700 rm -f conftest.$ac_objext
13701 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13702   (eval $ac_compile) 2>conftest.er1
13703   ac_status=$?
13704   grep -v '^ *+' conftest.er1 >conftest.err
13705   rm -f conftest.er1
13706   cat conftest.err >&5
13707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13708   (exit $ac_status); } &&
13709          { ac_try='test -z "$ac_c_werror_flag"
13710                          || test ! -s conftest.err'
13711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13712   (eval $ac_try) 2>&5
13713   ac_status=$?
13714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13715   (exit $ac_status); }; } &&
13716          { ac_try='test -s conftest.$ac_objext'
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   ac_cv_sun_adjunct=yes
13723 else
13724   echo "$as_me: failed program was:" >&5
13725 sed 's/^/| /' conftest.$ac_ext >&5
13726
13727 ac_cv_sun_adjunct=no
13728 fi
13729 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13730   CPPFLAGS="$ac_save_CPPFLAGS"
13731 fi
13732 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
13733 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
13734   if test "$ac_cv_sun_adjunct" = yes; then
13735     have_shadow_adjunct=yes
13736     have_shadow=yes
13737     need_setuid=yes
13738   fi
13739 fi
13740
13741
13742 ###############################################################################
13743 #
13744 #       Check for DEC and SCO so-called "enhanced" security.
13745 #
13746 ###############################################################################
13747
13748 if test "$with_shadow" = yes ; then
13749   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
13750 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
13751 if test "${ac_cv_enhanced_passwd+set}" = set; then
13752   echo $ECHO_N "(cached) $ECHO_C" >&6
13753 else
13754
13755   ac_save_CPPFLAGS="$CPPFLAGS"
13756   if test \! -z "$includedir" ; then
13757     CPPFLAGS="$CPPFLAGS -I$includedir"
13758   fi
13759   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13760   cat >conftest.$ac_ext <<_ACEOF
13761 /* confdefs.h.  */
13762 _ACEOF
13763 cat confdefs.h >>conftest.$ac_ext
13764 cat >>conftest.$ac_ext <<_ACEOF
13765 /* end confdefs.h.  */
13766 #include <stdlib.h>
13767                                     #include <unistd.h>
13768                                     #include <sys/types.h>
13769                                     #include <pwd.h>
13770                                     #include <sys/security.h>
13771                                     #include <prot.h>
13772 int
13773 main ()
13774 {
13775 struct pr_passwd *p;
13776                        const char *pw;
13777                        set_auth_parameters(0, 0);
13778                        check_auth_parameters();
13779                        p = getprpwnam("nobody");
13780                        pw = p->ufld.fd_encrypt;
13781   ;
13782   return 0;
13783 }
13784 _ACEOF
13785 rm -f conftest.$ac_objext
13786 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13787   (eval $ac_compile) 2>conftest.er1
13788   ac_status=$?
13789   grep -v '^ *+' conftest.er1 >conftest.err
13790   rm -f conftest.er1
13791   cat conftest.err >&5
13792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13793   (exit $ac_status); } &&
13794          { ac_try='test -z "$ac_c_werror_flag"
13795                          || test ! -s conftest.err'
13796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13797   (eval $ac_try) 2>&5
13798   ac_status=$?
13799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13800   (exit $ac_status); }; } &&
13801          { ac_try='test -s conftest.$ac_objext'
13802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13803   (eval $ac_try) 2>&5
13804   ac_status=$?
13805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13806   (exit $ac_status); }; }; then
13807   ac_cv_enhanced_passwd=yes
13808 else
13809   echo "$as_me: failed program was:" >&5
13810 sed 's/^/| /' conftest.$ac_ext >&5
13811
13812 ac_cv_enhanced_passwd=no
13813 fi
13814 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13815   CPPFLAGS="$ac_save_CPPFLAGS"
13816 fi
13817 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
13818 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
13819   if test $ac_cv_enhanced_passwd = yes; then
13820     have_shadow_enhanced=yes
13821     have_shadow=yes
13822     need_setuid=yes
13823
13824     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
13825     # (I'm told it needs -lcurses too, but I don't understand why.)
13826     # But on DEC, it's in -lsecurity.
13827     #
13828     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
13829 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
13830 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
13831   echo $ECHO_N "(cached) $ECHO_C" >&6
13832 else
13833   ac_check_lib_save_LIBS=$LIBS
13834 LIBS="-lprot -lx $LIBS"
13835 cat >conftest.$ac_ext <<_ACEOF
13836 /* confdefs.h.  */
13837 _ACEOF
13838 cat confdefs.h >>conftest.$ac_ext
13839 cat >>conftest.$ac_ext <<_ACEOF
13840 /* end confdefs.h.  */
13841
13842 /* Override any gcc2 internal prototype to avoid an error.  */
13843 #ifdef __cplusplus
13844 extern "C"
13845 #endif
13846 /* We use char because int might match the return type of a gcc2
13847    builtin and then its argument prototype would still apply.  */
13848 char getprpwnam ();
13849 int
13850 main ()
13851 {
13852 getprpwnam ();
13853   ;
13854   return 0;
13855 }
13856 _ACEOF
13857 rm -f conftest.$ac_objext conftest$ac_exeext
13858 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13859   (eval $ac_link) 2>conftest.er1
13860   ac_status=$?
13861   grep -v '^ *+' conftest.er1 >conftest.err
13862   rm -f conftest.er1
13863   cat conftest.err >&5
13864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13865   (exit $ac_status); } &&
13866          { ac_try='test -z "$ac_c_werror_flag"
13867                          || test ! -s conftest.err'
13868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13869   (eval $ac_try) 2>&5
13870   ac_status=$?
13871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13872   (exit $ac_status); }; } &&
13873          { ac_try='test -s conftest$ac_exeext'
13874   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13875   (eval $ac_try) 2>&5
13876   ac_status=$?
13877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13878   (exit $ac_status); }; }; then
13879   ac_cv_lib_prot_getprpwnam=yes
13880 else
13881   echo "$as_me: failed program was:" >&5
13882 sed 's/^/| /' conftest.$ac_ext >&5
13883
13884 ac_cv_lib_prot_getprpwnam=no
13885 fi
13886 rm -f conftest.err conftest.$ac_objext \
13887       conftest$ac_exeext conftest.$ac_ext
13888 LIBS=$ac_check_lib_save_LIBS
13889 fi
13890 echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
13891 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
13892 if test $ac_cv_lib_prot_getprpwnam = yes; then
13893   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
13894 else
13895   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
13896 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
13897 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
13898   echo $ECHO_N "(cached) $ECHO_C" >&6
13899 else
13900   ac_check_lib_save_LIBS=$LIBS
13901 LIBS="-lsecurity  $LIBS"
13902 cat >conftest.$ac_ext <<_ACEOF
13903 /* confdefs.h.  */
13904 _ACEOF
13905 cat confdefs.h >>conftest.$ac_ext
13906 cat >>conftest.$ac_ext <<_ACEOF
13907 /* end confdefs.h.  */
13908
13909 /* Override any gcc2 internal prototype to avoid an error.  */
13910 #ifdef __cplusplus
13911 extern "C"
13912 #endif
13913 /* We use char because int might match the return type of a gcc2
13914    builtin and then its argument prototype would still apply.  */
13915 char getprpwnam ();
13916 int
13917 main ()
13918 {
13919 getprpwnam ();
13920   ;
13921   return 0;
13922 }
13923 _ACEOF
13924 rm -f conftest.$ac_objext conftest$ac_exeext
13925 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13926   (eval $ac_link) 2>conftest.er1
13927   ac_status=$?
13928   grep -v '^ *+' conftest.er1 >conftest.err
13929   rm -f conftest.er1
13930   cat conftest.err >&5
13931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13932   (exit $ac_status); } &&
13933          { ac_try='test -z "$ac_c_werror_flag"
13934                          || test ! -s conftest.err'
13935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13936   (eval $ac_try) 2>&5
13937   ac_status=$?
13938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13939   (exit $ac_status); }; } &&
13940          { ac_try='test -s conftest$ac_exeext'
13941   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13942   (eval $ac_try) 2>&5
13943   ac_status=$?
13944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13945   (exit $ac_status); }; }; then
13946   ac_cv_lib_security_getprpwnam=yes
13947 else
13948   echo "$as_me: failed program was:" >&5
13949 sed 's/^/| /' conftest.$ac_ext >&5
13950
13951 ac_cv_lib_security_getprpwnam=no
13952 fi
13953 rm -f conftest.err conftest.$ac_objext \
13954       conftest$ac_exeext conftest.$ac_ext
13955 LIBS=$ac_check_lib_save_LIBS
13956 fi
13957 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
13958 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
13959 if test $ac_cv_lib_security_getprpwnam = yes; then
13960   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
13961 fi
13962
13963 fi
13964
13965   fi
13966 fi
13967
13968 ###############################################################################
13969 #
13970 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
13971 #
13972 ###############################################################################
13973
13974 if test "$with_shadow" = yes ; then
13975   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
13976 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
13977 if test "${ac_cv_hpux_passwd+set}" = set; then
13978   echo $ECHO_N "(cached) $ECHO_C" >&6
13979 else
13980
13981   ac_save_CPPFLAGS="$CPPFLAGS"
13982   if test \! -z "$includedir" ; then
13983     CPPFLAGS="$CPPFLAGS -I$includedir"
13984   fi
13985   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13986   cat >conftest.$ac_ext <<_ACEOF
13987 /* confdefs.h.  */
13988 _ACEOF
13989 cat confdefs.h >>conftest.$ac_ext
13990 cat >>conftest.$ac_ext <<_ACEOF
13991 /* end confdefs.h.  */
13992 #include <stdlib.h>
13993                                     #include <unistd.h>
13994                                     #include <sys/types.h>
13995                                     #include <pwd.h>
13996                                     #include <hpsecurity.h>
13997                                     #include <prot.h>
13998 int
13999 main ()
14000 {
14001 struct s_passwd *p = getspwnam("nobody");
14002                        const char *pw = p->pw_passwd;
14003   ;
14004   return 0;
14005 }
14006 _ACEOF
14007 rm -f conftest.$ac_objext
14008 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14009   (eval $ac_compile) 2>conftest.er1
14010   ac_status=$?
14011   grep -v '^ *+' conftest.er1 >conftest.err
14012   rm -f conftest.er1
14013   cat conftest.err >&5
14014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14015   (exit $ac_status); } &&
14016          { ac_try='test -z "$ac_c_werror_flag"
14017                          || test ! -s conftest.err'
14018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14019   (eval $ac_try) 2>&5
14020   ac_status=$?
14021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14022   (exit $ac_status); }; } &&
14023          { ac_try='test -s conftest.$ac_objext'
14024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14025   (eval $ac_try) 2>&5
14026   ac_status=$?
14027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14028   (exit $ac_status); }; }; then
14029   ac_cv_hpux_passwd=yes
14030 else
14031   echo "$as_me: failed program was:" >&5
14032 sed 's/^/| /' conftest.$ac_ext >&5
14033
14034 ac_cv_hpux_passwd=no
14035 fi
14036 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14037   CPPFLAGS="$ac_save_CPPFLAGS"
14038 fi
14039 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
14040 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
14041   if test "$ac_cv_hpux_passwd" = yes; then
14042     have_shadow_hpux=yes
14043     have_shadow=yes
14044     need_setuid=yes
14045
14046     # on HPUX, bigcrypt is in -lsec
14047     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
14048 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
14049 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
14050   echo $ECHO_N "(cached) $ECHO_C" >&6
14051 else
14052   ac_check_lib_save_LIBS=$LIBS
14053 LIBS="-lsec  $LIBS"
14054 cat >conftest.$ac_ext <<_ACEOF
14055 /* confdefs.h.  */
14056 _ACEOF
14057 cat confdefs.h >>conftest.$ac_ext
14058 cat >>conftest.$ac_ext <<_ACEOF
14059 /* end confdefs.h.  */
14060
14061 /* Override any gcc2 internal prototype to avoid an error.  */
14062 #ifdef __cplusplus
14063 extern "C"
14064 #endif
14065 /* We use char because int might match the return type of a gcc2
14066    builtin and then its argument prototype would still apply.  */
14067 char bigcrypt ();
14068 int
14069 main ()
14070 {
14071 bigcrypt ();
14072   ;
14073   return 0;
14074 }
14075 _ACEOF
14076 rm -f conftest.$ac_objext conftest$ac_exeext
14077 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14078   (eval $ac_link) 2>conftest.er1
14079   ac_status=$?
14080   grep -v '^ *+' conftest.er1 >conftest.err
14081   rm -f conftest.er1
14082   cat conftest.err >&5
14083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14084   (exit $ac_status); } &&
14085          { ac_try='test -z "$ac_c_werror_flag"
14086                          || test ! -s conftest.err'
14087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14088   (eval $ac_try) 2>&5
14089   ac_status=$?
14090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14091   (exit $ac_status); }; } &&
14092          { ac_try='test -s conftest$ac_exeext'
14093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14094   (eval $ac_try) 2>&5
14095   ac_status=$?
14096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14097   (exit $ac_status); }; }; then
14098   ac_cv_lib_sec_bigcrypt=yes
14099 else
14100   echo "$as_me: failed program was:" >&5
14101 sed 's/^/| /' conftest.$ac_ext >&5
14102
14103 ac_cv_lib_sec_bigcrypt=no
14104 fi
14105 rm -f conftest.err conftest.$ac_objext \
14106       conftest$ac_exeext conftest.$ac_ext
14107 LIBS=$ac_check_lib_save_LIBS
14108 fi
14109 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
14110 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
14111 if test $ac_cv_lib_sec_bigcrypt = yes; then
14112   PASSWD_LIBS="$PASSWD_LIBS -lsec"
14113 fi
14114
14115   fi
14116 fi
14117
14118
14119 ###############################################################################
14120 #
14121 #       Check for FreeBSD-style shadow passwords.
14122 #
14123 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
14124 #       password systems -- except you only get stuff in the pw_passwd field
14125 #       if the running program is setuid.  So, guess that we've got this
14126 #       lossage to contend with if /etc/master.passwd exists, and default to
14127 #       a setuid installation.
14128 #
14129 ###############################################################################
14130
14131 if test "$with_shadow" = yes ; then
14132   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
14133 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
14134 if test "${ac_cv_master_passwd+set}" = set; then
14135   echo $ECHO_N "(cached) $ECHO_C" >&6
14136 else
14137   if test -f /etc/master.passwd ; then
14138                     ac_cv_master_passwd=yes
14139                   else
14140                     ac_cv_master_passwd=no
14141                   fi
14142 fi
14143 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
14144 echo "${ECHO_T}$ac_cv_master_passwd" >&6
14145   if test "$ac_cv_master_passwd" = yes; then
14146     need_setuid=yes
14147   fi
14148 fi
14149
14150
14151 ###############################################################################
14152 #
14153 #       Check for traditional (ha!) shadow passwords.
14154 #
14155 ###############################################################################
14156
14157 if test "$with_shadow" = yes ; then
14158   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
14159 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
14160 if test "${ac_cv_shadow+set}" = set; then
14161   echo $ECHO_N "(cached) $ECHO_C" >&6
14162 else
14163
14164   ac_save_CPPFLAGS="$CPPFLAGS"
14165   if test \! -z "$includedir" ; then
14166     CPPFLAGS="$CPPFLAGS -I$includedir"
14167   fi
14168   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14169   cat >conftest.$ac_ext <<_ACEOF
14170 /* confdefs.h.  */
14171 _ACEOF
14172 cat confdefs.h >>conftest.$ac_ext
14173 cat >>conftest.$ac_ext <<_ACEOF
14174 /* end confdefs.h.  */
14175 #include <stdlib.h>
14176                                     #include <unistd.h>
14177                                     #include <sys/types.h>
14178                                     #include <pwd.h>
14179                                     #include <shadow.h>
14180 int
14181 main ()
14182 {
14183 struct spwd *p = getspnam("nobody");
14184                        const char *pw = p->sp_pwdp;
14185   ;
14186   return 0;
14187 }
14188 _ACEOF
14189 rm -f conftest.$ac_objext
14190 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14191   (eval $ac_compile) 2>conftest.er1
14192   ac_status=$?
14193   grep -v '^ *+' conftest.er1 >conftest.err
14194   rm -f conftest.er1
14195   cat conftest.err >&5
14196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14197   (exit $ac_status); } &&
14198          { ac_try='test -z "$ac_c_werror_flag"
14199                          || test ! -s conftest.err'
14200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14201   (eval $ac_try) 2>&5
14202   ac_status=$?
14203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14204   (exit $ac_status); }; } &&
14205          { ac_try='test -s conftest.$ac_objext'
14206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14207   (eval $ac_try) 2>&5
14208   ac_status=$?
14209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14210   (exit $ac_status); }; }; then
14211   ac_cv_shadow=yes
14212 else
14213   echo "$as_me: failed program was:" >&5
14214 sed 's/^/| /' conftest.$ac_ext >&5
14215
14216 ac_cv_shadow=no
14217 fi
14218 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14219   CPPFLAGS="$ac_save_CPPFLAGS"
14220 fi
14221 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
14222 echo "${ECHO_T}$ac_cv_shadow" >&6
14223   if test "$ac_cv_shadow" = yes; then
14224     have_shadow=yes
14225     need_setuid=yes
14226
14227     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
14228     have_getspnam=no
14229     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
14230 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
14231 if test "${ac_cv_lib_c_getspnam+set}" = set; then
14232   echo $ECHO_N "(cached) $ECHO_C" >&6
14233 else
14234   ac_check_lib_save_LIBS=$LIBS
14235 LIBS="-lc  $LIBS"
14236 cat >conftest.$ac_ext <<_ACEOF
14237 /* confdefs.h.  */
14238 _ACEOF
14239 cat confdefs.h >>conftest.$ac_ext
14240 cat >>conftest.$ac_ext <<_ACEOF
14241 /* end confdefs.h.  */
14242
14243 /* Override any gcc2 internal prototype to avoid an error.  */
14244 #ifdef __cplusplus
14245 extern "C"
14246 #endif
14247 /* We use char because int might match the return type of a gcc2
14248    builtin and then its argument prototype would still apply.  */
14249 char getspnam ();
14250 int
14251 main ()
14252 {
14253 getspnam ();
14254   ;
14255   return 0;
14256 }
14257 _ACEOF
14258 rm -f conftest.$ac_objext conftest$ac_exeext
14259 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14260   (eval $ac_link) 2>conftest.er1
14261   ac_status=$?
14262   grep -v '^ *+' conftest.er1 >conftest.err
14263   rm -f conftest.er1
14264   cat conftest.err >&5
14265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14266   (exit $ac_status); } &&
14267          { ac_try='test -z "$ac_c_werror_flag"
14268                          || test ! -s conftest.err'
14269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14270   (eval $ac_try) 2>&5
14271   ac_status=$?
14272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14273   (exit $ac_status); }; } &&
14274          { ac_try='test -s conftest$ac_exeext'
14275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14276   (eval $ac_try) 2>&5
14277   ac_status=$?
14278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14279   (exit $ac_status); }; }; then
14280   ac_cv_lib_c_getspnam=yes
14281 else
14282   echo "$as_me: failed program was:" >&5
14283 sed 's/^/| /' conftest.$ac_ext >&5
14284
14285 ac_cv_lib_c_getspnam=no
14286 fi
14287 rm -f conftest.err conftest.$ac_objext \
14288       conftest$ac_exeext conftest.$ac_ext
14289 LIBS=$ac_check_lib_save_LIBS
14290 fi
14291 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
14292 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
14293 if test $ac_cv_lib_c_getspnam = yes; then
14294   have_getspnam=yes
14295 fi
14296
14297     if test "$have_getspnam" = no ; then
14298       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
14299 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
14300 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
14301   echo $ECHO_N "(cached) $ECHO_C" >&6
14302 else
14303   ac_check_lib_save_LIBS=$LIBS
14304 LIBS="-lgen  $LIBS"
14305 cat >conftest.$ac_ext <<_ACEOF
14306 /* confdefs.h.  */
14307 _ACEOF
14308 cat confdefs.h >>conftest.$ac_ext
14309 cat >>conftest.$ac_ext <<_ACEOF
14310 /* end confdefs.h.  */
14311
14312 /* Override any gcc2 internal prototype to avoid an error.  */
14313 #ifdef __cplusplus
14314 extern "C"
14315 #endif
14316 /* We use char because int might match the return type of a gcc2
14317    builtin and then its argument prototype would still apply.  */
14318 char getspnam ();
14319 int
14320 main ()
14321 {
14322 getspnam ();
14323   ;
14324   return 0;
14325 }
14326 _ACEOF
14327 rm -f conftest.$ac_objext conftest$ac_exeext
14328 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14329   (eval $ac_link) 2>conftest.er1
14330   ac_status=$?
14331   grep -v '^ *+' conftest.er1 >conftest.err
14332   rm -f conftest.er1
14333   cat conftest.err >&5
14334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14335   (exit $ac_status); } &&
14336          { ac_try='test -z "$ac_c_werror_flag"
14337                          || test ! -s conftest.err'
14338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14339   (eval $ac_try) 2>&5
14340   ac_status=$?
14341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14342   (exit $ac_status); }; } &&
14343          { ac_try='test -s conftest$ac_exeext'
14344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14345   (eval $ac_try) 2>&5
14346   ac_status=$?
14347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14348   (exit $ac_status); }; }; then
14349   ac_cv_lib_gen_getspnam=yes
14350 else
14351   echo "$as_me: failed program was:" >&5
14352 sed 's/^/| /' conftest.$ac_ext >&5
14353
14354 ac_cv_lib_gen_getspnam=no
14355 fi
14356 rm -f conftest.err conftest.$ac_objext \
14357       conftest$ac_exeext conftest.$ac_ext
14358 LIBS=$ac_check_lib_save_LIBS
14359 fi
14360 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
14361 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
14362 if test $ac_cv_lib_gen_getspnam = yes; then
14363   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
14364 fi
14365
14366     fi
14367   fi
14368 fi
14369
14370
14371 ###############################################################################
14372 #
14373 #       Check for other libraries needed for non-shadow passwords.
14374 #
14375 ###############################################################################
14376
14377 if test "$enable_locking" = yes ; then
14378
14379   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
14380   have_crypt=no
14381   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
14382 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
14383 if test "${ac_cv_lib_c_crypt+set}" = set; then
14384   echo $ECHO_N "(cached) $ECHO_C" >&6
14385 else
14386   ac_check_lib_save_LIBS=$LIBS
14387 LIBS="-lc  $LIBS"
14388 cat >conftest.$ac_ext <<_ACEOF
14389 /* confdefs.h.  */
14390 _ACEOF
14391 cat confdefs.h >>conftest.$ac_ext
14392 cat >>conftest.$ac_ext <<_ACEOF
14393 /* end confdefs.h.  */
14394
14395 /* Override any gcc2 internal prototype to avoid an error.  */
14396 #ifdef __cplusplus
14397 extern "C"
14398 #endif
14399 /* We use char because int might match the return type of a gcc2
14400    builtin and then its argument prototype would still apply.  */
14401 char crypt ();
14402 int
14403 main ()
14404 {
14405 crypt ();
14406   ;
14407   return 0;
14408 }
14409 _ACEOF
14410 rm -f conftest.$ac_objext conftest$ac_exeext
14411 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14412   (eval $ac_link) 2>conftest.er1
14413   ac_status=$?
14414   grep -v '^ *+' conftest.er1 >conftest.err
14415   rm -f conftest.er1
14416   cat conftest.err >&5
14417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14418   (exit $ac_status); } &&
14419          { ac_try='test -z "$ac_c_werror_flag"
14420                          || test ! -s conftest.err'
14421   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14422   (eval $ac_try) 2>&5
14423   ac_status=$?
14424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14425   (exit $ac_status); }; } &&
14426          { ac_try='test -s conftest$ac_exeext'
14427   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14428   (eval $ac_try) 2>&5
14429   ac_status=$?
14430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14431   (exit $ac_status); }; }; then
14432   ac_cv_lib_c_crypt=yes
14433 else
14434   echo "$as_me: failed program was:" >&5
14435 sed 's/^/| /' conftest.$ac_ext >&5
14436
14437 ac_cv_lib_c_crypt=no
14438 fi
14439 rm -f conftest.err conftest.$ac_objext \
14440       conftest$ac_exeext conftest.$ac_ext
14441 LIBS=$ac_check_lib_save_LIBS
14442 fi
14443 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
14444 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
14445 if test $ac_cv_lib_c_crypt = yes; then
14446   have_crypt=yes
14447 fi
14448
14449   if test "$have_crypt" = no ; then
14450     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14451 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
14452 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14453   echo $ECHO_N "(cached) $ECHO_C" >&6
14454 else
14455   ac_check_lib_save_LIBS=$LIBS
14456 LIBS="-lcrypt  $LIBS"
14457 cat >conftest.$ac_ext <<_ACEOF
14458 /* confdefs.h.  */
14459 _ACEOF
14460 cat confdefs.h >>conftest.$ac_ext
14461 cat >>conftest.$ac_ext <<_ACEOF
14462 /* end confdefs.h.  */
14463
14464 /* Override any gcc2 internal prototype to avoid an error.  */
14465 #ifdef __cplusplus
14466 extern "C"
14467 #endif
14468 /* We use char because int might match the return type of a gcc2
14469    builtin and then its argument prototype would still apply.  */
14470 char crypt ();
14471 int
14472 main ()
14473 {
14474 crypt ();
14475   ;
14476   return 0;
14477 }
14478 _ACEOF
14479 rm -f conftest.$ac_objext conftest$ac_exeext
14480 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14481   (eval $ac_link) 2>conftest.er1
14482   ac_status=$?
14483   grep -v '^ *+' conftest.er1 >conftest.err
14484   rm -f conftest.er1
14485   cat conftest.err >&5
14486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14487   (exit $ac_status); } &&
14488          { ac_try='test -z "$ac_c_werror_flag"
14489                          || test ! -s conftest.err'
14490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14491   (eval $ac_try) 2>&5
14492   ac_status=$?
14493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14494   (exit $ac_status); }; } &&
14495          { ac_try='test -s conftest$ac_exeext'
14496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14497   (eval $ac_try) 2>&5
14498   ac_status=$?
14499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14500   (exit $ac_status); }; }; then
14501   ac_cv_lib_crypt_crypt=yes
14502 else
14503   echo "$as_me: failed program was:" >&5
14504 sed 's/^/| /' conftest.$ac_ext >&5
14505
14506 ac_cv_lib_crypt_crypt=no
14507 fi
14508 rm -f conftest.err conftest.$ac_objext \
14509       conftest$ac_exeext conftest.$ac_ext
14510 LIBS=$ac_check_lib_save_LIBS
14511 fi
14512 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14513 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
14514 if test $ac_cv_lib_crypt_crypt = yes; then
14515   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14516 fi
14517
14518   fi
14519 fi
14520
14521
14522 # Most of the above shadow mechanisms will have set need_setuid to yes,
14523 # if they were found.  But, on some systems, we need setuid even when
14524 # using plain old vanilla passwords.
14525 #
14526 if test "$enable_locking" = yes ; then
14527   case "$host" in
14528     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
14529       need_setuid=yes
14530     ;;
14531   esac
14532 fi
14533
14534
14535 if test "$have_shadow_adjunct" = yes ; then
14536   cat >>confdefs.h <<\_ACEOF
14537 #define HAVE_ADJUNCT_PASSWD 1
14538 _ACEOF
14539
14540 elif test "$have_shadow_enhanced" = yes ; then
14541   cat >>confdefs.h <<\_ACEOF
14542 #define HAVE_ENHANCED_PASSWD 1
14543 _ACEOF
14544
14545 elif test "$have_shadow_hpux" = yes ; then
14546   cat >>confdefs.h <<\_ACEOF
14547 #define HAVE_HPUX_PASSWD 1
14548 _ACEOF
14549
14550 elif test "$have_shadow" = yes ; then
14551   cat >>confdefs.h <<\_ACEOF
14552 #define HAVE_SHADOW_PASSWD 1
14553 _ACEOF
14554
14555 fi
14556
14557
14558 ###############################################################################
14559 #
14560 #       Check for external password helper
14561 #       On SuSE, instead of having xscreensaver be a setuid program, they
14562 #       fork an external program that takes the password on stdin, and
14563 #       returns true if that password is a valid one.  Then only that
14564 #       smaller program needs to be setuid.
14565 #
14566 #       (Note that this external program is not a GUI: the GUI is still
14567 #       all in xscreensaver itself; the external program just does auth.)
14568 #
14569 ###############################################################################
14570
14571 have_passwd_helper=no
14572 with_passwd_helper_req=unspecified
14573
14574
14575 # Check whether --with-passwd-helper or --without-passwd-helper was given.
14576 if test "${with_passwd_helper+set}" = set; then
14577   withval="$with_passwd_helper"
14578   with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
14579 else
14580   with_passwd_helper=no
14581 fi;
14582 # no HANDLE_X_PATH_ARG for this one
14583
14584 if test "$enable_locking" = no ; then
14585   with_passwd_helper_req=no
14586   with_passwd_helper=no
14587 fi
14588
14589 case "$with_passwd_helper" in
14590   ""|no) : ;;
14591   /*)
14592     cat >>confdefs.h <<_ACEOF
14593 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
14594 _ACEOF
14595
14596     have_passwd_helper=yes;;
14597   *)
14598     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
14599     exit 1
14600 esac
14601
14602
14603 ###############################################################################
14604 #
14605 #       Check for -lgtk (and Gnome stuff)
14606 #
14607 ###############################################################################
14608
14609 have_gtk=no
14610 with_gtk_req=unspecified
14611
14612 # Check whether --with-gtk or --without-gtk was given.
14613 if test "${with_gtk+set}" = set; then
14614   withval="$with_gtk"
14615   with_gtk="$withval"; with_gtk_req="$withval"
14616 else
14617   with_gtk=yes
14618 fi;
14619
14620 # if --with-gtk=/directory/ was specified, remember that directory so that
14621 # we can also look for the `gtk-config' program in that directory.
14622 case "$with_gtk" in
14623   /*)
14624     gtk_dir="$with_gtk"
14625     ;;
14626   *)
14627     gtk_dir=""
14628     ;;
14629 esac
14630
14631
14632    case "$with_gtk" in
14633     yes) ;;
14634     no)  ;;
14635
14636     /*)
14637      echo "$as_me:$LINENO: checking for Gtk headers" >&5
14638 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
14639      d=$with_gtk/include
14640      if test -d $d; then
14641        X_CFLAGS="-I$d $X_CFLAGS"
14642        echo "$as_me:$LINENO: result: $d" >&5
14643 echo "${ECHO_T}$d" >&6
14644      else
14645        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14646 echo "${ECHO_T}not found ($d: no such directory)" >&6
14647      fi
14648
14649      echo "$as_me:$LINENO: checking for Gtk libs" >&5
14650 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
14651      d=$with_gtk/lib
14652      if test -d $d; then
14653        X_LIBS="-L$d $X_LIBS"
14654        echo "$as_me:$LINENO: result: $d" >&5
14655 echo "${ECHO_T}$d" >&6
14656      else
14657        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14658 echo "${ECHO_T}not found ($d: no such directory)" >&6
14659      fi
14660
14661      # replace the directory string with "yes".
14662      with_gtk_req="yes"
14663      with_gtk=$with_gtk_req
14664      ;;
14665
14666     *)
14667      echo ""
14668      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
14669      echo "       If it is a directory, then \`DIR/include' will be added to"
14670      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14671      exit 1
14672      ;;
14673    esac
14674
14675
14676 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
14677   echo "error: must be yes or no: --with-gtk=$with_gtk"
14678   exit 1
14679 fi
14680
14681
14682 parse_gtk_version_string() {
14683   # M4 sucks!!
14684
14685   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
14686   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
14687
14688   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
14689   if test -z "$ac_gtk_version"; then
14690     ac_gtk_version=unknown
14691     ac_gtk_version_string=unknown
14692   fi
14693 }
14694
14695 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
14696 # if the user specified --with-gtk=/foo/ then look there.
14697 #
14698 gtk_path="$PATH"
14699 if test ! -z "$gtk_dir"; then
14700   # canonicalize slashes.
14701   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
14702   gtk_path="$foo:$gtk_path"
14703 fi
14704
14705 for ac_prog in pkg-config
14706 do
14707   # Extract the first word of "$ac_prog", so it can be a program name with args.
14708 set dummy $ac_prog; ac_word=$2
14709 echo "$as_me:$LINENO: checking for $ac_word" >&5
14710 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14711 if test "${ac_cv_path_pkg_config+set}" = set; then
14712   echo $ECHO_N "(cached) $ECHO_C" >&6
14713 else
14714   case $pkg_config in
14715   [\\/]* | ?:[\\/]*)
14716   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
14717   ;;
14718   *)
14719   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14720 for as_dir in $gtk_path
14721 do
14722   IFS=$as_save_IFS
14723   test -z "$as_dir" && as_dir=.
14724   for ac_exec_ext in '' $ac_executable_extensions; do
14725   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14726     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
14727     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14728     break 2
14729   fi
14730 done
14731 done
14732
14733   ;;
14734 esac
14735 fi
14736 pkg_config=$ac_cv_path_pkg_config
14737
14738 if test -n "$pkg_config"; then
14739   echo "$as_me:$LINENO: result: $pkg_config" >&5
14740 echo "${ECHO_T}$pkg_config" >&6
14741 else
14742   echo "$as_me:$LINENO: result: no" >&5
14743 echo "${ECHO_T}no" >&6
14744 fi
14745
14746   test -n "$pkg_config" && break
14747 done
14748
14749
14750 if test -z "$pkg_config" ; then
14751   { echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
14752 echo "$as_me: WARNING: pkg-config not found!" >&2;}
14753   pkg_config="false"
14754 fi
14755
14756
14757 # Utility function for running pkg-config-based tests...
14758 #
14759 pkgs=''
14760 pkg_check_version() {
14761   if test "$ok" = yes ; then
14762     req="$1"
14763     min="$2"
14764     echo "$as_me:$LINENO: checking for $req" >&5
14765 echo $ECHO_N "checking for $req... $ECHO_C" >&6
14766     if $pkg_config --exists "$req" ; then
14767       vers=`$pkg_config --modversion "$req"`
14768       if $pkg_config --exists "$req >= $min" ; then
14769         echo "$as_me:$LINENO: result: $vers" >&5
14770 echo "${ECHO_T}$vers" >&6
14771         pkgs="$pkgs $req"
14772         return 1
14773       else
14774         echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
14775 echo "${ECHO_T}$vers (wanted >= $min)" >&6
14776         ok=no
14777         return 0
14778       fi
14779     else
14780       echo "$as_me:$LINENO: result: no" >&5
14781 echo "${ECHO_T}no" >&6
14782       ok=no
14783       return 0
14784     fi
14785   fi
14786 }
14787
14788
14789 jurassic_gtk=no
14790 gtk_halfassed=no
14791
14792 if test "$with_gtk" = yes; then
14793   have_gtk=no
14794
14795   ok="yes"
14796   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
14797   pkg_check_version         gmodule-2.0  2.0.0
14798   pkg_check_version          libxml-2.0  2.4.6
14799   pkg_check_version        libglade-2.0  2.0.0
14800   pkg_check_version      gdk-pixbuf-2.0  2.0.0
14801   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
14802   have_gtk="$ok"
14803
14804   if test "$have_gtk" = no; then
14805     if test -n "$ac_gtk_version_string" ; then
14806       gtk_halfassed="$ac_gtk_version_string"
14807       gtk_halfassed_lib="$req"
14808     fi
14809   fi
14810
14811   if test "$have_gtk" = yes; then
14812     parse_gtk_version_string
14813     jurassic_gtk=no
14814   fi
14815
14816   if test "$have_gtk" = yes; then
14817     echo "$as_me:$LINENO: checking for Gtk includes" >&5
14818 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
14819 if test "${ac_cv_gtk_config_cflags+set}" = set; then
14820   echo $ECHO_N "(cached) $ECHO_C" >&6
14821 else
14822   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
14823 fi
14824 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
14825 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
14826     echo "$as_me:$LINENO: checking for Gtk libs" >&5
14827 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
14828 if test "${ac_cv_gtk_config_libs+set}" = set; then
14829   echo $ECHO_N "(cached) $ECHO_C" >&6
14830 else
14831   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
14832 fi
14833 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
14834 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
14835   fi
14836   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
14837   ac_gtk_config_libs=$ac_cv_gtk_config_libs
14838
14839   GTK_EXTRA_OBJS=""
14840   GNOME_DATADIR=""
14841   GNOME_PANELDIR='$(GNOME_PANELDIR2)'
14842   if test "$have_gtk" = yes; then
14843     GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
14844     GNOME_DATADIR="$GNOME_DATADIR/share"
14845   fi
14846
14847   if test "$have_gtk" = yes; then
14848     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
14849     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
14850     cat >>confdefs.h <<\_ACEOF
14851 #define HAVE_GTK 1
14852 _ACEOF
14853
14854     cat >>confdefs.h <<\_ACEOF
14855 #define HAVE_GTK2 1
14856 _ACEOF
14857
14858     cat >>confdefs.h <<\_ACEOF
14859 #define HAVE_XML 1
14860 _ACEOF
14861
14862   fi
14863
14864 fi
14865
14866
14867 # Check for the Gnome Help Browser.
14868 #
14869 if test "$have_gtk" = yes; then
14870   for ac_prog in yelp gnome-help-browser
14871 do
14872   # Extract the first word of "$ac_prog", so it can be a program name with args.
14873 set dummy $ac_prog; ac_word=$2
14874 echo "$as_me:$LINENO: checking for $ac_word" >&5
14875 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14876 if test "${ac_cv_prog_have_gnome_help+set}" = set; then
14877   echo $ECHO_N "(cached) $ECHO_C" >&6
14878 else
14879   if test -n "$have_gnome_help"; then
14880   ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
14881 else
14882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14883 for as_dir in $PATH
14884 do
14885   IFS=$as_save_IFS
14886   test -z "$as_dir" && as_dir=.
14887   for ac_exec_ext in '' $ac_executable_extensions; do
14888   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14889     ac_cv_prog_have_gnome_help="$ac_prog"
14890     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14891     break 2
14892   fi
14893 done
14894 done
14895
14896 fi
14897 fi
14898 have_gnome_help=$ac_cv_prog_have_gnome_help
14899 if test -n "$have_gnome_help"; then
14900   echo "$as_me:$LINENO: result: $have_gnome_help" >&5
14901 echo "${ECHO_T}$have_gnome_help" >&6
14902 else
14903   echo "$as_me:$LINENO: result: no" >&5
14904 echo "${ECHO_T}no" >&6
14905 fi
14906
14907   test -n "$have_gnome_help" && break
14908 done
14909 test -n "$have_gnome_help" || have_gnome_help="no"
14910
14911   if test "$have_gnome_help" != no; then
14912     have_gnome_help=yes
14913   fi
14914 fi
14915
14916
14917 ###############################################################################
14918 #
14919 #       Check for -lXm.
14920 #
14921 ###############################################################################
14922
14923 have_motif=no
14924 with_motif_req=unspecified
14925
14926 # Check whether --with-motif or --without-motif was given.
14927 if test "${with_motif+set}" = set; then
14928   withval="$with_motif"
14929   with_motif="$withval"; with_motif_req="$withval"
14930 else
14931   with_motif=no
14932 fi;
14933
14934
14935    case "$with_motif" in
14936     yes) ;;
14937     no)  ;;
14938
14939     /*)
14940      echo "$as_me:$LINENO: checking for Motif headers" >&5
14941 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
14942      d=$with_motif/include
14943      if test -d $d; then
14944        X_CFLAGS="-I$d $X_CFLAGS"
14945        echo "$as_me:$LINENO: result: $d" >&5
14946 echo "${ECHO_T}$d" >&6
14947      else
14948        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14949 echo "${ECHO_T}not found ($d: no such directory)" >&6
14950      fi
14951
14952      echo "$as_me:$LINENO: checking for Motif libs" >&5
14953 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
14954      d=$with_motif/lib
14955      if test -d $d; then
14956        X_LIBS="-L$d $X_LIBS"
14957        echo "$as_me:$LINENO: result: $d" >&5
14958 echo "${ECHO_T}$d" >&6
14959      else
14960        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14961 echo "${ECHO_T}not found ($d: no such directory)" >&6
14962      fi
14963
14964      # replace the directory string with "yes".
14965      with_motif_req="yes"
14966      with_motif=$with_motif_req
14967      ;;
14968
14969     *)
14970      echo ""
14971      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
14972      echo "       If it is a directory, then \`DIR/include' will be added to"
14973      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14974      exit 1
14975      ;;
14976    esac
14977
14978
14979 if test "$with_motif" != yes -a "$with_motif" != no ; then
14980   echo "error: must be yes or no: --with-motif=$with_motif"
14981   exit 1
14982 fi
14983
14984 if test "$with_motif" = yes; then
14985   have_motif=no
14986
14987   ac_save_CPPFLAGS="$CPPFLAGS"
14988   if test \! -z "$includedir" ; then
14989     CPPFLAGS="$CPPFLAGS -I$includedir"
14990   fi
14991   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14992   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
14993 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
14994 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
14995   echo $ECHO_N "(cached) $ECHO_C" >&6
14996 else
14997   cat >conftest.$ac_ext <<_ACEOF
14998 /* confdefs.h.  */
14999 _ACEOF
15000 cat confdefs.h >>conftest.$ac_ext
15001 cat >>conftest.$ac_ext <<_ACEOF
15002 /* end confdefs.h.  */
15003 #include <stdlib.h>
15004                      #include <stdio.h>
15005                      #include <X11/Intrinsic.h>
15006
15007 #include <Xm/Xm.h>
15008 _ACEOF
15009 rm -f conftest.$ac_objext
15010 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15011   (eval $ac_compile) 2>conftest.er1
15012   ac_status=$?
15013   grep -v '^ *+' conftest.er1 >conftest.err
15014   rm -f conftest.er1
15015   cat conftest.err >&5
15016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15017   (exit $ac_status); } &&
15018          { ac_try='test -z "$ac_c_werror_flag"
15019                          || test ! -s conftest.err'
15020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15021   (eval $ac_try) 2>&5
15022   ac_status=$?
15023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15024   (exit $ac_status); }; } &&
15025          { ac_try='test -s conftest.$ac_objext'
15026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15027   (eval $ac_try) 2>&5
15028   ac_status=$?
15029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15030   (exit $ac_status); }; }; then
15031   ac_cv_header_Xm_Xm_h=yes
15032 else
15033   echo "$as_me: failed program was:" >&5
15034 sed 's/^/| /' conftest.$ac_ext >&5
15035
15036 ac_cv_header_Xm_Xm_h=no
15037 fi
15038 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15039 fi
15040 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
15041 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
15042 if test $ac_cv_header_Xm_Xm_h = yes; then
15043   have_motif=yes
15044                      cat >>confdefs.h <<\_ACEOF
15045 #define HAVE_MOTIF 1
15046 _ACEOF
15047
15048                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
15049 fi
15050
15051
15052   CPPFLAGS="$ac_save_CPPFLAGS"
15053 fi
15054
15055
15056 if test "$have_motif" = yes; then
15057
15058   ac_save_CPPFLAGS="$CPPFLAGS"
15059   if test \! -z "$includedir" ; then
15060     CPPFLAGS="$CPPFLAGS -I$includedir"
15061   fi
15062   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15063   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
15064 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
15065 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
15066   echo $ECHO_N "(cached) $ECHO_C" >&6
15067 else
15068   cat >conftest.$ac_ext <<_ACEOF
15069 /* confdefs.h.  */
15070 _ACEOF
15071 cat confdefs.h >>conftest.$ac_ext
15072 cat >>conftest.$ac_ext <<_ACEOF
15073 /* end confdefs.h.  */
15074 #include <stdlib.h>
15075                      #include <stdio.h>
15076                      #include <X11/Intrinsic.h>
15077
15078 #include <Xm/ComboBox.h>
15079 _ACEOF
15080 rm -f conftest.$ac_objext
15081 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15082   (eval $ac_compile) 2>conftest.er1
15083   ac_status=$?
15084   grep -v '^ *+' conftest.er1 >conftest.err
15085   rm -f conftest.er1
15086   cat conftest.err >&5
15087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15088   (exit $ac_status); } &&
15089          { ac_try='test -z "$ac_c_werror_flag"
15090                          || test ! -s conftest.err'
15091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15092   (eval $ac_try) 2>&5
15093   ac_status=$?
15094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15095   (exit $ac_status); }; } &&
15096          { ac_try='test -s conftest.$ac_objext'
15097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15098   (eval $ac_try) 2>&5
15099   ac_status=$?
15100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15101   (exit $ac_status); }; }; then
15102   ac_cv_header_Xm_ComboBox_h=yes
15103 else
15104   echo "$as_me: failed program was:" >&5
15105 sed 's/^/| /' conftest.$ac_ext >&5
15106
15107 ac_cv_header_Xm_ComboBox_h=no
15108 fi
15109 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15110 fi
15111 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
15112 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
15113 if test $ac_cv_header_Xm_ComboBox_h = yes; then
15114   cat >>confdefs.h <<\_ACEOF
15115 #define HAVE_XMCOMBOBOX 1
15116 _ACEOF
15117
15118 fi
15119
15120
15121   CPPFLAGS="$ac_save_CPPFLAGS"
15122 fi
15123
15124
15125 ###############################################################################
15126 #
15127 #       Checking whether Motif is really Lesstif.
15128 #
15129 ###############################################################################
15130
15131 have_lesstif=no
15132 if test "$have_motif" = yes ; then
15133   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
15134 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
15135 if test "${ac_cv_have_lesstif+set}" = set; then
15136   echo $ECHO_N "(cached) $ECHO_C" >&6
15137 else
15138
15139   ac_save_CPPFLAGS="$CPPFLAGS"
15140   if test \! -z "$includedir" ; then
15141     CPPFLAGS="$CPPFLAGS -I$includedir"
15142   fi
15143   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15144   cat >conftest.$ac_ext <<_ACEOF
15145 /* confdefs.h.  */
15146 _ACEOF
15147 cat confdefs.h >>conftest.$ac_ext
15148 cat >>conftest.$ac_ext <<_ACEOF
15149 /* end confdefs.h.  */
15150 #include <Xm/Xm.h>
15151 int
15152 main ()
15153 {
15154 long vers = LesstifVersion;
15155   ;
15156   return 0;
15157 }
15158 _ACEOF
15159 rm -f conftest.$ac_objext
15160 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15161   (eval $ac_compile) 2>conftest.er1
15162   ac_status=$?
15163   grep -v '^ *+' conftest.er1 >conftest.err
15164   rm -f conftest.er1
15165   cat conftest.err >&5
15166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15167   (exit $ac_status); } &&
15168          { ac_try='test -z "$ac_c_werror_flag"
15169                          || test ! -s conftest.err'
15170   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15171   (eval $ac_try) 2>&5
15172   ac_status=$?
15173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15174   (exit $ac_status); }; } &&
15175          { ac_try='test -s conftest.$ac_objext'
15176   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15177   (eval $ac_try) 2>&5
15178   ac_status=$?
15179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15180   (exit $ac_status); }; }; then
15181   ac_cv_have_lesstif=yes
15182 else
15183   echo "$as_me: failed program was:" >&5
15184 sed 's/^/| /' conftest.$ac_ext >&5
15185
15186 ac_cv_have_lesstif=no
15187 fi
15188 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15189   CPPFLAGS="$ac_save_CPPFLAGS"
15190 fi
15191 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
15192 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
15193   have_lesstif=$ac_cv_have_lesstif
15194 fi
15195
15196
15197 lesstif_version=unknown
15198 lesstif_version_string=unknown
15199
15200 if test "$have_lesstif" = yes ; then
15201   ltv=unknown
15202   echo unknown > conftest-lt
15203   echo "$as_me:$LINENO: checking LessTif version number" >&5
15204 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
15205 if test "${ac_cv_lesstif_version_string+set}" = set; then
15206   echo $ECHO_N "(cached) $ECHO_C" >&6
15207 else
15208
15209   ac_save_CPPFLAGS="$CPPFLAGS"
15210   if test \! -z "$includedir" ; then
15211     CPPFLAGS="$CPPFLAGS -I$includedir"
15212   fi
15213   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15214   if test "$cross_compiling" = yes; then
15215   ac_cv_lesstif_version=unknown
15216                      ac_cv_lesstif_version_string=unknown
15217 else
15218   cat >conftest.$ac_ext <<_ACEOF
15219 /* confdefs.h.  */
15220 _ACEOF
15221 cat confdefs.h >>conftest.$ac_ext
15222 cat >>conftest.$ac_ext <<_ACEOF
15223 /* end confdefs.h.  */
15224 #include <stdio.h>
15225                      #include <Xm/Xm.h>
15226                      int main() {
15227                        FILE *f = fopen("conftest-lt", "w");
15228                        if (!f) exit(1);
15229                        fprintf(f, "%d %d.%d\n", LesstifVersion,
15230                           LESSTIF_VERSION, LESSTIF_REVISION);
15231                        fclose(f);
15232                        exit(0);
15233                      }
15234 _ACEOF
15235 rm -f conftest$ac_exeext
15236 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15237   (eval $ac_link) 2>&5
15238   ac_status=$?
15239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15240   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15241   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15242   (eval $ac_try) 2>&5
15243   ac_status=$?
15244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15245   (exit $ac_status); }; }; then
15246   ltv=`cat conftest-lt`
15247                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
15248                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
15249 else
15250   echo "$as_me: program exited with status $ac_status" >&5
15251 echo "$as_me: failed program was:" >&5
15252 sed 's/^/| /' conftest.$ac_ext >&5
15253
15254 ( exit $ac_status )
15255 ac_cv_lesstif_version=unknown
15256                      ac_cv_lesstif_version_string=unknown
15257 fi
15258 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15259 fi
15260   CPPFLAGS="$ac_save_CPPFLAGS"
15261 fi
15262 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
15263 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
15264   rm -f conftest-lt
15265   lesstif_version=$ac_cv_lesstif_version
15266   lesstif_version_string=$ac_cv_lesstif_version_string
15267
15268 fi
15269
15270
15271 if test "$have_motif" = yes ; then
15272   mtv=unknown
15273   echo unknown > conftest-mt
15274   echo "$as_me:$LINENO: checking Motif version number" >&5
15275 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
15276 if test "${ac_cv_motif_version_string+set}" = set; then
15277   echo $ECHO_N "(cached) $ECHO_C" >&6
15278 else
15279
15280   ac_save_CPPFLAGS="$CPPFLAGS"
15281   if test \! -z "$includedir" ; then
15282     CPPFLAGS="$CPPFLAGS -I$includedir"
15283   fi
15284   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15285   if test "$cross_compiling" = yes; then
15286   ac_cv_motif_version=unknown
15287                      ac_cv_motif_version_string=unknown
15288 else
15289   cat >conftest.$ac_ext <<_ACEOF
15290 /* confdefs.h.  */
15291 _ACEOF
15292 cat confdefs.h >>conftest.$ac_ext
15293 cat >>conftest.$ac_ext <<_ACEOF
15294 /* end confdefs.h.  */
15295 #include <stdio.h>
15296                      #include <Xm/Xm.h>
15297                      int main() {
15298                        FILE *f = fopen("conftest-mt", "w");
15299                        if (!f) exit(1);
15300                        fprintf(f, "%d %d.%d\n", XmVersion,
15301                           XmVERSION, XmREVISION);
15302                        fclose(f);
15303                        exit(0);
15304                      }
15305 _ACEOF
15306 rm -f conftest$ac_exeext
15307 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15308   (eval $ac_link) 2>&5
15309   ac_status=$?
15310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15311   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15313   (eval $ac_try) 2>&5
15314   ac_status=$?
15315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15316   (exit $ac_status); }; }; then
15317   mtv=`cat conftest-mt`
15318                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
15319                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
15320 else
15321   echo "$as_me: program exited with status $ac_status" >&5
15322 echo "$as_me: failed program was:" >&5
15323 sed 's/^/| /' conftest.$ac_ext >&5
15324
15325 ( exit $ac_status )
15326 ac_cv_motif_version=unknown
15327                      ac_cv_motif_version_string=unknown
15328 fi
15329 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15330 fi
15331   CPPFLAGS="$ac_save_CPPFLAGS"
15332 fi
15333 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
15334 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
15335   rm -f conftest-mt
15336   motif_version=$ac_cv_motif_version
15337   motif_version_string=$ac_cv_motif_version_string
15338
15339 fi
15340
15341
15342 ###############################################################################
15343 #
15344 #       Checking whether Motif requires -lXpm.
15345 #
15346 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
15347 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
15348 #       of the library whether to build the XPM code into libXm, or whether
15349 #       to rely on an external libXm.  So the only way to tell whether XPM is
15350 #       a link-time requirement is to examine libXm.a, which is very
15351 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
15352 #       always link against XPM if the XPM lib exists (and this will be a
15353 #       no-op if libXm happens to already have the XPM code in it.)
15354 #
15355 ###############################################################################
15356
15357 motif_requires_xpm=no
15358 if test "$have_motif" = yes ; then
15359    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
15360 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
15361    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
15362    then
15363      motif_requires_xpm=yes
15364      echo "$as_me:$LINENO: result: maybe" >&5
15365 echo "${ECHO_T}maybe" >&6
15366    else
15367      echo "$as_me:$LINENO: result: no" >&5
15368 echo "${ECHO_T}no" >&6
15369    fi
15370 fi
15371
15372
15373 ###############################################################################
15374 #
15375 #       Checking whether Motif requires -lXp.
15376 #
15377 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
15378 #       Extension".   Why this extension isn't in -lXext with all the others,
15379 #       I have no idea.
15380 #
15381 ###############################################################################
15382
15383 have_xp_ext=no
15384 if test "$have_motif" = yes ; then
15385    have_xp_ext=no
15386
15387   ac_save_CPPFLAGS="$CPPFLAGS"
15388   ac_save_LDFLAGS="$LDFLAGS"
15389 #  ac_save_LIBS="$LIBS"
15390
15391   if test \! -z "$includedir" ; then
15392     CPPFLAGS="$CPPFLAGS -I$includedir"
15393   fi
15394   # note: $X_CFLAGS includes $x_includes
15395   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15396
15397   if test \! -z "$libdir" ; then
15398     LDFLAGS="$LDFLAGS -L$libdir"
15399   fi
15400   # note: $X_LIBS includes $x_libraries
15401   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15402
15403   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
15404 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
15405 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
15406   echo $ECHO_N "(cached) $ECHO_C" >&6
15407 else
15408   ac_check_lib_save_LIBS=$LIBS
15409 LIBS="-lXp -lX11 -lXext -lm $LIBS"
15410 cat >conftest.$ac_ext <<_ACEOF
15411 /* confdefs.h.  */
15412 _ACEOF
15413 cat confdefs.h >>conftest.$ac_ext
15414 cat >>conftest.$ac_ext <<_ACEOF
15415 /* end confdefs.h.  */
15416
15417 /* Override any gcc2 internal prototype to avoid an error.  */
15418 #ifdef __cplusplus
15419 extern "C"
15420 #endif
15421 /* We use char because int might match the return type of a gcc2
15422    builtin and then its argument prototype would still apply.  */
15423 char XpQueryExtension ();
15424 int
15425 main ()
15426 {
15427 XpQueryExtension ();
15428   ;
15429   return 0;
15430 }
15431 _ACEOF
15432 rm -f conftest.$ac_objext conftest$ac_exeext
15433 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15434   (eval $ac_link) 2>conftest.er1
15435   ac_status=$?
15436   grep -v '^ *+' conftest.er1 >conftest.err
15437   rm -f conftest.er1
15438   cat conftest.err >&5
15439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15440   (exit $ac_status); } &&
15441          { ac_try='test -z "$ac_c_werror_flag"
15442                          || test ! -s conftest.err'
15443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15444   (eval $ac_try) 2>&5
15445   ac_status=$?
15446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15447   (exit $ac_status); }; } &&
15448          { ac_try='test -s conftest$ac_exeext'
15449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15450   (eval $ac_try) 2>&5
15451   ac_status=$?
15452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15453   (exit $ac_status); }; }; then
15454   ac_cv_lib_Xp_XpQueryExtension=yes
15455 else
15456   echo "$as_me: failed program was:" >&5
15457 sed 's/^/| /' conftest.$ac_ext >&5
15458
15459 ac_cv_lib_Xp_XpQueryExtension=no
15460 fi
15461 rm -f conftest.err conftest.$ac_objext \
15462       conftest$ac_exeext conftest.$ac_ext
15463 LIBS=$ac_check_lib_save_LIBS
15464 fi
15465 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
15466 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
15467 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
15468   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
15469 else
15470   true
15471 fi
15472
15473   CPPFLAGS="$ac_save_CPPFLAGS"
15474   LDFLAGS="$ac_save_LDFLAGS"
15475 #  LIBS="$ac_save_LIBS"
15476
15477 fi
15478
15479
15480 ###############################################################################
15481 #
15482 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
15483 #
15484 ###############################################################################
15485
15486 have_xintl=no
15487 if test "$have_motif" = yes ; then
15488
15489   ac_save_CPPFLAGS="$CPPFLAGS"
15490   ac_save_LDFLAGS="$LDFLAGS"
15491 #  ac_save_LIBS="$LIBS"
15492
15493   if test \! -z "$includedir" ; then
15494     CPPFLAGS="$CPPFLAGS -I$includedir"
15495   fi
15496   # note: $X_CFLAGS includes $x_includes
15497   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15498
15499   if test \! -z "$libdir" ; then
15500     LDFLAGS="$LDFLAGS -L$libdir"
15501   fi
15502   # note: $X_LIBS includes $x_libraries
15503   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15504
15505   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
15506 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
15507 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
15508   echo $ECHO_N "(cached) $ECHO_C" >&6
15509 else
15510   ac_check_lib_save_LIBS=$LIBS
15511 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
15512 cat >conftest.$ac_ext <<_ACEOF
15513 /* confdefs.h.  */
15514 _ACEOF
15515 cat confdefs.h >>conftest.$ac_ext
15516 cat >>conftest.$ac_ext <<_ACEOF
15517 /* end confdefs.h.  */
15518
15519 /* Override any gcc2 internal prototype to avoid an error.  */
15520 #ifdef __cplusplus
15521 extern "C"
15522 #endif
15523 /* We use char because int might match the return type of a gcc2
15524    builtin and then its argument prototype would still apply.  */
15525 char _Xsetlocale ();
15526 int
15527 main ()
15528 {
15529 _Xsetlocale ();
15530   ;
15531   return 0;
15532 }
15533 _ACEOF
15534 rm -f conftest.$ac_objext conftest$ac_exeext
15535 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15536   (eval $ac_link) 2>conftest.er1
15537   ac_status=$?
15538   grep -v '^ *+' conftest.er1 >conftest.err
15539   rm -f conftest.er1
15540   cat conftest.err >&5
15541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15542   (exit $ac_status); } &&
15543          { ac_try='test -z "$ac_c_werror_flag"
15544                          || test ! -s conftest.err'
15545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15546   (eval $ac_try) 2>&5
15547   ac_status=$?
15548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15549   (exit $ac_status); }; } &&
15550          { ac_try='test -s conftest$ac_exeext'
15551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15552   (eval $ac_try) 2>&5
15553   ac_status=$?
15554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15555   (exit $ac_status); }; }; then
15556   ac_cv_lib_Xintl__Xsetlocale=yes
15557 else
15558   echo "$as_me: failed program was:" >&5
15559 sed 's/^/| /' conftest.$ac_ext >&5
15560
15561 ac_cv_lib_Xintl__Xsetlocale=no
15562 fi
15563 rm -f conftest.err conftest.$ac_objext \
15564       conftest$ac_exeext conftest.$ac_ext
15565 LIBS=$ac_check_lib_save_LIBS
15566 fi
15567 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
15568 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
15569 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
15570   have_xintl=yes
15571 else
15572   have_xintl=no
15573 fi
15574
15575   CPPFLAGS="$ac_save_CPPFLAGS"
15576   LDFLAGS="$ac_save_LDFLAGS"
15577 #  LIBS="$ac_save_LIBS"
15578
15579   if test "$have_xintl" = yes; then
15580     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
15581   fi
15582 fi
15583
15584
15585 ###############################################################################
15586 #
15587 #       Check for -lGL or -lMesaGL.
15588 #
15589 ###############################################################################
15590
15591 have_gl=no
15592 ac_have_mesa_gl=no
15593 with_gl_req=unspecified
15594 gl_halfassed=no
15595
15596 # Check whether --with-gl or --without-gl was given.
15597 if test "${with_gl+set}" = set; then
15598   withval="$with_gl"
15599   with_gl="$withval"; with_gl_req="$withval"
15600 else
15601   with_gl=yes
15602 fi;
15603
15604
15605    case "$with_gl" in
15606     yes) ;;
15607     no)  ;;
15608
15609     /*)
15610      echo "$as_me:$LINENO: checking for GL headers" >&5
15611 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
15612      d=$with_gl/include
15613      if test -d $d; then
15614        X_CFLAGS="-I$d $X_CFLAGS"
15615        echo "$as_me:$LINENO: result: $d" >&5
15616 echo "${ECHO_T}$d" >&6
15617      else
15618        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15619 echo "${ECHO_T}not found ($d: no such directory)" >&6
15620      fi
15621
15622      echo "$as_me:$LINENO: checking for GL libs" >&5
15623 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
15624      d=$with_gl/lib
15625      if test -d $d; then
15626        X_LIBS="-L$d $X_LIBS"
15627        echo "$as_me:$LINENO: result: $d" >&5
15628 echo "${ECHO_T}$d" >&6
15629      else
15630        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15631 echo "${ECHO_T}not found ($d: no such directory)" >&6
15632      fi
15633
15634      # replace the directory string with "yes".
15635      with_gl_req="yes"
15636      with_gl=$with_gl_req
15637      ;;
15638
15639     *)
15640      echo ""
15641      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
15642      echo "       If it is a directory, then \`DIR/include' will be added to"
15643      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15644      exit 1
15645      ;;
15646    esac
15647
15648
15649 ac_mesagl_version=unknown
15650 ac_mesagl_version_string=unknown
15651
15652 if test "$with_gl" = yes; then
15653
15654   ac_save_CPPFLAGS="$CPPFLAGS"
15655   if test \! -z "$includedir" ; then
15656     CPPFLAGS="$CPPFLAGS -I$includedir"
15657   fi
15658   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15659   if test "${ac_cv_header_GL_gl_h+set}" = set; then
15660   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15661 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15662 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15663   echo $ECHO_N "(cached) $ECHO_C" >&6
15664 fi
15665 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15666 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15667 else
15668   # Is the header compilable?
15669 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
15670 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
15671 cat >conftest.$ac_ext <<_ACEOF
15672 /* confdefs.h.  */
15673 _ACEOF
15674 cat confdefs.h >>conftest.$ac_ext
15675 cat >>conftest.$ac_ext <<_ACEOF
15676 /* end confdefs.h.  */
15677 $ac_includes_default
15678 #include <GL/gl.h>
15679 _ACEOF
15680 rm -f conftest.$ac_objext
15681 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15682   (eval $ac_compile) 2>conftest.er1
15683   ac_status=$?
15684   grep -v '^ *+' conftest.er1 >conftest.err
15685   rm -f conftest.er1
15686   cat conftest.err >&5
15687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15688   (exit $ac_status); } &&
15689          { ac_try='test -z "$ac_c_werror_flag"
15690                          || test ! -s conftest.err'
15691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15692   (eval $ac_try) 2>&5
15693   ac_status=$?
15694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15695   (exit $ac_status); }; } &&
15696          { ac_try='test -s conftest.$ac_objext'
15697   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15698   (eval $ac_try) 2>&5
15699   ac_status=$?
15700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15701   (exit $ac_status); }; }; then
15702   ac_header_compiler=yes
15703 else
15704   echo "$as_me: failed program was:" >&5
15705 sed 's/^/| /' conftest.$ac_ext >&5
15706
15707 ac_header_compiler=no
15708 fi
15709 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15710 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15711 echo "${ECHO_T}$ac_header_compiler" >&6
15712
15713 # Is the header present?
15714 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
15715 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
15716 cat >conftest.$ac_ext <<_ACEOF
15717 /* confdefs.h.  */
15718 _ACEOF
15719 cat confdefs.h >>conftest.$ac_ext
15720 cat >>conftest.$ac_ext <<_ACEOF
15721 /* end confdefs.h.  */
15722 #include <GL/gl.h>
15723 _ACEOF
15724 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15725   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15726   ac_status=$?
15727   grep -v '^ *+' conftest.er1 >conftest.err
15728   rm -f conftest.er1
15729   cat conftest.err >&5
15730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15731   (exit $ac_status); } >/dev/null; then
15732   if test -s conftest.err; then
15733     ac_cpp_err=$ac_c_preproc_warn_flag
15734     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15735   else
15736     ac_cpp_err=
15737   fi
15738 else
15739   ac_cpp_err=yes
15740 fi
15741 if test -z "$ac_cpp_err"; then
15742   ac_header_preproc=yes
15743 else
15744   echo "$as_me: failed program was:" >&5
15745 sed 's/^/| /' conftest.$ac_ext >&5
15746
15747   ac_header_preproc=no
15748 fi
15749 rm -f conftest.err conftest.$ac_ext
15750 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15751 echo "${ECHO_T}$ac_header_preproc" >&6
15752
15753 # So?  What about this header?
15754 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15755   yes:no: )
15756     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
15757 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15758     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
15759 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
15760     ac_header_preproc=yes
15761     ;;
15762   no:yes:* )
15763     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
15764 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
15765     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
15766 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
15767     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
15768 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
15769     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
15770 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15771     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
15772 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
15773     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
15774 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
15775     (
15776       cat <<\_ASBOX
15777 ## ------------------------------------------ ##
15778 ## Report this to the AC_PACKAGE_NAME lists.  ##
15779 ## ------------------------------------------ ##
15780 _ASBOX
15781     ) |
15782       sed "s/^/$as_me: WARNING:     /" >&2
15783     ;;
15784 esac
15785 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15786 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15787 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15788   echo $ECHO_N "(cached) $ECHO_C" >&6
15789 else
15790   ac_cv_header_GL_gl_h=$ac_header_preproc
15791 fi
15792 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15793 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15794
15795 fi
15796 if test $ac_cv_header_GL_gl_h = yes; then
15797   have_gl=yes
15798 else
15799   have_gl=no
15800 fi
15801
15802
15803   CPPFLAGS="$ac_save_CPPFLAGS"
15804   if test "$have_gl" = yes ; then
15805
15806   ac_save_CPPFLAGS="$CPPFLAGS"
15807   if test \! -z "$includedir" ; then
15808     CPPFLAGS="$CPPFLAGS -I$includedir"
15809   fi
15810   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15811   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
15812 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
15813 if test "${ac_cv_header_GL_glx_h+set}" = set; then
15814   echo $ECHO_N "(cached) $ECHO_C" >&6
15815 else
15816   cat >conftest.$ac_ext <<_ACEOF
15817 /* confdefs.h.  */
15818 _ACEOF
15819 cat confdefs.h >>conftest.$ac_ext
15820 cat >>conftest.$ac_ext <<_ACEOF
15821 /* end confdefs.h.  */
15822 #include <GL/gl.h>
15823
15824 #include <GL/glx.h>
15825 _ACEOF
15826 rm -f conftest.$ac_objext
15827 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15828   (eval $ac_compile) 2>conftest.er1
15829   ac_status=$?
15830   grep -v '^ *+' conftest.er1 >conftest.err
15831   rm -f conftest.er1
15832   cat conftest.err >&5
15833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15834   (exit $ac_status); } &&
15835          { ac_try='test -z "$ac_c_werror_flag"
15836                          || test ! -s conftest.err'
15837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15838   (eval $ac_try) 2>&5
15839   ac_status=$?
15840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15841   (exit $ac_status); }; } &&
15842          { ac_try='test -s conftest.$ac_objext'
15843   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15844   (eval $ac_try) 2>&5
15845   ac_status=$?
15846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15847   (exit $ac_status); }; }; then
15848   ac_cv_header_GL_glx_h=yes
15849 else
15850   echo "$as_me: failed program was:" >&5
15851 sed 's/^/| /' conftest.$ac_ext >&5
15852
15853 ac_cv_header_GL_glx_h=no
15854 fi
15855 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15856 fi
15857 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
15858 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
15859 if test $ac_cv_header_GL_glx_h = yes; then
15860   have_gl=yes
15861 else
15862   have_gl=no
15863 fi
15864
15865
15866   CPPFLAGS="$ac_save_CPPFLAGS"
15867   fi
15868
15869   # If we have the headers, try and figure out which vendor it's from.
15870   #
15871   if test "$have_gl" = yes ; then
15872
15873     # We need to know whether it's MesaGL so that we know which libraries
15874     # to link against.
15875     #
15876     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
15877 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
15878 if test "${ac_cv_have_mesa_gl+set}" = set; then
15879   echo $ECHO_N "(cached) $ECHO_C" >&6
15880 else
15881   ac_cv_have_mesa_gl=no
15882
15883   ac_save_CPPFLAGS="$CPPFLAGS"
15884   if test \! -z "$includedir" ; then
15885     CPPFLAGS="$CPPFLAGS -I$includedir"
15886   fi
15887   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15888   cat >conftest.$ac_ext <<_ACEOF
15889 /* confdefs.h.  */
15890 _ACEOF
15891 cat confdefs.h >>conftest.$ac_ext
15892 cat >>conftest.$ac_ext <<_ACEOF
15893 /* end confdefs.h.  */
15894 #include <GL/glx.h>
15895
15896 _ACEOF
15897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15898   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
15899   ac_cv_have_mesa_gl=yes
15900 fi
15901 rm -f conftest*
15902
15903   CPPFLAGS="$ac_save_CPPFLAGS"
15904
15905 fi
15906 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
15907 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
15908     ac_have_mesa_gl=$ac_cv_have_mesa_gl
15909
15910
15911     gl_lib_1=""
15912     GL_LIBS=""
15913
15914
15915     # Some versions of MesaGL are compiled to require -lpthread.
15916     # So if the Mesa headers exist, and -lpthread exists, then always
15917     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
15918     #
15919     if test "$ac_have_mesa_gl" = yes; then
15920       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15921 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
15922 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
15923   echo $ECHO_N "(cached) $ECHO_C" >&6
15924 else
15925   ac_check_lib_save_LIBS=$LIBS
15926 LIBS="-lpthread  $LIBS"
15927 cat >conftest.$ac_ext <<_ACEOF
15928 /* confdefs.h.  */
15929 _ACEOF
15930 cat confdefs.h >>conftest.$ac_ext
15931 cat >>conftest.$ac_ext <<_ACEOF
15932 /* end confdefs.h.  */
15933
15934 /* Override any gcc2 internal prototype to avoid an error.  */
15935 #ifdef __cplusplus
15936 extern "C"
15937 #endif
15938 /* We use char because int might match the return type of a gcc2
15939    builtin and then its argument prototype would still apply.  */
15940 char pthread_create ();
15941 int
15942 main ()
15943 {
15944 pthread_create ();
15945   ;
15946   return 0;
15947 }
15948 _ACEOF
15949 rm -f conftest.$ac_objext conftest$ac_exeext
15950 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15951   (eval $ac_link) 2>conftest.er1
15952   ac_status=$?
15953   grep -v '^ *+' conftest.er1 >conftest.err
15954   rm -f conftest.er1
15955   cat conftest.err >&5
15956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15957   (exit $ac_status); } &&
15958          { ac_try='test -z "$ac_c_werror_flag"
15959                          || test ! -s conftest.err'
15960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15961   (eval $ac_try) 2>&5
15962   ac_status=$?
15963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15964   (exit $ac_status); }; } &&
15965          { ac_try='test -s conftest$ac_exeext'
15966   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15967   (eval $ac_try) 2>&5
15968   ac_status=$?
15969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15970   (exit $ac_status); }; }; then
15971   ac_cv_lib_pthread_pthread_create=yes
15972 else
15973   echo "$as_me: failed program was:" >&5
15974 sed 's/^/| /' conftest.$ac_ext >&5
15975
15976 ac_cv_lib_pthread_pthread_create=no
15977 fi
15978 rm -f conftest.err conftest.$ac_objext \
15979       conftest$ac_exeext conftest.$ac_ext
15980 LIBS=$ac_check_lib_save_LIBS
15981 fi
15982 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
15983 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
15984 if test $ac_cv_lib_pthread_pthread_create = yes; then
15985   GL_LIBS="-lpthread"
15986 fi
15987
15988     fi
15989
15990
15991     # If we have Mesa headers, check to see if we can link against -lMesaGL.
15992     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
15993     # Else, warn that GL is busted.  (We have the headers, but no libs.)
15994     #
15995
15996     if test "$ac_have_mesa_gl" = yes ; then
15997
15998   ac_save_CPPFLAGS="$CPPFLAGS"
15999   ac_save_LDFLAGS="$LDFLAGS"
16000 #  ac_save_LIBS="$LIBS"
16001
16002   if test \! -z "$includedir" ; then
16003     CPPFLAGS="$CPPFLAGS -I$includedir"
16004   fi
16005   # note: $X_CFLAGS includes $x_includes
16006   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16007
16008   if test \! -z "$libdir" ; then
16009     LDFLAGS="$LDFLAGS -L$libdir"
16010   fi
16011   # note: $X_LIBS includes $x_libraries
16012   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16013
16014   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
16015 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
16016 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
16017   echo $ECHO_N "(cached) $ECHO_C" >&6
16018 else
16019   ac_check_lib_save_LIBS=$LIBS
16020 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16021 cat >conftest.$ac_ext <<_ACEOF
16022 /* confdefs.h.  */
16023 _ACEOF
16024 cat confdefs.h >>conftest.$ac_ext
16025 cat >>conftest.$ac_ext <<_ACEOF
16026 /* end confdefs.h.  */
16027
16028 /* Override any gcc2 internal prototype to avoid an error.  */
16029 #ifdef __cplusplus
16030 extern "C"
16031 #endif
16032 /* We use char because int might match the return type of a gcc2
16033    builtin and then its argument prototype would still apply.  */
16034 char glXCreateContext ();
16035 int
16036 main ()
16037 {
16038 glXCreateContext ();
16039   ;
16040   return 0;
16041 }
16042 _ACEOF
16043 rm -f conftest.$ac_objext conftest$ac_exeext
16044 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16045   (eval $ac_link) 2>conftest.er1
16046   ac_status=$?
16047   grep -v '^ *+' conftest.er1 >conftest.err
16048   rm -f conftest.er1
16049   cat conftest.err >&5
16050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16051   (exit $ac_status); } &&
16052          { ac_try='test -z "$ac_c_werror_flag"
16053                          || test ! -s conftest.err'
16054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16055   (eval $ac_try) 2>&5
16056   ac_status=$?
16057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16058   (exit $ac_status); }; } &&
16059          { ac_try='test -s conftest$ac_exeext'
16060   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16061   (eval $ac_try) 2>&5
16062   ac_status=$?
16063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16064   (exit $ac_status); }; }; then
16065   ac_cv_lib_MesaGL_glXCreateContext=yes
16066 else
16067   echo "$as_me: failed program was:" >&5
16068 sed 's/^/| /' conftest.$ac_ext >&5
16069
16070 ac_cv_lib_MesaGL_glXCreateContext=no
16071 fi
16072 rm -f conftest.err conftest.$ac_objext \
16073       conftest$ac_exeext conftest.$ac_ext
16074 LIBS=$ac_check_lib_save_LIBS
16075 fi
16076 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
16077 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
16078 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
16079   gl_lib_1="MesaGL"
16080                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
16081 fi
16082
16083   CPPFLAGS="$ac_save_CPPFLAGS"
16084   LDFLAGS="$ac_save_LDFLAGS"
16085 #  LIBS="$ac_save_LIBS"
16086
16087     fi
16088
16089     if test "$gl_lib_1" = "" ; then
16090
16091   ac_save_CPPFLAGS="$CPPFLAGS"
16092   ac_save_LDFLAGS="$LDFLAGS"
16093 #  ac_save_LIBS="$LIBS"
16094
16095   if test \! -z "$includedir" ; then
16096     CPPFLAGS="$CPPFLAGS -I$includedir"
16097   fi
16098   # note: $X_CFLAGS includes $x_includes
16099   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16100
16101   if test \! -z "$libdir" ; then
16102     LDFLAGS="$LDFLAGS -L$libdir"
16103   fi
16104   # note: $X_LIBS includes $x_libraries
16105   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16106
16107   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
16108 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
16109 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
16110   echo $ECHO_N "(cached) $ECHO_C" >&6
16111 else
16112   ac_check_lib_save_LIBS=$LIBS
16113 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16114 cat >conftest.$ac_ext <<_ACEOF
16115 /* confdefs.h.  */
16116 _ACEOF
16117 cat confdefs.h >>conftest.$ac_ext
16118 cat >>conftest.$ac_ext <<_ACEOF
16119 /* end confdefs.h.  */
16120
16121 /* Override any gcc2 internal prototype to avoid an error.  */
16122 #ifdef __cplusplus
16123 extern "C"
16124 #endif
16125 /* We use char because int might match the return type of a gcc2
16126    builtin and then its argument prototype would still apply.  */
16127 char glXCreateContext ();
16128 int
16129 main ()
16130 {
16131 glXCreateContext ();
16132   ;
16133   return 0;
16134 }
16135 _ACEOF
16136 rm -f conftest.$ac_objext conftest$ac_exeext
16137 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16138   (eval $ac_link) 2>conftest.er1
16139   ac_status=$?
16140   grep -v '^ *+' conftest.er1 >conftest.err
16141   rm -f conftest.er1
16142   cat conftest.err >&5
16143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16144   (exit $ac_status); } &&
16145          { ac_try='test -z "$ac_c_werror_flag"
16146                          || test ! -s conftest.err'
16147   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16148   (eval $ac_try) 2>&5
16149   ac_status=$?
16150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16151   (exit $ac_status); }; } &&
16152          { ac_try='test -s conftest$ac_exeext'
16153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16154   (eval $ac_try) 2>&5
16155   ac_status=$?
16156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16157   (exit $ac_status); }; }; then
16158   ac_cv_lib_GL_glXCreateContext=yes
16159 else
16160   echo "$as_me: failed program was:" >&5
16161 sed 's/^/| /' conftest.$ac_ext >&5
16162
16163 ac_cv_lib_GL_glXCreateContext=no
16164 fi
16165 rm -f conftest.err conftest.$ac_objext \
16166       conftest$ac_exeext conftest.$ac_ext
16167 LIBS=$ac_check_lib_save_LIBS
16168 fi
16169 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
16170 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
16171 if test $ac_cv_lib_GL_glXCreateContext = yes; then
16172   gl_lib_1="GL"
16173                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
16174 fi
16175
16176   CPPFLAGS="$ac_save_CPPFLAGS"
16177   LDFLAGS="$ac_save_LDFLAGS"
16178 #  LIBS="$ac_save_LIBS"
16179
16180     fi
16181
16182     if test "$gl_lib_1" = "" ; then
16183       # we have headers, but no libs -- bail.
16184       have_gl=no
16185       ac_have_mesa_gl=no
16186       gl_halfassed=yes
16187     else
16188       # linking works -- we can build the GL hacks.
16189       cat >>confdefs.h <<\_ACEOF
16190 #define HAVE_GL 1
16191 _ACEOF
16192
16193       if test "$ac_have_mesa_gl" = yes ; then
16194         cat >>confdefs.h <<\_ACEOF
16195 #define HAVE_MESA_GL 1
16196 _ACEOF
16197
16198       fi
16199     fi
16200   fi
16201
16202
16203   # Now that we know we have GL headers and libs, do some more GL testing.
16204   #
16205
16206   if test "$have_gl" = yes ; then
16207     # If it's MesaGL, we'd like to issue a warning if the version number
16208     # is less than or equal to 2.6, because that version had a security bug.
16209     #
16210     if test "$ac_have_mesa_gl" = yes; then
16211
16212       echo "$as_me:$LINENO: checking MesaGL version number" >&5
16213 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
16214 if test "${ac_cv_mesagl_version_string+set}" = set; then
16215   echo $ECHO_N "(cached) $ECHO_C" >&6
16216 else
16217   cat > conftest.$ac_ext <<EOF
16218 #line 16224 "configure"
16219 #include "confdefs.h"
16220 #include <GL/gl.h>
16221 #ifndef MESA_MAJOR_VERSION
16222 # include <GL/xmesa.h>
16223 # ifdef XMESA_MAJOR_VERSION
16224    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
16225       we have to check the XMesa version number (the number of the X protocol
16226       support, which seems to be the same as the Mesa version number.)
16227     */
16228 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
16229 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
16230 # else
16231    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
16232       so we have no way of telling what version of Mesa this is at all.
16233       So, we'll guess that the osmesa version (the "offscreen protocol")
16234       is less than or equal to the real mesa version number.  Except that
16235       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
16236       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
16237     */
16238 # include <GL/osmesa.h>
16239 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
16240 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
16241 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
16242 #   undef MESA_MINOR_VERSION
16243 #   define MESA_MINOR_VERSION 4 or newer, probably?
16244 #  endif
16245 # endif
16246 #endif
16247 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
16248 EOF
16249
16250          ac_save_CPPFLAGS="$CPPFLAGS"
16251          if test \! -z "$includedir" ; then
16252            CPPFLAGS="$CPPFLAGS -I$includedir"
16253          fi
16254          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16255
16256          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
16257
16258          # M4 sucks!!
16259
16260           mglv=`echo "$mglv" | sed -n \
16261              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
16262
16263
16264          rm -f conftest.$ac_ext
16265
16266          CPPFLAGS="$ac_save_CPPFLAGS"
16267
16268          if test "$mglv" = ""; then
16269            ac_mesagl_version=unknown
16270            ac_mesagl_version_string=unknown
16271          else
16272            ac_mesagl_version_string="$mglv"
16273            # M4 sucks!!
16274
16275            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
16276            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
16277
16278            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
16279            if test -z "$ac_mesagl_version"; then
16280              ac_mesagl_version=unknown
16281              ac_mesagl_version_string=unknown
16282            fi
16283          fi
16284          ac_cv_mesagl_version=$ac_mesagl_version
16285          ac_cv_mesagl_version_string=$ac_mesagl_version_string
16286
16287 fi
16288 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
16289 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
16290       ac_mesagl_version=$ac_cv_mesagl_version
16291       ac_mesagl_version_string=$ac_cv_mesagl_version_string
16292     fi
16293
16294
16295     # Check for OpenGL 1.1 features.
16296     #
16297
16298   ac_save_CPPFLAGS="$CPPFLAGS"
16299   ac_save_LDFLAGS="$LDFLAGS"
16300 #  ac_save_LIBS="$LIBS"
16301
16302   if test \! -z "$includedir" ; then
16303     CPPFLAGS="$CPPFLAGS -I$includedir"
16304   fi
16305   # note: $X_CFLAGS includes $x_includes
16306   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16307
16308   if test \! -z "$libdir" ; then
16309     LDFLAGS="$LDFLAGS -L$libdir"
16310   fi
16311   # note: $X_LIBS includes $x_libraries
16312   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16313
16314   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
16315 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
16316 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
16317 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16318   echo $ECHO_N "(cached) $ECHO_C" >&6
16319 else
16320   ac_check_lib_save_LIBS=$LIBS
16321 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
16322 cat >conftest.$ac_ext <<_ACEOF
16323 /* confdefs.h.  */
16324 _ACEOF
16325 cat confdefs.h >>conftest.$ac_ext
16326 cat >>conftest.$ac_ext <<_ACEOF
16327 /* end confdefs.h.  */
16328
16329 /* Override any gcc2 internal prototype to avoid an error.  */
16330 #ifdef __cplusplus
16331 extern "C"
16332 #endif
16333 /* We use char because int might match the return type of a gcc2
16334    builtin and then its argument prototype would still apply.  */
16335 char glBindTexture ();
16336 int
16337 main ()
16338 {
16339 glBindTexture ();
16340   ;
16341   return 0;
16342 }
16343 _ACEOF
16344 rm -f conftest.$ac_objext conftest$ac_exeext
16345 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16346   (eval $ac_link) 2>conftest.er1
16347   ac_status=$?
16348   grep -v '^ *+' conftest.er1 >conftest.err
16349   rm -f conftest.er1
16350   cat conftest.err >&5
16351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16352   (exit $ac_status); } &&
16353          { ac_try='test -z "$ac_c_werror_flag"
16354                          || test ! -s conftest.err'
16355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16356   (eval $ac_try) 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   eval "$as_ac_Lib=yes"
16367 else
16368   echo "$as_me: failed program was:" >&5
16369 sed 's/^/| /' conftest.$ac_ext >&5
16370
16371 eval "$as_ac_Lib=no"
16372 fi
16373 rm -f conftest.err conftest.$ac_objext \
16374       conftest$ac_exeext conftest.$ac_ext
16375 LIBS=$ac_check_lib_save_LIBS
16376 fi
16377 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16378 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16379 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16380   cat >>confdefs.h <<\_ACEOF
16381 #define HAVE_GLBINDTEXTURE 1
16382 _ACEOF
16383
16384 else
16385   true
16386 fi
16387
16388   CPPFLAGS="$ac_save_CPPFLAGS"
16389   LDFLAGS="$ac_save_LDFLAGS"
16390 #  LIBS="$ac_save_LIBS"
16391
16392   fi
16393
16394 elif test "$with_gl" != no; then
16395   echo "error: must be yes or no: --with-gl=$with_gl"
16396   exit 1
16397 fi
16398
16399
16400 ###############################################################################
16401 #
16402 #       Check for -lgle.
16403 #
16404 ###############################################################################
16405
16406 have_gle=no
16407 with_gle_req=unspecified
16408 gle_halfassed=no
16409
16410 # Check whether --with-gle or --without-gle was given.
16411 if test "${with_gle+set}" = set; then
16412   withval="$with_gle"
16413   with_gle="$withval"; with_gle_req="$withval"
16414 else
16415   with_gle=yes
16416 fi;
16417
16418
16419    case "$with_gle" in
16420     yes) ;;
16421     no)  ;;
16422
16423     /*)
16424      echo "$as_me:$LINENO: checking for GLE headers" >&5
16425 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
16426      d=$with_gle/include
16427      if test -d $d; then
16428        X_CFLAGS="-I$d $X_CFLAGS"
16429        echo "$as_me:$LINENO: result: $d" >&5
16430 echo "${ECHO_T}$d" >&6
16431      else
16432        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16433 echo "${ECHO_T}not found ($d: no such directory)" >&6
16434      fi
16435
16436      echo "$as_me:$LINENO: checking for GLE libs" >&5
16437 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
16438      d=$with_gle/lib
16439      if test -d $d; then
16440        X_LIBS="-L$d $X_LIBS"
16441        echo "$as_me:$LINENO: result: $d" >&5
16442 echo "${ECHO_T}$d" >&6
16443      else
16444        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16445 echo "${ECHO_T}not found ($d: no such directory)" >&6
16446      fi
16447
16448      # replace the directory string with "yes".
16449      with_gle_req="yes"
16450      with_gle=$with_gle_req
16451      ;;
16452
16453     *)
16454      echo ""
16455      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
16456      echo "       If it is a directory, then \`DIR/include' will be added to"
16457      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16458      exit 1
16459      ;;
16460    esac
16461
16462
16463 GLE_LIBS=""
16464
16465 if test "$have_gl" = no ; then
16466  true
16467 elif test "$with_gle" = yes; then
16468
16469
16470   ac_save_CPPFLAGS="$CPPFLAGS"
16471   if test \! -z "$includedir" ; then
16472     CPPFLAGS="$CPPFLAGS -I$includedir"
16473   fi
16474   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16475   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
16476 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
16477 if test "${ac_cv_header_GL_gle_h+set}" = set; then
16478   echo $ECHO_N "(cached) $ECHO_C" >&6
16479 else
16480   cat >conftest.$ac_ext <<_ACEOF
16481 /* confdefs.h.  */
16482 _ACEOF
16483 cat confdefs.h >>conftest.$ac_ext
16484 cat >>conftest.$ac_ext <<_ACEOF
16485 /* end confdefs.h.  */
16486 #include <GL/gl.h>
16487
16488 #include <GL/gle.h>
16489 _ACEOF
16490 rm -f conftest.$ac_objext
16491 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16492   (eval $ac_compile) 2>conftest.er1
16493   ac_status=$?
16494   grep -v '^ *+' conftest.er1 >conftest.err
16495   rm -f conftest.er1
16496   cat conftest.err >&5
16497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16498   (exit $ac_status); } &&
16499          { ac_try='test -z "$ac_c_werror_flag"
16500                          || test ! -s conftest.err'
16501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16502   (eval $ac_try) 2>&5
16503   ac_status=$?
16504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16505   (exit $ac_status); }; } &&
16506          { ac_try='test -s conftest.$ac_objext'
16507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16508   (eval $ac_try) 2>&5
16509   ac_status=$?
16510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16511   (exit $ac_status); }; }; then
16512   ac_cv_header_GL_gle_h=yes
16513 else
16514   echo "$as_me: failed program was:" >&5
16515 sed 's/^/| /' conftest.$ac_ext >&5
16516
16517 ac_cv_header_GL_gle_h=no
16518 fi
16519 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16520 fi
16521 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
16522 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
16523 if test $ac_cv_header_GL_gle_h = yes; then
16524   have_gle3=yes
16525 else
16526   have_gle3=no
16527 fi
16528
16529
16530   CPPFLAGS="$ac_save_CPPFLAGS"
16531   if test "$have_gle3" = yes ; then
16532     have_gle=yes;
16533   else
16534
16535   ac_save_CPPFLAGS="$CPPFLAGS"
16536   if test \! -z "$includedir" ; then
16537     CPPFLAGS="$CPPFLAGS -I$includedir"
16538   fi
16539   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16540   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
16541 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
16542 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
16543   echo $ECHO_N "(cached) $ECHO_C" >&6
16544 else
16545   cat >conftest.$ac_ext <<_ACEOF
16546 /* confdefs.h.  */
16547 _ACEOF
16548 cat confdefs.h >>conftest.$ac_ext
16549 cat >>conftest.$ac_ext <<_ACEOF
16550 /* end confdefs.h.  */
16551 #include <GL/gl.h>
16552
16553 #include <GL/gutil.h>
16554 _ACEOF
16555 rm -f conftest.$ac_objext
16556 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16557   (eval $ac_compile) 2>conftest.er1
16558   ac_status=$?
16559   grep -v '^ *+' conftest.er1 >conftest.err
16560   rm -f conftest.er1
16561   cat conftest.err >&5
16562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16563   (exit $ac_status); } &&
16564          { ac_try='test -z "$ac_c_werror_flag"
16565                          || test ! -s conftest.err'
16566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16567   (eval $ac_try) 2>&5
16568   ac_status=$?
16569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16570   (exit $ac_status); }; } &&
16571          { ac_try='test -s conftest.$ac_objext'
16572   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16573   (eval $ac_try) 2>&5
16574   ac_status=$?
16575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16576   (exit $ac_status); }; }; then
16577   ac_cv_header_GL_gutil_h=yes
16578 else
16579   echo "$as_me: failed program was:" >&5
16580 sed 's/^/| /' conftest.$ac_ext >&5
16581
16582 ac_cv_header_GL_gutil_h=no
16583 fi
16584 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16585 fi
16586 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
16587 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
16588 if test $ac_cv_header_GL_gutil_h = yes; then
16589   have_gle=yes
16590 else
16591   have_gle=no
16592 fi
16593
16594
16595   CPPFLAGS="$ac_save_CPPFLAGS"
16596     if test "$have_gle" = yes ; then
16597
16598   ac_save_CPPFLAGS="$CPPFLAGS"
16599   if test \! -z "$includedir" ; then
16600     CPPFLAGS="$CPPFLAGS -I$includedir"
16601   fi
16602   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16603   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
16604 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
16605 if test "${ac_cv_header_GL_tube_h+set}" = set; then
16606   echo $ECHO_N "(cached) $ECHO_C" >&6
16607 else
16608   cat >conftest.$ac_ext <<_ACEOF
16609 /* confdefs.h.  */
16610 _ACEOF
16611 cat confdefs.h >>conftest.$ac_ext
16612 cat >>conftest.$ac_ext <<_ACEOF
16613 /* end confdefs.h.  */
16614 #include <GL/gl.h>
16615
16616 #include <GL/tube.h>
16617 _ACEOF
16618 rm -f conftest.$ac_objext
16619 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16620   (eval $ac_compile) 2>conftest.er1
16621   ac_status=$?
16622   grep -v '^ *+' conftest.er1 >conftest.err
16623   rm -f conftest.er1
16624   cat conftest.err >&5
16625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16626   (exit $ac_status); } &&
16627          { ac_try='test -z "$ac_c_werror_flag"
16628                          || test ! -s conftest.err'
16629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16630   (eval $ac_try) 2>&5
16631   ac_status=$?
16632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16633   (exit $ac_status); }; } &&
16634          { ac_try='test -s conftest.$ac_objext'
16635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16636   (eval $ac_try) 2>&5
16637   ac_status=$?
16638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16639   (exit $ac_status); }; }; then
16640   ac_cv_header_GL_tube_h=yes
16641 else
16642   echo "$as_me: failed program was:" >&5
16643 sed 's/^/| /' conftest.$ac_ext >&5
16644
16645 ac_cv_header_GL_tube_h=no
16646 fi
16647 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16648 fi
16649 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
16650 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
16651 if test $ac_cv_header_GL_tube_h = yes; then
16652   have_gle=yes
16653 else
16654   have_gle=no
16655 fi
16656
16657
16658   CPPFLAGS="$ac_save_CPPFLAGS"
16659     fi
16660   fi
16661
16662   if test "$have_gle" = yes ; then
16663     have_gle=no
16664     gle_halfassed=yes
16665
16666   ac_save_CPPFLAGS="$CPPFLAGS"
16667   ac_save_LDFLAGS="$LDFLAGS"
16668 #  ac_save_LIBS="$LIBS"
16669
16670   if test \! -z "$includedir" ; then
16671     CPPFLAGS="$CPPFLAGS -I$includedir"
16672   fi
16673   # note: $X_CFLAGS includes $x_includes
16674   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16675
16676   if test \! -z "$libdir" ; then
16677     LDFLAGS="$LDFLAGS -L$libdir"
16678   fi
16679   # note: $X_LIBS includes $x_libraries
16680   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16681
16682   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
16683 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
16684 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
16685   echo $ECHO_N "(cached) $ECHO_C" >&6
16686 else
16687   ac_check_lib_save_LIBS=$LIBS
16688 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16689 cat >conftest.$ac_ext <<_ACEOF
16690 /* confdefs.h.  */
16691 _ACEOF
16692 cat confdefs.h >>conftest.$ac_ext
16693 cat >>conftest.$ac_ext <<_ACEOF
16694 /* end confdefs.h.  */
16695
16696 /* Override any gcc2 internal prototype to avoid an error.  */
16697 #ifdef __cplusplus
16698 extern "C"
16699 #endif
16700 /* We use char because int might match the return type of a gcc2
16701    builtin and then its argument prototype would still apply.  */
16702 char gleCreateGC ();
16703 int
16704 main ()
16705 {
16706 gleCreateGC ();
16707   ;
16708   return 0;
16709 }
16710 _ACEOF
16711 rm -f conftest.$ac_objext conftest$ac_exeext
16712 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16713   (eval $ac_link) 2>conftest.er1
16714   ac_status=$?
16715   grep -v '^ *+' conftest.er1 >conftest.err
16716   rm -f conftest.er1
16717   cat conftest.err >&5
16718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16719   (exit $ac_status); } &&
16720          { ac_try='test -z "$ac_c_werror_flag"
16721                          || test ! -s conftest.err'
16722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16723   (eval $ac_try) 2>&5
16724   ac_status=$?
16725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16726   (exit $ac_status); }; } &&
16727          { ac_try='test -s conftest$ac_exeext'
16728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16729   (eval $ac_try) 2>&5
16730   ac_status=$?
16731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16732   (exit $ac_status); }; }; then
16733   ac_cv_lib_gle_gleCreateGC=yes
16734 else
16735   echo "$as_me: failed program was:" >&5
16736 sed 's/^/| /' conftest.$ac_ext >&5
16737
16738 ac_cv_lib_gle_gleCreateGC=no
16739 fi
16740 rm -f conftest.err conftest.$ac_objext \
16741       conftest$ac_exeext conftest.$ac_ext
16742 LIBS=$ac_check_lib_save_LIBS
16743 fi
16744 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
16745 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
16746 if test $ac_cv_lib_gle_gleCreateGC = yes; then
16747   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
16748 fi
16749
16750   CPPFLAGS="$ac_save_CPPFLAGS"
16751   LDFLAGS="$ac_save_LDFLAGS"
16752 #  LIBS="$ac_save_LIBS"
16753
16754   fi
16755   if test "$have_gle" = yes ; then
16756     have_gle=no
16757     gle_halfassed=yes
16758
16759     # sometimes the libmatrix stuff is included in libgle.  look there first.
16760 #
16761 # I don't get it.  For some reason, this test passes on SGI, as if
16762 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
16763 # Yet the link is succeeding.  Why???
16764 #
16765 #    AC_CHECK_X_LIB(gle, uview_direction_d,
16766 #                   [have_gle=yes; gle_halfassed=no],
16767 #                   [], $GL_LIBS -lX11 -lXext -lm)
16768
16769     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
16770     # *sigh*
16771     if test "$have_gle3" = yes ; then
16772
16773   ac_save_CPPFLAGS="$CPPFLAGS"
16774   ac_save_LDFLAGS="$LDFLAGS"
16775 #  ac_save_LIBS="$LIBS"
16776
16777   if test \! -z "$includedir" ; then
16778     CPPFLAGS="$CPPFLAGS -I$includedir"
16779   fi
16780   # note: $X_CFLAGS includes $x_includes
16781   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16782
16783   if test \! -z "$libdir" ; then
16784     LDFLAGS="$LDFLAGS -L$libdir"
16785   fi
16786   # note: $X_LIBS includes $x_libraries
16787   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16788
16789   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
16790 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
16791 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
16792   echo $ECHO_N "(cached) $ECHO_C" >&6
16793 else
16794   ac_check_lib_save_LIBS=$LIBS
16795 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16796 cat >conftest.$ac_ext <<_ACEOF
16797 /* confdefs.h.  */
16798 _ACEOF
16799 cat confdefs.h >>conftest.$ac_ext
16800 cat >>conftest.$ac_ext <<_ACEOF
16801 /* end confdefs.h.  */
16802
16803 /* Override any gcc2 internal prototype to avoid an error.  */
16804 #ifdef __cplusplus
16805 extern "C"
16806 #endif
16807 /* We use char because int might match the return type of a gcc2
16808    builtin and then its argument prototype would still apply.  */
16809 char uview_direction ();
16810 int
16811 main ()
16812 {
16813 uview_direction ();
16814   ;
16815   return 0;
16816 }
16817 _ACEOF
16818 rm -f conftest.$ac_objext conftest$ac_exeext
16819 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16820   (eval $ac_link) 2>conftest.er1
16821   ac_status=$?
16822   grep -v '^ *+' conftest.er1 >conftest.err
16823   rm -f conftest.er1
16824   cat conftest.err >&5
16825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16826   (exit $ac_status); } &&
16827          { ac_try='test -z "$ac_c_werror_flag"
16828                          || test ! -s conftest.err'
16829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16830   (eval $ac_try) 2>&5
16831   ac_status=$?
16832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16833   (exit $ac_status); }; } &&
16834          { ac_try='test -s conftest$ac_exeext'
16835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16836   (eval $ac_try) 2>&5
16837   ac_status=$?
16838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16839   (exit $ac_status); }; }; then
16840   ac_cv_lib_gle_uview_direction=yes
16841 else
16842   echo "$as_me: failed program was:" >&5
16843 sed 's/^/| /' conftest.$ac_ext >&5
16844
16845 ac_cv_lib_gle_uview_direction=no
16846 fi
16847 rm -f conftest.err conftest.$ac_objext \
16848       conftest$ac_exeext conftest.$ac_ext
16849 LIBS=$ac_check_lib_save_LIBS
16850 fi
16851 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
16852 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
16853 if test $ac_cv_lib_gle_uview_direction = yes; then
16854   have_gle=yes; gle_halfassed=no
16855 fi
16856
16857   CPPFLAGS="$ac_save_CPPFLAGS"
16858   LDFLAGS="$ac_save_LDFLAGS"
16859 #  LIBS="$ac_save_LIBS"
16860
16861     fi
16862     # if it wasn't in libgle, then look in libmatrix.
16863     if test "$have_gle" = no ; then
16864
16865   ac_save_CPPFLAGS="$CPPFLAGS"
16866   ac_save_LDFLAGS="$LDFLAGS"
16867 #  ac_save_LIBS="$LIBS"
16868
16869   if test \! -z "$includedir" ; then
16870     CPPFLAGS="$CPPFLAGS -I$includedir"
16871   fi
16872   # note: $X_CFLAGS includes $x_includes
16873   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16874
16875   if test \! -z "$libdir" ; then
16876     LDFLAGS="$LDFLAGS -L$libdir"
16877   fi
16878   # note: $X_LIBS includes $x_libraries
16879   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16880
16881   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
16882 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
16883 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
16884   echo $ECHO_N "(cached) $ECHO_C" >&6
16885 else
16886   ac_check_lib_save_LIBS=$LIBS
16887 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
16888 cat >conftest.$ac_ext <<_ACEOF
16889 /* confdefs.h.  */
16890 _ACEOF
16891 cat confdefs.h >>conftest.$ac_ext
16892 cat >>conftest.$ac_ext <<_ACEOF
16893 /* end confdefs.h.  */
16894
16895 /* Override any gcc2 internal prototype to avoid an error.  */
16896 #ifdef __cplusplus
16897 extern "C"
16898 #endif
16899 /* We use char because int might match the return type of a gcc2
16900    builtin and then its argument prototype would still apply.  */
16901 char uview_direction_d ();
16902 int
16903 main ()
16904 {
16905 uview_direction_d ();
16906   ;
16907   return 0;
16908 }
16909 _ACEOF
16910 rm -f conftest.$ac_objext conftest$ac_exeext
16911 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16912   (eval $ac_link) 2>conftest.er1
16913   ac_status=$?
16914   grep -v '^ *+' conftest.er1 >conftest.err
16915   rm -f conftest.er1
16916   cat conftest.err >&5
16917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16918   (exit $ac_status); } &&
16919          { ac_try='test -z "$ac_c_werror_flag"
16920                          || test ! -s conftest.err'
16921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16922   (eval $ac_try) 2>&5
16923   ac_status=$?
16924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16925   (exit $ac_status); }; } &&
16926          { ac_try='test -s conftest$ac_exeext'
16927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16928   (eval $ac_try) 2>&5
16929   ac_status=$?
16930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16931   (exit $ac_status); }; }; then
16932   ac_cv_lib_matrix_uview_direction_d=yes
16933 else
16934   echo "$as_me: failed program was:" >&5
16935 sed 's/^/| /' conftest.$ac_ext >&5
16936
16937 ac_cv_lib_matrix_uview_direction_d=no
16938 fi
16939 rm -f conftest.err conftest.$ac_objext \
16940       conftest$ac_exeext conftest.$ac_ext
16941 LIBS=$ac_check_lib_save_LIBS
16942 fi
16943 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
16944 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
16945 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
16946   have_gle=yes; gle_halfassed=no;
16947                       GLE_LIBS="$GLE_LIBS -lmatrix"
16948 fi
16949
16950   CPPFLAGS="$ac_save_CPPFLAGS"
16951   LDFLAGS="$ac_save_LDFLAGS"
16952 #  LIBS="$ac_save_LIBS"
16953
16954     fi
16955   fi
16956
16957   if test "$have_gle" = yes ; then
16958     cat >>confdefs.h <<\_ACEOF
16959 #define HAVE_GLE 1
16960 _ACEOF
16961
16962     if test "$have_gle3" = yes ; then
16963       cat >>confdefs.h <<\_ACEOF
16964 #define HAVE_GLE3 1
16965 _ACEOF
16966
16967     fi
16968   fi
16969
16970 elif test "$with_gle" != no; then
16971   echo "error: must be yes or no: --with-gle=$with_gle"
16972   exit 1
16973
16974 fi
16975
16976
16977 ###############################################################################
16978 #
16979 #       Check for -lgdk_pixbuf.
16980 #       These tests are for gdk_pixbuf usage of the hacks,
16981 #       not xscreensaver-demo (thus we have to test again to get
16982 #       the libraries right: don't want to pull in all of GTK
16983 #       for the hacks.)
16984 #
16985 ###############################################################################
16986
16987 have_gdk_pixbuf=no
16988 with_gdk_pixbuf_req=unspecified
16989
16990 # Check whether --with-pixbuf or --without-pixbuf was given.
16991 if test "${with_pixbuf+set}" = set; then
16992   withval="$with_pixbuf"
16993   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
16994 else
16995   with_gdk_pixbuf=yes
16996 fi;
16997
16998 # if --with-pixbuf=/directory/ was specified, remember that directory so that
16999 # we can also look for the `gdk-pixbuf-config' program in that directory.
17000 case "$with_gdk_pixbuf" in
17001   /*)
17002     gdk_pixbuf_dir="$with_gdk_pixbuf"
17003     ;;
17004   *)
17005     gdk_pixbuf_dir=""
17006     ;;
17007 esac
17008
17009
17010    case "$with_gdk_pixbuf" in
17011     yes) ;;
17012     no)  ;;
17013
17014     /*)
17015      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
17016 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
17017      d=$with_gdk_pixbuf/include
17018      if test -d $d; then
17019        X_CFLAGS="-I$d $X_CFLAGS"
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      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
17028 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
17029      d=$with_gdk_pixbuf/lib
17030      if test -d $d; then
17031        X_LIBS="-L$d $X_LIBS"
17032        echo "$as_me:$LINENO: result: $d" >&5
17033 echo "${ECHO_T}$d" >&6
17034      else
17035        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17036 echo "${ECHO_T}not found ($d: no such directory)" >&6
17037      fi
17038
17039      # replace the directory string with "yes".
17040      with_gdk_pixbuf_req="yes"
17041      with_gdk_pixbuf=$with_gdk_pixbuf_req
17042      ;;
17043
17044     *)
17045      echo ""
17046      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
17047      echo "       If it is a directory, then \`DIR/include' will be added to"
17048      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17049      exit 1
17050      ;;
17051    esac
17052
17053
17054 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
17055   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
17056   exit 1
17057 fi
17058
17059 if test "$with_gdk_pixbuf" = yes; then
17060   have_gdk_pixbuf=no
17061
17062   pkgs=''
17063   ok="yes"
17064
17065   pkg_check_version gdk-pixbuf-2.0      2.0.0
17066   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
17067   have_gdk_pixbuf="$ok"
17068
17069   if test "$have_gdk_pixbuf" = yes; then
17070     echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
17071 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
17072 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
17073   echo $ECHO_N "(cached) $ECHO_C" >&6
17074 else
17075   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
17076 fi
17077 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
17078 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
17079     echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
17080 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
17081 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
17082   echo $ECHO_N "(cached) $ECHO_C" >&6
17083 else
17084   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
17085 fi
17086 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
17087 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
17088   fi
17089   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
17090   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
17091
17092
17093   if test "$have_gdk_pixbuf" = yes; then
17094     #
17095     # we appear to have pixbuf; check for headers/libs to be sure.
17096     #
17097     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
17098     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
17099
17100     have_gdk_pixbuf=no
17101
17102     # check for header A...
17103
17104   ac_save_CPPFLAGS="$CPPFLAGS"
17105   if test \! -z "$includedir" ; then
17106     CPPFLAGS="$CPPFLAGS -I$includedir"
17107   fi
17108   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17109   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17110   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17111 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
17112 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17113   echo $ECHO_N "(cached) $ECHO_C" >&6
17114 fi
17115 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17116 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
17117 else
17118   # Is the header compilable?
17119 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
17120 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
17121 cat >conftest.$ac_ext <<_ACEOF
17122 /* confdefs.h.  */
17123 _ACEOF
17124 cat confdefs.h >>conftest.$ac_ext
17125 cat >>conftest.$ac_ext <<_ACEOF
17126 /* end confdefs.h.  */
17127 $ac_includes_default
17128 #include <gdk-pixbuf/gdk-pixbuf.h>
17129 _ACEOF
17130 rm -f conftest.$ac_objext
17131 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17132   (eval $ac_compile) 2>conftest.er1
17133   ac_status=$?
17134   grep -v '^ *+' conftest.er1 >conftest.err
17135   rm -f conftest.er1
17136   cat conftest.err >&5
17137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17138   (exit $ac_status); } &&
17139          { ac_try='test -z "$ac_c_werror_flag"
17140                          || test ! -s conftest.err'
17141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17142   (eval $ac_try) 2>&5
17143   ac_status=$?
17144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17145   (exit $ac_status); }; } &&
17146          { ac_try='test -s conftest.$ac_objext'
17147   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17148   (eval $ac_try) 2>&5
17149   ac_status=$?
17150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17151   (exit $ac_status); }; }; then
17152   ac_header_compiler=yes
17153 else
17154   echo "$as_me: failed program was:" >&5
17155 sed 's/^/| /' conftest.$ac_ext >&5
17156
17157 ac_header_compiler=no
17158 fi
17159 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17160 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17161 echo "${ECHO_T}$ac_header_compiler" >&6
17162
17163 # Is the header present?
17164 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
17165 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
17166 cat >conftest.$ac_ext <<_ACEOF
17167 /* confdefs.h.  */
17168 _ACEOF
17169 cat confdefs.h >>conftest.$ac_ext
17170 cat >>conftest.$ac_ext <<_ACEOF
17171 /* end confdefs.h.  */
17172 #include <gdk-pixbuf/gdk-pixbuf.h>
17173 _ACEOF
17174 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17175   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17176   ac_status=$?
17177   grep -v '^ *+' conftest.er1 >conftest.err
17178   rm -f conftest.er1
17179   cat conftest.err >&5
17180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17181   (exit $ac_status); } >/dev/null; then
17182   if test -s conftest.err; then
17183     ac_cpp_err=$ac_c_preproc_warn_flag
17184     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17185   else
17186     ac_cpp_err=
17187   fi
17188 else
17189   ac_cpp_err=yes
17190 fi
17191 if test -z "$ac_cpp_err"; then
17192   ac_header_preproc=yes
17193 else
17194   echo "$as_me: failed program was:" >&5
17195 sed 's/^/| /' conftest.$ac_ext >&5
17196
17197   ac_header_preproc=no
17198 fi
17199 rm -f conftest.err conftest.$ac_ext
17200 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17201 echo "${ECHO_T}$ac_header_preproc" >&6
17202
17203 # So?  What about this header?
17204 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17205   yes:no: )
17206     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
17207 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17208     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
17209 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
17210     ac_header_preproc=yes
17211     ;;
17212   no:yes:* )
17213     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
17214 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
17215     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
17216 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
17217     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
17218 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
17219     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
17220 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17221     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
17222 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
17223     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
17224 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
17225     (
17226       cat <<\_ASBOX
17227 ## ------------------------------------------ ##
17228 ## Report this to the AC_PACKAGE_NAME lists.  ##
17229 ## ------------------------------------------ ##
17230 _ASBOX
17231     ) |
17232       sed "s/^/$as_me: WARNING:     /" >&2
17233     ;;
17234 esac
17235 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17236 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
17237 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17238   echo $ECHO_N "(cached) $ECHO_C" >&6
17239 else
17240   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
17241 fi
17242 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17243 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
17244
17245 fi
17246 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
17247   have_gdk_pixbuf=yes
17248 fi
17249
17250
17251   CPPFLAGS="$ac_save_CPPFLAGS"
17252
17253     # if that worked, check for header B...
17254     if test "$have_gdk_pixbuf" = yes; then
17255       have_gdk_pixbuf=no
17256       gdk_pixbuf_halfassed=yes
17257
17258   ac_save_CPPFLAGS="$CPPFLAGS"
17259   if test \! -z "$includedir" ; then
17260     CPPFLAGS="$CPPFLAGS -I$includedir"
17261   fi
17262   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17263   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17264   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17265 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17266 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17267   echo $ECHO_N "(cached) $ECHO_C" >&6
17268 fi
17269 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17270 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
17271 else
17272   # Is the header compilable?
17273 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
17274 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
17275 cat >conftest.$ac_ext <<_ACEOF
17276 /* confdefs.h.  */
17277 _ACEOF
17278 cat confdefs.h >>conftest.$ac_ext
17279 cat >>conftest.$ac_ext <<_ACEOF
17280 /* end confdefs.h.  */
17281 $ac_includes_default
17282 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17283 _ACEOF
17284 rm -f conftest.$ac_objext
17285 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17286   (eval $ac_compile) 2>conftest.er1
17287   ac_status=$?
17288   grep -v '^ *+' conftest.er1 >conftest.err
17289   rm -f conftest.er1
17290   cat conftest.err >&5
17291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17292   (exit $ac_status); } &&
17293          { ac_try='test -z "$ac_c_werror_flag"
17294                          || test ! -s conftest.err'
17295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17296   (eval $ac_try) 2>&5
17297   ac_status=$?
17298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17299   (exit $ac_status); }; } &&
17300          { ac_try='test -s conftest.$ac_objext'
17301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17302   (eval $ac_try) 2>&5
17303   ac_status=$?
17304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17305   (exit $ac_status); }; }; then
17306   ac_header_compiler=yes
17307 else
17308   echo "$as_me: failed program was:" >&5
17309 sed 's/^/| /' conftest.$ac_ext >&5
17310
17311 ac_header_compiler=no
17312 fi
17313 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17314 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17315 echo "${ECHO_T}$ac_header_compiler" >&6
17316
17317 # Is the header present?
17318 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
17319 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
17320 cat >conftest.$ac_ext <<_ACEOF
17321 /* confdefs.h.  */
17322 _ACEOF
17323 cat confdefs.h >>conftest.$ac_ext
17324 cat >>conftest.$ac_ext <<_ACEOF
17325 /* end confdefs.h.  */
17326 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17327 _ACEOF
17328 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17329   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17330   ac_status=$?
17331   grep -v '^ *+' conftest.er1 >conftest.err
17332   rm -f conftest.er1
17333   cat conftest.err >&5
17334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17335   (exit $ac_status); } >/dev/null; then
17336   if test -s conftest.err; then
17337     ac_cpp_err=$ac_c_preproc_warn_flag
17338     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17339   else
17340     ac_cpp_err=
17341   fi
17342 else
17343   ac_cpp_err=yes
17344 fi
17345 if test -z "$ac_cpp_err"; then
17346   ac_header_preproc=yes
17347 else
17348   echo "$as_me: failed program was:" >&5
17349 sed 's/^/| /' conftest.$ac_ext >&5
17350
17351   ac_header_preproc=no
17352 fi
17353 rm -f conftest.err conftest.$ac_ext
17354 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17355 echo "${ECHO_T}$ac_header_preproc" >&6
17356
17357 # So?  What about this header?
17358 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17359   yes:no: )
17360     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17361 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17362     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17363 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17364     ac_header_preproc=yes
17365     ;;
17366   no:yes:* )
17367     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17368 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17369     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17370 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17371     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17372 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17373     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17374 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17375     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17376 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17377     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17378 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17379     (
17380       cat <<\_ASBOX
17381 ## ------------------------------------------ ##
17382 ## Report this to the AC_PACKAGE_NAME lists.  ##
17383 ## ------------------------------------------ ##
17384 _ASBOX
17385     ) |
17386       sed "s/^/$as_me: WARNING:     /" >&2
17387     ;;
17388 esac
17389 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17390 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17391 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17392   echo $ECHO_N "(cached) $ECHO_C" >&6
17393 else
17394   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
17395 fi
17396 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17397 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
17398
17399 fi
17400 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
17401   have_gdk_pixbuf=yes
17402                          gdk_pixbuf_halfassed=no
17403 fi
17404
17405
17406   CPPFLAGS="$ac_save_CPPFLAGS"
17407
17408       # yay, it has a new name in Gtk 2.x...
17409       if test "$have_gdk_pixbuf" = no; then
17410         have_gdk_pixbuf=no
17411         gdk_pixbuf_halfassed=yes
17412
17413   ac_save_CPPFLAGS="$CPPFLAGS"
17414   if test \! -z "$includedir" ; then
17415     CPPFLAGS="$CPPFLAGS -I$includedir"
17416   fi
17417   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17418   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17419   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17420 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17421 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17422   echo $ECHO_N "(cached) $ECHO_C" >&6
17423 fi
17424 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17425 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
17426 else
17427   # Is the header compilable?
17428 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
17429 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
17430 cat >conftest.$ac_ext <<_ACEOF
17431 /* confdefs.h.  */
17432 _ACEOF
17433 cat confdefs.h >>conftest.$ac_ext
17434 cat >>conftest.$ac_ext <<_ACEOF
17435 /* end confdefs.h.  */
17436 $ac_includes_default
17437 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17438 _ACEOF
17439 rm -f conftest.$ac_objext
17440 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17441   (eval $ac_compile) 2>conftest.er1
17442   ac_status=$?
17443   grep -v '^ *+' conftest.er1 >conftest.err
17444   rm -f conftest.er1
17445   cat conftest.err >&5
17446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17447   (exit $ac_status); } &&
17448          { ac_try='test -z "$ac_c_werror_flag"
17449                          || test ! -s conftest.err'
17450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17451   (eval $ac_try) 2>&5
17452   ac_status=$?
17453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17454   (exit $ac_status); }; } &&
17455          { ac_try='test -s conftest.$ac_objext'
17456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17457   (eval $ac_try) 2>&5
17458   ac_status=$?
17459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17460   (exit $ac_status); }; }; then
17461   ac_header_compiler=yes
17462 else
17463   echo "$as_me: failed program was:" >&5
17464 sed 's/^/| /' conftest.$ac_ext >&5
17465
17466 ac_header_compiler=no
17467 fi
17468 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17469 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17470 echo "${ECHO_T}$ac_header_compiler" >&6
17471
17472 # Is the header present?
17473 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
17474 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
17475 cat >conftest.$ac_ext <<_ACEOF
17476 /* confdefs.h.  */
17477 _ACEOF
17478 cat confdefs.h >>conftest.$ac_ext
17479 cat >>conftest.$ac_ext <<_ACEOF
17480 /* end confdefs.h.  */
17481 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17482 _ACEOF
17483 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17484   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17485   ac_status=$?
17486   grep -v '^ *+' conftest.er1 >conftest.err
17487   rm -f conftest.er1
17488   cat conftest.err >&5
17489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17490   (exit $ac_status); } >/dev/null; then
17491   if test -s conftest.err; then
17492     ac_cpp_err=$ac_c_preproc_warn_flag
17493     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17494   else
17495     ac_cpp_err=
17496   fi
17497 else
17498   ac_cpp_err=yes
17499 fi
17500 if test -z "$ac_cpp_err"; then
17501   ac_header_preproc=yes
17502 else
17503   echo "$as_me: failed program was:" >&5
17504 sed 's/^/| /' conftest.$ac_ext >&5
17505
17506   ac_header_preproc=no
17507 fi
17508 rm -f conftest.err conftest.$ac_ext
17509 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17510 echo "${ECHO_T}$ac_header_preproc" >&6
17511
17512 # So?  What about this header?
17513 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17514   yes:no: )
17515     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17516 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17517     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17518 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17519     ac_header_preproc=yes
17520     ;;
17521   no:yes:* )
17522     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17523 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17524     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17525 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17526     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17527 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17528     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17529 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17530     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17531 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17532     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17533 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17534     (
17535       cat <<\_ASBOX
17536 ## ------------------------------------------ ##
17537 ## Report this to the AC_PACKAGE_NAME lists.  ##
17538 ## ------------------------------------------ ##
17539 _ASBOX
17540     ) |
17541       sed "s/^/$as_me: WARNING:     /" >&2
17542     ;;
17543 esac
17544 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17545 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17546 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17547   echo $ECHO_N "(cached) $ECHO_C" >&6
17548 else
17549   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
17550 fi
17551 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17552 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
17553
17554 fi
17555 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
17556   have_gdk_pixbuf=yes
17557                            gdk_pixbuf_halfassed=no
17558 fi
17559
17560
17561   CPPFLAGS="$ac_save_CPPFLAGS"
17562       fi
17563     fi
17564     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
17565   fi
17566
17567   if test "$have_gdk_pixbuf" = yes; then
17568     # we have the headers, now check for the libraries
17569     have_gdk_pixbuf=no
17570     gdk_pixbuf_halfassed=yes
17571
17572     echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
17573 echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6
17574
17575     # library A...
17576
17577   ac_save_CPPFLAGS="$CPPFLAGS"
17578   ac_save_LDFLAGS="$LDFLAGS"
17579 #  ac_save_LIBS="$LIBS"
17580
17581   if test \! -z "$includedir" ; then
17582     CPPFLAGS="$CPPFLAGS -I$includedir"
17583   fi
17584   # note: $X_CFLAGS includes $x_includes
17585   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17586
17587   if test \! -z "$libdir" ; then
17588     LDFLAGS="$LDFLAGS -L$libdir"
17589   fi
17590   # note: $X_LIBS includes $x_libraries
17591   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17592
17593   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
17594 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
17595 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
17596   echo $ECHO_N "(cached) $ECHO_C" >&6
17597 else
17598   ac_check_lib_save_LIBS=$LIBS
17599 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17600 cat >conftest.$ac_ext <<_ACEOF
17601 /* confdefs.h.  */
17602 _ACEOF
17603 cat confdefs.h >>conftest.$ac_ext
17604 cat >>conftest.$ac_ext <<_ACEOF
17605 /* end confdefs.h.  */
17606
17607 /* Override any gcc2 internal prototype to avoid an error.  */
17608 #ifdef __cplusplus
17609 extern "C"
17610 #endif
17611 /* We use char because int might match the return type of a gcc2
17612    builtin and then its argument prototype would still apply.  */
17613 char gdk_pixbuf_new_from_file ();
17614 int
17615 main ()
17616 {
17617 gdk_pixbuf_new_from_file ();
17618   ;
17619   return 0;
17620 }
17621 _ACEOF
17622 rm -f conftest.$ac_objext conftest$ac_exeext
17623 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17624   (eval $ac_link) 2>conftest.er1
17625   ac_status=$?
17626   grep -v '^ *+' conftest.er1 >conftest.err
17627   rm -f conftest.er1
17628   cat conftest.err >&5
17629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17630   (exit $ac_status); } &&
17631          { ac_try='test -z "$ac_c_werror_flag"
17632                          || test ! -s conftest.err'
17633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17634   (eval $ac_try) 2>&5
17635   ac_status=$?
17636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17637   (exit $ac_status); }; } &&
17638          { ac_try='test -s conftest$ac_exeext'
17639   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17640   (eval $ac_try) 2>&5
17641   ac_status=$?
17642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17643   (exit $ac_status); }; }; then
17644   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
17645 else
17646   echo "$as_me: failed program was:" >&5
17647 sed 's/^/| /' conftest.$ac_ext >&5
17648
17649 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
17650 fi
17651 rm -f conftest.err conftest.$ac_objext \
17652       conftest$ac_exeext conftest.$ac_ext
17653 LIBS=$ac_check_lib_save_LIBS
17654 fi
17655 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
17656 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
17657 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
17658   have_gdk_pixbuf=yes
17659 fi
17660
17661   CPPFLAGS="$ac_save_CPPFLAGS"
17662   LDFLAGS="$ac_save_LDFLAGS"
17663 #  LIBS="$ac_save_LIBS"
17664
17665     # library B...
17666     if test "$have_gdk_pixbuf" = yes; then
17667       have_gdk_pixbuf=no
17668
17669   ac_save_CPPFLAGS="$CPPFLAGS"
17670   ac_save_LDFLAGS="$LDFLAGS"
17671 #  ac_save_LIBS="$LIBS"
17672
17673   if test \! -z "$includedir" ; then
17674     CPPFLAGS="$CPPFLAGS -I$includedir"
17675   fi
17676   # note: $X_CFLAGS includes $x_includes
17677   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17678
17679   if test \! -z "$libdir" ; then
17680     LDFLAGS="$LDFLAGS -L$libdir"
17681   fi
17682   # note: $X_LIBS includes $x_libraries
17683   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17684
17685   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
17686 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
17687 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
17688   echo $ECHO_N "(cached) $ECHO_C" >&6
17689 else
17690   ac_check_lib_save_LIBS=$LIBS
17691 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17692 cat >conftest.$ac_ext <<_ACEOF
17693 /* confdefs.h.  */
17694 _ACEOF
17695 cat confdefs.h >>conftest.$ac_ext
17696 cat >>conftest.$ac_ext <<_ACEOF
17697 /* end confdefs.h.  */
17698
17699 /* Override any gcc2 internal prototype to avoid an error.  */
17700 #ifdef __cplusplus
17701 extern "C"
17702 #endif
17703 /* We use char because int might match the return type of a gcc2
17704    builtin and then its argument prototype would still apply.  */
17705 char gdk_pixbuf_xlib_init ();
17706 int
17707 main ()
17708 {
17709 gdk_pixbuf_xlib_init ();
17710   ;
17711   return 0;
17712 }
17713 _ACEOF
17714 rm -f conftest.$ac_objext conftest$ac_exeext
17715 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17716   (eval $ac_link) 2>conftest.er1
17717   ac_status=$?
17718   grep -v '^ *+' conftest.er1 >conftest.err
17719   rm -f conftest.er1
17720   cat conftest.err >&5
17721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17722   (exit $ac_status); } &&
17723          { ac_try='test -z "$ac_c_werror_flag"
17724                          || test ! -s conftest.err'
17725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17726   (eval $ac_try) 2>&5
17727   ac_status=$?
17728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17729   (exit $ac_status); }; } &&
17730          { ac_try='test -s conftest$ac_exeext'
17731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17732   (eval $ac_try) 2>&5
17733   ac_status=$?
17734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17735   (exit $ac_status); }; }; then
17736   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
17737 else
17738   echo "$as_me: failed program was:" >&5
17739 sed 's/^/| /' conftest.$ac_ext >&5
17740
17741 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
17742 fi
17743 rm -f conftest.err conftest.$ac_objext \
17744       conftest$ac_exeext conftest.$ac_ext
17745 LIBS=$ac_check_lib_save_LIBS
17746 fi
17747 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
17748 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
17749 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
17750   have_gdk_pixbuf=yes
17751                       gdk_pixbuf_halfassed=no
17752 fi
17753
17754   CPPFLAGS="$ac_save_CPPFLAGS"
17755   LDFLAGS="$ac_save_LDFLAGS"
17756 #  LIBS="$ac_save_LIBS"
17757
17758     fi
17759   fi
17760
17761   if test "$have_gdk_pixbuf" = yes; then
17762     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
17763     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
17764     cat >>confdefs.h <<\_ACEOF
17765 #define HAVE_GDK_PIXBUF 1
17766 _ACEOF
17767
17768   else
17769     echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
17770 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6
17771   fi
17772 fi
17773
17774
17775 ###############################################################################
17776 #
17777 #       Check for -lXpm.
17778 #
17779 ###############################################################################
17780
17781 have_xpm=no
17782 with_xpm_req=unspecified
17783
17784 # Check whether --with-xpm or --without-xpm was given.
17785 if test "${with_xpm+set}" = set; then
17786   withval="$with_xpm"
17787   with_xpm="$withval"; with_xpm_req="$withval"
17788 else
17789   with_xpm=yes
17790 fi;
17791
17792
17793    case "$with_xpm" in
17794     yes) ;;
17795     no)  ;;
17796
17797     /*)
17798      echo "$as_me:$LINENO: checking for XPM headers" >&5
17799 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
17800      d=$with_xpm/include
17801      if test -d $d; then
17802        X_CFLAGS="-I$d $X_CFLAGS"
17803        echo "$as_me:$LINENO: result: $d" >&5
17804 echo "${ECHO_T}$d" >&6
17805      else
17806        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17807 echo "${ECHO_T}not found ($d: no such directory)" >&6
17808      fi
17809
17810      echo "$as_me:$LINENO: checking for XPM libs" >&5
17811 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
17812      d=$with_xpm/lib
17813      if test -d $d; then
17814        X_LIBS="-L$d $X_LIBS"
17815        echo "$as_me:$LINENO: result: $d" >&5
17816 echo "${ECHO_T}$d" >&6
17817      else
17818        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17819 echo "${ECHO_T}not found ($d: no such directory)" >&6
17820      fi
17821
17822      # replace the directory string with "yes".
17823      with_xpm_req="yes"
17824      with_xpm=$with_xpm_req
17825      ;;
17826
17827     *)
17828      echo ""
17829      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
17830      echo "       If it is a directory, then \`DIR/include' will be added to"
17831      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17832      exit 1
17833      ;;
17834    esac
17835
17836
17837 if test "$with_xpm" = yes; then
17838
17839   ac_save_CPPFLAGS="$CPPFLAGS"
17840   if test \! -z "$includedir" ; then
17841     CPPFLAGS="$CPPFLAGS -I$includedir"
17842   fi
17843   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17844   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
17845 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
17846 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
17847   echo $ECHO_N "(cached) $ECHO_C" >&6
17848 else
17849   cat >conftest.$ac_ext <<_ACEOF
17850 /* confdefs.h.  */
17851 _ACEOF
17852 cat confdefs.h >>conftest.$ac_ext
17853 cat >>conftest.$ac_ext <<_ACEOF
17854 /* end confdefs.h.  */
17855 #include <X11/Xlib.h>
17856
17857 #include <X11/xpm.h>
17858 _ACEOF
17859 rm -f conftest.$ac_objext
17860 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17861   (eval $ac_compile) 2>conftest.er1
17862   ac_status=$?
17863   grep -v '^ *+' conftest.er1 >conftest.err
17864   rm -f conftest.er1
17865   cat conftest.err >&5
17866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17867   (exit $ac_status); } &&
17868          { ac_try='test -z "$ac_c_werror_flag"
17869                          || test ! -s conftest.err'
17870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17871   (eval $ac_try) 2>&5
17872   ac_status=$?
17873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17874   (exit $ac_status); }; } &&
17875          { ac_try='test -s conftest.$ac_objext'
17876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17877   (eval $ac_try) 2>&5
17878   ac_status=$?
17879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17880   (exit $ac_status); }; }; then
17881   ac_cv_header_X11_xpm_h=yes
17882 else
17883   echo "$as_me: failed program was:" >&5
17884 sed 's/^/| /' conftest.$ac_ext >&5
17885
17886 ac_cv_header_X11_xpm_h=no
17887 fi
17888 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17889 fi
17890 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
17891 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
17892 if test $ac_cv_header_X11_xpm_h = yes; then
17893   have_xpm=yes
17894                     cat >>confdefs.h <<\_ACEOF
17895 #define HAVE_XPM 1
17896 _ACEOF
17897
17898                     XPM_LIBS="-lXpm $XPM_LIBS"
17899 fi
17900
17901
17902   CPPFLAGS="$ac_save_CPPFLAGS"
17903 elif test "$with_xpm" != no; then
17904   echo "error: must be yes or no: --with-xpm=$with_xpm"
17905   exit 1
17906 fi
17907
17908 # See comment near $motif_requires_xpm, above.
17909 # Need to do this here, after both Motif and XPM have been checked for.
17910 #
17911 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
17912   if test "$motif_requires_xpm" = yes ; then
17913     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
17914   fi
17915 fi
17916
17917
17918 ###############################################################################
17919 #
17920 #       Check for -ljpeg
17921 #
17922 ###############################################################################
17923
17924 have_jpeg=no
17925 with_jpeg_req=unspecified
17926 jpeg_halfassed=no
17927
17928 # Check whether --with-jpeg or --without-jpeg was given.
17929 if test "${with_jpeg+set}" = set; then
17930   withval="$with_jpeg"
17931   with_jpeg="$withval"; with_jpeg_req="$withval"
17932 else
17933   with_jpeg=yes
17934 fi;
17935
17936
17937    case "$with_jpeg" in
17938     yes) ;;
17939     no)  ;;
17940
17941     /*)
17942      echo "$as_me:$LINENO: checking for JPEG headers" >&5
17943 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
17944      d=$with_jpeg/include
17945      if test -d $d; then
17946        X_CFLAGS="-I$d $X_CFLAGS"
17947        echo "$as_me:$LINENO: result: $d" >&5
17948 echo "${ECHO_T}$d" >&6
17949      else
17950        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17951 echo "${ECHO_T}not found ($d: no such directory)" >&6
17952      fi
17953
17954      echo "$as_me:$LINENO: checking for JPEG libs" >&5
17955 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
17956      d=$with_jpeg/lib
17957      if test -d $d; then
17958        X_LIBS="-L$d $X_LIBS"
17959        echo "$as_me:$LINENO: result: $d" >&5
17960 echo "${ECHO_T}$d" >&6
17961      else
17962        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17963 echo "${ECHO_T}not found ($d: no such directory)" >&6
17964      fi
17965
17966      # replace the directory string with "yes".
17967      with_jpeg_req="yes"
17968      with_jpeg=$with_jpeg_req
17969      ;;
17970
17971     *)
17972      echo ""
17973      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
17974      echo "       If it is a directory, then \`DIR/include' will be added to"
17975      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17976      exit 1
17977      ;;
17978    esac
17979
17980
17981 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
17982   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
17983   exit 1
17984 fi
17985
17986 if test "$with_jpeg" = yes; then
17987
17988   have_jpeg=no
17989
17990   ac_save_CPPFLAGS="$CPPFLAGS"
17991   if test \! -z "$includedir" ; then
17992     CPPFLAGS="$CPPFLAGS -I$includedir"
17993   fi
17994   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17995   if test "${ac_cv_header_jpeglib_h+set}" = set; then
17996   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
17997 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
17998 if test "${ac_cv_header_jpeglib_h+set}" = set; then
17999   echo $ECHO_N "(cached) $ECHO_C" >&6
18000 fi
18001 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18002 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
18003 else
18004   # Is the header compilable?
18005 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
18006 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
18007 cat >conftest.$ac_ext <<_ACEOF
18008 /* confdefs.h.  */
18009 _ACEOF
18010 cat confdefs.h >>conftest.$ac_ext
18011 cat >>conftest.$ac_ext <<_ACEOF
18012 /* end confdefs.h.  */
18013 $ac_includes_default
18014 #include <jpeglib.h>
18015 _ACEOF
18016 rm -f conftest.$ac_objext
18017 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18018   (eval $ac_compile) 2>conftest.er1
18019   ac_status=$?
18020   grep -v '^ *+' conftest.er1 >conftest.err
18021   rm -f conftest.er1
18022   cat conftest.err >&5
18023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18024   (exit $ac_status); } &&
18025          { ac_try='test -z "$ac_c_werror_flag"
18026                          || test ! -s conftest.err'
18027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18028   (eval $ac_try) 2>&5
18029   ac_status=$?
18030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18031   (exit $ac_status); }; } &&
18032          { ac_try='test -s conftest.$ac_objext'
18033   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18034   (eval $ac_try) 2>&5
18035   ac_status=$?
18036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18037   (exit $ac_status); }; }; then
18038   ac_header_compiler=yes
18039 else
18040   echo "$as_me: failed program was:" >&5
18041 sed 's/^/| /' conftest.$ac_ext >&5
18042
18043 ac_header_compiler=no
18044 fi
18045 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18046 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18047 echo "${ECHO_T}$ac_header_compiler" >&6
18048
18049 # Is the header present?
18050 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
18051 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
18052 cat >conftest.$ac_ext <<_ACEOF
18053 /* confdefs.h.  */
18054 _ACEOF
18055 cat confdefs.h >>conftest.$ac_ext
18056 cat >>conftest.$ac_ext <<_ACEOF
18057 /* end confdefs.h.  */
18058 #include <jpeglib.h>
18059 _ACEOF
18060 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18061   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18062   ac_status=$?
18063   grep -v '^ *+' conftest.er1 >conftest.err
18064   rm -f conftest.er1
18065   cat conftest.err >&5
18066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18067   (exit $ac_status); } >/dev/null; then
18068   if test -s conftest.err; then
18069     ac_cpp_err=$ac_c_preproc_warn_flag
18070     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18071   else
18072     ac_cpp_err=
18073   fi
18074 else
18075   ac_cpp_err=yes
18076 fi
18077 if test -z "$ac_cpp_err"; then
18078   ac_header_preproc=yes
18079 else
18080   echo "$as_me: failed program was:" >&5
18081 sed 's/^/| /' conftest.$ac_ext >&5
18082
18083   ac_header_preproc=no
18084 fi
18085 rm -f conftest.err conftest.$ac_ext
18086 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18087 echo "${ECHO_T}$ac_header_preproc" >&6
18088
18089 # So?  What about this header?
18090 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18091   yes:no: )
18092     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18093 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18094     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
18095 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
18096     ac_header_preproc=yes
18097     ;;
18098   no:yes:* )
18099     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
18100 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
18101     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
18102 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
18103     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
18104 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
18105     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
18106 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18107     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
18108 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
18109     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
18110 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
18111     (
18112       cat <<\_ASBOX
18113 ## ------------------------------------------ ##
18114 ## Report this to the AC_PACKAGE_NAME lists.  ##
18115 ## ------------------------------------------ ##
18116 _ASBOX
18117     ) |
18118       sed "s/^/$as_me: WARNING:     /" >&2
18119     ;;
18120 esac
18121 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18122 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
18123 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18124   echo $ECHO_N "(cached) $ECHO_C" >&6
18125 else
18126   ac_cv_header_jpeglib_h=$ac_header_preproc
18127 fi
18128 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18129 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
18130
18131 fi
18132 if test $ac_cv_header_jpeglib_h = yes; then
18133   have_jpeg=yes
18134 fi
18135
18136
18137   CPPFLAGS="$ac_save_CPPFLAGS"
18138
18139   if test "$have_jpeg" = yes; then
18140     # we have the header, now check for the library
18141     have_jpeg=no
18142     jpeg_halfassed=yes
18143
18144   ac_save_CPPFLAGS="$CPPFLAGS"
18145   ac_save_LDFLAGS="$LDFLAGS"
18146 #  ac_save_LIBS="$LIBS"
18147
18148   if test \! -z "$includedir" ; then
18149     CPPFLAGS="$CPPFLAGS -I$includedir"
18150   fi
18151   # note: $X_CFLAGS includes $x_includes
18152   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18153
18154   if test \! -z "$libdir" ; then
18155     LDFLAGS="$LDFLAGS -L$libdir"
18156   fi
18157   # note: $X_LIBS includes $x_libraries
18158   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18159
18160   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
18161 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
18162 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
18163   echo $ECHO_N "(cached) $ECHO_C" >&6
18164 else
18165   ac_check_lib_save_LIBS=$LIBS
18166 LIBS="-ljpeg  $LIBS"
18167 cat >conftest.$ac_ext <<_ACEOF
18168 /* confdefs.h.  */
18169 _ACEOF
18170 cat confdefs.h >>conftest.$ac_ext
18171 cat >>conftest.$ac_ext <<_ACEOF
18172 /* end confdefs.h.  */
18173
18174 /* Override any gcc2 internal prototype to avoid an error.  */
18175 #ifdef __cplusplus
18176 extern "C"
18177 #endif
18178 /* We use char because int might match the return type of a gcc2
18179    builtin and then its argument prototype would still apply.  */
18180 char jpeg_start_compress ();
18181 int
18182 main ()
18183 {
18184 jpeg_start_compress ();
18185   ;
18186   return 0;
18187 }
18188 _ACEOF
18189 rm -f conftest.$ac_objext conftest$ac_exeext
18190 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18191   (eval $ac_link) 2>conftest.er1
18192   ac_status=$?
18193   grep -v '^ *+' conftest.er1 >conftest.err
18194   rm -f conftest.er1
18195   cat conftest.err >&5
18196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18197   (exit $ac_status); } &&
18198          { ac_try='test -z "$ac_c_werror_flag"
18199                          || test ! -s conftest.err'
18200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18201   (eval $ac_try) 2>&5
18202   ac_status=$?
18203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18204   (exit $ac_status); }; } &&
18205          { ac_try='test -s conftest$ac_exeext'
18206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18207   (eval $ac_try) 2>&5
18208   ac_status=$?
18209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18210   (exit $ac_status); }; }; then
18211   ac_cv_lib_jpeg_jpeg_start_compress=yes
18212 else
18213   echo "$as_me: failed program was:" >&5
18214 sed 's/^/| /' conftest.$ac_ext >&5
18215
18216 ac_cv_lib_jpeg_jpeg_start_compress=no
18217 fi
18218 rm -f conftest.err conftest.$ac_objext \
18219       conftest$ac_exeext conftest.$ac_ext
18220 LIBS=$ac_check_lib_save_LIBS
18221 fi
18222 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
18223 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
18224 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
18225   have_jpeg=yes
18226                     jpeg_halfassed=no
18227                     JPEG_LIBS="-ljpeg"
18228                     cat >>confdefs.h <<\_ACEOF
18229 #define HAVE_JPEGLIB 1
18230 _ACEOF
18231
18232 fi
18233
18234   CPPFLAGS="$ac_save_CPPFLAGS"
18235   LDFLAGS="$ac_save_LDFLAGS"
18236 #  LIBS="$ac_save_LIBS"
18237
18238   fi
18239 fi
18240
18241
18242 ###############################################################################
18243 #
18244 #       Check for pty support for 'phosphor'
18245 #
18246 ###############################################################################
18247
18248 PTY_LIBS=
18249
18250
18251 for ac_header in pty.h util.h
18252 do
18253 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18254 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18255   echo "$as_me:$LINENO: checking for $ac_header" >&5
18256 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18257 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18258   echo $ECHO_N "(cached) $ECHO_C" >&6
18259 fi
18260 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18261 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18262 else
18263   # Is the header compilable?
18264 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18265 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18266 cat >conftest.$ac_ext <<_ACEOF
18267 /* confdefs.h.  */
18268 _ACEOF
18269 cat confdefs.h >>conftest.$ac_ext
18270 cat >>conftest.$ac_ext <<_ACEOF
18271 /* end confdefs.h.  */
18272 $ac_includes_default
18273 #include <$ac_header>
18274 _ACEOF
18275 rm -f conftest.$ac_objext
18276 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18277   (eval $ac_compile) 2>conftest.er1
18278   ac_status=$?
18279   grep -v '^ *+' conftest.er1 >conftest.err
18280   rm -f conftest.er1
18281   cat conftest.err >&5
18282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18283   (exit $ac_status); } &&
18284          { ac_try='test -z "$ac_c_werror_flag"
18285                          || test ! -s conftest.err'
18286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18287   (eval $ac_try) 2>&5
18288   ac_status=$?
18289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18290   (exit $ac_status); }; } &&
18291          { ac_try='test -s conftest.$ac_objext'
18292   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18293   (eval $ac_try) 2>&5
18294   ac_status=$?
18295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18296   (exit $ac_status); }; }; then
18297   ac_header_compiler=yes
18298 else
18299   echo "$as_me: failed program was:" >&5
18300 sed 's/^/| /' conftest.$ac_ext >&5
18301
18302 ac_header_compiler=no
18303 fi
18304 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18305 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18306 echo "${ECHO_T}$ac_header_compiler" >&6
18307
18308 # Is the header present?
18309 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18310 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18311 cat >conftest.$ac_ext <<_ACEOF
18312 /* confdefs.h.  */
18313 _ACEOF
18314 cat confdefs.h >>conftest.$ac_ext
18315 cat >>conftest.$ac_ext <<_ACEOF
18316 /* end confdefs.h.  */
18317 #include <$ac_header>
18318 _ACEOF
18319 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18320   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18321   ac_status=$?
18322   grep -v '^ *+' conftest.er1 >conftest.err
18323   rm -f conftest.er1
18324   cat conftest.err >&5
18325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18326   (exit $ac_status); } >/dev/null; then
18327   if test -s conftest.err; then
18328     ac_cpp_err=$ac_c_preproc_warn_flag
18329     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18330   else
18331     ac_cpp_err=
18332   fi
18333 else
18334   ac_cpp_err=yes
18335 fi
18336 if test -z "$ac_cpp_err"; then
18337   ac_header_preproc=yes
18338 else
18339   echo "$as_me: failed program was:" >&5
18340 sed 's/^/| /' conftest.$ac_ext >&5
18341
18342   ac_header_preproc=no
18343 fi
18344 rm -f conftest.err conftest.$ac_ext
18345 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18346 echo "${ECHO_T}$ac_header_preproc" >&6
18347
18348 # So?  What about this header?
18349 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18350   yes:no: )
18351     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18352 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18353     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18354 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18355     ac_header_preproc=yes
18356     ;;
18357   no:yes:* )
18358     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18359 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18360     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18361 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18362     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18363 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18364     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18365 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18366     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18367 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18368     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18369 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18370     (
18371       cat <<\_ASBOX
18372 ## ------------------------------------------ ##
18373 ## Report this to the AC_PACKAGE_NAME lists.  ##
18374 ## ------------------------------------------ ##
18375 _ASBOX
18376     ) |
18377       sed "s/^/$as_me: WARNING:     /" >&2
18378     ;;
18379 esac
18380 echo "$as_me:$LINENO: checking for $ac_header" >&5
18381 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18382 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18383   echo $ECHO_N "(cached) $ECHO_C" >&6
18384 else
18385   eval "$as_ac_Header=\$ac_header_preproc"
18386 fi
18387 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18388 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18389
18390 fi
18391 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18392   cat >>confdefs.h <<_ACEOF
18393 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18394 _ACEOF
18395
18396 fi
18397
18398 done
18399
18400
18401   ac_save_CPPFLAGS="$CPPFLAGS"
18402   ac_save_LDFLAGS="$LDFLAGS"
18403 #  ac_save_LIBS="$LIBS"
18404
18405   if test \! -z "$includedir" ; then
18406     CPPFLAGS="$CPPFLAGS -I$includedir"
18407   fi
18408   # note: $X_CFLAGS includes $x_includes
18409   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18410
18411   if test \! -z "$libdir" ; then
18412     LDFLAGS="$LDFLAGS -L$libdir"
18413   fi
18414   # note: $X_LIBS includes $x_libraries
18415   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18416
18417   echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18418 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
18419 if test "${ac_cv_lib_util_forkpty+set}" = set; then
18420   echo $ECHO_N "(cached) $ECHO_C" >&6
18421 else
18422   ac_check_lib_save_LIBS=$LIBS
18423 LIBS="-lutil  $LIBS"
18424 cat >conftest.$ac_ext <<_ACEOF
18425 /* confdefs.h.  */
18426 _ACEOF
18427 cat confdefs.h >>conftest.$ac_ext
18428 cat >>conftest.$ac_ext <<_ACEOF
18429 /* end confdefs.h.  */
18430
18431 /* Override any gcc2 internal prototype to avoid an error.  */
18432 #ifdef __cplusplus
18433 extern "C"
18434 #endif
18435 /* We use char because int might match the return type of a gcc2
18436    builtin and then its argument prototype would still apply.  */
18437 char forkpty ();
18438 int
18439 main ()
18440 {
18441 forkpty ();
18442   ;
18443   return 0;
18444 }
18445 _ACEOF
18446 rm -f conftest.$ac_objext conftest$ac_exeext
18447 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18448   (eval $ac_link) 2>conftest.er1
18449   ac_status=$?
18450   grep -v '^ *+' conftest.er1 >conftest.err
18451   rm -f conftest.er1
18452   cat conftest.err >&5
18453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18454   (exit $ac_status); } &&
18455          { ac_try='test -z "$ac_c_werror_flag"
18456                          || test ! -s conftest.err'
18457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18458   (eval $ac_try) 2>&5
18459   ac_status=$?
18460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18461   (exit $ac_status); }; } &&
18462          { ac_try='test -s conftest$ac_exeext'
18463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18464   (eval $ac_try) 2>&5
18465   ac_status=$?
18466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18467   (exit $ac_status); }; }; then
18468   ac_cv_lib_util_forkpty=yes
18469 else
18470   echo "$as_me: failed program was:" >&5
18471 sed 's/^/| /' conftest.$ac_ext >&5
18472
18473 ac_cv_lib_util_forkpty=no
18474 fi
18475 rm -f conftest.err conftest.$ac_objext \
18476       conftest$ac_exeext conftest.$ac_ext
18477 LIBS=$ac_check_lib_save_LIBS
18478 fi
18479 echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18480 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
18481 if test $ac_cv_lib_util_forkpty = yes; then
18482   PTY_LIBS="-lutil"
18483                 cat >>confdefs.h <<\_ACEOF
18484 #define HAVE_FORKPTY 1
18485 _ACEOF
18486
18487 fi
18488
18489   CPPFLAGS="$ac_save_CPPFLAGS"
18490   LDFLAGS="$ac_save_LDFLAGS"
18491 #  LIBS="$ac_save_LIBS"
18492
18493
18494
18495 ###############################################################################
18496 #
18497 #       Check for the XSHM server extension.
18498 #
18499 ###############################################################################
18500
18501 have_xshm=no
18502 with_xshm_req=unspecified
18503
18504 # Check whether --with-xshm-ext or --without-xshm-ext was given.
18505 if test "${with_xshm_ext+set}" = set; then
18506   withval="$with_xshm_ext"
18507   with_xshm="$withval"; with_xshm_req="$withval"
18508 else
18509   with_xshm=yes
18510 fi;
18511
18512
18513    case "$with_xshm" in
18514     yes) ;;
18515     no)  ;;
18516
18517     /*)
18518      echo "$as_me:$LINENO: checking for XSHM headers" >&5
18519 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
18520      d=$with_xshm/include
18521      if test -d $d; then
18522        X_CFLAGS="-I$d $X_CFLAGS"
18523        echo "$as_me:$LINENO: result: $d" >&5
18524 echo "${ECHO_T}$d" >&6
18525      else
18526        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18527 echo "${ECHO_T}not found ($d: no such directory)" >&6
18528      fi
18529
18530      echo "$as_me:$LINENO: checking for XSHM libs" >&5
18531 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
18532      d=$with_xshm/lib
18533      if test -d $d; then
18534        X_LIBS="-L$d $X_LIBS"
18535        echo "$as_me:$LINENO: result: $d" >&5
18536 echo "${ECHO_T}$d" >&6
18537      else
18538        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18539 echo "${ECHO_T}not found ($d: no such directory)" >&6
18540      fi
18541
18542      # replace the directory string with "yes".
18543      with_xshm_req="yes"
18544      with_xshm=$with_xshm_req
18545      ;;
18546
18547     *)
18548      echo ""
18549      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
18550      echo "       If it is a directory, then \`DIR/include' will be added to"
18551      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18552      exit 1
18553      ;;
18554    esac
18555
18556
18557 if test "$with_xshm" = yes; then
18558
18559   # first check for Xshm.h.
18560
18561   ac_save_CPPFLAGS="$CPPFLAGS"
18562   if test \! -z "$includedir" ; then
18563     CPPFLAGS="$CPPFLAGS -I$includedir"
18564   fi
18565   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18566   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
18567 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
18568 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
18569   echo $ECHO_N "(cached) $ECHO_C" >&6
18570 else
18571   cat >conftest.$ac_ext <<_ACEOF
18572 /* confdefs.h.  */
18573 _ACEOF
18574 cat confdefs.h >>conftest.$ac_ext
18575 cat >>conftest.$ac_ext <<_ACEOF
18576 /* end confdefs.h.  */
18577 #include <X11/Xlib.h>
18578
18579 #include <X11/extensions/XShm.h>
18580 _ACEOF
18581 rm -f conftest.$ac_objext
18582 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18583   (eval $ac_compile) 2>conftest.er1
18584   ac_status=$?
18585   grep -v '^ *+' conftest.er1 >conftest.err
18586   rm -f conftest.er1
18587   cat conftest.err >&5
18588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18589   (exit $ac_status); } &&
18590          { ac_try='test -z "$ac_c_werror_flag"
18591                          || test ! -s conftest.err'
18592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18593   (eval $ac_try) 2>&5
18594   ac_status=$?
18595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18596   (exit $ac_status); }; } &&
18597          { ac_try='test -s conftest.$ac_objext'
18598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18599   (eval $ac_try) 2>&5
18600   ac_status=$?
18601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18602   (exit $ac_status); }; }; then
18603   ac_cv_header_X11_extensions_XShm_h=yes
18604 else
18605   echo "$as_me: failed program was:" >&5
18606 sed 's/^/| /' conftest.$ac_ext >&5
18607
18608 ac_cv_header_X11_extensions_XShm_h=no
18609 fi
18610 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18611 fi
18612 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
18613 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
18614 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
18615   have_xshm=yes
18616 fi
18617
18618
18619   CPPFLAGS="$ac_save_CPPFLAGS"
18620
18621   # if that succeeded, then check for sys/ipc.h.
18622   if test "$have_xshm" = yes; then
18623     have_xshm=no
18624
18625   ac_save_CPPFLAGS="$CPPFLAGS"
18626   if test \! -z "$includedir" ; then
18627     CPPFLAGS="$CPPFLAGS -I$includedir"
18628   fi
18629   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18630   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18631   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
18632 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
18633 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18634   echo $ECHO_N "(cached) $ECHO_C" >&6
18635 fi
18636 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
18637 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
18638 else
18639   # Is the header compilable?
18640 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
18641 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
18642 cat >conftest.$ac_ext <<_ACEOF
18643 /* confdefs.h.  */
18644 _ACEOF
18645 cat confdefs.h >>conftest.$ac_ext
18646 cat >>conftest.$ac_ext <<_ACEOF
18647 /* end confdefs.h.  */
18648 $ac_includes_default
18649 #include <sys/ipc.h>
18650 _ACEOF
18651 rm -f conftest.$ac_objext
18652 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18653   (eval $ac_compile) 2>conftest.er1
18654   ac_status=$?
18655   grep -v '^ *+' conftest.er1 >conftest.err
18656   rm -f conftest.er1
18657   cat conftest.err >&5
18658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18659   (exit $ac_status); } &&
18660          { ac_try='test -z "$ac_c_werror_flag"
18661                          || test ! -s conftest.err'
18662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18663   (eval $ac_try) 2>&5
18664   ac_status=$?
18665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18666   (exit $ac_status); }; } &&
18667          { ac_try='test -s conftest.$ac_objext'
18668   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18669   (eval $ac_try) 2>&5
18670   ac_status=$?
18671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18672   (exit $ac_status); }; }; then
18673   ac_header_compiler=yes
18674 else
18675   echo "$as_me: failed program was:" >&5
18676 sed 's/^/| /' conftest.$ac_ext >&5
18677
18678 ac_header_compiler=no
18679 fi
18680 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18681 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18682 echo "${ECHO_T}$ac_header_compiler" >&6
18683
18684 # Is the header present?
18685 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
18686 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
18687 cat >conftest.$ac_ext <<_ACEOF
18688 /* confdefs.h.  */
18689 _ACEOF
18690 cat confdefs.h >>conftest.$ac_ext
18691 cat >>conftest.$ac_ext <<_ACEOF
18692 /* end confdefs.h.  */
18693 #include <sys/ipc.h>
18694 _ACEOF
18695 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18696   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18697   ac_status=$?
18698   grep -v '^ *+' conftest.er1 >conftest.err
18699   rm -f conftest.er1
18700   cat conftest.err >&5
18701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18702   (exit $ac_status); } >/dev/null; then
18703   if test -s conftest.err; then
18704     ac_cpp_err=$ac_c_preproc_warn_flag
18705     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18706   else
18707     ac_cpp_err=
18708   fi
18709 else
18710   ac_cpp_err=yes
18711 fi
18712 if test -z "$ac_cpp_err"; then
18713   ac_header_preproc=yes
18714 else
18715   echo "$as_me: failed program was:" >&5
18716 sed 's/^/| /' conftest.$ac_ext >&5
18717
18718   ac_header_preproc=no
18719 fi
18720 rm -f conftest.err conftest.$ac_ext
18721 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18722 echo "${ECHO_T}$ac_header_preproc" >&6
18723
18724 # So?  What about this header?
18725 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18726   yes:no: )
18727     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
18728 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18729     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
18730 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
18731     ac_header_preproc=yes
18732     ;;
18733   no:yes:* )
18734     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
18735 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
18736     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
18737 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
18738     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
18739 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
18740     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
18741 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18742     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
18743 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
18744     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
18745 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
18746     (
18747       cat <<\_ASBOX
18748 ## ------------------------------------------ ##
18749 ## Report this to the AC_PACKAGE_NAME lists.  ##
18750 ## ------------------------------------------ ##
18751 _ASBOX
18752     ) |
18753       sed "s/^/$as_me: WARNING:     /" >&2
18754     ;;
18755 esac
18756 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
18757 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
18758 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18759   echo $ECHO_N "(cached) $ECHO_C" >&6
18760 else
18761   ac_cv_header_sys_ipc_h=$ac_header_preproc
18762 fi
18763 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
18764 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
18765
18766 fi
18767 if test $ac_cv_header_sys_ipc_h = yes; then
18768   have_xshm=yes
18769 fi
18770
18771
18772   CPPFLAGS="$ac_save_CPPFLAGS"
18773   fi
18774
18775   # if that succeeded, then check for sys/shm.h.
18776   if test "$have_xshm" = yes; then
18777     have_xshm=no
18778
18779   ac_save_CPPFLAGS="$CPPFLAGS"
18780   if test \! -z "$includedir" ; then
18781     CPPFLAGS="$CPPFLAGS -I$includedir"
18782   fi
18783   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18784   if test "${ac_cv_header_sys_shm_h+set}" = set; then
18785   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
18786 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
18787 if test "${ac_cv_header_sys_shm_h+set}" = set; then
18788   echo $ECHO_N "(cached) $ECHO_C" >&6
18789 fi
18790 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
18791 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
18792 else
18793   # Is the header compilable?
18794 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
18795 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
18796 cat >conftest.$ac_ext <<_ACEOF
18797 /* confdefs.h.  */
18798 _ACEOF
18799 cat confdefs.h >>conftest.$ac_ext
18800 cat >>conftest.$ac_ext <<_ACEOF
18801 /* end confdefs.h.  */
18802 $ac_includes_default
18803 #include <sys/shm.h>
18804 _ACEOF
18805 rm -f conftest.$ac_objext
18806 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18807   (eval $ac_compile) 2>conftest.er1
18808   ac_status=$?
18809   grep -v '^ *+' conftest.er1 >conftest.err
18810   rm -f conftest.er1
18811   cat conftest.err >&5
18812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18813   (exit $ac_status); } &&
18814          { ac_try='test -z "$ac_c_werror_flag"
18815                          || test ! -s conftest.err'
18816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18817   (eval $ac_try) 2>&5
18818   ac_status=$?
18819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18820   (exit $ac_status); }; } &&
18821          { ac_try='test -s conftest.$ac_objext'
18822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18823   (eval $ac_try) 2>&5
18824   ac_status=$?
18825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18826   (exit $ac_status); }; }; then
18827   ac_header_compiler=yes
18828 else
18829   echo "$as_me: failed program was:" >&5
18830 sed 's/^/| /' conftest.$ac_ext >&5
18831
18832 ac_header_compiler=no
18833 fi
18834 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18835 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18836 echo "${ECHO_T}$ac_header_compiler" >&6
18837
18838 # Is the header present?
18839 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
18840 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
18841 cat >conftest.$ac_ext <<_ACEOF
18842 /* confdefs.h.  */
18843 _ACEOF
18844 cat confdefs.h >>conftest.$ac_ext
18845 cat >>conftest.$ac_ext <<_ACEOF
18846 /* end confdefs.h.  */
18847 #include <sys/shm.h>
18848 _ACEOF
18849 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18850   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18851   ac_status=$?
18852   grep -v '^ *+' conftest.er1 >conftest.err
18853   rm -f conftest.er1
18854   cat conftest.err >&5
18855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18856   (exit $ac_status); } >/dev/null; then
18857   if test -s conftest.err; then
18858     ac_cpp_err=$ac_c_preproc_warn_flag
18859     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18860   else
18861     ac_cpp_err=
18862   fi
18863 else
18864   ac_cpp_err=yes
18865 fi
18866 if test -z "$ac_cpp_err"; then
18867   ac_header_preproc=yes
18868 else
18869   echo "$as_me: failed program was:" >&5
18870 sed 's/^/| /' conftest.$ac_ext >&5
18871
18872   ac_header_preproc=no
18873 fi
18874 rm -f conftest.err conftest.$ac_ext
18875 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18876 echo "${ECHO_T}$ac_header_preproc" >&6
18877
18878 # So?  What about this header?
18879 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18880   yes:no: )
18881     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
18882 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18883     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
18884 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
18885     ac_header_preproc=yes
18886     ;;
18887   no:yes:* )
18888     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
18889 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
18890     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
18891 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
18892     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
18893 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
18894     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
18895 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18896     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
18897 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
18898     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
18899 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
18900     (
18901       cat <<\_ASBOX
18902 ## ------------------------------------------ ##
18903 ## Report this to the AC_PACKAGE_NAME lists.  ##
18904 ## ------------------------------------------ ##
18905 _ASBOX
18906     ) |
18907       sed "s/^/$as_me: WARNING:     /" >&2
18908     ;;
18909 esac
18910 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
18911 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
18912 if test "${ac_cv_header_sys_shm_h+set}" = set; then
18913   echo $ECHO_N "(cached) $ECHO_C" >&6
18914 else
18915   ac_cv_header_sys_shm_h=$ac_header_preproc
18916 fi
18917 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
18918 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
18919
18920 fi
18921 if test $ac_cv_header_sys_shm_h = yes; then
18922   have_xshm=yes
18923 fi
18924
18925
18926   CPPFLAGS="$ac_save_CPPFLAGS"
18927   fi
18928
18929   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
18930   # to exist, but the library code to not exist.  And even better, the library
18931   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
18932   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
18933   # that's not quite right, but close enough.)
18934   #
18935   case "$host" in
18936     *-aix*)
18937       if  `uname -v` -eq 3 ; then
18938         have_xshm=no
18939
18940   ac_save_CPPFLAGS="$CPPFLAGS"
18941   ac_save_LDFLAGS="$LDFLAGS"
18942 #  ac_save_LIBS="$LIBS"
18943
18944   if test \! -z "$includedir" ; then
18945     CPPFLAGS="$CPPFLAGS -I$includedir"
18946   fi
18947   # note: $X_CFLAGS includes $x_includes
18948   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18949
18950   if test \! -z "$libdir" ; then
18951     LDFLAGS="$LDFLAGS -L$libdir"
18952   fi
18953   # note: $X_LIBS includes $x_libraries
18954   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18955
18956   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
18957 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
18958 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
18959   echo $ECHO_N "(cached) $ECHO_C" >&6
18960 else
18961   ac_check_lib_save_LIBS=$LIBS
18962 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
18963 cat >conftest.$ac_ext <<_ACEOF
18964 /* confdefs.h.  */
18965 _ACEOF
18966 cat confdefs.h >>conftest.$ac_ext
18967 cat >>conftest.$ac_ext <<_ACEOF
18968 /* end confdefs.h.  */
18969
18970 /* Override any gcc2 internal prototype to avoid an error.  */
18971 #ifdef __cplusplus
18972 extern "C"
18973 #endif
18974 /* We use char because int might match the return type of a gcc2
18975    builtin and then its argument prototype would still apply.  */
18976 char XShmQueryExtension ();
18977 int
18978 main ()
18979 {
18980 XShmQueryExtension ();
18981   ;
18982   return 0;
18983 }
18984 _ACEOF
18985 rm -f conftest.$ac_objext conftest$ac_exeext
18986 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18987   (eval $ac_link) 2>conftest.er1
18988   ac_status=$?
18989   grep -v '^ *+' conftest.er1 >conftest.err
18990   rm -f conftest.er1
18991   cat conftest.err >&5
18992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18993   (exit $ac_status); } &&
18994          { ac_try='test -z "$ac_c_werror_flag"
18995                          || test ! -s conftest.err'
18996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18997   (eval $ac_try) 2>&5
18998   ac_status=$?
18999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19000   (exit $ac_status); }; } &&
19001          { ac_try='test -s conftest$ac_exeext'
19002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19003   (eval $ac_try) 2>&5
19004   ac_status=$?
19005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19006   (exit $ac_status); }; }; then
19007   ac_cv_lib_XextSam_XShmQueryExtension=yes
19008 else
19009   echo "$as_me: failed program was:" >&5
19010 sed 's/^/| /' conftest.$ac_ext >&5
19011
19012 ac_cv_lib_XextSam_XShmQueryExtension=no
19013 fi
19014 rm -f conftest.err conftest.$ac_objext \
19015       conftest$ac_exeext conftest.$ac_ext
19016 LIBS=$ac_check_lib_save_LIBS
19017 fi
19018 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
19019 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
19020 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
19021   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
19022 else
19023   true
19024 fi
19025
19026   CPPFLAGS="$ac_save_CPPFLAGS"
19027   LDFLAGS="$ac_save_LDFLAGS"
19028 #  LIBS="$ac_save_LIBS"
19029
19030       fi
19031     ;;
19032   esac
19033
19034   # if that succeeded, then we've really got it.
19035   if test "$have_xshm" = yes; then
19036     cat >>confdefs.h <<\_ACEOF
19037 #define HAVE_XSHM_EXTENSION 1
19038 _ACEOF
19039
19040   fi
19041
19042 elif test "$with_xshm" != no; then
19043   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
19044   exit 1
19045 fi
19046
19047
19048 ###############################################################################
19049 #
19050 #       Check for the DOUBLE-BUFFER server extension.
19051 #
19052 ###############################################################################
19053
19054 have_xdbe=no
19055 with_xdbe_req=unspecified
19056
19057 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
19058 if test "${with_xdbe_ext+set}" = set; then
19059   withval="$with_xdbe_ext"
19060   with_xdbe="$withval"; with_xdbe_req="$withval"
19061 else
19062   with_xdbe=yes
19063 fi;
19064
19065
19066    case "$with_xdbe" in
19067     yes) ;;
19068     no)  ;;
19069
19070     /*)
19071      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
19072 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
19073      d=$with_xdbe/include
19074      if test -d $d; then
19075        X_CFLAGS="-I$d $X_CFLAGS"
19076        echo "$as_me:$LINENO: result: $d" >&5
19077 echo "${ECHO_T}$d" >&6
19078      else
19079        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19080 echo "${ECHO_T}not found ($d: no such directory)" >&6
19081      fi
19082
19083      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
19084 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
19085      d=$with_xdbe/lib
19086      if test -d $d; then
19087        X_LIBS="-L$d $X_LIBS"
19088        echo "$as_me:$LINENO: result: $d" >&5
19089 echo "${ECHO_T}$d" >&6
19090      else
19091        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19092 echo "${ECHO_T}not found ($d: no such directory)" >&6
19093      fi
19094
19095      # replace the directory string with "yes".
19096      with_xdbe_req="yes"
19097      with_xdbe=$with_xdbe_req
19098      ;;
19099
19100     *)
19101      echo ""
19102      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
19103      echo "       If it is a directory, then \`DIR/include' will be added to"
19104      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19105      exit 1
19106      ;;
19107    esac
19108
19109
19110 if test "$with_xdbe" = yes; then
19111
19112
19113   ac_save_CPPFLAGS="$CPPFLAGS"
19114   if test \! -z "$includedir" ; then
19115     CPPFLAGS="$CPPFLAGS -I$includedir"
19116   fi
19117   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19118   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
19119 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
19120 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
19121   echo $ECHO_N "(cached) $ECHO_C" >&6
19122 else
19123   cat >conftest.$ac_ext <<_ACEOF
19124 /* confdefs.h.  */
19125 _ACEOF
19126 cat confdefs.h >>conftest.$ac_ext
19127 cat >>conftest.$ac_ext <<_ACEOF
19128 /* end confdefs.h.  */
19129 #include <X11/Xlib.h>
19130
19131 #include <X11/extensions/Xdbe.h>
19132 _ACEOF
19133 rm -f conftest.$ac_objext
19134 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19135   (eval $ac_compile) 2>conftest.er1
19136   ac_status=$?
19137   grep -v '^ *+' conftest.er1 >conftest.err
19138   rm -f conftest.er1
19139   cat conftest.err >&5
19140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19141   (exit $ac_status); } &&
19142          { ac_try='test -z "$ac_c_werror_flag"
19143                          || test ! -s conftest.err'
19144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19145   (eval $ac_try) 2>&5
19146   ac_status=$?
19147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19148   (exit $ac_status); }; } &&
19149          { ac_try='test -s conftest.$ac_objext'
19150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19151   (eval $ac_try) 2>&5
19152   ac_status=$?
19153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19154   (exit $ac_status); }; }; then
19155   ac_cv_header_X11_extensions_Xdbe_h=yes
19156 else
19157   echo "$as_me: failed program was:" >&5
19158 sed 's/^/| /' conftest.$ac_ext >&5
19159
19160 ac_cv_header_X11_extensions_Xdbe_h=no
19161 fi
19162 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19163 fi
19164 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
19165 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
19166 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
19167   have_xdbe=yes
19168 fi
19169
19170
19171   CPPFLAGS="$ac_save_CPPFLAGS"
19172   if test "$have_xdbe" = yes; then
19173     cat >>confdefs.h <<\_ACEOF
19174 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
19175 _ACEOF
19176
19177   fi
19178
19179 elif test "$with_xdbe" != no; then
19180   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
19181   exit 1
19182 fi
19183
19184
19185 ###############################################################################
19186 #
19187 #       Check for the SGI XReadDisplay server extension.
19188 #
19189 #       Note: this has to be down here, rather than up with the other server
19190 #       extension tests, so that the output of `configure --help' is in the
19191 #       right order.  Arrgh!
19192 #
19193 ###############################################################################
19194
19195 have_readdisplay=no
19196 with_readdisplay_req=unspecified
19197
19198 # Check whether --with-readdisplay or --without-readdisplay was given.
19199 if test "${with_readdisplay+set}" = set; then
19200   withval="$with_readdisplay"
19201   with_readdisplay="$withval"; with_readdisplay_req="$withval"
19202 else
19203   with_readdisplay=yes
19204 fi;
19205
19206
19207    case "$with_readdisplay" in
19208     yes) ;;
19209     no)  ;;
19210
19211     /*)
19212      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
19213 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
19214      d=$with_readdisplay/include
19215      if test -d $d; then
19216        X_CFLAGS="-I$d $X_CFLAGS"
19217        echo "$as_me:$LINENO: result: $d" >&5
19218 echo "${ECHO_T}$d" >&6
19219      else
19220        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19221 echo "${ECHO_T}not found ($d: no such directory)" >&6
19222      fi
19223
19224      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
19225 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
19226      d=$with_readdisplay/lib
19227      if test -d $d; then
19228        X_LIBS="-L$d $X_LIBS"
19229        echo "$as_me:$LINENO: result: $d" >&5
19230 echo "${ECHO_T}$d" >&6
19231      else
19232        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19233 echo "${ECHO_T}not found ($d: no such directory)" >&6
19234      fi
19235
19236      # replace the directory string with "yes".
19237      with_readdisplay_req="yes"
19238      with_readdisplay=$with_readdisplay_req
19239      ;;
19240
19241     *)
19242      echo ""
19243      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
19244      echo "       If it is a directory, then \`DIR/include' will be added to"
19245      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19246      exit 1
19247      ;;
19248    esac
19249
19250
19251 if test "$with_readdisplay" = yes; then
19252
19253   ac_save_CPPFLAGS="$CPPFLAGS"
19254   if test \! -z "$includedir" ; then
19255     CPPFLAGS="$CPPFLAGS -I$includedir"
19256   fi
19257   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19258   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
19259 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
19260 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
19261   echo $ECHO_N "(cached) $ECHO_C" >&6
19262 else
19263   cat >conftest.$ac_ext <<_ACEOF
19264 /* confdefs.h.  */
19265 _ACEOF
19266 cat confdefs.h >>conftest.$ac_ext
19267 cat >>conftest.$ac_ext <<_ACEOF
19268 /* end confdefs.h.  */
19269 #include <X11/Xlib.h>
19270
19271 #include <X11/extensions/readdisplay.h>
19272 _ACEOF
19273 rm -f conftest.$ac_objext
19274 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19275   (eval $ac_compile) 2>conftest.er1
19276   ac_status=$?
19277   grep -v '^ *+' conftest.er1 >conftest.err
19278   rm -f conftest.er1
19279   cat conftest.err >&5
19280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19281   (exit $ac_status); } &&
19282          { ac_try='test -z "$ac_c_werror_flag"
19283                          || test ! -s conftest.err'
19284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19285   (eval $ac_try) 2>&5
19286   ac_status=$?
19287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19288   (exit $ac_status); }; } &&
19289          { ac_try='test -s conftest.$ac_objext'
19290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19291   (eval $ac_try) 2>&5
19292   ac_status=$?
19293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19294   (exit $ac_status); }; }; then
19295   ac_cv_header_X11_extensions_readdisplay_h=yes
19296 else
19297   echo "$as_me: failed program was:" >&5
19298 sed 's/^/| /' conftest.$ac_ext >&5
19299
19300 ac_cv_header_X11_extensions_readdisplay_h=no
19301 fi
19302 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19303 fi
19304 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
19305 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
19306 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
19307   cat >>confdefs.h <<\_ACEOF
19308 #define HAVE_READ_DISPLAY_EXTENSION 1
19309 _ACEOF
19310
19311 fi
19312
19313
19314   CPPFLAGS="$ac_save_CPPFLAGS"
19315 elif test "$with_readdisplay" != no; then
19316   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
19317   exit 1
19318 fi
19319
19320
19321 ###############################################################################
19322 #
19323 #       Check for a program to generate random text.
19324 #
19325 #       Zippy is funnier than the idiocy generally spat out by `fortune',
19326 #       so first see if "fortune zippy" works.  Else, use plain "fortune".
19327 #
19328 #       We used to dig around in Emacs to look for the "yow" program, but
19329 #       most people who have Emacs also have "fortune zippy", so nevermind.
19330 #
19331 ###############################################################################
19332
19333 with_fortune_req=""
19334
19335 # Check whether --with-fortune or --without-fortune was given.
19336 if test "${with_fortune+set}" = set; then
19337   withval="$with_fortune"
19338   with_fortune_req="$withval"; with_fortune="$withval"
19339 else
19340   with_fortune=yes
19341 fi;
19342
19343 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
19344   with_fortune=""
19345   with_fortune_req=""
19346 fi
19347
19348 if test -n "$with_fortune_req" ; then
19349   ac_cv_fortune_program=""
19350   case "$with_fortune_req" in
19351     /*)
19352
19353       set dummy $with_fortune_req ; fortune_tmp=$2
19354       echo "$as_me:$LINENO: checking for $fortune_tmp" >&5
19355 echo $ECHO_N "checking for $fortune_tmp... $ECHO_C" >&6
19356       if test -x "$fortune_tmp" ; then
19357         echo "$as_me:$LINENO: result: yes" >&5
19358 echo "${ECHO_T}yes" >&6
19359       else
19360         echo "$as_me:$LINENO: result: no" >&5
19361 echo "${ECHO_T}no" >&6
19362         with_fortune=""
19363       fi
19364     ;;
19365     *)
19366       set dummy $with_fortune_req ; fortune_tmp=$2
19367       # don't cache
19368       unset ac_cv_path_fortune_tmp
19369       # Extract the first word of "$fortune_tmp", so it can be a program name with args.
19370 set dummy $fortune_tmp; ac_word=$2
19371 echo "$as_me:$LINENO: checking for $ac_word" >&5
19372 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19373 if test "${ac_cv_path_fortune_tmp+set}" = set; then
19374   echo $ECHO_N "(cached) $ECHO_C" >&6
19375 else
19376   case $fortune_tmp in
19377   [\\/]* | ?:[\\/]*)
19378   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
19379   ;;
19380   *)
19381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19382 for as_dir in $PATH
19383 do
19384   IFS=$as_save_IFS
19385   test -z "$as_dir" && as_dir=.
19386   for ac_exec_ext in '' $ac_executable_extensions; do
19387   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19388     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
19389     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19390     break 2
19391   fi
19392 done
19393 done
19394
19395   ;;
19396 esac
19397 fi
19398 fortune_tmp=$ac_cv_path_fortune_tmp
19399
19400 if test -n "$fortune_tmp"; then
19401   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
19402 echo "${ECHO_T}$fortune_tmp" >&6
19403 else
19404   echo "$as_me:$LINENO: result: no" >&5
19405 echo "${ECHO_T}no" >&6
19406 fi
19407
19408       if test -z "$fortune_tmp" ; then
19409         with_fortune=""
19410       fi
19411     ;;
19412   esac
19413   ac_cv_fortune_program="$with_fortune"
19414
19415 elif test -n "$ac_cv_fortune_program"; then
19416   echo "$as_me:$LINENO: result: checking for fortune... (cached) $ac_cv_fortune_program" >&5
19417 echo "${ECHO_T}checking for fortune... (cached) $ac_cv_fortune_program" >&6
19418 fi
19419
19420 unset ac_cv_path_fortune_tmp
19421 unset fortune_tmp
19422
19423 if test -z "$ac_cv_fortune_program" ; then
19424
19425   # first look for fortune in /usr/games/ (and use absolute path)
19426   for ac_prog in fortune
19427 do
19428   # Extract the first word of "$ac_prog", so it can be a program name with args.
19429 set dummy $ac_prog; ac_word=$2
19430 echo "$as_me:$LINENO: checking for $ac_word" >&5
19431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19432 if test "${ac_cv_path_fortune_tmp+set}" = set; then
19433   echo $ECHO_N "(cached) $ECHO_C" >&6
19434 else
19435   case $fortune_tmp in
19436   [\\/]* | ?:[\\/]*)
19437   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
19438   ;;
19439   *)
19440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19441 for as_dir in "/usr/games"
19442 do
19443   IFS=$as_save_IFS
19444   test -z "$as_dir" && as_dir=.
19445   for ac_exec_ext in '' $ac_executable_extensions; do
19446   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19447     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
19448     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19449     break 2
19450   fi
19451 done
19452 done
19453
19454   ;;
19455 esac
19456 fi
19457 fortune_tmp=$ac_cv_path_fortune_tmp
19458
19459 if test -n "$fortune_tmp"; then
19460   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
19461 echo "${ECHO_T}$fortune_tmp" >&6
19462 else
19463   echo "$as_me:$LINENO: result: no" >&5
19464 echo "${ECHO_T}no" >&6
19465 fi
19466
19467   test -n "$fortune_tmp" && break
19468 done
19469
19470
19471   # if it's not there, look on $PATH (and don't use absolute path)
19472   if test -z "$fortune_tmp" ; then
19473      for ac_prog in fortune
19474 do
19475   # Extract the first word of "$ac_prog", so it can be a program name with args.
19476 set dummy $ac_prog; ac_word=$2
19477 echo "$as_me:$LINENO: checking for $ac_word" >&5
19478 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19479 if test "${ac_cv_prog_fortune_tmp+set}" = set; then
19480   echo $ECHO_N "(cached) $ECHO_C" >&6
19481 else
19482   if test -n "$fortune_tmp"; then
19483   ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
19484 else
19485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19486 for as_dir in $PATH
19487 do
19488   IFS=$as_save_IFS
19489   test -z "$as_dir" && as_dir=.
19490   for ac_exec_ext in '' $ac_executable_extensions; do
19491   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19492     ac_cv_prog_fortune_tmp="$ac_prog"
19493     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19494     break 2
19495   fi
19496 done
19497 done
19498
19499 fi
19500 fi
19501 fortune_tmp=$ac_cv_prog_fortune_tmp
19502 if test -n "$fortune_tmp"; then
19503   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
19504 echo "${ECHO_T}$fortune_tmp" >&6
19505 else
19506   echo "$as_me:$LINENO: result: no" >&5
19507 echo "${ECHO_T}no" >&6
19508 fi
19509
19510   test -n "$fortune_tmp" && break
19511 done
19512
19513   fi
19514
19515   # if we didn't find anything, then just assume /usr/games/
19516   if test -z "$fortune_tmp" ; then
19517      fortune_tmp="/usr/games/fortune"
19518   fi
19519
19520   ac_cv_fortune_program="$fortune_tmp"
19521
19522   # now check to see whether "fortune zippy" works.
19523   #
19524   fortune_tmp="$fortune_tmp zippy"
19525   echo "$as_me:$LINENO: checking for zippy quotes" >&5
19526 echo $ECHO_N "checking for zippy quotes... $ECHO_C" >&6
19527   if ( $fortune_tmp >/dev/null 2>&1 ); then
19528     ac_cv_fortune_program="$fortune_tmp"
19529     echo "$as_me:$LINENO: result: $fortune_tmp" >&5
19530 echo "${ECHO_T}$fortune_tmp" >&6
19531   else
19532     echo "$as_me:$LINENO: result: no" >&5
19533 echo "${ECHO_T}no" >&6
19534   fi
19535
19536 fi
19537
19538 unset ac_cv_path_fortune_tmp
19539 unset fortune_tmp
19540
19541 cat >>confdefs.h <<_ACEOF
19542 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
19543 _ACEOF
19544
19545
19546
19547 ###############################################################################
19548 #
19549 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
19550 #       This should be safe, but let's give people the option.
19551 #
19552 ###############################################################################
19553
19554 setuid_hacks_default=no
19555 setuid_hacks="$setuid_hacks_default"
19556
19557 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
19558 if test "${with_setuid_hacks+set}" = set; then
19559   withval="$with_setuid_hacks"
19560   setuid_hacks="$withval"
19561 else
19562   setuid_hacks="$setuid_hacks_default"
19563 fi;
19564
19565
19566    case "$setuid_hacks" in
19567     yes) ;;
19568     no)  ;;
19569
19570     /*)
19571      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
19572 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
19573      d=$setuid_hacks/include
19574      if test -d $d; then
19575        X_CFLAGS="-I$d $X_CFLAGS"
19576        echo "$as_me:$LINENO: result: $d" >&5
19577 echo "${ECHO_T}$d" >&6
19578      else
19579        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19580 echo "${ECHO_T}not found ($d: no such directory)" >&6
19581      fi
19582
19583      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
19584 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
19585      d=$setuid_hacks/lib
19586      if test -d $d; then
19587        X_LIBS="-L$d $X_LIBS"
19588        echo "$as_me:$LINENO: result: $d" >&5
19589 echo "${ECHO_T}$d" >&6
19590      else
19591        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19592 echo "${ECHO_T}not found ($d: no such directory)" >&6
19593      fi
19594
19595      # replace the directory string with "yes".
19596      setuid_hacks_req="yes"
19597      setuid_hacks=$setuid_hacks_req
19598      ;;
19599
19600     *)
19601      echo ""
19602      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
19603      echo "       If it is a directory, then \`DIR/include' will be added to"
19604      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19605      exit 1
19606      ;;
19607    esac
19608
19609
19610 if test "$setuid_hacks" = yes; then
19611   true
19612 elif test "$setuid_hacks" != no; then
19613   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
19614   exit 1
19615 fi
19616
19617
19618 ###############################################################################
19619 #
19620 #       Done testing.  Now, set up the various -I and -L variables,
19621 #       and decide which GUI program to build by default.
19622 #
19623 ###############################################################################
19624
19625 DEPEND=makedepend
19626 DEPEND_FLAGS=
19627 DEPEND_DEFINES=
19628
19629
19630 if test \! -z "$includedir" ; then
19631   INCLUDES="$INCLUDES -I$includedir"
19632 fi
19633
19634 if test \! -z "$libdir" ; then
19635   LDFLAGS="$LDFLAGS -L$libdir"
19636 fi
19637
19638
19639 PREFERRED_DEMO_PROGRAM=''
19640 ALL_DEMO_PROGRAMS=
19641 if test "$have_motif" = yes; then
19642   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
19643   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
19644 fi
19645 if test "$have_gtk" = yes; then
19646   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
19647   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
19648 fi
19649
19650
19651 if test "$have_kerberos" = yes; then
19652   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
19653   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
19654 fi
19655 if test "$have_pam" = yes; then
19656   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
19657   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
19658   INSTALL_PAM="install-pam"
19659 fi
19660 if test "$have_passwd_helper" = yes; then
19661   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
19662   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
19663 fi
19664   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
19665   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
19666
19667
19668 if test "$enable_locking" = yes; then
19669   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
19670   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
19671 else
19672   LOCK_SRCS='$(NOLOCK_SRCS_1)'
19673   LOCK_OBJS='$(NOLOCK_OBJS_1)'
19674 fi
19675
19676 if test "$ac_macosx" = yes; then
19677   EXES_OSX='$(EXES_OSX)'
19678   SCRIPTS_OSX='$(SCRIPTS_OSX)'
19679   MEN_OSX='$(MEN_OSX)'
19680 else
19681   EXES_OSX=
19682   SCRIPTS_OSX=
19683   MEN_OSX=
19684 fi
19685
19686
19687 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
19688
19689 if test "$need_setuid" = yes; then
19690   NEED_SETUID=yes
19691 else
19692   NEED_SETUID=no
19693 fi
19694
19695 if test "$setuid_hacks" = yes; then
19696   SETUID_HACKS=yes
19697 else
19698   SETUID_HACKS=no
19699 fi
19700
19701 tab='   '
19702 if test "$have_gl" = yes; then
19703   GL_EXES='$(GL_EXES)'
19704   GL_UTIL_EXES='$(GL_UTIL_EXES)'
19705   GL_MEN='$(GL_MEN)'
19706   GL_KLUDGE="${tab}  "
19707 else
19708   GL_KLUDGE="-${tab}  "
19709 fi
19710
19711 if test "$have_gle" = yes; then
19712   GLE_EXES='$(GLE_EXES)'
19713   GLE_KLUDGE="${tab}   "
19714 else
19715   GLE_KLUDGE="-${tab}   "
19716 fi
19717
19718 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
19719  JPEG_EXES='$(JPEG_EXES)'
19720 fi
19721
19722
19723 # Another substitution in the XScreenSaver.ad.in file:
19724 #
19725 if test "$have_gnome_help" = yes; then
19726   GNOMEHELP_Y=''
19727   GNOMEHELP_N='!    '
19728 else
19729   GNOMEHELP_Y='!    '
19730   GNOMEHELP_N=''
19731 fi
19732
19733
19734 # Now that we know whether we have Gnome, we can decide where the XML
19735 # config files get installed.
19736 #
19737 if test -z "$HACK_CONF_DIR" ; then
19738   if test -n "$GNOME_DATADIR" ; then
19739     HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
19740   else
19741     HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
19742   fi
19743 fi
19744
19745
19746
19747 # After computing $HACK_CONF_DIR, make sure $GLADE_DATADIR has a value
19748 # so that we know where to install the Gtk pixmaps.
19749 #
19750 # It should usually be "/usr/share/pixmaps/", but we can't just use
19751 # "$(prefix)/share/pixmaps" because that would usually result in
19752 # "/usr/X11R6/share/pixmaps/", which is wrong.  It needs to be the
19753 # Gtk prefix, not the overall prefix.
19754 #
19755 if test -n "$GNOME_DATADIR" ; then
19756   GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver'
19757 elif test "$have_gtk" = yes; then
19758   GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
19759   GLADE_DATADIR="$GLADE_DATADIR/share/xscreensaver"
19760 else
19761   GLADE_DATADIR=''
19762 fi
19763
19764
19765 # Set PO_DATADIR to something sensible.
19766 #
19767 echo "$as_me:$LINENO: checking for locale directory" >&5
19768 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
19769 if test -n "$GNOME_DATADIR" ; then
19770   PO_DATADIR="$GNOME_DATADIR"
19771 elif test "$have_gtk" = yes; then
19772   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
19773   PO_DATADIR="$PO_DATADIR/share"
19774 fi
19775
19776 if test -z "$PO_DATADIR" ; then
19777   #
19778   # #### Total fucking kludge --
19779   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
19780   # but of course we need to expand all the nested variables to do that...
19781   #
19782   dd=$datadir
19783   eval dd=${dd}
19784   eval dd=${dd}
19785   eval dd=${dd}
19786   eval dd=${dd}
19787   eval dd=${dd}
19788   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
19789 fi
19790
19791 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
19792 echo "${ECHO_T}$PO_DATADIR/locale" >&6
19793
19794
19795 # canonicalize slashes.
19796 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
19797
19798 # gcc 3.0 likes to issue this warning for every file:
19799 #
19800 # cc1: warning: changing search order for system directory "/usr/local/include"
19801 # cc1: warning:   as it has already been specified as a non-system directory
19802 #
19803 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
19804 # Which *should* be totally redundant, and thus an ok thing to delete?
19805 #
19806 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
19807
19808
19809 ###############################################################################
19810 #
19811 #       Perform substitutions and write Makefiles.
19812 #
19813 ###############################################################################
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869 APPDEFAULTS=$ac_x_app_defaults
19870
19871
19872
19873
19874
19875
19876
19877                                                                                 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"
19878 cat >confcache <<\_ACEOF
19879 # This file is a shell script that caches the results of configure
19880 # tests run on this system so they can be shared between configure
19881 # scripts and configure runs, see configure's option --config-cache.
19882 # It is not useful on other systems.  If it contains results you don't
19883 # want to keep, you may remove or edit it.
19884 #
19885 # config.status only pays attention to the cache file if you give it
19886 # the --recheck option to rerun configure.
19887 #
19888 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19889 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19890 # following values.
19891
19892 _ACEOF
19893
19894 # The following way of writing the cache mishandles newlines in values,
19895 # but we know of no workaround that is simple, portable, and efficient.
19896 # So, don't put newlines in cache variables' values.
19897 # Ultrix sh set writes to stderr and can't be redirected directly,
19898 # and sets the high bit in the cache file unless we assign to the vars.
19899 {
19900   (set) 2>&1 |
19901     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19902     *ac_space=\ *)
19903       # `set' does not quote correctly, so add quotes (double-quote
19904       # substitution turns \\\\ into \\, and sed turns \\ into \).
19905       sed -n \
19906         "s/'/'\\\\''/g;
19907           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19908       ;;
19909     *)
19910       # `set' quotes correctly as required by POSIX, so do not add quotes.
19911       sed -n \
19912         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19913       ;;
19914     esac;
19915 } |
19916   sed '
19917      t clear
19918      : clear
19919      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19920      t end
19921      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19922      : end' >>confcache
19923 if diff $cache_file confcache >/dev/null 2>&1; then :; else
19924   if test -w $cache_file; then
19925     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19926     cat confcache >$cache_file
19927   else
19928     echo "not updating unwritable cache $cache_file"
19929   fi
19930 fi
19931 rm -f confcache
19932
19933 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19934 # Let make expand exec_prefix.
19935 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19936
19937 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19938 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19939 # trailing colons and then remove the whole line if VPATH becomes empty
19940 # (actually we leave an empty line to preserve line numbers).
19941 if test "x$srcdir" = x.; then
19942   ac_vpsub='/^[  ]*VPATH[        ]*=/{
19943 s/:*\$(srcdir):*/:/;
19944 s/:*\${srcdir}:*/:/;
19945 s/:*@srcdir@:*/:/;
19946 s/^\([^=]*=[     ]*\):*/\1/;
19947 s/:*$//;
19948 s/^[^=]*=[       ]*$//;
19949 }'
19950 fi
19951
19952 DEFS=-DHAVE_CONFIG_H
19953
19954 ac_libobjs=
19955 ac_ltlibobjs=
19956 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19957   # 1. Remove the extension, and $U if already installed.
19958   ac_i=`echo "$ac_i" |
19959          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
19960   # 2. Add them.
19961   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
19962   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
19963 done
19964 LIBOBJS=$ac_libobjs
19965
19966 LTLIBOBJS=$ac_ltlibobjs
19967
19968
19969
19970
19971         mv -f po/POTFILES po/POTFILES.tmp
19972         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
19973         rm -f po/POTFILES.tmp
19974
19975
19976
19977 : ${CONFIG_STATUS=./config.status}
19978 ac_clean_files_save=$ac_clean_files
19979 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19980 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
19981 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19982 cat >$CONFIG_STATUS <<_ACEOF
19983 #! $SHELL
19984 # Generated by $as_me.
19985 # Run this file to recreate the current configuration.
19986 # Compiler output produced by configure, useful for debugging
19987 # configure, is in config.log if it exists.
19988
19989 debug=false
19990 ac_cs_recheck=false
19991 ac_cs_silent=false
19992 SHELL=\${CONFIG_SHELL-$SHELL}
19993 _ACEOF
19994
19995 cat >>$CONFIG_STATUS <<\_ACEOF
19996 ## --------------------- ##
19997 ## M4sh Initialization.  ##
19998 ## --------------------- ##
19999
20000 # Be Bourne compatible
20001 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20002   emulate sh
20003   NULLCMD=:
20004   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20005   # is contrary to our usage.  Disable this feature.
20006   alias -g '${1+"$@"}'='"$@"'
20007 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20008   set -o posix
20009 fi
20010 DUALCASE=1; export DUALCASE # for MKS sh
20011
20012 # Support unset when possible.
20013 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
20014   as_unset=unset
20015 else
20016   as_unset=false
20017 fi
20018
20019
20020 # Work around bugs in pre-3.0 UWIN ksh.
20021 $as_unset ENV MAIL MAILPATH
20022 PS1='$ '
20023 PS2='> '
20024 PS4='+ '
20025
20026 # NLS nuisances.
20027 for as_var in \
20028   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20029   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20030   LC_TELEPHONE LC_TIME
20031 do
20032   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
20033     eval $as_var=C; export $as_var
20034   else
20035     $as_unset $as_var
20036   fi
20037 done
20038
20039 # Required to use basename.
20040 if expr a : '\(a\)' >/dev/null 2>&1; then
20041   as_expr=expr
20042 else
20043   as_expr=false
20044 fi
20045
20046 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
20047   as_basename=basename
20048 else
20049   as_basename=false
20050 fi
20051
20052
20053 # Name of the executable.
20054 as_me=`$as_basename "$0" ||
20055 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20056          X"$0" : 'X\(//\)$' \| \
20057          X"$0" : 'X\(/\)$' \| \
20058          .     : '\(.\)' 2>/dev/null ||
20059 echo X/"$0" |
20060     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
20061           /^X\/\(\/\/\)$/{ s//\1/; q; }
20062           /^X\/\(\/\).*/{ s//\1/; q; }
20063           s/.*/./; q'`
20064
20065
20066 # PATH needs CR, and LINENO needs CR and PATH.
20067 # Avoid depending upon Character Ranges.
20068 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20069 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20070 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20071 as_cr_digits='0123456789'
20072 as_cr_alnum=$as_cr_Letters$as_cr_digits
20073
20074 # The user is always right.
20075 if test "${PATH_SEPARATOR+set}" != set; then
20076   echo "#! /bin/sh" >conf$$.sh
20077   echo  "exit 0"   >>conf$$.sh
20078   chmod +x conf$$.sh
20079   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20080     PATH_SEPARATOR=';'
20081   else
20082     PATH_SEPARATOR=:
20083   fi
20084   rm -f conf$$.sh
20085 fi
20086
20087
20088   as_lineno_1=$LINENO
20089   as_lineno_2=$LINENO
20090   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20091   test "x$as_lineno_1" != "x$as_lineno_2" &&
20092   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
20093   # Find who we are.  Look in the path if we contain no path at all
20094   # relative or not.
20095   case $0 in
20096     *[\\/]* ) as_myself=$0 ;;
20097     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20098 for as_dir in $PATH
20099 do
20100   IFS=$as_save_IFS
20101   test -z "$as_dir" && as_dir=.
20102   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20103 done
20104
20105        ;;
20106   esac
20107   # We did not find ourselves, most probably we were run as `sh COMMAND'
20108   # in which case we are not to be found in the path.
20109   if test "x$as_myself" = x; then
20110     as_myself=$0
20111   fi
20112   if test ! -f "$as_myself"; then
20113     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
20114 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
20115    { (exit 1); exit 1; }; }
20116   fi
20117   case $CONFIG_SHELL in
20118   '')
20119     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20120 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
20121 do
20122   IFS=$as_save_IFS
20123   test -z "$as_dir" && as_dir=.
20124   for as_base in sh bash ksh sh5; do
20125          case $as_dir in
20126          /*)
20127            if ("$as_dir/$as_base" -c '
20128   as_lineno_1=$LINENO
20129   as_lineno_2=$LINENO
20130   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20131   test "x$as_lineno_1" != "x$as_lineno_2" &&
20132   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
20133              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
20134              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
20135              CONFIG_SHELL=$as_dir/$as_base
20136              export CONFIG_SHELL
20137              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
20138            fi;;
20139          esac
20140        done
20141 done
20142 ;;
20143   esac
20144
20145   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20146   # uniformly replaced by the line number.  The first 'sed' inserts a
20147   # line-number line before each line; the second 'sed' does the real
20148   # work.  The second script uses 'N' to pair each line-number line
20149   # with the numbered line, and appends trailing '-' during
20150   # substitution so that $LINENO is not a special case at line end.
20151   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20152   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
20153   sed '=' <$as_myself |
20154     sed '
20155       N
20156       s,$,-,
20157       : loop
20158       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
20159       t loop
20160       s,-$,,
20161       s,^['$as_cr_digits']*\n,,
20162     ' >$as_me.lineno &&
20163   chmod +x $as_me.lineno ||
20164     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
20165 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
20166    { (exit 1); exit 1; }; }
20167
20168   # Don't try to exec as it changes $[0], causing all sort of problems
20169   # (the dirname of $[0] is not the place where we might find the
20170   # original and so on.  Autoconf is especially sensible to this).
20171   . ./$as_me.lineno
20172   # Exit status is that of the last command.
20173   exit
20174 }
20175
20176
20177 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
20178   *c*,-n*) ECHO_N= ECHO_C='
20179 ' ECHO_T='      ' ;;
20180   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
20181   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
20182 esac
20183
20184 if expr a : '\(a\)' >/dev/null 2>&1; then
20185   as_expr=expr
20186 else
20187   as_expr=false
20188 fi
20189
20190 rm -f conf$$ conf$$.exe conf$$.file
20191 echo >conf$$.file
20192 if ln -s conf$$.file conf$$ 2>/dev/null; then
20193   # We could just check for DJGPP; but this test a) works b) is more generic
20194   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20195   if test -f conf$$.exe; then
20196     # Don't use ln at all; we don't have any links
20197     as_ln_s='cp -p'
20198   else
20199     as_ln_s='ln -s'
20200   fi
20201 elif ln conf$$.file conf$$ 2>/dev/null; then
20202   as_ln_s=ln
20203 else
20204   as_ln_s='cp -p'
20205 fi
20206 rm -f conf$$ conf$$.exe conf$$.file
20207
20208 if mkdir -p . 2>/dev/null; then
20209   as_mkdir_p=:
20210 else
20211   test -d ./-p && rmdir ./-p
20212   as_mkdir_p=false
20213 fi
20214
20215 as_executable_p="test -f"
20216
20217 # Sed expression to map a string onto a valid CPP name.
20218 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20219
20220 # Sed expression to map a string onto a valid variable name.
20221 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20222
20223
20224 # IFS
20225 # We need space, tab and new line, in precisely that order.
20226 as_nl='
20227 '
20228 IFS="   $as_nl"
20229
20230 # CDPATH.
20231 $as_unset CDPATH
20232
20233 exec 6>&1
20234
20235 # Open the log real soon, to keep \$[0] and so on meaningful, and to
20236 # report actual input values of CONFIG_FILES etc. instead of their
20237 # values after options handling.  Logging --version etc. is OK.
20238 exec 5>>config.log
20239 {
20240   echo
20241   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20242 ## Running $as_me. ##
20243 _ASBOX
20244 } >&5
20245 cat >&5 <<_CSEOF
20246
20247 This file was extended by $as_me, which was
20248 generated by GNU Autoconf 2.59.  Invocation command line was
20249
20250   CONFIG_FILES    = $CONFIG_FILES
20251   CONFIG_HEADERS  = $CONFIG_HEADERS
20252   CONFIG_LINKS    = $CONFIG_LINKS
20253   CONFIG_COMMANDS = $CONFIG_COMMANDS
20254   $ $0 $@
20255
20256 _CSEOF
20257 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
20258 echo >&5
20259 _ACEOF
20260
20261 # Files that config.status was made for.
20262 if test -n "$ac_config_files"; then
20263   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20264 fi
20265
20266 if test -n "$ac_config_headers"; then
20267   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20268 fi
20269
20270 if test -n "$ac_config_links"; then
20271   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20272 fi
20273
20274 if test -n "$ac_config_commands"; then
20275   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20276 fi
20277
20278 cat >>$CONFIG_STATUS <<\_ACEOF
20279
20280 ac_cs_usage="\
20281 \`$as_me' instantiates files from templates according to the
20282 current configuration.
20283
20284 Usage: $0 [OPTIONS] [FILE]...
20285
20286   -h, --help       print this help, then exit
20287   -V, --version    print version number, then exit
20288   -q, --quiet      do not print progress messages
20289   -d, --debug      don't remove temporary files
20290       --recheck    update $as_me by reconfiguring in the same conditions
20291   --file=FILE[:TEMPLATE]
20292                    instantiate the configuration file FILE
20293   --header=FILE[:TEMPLATE]
20294                    instantiate the configuration header FILE
20295
20296 Configuration files:
20297 $config_files
20298
20299 Configuration headers:
20300 $config_headers
20301
20302 Configuration commands:
20303 $config_commands
20304
20305 Report bugs to <bug-autoconf@gnu.org>."
20306 _ACEOF
20307
20308 cat >>$CONFIG_STATUS <<_ACEOF
20309 ac_cs_version="\\
20310 config.status
20311 configured by $0, generated by GNU Autoconf 2.59,
20312   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20313
20314 Copyright (C) 2003 Free Software Foundation, Inc.
20315 This config.status script is free software; the Free Software Foundation
20316 gives unlimited permission to copy, distribute and modify it."
20317 srcdir=$srcdir
20318 INSTALL="$INSTALL"
20319 _ACEOF
20320
20321 cat >>$CONFIG_STATUS <<\_ACEOF
20322 # If no file are specified by the user, then we need to provide default
20323 # value.  By we need to know if files were specified by the user.
20324 ac_need_defaults=:
20325 while test $# != 0
20326 do
20327   case $1 in
20328   --*=*)
20329     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20330     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20331     ac_shift=:
20332     ;;
20333   -*)
20334     ac_option=$1
20335     ac_optarg=$2
20336     ac_shift=shift
20337     ;;
20338   *) # This is not an option, so the user has probably given explicit
20339      # arguments.
20340      ac_option=$1
20341      ac_need_defaults=false;;
20342   esac
20343
20344   case $ac_option in
20345   # Handling of the options.
20346 _ACEOF
20347 cat >>$CONFIG_STATUS <<\_ACEOF
20348   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20349     ac_cs_recheck=: ;;
20350   --version | --vers* | -V )
20351     echo "$ac_cs_version"; exit 0 ;;
20352   --he | --h)
20353     # Conflict between --help and --header
20354     { { echo "$as_me:$LINENO: error: ambiguous option: $1
20355 Try \`$0 --help' for more information." >&5
20356 echo "$as_me: error: ambiguous option: $1
20357 Try \`$0 --help' for more information." >&2;}
20358    { (exit 1); exit 1; }; };;
20359   --help | --hel | -h )
20360     echo "$ac_cs_usage"; exit 0 ;;
20361   --debug | --d* | -d )
20362     debug=: ;;
20363   --file | --fil | --fi | --f )
20364     $ac_shift
20365     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
20366     ac_need_defaults=false;;
20367   --header | --heade | --head | --hea )
20368     $ac_shift
20369     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
20370     ac_need_defaults=false;;
20371   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20372   | -silent | --silent | --silen | --sile | --sil | --si | --s)
20373     ac_cs_silent=: ;;
20374
20375   # This is an error.
20376   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
20377 Try \`$0 --help' for more information." >&5
20378 echo "$as_me: error: unrecognized option: $1
20379 Try \`$0 --help' for more information." >&2;}
20380    { (exit 1); exit 1; }; } ;;
20381
20382   *) ac_config_targets="$ac_config_targets $1" ;;
20383
20384   esac
20385   shift
20386 done
20387
20388 ac_configure_extra_args=
20389
20390 if $ac_cs_silent; then
20391   exec 6>/dev/null
20392   ac_configure_extra_args="$ac_configure_extra_args --silent"
20393 fi
20394
20395 _ACEOF
20396 cat >>$CONFIG_STATUS <<_ACEOF
20397 if \$ac_cs_recheck; then
20398   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
20399   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20400 fi
20401
20402 _ACEOF
20403
20404 cat >>$CONFIG_STATUS <<_ACEOF
20405 #
20406 # INIT-COMMANDS section.
20407 #
20408
20409 INTLTOOL_PERL=${INTLTOOL_PERL}
20410
20411
20412 _ACEOF
20413
20414
20415
20416 cat >>$CONFIG_STATUS <<\_ACEOF
20417 for ac_config_target in $ac_config_targets
20418 do
20419   case "$ac_config_target" in
20420   # Handling of arguments.
20421   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20422   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
20423   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
20424   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
20425   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
20426   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
20427   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
20428   "driver/xscreensaver.kss" ) CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.kss" ;;
20429   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
20430   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
20431   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
20432   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
20433 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20434    { (exit 1); exit 1; }; };;
20435   esac
20436 done
20437
20438 # If the user did not use the arguments to specify the items to instantiate,
20439 # then the envvar interface is used.  Set only those that are not.
20440 # We use the long form for the default assignment because of an extremely
20441 # bizarre bug on SunOS 4.1.3.
20442 if $ac_need_defaults; then
20443   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20444   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20445   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20446 fi
20447
20448 # Have a temporary directory for convenience.  Make it in the build tree
20449 # simply because there is no reason to put it here, and in addition,
20450 # creating and moving files from /tmp can sometimes cause problems.
20451 # Create a temporary directory, and hook for its removal unless debugging.
20452 $debug ||
20453 {
20454   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20455   trap '{ (exit 1); exit 1; }' 1 2 13 15
20456 }
20457
20458 # Create a (secure) tmp directory for tmp files.
20459
20460 {
20461   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
20462   test -n "$tmp" && test -d "$tmp"
20463 }  ||
20464 {
20465   tmp=./confstat$$-$RANDOM
20466   (umask 077 && mkdir $tmp)
20467 } ||
20468 {
20469    echo "$me: cannot create a temporary directory in ." >&2
20470    { (exit 1); exit 1; }
20471 }
20472
20473 _ACEOF
20474
20475 cat >>$CONFIG_STATUS <<_ACEOF
20476
20477 #
20478 # CONFIG_FILES section.
20479 #
20480
20481 # No need to generate the scripts if there are no CONFIG_FILES.
20482 # This happens for instance when ./config.status config.h
20483 if test -n "\$CONFIG_FILES"; then
20484   # Protect against being on the right side of a sed subst in config.status.
20485   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20486    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20487 s,@SHELL@,$SHELL,;t t
20488 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20489 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20490 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20491 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20492 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20493 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20494 s,@exec_prefix@,$exec_prefix,;t t
20495 s,@prefix@,$prefix,;t t
20496 s,@program_transform_name@,$program_transform_name,;t t
20497 s,@bindir@,$bindir,;t t
20498 s,@sbindir@,$sbindir,;t t
20499 s,@libexecdir@,$libexecdir,;t t
20500 s,@datadir@,$datadir,;t t
20501 s,@sysconfdir@,$sysconfdir,;t t
20502 s,@sharedstatedir@,$sharedstatedir,;t t
20503 s,@localstatedir@,$localstatedir,;t t
20504 s,@libdir@,$libdir,;t t
20505 s,@includedir@,$includedir,;t t
20506 s,@oldincludedir@,$oldincludedir,;t t
20507 s,@infodir@,$infodir,;t t
20508 s,@mandir@,$mandir,;t t
20509 s,@build_alias@,$build_alias,;t t
20510 s,@host_alias@,$host_alias,;t t
20511 s,@target_alias@,$target_alias,;t t
20512 s,@DEFS@,$DEFS,;t t
20513 s,@ECHO_C@,$ECHO_C,;t t
20514 s,@ECHO_N@,$ECHO_N,;t t
20515 s,@ECHO_T@,$ECHO_T,;t t
20516 s,@LIBS@,$LIBS,;t t
20517 s,@build@,$build,;t t
20518 s,@build_cpu@,$build_cpu,;t t
20519 s,@build_vendor@,$build_vendor,;t t
20520 s,@build_os@,$build_os,;t t
20521 s,@host@,$host,;t t
20522 s,@host_cpu@,$host_cpu,;t t
20523 s,@host_vendor@,$host_vendor,;t t
20524 s,@host_os@,$host_os,;t t
20525 s,@CC@,$CC,;t t
20526 s,@CFLAGS@,$CFLAGS,;t t
20527 s,@LDFLAGS@,$LDFLAGS,;t t
20528 s,@CPPFLAGS@,$CPPFLAGS,;t t
20529 s,@ac_ct_CC@,$ac_ct_CC,;t t
20530 s,@EXEEXT@,$EXEEXT,;t t
20531 s,@OBJEXT@,$OBJEXT,;t t
20532 s,@CPP@,$CPP,;t t
20533 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20534 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20535 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20536 s,@SET_MAKE@,$SET_MAKE,;t t
20537 s,@EGREP@,$EGREP,;t t
20538 s,@PERL@,$PERL,;t t
20539 s,@X_CFLAGS@,$X_CFLAGS,;t t
20540 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
20541 s,@X_LIBS@,$X_LIBS,;t t
20542 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
20543 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
20544 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
20545 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
20546 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
20547 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
20548 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
20549 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
20550 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
20551 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
20552 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
20553 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
20554 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
20555 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
20556 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
20557 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
20558 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
20559 s,@RANLIB@,$RANLIB,;t t
20560 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20561 s,@ALLOCA@,$ALLOCA,;t t
20562 s,@USE_NLS@,$USE_NLS,;t t
20563 s,@MSGFMT@,$MSGFMT,;t t
20564 s,@GMSGFMT@,$GMSGFMT,;t t
20565 s,@XGETTEXT@,$XGETTEXT,;t t
20566 s,@CATALOGS@,$CATALOGS,;t t
20567 s,@CATOBJEXT@,$CATOBJEXT,;t t
20568 s,@DATADIRNAME@,$DATADIRNAME,;t t
20569 s,@GMOFILES@,$GMOFILES,;t t
20570 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
20571 s,@INTLDEPS@,$INTLDEPS,;t t
20572 s,@INTLLIBS@,$INTLLIBS,;t t
20573 s,@INTLOBJS@,$INTLOBJS,;t t
20574 s,@POFILES@,$POFILES,;t t
20575 s,@POSUB@,$POSUB,;t t
20576 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
20577 s,@pkg_config@,$pkg_config,;t t
20578 s,@have_gnome_help@,$have_gnome_help,;t t
20579 s,@fortune_tmp@,$fortune_tmp,;t t
20580 s,@INCLUDES@,$INCLUDES,;t t
20581 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
20582 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
20583 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
20584 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
20585 s,@GTK_LIBS@,$GTK_LIBS,;t t
20586 s,@XML_LIBS@,$XML_LIBS,;t t
20587 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
20588 s,@HACK_LIBS@,$HACK_LIBS,;t t
20589 s,@XPM_LIBS@,$XPM_LIBS,;t t
20590 s,@PTY_LIBS@,$PTY_LIBS,;t t
20591 s,@GL_LIBS@,$GL_LIBS,;t t
20592 s,@GLE_LIBS@,$GLE_LIBS,;t t
20593 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
20594 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
20595 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
20596 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
20597 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
20598 s,@NEED_SETUID@,$NEED_SETUID,;t t
20599 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
20600 s,@OBJCC@,$OBJCC,;t t
20601 s,@EXES_OSX@,$EXES_OSX,;t t
20602 s,@SCRIPTS_OSX@,$SCRIPTS_OSX,;t t
20603 s,@MEN_OSX@,$MEN_OSX,;t t
20604 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
20605 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
20606 s,@XMU_SRCS@,$XMU_SRCS,;t t
20607 s,@XMU_OBJS@,$XMU_OBJS,;t t
20608 s,@XMU_LIBS@,$XMU_LIBS,;t t
20609 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
20610 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
20611 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
20612 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
20613 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
20614 s,@JPEG_EXES@,$JPEG_EXES,;t t
20615 s,@GL_EXES@,$GL_EXES,;t t
20616 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
20617 s,@GL_MEN@,$GL_MEN,;t t
20618 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
20619 s,@GLE_EXES@,$GLE_EXES,;t t
20620 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
20621 s,@GNOMEHELP_Y@,$GNOMEHELP_Y,;t t
20622 s,@GNOMEHELP_N@,$GNOMEHELP_N,;t t
20623 s,@HACKDIR@,$HACKDIR,;t t
20624 s,@GNOME_DATADIR@,$GNOME_DATADIR,;t t
20625 s,@GLADE_DATADIR@,$GLADE_DATADIR,;t t
20626 s,@PO_DATADIR@,$PO_DATADIR,;t t
20627 s,@GNOME_PANELDIR@,$GNOME_PANELDIR,;t t
20628 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
20629 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
20630 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
20631 s,@DEPEND@,$DEPEND,;t t
20632 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
20633 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
20634 s,@LIBOBJS@,$LIBOBJS,;t t
20635 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
20636 CEOF
20637
20638 _ACEOF
20639
20640   cat >>$CONFIG_STATUS <<\_ACEOF
20641   # Split the substitutions into bite-sized pieces for seds with
20642   # small command number limits, like on Digital OSF/1 and HP-UX.
20643   ac_max_sed_lines=48
20644   ac_sed_frag=1 # Number of current file.
20645   ac_beg=1 # First line for current file.
20646   ac_end=$ac_max_sed_lines # Line after last line for current file.
20647   ac_more_lines=:
20648   ac_sed_cmds=
20649   while $ac_more_lines; do
20650     if test $ac_beg -gt 1; then
20651       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20652     else
20653       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20654     fi
20655     if test ! -s $tmp/subs.frag; then
20656       ac_more_lines=false
20657     else
20658       # The purpose of the label and of the branching condition is to
20659       # speed up the sed processing (if there are no `@' at all, there
20660       # is no need to browse any of the substitutions).
20661       # These are the two extra sed commands mentioned above.
20662       (echo ':t
20663   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20664       if test -z "$ac_sed_cmds"; then
20665         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20666       else
20667         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20668       fi
20669       ac_sed_frag=`expr $ac_sed_frag + 1`
20670       ac_beg=$ac_end
20671       ac_end=`expr $ac_end + $ac_max_sed_lines`
20672     fi
20673   done
20674   if test -z "$ac_sed_cmds"; then
20675     ac_sed_cmds=cat
20676   fi
20677 fi # test -n "$CONFIG_FILES"
20678
20679 _ACEOF
20680 cat >>$CONFIG_STATUS <<\_ACEOF
20681 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20682   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20683   case $ac_file in
20684   - | *:- | *:-:* ) # input from stdin
20685         cat >$tmp/stdin
20686         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20687         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20688   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20689         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20690   * )   ac_file_in=$ac_file.in ;;
20691   esac
20692
20693   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20694   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
20695 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20696          X"$ac_file" : 'X\(//\)[^/]' \| \
20697          X"$ac_file" : 'X\(//\)$' \| \
20698          X"$ac_file" : 'X\(/\)' \| \
20699          .     : '\(.\)' 2>/dev/null ||
20700 echo X"$ac_file" |
20701     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20702           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20703           /^X\(\/\/\)$/{ s//\1/; q; }
20704           /^X\(\/\).*/{ s//\1/; q; }
20705           s/.*/./; q'`
20706   { if $as_mkdir_p; then
20707     mkdir -p "$ac_dir"
20708   else
20709     as_dir="$ac_dir"
20710     as_dirs=
20711     while test ! -d "$as_dir"; do
20712       as_dirs="$as_dir $as_dirs"
20713       as_dir=`(dirname "$as_dir") 2>/dev/null ||
20714 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20715          X"$as_dir" : 'X\(//\)[^/]' \| \
20716          X"$as_dir" : 'X\(//\)$' \| \
20717          X"$as_dir" : 'X\(/\)' \| \
20718          .     : '\(.\)' 2>/dev/null ||
20719 echo X"$as_dir" |
20720     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20721           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20722           /^X\(\/\/\)$/{ s//\1/; q; }
20723           /^X\(\/\).*/{ s//\1/; q; }
20724           s/.*/./; q'`
20725     done
20726     test ! -n "$as_dirs" || mkdir $as_dirs
20727   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20728 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20729    { (exit 1); exit 1; }; }; }
20730
20731   ac_builddir=.
20732
20733 if test "$ac_dir" != .; then
20734   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
20735   # A "../" for each directory in $ac_dir_suffix.
20736   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
20737 else
20738   ac_dir_suffix= ac_top_builddir=
20739 fi
20740
20741 case $srcdir in
20742   .)  # No --srcdir option.  We are building in place.
20743     ac_srcdir=.
20744     if test -z "$ac_top_builddir"; then
20745        ac_top_srcdir=.
20746     else
20747        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
20748     fi ;;
20749   [\\/]* | ?:[\\/]* )  # Absolute path.
20750     ac_srcdir=$srcdir$ac_dir_suffix;
20751     ac_top_srcdir=$srcdir ;;
20752   *) # Relative path.
20753     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
20754     ac_top_srcdir=$ac_top_builddir$srcdir ;;
20755 esac
20756
20757 # Do not use `cd foo && pwd` to compute absolute paths, because
20758 # the directories may not exist.
20759 case `pwd` in
20760 .) ac_abs_builddir="$ac_dir";;
20761 *)
20762   case "$ac_dir" in
20763   .) ac_abs_builddir=`pwd`;;
20764   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
20765   *) ac_abs_builddir=`pwd`/"$ac_dir";;
20766   esac;;
20767 esac
20768 case $ac_abs_builddir in
20769 .) ac_abs_top_builddir=${ac_top_builddir}.;;
20770 *)
20771   case ${ac_top_builddir}. in
20772   .) ac_abs_top_builddir=$ac_abs_builddir;;
20773   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
20774   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
20775   esac;;
20776 esac
20777 case $ac_abs_builddir in
20778 .) ac_abs_srcdir=$ac_srcdir;;
20779 *)
20780   case $ac_srcdir in
20781   .) ac_abs_srcdir=$ac_abs_builddir;;
20782   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
20783   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
20784   esac;;
20785 esac
20786 case $ac_abs_builddir in
20787 .) ac_abs_top_srcdir=$ac_top_srcdir;;
20788 *)
20789   case $ac_top_srcdir in
20790   .) ac_abs_top_srcdir=$ac_abs_builddir;;
20791   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
20792   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
20793   esac;;
20794 esac
20795
20796
20797   case $INSTALL in
20798   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20799   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
20800   esac
20801
20802   if test x"$ac_file" != x-; then
20803     { echo "$as_me:$LINENO: creating $ac_file" >&5
20804 echo "$as_me: creating $ac_file" >&6;}
20805     rm -f "$ac_file"
20806   fi
20807   # Let's still pretend it is `configure' which instantiates (i.e., don't
20808   # use $as_me), people would be surprised to read:
20809   #    /* config.h.  Generated by config.status.  */
20810   if test x"$ac_file" = x-; then
20811     configure_input=
20812   else
20813     configure_input="$ac_file.  "
20814   fi
20815   configure_input=$configure_input"Generated from `echo $ac_file_in |
20816                                      sed 's,.*/,,'` by configure."
20817
20818   # First look for the input files in the build tree, otherwise in the
20819   # src tree.
20820   ac_file_inputs=`IFS=:
20821     for f in $ac_file_in; do
20822       case $f in
20823       -) echo $tmp/stdin ;;
20824       [\\/$]*)
20825          # Absolute (can't be DOS-style, as IFS=:)
20826          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20827 echo "$as_me: error: cannot find input file: $f" >&2;}
20828    { (exit 1); exit 1; }; }
20829          echo "$f";;
20830       *) # Relative
20831          if test -f "$f"; then
20832            # Build tree
20833            echo "$f"
20834          elif test -f "$srcdir/$f"; then
20835            # Source tree
20836            echo "$srcdir/$f"
20837          else
20838            # /dev/null tree
20839            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20840 echo "$as_me: error: cannot find input file: $f" >&2;}
20841    { (exit 1); exit 1; }; }
20842          fi;;
20843       esac
20844     done` || { (exit 1); exit 1; }
20845 _ACEOF
20846 cat >>$CONFIG_STATUS <<_ACEOF
20847   sed "$ac_vpsub
20848 $extrasub
20849 _ACEOF
20850 cat >>$CONFIG_STATUS <<\_ACEOF
20851 :t
20852 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20853 s,@configure_input@,$configure_input,;t t
20854 s,@srcdir@,$ac_srcdir,;t t
20855 s,@abs_srcdir@,$ac_abs_srcdir,;t t
20856 s,@top_srcdir@,$ac_top_srcdir,;t t
20857 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
20858 s,@builddir@,$ac_builddir,;t t
20859 s,@abs_builddir@,$ac_abs_builddir,;t t
20860 s,@top_builddir@,$ac_top_builddir,;t t
20861 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
20862 s,@INSTALL@,$ac_INSTALL,;t t
20863 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20864   rm -f $tmp/stdin
20865   if test x"$ac_file" != x-; then
20866     mv $tmp/out $ac_file
20867   else
20868     cat $tmp/out
20869     rm -f $tmp/out
20870   fi
20871
20872 done
20873 _ACEOF
20874 cat >>$CONFIG_STATUS <<\_ACEOF
20875
20876 #
20877 # CONFIG_HEADER section.
20878 #
20879
20880 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20881 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20882 #
20883 # ac_d sets the value in "#define NAME VALUE" lines.
20884 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
20885 ac_dB='[         ].*$,\1#\2'
20886 ac_dC=' '
20887 ac_dD=',;t'
20888 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20889 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20890 ac_uB='$,\1#\2define\3'
20891 ac_uC=' '
20892 ac_uD=',;t'
20893
20894 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20895   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20896   case $ac_file in
20897   - | *:- | *:-:* ) # input from stdin
20898         cat >$tmp/stdin
20899         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20900         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20901   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20902         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20903   * )   ac_file_in=$ac_file.in ;;
20904   esac
20905
20906   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
20907 echo "$as_me: creating $ac_file" >&6;}
20908
20909   # First look for the input files in the build tree, otherwise in the
20910   # src tree.
20911   ac_file_inputs=`IFS=:
20912     for f in $ac_file_in; do
20913       case $f in
20914       -) echo $tmp/stdin ;;
20915       [\\/$]*)
20916          # Absolute (can't be DOS-style, as IFS=:)
20917          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20918 echo "$as_me: error: cannot find input file: $f" >&2;}
20919    { (exit 1); exit 1; }; }
20920          # Do quote $f, to prevent DOS paths from being IFS'd.
20921          echo "$f";;
20922       *) # Relative
20923          if test -f "$f"; then
20924            # Build tree
20925            echo "$f"
20926          elif test -f "$srcdir/$f"; then
20927            # Source tree
20928            echo "$srcdir/$f"
20929          else
20930            # /dev/null tree
20931            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20932 echo "$as_me: error: cannot find input file: $f" >&2;}
20933    { (exit 1); exit 1; }; }
20934          fi;;
20935       esac
20936     done` || { (exit 1); exit 1; }
20937   # Remove the trailing spaces.
20938   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
20939
20940 _ACEOF
20941
20942 # Transform confdefs.h into two sed scripts, `conftest.defines' and
20943 # `conftest.undefs', that substitutes the proper values into
20944 # config.h.in to produce config.h.  The first handles `#define'
20945 # templates, and the second `#undef' templates.
20946 # And first: Protect against being on the right side of a sed subst in
20947 # config.status.  Protect against being in an unquoted here document
20948 # in config.status.
20949 rm -f conftest.defines conftest.undefs
20950 # Using a here document instead of a string reduces the quoting nightmare.
20951 # Putting comments in sed scripts is not portable.
20952 #
20953 # `end' is used to avoid that the second main sed command (meant for
20954 # 0-ary CPP macros) applies to n-ary macro definitions.
20955 # See the Autoconf documentation for `clear'.
20956 cat >confdef2sed.sed <<\_ACEOF
20957 s/[\\&,]/\\&/g
20958 s,[\\$`],\\&,g
20959 t clear
20960 : clear
20961 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
20962 t end
20963 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
20964 : end
20965 _ACEOF
20966 # If some macros were called several times there might be several times
20967 # the same #defines, which is useless.  Nevertheless, we may not want to
20968 # sort them, since we want the *last* AC-DEFINE to be honored.
20969 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
20970 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
20971 rm -f confdef2sed.sed
20972
20973 # This sed command replaces #undef with comments.  This is necessary, for
20974 # example, in the case of _POSIX_SOURCE, which is predefined and required
20975 # on some systems where configure will not decide to define it.
20976 cat >>conftest.undefs <<\_ACEOF
20977 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
20978 _ACEOF
20979
20980 # Break up conftest.defines because some shells have a limit on the size
20981 # of here documents, and old seds have small limits too (100 cmds).
20982 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
20983 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
20984 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
20985 echo '  :' >>$CONFIG_STATUS
20986 rm -f conftest.tail
20987 while grep . conftest.defines >/dev/null
20988 do
20989   # Write a limited-size here document to $tmp/defines.sed.
20990   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
20991   # Speed up: don't consider the non `#define' lines.
20992   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
20993   # Work around the forget-to-reset-the-flag bug.
20994   echo 't clr' >>$CONFIG_STATUS
20995   echo ': clr' >>$CONFIG_STATUS
20996   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
20997   echo 'CEOF
20998   sed -f $tmp/defines.sed $tmp/in >$tmp/out
20999   rm -f $tmp/in
21000   mv $tmp/out $tmp/in
21001 ' >>$CONFIG_STATUS
21002   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
21003   rm -f conftest.defines
21004   mv conftest.tail conftest.defines
21005 done
21006 rm -f conftest.defines
21007 echo '  fi # grep' >>$CONFIG_STATUS
21008 echo >>$CONFIG_STATUS
21009
21010 # Break up conftest.undefs because some shells have a limit on the size
21011 # of here documents, and old seds have small limits too (100 cmds).
21012 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
21013 rm -f conftest.tail
21014 while grep . conftest.undefs >/dev/null
21015 do
21016   # Write a limited-size here document to $tmp/undefs.sed.
21017   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
21018   # Speed up: don't consider the non `#undef'
21019   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
21020   # Work around the forget-to-reset-the-flag bug.
21021   echo 't clr' >>$CONFIG_STATUS
21022   echo ': clr' >>$CONFIG_STATUS
21023   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
21024   echo 'CEOF
21025   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
21026   rm -f $tmp/in
21027   mv $tmp/out $tmp/in
21028 ' >>$CONFIG_STATUS
21029   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
21030   rm -f conftest.undefs
21031   mv conftest.tail conftest.undefs
21032 done
21033 rm -f conftest.undefs
21034
21035 cat >>$CONFIG_STATUS <<\_ACEOF
21036   # Let's still pretend it is `configure' which instantiates (i.e., don't
21037   # use $as_me), people would be surprised to read:
21038   #    /* config.h.  Generated by config.status.  */
21039   if test x"$ac_file" = x-; then
21040     echo "/* Generated by configure.  */" >$tmp/config.h
21041   else
21042     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
21043   fi
21044   cat $tmp/in >>$tmp/config.h
21045   rm -f $tmp/in
21046   if test x"$ac_file" != x-; then
21047     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
21048       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21049 echo "$as_me: $ac_file is unchanged" >&6;}
21050     else
21051       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21052 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21053          X"$ac_file" : 'X\(//\)[^/]' \| \
21054          X"$ac_file" : 'X\(//\)$' \| \
21055          X"$ac_file" : 'X\(/\)' \| \
21056          .     : '\(.\)' 2>/dev/null ||
21057 echo X"$ac_file" |
21058     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21059           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21060           /^X\(\/\/\)$/{ s//\1/; q; }
21061           /^X\(\/\).*/{ s//\1/; q; }
21062           s/.*/./; q'`
21063       { if $as_mkdir_p; then
21064     mkdir -p "$ac_dir"
21065   else
21066     as_dir="$ac_dir"
21067     as_dirs=
21068     while test ! -d "$as_dir"; do
21069       as_dirs="$as_dir $as_dirs"
21070       as_dir=`(dirname "$as_dir") 2>/dev/null ||
21071 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21072          X"$as_dir" : 'X\(//\)[^/]' \| \
21073          X"$as_dir" : 'X\(//\)$' \| \
21074          X"$as_dir" : 'X\(/\)' \| \
21075          .     : '\(.\)' 2>/dev/null ||
21076 echo X"$as_dir" |
21077     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21078           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21079           /^X\(\/\/\)$/{ s//\1/; q; }
21080           /^X\(\/\).*/{ s//\1/; q; }
21081           s/.*/./; q'`
21082     done
21083     test ! -n "$as_dirs" || mkdir $as_dirs
21084   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21085 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21086    { (exit 1); exit 1; }; }; }
21087
21088       rm -f $ac_file
21089       mv $tmp/config.h $ac_file
21090     fi
21091   else
21092     cat $tmp/config.h
21093     rm -f $tmp/config.h
21094   fi
21095 done
21096 _ACEOF
21097 cat >>$CONFIG_STATUS <<\_ACEOF
21098
21099 #
21100 # CONFIG_COMMANDS section.
21101 #
21102 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21103   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21104   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21105   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
21106 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21107          X"$ac_dest" : 'X\(//\)[^/]' \| \
21108          X"$ac_dest" : 'X\(//\)$' \| \
21109          X"$ac_dest" : 'X\(/\)' \| \
21110          .     : '\(.\)' 2>/dev/null ||
21111 echo X"$ac_dest" |
21112     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21113           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21114           /^X\(\/\/\)$/{ s//\1/; q; }
21115           /^X\(\/\).*/{ s//\1/; q; }
21116           s/.*/./; q'`
21117   { if $as_mkdir_p; then
21118     mkdir -p "$ac_dir"
21119   else
21120     as_dir="$ac_dir"
21121     as_dirs=
21122     while test ! -d "$as_dir"; do
21123       as_dirs="$as_dir $as_dirs"
21124       as_dir=`(dirname "$as_dir") 2>/dev/null ||
21125 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21126          X"$as_dir" : 'X\(//\)[^/]' \| \
21127          X"$as_dir" : 'X\(//\)$' \| \
21128          X"$as_dir" : 'X\(/\)' \| \
21129          .     : '\(.\)' 2>/dev/null ||
21130 echo X"$as_dir" |
21131     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21132           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21133           /^X\(\/\/\)$/{ s//\1/; q; }
21134           /^X\(\/\).*/{ s//\1/; q; }
21135           s/.*/./; q'`
21136     done
21137     test ! -n "$as_dirs" || mkdir $as_dirs
21138   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21139 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21140    { (exit 1); exit 1; }; }; }
21141
21142   ac_builddir=.
21143
21144 if test "$ac_dir" != .; then
21145   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21146   # A "../" for each directory in $ac_dir_suffix.
21147   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
21148 else
21149   ac_dir_suffix= ac_top_builddir=
21150 fi
21151
21152 case $srcdir in
21153   .)  # No --srcdir option.  We are building in place.
21154     ac_srcdir=.
21155     if test -z "$ac_top_builddir"; then
21156        ac_top_srcdir=.
21157     else
21158        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
21159     fi ;;
21160   [\\/]* | ?:[\\/]* )  # Absolute path.
21161     ac_srcdir=$srcdir$ac_dir_suffix;
21162     ac_top_srcdir=$srcdir ;;
21163   *) # Relative path.
21164     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
21165     ac_top_srcdir=$ac_top_builddir$srcdir ;;
21166 esac
21167
21168 # Do not use `cd foo && pwd` to compute absolute paths, because
21169 # the directories may not exist.
21170 case `pwd` in
21171 .) ac_abs_builddir="$ac_dir";;
21172 *)
21173   case "$ac_dir" in
21174   .) ac_abs_builddir=`pwd`;;
21175   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
21176   *) ac_abs_builddir=`pwd`/"$ac_dir";;
21177   esac;;
21178 esac
21179 case $ac_abs_builddir in
21180 .) ac_abs_top_builddir=${ac_top_builddir}.;;
21181 *)
21182   case ${ac_top_builddir}. in
21183   .) ac_abs_top_builddir=$ac_abs_builddir;;
21184   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
21185   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
21186   esac;;
21187 esac
21188 case $ac_abs_builddir in
21189 .) ac_abs_srcdir=$ac_srcdir;;
21190 *)
21191   case $ac_srcdir in
21192   .) ac_abs_srcdir=$ac_abs_builddir;;
21193   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
21194   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
21195   esac;;
21196 esac
21197 case $ac_abs_builddir in
21198 .) ac_abs_top_srcdir=$ac_top_srcdir;;
21199 *)
21200   case $ac_top_srcdir in
21201   .) ac_abs_top_srcdir=$ac_abs_builddir;;
21202   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
21203   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
21204   esac;;
21205 esac
21206
21207
21208   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
21209 echo "$as_me: executing $ac_dest commands" >&6;}
21210   case $ac_dest in
21211     default-1 )
21212
21213 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
21214 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
21215   rm -f intltool-extract.out
21216 else
21217   mv -f intltool-extract.out intltool-extract
21218 fi
21219 chmod ugo+x intltool-extract
21220 chmod u+w intltool-extract
21221
21222 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
21223 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
21224   rm -f intltool-merge.out
21225 else
21226   mv -f intltool-merge.out intltool-merge
21227 fi
21228 chmod ugo+x intltool-merge
21229 chmod u+w intltool-merge
21230
21231 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
21232 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
21233   rm -f intltool-update.out
21234 else
21235   mv -f intltool-update.out intltool-update
21236 fi
21237 chmod ugo+x intltool-update
21238 chmod u+w intltool-update
21239
21240  ;;
21241     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
21242         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
21243       esac ;;
21244   esac
21245 done
21246 _ACEOF
21247
21248 cat >>$CONFIG_STATUS <<\_ACEOF
21249
21250 { (exit 0); exit 0; }
21251 _ACEOF
21252 chmod +x $CONFIG_STATUS
21253 ac_clean_files=$ac_clean_files_save
21254
21255
21256 # configure is writing to config.log, and then calls config.status.
21257 # config.status does its own redirection, appending to config.log.
21258 # Unfortunately, on DOS this fails, as config.log is still kept open
21259 # by configure, so config.status won't be able to write to it; its
21260 # output is simply discarded.  So we exec the FD to /dev/null,
21261 # effectively closing config.log, so it can be properly (re)opened and
21262 # appended to by config.status.  When coming back to configure, we
21263 # need to make the FD available again.
21264 if test "$no_create" != yes; then
21265   ac_cs_success=:
21266   ac_config_status_args=
21267   test "$silent" = yes &&
21268     ac_config_status_args="$ac_config_status_args --quiet"
21269   exec 5>/dev/null
21270   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21271   exec 5>>config.log
21272   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21273   # would make configure fail if this is the last instruction.
21274   $ac_cs_success || { (exit 1); exit 1; }
21275 fi
21276
21277
21278 ###############################################################################
21279 #
21280 #       Print some warnings at the end.
21281 #
21282 ###############################################################################
21283
21284 warn_prefix_1="    Warning:"
21285 warn_prefix_2="       Note:"
21286 warn_prefix="$warn_prefix_1"
21287
21288 warning=no
21289 warnsep='    #################################################################'
21290
21291 warnpre() {
21292   if test "$warning" = no ; then
21293     echo '' ; echo "$warnsep" ; echo ''
21294     warning=yes
21295   fi
21296 }
21297
21298 warn() {
21299   warnpre
21300   if test "$warning" = long ; then echo '' ; fi
21301   warning=yes
21302   rest="$@"
21303   echo "$warn_prefix $rest"
21304 }
21305
21306 warnL() {
21307   was=$warning
21308   warnpre
21309   warning=yes
21310   if test "$was" != no ; then echo '' ; fi
21311   rest="$@"
21312   echo "$warn_prefix $rest"
21313 }
21314
21315 warn2() {
21316   rest="$@"
21317   echo "             $rest"
21318   warning=long
21319 }
21320
21321 note() {
21322   warn_prefix="$warn_prefix_2"
21323   warn $@
21324   warn_prefix="$warn_prefix_1"
21325 }
21326
21327 noteL() {
21328   warn_prefix="$warn_prefix_2"
21329   warnL $@
21330   warn_prefix="$warn_prefix_1"
21331 }
21332
21333
21334 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
21335   warn 'The SGI saver extension was requested, but was not found.'
21336 fi
21337
21338 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
21339   warn 'The MIT saver extension was requested, but was not found.'
21340 fi
21341
21342 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
21343   warn 'The XIdle extension was requested, but was not found.'
21344 fi
21345
21346 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
21347   warn 'The XSHM extension was requested, but was not found.'
21348 fi
21349
21350 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
21351   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
21352 fi
21353
21354 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
21355   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
21356 fi
21357
21358 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
21359   warn 'The DPMS extension was requested, but was not found.'
21360 fi
21361
21362 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
21363   warn 'The Xinerama extension was requested, but was not found.'
21364 fi
21365
21366 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
21367   warn 'The XF86VMODE extension was requested, but was not found.'
21368 fi
21369
21370 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
21371   warn 'The RANDR extension was requested, but was not found.'
21372 fi
21373
21374 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
21375   warn "Checking of /proc/interrupts was requested, but it's bogus."
21376 fi
21377
21378
21379 if test "$gtk_halfassed" != no ; then
21380   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
21381   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
21382   warn2 "Perhaps some of the development packages are not installed?"
21383   if test "$have_gtk" = yes ; then
21384     v="$ac_gtk_version_string"
21385     warn2 "GTK $v is also installed, so it will be used instead."
21386     warn2 "Please read the above output and the \`config.log' file"
21387     warn2 "for more details."
21388   fi
21389 fi
21390
21391 motif_warn2() {
21392   warn2 'Though the Motif front-end to xscreensaver is still'
21393   warn2 'maintained, it is no longer being updated with new'
21394   warn2 'features: all new development on the xscreensaver-demo'
21395   warn2 'program is happening in the GTK version, and not in the'
21396   warn2 'Motif version.  It is recommended that you build against'
21397   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
21398 }
21399
21400 if test "$have_motif" = no -a "$have_gtk" = no; then
21401
21402   if test "$with_motif" = yes; then
21403     warnL "Neither the GTK nor Motif libraries were found; the"
21404     warn2 "\`xscreensaver-demo' program requires one of these."
21405     echo ''
21406     motif_warn2
21407   else
21408     warnL "The GTK libraries do not seem to be available; the"
21409     warn2 "\`xscreensaver-demo' program requires them."
21410 #   echo ''
21411 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
21412 #   warn2 "\`--with-motif' option) but that is NOT recommended."
21413 #   motif_warn2
21414   fi
21415
21416 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
21417   warnL "Use of Motif was requested, but it wasn't found;"
21418   warn2 "Gtk will be used instead."
21419
21420 elif test "$jurassic_gtk" = yes ; then
21421
21422   pref_gtk=2.0
21423
21424   v="$ac_gtk_version_string"
21425   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
21426     warnL "Use of Gtk was requested, but its version number is unknown;"
21427   elif test "$with_gtk_req" = yes ; then
21428     warnL "Use of Gtk was requested, but it is version $v;"
21429   else
21430     warnL "Gtk was found on this system, but it is version $v;"
21431   fi
21432
21433   warn2 "Gtk $pref_gtk or newer is required."
21434
21435 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
21436   warnL "Use of Gtk was requested, but it wasn't found."
21437 fi
21438
21439
21440 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
21441   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
21442   warn2 "headers were not found.  That can't be good.  Please"
21443   warn2 "install the GDK-Pixbuf development kit and re-configure."
21444 fi
21445
21446 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
21447
21448   preferred_lesstif=0.92
21449
21450   if test "$lesstif_version" = unknown; then
21451     warnL "Unable to determine the LessTif version number!"
21452     warn2 "Make sure you are using version $preferred_lesstif or newer."
21453     warn2 "See <http://www.lesstif.org/>."
21454
21455   elif test \! $lesstif_version -gt 82; then
21456     warnL "LessTif version $lesstif_version_string is being used."
21457     warn2 "LessTif versions 0.82 and earlier are too buggy to"
21458     warn2 "use with XScreenSaver; it is strongly recommended"
21459     warn2 "that you upgrade to at least version $preferred_lesstif!"
21460     warn2 "See <http://www.lesstif.org/>."
21461   fi
21462 fi
21463
21464
21465 if test "$have_motif" = yes -a "$have_gtk" = no ; then
21466   warn  'Motif is being used, and GTK is not.'
21467   echo  ''
21468   motif_warn2
21469 fi
21470
21471
21472 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
21473   warnL 'Use of XPM was requested, but it was not found.'
21474 fi
21475
21476 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
21477   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
21478 fi
21479
21480 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
21481    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
21482
21483   if test "$with_gdk_pixbuf_req" = yes ; then
21484     true
21485   elif test "$with_gdk_pixbuf_req" = no ; then
21486     warnL 'The GDK-Pixbuf library is not being used.'
21487   else
21488     warnL 'The GDK-Pixbuf library was not found.'
21489   fi
21490
21491   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
21492     true
21493   elif test "$with_xpm_req" = no ; then
21494     warnL 'The XPM library is not being used.'
21495   else
21496     warnL 'The XPM library was not found.'
21497   fi
21498
21499   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
21500     warn2 'The XPM library is being used instead.'
21501   fi
21502
21503   if test "$gdk_pixbuf_halfassed" = yes ; then
21504     echo ''
21505     warn2 'More specifically, we found the headers, but not the'
21506     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
21507     warn2 "system, or something else went wrong.  The \`config.log'"
21508     warn2 'file might contain some clues.'
21509   fi
21510
21511   echo ''
21512   warn2 'Some of the demos will not use images as much as they could.'
21513   warn2 'You should consider installing GDK-Pixbuf and re-running'
21514   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
21515   warn2 'provides support for more image formats.)'
21516 fi
21517
21518
21519 if test "$have_jpeg" = no ; then
21520   if test "$with_jpeg_req" = yes ; then
21521     warnL 'Use of libjpeg was requested, but it was not found.'
21522   elif test "$with_jpeg_req" = no ; then
21523     noteL 'The JPEG library is not being used.'
21524   else
21525     noteL 'The JPEG library was not found.'
21526   fi
21527
21528   if test "$jpeg_halfassed" = yes ; then
21529     echo ''
21530     warn2 'More specifically, we found the headers, but not the'
21531     warn2 'library; so either JPEG is half-installed on this'
21532     warn2 "system, or something else went wrong.  The \`config.log'"
21533     warn2 'file might contain some clues.'
21534     echo ''
21535   fi
21536
21537   if test "$have_gdk_pixbuf" = no ; then
21538     warn2 "This means that it won't be possible for the image-manipulating"
21539     warn2 "display modes to load files from disk; and it also means that"
21540     warn2 "the \`webcollage' program will be much slower."
21541   else
21542     warn2 "This means the \`webcollage' program will be much slower."
21543   fi
21544 fi
21545
21546
21547 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
21548   preferred_mesagl=3.4
21549   mgv="$ac_mesagl_version_string"
21550   pgl="$preferred_mesagl"
21551
21552   if test "$ac_mesagl_version" = unknown; then
21553     warnL "Unable to determine the MesaGL version number!"
21554     warn2 "Make sure you are using version $preferred_mesagl or newer."
21555
21556   elif test \! "$ac_mesagl_version" -gt 2006; then
21557     warnL "MesaGL version number is $mgv --"
21558     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
21559     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
21560
21561   elif test \! "$ac_mesagl_version" -gt 3003; then
21562     warnL "MesaGL version number is $mgv --"
21563     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
21564     warn2 "that you upgrade to $pgl or newer."
21565   fi
21566 fi
21567
21568 if test "$have_gl" = no ; then
21569   if test "$with_gl_req" = yes ; then
21570     warnL 'Use of GL was requested, but it was not found.'
21571   elif test "$with_gl_req" = no ; then
21572     noteL 'The OpenGL 3D library is not being used.'
21573   else
21574     noteL 'The OpenGL 3D library was not found.'
21575   fi
21576
21577   if test "$gl_halfassed" = yes ; then
21578     echo ''
21579     warn2 'More specifically, we found the headers, but not the'
21580     warn2 'libraries; so either GL is half-installed on this'
21581     warn2 "system, or something else went wrong.  The \`config.log'"
21582     warn2 'file might contain some clues.'
21583   fi
21584
21585   echo ''
21586   warn2 'Those demos which use 3D will not be built or installed.'
21587   warn2 'You might want to consider installing OpenGL and'
21588   warn2 "re-running configure.  If your vendor doesn't ship"
21589   warn2 'their own implementation of OpenGL, you can get a free'
21590   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
21591   warn2 'info, see <http://www.opengl.org/>.'
21592
21593 fi
21594
21595
21596 if test "$have_gl" = yes -a "$have_gle" = no ; then
21597
21598  # nobody cares about this; don't print the warning unless it was
21599  # requested and not found, or halfway-found.
21600  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
21601
21602   if test "$with_gle_req" = yes ; then
21603     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
21604     warn2 'it was not found (though the OpenGL library was found, and'
21605     warn2 'is being used.)'
21606   elif test "$with_gle_req" = no ; then
21607     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
21608     warn2 'library is not.'
21609   else
21610     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
21611     warn2 'was not.'
21612   fi
21613
21614   if test "$gle_halfassed" = yes ; then
21615     echo ''
21616     warn2 'More specifically, we found the headers, but not the'
21617     warn2 'libraries; so either GLE is half-installed on this'
21618     warn2 "system, or something else went wrong.  The \`config.log'"
21619     warn2 'file might contain some clues.'
21620   fi
21621
21622   echo ''
21623   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
21624   warn2 'will not be built or installed.  You might want to consider'
21625   warn2 'installing GLE and re-running configure.  You can find the'
21626   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
21627   warn2 'OpenGL info, see <http://www.opengl.org/>.'
21628
21629  fi
21630 fi
21631
21632
21633 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
21634   warn 'Use of XReadDisplay was requested, but it was not found.'
21635 fi
21636
21637 if test -n "$with_fortune_req"; then
21638   if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
21639     warnL "$with_fortune_req was requested as the Fortune program,"
21640     warn2 "but was not found.  The default will be used instead."
21641   fi
21642 fi
21643
21644 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
21645   warn 'Use of Kerberos was requested, but it was not found.'
21646 fi
21647
21648 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
21649   warn 'Use of PAM was requested, but it was not found.'
21650 fi
21651
21652 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
21653   warn 'Use of shadow passwords was requested, but they were not found.'
21654 fi
21655
21656
21657 # You are in a twisty maze of namespaces and syntaxes, all alike.
21658 # Fuck the skull of Unix.
21659 #
21660 eval bindir=${bindir}
21661 eval bindir=${bindir}
21662 eval bindir=${bindir}
21663 eval bindir=${bindir}
21664 eval bindir=${bindir}
21665 eval bindir=${bindir}
21666 eval HACKDIR=${HACKDIR}
21667 eval HACKDIR=${HACKDIR}
21668 eval HACKDIR=${HACKDIR}
21669 eval HACKDIR=${HACKDIR}
21670 eval HACKDIR=${HACKDIR}
21671 eval HACKDIR=${HACKDIR}
21672 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21673 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21674 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21675 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21676 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21677 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21678
21679 # canonicalize slashes.
21680 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
21681 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
21682 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
21683
21684
21685 # Sanity check the hackdir
21686 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
21687   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
21688     echo ""
21689     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
21690                    There will be an executable installed with that name, so
21691                    that can't be the name of a directory as well.  Please
21692                    re-configure with a different directory name." >&5
21693 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
21694                    There will be an executable installed with that name, so
21695                    that can't be the name of a directory as well.  Please
21696                    re-configure with a different directory name." >&2;}
21697    { (exit 1); exit 1; }; }
21698   fi
21699 done
21700
21701
21702 do_dir_warning=no
21703
21704 # Now let's see if there's a previous RPM version already installed.  Blargh!
21705
21706 # M4 sucks!!
21707
21708 rpmv=`(rpm -qv xscreensaver) 2>/dev/null | \
21709       sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
21710
21711
21712 if test \! -z "$rpmv" ; then
21713   rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
21714   rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
21715
21716   warning=no
21717   warnL "There is already an installed RPM of xscreensaver $rpmv"
21718   warn2 "on this system.  You might want to remove it (with"
21719   warn2 '"rpm -ve xscreensaver") before running "make install"'
21720   warn2 "from this directory."
21721   echo ""
21722   warn2 "Alternately, you could build this version of xscreensaver"
21723   warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
21724   warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
21725   warn2 "See the RPM documentation for more info."
21726   echo ""
21727
21728   if test "$rpmbdir" = "$rpmhdir" ; then
21729     warn2 "The RPM version was installed in $rpmbdir/."
21730   else
21731     warn2 "The RPM version was installed in $rpmbdir/,"
21732     warn2 "with demos in $rpmhdir/."
21733   fi
21734
21735   do_dir_warning=yes
21736 fi
21737
21738
21739 if test "${bindir}" = "${HACKDIR}" ; then
21740   do_dir_warning=yes
21741 fi
21742
21743 if test "$do_dir_warning" = yes; then
21744   echo ""
21745   echo "$warnsep"
21746   echo ""
21747   echo '      When you run "make install", the "xscreensaver",'
21748   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
21749   echo "      will be installed in ${bindir}/."
21750   echo ""
21751   echo "      The various graphics demos (180+ different executables) will"
21752   echo "      be installed in ${HACKDIR}/."
21753   echo ""
21754   echo "      If you would prefer the demos to be installed elsewhere,"
21755   echo "      you should re-run configure with the --with-hackdir=DIR"
21756   echo "      option.  For more information, run \`./configure --help'."
21757   warning=yes
21758 fi
21759
21760 if test "$warning" != no; then
21761   echo '' ; echo "$warnsep" ; echo ''
21762 fi
21763
21764 if test "$do_dir_warning" = no; then
21765   if test "$warning" = no; then
21766     echo ''
21767   fi
21768   echo "User programs will be installed in ${bindir}/"
21769   echo "Screen savers will be installed in ${HACKDIR}/"
21770   echo "Configuration will be installed in ${HACK_CONF_DIR}/"
21771   echo ''
21772 fi