http://ftp.ksu.edu.tw/FTP/FreeBSD/distfiles/xscreensaver-4.20.tar.gz
[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 gnome_open_program gnome_url_show_program 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 GNOME24 GNOME22 NOGNOME 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  1.99.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 various Gnome help and URL loading programs.
14868 #
14869 if test "$have_gtk" = yes; then
14870   for ac_prog in gnome-open
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_gnome_open_program+set}" = set; then
14877   echo $ECHO_N "(cached) $ECHO_C" >&6
14878 else
14879   if test -n "$gnome_open_program"; then
14880   ac_cv_prog_gnome_open_program="$gnome_open_program" # 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_gnome_open_program="$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 gnome_open_program=$ac_cv_prog_gnome_open_program
14899 if test -n "$gnome_open_program"; then
14900   echo "$as_me:$LINENO: result: $gnome_open_program" >&5
14901 echo "${ECHO_T}$gnome_open_program" >&6
14902 else
14903   echo "$as_me:$LINENO: result: no" >&5
14904 echo "${ECHO_T}no" >&6
14905 fi
14906
14907   test -n "$gnome_open_program" && break
14908 done
14909
14910   for ac_prog in gnome-url-show
14911 do
14912   # Extract the first word of "$ac_prog", so it can be a program name with args.
14913 set dummy $ac_prog; ac_word=$2
14914 echo "$as_me:$LINENO: checking for $ac_word" >&5
14915 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14916 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
14917   echo $ECHO_N "(cached) $ECHO_C" >&6
14918 else
14919   if test -n "$gnome_url_show_program"; then
14920   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
14921 else
14922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14923 for as_dir in $PATH
14924 do
14925   IFS=$as_save_IFS
14926   test -z "$as_dir" && as_dir=.
14927   for ac_exec_ext in '' $ac_executable_extensions; do
14928   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14929     ac_cv_prog_gnome_url_show_program="$ac_prog"
14930     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14931     break 2
14932   fi
14933 done
14934 done
14935
14936 fi
14937 fi
14938 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
14939 if test -n "$gnome_url_show_program"; then
14940   echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
14941 echo "${ECHO_T}$gnome_url_show_program" >&6
14942 else
14943   echo "$as_me:$LINENO: result: no" >&5
14944 echo "${ECHO_T}no" >&6
14945 fi
14946
14947   test -n "$gnome_url_show_program" && break
14948 done
14949
14950 fi
14951
14952
14953 ###############################################################################
14954 #
14955 #       Check for -lXm.
14956 #
14957 ###############################################################################
14958
14959 have_motif=no
14960 with_motif_req=unspecified
14961
14962 # Check whether --with-motif or --without-motif was given.
14963 if test "${with_motif+set}" = set; then
14964   withval="$with_motif"
14965   with_motif="$withval"; with_motif_req="$withval"
14966 else
14967   with_motif=no
14968 fi;
14969
14970
14971    case "$with_motif" in
14972     yes) ;;
14973     no)  ;;
14974
14975     /*)
14976      echo "$as_me:$LINENO: checking for Motif headers" >&5
14977 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
14978      d=$with_motif/include
14979      if test -d $d; then
14980        X_CFLAGS="-I$d $X_CFLAGS"
14981        echo "$as_me:$LINENO: result: $d" >&5
14982 echo "${ECHO_T}$d" >&6
14983      else
14984        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14985 echo "${ECHO_T}not found ($d: no such directory)" >&6
14986      fi
14987
14988      echo "$as_me:$LINENO: checking for Motif libs" >&5
14989 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
14990      d=$with_motif/lib
14991      if test -d $d; then
14992        X_LIBS="-L$d $X_LIBS"
14993        echo "$as_me:$LINENO: result: $d" >&5
14994 echo "${ECHO_T}$d" >&6
14995      else
14996        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14997 echo "${ECHO_T}not found ($d: no such directory)" >&6
14998      fi
14999
15000      # replace the directory string with "yes".
15001      with_motif_req="yes"
15002      with_motif=$with_motif_req
15003      ;;
15004
15005     *)
15006      echo ""
15007      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
15008      echo "       If it is a directory, then \`DIR/include' will be added to"
15009      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15010      exit 1
15011      ;;
15012    esac
15013
15014
15015 if test "$with_motif" != yes -a "$with_motif" != no ; then
15016   echo "error: must be yes or no: --with-motif=$with_motif"
15017   exit 1
15018 fi
15019
15020 if test "$with_motif" = yes; then
15021   have_motif=no
15022
15023   ac_save_CPPFLAGS="$CPPFLAGS"
15024   if test \! -z "$includedir" ; then
15025     CPPFLAGS="$CPPFLAGS -I$includedir"
15026   fi
15027   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15028   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
15029 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
15030 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
15031   echo $ECHO_N "(cached) $ECHO_C" >&6
15032 else
15033   cat >conftest.$ac_ext <<_ACEOF
15034 /* confdefs.h.  */
15035 _ACEOF
15036 cat confdefs.h >>conftest.$ac_ext
15037 cat >>conftest.$ac_ext <<_ACEOF
15038 /* end confdefs.h.  */
15039 #include <stdlib.h>
15040                      #include <stdio.h>
15041                      #include <X11/Intrinsic.h>
15042
15043 #include <Xm/Xm.h>
15044 _ACEOF
15045 rm -f conftest.$ac_objext
15046 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15047   (eval $ac_compile) 2>conftest.er1
15048   ac_status=$?
15049   grep -v '^ *+' conftest.er1 >conftest.err
15050   rm -f conftest.er1
15051   cat conftest.err >&5
15052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15053   (exit $ac_status); } &&
15054          { ac_try='test -z "$ac_c_werror_flag"
15055                          || test ! -s conftest.err'
15056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15057   (eval $ac_try) 2>&5
15058   ac_status=$?
15059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15060   (exit $ac_status); }; } &&
15061          { ac_try='test -s conftest.$ac_objext'
15062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15063   (eval $ac_try) 2>&5
15064   ac_status=$?
15065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15066   (exit $ac_status); }; }; then
15067   ac_cv_header_Xm_Xm_h=yes
15068 else
15069   echo "$as_me: failed program was:" >&5
15070 sed 's/^/| /' conftest.$ac_ext >&5
15071
15072 ac_cv_header_Xm_Xm_h=no
15073 fi
15074 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15075 fi
15076 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
15077 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
15078 if test $ac_cv_header_Xm_Xm_h = yes; then
15079   have_motif=yes
15080                      cat >>confdefs.h <<\_ACEOF
15081 #define HAVE_MOTIF 1
15082 _ACEOF
15083
15084                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
15085 fi
15086
15087
15088   CPPFLAGS="$ac_save_CPPFLAGS"
15089 fi
15090
15091
15092 if test "$have_motif" = yes; then
15093
15094   ac_save_CPPFLAGS="$CPPFLAGS"
15095   if test \! -z "$includedir" ; then
15096     CPPFLAGS="$CPPFLAGS -I$includedir"
15097   fi
15098   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15099   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
15100 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
15101 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
15102   echo $ECHO_N "(cached) $ECHO_C" >&6
15103 else
15104   cat >conftest.$ac_ext <<_ACEOF
15105 /* confdefs.h.  */
15106 _ACEOF
15107 cat confdefs.h >>conftest.$ac_ext
15108 cat >>conftest.$ac_ext <<_ACEOF
15109 /* end confdefs.h.  */
15110 #include <stdlib.h>
15111                      #include <stdio.h>
15112                      #include <X11/Intrinsic.h>
15113
15114 #include <Xm/ComboBox.h>
15115 _ACEOF
15116 rm -f conftest.$ac_objext
15117 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15118   (eval $ac_compile) 2>conftest.er1
15119   ac_status=$?
15120   grep -v '^ *+' conftest.er1 >conftest.err
15121   rm -f conftest.er1
15122   cat conftest.err >&5
15123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15124   (exit $ac_status); } &&
15125          { ac_try='test -z "$ac_c_werror_flag"
15126                          || test ! -s conftest.err'
15127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15128   (eval $ac_try) 2>&5
15129   ac_status=$?
15130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15131   (exit $ac_status); }; } &&
15132          { ac_try='test -s conftest.$ac_objext'
15133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15134   (eval $ac_try) 2>&5
15135   ac_status=$?
15136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15137   (exit $ac_status); }; }; then
15138   ac_cv_header_Xm_ComboBox_h=yes
15139 else
15140   echo "$as_me: failed program was:" >&5
15141 sed 's/^/| /' conftest.$ac_ext >&5
15142
15143 ac_cv_header_Xm_ComboBox_h=no
15144 fi
15145 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15146 fi
15147 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
15148 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
15149 if test $ac_cv_header_Xm_ComboBox_h = yes; then
15150   cat >>confdefs.h <<\_ACEOF
15151 #define HAVE_XMCOMBOBOX 1
15152 _ACEOF
15153
15154 fi
15155
15156
15157   CPPFLAGS="$ac_save_CPPFLAGS"
15158 fi
15159
15160
15161 ###############################################################################
15162 #
15163 #       Checking whether Motif is really Lesstif.
15164 #
15165 ###############################################################################
15166
15167 have_lesstif=no
15168 if test "$have_motif" = yes ; then
15169   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
15170 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
15171 if test "${ac_cv_have_lesstif+set}" = set; then
15172   echo $ECHO_N "(cached) $ECHO_C" >&6
15173 else
15174
15175   ac_save_CPPFLAGS="$CPPFLAGS"
15176   if test \! -z "$includedir" ; then
15177     CPPFLAGS="$CPPFLAGS -I$includedir"
15178   fi
15179   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15180   cat >conftest.$ac_ext <<_ACEOF
15181 /* confdefs.h.  */
15182 _ACEOF
15183 cat confdefs.h >>conftest.$ac_ext
15184 cat >>conftest.$ac_ext <<_ACEOF
15185 /* end confdefs.h.  */
15186 #include <Xm/Xm.h>
15187 int
15188 main ()
15189 {
15190 long vers = LesstifVersion;
15191   ;
15192   return 0;
15193 }
15194 _ACEOF
15195 rm -f conftest.$ac_objext
15196 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15197   (eval $ac_compile) 2>conftest.er1
15198   ac_status=$?
15199   grep -v '^ *+' conftest.er1 >conftest.err
15200   rm -f conftest.er1
15201   cat conftest.err >&5
15202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15203   (exit $ac_status); } &&
15204          { ac_try='test -z "$ac_c_werror_flag"
15205                          || test ! -s conftest.err'
15206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15207   (eval $ac_try) 2>&5
15208   ac_status=$?
15209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15210   (exit $ac_status); }; } &&
15211          { ac_try='test -s conftest.$ac_objext'
15212   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15213   (eval $ac_try) 2>&5
15214   ac_status=$?
15215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15216   (exit $ac_status); }; }; then
15217   ac_cv_have_lesstif=yes
15218 else
15219   echo "$as_me: failed program was:" >&5
15220 sed 's/^/| /' conftest.$ac_ext >&5
15221
15222 ac_cv_have_lesstif=no
15223 fi
15224 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15225   CPPFLAGS="$ac_save_CPPFLAGS"
15226 fi
15227 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
15228 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
15229   have_lesstif=$ac_cv_have_lesstif
15230 fi
15231
15232
15233 lesstif_version=unknown
15234 lesstif_version_string=unknown
15235
15236 if test "$have_lesstif" = yes ; then
15237   ltv=unknown
15238   echo unknown > conftest-lt
15239   echo "$as_me:$LINENO: checking LessTif version number" >&5
15240 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
15241 if test "${ac_cv_lesstif_version_string+set}" = set; then
15242   echo $ECHO_N "(cached) $ECHO_C" >&6
15243 else
15244
15245   ac_save_CPPFLAGS="$CPPFLAGS"
15246   if test \! -z "$includedir" ; then
15247     CPPFLAGS="$CPPFLAGS -I$includedir"
15248   fi
15249   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15250   if test "$cross_compiling" = yes; then
15251   ac_cv_lesstif_version=unknown
15252                      ac_cv_lesstif_version_string=unknown
15253 else
15254   cat >conftest.$ac_ext <<_ACEOF
15255 /* confdefs.h.  */
15256 _ACEOF
15257 cat confdefs.h >>conftest.$ac_ext
15258 cat >>conftest.$ac_ext <<_ACEOF
15259 /* end confdefs.h.  */
15260 #include <stdio.h>
15261                      #include <Xm/Xm.h>
15262                      int main() {
15263                        FILE *f = fopen("conftest-lt", "w");
15264                        if (!f) exit(1);
15265                        fprintf(f, "%d %d.%d\n", LesstifVersion,
15266                           LESSTIF_VERSION, LESSTIF_REVISION);
15267                        fclose(f);
15268                        exit(0);
15269                      }
15270 _ACEOF
15271 rm -f conftest$ac_exeext
15272 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15273   (eval $ac_link) 2>&5
15274   ac_status=$?
15275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15276   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15278   (eval $ac_try) 2>&5
15279   ac_status=$?
15280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15281   (exit $ac_status); }; }; then
15282   ltv=`cat conftest-lt`
15283                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
15284                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
15285 else
15286   echo "$as_me: program exited with status $ac_status" >&5
15287 echo "$as_me: failed program was:" >&5
15288 sed 's/^/| /' conftest.$ac_ext >&5
15289
15290 ( exit $ac_status )
15291 ac_cv_lesstif_version=unknown
15292                      ac_cv_lesstif_version_string=unknown
15293 fi
15294 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15295 fi
15296   CPPFLAGS="$ac_save_CPPFLAGS"
15297 fi
15298 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
15299 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
15300   rm -f conftest-lt
15301   lesstif_version=$ac_cv_lesstif_version
15302   lesstif_version_string=$ac_cv_lesstif_version_string
15303
15304 fi
15305
15306
15307 if test "$have_motif" = yes ; then
15308   mtv=unknown
15309   echo unknown > conftest-mt
15310   echo "$as_me:$LINENO: checking Motif version number" >&5
15311 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
15312 if test "${ac_cv_motif_version_string+set}" = set; then
15313   echo $ECHO_N "(cached) $ECHO_C" >&6
15314 else
15315
15316   ac_save_CPPFLAGS="$CPPFLAGS"
15317   if test \! -z "$includedir" ; then
15318     CPPFLAGS="$CPPFLAGS -I$includedir"
15319   fi
15320   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15321   if test "$cross_compiling" = yes; then
15322   ac_cv_motif_version=unknown
15323                      ac_cv_motif_version_string=unknown
15324 else
15325   cat >conftest.$ac_ext <<_ACEOF
15326 /* confdefs.h.  */
15327 _ACEOF
15328 cat confdefs.h >>conftest.$ac_ext
15329 cat >>conftest.$ac_ext <<_ACEOF
15330 /* end confdefs.h.  */
15331 #include <stdio.h>
15332                      #include <Xm/Xm.h>
15333                      int main() {
15334                        FILE *f = fopen("conftest-mt", "w");
15335                        if (!f) exit(1);
15336                        fprintf(f, "%d %d.%d\n", XmVersion,
15337                           XmVERSION, XmREVISION);
15338                        fclose(f);
15339                        exit(0);
15340                      }
15341 _ACEOF
15342 rm -f conftest$ac_exeext
15343 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15344   (eval $ac_link) 2>&5
15345   ac_status=$?
15346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15347   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15349   (eval $ac_try) 2>&5
15350   ac_status=$?
15351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15352   (exit $ac_status); }; }; then
15353   mtv=`cat conftest-mt`
15354                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
15355                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
15356 else
15357   echo "$as_me: program exited with status $ac_status" >&5
15358 echo "$as_me: failed program was:" >&5
15359 sed 's/^/| /' conftest.$ac_ext >&5
15360
15361 ( exit $ac_status )
15362 ac_cv_motif_version=unknown
15363                      ac_cv_motif_version_string=unknown
15364 fi
15365 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15366 fi
15367   CPPFLAGS="$ac_save_CPPFLAGS"
15368 fi
15369 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
15370 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
15371   rm -f conftest-mt
15372   motif_version=$ac_cv_motif_version
15373   motif_version_string=$ac_cv_motif_version_string
15374
15375 fi
15376
15377
15378 ###############################################################################
15379 #
15380 #       Checking whether Motif requires -lXpm.
15381 #
15382 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
15383 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
15384 #       of the library whether to build the XPM code into libXm, or whether
15385 #       to rely on an external libXm.  So the only way to tell whether XPM is
15386 #       a link-time requirement is to examine libXm.a, which is very
15387 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
15388 #       always link against XPM if the XPM lib exists (and this will be a
15389 #       no-op if libXm happens to already have the XPM code in it.)
15390 #
15391 ###############################################################################
15392
15393 motif_requires_xpm=no
15394 if test "$have_motif" = yes ; then
15395    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
15396 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
15397    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
15398    then
15399      motif_requires_xpm=yes
15400      echo "$as_me:$LINENO: result: maybe" >&5
15401 echo "${ECHO_T}maybe" >&6
15402    else
15403      echo "$as_me:$LINENO: result: no" >&5
15404 echo "${ECHO_T}no" >&6
15405    fi
15406 fi
15407
15408
15409 ###############################################################################
15410 #
15411 #       Checking whether Motif requires -lXp.
15412 #
15413 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
15414 #       Extension".   Why this extension isn't in -lXext with all the others,
15415 #       I have no idea.
15416 #
15417 ###############################################################################
15418
15419 have_xp_ext=no
15420 if test "$have_motif" = yes ; then
15421    have_xp_ext=no
15422
15423   ac_save_CPPFLAGS="$CPPFLAGS"
15424   ac_save_LDFLAGS="$LDFLAGS"
15425 #  ac_save_LIBS="$LIBS"
15426
15427   if test \! -z "$includedir" ; then
15428     CPPFLAGS="$CPPFLAGS -I$includedir"
15429   fi
15430   # note: $X_CFLAGS includes $x_includes
15431   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15432
15433   if test \! -z "$libdir" ; then
15434     LDFLAGS="$LDFLAGS -L$libdir"
15435   fi
15436   # note: $X_LIBS includes $x_libraries
15437   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15438
15439   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
15440 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
15441 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
15442   echo $ECHO_N "(cached) $ECHO_C" >&6
15443 else
15444   ac_check_lib_save_LIBS=$LIBS
15445 LIBS="-lXp -lX11 -lXext -lm $LIBS"
15446 cat >conftest.$ac_ext <<_ACEOF
15447 /* confdefs.h.  */
15448 _ACEOF
15449 cat confdefs.h >>conftest.$ac_ext
15450 cat >>conftest.$ac_ext <<_ACEOF
15451 /* end confdefs.h.  */
15452
15453 /* Override any gcc2 internal prototype to avoid an error.  */
15454 #ifdef __cplusplus
15455 extern "C"
15456 #endif
15457 /* We use char because int might match the return type of a gcc2
15458    builtin and then its argument prototype would still apply.  */
15459 char XpQueryExtension ();
15460 int
15461 main ()
15462 {
15463 XpQueryExtension ();
15464   ;
15465   return 0;
15466 }
15467 _ACEOF
15468 rm -f conftest.$ac_objext conftest$ac_exeext
15469 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15470   (eval $ac_link) 2>conftest.er1
15471   ac_status=$?
15472   grep -v '^ *+' conftest.er1 >conftest.err
15473   rm -f conftest.er1
15474   cat conftest.err >&5
15475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15476   (exit $ac_status); } &&
15477          { ac_try='test -z "$ac_c_werror_flag"
15478                          || test ! -s conftest.err'
15479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15480   (eval $ac_try) 2>&5
15481   ac_status=$?
15482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15483   (exit $ac_status); }; } &&
15484          { ac_try='test -s conftest$ac_exeext'
15485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15486   (eval $ac_try) 2>&5
15487   ac_status=$?
15488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15489   (exit $ac_status); }; }; then
15490   ac_cv_lib_Xp_XpQueryExtension=yes
15491 else
15492   echo "$as_me: failed program was:" >&5
15493 sed 's/^/| /' conftest.$ac_ext >&5
15494
15495 ac_cv_lib_Xp_XpQueryExtension=no
15496 fi
15497 rm -f conftest.err conftest.$ac_objext \
15498       conftest$ac_exeext conftest.$ac_ext
15499 LIBS=$ac_check_lib_save_LIBS
15500 fi
15501 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
15502 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
15503 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
15504   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
15505 else
15506   true
15507 fi
15508
15509   CPPFLAGS="$ac_save_CPPFLAGS"
15510   LDFLAGS="$ac_save_LDFLAGS"
15511 #  LIBS="$ac_save_LIBS"
15512
15513 fi
15514
15515
15516 ###############################################################################
15517 #
15518 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
15519 #
15520 ###############################################################################
15521
15522 have_xintl=no
15523 if test "$have_motif" = yes ; then
15524
15525   ac_save_CPPFLAGS="$CPPFLAGS"
15526   ac_save_LDFLAGS="$LDFLAGS"
15527 #  ac_save_LIBS="$LIBS"
15528
15529   if test \! -z "$includedir" ; then
15530     CPPFLAGS="$CPPFLAGS -I$includedir"
15531   fi
15532   # note: $X_CFLAGS includes $x_includes
15533   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15534
15535   if test \! -z "$libdir" ; then
15536     LDFLAGS="$LDFLAGS -L$libdir"
15537   fi
15538   # note: $X_LIBS includes $x_libraries
15539   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15540
15541   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
15542 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
15543 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
15544   echo $ECHO_N "(cached) $ECHO_C" >&6
15545 else
15546   ac_check_lib_save_LIBS=$LIBS
15547 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
15548 cat >conftest.$ac_ext <<_ACEOF
15549 /* confdefs.h.  */
15550 _ACEOF
15551 cat confdefs.h >>conftest.$ac_ext
15552 cat >>conftest.$ac_ext <<_ACEOF
15553 /* end confdefs.h.  */
15554
15555 /* Override any gcc2 internal prototype to avoid an error.  */
15556 #ifdef __cplusplus
15557 extern "C"
15558 #endif
15559 /* We use char because int might match the return type of a gcc2
15560    builtin and then its argument prototype would still apply.  */
15561 char _Xsetlocale ();
15562 int
15563 main ()
15564 {
15565 _Xsetlocale ();
15566   ;
15567   return 0;
15568 }
15569 _ACEOF
15570 rm -f conftest.$ac_objext conftest$ac_exeext
15571 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15572   (eval $ac_link) 2>conftest.er1
15573   ac_status=$?
15574   grep -v '^ *+' conftest.er1 >conftest.err
15575   rm -f conftest.er1
15576   cat conftest.err >&5
15577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15578   (exit $ac_status); } &&
15579          { ac_try='test -z "$ac_c_werror_flag"
15580                          || test ! -s conftest.err'
15581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15582   (eval $ac_try) 2>&5
15583   ac_status=$?
15584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15585   (exit $ac_status); }; } &&
15586          { ac_try='test -s conftest$ac_exeext'
15587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15588   (eval $ac_try) 2>&5
15589   ac_status=$?
15590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15591   (exit $ac_status); }; }; then
15592   ac_cv_lib_Xintl__Xsetlocale=yes
15593 else
15594   echo "$as_me: failed program was:" >&5
15595 sed 's/^/| /' conftest.$ac_ext >&5
15596
15597 ac_cv_lib_Xintl__Xsetlocale=no
15598 fi
15599 rm -f conftest.err conftest.$ac_objext \
15600       conftest$ac_exeext conftest.$ac_ext
15601 LIBS=$ac_check_lib_save_LIBS
15602 fi
15603 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
15604 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
15605 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
15606   have_xintl=yes
15607 else
15608   have_xintl=no
15609 fi
15610
15611   CPPFLAGS="$ac_save_CPPFLAGS"
15612   LDFLAGS="$ac_save_LDFLAGS"
15613 #  LIBS="$ac_save_LIBS"
15614
15615   if test "$have_xintl" = yes; then
15616     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
15617   fi
15618 fi
15619
15620
15621 ###############################################################################
15622 #
15623 #       Check for -lGL or -lMesaGL.
15624 #
15625 ###############################################################################
15626
15627 have_gl=no
15628 ac_have_mesa_gl=no
15629 with_gl_req=unspecified
15630 gl_halfassed=no
15631
15632 # Check whether --with-gl or --without-gl was given.
15633 if test "${with_gl+set}" = set; then
15634   withval="$with_gl"
15635   with_gl="$withval"; with_gl_req="$withval"
15636 else
15637   with_gl=yes
15638 fi;
15639
15640
15641    case "$with_gl" in
15642     yes) ;;
15643     no)  ;;
15644
15645     /*)
15646      echo "$as_me:$LINENO: checking for GL headers" >&5
15647 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
15648      d=$with_gl/include
15649      if test -d $d; then
15650        X_CFLAGS="-I$d $X_CFLAGS"
15651        echo "$as_me:$LINENO: result: $d" >&5
15652 echo "${ECHO_T}$d" >&6
15653      else
15654        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15655 echo "${ECHO_T}not found ($d: no such directory)" >&6
15656      fi
15657
15658      echo "$as_me:$LINENO: checking for GL libs" >&5
15659 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
15660      d=$with_gl/lib
15661      if test -d $d; then
15662        X_LIBS="-L$d $X_LIBS"
15663        echo "$as_me:$LINENO: result: $d" >&5
15664 echo "${ECHO_T}$d" >&6
15665      else
15666        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15667 echo "${ECHO_T}not found ($d: no such directory)" >&6
15668      fi
15669
15670      # replace the directory string with "yes".
15671      with_gl_req="yes"
15672      with_gl=$with_gl_req
15673      ;;
15674
15675     *)
15676      echo ""
15677      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
15678      echo "       If it is a directory, then \`DIR/include' will be added to"
15679      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15680      exit 1
15681      ;;
15682    esac
15683
15684
15685 ac_mesagl_version=unknown
15686 ac_mesagl_version_string=unknown
15687
15688 if test "$with_gl" = yes; then
15689
15690   ac_save_CPPFLAGS="$CPPFLAGS"
15691   if test \! -z "$includedir" ; then
15692     CPPFLAGS="$CPPFLAGS -I$includedir"
15693   fi
15694   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15695   if test "${ac_cv_header_GL_gl_h+set}" = set; then
15696   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15697 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15698 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15699   echo $ECHO_N "(cached) $ECHO_C" >&6
15700 fi
15701 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15702 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15703 else
15704   # Is the header compilable?
15705 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
15706 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
15707 cat >conftest.$ac_ext <<_ACEOF
15708 /* confdefs.h.  */
15709 _ACEOF
15710 cat confdefs.h >>conftest.$ac_ext
15711 cat >>conftest.$ac_ext <<_ACEOF
15712 /* end confdefs.h.  */
15713 $ac_includes_default
15714 #include <GL/gl.h>
15715 _ACEOF
15716 rm -f conftest.$ac_objext
15717 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15718   (eval $ac_compile) 2>conftest.er1
15719   ac_status=$?
15720   grep -v '^ *+' conftest.er1 >conftest.err
15721   rm -f conftest.er1
15722   cat conftest.err >&5
15723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15724   (exit $ac_status); } &&
15725          { ac_try='test -z "$ac_c_werror_flag"
15726                          || test ! -s conftest.err'
15727   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15728   (eval $ac_try) 2>&5
15729   ac_status=$?
15730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15731   (exit $ac_status); }; } &&
15732          { ac_try='test -s conftest.$ac_objext'
15733   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15734   (eval $ac_try) 2>&5
15735   ac_status=$?
15736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15737   (exit $ac_status); }; }; then
15738   ac_header_compiler=yes
15739 else
15740   echo "$as_me: failed program was:" >&5
15741 sed 's/^/| /' conftest.$ac_ext >&5
15742
15743 ac_header_compiler=no
15744 fi
15745 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15746 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15747 echo "${ECHO_T}$ac_header_compiler" >&6
15748
15749 # Is the header present?
15750 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
15751 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
15752 cat >conftest.$ac_ext <<_ACEOF
15753 /* confdefs.h.  */
15754 _ACEOF
15755 cat confdefs.h >>conftest.$ac_ext
15756 cat >>conftest.$ac_ext <<_ACEOF
15757 /* end confdefs.h.  */
15758 #include <GL/gl.h>
15759 _ACEOF
15760 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15761   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15762   ac_status=$?
15763   grep -v '^ *+' conftest.er1 >conftest.err
15764   rm -f conftest.er1
15765   cat conftest.err >&5
15766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15767   (exit $ac_status); } >/dev/null; then
15768   if test -s conftest.err; then
15769     ac_cpp_err=$ac_c_preproc_warn_flag
15770     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15771   else
15772     ac_cpp_err=
15773   fi
15774 else
15775   ac_cpp_err=yes
15776 fi
15777 if test -z "$ac_cpp_err"; then
15778   ac_header_preproc=yes
15779 else
15780   echo "$as_me: failed program was:" >&5
15781 sed 's/^/| /' conftest.$ac_ext >&5
15782
15783   ac_header_preproc=no
15784 fi
15785 rm -f conftest.err conftest.$ac_ext
15786 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15787 echo "${ECHO_T}$ac_header_preproc" >&6
15788
15789 # So?  What about this header?
15790 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15791   yes:no: )
15792     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
15793 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15794     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
15795 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
15796     ac_header_preproc=yes
15797     ;;
15798   no:yes:* )
15799     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
15800 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
15801     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
15802 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
15803     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
15804 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
15805     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
15806 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15807     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
15808 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
15809     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
15810 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
15811     (
15812       cat <<\_ASBOX
15813 ## ------------------------------------------ ##
15814 ## Report this to the AC_PACKAGE_NAME lists.  ##
15815 ## ------------------------------------------ ##
15816 _ASBOX
15817     ) |
15818       sed "s/^/$as_me: WARNING:     /" >&2
15819     ;;
15820 esac
15821 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15822 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15823 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15824   echo $ECHO_N "(cached) $ECHO_C" >&6
15825 else
15826   ac_cv_header_GL_gl_h=$ac_header_preproc
15827 fi
15828 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15829 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15830
15831 fi
15832 if test $ac_cv_header_GL_gl_h = yes; then
15833   have_gl=yes
15834 else
15835   have_gl=no
15836 fi
15837
15838
15839   CPPFLAGS="$ac_save_CPPFLAGS"
15840   if test "$have_gl" = yes ; then
15841
15842   ac_save_CPPFLAGS="$CPPFLAGS"
15843   if test \! -z "$includedir" ; then
15844     CPPFLAGS="$CPPFLAGS -I$includedir"
15845   fi
15846   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15847   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
15848 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
15849 if test "${ac_cv_header_GL_glx_h+set}" = set; then
15850   echo $ECHO_N "(cached) $ECHO_C" >&6
15851 else
15852   cat >conftest.$ac_ext <<_ACEOF
15853 /* confdefs.h.  */
15854 _ACEOF
15855 cat confdefs.h >>conftest.$ac_ext
15856 cat >>conftest.$ac_ext <<_ACEOF
15857 /* end confdefs.h.  */
15858 #include <GL/gl.h>
15859
15860 #include <GL/glx.h>
15861 _ACEOF
15862 rm -f conftest.$ac_objext
15863 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15864   (eval $ac_compile) 2>conftest.er1
15865   ac_status=$?
15866   grep -v '^ *+' conftest.er1 >conftest.err
15867   rm -f conftest.er1
15868   cat conftest.err >&5
15869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15870   (exit $ac_status); } &&
15871          { ac_try='test -z "$ac_c_werror_flag"
15872                          || test ! -s conftest.err'
15873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15874   (eval $ac_try) 2>&5
15875   ac_status=$?
15876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15877   (exit $ac_status); }; } &&
15878          { ac_try='test -s conftest.$ac_objext'
15879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15880   (eval $ac_try) 2>&5
15881   ac_status=$?
15882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15883   (exit $ac_status); }; }; then
15884   ac_cv_header_GL_glx_h=yes
15885 else
15886   echo "$as_me: failed program was:" >&5
15887 sed 's/^/| /' conftest.$ac_ext >&5
15888
15889 ac_cv_header_GL_glx_h=no
15890 fi
15891 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15892 fi
15893 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
15894 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
15895 if test $ac_cv_header_GL_glx_h = yes; then
15896   have_gl=yes
15897 else
15898   have_gl=no
15899 fi
15900
15901
15902   CPPFLAGS="$ac_save_CPPFLAGS"
15903   fi
15904
15905   # If we have the headers, try and figure out which vendor it's from.
15906   #
15907   if test "$have_gl" = yes ; then
15908
15909     # We need to know whether it's MesaGL so that we know which libraries
15910     # to link against.
15911     #
15912     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
15913 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
15914 if test "${ac_cv_have_mesa_gl+set}" = set; then
15915   echo $ECHO_N "(cached) $ECHO_C" >&6
15916 else
15917   ac_cv_have_mesa_gl=no
15918
15919   ac_save_CPPFLAGS="$CPPFLAGS"
15920   if test \! -z "$includedir" ; then
15921     CPPFLAGS="$CPPFLAGS -I$includedir"
15922   fi
15923   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15924   cat >conftest.$ac_ext <<_ACEOF
15925 /* confdefs.h.  */
15926 _ACEOF
15927 cat confdefs.h >>conftest.$ac_ext
15928 cat >>conftest.$ac_ext <<_ACEOF
15929 /* end confdefs.h.  */
15930 #include <GL/glx.h>
15931
15932 _ACEOF
15933 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15934   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
15935   ac_cv_have_mesa_gl=yes
15936 fi
15937 rm -f conftest*
15938
15939   CPPFLAGS="$ac_save_CPPFLAGS"
15940
15941 fi
15942 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
15943 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
15944     ac_have_mesa_gl=$ac_cv_have_mesa_gl
15945
15946
15947     gl_lib_1=""
15948     GL_LIBS=""
15949
15950
15951     # Some versions of MesaGL are compiled to require -lpthread.
15952     # So if the Mesa headers exist, and -lpthread exists, then always
15953     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
15954     #
15955     if test "$ac_have_mesa_gl" = yes; then
15956       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15957 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
15958 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
15959   echo $ECHO_N "(cached) $ECHO_C" >&6
15960 else
15961   ac_check_lib_save_LIBS=$LIBS
15962 LIBS="-lpthread  $LIBS"
15963 cat >conftest.$ac_ext <<_ACEOF
15964 /* confdefs.h.  */
15965 _ACEOF
15966 cat confdefs.h >>conftest.$ac_ext
15967 cat >>conftest.$ac_ext <<_ACEOF
15968 /* end confdefs.h.  */
15969
15970 /* Override any gcc2 internal prototype to avoid an error.  */
15971 #ifdef __cplusplus
15972 extern "C"
15973 #endif
15974 /* We use char because int might match the return type of a gcc2
15975    builtin and then its argument prototype would still apply.  */
15976 char pthread_create ();
15977 int
15978 main ()
15979 {
15980 pthread_create ();
15981   ;
15982   return 0;
15983 }
15984 _ACEOF
15985 rm -f conftest.$ac_objext conftest$ac_exeext
15986 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15987   (eval $ac_link) 2>conftest.er1
15988   ac_status=$?
15989   grep -v '^ *+' conftest.er1 >conftest.err
15990   rm -f conftest.er1
15991   cat conftest.err >&5
15992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15993   (exit $ac_status); } &&
15994          { ac_try='test -z "$ac_c_werror_flag"
15995                          || test ! -s conftest.err'
15996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15997   (eval $ac_try) 2>&5
15998   ac_status=$?
15999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16000   (exit $ac_status); }; } &&
16001          { ac_try='test -s conftest$ac_exeext'
16002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16003   (eval $ac_try) 2>&5
16004   ac_status=$?
16005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16006   (exit $ac_status); }; }; then
16007   ac_cv_lib_pthread_pthread_create=yes
16008 else
16009   echo "$as_me: failed program was:" >&5
16010 sed 's/^/| /' conftest.$ac_ext >&5
16011
16012 ac_cv_lib_pthread_pthread_create=no
16013 fi
16014 rm -f conftest.err conftest.$ac_objext \
16015       conftest$ac_exeext conftest.$ac_ext
16016 LIBS=$ac_check_lib_save_LIBS
16017 fi
16018 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
16019 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
16020 if test $ac_cv_lib_pthread_pthread_create = yes; then
16021   GL_LIBS="-lpthread"
16022 fi
16023
16024     fi
16025
16026
16027     # If we have Mesa headers, check to see if we can link against -lMesaGL.
16028     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
16029     # Else, warn that GL is busted.  (We have the headers, but no libs.)
16030     #
16031
16032     if test "$ac_have_mesa_gl" = yes ; then
16033
16034   ac_save_CPPFLAGS="$CPPFLAGS"
16035   ac_save_LDFLAGS="$LDFLAGS"
16036 #  ac_save_LIBS="$LIBS"
16037
16038   if test \! -z "$includedir" ; then
16039     CPPFLAGS="$CPPFLAGS -I$includedir"
16040   fi
16041   # note: $X_CFLAGS includes $x_includes
16042   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16043
16044   if test \! -z "$libdir" ; then
16045     LDFLAGS="$LDFLAGS -L$libdir"
16046   fi
16047   # note: $X_LIBS includes $x_libraries
16048   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16049
16050   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
16051 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
16052 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
16053   echo $ECHO_N "(cached) $ECHO_C" >&6
16054 else
16055   ac_check_lib_save_LIBS=$LIBS
16056 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16057 cat >conftest.$ac_ext <<_ACEOF
16058 /* confdefs.h.  */
16059 _ACEOF
16060 cat confdefs.h >>conftest.$ac_ext
16061 cat >>conftest.$ac_ext <<_ACEOF
16062 /* end confdefs.h.  */
16063
16064 /* Override any gcc2 internal prototype to avoid an error.  */
16065 #ifdef __cplusplus
16066 extern "C"
16067 #endif
16068 /* We use char because int might match the return type of a gcc2
16069    builtin and then its argument prototype would still apply.  */
16070 char glXCreateContext ();
16071 int
16072 main ()
16073 {
16074 glXCreateContext ();
16075   ;
16076   return 0;
16077 }
16078 _ACEOF
16079 rm -f conftest.$ac_objext conftest$ac_exeext
16080 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16081   (eval $ac_link) 2>conftest.er1
16082   ac_status=$?
16083   grep -v '^ *+' conftest.er1 >conftest.err
16084   rm -f conftest.er1
16085   cat conftest.err >&5
16086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16087   (exit $ac_status); } &&
16088          { ac_try='test -z "$ac_c_werror_flag"
16089                          || test ! -s conftest.err'
16090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16091   (eval $ac_try) 2>&5
16092   ac_status=$?
16093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16094   (exit $ac_status); }; } &&
16095          { ac_try='test -s conftest$ac_exeext'
16096   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16097   (eval $ac_try) 2>&5
16098   ac_status=$?
16099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16100   (exit $ac_status); }; }; then
16101   ac_cv_lib_MesaGL_glXCreateContext=yes
16102 else
16103   echo "$as_me: failed program was:" >&5
16104 sed 's/^/| /' conftest.$ac_ext >&5
16105
16106 ac_cv_lib_MesaGL_glXCreateContext=no
16107 fi
16108 rm -f conftest.err conftest.$ac_objext \
16109       conftest$ac_exeext conftest.$ac_ext
16110 LIBS=$ac_check_lib_save_LIBS
16111 fi
16112 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
16113 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
16114 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
16115   gl_lib_1="MesaGL"
16116                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
16117 fi
16118
16119   CPPFLAGS="$ac_save_CPPFLAGS"
16120   LDFLAGS="$ac_save_LDFLAGS"
16121 #  LIBS="$ac_save_LIBS"
16122
16123     fi
16124
16125     if test "$gl_lib_1" = "" ; then
16126
16127   ac_save_CPPFLAGS="$CPPFLAGS"
16128   ac_save_LDFLAGS="$LDFLAGS"
16129 #  ac_save_LIBS="$LIBS"
16130
16131   if test \! -z "$includedir" ; then
16132     CPPFLAGS="$CPPFLAGS -I$includedir"
16133   fi
16134   # note: $X_CFLAGS includes $x_includes
16135   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16136
16137   if test \! -z "$libdir" ; then
16138     LDFLAGS="$LDFLAGS -L$libdir"
16139   fi
16140   # note: $X_LIBS includes $x_libraries
16141   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16142
16143   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
16144 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
16145 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
16146   echo $ECHO_N "(cached) $ECHO_C" >&6
16147 else
16148   ac_check_lib_save_LIBS=$LIBS
16149 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16150 cat >conftest.$ac_ext <<_ACEOF
16151 /* confdefs.h.  */
16152 _ACEOF
16153 cat confdefs.h >>conftest.$ac_ext
16154 cat >>conftest.$ac_ext <<_ACEOF
16155 /* end confdefs.h.  */
16156
16157 /* Override any gcc2 internal prototype to avoid an error.  */
16158 #ifdef __cplusplus
16159 extern "C"
16160 #endif
16161 /* We use char because int might match the return type of a gcc2
16162    builtin and then its argument prototype would still apply.  */
16163 char glXCreateContext ();
16164 int
16165 main ()
16166 {
16167 glXCreateContext ();
16168   ;
16169   return 0;
16170 }
16171 _ACEOF
16172 rm -f conftest.$ac_objext conftest$ac_exeext
16173 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16174   (eval $ac_link) 2>conftest.er1
16175   ac_status=$?
16176   grep -v '^ *+' conftest.er1 >conftest.err
16177   rm -f conftest.er1
16178   cat conftest.err >&5
16179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16180   (exit $ac_status); } &&
16181          { ac_try='test -z "$ac_c_werror_flag"
16182                          || test ! -s conftest.err'
16183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16184   (eval $ac_try) 2>&5
16185   ac_status=$?
16186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16187   (exit $ac_status); }; } &&
16188          { ac_try='test -s conftest$ac_exeext'
16189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16190   (eval $ac_try) 2>&5
16191   ac_status=$?
16192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16193   (exit $ac_status); }; }; then
16194   ac_cv_lib_GL_glXCreateContext=yes
16195 else
16196   echo "$as_me: failed program was:" >&5
16197 sed 's/^/| /' conftest.$ac_ext >&5
16198
16199 ac_cv_lib_GL_glXCreateContext=no
16200 fi
16201 rm -f conftest.err conftest.$ac_objext \
16202       conftest$ac_exeext conftest.$ac_ext
16203 LIBS=$ac_check_lib_save_LIBS
16204 fi
16205 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
16206 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
16207 if test $ac_cv_lib_GL_glXCreateContext = yes; then
16208   gl_lib_1="GL"
16209                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
16210 fi
16211
16212   CPPFLAGS="$ac_save_CPPFLAGS"
16213   LDFLAGS="$ac_save_LDFLAGS"
16214 #  LIBS="$ac_save_LIBS"
16215
16216     fi
16217
16218     if test "$gl_lib_1" = "" ; then
16219       # we have headers, but no libs -- bail.
16220       have_gl=no
16221       ac_have_mesa_gl=no
16222       gl_halfassed=yes
16223     else
16224       # linking works -- we can build the GL hacks.
16225       cat >>confdefs.h <<\_ACEOF
16226 #define HAVE_GL 1
16227 _ACEOF
16228
16229       if test "$ac_have_mesa_gl" = yes ; then
16230         cat >>confdefs.h <<\_ACEOF
16231 #define HAVE_MESA_GL 1
16232 _ACEOF
16233
16234       fi
16235     fi
16236   fi
16237
16238
16239   # Now that we know we have GL headers and libs, do some more GL testing.
16240   #
16241
16242   if test "$have_gl" = yes ; then
16243     # If it's MesaGL, we'd like to issue a warning if the version number
16244     # is less than or equal to 2.6, because that version had a security bug.
16245     #
16246     if test "$ac_have_mesa_gl" = yes; then
16247
16248       echo "$as_me:$LINENO: checking MesaGL version number" >&5
16249 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
16250 if test "${ac_cv_mesagl_version_string+set}" = set; then
16251   echo $ECHO_N "(cached) $ECHO_C" >&6
16252 else
16253   cat > conftest.$ac_ext <<EOF
16254 #line 16260 "configure"
16255 #include "confdefs.h"
16256 #include <GL/gl.h>
16257 #ifndef MESA_MAJOR_VERSION
16258 # include <GL/xmesa.h>
16259 # ifdef XMESA_MAJOR_VERSION
16260    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
16261       we have to check the XMesa version number (the number of the X protocol
16262       support, which seems to be the same as the Mesa version number.)
16263     */
16264 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
16265 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
16266 # else
16267    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
16268       so we have no way of telling what version of Mesa this is at all.
16269       So, we'll guess that the osmesa version (the "offscreen protocol")
16270       is less than or equal to the real mesa version number.  Except that
16271       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
16272       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
16273     */
16274 # include <GL/osmesa.h>
16275 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
16276 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
16277 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
16278 #   undef MESA_MINOR_VERSION
16279 #   define MESA_MINOR_VERSION 4 or newer, probably?
16280 #  endif
16281 # endif
16282 #endif
16283 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
16284 EOF
16285
16286          ac_save_CPPFLAGS="$CPPFLAGS"
16287          if test \! -z "$includedir" ; then
16288            CPPFLAGS="$CPPFLAGS -I$includedir"
16289          fi
16290          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16291
16292          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
16293
16294          # M4 sucks!!
16295
16296           mglv=`echo "$mglv" | sed -n \
16297              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
16298
16299
16300          rm -f conftest.$ac_ext
16301
16302          CPPFLAGS="$ac_save_CPPFLAGS"
16303
16304          if test "$mglv" = ""; then
16305            ac_mesagl_version=unknown
16306            ac_mesagl_version_string=unknown
16307          else
16308            ac_mesagl_version_string="$mglv"
16309            # M4 sucks!!
16310
16311            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
16312            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
16313
16314            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
16315            if test -z "$ac_mesagl_version"; then
16316              ac_mesagl_version=unknown
16317              ac_mesagl_version_string=unknown
16318            fi
16319          fi
16320          ac_cv_mesagl_version=$ac_mesagl_version
16321          ac_cv_mesagl_version_string=$ac_mesagl_version_string
16322
16323 fi
16324 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
16325 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
16326       ac_mesagl_version=$ac_cv_mesagl_version
16327       ac_mesagl_version_string=$ac_cv_mesagl_version_string
16328     fi
16329
16330
16331     # Check for OpenGL 1.1 features.
16332     #
16333
16334   ac_save_CPPFLAGS="$CPPFLAGS"
16335   ac_save_LDFLAGS="$LDFLAGS"
16336 #  ac_save_LIBS="$LIBS"
16337
16338   if test \! -z "$includedir" ; then
16339     CPPFLAGS="$CPPFLAGS -I$includedir"
16340   fi
16341   # note: $X_CFLAGS includes $x_includes
16342   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16343
16344   if test \! -z "$libdir" ; then
16345     LDFLAGS="$LDFLAGS -L$libdir"
16346   fi
16347   # note: $X_LIBS includes $x_libraries
16348   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16349
16350   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
16351 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
16352 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
16353 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16354   echo $ECHO_N "(cached) $ECHO_C" >&6
16355 else
16356   ac_check_lib_save_LIBS=$LIBS
16357 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
16358 cat >conftest.$ac_ext <<_ACEOF
16359 /* confdefs.h.  */
16360 _ACEOF
16361 cat confdefs.h >>conftest.$ac_ext
16362 cat >>conftest.$ac_ext <<_ACEOF
16363 /* end confdefs.h.  */
16364
16365 /* Override any gcc2 internal prototype to avoid an error.  */
16366 #ifdef __cplusplus
16367 extern "C"
16368 #endif
16369 /* We use char because int might match the return type of a gcc2
16370    builtin and then its argument prototype would still apply.  */
16371 char glBindTexture ();
16372 int
16373 main ()
16374 {
16375 glBindTexture ();
16376   ;
16377   return 0;
16378 }
16379 _ACEOF
16380 rm -f conftest.$ac_objext conftest$ac_exeext
16381 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16382   (eval $ac_link) 2>conftest.er1
16383   ac_status=$?
16384   grep -v '^ *+' conftest.er1 >conftest.err
16385   rm -f conftest.er1
16386   cat conftest.err >&5
16387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16388   (exit $ac_status); } &&
16389          { ac_try='test -z "$ac_c_werror_flag"
16390                          || test ! -s conftest.err'
16391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16392   (eval $ac_try) 2>&5
16393   ac_status=$?
16394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16395   (exit $ac_status); }; } &&
16396          { ac_try='test -s conftest$ac_exeext'
16397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16398   (eval $ac_try) 2>&5
16399   ac_status=$?
16400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16401   (exit $ac_status); }; }; then
16402   eval "$as_ac_Lib=yes"
16403 else
16404   echo "$as_me: failed program was:" >&5
16405 sed 's/^/| /' conftest.$ac_ext >&5
16406
16407 eval "$as_ac_Lib=no"
16408 fi
16409 rm -f conftest.err conftest.$ac_objext \
16410       conftest$ac_exeext conftest.$ac_ext
16411 LIBS=$ac_check_lib_save_LIBS
16412 fi
16413 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16414 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16415 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16416   cat >>confdefs.h <<\_ACEOF
16417 #define HAVE_GLBINDTEXTURE 1
16418 _ACEOF
16419
16420 else
16421   true
16422 fi
16423
16424   CPPFLAGS="$ac_save_CPPFLAGS"
16425   LDFLAGS="$ac_save_LDFLAGS"
16426 #  LIBS="$ac_save_LIBS"
16427
16428   fi
16429
16430 elif test "$with_gl" != no; then
16431   echo "error: must be yes or no: --with-gl=$with_gl"
16432   exit 1
16433 fi
16434
16435
16436 ###############################################################################
16437 #
16438 #       Check for -lgle.
16439 #
16440 ###############################################################################
16441
16442 have_gle=no
16443 with_gle_req=unspecified
16444 gle_halfassed=no
16445
16446 # Check whether --with-gle or --without-gle was given.
16447 if test "${with_gle+set}" = set; then
16448   withval="$with_gle"
16449   with_gle="$withval"; with_gle_req="$withval"
16450 else
16451   with_gle=yes
16452 fi;
16453
16454
16455    case "$with_gle" in
16456     yes) ;;
16457     no)  ;;
16458
16459     /*)
16460      echo "$as_me:$LINENO: checking for GLE headers" >&5
16461 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
16462      d=$with_gle/include
16463      if test -d $d; then
16464        X_CFLAGS="-I$d $X_CFLAGS"
16465        echo "$as_me:$LINENO: result: $d" >&5
16466 echo "${ECHO_T}$d" >&6
16467      else
16468        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16469 echo "${ECHO_T}not found ($d: no such directory)" >&6
16470      fi
16471
16472      echo "$as_me:$LINENO: checking for GLE libs" >&5
16473 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
16474      d=$with_gle/lib
16475      if test -d $d; then
16476        X_LIBS="-L$d $X_LIBS"
16477        echo "$as_me:$LINENO: result: $d" >&5
16478 echo "${ECHO_T}$d" >&6
16479      else
16480        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16481 echo "${ECHO_T}not found ($d: no such directory)" >&6
16482      fi
16483
16484      # replace the directory string with "yes".
16485      with_gle_req="yes"
16486      with_gle=$with_gle_req
16487      ;;
16488
16489     *)
16490      echo ""
16491      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
16492      echo "       If it is a directory, then \`DIR/include' will be added to"
16493      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16494      exit 1
16495      ;;
16496    esac
16497
16498
16499 GLE_LIBS=""
16500
16501 if test "$have_gl" = no ; then
16502  true
16503 elif test "$with_gle" = yes; then
16504
16505
16506   ac_save_CPPFLAGS="$CPPFLAGS"
16507   if test \! -z "$includedir" ; then
16508     CPPFLAGS="$CPPFLAGS -I$includedir"
16509   fi
16510   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16511   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
16512 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
16513 if test "${ac_cv_header_GL_gle_h+set}" = set; then
16514   echo $ECHO_N "(cached) $ECHO_C" >&6
16515 else
16516   cat >conftest.$ac_ext <<_ACEOF
16517 /* confdefs.h.  */
16518 _ACEOF
16519 cat confdefs.h >>conftest.$ac_ext
16520 cat >>conftest.$ac_ext <<_ACEOF
16521 /* end confdefs.h.  */
16522 #include <GL/gl.h>
16523
16524 #include <GL/gle.h>
16525 _ACEOF
16526 rm -f conftest.$ac_objext
16527 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16528   (eval $ac_compile) 2>conftest.er1
16529   ac_status=$?
16530   grep -v '^ *+' conftest.er1 >conftest.err
16531   rm -f conftest.er1
16532   cat conftest.err >&5
16533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16534   (exit $ac_status); } &&
16535          { ac_try='test -z "$ac_c_werror_flag"
16536                          || test ! -s conftest.err'
16537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16538   (eval $ac_try) 2>&5
16539   ac_status=$?
16540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16541   (exit $ac_status); }; } &&
16542          { ac_try='test -s conftest.$ac_objext'
16543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16544   (eval $ac_try) 2>&5
16545   ac_status=$?
16546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16547   (exit $ac_status); }; }; then
16548   ac_cv_header_GL_gle_h=yes
16549 else
16550   echo "$as_me: failed program was:" >&5
16551 sed 's/^/| /' conftest.$ac_ext >&5
16552
16553 ac_cv_header_GL_gle_h=no
16554 fi
16555 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16556 fi
16557 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
16558 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
16559 if test $ac_cv_header_GL_gle_h = yes; then
16560   have_gle3=yes
16561 else
16562   have_gle3=no
16563 fi
16564
16565
16566   CPPFLAGS="$ac_save_CPPFLAGS"
16567   if test "$have_gle3" = yes ; then
16568     have_gle=yes;
16569   else
16570
16571   ac_save_CPPFLAGS="$CPPFLAGS"
16572   if test \! -z "$includedir" ; then
16573     CPPFLAGS="$CPPFLAGS -I$includedir"
16574   fi
16575   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16576   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
16577 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
16578 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
16579   echo $ECHO_N "(cached) $ECHO_C" >&6
16580 else
16581   cat >conftest.$ac_ext <<_ACEOF
16582 /* confdefs.h.  */
16583 _ACEOF
16584 cat confdefs.h >>conftest.$ac_ext
16585 cat >>conftest.$ac_ext <<_ACEOF
16586 /* end confdefs.h.  */
16587 #include <GL/gl.h>
16588
16589 #include <GL/gutil.h>
16590 _ACEOF
16591 rm -f conftest.$ac_objext
16592 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16593   (eval $ac_compile) 2>conftest.er1
16594   ac_status=$?
16595   grep -v '^ *+' conftest.er1 >conftest.err
16596   rm -f conftest.er1
16597   cat conftest.err >&5
16598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16599   (exit $ac_status); } &&
16600          { ac_try='test -z "$ac_c_werror_flag"
16601                          || test ! -s conftest.err'
16602   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16603   (eval $ac_try) 2>&5
16604   ac_status=$?
16605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16606   (exit $ac_status); }; } &&
16607          { ac_try='test -s conftest.$ac_objext'
16608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16609   (eval $ac_try) 2>&5
16610   ac_status=$?
16611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16612   (exit $ac_status); }; }; then
16613   ac_cv_header_GL_gutil_h=yes
16614 else
16615   echo "$as_me: failed program was:" >&5
16616 sed 's/^/| /' conftest.$ac_ext >&5
16617
16618 ac_cv_header_GL_gutil_h=no
16619 fi
16620 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16621 fi
16622 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
16623 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
16624 if test $ac_cv_header_GL_gutil_h = yes; then
16625   have_gle=yes
16626 else
16627   have_gle=no
16628 fi
16629
16630
16631   CPPFLAGS="$ac_save_CPPFLAGS"
16632     if test "$have_gle" = yes ; then
16633
16634   ac_save_CPPFLAGS="$CPPFLAGS"
16635   if test \! -z "$includedir" ; then
16636     CPPFLAGS="$CPPFLAGS -I$includedir"
16637   fi
16638   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16639   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
16640 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
16641 if test "${ac_cv_header_GL_tube_h+set}" = set; then
16642   echo $ECHO_N "(cached) $ECHO_C" >&6
16643 else
16644   cat >conftest.$ac_ext <<_ACEOF
16645 /* confdefs.h.  */
16646 _ACEOF
16647 cat confdefs.h >>conftest.$ac_ext
16648 cat >>conftest.$ac_ext <<_ACEOF
16649 /* end confdefs.h.  */
16650 #include <GL/gl.h>
16651
16652 #include <GL/tube.h>
16653 _ACEOF
16654 rm -f conftest.$ac_objext
16655 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16656   (eval $ac_compile) 2>conftest.er1
16657   ac_status=$?
16658   grep -v '^ *+' conftest.er1 >conftest.err
16659   rm -f conftest.er1
16660   cat conftest.err >&5
16661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16662   (exit $ac_status); } &&
16663          { ac_try='test -z "$ac_c_werror_flag"
16664                          || test ! -s conftest.err'
16665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16666   (eval $ac_try) 2>&5
16667   ac_status=$?
16668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16669   (exit $ac_status); }; } &&
16670          { ac_try='test -s conftest.$ac_objext'
16671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16672   (eval $ac_try) 2>&5
16673   ac_status=$?
16674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16675   (exit $ac_status); }; }; then
16676   ac_cv_header_GL_tube_h=yes
16677 else
16678   echo "$as_me: failed program was:" >&5
16679 sed 's/^/| /' conftest.$ac_ext >&5
16680
16681 ac_cv_header_GL_tube_h=no
16682 fi
16683 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16684 fi
16685 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
16686 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
16687 if test $ac_cv_header_GL_tube_h = yes; then
16688   have_gle=yes
16689 else
16690   have_gle=no
16691 fi
16692
16693
16694   CPPFLAGS="$ac_save_CPPFLAGS"
16695     fi
16696   fi
16697
16698   if test "$have_gle" = yes ; then
16699     have_gle=no
16700     gle_halfassed=yes
16701
16702   ac_save_CPPFLAGS="$CPPFLAGS"
16703   ac_save_LDFLAGS="$LDFLAGS"
16704 #  ac_save_LIBS="$LIBS"
16705
16706   if test \! -z "$includedir" ; then
16707     CPPFLAGS="$CPPFLAGS -I$includedir"
16708   fi
16709   # note: $X_CFLAGS includes $x_includes
16710   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16711
16712   if test \! -z "$libdir" ; then
16713     LDFLAGS="$LDFLAGS -L$libdir"
16714   fi
16715   # note: $X_LIBS includes $x_libraries
16716   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16717
16718   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
16719 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
16720 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
16721   echo $ECHO_N "(cached) $ECHO_C" >&6
16722 else
16723   ac_check_lib_save_LIBS=$LIBS
16724 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16725 cat >conftest.$ac_ext <<_ACEOF
16726 /* confdefs.h.  */
16727 _ACEOF
16728 cat confdefs.h >>conftest.$ac_ext
16729 cat >>conftest.$ac_ext <<_ACEOF
16730 /* end confdefs.h.  */
16731
16732 /* Override any gcc2 internal prototype to avoid an error.  */
16733 #ifdef __cplusplus
16734 extern "C"
16735 #endif
16736 /* We use char because int might match the return type of a gcc2
16737    builtin and then its argument prototype would still apply.  */
16738 char gleCreateGC ();
16739 int
16740 main ()
16741 {
16742 gleCreateGC ();
16743   ;
16744   return 0;
16745 }
16746 _ACEOF
16747 rm -f conftest.$ac_objext conftest$ac_exeext
16748 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16749   (eval $ac_link) 2>conftest.er1
16750   ac_status=$?
16751   grep -v '^ *+' conftest.er1 >conftest.err
16752   rm -f conftest.er1
16753   cat conftest.err >&5
16754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16755   (exit $ac_status); } &&
16756          { ac_try='test -z "$ac_c_werror_flag"
16757                          || test ! -s conftest.err'
16758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16759   (eval $ac_try) 2>&5
16760   ac_status=$?
16761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16762   (exit $ac_status); }; } &&
16763          { ac_try='test -s conftest$ac_exeext'
16764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16765   (eval $ac_try) 2>&5
16766   ac_status=$?
16767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16768   (exit $ac_status); }; }; then
16769   ac_cv_lib_gle_gleCreateGC=yes
16770 else
16771   echo "$as_me: failed program was:" >&5
16772 sed 's/^/| /' conftest.$ac_ext >&5
16773
16774 ac_cv_lib_gle_gleCreateGC=no
16775 fi
16776 rm -f conftest.err conftest.$ac_objext \
16777       conftest$ac_exeext conftest.$ac_ext
16778 LIBS=$ac_check_lib_save_LIBS
16779 fi
16780 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
16781 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
16782 if test $ac_cv_lib_gle_gleCreateGC = yes; then
16783   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
16784 fi
16785
16786   CPPFLAGS="$ac_save_CPPFLAGS"
16787   LDFLAGS="$ac_save_LDFLAGS"
16788 #  LIBS="$ac_save_LIBS"
16789
16790   fi
16791   if test "$have_gle" = yes ; then
16792     have_gle=no
16793     gle_halfassed=yes
16794
16795     # sometimes the libmatrix stuff is included in libgle.  look there first.
16796 #
16797 # I don't get it.  For some reason, this test passes on SGI, as if
16798 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
16799 # Yet the link is succeeding.  Why???
16800 #
16801 #    AC_CHECK_X_LIB(gle, uview_direction_d,
16802 #                   [have_gle=yes; gle_halfassed=no],
16803 #                   [], $GL_LIBS -lX11 -lXext -lm)
16804
16805     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
16806     # *sigh*
16807     if test "$have_gle3" = yes ; then
16808
16809   ac_save_CPPFLAGS="$CPPFLAGS"
16810   ac_save_LDFLAGS="$LDFLAGS"
16811 #  ac_save_LIBS="$LIBS"
16812
16813   if test \! -z "$includedir" ; then
16814     CPPFLAGS="$CPPFLAGS -I$includedir"
16815   fi
16816   # note: $X_CFLAGS includes $x_includes
16817   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16818
16819   if test \! -z "$libdir" ; then
16820     LDFLAGS="$LDFLAGS -L$libdir"
16821   fi
16822   # note: $X_LIBS includes $x_libraries
16823   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16824
16825   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
16826 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
16827 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
16828   echo $ECHO_N "(cached) $ECHO_C" >&6
16829 else
16830   ac_check_lib_save_LIBS=$LIBS
16831 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16832 cat >conftest.$ac_ext <<_ACEOF
16833 /* confdefs.h.  */
16834 _ACEOF
16835 cat confdefs.h >>conftest.$ac_ext
16836 cat >>conftest.$ac_ext <<_ACEOF
16837 /* end confdefs.h.  */
16838
16839 /* Override any gcc2 internal prototype to avoid an error.  */
16840 #ifdef __cplusplus
16841 extern "C"
16842 #endif
16843 /* We use char because int might match the return type of a gcc2
16844    builtin and then its argument prototype would still apply.  */
16845 char uview_direction ();
16846 int
16847 main ()
16848 {
16849 uview_direction ();
16850   ;
16851   return 0;
16852 }
16853 _ACEOF
16854 rm -f conftest.$ac_objext conftest$ac_exeext
16855 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16856   (eval $ac_link) 2>conftest.er1
16857   ac_status=$?
16858   grep -v '^ *+' conftest.er1 >conftest.err
16859   rm -f conftest.er1
16860   cat conftest.err >&5
16861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16862   (exit $ac_status); } &&
16863          { ac_try='test -z "$ac_c_werror_flag"
16864                          || test ! -s conftest.err'
16865   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16866   (eval $ac_try) 2>&5
16867   ac_status=$?
16868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16869   (exit $ac_status); }; } &&
16870          { ac_try='test -s conftest$ac_exeext'
16871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16872   (eval $ac_try) 2>&5
16873   ac_status=$?
16874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16875   (exit $ac_status); }; }; then
16876   ac_cv_lib_gle_uview_direction=yes
16877 else
16878   echo "$as_me: failed program was:" >&5
16879 sed 's/^/| /' conftest.$ac_ext >&5
16880
16881 ac_cv_lib_gle_uview_direction=no
16882 fi
16883 rm -f conftest.err conftest.$ac_objext \
16884       conftest$ac_exeext conftest.$ac_ext
16885 LIBS=$ac_check_lib_save_LIBS
16886 fi
16887 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
16888 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
16889 if test $ac_cv_lib_gle_uview_direction = yes; then
16890   have_gle=yes; gle_halfassed=no
16891 fi
16892
16893   CPPFLAGS="$ac_save_CPPFLAGS"
16894   LDFLAGS="$ac_save_LDFLAGS"
16895 #  LIBS="$ac_save_LIBS"
16896
16897     fi
16898     # if it wasn't in libgle, then look in libmatrix.
16899     if test "$have_gle" = no ; then
16900
16901   ac_save_CPPFLAGS="$CPPFLAGS"
16902   ac_save_LDFLAGS="$LDFLAGS"
16903 #  ac_save_LIBS="$LIBS"
16904
16905   if test \! -z "$includedir" ; then
16906     CPPFLAGS="$CPPFLAGS -I$includedir"
16907   fi
16908   # note: $X_CFLAGS includes $x_includes
16909   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16910
16911   if test \! -z "$libdir" ; then
16912     LDFLAGS="$LDFLAGS -L$libdir"
16913   fi
16914   # note: $X_LIBS includes $x_libraries
16915   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16916
16917   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
16918 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
16919 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
16920   echo $ECHO_N "(cached) $ECHO_C" >&6
16921 else
16922   ac_check_lib_save_LIBS=$LIBS
16923 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
16924 cat >conftest.$ac_ext <<_ACEOF
16925 /* confdefs.h.  */
16926 _ACEOF
16927 cat confdefs.h >>conftest.$ac_ext
16928 cat >>conftest.$ac_ext <<_ACEOF
16929 /* end confdefs.h.  */
16930
16931 /* Override any gcc2 internal prototype to avoid an error.  */
16932 #ifdef __cplusplus
16933 extern "C"
16934 #endif
16935 /* We use char because int might match the return type of a gcc2
16936    builtin and then its argument prototype would still apply.  */
16937 char uview_direction_d ();
16938 int
16939 main ()
16940 {
16941 uview_direction_d ();
16942   ;
16943   return 0;
16944 }
16945 _ACEOF
16946 rm -f conftest.$ac_objext conftest$ac_exeext
16947 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16948   (eval $ac_link) 2>conftest.er1
16949   ac_status=$?
16950   grep -v '^ *+' conftest.er1 >conftest.err
16951   rm -f conftest.er1
16952   cat conftest.err >&5
16953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16954   (exit $ac_status); } &&
16955          { ac_try='test -z "$ac_c_werror_flag"
16956                          || test ! -s conftest.err'
16957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16958   (eval $ac_try) 2>&5
16959   ac_status=$?
16960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16961   (exit $ac_status); }; } &&
16962          { ac_try='test -s conftest$ac_exeext'
16963   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16964   (eval $ac_try) 2>&5
16965   ac_status=$?
16966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16967   (exit $ac_status); }; }; then
16968   ac_cv_lib_matrix_uview_direction_d=yes
16969 else
16970   echo "$as_me: failed program was:" >&5
16971 sed 's/^/| /' conftest.$ac_ext >&5
16972
16973 ac_cv_lib_matrix_uview_direction_d=no
16974 fi
16975 rm -f conftest.err conftest.$ac_objext \
16976       conftest$ac_exeext conftest.$ac_ext
16977 LIBS=$ac_check_lib_save_LIBS
16978 fi
16979 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
16980 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
16981 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
16982   have_gle=yes; gle_halfassed=no;
16983                       GLE_LIBS="$GLE_LIBS -lmatrix"
16984 fi
16985
16986   CPPFLAGS="$ac_save_CPPFLAGS"
16987   LDFLAGS="$ac_save_LDFLAGS"
16988 #  LIBS="$ac_save_LIBS"
16989
16990     fi
16991   fi
16992
16993   if test "$have_gle" = yes ; then
16994     cat >>confdefs.h <<\_ACEOF
16995 #define HAVE_GLE 1
16996 _ACEOF
16997
16998     if test "$have_gle3" = yes ; then
16999       cat >>confdefs.h <<\_ACEOF
17000 #define HAVE_GLE3 1
17001 _ACEOF
17002
17003     fi
17004   fi
17005
17006 elif test "$with_gle" != no; then
17007   echo "error: must be yes or no: --with-gle=$with_gle"
17008   exit 1
17009
17010 fi
17011
17012
17013 ###############################################################################
17014 #
17015 #       Check for -lgdk_pixbuf.
17016 #       These tests are for gdk_pixbuf usage of the hacks,
17017 #       not xscreensaver-demo (thus we have to test again to get
17018 #       the libraries right: don't want to pull in all of GTK
17019 #       for the hacks.)
17020 #
17021 ###############################################################################
17022
17023 have_gdk_pixbuf=no
17024 with_gdk_pixbuf_req=unspecified
17025
17026 # Check whether --with-pixbuf or --without-pixbuf was given.
17027 if test "${with_pixbuf+set}" = set; then
17028   withval="$with_pixbuf"
17029   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
17030 else
17031   with_gdk_pixbuf=yes
17032 fi;
17033
17034 # if --with-pixbuf=/directory/ was specified, remember that directory so that
17035 # we can also look for the `gdk-pixbuf-config' program in that directory.
17036 case "$with_gdk_pixbuf" in
17037   /*)
17038     gdk_pixbuf_dir="$with_gdk_pixbuf"
17039     ;;
17040   *)
17041     gdk_pixbuf_dir=""
17042     ;;
17043 esac
17044
17045
17046    case "$with_gdk_pixbuf" in
17047     yes) ;;
17048     no)  ;;
17049
17050     /*)
17051      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
17052 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
17053      d=$with_gdk_pixbuf/include
17054      if test -d $d; then
17055        X_CFLAGS="-I$d $X_CFLAGS"
17056        echo "$as_me:$LINENO: result: $d" >&5
17057 echo "${ECHO_T}$d" >&6
17058      else
17059        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17060 echo "${ECHO_T}not found ($d: no such directory)" >&6
17061      fi
17062
17063      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
17064 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
17065      d=$with_gdk_pixbuf/lib
17066      if test -d $d; then
17067        X_LIBS="-L$d $X_LIBS"
17068        echo "$as_me:$LINENO: result: $d" >&5
17069 echo "${ECHO_T}$d" >&6
17070      else
17071        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17072 echo "${ECHO_T}not found ($d: no such directory)" >&6
17073      fi
17074
17075      # replace the directory string with "yes".
17076      with_gdk_pixbuf_req="yes"
17077      with_gdk_pixbuf=$with_gdk_pixbuf_req
17078      ;;
17079
17080     *)
17081      echo ""
17082      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
17083      echo "       If it is a directory, then \`DIR/include' will be added to"
17084      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17085      exit 1
17086      ;;
17087    esac
17088
17089
17090 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
17091   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
17092   exit 1
17093 fi
17094
17095 if test "$with_gdk_pixbuf" = yes; then
17096   have_gdk_pixbuf=no
17097
17098   pkgs=''
17099   ok="yes"
17100
17101   pkg_check_version gdk-pixbuf-2.0      2.0.0
17102   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
17103   have_gdk_pixbuf="$ok"
17104
17105   if test "$have_gdk_pixbuf" = yes; then
17106     echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
17107 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
17108 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
17109   echo $ECHO_N "(cached) $ECHO_C" >&6
17110 else
17111   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
17112 fi
17113 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
17114 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
17115     echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
17116 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
17117 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
17118   echo $ECHO_N "(cached) $ECHO_C" >&6
17119 else
17120   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
17121 fi
17122 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
17123 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
17124   fi
17125   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
17126   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
17127
17128
17129   if test "$have_gdk_pixbuf" = yes; then
17130     #
17131     # we appear to have pixbuf; check for headers/libs to be sure.
17132     #
17133     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
17134     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
17135
17136     have_gdk_pixbuf=no
17137
17138     # check for header A...
17139
17140   ac_save_CPPFLAGS="$CPPFLAGS"
17141   if test \! -z "$includedir" ; then
17142     CPPFLAGS="$CPPFLAGS -I$includedir"
17143   fi
17144   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17145   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17146   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17147 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
17148 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17149   echo $ECHO_N "(cached) $ECHO_C" >&6
17150 fi
17151 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17152 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
17153 else
17154   # Is the header compilable?
17155 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
17156 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
17157 cat >conftest.$ac_ext <<_ACEOF
17158 /* confdefs.h.  */
17159 _ACEOF
17160 cat confdefs.h >>conftest.$ac_ext
17161 cat >>conftest.$ac_ext <<_ACEOF
17162 /* end confdefs.h.  */
17163 $ac_includes_default
17164 #include <gdk-pixbuf/gdk-pixbuf.h>
17165 _ACEOF
17166 rm -f conftest.$ac_objext
17167 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17168   (eval $ac_compile) 2>conftest.er1
17169   ac_status=$?
17170   grep -v '^ *+' conftest.er1 >conftest.err
17171   rm -f conftest.er1
17172   cat conftest.err >&5
17173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17174   (exit $ac_status); } &&
17175          { ac_try='test -z "$ac_c_werror_flag"
17176                          || test ! -s conftest.err'
17177   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17178   (eval $ac_try) 2>&5
17179   ac_status=$?
17180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17181   (exit $ac_status); }; } &&
17182          { ac_try='test -s conftest.$ac_objext'
17183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17184   (eval $ac_try) 2>&5
17185   ac_status=$?
17186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17187   (exit $ac_status); }; }; then
17188   ac_header_compiler=yes
17189 else
17190   echo "$as_me: failed program was:" >&5
17191 sed 's/^/| /' conftest.$ac_ext >&5
17192
17193 ac_header_compiler=no
17194 fi
17195 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17196 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17197 echo "${ECHO_T}$ac_header_compiler" >&6
17198
17199 # Is the header present?
17200 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
17201 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
17202 cat >conftest.$ac_ext <<_ACEOF
17203 /* confdefs.h.  */
17204 _ACEOF
17205 cat confdefs.h >>conftest.$ac_ext
17206 cat >>conftest.$ac_ext <<_ACEOF
17207 /* end confdefs.h.  */
17208 #include <gdk-pixbuf/gdk-pixbuf.h>
17209 _ACEOF
17210 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17211   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17212   ac_status=$?
17213   grep -v '^ *+' conftest.er1 >conftest.err
17214   rm -f conftest.er1
17215   cat conftest.err >&5
17216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17217   (exit $ac_status); } >/dev/null; then
17218   if test -s conftest.err; then
17219     ac_cpp_err=$ac_c_preproc_warn_flag
17220     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17221   else
17222     ac_cpp_err=
17223   fi
17224 else
17225   ac_cpp_err=yes
17226 fi
17227 if test -z "$ac_cpp_err"; then
17228   ac_header_preproc=yes
17229 else
17230   echo "$as_me: failed program was:" >&5
17231 sed 's/^/| /' conftest.$ac_ext >&5
17232
17233   ac_header_preproc=no
17234 fi
17235 rm -f conftest.err conftest.$ac_ext
17236 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17237 echo "${ECHO_T}$ac_header_preproc" >&6
17238
17239 # So?  What about this header?
17240 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17241   yes:no: )
17242     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
17243 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17244     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
17245 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
17246     ac_header_preproc=yes
17247     ;;
17248   no:yes:* )
17249     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
17250 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
17251     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
17252 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
17253     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
17254 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
17255     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
17256 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17257     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
17258 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
17259     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
17260 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
17261     (
17262       cat <<\_ASBOX
17263 ## ------------------------------------------ ##
17264 ## Report this to the AC_PACKAGE_NAME lists.  ##
17265 ## ------------------------------------------ ##
17266 _ASBOX
17267     ) |
17268       sed "s/^/$as_me: WARNING:     /" >&2
17269     ;;
17270 esac
17271 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17272 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
17273 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17274   echo $ECHO_N "(cached) $ECHO_C" >&6
17275 else
17276   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
17277 fi
17278 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17279 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
17280
17281 fi
17282 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
17283   have_gdk_pixbuf=yes
17284 fi
17285
17286
17287   CPPFLAGS="$ac_save_CPPFLAGS"
17288
17289     # if that worked, check for header B...
17290     if test "$have_gdk_pixbuf" = yes; then
17291       have_gdk_pixbuf=no
17292       gdk_pixbuf_halfassed=yes
17293
17294   ac_save_CPPFLAGS="$CPPFLAGS"
17295   if test \! -z "$includedir" ; then
17296     CPPFLAGS="$CPPFLAGS -I$includedir"
17297   fi
17298   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17299   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17300   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17301 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17302 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17303   echo $ECHO_N "(cached) $ECHO_C" >&6
17304 fi
17305 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17306 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
17307 else
17308   # Is the header compilable?
17309 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
17310 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
17311 cat >conftest.$ac_ext <<_ACEOF
17312 /* confdefs.h.  */
17313 _ACEOF
17314 cat confdefs.h >>conftest.$ac_ext
17315 cat >>conftest.$ac_ext <<_ACEOF
17316 /* end confdefs.h.  */
17317 $ac_includes_default
17318 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17319 _ACEOF
17320 rm -f conftest.$ac_objext
17321 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17322   (eval $ac_compile) 2>conftest.er1
17323   ac_status=$?
17324   grep -v '^ *+' conftest.er1 >conftest.err
17325   rm -f conftest.er1
17326   cat conftest.err >&5
17327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17328   (exit $ac_status); } &&
17329          { ac_try='test -z "$ac_c_werror_flag"
17330                          || test ! -s conftest.err'
17331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17332   (eval $ac_try) 2>&5
17333   ac_status=$?
17334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17335   (exit $ac_status); }; } &&
17336          { ac_try='test -s conftest.$ac_objext'
17337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17338   (eval $ac_try) 2>&5
17339   ac_status=$?
17340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17341   (exit $ac_status); }; }; then
17342   ac_header_compiler=yes
17343 else
17344   echo "$as_me: failed program was:" >&5
17345 sed 's/^/| /' conftest.$ac_ext >&5
17346
17347 ac_header_compiler=no
17348 fi
17349 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17350 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17351 echo "${ECHO_T}$ac_header_compiler" >&6
17352
17353 # Is the header present?
17354 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
17355 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
17356 cat >conftest.$ac_ext <<_ACEOF
17357 /* confdefs.h.  */
17358 _ACEOF
17359 cat confdefs.h >>conftest.$ac_ext
17360 cat >>conftest.$ac_ext <<_ACEOF
17361 /* end confdefs.h.  */
17362 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17363 _ACEOF
17364 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17365   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17366   ac_status=$?
17367   grep -v '^ *+' conftest.er1 >conftest.err
17368   rm -f conftest.er1
17369   cat conftest.err >&5
17370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17371   (exit $ac_status); } >/dev/null; then
17372   if test -s conftest.err; then
17373     ac_cpp_err=$ac_c_preproc_warn_flag
17374     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17375   else
17376     ac_cpp_err=
17377   fi
17378 else
17379   ac_cpp_err=yes
17380 fi
17381 if test -z "$ac_cpp_err"; then
17382   ac_header_preproc=yes
17383 else
17384   echo "$as_me: failed program was:" >&5
17385 sed 's/^/| /' conftest.$ac_ext >&5
17386
17387   ac_header_preproc=no
17388 fi
17389 rm -f conftest.err conftest.$ac_ext
17390 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17391 echo "${ECHO_T}$ac_header_preproc" >&6
17392
17393 # So?  What about this header?
17394 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17395   yes:no: )
17396     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17397 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17398     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17399 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17400     ac_header_preproc=yes
17401     ;;
17402   no:yes:* )
17403     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17404 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17405     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17406 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17407     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17408 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17409     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17410 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17411     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17412 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17413     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17414 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17415     (
17416       cat <<\_ASBOX
17417 ## ------------------------------------------ ##
17418 ## Report this to the AC_PACKAGE_NAME lists.  ##
17419 ## ------------------------------------------ ##
17420 _ASBOX
17421     ) |
17422       sed "s/^/$as_me: WARNING:     /" >&2
17423     ;;
17424 esac
17425 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17426 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17427 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17428   echo $ECHO_N "(cached) $ECHO_C" >&6
17429 else
17430   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
17431 fi
17432 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17433 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
17434
17435 fi
17436 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
17437   have_gdk_pixbuf=yes
17438                          gdk_pixbuf_halfassed=no
17439 fi
17440
17441
17442   CPPFLAGS="$ac_save_CPPFLAGS"
17443
17444       # yay, it has a new name in Gtk 2.x...
17445       if test "$have_gdk_pixbuf" = no; then
17446         have_gdk_pixbuf=no
17447         gdk_pixbuf_halfassed=yes
17448
17449   ac_save_CPPFLAGS="$CPPFLAGS"
17450   if test \! -z "$includedir" ; then
17451     CPPFLAGS="$CPPFLAGS -I$includedir"
17452   fi
17453   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17454   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17455   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17456 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17457 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17458   echo $ECHO_N "(cached) $ECHO_C" >&6
17459 fi
17460 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17461 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
17462 else
17463   # Is the header compilable?
17464 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
17465 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
17466 cat >conftest.$ac_ext <<_ACEOF
17467 /* confdefs.h.  */
17468 _ACEOF
17469 cat confdefs.h >>conftest.$ac_ext
17470 cat >>conftest.$ac_ext <<_ACEOF
17471 /* end confdefs.h.  */
17472 $ac_includes_default
17473 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17474 _ACEOF
17475 rm -f conftest.$ac_objext
17476 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17477   (eval $ac_compile) 2>conftest.er1
17478   ac_status=$?
17479   grep -v '^ *+' conftest.er1 >conftest.err
17480   rm -f conftest.er1
17481   cat conftest.err >&5
17482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17483   (exit $ac_status); } &&
17484          { ac_try='test -z "$ac_c_werror_flag"
17485                          || test ! -s conftest.err'
17486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17487   (eval $ac_try) 2>&5
17488   ac_status=$?
17489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17490   (exit $ac_status); }; } &&
17491          { ac_try='test -s conftest.$ac_objext'
17492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17493   (eval $ac_try) 2>&5
17494   ac_status=$?
17495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17496   (exit $ac_status); }; }; then
17497   ac_header_compiler=yes
17498 else
17499   echo "$as_me: failed program was:" >&5
17500 sed 's/^/| /' conftest.$ac_ext >&5
17501
17502 ac_header_compiler=no
17503 fi
17504 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17505 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17506 echo "${ECHO_T}$ac_header_compiler" >&6
17507
17508 # Is the header present?
17509 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
17510 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
17511 cat >conftest.$ac_ext <<_ACEOF
17512 /* confdefs.h.  */
17513 _ACEOF
17514 cat confdefs.h >>conftest.$ac_ext
17515 cat >>conftest.$ac_ext <<_ACEOF
17516 /* end confdefs.h.  */
17517 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17518 _ACEOF
17519 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17520   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17521   ac_status=$?
17522   grep -v '^ *+' conftest.er1 >conftest.err
17523   rm -f conftest.er1
17524   cat conftest.err >&5
17525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17526   (exit $ac_status); } >/dev/null; then
17527   if test -s conftest.err; then
17528     ac_cpp_err=$ac_c_preproc_warn_flag
17529     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17530   else
17531     ac_cpp_err=
17532   fi
17533 else
17534   ac_cpp_err=yes
17535 fi
17536 if test -z "$ac_cpp_err"; then
17537   ac_header_preproc=yes
17538 else
17539   echo "$as_me: failed program was:" >&5
17540 sed 's/^/| /' conftest.$ac_ext >&5
17541
17542   ac_header_preproc=no
17543 fi
17544 rm -f conftest.err conftest.$ac_ext
17545 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17546 echo "${ECHO_T}$ac_header_preproc" >&6
17547
17548 # So?  What about this header?
17549 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17550   yes:no: )
17551     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17552 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17553     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17554 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17555     ac_header_preproc=yes
17556     ;;
17557   no:yes:* )
17558     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17559 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17560     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17561 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17562     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17563 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17564     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17565 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17566     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17567 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17568     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17569 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17570     (
17571       cat <<\_ASBOX
17572 ## ------------------------------------------ ##
17573 ## Report this to the AC_PACKAGE_NAME lists.  ##
17574 ## ------------------------------------------ ##
17575 _ASBOX
17576     ) |
17577       sed "s/^/$as_me: WARNING:     /" >&2
17578     ;;
17579 esac
17580 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17581 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17582 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17583   echo $ECHO_N "(cached) $ECHO_C" >&6
17584 else
17585   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
17586 fi
17587 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17588 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
17589
17590 fi
17591 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
17592   have_gdk_pixbuf=yes
17593                            gdk_pixbuf_halfassed=no
17594 fi
17595
17596
17597   CPPFLAGS="$ac_save_CPPFLAGS"
17598       fi
17599     fi
17600     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
17601   fi
17602
17603   if test "$have_gdk_pixbuf" = yes; then
17604     # we have the headers, now check for the libraries
17605     have_gdk_pixbuf=no
17606     gdk_pixbuf_halfassed=yes
17607
17608     echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
17609 echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6
17610
17611     # library A...
17612
17613   ac_save_CPPFLAGS="$CPPFLAGS"
17614   ac_save_LDFLAGS="$LDFLAGS"
17615 #  ac_save_LIBS="$LIBS"
17616
17617   if test \! -z "$includedir" ; then
17618     CPPFLAGS="$CPPFLAGS -I$includedir"
17619   fi
17620   # note: $X_CFLAGS includes $x_includes
17621   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17622
17623   if test \! -z "$libdir" ; then
17624     LDFLAGS="$LDFLAGS -L$libdir"
17625   fi
17626   # note: $X_LIBS includes $x_libraries
17627   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17628
17629   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
17630 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
17631 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
17632   echo $ECHO_N "(cached) $ECHO_C" >&6
17633 else
17634   ac_check_lib_save_LIBS=$LIBS
17635 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17636 cat >conftest.$ac_ext <<_ACEOF
17637 /* confdefs.h.  */
17638 _ACEOF
17639 cat confdefs.h >>conftest.$ac_ext
17640 cat >>conftest.$ac_ext <<_ACEOF
17641 /* end confdefs.h.  */
17642
17643 /* Override any gcc2 internal prototype to avoid an error.  */
17644 #ifdef __cplusplus
17645 extern "C"
17646 #endif
17647 /* We use char because int might match the return type of a gcc2
17648    builtin and then its argument prototype would still apply.  */
17649 char gdk_pixbuf_new_from_file ();
17650 int
17651 main ()
17652 {
17653 gdk_pixbuf_new_from_file ();
17654   ;
17655   return 0;
17656 }
17657 _ACEOF
17658 rm -f conftest.$ac_objext conftest$ac_exeext
17659 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17660   (eval $ac_link) 2>conftest.er1
17661   ac_status=$?
17662   grep -v '^ *+' conftest.er1 >conftest.err
17663   rm -f conftest.er1
17664   cat conftest.err >&5
17665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17666   (exit $ac_status); } &&
17667          { ac_try='test -z "$ac_c_werror_flag"
17668                          || test ! -s conftest.err'
17669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17670   (eval $ac_try) 2>&5
17671   ac_status=$?
17672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17673   (exit $ac_status); }; } &&
17674          { ac_try='test -s conftest$ac_exeext'
17675   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17676   (eval $ac_try) 2>&5
17677   ac_status=$?
17678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17679   (exit $ac_status); }; }; then
17680   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
17681 else
17682   echo "$as_me: failed program was:" >&5
17683 sed 's/^/| /' conftest.$ac_ext >&5
17684
17685 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
17686 fi
17687 rm -f conftest.err conftest.$ac_objext \
17688       conftest$ac_exeext conftest.$ac_ext
17689 LIBS=$ac_check_lib_save_LIBS
17690 fi
17691 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
17692 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
17693 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
17694   have_gdk_pixbuf=yes
17695 fi
17696
17697   CPPFLAGS="$ac_save_CPPFLAGS"
17698   LDFLAGS="$ac_save_LDFLAGS"
17699 #  LIBS="$ac_save_LIBS"
17700
17701     # library B...
17702     if test "$have_gdk_pixbuf" = yes; then
17703       have_gdk_pixbuf=no
17704
17705   ac_save_CPPFLAGS="$CPPFLAGS"
17706   ac_save_LDFLAGS="$LDFLAGS"
17707 #  ac_save_LIBS="$LIBS"
17708
17709   if test \! -z "$includedir" ; then
17710     CPPFLAGS="$CPPFLAGS -I$includedir"
17711   fi
17712   # note: $X_CFLAGS includes $x_includes
17713   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17714
17715   if test \! -z "$libdir" ; then
17716     LDFLAGS="$LDFLAGS -L$libdir"
17717   fi
17718   # note: $X_LIBS includes $x_libraries
17719   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17720
17721   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
17722 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
17723 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
17724   echo $ECHO_N "(cached) $ECHO_C" >&6
17725 else
17726   ac_check_lib_save_LIBS=$LIBS
17727 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17728 cat >conftest.$ac_ext <<_ACEOF
17729 /* confdefs.h.  */
17730 _ACEOF
17731 cat confdefs.h >>conftest.$ac_ext
17732 cat >>conftest.$ac_ext <<_ACEOF
17733 /* end confdefs.h.  */
17734
17735 /* Override any gcc2 internal prototype to avoid an error.  */
17736 #ifdef __cplusplus
17737 extern "C"
17738 #endif
17739 /* We use char because int might match the return type of a gcc2
17740    builtin and then its argument prototype would still apply.  */
17741 char gdk_pixbuf_xlib_init ();
17742 int
17743 main ()
17744 {
17745 gdk_pixbuf_xlib_init ();
17746   ;
17747   return 0;
17748 }
17749 _ACEOF
17750 rm -f conftest.$ac_objext conftest$ac_exeext
17751 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17752   (eval $ac_link) 2>conftest.er1
17753   ac_status=$?
17754   grep -v '^ *+' conftest.er1 >conftest.err
17755   rm -f conftest.er1
17756   cat conftest.err >&5
17757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17758   (exit $ac_status); } &&
17759          { ac_try='test -z "$ac_c_werror_flag"
17760                          || test ! -s conftest.err'
17761   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17762   (eval $ac_try) 2>&5
17763   ac_status=$?
17764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17765   (exit $ac_status); }; } &&
17766          { ac_try='test -s conftest$ac_exeext'
17767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17768   (eval $ac_try) 2>&5
17769   ac_status=$?
17770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17771   (exit $ac_status); }; }; then
17772   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
17773 else
17774   echo "$as_me: failed program was:" >&5
17775 sed 's/^/| /' conftest.$ac_ext >&5
17776
17777 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
17778 fi
17779 rm -f conftest.err conftest.$ac_objext \
17780       conftest$ac_exeext conftest.$ac_ext
17781 LIBS=$ac_check_lib_save_LIBS
17782 fi
17783 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
17784 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
17785 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
17786   have_gdk_pixbuf=yes
17787                       gdk_pixbuf_halfassed=no
17788 fi
17789
17790   CPPFLAGS="$ac_save_CPPFLAGS"
17791   LDFLAGS="$ac_save_LDFLAGS"
17792 #  LIBS="$ac_save_LIBS"
17793
17794     fi
17795   fi
17796
17797   if test "$have_gdk_pixbuf" = yes; then
17798     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
17799     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
17800     cat >>confdefs.h <<\_ACEOF
17801 #define HAVE_GDK_PIXBUF 1
17802 _ACEOF
17803
17804   else
17805     echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
17806 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6
17807   fi
17808 fi
17809
17810
17811 ###############################################################################
17812 #
17813 #       Check for -lXpm.
17814 #
17815 ###############################################################################
17816
17817 have_xpm=no
17818 with_xpm_req=unspecified
17819
17820 # Check whether --with-xpm or --without-xpm was given.
17821 if test "${with_xpm+set}" = set; then
17822   withval="$with_xpm"
17823   with_xpm="$withval"; with_xpm_req="$withval"
17824 else
17825   with_xpm=yes
17826 fi;
17827
17828
17829    case "$with_xpm" in
17830     yes) ;;
17831     no)  ;;
17832
17833     /*)
17834      echo "$as_me:$LINENO: checking for XPM headers" >&5
17835 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
17836      d=$with_xpm/include
17837      if test -d $d; then
17838        X_CFLAGS="-I$d $X_CFLAGS"
17839        echo "$as_me:$LINENO: result: $d" >&5
17840 echo "${ECHO_T}$d" >&6
17841      else
17842        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17843 echo "${ECHO_T}not found ($d: no such directory)" >&6
17844      fi
17845
17846      echo "$as_me:$LINENO: checking for XPM libs" >&5
17847 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
17848      d=$with_xpm/lib
17849      if test -d $d; then
17850        X_LIBS="-L$d $X_LIBS"
17851        echo "$as_me:$LINENO: result: $d" >&5
17852 echo "${ECHO_T}$d" >&6
17853      else
17854        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17855 echo "${ECHO_T}not found ($d: no such directory)" >&6
17856      fi
17857
17858      # replace the directory string with "yes".
17859      with_xpm_req="yes"
17860      with_xpm=$with_xpm_req
17861      ;;
17862
17863     *)
17864      echo ""
17865      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
17866      echo "       If it is a directory, then \`DIR/include' will be added to"
17867      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17868      exit 1
17869      ;;
17870    esac
17871
17872
17873 if test "$with_xpm" = yes; then
17874
17875   ac_save_CPPFLAGS="$CPPFLAGS"
17876   if test \! -z "$includedir" ; then
17877     CPPFLAGS="$CPPFLAGS -I$includedir"
17878   fi
17879   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17880   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
17881 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
17882 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
17883   echo $ECHO_N "(cached) $ECHO_C" >&6
17884 else
17885   cat >conftest.$ac_ext <<_ACEOF
17886 /* confdefs.h.  */
17887 _ACEOF
17888 cat confdefs.h >>conftest.$ac_ext
17889 cat >>conftest.$ac_ext <<_ACEOF
17890 /* end confdefs.h.  */
17891 #include <X11/Xlib.h>
17892
17893 #include <X11/xpm.h>
17894 _ACEOF
17895 rm -f conftest.$ac_objext
17896 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17897   (eval $ac_compile) 2>conftest.er1
17898   ac_status=$?
17899   grep -v '^ *+' conftest.er1 >conftest.err
17900   rm -f conftest.er1
17901   cat conftest.err >&5
17902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17903   (exit $ac_status); } &&
17904          { ac_try='test -z "$ac_c_werror_flag"
17905                          || test ! -s conftest.err'
17906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17907   (eval $ac_try) 2>&5
17908   ac_status=$?
17909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17910   (exit $ac_status); }; } &&
17911          { ac_try='test -s conftest.$ac_objext'
17912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17913   (eval $ac_try) 2>&5
17914   ac_status=$?
17915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17916   (exit $ac_status); }; }; then
17917   ac_cv_header_X11_xpm_h=yes
17918 else
17919   echo "$as_me: failed program was:" >&5
17920 sed 's/^/| /' conftest.$ac_ext >&5
17921
17922 ac_cv_header_X11_xpm_h=no
17923 fi
17924 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17925 fi
17926 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
17927 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
17928 if test $ac_cv_header_X11_xpm_h = yes; then
17929   have_xpm=yes
17930                     cat >>confdefs.h <<\_ACEOF
17931 #define HAVE_XPM 1
17932 _ACEOF
17933
17934                     XPM_LIBS="-lXpm $XPM_LIBS"
17935 fi
17936
17937
17938   CPPFLAGS="$ac_save_CPPFLAGS"
17939 elif test "$with_xpm" != no; then
17940   echo "error: must be yes or no: --with-xpm=$with_xpm"
17941   exit 1
17942 fi
17943
17944 # See comment near $motif_requires_xpm, above.
17945 # Need to do this here, after both Motif and XPM have been checked for.
17946 #
17947 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
17948   if test "$motif_requires_xpm" = yes ; then
17949     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
17950   fi
17951 fi
17952
17953
17954 ###############################################################################
17955 #
17956 #       Check for -ljpeg
17957 #
17958 ###############################################################################
17959
17960 have_jpeg=no
17961 with_jpeg_req=unspecified
17962 jpeg_halfassed=no
17963
17964 # Check whether --with-jpeg or --without-jpeg was given.
17965 if test "${with_jpeg+set}" = set; then
17966   withval="$with_jpeg"
17967   with_jpeg="$withval"; with_jpeg_req="$withval"
17968 else
17969   with_jpeg=yes
17970 fi;
17971
17972
17973    case "$with_jpeg" in
17974     yes) ;;
17975     no)  ;;
17976
17977     /*)
17978      echo "$as_me:$LINENO: checking for JPEG headers" >&5
17979 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
17980      d=$with_jpeg/include
17981      if test -d $d; then
17982        X_CFLAGS="-I$d $X_CFLAGS"
17983        echo "$as_me:$LINENO: result: $d" >&5
17984 echo "${ECHO_T}$d" >&6
17985      else
17986        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17987 echo "${ECHO_T}not found ($d: no such directory)" >&6
17988      fi
17989
17990      echo "$as_me:$LINENO: checking for JPEG libs" >&5
17991 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
17992      d=$with_jpeg/lib
17993      if test -d $d; then
17994        X_LIBS="-L$d $X_LIBS"
17995        echo "$as_me:$LINENO: result: $d" >&5
17996 echo "${ECHO_T}$d" >&6
17997      else
17998        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17999 echo "${ECHO_T}not found ($d: no such directory)" >&6
18000      fi
18001
18002      # replace the directory string with "yes".
18003      with_jpeg_req="yes"
18004      with_jpeg=$with_jpeg_req
18005      ;;
18006
18007     *)
18008      echo ""
18009      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
18010      echo "       If it is a directory, then \`DIR/include' will be added to"
18011      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18012      exit 1
18013      ;;
18014    esac
18015
18016
18017 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
18018   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
18019   exit 1
18020 fi
18021
18022 if test "$with_jpeg" = yes; then
18023
18024   have_jpeg=no
18025
18026   ac_save_CPPFLAGS="$CPPFLAGS"
18027   if test \! -z "$includedir" ; then
18028     CPPFLAGS="$CPPFLAGS -I$includedir"
18029   fi
18030   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18031   if test "${ac_cv_header_jpeglib_h+set}" = set; then
18032   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18033 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
18034 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18035   echo $ECHO_N "(cached) $ECHO_C" >&6
18036 fi
18037 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18038 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
18039 else
18040   # Is the header compilable?
18041 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
18042 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
18043 cat >conftest.$ac_ext <<_ACEOF
18044 /* confdefs.h.  */
18045 _ACEOF
18046 cat confdefs.h >>conftest.$ac_ext
18047 cat >>conftest.$ac_ext <<_ACEOF
18048 /* end confdefs.h.  */
18049 $ac_includes_default
18050 #include <jpeglib.h>
18051 _ACEOF
18052 rm -f conftest.$ac_objext
18053 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18054   (eval $ac_compile) 2>conftest.er1
18055   ac_status=$?
18056   grep -v '^ *+' conftest.er1 >conftest.err
18057   rm -f conftest.er1
18058   cat conftest.err >&5
18059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18060   (exit $ac_status); } &&
18061          { ac_try='test -z "$ac_c_werror_flag"
18062                          || test ! -s conftest.err'
18063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18064   (eval $ac_try) 2>&5
18065   ac_status=$?
18066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18067   (exit $ac_status); }; } &&
18068          { ac_try='test -s conftest.$ac_objext'
18069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18070   (eval $ac_try) 2>&5
18071   ac_status=$?
18072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18073   (exit $ac_status); }; }; then
18074   ac_header_compiler=yes
18075 else
18076   echo "$as_me: failed program was:" >&5
18077 sed 's/^/| /' conftest.$ac_ext >&5
18078
18079 ac_header_compiler=no
18080 fi
18081 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18082 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18083 echo "${ECHO_T}$ac_header_compiler" >&6
18084
18085 # Is the header present?
18086 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
18087 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
18088 cat >conftest.$ac_ext <<_ACEOF
18089 /* confdefs.h.  */
18090 _ACEOF
18091 cat confdefs.h >>conftest.$ac_ext
18092 cat >>conftest.$ac_ext <<_ACEOF
18093 /* end confdefs.h.  */
18094 #include <jpeglib.h>
18095 _ACEOF
18096 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18097   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18098   ac_status=$?
18099   grep -v '^ *+' conftest.er1 >conftest.err
18100   rm -f conftest.er1
18101   cat conftest.err >&5
18102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18103   (exit $ac_status); } >/dev/null; then
18104   if test -s conftest.err; then
18105     ac_cpp_err=$ac_c_preproc_warn_flag
18106     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18107   else
18108     ac_cpp_err=
18109   fi
18110 else
18111   ac_cpp_err=yes
18112 fi
18113 if test -z "$ac_cpp_err"; then
18114   ac_header_preproc=yes
18115 else
18116   echo "$as_me: failed program was:" >&5
18117 sed 's/^/| /' conftest.$ac_ext >&5
18118
18119   ac_header_preproc=no
18120 fi
18121 rm -f conftest.err conftest.$ac_ext
18122 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18123 echo "${ECHO_T}$ac_header_preproc" >&6
18124
18125 # So?  What about this header?
18126 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18127   yes:no: )
18128     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18129 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18130     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
18131 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
18132     ac_header_preproc=yes
18133     ;;
18134   no:yes:* )
18135     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
18136 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
18137     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
18138 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
18139     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
18140 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
18141     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
18142 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18143     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
18144 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
18145     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
18146 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
18147     (
18148       cat <<\_ASBOX
18149 ## ------------------------------------------ ##
18150 ## Report this to the AC_PACKAGE_NAME lists.  ##
18151 ## ------------------------------------------ ##
18152 _ASBOX
18153     ) |
18154       sed "s/^/$as_me: WARNING:     /" >&2
18155     ;;
18156 esac
18157 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18158 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
18159 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18160   echo $ECHO_N "(cached) $ECHO_C" >&6
18161 else
18162   ac_cv_header_jpeglib_h=$ac_header_preproc
18163 fi
18164 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18165 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
18166
18167 fi
18168 if test $ac_cv_header_jpeglib_h = yes; then
18169   have_jpeg=yes
18170 fi
18171
18172
18173   CPPFLAGS="$ac_save_CPPFLAGS"
18174
18175   if test "$have_jpeg" = yes; then
18176     # we have the header, now check for the library
18177     have_jpeg=no
18178     jpeg_halfassed=yes
18179
18180   ac_save_CPPFLAGS="$CPPFLAGS"
18181   ac_save_LDFLAGS="$LDFLAGS"
18182 #  ac_save_LIBS="$LIBS"
18183
18184   if test \! -z "$includedir" ; then
18185     CPPFLAGS="$CPPFLAGS -I$includedir"
18186   fi
18187   # note: $X_CFLAGS includes $x_includes
18188   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18189
18190   if test \! -z "$libdir" ; then
18191     LDFLAGS="$LDFLAGS -L$libdir"
18192   fi
18193   # note: $X_LIBS includes $x_libraries
18194   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18195
18196   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
18197 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
18198 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
18199   echo $ECHO_N "(cached) $ECHO_C" >&6
18200 else
18201   ac_check_lib_save_LIBS=$LIBS
18202 LIBS="-ljpeg  $LIBS"
18203 cat >conftest.$ac_ext <<_ACEOF
18204 /* confdefs.h.  */
18205 _ACEOF
18206 cat confdefs.h >>conftest.$ac_ext
18207 cat >>conftest.$ac_ext <<_ACEOF
18208 /* end confdefs.h.  */
18209
18210 /* Override any gcc2 internal prototype to avoid an error.  */
18211 #ifdef __cplusplus
18212 extern "C"
18213 #endif
18214 /* We use char because int might match the return type of a gcc2
18215    builtin and then its argument prototype would still apply.  */
18216 char jpeg_start_compress ();
18217 int
18218 main ()
18219 {
18220 jpeg_start_compress ();
18221   ;
18222   return 0;
18223 }
18224 _ACEOF
18225 rm -f conftest.$ac_objext conftest$ac_exeext
18226 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18227   (eval $ac_link) 2>conftest.er1
18228   ac_status=$?
18229   grep -v '^ *+' conftest.er1 >conftest.err
18230   rm -f conftest.er1
18231   cat conftest.err >&5
18232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18233   (exit $ac_status); } &&
18234          { ac_try='test -z "$ac_c_werror_flag"
18235                          || test ! -s conftest.err'
18236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18237   (eval $ac_try) 2>&5
18238   ac_status=$?
18239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18240   (exit $ac_status); }; } &&
18241          { ac_try='test -s conftest$ac_exeext'
18242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18243   (eval $ac_try) 2>&5
18244   ac_status=$?
18245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18246   (exit $ac_status); }; }; then
18247   ac_cv_lib_jpeg_jpeg_start_compress=yes
18248 else
18249   echo "$as_me: failed program was:" >&5
18250 sed 's/^/| /' conftest.$ac_ext >&5
18251
18252 ac_cv_lib_jpeg_jpeg_start_compress=no
18253 fi
18254 rm -f conftest.err conftest.$ac_objext \
18255       conftest$ac_exeext conftest.$ac_ext
18256 LIBS=$ac_check_lib_save_LIBS
18257 fi
18258 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
18259 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
18260 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
18261   have_jpeg=yes
18262                     jpeg_halfassed=no
18263                     JPEG_LIBS="-ljpeg"
18264                     cat >>confdefs.h <<\_ACEOF
18265 #define HAVE_JPEGLIB 1
18266 _ACEOF
18267
18268 fi
18269
18270   CPPFLAGS="$ac_save_CPPFLAGS"
18271   LDFLAGS="$ac_save_LDFLAGS"
18272 #  LIBS="$ac_save_LIBS"
18273
18274   fi
18275 fi
18276
18277
18278 ###############################################################################
18279 #
18280 #       Check for pty support for 'phosphor'
18281 #
18282 ###############################################################################
18283
18284 PTY_LIBS=
18285
18286
18287 for ac_header in pty.h util.h
18288 do
18289 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18290 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18291   echo "$as_me:$LINENO: checking for $ac_header" >&5
18292 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18293 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18294   echo $ECHO_N "(cached) $ECHO_C" >&6
18295 fi
18296 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18297 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18298 else
18299   # Is the header compilable?
18300 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18301 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18302 cat >conftest.$ac_ext <<_ACEOF
18303 /* confdefs.h.  */
18304 _ACEOF
18305 cat confdefs.h >>conftest.$ac_ext
18306 cat >>conftest.$ac_ext <<_ACEOF
18307 /* end confdefs.h.  */
18308 $ac_includes_default
18309 #include <$ac_header>
18310 _ACEOF
18311 rm -f conftest.$ac_objext
18312 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18313   (eval $ac_compile) 2>conftest.er1
18314   ac_status=$?
18315   grep -v '^ *+' conftest.er1 >conftest.err
18316   rm -f conftest.er1
18317   cat conftest.err >&5
18318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18319   (exit $ac_status); } &&
18320          { ac_try='test -z "$ac_c_werror_flag"
18321                          || test ! -s conftest.err'
18322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18323   (eval $ac_try) 2>&5
18324   ac_status=$?
18325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18326   (exit $ac_status); }; } &&
18327          { ac_try='test -s conftest.$ac_objext'
18328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18329   (eval $ac_try) 2>&5
18330   ac_status=$?
18331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18332   (exit $ac_status); }; }; then
18333   ac_header_compiler=yes
18334 else
18335   echo "$as_me: failed program was:" >&5
18336 sed 's/^/| /' conftest.$ac_ext >&5
18337
18338 ac_header_compiler=no
18339 fi
18340 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18341 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18342 echo "${ECHO_T}$ac_header_compiler" >&6
18343
18344 # Is the header present?
18345 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18346 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18347 cat >conftest.$ac_ext <<_ACEOF
18348 /* confdefs.h.  */
18349 _ACEOF
18350 cat confdefs.h >>conftest.$ac_ext
18351 cat >>conftest.$ac_ext <<_ACEOF
18352 /* end confdefs.h.  */
18353 #include <$ac_header>
18354 _ACEOF
18355 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18356   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18357   ac_status=$?
18358   grep -v '^ *+' conftest.er1 >conftest.err
18359   rm -f conftest.er1
18360   cat conftest.err >&5
18361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18362   (exit $ac_status); } >/dev/null; then
18363   if test -s conftest.err; then
18364     ac_cpp_err=$ac_c_preproc_warn_flag
18365     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18366   else
18367     ac_cpp_err=
18368   fi
18369 else
18370   ac_cpp_err=yes
18371 fi
18372 if test -z "$ac_cpp_err"; then
18373   ac_header_preproc=yes
18374 else
18375   echo "$as_me: failed program was:" >&5
18376 sed 's/^/| /' conftest.$ac_ext >&5
18377
18378   ac_header_preproc=no
18379 fi
18380 rm -f conftest.err conftest.$ac_ext
18381 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18382 echo "${ECHO_T}$ac_header_preproc" >&6
18383
18384 # So?  What about this header?
18385 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18386   yes:no: )
18387     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18388 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18389     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18390 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18391     ac_header_preproc=yes
18392     ;;
18393   no:yes:* )
18394     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18395 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18396     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18397 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18398     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18399 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18400     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18401 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18402     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18403 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18404     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18405 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18406     (
18407       cat <<\_ASBOX
18408 ## ------------------------------------------ ##
18409 ## Report this to the AC_PACKAGE_NAME lists.  ##
18410 ## ------------------------------------------ ##
18411 _ASBOX
18412     ) |
18413       sed "s/^/$as_me: WARNING:     /" >&2
18414     ;;
18415 esac
18416 echo "$as_me:$LINENO: checking for $ac_header" >&5
18417 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18418 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18419   echo $ECHO_N "(cached) $ECHO_C" >&6
18420 else
18421   eval "$as_ac_Header=\$ac_header_preproc"
18422 fi
18423 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18424 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18425
18426 fi
18427 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18428   cat >>confdefs.h <<_ACEOF
18429 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18430 _ACEOF
18431
18432 fi
18433
18434 done
18435
18436
18437   ac_save_CPPFLAGS="$CPPFLAGS"
18438   ac_save_LDFLAGS="$LDFLAGS"
18439 #  ac_save_LIBS="$LIBS"
18440
18441   if test \! -z "$includedir" ; then
18442     CPPFLAGS="$CPPFLAGS -I$includedir"
18443   fi
18444   # note: $X_CFLAGS includes $x_includes
18445   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18446
18447   if test \! -z "$libdir" ; then
18448     LDFLAGS="$LDFLAGS -L$libdir"
18449   fi
18450   # note: $X_LIBS includes $x_libraries
18451   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18452
18453   echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18454 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
18455 if test "${ac_cv_lib_util_forkpty+set}" = set; then
18456   echo $ECHO_N "(cached) $ECHO_C" >&6
18457 else
18458   ac_check_lib_save_LIBS=$LIBS
18459 LIBS="-lutil  $LIBS"
18460 cat >conftest.$ac_ext <<_ACEOF
18461 /* confdefs.h.  */
18462 _ACEOF
18463 cat confdefs.h >>conftest.$ac_ext
18464 cat >>conftest.$ac_ext <<_ACEOF
18465 /* end confdefs.h.  */
18466
18467 /* Override any gcc2 internal prototype to avoid an error.  */
18468 #ifdef __cplusplus
18469 extern "C"
18470 #endif
18471 /* We use char because int might match the return type of a gcc2
18472    builtin and then its argument prototype would still apply.  */
18473 char forkpty ();
18474 int
18475 main ()
18476 {
18477 forkpty ();
18478   ;
18479   return 0;
18480 }
18481 _ACEOF
18482 rm -f conftest.$ac_objext conftest$ac_exeext
18483 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18484   (eval $ac_link) 2>conftest.er1
18485   ac_status=$?
18486   grep -v '^ *+' conftest.er1 >conftest.err
18487   rm -f conftest.er1
18488   cat conftest.err >&5
18489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18490   (exit $ac_status); } &&
18491          { ac_try='test -z "$ac_c_werror_flag"
18492                          || test ! -s conftest.err'
18493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18494   (eval $ac_try) 2>&5
18495   ac_status=$?
18496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18497   (exit $ac_status); }; } &&
18498          { ac_try='test -s conftest$ac_exeext'
18499   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18500   (eval $ac_try) 2>&5
18501   ac_status=$?
18502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18503   (exit $ac_status); }; }; then
18504   ac_cv_lib_util_forkpty=yes
18505 else
18506   echo "$as_me: failed program was:" >&5
18507 sed 's/^/| /' conftest.$ac_ext >&5
18508
18509 ac_cv_lib_util_forkpty=no
18510 fi
18511 rm -f conftest.err conftest.$ac_objext \
18512       conftest$ac_exeext conftest.$ac_ext
18513 LIBS=$ac_check_lib_save_LIBS
18514 fi
18515 echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18516 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
18517 if test $ac_cv_lib_util_forkpty = yes; then
18518   PTY_LIBS="-lutil"
18519                 cat >>confdefs.h <<\_ACEOF
18520 #define HAVE_FORKPTY 1
18521 _ACEOF
18522
18523 fi
18524
18525   CPPFLAGS="$ac_save_CPPFLAGS"
18526   LDFLAGS="$ac_save_LDFLAGS"
18527 #  LIBS="$ac_save_LIBS"
18528
18529
18530
18531 ###############################################################################
18532 #
18533 #       Check for the XSHM server extension.
18534 #
18535 ###############################################################################
18536
18537 have_xshm=no
18538 with_xshm_req=unspecified
18539
18540 # Check whether --with-xshm-ext or --without-xshm-ext was given.
18541 if test "${with_xshm_ext+set}" = set; then
18542   withval="$with_xshm_ext"
18543   with_xshm="$withval"; with_xshm_req="$withval"
18544 else
18545   with_xshm=yes
18546 fi;
18547
18548
18549    case "$with_xshm" in
18550     yes) ;;
18551     no)  ;;
18552
18553     /*)
18554      echo "$as_me:$LINENO: checking for XSHM headers" >&5
18555 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
18556      d=$with_xshm/include
18557      if test -d $d; then
18558        X_CFLAGS="-I$d $X_CFLAGS"
18559        echo "$as_me:$LINENO: result: $d" >&5
18560 echo "${ECHO_T}$d" >&6
18561      else
18562        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18563 echo "${ECHO_T}not found ($d: no such directory)" >&6
18564      fi
18565
18566      echo "$as_me:$LINENO: checking for XSHM libs" >&5
18567 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
18568      d=$with_xshm/lib
18569      if test -d $d; then
18570        X_LIBS="-L$d $X_LIBS"
18571        echo "$as_me:$LINENO: result: $d" >&5
18572 echo "${ECHO_T}$d" >&6
18573      else
18574        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18575 echo "${ECHO_T}not found ($d: no such directory)" >&6
18576      fi
18577
18578      # replace the directory string with "yes".
18579      with_xshm_req="yes"
18580      with_xshm=$with_xshm_req
18581      ;;
18582
18583     *)
18584      echo ""
18585      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
18586      echo "       If it is a directory, then \`DIR/include' will be added to"
18587      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18588      exit 1
18589      ;;
18590    esac
18591
18592
18593 if test "$with_xshm" = yes; then
18594
18595   # first check for Xshm.h.
18596
18597   ac_save_CPPFLAGS="$CPPFLAGS"
18598   if test \! -z "$includedir" ; then
18599     CPPFLAGS="$CPPFLAGS -I$includedir"
18600   fi
18601   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18602   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
18603 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
18604 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
18605   echo $ECHO_N "(cached) $ECHO_C" >&6
18606 else
18607   cat >conftest.$ac_ext <<_ACEOF
18608 /* confdefs.h.  */
18609 _ACEOF
18610 cat confdefs.h >>conftest.$ac_ext
18611 cat >>conftest.$ac_ext <<_ACEOF
18612 /* end confdefs.h.  */
18613 #include <X11/Xlib.h>
18614
18615 #include <X11/extensions/XShm.h>
18616 _ACEOF
18617 rm -f conftest.$ac_objext
18618 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18619   (eval $ac_compile) 2>conftest.er1
18620   ac_status=$?
18621   grep -v '^ *+' conftest.er1 >conftest.err
18622   rm -f conftest.er1
18623   cat conftest.err >&5
18624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18625   (exit $ac_status); } &&
18626          { ac_try='test -z "$ac_c_werror_flag"
18627                          || test ! -s conftest.err'
18628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18629   (eval $ac_try) 2>&5
18630   ac_status=$?
18631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18632   (exit $ac_status); }; } &&
18633          { ac_try='test -s conftest.$ac_objext'
18634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18635   (eval $ac_try) 2>&5
18636   ac_status=$?
18637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18638   (exit $ac_status); }; }; then
18639   ac_cv_header_X11_extensions_XShm_h=yes
18640 else
18641   echo "$as_me: failed program was:" >&5
18642 sed 's/^/| /' conftest.$ac_ext >&5
18643
18644 ac_cv_header_X11_extensions_XShm_h=no
18645 fi
18646 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18647 fi
18648 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
18649 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
18650 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
18651   have_xshm=yes
18652 fi
18653
18654
18655   CPPFLAGS="$ac_save_CPPFLAGS"
18656
18657   # if that succeeded, then check for sys/ipc.h.
18658   if test "$have_xshm" = yes; then
18659     have_xshm=no
18660
18661   ac_save_CPPFLAGS="$CPPFLAGS"
18662   if test \! -z "$includedir" ; then
18663     CPPFLAGS="$CPPFLAGS -I$includedir"
18664   fi
18665   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18666   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18667   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
18668 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
18669 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18670   echo $ECHO_N "(cached) $ECHO_C" >&6
18671 fi
18672 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
18673 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
18674 else
18675   # Is the header compilable?
18676 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
18677 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
18678 cat >conftest.$ac_ext <<_ACEOF
18679 /* confdefs.h.  */
18680 _ACEOF
18681 cat confdefs.h >>conftest.$ac_ext
18682 cat >>conftest.$ac_ext <<_ACEOF
18683 /* end confdefs.h.  */
18684 $ac_includes_default
18685 #include <sys/ipc.h>
18686 _ACEOF
18687 rm -f conftest.$ac_objext
18688 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18689   (eval $ac_compile) 2>conftest.er1
18690   ac_status=$?
18691   grep -v '^ *+' conftest.er1 >conftest.err
18692   rm -f conftest.er1
18693   cat conftest.err >&5
18694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18695   (exit $ac_status); } &&
18696          { ac_try='test -z "$ac_c_werror_flag"
18697                          || test ! -s conftest.err'
18698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18699   (eval $ac_try) 2>&5
18700   ac_status=$?
18701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18702   (exit $ac_status); }; } &&
18703          { ac_try='test -s conftest.$ac_objext'
18704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18705   (eval $ac_try) 2>&5
18706   ac_status=$?
18707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18708   (exit $ac_status); }; }; then
18709   ac_header_compiler=yes
18710 else
18711   echo "$as_me: failed program was:" >&5
18712 sed 's/^/| /' conftest.$ac_ext >&5
18713
18714 ac_header_compiler=no
18715 fi
18716 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18717 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18718 echo "${ECHO_T}$ac_header_compiler" >&6
18719
18720 # Is the header present?
18721 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
18722 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
18723 cat >conftest.$ac_ext <<_ACEOF
18724 /* confdefs.h.  */
18725 _ACEOF
18726 cat confdefs.h >>conftest.$ac_ext
18727 cat >>conftest.$ac_ext <<_ACEOF
18728 /* end confdefs.h.  */
18729 #include <sys/ipc.h>
18730 _ACEOF
18731 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18732   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18733   ac_status=$?
18734   grep -v '^ *+' conftest.er1 >conftest.err
18735   rm -f conftest.er1
18736   cat conftest.err >&5
18737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18738   (exit $ac_status); } >/dev/null; then
18739   if test -s conftest.err; then
18740     ac_cpp_err=$ac_c_preproc_warn_flag
18741     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18742   else
18743     ac_cpp_err=
18744   fi
18745 else
18746   ac_cpp_err=yes
18747 fi
18748 if test -z "$ac_cpp_err"; then
18749   ac_header_preproc=yes
18750 else
18751   echo "$as_me: failed program was:" >&5
18752 sed 's/^/| /' conftest.$ac_ext >&5
18753
18754   ac_header_preproc=no
18755 fi
18756 rm -f conftest.err conftest.$ac_ext
18757 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18758 echo "${ECHO_T}$ac_header_preproc" >&6
18759
18760 # So?  What about this header?
18761 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18762   yes:no: )
18763     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
18764 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18765     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
18766 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
18767     ac_header_preproc=yes
18768     ;;
18769   no:yes:* )
18770     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
18771 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
18772     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
18773 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
18774     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
18775 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
18776     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
18777 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18778     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
18779 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
18780     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
18781 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
18782     (
18783       cat <<\_ASBOX
18784 ## ------------------------------------------ ##
18785 ## Report this to the AC_PACKAGE_NAME lists.  ##
18786 ## ------------------------------------------ ##
18787 _ASBOX
18788     ) |
18789       sed "s/^/$as_me: WARNING:     /" >&2
18790     ;;
18791 esac
18792 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
18793 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
18794 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18795   echo $ECHO_N "(cached) $ECHO_C" >&6
18796 else
18797   ac_cv_header_sys_ipc_h=$ac_header_preproc
18798 fi
18799 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
18800 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
18801
18802 fi
18803 if test $ac_cv_header_sys_ipc_h = yes; then
18804   have_xshm=yes
18805 fi
18806
18807
18808   CPPFLAGS="$ac_save_CPPFLAGS"
18809   fi
18810
18811   # if that succeeded, then check for sys/shm.h.
18812   if test "$have_xshm" = yes; then
18813     have_xshm=no
18814
18815   ac_save_CPPFLAGS="$CPPFLAGS"
18816   if test \! -z "$includedir" ; then
18817     CPPFLAGS="$CPPFLAGS -I$includedir"
18818   fi
18819   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18820   if test "${ac_cv_header_sys_shm_h+set}" = set; then
18821   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
18822 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
18823 if test "${ac_cv_header_sys_shm_h+set}" = set; then
18824   echo $ECHO_N "(cached) $ECHO_C" >&6
18825 fi
18826 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
18827 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
18828 else
18829   # Is the header compilable?
18830 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
18831 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
18832 cat >conftest.$ac_ext <<_ACEOF
18833 /* confdefs.h.  */
18834 _ACEOF
18835 cat confdefs.h >>conftest.$ac_ext
18836 cat >>conftest.$ac_ext <<_ACEOF
18837 /* end confdefs.h.  */
18838 $ac_includes_default
18839 #include <sys/shm.h>
18840 _ACEOF
18841 rm -f conftest.$ac_objext
18842 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18843   (eval $ac_compile) 2>conftest.er1
18844   ac_status=$?
18845   grep -v '^ *+' conftest.er1 >conftest.err
18846   rm -f conftest.er1
18847   cat conftest.err >&5
18848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18849   (exit $ac_status); } &&
18850          { ac_try='test -z "$ac_c_werror_flag"
18851                          || test ! -s conftest.err'
18852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18853   (eval $ac_try) 2>&5
18854   ac_status=$?
18855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18856   (exit $ac_status); }; } &&
18857          { ac_try='test -s conftest.$ac_objext'
18858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18859   (eval $ac_try) 2>&5
18860   ac_status=$?
18861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18862   (exit $ac_status); }; }; then
18863   ac_header_compiler=yes
18864 else
18865   echo "$as_me: failed program was:" >&5
18866 sed 's/^/| /' conftest.$ac_ext >&5
18867
18868 ac_header_compiler=no
18869 fi
18870 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18871 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18872 echo "${ECHO_T}$ac_header_compiler" >&6
18873
18874 # Is the header present?
18875 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
18876 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
18877 cat >conftest.$ac_ext <<_ACEOF
18878 /* confdefs.h.  */
18879 _ACEOF
18880 cat confdefs.h >>conftest.$ac_ext
18881 cat >>conftest.$ac_ext <<_ACEOF
18882 /* end confdefs.h.  */
18883 #include <sys/shm.h>
18884 _ACEOF
18885 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18886   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18887   ac_status=$?
18888   grep -v '^ *+' conftest.er1 >conftest.err
18889   rm -f conftest.er1
18890   cat conftest.err >&5
18891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18892   (exit $ac_status); } >/dev/null; then
18893   if test -s conftest.err; then
18894     ac_cpp_err=$ac_c_preproc_warn_flag
18895     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18896   else
18897     ac_cpp_err=
18898   fi
18899 else
18900   ac_cpp_err=yes
18901 fi
18902 if test -z "$ac_cpp_err"; then
18903   ac_header_preproc=yes
18904 else
18905   echo "$as_me: failed program was:" >&5
18906 sed 's/^/| /' conftest.$ac_ext >&5
18907
18908   ac_header_preproc=no
18909 fi
18910 rm -f conftest.err conftest.$ac_ext
18911 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18912 echo "${ECHO_T}$ac_header_preproc" >&6
18913
18914 # So?  What about this header?
18915 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18916   yes:no: )
18917     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
18918 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18919     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
18920 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
18921     ac_header_preproc=yes
18922     ;;
18923   no:yes:* )
18924     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
18925 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
18926     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
18927 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
18928     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
18929 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
18930     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
18931 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18932     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
18933 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
18934     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
18935 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
18936     (
18937       cat <<\_ASBOX
18938 ## ------------------------------------------ ##
18939 ## Report this to the AC_PACKAGE_NAME lists.  ##
18940 ## ------------------------------------------ ##
18941 _ASBOX
18942     ) |
18943       sed "s/^/$as_me: WARNING:     /" >&2
18944     ;;
18945 esac
18946 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
18947 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
18948 if test "${ac_cv_header_sys_shm_h+set}" = set; then
18949   echo $ECHO_N "(cached) $ECHO_C" >&6
18950 else
18951   ac_cv_header_sys_shm_h=$ac_header_preproc
18952 fi
18953 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
18954 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
18955
18956 fi
18957 if test $ac_cv_header_sys_shm_h = yes; then
18958   have_xshm=yes
18959 fi
18960
18961
18962   CPPFLAGS="$ac_save_CPPFLAGS"
18963   fi
18964
18965   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
18966   # to exist, but the library code to not exist.  And even better, the library
18967   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
18968   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
18969   # that's not quite right, but close enough.)
18970   #
18971   case "$host" in
18972     *-aix*)
18973       if  `uname -v` -eq 3 ; then
18974         have_xshm=no
18975
18976   ac_save_CPPFLAGS="$CPPFLAGS"
18977   ac_save_LDFLAGS="$LDFLAGS"
18978 #  ac_save_LIBS="$LIBS"
18979
18980   if test \! -z "$includedir" ; then
18981     CPPFLAGS="$CPPFLAGS -I$includedir"
18982   fi
18983   # note: $X_CFLAGS includes $x_includes
18984   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18985
18986   if test \! -z "$libdir" ; then
18987     LDFLAGS="$LDFLAGS -L$libdir"
18988   fi
18989   # note: $X_LIBS includes $x_libraries
18990   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18991
18992   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
18993 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
18994 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
18995   echo $ECHO_N "(cached) $ECHO_C" >&6
18996 else
18997   ac_check_lib_save_LIBS=$LIBS
18998 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
18999 cat >conftest.$ac_ext <<_ACEOF
19000 /* confdefs.h.  */
19001 _ACEOF
19002 cat confdefs.h >>conftest.$ac_ext
19003 cat >>conftest.$ac_ext <<_ACEOF
19004 /* end confdefs.h.  */
19005
19006 /* Override any gcc2 internal prototype to avoid an error.  */
19007 #ifdef __cplusplus
19008 extern "C"
19009 #endif
19010 /* We use char because int might match the return type of a gcc2
19011    builtin and then its argument prototype would still apply.  */
19012 char XShmQueryExtension ();
19013 int
19014 main ()
19015 {
19016 XShmQueryExtension ();
19017   ;
19018   return 0;
19019 }
19020 _ACEOF
19021 rm -f conftest.$ac_objext conftest$ac_exeext
19022 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19023   (eval $ac_link) 2>conftest.er1
19024   ac_status=$?
19025   grep -v '^ *+' conftest.er1 >conftest.err
19026   rm -f conftest.er1
19027   cat conftest.err >&5
19028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19029   (exit $ac_status); } &&
19030          { ac_try='test -z "$ac_c_werror_flag"
19031                          || test ! -s conftest.err'
19032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19033   (eval $ac_try) 2>&5
19034   ac_status=$?
19035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19036   (exit $ac_status); }; } &&
19037          { ac_try='test -s conftest$ac_exeext'
19038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19039   (eval $ac_try) 2>&5
19040   ac_status=$?
19041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19042   (exit $ac_status); }; }; then
19043   ac_cv_lib_XextSam_XShmQueryExtension=yes
19044 else
19045   echo "$as_me: failed program was:" >&5
19046 sed 's/^/| /' conftest.$ac_ext >&5
19047
19048 ac_cv_lib_XextSam_XShmQueryExtension=no
19049 fi
19050 rm -f conftest.err conftest.$ac_objext \
19051       conftest$ac_exeext conftest.$ac_ext
19052 LIBS=$ac_check_lib_save_LIBS
19053 fi
19054 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
19055 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
19056 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
19057   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
19058 else
19059   true
19060 fi
19061
19062   CPPFLAGS="$ac_save_CPPFLAGS"
19063   LDFLAGS="$ac_save_LDFLAGS"
19064 #  LIBS="$ac_save_LIBS"
19065
19066       fi
19067     ;;
19068   esac
19069
19070   # if that succeeded, then we've really got it.
19071   if test "$have_xshm" = yes; then
19072     cat >>confdefs.h <<\_ACEOF
19073 #define HAVE_XSHM_EXTENSION 1
19074 _ACEOF
19075
19076   fi
19077
19078 elif test "$with_xshm" != no; then
19079   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
19080   exit 1
19081 fi
19082
19083
19084 ###############################################################################
19085 #
19086 #       Check for the DOUBLE-BUFFER server extension.
19087 #
19088 ###############################################################################
19089
19090 have_xdbe=no
19091 with_xdbe_req=unspecified
19092
19093 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
19094 if test "${with_xdbe_ext+set}" = set; then
19095   withval="$with_xdbe_ext"
19096   with_xdbe="$withval"; with_xdbe_req="$withval"
19097 else
19098   with_xdbe=yes
19099 fi;
19100
19101
19102    case "$with_xdbe" in
19103     yes) ;;
19104     no)  ;;
19105
19106     /*)
19107      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
19108 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
19109      d=$with_xdbe/include
19110      if test -d $d; then
19111        X_CFLAGS="-I$d $X_CFLAGS"
19112        echo "$as_me:$LINENO: result: $d" >&5
19113 echo "${ECHO_T}$d" >&6
19114      else
19115        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19116 echo "${ECHO_T}not found ($d: no such directory)" >&6
19117      fi
19118
19119      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
19120 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
19121      d=$with_xdbe/lib
19122      if test -d $d; then
19123        X_LIBS="-L$d $X_LIBS"
19124        echo "$as_me:$LINENO: result: $d" >&5
19125 echo "${ECHO_T}$d" >&6
19126      else
19127        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19128 echo "${ECHO_T}not found ($d: no such directory)" >&6
19129      fi
19130
19131      # replace the directory string with "yes".
19132      with_xdbe_req="yes"
19133      with_xdbe=$with_xdbe_req
19134      ;;
19135
19136     *)
19137      echo ""
19138      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
19139      echo "       If it is a directory, then \`DIR/include' will be added to"
19140      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19141      exit 1
19142      ;;
19143    esac
19144
19145
19146 if test "$with_xdbe" = yes; then
19147
19148
19149   ac_save_CPPFLAGS="$CPPFLAGS"
19150   if test \! -z "$includedir" ; then
19151     CPPFLAGS="$CPPFLAGS -I$includedir"
19152   fi
19153   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19154   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
19155 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
19156 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
19157   echo $ECHO_N "(cached) $ECHO_C" >&6
19158 else
19159   cat >conftest.$ac_ext <<_ACEOF
19160 /* confdefs.h.  */
19161 _ACEOF
19162 cat confdefs.h >>conftest.$ac_ext
19163 cat >>conftest.$ac_ext <<_ACEOF
19164 /* end confdefs.h.  */
19165 #include <X11/Xlib.h>
19166
19167 #include <X11/extensions/Xdbe.h>
19168 _ACEOF
19169 rm -f conftest.$ac_objext
19170 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19171   (eval $ac_compile) 2>conftest.er1
19172   ac_status=$?
19173   grep -v '^ *+' conftest.er1 >conftest.err
19174   rm -f conftest.er1
19175   cat conftest.err >&5
19176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19177   (exit $ac_status); } &&
19178          { ac_try='test -z "$ac_c_werror_flag"
19179                          || test ! -s conftest.err'
19180   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19181   (eval $ac_try) 2>&5
19182   ac_status=$?
19183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19184   (exit $ac_status); }; } &&
19185          { ac_try='test -s conftest.$ac_objext'
19186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19187   (eval $ac_try) 2>&5
19188   ac_status=$?
19189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19190   (exit $ac_status); }; }; then
19191   ac_cv_header_X11_extensions_Xdbe_h=yes
19192 else
19193   echo "$as_me: failed program was:" >&5
19194 sed 's/^/| /' conftest.$ac_ext >&5
19195
19196 ac_cv_header_X11_extensions_Xdbe_h=no
19197 fi
19198 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19199 fi
19200 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
19201 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
19202 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
19203   have_xdbe=yes
19204 fi
19205
19206
19207   CPPFLAGS="$ac_save_CPPFLAGS"
19208   if test "$have_xdbe" = yes; then
19209     cat >>confdefs.h <<\_ACEOF
19210 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
19211 _ACEOF
19212
19213   fi
19214
19215 elif test "$with_xdbe" != no; then
19216   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
19217   exit 1
19218 fi
19219
19220
19221 ###############################################################################
19222 #
19223 #       Check for the SGI XReadDisplay server extension.
19224 #
19225 #       Note: this has to be down here, rather than up with the other server
19226 #       extension tests, so that the output of `configure --help' is in the
19227 #       right order.  Arrgh!
19228 #
19229 ###############################################################################
19230
19231 have_readdisplay=no
19232 with_readdisplay_req=unspecified
19233
19234 # Check whether --with-readdisplay or --without-readdisplay was given.
19235 if test "${with_readdisplay+set}" = set; then
19236   withval="$with_readdisplay"
19237   with_readdisplay="$withval"; with_readdisplay_req="$withval"
19238 else
19239   with_readdisplay=yes
19240 fi;
19241
19242
19243    case "$with_readdisplay" in
19244     yes) ;;
19245     no)  ;;
19246
19247     /*)
19248      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
19249 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
19250      d=$with_readdisplay/include
19251      if test -d $d; then
19252        X_CFLAGS="-I$d $X_CFLAGS"
19253        echo "$as_me:$LINENO: result: $d" >&5
19254 echo "${ECHO_T}$d" >&6
19255      else
19256        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19257 echo "${ECHO_T}not found ($d: no such directory)" >&6
19258      fi
19259
19260      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
19261 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
19262      d=$with_readdisplay/lib
19263      if test -d $d; then
19264        X_LIBS="-L$d $X_LIBS"
19265        echo "$as_me:$LINENO: result: $d" >&5
19266 echo "${ECHO_T}$d" >&6
19267      else
19268        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19269 echo "${ECHO_T}not found ($d: no such directory)" >&6
19270      fi
19271
19272      # replace the directory string with "yes".
19273      with_readdisplay_req="yes"
19274      with_readdisplay=$with_readdisplay_req
19275      ;;
19276
19277     *)
19278      echo ""
19279      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
19280      echo "       If it is a directory, then \`DIR/include' will be added to"
19281      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19282      exit 1
19283      ;;
19284    esac
19285
19286
19287 if test "$with_readdisplay" = yes; then
19288
19289   ac_save_CPPFLAGS="$CPPFLAGS"
19290   if test \! -z "$includedir" ; then
19291     CPPFLAGS="$CPPFLAGS -I$includedir"
19292   fi
19293   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19294   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
19295 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
19296 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
19297   echo $ECHO_N "(cached) $ECHO_C" >&6
19298 else
19299   cat >conftest.$ac_ext <<_ACEOF
19300 /* confdefs.h.  */
19301 _ACEOF
19302 cat confdefs.h >>conftest.$ac_ext
19303 cat >>conftest.$ac_ext <<_ACEOF
19304 /* end confdefs.h.  */
19305 #include <X11/Xlib.h>
19306
19307 #include <X11/extensions/readdisplay.h>
19308 _ACEOF
19309 rm -f conftest.$ac_objext
19310 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19311   (eval $ac_compile) 2>conftest.er1
19312   ac_status=$?
19313   grep -v '^ *+' conftest.er1 >conftest.err
19314   rm -f conftest.er1
19315   cat conftest.err >&5
19316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19317   (exit $ac_status); } &&
19318          { ac_try='test -z "$ac_c_werror_flag"
19319                          || test ! -s conftest.err'
19320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19321   (eval $ac_try) 2>&5
19322   ac_status=$?
19323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19324   (exit $ac_status); }; } &&
19325          { ac_try='test -s conftest.$ac_objext'
19326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19327   (eval $ac_try) 2>&5
19328   ac_status=$?
19329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19330   (exit $ac_status); }; }; then
19331   ac_cv_header_X11_extensions_readdisplay_h=yes
19332 else
19333   echo "$as_me: failed program was:" >&5
19334 sed 's/^/| /' conftest.$ac_ext >&5
19335
19336 ac_cv_header_X11_extensions_readdisplay_h=no
19337 fi
19338 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19339 fi
19340 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
19341 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
19342 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
19343   cat >>confdefs.h <<\_ACEOF
19344 #define HAVE_READ_DISPLAY_EXTENSION 1
19345 _ACEOF
19346
19347 fi
19348
19349
19350   CPPFLAGS="$ac_save_CPPFLAGS"
19351 elif test "$with_readdisplay" != no; then
19352   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
19353   exit 1
19354 fi
19355
19356
19357 ###############################################################################
19358 #
19359 #       Check for a program to generate random text.
19360 #
19361 #       Zippy is funnier than the idiocy generally spat out by `fortune',
19362 #       so first see if "fortune zippy" works.  Else, use plain "fortune".
19363 #
19364 #       We used to dig around in Emacs to look for the "yow" program, but
19365 #       most people who have Emacs also have "fortune zippy", so nevermind.
19366 #
19367 ###############################################################################
19368
19369 with_fortune_req=""
19370
19371 # Check whether --with-fortune or --without-fortune was given.
19372 if test "${with_fortune+set}" = set; then
19373   withval="$with_fortune"
19374   with_fortune_req="$withval"; with_fortune="$withval"
19375 else
19376   with_fortune=yes
19377 fi;
19378
19379 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
19380   with_fortune=""
19381   with_fortune_req=""
19382 fi
19383
19384 if test -n "$with_fortune_req" ; then
19385   ac_cv_fortune_program=""
19386   case "$with_fortune_req" in
19387     /*)
19388
19389       set dummy $with_fortune_req ; fortune_tmp=$2
19390       echo "$as_me:$LINENO: checking for $fortune_tmp" >&5
19391 echo $ECHO_N "checking for $fortune_tmp... $ECHO_C" >&6
19392       if test -x "$fortune_tmp" ; then
19393         echo "$as_me:$LINENO: result: yes" >&5
19394 echo "${ECHO_T}yes" >&6
19395       else
19396         echo "$as_me:$LINENO: result: no" >&5
19397 echo "${ECHO_T}no" >&6
19398         with_fortune=""
19399       fi
19400     ;;
19401     *)
19402       set dummy $with_fortune_req ; fortune_tmp=$2
19403       # don't cache
19404       unset ac_cv_path_fortune_tmp
19405       # Extract the first word of "$fortune_tmp", so it can be a program name with args.
19406 set dummy $fortune_tmp; ac_word=$2
19407 echo "$as_me:$LINENO: checking for $ac_word" >&5
19408 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19409 if test "${ac_cv_path_fortune_tmp+set}" = set; then
19410   echo $ECHO_N "(cached) $ECHO_C" >&6
19411 else
19412   case $fortune_tmp in
19413   [\\/]* | ?:[\\/]*)
19414   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
19415   ;;
19416   *)
19417   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19418 for as_dir in $PATH
19419 do
19420   IFS=$as_save_IFS
19421   test -z "$as_dir" && as_dir=.
19422   for ac_exec_ext in '' $ac_executable_extensions; do
19423   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19424     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
19425     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19426     break 2
19427   fi
19428 done
19429 done
19430
19431   ;;
19432 esac
19433 fi
19434 fortune_tmp=$ac_cv_path_fortune_tmp
19435
19436 if test -n "$fortune_tmp"; then
19437   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
19438 echo "${ECHO_T}$fortune_tmp" >&6
19439 else
19440   echo "$as_me:$LINENO: result: no" >&5
19441 echo "${ECHO_T}no" >&6
19442 fi
19443
19444       if test -z "$fortune_tmp" ; then
19445         with_fortune=""
19446       fi
19447     ;;
19448   esac
19449   ac_cv_fortune_program="$with_fortune"
19450
19451 elif test -n "$ac_cv_fortune_program"; then
19452   echo "$as_me:$LINENO: result: checking for fortune... (cached) $ac_cv_fortune_program" >&5
19453 echo "${ECHO_T}checking for fortune... (cached) $ac_cv_fortune_program" >&6
19454 fi
19455
19456 unset ac_cv_path_fortune_tmp
19457 unset fortune_tmp
19458
19459 if test -z "$ac_cv_fortune_program" ; then
19460
19461   # first look for fortune in /usr/games/ (and use absolute path)
19462   for ac_prog in fortune
19463 do
19464   # Extract the first word of "$ac_prog", so it can be a program name with args.
19465 set dummy $ac_prog; ac_word=$2
19466 echo "$as_me:$LINENO: checking for $ac_word" >&5
19467 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19468 if test "${ac_cv_path_fortune_tmp+set}" = set; then
19469   echo $ECHO_N "(cached) $ECHO_C" >&6
19470 else
19471   case $fortune_tmp in
19472   [\\/]* | ?:[\\/]*)
19473   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
19474   ;;
19475   *)
19476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19477 for as_dir in "/usr/games"
19478 do
19479   IFS=$as_save_IFS
19480   test -z "$as_dir" && as_dir=.
19481   for ac_exec_ext in '' $ac_executable_extensions; do
19482   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19483     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
19484     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19485     break 2
19486   fi
19487 done
19488 done
19489
19490   ;;
19491 esac
19492 fi
19493 fortune_tmp=$ac_cv_path_fortune_tmp
19494
19495 if test -n "$fortune_tmp"; then
19496   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
19497 echo "${ECHO_T}$fortune_tmp" >&6
19498 else
19499   echo "$as_me:$LINENO: result: no" >&5
19500 echo "${ECHO_T}no" >&6
19501 fi
19502
19503   test -n "$fortune_tmp" && break
19504 done
19505
19506
19507   # if it's not there, look on $PATH (and don't use absolute path)
19508   if test -z "$fortune_tmp" ; then
19509      for ac_prog in fortune
19510 do
19511   # Extract the first word of "$ac_prog", so it can be a program name with args.
19512 set dummy $ac_prog; ac_word=$2
19513 echo "$as_me:$LINENO: checking for $ac_word" >&5
19514 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19515 if test "${ac_cv_prog_fortune_tmp+set}" = set; then
19516   echo $ECHO_N "(cached) $ECHO_C" >&6
19517 else
19518   if test -n "$fortune_tmp"; then
19519   ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
19520 else
19521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19522 for as_dir in $PATH
19523 do
19524   IFS=$as_save_IFS
19525   test -z "$as_dir" && as_dir=.
19526   for ac_exec_ext in '' $ac_executable_extensions; do
19527   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19528     ac_cv_prog_fortune_tmp="$ac_prog"
19529     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19530     break 2
19531   fi
19532 done
19533 done
19534
19535 fi
19536 fi
19537 fortune_tmp=$ac_cv_prog_fortune_tmp
19538 if test -n "$fortune_tmp"; then
19539   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
19540 echo "${ECHO_T}$fortune_tmp" >&6
19541 else
19542   echo "$as_me:$LINENO: result: no" >&5
19543 echo "${ECHO_T}no" >&6
19544 fi
19545
19546   test -n "$fortune_tmp" && break
19547 done
19548
19549   fi
19550
19551   # if we didn't find anything, then just assume /usr/games/
19552   if test -z "$fortune_tmp" ; then
19553      fortune_tmp="/usr/games/fortune"
19554   fi
19555
19556   ac_cv_fortune_program="$fortune_tmp"
19557
19558   # now check to see whether "fortune zippy" works.
19559   #
19560   fortune_tmp="$fortune_tmp zippy"
19561   echo "$as_me:$LINENO: checking for zippy quotes" >&5
19562 echo $ECHO_N "checking for zippy quotes... $ECHO_C" >&6
19563   if ( $fortune_tmp >/dev/null 2>&1 ); then
19564     ac_cv_fortune_program="$fortune_tmp"
19565     echo "$as_me:$LINENO: result: $fortune_tmp" >&5
19566 echo "${ECHO_T}$fortune_tmp" >&6
19567   else
19568     echo "$as_me:$LINENO: result: no" >&5
19569 echo "${ECHO_T}no" >&6
19570   fi
19571
19572 fi
19573
19574 unset ac_cv_path_fortune_tmp
19575 unset fortune_tmp
19576
19577 cat >>confdefs.h <<_ACEOF
19578 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
19579 _ACEOF
19580
19581
19582
19583 ###############################################################################
19584 #
19585 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
19586 #       This should be safe, but let's give people the option.
19587 #
19588 ###############################################################################
19589
19590 setuid_hacks_default=no
19591 setuid_hacks="$setuid_hacks_default"
19592
19593 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
19594 if test "${with_setuid_hacks+set}" = set; then
19595   withval="$with_setuid_hacks"
19596   setuid_hacks="$withval"
19597 else
19598   setuid_hacks="$setuid_hacks_default"
19599 fi;
19600
19601
19602    case "$setuid_hacks" in
19603     yes) ;;
19604     no)  ;;
19605
19606     /*)
19607      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
19608 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
19609      d=$setuid_hacks/include
19610      if test -d $d; then
19611        X_CFLAGS="-I$d $X_CFLAGS"
19612        echo "$as_me:$LINENO: result: $d" >&5
19613 echo "${ECHO_T}$d" >&6
19614      else
19615        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19616 echo "${ECHO_T}not found ($d: no such directory)" >&6
19617      fi
19618
19619      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
19620 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
19621      d=$setuid_hacks/lib
19622      if test -d $d; then
19623        X_LIBS="-L$d $X_LIBS"
19624        echo "$as_me:$LINENO: result: $d" >&5
19625 echo "${ECHO_T}$d" >&6
19626      else
19627        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19628 echo "${ECHO_T}not found ($d: no such directory)" >&6
19629      fi
19630
19631      # replace the directory string with "yes".
19632      setuid_hacks_req="yes"
19633      setuid_hacks=$setuid_hacks_req
19634      ;;
19635
19636     *)
19637      echo ""
19638      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
19639      echo "       If it is a directory, then \`DIR/include' will be added to"
19640      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19641      exit 1
19642      ;;
19643    esac
19644
19645
19646 if test "$setuid_hacks" = yes; then
19647   true
19648 elif test "$setuid_hacks" != no; then
19649   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
19650   exit 1
19651 fi
19652
19653
19654 ###############################################################################
19655 #
19656 #       Done testing.  Now, set up the various -I and -L variables,
19657 #       and decide which GUI program to build by default.
19658 #
19659 ###############################################################################
19660
19661 DEPEND=makedepend
19662 DEPEND_FLAGS=
19663 DEPEND_DEFINES=
19664
19665
19666 if test \! -z "$includedir" ; then
19667   INCLUDES="$INCLUDES -I$includedir"
19668 fi
19669
19670 if test \! -z "$libdir" ; then
19671   LDFLAGS="$LDFLAGS -L$libdir"
19672 fi
19673
19674
19675 PREFERRED_DEMO_PROGRAM=''
19676 ALL_DEMO_PROGRAMS=
19677 if test "$have_motif" = yes; then
19678   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
19679   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
19680 fi
19681 if test "$have_gtk" = yes; then
19682   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
19683   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
19684 fi
19685
19686
19687 if test "$have_kerberos" = yes; then
19688   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
19689   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
19690 fi
19691 if test "$have_pam" = yes; then
19692   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
19693   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
19694   INSTALL_PAM="install-pam"
19695 fi
19696 if test "$have_passwd_helper" = yes; then
19697   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
19698   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
19699 fi
19700   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
19701   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
19702
19703
19704 if test "$enable_locking" = yes; then
19705   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
19706   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
19707 else
19708   LOCK_SRCS='$(NOLOCK_SRCS_1)'
19709   LOCK_OBJS='$(NOLOCK_OBJS_1)'
19710 fi
19711
19712 if test "$ac_macosx" = yes; then
19713   EXES_OSX='$(EXES_OSX)'
19714   SCRIPTS_OSX='$(SCRIPTS_OSX)'
19715   MEN_OSX='$(MEN_OSX)'
19716 else
19717   EXES_OSX=
19718   SCRIPTS_OSX=
19719   MEN_OSX=
19720 fi
19721
19722
19723 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
19724
19725 if test "$need_setuid" = yes; then
19726   NEED_SETUID=yes
19727 else
19728   NEED_SETUID=no
19729 fi
19730
19731 if test "$setuid_hacks" = yes; then
19732   SETUID_HACKS=yes
19733 else
19734   SETUID_HACKS=no
19735 fi
19736
19737 tab='   '
19738 if test "$have_gl" = yes; then
19739   GL_EXES='$(GL_EXES)'
19740   GL_UTIL_EXES='$(GL_UTIL_EXES)'
19741   GL_MEN='$(GL_MEN)'
19742   GL_KLUDGE="${tab}  "
19743 else
19744   GL_KLUDGE="-${tab}  "
19745 fi
19746
19747 if test "$have_gle" = yes; then
19748   GLE_EXES='$(GLE_EXES)'
19749   GLE_KLUDGE="${tab}   "
19750 else
19751   GLE_KLUDGE="-${tab}   "
19752 fi
19753
19754 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
19755  JPEG_EXES='$(JPEG_EXES)'
19756 fi
19757
19758
19759 # Another substitution in the XScreenSaver.ad.in file:
19760 #
19761 if test "$gnome_open_program" != ''; then
19762   GNOME24=''
19763   GNOME22='!    '
19764   NOGNOME='!    '
19765 elif test "$gnome_url_show_program" != ''; then
19766   GNOME24='!    '
19767   GNOME22=''
19768   NOGNOME='!    '
19769 else
19770   GNOME24='!    '
19771   GNOME22='!    '
19772   NOGNOME=''
19773 fi
19774
19775
19776 # Now that we know whether we have Gnome, we can decide where the XML
19777 # config files get installed.
19778 #
19779 if test -z "$HACK_CONF_DIR" ; then
19780   if test -n "$GNOME_DATADIR" ; then
19781     HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
19782   else
19783     HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
19784   fi
19785 fi
19786
19787
19788
19789 # After computing $HACK_CONF_DIR, make sure $GLADE_DATADIR has a value
19790 # so that we know where to install the Gtk pixmaps.
19791 #
19792 # It should usually be "/usr/share/pixmaps/", but we can't just use
19793 # "$(prefix)/share/pixmaps" because that would usually result in
19794 # "/usr/X11R6/share/pixmaps/", which is wrong.  It needs to be the
19795 # Gtk prefix, not the overall prefix.
19796 #
19797 if test -n "$GNOME_DATADIR" ; then
19798   GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver'
19799 elif test "$have_gtk" = yes; then
19800   GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
19801   GLADE_DATADIR="$GLADE_DATADIR/share/xscreensaver"
19802 else
19803   GLADE_DATADIR=''
19804 fi
19805
19806
19807 # Set PO_DATADIR to something sensible.
19808 #
19809 echo "$as_me:$LINENO: checking for locale directory" >&5
19810 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
19811 if test -n "$GNOME_DATADIR" ; then
19812   PO_DATADIR="$GNOME_DATADIR"
19813 elif test "$have_gtk" = yes; then
19814   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
19815   PO_DATADIR="$PO_DATADIR/share"
19816 fi
19817
19818 if test -z "$PO_DATADIR" ; then
19819   #
19820   # #### Total fucking kludge --
19821   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
19822   # but of course we need to expand all the nested variables to do that...
19823   #
19824   dd=$datadir
19825   eval dd=${dd}
19826   eval dd=${dd}
19827   eval dd=${dd}
19828   eval dd=${dd}
19829   eval dd=${dd}
19830   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
19831 fi
19832
19833 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
19834 echo "${ECHO_T}$PO_DATADIR/locale" >&6
19835
19836
19837 # canonicalize slashes.
19838 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
19839
19840 # gcc 3.0 likes to issue this warning for every file:
19841 #
19842 # cc1: warning: changing search order for system directory "/usr/local/include"
19843 # cc1: warning:   as it has already been specified as a non-system directory
19844 #
19845 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
19846 # Which *should* be totally redundant, and thus an ok thing to delete?
19847 #
19848 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
19849
19850
19851 ###############################################################################
19852 #
19853 #       Perform substitutions and write Makefiles.
19854 #
19855 ###############################################################################
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912 APPDEFAULTS=$ac_x_app_defaults
19913
19914
19915
19916
19917
19918
19919
19920                                                                       ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
19921 cat >confcache <<\_ACEOF
19922 # This file is a shell script that caches the results of configure
19923 # tests run on this system so they can be shared between configure
19924 # scripts and configure runs, see configure's option --config-cache.
19925 # It is not useful on other systems.  If it contains results you don't
19926 # want to keep, you may remove or edit it.
19927 #
19928 # config.status only pays attention to the cache file if you give it
19929 # the --recheck option to rerun configure.
19930 #
19931 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19932 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19933 # following values.
19934
19935 _ACEOF
19936
19937 # The following way of writing the cache mishandles newlines in values,
19938 # but we know of no workaround that is simple, portable, and efficient.
19939 # So, don't put newlines in cache variables' values.
19940 # Ultrix sh set writes to stderr and can't be redirected directly,
19941 # and sets the high bit in the cache file unless we assign to the vars.
19942 {
19943   (set) 2>&1 |
19944     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19945     *ac_space=\ *)
19946       # `set' does not quote correctly, so add quotes (double-quote
19947       # substitution turns \\\\ into \\, and sed turns \\ into \).
19948       sed -n \
19949         "s/'/'\\\\''/g;
19950           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19951       ;;
19952     *)
19953       # `set' quotes correctly as required by POSIX, so do not add quotes.
19954       sed -n \
19955         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19956       ;;
19957     esac;
19958 } |
19959   sed '
19960      t clear
19961      : clear
19962      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19963      t end
19964      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19965      : end' >>confcache
19966 if diff $cache_file confcache >/dev/null 2>&1; then :; else
19967   if test -w $cache_file; then
19968     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19969     cat confcache >$cache_file
19970   else
19971     echo "not updating unwritable cache $cache_file"
19972   fi
19973 fi
19974 rm -f confcache
19975
19976 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19977 # Let make expand exec_prefix.
19978 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19979
19980 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19981 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19982 # trailing colons and then remove the whole line if VPATH becomes empty
19983 # (actually we leave an empty line to preserve line numbers).
19984 if test "x$srcdir" = x.; then
19985   ac_vpsub='/^[  ]*VPATH[        ]*=/{
19986 s/:*\$(srcdir):*/:/;
19987 s/:*\${srcdir}:*/:/;
19988 s/:*@srcdir@:*/:/;
19989 s/^\([^=]*=[     ]*\):*/\1/;
19990 s/:*$//;
19991 s/^[^=]*=[       ]*$//;
19992 }'
19993 fi
19994
19995 DEFS=-DHAVE_CONFIG_H
19996
19997 ac_libobjs=
19998 ac_ltlibobjs=
19999 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20000   # 1. Remove the extension, and $U if already installed.
20001   ac_i=`echo "$ac_i" |
20002          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
20003   # 2. Add them.
20004   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
20005   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
20006 done
20007 LIBOBJS=$ac_libobjs
20008
20009 LTLIBOBJS=$ac_ltlibobjs
20010
20011
20012
20013
20014         mv -f po/POTFILES po/POTFILES.tmp
20015         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
20016         rm -f po/POTFILES.tmp
20017
20018
20019
20020 : ${CONFIG_STATUS=./config.status}
20021 ac_clean_files_save=$ac_clean_files
20022 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20023 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20024 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20025 cat >$CONFIG_STATUS <<_ACEOF
20026 #! $SHELL
20027 # Generated by $as_me.
20028 # Run this file to recreate the current configuration.
20029 # Compiler output produced by configure, useful for debugging
20030 # configure, is in config.log if it exists.
20031
20032 debug=false
20033 ac_cs_recheck=false
20034 ac_cs_silent=false
20035 SHELL=\${CONFIG_SHELL-$SHELL}
20036 _ACEOF
20037
20038 cat >>$CONFIG_STATUS <<\_ACEOF
20039 ## --------------------- ##
20040 ## M4sh Initialization.  ##
20041 ## --------------------- ##
20042
20043 # Be Bourne compatible
20044 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20045   emulate sh
20046   NULLCMD=:
20047   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20048   # is contrary to our usage.  Disable this feature.
20049   alias -g '${1+"$@"}'='"$@"'
20050 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20051   set -o posix
20052 fi
20053 DUALCASE=1; export DUALCASE # for MKS sh
20054
20055 # Support unset when possible.
20056 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
20057   as_unset=unset
20058 else
20059   as_unset=false
20060 fi
20061
20062
20063 # Work around bugs in pre-3.0 UWIN ksh.
20064 $as_unset ENV MAIL MAILPATH
20065 PS1='$ '
20066 PS2='> '
20067 PS4='+ '
20068
20069 # NLS nuisances.
20070 for as_var in \
20071   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20072   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20073   LC_TELEPHONE LC_TIME
20074 do
20075   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
20076     eval $as_var=C; export $as_var
20077   else
20078     $as_unset $as_var
20079   fi
20080 done
20081
20082 # Required to use basename.
20083 if expr a : '\(a\)' >/dev/null 2>&1; then
20084   as_expr=expr
20085 else
20086   as_expr=false
20087 fi
20088
20089 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
20090   as_basename=basename
20091 else
20092   as_basename=false
20093 fi
20094
20095
20096 # Name of the executable.
20097 as_me=`$as_basename "$0" ||
20098 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20099          X"$0" : 'X\(//\)$' \| \
20100          X"$0" : 'X\(/\)$' \| \
20101          .     : '\(.\)' 2>/dev/null ||
20102 echo X/"$0" |
20103     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
20104           /^X\/\(\/\/\)$/{ s//\1/; q; }
20105           /^X\/\(\/\).*/{ s//\1/; q; }
20106           s/.*/./; q'`
20107
20108
20109 # PATH needs CR, and LINENO needs CR and PATH.
20110 # Avoid depending upon Character Ranges.
20111 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20112 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20113 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20114 as_cr_digits='0123456789'
20115 as_cr_alnum=$as_cr_Letters$as_cr_digits
20116
20117 # The user is always right.
20118 if test "${PATH_SEPARATOR+set}" != set; then
20119   echo "#! /bin/sh" >conf$$.sh
20120   echo  "exit 0"   >>conf$$.sh
20121   chmod +x conf$$.sh
20122   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20123     PATH_SEPARATOR=';'
20124   else
20125     PATH_SEPARATOR=:
20126   fi
20127   rm -f conf$$.sh
20128 fi
20129
20130
20131   as_lineno_1=$LINENO
20132   as_lineno_2=$LINENO
20133   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20134   test "x$as_lineno_1" != "x$as_lineno_2" &&
20135   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
20136   # Find who we are.  Look in the path if we contain no path at all
20137   # relative or not.
20138   case $0 in
20139     *[\\/]* ) as_myself=$0 ;;
20140     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20141 for as_dir in $PATH
20142 do
20143   IFS=$as_save_IFS
20144   test -z "$as_dir" && as_dir=.
20145   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20146 done
20147
20148        ;;
20149   esac
20150   # We did not find ourselves, most probably we were run as `sh COMMAND'
20151   # in which case we are not to be found in the path.
20152   if test "x$as_myself" = x; then
20153     as_myself=$0
20154   fi
20155   if test ! -f "$as_myself"; then
20156     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
20157 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
20158    { (exit 1); exit 1; }; }
20159   fi
20160   case $CONFIG_SHELL in
20161   '')
20162     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20163 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
20164 do
20165   IFS=$as_save_IFS
20166   test -z "$as_dir" && as_dir=.
20167   for as_base in sh bash ksh sh5; do
20168          case $as_dir in
20169          /*)
20170            if ("$as_dir/$as_base" -c '
20171   as_lineno_1=$LINENO
20172   as_lineno_2=$LINENO
20173   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20174   test "x$as_lineno_1" != "x$as_lineno_2" &&
20175   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
20176              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
20177              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
20178              CONFIG_SHELL=$as_dir/$as_base
20179              export CONFIG_SHELL
20180              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
20181            fi;;
20182          esac
20183        done
20184 done
20185 ;;
20186   esac
20187
20188   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20189   # uniformly replaced by the line number.  The first 'sed' inserts a
20190   # line-number line before each line; the second 'sed' does the real
20191   # work.  The second script uses 'N' to pair each line-number line
20192   # with the numbered line, and appends trailing '-' during
20193   # substitution so that $LINENO is not a special case at line end.
20194   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20195   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
20196   sed '=' <$as_myself |
20197     sed '
20198       N
20199       s,$,-,
20200       : loop
20201       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
20202       t loop
20203       s,-$,,
20204       s,^['$as_cr_digits']*\n,,
20205     ' >$as_me.lineno &&
20206   chmod +x $as_me.lineno ||
20207     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
20208 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
20209    { (exit 1); exit 1; }; }
20210
20211   # Don't try to exec as it changes $[0], causing all sort of problems
20212   # (the dirname of $[0] is not the place where we might find the
20213   # original and so on.  Autoconf is especially sensible to this).
20214   . ./$as_me.lineno
20215   # Exit status is that of the last command.
20216   exit
20217 }
20218
20219
20220 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
20221   *c*,-n*) ECHO_N= ECHO_C='
20222 ' ECHO_T='      ' ;;
20223   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
20224   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
20225 esac
20226
20227 if expr a : '\(a\)' >/dev/null 2>&1; then
20228   as_expr=expr
20229 else
20230   as_expr=false
20231 fi
20232
20233 rm -f conf$$ conf$$.exe conf$$.file
20234 echo >conf$$.file
20235 if ln -s conf$$.file conf$$ 2>/dev/null; then
20236   # We could just check for DJGPP; but this test a) works b) is more generic
20237   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20238   if test -f conf$$.exe; then
20239     # Don't use ln at all; we don't have any links
20240     as_ln_s='cp -p'
20241   else
20242     as_ln_s='ln -s'
20243   fi
20244 elif ln conf$$.file conf$$ 2>/dev/null; then
20245   as_ln_s=ln
20246 else
20247   as_ln_s='cp -p'
20248 fi
20249 rm -f conf$$ conf$$.exe conf$$.file
20250
20251 if mkdir -p . 2>/dev/null; then
20252   as_mkdir_p=:
20253 else
20254   test -d ./-p && rmdir ./-p
20255   as_mkdir_p=false
20256 fi
20257
20258 as_executable_p="test -f"
20259
20260 # Sed expression to map a string onto a valid CPP name.
20261 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20262
20263 # Sed expression to map a string onto a valid variable name.
20264 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20265
20266
20267 # IFS
20268 # We need space, tab and new line, in precisely that order.
20269 as_nl='
20270 '
20271 IFS="   $as_nl"
20272
20273 # CDPATH.
20274 $as_unset CDPATH
20275
20276 exec 6>&1
20277
20278 # Open the log real soon, to keep \$[0] and so on meaningful, and to
20279 # report actual input values of CONFIG_FILES etc. instead of their
20280 # values after options handling.  Logging --version etc. is OK.
20281 exec 5>>config.log
20282 {
20283   echo
20284   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20285 ## Running $as_me. ##
20286 _ASBOX
20287 } >&5
20288 cat >&5 <<_CSEOF
20289
20290 This file was extended by $as_me, which was
20291 generated by GNU Autoconf 2.59.  Invocation command line was
20292
20293   CONFIG_FILES    = $CONFIG_FILES
20294   CONFIG_HEADERS  = $CONFIG_HEADERS
20295   CONFIG_LINKS    = $CONFIG_LINKS
20296   CONFIG_COMMANDS = $CONFIG_COMMANDS
20297   $ $0 $@
20298
20299 _CSEOF
20300 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
20301 echo >&5
20302 _ACEOF
20303
20304 # Files that config.status was made for.
20305 if test -n "$ac_config_files"; then
20306   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20307 fi
20308
20309 if test -n "$ac_config_headers"; then
20310   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20311 fi
20312
20313 if test -n "$ac_config_links"; then
20314   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20315 fi
20316
20317 if test -n "$ac_config_commands"; then
20318   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20319 fi
20320
20321 cat >>$CONFIG_STATUS <<\_ACEOF
20322
20323 ac_cs_usage="\
20324 \`$as_me' instantiates files from templates according to the
20325 current configuration.
20326
20327 Usage: $0 [OPTIONS] [FILE]...
20328
20329   -h, --help       print this help, then exit
20330   -V, --version    print version number, then exit
20331   -q, --quiet      do not print progress messages
20332   -d, --debug      don't remove temporary files
20333       --recheck    update $as_me by reconfiguring in the same conditions
20334   --file=FILE[:TEMPLATE]
20335                    instantiate the configuration file FILE
20336   --header=FILE[:TEMPLATE]
20337                    instantiate the configuration header FILE
20338
20339 Configuration files:
20340 $config_files
20341
20342 Configuration headers:
20343 $config_headers
20344
20345 Configuration commands:
20346 $config_commands
20347
20348 Report bugs to <bug-autoconf@gnu.org>."
20349 _ACEOF
20350
20351 cat >>$CONFIG_STATUS <<_ACEOF
20352 ac_cs_version="\\
20353 config.status
20354 configured by $0, generated by GNU Autoconf 2.59,
20355   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20356
20357 Copyright (C) 2003 Free Software Foundation, Inc.
20358 This config.status script is free software; the Free Software Foundation
20359 gives unlimited permission to copy, distribute and modify it."
20360 srcdir=$srcdir
20361 INSTALL="$INSTALL"
20362 _ACEOF
20363
20364 cat >>$CONFIG_STATUS <<\_ACEOF
20365 # If no file are specified by the user, then we need to provide default
20366 # value.  By we need to know if files were specified by the user.
20367 ac_need_defaults=:
20368 while test $# != 0
20369 do
20370   case $1 in
20371   --*=*)
20372     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20373     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20374     ac_shift=:
20375     ;;
20376   -*)
20377     ac_option=$1
20378     ac_optarg=$2
20379     ac_shift=shift
20380     ;;
20381   *) # This is not an option, so the user has probably given explicit
20382      # arguments.
20383      ac_option=$1
20384      ac_need_defaults=false;;
20385   esac
20386
20387   case $ac_option in
20388   # Handling of the options.
20389 _ACEOF
20390 cat >>$CONFIG_STATUS <<\_ACEOF
20391   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20392     ac_cs_recheck=: ;;
20393   --version | --vers* | -V )
20394     echo "$ac_cs_version"; exit 0 ;;
20395   --he | --h)
20396     # Conflict between --help and --header
20397     { { echo "$as_me:$LINENO: error: ambiguous option: $1
20398 Try \`$0 --help' for more information." >&5
20399 echo "$as_me: error: ambiguous option: $1
20400 Try \`$0 --help' for more information." >&2;}
20401    { (exit 1); exit 1; }; };;
20402   --help | --hel | -h )
20403     echo "$ac_cs_usage"; exit 0 ;;
20404   --debug | --d* | -d )
20405     debug=: ;;
20406   --file | --fil | --fi | --f )
20407     $ac_shift
20408     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
20409     ac_need_defaults=false;;
20410   --header | --heade | --head | --hea )
20411     $ac_shift
20412     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
20413     ac_need_defaults=false;;
20414   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20415   | -silent | --silent | --silen | --sile | --sil | --si | --s)
20416     ac_cs_silent=: ;;
20417
20418   # This is an error.
20419   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
20420 Try \`$0 --help' for more information." >&5
20421 echo "$as_me: error: unrecognized option: $1
20422 Try \`$0 --help' for more information." >&2;}
20423    { (exit 1); exit 1; }; } ;;
20424
20425   *) ac_config_targets="$ac_config_targets $1" ;;
20426
20427   esac
20428   shift
20429 done
20430
20431 ac_configure_extra_args=
20432
20433 if $ac_cs_silent; then
20434   exec 6>/dev/null
20435   ac_configure_extra_args="$ac_configure_extra_args --silent"
20436 fi
20437
20438 _ACEOF
20439 cat >>$CONFIG_STATUS <<_ACEOF
20440 if \$ac_cs_recheck; then
20441   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
20442   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20443 fi
20444
20445 _ACEOF
20446
20447 cat >>$CONFIG_STATUS <<_ACEOF
20448 #
20449 # INIT-COMMANDS section.
20450 #
20451
20452 INTLTOOL_PERL=${INTLTOOL_PERL}
20453
20454
20455 _ACEOF
20456
20457
20458
20459 cat >>$CONFIG_STATUS <<\_ACEOF
20460 for ac_config_target in $ac_config_targets
20461 do
20462   case "$ac_config_target" in
20463   # Handling of arguments.
20464   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20465   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
20466   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
20467   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
20468   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
20469   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
20470   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
20471   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
20472   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
20473   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
20474   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
20475 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20476    { (exit 1); exit 1; }; };;
20477   esac
20478 done
20479
20480 # If the user did not use the arguments to specify the items to instantiate,
20481 # then the envvar interface is used.  Set only those that are not.
20482 # We use the long form for the default assignment because of an extremely
20483 # bizarre bug on SunOS 4.1.3.
20484 if $ac_need_defaults; then
20485   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20486   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20487   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20488 fi
20489
20490 # Have a temporary directory for convenience.  Make it in the build tree
20491 # simply because there is no reason to put it here, and in addition,
20492 # creating and moving files from /tmp can sometimes cause problems.
20493 # Create a temporary directory, and hook for its removal unless debugging.
20494 $debug ||
20495 {
20496   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20497   trap '{ (exit 1); exit 1; }' 1 2 13 15
20498 }
20499
20500 # Create a (secure) tmp directory for tmp files.
20501
20502 {
20503   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
20504   test -n "$tmp" && test -d "$tmp"
20505 }  ||
20506 {
20507   tmp=./confstat$$-$RANDOM
20508   (umask 077 && mkdir $tmp)
20509 } ||
20510 {
20511    echo "$me: cannot create a temporary directory in ." >&2
20512    { (exit 1); exit 1; }
20513 }
20514
20515 _ACEOF
20516
20517 cat >>$CONFIG_STATUS <<_ACEOF
20518
20519 #
20520 # CONFIG_FILES section.
20521 #
20522
20523 # No need to generate the scripts if there are no CONFIG_FILES.
20524 # This happens for instance when ./config.status config.h
20525 if test -n "\$CONFIG_FILES"; then
20526   # Protect against being on the right side of a sed subst in config.status.
20527   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20528    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20529 s,@SHELL@,$SHELL,;t t
20530 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20531 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20532 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20533 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20534 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20535 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20536 s,@exec_prefix@,$exec_prefix,;t t
20537 s,@prefix@,$prefix,;t t
20538 s,@program_transform_name@,$program_transform_name,;t t
20539 s,@bindir@,$bindir,;t t
20540 s,@sbindir@,$sbindir,;t t
20541 s,@libexecdir@,$libexecdir,;t t
20542 s,@datadir@,$datadir,;t t
20543 s,@sysconfdir@,$sysconfdir,;t t
20544 s,@sharedstatedir@,$sharedstatedir,;t t
20545 s,@localstatedir@,$localstatedir,;t t
20546 s,@libdir@,$libdir,;t t
20547 s,@includedir@,$includedir,;t t
20548 s,@oldincludedir@,$oldincludedir,;t t
20549 s,@infodir@,$infodir,;t t
20550 s,@mandir@,$mandir,;t t
20551 s,@build_alias@,$build_alias,;t t
20552 s,@host_alias@,$host_alias,;t t
20553 s,@target_alias@,$target_alias,;t t
20554 s,@DEFS@,$DEFS,;t t
20555 s,@ECHO_C@,$ECHO_C,;t t
20556 s,@ECHO_N@,$ECHO_N,;t t
20557 s,@ECHO_T@,$ECHO_T,;t t
20558 s,@LIBS@,$LIBS,;t t
20559 s,@build@,$build,;t t
20560 s,@build_cpu@,$build_cpu,;t t
20561 s,@build_vendor@,$build_vendor,;t t
20562 s,@build_os@,$build_os,;t t
20563 s,@host@,$host,;t t
20564 s,@host_cpu@,$host_cpu,;t t
20565 s,@host_vendor@,$host_vendor,;t t
20566 s,@host_os@,$host_os,;t t
20567 s,@CC@,$CC,;t t
20568 s,@CFLAGS@,$CFLAGS,;t t
20569 s,@LDFLAGS@,$LDFLAGS,;t t
20570 s,@CPPFLAGS@,$CPPFLAGS,;t t
20571 s,@ac_ct_CC@,$ac_ct_CC,;t t
20572 s,@EXEEXT@,$EXEEXT,;t t
20573 s,@OBJEXT@,$OBJEXT,;t t
20574 s,@CPP@,$CPP,;t t
20575 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20576 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20577 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20578 s,@SET_MAKE@,$SET_MAKE,;t t
20579 s,@EGREP@,$EGREP,;t t
20580 s,@PERL@,$PERL,;t t
20581 s,@X_CFLAGS@,$X_CFLAGS,;t t
20582 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
20583 s,@X_LIBS@,$X_LIBS,;t t
20584 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
20585 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
20586 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
20587 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
20588 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
20589 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
20590 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
20591 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
20592 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
20593 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
20594 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
20595 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
20596 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
20597 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
20598 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
20599 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
20600 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
20601 s,@RANLIB@,$RANLIB,;t t
20602 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20603 s,@ALLOCA@,$ALLOCA,;t t
20604 s,@USE_NLS@,$USE_NLS,;t t
20605 s,@MSGFMT@,$MSGFMT,;t t
20606 s,@GMSGFMT@,$GMSGFMT,;t t
20607 s,@XGETTEXT@,$XGETTEXT,;t t
20608 s,@CATALOGS@,$CATALOGS,;t t
20609 s,@CATOBJEXT@,$CATOBJEXT,;t t
20610 s,@DATADIRNAME@,$DATADIRNAME,;t t
20611 s,@GMOFILES@,$GMOFILES,;t t
20612 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
20613 s,@INTLDEPS@,$INTLDEPS,;t t
20614 s,@INTLLIBS@,$INTLLIBS,;t t
20615 s,@INTLOBJS@,$INTLOBJS,;t t
20616 s,@POFILES@,$POFILES,;t t
20617 s,@POSUB@,$POSUB,;t t
20618 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
20619 s,@pkg_config@,$pkg_config,;t t
20620 s,@gnome_open_program@,$gnome_open_program,;t t
20621 s,@gnome_url_show_program@,$gnome_url_show_program,;t t
20622 s,@fortune_tmp@,$fortune_tmp,;t t
20623 s,@INCLUDES@,$INCLUDES,;t t
20624 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
20625 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
20626 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
20627 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
20628 s,@GTK_LIBS@,$GTK_LIBS,;t t
20629 s,@XML_LIBS@,$XML_LIBS,;t t
20630 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
20631 s,@HACK_LIBS@,$HACK_LIBS,;t t
20632 s,@XPM_LIBS@,$XPM_LIBS,;t t
20633 s,@PTY_LIBS@,$PTY_LIBS,;t t
20634 s,@GL_LIBS@,$GL_LIBS,;t t
20635 s,@GLE_LIBS@,$GLE_LIBS,;t t
20636 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
20637 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
20638 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
20639 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
20640 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
20641 s,@NEED_SETUID@,$NEED_SETUID,;t t
20642 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
20643 s,@OBJCC@,$OBJCC,;t t
20644 s,@EXES_OSX@,$EXES_OSX,;t t
20645 s,@SCRIPTS_OSX@,$SCRIPTS_OSX,;t t
20646 s,@MEN_OSX@,$MEN_OSX,;t t
20647 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
20648 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
20649 s,@XMU_SRCS@,$XMU_SRCS,;t t
20650 s,@XMU_OBJS@,$XMU_OBJS,;t t
20651 s,@XMU_LIBS@,$XMU_LIBS,;t t
20652 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
20653 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
20654 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
20655 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
20656 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
20657 s,@JPEG_EXES@,$JPEG_EXES,;t t
20658 s,@GL_EXES@,$GL_EXES,;t t
20659 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
20660 s,@GL_MEN@,$GL_MEN,;t t
20661 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
20662 s,@GLE_EXES@,$GLE_EXES,;t t
20663 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
20664 s,@GNOME24@,$GNOME24,;t t
20665 s,@GNOME22@,$GNOME22,;t t
20666 s,@NOGNOME@,$NOGNOME,;t t
20667 s,@HACKDIR@,$HACKDIR,;t t
20668 s,@GNOME_DATADIR@,$GNOME_DATADIR,;t t
20669 s,@GLADE_DATADIR@,$GLADE_DATADIR,;t t
20670 s,@PO_DATADIR@,$PO_DATADIR,;t t
20671 s,@GNOME_PANELDIR@,$GNOME_PANELDIR,;t t
20672 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
20673 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
20674 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
20675 s,@DEPEND@,$DEPEND,;t t
20676 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
20677 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
20678 s,@LIBOBJS@,$LIBOBJS,;t t
20679 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
20680 CEOF
20681
20682 _ACEOF
20683
20684   cat >>$CONFIG_STATUS <<\_ACEOF
20685   # Split the substitutions into bite-sized pieces for seds with
20686   # small command number limits, like on Digital OSF/1 and HP-UX.
20687   ac_max_sed_lines=48
20688   ac_sed_frag=1 # Number of current file.
20689   ac_beg=1 # First line for current file.
20690   ac_end=$ac_max_sed_lines # Line after last line for current file.
20691   ac_more_lines=:
20692   ac_sed_cmds=
20693   while $ac_more_lines; do
20694     if test $ac_beg -gt 1; then
20695       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20696     else
20697       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20698     fi
20699     if test ! -s $tmp/subs.frag; then
20700       ac_more_lines=false
20701     else
20702       # The purpose of the label and of the branching condition is to
20703       # speed up the sed processing (if there are no `@' at all, there
20704       # is no need to browse any of the substitutions).
20705       # These are the two extra sed commands mentioned above.
20706       (echo ':t
20707   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20708       if test -z "$ac_sed_cmds"; then
20709         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20710       else
20711         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20712       fi
20713       ac_sed_frag=`expr $ac_sed_frag + 1`
20714       ac_beg=$ac_end
20715       ac_end=`expr $ac_end + $ac_max_sed_lines`
20716     fi
20717   done
20718   if test -z "$ac_sed_cmds"; then
20719     ac_sed_cmds=cat
20720   fi
20721 fi # test -n "$CONFIG_FILES"
20722
20723 _ACEOF
20724 cat >>$CONFIG_STATUS <<\_ACEOF
20725 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20726   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20727   case $ac_file in
20728   - | *:- | *:-:* ) # input from stdin
20729         cat >$tmp/stdin
20730         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20731         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20732   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20733         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20734   * )   ac_file_in=$ac_file.in ;;
20735   esac
20736
20737   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20738   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
20739 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20740          X"$ac_file" : 'X\(//\)[^/]' \| \
20741          X"$ac_file" : 'X\(//\)$' \| \
20742          X"$ac_file" : 'X\(/\)' \| \
20743          .     : '\(.\)' 2>/dev/null ||
20744 echo X"$ac_file" |
20745     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20746           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20747           /^X\(\/\/\)$/{ s//\1/; q; }
20748           /^X\(\/\).*/{ s//\1/; q; }
20749           s/.*/./; q'`
20750   { if $as_mkdir_p; then
20751     mkdir -p "$ac_dir"
20752   else
20753     as_dir="$ac_dir"
20754     as_dirs=
20755     while test ! -d "$as_dir"; do
20756       as_dirs="$as_dir $as_dirs"
20757       as_dir=`(dirname "$as_dir") 2>/dev/null ||
20758 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20759          X"$as_dir" : 'X\(//\)[^/]' \| \
20760          X"$as_dir" : 'X\(//\)$' \| \
20761          X"$as_dir" : 'X\(/\)' \| \
20762          .     : '\(.\)' 2>/dev/null ||
20763 echo X"$as_dir" |
20764     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20765           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20766           /^X\(\/\/\)$/{ s//\1/; q; }
20767           /^X\(\/\).*/{ s//\1/; q; }
20768           s/.*/./; q'`
20769     done
20770     test ! -n "$as_dirs" || mkdir $as_dirs
20771   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20772 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20773    { (exit 1); exit 1; }; }; }
20774
20775   ac_builddir=.
20776
20777 if test "$ac_dir" != .; then
20778   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
20779   # A "../" for each directory in $ac_dir_suffix.
20780   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
20781 else
20782   ac_dir_suffix= ac_top_builddir=
20783 fi
20784
20785 case $srcdir in
20786   .)  # No --srcdir option.  We are building in place.
20787     ac_srcdir=.
20788     if test -z "$ac_top_builddir"; then
20789        ac_top_srcdir=.
20790     else
20791        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
20792     fi ;;
20793   [\\/]* | ?:[\\/]* )  # Absolute path.
20794     ac_srcdir=$srcdir$ac_dir_suffix;
20795     ac_top_srcdir=$srcdir ;;
20796   *) # Relative path.
20797     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
20798     ac_top_srcdir=$ac_top_builddir$srcdir ;;
20799 esac
20800
20801 # Do not use `cd foo && pwd` to compute absolute paths, because
20802 # the directories may not exist.
20803 case `pwd` in
20804 .) ac_abs_builddir="$ac_dir";;
20805 *)
20806   case "$ac_dir" in
20807   .) ac_abs_builddir=`pwd`;;
20808   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
20809   *) ac_abs_builddir=`pwd`/"$ac_dir";;
20810   esac;;
20811 esac
20812 case $ac_abs_builddir in
20813 .) ac_abs_top_builddir=${ac_top_builddir}.;;
20814 *)
20815   case ${ac_top_builddir}. in
20816   .) ac_abs_top_builddir=$ac_abs_builddir;;
20817   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
20818   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
20819   esac;;
20820 esac
20821 case $ac_abs_builddir in
20822 .) ac_abs_srcdir=$ac_srcdir;;
20823 *)
20824   case $ac_srcdir in
20825   .) ac_abs_srcdir=$ac_abs_builddir;;
20826   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
20827   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
20828   esac;;
20829 esac
20830 case $ac_abs_builddir in
20831 .) ac_abs_top_srcdir=$ac_top_srcdir;;
20832 *)
20833   case $ac_top_srcdir in
20834   .) ac_abs_top_srcdir=$ac_abs_builddir;;
20835   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
20836   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
20837   esac;;
20838 esac
20839
20840
20841   case $INSTALL in
20842   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20843   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
20844   esac
20845
20846   if test x"$ac_file" != x-; then
20847     { echo "$as_me:$LINENO: creating $ac_file" >&5
20848 echo "$as_me: creating $ac_file" >&6;}
20849     rm -f "$ac_file"
20850   fi
20851   # Let's still pretend it is `configure' which instantiates (i.e., don't
20852   # use $as_me), people would be surprised to read:
20853   #    /* config.h.  Generated by config.status.  */
20854   if test x"$ac_file" = x-; then
20855     configure_input=
20856   else
20857     configure_input="$ac_file.  "
20858   fi
20859   configure_input=$configure_input"Generated from `echo $ac_file_in |
20860                                      sed 's,.*/,,'` by configure."
20861
20862   # First look for the input files in the build tree, otherwise in the
20863   # src tree.
20864   ac_file_inputs=`IFS=:
20865     for f in $ac_file_in; do
20866       case $f in
20867       -) echo $tmp/stdin ;;
20868       [\\/$]*)
20869          # Absolute (can't be DOS-style, as IFS=:)
20870          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20871 echo "$as_me: error: cannot find input file: $f" >&2;}
20872    { (exit 1); exit 1; }; }
20873          echo "$f";;
20874       *) # Relative
20875          if test -f "$f"; then
20876            # Build tree
20877            echo "$f"
20878          elif test -f "$srcdir/$f"; then
20879            # Source tree
20880            echo "$srcdir/$f"
20881          else
20882            # /dev/null tree
20883            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20884 echo "$as_me: error: cannot find input file: $f" >&2;}
20885    { (exit 1); exit 1; }; }
20886          fi;;
20887       esac
20888     done` || { (exit 1); exit 1; }
20889 _ACEOF
20890 cat >>$CONFIG_STATUS <<_ACEOF
20891   sed "$ac_vpsub
20892 $extrasub
20893 _ACEOF
20894 cat >>$CONFIG_STATUS <<\_ACEOF
20895 :t
20896 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20897 s,@configure_input@,$configure_input,;t t
20898 s,@srcdir@,$ac_srcdir,;t t
20899 s,@abs_srcdir@,$ac_abs_srcdir,;t t
20900 s,@top_srcdir@,$ac_top_srcdir,;t t
20901 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
20902 s,@builddir@,$ac_builddir,;t t
20903 s,@abs_builddir@,$ac_abs_builddir,;t t
20904 s,@top_builddir@,$ac_top_builddir,;t t
20905 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
20906 s,@INSTALL@,$ac_INSTALL,;t t
20907 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20908   rm -f $tmp/stdin
20909   if test x"$ac_file" != x-; then
20910     mv $tmp/out $ac_file
20911   else
20912     cat $tmp/out
20913     rm -f $tmp/out
20914   fi
20915
20916 done
20917 _ACEOF
20918 cat >>$CONFIG_STATUS <<\_ACEOF
20919
20920 #
20921 # CONFIG_HEADER section.
20922 #
20923
20924 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20925 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20926 #
20927 # ac_d sets the value in "#define NAME VALUE" lines.
20928 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
20929 ac_dB='[         ].*$,\1#\2'
20930 ac_dC=' '
20931 ac_dD=',;t'
20932 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20933 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20934 ac_uB='$,\1#\2define\3'
20935 ac_uC=' '
20936 ac_uD=',;t'
20937
20938 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20939   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20940   case $ac_file in
20941   - | *:- | *:-:* ) # input from stdin
20942         cat >$tmp/stdin
20943         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20944         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20945   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20946         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20947   * )   ac_file_in=$ac_file.in ;;
20948   esac
20949
20950   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
20951 echo "$as_me: creating $ac_file" >&6;}
20952
20953   # First look for the input files in the build tree, otherwise in the
20954   # src tree.
20955   ac_file_inputs=`IFS=:
20956     for f in $ac_file_in; do
20957       case $f in
20958       -) echo $tmp/stdin ;;
20959       [\\/$]*)
20960          # Absolute (can't be DOS-style, as IFS=:)
20961          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20962 echo "$as_me: error: cannot find input file: $f" >&2;}
20963    { (exit 1); exit 1; }; }
20964          # Do quote $f, to prevent DOS paths from being IFS'd.
20965          echo "$f";;
20966       *) # Relative
20967          if test -f "$f"; then
20968            # Build tree
20969            echo "$f"
20970          elif test -f "$srcdir/$f"; then
20971            # Source tree
20972            echo "$srcdir/$f"
20973          else
20974            # /dev/null tree
20975            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20976 echo "$as_me: error: cannot find input file: $f" >&2;}
20977    { (exit 1); exit 1; }; }
20978          fi;;
20979       esac
20980     done` || { (exit 1); exit 1; }
20981   # Remove the trailing spaces.
20982   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
20983
20984 _ACEOF
20985
20986 # Transform confdefs.h into two sed scripts, `conftest.defines' and
20987 # `conftest.undefs', that substitutes the proper values into
20988 # config.h.in to produce config.h.  The first handles `#define'
20989 # templates, and the second `#undef' templates.
20990 # And first: Protect against being on the right side of a sed subst in
20991 # config.status.  Protect against being in an unquoted here document
20992 # in config.status.
20993 rm -f conftest.defines conftest.undefs
20994 # Using a here document instead of a string reduces the quoting nightmare.
20995 # Putting comments in sed scripts is not portable.
20996 #
20997 # `end' is used to avoid that the second main sed command (meant for
20998 # 0-ary CPP macros) applies to n-ary macro definitions.
20999 # See the Autoconf documentation for `clear'.
21000 cat >confdef2sed.sed <<\_ACEOF
21001 s/[\\&,]/\\&/g
21002 s,[\\$`],\\&,g
21003 t clear
21004 : clear
21005 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
21006 t end
21007 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
21008 : end
21009 _ACEOF
21010 # If some macros were called several times there might be several times
21011 # the same #defines, which is useless.  Nevertheless, we may not want to
21012 # sort them, since we want the *last* AC-DEFINE to be honored.
21013 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
21014 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
21015 rm -f confdef2sed.sed
21016
21017 # This sed command replaces #undef with comments.  This is necessary, for
21018 # example, in the case of _POSIX_SOURCE, which is predefined and required
21019 # on some systems where configure will not decide to define it.
21020 cat >>conftest.undefs <<\_ACEOF
21021 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
21022 _ACEOF
21023
21024 # Break up conftest.defines because some shells have a limit on the size
21025 # of here documents, and old seds have small limits too (100 cmds).
21026 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
21027 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
21028 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
21029 echo '  :' >>$CONFIG_STATUS
21030 rm -f conftest.tail
21031 while grep . conftest.defines >/dev/null
21032 do
21033   # Write a limited-size here document to $tmp/defines.sed.
21034   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
21035   # Speed up: don't consider the non `#define' lines.
21036   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
21037   # Work around the forget-to-reset-the-flag bug.
21038   echo 't clr' >>$CONFIG_STATUS
21039   echo ': clr' >>$CONFIG_STATUS
21040   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
21041   echo 'CEOF
21042   sed -f $tmp/defines.sed $tmp/in >$tmp/out
21043   rm -f $tmp/in
21044   mv $tmp/out $tmp/in
21045 ' >>$CONFIG_STATUS
21046   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
21047   rm -f conftest.defines
21048   mv conftest.tail conftest.defines
21049 done
21050 rm -f conftest.defines
21051 echo '  fi # grep' >>$CONFIG_STATUS
21052 echo >>$CONFIG_STATUS
21053
21054 # Break up conftest.undefs because some shells have a limit on the size
21055 # of here documents, and old seds have small limits too (100 cmds).
21056 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
21057 rm -f conftest.tail
21058 while grep . conftest.undefs >/dev/null
21059 do
21060   # Write a limited-size here document to $tmp/undefs.sed.
21061   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
21062   # Speed up: don't consider the non `#undef'
21063   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
21064   # Work around the forget-to-reset-the-flag bug.
21065   echo 't clr' >>$CONFIG_STATUS
21066   echo ': clr' >>$CONFIG_STATUS
21067   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
21068   echo 'CEOF
21069   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
21070   rm -f $tmp/in
21071   mv $tmp/out $tmp/in
21072 ' >>$CONFIG_STATUS
21073   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
21074   rm -f conftest.undefs
21075   mv conftest.tail conftest.undefs
21076 done
21077 rm -f conftest.undefs
21078
21079 cat >>$CONFIG_STATUS <<\_ACEOF
21080   # Let's still pretend it is `configure' which instantiates (i.e., don't
21081   # use $as_me), people would be surprised to read:
21082   #    /* config.h.  Generated by config.status.  */
21083   if test x"$ac_file" = x-; then
21084     echo "/* Generated by configure.  */" >$tmp/config.h
21085   else
21086     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
21087   fi
21088   cat $tmp/in >>$tmp/config.h
21089   rm -f $tmp/in
21090   if test x"$ac_file" != x-; then
21091     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
21092       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21093 echo "$as_me: $ac_file is unchanged" >&6;}
21094     else
21095       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21096 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21097          X"$ac_file" : 'X\(//\)[^/]' \| \
21098          X"$ac_file" : 'X\(//\)$' \| \
21099          X"$ac_file" : 'X\(/\)' \| \
21100          .     : '\(.\)' 2>/dev/null ||
21101 echo X"$ac_file" |
21102     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21103           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21104           /^X\(\/\/\)$/{ s//\1/; q; }
21105           /^X\(\/\).*/{ s//\1/; q; }
21106           s/.*/./; q'`
21107       { if $as_mkdir_p; then
21108     mkdir -p "$ac_dir"
21109   else
21110     as_dir="$ac_dir"
21111     as_dirs=
21112     while test ! -d "$as_dir"; do
21113       as_dirs="$as_dir $as_dirs"
21114       as_dir=`(dirname "$as_dir") 2>/dev/null ||
21115 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21116          X"$as_dir" : 'X\(//\)[^/]' \| \
21117          X"$as_dir" : 'X\(//\)$' \| \
21118          X"$as_dir" : 'X\(/\)' \| \
21119          .     : '\(.\)' 2>/dev/null ||
21120 echo X"$as_dir" |
21121     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21122           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21123           /^X\(\/\/\)$/{ s//\1/; q; }
21124           /^X\(\/\).*/{ s//\1/; q; }
21125           s/.*/./; q'`
21126     done
21127     test ! -n "$as_dirs" || mkdir $as_dirs
21128   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21129 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21130    { (exit 1); exit 1; }; }; }
21131
21132       rm -f $ac_file
21133       mv $tmp/config.h $ac_file
21134     fi
21135   else
21136     cat $tmp/config.h
21137     rm -f $tmp/config.h
21138   fi
21139 done
21140 _ACEOF
21141 cat >>$CONFIG_STATUS <<\_ACEOF
21142
21143 #
21144 # CONFIG_COMMANDS section.
21145 #
21146 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21147   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21148   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21149   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
21150 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21151          X"$ac_dest" : 'X\(//\)[^/]' \| \
21152          X"$ac_dest" : 'X\(//\)$' \| \
21153          X"$ac_dest" : 'X\(/\)' \| \
21154          .     : '\(.\)' 2>/dev/null ||
21155 echo X"$ac_dest" |
21156     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21157           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21158           /^X\(\/\/\)$/{ s//\1/; q; }
21159           /^X\(\/\).*/{ s//\1/; q; }
21160           s/.*/./; q'`
21161   { if $as_mkdir_p; then
21162     mkdir -p "$ac_dir"
21163   else
21164     as_dir="$ac_dir"
21165     as_dirs=
21166     while test ! -d "$as_dir"; do
21167       as_dirs="$as_dir $as_dirs"
21168       as_dir=`(dirname "$as_dir") 2>/dev/null ||
21169 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21170          X"$as_dir" : 'X\(//\)[^/]' \| \
21171          X"$as_dir" : 'X\(//\)$' \| \
21172          X"$as_dir" : 'X\(/\)' \| \
21173          .     : '\(.\)' 2>/dev/null ||
21174 echo X"$as_dir" |
21175     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21176           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21177           /^X\(\/\/\)$/{ s//\1/; q; }
21178           /^X\(\/\).*/{ s//\1/; q; }
21179           s/.*/./; q'`
21180     done
21181     test ! -n "$as_dirs" || mkdir $as_dirs
21182   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21183 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21184    { (exit 1); exit 1; }; }; }
21185
21186   ac_builddir=.
21187
21188 if test "$ac_dir" != .; then
21189   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21190   # A "../" for each directory in $ac_dir_suffix.
21191   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
21192 else
21193   ac_dir_suffix= ac_top_builddir=
21194 fi
21195
21196 case $srcdir in
21197   .)  # No --srcdir option.  We are building in place.
21198     ac_srcdir=.
21199     if test -z "$ac_top_builddir"; then
21200        ac_top_srcdir=.
21201     else
21202        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
21203     fi ;;
21204   [\\/]* | ?:[\\/]* )  # Absolute path.
21205     ac_srcdir=$srcdir$ac_dir_suffix;
21206     ac_top_srcdir=$srcdir ;;
21207   *) # Relative path.
21208     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
21209     ac_top_srcdir=$ac_top_builddir$srcdir ;;
21210 esac
21211
21212 # Do not use `cd foo && pwd` to compute absolute paths, because
21213 # the directories may not exist.
21214 case `pwd` in
21215 .) ac_abs_builddir="$ac_dir";;
21216 *)
21217   case "$ac_dir" in
21218   .) ac_abs_builddir=`pwd`;;
21219   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
21220   *) ac_abs_builddir=`pwd`/"$ac_dir";;
21221   esac;;
21222 esac
21223 case $ac_abs_builddir in
21224 .) ac_abs_top_builddir=${ac_top_builddir}.;;
21225 *)
21226   case ${ac_top_builddir}. in
21227   .) ac_abs_top_builddir=$ac_abs_builddir;;
21228   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
21229   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
21230   esac;;
21231 esac
21232 case $ac_abs_builddir in
21233 .) ac_abs_srcdir=$ac_srcdir;;
21234 *)
21235   case $ac_srcdir in
21236   .) ac_abs_srcdir=$ac_abs_builddir;;
21237   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
21238   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
21239   esac;;
21240 esac
21241 case $ac_abs_builddir in
21242 .) ac_abs_top_srcdir=$ac_top_srcdir;;
21243 *)
21244   case $ac_top_srcdir in
21245   .) ac_abs_top_srcdir=$ac_abs_builddir;;
21246   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
21247   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
21248   esac;;
21249 esac
21250
21251
21252   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
21253 echo "$as_me: executing $ac_dest commands" >&6;}
21254   case $ac_dest in
21255     default-1 )
21256
21257 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
21258 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
21259   rm -f intltool-extract.out
21260 else
21261   mv -f intltool-extract.out intltool-extract
21262 fi
21263 chmod ugo+x intltool-extract
21264 chmod u+w intltool-extract
21265
21266 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
21267 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
21268   rm -f intltool-merge.out
21269 else
21270   mv -f intltool-merge.out intltool-merge
21271 fi
21272 chmod ugo+x intltool-merge
21273 chmod u+w intltool-merge
21274
21275 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
21276 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
21277   rm -f intltool-update.out
21278 else
21279   mv -f intltool-update.out intltool-update
21280 fi
21281 chmod ugo+x intltool-update
21282 chmod u+w intltool-update
21283
21284  ;;
21285     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
21286         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
21287       esac ;;
21288   esac
21289 done
21290 _ACEOF
21291
21292 cat >>$CONFIG_STATUS <<\_ACEOF
21293
21294 { (exit 0); exit 0; }
21295 _ACEOF
21296 chmod +x $CONFIG_STATUS
21297 ac_clean_files=$ac_clean_files_save
21298
21299
21300 # configure is writing to config.log, and then calls config.status.
21301 # config.status does its own redirection, appending to config.log.
21302 # Unfortunately, on DOS this fails, as config.log is still kept open
21303 # by configure, so config.status won't be able to write to it; its
21304 # output is simply discarded.  So we exec the FD to /dev/null,
21305 # effectively closing config.log, so it can be properly (re)opened and
21306 # appended to by config.status.  When coming back to configure, we
21307 # need to make the FD available again.
21308 if test "$no_create" != yes; then
21309   ac_cs_success=:
21310   ac_config_status_args=
21311   test "$silent" = yes &&
21312     ac_config_status_args="$ac_config_status_args --quiet"
21313   exec 5>/dev/null
21314   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21315   exec 5>>config.log
21316   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21317   # would make configure fail if this is the last instruction.
21318   $ac_cs_success || { (exit 1); exit 1; }
21319 fi
21320
21321
21322 ###############################################################################
21323 #
21324 #       Print some warnings at the end.
21325 #
21326 ###############################################################################
21327
21328 warn_prefix_1="    Warning:"
21329 warn_prefix_2="       Note:"
21330 warn_prefix="$warn_prefix_1"
21331
21332 warning=no
21333 warnsep='    #################################################################'
21334
21335 warnpre() {
21336   if test "$warning" = no ; then
21337     echo '' ; echo "$warnsep" ; echo ''
21338     warning=yes
21339   fi
21340 }
21341
21342 warn() {
21343   warnpre
21344   if test "$warning" = long ; then echo '' ; fi
21345   warning=yes
21346   rest="$@"
21347   echo "$warn_prefix $rest"
21348 }
21349
21350 warnL() {
21351   was=$warning
21352   warnpre
21353   warning=yes
21354   if test "$was" != no ; then echo '' ; fi
21355   rest="$@"
21356   echo "$warn_prefix $rest"
21357 }
21358
21359 warn2() {
21360   rest="$@"
21361   echo "             $rest"
21362   warning=long
21363 }
21364
21365 note() {
21366   warn_prefix="$warn_prefix_2"
21367   warn $@
21368   warn_prefix="$warn_prefix_1"
21369 }
21370
21371 noteL() {
21372   warn_prefix="$warn_prefix_2"
21373   warnL $@
21374   warn_prefix="$warn_prefix_1"
21375 }
21376
21377
21378 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
21379   warn 'The SGI saver extension was requested, but was not found.'
21380 fi
21381
21382 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
21383   warn 'The MIT saver extension was requested, but was not found.'
21384 fi
21385
21386 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
21387   warn 'The XIdle extension was requested, but was not found.'
21388 fi
21389
21390 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
21391   warn 'The XSHM extension was requested, but was not found.'
21392 fi
21393
21394 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
21395   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
21396 fi
21397
21398 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
21399   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
21400 fi
21401
21402 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
21403   warn 'The DPMS extension was requested, but was not found.'
21404 fi
21405
21406 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
21407   warn 'The Xinerama extension was requested, but was not found.'
21408 fi
21409
21410 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
21411   warn 'The XF86VMODE extension was requested, but was not found.'
21412 fi
21413
21414 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
21415   warn 'The RANDR extension was requested, but was not found.'
21416 fi
21417
21418 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
21419   warn "Checking of /proc/interrupts was requested, but it's bogus."
21420 fi
21421
21422 if test "$pkg_config" = false ; then
21423   warnL 'The "pkg-config" program was not found.  Without that,'
21424   warn2 "detection of the various GTK libraries won't work."
21425 else
21426   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
21427   if test "x$pkgerr" != "x" ; then
21428     warnL 'The "pkg-config" program produces errors.  This often causes'
21429     warn2 "detection of the various GTK libraries to malfunction."
21430     warn2 "The errors are:"
21431     echo ''
21432     echo "$pkgerr" | sed 's/^/             > /g'
21433   fi
21434 fi
21435
21436 if test "$gtk_halfassed" != no ; then
21437   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
21438   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
21439   warn2 "Perhaps some of the development packages are not installed?"
21440   if test "$have_gtk" = yes ; then
21441     v="$ac_gtk_version_string"
21442     warn2 "GTK $v is also installed, so it will be used instead."
21443     warn2 "Please read the above output and the \`config.log' file"
21444     warn2 "for more details."
21445   fi
21446 fi
21447
21448 motif_warn2() {
21449   warn2 'Though the Motif front-end to xscreensaver is still'
21450   warn2 'maintained, it is no longer being updated with new'
21451   warn2 'features: all new development on the xscreensaver-demo'
21452   warn2 'program is happening in the GTK version, and not in the'
21453   warn2 'Motif version.  It is recommended that you build against'
21454   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
21455 }
21456
21457 if test "$have_motif" = no -a "$have_gtk" = no; then
21458
21459   if test "$with_motif" = yes; then
21460     warnL "Neither the GTK nor Motif libraries were found; the"
21461     warn2 "\`xscreensaver-demo' program requires one of these."
21462     echo ''
21463     motif_warn2
21464   else
21465     warnL "The GTK libraries do not seem to be available; the"
21466     warn2 "\`xscreensaver-demo' program requires them."
21467 #   echo ''
21468 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
21469 #   warn2 "\`--with-motif' option) but that is NOT recommended."
21470 #   motif_warn2
21471   fi
21472
21473 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
21474   warnL "Use of Motif was requested, but it wasn't found;"
21475   warn2 "Gtk will be used instead."
21476
21477 elif test "$jurassic_gtk" = yes ; then
21478
21479   pref_gtk=2.0
21480
21481   v="$ac_gtk_version_string"
21482   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
21483     warnL "Use of Gtk was requested, but its version number is unknown;"
21484   elif test "$with_gtk_req" = yes ; then
21485     warnL "Use of Gtk was requested, but it is version $v;"
21486   else
21487     warnL "Gtk was found on this system, but it is version $v;"
21488   fi
21489
21490   warn2 "Gtk $pref_gtk or newer is required."
21491
21492 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
21493   warnL "Use of Gtk was requested, but it wasn't found."
21494 fi
21495
21496
21497 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
21498   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
21499   warn2 "headers were not found.  That can't be good.  Please"
21500   warn2 "install the GDK-Pixbuf development kit and re-configure."
21501 fi
21502
21503 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
21504
21505   preferred_lesstif=0.92
21506
21507   if test "$lesstif_version" = unknown; then
21508     warnL "Unable to determine the LessTif version number!"
21509     warn2 "Make sure you are using version $preferred_lesstif or newer."
21510     warn2 "See <http://www.lesstif.org/>."
21511
21512   elif test \! $lesstif_version -gt 82; then
21513     warnL "LessTif version $lesstif_version_string is being used."
21514     warn2 "LessTif versions 0.82 and earlier are too buggy to"
21515     warn2 "use with XScreenSaver; it is strongly recommended"
21516     warn2 "that you upgrade to at least version $preferred_lesstif!"
21517     warn2 "See <http://www.lesstif.org/>."
21518   fi
21519 fi
21520
21521
21522 if test "$have_motif" = yes -a "$have_gtk" = no ; then
21523   warn  'Motif is being used, and GTK is not.'
21524   echo  ''
21525   motif_warn2
21526 fi
21527
21528
21529 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
21530   warnL 'Use of XPM was requested, but it was not found.'
21531 fi
21532
21533 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
21534   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
21535 fi
21536
21537 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
21538    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
21539
21540   if test "$with_gdk_pixbuf_req" = yes ; then
21541     true
21542   elif test "$with_gdk_pixbuf_req" = no ; then
21543     warnL 'The GDK-Pixbuf library is not being used.'
21544   else
21545     warnL 'The GDK-Pixbuf library was not found.'
21546   fi
21547
21548   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
21549     true
21550   elif test "$with_xpm_req" = no ; then
21551     warnL 'The XPM library is not being used.'
21552   else
21553     warnL 'The XPM library was not found.'
21554   fi
21555
21556   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
21557     warn2 'The XPM library is being used instead.'
21558   fi
21559
21560   if test "$gdk_pixbuf_halfassed" = yes ; then
21561     echo ''
21562     warn2 'More specifically, we found the headers, but not the'
21563     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
21564     warn2 "system, or something else went wrong.  The \`config.log'"
21565     warn2 'file might contain some clues.'
21566   fi
21567
21568   echo ''
21569   warn2 'Some of the demos will not use images as much as they could.'
21570   warn2 'You should consider installing GDK-Pixbuf and re-running'
21571   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
21572   warn2 'provides support for more image formats.)'
21573 fi
21574
21575
21576 if test "$have_jpeg" = no ; then
21577   if test "$with_jpeg_req" = yes ; then
21578     warnL 'Use of libjpeg was requested, but it was not found.'
21579   elif test "$with_jpeg_req" = no ; then
21580     noteL 'The JPEG library is not being used.'
21581   else
21582     noteL 'The JPEG library was not found.'
21583   fi
21584
21585   if test "$jpeg_halfassed" = yes ; then
21586     echo ''
21587     warn2 'More specifically, we found the headers, but not the'
21588     warn2 'library; so either JPEG is half-installed on this'
21589     warn2 "system, or something else went wrong.  The \`config.log'"
21590     warn2 'file might contain some clues.'
21591     echo ''
21592   fi
21593
21594   if test "$have_gdk_pixbuf" = no ; then
21595     warn2 "This means that it won't be possible for the image-manipulating"
21596     warn2 "display modes to load files from disk; and it also means that"
21597     warn2 "the \`webcollage' program will be much slower."
21598   else
21599     warn2 "This means the \`webcollage' program will be much slower."
21600   fi
21601 fi
21602
21603
21604 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
21605   preferred_mesagl=3.4
21606   mgv="$ac_mesagl_version_string"
21607   pgl="$preferred_mesagl"
21608
21609   if test "$ac_mesagl_version" = unknown; then
21610     warnL "Unable to determine the MesaGL version number!"
21611     warn2 "Make sure you are using version $preferred_mesagl or newer."
21612
21613   elif test \! "$ac_mesagl_version" -gt 2006; then
21614     warnL "MesaGL version number is $mgv --"
21615     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
21616     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
21617
21618   elif test \! "$ac_mesagl_version" -gt 3003; then
21619     warnL "MesaGL version number is $mgv --"
21620     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
21621     warn2 "that you upgrade to $pgl or newer."
21622   fi
21623 fi
21624
21625 if test "$have_gl" = no ; then
21626   if test "$with_gl_req" = yes ; then
21627     warnL 'Use of GL was requested, but it was not found.'
21628   elif test "$with_gl_req" = no ; then
21629     noteL 'The OpenGL 3D library is not being used.'
21630   else
21631     noteL 'The OpenGL 3D library was not found.'
21632   fi
21633
21634   if test "$gl_halfassed" = yes ; then
21635     echo ''
21636     warn2 'More specifically, we found the headers, but not the'
21637     warn2 'libraries; so either GL is half-installed on this'
21638     warn2 "system, or something else went wrong.  The \`config.log'"
21639     warn2 'file might contain some clues.'
21640   fi
21641
21642   echo ''
21643   warn2 'Those demos which use 3D will not be built or installed.'
21644   warn2 'You might want to consider installing OpenGL and'
21645   warn2 "re-running configure.  If your vendor doesn't ship"
21646   warn2 'their own implementation of OpenGL, you can get a free'
21647   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
21648   warn2 'info, see <http://www.opengl.org/>.'
21649
21650 fi
21651
21652
21653 if test "$have_gl" = yes -a "$have_gle" = no ; then
21654
21655  # nobody cares about this; don't print the warning unless it was
21656  # requested and not found, or halfway-found.
21657  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
21658
21659   if test "$with_gle_req" = yes ; then
21660     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
21661     warn2 'it was not found (though the OpenGL library was found, and'
21662     warn2 'is being used.)'
21663   elif test "$with_gle_req" = no ; then
21664     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
21665     warn2 'library is not.'
21666   else
21667     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
21668     warn2 'was not.'
21669   fi
21670
21671   if test "$gle_halfassed" = yes ; then
21672     echo ''
21673     warn2 'More specifically, we found the headers, but not the'
21674     warn2 'libraries; so either GLE is half-installed on this'
21675     warn2 "system, or something else went wrong.  The \`config.log'"
21676     warn2 'file might contain some clues.'
21677   fi
21678
21679   echo ''
21680   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
21681   warn2 'will not be built or installed.  You might want to consider'
21682   warn2 'installing GLE and re-running configure.  You can find the'
21683   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
21684   warn2 'OpenGL info, see <http://www.opengl.org/>.'
21685
21686  fi
21687 fi
21688
21689
21690 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
21691   warn 'Use of XReadDisplay was requested, but it was not found.'
21692 fi
21693
21694 if test -n "$with_fortune_req"; then
21695   if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
21696     warnL "$with_fortune_req was requested as the Fortune program,"
21697     warn2 "but was not found.  The default will be used instead."
21698   fi
21699 fi
21700
21701 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
21702   warn 'Use of Kerberos was requested, but it was not found.'
21703 fi
21704
21705 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
21706   warn 'Use of PAM was requested, but it was not found.'
21707 fi
21708
21709 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
21710   warn 'Use of shadow passwords was requested, but they were not found.'
21711 fi
21712
21713
21714 # You are in a twisty maze of namespaces and syntaxes, all alike.
21715 # Fuck the skull of Unix.
21716 #
21717 eval bindir=${bindir}
21718 eval bindir=${bindir}
21719 eval bindir=${bindir}
21720 eval bindir=${bindir}
21721 eval bindir=${bindir}
21722 eval bindir=${bindir}
21723 eval HACKDIR=${HACKDIR}
21724 eval HACKDIR=${HACKDIR}
21725 eval HACKDIR=${HACKDIR}
21726 eval HACKDIR=${HACKDIR}
21727 eval HACKDIR=${HACKDIR}
21728 eval HACKDIR=${HACKDIR}
21729 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21730 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21731 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21732 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21733 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21734 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21735
21736 # canonicalize slashes.
21737 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
21738 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
21739 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
21740
21741
21742 # Sanity check the hackdir
21743 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
21744   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
21745     echo ""
21746     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
21747                    There will be an executable installed with that name, so
21748                    that can't be the name of a directory as well.  Please
21749                    re-configure with a different directory name." >&5
21750 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
21751                    There will be an executable installed with that name, so
21752                    that can't be the name of a directory as well.  Please
21753                    re-configure with a different directory name." >&2;}
21754    { (exit 1); exit 1; }; }
21755   fi
21756 done
21757
21758
21759 do_dir_warning=no
21760
21761 # Now let's see if there's a previous RPM version already installed.  Blargh!
21762
21763 # M4 sucks!!
21764
21765 rpmv=`(rpm -qv xscreensaver) 2>/dev/null | \
21766       sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
21767
21768
21769 if test \! -z "$rpmv" ; then
21770   rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
21771   rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
21772
21773   warning=no
21774   warnL "There is already an installed RPM of xscreensaver $rpmv"
21775   warn2 "on this system.  You might want to remove it (with"
21776   warn2 '"rpm -ve xscreensaver") before running "make install"'
21777   warn2 "from this directory."
21778   echo ""
21779   warn2 "Alternately, you could build this version of xscreensaver"
21780   warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
21781   warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
21782   warn2 "See the RPM documentation for more info."
21783   echo ""
21784
21785   if test "$rpmbdir" = "$rpmhdir" ; then
21786     warn2 "The RPM version was installed in $rpmbdir/."
21787     do_dir_warning=yes
21788   else
21789     warn2 "The RPM version was installed in $rpmbdir/,"
21790     warn2 "with demos in $rpmhdir/."
21791   fi
21792 fi
21793
21794
21795 if test "${bindir}" = "${HACKDIR}" ; then
21796   do_dir_warning=yes
21797 fi
21798
21799 if test "$do_dir_warning" = yes; then
21800   echo ""
21801   echo "$warnsep"
21802   echo ""
21803   echo '      When you run "make install", the "xscreensaver",'
21804   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
21805   echo "      will be installed in ${bindir}/."
21806   echo ""
21807   echo "      The various graphics demos (190+ different executables) will"
21808   echo "      be installed in ${HACKDIR}/."
21809   echo ""
21810   echo "      If you would prefer the demos to be installed elsewhere,"
21811   echo "      you should re-run configure with the --with-hackdir=DIR"
21812   echo "      option.  For more information, run \`./configure --help'."
21813   warning=yes
21814 fi
21815
21816 if test "$warning" != no; then
21817   echo '' ; echo "$warnsep" ; echo ''
21818 fi
21819
21820 if test "$do_dir_warning" = no; then
21821   if test "$warning" = no; then
21822     echo ''
21823   fi
21824   echo "User programs will be installed in ${bindir}/"
21825   echo "Screen savers will be installed in ${HACKDIR}/"
21826   echo "Configuration will be installed in ${HACK_CONF_DIR}/"
21827   echo ''
21828 fi