ea00c0dde750fe22f2cc24a4af97e5b579fdad96
[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 glib_config gtk_config gnome_config have_gnome_help xml_config gdk_pixbuf_config fortune_tmp INCLUDES PREFERRED_DEMO_PROGRAM ALL_DEMO_PROGRAMS SAVER_LIBS MOTIF_LIBS GTK_LIBS XML_LIBS JPEG_LIBS HACK_LIBS XPM_LIBS PTY_LIBS GL_LIBS GLE_LIBS XDPMS_LIBS PASSWD_LIBS INSTALL_SETUID SETUID_HACKS INSTALL_DIRS NEED_SETUID INSTALL_PAM OBJCC EXES_OSX SCRIPTS_OSX MEN_OSX PASSWD_SRCS PASSWD_OBJS XMU_SRCS XMU_OBJS XMU_LIBS SAVER_GL_SRCS SAVER_GL_OBJS SAVER_GL_LIBS LOCK_SRCS LOCK_OBJS JPEG_EXES GL_EXES GL_UTIL_EXES GL_MEN GL_KLUDGE GLE_EXES GLE_KLUDGE GNOMEHELP_Y GNOMEHELP_N HACKDIR GNOME_DATADIR GLADE_DATADIR PO_DATADIR GNOME_PANELDIR HACK_CONF_DIR GTK_EXTRA_OBJS APPDEFAULTS DEPEND DEPEND_FLAGS DEPEND_DEFINES LIBOBJS LTLIBOBJS'
313 ac_subst_files=''
314
315 # Initialize some variables set by options.
316 ac_init_help=
317 ac_init_version=false
318 # The variables have the same names as the options, with
319 # dashes changed to underlines.
320 cache_file=/dev/null
321 exec_prefix=NONE
322 no_create=
323 no_recursion=
324 prefix=NONE
325 program_prefix=NONE
326 program_suffix=NONE
327 program_transform_name=s,x,x,
328 silent=
329 site=
330 srcdir=
331 verbose=
332 x_includes=NONE
333 x_libraries=NONE
334
335 # Installation directory options.
336 # These are left unexpanded so users can "make install exec_prefix=/foo"
337 # and all the variables that are supposed to be based on exec_prefix
338 # by default will actually change.
339 # Use braces instead of parens because sh, perl, etc. also accept them.
340 bindir='${exec_prefix}/bin'
341 sbindir='${exec_prefix}/sbin'
342 libexecdir='${exec_prefix}/libexec'
343 datadir='${prefix}/share'
344 sysconfdir='${prefix}/etc'
345 sharedstatedir='${prefix}/com'
346 localstatedir='${prefix}/var'
347 libdir='${exec_prefix}/lib'
348 includedir='${prefix}/include'
349 oldincludedir='/usr/include'
350 infodir='${prefix}/info'
351 mandir='${prefix}/man'
352
353 ac_prev=
354 for ac_option
355 do
356   # If the previous option needs an argument, assign it.
357   if test -n "$ac_prev"; then
358     eval "$ac_prev=\$ac_option"
359     ac_prev=
360     continue
361   fi
362
363   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
364
365   # Accept the important Cygnus configure options, so we can diagnose typos.
366
367   case $ac_option in
368
369   -bindir | --bindir | --bindi | --bind | --bin | --bi)
370     ac_prev=bindir ;;
371   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
372     bindir=$ac_optarg ;;
373
374   -build | --build | --buil | --bui | --bu)
375     ac_prev=build_alias ;;
376   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
377     build_alias=$ac_optarg ;;
378
379   -cache-file | --cache-file | --cache-fil | --cache-fi \
380   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381     ac_prev=cache_file ;;
382   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
384     cache_file=$ac_optarg ;;
385
386   --config-cache | -C)
387     cache_file=config.cache ;;
388
389   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390     ac_prev=datadir ;;
391   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392   | --da=*)
393     datadir=$ac_optarg ;;
394
395   -disable-* | --disable-*)
396     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
397     # Reject names that are not valid shell variable names.
398     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400    { (exit 1); exit 1; }; }
401     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402     eval "enable_$ac_feature=no" ;;
403
404   -enable-* | --enable-*)
405     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
406     # Reject names that are not valid shell variable names.
407     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409    { (exit 1); exit 1; }; }
410     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411     case $ac_option in
412       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
413       *) ac_optarg=yes ;;
414     esac
415     eval "enable_$ac_feature='$ac_optarg'" ;;
416
417   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419   | --exec | --exe | --ex)
420     ac_prev=exec_prefix ;;
421   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423   | --exec=* | --exe=* | --ex=*)
424     exec_prefix=$ac_optarg ;;
425
426   -gas | --gas | --ga | --g)
427     # Obsolete; use --with-gas.
428     with_gas=yes ;;
429
430   -help | --help | --hel | --he | -h)
431     ac_init_help=long ;;
432   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433     ac_init_help=recursive ;;
434   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435     ac_init_help=short ;;
436
437   -host | --host | --hos | --ho)
438     ac_prev=host_alias ;;
439   -host=* | --host=* | --hos=* | --ho=*)
440     host_alias=$ac_optarg ;;
441
442   -includedir | --includedir | --includedi | --included | --include \
443   | --includ | --inclu | --incl | --inc)
444     ac_prev=includedir ;;
445   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446   | --includ=* | --inclu=* | --incl=* | --inc=*)
447     includedir=$ac_optarg ;;
448
449   -infodir | --infodir | --infodi | --infod | --info | --inf)
450     ac_prev=infodir ;;
451   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
452     infodir=$ac_optarg ;;
453
454   -libdir | --libdir | --libdi | --libd)
455     ac_prev=libdir ;;
456   -libdir=* | --libdir=* | --libdi=* | --libd=*)
457     libdir=$ac_optarg ;;
458
459   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460   | --libexe | --libex | --libe)
461     ac_prev=libexecdir ;;
462   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463   | --libexe=* | --libex=* | --libe=*)
464     libexecdir=$ac_optarg ;;
465
466   -localstatedir | --localstatedir | --localstatedi | --localstated \
467   | --localstate | --localstat | --localsta | --localst \
468   | --locals | --local | --loca | --loc | --lo)
469     ac_prev=localstatedir ;;
470   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
473     localstatedir=$ac_optarg ;;
474
475   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476     ac_prev=mandir ;;
477   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
478     mandir=$ac_optarg ;;
479
480   -nfp | --nfp | --nf)
481     # Obsolete; use --without-fp.
482     with_fp=no ;;
483
484   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
485   | --no-cr | --no-c | -n)
486     no_create=yes ;;
487
488   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490     no_recursion=yes ;;
491
492   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494   | --oldin | --oldi | --old | --ol | --o)
495     ac_prev=oldincludedir ;;
496   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
499     oldincludedir=$ac_optarg ;;
500
501   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502     ac_prev=prefix ;;
503   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
504     prefix=$ac_optarg ;;
505
506   -program-prefix | --program-prefix | --program-prefi | --program-pref \
507   | --program-pre | --program-pr | --program-p)
508     ac_prev=program_prefix ;;
509   -program-prefix=* | --program-prefix=* | --program-prefi=* \
510   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
511     program_prefix=$ac_optarg ;;
512
513   -program-suffix | --program-suffix | --program-suffi | --program-suff \
514   | --program-suf | --program-su | --program-s)
515     ac_prev=program_suffix ;;
516   -program-suffix=* | --program-suffix=* | --program-suffi=* \
517   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
518     program_suffix=$ac_optarg ;;
519
520   -program-transform-name | --program-transform-name \
521   | --program-transform-nam | --program-transform-na \
522   | --program-transform-n | --program-transform- \
523   | --program-transform | --program-transfor \
524   | --program-transfo | --program-transf \
525   | --program-trans | --program-tran \
526   | --progr-tra | --program-tr | --program-t)
527     ac_prev=program_transform_name ;;
528   -program-transform-name=* | --program-transform-name=* \
529   | --program-transform-nam=* | --program-transform-na=* \
530   | --program-transform-n=* | --program-transform-=* \
531   | --program-transform=* | --program-transfor=* \
532   | --program-transfo=* | --program-transf=* \
533   | --program-trans=* | --program-tran=* \
534   | --progr-tra=* | --program-tr=* | --program-t=*)
535     program_transform_name=$ac_optarg ;;
536
537   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538   | -silent | --silent | --silen | --sile | --sil)
539     silent=yes ;;
540
541   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542     ac_prev=sbindir ;;
543   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544   | --sbi=* | --sb=*)
545     sbindir=$ac_optarg ;;
546
547   -sharedstatedir | --sharedstatedir | --sharedstatedi \
548   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549   | --sharedst | --shareds | --shared | --share | --shar \
550   | --sha | --sh)
551     ac_prev=sharedstatedir ;;
552   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555   | --sha=* | --sh=*)
556     sharedstatedir=$ac_optarg ;;
557
558   -site | --site | --sit)
559     ac_prev=site ;;
560   -site=* | --site=* | --sit=*)
561     site=$ac_optarg ;;
562
563   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564     ac_prev=srcdir ;;
565   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
566     srcdir=$ac_optarg ;;
567
568   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569   | --syscon | --sysco | --sysc | --sys | --sy)
570     ac_prev=sysconfdir ;;
571   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
573     sysconfdir=$ac_optarg ;;
574
575   -target | --target | --targe | --targ | --tar | --ta | --t)
576     ac_prev=target_alias ;;
577   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
578     target_alias=$ac_optarg ;;
579
580   -v | -verbose | --verbose | --verbos | --verbo | --verb)
581     verbose=yes ;;
582
583   -version | --version | --versio | --versi | --vers | -V)
584     ac_init_version=: ;;
585
586   -with-* | --with-*)
587     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
588     # Reject names that are not valid shell variable names.
589     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590       { echo "$as_me: error: invalid package name: $ac_package" >&2
591    { (exit 1); exit 1; }; }
592     ac_package=`echo $ac_package| sed 's/-/_/g'`
593     case $ac_option in
594       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
595       *) ac_optarg=yes ;;
596     esac
597     eval "with_$ac_package='$ac_optarg'" ;;
598
599   -without-* | --without-*)
600     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
601     # Reject names that are not valid shell variable names.
602     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603       { echo "$as_me: error: invalid package name: $ac_package" >&2
604    { (exit 1); exit 1; }; }
605     ac_package=`echo $ac_package | sed 's/-/_/g'`
606     eval "with_$ac_package=no" ;;
607
608   --x)
609     # Obsolete; use --with-x.
610     with_x=yes ;;
611
612   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613   | --x-incl | --x-inc | --x-in | --x-i)
614     ac_prev=x_includes ;;
615   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
617     x_includes=$ac_optarg ;;
618
619   -x-libraries | --x-libraries | --x-librarie | --x-librari \
620   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621     ac_prev=x_libraries ;;
622   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
624     x_libraries=$ac_optarg ;;
625
626   -*) { echo "$as_me: error: unrecognized option: $ac_option
627 Try \`$0 --help' for more information." >&2
628    { (exit 1); exit 1; }; }
629     ;;
630
631   *=*)
632     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633     # Reject names that are not valid shell variable names.
634     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636    { (exit 1); exit 1; }; }
637     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638     eval "$ac_envvar='$ac_optarg'"
639     export $ac_envvar ;;
640
641   *)
642     # FIXME: should be removed in autoconf 3.0.
643     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
647     ;;
648
649   esac
650 done
651
652 if test -n "$ac_prev"; then
653   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654   { echo "$as_me: error: missing argument to $ac_option" >&2
655    { (exit 1); exit 1; }; }
656 fi
657
658 # Be sure to have absolute paths.
659 for ac_var in exec_prefix prefix
660 do
661   eval ac_val=$`echo $ac_var`
662   case $ac_val in
663     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665    { (exit 1); exit 1; }; };;
666   esac
667 done
668
669 # Be sure to have absolute paths.
670 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671               localstatedir libdir includedir oldincludedir infodir mandir
672 do
673   eval ac_val=$`echo $ac_var`
674   case $ac_val in
675     [\\/$]* | ?:[\\/]* ) ;;
676     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677    { (exit 1); exit 1; }; };;
678   esac
679 done
680
681 # There might be people who depend on the old broken behavior: `$host'
682 # used to hold the argument of --host etc.
683 # FIXME: To remove some day.
684 build=$build_alias
685 host=$host_alias
686 target=$target_alias
687
688 # FIXME: To remove some day.
689 if test "x$host_alias" != x; then
690   if test "x$build_alias" = x; then
691     cross_compiling=maybe
692     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693     If a cross compiler is detected then cross compile mode will be used." >&2
694   elif test "x$build_alias" != "x$host_alias"; then
695     cross_compiling=yes
696   fi
697 fi
698
699 ac_tool_prefix=
700 test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702 test "$silent" = yes && exec 6>/dev/null
703
704
705 # Find the source files, if location was not specified.
706 if test -z "$srcdir"; then
707   ac_srcdir_defaulted=yes
708   # Try the directory containing this script, then its parent.
709   ac_confdir=`(dirname "$0") 2>/dev/null ||
710 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
711          X"$0" : 'X\(//\)[^/]' \| \
712          X"$0" : 'X\(//\)$' \| \
713          X"$0" : 'X\(/\)' \| \
714          .     : '\(.\)' 2>/dev/null ||
715 echo X"$0" |
716     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718           /^X\(\/\/\)$/{ s//\1/; q; }
719           /^X\(\/\).*/{ s//\1/; q; }
720           s/.*/./; q'`
721   srcdir=$ac_confdir
722   if test ! -r $srcdir/$ac_unique_file; then
723     srcdir=..
724   fi
725 else
726   ac_srcdir_defaulted=no
727 fi
728 if test ! -r $srcdir/$ac_unique_file; then
729   if test "$ac_srcdir_defaulted" = yes; then
730     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731    { (exit 1); exit 1; }; }
732   else
733     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734    { (exit 1); exit 1; }; }
735   fi
736 fi
737 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739    { (exit 1); exit 1; }; }
740 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741 ac_env_build_alias_set=${build_alias+set}
742 ac_env_build_alias_value=$build_alias
743 ac_cv_env_build_alias_set=${build_alias+set}
744 ac_cv_env_build_alias_value=$build_alias
745 ac_env_host_alias_set=${host_alias+set}
746 ac_env_host_alias_value=$host_alias
747 ac_cv_env_host_alias_set=${host_alias+set}
748 ac_cv_env_host_alias_value=$host_alias
749 ac_env_target_alias_set=${target_alias+set}
750 ac_env_target_alias_value=$target_alias
751 ac_cv_env_target_alias_set=${target_alias+set}
752 ac_cv_env_target_alias_value=$target_alias
753 ac_env_CC_set=${CC+set}
754 ac_env_CC_value=$CC
755 ac_cv_env_CC_set=${CC+set}
756 ac_cv_env_CC_value=$CC
757 ac_env_CFLAGS_set=${CFLAGS+set}
758 ac_env_CFLAGS_value=$CFLAGS
759 ac_cv_env_CFLAGS_set=${CFLAGS+set}
760 ac_cv_env_CFLAGS_value=$CFLAGS
761 ac_env_LDFLAGS_set=${LDFLAGS+set}
762 ac_env_LDFLAGS_value=$LDFLAGS
763 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764 ac_cv_env_LDFLAGS_value=$LDFLAGS
765 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766 ac_env_CPPFLAGS_value=$CPPFLAGS
767 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769 ac_env_CPP_set=${CPP+set}
770 ac_env_CPP_value=$CPP
771 ac_cv_env_CPP_set=${CPP+set}
772 ac_cv_env_CPP_value=$CPP
773
774 #
775 # Report the --help message.
776 #
777 if test "$ac_init_help" = "long"; then
778   # Omit some internal or obsolete options to make the list less imposing.
779   # This message is too long to be a string in the A/UX 3.1 sh.
780   cat <<_ACEOF
781 \`configure' configures this package to adapt to many kinds of systems.
782
783 Usage: $0 [OPTION]... [VAR=VALUE]...
784
785 To assign environment variables (e.g., CC, CFLAGS...), specify them as
786 VAR=VALUE.  See below for descriptions of some of the useful variables.
787
788 Defaults for the options are specified in brackets.
789
790
791 Configuration:
792
793   -h, --help              display this help and exit
794       --help=short        display options specific to this package
795       --help=recursive    display the short help of all the included packages
796   -V, --version           display version information and exit
797   -q, --quiet, --silent   do not print \`checking...' messages
798       --cache-file=FILE   cache test results in FILE [disabled]
799   -C, --config-cache      alias for \`--cache-file=config.cache'
800   -n, --no-create         do not create output files
801       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
802
803 _ACEOF
804
805   cat <<_ACEOF
806 Installation directories:
807   --prefix=PREFIX         install architecture-independent files in PREFIX
808                           [$ac_default_prefix]
809   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
810                           [PREFIX]
811
812 By default, \`make install' will install all the files in
813 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
814 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
815 for instance \`--prefix=\$HOME'.
816
817 For better control, use the options below.
818
819 Fine tuning of the installation directories:
820   --bindir=DIR           user executables [EPREFIX/bin]
821   --libdir=DIR           object code libraries [EPREFIX/lib]
822   --includedir=DIR       C header files [PREFIX/include]
823   --x-includes=DIR        X include files are in DIR
824   --x-libraries=DIR       X library files are in DIR
825   --mandir=DIR           man documentation [PREFIX/man]
826 _ACEOF
827
828   cat <<\_ACEOF
829
830 X features:
831   --x-includes=DIR    X include files are in DIR
832   --x-libraries=DIR   X library files are in DIR
833
834 System types:
835   --build=BUILD     configure for building on BUILD [guessed]
836   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
837 _ACEOF
838 fi
839
840 if test -n "$ac_init_help"; then
841
842   cat <<\_ACEOF
843
844 Optional Features:
845   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
846   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
847
848
849 Screen locking options:
850
851   --enable-locking        Compile in support for locking the display.
852   --disable-locking       Do not allow locking at all.
853
854 Optional Packages:
855   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
856   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
857 Installation options:
858
859   --with-hackdir=DIR      Where to install the hundreds of demo executables.
860                           Default: `PREFIX/lib/xscreensaver/'
861   --with-configdir=DIR    Where to install the data files that describe each
862                           of the display modes to the GUI.
863                           Default: `GNOMEPREFIX/control-center/screensavers/'
864                           or `PREFIX/lib/xscreensaver/config/', depending on
865                           whether GNOME 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-motif            Use the Motif toolkit for the user interface
900                           (not recommended.)
901   --with-gtk              Use the Gtk toolkit for the user interface.
902   --with-gnome            Include support for the Gnome 1.x Control Center.
903                           (This option is not needed with GTK 2.x / Gnome 2.x.)
904
905   --with-xml              The XML toolkit is needed for some parts of
906                           the Gtk interface.  Without it, the configuration
907                           interface will be much less featureful.
908
909 Graphics options:
910
911   --with-gl               Build those demos which depend on OpenGL.
912   --with-gle              Build those demos which depend on GLE
913                           (the OpenGL "extrusion" library.)
914   --with-xpm              Include support for XPM files in some demos.
915                           (Not needed if Pixbuf is used.)
916   --with-pixbuf           Include support for the GDK-Pixbuf library in some
917                           demos, which will make it possible for them to read
918                           GIF, JPEG, and PNG files as well.  (The path here is
919                           ignored if GTK 2.x is being used.)
920   --with-jpeg             Include support for the JPEG library.
921   --with-xshm-ext         Include support for the Shared Memory extension.
922   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
923   --with-readdisplay      Include support for the XReadDisplay extension.
924
925   --with-fortune=PROGRAM  Some demos are able to run an external program and
926                           display its text; this names the program to use by
927                           default (though it can be overridden with X
928                           resources.)  Default is "/usr/games/fortune".
929   --with-setuid-hacks     Allow some demos to be installed `setuid root'
930                           (which is needed in order to ping other hosts.)
931
932
933 Some influential environment variables:
934   CC          C compiler command
935   CFLAGS      C compiler flags
936   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
937               nonstandard directory <lib dir>
938   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
939               headers in a nonstandard directory <include dir>
940   CPP         C preprocessor
941
942 Use these variables to override the choices made by `configure' or to help
943 it to find libraries and programs with nonstandard names/locations.
944
945 _ACEOF
946 fi
947
948 if test "$ac_init_help" = "recursive"; then
949   # If there are subdirs, report their specific --help.
950   ac_popdir=`pwd`
951   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
952     test -d $ac_dir || continue
953     ac_builddir=.
954
955 if test "$ac_dir" != .; then
956   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
957   # A "../" for each directory in $ac_dir_suffix.
958   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
959 else
960   ac_dir_suffix= ac_top_builddir=
961 fi
962
963 case $srcdir in
964   .)  # No --srcdir option.  We are building in place.
965     ac_srcdir=.
966     if test -z "$ac_top_builddir"; then
967        ac_top_srcdir=.
968     else
969        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
970     fi ;;
971   [\\/]* | ?:[\\/]* )  # Absolute path.
972     ac_srcdir=$srcdir$ac_dir_suffix;
973     ac_top_srcdir=$srcdir ;;
974   *) # Relative path.
975     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
976     ac_top_srcdir=$ac_top_builddir$srcdir ;;
977 esac
978
979 # Do not use `cd foo && pwd` to compute absolute paths, because
980 # the directories may not exist.
981 case `pwd` in
982 .) ac_abs_builddir="$ac_dir";;
983 *)
984   case "$ac_dir" in
985   .) ac_abs_builddir=`pwd`;;
986   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
987   *) ac_abs_builddir=`pwd`/"$ac_dir";;
988   esac;;
989 esac
990 case $ac_abs_builddir in
991 .) ac_abs_top_builddir=${ac_top_builddir}.;;
992 *)
993   case ${ac_top_builddir}. in
994   .) ac_abs_top_builddir=$ac_abs_builddir;;
995   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
996   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
997   esac;;
998 esac
999 case $ac_abs_builddir in
1000 .) ac_abs_srcdir=$ac_srcdir;;
1001 *)
1002   case $ac_srcdir in
1003   .) ac_abs_srcdir=$ac_abs_builddir;;
1004   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1005   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1006   esac;;
1007 esac
1008 case $ac_abs_builddir in
1009 .) ac_abs_top_srcdir=$ac_top_srcdir;;
1010 *)
1011   case $ac_top_srcdir in
1012   .) ac_abs_top_srcdir=$ac_abs_builddir;;
1013   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1014   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1015   esac;;
1016 esac
1017
1018     cd $ac_dir
1019     # Check for guested configure; otherwise get Cygnus style configure.
1020     if test -f $ac_srcdir/configure.gnu; then
1021       echo
1022       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1023     elif test -f $ac_srcdir/configure; then
1024       echo
1025       $SHELL $ac_srcdir/configure  --help=recursive
1026     elif test -f $ac_srcdir/configure.ac ||
1027            test -f $ac_srcdir/configure.in; then
1028       echo
1029       $ac_configure --help
1030     else
1031       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1032     fi
1033     cd $ac_popdir
1034   done
1035 fi
1036
1037 test -n "$ac_init_help" && exit 0
1038 if $ac_init_version; then
1039   cat <<\_ACEOF
1040
1041 Copyright (C) 2003 Free Software Foundation, Inc.
1042 This configure script is free software; the Free Software Foundation
1043 gives unlimited permission to copy, distribute and modify it.
1044 _ACEOF
1045   exit 0
1046 fi
1047 exec 5>config.log
1048 cat >&5 <<_ACEOF
1049 This file contains any messages produced by compilers while
1050 running configure, to aid debugging if configure makes a mistake.
1051
1052 It was created by $as_me, which was
1053 generated by GNU Autoconf 2.59.  Invocation command line was
1054
1055   $ $0 $@
1056
1057 _ACEOF
1058 {
1059 cat <<_ASUNAME
1060 ## --------- ##
1061 ## Platform. ##
1062 ## --------- ##
1063
1064 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1065 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1066 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1067 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1068 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1069
1070 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1071 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1072
1073 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1074 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1075 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1076 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1077 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1078 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1079 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1080
1081 _ASUNAME
1082
1083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1084 for as_dir in $PATH
1085 do
1086   IFS=$as_save_IFS
1087   test -z "$as_dir" && as_dir=.
1088   echo "PATH: $as_dir"
1089 done
1090
1091 } >&5
1092
1093 cat >&5 <<_ACEOF
1094
1095
1096 ## ----------- ##
1097 ## Core tests. ##
1098 ## ----------- ##
1099
1100 _ACEOF
1101
1102
1103 # Keep a trace of the command line.
1104 # Strip out --no-create and --no-recursion so they do not pile up.
1105 # Strip out --silent because we don't want to record it for future runs.
1106 # Also quote any args containing shell meta-characters.
1107 # Make two passes to allow for proper duplicate-argument suppression.
1108 ac_configure_args=
1109 ac_configure_args0=
1110 ac_configure_args1=
1111 ac_sep=
1112 ac_must_keep_next=false
1113 for ac_pass in 1 2
1114 do
1115   for ac_arg
1116   do
1117     case $ac_arg in
1118     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1119     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1120     | -silent | --silent | --silen | --sile | --sil)
1121       continue ;;
1122     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1123       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1124     esac
1125     case $ac_pass in
1126     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1127     2)
1128       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1129       if test $ac_must_keep_next = true; then
1130         ac_must_keep_next=false # Got value, back to normal.
1131       else
1132         case $ac_arg in
1133           *=* | --config-cache | -C | -disable-* | --disable-* \
1134           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1135           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1136           | -with-* | --with-* | -without-* | --without-* | --x)
1137             case "$ac_configure_args0 " in
1138               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1139             esac
1140             ;;
1141           -* ) ac_must_keep_next=true ;;
1142         esac
1143       fi
1144       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1145       # Get rid of the leading space.
1146       ac_sep=" "
1147       ;;
1148     esac
1149   done
1150 done
1151 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1152 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1153
1154 # When interrupted or exit'd, cleanup temporary files, and complete
1155 # config.log.  We remove comments because anyway the quotes in there
1156 # would cause problems or look ugly.
1157 # WARNING: Be sure not to use single quotes in there, as some shells,
1158 # such as our DU 5.0 friend, will then `close' the trap.
1159 trap 'exit_status=$?
1160   # Save into config.log some information that might help in debugging.
1161   {
1162     echo
1163
1164     cat <<\_ASBOX
1165 ## ---------------- ##
1166 ## Cache variables. ##
1167 ## ---------------- ##
1168 _ASBOX
1169     echo
1170     # The following way of writing the cache mishandles newlines in values,
1171 {
1172   (set) 2>&1 |
1173     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1174     *ac_space=\ *)
1175       sed -n \
1176         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1177           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1178       ;;
1179     *)
1180       sed -n \
1181         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1182       ;;
1183     esac;
1184 }
1185     echo
1186
1187     cat <<\_ASBOX
1188 ## ----------------- ##
1189 ## Output variables. ##
1190 ## ----------------- ##
1191 _ASBOX
1192     echo
1193     for ac_var in $ac_subst_vars
1194     do
1195       eval ac_val=$`echo $ac_var`
1196       echo "$ac_var='"'"'$ac_val'"'"'"
1197     done | sort
1198     echo
1199
1200     if test -n "$ac_subst_files"; then
1201       cat <<\_ASBOX
1202 ## ------------- ##
1203 ## Output files. ##
1204 ## ------------- ##
1205 _ASBOX
1206       echo
1207       for ac_var in $ac_subst_files
1208       do
1209         eval ac_val=$`echo $ac_var`
1210         echo "$ac_var='"'"'$ac_val'"'"'"
1211       done | sort
1212       echo
1213     fi
1214
1215     if test -s confdefs.h; then
1216       cat <<\_ASBOX
1217 ## ----------- ##
1218 ## confdefs.h. ##
1219 ## ----------- ##
1220 _ASBOX
1221       echo
1222       sed "/^$/d" confdefs.h | sort
1223       echo
1224     fi
1225     test "$ac_signal" != 0 &&
1226       echo "$as_me: caught signal $ac_signal"
1227     echo "$as_me: exit $exit_status"
1228   } >&5
1229   rm -f core *.core &&
1230   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1231     exit $exit_status
1232      ' 0
1233 for ac_signal in 1 2 13 15; do
1234   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1235 done
1236 ac_signal=0
1237
1238 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1239 rm -rf conftest* confdefs.h
1240 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1241 echo >confdefs.h
1242
1243 # Predefined preprocessor variables.
1244
1245 cat >>confdefs.h <<_ACEOF
1246 #define PACKAGE_NAME "$PACKAGE_NAME"
1247 _ACEOF
1248
1249
1250 cat >>confdefs.h <<_ACEOF
1251 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1252 _ACEOF
1253
1254
1255 cat >>confdefs.h <<_ACEOF
1256 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1257 _ACEOF
1258
1259
1260 cat >>confdefs.h <<_ACEOF
1261 #define PACKAGE_STRING "$PACKAGE_STRING"
1262 _ACEOF
1263
1264
1265 cat >>confdefs.h <<_ACEOF
1266 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1267 _ACEOF
1268
1269
1270 # Let the site file select an alternate cache file if it wants to.
1271 # Prefer explicitly selected file to automatically selected ones.
1272 if test -z "$CONFIG_SITE"; then
1273   if test "x$prefix" != xNONE; then
1274     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1275   else
1276     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1277   fi
1278 fi
1279 for ac_site_file in $CONFIG_SITE; do
1280   if test -r "$ac_site_file"; then
1281     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1282 echo "$as_me: loading site script $ac_site_file" >&6;}
1283     sed 's/^/| /' "$ac_site_file" >&5
1284     . "$ac_site_file"
1285   fi
1286 done
1287
1288 if test -r "$cache_file"; then
1289   # Some versions of bash will fail to source /dev/null (special
1290   # files actually), so we avoid doing that.
1291   if test -f "$cache_file"; then
1292     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1293 echo "$as_me: loading cache $cache_file" >&6;}
1294     case $cache_file in
1295       [\\/]* | ?:[\\/]* ) . $cache_file;;
1296       *)                      . ./$cache_file;;
1297     esac
1298   fi
1299 else
1300   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1301 echo "$as_me: creating cache $cache_file" >&6;}
1302   >$cache_file
1303 fi
1304
1305 # Check that the precious variables saved in the cache have kept the same
1306 # value.
1307 ac_cache_corrupted=false
1308 for ac_var in `(set) 2>&1 |
1309                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1310   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1311   eval ac_new_set=\$ac_env_${ac_var}_set
1312   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1313   eval ac_new_val="\$ac_env_${ac_var}_value"
1314   case $ac_old_set,$ac_new_set in
1315     set,)
1316       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1317 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1318       ac_cache_corrupted=: ;;
1319     ,set)
1320       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1321 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1322       ac_cache_corrupted=: ;;
1323     ,);;
1324     *)
1325       if test "x$ac_old_val" != "x$ac_new_val"; then
1326         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1327 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1328         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1329 echo "$as_me:   former value:  $ac_old_val" >&2;}
1330         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1331 echo "$as_me:   current value: $ac_new_val" >&2;}
1332         ac_cache_corrupted=:
1333       fi;;
1334   esac
1335   # Pass precious variables to config.status.
1336   if test "$ac_new_set" = set; then
1337     case $ac_new_val in
1338     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1339       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1340     *) ac_arg=$ac_var=$ac_new_val ;;
1341     esac
1342     case " $ac_configure_args " in
1343       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1344       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1345     esac
1346   fi
1347 done
1348 if $ac_cache_corrupted; then
1349   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1350 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1351   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1352 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1353    { (exit 1); exit 1; }; }
1354 fi
1355
1356 ac_ext=c
1357 ac_cpp='$CPP $CPPFLAGS'
1358 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1359 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380           ac_config_headers="$ac_config_headers config.h"
1381
1382
1383 echo "current directory: `pwd`"
1384 echo "command line was: $0 $@"
1385
1386
1387 # After checking to see that --srcdir is correct (which AC_INIT does)
1388 # check for some random other files that come later in the tar file,
1389 # to make sure everything is here.
1390 #
1391 for d in driver utils hacks hacks/glx ; do
1392   f=$srcdir/$d/Makefile.in
1393   if test \! -r $f ; then
1394     echo ""
1395     echo "ERROR: The package is incomplete: $f does not exist."
1396     echo "       This probably means that your download was truncated."
1397     echo ""
1398     exit 1
1399   fi
1400 done
1401
1402 ###############################################################################
1403 #
1404 #       Function to figure out how to run the compiler.
1405 #
1406 ###############################################################################
1407
1408
1409
1410
1411 ###############################################################################
1412 #
1413 #       Functions to figure out how to disable // comments in ANSI C code.
1414 #
1415 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
1416 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
1417 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
1418 #       so much for compatibility!)
1419 #
1420 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
1421 #       declarations preceed statements, without resorting to "-pedantic".
1422 #       This means that there is no way to get gcc3 to issue warnings that
1423 #       ensure that your code complies with the ANSI/ISO C89 standard, without
1424 #       also drowning in totally useless warnings.  Thank you master may I
1425 #       have another.
1426 #
1427 #       So, I give up, let's just use -pedantic.
1428 #
1429 ###############################################################################
1430
1431
1432
1433
1434
1435
1436 ###############################################################################
1437 #
1438 #       Function to figure out how to turn off Objective C on MacOS X.
1439 #       (We have to do this to work around an Apple-specific gcc bug.)
1440 #
1441 ###############################################################################
1442
1443
1444
1445
1446
1447
1448 ###############################################################################
1449 #
1450 #       Function to figure out how to create directory trees.
1451 #
1452 ###############################################################################
1453
1454
1455
1456
1457 ###############################################################################
1458 #
1459 #       Function to check whether gettimeofday() exists, and how to call it.
1460 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1461 #
1462 ###############################################################################
1463
1464
1465
1466
1467 ###############################################################################
1468 #
1469 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1470 #
1471 ###############################################################################
1472
1473 # M4 sucks!!  perl sucks too!!
1474
1475 perl_version_cmd='print $]'
1476
1477
1478
1479
1480
1481 ###############################################################################
1482 #
1483 #       Function to demand "bc".  Losers.
1484 #
1485 ###############################################################################
1486
1487
1488
1489 ###############################################################################
1490 #
1491 #       Functions to check how to do ICMP PING requests.
1492 #
1493 ###############################################################################
1494
1495
1496
1497
1498
1499
1500 ###############################################################################
1501 #
1502 #       Functions to check for various X11 crap.
1503 #
1504 ###############################################################################
1505
1506 # Try and find the app-defaults directory.
1507 # It sucks that autoconf doesn't do this already...
1508 #
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519 # Random special-cases for X on certain pathological OSes.
1520 # You know who you are.
1521 #
1522
1523
1524
1525
1526 ###############################################################################
1527 #
1528 #       Some utility functions to make checking for X things easier.
1529 #
1530 ###############################################################################
1531
1532 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1533 #
1534
1535
1536 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1537 #
1538
1539
1540 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1541 #
1542
1543
1544
1545 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1546 # Use this sparingly; it probably doesn't work very well on X programs.
1547 #
1548
1549
1550 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1551 # (But not the -L directories!)
1552 #
1553
1554
1555
1556
1557 # Usage: HANDLE_X_PATH_ARG([variable_name],
1558 #                          [--command-line-option],
1559 #                          [descriptive string])
1560 #
1561 # All of the --with options take three forms:
1562 #
1563 #   --with-foo (or --with-foo=yes)
1564 #   --without-foo (or --with-foo=no)
1565 #   --with-foo=/DIR
1566 #
1567 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1568 # a directory (string beginning with a slash) it checks to see whether
1569 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1570 # as appropriate.
1571 #
1572
1573
1574
1575
1576 ###############################################################################
1577 ###############################################################################
1578 #
1579 #       End of function definitions.  Now start actually executing stuff.
1580 #
1581 ###############################################################################
1582 ###############################################################################
1583
1584 # random compiler setup
1585 ac_aux_dir=
1586 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1587   if test -f $ac_dir/install-sh; then
1588     ac_aux_dir=$ac_dir
1589     ac_install_sh="$ac_aux_dir/install-sh -c"
1590     break
1591   elif test -f $ac_dir/install.sh; then
1592     ac_aux_dir=$ac_dir
1593     ac_install_sh="$ac_aux_dir/install.sh -c"
1594     break
1595   elif test -f $ac_dir/shtool; then
1596     ac_aux_dir=$ac_dir
1597     ac_install_sh="$ac_aux_dir/shtool install -c"
1598     break
1599   fi
1600 done
1601 if test -z "$ac_aux_dir"; then
1602   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1603 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1604    { (exit 1); exit 1; }; }
1605 fi
1606 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1607 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1608 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1609
1610 # Make sure we can run config.sub.
1611 $ac_config_sub sun4 >/dev/null 2>&1 ||
1612   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1613 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1614    { (exit 1); exit 1; }; }
1615
1616 echo "$as_me:$LINENO: checking build system type" >&5
1617 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1618 if test "${ac_cv_build+set}" = set; then
1619   echo $ECHO_N "(cached) $ECHO_C" >&6
1620 else
1621   ac_cv_build_alias=$build_alias
1622 test -z "$ac_cv_build_alias" &&
1623   ac_cv_build_alias=`$ac_config_guess`
1624 test -z "$ac_cv_build_alias" &&
1625   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1626 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1627    { (exit 1); exit 1; }; }
1628 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1629   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1630 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1631    { (exit 1); exit 1; }; }
1632
1633 fi
1634 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1635 echo "${ECHO_T}$ac_cv_build" >&6
1636 build=$ac_cv_build
1637 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1638 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1639 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1640
1641
1642 echo "$as_me:$LINENO: checking host system type" >&5
1643 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1644 if test "${ac_cv_host+set}" = set; then
1645   echo $ECHO_N "(cached) $ECHO_C" >&6
1646 else
1647   ac_cv_host_alias=$host_alias
1648 test -z "$ac_cv_host_alias" &&
1649   ac_cv_host_alias=$ac_cv_build_alias
1650 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1651   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1652 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1653    { (exit 1); exit 1; }; }
1654
1655 fi
1656 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1657 echo "${ECHO_T}$ac_cv_host" >&6
1658 host=$ac_cv_host
1659 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1660 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1661 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1662
1663
1664
1665 ac_ext=c
1666 ac_cpp='$CPP $CPPFLAGS'
1667 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1668 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1669 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1670 if test -n "$ac_tool_prefix"; then
1671   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1672 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1673 echo "$as_me:$LINENO: checking for $ac_word" >&5
1674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1675 if test "${ac_cv_prog_CC+set}" = set; then
1676   echo $ECHO_N "(cached) $ECHO_C" >&6
1677 else
1678   if test -n "$CC"; then
1679   ac_cv_prog_CC="$CC" # Let the user override the test.
1680 else
1681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1682 for as_dir in $PATH
1683 do
1684   IFS=$as_save_IFS
1685   test -z "$as_dir" && as_dir=.
1686   for ac_exec_ext in '' $ac_executable_extensions; do
1687   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1688     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1689     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1690     break 2
1691   fi
1692 done
1693 done
1694
1695 fi
1696 fi
1697 CC=$ac_cv_prog_CC
1698 if test -n "$CC"; then
1699   echo "$as_me:$LINENO: result: $CC" >&5
1700 echo "${ECHO_T}$CC" >&6
1701 else
1702   echo "$as_me:$LINENO: result: no" >&5
1703 echo "${ECHO_T}no" >&6
1704 fi
1705
1706 fi
1707 if test -z "$ac_cv_prog_CC"; then
1708   ac_ct_CC=$CC
1709   # Extract the first word of "gcc", so it can be a program name with args.
1710 set dummy gcc; ac_word=$2
1711 echo "$as_me:$LINENO: checking for $ac_word" >&5
1712 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1713 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1714   echo $ECHO_N "(cached) $ECHO_C" >&6
1715 else
1716   if test -n "$ac_ct_CC"; then
1717   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1718 else
1719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1720 for as_dir in $PATH
1721 do
1722   IFS=$as_save_IFS
1723   test -z "$as_dir" && as_dir=.
1724   for ac_exec_ext in '' $ac_executable_extensions; do
1725   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1726     ac_cv_prog_ac_ct_CC="gcc"
1727     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1728     break 2
1729   fi
1730 done
1731 done
1732
1733 fi
1734 fi
1735 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1736 if test -n "$ac_ct_CC"; then
1737   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1738 echo "${ECHO_T}$ac_ct_CC" >&6
1739 else
1740   echo "$as_me:$LINENO: result: no" >&5
1741 echo "${ECHO_T}no" >&6
1742 fi
1743
1744   CC=$ac_ct_CC
1745 else
1746   CC="$ac_cv_prog_CC"
1747 fi
1748
1749 if test -z "$CC"; then
1750   if test -n "$ac_tool_prefix"; then
1751   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1752 set dummy ${ac_tool_prefix}cc; ac_word=$2
1753 echo "$as_me:$LINENO: checking for $ac_word" >&5
1754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1755 if test "${ac_cv_prog_CC+set}" = set; then
1756   echo $ECHO_N "(cached) $ECHO_C" >&6
1757 else
1758   if test -n "$CC"; then
1759   ac_cv_prog_CC="$CC" # Let the user override the test.
1760 else
1761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1762 for as_dir in $PATH
1763 do
1764   IFS=$as_save_IFS
1765   test -z "$as_dir" && as_dir=.
1766   for ac_exec_ext in '' $ac_executable_extensions; do
1767   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1768     ac_cv_prog_CC="${ac_tool_prefix}cc"
1769     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1770     break 2
1771   fi
1772 done
1773 done
1774
1775 fi
1776 fi
1777 CC=$ac_cv_prog_CC
1778 if test -n "$CC"; then
1779   echo "$as_me:$LINENO: result: $CC" >&5
1780 echo "${ECHO_T}$CC" >&6
1781 else
1782   echo "$as_me:$LINENO: result: no" >&5
1783 echo "${ECHO_T}no" >&6
1784 fi
1785
1786 fi
1787 if test -z "$ac_cv_prog_CC"; then
1788   ac_ct_CC=$CC
1789   # Extract the first word of "cc", so it can be a program name with args.
1790 set dummy cc; ac_word=$2
1791 echo "$as_me:$LINENO: checking for $ac_word" >&5
1792 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1793 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1794   echo $ECHO_N "(cached) $ECHO_C" >&6
1795 else
1796   if test -n "$ac_ct_CC"; then
1797   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1798 else
1799 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1800 for as_dir in $PATH
1801 do
1802   IFS=$as_save_IFS
1803   test -z "$as_dir" && as_dir=.
1804   for ac_exec_ext in '' $ac_executable_extensions; do
1805   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1806     ac_cv_prog_ac_ct_CC="cc"
1807     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1808     break 2
1809   fi
1810 done
1811 done
1812
1813 fi
1814 fi
1815 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1816 if test -n "$ac_ct_CC"; then
1817   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1818 echo "${ECHO_T}$ac_ct_CC" >&6
1819 else
1820   echo "$as_me:$LINENO: result: no" >&5
1821 echo "${ECHO_T}no" >&6
1822 fi
1823
1824   CC=$ac_ct_CC
1825 else
1826   CC="$ac_cv_prog_CC"
1827 fi
1828
1829 fi
1830 if test -z "$CC"; then
1831   # Extract the first word of "cc", so it can be a program name with args.
1832 set dummy cc; ac_word=$2
1833 echo "$as_me:$LINENO: checking for $ac_word" >&5
1834 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1835 if test "${ac_cv_prog_CC+set}" = set; then
1836   echo $ECHO_N "(cached) $ECHO_C" >&6
1837 else
1838   if test -n "$CC"; then
1839   ac_cv_prog_CC="$CC" # Let the user override the test.
1840 else
1841   ac_prog_rejected=no
1842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1843 for as_dir in $PATH
1844 do
1845   IFS=$as_save_IFS
1846   test -z "$as_dir" && as_dir=.
1847   for ac_exec_ext in '' $ac_executable_extensions; do
1848   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1849     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1850        ac_prog_rejected=yes
1851        continue
1852      fi
1853     ac_cv_prog_CC="cc"
1854     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1855     break 2
1856   fi
1857 done
1858 done
1859
1860 if test $ac_prog_rejected = yes; then
1861   # We found a bogon in the path, so make sure we never use it.
1862   set dummy $ac_cv_prog_CC
1863   shift
1864   if test $# != 0; then
1865     # We chose a different compiler from the bogus one.
1866     # However, it has the same basename, so the bogon will be chosen
1867     # first if we set CC to just the basename; use the full file name.
1868     shift
1869     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1870   fi
1871 fi
1872 fi
1873 fi
1874 CC=$ac_cv_prog_CC
1875 if test -n "$CC"; then
1876   echo "$as_me:$LINENO: result: $CC" >&5
1877 echo "${ECHO_T}$CC" >&6
1878 else
1879   echo "$as_me:$LINENO: result: no" >&5
1880 echo "${ECHO_T}no" >&6
1881 fi
1882
1883 fi
1884 if test -z "$CC"; then
1885   if test -n "$ac_tool_prefix"; then
1886   for ac_prog in cl
1887   do
1888     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1889 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1890 echo "$as_me:$LINENO: checking for $ac_word" >&5
1891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1892 if test "${ac_cv_prog_CC+set}" = set; then
1893   echo $ECHO_N "(cached) $ECHO_C" >&6
1894 else
1895   if test -n "$CC"; then
1896   ac_cv_prog_CC="$CC" # Let the user override the test.
1897 else
1898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1899 for as_dir in $PATH
1900 do
1901   IFS=$as_save_IFS
1902   test -z "$as_dir" && as_dir=.
1903   for ac_exec_ext in '' $ac_executable_extensions; do
1904   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1905     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1906     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1907     break 2
1908   fi
1909 done
1910 done
1911
1912 fi
1913 fi
1914 CC=$ac_cv_prog_CC
1915 if test -n "$CC"; then
1916   echo "$as_me:$LINENO: result: $CC" >&5
1917 echo "${ECHO_T}$CC" >&6
1918 else
1919   echo "$as_me:$LINENO: result: no" >&5
1920 echo "${ECHO_T}no" >&6
1921 fi
1922
1923     test -n "$CC" && break
1924   done
1925 fi
1926 if test -z "$CC"; then
1927   ac_ct_CC=$CC
1928   for ac_prog in cl
1929 do
1930   # Extract the first word of "$ac_prog", so it can be a program name with args.
1931 set dummy $ac_prog; ac_word=$2
1932 echo "$as_me:$LINENO: checking for $ac_word" >&5
1933 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1934 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1935   echo $ECHO_N "(cached) $ECHO_C" >&6
1936 else
1937   if test -n "$ac_ct_CC"; then
1938   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1939 else
1940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1941 for as_dir in $PATH
1942 do
1943   IFS=$as_save_IFS
1944   test -z "$as_dir" && as_dir=.
1945   for ac_exec_ext in '' $ac_executable_extensions; do
1946   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1947     ac_cv_prog_ac_ct_CC="$ac_prog"
1948     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1949     break 2
1950   fi
1951 done
1952 done
1953
1954 fi
1955 fi
1956 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1957 if test -n "$ac_ct_CC"; then
1958   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1959 echo "${ECHO_T}$ac_ct_CC" >&6
1960 else
1961   echo "$as_me:$LINENO: result: no" >&5
1962 echo "${ECHO_T}no" >&6
1963 fi
1964
1965   test -n "$ac_ct_CC" && break
1966 done
1967
1968   CC=$ac_ct_CC
1969 fi
1970
1971 fi
1972
1973
1974 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1975 See \`config.log' for more details." >&5
1976 echo "$as_me: error: no acceptable C compiler found in \$PATH
1977 See \`config.log' for more details." >&2;}
1978    { (exit 1); exit 1; }; }
1979
1980 # Provide some information about the compiler.
1981 echo "$as_me:$LINENO:" \
1982      "checking for C compiler version" >&5
1983 ac_compiler=`set X $ac_compile; echo $2`
1984 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1985   (eval $ac_compiler --version </dev/null >&5) 2>&5
1986   ac_status=$?
1987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1988   (exit $ac_status); }
1989 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1990   (eval $ac_compiler -v </dev/null >&5) 2>&5
1991   ac_status=$?
1992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1993   (exit $ac_status); }
1994 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1995   (eval $ac_compiler -V </dev/null >&5) 2>&5
1996   ac_status=$?
1997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1998   (exit $ac_status); }
1999
2000 cat >conftest.$ac_ext <<_ACEOF
2001 /* confdefs.h.  */
2002 _ACEOF
2003 cat confdefs.h >>conftest.$ac_ext
2004 cat >>conftest.$ac_ext <<_ACEOF
2005 /* end confdefs.h.  */
2006
2007 int
2008 main ()
2009 {
2010
2011   ;
2012   return 0;
2013 }
2014 _ACEOF
2015 ac_clean_files_save=$ac_clean_files
2016 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2017 # Try to create an executable without -o first, disregard a.out.
2018 # It will help us diagnose broken compilers, and finding out an intuition
2019 # of exeext.
2020 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2021 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2022 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2023 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2024   (eval $ac_link_default) 2>&5
2025   ac_status=$?
2026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2027   (exit $ac_status); }; then
2028   # Find the output, starting from the most likely.  This scheme is
2029 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2030 # resort.
2031
2032 # Be careful to initialize this variable, since it used to be cached.
2033 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2034 ac_cv_exeext=
2035 # b.out is created by i960 compilers.
2036 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2037 do
2038   test -f "$ac_file" || continue
2039   case $ac_file in
2040     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2041         ;;
2042     conftest.$ac_ext )
2043         # This is the source file.
2044         ;;
2045     [ab].out )
2046         # We found the default executable, but exeext='' is most
2047         # certainly right.
2048         break;;
2049     *.* )
2050         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2051         # FIXME: I believe we export ac_cv_exeext for Libtool,
2052         # but it would be cool to find out if it's true.  Does anybody
2053         # maintain Libtool? --akim.
2054         export ac_cv_exeext
2055         break;;
2056     * )
2057         break;;
2058   esac
2059 done
2060 else
2061   echo "$as_me: failed program was:" >&5
2062 sed 's/^/| /' conftest.$ac_ext >&5
2063
2064 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2065 See \`config.log' for more details." >&5
2066 echo "$as_me: error: C compiler cannot create executables
2067 See \`config.log' for more details." >&2;}
2068    { (exit 77); exit 77; }; }
2069 fi
2070
2071 ac_exeext=$ac_cv_exeext
2072 echo "$as_me:$LINENO: result: $ac_file" >&5
2073 echo "${ECHO_T}$ac_file" >&6
2074
2075 # Check the compiler produces executables we can run.  If not, either
2076 # the compiler is broken, or we cross compile.
2077 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2078 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2079 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2080 # If not cross compiling, check that we can run a simple program.
2081 if test "$cross_compiling" != yes; then
2082   if { ac_try='./$ac_file'
2083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2084   (eval $ac_try) 2>&5
2085   ac_status=$?
2086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2087   (exit $ac_status); }; }; then
2088     cross_compiling=no
2089   else
2090     if test "$cross_compiling" = maybe; then
2091         cross_compiling=yes
2092     else
2093         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2094 If you meant to cross compile, use \`--host'.
2095 See \`config.log' for more details." >&5
2096 echo "$as_me: error: cannot run C compiled programs.
2097 If you meant to cross compile, use \`--host'.
2098 See \`config.log' for more details." >&2;}
2099    { (exit 1); exit 1; }; }
2100     fi
2101   fi
2102 fi
2103 echo "$as_me:$LINENO: result: yes" >&5
2104 echo "${ECHO_T}yes" >&6
2105
2106 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2107 ac_clean_files=$ac_clean_files_save
2108 # Check the compiler produces executables we can run.  If not, either
2109 # the compiler is broken, or we cross compile.
2110 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2111 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2112 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2113 echo "${ECHO_T}$cross_compiling" >&6
2114
2115 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2116 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2117 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2118   (eval $ac_link) 2>&5
2119   ac_status=$?
2120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2121   (exit $ac_status); }; then
2122   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2123 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2124 # work properly (i.e., refer to `conftest.exe'), while it won't with
2125 # `rm'.
2126 for ac_file in conftest.exe conftest conftest.*; do
2127   test -f "$ac_file" || continue
2128   case $ac_file in
2129     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2130     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2131           export ac_cv_exeext
2132           break;;
2133     * ) break;;
2134   esac
2135 done
2136 else
2137   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2138 See \`config.log' for more details." >&5
2139 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2140 See \`config.log' for more details." >&2;}
2141    { (exit 1); exit 1; }; }
2142 fi
2143
2144 rm -f conftest$ac_cv_exeext
2145 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2146 echo "${ECHO_T}$ac_cv_exeext" >&6
2147
2148 rm -f conftest.$ac_ext
2149 EXEEXT=$ac_cv_exeext
2150 ac_exeext=$EXEEXT
2151 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2152 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2153 if test "${ac_cv_objext+set}" = set; then
2154   echo $ECHO_N "(cached) $ECHO_C" >&6
2155 else
2156   cat >conftest.$ac_ext <<_ACEOF
2157 /* confdefs.h.  */
2158 _ACEOF
2159 cat confdefs.h >>conftest.$ac_ext
2160 cat >>conftest.$ac_ext <<_ACEOF
2161 /* end confdefs.h.  */
2162
2163 int
2164 main ()
2165 {
2166
2167   ;
2168   return 0;
2169 }
2170 _ACEOF
2171 rm -f conftest.o conftest.obj
2172 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2173   (eval $ac_compile) 2>&5
2174   ac_status=$?
2175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2176   (exit $ac_status); }; then
2177   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2178   case $ac_file in
2179     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2180     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2181        break;;
2182   esac
2183 done
2184 else
2185   echo "$as_me: failed program was:" >&5
2186 sed 's/^/| /' conftest.$ac_ext >&5
2187
2188 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2189 See \`config.log' for more details." >&5
2190 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2191 See \`config.log' for more details." >&2;}
2192    { (exit 1); exit 1; }; }
2193 fi
2194
2195 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2196 fi
2197 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2198 echo "${ECHO_T}$ac_cv_objext" >&6
2199 OBJEXT=$ac_cv_objext
2200 ac_objext=$OBJEXT
2201 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2202 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2203 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2204   echo $ECHO_N "(cached) $ECHO_C" >&6
2205 else
2206   cat >conftest.$ac_ext <<_ACEOF
2207 /* confdefs.h.  */
2208 _ACEOF
2209 cat confdefs.h >>conftest.$ac_ext
2210 cat >>conftest.$ac_ext <<_ACEOF
2211 /* end confdefs.h.  */
2212
2213 int
2214 main ()
2215 {
2216 #ifndef __GNUC__
2217        choke me
2218 #endif
2219
2220   ;
2221   return 0;
2222 }
2223 _ACEOF
2224 rm -f conftest.$ac_objext
2225 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2226   (eval $ac_compile) 2>conftest.er1
2227   ac_status=$?
2228   grep -v '^ *+' conftest.er1 >conftest.err
2229   rm -f conftest.er1
2230   cat conftest.err >&5
2231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2232   (exit $ac_status); } &&
2233          { ac_try='test -z "$ac_c_werror_flag"
2234                          || test ! -s conftest.err'
2235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2236   (eval $ac_try) 2>&5
2237   ac_status=$?
2238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2239   (exit $ac_status); }; } &&
2240          { ac_try='test -s conftest.$ac_objext'
2241   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2242   (eval $ac_try) 2>&5
2243   ac_status=$?
2244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2245   (exit $ac_status); }; }; then
2246   ac_compiler_gnu=yes
2247 else
2248   echo "$as_me: failed program was:" >&5
2249 sed 's/^/| /' conftest.$ac_ext >&5
2250
2251 ac_compiler_gnu=no
2252 fi
2253 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2254 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2255
2256 fi
2257 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2258 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2259 GCC=`test $ac_compiler_gnu = yes && echo yes`
2260 ac_test_CFLAGS=${CFLAGS+set}
2261 ac_save_CFLAGS=$CFLAGS
2262 CFLAGS="-g"
2263 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2264 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2265 if test "${ac_cv_prog_cc_g+set}" = set; then
2266   echo $ECHO_N "(cached) $ECHO_C" >&6
2267 else
2268   cat >conftest.$ac_ext <<_ACEOF
2269 /* confdefs.h.  */
2270 _ACEOF
2271 cat confdefs.h >>conftest.$ac_ext
2272 cat >>conftest.$ac_ext <<_ACEOF
2273 /* end confdefs.h.  */
2274
2275 int
2276 main ()
2277 {
2278
2279   ;
2280   return 0;
2281 }
2282 _ACEOF
2283 rm -f conftest.$ac_objext
2284 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2285   (eval $ac_compile) 2>conftest.er1
2286   ac_status=$?
2287   grep -v '^ *+' conftest.er1 >conftest.err
2288   rm -f conftest.er1
2289   cat conftest.err >&5
2290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2291   (exit $ac_status); } &&
2292          { ac_try='test -z "$ac_c_werror_flag"
2293                          || test ! -s conftest.err'
2294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2295   (eval $ac_try) 2>&5
2296   ac_status=$?
2297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2298   (exit $ac_status); }; } &&
2299          { ac_try='test -s conftest.$ac_objext'
2300   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2301   (eval $ac_try) 2>&5
2302   ac_status=$?
2303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2304   (exit $ac_status); }; }; then
2305   ac_cv_prog_cc_g=yes
2306 else
2307   echo "$as_me: failed program was:" >&5
2308 sed 's/^/| /' conftest.$ac_ext >&5
2309
2310 ac_cv_prog_cc_g=no
2311 fi
2312 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2313 fi
2314 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2315 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2316 if test "$ac_test_CFLAGS" = set; then
2317   CFLAGS=$ac_save_CFLAGS
2318 elif test $ac_cv_prog_cc_g = yes; then
2319   if test "$GCC" = yes; then
2320     CFLAGS="-g -O2"
2321   else
2322     CFLAGS="-g"
2323   fi
2324 else
2325   if test "$GCC" = yes; then
2326     CFLAGS="-O2"
2327   else
2328     CFLAGS=
2329   fi
2330 fi
2331 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2332 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2333 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2334   echo $ECHO_N "(cached) $ECHO_C" >&6
2335 else
2336   ac_cv_prog_cc_stdc=no
2337 ac_save_CC=$CC
2338 cat >conftest.$ac_ext <<_ACEOF
2339 /* confdefs.h.  */
2340 _ACEOF
2341 cat confdefs.h >>conftest.$ac_ext
2342 cat >>conftest.$ac_ext <<_ACEOF
2343 /* end confdefs.h.  */
2344 #include <stdarg.h>
2345 #include <stdio.h>
2346 #include <sys/types.h>
2347 #include <sys/stat.h>
2348 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2349 struct buf { int x; };
2350 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2351 static char *e (p, i)
2352      char **p;
2353      int i;
2354 {
2355   return p[i];
2356 }
2357 static char *f (char * (*g) (char **, int), char **p, ...)
2358 {
2359   char *s;
2360   va_list v;
2361   va_start (v,p);
2362   s = g (p, va_arg (v,int));
2363   va_end (v);
2364   return s;
2365 }
2366
2367 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2368    function prototypes and stuff, but not '\xHH' hex character constants.
2369    These don't provoke an error unfortunately, instead are silently treated
2370    as 'x'.  The following induces an error, until -std1 is added to get
2371    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2372    array size at least.  It's necessary to write '\x00'==0 to get something
2373    that's true only with -std1.  */
2374 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2375
2376 int test (int i, double x);
2377 struct s1 {int (*f) (int a);};
2378 struct s2 {int (*f) (double a);};
2379 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2380 int argc;
2381 char **argv;
2382 int
2383 main ()
2384 {
2385 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2386   ;
2387   return 0;
2388 }
2389 _ACEOF
2390 # Don't try gcc -ansi; that turns off useful extensions and
2391 # breaks some systems' header files.
2392 # AIX                   -qlanglvl=ansi
2393 # Ultrix and OSF/1      -std1
2394 # HP-UX 10.20 and later -Ae
2395 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2396 # SVR4                  -Xc -D__EXTENSIONS__
2397 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2398 do
2399   CC="$ac_save_CC $ac_arg"
2400   rm -f conftest.$ac_objext
2401 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2402   (eval $ac_compile) 2>conftest.er1
2403   ac_status=$?
2404   grep -v '^ *+' conftest.er1 >conftest.err
2405   rm -f conftest.er1
2406   cat conftest.err >&5
2407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2408   (exit $ac_status); } &&
2409          { ac_try='test -z "$ac_c_werror_flag"
2410                          || test ! -s conftest.err'
2411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2412   (eval $ac_try) 2>&5
2413   ac_status=$?
2414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2415   (exit $ac_status); }; } &&
2416          { ac_try='test -s conftest.$ac_objext'
2417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2418   (eval $ac_try) 2>&5
2419   ac_status=$?
2420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2421   (exit $ac_status); }; }; then
2422   ac_cv_prog_cc_stdc=$ac_arg
2423 break
2424 else
2425   echo "$as_me: failed program was:" >&5
2426 sed 's/^/| /' conftest.$ac_ext >&5
2427
2428 fi
2429 rm -f conftest.err conftest.$ac_objext
2430 done
2431 rm -f conftest.$ac_ext conftest.$ac_objext
2432 CC=$ac_save_CC
2433
2434 fi
2435
2436 case "x$ac_cv_prog_cc_stdc" in
2437   x|xno)
2438     echo "$as_me:$LINENO: result: none needed" >&5
2439 echo "${ECHO_T}none needed" >&6 ;;
2440   *)
2441     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2442 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2443     CC="$CC $ac_cv_prog_cc_stdc" ;;
2444 esac
2445
2446 # Some people use a C++ compiler to compile C.  Since we use `exit',
2447 # in C++ we need to declare it.  In case someone uses the same compiler
2448 # for both compiling C and C++ we need to have the C++ compiler decide
2449 # the declaration of exit, since it's the most demanding environment.
2450 cat >conftest.$ac_ext <<_ACEOF
2451 #ifndef __cplusplus
2452   choke me
2453 #endif
2454 _ACEOF
2455 rm -f conftest.$ac_objext
2456 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2457   (eval $ac_compile) 2>conftest.er1
2458   ac_status=$?
2459   grep -v '^ *+' conftest.er1 >conftest.err
2460   rm -f conftest.er1
2461   cat conftest.err >&5
2462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2463   (exit $ac_status); } &&
2464          { ac_try='test -z "$ac_c_werror_flag"
2465                          || test ! -s conftest.err'
2466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2467   (eval $ac_try) 2>&5
2468   ac_status=$?
2469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2470   (exit $ac_status); }; } &&
2471          { ac_try='test -s conftest.$ac_objext'
2472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2473   (eval $ac_try) 2>&5
2474   ac_status=$?
2475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2476   (exit $ac_status); }; }; then
2477   for ac_declaration in \
2478    '' \
2479    'extern "C" void std::exit (int) throw (); using std::exit;' \
2480    'extern "C" void std::exit (int); using std::exit;' \
2481    'extern "C" void exit (int) throw ();' \
2482    'extern "C" void exit (int);' \
2483    'void exit (int);'
2484 do
2485   cat >conftest.$ac_ext <<_ACEOF
2486 /* confdefs.h.  */
2487 _ACEOF
2488 cat confdefs.h >>conftest.$ac_ext
2489 cat >>conftest.$ac_ext <<_ACEOF
2490 /* end confdefs.h.  */
2491 $ac_declaration
2492 #include <stdlib.h>
2493 int
2494 main ()
2495 {
2496 exit (42);
2497   ;
2498   return 0;
2499 }
2500 _ACEOF
2501 rm -f conftest.$ac_objext
2502 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2503   (eval $ac_compile) 2>conftest.er1
2504   ac_status=$?
2505   grep -v '^ *+' conftest.er1 >conftest.err
2506   rm -f conftest.er1
2507   cat conftest.err >&5
2508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2509   (exit $ac_status); } &&
2510          { ac_try='test -z "$ac_c_werror_flag"
2511                          || test ! -s conftest.err'
2512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2513   (eval $ac_try) 2>&5
2514   ac_status=$?
2515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2516   (exit $ac_status); }; } &&
2517          { ac_try='test -s conftest.$ac_objext'
2518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2519   (eval $ac_try) 2>&5
2520   ac_status=$?
2521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2522   (exit $ac_status); }; }; then
2523   :
2524 else
2525   echo "$as_me: failed program was:" >&5
2526 sed 's/^/| /' conftest.$ac_ext >&5
2527
2528 continue
2529 fi
2530 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2531   cat >conftest.$ac_ext <<_ACEOF
2532 /* confdefs.h.  */
2533 _ACEOF
2534 cat confdefs.h >>conftest.$ac_ext
2535 cat >>conftest.$ac_ext <<_ACEOF
2536 /* end confdefs.h.  */
2537 $ac_declaration
2538 int
2539 main ()
2540 {
2541 exit (42);
2542   ;
2543   return 0;
2544 }
2545 _ACEOF
2546 rm -f conftest.$ac_objext
2547 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2548   (eval $ac_compile) 2>conftest.er1
2549   ac_status=$?
2550   grep -v '^ *+' conftest.er1 >conftest.err
2551   rm -f conftest.er1
2552   cat conftest.err >&5
2553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2554   (exit $ac_status); } &&
2555          { ac_try='test -z "$ac_c_werror_flag"
2556                          || test ! -s conftest.err'
2557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2558   (eval $ac_try) 2>&5
2559   ac_status=$?
2560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2561   (exit $ac_status); }; } &&
2562          { ac_try='test -s conftest.$ac_objext'
2563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2564   (eval $ac_try) 2>&5
2565   ac_status=$?
2566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2567   (exit $ac_status); }; }; then
2568   break
2569 else
2570   echo "$as_me: failed program was:" >&5
2571 sed 's/^/| /' conftest.$ac_ext >&5
2572
2573 fi
2574 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2575 done
2576 rm -f conftest*
2577 if test -n "$ac_declaration"; then
2578   echo '#ifdef __cplusplus' >>confdefs.h
2579   echo $ac_declaration      >>confdefs.h
2580   echo '#endif'             >>confdefs.h
2581 fi
2582
2583 else
2584   echo "$as_me: failed program was:" >&5
2585 sed 's/^/| /' conftest.$ac_ext >&5
2586
2587 fi
2588 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2589 ac_ext=c
2590 ac_cpp='$CPP $CPPFLAGS'
2591 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2592 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2593 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2594
2595
2596   if test -z "$GCC"; then
2597     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2598 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2599     case "$host" in
2600       *-hpux* )
2601         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2602 echo "${ECHO_T}HPUX: adding -Ae" >&6
2603         CC="$CC -Ae"
2604       ;;
2605       *-aix* )
2606         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2607 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2608         CC="$CC -qlanglvl=ansi -qhalt=e"
2609       ;;
2610
2611       *-dec-* )
2612         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2613 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2614         CC="$CC -std1"
2615       ;;
2616
2617       *)
2618         echo "$as_me:$LINENO: result: no idea" >&5
2619 echo "${ECHO_T}no idea" >&6
2620       ;;
2621     esac
2622   fi
2623
2624   OBJCC="$CC"
2625
2626   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2627 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2628   if test "$cross_compiling" = yes; then
2629   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2630 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2631    { (exit 1); exit 1; }; }
2632 else
2633   cat >conftest.$ac_ext <<_ACEOF
2634 /* confdefs.h.  */
2635 _ACEOF
2636 cat confdefs.h >>conftest.$ac_ext
2637 cat >>conftest.$ac_ext <<_ACEOF
2638 /* end confdefs.h.  */
2639  main(int ac, char **av) { return 0; }
2640 _ACEOF
2641 rm -f conftest$ac_exeext
2642 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2643   (eval $ac_link) 2>&5
2644   ac_status=$?
2645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2646   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2648   (eval $ac_try) 2>&5
2649   ac_status=$?
2650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2651   (exit $ac_status); }; }; then
2652   echo "$as_me:$LINENO: result: yes" >&5
2653 echo "${ECHO_T}yes" >&6
2654 else
2655   echo "$as_me: program exited with status $ac_status" >&5
2656 echo "$as_me: failed program was:" >&5
2657 sed 's/^/| /' conftest.$ac_ext >&5
2658
2659 ( exit $ac_status )
2660 echo "$as_me:$LINENO: result: no" >&5
2661 echo "${ECHO_T}no" >&6
2662      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2663 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2664    { (exit 1); exit 1; }; }
2665 fi
2666 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2667 fi
2668
2669   if test -n "$GCC"; then
2670     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2671 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2672     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs"
2673     OBJCC="$OBJCC -Wall"
2674     # supposedly gcc 3.4 will have "-Wdeclaration-after-statement"
2675     # and then perhaps we can do without -pedantic?
2676   else
2677     case "$host" in
2678       *-irix5* |*-irix6.0-3* )
2679         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2680 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2681         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2682       ;;
2683 #     *-dec-osf* )
2684 #       if test -z "$GCC"; then
2685 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2686 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2687 #       fi
2688 #     ;;
2689     esac
2690   fi
2691
2692 if test -n "$GCC"; then
2693    if test -n "$GCC"; then
2694    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2695 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2696 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2697   echo $ECHO_N "(cached) $ECHO_C" >&6
2698 else
2699   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
2700           grep unrecognized >/dev/null ); then
2701        ac_cv_gcc_accepts_std=no
2702      else
2703        ac_cv_gcc_accepts_std=yes
2704      fi
2705 fi
2706 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2707 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2708    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2709   fi
2710
2711    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2712 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2713    #
2714    # The reason that // comments are banned from xscreensaver is that gcc is
2715    # basically the only compiler in the world that supports them in C code.
2716    # All other vendors support them only in their C++ compilers, not in their
2717    # ANSI C compilers.  This means that it's a portability problem: every time
2718    # these comments have snuck into the xscreensaver source code, I've gotten
2719    # complaints about it the next day.  So we turn off support for them in gcc
2720    # as well to prevent them from accidentially slipping in.
2721    #
2722    if test "$ac_gcc_accepts_std" = yes ; then
2723      #
2724      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2725      # (That appears to be the only additional preprocessor symbol
2726      # it defines, in addition to the syntax changes it makes.)
2727      #
2728      # -std=gnu89 is no good, because // comments were a GNU extension
2729      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2730      # with -std=gnu89 but not with -std=c89.)
2731      #
2732      CC="$CC -std=c89 -U__STRICT_ANSI__"
2733    else
2734      # The old way:
2735      CC="$CC -Wp,-lang-c89"
2736    fi
2737   fi
2738
2739 if test -n "$GCC"; then
2740    if test -n "$GCC"; then
2741    echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
2742 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6
2743 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
2744   echo $ECHO_N "(cached) $ECHO_C" >&6
2745 else
2746   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
2747           grep unrecognized >/dev/null ); then
2748        ac_cv_gcc_accepts_no_cpp_precomp=no
2749      else
2750        ac_cv_gcc_accepts_no_cpp_precomp=yes
2751      fi
2752 fi
2753 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
2754 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6
2755    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
2756   fi
2757
2758    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
2759      echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
2760 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6
2761      CC="$CC -no-cpp-precomp"
2762    fi
2763   fi
2764
2765 ac_ext=c
2766 ac_cpp='$CPP $CPPFLAGS'
2767 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2768 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2769 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2770 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2771 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2772 # On Suns, sometimes $CPP names a directory.
2773 if test -n "$CPP" && test -d "$CPP"; then
2774   CPP=
2775 fi
2776 if test -z "$CPP"; then
2777   if test "${ac_cv_prog_CPP+set}" = set; then
2778   echo $ECHO_N "(cached) $ECHO_C" >&6
2779 else
2780       # Double quotes because CPP needs to be expanded
2781     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2782     do
2783       ac_preproc_ok=false
2784 for ac_c_preproc_warn_flag in '' yes
2785 do
2786   # Use a header file that comes with gcc, so configuring glibc
2787   # with a fresh cross-compiler works.
2788   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2789   # <limits.h> exists even on freestanding compilers.
2790   # On the NeXT, cc -E runs the code through the compiler's parser,
2791   # not just through cpp. "Syntax error" is here to catch this case.
2792   cat >conftest.$ac_ext <<_ACEOF
2793 /* confdefs.h.  */
2794 _ACEOF
2795 cat confdefs.h >>conftest.$ac_ext
2796 cat >>conftest.$ac_ext <<_ACEOF
2797 /* end confdefs.h.  */
2798 #ifdef __STDC__
2799 # include <limits.h>
2800 #else
2801 # include <assert.h>
2802 #endif
2803                      Syntax error
2804 _ACEOF
2805 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2806   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2807   ac_status=$?
2808   grep -v '^ *+' conftest.er1 >conftest.err
2809   rm -f conftest.er1
2810   cat conftest.err >&5
2811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2812   (exit $ac_status); } >/dev/null; then
2813   if test -s conftest.err; then
2814     ac_cpp_err=$ac_c_preproc_warn_flag
2815     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2816   else
2817     ac_cpp_err=
2818   fi
2819 else
2820   ac_cpp_err=yes
2821 fi
2822 if test -z "$ac_cpp_err"; then
2823   :
2824 else
2825   echo "$as_me: failed program was:" >&5
2826 sed 's/^/| /' conftest.$ac_ext >&5
2827
2828   # Broken: fails on valid input.
2829 continue
2830 fi
2831 rm -f conftest.err conftest.$ac_ext
2832
2833   # OK, works on sane cases.  Now check whether non-existent headers
2834   # can be detected and how.
2835   cat >conftest.$ac_ext <<_ACEOF
2836 /* confdefs.h.  */
2837 _ACEOF
2838 cat confdefs.h >>conftest.$ac_ext
2839 cat >>conftest.$ac_ext <<_ACEOF
2840 /* end confdefs.h.  */
2841 #include <ac_nonexistent.h>
2842 _ACEOF
2843 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2844   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2845   ac_status=$?
2846   grep -v '^ *+' conftest.er1 >conftest.err
2847   rm -f conftest.er1
2848   cat conftest.err >&5
2849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2850   (exit $ac_status); } >/dev/null; then
2851   if test -s conftest.err; then
2852     ac_cpp_err=$ac_c_preproc_warn_flag
2853     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2854   else
2855     ac_cpp_err=
2856   fi
2857 else
2858   ac_cpp_err=yes
2859 fi
2860 if test -z "$ac_cpp_err"; then
2861   # Broken: success on invalid input.
2862 continue
2863 else
2864   echo "$as_me: failed program was:" >&5
2865 sed 's/^/| /' conftest.$ac_ext >&5
2866
2867   # Passes both tests.
2868 ac_preproc_ok=:
2869 break
2870 fi
2871 rm -f conftest.err conftest.$ac_ext
2872
2873 done
2874 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2875 rm -f conftest.err conftest.$ac_ext
2876 if $ac_preproc_ok; then
2877   break
2878 fi
2879
2880     done
2881     ac_cv_prog_CPP=$CPP
2882
2883 fi
2884   CPP=$ac_cv_prog_CPP
2885 else
2886   ac_cv_prog_CPP=$CPP
2887 fi
2888 echo "$as_me:$LINENO: result: $CPP" >&5
2889 echo "${ECHO_T}$CPP" >&6
2890 ac_preproc_ok=false
2891 for ac_c_preproc_warn_flag in '' yes
2892 do
2893   # Use a header file that comes with gcc, so configuring glibc
2894   # with a fresh cross-compiler works.
2895   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2896   # <limits.h> exists even on freestanding compilers.
2897   # On the NeXT, cc -E runs the code through the compiler's parser,
2898   # not just through cpp. "Syntax error" is here to catch this case.
2899   cat >conftest.$ac_ext <<_ACEOF
2900 /* confdefs.h.  */
2901 _ACEOF
2902 cat confdefs.h >>conftest.$ac_ext
2903 cat >>conftest.$ac_ext <<_ACEOF
2904 /* end confdefs.h.  */
2905 #ifdef __STDC__
2906 # include <limits.h>
2907 #else
2908 # include <assert.h>
2909 #endif
2910                      Syntax error
2911 _ACEOF
2912 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2913   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2914   ac_status=$?
2915   grep -v '^ *+' conftest.er1 >conftest.err
2916   rm -f conftest.er1
2917   cat conftest.err >&5
2918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2919   (exit $ac_status); } >/dev/null; then
2920   if test -s conftest.err; then
2921     ac_cpp_err=$ac_c_preproc_warn_flag
2922     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2923   else
2924     ac_cpp_err=
2925   fi
2926 else
2927   ac_cpp_err=yes
2928 fi
2929 if test -z "$ac_cpp_err"; then
2930   :
2931 else
2932   echo "$as_me: failed program was:" >&5
2933 sed 's/^/| /' conftest.$ac_ext >&5
2934
2935   # Broken: fails on valid input.
2936 continue
2937 fi
2938 rm -f conftest.err conftest.$ac_ext
2939
2940   # OK, works on sane cases.  Now check whether non-existent headers
2941   # can be detected and how.
2942   cat >conftest.$ac_ext <<_ACEOF
2943 /* confdefs.h.  */
2944 _ACEOF
2945 cat confdefs.h >>conftest.$ac_ext
2946 cat >>conftest.$ac_ext <<_ACEOF
2947 /* end confdefs.h.  */
2948 #include <ac_nonexistent.h>
2949 _ACEOF
2950 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2951   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2952   ac_status=$?
2953   grep -v '^ *+' conftest.er1 >conftest.err
2954   rm -f conftest.er1
2955   cat conftest.err >&5
2956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2957   (exit $ac_status); } >/dev/null; then
2958   if test -s conftest.err; then
2959     ac_cpp_err=$ac_c_preproc_warn_flag
2960     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2961   else
2962     ac_cpp_err=
2963   fi
2964 else
2965   ac_cpp_err=yes
2966 fi
2967 if test -z "$ac_cpp_err"; then
2968   # Broken: success on invalid input.
2969 continue
2970 else
2971   echo "$as_me: failed program was:" >&5
2972 sed 's/^/| /' conftest.$ac_ext >&5
2973
2974   # Passes both tests.
2975 ac_preproc_ok=:
2976 break
2977 fi
2978 rm -f conftest.err conftest.$ac_ext
2979
2980 done
2981 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2982 rm -f conftest.err conftest.$ac_ext
2983 if $ac_preproc_ok; then
2984   :
2985 else
2986   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2987 See \`config.log' for more details." >&5
2988 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2989 See \`config.log' for more details." >&2;}
2990    { (exit 1); exit 1; }; }
2991 fi
2992
2993 ac_ext=c
2994 ac_cpp='$CPP $CPPFLAGS'
2995 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2996 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2997 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2998
2999 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3000 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3001 if test "${ac_cv_c_const+set}" = set; then
3002   echo $ECHO_N "(cached) $ECHO_C" >&6
3003 else
3004   cat >conftest.$ac_ext <<_ACEOF
3005 /* confdefs.h.  */
3006 _ACEOF
3007 cat confdefs.h >>conftest.$ac_ext
3008 cat >>conftest.$ac_ext <<_ACEOF
3009 /* end confdefs.h.  */
3010
3011 int
3012 main ()
3013 {
3014 /* FIXME: Include the comments suggested by Paul. */
3015 #ifndef __cplusplus
3016   /* Ultrix mips cc rejects this.  */
3017   typedef int charset[2];
3018   const charset x;
3019   /* SunOS 4.1.1 cc rejects this.  */
3020   char const *const *ccp;
3021   char **p;
3022   /* NEC SVR4.0.2 mips cc rejects this.  */
3023   struct point {int x, y;};
3024   static struct point const zero = {0,0};
3025   /* AIX XL C 1.02.0.0 rejects this.
3026      It does not let you subtract one const X* pointer from another in
3027      an arm of an if-expression whose if-part is not a constant
3028      expression */
3029   const char *g = "string";
3030   ccp = &g + (g ? g-g : 0);
3031   /* HPUX 7.0 cc rejects these. */
3032   ++ccp;
3033   p = (char**) ccp;
3034   ccp = (char const *const *) p;
3035   { /* SCO 3.2v4 cc rejects this.  */
3036     char *t;
3037     char const *s = 0 ? (char *) 0 : (char const *) 0;
3038
3039     *t++ = 0;
3040   }
3041   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3042     int x[] = {25, 17};
3043     const int *foo = &x[0];
3044     ++foo;
3045   }
3046   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3047     typedef const int *iptr;
3048     iptr p = 0;
3049     ++p;
3050   }
3051   { /* AIX XL C 1.02.0.0 rejects this saying
3052        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3053     struct s { int j; const int *ap[3]; };
3054     struct s *b; b->j = 5;
3055   }
3056   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3057     const int foo = 10;
3058   }
3059 #endif
3060
3061   ;
3062   return 0;
3063 }
3064 _ACEOF
3065 rm -f conftest.$ac_objext
3066 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3067   (eval $ac_compile) 2>conftest.er1
3068   ac_status=$?
3069   grep -v '^ *+' conftest.er1 >conftest.err
3070   rm -f conftest.er1
3071   cat conftest.err >&5
3072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3073   (exit $ac_status); } &&
3074          { ac_try='test -z "$ac_c_werror_flag"
3075                          || test ! -s conftest.err'
3076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3077   (eval $ac_try) 2>&5
3078   ac_status=$?
3079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3080   (exit $ac_status); }; } &&
3081          { ac_try='test -s conftest.$ac_objext'
3082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3083   (eval $ac_try) 2>&5
3084   ac_status=$?
3085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3086   (exit $ac_status); }; }; then
3087   ac_cv_c_const=yes
3088 else
3089   echo "$as_me: failed program was:" >&5
3090 sed 's/^/| /' conftest.$ac_ext >&5
3091
3092 ac_cv_c_const=no
3093 fi
3094 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3095 fi
3096 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3097 echo "${ECHO_T}$ac_cv_c_const" >&6
3098 if test $ac_cv_c_const = no; then
3099
3100 cat >>confdefs.h <<\_ACEOF
3101 #define const
3102 _ACEOF
3103
3104 fi
3105
3106 echo "$as_me:$LINENO: checking for inline" >&5
3107 echo $ECHO_N "checking for inline... $ECHO_C" >&6
3108 if test "${ac_cv_c_inline+set}" = set; then
3109   echo $ECHO_N "(cached) $ECHO_C" >&6
3110 else
3111   ac_cv_c_inline=no
3112 for ac_kw in inline __inline__ __inline; do
3113   cat >conftest.$ac_ext <<_ACEOF
3114 /* confdefs.h.  */
3115 _ACEOF
3116 cat confdefs.h >>conftest.$ac_ext
3117 cat >>conftest.$ac_ext <<_ACEOF
3118 /* end confdefs.h.  */
3119 #ifndef __cplusplus
3120 typedef int foo_t;
3121 static $ac_kw foo_t static_foo () {return 0; }
3122 $ac_kw foo_t foo () {return 0; }
3123 #endif
3124
3125 _ACEOF
3126 rm -f conftest.$ac_objext
3127 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3128   (eval $ac_compile) 2>conftest.er1
3129   ac_status=$?
3130   grep -v '^ *+' conftest.er1 >conftest.err
3131   rm -f conftest.er1
3132   cat conftest.err >&5
3133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3134   (exit $ac_status); } &&
3135          { ac_try='test -z "$ac_c_werror_flag"
3136                          || test ! -s conftest.err'
3137   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3138   (eval $ac_try) 2>&5
3139   ac_status=$?
3140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3141   (exit $ac_status); }; } &&
3142          { ac_try='test -s conftest.$ac_objext'
3143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3144   (eval $ac_try) 2>&5
3145   ac_status=$?
3146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3147   (exit $ac_status); }; }; then
3148   ac_cv_c_inline=$ac_kw; break
3149 else
3150   echo "$as_me: failed program was:" >&5
3151 sed 's/^/| /' conftest.$ac_ext >&5
3152
3153 fi
3154 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3155 done
3156
3157 fi
3158 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3159 echo "${ECHO_T}$ac_cv_c_inline" >&6
3160
3161
3162 case $ac_cv_c_inline in
3163   inline | yes) ;;
3164   *)
3165     case $ac_cv_c_inline in
3166       no) ac_val=;;
3167       *) ac_val=$ac_cv_c_inline;;
3168     esac
3169     cat >>confdefs.h <<_ACEOF
3170 #ifndef __cplusplus
3171 #define inline $ac_val
3172 #endif
3173 _ACEOF
3174     ;;
3175 esac
3176
3177
3178 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3179   echo "$as_me:$LINENO: checking for bc" >&5
3180 echo $ECHO_N "checking for bc... $ECHO_C" >&6
3181   if test "$ac_bc_result" = "15" ; then
3182     echo "$as_me:$LINENO: result: yes" >&5
3183 echo "${ECHO_T}yes" >&6
3184   else
3185     echo "$as_me:$LINENO: result: no" >&5
3186 echo "${ECHO_T}no" >&6
3187     echo ''
3188     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3189                   part of Unix since the 1970s.  Come back when your vendor
3190                   has grown a clue." >&5
3191 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3192                   part of Unix since the 1970s.  Come back when your vendor
3193                   has grown a clue." >&2;}
3194    { (exit 1); exit 1; }; }
3195   fi
3196
3197
3198 # stuff for Makefiles
3199 # Find a good install program.  We prefer a C program (faster),
3200 # so one script is as good as another.  But avoid the broken or
3201 # incompatible versions:
3202 # SysV /etc/install, /usr/sbin/install
3203 # SunOS /usr/etc/install
3204 # IRIX /sbin/install
3205 # AIX /bin/install
3206 # AmigaOS /C/install, which installs bootblocks on floppy discs
3207 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3208 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3209 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3210 # OS/2's system install, which has a completely different semantic
3211 # ./install, which can be erroneously created by make from ./install.sh.
3212 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3213 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3214 if test -z "$INSTALL"; then
3215 if test "${ac_cv_path_install+set}" = set; then
3216   echo $ECHO_N "(cached) $ECHO_C" >&6
3217 else
3218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3219 for as_dir in $PATH
3220 do
3221   IFS=$as_save_IFS
3222   test -z "$as_dir" && as_dir=.
3223   # Account for people who put trailing slashes in PATH elements.
3224 case $as_dir/ in
3225   ./ | .// | /cC/* | \
3226   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3227   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3228   /usr/ucb/* ) ;;
3229   *)
3230     # OSF1 and SCO ODT 3.0 have their own names for install.
3231     # Don't use installbsd from OSF since it installs stuff as root
3232     # by default.
3233     for ac_prog in ginstall scoinst install; do
3234       for ac_exec_ext in '' $ac_executable_extensions; do
3235         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3236           if test $ac_prog = install &&
3237             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3238             # AIX install.  It has an incompatible calling convention.
3239             :
3240           elif test $ac_prog = install &&
3241             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3242             # program-specific install script used by HP pwplus--don't use.
3243             :
3244           else
3245             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3246             break 3
3247           fi
3248         fi
3249       done
3250     done
3251     ;;
3252 esac
3253 done
3254
3255
3256 fi
3257   if test "${ac_cv_path_install+set}" = set; then
3258     INSTALL=$ac_cv_path_install
3259   else
3260     # As a last resort, use the slow shell script.  We don't cache a
3261     # path for INSTALL within a source directory, because that will
3262     # break other packages using the cache if that directory is
3263     # removed, or if the path is relative.
3264     INSTALL=$ac_install_sh
3265   fi
3266 fi
3267 echo "$as_me:$LINENO: result: $INSTALL" >&5
3268 echo "${ECHO_T}$INSTALL" >&6
3269
3270 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3271 # It thinks the first close brace ends the variable substitution.
3272 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3273
3274 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3275
3276 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3277
3278 echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
3279 echo $ECHO_N "checking whether \"\${INSTALL} -d\" creates intermediate directories... $ECHO_C" >&6
3280 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
3281   echo $ECHO_N "(cached) $ECHO_C" >&6
3282 else
3283   ac_cv_install_d_creates_dirs=no
3284      rm -rf conftestdir
3285      if mkdir conftestdir; then
3286        cd conftestdir 2>/dev/null
3287        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
3288        if test -d dir1/dir2/. ; then
3289          ac_cv_install_d_creates_dirs=yes
3290        fi
3291        cd .. 2>/dev/null
3292        rm -rf conftestdir
3293      fi
3294
3295 fi
3296 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
3297 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
3298
3299   if test "$ac_cv_install_d_creates_dirs" = no ; then
3300     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
3301 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
3302 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
3303   echo $ECHO_N "(cached) $ECHO_C" >&6
3304 else
3305   ac_cv_mkdir_p_creates_dirs=no
3306        rm -rf conftestdir
3307        if mkdir conftestdir; then
3308          cd conftestdir 2>/dev/null
3309          mkdir -p dir1/dir2 >/dev/null 2>&1
3310          if test -d dir1/dir2/. ; then
3311            ac_cv_mkdir_p_creates_dirs=yes
3312          fi
3313          cd .. 2>/dev/null
3314          rm -rf conftestdir
3315        fi
3316
3317 fi
3318 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3319 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3320   fi
3321
3322   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3323     INSTALL_DIRS='${INSTALL} -d'
3324   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3325     INSTALL_DIRS='mkdir -p'
3326   else
3327     # any other ideas?
3328     INSTALL_DIRS='${INSTALL} -d'
3329   fi
3330
3331 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3332 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3333 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
3334 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3335   echo $ECHO_N "(cached) $ECHO_C" >&6
3336 else
3337   cat >conftest.make <<\_ACEOF
3338 all:
3339         @echo 'ac_maketemp="$(MAKE)"'
3340 _ACEOF
3341 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3342 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3343 if test -n "$ac_maketemp"; then
3344   eval ac_cv_prog_make_${ac_make}_set=yes
3345 else
3346   eval ac_cv_prog_make_${ac_make}_set=no
3347 fi
3348 rm -f conftest.make
3349 fi
3350 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3351   echo "$as_me:$LINENO: result: yes" >&5
3352 echo "${ECHO_T}yes" >&6
3353   SET_MAKE=
3354 else
3355   echo "$as_me:$LINENO: result: no" >&5
3356 echo "${ECHO_T}no" >&6
3357   SET_MAKE="MAKE=${MAKE-make}"
3358 fi
3359
3360
3361 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3362 # That's wrong: it should be set to '${INSTALL}', so that one can
3363 # implement the "install-strip" target properly (strip executables,
3364 # but do not try to strip scripts.)
3365 #
3366 INSTALL_SCRIPT='${INSTALL}'
3367
3368 # random libc stuff
3369
3370 echo "$as_me:$LINENO: checking for egrep" >&5
3371 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3372 if test "${ac_cv_prog_egrep+set}" = set; then
3373   echo $ECHO_N "(cached) $ECHO_C" >&6
3374 else
3375   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3376     then ac_cv_prog_egrep='grep -E'
3377     else ac_cv_prog_egrep='egrep'
3378     fi
3379 fi
3380 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3381 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3382  EGREP=$ac_cv_prog_egrep
3383
3384
3385 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3386 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3387 if test "${ac_cv_header_stdc+set}" = set; then
3388   echo $ECHO_N "(cached) $ECHO_C" >&6
3389 else
3390   cat >conftest.$ac_ext <<_ACEOF
3391 /* confdefs.h.  */
3392 _ACEOF
3393 cat confdefs.h >>conftest.$ac_ext
3394 cat >>conftest.$ac_ext <<_ACEOF
3395 /* end confdefs.h.  */
3396 #include <stdlib.h>
3397 #include <stdarg.h>
3398 #include <string.h>
3399 #include <float.h>
3400
3401 int
3402 main ()
3403 {
3404
3405   ;
3406   return 0;
3407 }
3408 _ACEOF
3409 rm -f conftest.$ac_objext
3410 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3411   (eval $ac_compile) 2>conftest.er1
3412   ac_status=$?
3413   grep -v '^ *+' conftest.er1 >conftest.err
3414   rm -f conftest.er1
3415   cat conftest.err >&5
3416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3417   (exit $ac_status); } &&
3418          { ac_try='test -z "$ac_c_werror_flag"
3419                          || test ! -s conftest.err'
3420   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3421   (eval $ac_try) 2>&5
3422   ac_status=$?
3423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3424   (exit $ac_status); }; } &&
3425          { ac_try='test -s conftest.$ac_objext'
3426   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3427   (eval $ac_try) 2>&5
3428   ac_status=$?
3429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3430   (exit $ac_status); }; }; then
3431   ac_cv_header_stdc=yes
3432 else
3433   echo "$as_me: failed program was:" >&5
3434 sed 's/^/| /' conftest.$ac_ext >&5
3435
3436 ac_cv_header_stdc=no
3437 fi
3438 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3439
3440 if test $ac_cv_header_stdc = yes; then
3441   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3442   cat >conftest.$ac_ext <<_ACEOF
3443 /* confdefs.h.  */
3444 _ACEOF
3445 cat confdefs.h >>conftest.$ac_ext
3446 cat >>conftest.$ac_ext <<_ACEOF
3447 /* end confdefs.h.  */
3448 #include <string.h>
3449
3450 _ACEOF
3451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3452   $EGREP "memchr" >/dev/null 2>&1; then
3453   :
3454 else
3455   ac_cv_header_stdc=no
3456 fi
3457 rm -f conftest*
3458
3459 fi
3460
3461 if test $ac_cv_header_stdc = yes; then
3462   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3463   cat >conftest.$ac_ext <<_ACEOF
3464 /* confdefs.h.  */
3465 _ACEOF
3466 cat confdefs.h >>conftest.$ac_ext
3467 cat >>conftest.$ac_ext <<_ACEOF
3468 /* end confdefs.h.  */
3469 #include <stdlib.h>
3470
3471 _ACEOF
3472 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3473   $EGREP "free" >/dev/null 2>&1; then
3474   :
3475 else
3476   ac_cv_header_stdc=no
3477 fi
3478 rm -f conftest*
3479
3480 fi
3481
3482 if test $ac_cv_header_stdc = yes; then
3483   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3484   if test "$cross_compiling" = yes; then
3485   :
3486 else
3487   cat >conftest.$ac_ext <<_ACEOF
3488 /* confdefs.h.  */
3489 _ACEOF
3490 cat confdefs.h >>conftest.$ac_ext
3491 cat >>conftest.$ac_ext <<_ACEOF
3492 /* end confdefs.h.  */
3493 #include <ctype.h>
3494 #if ((' ' & 0x0FF) == 0x020)
3495 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3496 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3497 #else
3498 # define ISLOWER(c) \
3499                    (('a' <= (c) && (c) <= 'i') \
3500                      || ('j' <= (c) && (c) <= 'r') \
3501                      || ('s' <= (c) && (c) <= 'z'))
3502 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3503 #endif
3504
3505 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3506 int
3507 main ()
3508 {
3509   int i;
3510   for (i = 0; i < 256; i++)
3511     if (XOR (islower (i), ISLOWER (i))
3512         || toupper (i) != TOUPPER (i))
3513       exit(2);
3514   exit (0);
3515 }
3516 _ACEOF
3517 rm -f conftest$ac_exeext
3518 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3519   (eval $ac_link) 2>&5
3520   ac_status=$?
3521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3522   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3524   (eval $ac_try) 2>&5
3525   ac_status=$?
3526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3527   (exit $ac_status); }; }; then
3528   :
3529 else
3530   echo "$as_me: program exited with status $ac_status" >&5
3531 echo "$as_me: failed program was:" >&5
3532 sed 's/^/| /' conftest.$ac_ext >&5
3533
3534 ( exit $ac_status )
3535 ac_cv_header_stdc=no
3536 fi
3537 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3538 fi
3539 fi
3540 fi
3541 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3542 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3543 if test $ac_cv_header_stdc = yes; then
3544
3545 cat >>confdefs.h <<\_ACEOF
3546 #define STDC_HEADERS 1
3547 _ACEOF
3548
3549 fi
3550
3551 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3562                   inttypes.h stdint.h unistd.h
3563 do
3564 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3565 echo "$as_me:$LINENO: checking for $ac_header" >&5
3566 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3567 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3568   echo $ECHO_N "(cached) $ECHO_C" >&6
3569 else
3570   cat >conftest.$ac_ext <<_ACEOF
3571 /* confdefs.h.  */
3572 _ACEOF
3573 cat confdefs.h >>conftest.$ac_ext
3574 cat >>conftest.$ac_ext <<_ACEOF
3575 /* end confdefs.h.  */
3576 $ac_includes_default
3577
3578 #include <$ac_header>
3579 _ACEOF
3580 rm -f conftest.$ac_objext
3581 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3582   (eval $ac_compile) 2>conftest.er1
3583   ac_status=$?
3584   grep -v '^ *+' conftest.er1 >conftest.err
3585   rm -f conftest.er1
3586   cat conftest.err >&5
3587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3588   (exit $ac_status); } &&
3589          { ac_try='test -z "$ac_c_werror_flag"
3590                          || test ! -s conftest.err'
3591   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3592   (eval $ac_try) 2>&5
3593   ac_status=$?
3594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3595   (exit $ac_status); }; } &&
3596          { ac_try='test -s conftest.$ac_objext'
3597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3598   (eval $ac_try) 2>&5
3599   ac_status=$?
3600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3601   (exit $ac_status); }; }; then
3602   eval "$as_ac_Header=yes"
3603 else
3604   echo "$as_me: failed program was:" >&5
3605 sed 's/^/| /' conftest.$ac_ext >&5
3606
3607 eval "$as_ac_Header=no"
3608 fi
3609 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3610 fi
3611 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3612 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3613 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3614   cat >>confdefs.h <<_ACEOF
3615 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3616 _ACEOF
3617
3618 fi
3619
3620 done
3621
3622
3623
3624 for ac_header in unistd.h
3625 do
3626 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3627 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3628   echo "$as_me:$LINENO: checking for $ac_header" >&5
3629 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3630 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3631   echo $ECHO_N "(cached) $ECHO_C" >&6
3632 fi
3633 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3634 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3635 else
3636   # Is the header compilable?
3637 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3638 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3639 cat >conftest.$ac_ext <<_ACEOF
3640 /* confdefs.h.  */
3641 _ACEOF
3642 cat confdefs.h >>conftest.$ac_ext
3643 cat >>conftest.$ac_ext <<_ACEOF
3644 /* end confdefs.h.  */
3645 $ac_includes_default
3646 #include <$ac_header>
3647 _ACEOF
3648 rm -f conftest.$ac_objext
3649 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3650   (eval $ac_compile) 2>conftest.er1
3651   ac_status=$?
3652   grep -v '^ *+' conftest.er1 >conftest.err
3653   rm -f conftest.er1
3654   cat conftest.err >&5
3655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3656   (exit $ac_status); } &&
3657          { ac_try='test -z "$ac_c_werror_flag"
3658                          || test ! -s conftest.err'
3659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3660   (eval $ac_try) 2>&5
3661   ac_status=$?
3662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3663   (exit $ac_status); }; } &&
3664          { ac_try='test -s conftest.$ac_objext'
3665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3666   (eval $ac_try) 2>&5
3667   ac_status=$?
3668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3669   (exit $ac_status); }; }; then
3670   ac_header_compiler=yes
3671 else
3672   echo "$as_me: failed program was:" >&5
3673 sed 's/^/| /' conftest.$ac_ext >&5
3674
3675 ac_header_compiler=no
3676 fi
3677 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3678 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3679 echo "${ECHO_T}$ac_header_compiler" >&6
3680
3681 # Is the header present?
3682 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3683 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3684 cat >conftest.$ac_ext <<_ACEOF
3685 /* confdefs.h.  */
3686 _ACEOF
3687 cat confdefs.h >>conftest.$ac_ext
3688 cat >>conftest.$ac_ext <<_ACEOF
3689 /* end confdefs.h.  */
3690 #include <$ac_header>
3691 _ACEOF
3692 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3693   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3694   ac_status=$?
3695   grep -v '^ *+' conftest.er1 >conftest.err
3696   rm -f conftest.er1
3697   cat conftest.err >&5
3698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3699   (exit $ac_status); } >/dev/null; then
3700   if test -s conftest.err; then
3701     ac_cpp_err=$ac_c_preproc_warn_flag
3702     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3703   else
3704     ac_cpp_err=
3705   fi
3706 else
3707   ac_cpp_err=yes
3708 fi
3709 if test -z "$ac_cpp_err"; then
3710   ac_header_preproc=yes
3711 else
3712   echo "$as_me: failed program was:" >&5
3713 sed 's/^/| /' conftest.$ac_ext >&5
3714
3715   ac_header_preproc=no
3716 fi
3717 rm -f conftest.err conftest.$ac_ext
3718 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3719 echo "${ECHO_T}$ac_header_preproc" >&6
3720
3721 # So?  What about this header?
3722 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3723   yes:no: )
3724     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3725 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3726     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
3727 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
3728     ac_header_preproc=yes
3729     ;;
3730   no:yes:* )
3731     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3732 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3733     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
3734 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
3735     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
3736 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
3737     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
3738 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
3739     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3740 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3741     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
3742 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
3743     (
3744       cat <<\_ASBOX
3745 ## ------------------------------------------ ##
3746 ## Report this to the AC_PACKAGE_NAME lists.  ##
3747 ## ------------------------------------------ ##
3748 _ASBOX
3749     ) |
3750       sed "s/^/$as_me: WARNING:     /" >&2
3751     ;;
3752 esac
3753 echo "$as_me:$LINENO: checking for $ac_header" >&5
3754 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3755 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3756   echo $ECHO_N "(cached) $ECHO_C" >&6
3757 else
3758   eval "$as_ac_Header=\$ac_header_preproc"
3759 fi
3760 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3761 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3762
3763 fi
3764 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3765   cat >>confdefs.h <<_ACEOF
3766 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3767 _ACEOF
3768
3769 fi
3770
3771 done
3772
3773 echo "$as_me:$LINENO: checking for mode_t" >&5
3774 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3775 if test "${ac_cv_type_mode_t+set}" = set; then
3776   echo $ECHO_N "(cached) $ECHO_C" >&6
3777 else
3778   cat >conftest.$ac_ext <<_ACEOF
3779 /* confdefs.h.  */
3780 _ACEOF
3781 cat confdefs.h >>conftest.$ac_ext
3782 cat >>conftest.$ac_ext <<_ACEOF
3783 /* end confdefs.h.  */
3784 $ac_includes_default
3785 int
3786 main ()
3787 {
3788 if ((mode_t *) 0)
3789   return 0;
3790 if (sizeof (mode_t))
3791   return 0;
3792   ;
3793   return 0;
3794 }
3795 _ACEOF
3796 rm -f conftest.$ac_objext
3797 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3798   (eval $ac_compile) 2>conftest.er1
3799   ac_status=$?
3800   grep -v '^ *+' conftest.er1 >conftest.err
3801   rm -f conftest.er1
3802   cat conftest.err >&5
3803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3804   (exit $ac_status); } &&
3805          { ac_try='test -z "$ac_c_werror_flag"
3806                          || test ! -s conftest.err'
3807   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3808   (eval $ac_try) 2>&5
3809   ac_status=$?
3810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3811   (exit $ac_status); }; } &&
3812          { ac_try='test -s conftest.$ac_objext'
3813   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3814   (eval $ac_try) 2>&5
3815   ac_status=$?
3816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3817   (exit $ac_status); }; }; then
3818   ac_cv_type_mode_t=yes
3819 else
3820   echo "$as_me: failed program was:" >&5
3821 sed 's/^/| /' conftest.$ac_ext >&5
3822
3823 ac_cv_type_mode_t=no
3824 fi
3825 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3826 fi
3827 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
3828 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3829 if test $ac_cv_type_mode_t = yes; then
3830   :
3831 else
3832
3833 cat >>confdefs.h <<_ACEOF
3834 #define mode_t int
3835 _ACEOF
3836
3837 fi
3838
3839 echo "$as_me:$LINENO: checking for pid_t" >&5
3840 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
3841 if test "${ac_cv_type_pid_t+set}" = set; then
3842   echo $ECHO_N "(cached) $ECHO_C" >&6
3843 else
3844   cat >conftest.$ac_ext <<_ACEOF
3845 /* confdefs.h.  */
3846 _ACEOF
3847 cat confdefs.h >>conftest.$ac_ext
3848 cat >>conftest.$ac_ext <<_ACEOF
3849 /* end confdefs.h.  */
3850 $ac_includes_default
3851 int
3852 main ()
3853 {
3854 if ((pid_t *) 0)
3855   return 0;
3856 if (sizeof (pid_t))
3857   return 0;
3858   ;
3859   return 0;
3860 }
3861 _ACEOF
3862 rm -f conftest.$ac_objext
3863 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3864   (eval $ac_compile) 2>conftest.er1
3865   ac_status=$?
3866   grep -v '^ *+' conftest.er1 >conftest.err
3867   rm -f conftest.er1
3868   cat conftest.err >&5
3869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3870   (exit $ac_status); } &&
3871          { ac_try='test -z "$ac_c_werror_flag"
3872                          || test ! -s conftest.err'
3873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3874   (eval $ac_try) 2>&5
3875   ac_status=$?
3876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3877   (exit $ac_status); }; } &&
3878          { ac_try='test -s conftest.$ac_objext'
3879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3880   (eval $ac_try) 2>&5
3881   ac_status=$?
3882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3883   (exit $ac_status); }; }; then
3884   ac_cv_type_pid_t=yes
3885 else
3886   echo "$as_me: failed program was:" >&5
3887 sed 's/^/| /' conftest.$ac_ext >&5
3888
3889 ac_cv_type_pid_t=no
3890 fi
3891 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3892 fi
3893 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
3894 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3895 if test $ac_cv_type_pid_t = yes; then
3896   :
3897 else
3898
3899 cat >>confdefs.h <<_ACEOF
3900 #define pid_t int
3901 _ACEOF
3902
3903 fi
3904
3905 echo "$as_me:$LINENO: checking for size_t" >&5
3906 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
3907 if test "${ac_cv_type_size_t+set}" = set; then
3908   echo $ECHO_N "(cached) $ECHO_C" >&6
3909 else
3910   cat >conftest.$ac_ext <<_ACEOF
3911 /* confdefs.h.  */
3912 _ACEOF
3913 cat confdefs.h >>conftest.$ac_ext
3914 cat >>conftest.$ac_ext <<_ACEOF
3915 /* end confdefs.h.  */
3916 $ac_includes_default
3917 int
3918 main ()
3919 {
3920 if ((size_t *) 0)
3921   return 0;
3922 if (sizeof (size_t))
3923   return 0;
3924   ;
3925   return 0;
3926 }
3927 _ACEOF
3928 rm -f conftest.$ac_objext
3929 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3930   (eval $ac_compile) 2>conftest.er1
3931   ac_status=$?
3932   grep -v '^ *+' conftest.er1 >conftest.err
3933   rm -f conftest.er1
3934   cat conftest.err >&5
3935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3936   (exit $ac_status); } &&
3937          { ac_try='test -z "$ac_c_werror_flag"
3938                          || test ! -s conftest.err'
3939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3940   (eval $ac_try) 2>&5
3941   ac_status=$?
3942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3943   (exit $ac_status); }; } &&
3944          { ac_try='test -s conftest.$ac_objext'
3945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3946   (eval $ac_try) 2>&5
3947   ac_status=$?
3948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3949   (exit $ac_status); }; }; then
3950   ac_cv_type_size_t=yes
3951 else
3952   echo "$as_me: failed program was:" >&5
3953 sed 's/^/| /' conftest.$ac_ext >&5
3954
3955 ac_cv_type_size_t=no
3956 fi
3957 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3958 fi
3959 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
3960 echo "${ECHO_T}$ac_cv_type_size_t" >&6
3961 if test $ac_cv_type_size_t = yes; then
3962   :
3963 else
3964
3965 cat >>confdefs.h <<_ACEOF
3966 #define size_t unsigned
3967 _ACEOF
3968
3969 fi
3970
3971 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
3972 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
3973 if test "${ac_cv_type_signal+set}" = set; then
3974   echo $ECHO_N "(cached) $ECHO_C" >&6
3975 else
3976   cat >conftest.$ac_ext <<_ACEOF
3977 /* confdefs.h.  */
3978 _ACEOF
3979 cat confdefs.h >>conftest.$ac_ext
3980 cat >>conftest.$ac_ext <<_ACEOF
3981 /* end confdefs.h.  */
3982 #include <sys/types.h>
3983 #include <signal.h>
3984 #ifdef signal
3985 # undef signal
3986 #endif
3987 #ifdef __cplusplus
3988 extern "C" void (*signal (int, void (*)(int)))(int);
3989 #else
3990 void (*signal ()) ();
3991 #endif
3992
3993 int
3994 main ()
3995 {
3996 int i;
3997   ;
3998   return 0;
3999 }
4000 _ACEOF
4001 rm -f conftest.$ac_objext
4002 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4003   (eval $ac_compile) 2>conftest.er1
4004   ac_status=$?
4005   grep -v '^ *+' conftest.er1 >conftest.err
4006   rm -f conftest.er1
4007   cat conftest.err >&5
4008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4009   (exit $ac_status); } &&
4010          { ac_try='test -z "$ac_c_werror_flag"
4011                          || test ! -s conftest.err'
4012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4013   (eval $ac_try) 2>&5
4014   ac_status=$?
4015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4016   (exit $ac_status); }; } &&
4017          { ac_try='test -s conftest.$ac_objext'
4018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4019   (eval $ac_try) 2>&5
4020   ac_status=$?
4021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4022   (exit $ac_status); }; }; then
4023   ac_cv_type_signal=void
4024 else
4025   echo "$as_me: failed program was:" >&5
4026 sed 's/^/| /' conftest.$ac_ext >&5
4027
4028 ac_cv_type_signal=int
4029 fi
4030 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4031 fi
4032 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4033 echo "${ECHO_T}$ac_cv_type_signal" >&6
4034
4035 cat >>confdefs.h <<_ACEOF
4036 #define RETSIGTYPE $ac_cv_type_signal
4037 _ACEOF
4038
4039
4040 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4041 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4042 if test "${ac_cv_header_time+set}" = set; then
4043   echo $ECHO_N "(cached) $ECHO_C" >&6
4044 else
4045   cat >conftest.$ac_ext <<_ACEOF
4046 /* confdefs.h.  */
4047 _ACEOF
4048 cat confdefs.h >>conftest.$ac_ext
4049 cat >>conftest.$ac_ext <<_ACEOF
4050 /* end confdefs.h.  */
4051 #include <sys/types.h>
4052 #include <sys/time.h>
4053 #include <time.h>
4054
4055 int
4056 main ()
4057 {
4058 if ((struct tm *) 0)
4059 return 0;
4060   ;
4061   return 0;
4062 }
4063 _ACEOF
4064 rm -f conftest.$ac_objext
4065 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4066   (eval $ac_compile) 2>conftest.er1
4067   ac_status=$?
4068   grep -v '^ *+' conftest.er1 >conftest.err
4069   rm -f conftest.er1
4070   cat conftest.err >&5
4071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4072   (exit $ac_status); } &&
4073          { ac_try='test -z "$ac_c_werror_flag"
4074                          || test ! -s conftest.err'
4075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4076   (eval $ac_try) 2>&5
4077   ac_status=$?
4078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4079   (exit $ac_status); }; } &&
4080          { ac_try='test -s conftest.$ac_objext'
4081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4082   (eval $ac_try) 2>&5
4083   ac_status=$?
4084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085   (exit $ac_status); }; }; then
4086   ac_cv_header_time=yes
4087 else
4088   echo "$as_me: failed program was:" >&5
4089 sed 's/^/| /' conftest.$ac_ext >&5
4090
4091 ac_cv_header_time=no
4092 fi
4093 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4094 fi
4095 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
4096 echo "${ECHO_T}$ac_cv_header_time" >&6
4097 if test $ac_cv_header_time = yes; then
4098
4099 cat >>confdefs.h <<\_ACEOF
4100 #define TIME_WITH_SYS_TIME 1
4101 _ACEOF
4102
4103 fi
4104
4105 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
4106 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4107 if test "${ac_cv_header_sys_wait_h+set}" = set; then
4108   echo $ECHO_N "(cached) $ECHO_C" >&6
4109 else
4110   cat >conftest.$ac_ext <<_ACEOF
4111 /* confdefs.h.  */
4112 _ACEOF
4113 cat confdefs.h >>conftest.$ac_ext
4114 cat >>conftest.$ac_ext <<_ACEOF
4115 /* end confdefs.h.  */
4116 #include <sys/types.h>
4117 #include <sys/wait.h>
4118 #ifndef WEXITSTATUS
4119 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4120 #endif
4121 #ifndef WIFEXITED
4122 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4123 #endif
4124
4125 int
4126 main ()
4127 {
4128   int s;
4129   wait (&s);
4130   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4131   ;
4132   return 0;
4133 }
4134 _ACEOF
4135 rm -f conftest.$ac_objext
4136 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4137   (eval $ac_compile) 2>conftest.er1
4138   ac_status=$?
4139   grep -v '^ *+' conftest.er1 >conftest.err
4140   rm -f conftest.er1
4141   cat conftest.err >&5
4142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4143   (exit $ac_status); } &&
4144          { ac_try='test -z "$ac_c_werror_flag"
4145                          || test ! -s conftest.err'
4146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4147   (eval $ac_try) 2>&5
4148   ac_status=$?
4149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4150   (exit $ac_status); }; } &&
4151          { ac_try='test -s conftest.$ac_objext'
4152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4153   (eval $ac_try) 2>&5
4154   ac_status=$?
4155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4156   (exit $ac_status); }; }; then
4157   ac_cv_header_sys_wait_h=yes
4158 else
4159   echo "$as_me: failed program was:" >&5
4160 sed 's/^/| /' conftest.$ac_ext >&5
4161
4162 ac_cv_header_sys_wait_h=no
4163 fi
4164 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4165 fi
4166 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
4167 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
4168 if test $ac_cv_header_sys_wait_h = yes; then
4169
4170 cat >>confdefs.h <<\_ACEOF
4171 #define HAVE_SYS_WAIT_H 1
4172 _ACEOF
4173
4174 fi
4175
4176
4177
4178
4179
4180
4181 ac_header_dirent=no
4182 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4183   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4184 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4185 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4186 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4187   echo $ECHO_N "(cached) $ECHO_C" >&6
4188 else
4189   cat >conftest.$ac_ext <<_ACEOF
4190 /* confdefs.h.  */
4191 _ACEOF
4192 cat confdefs.h >>conftest.$ac_ext
4193 cat >>conftest.$ac_ext <<_ACEOF
4194 /* end confdefs.h.  */
4195 #include <sys/types.h>
4196 #include <$ac_hdr>
4197
4198 int
4199 main ()
4200 {
4201 if ((DIR *) 0)
4202 return 0;
4203   ;
4204   return 0;
4205 }
4206 _ACEOF
4207 rm -f conftest.$ac_objext
4208 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4209   (eval $ac_compile) 2>conftest.er1
4210   ac_status=$?
4211   grep -v '^ *+' conftest.er1 >conftest.err
4212   rm -f conftest.er1
4213   cat conftest.err >&5
4214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4215   (exit $ac_status); } &&
4216          { ac_try='test -z "$ac_c_werror_flag"
4217                          || test ! -s conftest.err'
4218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4219   (eval $ac_try) 2>&5
4220   ac_status=$?
4221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4222   (exit $ac_status); }; } &&
4223          { ac_try='test -s conftest.$ac_objext'
4224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4225   (eval $ac_try) 2>&5
4226   ac_status=$?
4227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4228   (exit $ac_status); }; }; then
4229   eval "$as_ac_Header=yes"
4230 else
4231   echo "$as_me: failed program was:" >&5
4232 sed 's/^/| /' conftest.$ac_ext >&5
4233
4234 eval "$as_ac_Header=no"
4235 fi
4236 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4237 fi
4238 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4239 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4240 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4241   cat >>confdefs.h <<_ACEOF
4242 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4243 _ACEOF
4244
4245 ac_header_dirent=$ac_hdr; break
4246 fi
4247
4248 done
4249 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4250 if test $ac_header_dirent = dirent.h; then
4251   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4252 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4253 if test "${ac_cv_search_opendir+set}" = set; then
4254   echo $ECHO_N "(cached) $ECHO_C" >&6
4255 else
4256   ac_func_search_save_LIBS=$LIBS
4257 ac_cv_search_opendir=no
4258 cat >conftest.$ac_ext <<_ACEOF
4259 /* confdefs.h.  */
4260 _ACEOF
4261 cat confdefs.h >>conftest.$ac_ext
4262 cat >>conftest.$ac_ext <<_ACEOF
4263 /* end confdefs.h.  */
4264
4265 /* Override any gcc2 internal prototype to avoid an error.  */
4266 #ifdef __cplusplus
4267 extern "C"
4268 #endif
4269 /* We use char because int might match the return type of a gcc2
4270    builtin and then its argument prototype would still apply.  */
4271 char opendir ();
4272 int
4273 main ()
4274 {
4275 opendir ();
4276   ;
4277   return 0;
4278 }
4279 _ACEOF
4280 rm -f conftest.$ac_objext conftest$ac_exeext
4281 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4282   (eval $ac_link) 2>conftest.er1
4283   ac_status=$?
4284   grep -v '^ *+' conftest.er1 >conftest.err
4285   rm -f conftest.er1
4286   cat conftest.err >&5
4287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4288   (exit $ac_status); } &&
4289          { ac_try='test -z "$ac_c_werror_flag"
4290                          || test ! -s conftest.err'
4291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4292   (eval $ac_try) 2>&5
4293   ac_status=$?
4294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4295   (exit $ac_status); }; } &&
4296          { ac_try='test -s conftest$ac_exeext'
4297   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4298   (eval $ac_try) 2>&5
4299   ac_status=$?
4300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4301   (exit $ac_status); }; }; then
4302   ac_cv_search_opendir="none required"
4303 else
4304   echo "$as_me: failed program was:" >&5
4305 sed 's/^/| /' conftest.$ac_ext >&5
4306
4307 fi
4308 rm -f conftest.err conftest.$ac_objext \
4309       conftest$ac_exeext conftest.$ac_ext
4310 if test "$ac_cv_search_opendir" = no; then
4311   for ac_lib in dir; do
4312     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4313     cat >conftest.$ac_ext <<_ACEOF
4314 /* confdefs.h.  */
4315 _ACEOF
4316 cat confdefs.h >>conftest.$ac_ext
4317 cat >>conftest.$ac_ext <<_ACEOF
4318 /* end confdefs.h.  */
4319
4320 /* Override any gcc2 internal prototype to avoid an error.  */
4321 #ifdef __cplusplus
4322 extern "C"
4323 #endif
4324 /* We use char because int might match the return type of a gcc2
4325    builtin and then its argument prototype would still apply.  */
4326 char opendir ();
4327 int
4328 main ()
4329 {
4330 opendir ();
4331   ;
4332   return 0;
4333 }
4334 _ACEOF
4335 rm -f conftest.$ac_objext conftest$ac_exeext
4336 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4337   (eval $ac_link) 2>conftest.er1
4338   ac_status=$?
4339   grep -v '^ *+' conftest.er1 >conftest.err
4340   rm -f conftest.er1
4341   cat conftest.err >&5
4342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4343   (exit $ac_status); } &&
4344          { ac_try='test -z "$ac_c_werror_flag"
4345                          || test ! -s conftest.err'
4346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4347   (eval $ac_try) 2>&5
4348   ac_status=$?
4349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4350   (exit $ac_status); }; } &&
4351          { ac_try='test -s conftest$ac_exeext'
4352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4353   (eval $ac_try) 2>&5
4354   ac_status=$?
4355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4356   (exit $ac_status); }; }; then
4357   ac_cv_search_opendir="-l$ac_lib"
4358 break
4359 else
4360   echo "$as_me: failed program was:" >&5
4361 sed 's/^/| /' conftest.$ac_ext >&5
4362
4363 fi
4364 rm -f conftest.err conftest.$ac_objext \
4365       conftest$ac_exeext conftest.$ac_ext
4366   done
4367 fi
4368 LIBS=$ac_func_search_save_LIBS
4369 fi
4370 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4371 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4372 if test "$ac_cv_search_opendir" != no; then
4373   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4374
4375 fi
4376
4377 else
4378   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4379 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4380 if test "${ac_cv_search_opendir+set}" = set; then
4381   echo $ECHO_N "(cached) $ECHO_C" >&6
4382 else
4383   ac_func_search_save_LIBS=$LIBS
4384 ac_cv_search_opendir=no
4385 cat >conftest.$ac_ext <<_ACEOF
4386 /* confdefs.h.  */
4387 _ACEOF
4388 cat confdefs.h >>conftest.$ac_ext
4389 cat >>conftest.$ac_ext <<_ACEOF
4390 /* end confdefs.h.  */
4391
4392 /* Override any gcc2 internal prototype to avoid an error.  */
4393 #ifdef __cplusplus
4394 extern "C"
4395 #endif
4396 /* We use char because int might match the return type of a gcc2
4397    builtin and then its argument prototype would still apply.  */
4398 char opendir ();
4399 int
4400 main ()
4401 {
4402 opendir ();
4403   ;
4404   return 0;
4405 }
4406 _ACEOF
4407 rm -f conftest.$ac_objext conftest$ac_exeext
4408 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4409   (eval $ac_link) 2>conftest.er1
4410   ac_status=$?
4411   grep -v '^ *+' conftest.er1 >conftest.err
4412   rm -f conftest.er1
4413   cat conftest.err >&5
4414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4415   (exit $ac_status); } &&
4416          { ac_try='test -z "$ac_c_werror_flag"
4417                          || test ! -s conftest.err'
4418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4419   (eval $ac_try) 2>&5
4420   ac_status=$?
4421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4422   (exit $ac_status); }; } &&
4423          { ac_try='test -s conftest$ac_exeext'
4424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4425   (eval $ac_try) 2>&5
4426   ac_status=$?
4427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4428   (exit $ac_status); }; }; then
4429   ac_cv_search_opendir="none required"
4430 else
4431   echo "$as_me: failed program was:" >&5
4432 sed 's/^/| /' conftest.$ac_ext >&5
4433
4434 fi
4435 rm -f conftest.err conftest.$ac_objext \
4436       conftest$ac_exeext conftest.$ac_ext
4437 if test "$ac_cv_search_opendir" = no; then
4438   for ac_lib in x; do
4439     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4440     cat >conftest.$ac_ext <<_ACEOF
4441 /* confdefs.h.  */
4442 _ACEOF
4443 cat confdefs.h >>conftest.$ac_ext
4444 cat >>conftest.$ac_ext <<_ACEOF
4445 /* end confdefs.h.  */
4446
4447 /* Override any gcc2 internal prototype to avoid an error.  */
4448 #ifdef __cplusplus
4449 extern "C"
4450 #endif
4451 /* We use char because int might match the return type of a gcc2
4452    builtin and then its argument prototype would still apply.  */
4453 char opendir ();
4454 int
4455 main ()
4456 {
4457 opendir ();
4458   ;
4459   return 0;
4460 }
4461 _ACEOF
4462 rm -f conftest.$ac_objext conftest$ac_exeext
4463 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4464   (eval $ac_link) 2>conftest.er1
4465   ac_status=$?
4466   grep -v '^ *+' conftest.er1 >conftest.err
4467   rm -f conftest.er1
4468   cat conftest.err >&5
4469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4470   (exit $ac_status); } &&
4471          { ac_try='test -z "$ac_c_werror_flag"
4472                          || test ! -s conftest.err'
4473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4474   (eval $ac_try) 2>&5
4475   ac_status=$?
4476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4477   (exit $ac_status); }; } &&
4478          { ac_try='test -s conftest$ac_exeext'
4479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4480   (eval $ac_try) 2>&5
4481   ac_status=$?
4482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4483   (exit $ac_status); }; }; then
4484   ac_cv_search_opendir="-l$ac_lib"
4485 break
4486 else
4487   echo "$as_me: failed program was:" >&5
4488 sed 's/^/| /' conftest.$ac_ext >&5
4489
4490 fi
4491 rm -f conftest.err conftest.$ac_objext \
4492       conftest$ac_exeext conftest.$ac_ext
4493   done
4494 fi
4495 LIBS=$ac_func_search_save_LIBS
4496 fi
4497 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4498 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4499 if test "$ac_cv_search_opendir" != no; then
4500   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4501
4502 fi
4503
4504 fi
4505
4506 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4507 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4508   if test "${ac_cv_gettimeofday_args+set}" = set; then
4509   echo $ECHO_N "(cached) $ECHO_C" >&6
4510 else
4511   cat >conftest.$ac_ext <<_ACEOF
4512 /* confdefs.h.  */
4513 _ACEOF
4514 cat confdefs.h >>conftest.$ac_ext
4515 cat >>conftest.$ac_ext <<_ACEOF
4516 /* end confdefs.h.  */
4517 #include <stdlib.h>
4518                     #include <sys/time.h>
4519 int
4520 main ()
4521 {
4522 struct timeval tv; struct timezone tzp;
4523                     gettimeofday(&tv, &tzp);
4524   ;
4525   return 0;
4526 }
4527 _ACEOF
4528 rm -f conftest.$ac_objext
4529 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4530   (eval $ac_compile) 2>conftest.er1
4531   ac_status=$?
4532   grep -v '^ *+' conftest.er1 >conftest.err
4533   rm -f conftest.er1
4534   cat conftest.err >&5
4535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4536   (exit $ac_status); } &&
4537          { ac_try='test -z "$ac_c_werror_flag"
4538                          || test ! -s conftest.err'
4539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4540   (eval $ac_try) 2>&5
4541   ac_status=$?
4542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4543   (exit $ac_status); }; } &&
4544          { ac_try='test -s conftest.$ac_objext'
4545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4546   (eval $ac_try) 2>&5
4547   ac_status=$?
4548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4549   (exit $ac_status); }; }; then
4550   ac_gettimeofday_args=2
4551 else
4552   echo "$as_me: failed program was:" >&5
4553 sed 's/^/| /' conftest.$ac_ext >&5
4554
4555 cat >conftest.$ac_ext <<_ACEOF
4556 /* confdefs.h.  */
4557 _ACEOF
4558 cat confdefs.h >>conftest.$ac_ext
4559 cat >>conftest.$ac_ext <<_ACEOF
4560 /* end confdefs.h.  */
4561 #include <stdlib.h>
4562                                     #include <sys/time.h>
4563 int
4564 main ()
4565 {
4566 struct timeval tv; gettimeofday(&tv);
4567   ;
4568   return 0;
4569 }
4570 _ACEOF
4571 rm -f conftest.$ac_objext
4572 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4573   (eval $ac_compile) 2>conftest.er1
4574   ac_status=$?
4575   grep -v '^ *+' conftest.er1 >conftest.err
4576   rm -f conftest.er1
4577   cat conftest.err >&5
4578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4579   (exit $ac_status); } &&
4580          { ac_try='test -z "$ac_c_werror_flag"
4581                          || test ! -s conftest.err'
4582   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4583   (eval $ac_try) 2>&5
4584   ac_status=$?
4585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4586   (exit $ac_status); }; } &&
4587          { ac_try='test -s conftest.$ac_objext'
4588   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4589   (eval $ac_try) 2>&5
4590   ac_status=$?
4591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4592   (exit $ac_status); }; }; then
4593   ac_gettimeofday_args=1
4594 else
4595   echo "$as_me: failed program was:" >&5
4596 sed 's/^/| /' conftest.$ac_ext >&5
4597
4598 ac_gettimeofday_args=0
4599 fi
4600 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4601 fi
4602 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4603     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4604 fi
4605
4606   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4607   if test "$ac_gettimeofday_args" = 1 ; then
4608     cat >>confdefs.h <<\_ACEOF
4609 #define HAVE_GETTIMEOFDAY 1
4610 _ACEOF
4611
4612     echo "$as_me:$LINENO: result: one argument" >&5
4613 echo "${ECHO_T}one argument" >&6
4614   elif test "$ac_gettimeofday_args" = 2 ; then
4615     cat >>confdefs.h <<\_ACEOF
4616 #define HAVE_GETTIMEOFDAY 1
4617 _ACEOF
4618
4619     cat >>confdefs.h <<\_ACEOF
4620 #define GETTIMEOFDAY_TWO_ARGS 1
4621 _ACEOF
4622
4623     echo "$as_me:$LINENO: result: two arguments" >&5
4624 echo "${ECHO_T}two arguments" >&6
4625   else
4626     echo "$as_me:$LINENO: result: unknown" >&5
4627 echo "${ECHO_T}unknown" >&6
4628   fi
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4640 do
4641 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4642 echo "$as_me:$LINENO: checking for $ac_func" >&5
4643 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4644 if eval "test \"\${$as_ac_var+set}\" = set"; then
4645   echo $ECHO_N "(cached) $ECHO_C" >&6
4646 else
4647   cat >conftest.$ac_ext <<_ACEOF
4648 /* confdefs.h.  */
4649 _ACEOF
4650 cat confdefs.h >>conftest.$ac_ext
4651 cat >>conftest.$ac_ext <<_ACEOF
4652 /* end confdefs.h.  */
4653 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4654    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4655 #define $ac_func innocuous_$ac_func
4656
4657 /* System header to define __stub macros and hopefully few prototypes,
4658     which can conflict with char $ac_func (); below.
4659     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4660     <limits.h> exists even on freestanding compilers.  */
4661
4662 #ifdef __STDC__
4663 # include <limits.h>
4664 #else
4665 # include <assert.h>
4666 #endif
4667
4668 #undef $ac_func
4669
4670 /* Override any gcc2 internal prototype to avoid an error.  */
4671 #ifdef __cplusplus
4672 extern "C"
4673 {
4674 #endif
4675 /* We use char because int might match the return type of a gcc2
4676    builtin and then its argument prototype would still apply.  */
4677 char $ac_func ();
4678 /* The GNU C library defines this for functions which it implements
4679     to always fail with ENOSYS.  Some functions are actually named
4680     something starting with __ and the normal name is an alias.  */
4681 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4682 choke me
4683 #else
4684 char (*f) () = $ac_func;
4685 #endif
4686 #ifdef __cplusplus
4687 }
4688 #endif
4689
4690 int
4691 main ()
4692 {
4693 return f != $ac_func;
4694   ;
4695   return 0;
4696 }
4697 _ACEOF
4698 rm -f conftest.$ac_objext conftest$ac_exeext
4699 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4700   (eval $ac_link) 2>conftest.er1
4701   ac_status=$?
4702   grep -v '^ *+' conftest.er1 >conftest.err
4703   rm -f conftest.er1
4704   cat conftest.err >&5
4705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4706   (exit $ac_status); } &&
4707          { ac_try='test -z "$ac_c_werror_flag"
4708                          || test ! -s conftest.err'
4709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4710   (eval $ac_try) 2>&5
4711   ac_status=$?
4712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4713   (exit $ac_status); }; } &&
4714          { ac_try='test -s conftest$ac_exeext'
4715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4716   (eval $ac_try) 2>&5
4717   ac_status=$?
4718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4719   (exit $ac_status); }; }; then
4720   eval "$as_ac_var=yes"
4721 else
4722   echo "$as_me: failed program was:" >&5
4723 sed 's/^/| /' conftest.$ac_ext >&5
4724
4725 eval "$as_ac_var=no"
4726 fi
4727 rm -f conftest.err conftest.$ac_objext \
4728       conftest$ac_exeext conftest.$ac_ext
4729 fi
4730 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4731 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4732 if test `eval echo '${'$as_ac_var'}'` = yes; then
4733   cat >>confdefs.h <<_ACEOF
4734 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4735 _ACEOF
4736
4737 fi
4738 done
4739
4740
4741
4742
4743
4744 for ac_func in sigaction syslog realpath setrlimit
4745 do
4746 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4747 echo "$as_me:$LINENO: checking for $ac_func" >&5
4748 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4749 if eval "test \"\${$as_ac_var+set}\" = set"; then
4750   echo $ECHO_N "(cached) $ECHO_C" >&6
4751 else
4752   cat >conftest.$ac_ext <<_ACEOF
4753 /* confdefs.h.  */
4754 _ACEOF
4755 cat confdefs.h >>conftest.$ac_ext
4756 cat >>conftest.$ac_ext <<_ACEOF
4757 /* end confdefs.h.  */
4758 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4759    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4760 #define $ac_func innocuous_$ac_func
4761
4762 /* System header to define __stub macros and hopefully few prototypes,
4763     which can conflict with char $ac_func (); below.
4764     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4765     <limits.h> exists even on freestanding compilers.  */
4766
4767 #ifdef __STDC__
4768 # include <limits.h>
4769 #else
4770 # include <assert.h>
4771 #endif
4772
4773 #undef $ac_func
4774
4775 /* Override any gcc2 internal prototype to avoid an error.  */
4776 #ifdef __cplusplus
4777 extern "C"
4778 {
4779 #endif
4780 /* We use char because int might match the return type of a gcc2
4781    builtin and then its argument prototype would still apply.  */
4782 char $ac_func ();
4783 /* The GNU C library defines this for functions which it implements
4784     to always fail with ENOSYS.  Some functions are actually named
4785     something starting with __ and the normal name is an alias.  */
4786 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4787 choke me
4788 #else
4789 char (*f) () = $ac_func;
4790 #endif
4791 #ifdef __cplusplus
4792 }
4793 #endif
4794
4795 int
4796 main ()
4797 {
4798 return f != $ac_func;
4799   ;
4800   return 0;
4801 }
4802 _ACEOF
4803 rm -f conftest.$ac_objext conftest$ac_exeext
4804 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4805   (eval $ac_link) 2>conftest.er1
4806   ac_status=$?
4807   grep -v '^ *+' conftest.er1 >conftest.err
4808   rm -f conftest.er1
4809   cat conftest.err >&5
4810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4811   (exit $ac_status); } &&
4812          { ac_try='test -z "$ac_c_werror_flag"
4813                          || test ! -s conftest.err'
4814   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4815   (eval $ac_try) 2>&5
4816   ac_status=$?
4817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4818   (exit $ac_status); }; } &&
4819          { ac_try='test -s conftest$ac_exeext'
4820   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4821   (eval $ac_try) 2>&5
4822   ac_status=$?
4823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4824   (exit $ac_status); }; }; then
4825   eval "$as_ac_var=yes"
4826 else
4827   echo "$as_me: failed program was:" >&5
4828 sed 's/^/| /' conftest.$ac_ext >&5
4829
4830 eval "$as_ac_var=no"
4831 fi
4832 rm -f conftest.err conftest.$ac_objext \
4833       conftest$ac_exeext conftest.$ac_ext
4834 fi
4835 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4836 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4837 if test `eval echo '${'$as_ac_var'}'` = yes; then
4838   cat >>confdefs.h <<_ACEOF
4839 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4840 _ACEOF
4841
4842 fi
4843 done
4844
4845 echo "$as_me:$LINENO: checking for struct icmp" >&5
4846 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
4847 if test "${ac_cv_have_icmp+set}" = set; then
4848   echo $ECHO_N "(cached) $ECHO_C" >&6
4849 else
4850   cat >conftest.$ac_ext <<_ACEOF
4851 /* confdefs.h.  */
4852 _ACEOF
4853 cat confdefs.h >>conftest.$ac_ext
4854 cat >>conftest.$ac_ext <<_ACEOF
4855 /* end confdefs.h.  */
4856 #include <stdlib.h>
4857                    #include <stdio.h>
4858                    #include <math.h>
4859                    #include <unistd.h>
4860                    #include <limits.h>
4861                    #include <signal.h>
4862                    #include <fcntl.h>
4863                    #include <sys/types.h>
4864                    #include <sys/time.h>
4865                    #include <sys/ipc.h>
4866                    #include <sys/shm.h>
4867                    #include <sys/socket.h>
4868                    #include <netinet/in_systm.h>
4869                    #include <netinet/in.h>
4870                    #include <netinet/ip.h>
4871                    #include <netinet/ip_icmp.h>
4872                    #include <netinet/udp.h>
4873                    #include <arpa/inet.h>
4874                    #include <netdb.h>
4875 int
4876 main ()
4877 {
4878 struct icmp i;
4879                    struct sockaddr s;
4880                    struct sockaddr_in si;
4881                    struct ip ip;
4882                    i.icmp_type = ICMP_ECHO;
4883                    i.icmp_code = 0;
4884                    i.icmp_cksum = 0;
4885                    i.icmp_id = 0;
4886                    i.icmp_seq = 0;
4887                    si.sin_family = AF_INET;
4888                    #if defined(__DECC) || defined(_IP_VHL)
4889                    ip.ip_vhl = 0;
4890                    #else
4891                    ip.ip_hl = 0;
4892                    #endif
4893
4894   ;
4895   return 0;
4896 }
4897 _ACEOF
4898 rm -f conftest.$ac_objext
4899 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4900   (eval $ac_compile) 2>conftest.er1
4901   ac_status=$?
4902   grep -v '^ *+' conftest.er1 >conftest.err
4903   rm -f conftest.er1
4904   cat conftest.err >&5
4905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4906   (exit $ac_status); } &&
4907          { ac_try='test -z "$ac_c_werror_flag"
4908                          || test ! -s conftest.err'
4909   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4910   (eval $ac_try) 2>&5
4911   ac_status=$?
4912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4913   (exit $ac_status); }; } &&
4914          { ac_try='test -s conftest.$ac_objext'
4915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4916   (eval $ac_try) 2>&5
4917   ac_status=$?
4918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4919   (exit $ac_status); }; }; then
4920   ac_cv_have_icmp=yes
4921 else
4922   echo "$as_me: failed program was:" >&5
4923 sed 's/^/| /' conftest.$ac_ext >&5
4924
4925 ac_cv_have_icmp=no
4926 fi
4927 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4928 fi
4929 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
4930 echo "${ECHO_T}$ac_cv_have_icmp" >&6
4931  if test "$ac_cv_have_icmp" = yes ; then
4932    cat >>confdefs.h <<\_ACEOF
4933 #define HAVE_ICMP 1
4934 _ACEOF
4935
4936  fi
4937 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
4938 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
4939 if test "${ac_cv_have_icmphdr+set}" = set; then
4940   echo $ECHO_N "(cached) $ECHO_C" >&6
4941 else
4942   cat >conftest.$ac_ext <<_ACEOF
4943 /* confdefs.h.  */
4944 _ACEOF
4945 cat confdefs.h >>conftest.$ac_ext
4946 cat >>conftest.$ac_ext <<_ACEOF
4947 /* end confdefs.h.  */
4948 #include <stdlib.h>
4949                    #include <stdio.h>
4950                    #include <math.h>
4951                    #include <unistd.h>
4952                    #include <limits.h>
4953                    #include <signal.h>
4954                    #include <fcntl.h>
4955                    #include <sys/types.h>
4956                    #include <sys/time.h>
4957                    #include <sys/ipc.h>
4958                    #include <sys/shm.h>
4959                    #include <sys/socket.h>
4960                    #include <netinet/in_systm.h>
4961                    #include <netinet/in.h>
4962                    #include <netinet/ip.h>
4963                    #include <netinet/ip_icmp.h>
4964                    #include <netinet/udp.h>
4965                    #include <arpa/inet.h>
4966                    #include <netdb.h>
4967 int
4968 main ()
4969 {
4970 struct icmphdr i;
4971                    struct sockaddr s;
4972                    struct sockaddr_in si;
4973                    struct ip ip;
4974                    i.type = ICMP_ECHO;
4975                    i.code = 0;
4976                    i.checksum = 0;
4977                    i.un.echo.id = 0;
4978                    i.un.echo.sequence = 0;
4979                    si.sin_family = AF_INET;
4980                    ip.ip_hl = 0;
4981   ;
4982   return 0;
4983 }
4984 _ACEOF
4985 rm -f conftest.$ac_objext
4986 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4987   (eval $ac_compile) 2>conftest.er1
4988   ac_status=$?
4989   grep -v '^ *+' conftest.er1 >conftest.err
4990   rm -f conftest.er1
4991   cat conftest.err >&5
4992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4993   (exit $ac_status); } &&
4994          { ac_try='test -z "$ac_c_werror_flag"
4995                          || test ! -s conftest.err'
4996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4997   (eval $ac_try) 2>&5
4998   ac_status=$?
4999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5000   (exit $ac_status); }; } &&
5001          { ac_try='test -s conftest.$ac_objext'
5002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5003   (eval $ac_try) 2>&5
5004   ac_status=$?
5005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5006   (exit $ac_status); }; }; then
5007   ac_cv_have_icmphdr=yes
5008 else
5009   echo "$as_me: failed program was:" >&5
5010 sed 's/^/| /' conftest.$ac_ext >&5
5011
5012 ac_cv_have_icmphdr=no
5013 fi
5014 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5015 fi
5016 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
5017 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
5018  if test "$ac_cv_have_icmphdr" = yes ; then
5019    cat >>confdefs.h <<\_ACEOF
5020 #define HAVE_ICMPHDR 1
5021 _ACEOF
5022
5023  fi
5024
5025
5026 for ac_header in crypt.h sys/select.h
5027 do
5028 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5029 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5030   echo "$as_me:$LINENO: checking for $ac_header" >&5
5031 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5032 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5033   echo $ECHO_N "(cached) $ECHO_C" >&6
5034 fi
5035 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5036 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5037 else
5038   # Is the header compilable?
5039 echo "$as_me:$LINENO: checking $ac_header usability" >&5
5040 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5041 cat >conftest.$ac_ext <<_ACEOF
5042 /* confdefs.h.  */
5043 _ACEOF
5044 cat confdefs.h >>conftest.$ac_ext
5045 cat >>conftest.$ac_ext <<_ACEOF
5046 /* end confdefs.h.  */
5047 $ac_includes_default
5048 #include <$ac_header>
5049 _ACEOF
5050 rm -f conftest.$ac_objext
5051 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5052   (eval $ac_compile) 2>conftest.er1
5053   ac_status=$?
5054   grep -v '^ *+' conftest.er1 >conftest.err
5055   rm -f conftest.er1
5056   cat conftest.err >&5
5057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5058   (exit $ac_status); } &&
5059          { ac_try='test -z "$ac_c_werror_flag"
5060                          || test ! -s conftest.err'
5061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5062   (eval $ac_try) 2>&5
5063   ac_status=$?
5064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065   (exit $ac_status); }; } &&
5066          { ac_try='test -s conftest.$ac_objext'
5067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5068   (eval $ac_try) 2>&5
5069   ac_status=$?
5070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5071   (exit $ac_status); }; }; then
5072   ac_header_compiler=yes
5073 else
5074   echo "$as_me: failed program was:" >&5
5075 sed 's/^/| /' conftest.$ac_ext >&5
5076
5077 ac_header_compiler=no
5078 fi
5079 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5080 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5081 echo "${ECHO_T}$ac_header_compiler" >&6
5082
5083 # Is the header present?
5084 echo "$as_me:$LINENO: checking $ac_header presence" >&5
5085 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5086 cat >conftest.$ac_ext <<_ACEOF
5087 /* confdefs.h.  */
5088 _ACEOF
5089 cat confdefs.h >>conftest.$ac_ext
5090 cat >>conftest.$ac_ext <<_ACEOF
5091 /* end confdefs.h.  */
5092 #include <$ac_header>
5093 _ACEOF
5094 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5095   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5096   ac_status=$?
5097   grep -v '^ *+' conftest.er1 >conftest.err
5098   rm -f conftest.er1
5099   cat conftest.err >&5
5100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101   (exit $ac_status); } >/dev/null; then
5102   if test -s conftest.err; then
5103     ac_cpp_err=$ac_c_preproc_warn_flag
5104     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5105   else
5106     ac_cpp_err=
5107   fi
5108 else
5109   ac_cpp_err=yes
5110 fi
5111 if test -z "$ac_cpp_err"; then
5112   ac_header_preproc=yes
5113 else
5114   echo "$as_me: failed program was:" >&5
5115 sed 's/^/| /' conftest.$ac_ext >&5
5116
5117   ac_header_preproc=no
5118 fi
5119 rm -f conftest.err conftest.$ac_ext
5120 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5121 echo "${ECHO_T}$ac_header_preproc" >&6
5122
5123 # So?  What about this header?
5124 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5125   yes:no: )
5126     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5127 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5128     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5129 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5130     ac_header_preproc=yes
5131     ;;
5132   no:yes:* )
5133     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5134 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5135     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
5136 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
5137     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5138 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5139     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
5140 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
5141     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5142 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5143     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5144 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5145     (
5146       cat <<\_ASBOX
5147 ## ------------------------------------------ ##
5148 ## Report this to the AC_PACKAGE_NAME lists.  ##
5149 ## ------------------------------------------ ##
5150 _ASBOX
5151     ) |
5152       sed "s/^/$as_me: WARNING:     /" >&2
5153     ;;
5154 esac
5155 echo "$as_me:$LINENO: checking for $ac_header" >&5
5156 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5157 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5158   echo $ECHO_N "(cached) $ECHO_C" >&6
5159 else
5160   eval "$as_ac_Header=\$ac_header_preproc"
5161 fi
5162 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5163 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5164
5165 fi
5166 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5167   cat >>confdefs.h <<_ACEOF
5168 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5169 _ACEOF
5170
5171 fi
5172
5173 done
5174
5175 for ac_prog in perl5 perl
5176 do
5177   # Extract the first word of "$ac_prog", so it can be a program name with args.
5178 set dummy $ac_prog; ac_word=$2
5179 echo "$as_me:$LINENO: checking for $ac_word" >&5
5180 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5181 if test "${ac_cv_path_PERL+set}" = set; then
5182   echo $ECHO_N "(cached) $ECHO_C" >&6
5183 else
5184   case $PERL in
5185   [\\/]* | ?:[\\/]*)
5186   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5187   ;;
5188   *)
5189   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5190 for as_dir in $PATH
5191 do
5192   IFS=$as_save_IFS
5193   test -z "$as_dir" && as_dir=.
5194   for ac_exec_ext in '' $ac_executable_extensions; do
5195   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5196     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5197     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5198     break 2
5199   fi
5200 done
5201 done
5202
5203   ;;
5204 esac
5205 fi
5206 PERL=$ac_cv_path_PERL
5207
5208 if test -n "$PERL"; then
5209   echo "$as_me:$LINENO: result: $PERL" >&5
5210 echo "${ECHO_T}$PERL" >&6
5211 else
5212   echo "$as_me:$LINENO: result: no" >&5
5213 echo "${ECHO_T}no" >&6
5214 fi
5215
5216   test -n "$PERL" && break
5217 done
5218
5219   if test -z "$PERL" ; then
5220     PERL_VERSION=0
5221   else
5222     echo "$as_me:$LINENO: checking perl version" >&5
5223 echo $ECHO_N "checking perl version... $ECHO_C" >&6
5224 if test "${ac_cv_perl_version+set}" = set; then
5225   echo $ECHO_N "(cached) $ECHO_C" >&6
5226 else
5227   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
5228 fi
5229 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
5230 echo "${ECHO_T}$ac_cv_perl_version" >&6
5231     PERL_VERSION=$ac_cv_perl_version
5232   fi
5233
5234
5235 if test -z "$PERL" ; then
5236   # don't let it be blank...
5237   PERL=/usr/bin/perl
5238 fi
5239
5240 echo "$as_me:$LINENO: checking for X" >&5
5241 echo $ECHO_N "checking for X... $ECHO_C" >&6
5242
5243
5244 # Check whether --with-x or --without-x was given.
5245 if test "${with_x+set}" = set; then
5246   withval="$with_x"
5247
5248 fi;
5249 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5250 if test "x$with_x" = xno; then
5251   # The user explicitly disabled X.
5252   have_x=disabled
5253 else
5254   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5255     # Both variables are already set.
5256     have_x=yes
5257   else
5258     if test "${ac_cv_have_x+set}" = set; then
5259   echo $ECHO_N "(cached) $ECHO_C" >&6
5260 else
5261   # One or both of the vars are not set, and there is no cached value.
5262 ac_x_includes=no ac_x_libraries=no
5263 rm -fr conftest.dir
5264 if mkdir conftest.dir; then
5265   cd conftest.dir
5266   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5267   cat >Imakefile <<'_ACEOF'
5268 acfindx:
5269         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5270 _ACEOF
5271   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5272     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5273     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5274     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5275     for ac_extension in a so sl; do
5276       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5277          test -f $ac_im_libdir/libX11.$ac_extension; then
5278         ac_im_usrlibdir=$ac_im_libdir; break
5279       fi
5280     done
5281     # Screen out bogus values from the imake configuration.  They are
5282     # bogus both because they are the default anyway, and because
5283     # using them would break gcc on systems where it needs fixed includes.
5284     case $ac_im_incroot in
5285         /usr/include) ;;
5286         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
5287     esac
5288     case $ac_im_usrlibdir in
5289         /usr/lib | /lib) ;;
5290         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
5291     esac
5292   fi
5293   cd ..
5294   rm -fr conftest.dir
5295 fi
5296
5297 # Standard set of common directories for X headers.
5298 # Check X11 before X11Rn because it is often a symlink to the current release.
5299 ac_x_header_dirs='
5300 /usr/X11/include
5301 /usr/X11R6/include
5302 /usr/X11R5/include
5303 /usr/X11R4/include
5304
5305 /usr/include/X11
5306 /usr/include/X11R6
5307 /usr/include/X11R5
5308 /usr/include/X11R4
5309
5310 /usr/local/X11/include
5311 /usr/local/X11R6/include
5312 /usr/local/X11R5/include
5313 /usr/local/X11R4/include
5314
5315 /usr/local/include/X11
5316 /usr/local/include/X11R6
5317 /usr/local/include/X11R5
5318 /usr/local/include/X11R4
5319
5320 /usr/X386/include
5321 /usr/x386/include
5322 /usr/XFree86/include/X11
5323
5324 /usr/include
5325 /usr/local/include
5326 /usr/unsupported/include
5327 /usr/athena/include
5328 /usr/local/x11r5/include
5329 /usr/lpp/Xamples/include
5330
5331 /usr/openwin/include
5332 /usr/openwin/share/include'
5333
5334 if test "$ac_x_includes" = no; then
5335   # Guess where to find include files, by looking for Intrinsic.h.
5336   # First, try using that file with no special directory specified.
5337   cat >conftest.$ac_ext <<_ACEOF
5338 /* confdefs.h.  */
5339 _ACEOF
5340 cat confdefs.h >>conftest.$ac_ext
5341 cat >>conftest.$ac_ext <<_ACEOF
5342 /* end confdefs.h.  */
5343 #include <X11/Intrinsic.h>
5344 _ACEOF
5345 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5346   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5347   ac_status=$?
5348   grep -v '^ *+' conftest.er1 >conftest.err
5349   rm -f conftest.er1
5350   cat conftest.err >&5
5351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5352   (exit $ac_status); } >/dev/null; then
5353   if test -s conftest.err; then
5354     ac_cpp_err=$ac_c_preproc_warn_flag
5355     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5356   else
5357     ac_cpp_err=
5358   fi
5359 else
5360   ac_cpp_err=yes
5361 fi
5362 if test -z "$ac_cpp_err"; then
5363   # We can compile using X headers with no special include directory.
5364 ac_x_includes=
5365 else
5366   echo "$as_me: failed program was:" >&5
5367 sed 's/^/| /' conftest.$ac_ext >&5
5368
5369   for ac_dir in $ac_x_header_dirs; do
5370   if test -r "$ac_dir/X11/Intrinsic.h"; then
5371     ac_x_includes=$ac_dir
5372     break
5373   fi
5374 done
5375 fi
5376 rm -f conftest.err conftest.$ac_ext
5377 fi # $ac_x_includes = no
5378
5379 if test "$ac_x_libraries" = no; then
5380   # Check for the libraries.
5381   # See if we find them without any special options.
5382   # Don't add to $LIBS permanently.
5383   ac_save_LIBS=$LIBS
5384   LIBS="-lXt $LIBS"
5385   cat >conftest.$ac_ext <<_ACEOF
5386 /* confdefs.h.  */
5387 _ACEOF
5388 cat confdefs.h >>conftest.$ac_ext
5389 cat >>conftest.$ac_ext <<_ACEOF
5390 /* end confdefs.h.  */
5391 #include <X11/Intrinsic.h>
5392 int
5393 main ()
5394 {
5395 XtMalloc (0)
5396   ;
5397   return 0;
5398 }
5399 _ACEOF
5400 rm -f conftest.$ac_objext conftest$ac_exeext
5401 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5402   (eval $ac_link) 2>conftest.er1
5403   ac_status=$?
5404   grep -v '^ *+' conftest.er1 >conftest.err
5405   rm -f conftest.er1
5406   cat conftest.err >&5
5407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5408   (exit $ac_status); } &&
5409          { ac_try='test -z "$ac_c_werror_flag"
5410                          || test ! -s conftest.err'
5411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5412   (eval $ac_try) 2>&5
5413   ac_status=$?
5414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5415   (exit $ac_status); }; } &&
5416          { ac_try='test -s conftest$ac_exeext'
5417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5418   (eval $ac_try) 2>&5
5419   ac_status=$?
5420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5421   (exit $ac_status); }; }; then
5422   LIBS=$ac_save_LIBS
5423 # We can link X programs with no special library path.
5424 ac_x_libraries=
5425 else
5426   echo "$as_me: failed program was:" >&5
5427 sed 's/^/| /' conftest.$ac_ext >&5
5428
5429 LIBS=$ac_save_LIBS
5430 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5431 do
5432   # Don't even attempt the hair of trying to link an X program!
5433   for ac_extension in a so sl; do
5434     if test -r $ac_dir/libXt.$ac_extension; then
5435       ac_x_libraries=$ac_dir
5436       break 2
5437     fi
5438   done
5439 done
5440 fi
5441 rm -f conftest.err conftest.$ac_objext \
5442       conftest$ac_exeext conftest.$ac_ext
5443 fi # $ac_x_libraries = no
5444
5445 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
5446   # Didn't find X anywhere.  Cache the known absence of X.
5447   ac_cv_have_x="have_x=no"
5448 else
5449   # Record where we found X for the cache.
5450   ac_cv_have_x="have_x=yes \
5451                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5452 fi
5453 fi
5454
5455   fi
5456   eval "$ac_cv_have_x"
5457 fi # $with_x != no
5458
5459 if test "$have_x" != yes; then
5460   echo "$as_me:$LINENO: result: $have_x" >&5
5461 echo "${ECHO_T}$have_x" >&6
5462   no_x=yes
5463 else
5464   # If each of the values was on the command line, it overrides each guess.
5465   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5466   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5467   # Update the cache value to reflect the command line values.
5468   ac_cv_have_x="have_x=yes \
5469                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5470   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
5471 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5472 fi
5473
5474 if test "$no_x" = yes; then
5475   # Not all programs may use this symbol, but it does not hurt to define it.
5476
5477 cat >>confdefs.h <<\_ACEOF
5478 #define X_DISPLAY_MISSING 1
5479 _ACEOF
5480
5481   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5482 else
5483   if test -n "$x_includes"; then
5484     X_CFLAGS="$X_CFLAGS -I$x_includes"
5485   fi
5486
5487   # It would also be nice to do this for all -L options, not just this one.
5488   if test -n "$x_libraries"; then
5489     X_LIBS="$X_LIBS -L$x_libraries"
5490     # For Solaris; some versions of Sun CC require a space after -R and
5491     # others require no space.  Words are not sufficient . . . .
5492     case `(uname -sr) 2>/dev/null` in
5493     "SunOS 5"*)
5494       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
5495 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
5496       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
5497       cat >conftest.$ac_ext <<_ACEOF
5498 /* confdefs.h.  */
5499 _ACEOF
5500 cat confdefs.h >>conftest.$ac_ext
5501 cat >>conftest.$ac_ext <<_ACEOF
5502 /* end confdefs.h.  */
5503
5504 int
5505 main ()
5506 {
5507
5508   ;
5509   return 0;
5510 }
5511 _ACEOF
5512 rm -f conftest.$ac_objext conftest$ac_exeext
5513 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5514   (eval $ac_link) 2>conftest.er1
5515   ac_status=$?
5516   grep -v '^ *+' conftest.er1 >conftest.err
5517   rm -f conftest.er1
5518   cat conftest.err >&5
5519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5520   (exit $ac_status); } &&
5521          { ac_try='test -z "$ac_c_werror_flag"
5522                          || test ! -s conftest.err'
5523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5524   (eval $ac_try) 2>&5
5525   ac_status=$?
5526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5527   (exit $ac_status); }; } &&
5528          { ac_try='test -s conftest$ac_exeext'
5529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5530   (eval $ac_try) 2>&5
5531   ac_status=$?
5532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5533   (exit $ac_status); }; }; then
5534   ac_R_nospace=yes
5535 else
5536   echo "$as_me: failed program was:" >&5
5537 sed 's/^/| /' conftest.$ac_ext >&5
5538
5539 ac_R_nospace=no
5540 fi
5541 rm -f conftest.err conftest.$ac_objext \
5542       conftest$ac_exeext conftest.$ac_ext
5543       if test $ac_R_nospace = yes; then
5544         echo "$as_me:$LINENO: result: no" >&5
5545 echo "${ECHO_T}no" >&6
5546         X_LIBS="$X_LIBS -R$x_libraries"
5547       else
5548         LIBS="$ac_xsave_LIBS -R $x_libraries"
5549         cat >conftest.$ac_ext <<_ACEOF
5550 /* confdefs.h.  */
5551 _ACEOF
5552 cat confdefs.h >>conftest.$ac_ext
5553 cat >>conftest.$ac_ext <<_ACEOF
5554 /* end confdefs.h.  */
5555
5556 int
5557 main ()
5558 {
5559
5560   ;
5561   return 0;
5562 }
5563 _ACEOF
5564 rm -f conftest.$ac_objext conftest$ac_exeext
5565 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5566   (eval $ac_link) 2>conftest.er1
5567   ac_status=$?
5568   grep -v '^ *+' conftest.er1 >conftest.err
5569   rm -f conftest.er1
5570   cat conftest.err >&5
5571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5572   (exit $ac_status); } &&
5573          { ac_try='test -z "$ac_c_werror_flag"
5574                          || test ! -s conftest.err'
5575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5576   (eval $ac_try) 2>&5
5577   ac_status=$?
5578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5579   (exit $ac_status); }; } &&
5580          { ac_try='test -s conftest$ac_exeext'
5581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5582   (eval $ac_try) 2>&5
5583   ac_status=$?
5584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5585   (exit $ac_status); }; }; then
5586   ac_R_space=yes
5587 else
5588   echo "$as_me: failed program was:" >&5
5589 sed 's/^/| /' conftest.$ac_ext >&5
5590
5591 ac_R_space=no
5592 fi
5593 rm -f conftest.err conftest.$ac_objext \
5594       conftest$ac_exeext conftest.$ac_ext
5595         if test $ac_R_space = yes; then
5596           echo "$as_me:$LINENO: result: yes" >&5
5597 echo "${ECHO_T}yes" >&6
5598           X_LIBS="$X_LIBS -R $x_libraries"
5599         else
5600           echo "$as_me:$LINENO: result: neither works" >&5
5601 echo "${ECHO_T}neither works" >&6
5602         fi
5603       fi
5604       LIBS=$ac_xsave_LIBS
5605     esac
5606   fi
5607
5608   # Check for system-dependent libraries X programs must link with.
5609   # Do this before checking for the system-independent R6 libraries
5610   # (-lICE), since we may need -lsocket or whatever for X linking.
5611
5612   if test "$ISC" = yes; then
5613     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5614   else
5615     # Martyn Johnson says this is needed for Ultrix, if the X
5616     # libraries were built with DECnet support.  And Karl Berry says
5617     # the Alpha needs dnet_stub (dnet does not exist).
5618     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5619     cat >conftest.$ac_ext <<_ACEOF
5620 /* confdefs.h.  */
5621 _ACEOF
5622 cat confdefs.h >>conftest.$ac_ext
5623 cat >>conftest.$ac_ext <<_ACEOF
5624 /* end confdefs.h.  */
5625
5626 /* Override any gcc2 internal prototype to avoid an error.  */
5627 #ifdef __cplusplus
5628 extern "C"
5629 #endif
5630 /* We use char because int might match the return type of a gcc2
5631    builtin and then its argument prototype would still apply.  */
5632 char XOpenDisplay ();
5633 int
5634 main ()
5635 {
5636 XOpenDisplay ();
5637   ;
5638   return 0;
5639 }
5640 _ACEOF
5641 rm -f conftest.$ac_objext conftest$ac_exeext
5642 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5643   (eval $ac_link) 2>conftest.er1
5644   ac_status=$?
5645   grep -v '^ *+' conftest.er1 >conftest.err
5646   rm -f conftest.er1
5647   cat conftest.err >&5
5648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5649   (exit $ac_status); } &&
5650          { ac_try='test -z "$ac_c_werror_flag"
5651                          || test ! -s conftest.err'
5652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5653   (eval $ac_try) 2>&5
5654   ac_status=$?
5655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5656   (exit $ac_status); }; } &&
5657          { ac_try='test -s conftest$ac_exeext'
5658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5659   (eval $ac_try) 2>&5
5660   ac_status=$?
5661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5662   (exit $ac_status); }; }; then
5663   :
5664 else
5665   echo "$as_me: failed program was:" >&5
5666 sed 's/^/| /' conftest.$ac_ext >&5
5667
5668 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5669 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5670 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5671   echo $ECHO_N "(cached) $ECHO_C" >&6
5672 else
5673   ac_check_lib_save_LIBS=$LIBS
5674 LIBS="-ldnet  $LIBS"
5675 cat >conftest.$ac_ext <<_ACEOF
5676 /* confdefs.h.  */
5677 _ACEOF
5678 cat confdefs.h >>conftest.$ac_ext
5679 cat >>conftest.$ac_ext <<_ACEOF
5680 /* end confdefs.h.  */
5681
5682 /* Override any gcc2 internal prototype to avoid an error.  */
5683 #ifdef __cplusplus
5684 extern "C"
5685 #endif
5686 /* We use char because int might match the return type of a gcc2
5687    builtin and then its argument prototype would still apply.  */
5688 char dnet_ntoa ();
5689 int
5690 main ()
5691 {
5692 dnet_ntoa ();
5693   ;
5694   return 0;
5695 }
5696 _ACEOF
5697 rm -f conftest.$ac_objext conftest$ac_exeext
5698 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5699   (eval $ac_link) 2>conftest.er1
5700   ac_status=$?
5701   grep -v '^ *+' conftest.er1 >conftest.err
5702   rm -f conftest.er1
5703   cat conftest.err >&5
5704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5705   (exit $ac_status); } &&
5706          { ac_try='test -z "$ac_c_werror_flag"
5707                          || test ! -s conftest.err'
5708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5709   (eval $ac_try) 2>&5
5710   ac_status=$?
5711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5712   (exit $ac_status); }; } &&
5713          { ac_try='test -s conftest$ac_exeext'
5714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5715   (eval $ac_try) 2>&5
5716   ac_status=$?
5717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5718   (exit $ac_status); }; }; then
5719   ac_cv_lib_dnet_dnet_ntoa=yes
5720 else
5721   echo "$as_me: failed program was:" >&5
5722 sed 's/^/| /' conftest.$ac_ext >&5
5723
5724 ac_cv_lib_dnet_dnet_ntoa=no
5725 fi
5726 rm -f conftest.err conftest.$ac_objext \
5727       conftest$ac_exeext conftest.$ac_ext
5728 LIBS=$ac_check_lib_save_LIBS
5729 fi
5730 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5731 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5732 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5733   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5734 fi
5735
5736     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5737       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5738 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5739 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5740   echo $ECHO_N "(cached) $ECHO_C" >&6
5741 else
5742   ac_check_lib_save_LIBS=$LIBS
5743 LIBS="-ldnet_stub  $LIBS"
5744 cat >conftest.$ac_ext <<_ACEOF
5745 /* confdefs.h.  */
5746 _ACEOF
5747 cat confdefs.h >>conftest.$ac_ext
5748 cat >>conftest.$ac_ext <<_ACEOF
5749 /* end confdefs.h.  */
5750
5751 /* Override any gcc2 internal prototype to avoid an error.  */
5752 #ifdef __cplusplus
5753 extern "C"
5754 #endif
5755 /* We use char because int might match the return type of a gcc2
5756    builtin and then its argument prototype would still apply.  */
5757 char dnet_ntoa ();
5758 int
5759 main ()
5760 {
5761 dnet_ntoa ();
5762   ;
5763   return 0;
5764 }
5765 _ACEOF
5766 rm -f conftest.$ac_objext conftest$ac_exeext
5767 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5768   (eval $ac_link) 2>conftest.er1
5769   ac_status=$?
5770   grep -v '^ *+' conftest.er1 >conftest.err
5771   rm -f conftest.er1
5772   cat conftest.err >&5
5773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5774   (exit $ac_status); } &&
5775          { ac_try='test -z "$ac_c_werror_flag"
5776                          || test ! -s conftest.err'
5777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5778   (eval $ac_try) 2>&5
5779   ac_status=$?
5780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5781   (exit $ac_status); }; } &&
5782          { ac_try='test -s conftest$ac_exeext'
5783   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5784   (eval $ac_try) 2>&5
5785   ac_status=$?
5786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5787   (exit $ac_status); }; }; then
5788   ac_cv_lib_dnet_stub_dnet_ntoa=yes
5789 else
5790   echo "$as_me: failed program was:" >&5
5791 sed 's/^/| /' conftest.$ac_ext >&5
5792
5793 ac_cv_lib_dnet_stub_dnet_ntoa=no
5794 fi
5795 rm -f conftest.err conftest.$ac_objext \
5796       conftest$ac_exeext conftest.$ac_ext
5797 LIBS=$ac_check_lib_save_LIBS
5798 fi
5799 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5800 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5801 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5802   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5803 fi
5804
5805     fi
5806 fi
5807 rm -f conftest.err conftest.$ac_objext \
5808       conftest$ac_exeext conftest.$ac_ext
5809     LIBS="$ac_xsave_LIBS"
5810
5811     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5812     # to get the SysV transport functions.
5813     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5814     # needs -lnsl.
5815     # The nsl library prevents programs from opening the X display
5816     # on Irix 5.2, according to T.E. Dickey.
5817     # The functions gethostbyname, getservbyname, and inet_addr are
5818     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5819     echo "$as_me:$LINENO: checking for gethostbyname" >&5
5820 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5821 if test "${ac_cv_func_gethostbyname+set}" = set; then
5822   echo $ECHO_N "(cached) $ECHO_C" >&6
5823 else
5824   cat >conftest.$ac_ext <<_ACEOF
5825 /* confdefs.h.  */
5826 _ACEOF
5827 cat confdefs.h >>conftest.$ac_ext
5828 cat >>conftest.$ac_ext <<_ACEOF
5829 /* end confdefs.h.  */
5830 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5831    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5832 #define gethostbyname innocuous_gethostbyname
5833
5834 /* System header to define __stub macros and hopefully few prototypes,
5835     which can conflict with char gethostbyname (); below.
5836     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5837     <limits.h> exists even on freestanding compilers.  */
5838
5839 #ifdef __STDC__
5840 # include <limits.h>
5841 #else
5842 # include <assert.h>
5843 #endif
5844
5845 #undef gethostbyname
5846
5847 /* Override any gcc2 internal prototype to avoid an error.  */
5848 #ifdef __cplusplus
5849 extern "C"
5850 {
5851 #endif
5852 /* We use char because int might match the return type of a gcc2
5853    builtin and then its argument prototype would still apply.  */
5854 char gethostbyname ();
5855 /* The GNU C library defines this for functions which it implements
5856     to always fail with ENOSYS.  Some functions are actually named
5857     something starting with __ and the normal name is an alias.  */
5858 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5859 choke me
5860 #else
5861 char (*f) () = gethostbyname;
5862 #endif
5863 #ifdef __cplusplus
5864 }
5865 #endif
5866
5867 int
5868 main ()
5869 {
5870 return f != gethostbyname;
5871   ;
5872   return 0;
5873 }
5874 _ACEOF
5875 rm -f conftest.$ac_objext conftest$ac_exeext
5876 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5877   (eval $ac_link) 2>conftest.er1
5878   ac_status=$?
5879   grep -v '^ *+' conftest.er1 >conftest.err
5880   rm -f conftest.er1
5881   cat conftest.err >&5
5882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5883   (exit $ac_status); } &&
5884          { ac_try='test -z "$ac_c_werror_flag"
5885                          || test ! -s conftest.err'
5886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5887   (eval $ac_try) 2>&5
5888   ac_status=$?
5889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5890   (exit $ac_status); }; } &&
5891          { ac_try='test -s conftest$ac_exeext'
5892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5893   (eval $ac_try) 2>&5
5894   ac_status=$?
5895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5896   (exit $ac_status); }; }; then
5897   ac_cv_func_gethostbyname=yes
5898 else
5899   echo "$as_me: failed program was:" >&5
5900 sed 's/^/| /' conftest.$ac_ext >&5
5901
5902 ac_cv_func_gethostbyname=no
5903 fi
5904 rm -f conftest.err conftest.$ac_objext \
5905       conftest$ac_exeext conftest.$ac_ext
5906 fi
5907 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5908 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5909
5910     if test $ac_cv_func_gethostbyname = no; then
5911       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5912 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5913 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5914   echo $ECHO_N "(cached) $ECHO_C" >&6
5915 else
5916   ac_check_lib_save_LIBS=$LIBS
5917 LIBS="-lnsl  $LIBS"
5918 cat >conftest.$ac_ext <<_ACEOF
5919 /* confdefs.h.  */
5920 _ACEOF
5921 cat confdefs.h >>conftest.$ac_ext
5922 cat >>conftest.$ac_ext <<_ACEOF
5923 /* end confdefs.h.  */
5924
5925 /* Override any gcc2 internal prototype to avoid an error.  */
5926 #ifdef __cplusplus
5927 extern "C"
5928 #endif
5929 /* We use char because int might match the return type of a gcc2
5930    builtin and then its argument prototype would still apply.  */
5931 char gethostbyname ();
5932 int
5933 main ()
5934 {
5935 gethostbyname ();
5936   ;
5937   return 0;
5938 }
5939 _ACEOF
5940 rm -f conftest.$ac_objext conftest$ac_exeext
5941 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5942   (eval $ac_link) 2>conftest.er1
5943   ac_status=$?
5944   grep -v '^ *+' conftest.er1 >conftest.err
5945   rm -f conftest.er1
5946   cat conftest.err >&5
5947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5948   (exit $ac_status); } &&
5949          { ac_try='test -z "$ac_c_werror_flag"
5950                          || test ! -s conftest.err'
5951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5952   (eval $ac_try) 2>&5
5953   ac_status=$?
5954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5955   (exit $ac_status); }; } &&
5956          { ac_try='test -s conftest$ac_exeext'
5957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5958   (eval $ac_try) 2>&5
5959   ac_status=$?
5960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5961   (exit $ac_status); }; }; then
5962   ac_cv_lib_nsl_gethostbyname=yes
5963 else
5964   echo "$as_me: failed program was:" >&5
5965 sed 's/^/| /' conftest.$ac_ext >&5
5966
5967 ac_cv_lib_nsl_gethostbyname=no
5968 fi
5969 rm -f conftest.err conftest.$ac_objext \
5970       conftest$ac_exeext conftest.$ac_ext
5971 LIBS=$ac_check_lib_save_LIBS
5972 fi
5973 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5974 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5975 if test $ac_cv_lib_nsl_gethostbyname = yes; then
5976   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5977 fi
5978
5979       if test $ac_cv_lib_nsl_gethostbyname = no; then
5980         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5981 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5982 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5983   echo $ECHO_N "(cached) $ECHO_C" >&6
5984 else
5985   ac_check_lib_save_LIBS=$LIBS
5986 LIBS="-lbsd  $LIBS"
5987 cat >conftest.$ac_ext <<_ACEOF
5988 /* confdefs.h.  */
5989 _ACEOF
5990 cat confdefs.h >>conftest.$ac_ext
5991 cat >>conftest.$ac_ext <<_ACEOF
5992 /* end confdefs.h.  */
5993
5994 /* Override any gcc2 internal prototype to avoid an error.  */
5995 #ifdef __cplusplus
5996 extern "C"
5997 #endif
5998 /* We use char because int might match the return type of a gcc2
5999    builtin and then its argument prototype would still apply.  */
6000 char gethostbyname ();
6001 int
6002 main ()
6003 {
6004 gethostbyname ();
6005   ;
6006   return 0;
6007 }
6008 _ACEOF
6009 rm -f conftest.$ac_objext conftest$ac_exeext
6010 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6011   (eval $ac_link) 2>conftest.er1
6012   ac_status=$?
6013   grep -v '^ *+' conftest.er1 >conftest.err
6014   rm -f conftest.er1
6015   cat conftest.err >&5
6016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6017   (exit $ac_status); } &&
6018          { ac_try='test -z "$ac_c_werror_flag"
6019                          || test ! -s conftest.err'
6020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6021   (eval $ac_try) 2>&5
6022   ac_status=$?
6023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6024   (exit $ac_status); }; } &&
6025          { ac_try='test -s conftest$ac_exeext'
6026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6027   (eval $ac_try) 2>&5
6028   ac_status=$?
6029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6030   (exit $ac_status); }; }; then
6031   ac_cv_lib_bsd_gethostbyname=yes
6032 else
6033   echo "$as_me: failed program was:" >&5
6034 sed 's/^/| /' conftest.$ac_ext >&5
6035
6036 ac_cv_lib_bsd_gethostbyname=no
6037 fi
6038 rm -f conftest.err conftest.$ac_objext \
6039       conftest$ac_exeext conftest.$ac_ext
6040 LIBS=$ac_check_lib_save_LIBS
6041 fi
6042 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6043 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
6044 if test $ac_cv_lib_bsd_gethostbyname = yes; then
6045   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6046 fi
6047
6048       fi
6049     fi
6050
6051     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6052     # socket/setsockopt and other routines are undefined under SCO ODT
6053     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6054     # on later versions), says Simon Leinen: it contains gethostby*
6055     # variants that don't use the name server (or something).  -lsocket
6056     # must be given before -lnsl if both are needed.  We assume that
6057     # if connect needs -lnsl, so does gethostbyname.
6058     echo "$as_me:$LINENO: checking for connect" >&5
6059 echo $ECHO_N "checking for connect... $ECHO_C" >&6
6060 if test "${ac_cv_func_connect+set}" = set; then
6061   echo $ECHO_N "(cached) $ECHO_C" >&6
6062 else
6063   cat >conftest.$ac_ext <<_ACEOF
6064 /* confdefs.h.  */
6065 _ACEOF
6066 cat confdefs.h >>conftest.$ac_ext
6067 cat >>conftest.$ac_ext <<_ACEOF
6068 /* end confdefs.h.  */
6069 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
6070    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6071 #define connect innocuous_connect
6072
6073 /* System header to define __stub macros and hopefully few prototypes,
6074     which can conflict with char connect (); below.
6075     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6076     <limits.h> exists even on freestanding compilers.  */
6077
6078 #ifdef __STDC__
6079 # include <limits.h>
6080 #else
6081 # include <assert.h>
6082 #endif
6083
6084 #undef connect
6085
6086 /* Override any gcc2 internal prototype to avoid an error.  */
6087 #ifdef __cplusplus
6088 extern "C"
6089 {
6090 #endif
6091 /* We use char because int might match the return type of a gcc2
6092    builtin and then its argument prototype would still apply.  */
6093 char connect ();
6094 /* The GNU C library defines this for functions which it implements
6095     to always fail with ENOSYS.  Some functions are actually named
6096     something starting with __ and the normal name is an alias.  */
6097 #if defined (__stub_connect) || defined (__stub___connect)
6098 choke me
6099 #else
6100 char (*f) () = connect;
6101 #endif
6102 #ifdef __cplusplus
6103 }
6104 #endif
6105
6106 int
6107 main ()
6108 {
6109 return f != connect;
6110   ;
6111   return 0;
6112 }
6113 _ACEOF
6114 rm -f conftest.$ac_objext conftest$ac_exeext
6115 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6116   (eval $ac_link) 2>conftest.er1
6117   ac_status=$?
6118   grep -v '^ *+' conftest.er1 >conftest.err
6119   rm -f conftest.er1
6120   cat conftest.err >&5
6121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6122   (exit $ac_status); } &&
6123          { ac_try='test -z "$ac_c_werror_flag"
6124                          || test ! -s conftest.err'
6125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6126   (eval $ac_try) 2>&5
6127   ac_status=$?
6128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6129   (exit $ac_status); }; } &&
6130          { ac_try='test -s conftest$ac_exeext'
6131   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6132   (eval $ac_try) 2>&5
6133   ac_status=$?
6134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6135   (exit $ac_status); }; }; then
6136   ac_cv_func_connect=yes
6137 else
6138   echo "$as_me: failed program was:" >&5
6139 sed 's/^/| /' conftest.$ac_ext >&5
6140
6141 ac_cv_func_connect=no
6142 fi
6143 rm -f conftest.err conftest.$ac_objext \
6144       conftest$ac_exeext conftest.$ac_ext
6145 fi
6146 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
6147 echo "${ECHO_T}$ac_cv_func_connect" >&6
6148
6149     if test $ac_cv_func_connect = no; then
6150       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
6151 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
6152 if test "${ac_cv_lib_socket_connect+set}" = set; then
6153   echo $ECHO_N "(cached) $ECHO_C" >&6
6154 else
6155   ac_check_lib_save_LIBS=$LIBS
6156 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6157 cat >conftest.$ac_ext <<_ACEOF
6158 /* confdefs.h.  */
6159 _ACEOF
6160 cat confdefs.h >>conftest.$ac_ext
6161 cat >>conftest.$ac_ext <<_ACEOF
6162 /* end confdefs.h.  */
6163
6164 /* Override any gcc2 internal prototype to avoid an error.  */
6165 #ifdef __cplusplus
6166 extern "C"
6167 #endif
6168 /* We use char because int might match the return type of a gcc2
6169    builtin and then its argument prototype would still apply.  */
6170 char connect ();
6171 int
6172 main ()
6173 {
6174 connect ();
6175   ;
6176   return 0;
6177 }
6178 _ACEOF
6179 rm -f conftest.$ac_objext conftest$ac_exeext
6180 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6181   (eval $ac_link) 2>conftest.er1
6182   ac_status=$?
6183   grep -v '^ *+' conftest.er1 >conftest.err
6184   rm -f conftest.er1
6185   cat conftest.err >&5
6186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6187   (exit $ac_status); } &&
6188          { ac_try='test -z "$ac_c_werror_flag"
6189                          || test ! -s conftest.err'
6190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6191   (eval $ac_try) 2>&5
6192   ac_status=$?
6193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6194   (exit $ac_status); }; } &&
6195          { ac_try='test -s conftest$ac_exeext'
6196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6197   (eval $ac_try) 2>&5
6198   ac_status=$?
6199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6200   (exit $ac_status); }; }; then
6201   ac_cv_lib_socket_connect=yes
6202 else
6203   echo "$as_me: failed program was:" >&5
6204 sed 's/^/| /' conftest.$ac_ext >&5
6205
6206 ac_cv_lib_socket_connect=no
6207 fi
6208 rm -f conftest.err conftest.$ac_objext \
6209       conftest$ac_exeext conftest.$ac_ext
6210 LIBS=$ac_check_lib_save_LIBS
6211 fi
6212 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
6213 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
6214 if test $ac_cv_lib_socket_connect = yes; then
6215   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6216 fi
6217
6218     fi
6219
6220     # Guillermo Gomez says -lposix is necessary on A/UX.
6221     echo "$as_me:$LINENO: checking for remove" >&5
6222 echo $ECHO_N "checking for remove... $ECHO_C" >&6
6223 if test "${ac_cv_func_remove+set}" = set; then
6224   echo $ECHO_N "(cached) $ECHO_C" >&6
6225 else
6226   cat >conftest.$ac_ext <<_ACEOF
6227 /* confdefs.h.  */
6228 _ACEOF
6229 cat confdefs.h >>conftest.$ac_ext
6230 cat >>conftest.$ac_ext <<_ACEOF
6231 /* end confdefs.h.  */
6232 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
6233    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6234 #define remove innocuous_remove
6235
6236 /* System header to define __stub macros and hopefully few prototypes,
6237     which can conflict with char remove (); below.
6238     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6239     <limits.h> exists even on freestanding compilers.  */
6240
6241 #ifdef __STDC__
6242 # include <limits.h>
6243 #else
6244 # include <assert.h>
6245 #endif
6246
6247 #undef remove
6248
6249 /* Override any gcc2 internal prototype to avoid an error.  */
6250 #ifdef __cplusplus
6251 extern "C"
6252 {
6253 #endif
6254 /* We use char because int might match the return type of a gcc2
6255    builtin and then its argument prototype would still apply.  */
6256 char remove ();
6257 /* The GNU C library defines this for functions which it implements
6258     to always fail with ENOSYS.  Some functions are actually named
6259     something starting with __ and the normal name is an alias.  */
6260 #if defined (__stub_remove) || defined (__stub___remove)
6261 choke me
6262 #else
6263 char (*f) () = remove;
6264 #endif
6265 #ifdef __cplusplus
6266 }
6267 #endif
6268
6269 int
6270 main ()
6271 {
6272 return f != remove;
6273   ;
6274   return 0;
6275 }
6276 _ACEOF
6277 rm -f conftest.$ac_objext conftest$ac_exeext
6278 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6279   (eval $ac_link) 2>conftest.er1
6280   ac_status=$?
6281   grep -v '^ *+' conftest.er1 >conftest.err
6282   rm -f conftest.er1
6283   cat conftest.err >&5
6284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6285   (exit $ac_status); } &&
6286          { ac_try='test -z "$ac_c_werror_flag"
6287                          || test ! -s conftest.err'
6288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6289   (eval $ac_try) 2>&5
6290   ac_status=$?
6291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6292   (exit $ac_status); }; } &&
6293          { ac_try='test -s conftest$ac_exeext'
6294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6295   (eval $ac_try) 2>&5
6296   ac_status=$?
6297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6298   (exit $ac_status); }; }; then
6299   ac_cv_func_remove=yes
6300 else
6301   echo "$as_me: failed program was:" >&5
6302 sed 's/^/| /' conftest.$ac_ext >&5
6303
6304 ac_cv_func_remove=no
6305 fi
6306 rm -f conftest.err conftest.$ac_objext \
6307       conftest$ac_exeext conftest.$ac_ext
6308 fi
6309 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
6310 echo "${ECHO_T}$ac_cv_func_remove" >&6
6311
6312     if test $ac_cv_func_remove = no; then
6313       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
6314 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
6315 if test "${ac_cv_lib_posix_remove+set}" = set; then
6316   echo $ECHO_N "(cached) $ECHO_C" >&6
6317 else
6318   ac_check_lib_save_LIBS=$LIBS
6319 LIBS="-lposix  $LIBS"
6320 cat >conftest.$ac_ext <<_ACEOF
6321 /* confdefs.h.  */
6322 _ACEOF
6323 cat confdefs.h >>conftest.$ac_ext
6324 cat >>conftest.$ac_ext <<_ACEOF
6325 /* end confdefs.h.  */
6326
6327 /* Override any gcc2 internal prototype to avoid an error.  */
6328 #ifdef __cplusplus
6329 extern "C"
6330 #endif
6331 /* We use char because int might match the return type of a gcc2
6332    builtin and then its argument prototype would still apply.  */
6333 char remove ();
6334 int
6335 main ()
6336 {
6337 remove ();
6338   ;
6339   return 0;
6340 }
6341 _ACEOF
6342 rm -f conftest.$ac_objext conftest$ac_exeext
6343 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6344   (eval $ac_link) 2>conftest.er1
6345   ac_status=$?
6346   grep -v '^ *+' conftest.er1 >conftest.err
6347   rm -f conftest.er1
6348   cat conftest.err >&5
6349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6350   (exit $ac_status); } &&
6351          { ac_try='test -z "$ac_c_werror_flag"
6352                          || test ! -s conftest.err'
6353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6354   (eval $ac_try) 2>&5
6355   ac_status=$?
6356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6357   (exit $ac_status); }; } &&
6358          { ac_try='test -s conftest$ac_exeext'
6359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6360   (eval $ac_try) 2>&5
6361   ac_status=$?
6362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6363   (exit $ac_status); }; }; then
6364   ac_cv_lib_posix_remove=yes
6365 else
6366   echo "$as_me: failed program was:" >&5
6367 sed 's/^/| /' conftest.$ac_ext >&5
6368
6369 ac_cv_lib_posix_remove=no
6370 fi
6371 rm -f conftest.err conftest.$ac_objext \
6372       conftest$ac_exeext conftest.$ac_ext
6373 LIBS=$ac_check_lib_save_LIBS
6374 fi
6375 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
6376 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
6377 if test $ac_cv_lib_posix_remove = yes; then
6378   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6379 fi
6380
6381     fi
6382
6383     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6384     echo "$as_me:$LINENO: checking for shmat" >&5
6385 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
6386 if test "${ac_cv_func_shmat+set}" = set; then
6387   echo $ECHO_N "(cached) $ECHO_C" >&6
6388 else
6389   cat >conftest.$ac_ext <<_ACEOF
6390 /* confdefs.h.  */
6391 _ACEOF
6392 cat confdefs.h >>conftest.$ac_ext
6393 cat >>conftest.$ac_ext <<_ACEOF
6394 /* end confdefs.h.  */
6395 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
6396    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6397 #define shmat innocuous_shmat
6398
6399 /* System header to define __stub macros and hopefully few prototypes,
6400     which can conflict with char shmat (); below.
6401     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6402     <limits.h> exists even on freestanding compilers.  */
6403
6404 #ifdef __STDC__
6405 # include <limits.h>
6406 #else
6407 # include <assert.h>
6408 #endif
6409
6410 #undef shmat
6411
6412 /* Override any gcc2 internal prototype to avoid an error.  */
6413 #ifdef __cplusplus
6414 extern "C"
6415 {
6416 #endif
6417 /* We use char because int might match the return type of a gcc2
6418    builtin and then its argument prototype would still apply.  */
6419 char shmat ();
6420 /* The GNU C library defines this for functions which it implements
6421     to always fail with ENOSYS.  Some functions are actually named
6422     something starting with __ and the normal name is an alias.  */
6423 #if defined (__stub_shmat) || defined (__stub___shmat)
6424 choke me
6425 #else
6426 char (*f) () = shmat;
6427 #endif
6428 #ifdef __cplusplus
6429 }
6430 #endif
6431
6432 int
6433 main ()
6434 {
6435 return f != shmat;
6436   ;
6437   return 0;
6438 }
6439 _ACEOF
6440 rm -f conftest.$ac_objext conftest$ac_exeext
6441 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6442   (eval $ac_link) 2>conftest.er1
6443   ac_status=$?
6444   grep -v '^ *+' conftest.er1 >conftest.err
6445   rm -f conftest.er1
6446   cat conftest.err >&5
6447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6448   (exit $ac_status); } &&
6449          { ac_try='test -z "$ac_c_werror_flag"
6450                          || test ! -s conftest.err'
6451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6452   (eval $ac_try) 2>&5
6453   ac_status=$?
6454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6455   (exit $ac_status); }; } &&
6456          { ac_try='test -s conftest$ac_exeext'
6457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6458   (eval $ac_try) 2>&5
6459   ac_status=$?
6460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6461   (exit $ac_status); }; }; then
6462   ac_cv_func_shmat=yes
6463 else
6464   echo "$as_me: failed program was:" >&5
6465 sed 's/^/| /' conftest.$ac_ext >&5
6466
6467 ac_cv_func_shmat=no
6468 fi
6469 rm -f conftest.err conftest.$ac_objext \
6470       conftest$ac_exeext conftest.$ac_ext
6471 fi
6472 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
6473 echo "${ECHO_T}$ac_cv_func_shmat" >&6
6474
6475     if test $ac_cv_func_shmat = no; then
6476       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
6477 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
6478 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
6479   echo $ECHO_N "(cached) $ECHO_C" >&6
6480 else
6481   ac_check_lib_save_LIBS=$LIBS
6482 LIBS="-lipc  $LIBS"
6483 cat >conftest.$ac_ext <<_ACEOF
6484 /* confdefs.h.  */
6485 _ACEOF
6486 cat confdefs.h >>conftest.$ac_ext
6487 cat >>conftest.$ac_ext <<_ACEOF
6488 /* end confdefs.h.  */
6489
6490 /* Override any gcc2 internal prototype to avoid an error.  */
6491 #ifdef __cplusplus
6492 extern "C"
6493 #endif
6494 /* We use char because int might match the return type of a gcc2
6495    builtin and then its argument prototype would still apply.  */
6496 char shmat ();
6497 int
6498 main ()
6499 {
6500 shmat ();
6501   ;
6502   return 0;
6503 }
6504 _ACEOF
6505 rm -f conftest.$ac_objext conftest$ac_exeext
6506 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6507   (eval $ac_link) 2>conftest.er1
6508   ac_status=$?
6509   grep -v '^ *+' conftest.er1 >conftest.err
6510   rm -f conftest.er1
6511   cat conftest.err >&5
6512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6513   (exit $ac_status); } &&
6514          { ac_try='test -z "$ac_c_werror_flag"
6515                          || test ! -s conftest.err'
6516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6517   (eval $ac_try) 2>&5
6518   ac_status=$?
6519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6520   (exit $ac_status); }; } &&
6521          { ac_try='test -s conftest$ac_exeext'
6522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6523   (eval $ac_try) 2>&5
6524   ac_status=$?
6525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6526   (exit $ac_status); }; }; then
6527   ac_cv_lib_ipc_shmat=yes
6528 else
6529   echo "$as_me: failed program was:" >&5
6530 sed 's/^/| /' conftest.$ac_ext >&5
6531
6532 ac_cv_lib_ipc_shmat=no
6533 fi
6534 rm -f conftest.err conftest.$ac_objext \
6535       conftest$ac_exeext conftest.$ac_ext
6536 LIBS=$ac_check_lib_save_LIBS
6537 fi
6538 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
6539 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
6540 if test $ac_cv_lib_ipc_shmat = yes; then
6541   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6542 fi
6543
6544     fi
6545   fi
6546
6547   # Check for libraries that X11R6 Xt/Xaw programs need.
6548   ac_save_LDFLAGS=$LDFLAGS
6549   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6550   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6551   # check for ICE first), but we must link in the order -lSM -lICE or
6552   # we get undefined symbols.  So assume we have SM if we have ICE.
6553   # These have to be linked with before -lX11, unlike the other
6554   # libraries we check for below, so use a different variable.
6555   # John Interrante, Karl Berry
6556   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
6557 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
6558 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
6559   echo $ECHO_N "(cached) $ECHO_C" >&6
6560 else
6561   ac_check_lib_save_LIBS=$LIBS
6562 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6563 cat >conftest.$ac_ext <<_ACEOF
6564 /* confdefs.h.  */
6565 _ACEOF
6566 cat confdefs.h >>conftest.$ac_ext
6567 cat >>conftest.$ac_ext <<_ACEOF
6568 /* end confdefs.h.  */
6569
6570 /* Override any gcc2 internal prototype to avoid an error.  */
6571 #ifdef __cplusplus
6572 extern "C"
6573 #endif
6574 /* We use char because int might match the return type of a gcc2
6575    builtin and then its argument prototype would still apply.  */
6576 char IceConnectionNumber ();
6577 int
6578 main ()
6579 {
6580 IceConnectionNumber ();
6581   ;
6582   return 0;
6583 }
6584 _ACEOF
6585 rm -f conftest.$ac_objext conftest$ac_exeext
6586 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6587   (eval $ac_link) 2>conftest.er1
6588   ac_status=$?
6589   grep -v '^ *+' conftest.er1 >conftest.err
6590   rm -f conftest.er1
6591   cat conftest.err >&5
6592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6593   (exit $ac_status); } &&
6594          { ac_try='test -z "$ac_c_werror_flag"
6595                          || test ! -s conftest.err'
6596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6597   (eval $ac_try) 2>&5
6598   ac_status=$?
6599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6600   (exit $ac_status); }; } &&
6601          { ac_try='test -s conftest$ac_exeext'
6602   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6603   (eval $ac_try) 2>&5
6604   ac_status=$?
6605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6606   (exit $ac_status); }; }; then
6607   ac_cv_lib_ICE_IceConnectionNumber=yes
6608 else
6609   echo "$as_me: failed program was:" >&5
6610 sed 's/^/| /' conftest.$ac_ext >&5
6611
6612 ac_cv_lib_ICE_IceConnectionNumber=no
6613 fi
6614 rm -f conftest.err conftest.$ac_objext \
6615       conftest$ac_exeext conftest.$ac_ext
6616 LIBS=$ac_check_lib_save_LIBS
6617 fi
6618 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6619 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
6620 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
6621   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6622 fi
6623
6624   LDFLAGS=$ac_save_LDFLAGS
6625
6626 fi
6627
6628
6629 if test "$have_x" != yes; then
6630   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
6631 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
6632    { (exit 1); exit 1; }; }
6633 fi
6634
6635
6636     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
6637 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
6638 if test "${ac_cv_x_app_defaults+set}" = set; then
6639   echo $ECHO_N "(cached) $ECHO_C" >&6
6640 else
6641
6642   rm -fr conftestdir
6643   if mkdir conftestdir; then
6644     cd conftestdir 2>/dev/null
6645     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6646     cat > Imakefile <<'EOF'
6647 acfindx:
6648         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
6649 EOF
6650     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
6651       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
6652       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6653     fi
6654     cd .. 2>/dev/null
6655     rm -fr conftestdir
6656   fi
6657       if test x"$ac_x_app_defaults" = x; then
6658
6659   # Look for the directory under a standard set of common directories.
6660   # Check X11 before X11Rn because it's often a symlink to the current release.
6661   for ac_dir in                                 \
6662     /usr/X11/lib/app-defaults                   \
6663     /usr/X11R6/lib/app-defaults                 \
6664     /usr/X11R6/lib/X11/app-defaults             \
6665     /usr/X11R5/lib/app-defaults                 \
6666     /usr/X11R5/lib/X11/app-defaults             \
6667     /usr/X11R4/lib/app-defaults                 \
6668     /usr/X11R4/lib/X11/app-defaults             \
6669                                                 \
6670     /usr/lib/X11/app-defaults                   \
6671     /usr/lib/X11R6/app-defaults                 \
6672     /usr/lib/X11R5/app-defaults                 \
6673     /usr/lib/X11R4/app-defaults                 \
6674                                                 \
6675     /usr/local/X11/lib/app-defaults             \
6676     /usr/local/X11R6/lib/app-defaults           \
6677     /usr/local/X11R5/lib/app-defaults           \
6678     /usr/local/X11R4/lib/app-defaults           \
6679                                                 \
6680     /usr/local/lib/X11/app-defaults             \
6681     /usr/local/lib/X11R6/app-defaults           \
6682     /usr/local/lib/X11R6/X11/app-defaults       \
6683     /usr/local/lib/X11R5/app-defaults           \
6684     /usr/local/lib/X11R5/X11/app-defaults       \
6685     /usr/local/lib/X11R4/app-defaults           \
6686     /usr/local/lib/X11R4/X11/app-defaults       \
6687                                                 \
6688     /usr/X386/lib/X11/app-defaults              \
6689     /usr/x386/lib/X11/app-defaults              \
6690     /usr/XFree86/lib/X11/app-defaults           \
6691                                                 \
6692     /usr/lib/X11/app-defaults                   \
6693     /usr/local/lib/X11/app-defaults             \
6694     /usr/unsupported/lib/X11/app-defaults       \
6695     /usr/athena/lib/X11/app-defaults            \
6696     /usr/local/x11r5/lib/X11/app-defaults       \
6697     /usr/lpp/Xamples/lib/X11/app-defaults       \
6698     /lib/usr/lib/X11/app-defaults               \
6699                                                 \
6700     /usr/openwin/lib/app-defaults               \
6701     /usr/openwin/lib/X11/app-defaults           \
6702     /usr/openwin/share/lib/app-defaults         \
6703     /usr/openwin/share/lib/X11/app-defaults     \
6704                                                 \
6705     /X11R6/lib/app-defaults                     \
6706     /X11R5/lib/app-defaults                     \
6707     /X11R4/lib/app-defaults                     \
6708     ; \
6709   do
6710     if test -d "$ac_dir"; then
6711       ac_x_app_defaults=$ac_dir
6712       break
6713     fi
6714   done
6715
6716       fi
6717       if test x"$ac_x_app_defaults" = x; then
6718         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
6719       else
6720         # Record where we found app-defaults for the cache.
6721         ac_cv_x_app_defaults="$ac_x_app_defaults"
6722       fi
6723 fi
6724 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
6725 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
6726     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
6727 case "$host" in
6728     *-hpux*)
6729
6730       # The following arcana was gleaned from conversations with
6731       # Eric Schwartz <erics@col.hp.com>:
6732       #
6733       # On HPUX 10.x, the parts of X that HP considers "standard" live in
6734       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6735       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6736       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6737       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6738       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6739       # you don't need any -I or -L arguments.
6740       #
6741       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6742       # are the same division as 10.x.  However, there are no symlinks to
6743       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6744       # arguments are always necessary.
6745       #
6746       # However, X11R6 was available on HPUX 9.x as a patch: if that
6747       # patch was installed, then all of X11R6 went in to
6748       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6749       #
6750       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6751       # whether R5 was available as a patch; R6 undoubtedly was not.)
6752       #
6753       # So.  We try and use the highest numbered pair of
6754       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6755       # that are available.  We do not mix and match different versions
6756       # of X.
6757       #
6758       # Question I still don't know the answer to: (do you?)
6759       #
6760       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6761       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6762       #     that contrib directory?  Did it contain so-called "standard"
6763       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6764       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6765       #     be a situation where one had to reach into the R5 headers and
6766       #     libs to find Xmu?  That is, must both R6 and R5 directories
6767       #     be on the -I and -L lists in that case?
6768       #
6769       for version in X11R6 X11R5 X11R4 ; do
6770         # if either pair of directories exists...
6771         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6772         then
6773            # if contrib exists, use it...
6774            if test -d /usr/contrib/$version/include ; then
6775              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6776              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6777            fi
6778            # if the "standard" one exists, use it.
6779            if test -d /usr/include/$version ; then
6780              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6781              X_LIBS="$X_LIBS -L/usr/lib/$version"
6782            fi
6783            # since at least one of the pair exists, go no farther.
6784            break
6785         fi
6786       done
6787
6788       # Now find Motif.  Thanks for not making xmkmf find this by
6789       # default, you losers.
6790       #
6791       if test -d /usr/include/Motif2.1 ; then
6792         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6793         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6794       elif test -d /usr/include/Motif1.2 ; then
6795         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6796         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6797       elif test -d /usr/include/Motif1.1 ; then
6798         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6799         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6800       fi
6801
6802       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6803       #
6804       if test -d /opt/graphics/OpenGL/include ; then
6805         # HP-UX 10.20 puts it here
6806         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6807         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6808       elif test -d /opt/Mesa/lib ; then
6809         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6810         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6811       fi
6812
6813
6814       if test -d /opt/xpm/lib/X11 ; then
6815         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6816         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6817       fi
6818
6819       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6820       # in /usr/local/, unless there is already an xscreensaver in
6821       # /usr/local/bin/.  This can be overridden with the --prefix arg
6822       # to configure.  I'm not sure this is the right thing to do, but
6823       # Richard Lloyd says so...
6824       #
6825       if test \! -x /usr/local/bin/xscreensaver ; then
6826         ac_default_prefix=/opt/xscreensaver
6827       fi
6828
6829     ;;
6830     *-solaris*)
6831
6832       # Thanks for not making xmkmf find this by default, pinheads.
6833       # And thanks for moving things around again, too.  Is this
6834       # really the standard location now?  What happened to the
6835       # joke that this kind of thing went in /opt?
6836       # cthomp says "answer: CDE (Common Disorganized Environment)"
6837       #
6838       if test -f /usr/dt/include/Xm/Xm.h ; then
6839         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6840         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
6841
6842         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6843         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
6844 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
6845 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
6846   echo $ECHO_N "(cached) $ECHO_C" >&6
6847 else
6848   ac_check_lib_save_LIBS=$LIBS
6849 LIBS="-lgen  $LIBS"
6850 cat >conftest.$ac_ext <<_ACEOF
6851 /* confdefs.h.  */
6852 _ACEOF
6853 cat confdefs.h >>conftest.$ac_ext
6854 cat >>conftest.$ac_ext <<_ACEOF
6855 /* end confdefs.h.  */
6856
6857 /* Override any gcc2 internal prototype to avoid an error.  */
6858 #ifdef __cplusplus
6859 extern "C"
6860 #endif
6861 /* We use char because int might match the return type of a gcc2
6862    builtin and then its argument prototype would still apply.  */
6863 char regcmp ();
6864 int
6865 main ()
6866 {
6867 regcmp ();
6868   ;
6869   return 0;
6870 }
6871 _ACEOF
6872 rm -f conftest.$ac_objext conftest$ac_exeext
6873 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6874   (eval $ac_link) 2>conftest.er1
6875   ac_status=$?
6876   grep -v '^ *+' conftest.er1 >conftest.err
6877   rm -f conftest.er1
6878   cat conftest.err >&5
6879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6880   (exit $ac_status); } &&
6881          { ac_try='test -z "$ac_c_werror_flag"
6882                          || test ! -s conftest.err'
6883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6884   (eval $ac_try) 2>&5
6885   ac_status=$?
6886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6887   (exit $ac_status); }; } &&
6888          { ac_try='test -s conftest$ac_exeext'
6889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6890   (eval $ac_try) 2>&5
6891   ac_status=$?
6892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6893   (exit $ac_status); }; }; then
6894   ac_cv_lib_gen_regcmp=yes
6895 else
6896   echo "$as_me: failed program was:" >&5
6897 sed 's/^/| /' conftest.$ac_ext >&5
6898
6899 ac_cv_lib_gen_regcmp=no
6900 fi
6901 rm -f conftest.err conftest.$ac_objext \
6902       conftest$ac_exeext conftest.$ac_ext
6903 LIBS=$ac_check_lib_save_LIBS
6904 fi
6905 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
6906 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
6907 if test $ac_cv_lib_gen_regcmp = yes; then
6908   MOTIF_LIBS="$MOTIF_LIBS -lgen"
6909 fi
6910
6911       fi
6912
6913     ;;
6914     *-darwin*)
6915
6916       # On MacOS X (10.x with "fink"), many things are under /sw/.
6917       #
6918       if test -d /sw/include ; then
6919         X_CFLAGS="-I/sw/include $X_CFLAGS"
6920         X_LIBS="-L/sw/lib $X_LIBS"
6921       fi
6922     ;;
6923   esac
6924 echo "$as_me:$LINENO: checking for XPointer" >&5
6925 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
6926 if test "${ac_cv_xpointer+set}" = set; then
6927   echo $ECHO_N "(cached) $ECHO_C" >&6
6928 else
6929
6930   ac_save_CPPFLAGS="$CPPFLAGS"
6931   if test \! -z "$includedir" ; then
6932     CPPFLAGS="$CPPFLAGS -I$includedir"
6933   fi
6934   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6935   cat >conftest.$ac_ext <<_ACEOF
6936 /* confdefs.h.  */
6937 _ACEOF
6938 cat confdefs.h >>conftest.$ac_ext
6939 cat >>conftest.$ac_ext <<_ACEOF
6940 /* end confdefs.h.  */
6941 #include <X11/Xlib.h>
6942 int
6943 main ()
6944 {
6945 XPointer foo = (XPointer) 0;
6946   ;
6947   return 0;
6948 }
6949 _ACEOF
6950 rm -f conftest.$ac_objext
6951 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6952   (eval $ac_compile) 2>conftest.er1
6953   ac_status=$?
6954   grep -v '^ *+' conftest.er1 >conftest.err
6955   rm -f conftest.er1
6956   cat conftest.err >&5
6957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6958   (exit $ac_status); } &&
6959          { ac_try='test -z "$ac_c_werror_flag"
6960                          || test ! -s conftest.err'
6961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6962   (eval $ac_try) 2>&5
6963   ac_status=$?
6964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6965   (exit $ac_status); }; } &&
6966          { ac_try='test -s conftest.$ac_objext'
6967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6968   (eval $ac_try) 2>&5
6969   ac_status=$?
6970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6971   (exit $ac_status); }; }; then
6972   ac_cv_xpointer=yes
6973 else
6974   echo "$as_me: failed program was:" >&5
6975 sed 's/^/| /' conftest.$ac_ext >&5
6976
6977 ac_cv_xpointer=no
6978 fi
6979 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6980   CPPFLAGS="$ac_save_CPPFLAGS"
6981 fi
6982 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
6983 echo "${ECHO_T}$ac_cv_xpointer" >&6
6984   if test "$ac_cv_xpointer" != yes; then
6985    cat >>confdefs.h <<\_ACEOF
6986 #define XPointer char*
6987 _ACEOF
6988
6989   fi
6990
6991 echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
6992 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6
6993   ac_macosx=no
6994   case "$host" in
6995     *-apple-darwin* )
6996       ac_macosx=yes
6997     ;;
6998   esac
6999 echo "$as_me:$LINENO: result: $ac_macosx" >&5
7000 echo "${ECHO_T}$ac_macosx" >&6
7001
7002
7003
7004 ###############################################################################
7005 #
7006 #       Gettext support
7007 #
7008 ###############################################################################
7009
7010
7011
7012 if test -n ""; then
7013     echo "$as_me:$LINENO: checking for intltool >= " >&5
7014 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
7015
7016     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
7017     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
7018
7019     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
7020
7021
7022     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
7023         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
7024 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
7025     else
7026         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
7027 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
7028         exit 1
7029     fi
7030 fi
7031
7032   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'
7033 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'
7034      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'
7035       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
7036      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'
7037    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'
7038     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'
7039 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'
7040        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'
7041       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'
7042     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'
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056 # Use the tools built into the package, not the ones that are installed.
7057
7058 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
7059 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
7060 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
7061
7062
7063
7064
7065
7066 # Extract the first word of "perl", so it can be a program name with args.
7067 set dummy perl; ac_word=$2
7068 echo "$as_me:$LINENO: checking for $ac_word" >&5
7069 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7070 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
7071   echo $ECHO_N "(cached) $ECHO_C" >&6
7072 else
7073   case $INTLTOOL_PERL in
7074   [\\/]* | ?:[\\/]*)
7075   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
7076   ;;
7077   *)
7078   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7079 for as_dir in $PATH
7080 do
7081   IFS=$as_save_IFS
7082   test -z "$as_dir" && as_dir=.
7083   for ac_exec_ext in '' $ac_executable_extensions; do
7084   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7085     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
7086     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7087     break 2
7088   fi
7089 done
7090 done
7091
7092   ;;
7093 esac
7094 fi
7095 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
7096
7097 if test -n "$INTLTOOL_PERL"; then
7098   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
7099 echo "${ECHO_T}$INTLTOOL_PERL" >&6
7100 else
7101   echo "$as_me:$LINENO: result: no" >&5
7102 echo "${ECHO_T}no" >&6
7103 fi
7104
7105 if test -z "$INTLTOOL_PERL"; then
7106    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
7107 echo "$as_me: error: perl not found; required for intltool" >&2;}
7108    { (exit 1); exit 1; }; }
7109 fi
7110 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7111    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
7112 echo "$as_me: error: perl 5.x required for intltool" >&2;}
7113    { (exit 1); exit 1; }; }
7114 fi
7115
7116 # Remove file type tags (using []) from po/POTFILES.
7117
7118
7119
7120
7121
7122
7123
7124 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7125
7126           ac_config_commands="$ac_config_commands default-1"
7127
7128
7129
7130 GETTEXT_PACKAGE=xscreensaver
7131 cat >>confdefs.h <<_ACEOF
7132 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7133 _ACEOF
7134
7135 cat >>confdefs.h <<_ACEOF
7136 #define PACKAGE "$GETTEXT_PACKAGE"
7137 _ACEOF
7138
7139
7140
7141 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"
7142 if test -n "$ac_tool_prefix"; then
7143   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7144 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7145 echo "$as_me:$LINENO: checking for $ac_word" >&5
7146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7147 if test "${ac_cv_prog_RANLIB+set}" = set; then
7148   echo $ECHO_N "(cached) $ECHO_C" >&6
7149 else
7150   if test -n "$RANLIB"; then
7151   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7152 else
7153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7154 for as_dir in $PATH
7155 do
7156   IFS=$as_save_IFS
7157   test -z "$as_dir" && as_dir=.
7158   for ac_exec_ext in '' $ac_executable_extensions; do
7159   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7160     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7161     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7162     break 2
7163   fi
7164 done
7165 done
7166
7167 fi
7168 fi
7169 RANLIB=$ac_cv_prog_RANLIB
7170 if test -n "$RANLIB"; then
7171   echo "$as_me:$LINENO: result: $RANLIB" >&5
7172 echo "${ECHO_T}$RANLIB" >&6
7173 else
7174   echo "$as_me:$LINENO: result: no" >&5
7175 echo "${ECHO_T}no" >&6
7176 fi
7177
7178 fi
7179 if test -z "$ac_cv_prog_RANLIB"; then
7180   ac_ct_RANLIB=$RANLIB
7181   # Extract the first word of "ranlib", so it can be a program name with args.
7182 set dummy ranlib; ac_word=$2
7183 echo "$as_me:$LINENO: checking for $ac_word" >&5
7184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7185 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7186   echo $ECHO_N "(cached) $ECHO_C" >&6
7187 else
7188   if test -n "$ac_ct_RANLIB"; then
7189   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7190 else
7191 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7192 for as_dir in $PATH
7193 do
7194   IFS=$as_save_IFS
7195   test -z "$as_dir" && as_dir=.
7196   for ac_exec_ext in '' $ac_executable_extensions; do
7197   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7198     ac_cv_prog_ac_ct_RANLIB="ranlib"
7199     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7200     break 2
7201   fi
7202 done
7203 done
7204
7205   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7206 fi
7207 fi
7208 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7209 if test -n "$ac_ct_RANLIB"; then
7210   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7211 echo "${ECHO_T}$ac_ct_RANLIB" >&6
7212 else
7213   echo "$as_me:$LINENO: result: no" >&5
7214 echo "${ECHO_T}no" >&6
7215 fi
7216
7217   RANLIB=$ac_ct_RANLIB
7218 else
7219   RANLIB="$ac_cv_prog_RANLIB"
7220 fi
7221
7222 echo "$as_me:$LINENO: checking for off_t" >&5
7223 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
7224 if test "${ac_cv_type_off_t+set}" = set; then
7225   echo $ECHO_N "(cached) $ECHO_C" >&6
7226 else
7227   cat >conftest.$ac_ext <<_ACEOF
7228 /* confdefs.h.  */
7229 _ACEOF
7230 cat confdefs.h >>conftest.$ac_ext
7231 cat >>conftest.$ac_ext <<_ACEOF
7232 /* end confdefs.h.  */
7233 $ac_includes_default
7234 int
7235 main ()
7236 {
7237 if ((off_t *) 0)
7238   return 0;
7239 if (sizeof (off_t))
7240   return 0;
7241   ;
7242   return 0;
7243 }
7244 _ACEOF
7245 rm -f conftest.$ac_objext
7246 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7247   (eval $ac_compile) 2>conftest.er1
7248   ac_status=$?
7249   grep -v '^ *+' conftest.er1 >conftest.err
7250   rm -f conftest.er1
7251   cat conftest.err >&5
7252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7253   (exit $ac_status); } &&
7254          { ac_try='test -z "$ac_c_werror_flag"
7255                          || test ! -s conftest.err'
7256   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7257   (eval $ac_try) 2>&5
7258   ac_status=$?
7259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7260   (exit $ac_status); }; } &&
7261          { ac_try='test -s conftest.$ac_objext'
7262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7263   (eval $ac_try) 2>&5
7264   ac_status=$?
7265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7266   (exit $ac_status); }; }; then
7267   ac_cv_type_off_t=yes
7268 else
7269   echo "$as_me: failed program was:" >&5
7270 sed 's/^/| /' conftest.$ac_ext >&5
7271
7272 ac_cv_type_off_t=no
7273 fi
7274 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7275 fi
7276 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
7277 echo "${ECHO_T}$ac_cv_type_off_t" >&6
7278 if test $ac_cv_type_off_t = yes; then
7279   :
7280 else
7281
7282 cat >>confdefs.h <<_ACEOF
7283 #define off_t long
7284 _ACEOF
7285
7286 fi
7287
7288 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7289 # for constant arguments.  Useless!
7290 echo "$as_me:$LINENO: checking for working alloca.h" >&5
7291 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7292 if test "${ac_cv_working_alloca_h+set}" = set; then
7293   echo $ECHO_N "(cached) $ECHO_C" >&6
7294 else
7295   cat >conftest.$ac_ext <<_ACEOF
7296 /* confdefs.h.  */
7297 _ACEOF
7298 cat confdefs.h >>conftest.$ac_ext
7299 cat >>conftest.$ac_ext <<_ACEOF
7300 /* end confdefs.h.  */
7301 #include <alloca.h>
7302 int
7303 main ()
7304 {
7305 char *p = (char *) alloca (2 * sizeof (int));
7306   ;
7307   return 0;
7308 }
7309 _ACEOF
7310 rm -f conftest.$ac_objext conftest$ac_exeext
7311 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7312   (eval $ac_link) 2>conftest.er1
7313   ac_status=$?
7314   grep -v '^ *+' conftest.er1 >conftest.err
7315   rm -f conftest.er1
7316   cat conftest.err >&5
7317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7318   (exit $ac_status); } &&
7319          { ac_try='test -z "$ac_c_werror_flag"
7320                          || test ! -s conftest.err'
7321   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7322   (eval $ac_try) 2>&5
7323   ac_status=$?
7324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7325   (exit $ac_status); }; } &&
7326          { ac_try='test -s conftest$ac_exeext'
7327   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7328   (eval $ac_try) 2>&5
7329   ac_status=$?
7330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7331   (exit $ac_status); }; }; then
7332   ac_cv_working_alloca_h=yes
7333 else
7334   echo "$as_me: failed program was:" >&5
7335 sed 's/^/| /' conftest.$ac_ext >&5
7336
7337 ac_cv_working_alloca_h=no
7338 fi
7339 rm -f conftest.err conftest.$ac_objext \
7340       conftest$ac_exeext conftest.$ac_ext
7341 fi
7342 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
7343 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7344 if test $ac_cv_working_alloca_h = yes; then
7345
7346 cat >>confdefs.h <<\_ACEOF
7347 #define HAVE_ALLOCA_H 1
7348 _ACEOF
7349
7350 fi
7351
7352 echo "$as_me:$LINENO: checking for alloca" >&5
7353 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7354 if test "${ac_cv_func_alloca_works+set}" = set; then
7355   echo $ECHO_N "(cached) $ECHO_C" >&6
7356 else
7357   cat >conftest.$ac_ext <<_ACEOF
7358 /* confdefs.h.  */
7359 _ACEOF
7360 cat confdefs.h >>conftest.$ac_ext
7361 cat >>conftest.$ac_ext <<_ACEOF
7362 /* end confdefs.h.  */
7363 #ifdef __GNUC__
7364 # define alloca __builtin_alloca
7365 #else
7366 # ifdef _MSC_VER
7367 #  include <malloc.h>
7368 #  define alloca _alloca
7369 # else
7370 #  if HAVE_ALLOCA_H
7371 #   include <alloca.h>
7372 #  else
7373 #   ifdef _AIX
7374  #pragma alloca
7375 #   else
7376 #    ifndef alloca /* predefined by HP cc +Olibcalls */
7377 char *alloca ();
7378 #    endif
7379 #   endif
7380 #  endif
7381 # endif
7382 #endif
7383
7384 int
7385 main ()
7386 {
7387 char *p = (char *) alloca (1);
7388   ;
7389   return 0;
7390 }
7391 _ACEOF
7392 rm -f conftest.$ac_objext conftest$ac_exeext
7393 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7394   (eval $ac_link) 2>conftest.er1
7395   ac_status=$?
7396   grep -v '^ *+' conftest.er1 >conftest.err
7397   rm -f conftest.er1
7398   cat conftest.err >&5
7399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7400   (exit $ac_status); } &&
7401          { ac_try='test -z "$ac_c_werror_flag"
7402                          || test ! -s conftest.err'
7403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7404   (eval $ac_try) 2>&5
7405   ac_status=$?
7406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7407   (exit $ac_status); }; } &&
7408          { ac_try='test -s conftest$ac_exeext'
7409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7410   (eval $ac_try) 2>&5
7411   ac_status=$?
7412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7413   (exit $ac_status); }; }; then
7414   ac_cv_func_alloca_works=yes
7415 else
7416   echo "$as_me: failed program was:" >&5
7417 sed 's/^/| /' conftest.$ac_ext >&5
7418
7419 ac_cv_func_alloca_works=no
7420 fi
7421 rm -f conftest.err conftest.$ac_objext \
7422       conftest$ac_exeext conftest.$ac_ext
7423 fi
7424 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
7425 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
7426
7427 if test $ac_cv_func_alloca_works = yes; then
7428
7429 cat >>confdefs.h <<\_ACEOF
7430 #define HAVE_ALLOCA 1
7431 _ACEOF
7432
7433 else
7434   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7435 # that cause trouble.  Some versions do not even contain alloca or
7436 # contain a buggy version.  If you still want to use their alloca,
7437 # use ar to extract alloca.o from them instead of compiling alloca.c.
7438
7439 ALLOCA=alloca.$ac_objext
7440
7441 cat >>confdefs.h <<\_ACEOF
7442 #define C_ALLOCA 1
7443 _ACEOF
7444
7445
7446 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
7447 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
7448 if test "${ac_cv_os_cray+set}" = set; then
7449   echo $ECHO_N "(cached) $ECHO_C" >&6
7450 else
7451   cat >conftest.$ac_ext <<_ACEOF
7452 /* confdefs.h.  */
7453 _ACEOF
7454 cat confdefs.h >>conftest.$ac_ext
7455 cat >>conftest.$ac_ext <<_ACEOF
7456 /* end confdefs.h.  */
7457 #if defined(CRAY) && ! defined(CRAY2)
7458 webecray
7459 #else
7460 wenotbecray
7461 #endif
7462
7463 _ACEOF
7464 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7465   $EGREP "webecray" >/dev/null 2>&1; then
7466   ac_cv_os_cray=yes
7467 else
7468   ac_cv_os_cray=no
7469 fi
7470 rm -f conftest*
7471
7472 fi
7473 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
7474 echo "${ECHO_T}$ac_cv_os_cray" >&6
7475 if test $ac_cv_os_cray = yes; then
7476   for ac_func in _getb67 GETB67 getb67; do
7477     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7478 echo "$as_me:$LINENO: checking for $ac_func" >&5
7479 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7480 if eval "test \"\${$as_ac_var+set}\" = set"; then
7481   echo $ECHO_N "(cached) $ECHO_C" >&6
7482 else
7483   cat >conftest.$ac_ext <<_ACEOF
7484 /* confdefs.h.  */
7485 _ACEOF
7486 cat confdefs.h >>conftest.$ac_ext
7487 cat >>conftest.$ac_ext <<_ACEOF
7488 /* end confdefs.h.  */
7489 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7490    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7491 #define $ac_func innocuous_$ac_func
7492
7493 /* System header to define __stub macros and hopefully few prototypes,
7494     which can conflict with char $ac_func (); below.
7495     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7496     <limits.h> exists even on freestanding compilers.  */
7497
7498 #ifdef __STDC__
7499 # include <limits.h>
7500 #else
7501 # include <assert.h>
7502 #endif
7503
7504 #undef $ac_func
7505
7506 /* Override any gcc2 internal prototype to avoid an error.  */
7507 #ifdef __cplusplus
7508 extern "C"
7509 {
7510 #endif
7511 /* We use char because int might match the return type of a gcc2
7512    builtin and then its argument prototype would still apply.  */
7513 char $ac_func ();
7514 /* The GNU C library defines this for functions which it implements
7515     to always fail with ENOSYS.  Some functions are actually named
7516     something starting with __ and the normal name is an alias.  */
7517 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7518 choke me
7519 #else
7520 char (*f) () = $ac_func;
7521 #endif
7522 #ifdef __cplusplus
7523 }
7524 #endif
7525
7526 int
7527 main ()
7528 {
7529 return f != $ac_func;
7530   ;
7531   return 0;
7532 }
7533 _ACEOF
7534 rm -f conftest.$ac_objext conftest$ac_exeext
7535 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7536   (eval $ac_link) 2>conftest.er1
7537   ac_status=$?
7538   grep -v '^ *+' conftest.er1 >conftest.err
7539   rm -f conftest.er1
7540   cat conftest.err >&5
7541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7542   (exit $ac_status); } &&
7543          { ac_try='test -z "$ac_c_werror_flag"
7544                          || test ! -s conftest.err'
7545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7546   (eval $ac_try) 2>&5
7547   ac_status=$?
7548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7549   (exit $ac_status); }; } &&
7550          { ac_try='test -s conftest$ac_exeext'
7551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7552   (eval $ac_try) 2>&5
7553   ac_status=$?
7554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7555   (exit $ac_status); }; }; then
7556   eval "$as_ac_var=yes"
7557 else
7558   echo "$as_me: failed program was:" >&5
7559 sed 's/^/| /' conftest.$ac_ext >&5
7560
7561 eval "$as_ac_var=no"
7562 fi
7563 rm -f conftest.err conftest.$ac_objext \
7564       conftest$ac_exeext conftest.$ac_ext
7565 fi
7566 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7567 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7568 if test `eval echo '${'$as_ac_var'}'` = yes; then
7569
7570 cat >>confdefs.h <<_ACEOF
7571 #define CRAY_STACKSEG_END $ac_func
7572 _ACEOF
7573
7574     break
7575 fi
7576
7577   done
7578 fi
7579
7580 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
7581 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7582 if test "${ac_cv_c_stack_direction+set}" = set; then
7583   echo $ECHO_N "(cached) $ECHO_C" >&6
7584 else
7585   if test "$cross_compiling" = yes; then
7586   ac_cv_c_stack_direction=0
7587 else
7588   cat >conftest.$ac_ext <<_ACEOF
7589 /* confdefs.h.  */
7590 _ACEOF
7591 cat confdefs.h >>conftest.$ac_ext
7592 cat >>conftest.$ac_ext <<_ACEOF
7593 /* end confdefs.h.  */
7594 int
7595 find_stack_direction ()
7596 {
7597   static char *addr = 0;
7598   auto char dummy;
7599   if (addr == 0)
7600     {
7601       addr = &dummy;
7602       return find_stack_direction ();
7603     }
7604   else
7605     return (&dummy > addr) ? 1 : -1;
7606 }
7607
7608 int
7609 main ()
7610 {
7611   exit (find_stack_direction () < 0);
7612 }
7613 _ACEOF
7614 rm -f conftest$ac_exeext
7615 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7616   (eval $ac_link) 2>&5
7617   ac_status=$?
7618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7619   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7621   (eval $ac_try) 2>&5
7622   ac_status=$?
7623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624   (exit $ac_status); }; }; then
7625   ac_cv_c_stack_direction=1
7626 else
7627   echo "$as_me: program exited with status $ac_status" >&5
7628 echo "$as_me: failed program was:" >&5
7629 sed 's/^/| /' conftest.$ac_ext >&5
7630
7631 ( exit $ac_status )
7632 ac_cv_c_stack_direction=-1
7633 fi
7634 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7635 fi
7636 fi
7637 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
7638 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
7639
7640 cat >>confdefs.h <<_ACEOF
7641 #define STACK_DIRECTION $ac_cv_c_stack_direction
7642 _ACEOF
7643
7644
7645 fi
7646
7647
7648
7649 for ac_header in stdlib.h unistd.h
7650 do
7651 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7652 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7653   echo "$as_me:$LINENO: checking for $ac_header" >&5
7654 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7655 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7656   echo $ECHO_N "(cached) $ECHO_C" >&6
7657 fi
7658 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7659 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7660 else
7661   # Is the header compilable?
7662 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7663 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7664 cat >conftest.$ac_ext <<_ACEOF
7665 /* confdefs.h.  */
7666 _ACEOF
7667 cat confdefs.h >>conftest.$ac_ext
7668 cat >>conftest.$ac_ext <<_ACEOF
7669 /* end confdefs.h.  */
7670 $ac_includes_default
7671 #include <$ac_header>
7672 _ACEOF
7673 rm -f conftest.$ac_objext
7674 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7675   (eval $ac_compile) 2>conftest.er1
7676   ac_status=$?
7677   grep -v '^ *+' conftest.er1 >conftest.err
7678   rm -f conftest.er1
7679   cat conftest.err >&5
7680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7681   (exit $ac_status); } &&
7682          { ac_try='test -z "$ac_c_werror_flag"
7683                          || test ! -s conftest.err'
7684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7685   (eval $ac_try) 2>&5
7686   ac_status=$?
7687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7688   (exit $ac_status); }; } &&
7689          { ac_try='test -s conftest.$ac_objext'
7690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7691   (eval $ac_try) 2>&5
7692   ac_status=$?
7693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7694   (exit $ac_status); }; }; then
7695   ac_header_compiler=yes
7696 else
7697   echo "$as_me: failed program was:" >&5
7698 sed 's/^/| /' conftest.$ac_ext >&5
7699
7700 ac_header_compiler=no
7701 fi
7702 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7703 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7704 echo "${ECHO_T}$ac_header_compiler" >&6
7705
7706 # Is the header present?
7707 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7708 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7709 cat >conftest.$ac_ext <<_ACEOF
7710 /* confdefs.h.  */
7711 _ACEOF
7712 cat confdefs.h >>conftest.$ac_ext
7713 cat >>conftest.$ac_ext <<_ACEOF
7714 /* end confdefs.h.  */
7715 #include <$ac_header>
7716 _ACEOF
7717 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7718   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7719   ac_status=$?
7720   grep -v '^ *+' conftest.er1 >conftest.err
7721   rm -f conftest.er1
7722   cat conftest.err >&5
7723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7724   (exit $ac_status); } >/dev/null; then
7725   if test -s conftest.err; then
7726     ac_cpp_err=$ac_c_preproc_warn_flag
7727     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7728   else
7729     ac_cpp_err=
7730   fi
7731 else
7732   ac_cpp_err=yes
7733 fi
7734 if test -z "$ac_cpp_err"; then
7735   ac_header_preproc=yes
7736 else
7737   echo "$as_me: failed program was:" >&5
7738 sed 's/^/| /' conftest.$ac_ext >&5
7739
7740   ac_header_preproc=no
7741 fi
7742 rm -f conftest.err conftest.$ac_ext
7743 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7744 echo "${ECHO_T}$ac_header_preproc" >&6
7745
7746 # So?  What about this header?
7747 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7748   yes:no: )
7749     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7750 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7751     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7752 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7753     ac_header_preproc=yes
7754     ;;
7755   no:yes:* )
7756     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7757 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7758     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7759 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7760     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7761 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7762     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7763 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7764     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7765 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7766     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7767 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7768     (
7769       cat <<\_ASBOX
7770 ## ------------------------------------------ ##
7771 ## Report this to the AC_PACKAGE_NAME lists.  ##
7772 ## ------------------------------------------ ##
7773 _ASBOX
7774     ) |
7775       sed "s/^/$as_me: WARNING:     /" >&2
7776     ;;
7777 esac
7778 echo "$as_me:$LINENO: checking for $ac_header" >&5
7779 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7780 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7781   echo $ECHO_N "(cached) $ECHO_C" >&6
7782 else
7783   eval "$as_ac_Header=\$ac_header_preproc"
7784 fi
7785 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7786 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7787
7788 fi
7789 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7790   cat >>confdefs.h <<_ACEOF
7791 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7792 _ACEOF
7793
7794 fi
7795
7796 done
7797
7798
7799 for ac_func in getpagesize
7800 do
7801 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7802 echo "$as_me:$LINENO: checking for $ac_func" >&5
7803 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7804 if eval "test \"\${$as_ac_var+set}\" = set"; then
7805   echo $ECHO_N "(cached) $ECHO_C" >&6
7806 else
7807   cat >conftest.$ac_ext <<_ACEOF
7808 /* confdefs.h.  */
7809 _ACEOF
7810 cat confdefs.h >>conftest.$ac_ext
7811 cat >>conftest.$ac_ext <<_ACEOF
7812 /* end confdefs.h.  */
7813 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7814    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7815 #define $ac_func innocuous_$ac_func
7816
7817 /* System header to define __stub macros and hopefully few prototypes,
7818     which can conflict with char $ac_func (); below.
7819     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7820     <limits.h> exists even on freestanding compilers.  */
7821
7822 #ifdef __STDC__
7823 # include <limits.h>
7824 #else
7825 # include <assert.h>
7826 #endif
7827
7828 #undef $ac_func
7829
7830 /* Override any gcc2 internal prototype to avoid an error.  */
7831 #ifdef __cplusplus
7832 extern "C"
7833 {
7834 #endif
7835 /* We use char because int might match the return type of a gcc2
7836    builtin and then its argument prototype would still apply.  */
7837 char $ac_func ();
7838 /* The GNU C library defines this for functions which it implements
7839     to always fail with ENOSYS.  Some functions are actually named
7840     something starting with __ and the normal name is an alias.  */
7841 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7842 choke me
7843 #else
7844 char (*f) () = $ac_func;
7845 #endif
7846 #ifdef __cplusplus
7847 }
7848 #endif
7849
7850 int
7851 main ()
7852 {
7853 return f != $ac_func;
7854   ;
7855   return 0;
7856 }
7857 _ACEOF
7858 rm -f conftest.$ac_objext conftest$ac_exeext
7859 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7860   (eval $ac_link) 2>conftest.er1
7861   ac_status=$?
7862   grep -v '^ *+' conftest.er1 >conftest.err
7863   rm -f conftest.er1
7864   cat conftest.err >&5
7865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7866   (exit $ac_status); } &&
7867          { ac_try='test -z "$ac_c_werror_flag"
7868                          || test ! -s conftest.err'
7869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7870   (eval $ac_try) 2>&5
7871   ac_status=$?
7872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7873   (exit $ac_status); }; } &&
7874          { ac_try='test -s conftest$ac_exeext'
7875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7876   (eval $ac_try) 2>&5
7877   ac_status=$?
7878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7879   (exit $ac_status); }; }; then
7880   eval "$as_ac_var=yes"
7881 else
7882   echo "$as_me: failed program was:" >&5
7883 sed 's/^/| /' conftest.$ac_ext >&5
7884
7885 eval "$as_ac_var=no"
7886 fi
7887 rm -f conftest.err conftest.$ac_objext \
7888       conftest$ac_exeext conftest.$ac_ext
7889 fi
7890 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7891 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7892 if test `eval echo '${'$as_ac_var'}'` = yes; then
7893   cat >>confdefs.h <<_ACEOF
7894 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7895 _ACEOF
7896
7897 fi
7898 done
7899
7900 echo "$as_me:$LINENO: checking for working mmap" >&5
7901 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7902 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7903   echo $ECHO_N "(cached) $ECHO_C" >&6
7904 else
7905   if test "$cross_compiling" = yes; then
7906   ac_cv_func_mmap_fixed_mapped=no
7907 else
7908   cat >conftest.$ac_ext <<_ACEOF
7909 /* confdefs.h.  */
7910 _ACEOF
7911 cat confdefs.h >>conftest.$ac_ext
7912 cat >>conftest.$ac_ext <<_ACEOF
7913 /* end confdefs.h.  */
7914 $ac_includes_default
7915 /* malloc might have been renamed as rpl_malloc. */
7916 #undef malloc
7917
7918 /* Thanks to Mike Haertel and Jim Avera for this test.
7919    Here is a matrix of mmap possibilities:
7920         mmap private not fixed
7921         mmap private fixed at somewhere currently unmapped
7922         mmap private fixed at somewhere already mapped
7923         mmap shared not fixed
7924         mmap shared fixed at somewhere currently unmapped
7925         mmap shared fixed at somewhere already mapped
7926    For private mappings, we should verify that changes cannot be read()
7927    back from the file, nor mmap's back from the file at a different
7928    address.  (There have been systems where private was not correctly
7929    implemented like the infamous i386 svr4.0, and systems where the
7930    VM page cache was not coherent with the file system buffer cache
7931    like early versions of FreeBSD and possibly contemporary NetBSD.)
7932    For shared mappings, we should conversely verify that changes get
7933    propagated back to all the places they're supposed to be.
7934
7935    Grep wants private fixed already mapped.
7936    The main things grep needs to know about mmap are:
7937    * does it exist and is it safe to write into the mmap'd area
7938    * how to use it (BSD variants)  */
7939
7940 #include <fcntl.h>
7941 #include <sys/mman.h>
7942
7943 #if !STDC_HEADERS && !HAVE_STDLIB_H
7944 char *malloc ();
7945 #endif
7946
7947 /* This mess was copied from the GNU getpagesize.h.  */
7948 #if !HAVE_GETPAGESIZE
7949 /* Assume that all systems that can run configure have sys/param.h.  */
7950 # if !HAVE_SYS_PARAM_H
7951 #  define HAVE_SYS_PARAM_H 1
7952 # endif
7953
7954 # ifdef _SC_PAGESIZE
7955 #  define getpagesize() sysconf(_SC_PAGESIZE)
7956 # else /* no _SC_PAGESIZE */
7957 #  if HAVE_SYS_PARAM_H
7958 #   include <sys/param.h>
7959 #   ifdef EXEC_PAGESIZE
7960 #    define getpagesize() EXEC_PAGESIZE
7961 #   else /* no EXEC_PAGESIZE */
7962 #    ifdef NBPG
7963 #     define getpagesize() NBPG * CLSIZE
7964 #     ifndef CLSIZE
7965 #      define CLSIZE 1
7966 #     endif /* no CLSIZE */
7967 #    else /* no NBPG */
7968 #     ifdef NBPC
7969 #      define getpagesize() NBPC
7970 #     else /* no NBPC */
7971 #      ifdef PAGESIZE
7972 #       define getpagesize() PAGESIZE
7973 #      endif /* PAGESIZE */
7974 #     endif /* no NBPC */
7975 #    endif /* no NBPG */
7976 #   endif /* no EXEC_PAGESIZE */
7977 #  else /* no HAVE_SYS_PARAM_H */
7978 #   define getpagesize() 8192   /* punt totally */
7979 #  endif /* no HAVE_SYS_PARAM_H */
7980 # endif /* no _SC_PAGESIZE */
7981
7982 #endif /* no HAVE_GETPAGESIZE */
7983
7984 int
7985 main ()
7986 {
7987   char *data, *data2, *data3;
7988   int i, pagesize;
7989   int fd;
7990
7991   pagesize = getpagesize ();
7992
7993   /* First, make a file with some known garbage in it. */
7994   data = (char *) malloc (pagesize);
7995   if (!data)
7996     exit (1);
7997   for (i = 0; i < pagesize; ++i)
7998     *(data + i) = rand ();
7999   umask (0);
8000   fd = creat ("conftest.mmap", 0600);
8001   if (fd < 0)
8002     exit (1);
8003   if (write (fd, data, pagesize) != pagesize)
8004     exit (1);
8005   close (fd);
8006
8007   /* Next, try to mmap the file at a fixed address which already has
8008      something else allocated at it.  If we can, also make sure that
8009      we see the same garbage.  */
8010   fd = open ("conftest.mmap", O_RDWR);
8011   if (fd < 0)
8012     exit (1);
8013   data2 = (char *) malloc (2 * pagesize);
8014   if (!data2)
8015     exit (1);
8016   data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
8017   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8018                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8019     exit (1);
8020   for (i = 0; i < pagesize; ++i)
8021     if (*(data + i) != *(data2 + i))
8022       exit (1);
8023
8024   /* Finally, make sure that changes to the mapped area do not
8025      percolate back to the file as seen by read().  (This is a bug on
8026      some variants of i386 svr4.0.)  */
8027   for (i = 0; i < pagesize; ++i)
8028     *(data2 + i) = *(data2 + i) + 1;
8029   data3 = (char *) malloc (pagesize);
8030   if (!data3)
8031     exit (1);
8032   if (read (fd, data3, pagesize) != pagesize)
8033     exit (1);
8034   for (i = 0; i < pagesize; ++i)
8035     if (*(data + i) != *(data3 + i))
8036       exit (1);
8037   close (fd);
8038   exit (0);
8039 }
8040 _ACEOF
8041 rm -f conftest$ac_exeext
8042 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8043   (eval $ac_link) 2>&5
8044   ac_status=$?
8045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8046   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8047   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8048   (eval $ac_try) 2>&5
8049   ac_status=$?
8050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8051   (exit $ac_status); }; }; then
8052   ac_cv_func_mmap_fixed_mapped=yes
8053 else
8054   echo "$as_me: program exited with status $ac_status" >&5
8055 echo "$as_me: failed program was:" >&5
8056 sed 's/^/| /' conftest.$ac_ext >&5
8057
8058 ( exit $ac_status )
8059 ac_cv_func_mmap_fixed_mapped=no
8060 fi
8061 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8062 fi
8063 fi
8064 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8065 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8066 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8067
8068 cat >>confdefs.h <<\_ACEOF
8069 #define HAVE_MMAP 1
8070 _ACEOF
8071
8072 fi
8073 rm -f conftest.mmap
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
8085 unistd.h sys/param.h
8086 do
8087 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8088 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8089   echo "$as_me:$LINENO: checking for $ac_header" >&5
8090 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8091 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8092   echo $ECHO_N "(cached) $ECHO_C" >&6
8093 fi
8094 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8095 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8096 else
8097   # Is the header compilable?
8098 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8099 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8100 cat >conftest.$ac_ext <<_ACEOF
8101 /* confdefs.h.  */
8102 _ACEOF
8103 cat confdefs.h >>conftest.$ac_ext
8104 cat >>conftest.$ac_ext <<_ACEOF
8105 /* end confdefs.h.  */
8106 $ac_includes_default
8107 #include <$ac_header>
8108 _ACEOF
8109 rm -f conftest.$ac_objext
8110 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8111   (eval $ac_compile) 2>conftest.er1
8112   ac_status=$?
8113   grep -v '^ *+' conftest.er1 >conftest.err
8114   rm -f conftest.er1
8115   cat conftest.err >&5
8116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8117   (exit $ac_status); } &&
8118          { ac_try='test -z "$ac_c_werror_flag"
8119                          || test ! -s conftest.err'
8120   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8121   (eval $ac_try) 2>&5
8122   ac_status=$?
8123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8124   (exit $ac_status); }; } &&
8125          { ac_try='test -s conftest.$ac_objext'
8126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8127   (eval $ac_try) 2>&5
8128   ac_status=$?
8129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8130   (exit $ac_status); }; }; then
8131   ac_header_compiler=yes
8132 else
8133   echo "$as_me: failed program was:" >&5
8134 sed 's/^/| /' conftest.$ac_ext >&5
8135
8136 ac_header_compiler=no
8137 fi
8138 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8139 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8140 echo "${ECHO_T}$ac_header_compiler" >&6
8141
8142 # Is the header present?
8143 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8144 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8145 cat >conftest.$ac_ext <<_ACEOF
8146 /* confdefs.h.  */
8147 _ACEOF
8148 cat confdefs.h >>conftest.$ac_ext
8149 cat >>conftest.$ac_ext <<_ACEOF
8150 /* end confdefs.h.  */
8151 #include <$ac_header>
8152 _ACEOF
8153 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8154   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8155   ac_status=$?
8156   grep -v '^ *+' conftest.er1 >conftest.err
8157   rm -f conftest.er1
8158   cat conftest.err >&5
8159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8160   (exit $ac_status); } >/dev/null; then
8161   if test -s conftest.err; then
8162     ac_cpp_err=$ac_c_preproc_warn_flag
8163     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8164   else
8165     ac_cpp_err=
8166   fi
8167 else
8168   ac_cpp_err=yes
8169 fi
8170 if test -z "$ac_cpp_err"; then
8171   ac_header_preproc=yes
8172 else
8173   echo "$as_me: failed program was:" >&5
8174 sed 's/^/| /' conftest.$ac_ext >&5
8175
8176   ac_header_preproc=no
8177 fi
8178 rm -f conftest.err conftest.$ac_ext
8179 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8180 echo "${ECHO_T}$ac_header_preproc" >&6
8181
8182 # So?  What about this header?
8183 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8184   yes:no: )
8185     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8186 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8187     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8188 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8189     ac_header_preproc=yes
8190     ;;
8191   no:yes:* )
8192     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8193 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8194     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8195 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8196     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8197 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8198     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8199 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8200     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8201 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8202     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8203 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8204     (
8205       cat <<\_ASBOX
8206 ## ------------------------------------------ ##
8207 ## Report this to the AC_PACKAGE_NAME lists.  ##
8208 ## ------------------------------------------ ##
8209 _ASBOX
8210     ) |
8211       sed "s/^/$as_me: WARNING:     /" >&2
8212     ;;
8213 esac
8214 echo "$as_me:$LINENO: checking for $ac_header" >&5
8215 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8216 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8217   echo $ECHO_N "(cached) $ECHO_C" >&6
8218 else
8219   eval "$as_ac_Header=\$ac_header_preproc"
8220 fi
8221 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8222 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8223
8224 fi
8225 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8226   cat >>confdefs.h <<_ACEOF
8227 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8228 _ACEOF
8229
8230 fi
8231
8232 done
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
8246 strdup __argz_count __argz_stringify __argz_next
8247 do
8248 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8249 echo "$as_me:$LINENO: checking for $ac_func" >&5
8250 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8251 if eval "test \"\${$as_ac_var+set}\" = set"; then
8252   echo $ECHO_N "(cached) $ECHO_C" >&6
8253 else
8254   cat >conftest.$ac_ext <<_ACEOF
8255 /* confdefs.h.  */
8256 _ACEOF
8257 cat confdefs.h >>conftest.$ac_ext
8258 cat >>conftest.$ac_ext <<_ACEOF
8259 /* end confdefs.h.  */
8260 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8261    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8262 #define $ac_func innocuous_$ac_func
8263
8264 /* System header to define __stub macros and hopefully few prototypes,
8265     which can conflict with char $ac_func (); below.
8266     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8267     <limits.h> exists even on freestanding compilers.  */
8268
8269 #ifdef __STDC__
8270 # include <limits.h>
8271 #else
8272 # include <assert.h>
8273 #endif
8274
8275 #undef $ac_func
8276
8277 /* Override any gcc2 internal prototype to avoid an error.  */
8278 #ifdef __cplusplus
8279 extern "C"
8280 {
8281 #endif
8282 /* We use char because int might match the return type of a gcc2
8283    builtin and then its argument prototype would still apply.  */
8284 char $ac_func ();
8285 /* The GNU C library defines this for functions which it implements
8286     to always fail with ENOSYS.  Some functions are actually named
8287     something starting with __ and the normal name is an alias.  */
8288 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8289 choke me
8290 #else
8291 char (*f) () = $ac_func;
8292 #endif
8293 #ifdef __cplusplus
8294 }
8295 #endif
8296
8297 int
8298 main ()
8299 {
8300 return f != $ac_func;
8301   ;
8302   return 0;
8303 }
8304 _ACEOF
8305 rm -f conftest.$ac_objext conftest$ac_exeext
8306 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8307   (eval $ac_link) 2>conftest.er1
8308   ac_status=$?
8309   grep -v '^ *+' conftest.er1 >conftest.err
8310   rm -f conftest.er1
8311   cat conftest.err >&5
8312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8313   (exit $ac_status); } &&
8314          { ac_try='test -z "$ac_c_werror_flag"
8315                          || test ! -s conftest.err'
8316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8317   (eval $ac_try) 2>&5
8318   ac_status=$?
8319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8320   (exit $ac_status); }; } &&
8321          { ac_try='test -s conftest$ac_exeext'
8322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8323   (eval $ac_try) 2>&5
8324   ac_status=$?
8325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8326   (exit $ac_status); }; }; then
8327   eval "$as_ac_var=yes"
8328 else
8329   echo "$as_me: failed program was:" >&5
8330 sed 's/^/| /' conftest.$ac_ext >&5
8331
8332 eval "$as_ac_var=no"
8333 fi
8334 rm -f conftest.err conftest.$ac_objext \
8335       conftest$ac_exeext conftest.$ac_ext
8336 fi
8337 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8338 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8339 if test `eval echo '${'$as_ac_var'}'` = yes; then
8340   cat >>confdefs.h <<_ACEOF
8341 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8342 _ACEOF
8343
8344 fi
8345 done
8346
8347
8348    if test $ac_cv_header_locale_h = yes; then
8349     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
8350 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
8351 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
8352   echo $ECHO_N "(cached) $ECHO_C" >&6
8353 else
8354   cat >conftest.$ac_ext <<_ACEOF
8355 /* confdefs.h.  */
8356 _ACEOF
8357 cat confdefs.h >>conftest.$ac_ext
8358 cat >>conftest.$ac_ext <<_ACEOF
8359 /* end confdefs.h.  */
8360 #include <locale.h>
8361 int
8362 main ()
8363 {
8364 return LC_MESSAGES
8365   ;
8366   return 0;
8367 }
8368 _ACEOF
8369 rm -f conftest.$ac_objext conftest$ac_exeext
8370 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8371   (eval $ac_link) 2>conftest.er1
8372   ac_status=$?
8373   grep -v '^ *+' conftest.er1 >conftest.err
8374   rm -f conftest.er1
8375   cat conftest.err >&5
8376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8377   (exit $ac_status); } &&
8378          { ac_try='test -z "$ac_c_werror_flag"
8379                          || test ! -s conftest.err'
8380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8381   (eval $ac_try) 2>&5
8382   ac_status=$?
8383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8384   (exit $ac_status); }; } &&
8385          { ac_try='test -s conftest$ac_exeext'
8386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8387   (eval $ac_try) 2>&5
8388   ac_status=$?
8389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8390   (exit $ac_status); }; }; then
8391   am_cv_val_LC_MESSAGES=yes
8392 else
8393   echo "$as_me: failed program was:" >&5
8394 sed 's/^/| /' conftest.$ac_ext >&5
8395
8396 am_cv_val_LC_MESSAGES=no
8397 fi
8398 rm -f conftest.err conftest.$ac_objext \
8399       conftest$ac_exeext conftest.$ac_ext
8400 fi
8401 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
8402 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
8403     if test $am_cv_val_LC_MESSAGES = yes; then
8404
8405 cat >>confdefs.h <<\_ACEOF
8406 #define HAVE_LC_MESSAGES 1
8407 _ACEOF
8408
8409     fi
8410   fi
8411      USE_NLS=yes
8412
8413
8414         nls_cv_force_use_gnu_gettext="no"
8415
8416     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
8417     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
8418                               nls_cv_header_intl=
8419       nls_cv_header_libgt=
8420       CATOBJEXT=NONE
8421
8422       if test "${ac_cv_header_libintl_h+set}" = set; then
8423   echo "$as_me:$LINENO: checking for libintl.h" >&5
8424 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
8425 if test "${ac_cv_header_libintl_h+set}" = set; then
8426   echo $ECHO_N "(cached) $ECHO_C" >&6
8427 fi
8428 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
8429 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
8430 else
8431   # Is the header compilable?
8432 echo "$as_me:$LINENO: checking libintl.h usability" >&5
8433 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
8434 cat >conftest.$ac_ext <<_ACEOF
8435 /* confdefs.h.  */
8436 _ACEOF
8437 cat confdefs.h >>conftest.$ac_ext
8438 cat >>conftest.$ac_ext <<_ACEOF
8439 /* end confdefs.h.  */
8440 $ac_includes_default
8441 #include <libintl.h>
8442 _ACEOF
8443 rm -f conftest.$ac_objext
8444 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8445   (eval $ac_compile) 2>conftest.er1
8446   ac_status=$?
8447   grep -v '^ *+' conftest.er1 >conftest.err
8448   rm -f conftest.er1
8449   cat conftest.err >&5
8450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8451   (exit $ac_status); } &&
8452          { ac_try='test -z "$ac_c_werror_flag"
8453                          || test ! -s conftest.err'
8454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8455   (eval $ac_try) 2>&5
8456   ac_status=$?
8457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8458   (exit $ac_status); }; } &&
8459          { ac_try='test -s conftest.$ac_objext'
8460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8461   (eval $ac_try) 2>&5
8462   ac_status=$?
8463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8464   (exit $ac_status); }; }; then
8465   ac_header_compiler=yes
8466 else
8467   echo "$as_me: failed program was:" >&5
8468 sed 's/^/| /' conftest.$ac_ext >&5
8469
8470 ac_header_compiler=no
8471 fi
8472 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8473 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8474 echo "${ECHO_T}$ac_header_compiler" >&6
8475
8476 # Is the header present?
8477 echo "$as_me:$LINENO: checking libintl.h presence" >&5
8478 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
8479 cat >conftest.$ac_ext <<_ACEOF
8480 /* confdefs.h.  */
8481 _ACEOF
8482 cat confdefs.h >>conftest.$ac_ext
8483 cat >>conftest.$ac_ext <<_ACEOF
8484 /* end confdefs.h.  */
8485 #include <libintl.h>
8486 _ACEOF
8487 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8488   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8489   ac_status=$?
8490   grep -v '^ *+' conftest.er1 >conftest.err
8491   rm -f conftest.er1
8492   cat conftest.err >&5
8493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8494   (exit $ac_status); } >/dev/null; then
8495   if test -s conftest.err; then
8496     ac_cpp_err=$ac_c_preproc_warn_flag
8497     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8498   else
8499     ac_cpp_err=
8500   fi
8501 else
8502   ac_cpp_err=yes
8503 fi
8504 if test -z "$ac_cpp_err"; then
8505   ac_header_preproc=yes
8506 else
8507   echo "$as_me: failed program was:" >&5
8508 sed 's/^/| /' conftest.$ac_ext >&5
8509
8510   ac_header_preproc=no
8511 fi
8512 rm -f conftest.err conftest.$ac_ext
8513 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8514 echo "${ECHO_T}$ac_header_preproc" >&6
8515
8516 # So?  What about this header?
8517 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8518   yes:no: )
8519     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
8520 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8521     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
8522 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
8523     ac_header_preproc=yes
8524     ;;
8525   no:yes:* )
8526     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
8527 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
8528     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
8529 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
8530     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
8531 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
8532     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
8533 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
8534     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
8535 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
8536     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
8537 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
8538     (
8539       cat <<\_ASBOX
8540 ## ------------------------------------------ ##
8541 ## Report this to the AC_PACKAGE_NAME lists.  ##
8542 ## ------------------------------------------ ##
8543 _ASBOX
8544     ) |
8545       sed "s/^/$as_me: WARNING:     /" >&2
8546     ;;
8547 esac
8548 echo "$as_me:$LINENO: checking for libintl.h" >&5
8549 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
8550 if test "${ac_cv_header_libintl_h+set}" = set; then
8551   echo $ECHO_N "(cached) $ECHO_C" >&6
8552 else
8553   ac_cv_header_libintl_h=$ac_header_preproc
8554 fi
8555 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
8556 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
8557
8558 fi
8559 if test $ac_cv_header_libintl_h = yes; then
8560   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
8561 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
8562 if test "${gt_cv_func_dgettext_libc+set}" = set; then
8563   echo $ECHO_N "(cached) $ECHO_C" >&6
8564 else
8565   cat >conftest.$ac_ext <<_ACEOF
8566 /* confdefs.h.  */
8567 _ACEOF
8568 cat confdefs.h >>conftest.$ac_ext
8569 cat >>conftest.$ac_ext <<_ACEOF
8570 /* end confdefs.h.  */
8571 #include <libintl.h>
8572 int
8573 main ()
8574 {
8575 return (int) dgettext ("","")
8576   ;
8577   return 0;
8578 }
8579 _ACEOF
8580 rm -f conftest.$ac_objext conftest$ac_exeext
8581 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8582   (eval $ac_link) 2>conftest.er1
8583   ac_status=$?
8584   grep -v '^ *+' conftest.er1 >conftest.err
8585   rm -f conftest.er1
8586   cat conftest.err >&5
8587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8588   (exit $ac_status); } &&
8589          { ac_try='test -z "$ac_c_werror_flag"
8590                          || test ! -s conftest.err'
8591   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8592   (eval $ac_try) 2>&5
8593   ac_status=$?
8594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8595   (exit $ac_status); }; } &&
8596          { ac_try='test -s conftest$ac_exeext'
8597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8598   (eval $ac_try) 2>&5
8599   ac_status=$?
8600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8601   (exit $ac_status); }; }; then
8602   gt_cv_func_dgettext_libc=yes
8603 else
8604   echo "$as_me: failed program was:" >&5
8605 sed 's/^/| /' conftest.$ac_ext >&5
8606
8607 gt_cv_func_dgettext_libc=no
8608 fi
8609 rm -f conftest.err conftest.$ac_objext \
8610       conftest$ac_exeext conftest.$ac_ext
8611 fi
8612 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
8613 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
8614
8615           if test "$gt_cv_func_dgettext_libc" != "yes"; then
8616             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
8617 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
8618 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
8619   echo $ECHO_N "(cached) $ECHO_C" >&6
8620 else
8621   ac_check_lib_save_LIBS=$LIBS
8622 LIBS="-lintl  $LIBS"
8623 cat >conftest.$ac_ext <<_ACEOF
8624 /* confdefs.h.  */
8625 _ACEOF
8626 cat confdefs.h >>conftest.$ac_ext
8627 cat >>conftest.$ac_ext <<_ACEOF
8628 /* end confdefs.h.  */
8629
8630 /* Override any gcc2 internal prototype to avoid an error.  */
8631 #ifdef __cplusplus
8632 extern "C"
8633 #endif
8634 /* We use char because int might match the return type of a gcc2
8635    builtin and then its argument prototype would still apply.  */
8636 char bindtextdomain ();
8637 int
8638 main ()
8639 {
8640 bindtextdomain ();
8641   ;
8642   return 0;
8643 }
8644 _ACEOF
8645 rm -f conftest.$ac_objext conftest$ac_exeext
8646 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8647   (eval $ac_link) 2>conftest.er1
8648   ac_status=$?
8649   grep -v '^ *+' conftest.er1 >conftest.err
8650   rm -f conftest.er1
8651   cat conftest.err >&5
8652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8653   (exit $ac_status); } &&
8654          { ac_try='test -z "$ac_c_werror_flag"
8655                          || test ! -s conftest.err'
8656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8657   (eval $ac_try) 2>&5
8658   ac_status=$?
8659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8660   (exit $ac_status); }; } &&
8661          { ac_try='test -s conftest$ac_exeext'
8662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8663   (eval $ac_try) 2>&5
8664   ac_status=$?
8665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8666   (exit $ac_status); }; }; then
8667   ac_cv_lib_intl_bindtextdomain=yes
8668 else
8669   echo "$as_me: failed program was:" >&5
8670 sed 's/^/| /' conftest.$ac_ext >&5
8671
8672 ac_cv_lib_intl_bindtextdomain=no
8673 fi
8674 rm -f conftest.err conftest.$ac_objext \
8675       conftest$ac_exeext conftest.$ac_ext
8676 LIBS=$ac_check_lib_save_LIBS
8677 fi
8678 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
8679 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
8680 if test $ac_cv_lib_intl_bindtextdomain = yes; then
8681   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
8682 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
8683 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
8684   echo $ECHO_N "(cached) $ECHO_C" >&6
8685 else
8686   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
8687 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
8688 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
8689   echo $ECHO_N "(cached) $ECHO_C" >&6
8690 else
8691   ac_check_lib_save_LIBS=$LIBS
8692 LIBS="-lintl  $LIBS"
8693 cat >conftest.$ac_ext <<_ACEOF
8694 /* confdefs.h.  */
8695 _ACEOF
8696 cat confdefs.h >>conftest.$ac_ext
8697 cat >>conftest.$ac_ext <<_ACEOF
8698 /* end confdefs.h.  */
8699
8700 /* Override any gcc2 internal prototype to avoid an error.  */
8701 #ifdef __cplusplus
8702 extern "C"
8703 #endif
8704 /* We use char because int might match the return type of a gcc2
8705    builtin and then its argument prototype would still apply.  */
8706 char dgettext ();
8707 int
8708 main ()
8709 {
8710 dgettext ();
8711   ;
8712   return 0;
8713 }
8714 _ACEOF
8715 rm -f conftest.$ac_objext conftest$ac_exeext
8716 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8717   (eval $ac_link) 2>conftest.er1
8718   ac_status=$?
8719   grep -v '^ *+' conftest.er1 >conftest.err
8720   rm -f conftest.er1
8721   cat conftest.err >&5
8722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8723   (exit $ac_status); } &&
8724          { ac_try='test -z "$ac_c_werror_flag"
8725                          || test ! -s conftest.err'
8726   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8727   (eval $ac_try) 2>&5
8728   ac_status=$?
8729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8730   (exit $ac_status); }; } &&
8731          { ac_try='test -s conftest$ac_exeext'
8732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8733   (eval $ac_try) 2>&5
8734   ac_status=$?
8735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8736   (exit $ac_status); }; }; then
8737   ac_cv_lib_intl_dgettext=yes
8738 else
8739   echo "$as_me: failed program was:" >&5
8740 sed 's/^/| /' conftest.$ac_ext >&5
8741
8742 ac_cv_lib_intl_dgettext=no
8743 fi
8744 rm -f conftest.err conftest.$ac_objext \
8745       conftest$ac_exeext conftest.$ac_ext
8746 LIBS=$ac_check_lib_save_LIBS
8747 fi
8748 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
8749 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
8750 if test $ac_cv_lib_intl_dgettext = yes; then
8751   gt_cv_func_dgettext_libintl=yes
8752 else
8753   gt_cv_func_dgettext_libintl=no
8754 fi
8755
8756 fi
8757 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
8758 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
8759 fi
8760
8761           fi
8762
8763           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
8764             LIBS="$LIBS -lintl";
8765           fi
8766
8767           if test "$gt_cv_func_dgettext_libc" = "yes" \
8768             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
8769
8770 cat >>confdefs.h <<\_ACEOF
8771 #define HAVE_GETTEXT 1
8772 _ACEOF
8773
8774             # Extract the first word of "msgfmt", so it can be a program name with args.
8775 set dummy msgfmt; ac_word=$2
8776 echo "$as_me:$LINENO: checking for $ac_word" >&5
8777 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8778 if test "${ac_cv_path_MSGFMT+set}" = set; then
8779   echo $ECHO_N "(cached) $ECHO_C" >&6
8780 else
8781   case "$MSGFMT" in
8782   /*)
8783   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8784   ;;
8785   *)
8786   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8787   for ac_dir in $PATH; do
8788     test -z "$ac_dir" && ac_dir=.
8789     if test -f $ac_dir/$ac_word; then
8790       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
8791         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
8792         break
8793       fi
8794     fi
8795   done
8796   IFS="$ac_save_ifs"
8797   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
8798   ;;
8799 esac
8800 fi
8801 MSGFMT="$ac_cv_path_MSGFMT"
8802 if test -n "$MSGFMT"; then
8803   echo "$as_me:$LINENO: result: $MSGFMT" >&5
8804 echo "${ECHO_T}$MSGFMT" >&6
8805 else
8806   echo "$as_me:$LINENO: result: no" >&5
8807 echo "${ECHO_T}no" >&6
8808 fi
8809             if test "$MSGFMT" != "no"; then
8810
8811 for ac_func in dcgettext
8812 do
8813 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8814 echo "$as_me:$LINENO: checking for $ac_func" >&5
8815 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8816 if eval "test \"\${$as_ac_var+set}\" = set"; then
8817   echo $ECHO_N "(cached) $ECHO_C" >&6
8818 else
8819   cat >conftest.$ac_ext <<_ACEOF
8820 /* confdefs.h.  */
8821 _ACEOF
8822 cat confdefs.h >>conftest.$ac_ext
8823 cat >>conftest.$ac_ext <<_ACEOF
8824 /* end confdefs.h.  */
8825 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8826    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8827 #define $ac_func innocuous_$ac_func
8828
8829 /* System header to define __stub macros and hopefully few prototypes,
8830     which can conflict with char $ac_func (); below.
8831     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8832     <limits.h> exists even on freestanding compilers.  */
8833
8834 #ifdef __STDC__
8835 # include <limits.h>
8836 #else
8837 # include <assert.h>
8838 #endif
8839
8840 #undef $ac_func
8841
8842 /* Override any gcc2 internal prototype to avoid an error.  */
8843 #ifdef __cplusplus
8844 extern "C"
8845 {
8846 #endif
8847 /* We use char because int might match the return type of a gcc2
8848    builtin and then its argument prototype would still apply.  */
8849 char $ac_func ();
8850 /* The GNU C library defines this for functions which it implements
8851     to always fail with ENOSYS.  Some functions are actually named
8852     something starting with __ and the normal name is an alias.  */
8853 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8854 choke me
8855 #else
8856 char (*f) () = $ac_func;
8857 #endif
8858 #ifdef __cplusplus
8859 }
8860 #endif
8861
8862 int
8863 main ()
8864 {
8865 return f != $ac_func;
8866   ;
8867   return 0;
8868 }
8869 _ACEOF
8870 rm -f conftest.$ac_objext conftest$ac_exeext
8871 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8872   (eval $ac_link) 2>conftest.er1
8873   ac_status=$?
8874   grep -v '^ *+' conftest.er1 >conftest.err
8875   rm -f conftest.er1
8876   cat conftest.err >&5
8877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8878   (exit $ac_status); } &&
8879          { ac_try='test -z "$ac_c_werror_flag"
8880                          || test ! -s conftest.err'
8881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8882   (eval $ac_try) 2>&5
8883   ac_status=$?
8884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8885   (exit $ac_status); }; } &&
8886          { ac_try='test -s conftest$ac_exeext'
8887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8888   (eval $ac_try) 2>&5
8889   ac_status=$?
8890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8891   (exit $ac_status); }; }; then
8892   eval "$as_ac_var=yes"
8893 else
8894   echo "$as_me: failed program was:" >&5
8895 sed 's/^/| /' conftest.$ac_ext >&5
8896
8897 eval "$as_ac_var=no"
8898 fi
8899 rm -f conftest.err conftest.$ac_objext \
8900       conftest$ac_exeext conftest.$ac_ext
8901 fi
8902 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8903 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8904 if test `eval echo '${'$as_ac_var'}'` = yes; then
8905   cat >>confdefs.h <<_ACEOF
8906 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8907 _ACEOF
8908
8909 fi
8910 done
8911
8912               # Extract the first word of "gmsgfmt", so it can be a program name with args.
8913 set dummy gmsgfmt; ac_word=$2
8914 echo "$as_me:$LINENO: checking for $ac_word" >&5
8915 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8916 if test "${ac_cv_path_GMSGFMT+set}" = set; then
8917   echo $ECHO_N "(cached) $ECHO_C" >&6
8918 else
8919   case $GMSGFMT in
8920   [\\/]* | ?:[\\/]*)
8921   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8922   ;;
8923   *)
8924   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8925 for as_dir in $PATH
8926 do
8927   IFS=$as_save_IFS
8928   test -z "$as_dir" && as_dir=.
8929   for ac_exec_ext in '' $ac_executable_extensions; do
8930   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8931     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
8932     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8933     break 2
8934   fi
8935 done
8936 done
8937
8938   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8939   ;;
8940 esac
8941 fi
8942 GMSGFMT=$ac_cv_path_GMSGFMT
8943
8944 if test -n "$GMSGFMT"; then
8945   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
8946 echo "${ECHO_T}$GMSGFMT" >&6
8947 else
8948   echo "$as_me:$LINENO: result: no" >&5
8949 echo "${ECHO_T}no" >&6
8950 fi
8951
8952               # Extract the first word of "xgettext", so it can be a program name with args.
8953 set dummy xgettext; ac_word=$2
8954 echo "$as_me:$LINENO: checking for $ac_word" >&5
8955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8956 if test "${ac_cv_path_XGETTEXT+set}" = set; then
8957   echo $ECHO_N "(cached) $ECHO_C" >&6
8958 else
8959   case "$XGETTEXT" in
8960   /*)
8961   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8962   ;;
8963   *)
8964   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8965   for ac_dir in $PATH; do
8966     test -z "$ac_dir" && ac_dir=.
8967     if test -f $ac_dir/$ac_word; then
8968       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8969         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8970         break
8971       fi
8972     fi
8973   done
8974   IFS="$ac_save_ifs"
8975   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8976   ;;
8977 esac
8978 fi
8979 XGETTEXT="$ac_cv_path_XGETTEXT"
8980 if test -n "$XGETTEXT"; then
8981   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
8982 echo "${ECHO_T}$XGETTEXT" >&6
8983 else
8984   echo "$as_me:$LINENO: result: no" >&5
8985 echo "${ECHO_T}no" >&6
8986 fi
8987
8988               cat >conftest.$ac_ext <<_ACEOF
8989 /* confdefs.h.  */
8990 _ACEOF
8991 cat confdefs.h >>conftest.$ac_ext
8992 cat >>conftest.$ac_ext <<_ACEOF
8993 /* end confdefs.h.  */
8994
8995 int
8996 main ()
8997 {
8998 extern int _nl_msg_cat_cntr;
8999                              return _nl_msg_cat_cntr
9000   ;
9001   return 0;
9002 }
9003 _ACEOF
9004 rm -f conftest.$ac_objext conftest$ac_exeext
9005 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9006   (eval $ac_link) 2>conftest.er1
9007   ac_status=$?
9008   grep -v '^ *+' conftest.er1 >conftest.err
9009   rm -f conftest.er1
9010   cat conftest.err >&5
9011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9012   (exit $ac_status); } &&
9013          { ac_try='test -z "$ac_c_werror_flag"
9014                          || test ! -s conftest.err'
9015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9016   (eval $ac_try) 2>&5
9017   ac_status=$?
9018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9019   (exit $ac_status); }; } &&
9020          { ac_try='test -s conftest$ac_exeext'
9021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9022   (eval $ac_try) 2>&5
9023   ac_status=$?
9024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9025   (exit $ac_status); }; }; then
9026   CATOBJEXT=.gmo
9027                  DATADIRNAME=share
9028 else
9029   echo "$as_me: failed program was:" >&5
9030 sed 's/^/| /' conftest.$ac_ext >&5
9031
9032 CATOBJEXT=.mo
9033                  DATADIRNAME=lib
9034 fi
9035 rm -f conftest.err conftest.$ac_objext \
9036       conftest$ac_exeext conftest.$ac_ext
9037               INSTOBJEXT=.mo
9038             fi
9039           fi
9040
9041           # Added by Martin Baulig 12/15/98 for libc5 systems
9042           if test "$gt_cv_func_dgettext_libc" != "yes" \
9043             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
9044             INTLLIBS=-lintl
9045             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
9046           fi
9047
9048 fi
9049
9050
9051
9052       if test "$CATOBJEXT" = "NONE"; then
9053                         nls_cv_use_gnu_gettext=yes
9054       fi
9055     fi
9056
9057     if test "$nls_cv_use_gnu_gettext" != "yes"; then
9058
9059 cat >>confdefs.h <<\_ACEOF
9060 #define ENABLE_NLS 1
9061 _ACEOF
9062
9063     else
9064             CATOBJEXT=
9065     fi
9066
9067         if test "$XGETTEXT" != ":"; then
9068                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9069         : ;
9070       else
9071         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
9072 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
9073         XGETTEXT=":"
9074       fi
9075     fi
9076
9077     # We need to process the po/ directory.
9078     POSUB=po
9079
9080               ac_config_commands="$ac_config_commands default-2"
9081
9082
9083                 for lang in $ALL_LINGUAS; do
9084       GMOFILES="$GMOFILES $lang.gmo"
9085       POFILES="$POFILES $lang.po"
9086     done
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100    if test "x$CATOBJEXT" != "x"; then
9101      if test "x$ALL_LINGUAS" = "x"; then
9102        LINGUAS=
9103      else
9104        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9105 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
9106        NEW_LINGUAS=
9107        for lang in ${LINGUAS=$ALL_LINGUAS}; do
9108          case "$ALL_LINGUAS" in
9109           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
9110          esac
9111        done
9112        LINGUAS=$NEW_LINGUAS
9113        echo "$as_me:$LINENO: result: $LINGUAS" >&5
9114 echo "${ECHO_T}$LINGUAS" >&6
9115      fi
9116
9117           if test -n "$LINGUAS"; then
9118        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9119      fi
9120    fi
9121
9122             test -d po || mkdir po
9123    if test "$CATOBJEXT" = ".cat"; then
9124      if test "${ac_cv_header_linux_version_h+set}" = set; then
9125   echo "$as_me:$LINENO: checking for linux/version.h" >&5
9126 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
9127 if test "${ac_cv_header_linux_version_h+set}" = set; then
9128   echo $ECHO_N "(cached) $ECHO_C" >&6
9129 fi
9130 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9131 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
9132 else
9133   # Is the header compilable?
9134 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
9135 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
9136 cat >conftest.$ac_ext <<_ACEOF
9137 /* confdefs.h.  */
9138 _ACEOF
9139 cat confdefs.h >>conftest.$ac_ext
9140 cat >>conftest.$ac_ext <<_ACEOF
9141 /* end confdefs.h.  */
9142 $ac_includes_default
9143 #include <linux/version.h>
9144 _ACEOF
9145 rm -f conftest.$ac_objext
9146 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9147   (eval $ac_compile) 2>conftest.er1
9148   ac_status=$?
9149   grep -v '^ *+' conftest.er1 >conftest.err
9150   rm -f conftest.er1
9151   cat conftest.err >&5
9152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9153   (exit $ac_status); } &&
9154          { ac_try='test -z "$ac_c_werror_flag"
9155                          || test ! -s conftest.err'
9156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9157   (eval $ac_try) 2>&5
9158   ac_status=$?
9159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9160   (exit $ac_status); }; } &&
9161          { ac_try='test -s conftest.$ac_objext'
9162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9163   (eval $ac_try) 2>&5
9164   ac_status=$?
9165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9166   (exit $ac_status); }; }; then
9167   ac_header_compiler=yes
9168 else
9169   echo "$as_me: failed program was:" >&5
9170 sed 's/^/| /' conftest.$ac_ext >&5
9171
9172 ac_header_compiler=no
9173 fi
9174 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9175 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9176 echo "${ECHO_T}$ac_header_compiler" >&6
9177
9178 # Is the header present?
9179 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
9180 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
9181 cat >conftest.$ac_ext <<_ACEOF
9182 /* confdefs.h.  */
9183 _ACEOF
9184 cat confdefs.h >>conftest.$ac_ext
9185 cat >>conftest.$ac_ext <<_ACEOF
9186 /* end confdefs.h.  */
9187 #include <linux/version.h>
9188 _ACEOF
9189 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9190   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9191   ac_status=$?
9192   grep -v '^ *+' conftest.er1 >conftest.err
9193   rm -f conftest.er1
9194   cat conftest.err >&5
9195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9196   (exit $ac_status); } >/dev/null; then
9197   if test -s conftest.err; then
9198     ac_cpp_err=$ac_c_preproc_warn_flag
9199     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9200   else
9201     ac_cpp_err=
9202   fi
9203 else
9204   ac_cpp_err=yes
9205 fi
9206 if test -z "$ac_cpp_err"; then
9207   ac_header_preproc=yes
9208 else
9209   echo "$as_me: failed program was:" >&5
9210 sed 's/^/| /' conftest.$ac_ext >&5
9211
9212   ac_header_preproc=no
9213 fi
9214 rm -f conftest.err conftest.$ac_ext
9215 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9216 echo "${ECHO_T}$ac_header_preproc" >&6
9217
9218 # So?  What about this header?
9219 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9220   yes:no: )
9221     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
9222 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9223     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
9224 echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
9225     ac_header_preproc=yes
9226     ;;
9227   no:yes:* )
9228     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
9229 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
9230     { echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
9231 echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
9232     { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
9233 echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
9234     { echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
9235 echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9236     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
9237 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
9238     { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
9239 echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
9240     (
9241       cat <<\_ASBOX
9242 ## ------------------------------------------ ##
9243 ## Report this to the AC_PACKAGE_NAME lists.  ##
9244 ## ------------------------------------------ ##
9245 _ASBOX
9246     ) |
9247       sed "s/^/$as_me: WARNING:     /" >&2
9248     ;;
9249 esac
9250 echo "$as_me:$LINENO: checking for linux/version.h" >&5
9251 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
9252 if test "${ac_cv_header_linux_version_h+set}" = set; then
9253   echo $ECHO_N "(cached) $ECHO_C" >&6
9254 else
9255   ac_cv_header_linux_version_h=$ac_header_preproc
9256 fi
9257 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9258 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
9259
9260 fi
9261 if test $ac_cv_header_linux_version_h = yes; then
9262   msgformat=linux
9263 else
9264   msgformat=xopen
9265 fi
9266
9267
9268
9269                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
9270    fi
9271
9272             MKINSTALLDIRS=
9273 #
9274 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
9275 #
9276 #   if test -n "$ac_aux_dir"; then
9277 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
9278 #   fi
9279    if test -z "$MKINSTALLDIRS"; then
9280      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
9281    fi
9282
9283    # jwz: you know what, screw it.  Let's just use the version that I
9284    # already computed in configure.in, instead of this version that came
9285    # with the i18n crud, ok?
9286    MKINSTALLDIRS="$INSTALL_DIRS"
9287
9288
9289
9290
9291          test -d po || mkdir po
9292    if test "x$srcdir" != "x."; then
9293      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
9294        posrcprefix="$srcdir/"
9295      else
9296        posrcprefix="../$srcdir/"
9297      fi
9298    else
9299      posrcprefix="../"
9300    fi
9301    rm -f po/POTFILES
9302    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
9303         < $srcdir/po/POTFILES.in > po/POTFILES
9304
9305 MKINSTALLDIRS="$INSTALL_DIRS"
9306
9307
9308 ###############################################################################
9309 #
9310 #       Check for -lXmu (some fucked up vendors don't ship it...)
9311 #
9312 ###############################################################################
9313
9314 have_xmu=no
9315
9316   ac_save_CPPFLAGS="$CPPFLAGS"
9317   if test \! -z "$includedir" ; then
9318     CPPFLAGS="$CPPFLAGS -I$includedir"
9319   fi
9320   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9321   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
9322 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
9323 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
9324   echo $ECHO_N "(cached) $ECHO_C" >&6
9325 else
9326   cat >conftest.$ac_ext <<_ACEOF
9327 /* confdefs.h.  */
9328 _ACEOF
9329 cat confdefs.h >>conftest.$ac_ext
9330 cat >>conftest.$ac_ext <<_ACEOF
9331 /* end confdefs.h.  */
9332 #include <stdlib.h>
9333                    #include <stdio.h>
9334                    #include <X11/Intrinsic.h>
9335
9336 #include <X11/Xmu/Error.h>
9337 _ACEOF
9338 rm -f conftest.$ac_objext
9339 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9340   (eval $ac_compile) 2>conftest.er1
9341   ac_status=$?
9342   grep -v '^ *+' conftest.er1 >conftest.err
9343   rm -f conftest.er1
9344   cat conftest.err >&5
9345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9346   (exit $ac_status); } &&
9347          { ac_try='test -z "$ac_c_werror_flag"
9348                          || test ! -s conftest.err'
9349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9350   (eval $ac_try) 2>&5
9351   ac_status=$?
9352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9353   (exit $ac_status); }; } &&
9354          { ac_try='test -s conftest.$ac_objext'
9355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9356   (eval $ac_try) 2>&5
9357   ac_status=$?
9358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9359   (exit $ac_status); }; }; then
9360   ac_cv_header_X11_Xmu_Error_h=yes
9361 else
9362   echo "$as_me: failed program was:" >&5
9363 sed 's/^/| /' conftest.$ac_ext >&5
9364
9365 ac_cv_header_X11_Xmu_Error_h=no
9366 fi
9367 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9368 fi
9369 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
9370 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
9371 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
9372   have_xmu=yes
9373 fi
9374
9375
9376   CPPFLAGS="$ac_save_CPPFLAGS"
9377 if test "$have_xmu" = no ; then
9378   XMU_SRCS='$(UTILS_SRC)/xmu.c'
9379   XMU_OBJS='$(UTILS_BIN)/xmu.o'
9380   XMU_LIBS=''
9381 else
9382   XMU_SRCS=''
9383   XMU_OBJS=''
9384   XMU_LIBS='-lXmu'
9385   cat >>confdefs.h <<\_ACEOF
9386 #define HAVE_XMU 1
9387 _ACEOF
9388
9389 fi
9390
9391
9392 ###############################################################################
9393 #
9394 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
9395 #       See comp.windows.x FAQ question 124.  The right fix is to
9396 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
9397 #
9398 ###############################################################################
9399
9400 if test "$have_xmu" = yes ; then
9401   case "$host" in
9402     *-sunos4*)
9403     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
9404 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
9405 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
9406   echo $ECHO_N "(cached) $ECHO_C" >&6
9407 else
9408   ac_save_LDFLAGS="$LDFLAGS"
9409                     if test \! -z "$x_libraries" ; then
9410                       LDFLAGS="$LDFLAGS -L$x_libraries"
9411                     fi
9412                     # Note: this trick never works!  (Generally.)
9413                     # We're only getting away with using AC_TRY_LINK
9414                     # with X libraries because we know it's SunOS.
9415                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
9416                     cat >conftest.$ac_ext <<_ACEOF
9417 /* confdefs.h.  */
9418 _ACEOF
9419 cat confdefs.h >>conftest.$ac_ext
9420 cat >>conftest.$ac_ext <<_ACEOF
9421 /* end confdefs.h.  */
9422
9423 int
9424 main ()
9425 {
9426
9427   ;
9428   return 0;
9429 }
9430 _ACEOF
9431 rm -f conftest.$ac_objext conftest$ac_exeext
9432 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9433   (eval $ac_link) 2>conftest.er1
9434   ac_status=$?
9435   grep -v '^ *+' conftest.er1 >conftest.err
9436   rm -f conftest.er1
9437   cat conftest.err >&5
9438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9439   (exit $ac_status); } &&
9440          { ac_try='test -z "$ac_c_werror_flag"
9441                          || test ! -s conftest.err'
9442   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9443   (eval $ac_try) 2>&5
9444   ac_status=$?
9445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9446   (exit $ac_status); }; } &&
9447          { ac_try='test -s conftest$ac_exeext'
9448   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9449   (eval $ac_try) 2>&5
9450   ac_status=$?
9451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9452   (exit $ac_status); }; }; then
9453   ac_cv_sunos_xmu_bug=no
9454 else
9455   echo "$as_me: failed program was:" >&5
9456 sed 's/^/| /' conftest.$ac_ext >&5
9457
9458 ac_cv_sunos_xmu_bug=yes
9459 fi
9460 rm -f conftest.err conftest.$ac_objext \
9461       conftest$ac_exeext conftest.$ac_ext
9462                     LDFLAGS="$ac_save_LDFLAGS"
9463 fi
9464 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
9465 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
9466     if test "$ac_cv_sunos_xmu_bug" = yes ; then
9467       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
9468 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
9469 if test "${ac_cv_ld_static+set}" = set; then
9470   echo $ECHO_N "(cached) $ECHO_C" >&6
9471 else
9472   ac_save_LDFLAGS="$LDFLAGS"
9473                       LDFLAGS="$LDFLAGS -static"
9474                       cat >conftest.$ac_ext <<_ACEOF
9475 /* confdefs.h.  */
9476 _ACEOF
9477 cat confdefs.h >>conftest.$ac_ext
9478 cat >>conftest.$ac_ext <<_ACEOF
9479 /* end confdefs.h.  */
9480
9481 int
9482 main ()
9483 {
9484
9485   ;
9486   return 0;
9487 }
9488 _ACEOF
9489 rm -f conftest.$ac_objext conftest$ac_exeext
9490 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9491   (eval $ac_link) 2>conftest.er1
9492   ac_status=$?
9493   grep -v '^ *+' conftest.er1 >conftest.err
9494   rm -f conftest.er1
9495   cat conftest.err >&5
9496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9497   (exit $ac_status); } &&
9498          { ac_try='test -z "$ac_c_werror_flag"
9499                          || test ! -s conftest.err'
9500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9501   (eval $ac_try) 2>&5
9502   ac_status=$?
9503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9504   (exit $ac_status); }; } &&
9505          { ac_try='test -s conftest$ac_exeext'
9506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9507   (eval $ac_try) 2>&5
9508   ac_status=$?
9509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9510   (exit $ac_status); }; }; then
9511   ac_cv_ld_static=yes
9512 else
9513   echo "$as_me: failed program was:" >&5
9514 sed 's/^/| /' conftest.$ac_ext >&5
9515
9516 ac_cv_ld_static=no
9517 fi
9518 rm -f conftest.err conftest.$ac_objext \
9519       conftest$ac_exeext conftest.$ac_ext
9520                     LDFLAGS="$ac_save_LDFLAGS"
9521 fi
9522 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
9523 echo "${ECHO_T}$ac_cv_ld_static" >&6
9524       if test "$ac_cv_ld_static" = yes ; then
9525         LDFLAGS="$LDFLAGS -static"
9526       else
9527         LDFLAGS="$LDFLAGS -Bstatic"
9528       fi
9529     fi
9530     ;;
9531   esac
9532 fi
9533
9534
9535 ###############################################################################
9536 #
9537 #       Handle the --with-hackdir option
9538 #
9539 ###############################################################################
9540
9541 have_hackdir=yes
9542 with_hackdir_req=unspecified
9543
9544 # Check whether --with-hackdir or --without-hackdir was given.
9545 if test "${with_hackdir+set}" = set; then
9546   withval="$with_hackdir"
9547   with_hackdir="$withval"; with_hackdir_req="$withval"
9548 else
9549   with_hackdir=yes
9550 fi;
9551
9552 if test x"$with_hackdir" = xyes; then
9553   HACKDIR='${exec_prefix}/lib/xscreensaver'
9554 elif test x"$with_hackdir" = xno; then
9555   HACKDIR='${bindir}'
9556 else
9557   # there must be a better way than this...
9558   if test -z "`echo $with_hackdir | sed 's@^/.*@@'`" ; then
9559     # absolute path
9560     HACKDIR=$with_hackdir
9561   else
9562     # relative path
9563     HACKDIR="\${exec_prefix}$with_hackdir"
9564   fi
9565 fi
9566
9567 # canonicalize slashes.
9568 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
9569
9570 # This option used to be called --enable-subdir; make sure that is no longer
9571 # used, since configure brain-damagedly ignores unknown --enable options.
9572
9573 obsolete_enable=
9574 # Check whether --enable-subdir or --disable-subdir was given.
9575 if test "${enable_subdir+set}" = set; then
9576   enableval="$enable_subdir"
9577   obsolete_enable=yes
9578 fi;
9579 if test -n "$obsolete_enable"; then
9580   echo "error: the --enable-subdir option has been replaced with"
9581   echo "       the new --with-hackdir option; see \`configure --help'"
9582   echo "       for more information."
9583   exit 1
9584 fi
9585
9586
9587 ###############################################################################
9588 #
9589 #       Handle the --with-configdir option
9590 #
9591 ###############################################################################
9592
9593 have_configdir=yes
9594 with_configdir_req=unspecified
9595
9596 # Check whether --with-configdir or --without-configdir was given.
9597 if test "${with_configdir+set}" = set; then
9598   withval="$with_configdir"
9599   with_configdir="$withval"; with_configdir_req="$withval"
9600 else
9601   with_configdir=yes
9602 fi;
9603
9604 if test x"$with_configdir" = xyes; then
9605   # filled in later...
9606   HACK_CONF_DIR=''
9607 elif test x"$with_configdir" = xno; then
9608   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
9609   exit 1
9610 else
9611   # there must be a better way than this...
9612   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
9613     # absolute path
9614     HACK_CONF_DIR=$with_configdir
9615   else
9616     # relative path
9617     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
9618   fi
9619 fi
9620
9621
9622
9623
9624 ###############################################################################
9625 #
9626 #       Check for the SGI SCREEN_SAVER server extension.
9627 #
9628 ###############################################################################
9629
9630 have_sgi=no
9631 with_sgi_req=unspecified
9632
9633 # Check whether --with-sgi-ext or --without-sgi-ext was given.
9634 if test "${with_sgi_ext+set}" = set; then
9635   withval="$with_sgi_ext"
9636   with_sgi="$withval"; with_sgi_req="$withval"
9637 else
9638   with_sgi=yes
9639 fi;
9640
9641
9642    case "$with_sgi" in
9643     yes) ;;
9644     no)  ;;
9645
9646     /*)
9647      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
9648 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
9649      d=$with_sgi/include
9650      if test -d $d; then
9651        X_CFLAGS="-I$d $X_CFLAGS"
9652        echo "$as_me:$LINENO: result: $d" >&5
9653 echo "${ECHO_T}$d" >&6
9654      else
9655        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9656 echo "${ECHO_T}not found ($d: no such directory)" >&6
9657      fi
9658
9659      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
9660 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
9661      d=$with_sgi/lib
9662      if test -d $d; then
9663        X_LIBS="-L$d $X_LIBS"
9664        echo "$as_me:$LINENO: result: $d" >&5
9665 echo "${ECHO_T}$d" >&6
9666      else
9667        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9668 echo "${ECHO_T}not found ($d: no such directory)" >&6
9669      fi
9670
9671      # replace the directory string with "yes".
9672      with_sgi_req="yes"
9673      with_sgi=$with_sgi_req
9674      ;;
9675
9676     *)
9677      echo ""
9678      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
9679      echo "       If it is a directory, then \`DIR/include' will be added to"
9680      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9681      exit 1
9682      ;;
9683    esac
9684
9685
9686 if test "$with_sgi" = yes; then
9687
9688   ac_save_CPPFLAGS="$CPPFLAGS"
9689   if test \! -z "$includedir" ; then
9690     CPPFLAGS="$CPPFLAGS -I$includedir"
9691   fi
9692   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9693   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
9694 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
9695 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
9696   echo $ECHO_N "(cached) $ECHO_C" >&6
9697 else
9698   cat >conftest.$ac_ext <<_ACEOF
9699 /* confdefs.h.  */
9700 _ACEOF
9701 cat confdefs.h >>conftest.$ac_ext
9702 cat >>conftest.$ac_ext <<_ACEOF
9703 /* end confdefs.h.  */
9704 #include <X11/Xlib.h>
9705
9706 #include <X11/extensions/XScreenSaver.h>
9707 _ACEOF
9708 rm -f conftest.$ac_objext
9709 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9710   (eval $ac_compile) 2>conftest.er1
9711   ac_status=$?
9712   grep -v '^ *+' conftest.er1 >conftest.err
9713   rm -f conftest.er1
9714   cat conftest.err >&5
9715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9716   (exit $ac_status); } &&
9717          { ac_try='test -z "$ac_c_werror_flag"
9718                          || test ! -s conftest.err'
9719   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9720   (eval $ac_try) 2>&5
9721   ac_status=$?
9722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9723   (exit $ac_status); }; } &&
9724          { ac_try='test -s conftest.$ac_objext'
9725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9726   (eval $ac_try) 2>&5
9727   ac_status=$?
9728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9729   (exit $ac_status); }; }; then
9730   ac_cv_header_X11_extensions_XScreenSaver_h=yes
9731 else
9732   echo "$as_me: failed program was:" >&5
9733 sed 's/^/| /' conftest.$ac_ext >&5
9734
9735 ac_cv_header_X11_extensions_XScreenSaver_h=no
9736 fi
9737 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9738 fi
9739 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
9740 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
9741 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
9742   have_sgi=yes
9743                      cat >>confdefs.h <<\_ACEOF
9744 #define HAVE_SGI_SAVER_EXTENSION 1
9745 _ACEOF
9746
9747 fi
9748
9749
9750   CPPFLAGS="$ac_save_CPPFLAGS"
9751
9752 elif test "$with_sgi" != no; then
9753   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
9754   exit 1
9755 fi
9756
9757
9758 ###############################################################################
9759 #
9760 #       Check for the MIT-SCREEN-SAVER server extension.
9761 #
9762 ###############################################################################
9763
9764 have_mit=no
9765 with_mit_req=unspecified
9766
9767 # Check whether --with-mit-ext or --without-mit-ext was given.
9768 if test "${with_mit_ext+set}" = set; then
9769   withval="$with_mit_ext"
9770   with_mit="$withval"; with_mit_req="$withval"
9771 else
9772   with_mit=yes
9773 fi;
9774
9775
9776    case "$with_mit" in
9777     yes) ;;
9778     no)  ;;
9779
9780     /*)
9781      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER headers" >&5
9782 echo $ECHO_N "checking for MIT-SCREEN-SAVER headers... $ECHO_C" >&6
9783      d=$with_mit/include
9784      if test -d $d; then
9785        X_CFLAGS="-I$d $X_CFLAGS"
9786        echo "$as_me:$LINENO: result: $d" >&5
9787 echo "${ECHO_T}$d" >&6
9788      else
9789        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9790 echo "${ECHO_T}not found ($d: no such directory)" >&6
9791      fi
9792
9793      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER libs" >&5
9794 echo $ECHO_N "checking for MIT-SCREEN-SAVER libs... $ECHO_C" >&6
9795      d=$with_mit/lib
9796      if test -d $d; then
9797        X_LIBS="-L$d $X_LIBS"
9798        echo "$as_me:$LINENO: result: $d" >&5
9799 echo "${ECHO_T}$d" >&6
9800      else
9801        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9802 echo "${ECHO_T}not found ($d: no such directory)" >&6
9803      fi
9804
9805      # replace the directory string with "yes".
9806      with_mit_req="yes"
9807      with_mit=$with_mit_req
9808      ;;
9809
9810     *)
9811      echo ""
9812      echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
9813      echo "       If it is a directory, then \`DIR/include' will be added to"
9814      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9815      exit 1
9816      ;;
9817    esac
9818
9819
9820 if test "$with_mit" = yes; then
9821
9822   ac_save_CPPFLAGS="$CPPFLAGS"
9823   if test \! -z "$includedir" ; then
9824     CPPFLAGS="$CPPFLAGS -I$includedir"
9825   fi
9826   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9827   echo "$as_me:$LINENO: checking for X11/extensions/scrnsaver.h" >&5
9828 echo $ECHO_N "checking for X11/extensions/scrnsaver.h... $ECHO_C" >&6
9829 if test "${ac_cv_header_X11_extensions_scrnsaver_h+set}" = set; then
9830   echo $ECHO_N "(cached) $ECHO_C" >&6
9831 else
9832   cat >conftest.$ac_ext <<_ACEOF
9833 /* confdefs.h.  */
9834 _ACEOF
9835 cat confdefs.h >>conftest.$ac_ext
9836 cat >>conftest.$ac_ext <<_ACEOF
9837 /* end confdefs.h.  */
9838 #include <X11/Xlib.h>
9839
9840 #include <X11/extensions/scrnsaver.h>
9841 _ACEOF
9842 rm -f conftest.$ac_objext
9843 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9844   (eval $ac_compile) 2>conftest.er1
9845   ac_status=$?
9846   grep -v '^ *+' conftest.er1 >conftest.err
9847   rm -f conftest.er1
9848   cat conftest.err >&5
9849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9850   (exit $ac_status); } &&
9851          { ac_try='test -z "$ac_c_werror_flag"
9852                          || test ! -s conftest.err'
9853   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9854   (eval $ac_try) 2>&5
9855   ac_status=$?
9856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9857   (exit $ac_status); }; } &&
9858          { ac_try='test -s conftest.$ac_objext'
9859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9860   (eval $ac_try) 2>&5
9861   ac_status=$?
9862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9863   (exit $ac_status); }; }; then
9864   ac_cv_header_X11_extensions_scrnsaver_h=yes
9865 else
9866   echo "$as_me: failed program was:" >&5
9867 sed 's/^/| /' conftest.$ac_ext >&5
9868
9869 ac_cv_header_X11_extensions_scrnsaver_h=no
9870 fi
9871 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9872 fi
9873 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_scrnsaver_h" >&5
9874 echo "${ECHO_T}$ac_cv_header_X11_extensions_scrnsaver_h" >&6
9875 if test $ac_cv_header_X11_extensions_scrnsaver_h = yes; then
9876   have_mit=yes
9877 fi
9878
9879
9880   CPPFLAGS="$ac_save_CPPFLAGS"
9881
9882   # Now check to see if it's really in the library; XF86Free-3.3 ships
9883   # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
9884   #
9885   if test "$have_mit" = yes; then
9886
9887   ac_save_CPPFLAGS="$CPPFLAGS"
9888   ac_save_LDFLAGS="$LDFLAGS"
9889 #  ac_save_LIBS="$LIBS"
9890
9891   if test \! -z "$includedir" ; then
9892     CPPFLAGS="$CPPFLAGS -I$includedir"
9893   fi
9894   # note: $X_CFLAGS includes $x_includes
9895   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9896
9897   if test \! -z "$libdir" ; then
9898     LDFLAGS="$LDFLAGS -L$libdir"
9899   fi
9900   # note: $X_LIBS includes $x_libraries
9901   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9902
9903   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXext" >&5
9904 echo $ECHO_N "checking for XScreenSaverRegister in -lXext... $ECHO_C" >&6
9905 if test "${ac_cv_lib_Xext_XScreenSaverRegister+set}" = set; then
9906   echo $ECHO_N "(cached) $ECHO_C" >&6
9907 else
9908   ac_check_lib_save_LIBS=$LIBS
9909 LIBS="-lXext -lm $LIBS"
9910 cat >conftest.$ac_ext <<_ACEOF
9911 /* confdefs.h.  */
9912 _ACEOF
9913 cat confdefs.h >>conftest.$ac_ext
9914 cat >>conftest.$ac_ext <<_ACEOF
9915 /* end confdefs.h.  */
9916
9917 /* Override any gcc2 internal prototype to avoid an error.  */
9918 #ifdef __cplusplus
9919 extern "C"
9920 #endif
9921 /* We use char because int might match the return type of a gcc2
9922    builtin and then its argument prototype would still apply.  */
9923 char XScreenSaverRegister ();
9924 int
9925 main ()
9926 {
9927 XScreenSaverRegister ();
9928   ;
9929   return 0;
9930 }
9931 _ACEOF
9932 rm -f conftest.$ac_objext conftest$ac_exeext
9933 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9934   (eval $ac_link) 2>conftest.er1
9935   ac_status=$?
9936   grep -v '^ *+' conftest.er1 >conftest.err
9937   rm -f conftest.er1
9938   cat conftest.err >&5
9939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9940   (exit $ac_status); } &&
9941          { ac_try='test -z "$ac_c_werror_flag"
9942                          || test ! -s conftest.err'
9943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9944   (eval $ac_try) 2>&5
9945   ac_status=$?
9946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9947   (exit $ac_status); }; } &&
9948          { ac_try='test -s conftest$ac_exeext'
9949   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9950   (eval $ac_try) 2>&5
9951   ac_status=$?
9952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9953   (exit $ac_status); }; }; then
9954   ac_cv_lib_Xext_XScreenSaverRegister=yes
9955 else
9956   echo "$as_me: failed program was:" >&5
9957 sed 's/^/| /' conftest.$ac_ext >&5
9958
9959 ac_cv_lib_Xext_XScreenSaverRegister=no
9960 fi
9961 rm -f conftest.err conftest.$ac_objext \
9962       conftest$ac_exeext conftest.$ac_ext
9963 LIBS=$ac_check_lib_save_LIBS
9964 fi
9965 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XScreenSaverRegister" >&5
9966 echo "${ECHO_T}$ac_cv_lib_Xext_XScreenSaverRegister" >&6
9967 if test $ac_cv_lib_Xext_XScreenSaverRegister = yes; then
9968   true
9969 else
9970   have_mit=no
9971 fi
9972
9973   CPPFLAGS="$ac_save_CPPFLAGS"
9974   LDFLAGS="$ac_save_LDFLAGS"
9975 #  LIBS="$ac_save_LIBS"
9976
9977
9978     if test "$have_mit" = no; then
9979       # Fuck!  Looks like XF86Free-3.3 actually puts it in XExExt instead
9980       # of in Xext.  Thank you master, may I have another.
9981
9982   ac_save_CPPFLAGS="$CPPFLAGS"
9983   ac_save_LDFLAGS="$LDFLAGS"
9984 #  ac_save_LIBS="$LIBS"
9985
9986   if test \! -z "$includedir" ; then
9987     CPPFLAGS="$CPPFLAGS -I$includedir"
9988   fi
9989   # note: $X_CFLAGS includes $x_includes
9990   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9991
9992   if test \! -z "$libdir" ; then
9993     LDFLAGS="$LDFLAGS -L$libdir"
9994   fi
9995   # note: $X_LIBS includes $x_libraries
9996   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9997
9998   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXExExt" >&5
9999 echo $ECHO_N "checking for XScreenSaverRegister in -lXExExt... $ECHO_C" >&6
10000 if test "${ac_cv_lib_XExExt_XScreenSaverRegister+set}" = set; then
10001   echo $ECHO_N "(cached) $ECHO_C" >&6
10002 else
10003   ac_check_lib_save_LIBS=$LIBS
10004 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
10005 cat >conftest.$ac_ext <<_ACEOF
10006 /* confdefs.h.  */
10007 _ACEOF
10008 cat confdefs.h >>conftest.$ac_ext
10009 cat >>conftest.$ac_ext <<_ACEOF
10010 /* end confdefs.h.  */
10011
10012 /* Override any gcc2 internal prototype to avoid an error.  */
10013 #ifdef __cplusplus
10014 extern "C"
10015 #endif
10016 /* We use char because int might match the return type of a gcc2
10017    builtin and then its argument prototype would still apply.  */
10018 char XScreenSaverRegister ();
10019 int
10020 main ()
10021 {
10022 XScreenSaverRegister ();
10023   ;
10024   return 0;
10025 }
10026 _ACEOF
10027 rm -f conftest.$ac_objext conftest$ac_exeext
10028 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10029   (eval $ac_link) 2>conftest.er1
10030   ac_status=$?
10031   grep -v '^ *+' conftest.er1 >conftest.err
10032   rm -f conftest.er1
10033   cat conftest.err >&5
10034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10035   (exit $ac_status); } &&
10036          { ac_try='test -z "$ac_c_werror_flag"
10037                          || test ! -s conftest.err'
10038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10039   (eval $ac_try) 2>&5
10040   ac_status=$?
10041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10042   (exit $ac_status); }; } &&
10043          { ac_try='test -s conftest$ac_exeext'
10044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10045   (eval $ac_try) 2>&5
10046   ac_status=$?
10047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10048   (exit $ac_status); }; }; then
10049   ac_cv_lib_XExExt_XScreenSaverRegister=yes
10050 else
10051   echo "$as_me: failed program was:" >&5
10052 sed 's/^/| /' conftest.$ac_ext >&5
10053
10054 ac_cv_lib_XExExt_XScreenSaverRegister=no
10055 fi
10056 rm -f conftest.err conftest.$ac_objext \
10057       conftest$ac_exeext conftest.$ac_ext
10058 LIBS=$ac_check_lib_save_LIBS
10059 fi
10060 echo "$as_me:$LINENO: result: $ac_cv_lib_XExExt_XScreenSaverRegister" >&5
10061 echo "${ECHO_T}$ac_cv_lib_XExExt_XScreenSaverRegister" >&6
10062 if test $ac_cv_lib_XExExt_XScreenSaverRegister = yes; then
10063   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
10064 else
10065   true
10066 fi
10067
10068   CPPFLAGS="$ac_save_CPPFLAGS"
10069   LDFLAGS="$ac_save_LDFLAGS"
10070 #  LIBS="$ac_save_LIBS"
10071
10072     fi
10073
10074     if test "$have_mit" = no; then
10075       # Double fuck!  Looks like some versions of XFree86 (whichever version
10076       # it is that comes with RedHat Linux 2.0 -- I can't find a version
10077       # number) put this garbage in Xss instead of Xext.  Thank you master,
10078       #  may I have another.
10079
10080   ac_save_CPPFLAGS="$CPPFLAGS"
10081   ac_save_LDFLAGS="$LDFLAGS"
10082 #  ac_save_LIBS="$LIBS"
10083
10084   if test \! -z "$includedir" ; then
10085     CPPFLAGS="$CPPFLAGS -I$includedir"
10086   fi
10087   # note: $X_CFLAGS includes $x_includes
10088   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10089
10090   if test \! -z "$libdir" ; then
10091     LDFLAGS="$LDFLAGS -L$libdir"
10092   fi
10093   # note: $X_LIBS includes $x_libraries
10094   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10095
10096   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXss" >&5
10097 echo $ECHO_N "checking for XScreenSaverRegister in -lXss... $ECHO_C" >&6
10098 if test "${ac_cv_lib_Xss_XScreenSaverRegister+set}" = set; then
10099   echo $ECHO_N "(cached) $ECHO_C" >&6
10100 else
10101   ac_check_lib_save_LIBS=$LIBS
10102 LIBS="-lXss -lX11 -lXext -lm $LIBS"
10103 cat >conftest.$ac_ext <<_ACEOF
10104 /* confdefs.h.  */
10105 _ACEOF
10106 cat confdefs.h >>conftest.$ac_ext
10107 cat >>conftest.$ac_ext <<_ACEOF
10108 /* end confdefs.h.  */
10109
10110 /* Override any gcc2 internal prototype to avoid an error.  */
10111 #ifdef __cplusplus
10112 extern "C"
10113 #endif
10114 /* We use char because int might match the return type of a gcc2
10115    builtin and then its argument prototype would still apply.  */
10116 char XScreenSaverRegister ();
10117 int
10118 main ()
10119 {
10120 XScreenSaverRegister ();
10121   ;
10122   return 0;
10123 }
10124 _ACEOF
10125 rm -f conftest.$ac_objext conftest$ac_exeext
10126 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10127   (eval $ac_link) 2>conftest.er1
10128   ac_status=$?
10129   grep -v '^ *+' conftest.er1 >conftest.err
10130   rm -f conftest.er1
10131   cat conftest.err >&5
10132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10133   (exit $ac_status); } &&
10134          { ac_try='test -z "$ac_c_werror_flag"
10135                          || test ! -s conftest.err'
10136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10137   (eval $ac_try) 2>&5
10138   ac_status=$?
10139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10140   (exit $ac_status); }; } &&
10141          { ac_try='test -s conftest$ac_exeext'
10142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10143   (eval $ac_try) 2>&5
10144   ac_status=$?
10145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10146   (exit $ac_status); }; }; then
10147   ac_cv_lib_Xss_XScreenSaverRegister=yes
10148 else
10149   echo "$as_me: failed program was:" >&5
10150 sed 's/^/| /' conftest.$ac_ext >&5
10151
10152 ac_cv_lib_Xss_XScreenSaverRegister=no
10153 fi
10154 rm -f conftest.err conftest.$ac_objext \
10155       conftest$ac_exeext conftest.$ac_ext
10156 LIBS=$ac_check_lib_save_LIBS
10157 fi
10158 echo "$as_me:$LINENO: result: $ac_cv_lib_Xss_XScreenSaverRegister" >&5
10159 echo "${ECHO_T}$ac_cv_lib_Xss_XScreenSaverRegister" >&6
10160 if test $ac_cv_lib_Xss_XScreenSaverRegister = yes; then
10161   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
10162 else
10163   true
10164 fi
10165
10166   CPPFLAGS="$ac_save_CPPFLAGS"
10167   LDFLAGS="$ac_save_LDFLAGS"
10168 #  LIBS="$ac_save_LIBS"
10169
10170     fi
10171
10172   if test "$have_mit" = yes; then
10173     cat >>confdefs.h <<\_ACEOF
10174 #define HAVE_MIT_SAVER_EXTENSION 1
10175 _ACEOF
10176
10177   fi
10178
10179   fi
10180
10181 elif test "$with_mit" != no; then
10182   echo "error: must be yes or no: --with-mit-ext=$with_mit"
10183   exit 1
10184 fi
10185
10186
10187 ###############################################################################
10188 #
10189 #       Check for the XIDLE server extension.
10190 #
10191 ###############################################################################
10192
10193 have_xidle=no
10194 with_xidle_req=unspecified
10195
10196 # Check whether --with-xidle-ext or --without-xidle-ext was given.
10197 if test "${with_xidle_ext+set}" = set; then
10198   withval="$with_xidle_ext"
10199   with_xidle="$withval"; with_xidle_req="$withval"
10200 else
10201   with_xidle=yes
10202 fi;
10203
10204
10205    case "$with_xidle" in
10206     yes) ;;
10207     no)  ;;
10208
10209     /*)
10210      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
10211 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
10212      d=$with_xidle/include
10213      if test -d $d; then
10214        X_CFLAGS="-I$d $X_CFLAGS"
10215        echo "$as_me:$LINENO: result: $d" >&5
10216 echo "${ECHO_T}$d" >&6
10217      else
10218        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10219 echo "${ECHO_T}not found ($d: no such directory)" >&6
10220      fi
10221
10222      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
10223 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
10224      d=$with_xidle/lib
10225      if test -d $d; then
10226        X_LIBS="-L$d $X_LIBS"
10227        echo "$as_me:$LINENO: result: $d" >&5
10228 echo "${ECHO_T}$d" >&6
10229      else
10230        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10231 echo "${ECHO_T}not found ($d: no such directory)" >&6
10232      fi
10233
10234      # replace the directory string with "yes".
10235      with_xidle_req="yes"
10236      with_xidle=$with_xidle_req
10237      ;;
10238
10239     *)
10240      echo ""
10241      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
10242      echo "       If it is a directory, then \`DIR/include' will be added to"
10243      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10244      exit 1
10245      ;;
10246    esac
10247
10248
10249 if test "$with_xidle" = yes; then
10250
10251   ac_save_CPPFLAGS="$CPPFLAGS"
10252   if test \! -z "$includedir" ; then
10253     CPPFLAGS="$CPPFLAGS -I$includedir"
10254   fi
10255   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10256   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
10257 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
10258 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
10259   echo $ECHO_N "(cached) $ECHO_C" >&6
10260 else
10261   cat >conftest.$ac_ext <<_ACEOF
10262 /* confdefs.h.  */
10263 _ACEOF
10264 cat confdefs.h >>conftest.$ac_ext
10265 cat >>conftest.$ac_ext <<_ACEOF
10266 /* end confdefs.h.  */
10267 #include <X11/Xlib.h>
10268
10269 #include <X11/extensions/xidle.h>
10270 _ACEOF
10271 rm -f conftest.$ac_objext
10272 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10273   (eval $ac_compile) 2>conftest.er1
10274   ac_status=$?
10275   grep -v '^ *+' conftest.er1 >conftest.err
10276   rm -f conftest.er1
10277   cat conftest.err >&5
10278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10279   (exit $ac_status); } &&
10280          { ac_try='test -z "$ac_c_werror_flag"
10281                          || test ! -s conftest.err'
10282   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10283   (eval $ac_try) 2>&5
10284   ac_status=$?
10285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10286   (exit $ac_status); }; } &&
10287          { ac_try='test -s conftest.$ac_objext'
10288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10289   (eval $ac_try) 2>&5
10290   ac_status=$?
10291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10292   (exit $ac_status); }; }; then
10293   ac_cv_header_X11_extensions_xidle_h=yes
10294 else
10295   echo "$as_me: failed program was:" >&5
10296 sed 's/^/| /' conftest.$ac_ext >&5
10297
10298 ac_cv_header_X11_extensions_xidle_h=no
10299 fi
10300 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10301 fi
10302 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
10303 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
10304 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
10305   have_xidle=yes
10306                      cat >>confdefs.h <<\_ACEOF
10307 #define HAVE_XIDLE_EXTENSION 1
10308 _ACEOF
10309
10310 fi
10311
10312
10313   CPPFLAGS="$ac_save_CPPFLAGS"
10314 elif test "$with_xidle" != no; then
10315   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
10316   exit 1
10317 fi
10318
10319
10320 ###############################################################################
10321 #
10322 #       Check for the SGI-VIDEO-CONTROL server extension.
10323 #
10324 ###############################################################################
10325
10326 have_sgivc=no
10327 with_sgivc_req=unspecified
10328
10329 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
10330 if test "${with_sgivc_ext+set}" = set; then
10331   withval="$with_sgivc_ext"
10332   with_sgivc="$withval"; with_sgivc_req="$withval"
10333 else
10334   with_sgivc=yes
10335 fi;
10336
10337
10338    case "$with_sgivc" in
10339     yes) ;;
10340     no)  ;;
10341
10342     /*)
10343      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
10344 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
10345      d=$with_sgivc/include
10346      if test -d $d; then
10347        X_CFLAGS="-I$d $X_CFLAGS"
10348        echo "$as_me:$LINENO: result: $d" >&5
10349 echo "${ECHO_T}$d" >&6
10350      else
10351        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10352 echo "${ECHO_T}not found ($d: no such directory)" >&6
10353      fi
10354
10355      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
10356 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
10357      d=$with_sgivc/lib
10358      if test -d $d; then
10359        X_LIBS="-L$d $X_LIBS"
10360        echo "$as_me:$LINENO: result: $d" >&5
10361 echo "${ECHO_T}$d" >&6
10362      else
10363        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10364 echo "${ECHO_T}not found ($d: no such directory)" >&6
10365      fi
10366
10367      # replace the directory string with "yes".
10368      with_sgivc_req="yes"
10369      with_sgivc=$with_sgivc_req
10370      ;;
10371
10372     *)
10373      echo ""
10374      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
10375      echo "       If it is a directory, then \`DIR/include' will be added to"
10376      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10377      exit 1
10378      ;;
10379    esac
10380
10381
10382 if test "$with_sgivc" = yes; then
10383
10384   # first check for XSGIvc.h
10385
10386   ac_save_CPPFLAGS="$CPPFLAGS"
10387   if test \! -z "$includedir" ; then
10388     CPPFLAGS="$CPPFLAGS -I$includedir"
10389   fi
10390   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10391   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
10392 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
10393 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
10394   echo $ECHO_N "(cached) $ECHO_C" >&6
10395 else
10396   cat >conftest.$ac_ext <<_ACEOF
10397 /* confdefs.h.  */
10398 _ACEOF
10399 cat confdefs.h >>conftest.$ac_ext
10400 cat >>conftest.$ac_ext <<_ACEOF
10401 /* end confdefs.h.  */
10402 #include <X11/Xlib.h>
10403
10404 #include <X11/extensions/XSGIvc.h>
10405 _ACEOF
10406 rm -f conftest.$ac_objext
10407 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10408   (eval $ac_compile) 2>conftest.er1
10409   ac_status=$?
10410   grep -v '^ *+' conftest.er1 >conftest.err
10411   rm -f conftest.er1
10412   cat conftest.err >&5
10413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10414   (exit $ac_status); } &&
10415          { ac_try='test -z "$ac_c_werror_flag"
10416                          || test ! -s conftest.err'
10417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10418   (eval $ac_try) 2>&5
10419   ac_status=$?
10420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10421   (exit $ac_status); }; } &&
10422          { ac_try='test -s conftest.$ac_objext'
10423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10424   (eval $ac_try) 2>&5
10425   ac_status=$?
10426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10427   (exit $ac_status); }; }; then
10428   ac_cv_header_X11_extensions_XSGIvc_h=yes
10429 else
10430   echo "$as_me: failed program was:" >&5
10431 sed 's/^/| /' conftest.$ac_ext >&5
10432
10433 ac_cv_header_X11_extensions_XSGIvc_h=no
10434 fi
10435 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10436 fi
10437 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
10438 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
10439 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
10440   have_sgivc=yes
10441 fi
10442
10443
10444   CPPFLAGS="$ac_save_CPPFLAGS"
10445
10446   # if that succeeded, then check for the -lXsgivc
10447   if test "$have_sgivc" = yes; then
10448     have_sgivc=no
10449
10450   ac_save_CPPFLAGS="$CPPFLAGS"
10451   ac_save_LDFLAGS="$LDFLAGS"
10452 #  ac_save_LIBS="$LIBS"
10453
10454   if test \! -z "$includedir" ; then
10455     CPPFLAGS="$CPPFLAGS -I$includedir"
10456   fi
10457   # note: $X_CFLAGS includes $x_includes
10458   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10459
10460   if test \! -z "$libdir" ; then
10461     LDFLAGS="$LDFLAGS -L$libdir"
10462   fi
10463   # note: $X_LIBS includes $x_libraries
10464   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10465
10466   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
10467 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
10468 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
10469   echo $ECHO_N "(cached) $ECHO_C" >&6
10470 else
10471   ac_check_lib_save_LIBS=$LIBS
10472 LIBS="-lXsgivc -lXext -lX11 $LIBS"
10473 cat >conftest.$ac_ext <<_ACEOF
10474 /* confdefs.h.  */
10475 _ACEOF
10476 cat confdefs.h >>conftest.$ac_ext
10477 cat >>conftest.$ac_ext <<_ACEOF
10478 /* end confdefs.h.  */
10479
10480 /* Override any gcc2 internal prototype to avoid an error.  */
10481 #ifdef __cplusplus
10482 extern "C"
10483 #endif
10484 /* We use char because int might match the return type of a gcc2
10485    builtin and then its argument prototype would still apply.  */
10486 char XSGIvcQueryGammaMap ();
10487 int
10488 main ()
10489 {
10490 XSGIvcQueryGammaMap ();
10491   ;
10492   return 0;
10493 }
10494 _ACEOF
10495 rm -f conftest.$ac_objext conftest$ac_exeext
10496 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10497   (eval $ac_link) 2>conftest.er1
10498   ac_status=$?
10499   grep -v '^ *+' conftest.er1 >conftest.err
10500   rm -f conftest.er1
10501   cat conftest.err >&5
10502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10503   (exit $ac_status); } &&
10504          { ac_try='test -z "$ac_c_werror_flag"
10505                          || test ! -s conftest.err'
10506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10507   (eval $ac_try) 2>&5
10508   ac_status=$?
10509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10510   (exit $ac_status); }; } &&
10511          { ac_try='test -s conftest$ac_exeext'
10512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10513   (eval $ac_try) 2>&5
10514   ac_status=$?
10515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10516   (exit $ac_status); }; }; then
10517   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
10518 else
10519   echo "$as_me: failed program was:" >&5
10520 sed 's/^/| /' conftest.$ac_ext >&5
10521
10522 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
10523 fi
10524 rm -f conftest.err conftest.$ac_objext \
10525       conftest$ac_exeext conftest.$ac_ext
10526 LIBS=$ac_check_lib_save_LIBS
10527 fi
10528 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
10529 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
10530 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
10531   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
10532 else
10533   true
10534 fi
10535
10536   CPPFLAGS="$ac_save_CPPFLAGS"
10537   LDFLAGS="$ac_save_LDFLAGS"
10538 #  LIBS="$ac_save_LIBS"
10539
10540   fi
10541
10542   # if that succeeded, then we've really got it.
10543   if test "$have_sgivc" = yes; then
10544     cat >>confdefs.h <<\_ACEOF
10545 #define HAVE_SGI_VC_EXTENSION 1
10546 _ACEOF
10547
10548   fi
10549
10550 elif test "$with_sgivc" != no; then
10551   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10552   exit 1
10553 fi
10554
10555
10556 ###############################################################################
10557 #
10558 #       Check for the DPMS server extension.
10559 #
10560 ###############################################################################
10561
10562 have_dpms=no
10563 with_dpms_req=unspecified
10564
10565 # Check whether --with-dpms-ext or --without-dpms-ext was given.
10566 if test "${with_dpms_ext+set}" = set; then
10567   withval="$with_dpms_ext"
10568   with_dpms="$withval"; with_dpms_req="$withval"
10569 else
10570   with_dpms=yes
10571 fi;
10572
10573
10574    case "$with_dpms" in
10575     yes) ;;
10576     no)  ;;
10577
10578     /*)
10579      echo "$as_me:$LINENO: checking for DPMS headers" >&5
10580 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
10581      d=$with_dpms/include
10582      if test -d $d; then
10583        X_CFLAGS="-I$d $X_CFLAGS"
10584        echo "$as_me:$LINENO: result: $d" >&5
10585 echo "${ECHO_T}$d" >&6
10586      else
10587        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10588 echo "${ECHO_T}not found ($d: no such directory)" >&6
10589      fi
10590
10591      echo "$as_me:$LINENO: checking for DPMS libs" >&5
10592 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
10593      d=$with_dpms/lib
10594      if test -d $d; then
10595        X_LIBS="-L$d $X_LIBS"
10596        echo "$as_me:$LINENO: result: $d" >&5
10597 echo "${ECHO_T}$d" >&6
10598      else
10599        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10600 echo "${ECHO_T}not found ($d: no such directory)" >&6
10601      fi
10602
10603      # replace the directory string with "yes".
10604      with_dpms_req="yes"
10605      with_dpms=$with_dpms_req
10606      ;;
10607
10608     *)
10609      echo ""
10610      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
10611      echo "       If it is a directory, then \`DIR/include' will be added to"
10612      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10613      exit 1
10614      ;;
10615    esac
10616
10617
10618 if test "$with_dpms" = yes; then
10619
10620   # first check for dpms.h
10621
10622   ac_save_CPPFLAGS="$CPPFLAGS"
10623   if test \! -z "$includedir" ; then
10624     CPPFLAGS="$CPPFLAGS -I$includedir"
10625   fi
10626   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10627   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
10628 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
10629 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
10630   echo $ECHO_N "(cached) $ECHO_C" >&6
10631 else
10632   cat >conftest.$ac_ext <<_ACEOF
10633 /* confdefs.h.  */
10634 _ACEOF
10635 cat confdefs.h >>conftest.$ac_ext
10636 cat >>conftest.$ac_ext <<_ACEOF
10637 /* end confdefs.h.  */
10638 #include <X11/Xlib.h>
10639                      #include <X11/Xmd.h>
10640
10641 #include <X11/extensions/dpms.h>
10642 _ACEOF
10643 rm -f conftest.$ac_objext
10644 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10645   (eval $ac_compile) 2>conftest.er1
10646   ac_status=$?
10647   grep -v '^ *+' conftest.er1 >conftest.err
10648   rm -f conftest.er1
10649   cat conftest.err >&5
10650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10651   (exit $ac_status); } &&
10652          { ac_try='test -z "$ac_c_werror_flag"
10653                          || test ! -s conftest.err'
10654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10655   (eval $ac_try) 2>&5
10656   ac_status=$?
10657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10658   (exit $ac_status); }; } &&
10659          { ac_try='test -s conftest.$ac_objext'
10660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10661   (eval $ac_try) 2>&5
10662   ac_status=$?
10663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10664   (exit $ac_status); }; }; then
10665   ac_cv_header_X11_extensions_dpms_h=yes
10666 else
10667   echo "$as_me: failed program was:" >&5
10668 sed 's/^/| /' conftest.$ac_ext >&5
10669
10670 ac_cv_header_X11_extensions_dpms_h=no
10671 fi
10672 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10673 fi
10674 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
10675 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
10676 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
10677   have_dpms=yes
10678 fi
10679
10680
10681   CPPFLAGS="$ac_save_CPPFLAGS"
10682
10683   # if that succeeded, then check for the DPMS code in the libraries
10684   if test "$have_dpms" = yes; then
10685
10686     # first look in -lXext (this is where it is with XFree86 4.0)
10687     have_dpms=no
10688
10689   ac_save_CPPFLAGS="$CPPFLAGS"
10690   ac_save_LDFLAGS="$LDFLAGS"
10691 #  ac_save_LIBS="$LIBS"
10692
10693   if test \! -z "$includedir" ; then
10694     CPPFLAGS="$CPPFLAGS -I$includedir"
10695   fi
10696   # note: $X_CFLAGS includes $x_includes
10697   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10698
10699   if test \! -z "$libdir" ; then
10700     LDFLAGS="$LDFLAGS -L$libdir"
10701   fi
10702   # note: $X_LIBS includes $x_libraries
10703   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10704
10705   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
10706 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
10707 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
10708   echo $ECHO_N "(cached) $ECHO_C" >&6
10709 else
10710   ac_check_lib_save_LIBS=$LIBS
10711 LIBS="-lXext -lXext -lX11 $LIBS"
10712 cat >conftest.$ac_ext <<_ACEOF
10713 /* confdefs.h.  */
10714 _ACEOF
10715 cat confdefs.h >>conftest.$ac_ext
10716 cat >>conftest.$ac_ext <<_ACEOF
10717 /* end confdefs.h.  */
10718
10719 /* Override any gcc2 internal prototype to avoid an error.  */
10720 #ifdef __cplusplus
10721 extern "C"
10722 #endif
10723 /* We use char because int might match the return type of a gcc2
10724    builtin and then its argument prototype would still apply.  */
10725 char DPMSInfo ();
10726 int
10727 main ()
10728 {
10729 DPMSInfo ();
10730   ;
10731   return 0;
10732 }
10733 _ACEOF
10734 rm -f conftest.$ac_objext conftest$ac_exeext
10735 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10736   (eval $ac_link) 2>conftest.er1
10737   ac_status=$?
10738   grep -v '^ *+' conftest.er1 >conftest.err
10739   rm -f conftest.er1
10740   cat conftest.err >&5
10741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10742   (exit $ac_status); } &&
10743          { ac_try='test -z "$ac_c_werror_flag"
10744                          || test ! -s conftest.err'
10745   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10746   (eval $ac_try) 2>&5
10747   ac_status=$?
10748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10749   (exit $ac_status); }; } &&
10750          { ac_try='test -s conftest$ac_exeext'
10751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10752   (eval $ac_try) 2>&5
10753   ac_status=$?
10754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10755   (exit $ac_status); }; }; then
10756   ac_cv_lib_Xext_DPMSInfo=yes
10757 else
10758   echo "$as_me: failed program was:" >&5
10759 sed 's/^/| /' conftest.$ac_ext >&5
10760
10761 ac_cv_lib_Xext_DPMSInfo=no
10762 fi
10763 rm -f conftest.err conftest.$ac_objext \
10764       conftest$ac_exeext conftest.$ac_ext
10765 LIBS=$ac_check_lib_save_LIBS
10766 fi
10767 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
10768 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
10769 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
10770   have_dpms=yes
10771 else
10772   true
10773 fi
10774
10775   CPPFLAGS="$ac_save_CPPFLAGS"
10776   LDFLAGS="$ac_save_LDFLAGS"
10777 #  LIBS="$ac_save_LIBS"
10778
10779
10780     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
10781     if test "$have_dpms" = no; then
10782
10783   ac_save_CPPFLAGS="$CPPFLAGS"
10784   ac_save_LDFLAGS="$LDFLAGS"
10785 #  ac_save_LIBS="$LIBS"
10786
10787   if test \! -z "$includedir" ; then
10788     CPPFLAGS="$CPPFLAGS -I$includedir"
10789   fi
10790   # note: $X_CFLAGS includes $x_includes
10791   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10792
10793   if test \! -z "$libdir" ; then
10794     LDFLAGS="$LDFLAGS -L$libdir"
10795   fi
10796   # note: $X_LIBS includes $x_libraries
10797   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10798
10799   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
10800 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
10801 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
10802   echo $ECHO_N "(cached) $ECHO_C" >&6
10803 else
10804   ac_check_lib_save_LIBS=$LIBS
10805 LIBS="-lXdpms -lXext -lX11 $LIBS"
10806 cat >conftest.$ac_ext <<_ACEOF
10807 /* confdefs.h.  */
10808 _ACEOF
10809 cat confdefs.h >>conftest.$ac_ext
10810 cat >>conftest.$ac_ext <<_ACEOF
10811 /* end confdefs.h.  */
10812
10813 /* Override any gcc2 internal prototype to avoid an error.  */
10814 #ifdef __cplusplus
10815 extern "C"
10816 #endif
10817 /* We use char because int might match the return type of a gcc2
10818    builtin and then its argument prototype would still apply.  */
10819 char DPMSInfo ();
10820 int
10821 main ()
10822 {
10823 DPMSInfo ();
10824   ;
10825   return 0;
10826 }
10827 _ACEOF
10828 rm -f conftest.$ac_objext conftest$ac_exeext
10829 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10830   (eval $ac_link) 2>conftest.er1
10831   ac_status=$?
10832   grep -v '^ *+' conftest.er1 >conftest.err
10833   rm -f conftest.er1
10834   cat conftest.err >&5
10835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10836   (exit $ac_status); } &&
10837          { ac_try='test -z "$ac_c_werror_flag"
10838                          || test ! -s conftest.err'
10839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10840   (eval $ac_try) 2>&5
10841   ac_status=$?
10842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10843   (exit $ac_status); }; } &&
10844          { ac_try='test -s conftest$ac_exeext'
10845   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10846   (eval $ac_try) 2>&5
10847   ac_status=$?
10848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10849   (exit $ac_status); }; }; then
10850   ac_cv_lib_Xdpms_DPMSInfo=yes
10851 else
10852   echo "$as_me: failed program was:" >&5
10853 sed 's/^/| /' conftest.$ac_ext >&5
10854
10855 ac_cv_lib_Xdpms_DPMSInfo=no
10856 fi
10857 rm -f conftest.err conftest.$ac_objext \
10858       conftest$ac_exeext conftest.$ac_ext
10859 LIBS=$ac_check_lib_save_LIBS
10860 fi
10861 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
10862 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
10863 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
10864   have_dpms=yes; XDPMS_LIBS="-lXdpms"
10865 else
10866   true
10867 fi
10868
10869   CPPFLAGS="$ac_save_CPPFLAGS"
10870   LDFLAGS="$ac_save_LDFLAGS"
10871 #  LIBS="$ac_save_LIBS"
10872
10873     fi
10874   fi
10875
10876
10877   # if that succeeded, then we've really got it.
10878   if test "$have_dpms" = yes; then
10879     cat >>confdefs.h <<\_ACEOF
10880 #define HAVE_DPMS_EXTENSION 1
10881 _ACEOF
10882
10883   fi
10884
10885 elif test "$with_dpms" != no; then
10886   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
10887   exit 1
10888 fi
10889
10890
10891 ###############################################################################
10892 #
10893 #       Check for the XINERAMA server extension.
10894 #
10895 ###############################################################################
10896
10897 have_xinerama=no
10898 with_xinerama_req=unspecified
10899
10900 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
10901 if test "${with_xinerama_ext+set}" = set; then
10902   withval="$with_xinerama_ext"
10903   with_xinerama="$withval"; with_xinerama_req="$withval"
10904 else
10905   with_xinerama=yes
10906 fi;
10907
10908
10909    case "$with_xinerama" in
10910     yes) ;;
10911     no)  ;;
10912
10913     /*)
10914      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
10915 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
10916      d=$with_xinerama/include
10917      if test -d $d; then
10918        X_CFLAGS="-I$d $X_CFLAGS"
10919        echo "$as_me:$LINENO: result: $d" >&5
10920 echo "${ECHO_T}$d" >&6
10921      else
10922        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10923 echo "${ECHO_T}not found ($d: no such directory)" >&6
10924      fi
10925
10926      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
10927 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
10928      d=$with_xinerama/lib
10929      if test -d $d; then
10930        X_LIBS="-L$d $X_LIBS"
10931        echo "$as_me:$LINENO: result: $d" >&5
10932 echo "${ECHO_T}$d" >&6
10933      else
10934        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10935 echo "${ECHO_T}not found ($d: no such directory)" >&6
10936      fi
10937
10938      # replace the directory string with "yes".
10939      with_xinerama_req="yes"
10940      with_xinerama=$with_xinerama_req
10941      ;;
10942
10943     *)
10944      echo ""
10945      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
10946      echo "       If it is a directory, then \`DIR/include' will be added to"
10947      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10948      exit 1
10949      ;;
10950    esac
10951
10952
10953 if test "$with_xinerama" = yes; then
10954
10955   # first check for Xinerama.h
10956
10957   ac_save_CPPFLAGS="$CPPFLAGS"
10958   if test \! -z "$includedir" ; then
10959     CPPFLAGS="$CPPFLAGS -I$includedir"
10960   fi
10961   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10962   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
10963 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
10964 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
10965   echo $ECHO_N "(cached) $ECHO_C" >&6
10966 else
10967   cat >conftest.$ac_ext <<_ACEOF
10968 /* confdefs.h.  */
10969 _ACEOF
10970 cat confdefs.h >>conftest.$ac_ext
10971 cat >>conftest.$ac_ext <<_ACEOF
10972 /* end confdefs.h.  */
10973 #include <X11/Xlib.h>
10974
10975 #include <X11/extensions/Xinerama.h>
10976 _ACEOF
10977 rm -f conftest.$ac_objext
10978 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10979   (eval $ac_compile) 2>conftest.er1
10980   ac_status=$?
10981   grep -v '^ *+' conftest.er1 >conftest.err
10982   rm -f conftest.er1
10983   cat conftest.err >&5
10984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10985   (exit $ac_status); } &&
10986          { ac_try='test -z "$ac_c_werror_flag"
10987                          || test ! -s conftest.err'
10988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10989   (eval $ac_try) 2>&5
10990   ac_status=$?
10991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10992   (exit $ac_status); }; } &&
10993          { ac_try='test -s conftest.$ac_objext'
10994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10995   (eval $ac_try) 2>&5
10996   ac_status=$?
10997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10998   (exit $ac_status); }; }; then
10999   ac_cv_header_X11_extensions_Xinerama_h=yes
11000 else
11001   echo "$as_me: failed program was:" >&5
11002 sed 's/^/| /' conftest.$ac_ext >&5
11003
11004 ac_cv_header_X11_extensions_Xinerama_h=no
11005 fi
11006 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11007 fi
11008 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
11009 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
11010 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
11011   have_xinerama=yes
11012 fi
11013
11014
11015   CPPFLAGS="$ac_save_CPPFLAGS"
11016
11017   # if that succeeded, then check for the XINERAMA code in the libraries
11018   if test "$have_xinerama" = yes; then
11019
11020     # first look in -lXext
11021     have_xinerama=no
11022
11023   ac_save_CPPFLAGS="$CPPFLAGS"
11024   ac_save_LDFLAGS="$LDFLAGS"
11025 #  ac_save_LIBS="$LIBS"
11026
11027   if test \! -z "$includedir" ; then
11028     CPPFLAGS="$CPPFLAGS -I$includedir"
11029   fi
11030   # note: $X_CFLAGS includes $x_includes
11031   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11032
11033   if test \! -z "$libdir" ; then
11034     LDFLAGS="$LDFLAGS -L$libdir"
11035   fi
11036   # note: $X_LIBS includes $x_libraries
11037   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11038
11039   echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
11040 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6
11041 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
11042   echo $ECHO_N "(cached) $ECHO_C" >&6
11043 else
11044   ac_check_lib_save_LIBS=$LIBS
11045 LIBS="-lXext -lXext -lX11 $LIBS"
11046 cat >conftest.$ac_ext <<_ACEOF
11047 /* confdefs.h.  */
11048 _ACEOF
11049 cat confdefs.h >>conftest.$ac_ext
11050 cat >>conftest.$ac_ext <<_ACEOF
11051 /* end confdefs.h.  */
11052
11053 /* Override any gcc2 internal prototype to avoid an error.  */
11054 #ifdef __cplusplus
11055 extern "C"
11056 #endif
11057 /* We use char because int might match the return type of a gcc2
11058    builtin and then its argument prototype would still apply.  */
11059 char XineramaQueryScreens ();
11060 int
11061 main ()
11062 {
11063 XineramaQueryScreens ();
11064   ;
11065   return 0;
11066 }
11067 _ACEOF
11068 rm -f conftest.$ac_objext conftest$ac_exeext
11069 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11070   (eval $ac_link) 2>conftest.er1
11071   ac_status=$?
11072   grep -v '^ *+' conftest.er1 >conftest.err
11073   rm -f conftest.er1
11074   cat conftest.err >&5
11075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11076   (exit $ac_status); } &&
11077          { ac_try='test -z "$ac_c_werror_flag"
11078                          || test ! -s conftest.err'
11079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11080   (eval $ac_try) 2>&5
11081   ac_status=$?
11082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11083   (exit $ac_status); }; } &&
11084          { ac_try='test -s conftest$ac_exeext'
11085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11086   (eval $ac_try) 2>&5
11087   ac_status=$?
11088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11089   (exit $ac_status); }; }; then
11090   ac_cv_lib_Xext_XineramaQueryScreens=yes
11091 else
11092   echo "$as_me: failed program was:" >&5
11093 sed 's/^/| /' conftest.$ac_ext >&5
11094
11095 ac_cv_lib_Xext_XineramaQueryScreens=no
11096 fi
11097 rm -f conftest.err conftest.$ac_objext \
11098       conftest$ac_exeext conftest.$ac_ext
11099 LIBS=$ac_check_lib_save_LIBS
11100 fi
11101 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
11102 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6
11103 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
11104   have_xinerama=yes
11105 else
11106   true
11107 fi
11108
11109   CPPFLAGS="$ac_save_CPPFLAGS"
11110   LDFLAGS="$ac_save_LDFLAGS"
11111 #  LIBS="$ac_save_LIBS"
11112
11113
11114     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
11115     if test "$have_xinerama" = no; then
11116
11117   ac_save_CPPFLAGS="$CPPFLAGS"
11118   ac_save_LDFLAGS="$LDFLAGS"
11119 #  ac_save_LIBS="$LIBS"
11120
11121   if test \! -z "$includedir" ; then
11122     CPPFLAGS="$CPPFLAGS -I$includedir"
11123   fi
11124   # note: $X_CFLAGS includes $x_includes
11125   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11126
11127   if test \! -z "$libdir" ; then
11128     LDFLAGS="$LDFLAGS -L$libdir"
11129   fi
11130   # note: $X_LIBS includes $x_libraries
11131   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11132
11133   echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11134 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
11135 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11136   echo $ECHO_N "(cached) $ECHO_C" >&6
11137 else
11138   ac_check_lib_save_LIBS=$LIBS
11139 LIBS="-lXinerama -lXext -lX11 $LIBS"
11140 cat >conftest.$ac_ext <<_ACEOF
11141 /* confdefs.h.  */
11142 _ACEOF
11143 cat confdefs.h >>conftest.$ac_ext
11144 cat >>conftest.$ac_ext <<_ACEOF
11145 /* end confdefs.h.  */
11146
11147 /* Override any gcc2 internal prototype to avoid an error.  */
11148 #ifdef __cplusplus
11149 extern "C"
11150 #endif
11151 /* We use char because int might match the return type of a gcc2
11152    builtin and then its argument prototype would still apply.  */
11153 char XineramaQueryScreens ();
11154 int
11155 main ()
11156 {
11157 XineramaQueryScreens ();
11158   ;
11159   return 0;
11160 }
11161 _ACEOF
11162 rm -f conftest.$ac_objext conftest$ac_exeext
11163 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11164   (eval $ac_link) 2>conftest.er1
11165   ac_status=$?
11166   grep -v '^ *+' conftest.er1 >conftest.err
11167   rm -f conftest.er1
11168   cat conftest.err >&5
11169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11170   (exit $ac_status); } &&
11171          { ac_try='test -z "$ac_c_werror_flag"
11172                          || test ! -s conftest.err'
11173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11174   (eval $ac_try) 2>&5
11175   ac_status=$?
11176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11177   (exit $ac_status); }; } &&
11178          { ac_try='test -s conftest$ac_exeext'
11179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11180   (eval $ac_try) 2>&5
11181   ac_status=$?
11182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11183   (exit $ac_status); }; }; then
11184   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11185 else
11186   echo "$as_me: failed program was:" >&5
11187 sed 's/^/| /' conftest.$ac_ext >&5
11188
11189 ac_cv_lib_Xinerama_XineramaQueryScreens=no
11190 fi
11191 rm -f conftest.err conftest.$ac_objext \
11192       conftest$ac_exeext conftest.$ac_ext
11193 LIBS=$ac_check_lib_save_LIBS
11194 fi
11195 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11196 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
11197 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
11198   have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"
11199 else
11200   true
11201 fi
11202
11203   CPPFLAGS="$ac_save_CPPFLAGS"
11204   LDFLAGS="$ac_save_LDFLAGS"
11205 #  LIBS="$ac_save_LIBS"
11206
11207     fi
11208   fi
11209
11210   # if that succeeded, then we've really got it.
11211   if test "$have_xinerama" = yes; then
11212     cat >>confdefs.h <<\_ACEOF
11213 #define HAVE_XINERAMA 1
11214 _ACEOF
11215
11216   fi
11217
11218 elif test "$with_xinerama" != no; then
11219   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
11220   exit 1
11221 fi
11222
11223
11224 ###############################################################################
11225 #
11226 #       Check for the XF86VMODE server extension (for virtual screens.)
11227 #
11228 ###############################################################################
11229
11230 have_xf86vmode=no
11231 with_xf86vmode_req=unspecified
11232
11233 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
11234 if test "${with_xf86vmode_ext+set}" = set; then
11235   withval="$with_xf86vmode_ext"
11236   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
11237 else
11238   with_xf86vmode=yes
11239 fi;
11240
11241
11242    case "$with_xf86vmode" in
11243     yes) ;;
11244     no)  ;;
11245
11246     /*)
11247      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
11248 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
11249      d=$with_xf86vmode/include
11250      if test -d $d; then
11251        X_CFLAGS="-I$d $X_CFLAGS"
11252        echo "$as_me:$LINENO: result: $d" >&5
11253 echo "${ECHO_T}$d" >&6
11254      else
11255        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11256 echo "${ECHO_T}not found ($d: no such directory)" >&6
11257      fi
11258
11259      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
11260 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
11261      d=$with_xf86vmode/lib
11262      if test -d $d; then
11263        X_LIBS="-L$d $X_LIBS"
11264        echo "$as_me:$LINENO: result: $d" >&5
11265 echo "${ECHO_T}$d" >&6
11266      else
11267        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11268 echo "${ECHO_T}not found ($d: no such directory)" >&6
11269      fi
11270
11271      # replace the directory string with "yes".
11272      with_xf86vmode_req="yes"
11273      with_xf86vmode=$with_xf86vmode_req
11274      ;;
11275
11276     *)
11277      echo ""
11278      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
11279      echo "       If it is a directory, then \`DIR/include' will be added to"
11280      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11281      exit 1
11282      ;;
11283    esac
11284
11285
11286 VIDMODE_LIBS=""
11287
11288 if test "$with_xf86vmode" = yes; then
11289
11290   # first check for xf86vmode.h
11291
11292   ac_save_CPPFLAGS="$CPPFLAGS"
11293   if test \! -z "$includedir" ; then
11294     CPPFLAGS="$CPPFLAGS -I$includedir"
11295   fi
11296   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11297   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11298 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
11299 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11300   echo $ECHO_N "(cached) $ECHO_C" >&6
11301 else
11302   cat >conftest.$ac_ext <<_ACEOF
11303 /* confdefs.h.  */
11304 _ACEOF
11305 cat confdefs.h >>conftest.$ac_ext
11306 cat >>conftest.$ac_ext <<_ACEOF
11307 /* end confdefs.h.  */
11308 #include <X11/Xlib.h>
11309
11310 #include <X11/extensions/xf86vmode.h>
11311 _ACEOF
11312 rm -f conftest.$ac_objext
11313 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11314   (eval $ac_compile) 2>conftest.er1
11315   ac_status=$?
11316   grep -v '^ *+' conftest.er1 >conftest.err
11317   rm -f conftest.er1
11318   cat conftest.err >&5
11319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11320   (exit $ac_status); } &&
11321          { ac_try='test -z "$ac_c_werror_flag"
11322                          || test ! -s conftest.err'
11323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11324   (eval $ac_try) 2>&5
11325   ac_status=$?
11326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11327   (exit $ac_status); }; } &&
11328          { ac_try='test -s conftest.$ac_objext'
11329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11330   (eval $ac_try) 2>&5
11331   ac_status=$?
11332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11333   (exit $ac_status); }; }; then
11334   ac_cv_header_X11_extensions_xf86vmode_h=yes
11335 else
11336   echo "$as_me: failed program was:" >&5
11337 sed 's/^/| /' conftest.$ac_ext >&5
11338
11339 ac_cv_header_X11_extensions_xf86vmode_h=no
11340 fi
11341 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11342 fi
11343 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11344 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
11345 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11346   have_xf86vmode=yes
11347 fi
11348
11349
11350   CPPFLAGS="$ac_save_CPPFLAGS"
11351
11352   # if that succeeded, then check for the -lXxf86vm
11353   if test "$have_xf86vmode" = yes; then
11354     have_xf86vmode=no
11355
11356   ac_save_CPPFLAGS="$CPPFLAGS"
11357   ac_save_LDFLAGS="$LDFLAGS"
11358 #  ac_save_LIBS="$LIBS"
11359
11360   if test \! -z "$includedir" ; then
11361     CPPFLAGS="$CPPFLAGS -I$includedir"
11362   fi
11363   # note: $X_CFLAGS includes $x_includes
11364   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11365
11366   if test \! -z "$libdir" ; then
11367     LDFLAGS="$LDFLAGS -L$libdir"
11368   fi
11369   # note: $X_LIBS includes $x_libraries
11370   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11371
11372   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
11373 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
11374 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
11375   echo $ECHO_N "(cached) $ECHO_C" >&6
11376 else
11377   ac_check_lib_save_LIBS=$LIBS
11378 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11379 cat >conftest.$ac_ext <<_ACEOF
11380 /* confdefs.h.  */
11381 _ACEOF
11382 cat confdefs.h >>conftest.$ac_ext
11383 cat >>conftest.$ac_ext <<_ACEOF
11384 /* end confdefs.h.  */
11385
11386 /* Override any gcc2 internal prototype to avoid an error.  */
11387 #ifdef __cplusplus
11388 extern "C"
11389 #endif
11390 /* We use char because int might match the return type of a gcc2
11391    builtin and then its argument prototype would still apply.  */
11392 char XF86VidModeGetViewPort ();
11393 int
11394 main ()
11395 {
11396 XF86VidModeGetViewPort ();
11397   ;
11398   return 0;
11399 }
11400 _ACEOF
11401 rm -f conftest.$ac_objext conftest$ac_exeext
11402 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11403   (eval $ac_link) 2>conftest.er1
11404   ac_status=$?
11405   grep -v '^ *+' conftest.er1 >conftest.err
11406   rm -f conftest.er1
11407   cat conftest.err >&5
11408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11409   (exit $ac_status); } &&
11410          { ac_try='test -z "$ac_c_werror_flag"
11411                          || test ! -s conftest.err'
11412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11413   (eval $ac_try) 2>&5
11414   ac_status=$?
11415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11416   (exit $ac_status); }; } &&
11417          { ac_try='test -s conftest$ac_exeext'
11418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11419   (eval $ac_try) 2>&5
11420   ac_status=$?
11421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11422   (exit $ac_status); }; }; then
11423   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
11424 else
11425   echo "$as_me: failed program was:" >&5
11426 sed 's/^/| /' conftest.$ac_ext >&5
11427
11428 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
11429 fi
11430 rm -f conftest.err conftest.$ac_objext \
11431       conftest$ac_exeext conftest.$ac_ext
11432 LIBS=$ac_check_lib_save_LIBS
11433 fi
11434 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
11435 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
11436 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
11437   have_xf86vmode=yes;
11438                    VIDMODE_LIBS="-lXxf86vm";
11439                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
11440 else
11441   true
11442 fi
11443
11444   CPPFLAGS="$ac_save_CPPFLAGS"
11445   LDFLAGS="$ac_save_LDFLAGS"
11446 #  LIBS="$ac_save_LIBS"
11447
11448   fi
11449
11450   # if that succeeded, then we've really got it.
11451   if test "$have_xf86vmode" = yes; then
11452     cat >>confdefs.h <<\_ACEOF
11453 #define HAVE_XF86VMODE 1
11454 _ACEOF
11455
11456   fi
11457
11458 elif test "$with_xf86vmode" != no; then
11459   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
11460   exit 1
11461 fi
11462
11463
11464 ###############################################################################
11465 #
11466 #       Check for the XF86VMODE server extension (for gamma fading.)
11467 #
11468 ###############################################################################
11469
11470 have_xf86gamma=no
11471 have_xf86gamma_ramp=no
11472 with_xf86gamma_req=unspecified
11473
11474 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
11475 if test "${with_xf86gamma_ext+set}" = set; then
11476   withval="$with_xf86gamma_ext"
11477   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
11478 else
11479   with_xf86gamma=yes
11480 fi;
11481
11482
11483    case "$with_xf86gamma" in
11484     yes) ;;
11485     no)  ;;
11486
11487     /*)
11488      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
11489 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
11490      d=$with_xf86gamma/include
11491      if test -d $d; then
11492        X_CFLAGS="-I$d $X_CFLAGS"
11493        echo "$as_me:$LINENO: result: $d" >&5
11494 echo "${ECHO_T}$d" >&6
11495      else
11496        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11497 echo "${ECHO_T}not found ($d: no such directory)" >&6
11498      fi
11499
11500      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
11501 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
11502      d=$with_xf86gamma/lib
11503      if test -d $d; then
11504        X_LIBS="-L$d $X_LIBS"
11505        echo "$as_me:$LINENO: result: $d" >&5
11506 echo "${ECHO_T}$d" >&6
11507      else
11508        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11509 echo "${ECHO_T}not found ($d: no such directory)" >&6
11510      fi
11511
11512      # replace the directory string with "yes".
11513      with_xf86gamma_req="yes"
11514      with_xf86gamma=$with_xf86gamma_req
11515      ;;
11516
11517     *)
11518      echo ""
11519      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
11520      echo "       If it is a directory, then \`DIR/include' will be added to"
11521      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11522      exit 1
11523      ;;
11524    esac
11525
11526
11527 if test "$with_xf86gamma" = yes; then
11528
11529   # first check for xf86vmode.h, if we haven't already
11530   if test "$have_xf86vmode" = yes; then
11531     have_xf86gamma=yes
11532   else
11533
11534   ac_save_CPPFLAGS="$CPPFLAGS"
11535   if test \! -z "$includedir" ; then
11536     CPPFLAGS="$CPPFLAGS -I$includedir"
11537   fi
11538   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11539   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11540 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
11541 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11542   echo $ECHO_N "(cached) $ECHO_C" >&6
11543 else
11544   cat >conftest.$ac_ext <<_ACEOF
11545 /* confdefs.h.  */
11546 _ACEOF
11547 cat confdefs.h >>conftest.$ac_ext
11548 cat >>conftest.$ac_ext <<_ACEOF
11549 /* end confdefs.h.  */
11550 #include <X11/Xlib.h>
11551
11552 #include <X11/extensions/xf86vmode.h>
11553 _ACEOF
11554 rm -f conftest.$ac_objext
11555 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11556   (eval $ac_compile) 2>conftest.er1
11557   ac_status=$?
11558   grep -v '^ *+' conftest.er1 >conftest.err
11559   rm -f conftest.er1
11560   cat conftest.err >&5
11561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11562   (exit $ac_status); } &&
11563          { ac_try='test -z "$ac_c_werror_flag"
11564                          || test ! -s conftest.err'
11565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11566   (eval $ac_try) 2>&5
11567   ac_status=$?
11568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11569   (exit $ac_status); }; } &&
11570          { ac_try='test -s conftest.$ac_objext'
11571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11572   (eval $ac_try) 2>&5
11573   ac_status=$?
11574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11575   (exit $ac_status); }; }; then
11576   ac_cv_header_X11_extensions_xf86vmode_h=yes
11577 else
11578   echo "$as_me: failed program was:" >&5
11579 sed 's/^/| /' conftest.$ac_ext >&5
11580
11581 ac_cv_header_X11_extensions_xf86vmode_h=no
11582 fi
11583 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11584 fi
11585 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11586 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
11587 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11588   have_xf86gamma=yes
11589 fi
11590
11591
11592   CPPFLAGS="$ac_save_CPPFLAGS"
11593   fi
11594
11595   # if that succeeded, then check for the -lXxf86vm
11596   if test "$have_xf86gamma" = yes; then
11597     have_xf86gamma=no
11598
11599   ac_save_CPPFLAGS="$CPPFLAGS"
11600   ac_save_LDFLAGS="$LDFLAGS"
11601 #  ac_save_LIBS="$LIBS"
11602
11603   if test \! -z "$includedir" ; then
11604     CPPFLAGS="$CPPFLAGS -I$includedir"
11605   fi
11606   # note: $X_CFLAGS includes $x_includes
11607   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11608
11609   if test \! -z "$libdir" ; then
11610     LDFLAGS="$LDFLAGS -L$libdir"
11611   fi
11612   # note: $X_LIBS includes $x_libraries
11613   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11614
11615   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
11616 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
11617 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
11618   echo $ECHO_N "(cached) $ECHO_C" >&6
11619 else
11620   ac_check_lib_save_LIBS=$LIBS
11621 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11622 cat >conftest.$ac_ext <<_ACEOF
11623 /* confdefs.h.  */
11624 _ACEOF
11625 cat confdefs.h >>conftest.$ac_ext
11626 cat >>conftest.$ac_ext <<_ACEOF
11627 /* end confdefs.h.  */
11628
11629 /* Override any gcc2 internal prototype to avoid an error.  */
11630 #ifdef __cplusplus
11631 extern "C"
11632 #endif
11633 /* We use char because int might match the return type of a gcc2
11634    builtin and then its argument prototype would still apply.  */
11635 char XF86VidModeSetGamma ();
11636 int
11637 main ()
11638 {
11639 XF86VidModeSetGamma ();
11640   ;
11641   return 0;
11642 }
11643 _ACEOF
11644 rm -f conftest.$ac_objext conftest$ac_exeext
11645 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11646   (eval $ac_link) 2>conftest.er1
11647   ac_status=$?
11648   grep -v '^ *+' conftest.er1 >conftest.err
11649   rm -f conftest.er1
11650   cat conftest.err >&5
11651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11652   (exit $ac_status); } &&
11653          { ac_try='test -z "$ac_c_werror_flag"
11654                          || test ! -s conftest.err'
11655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11656   (eval $ac_try) 2>&5
11657   ac_status=$?
11658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11659   (exit $ac_status); }; } &&
11660          { ac_try='test -s conftest$ac_exeext'
11661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11662   (eval $ac_try) 2>&5
11663   ac_status=$?
11664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11665   (exit $ac_status); }; }; then
11666   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
11667 else
11668   echo "$as_me: failed program was:" >&5
11669 sed 's/^/| /' conftest.$ac_ext >&5
11670
11671 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
11672 fi
11673 rm -f conftest.err conftest.$ac_objext \
11674       conftest$ac_exeext conftest.$ac_ext
11675 LIBS=$ac_check_lib_save_LIBS
11676 fi
11677 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
11678 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
11679 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
11680   have_xf86gamma=yes
11681 else
11682   true
11683 fi
11684
11685   CPPFLAGS="$ac_save_CPPFLAGS"
11686   LDFLAGS="$ac_save_LDFLAGS"
11687 #  LIBS="$ac_save_LIBS"
11688
11689   fi
11690
11691   # check for the Ramp versions of the functions too.
11692   if test "$have_xf86gamma" = yes; then
11693     have_xf86gamma_ramp=no
11694
11695   ac_save_CPPFLAGS="$CPPFLAGS"
11696   ac_save_LDFLAGS="$LDFLAGS"
11697 #  ac_save_LIBS="$LIBS"
11698
11699   if test \! -z "$includedir" ; then
11700     CPPFLAGS="$CPPFLAGS -I$includedir"
11701   fi
11702   # note: $X_CFLAGS includes $x_includes
11703   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11704
11705   if test \! -z "$libdir" ; then
11706     LDFLAGS="$LDFLAGS -L$libdir"
11707   fi
11708   # note: $X_LIBS includes $x_libraries
11709   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11710
11711   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
11712 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
11713 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
11714   echo $ECHO_N "(cached) $ECHO_C" >&6
11715 else
11716   ac_check_lib_save_LIBS=$LIBS
11717 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11718 cat >conftest.$ac_ext <<_ACEOF
11719 /* confdefs.h.  */
11720 _ACEOF
11721 cat confdefs.h >>conftest.$ac_ext
11722 cat >>conftest.$ac_ext <<_ACEOF
11723 /* end confdefs.h.  */
11724
11725 /* Override any gcc2 internal prototype to avoid an error.  */
11726 #ifdef __cplusplus
11727 extern "C"
11728 #endif
11729 /* We use char because int might match the return type of a gcc2
11730    builtin and then its argument prototype would still apply.  */
11731 char XF86VidModeSetGammaRamp ();
11732 int
11733 main ()
11734 {
11735 XF86VidModeSetGammaRamp ();
11736   ;
11737   return 0;
11738 }
11739 _ACEOF
11740 rm -f conftest.$ac_objext conftest$ac_exeext
11741 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11742   (eval $ac_link) 2>conftest.er1
11743   ac_status=$?
11744   grep -v '^ *+' conftest.er1 >conftest.err
11745   rm -f conftest.er1
11746   cat conftest.err >&5
11747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11748   (exit $ac_status); } &&
11749          { ac_try='test -z "$ac_c_werror_flag"
11750                          || test ! -s conftest.err'
11751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11752   (eval $ac_try) 2>&5
11753   ac_status=$?
11754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11755   (exit $ac_status); }; } &&
11756          { ac_try='test -s conftest$ac_exeext'
11757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11758   (eval $ac_try) 2>&5
11759   ac_status=$?
11760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11761   (exit $ac_status); }; }; then
11762   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
11763 else
11764   echo "$as_me: failed program was:" >&5
11765 sed 's/^/| /' conftest.$ac_ext >&5
11766
11767 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
11768 fi
11769 rm -f conftest.err conftest.$ac_objext \
11770       conftest$ac_exeext conftest.$ac_ext
11771 LIBS=$ac_check_lib_save_LIBS
11772 fi
11773 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
11774 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
11775 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
11776   have_xf86gamma_ramp=yes
11777 else
11778   true
11779 fi
11780
11781   CPPFLAGS="$ac_save_CPPFLAGS"
11782   LDFLAGS="$ac_save_LDFLAGS"
11783 #  LIBS="$ac_save_LIBS"
11784
11785   fi
11786
11787   # if those tests succeeded, then we've really got the functions.
11788   if test "$have_xf86gamma" = yes; then
11789     cat >>confdefs.h <<\_ACEOF
11790 #define HAVE_XF86VMODE_GAMMA 1
11791 _ACEOF
11792
11793   fi
11794
11795   if test "$have_xf86gamma_ramp" = yes; then
11796     cat >>confdefs.h <<\_ACEOF
11797 #define HAVE_XF86VMODE_GAMMA_RAMP 1
11798 _ACEOF
11799
11800   fi
11801
11802   # pull in the lib, if we haven't already
11803   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
11804     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
11805   fi
11806
11807 elif test "$with_xf86gamma" != no; then
11808   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
11809   exit 1
11810 fi
11811
11812
11813 ###############################################################################
11814 #
11815 #       Check for the RANDR (Resize and Rotate) server extension.
11816 #
11817 #       We need this to detect when the resolution of the desktop
11818 #       has changed out from under us (this is a newer, different
11819 #       mechanism than the XF86VMODE virtual viewports.)
11820 #
11821 ###############################################################################
11822
11823 have_randr=no
11824 with_randr_req=unspecified
11825
11826 # Check whether --with-randr-ext or --without-randr-ext was given.
11827 if test "${with_randr_ext+set}" = set; then
11828   withval="$with_randr_ext"
11829   with_randr="$withval"; with_randr_req="$withval"
11830 else
11831   with_randr=yes
11832 fi;
11833
11834
11835    case "$with_randr" in
11836     yes) ;;
11837     no)  ;;
11838
11839     /*)
11840      echo "$as_me:$LINENO: checking for RANDR headers" >&5
11841 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6
11842      d=$with_randr/include
11843      if test -d $d; then
11844        X_CFLAGS="-I$d $X_CFLAGS"
11845        echo "$as_me:$LINENO: result: $d" >&5
11846 echo "${ECHO_T}$d" >&6
11847      else
11848        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11849 echo "${ECHO_T}not found ($d: no such directory)" >&6
11850      fi
11851
11852      echo "$as_me:$LINENO: checking for RANDR libs" >&5
11853 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6
11854      d=$with_randr/lib
11855      if test -d $d; then
11856        X_LIBS="-L$d $X_LIBS"
11857        echo "$as_me:$LINENO: result: $d" >&5
11858 echo "${ECHO_T}$d" >&6
11859      else
11860        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11861 echo "${ECHO_T}not found ($d: no such directory)" >&6
11862      fi
11863
11864      # replace the directory string with "yes".
11865      with_randr_req="yes"
11866      with_randr=$with_randr_req
11867      ;;
11868
11869     *)
11870      echo ""
11871      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
11872      echo "       If it is a directory, then \`DIR/include' will be added to"
11873      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11874      exit 1
11875      ;;
11876    esac
11877
11878
11879 if test "$with_randr" = yes; then
11880
11881   # first check for Randr.h
11882
11883   ac_save_CPPFLAGS="$CPPFLAGS"
11884   if test \! -z "$includedir" ; then
11885     CPPFLAGS="$CPPFLAGS -I$includedir"
11886   fi
11887   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11888   echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
11889 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6
11890 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
11891   echo $ECHO_N "(cached) $ECHO_C" >&6
11892 else
11893   cat >conftest.$ac_ext <<_ACEOF
11894 /* confdefs.h.  */
11895 _ACEOF
11896 cat confdefs.h >>conftest.$ac_ext
11897 cat >>conftest.$ac_ext <<_ACEOF
11898 /* end confdefs.h.  */
11899 #include <X11/Xlib.h>
11900
11901 #include <X11/extensions/Xrandr.h>
11902 _ACEOF
11903 rm -f conftest.$ac_objext
11904 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11905   (eval $ac_compile) 2>conftest.er1
11906   ac_status=$?
11907   grep -v '^ *+' conftest.er1 >conftest.err
11908   rm -f conftest.er1
11909   cat conftest.err >&5
11910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11911   (exit $ac_status); } &&
11912          { ac_try='test -z "$ac_c_werror_flag"
11913                          || test ! -s conftest.err'
11914   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11915   (eval $ac_try) 2>&5
11916   ac_status=$?
11917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11918   (exit $ac_status); }; } &&
11919          { ac_try='test -s conftest.$ac_objext'
11920   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11921   (eval $ac_try) 2>&5
11922   ac_status=$?
11923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11924   (exit $ac_status); }; }; then
11925   ac_cv_header_X11_extensions_Xrandr_h=yes
11926 else
11927   echo "$as_me: failed program was:" >&5
11928 sed 's/^/| /' conftest.$ac_ext >&5
11929
11930 ac_cv_header_X11_extensions_Xrandr_h=no
11931 fi
11932 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11933 fi
11934 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
11935 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6
11936 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
11937   have_randr=yes
11938 fi
11939
11940
11941   CPPFLAGS="$ac_save_CPPFLAGS"
11942
11943   # if that succeeded, then check for the XRR code in the libraries
11944   if test "$have_randr" = yes; then
11945
11946     # RANDR probably needs -lXrender
11947     xrender_libs=
11948
11949   ac_save_CPPFLAGS="$CPPFLAGS"
11950   ac_save_LDFLAGS="$LDFLAGS"
11951 #  ac_save_LIBS="$LIBS"
11952
11953   if test \! -z "$includedir" ; then
11954     CPPFLAGS="$CPPFLAGS -I$includedir"
11955   fi
11956   # note: $X_CFLAGS includes $x_includes
11957   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11958
11959   if test \! -z "$libdir" ; then
11960     LDFLAGS="$LDFLAGS -L$libdir"
11961   fi
11962   # note: $X_LIBS includes $x_libraries
11963   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11964
11965   echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
11966 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6
11967 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
11968   echo $ECHO_N "(cached) $ECHO_C" >&6
11969 else
11970   ac_check_lib_save_LIBS=$LIBS
11971 LIBS="-lXrender -lXext -lX11 $LIBS"
11972 cat >conftest.$ac_ext <<_ACEOF
11973 /* confdefs.h.  */
11974 _ACEOF
11975 cat confdefs.h >>conftest.$ac_ext
11976 cat >>conftest.$ac_ext <<_ACEOF
11977 /* end confdefs.h.  */
11978
11979 /* Override any gcc2 internal prototype to avoid an error.  */
11980 #ifdef __cplusplus
11981 extern "C"
11982 #endif
11983 /* We use char because int might match the return type of a gcc2
11984    builtin and then its argument prototype would still apply.  */
11985 char XRenderSetSubpixelOrder ();
11986 int
11987 main ()
11988 {
11989 XRenderSetSubpixelOrder ();
11990   ;
11991   return 0;
11992 }
11993 _ACEOF
11994 rm -f conftest.$ac_objext conftest$ac_exeext
11995 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11996   (eval $ac_link) 2>conftest.er1
11997   ac_status=$?
11998   grep -v '^ *+' conftest.er1 >conftest.err
11999   rm -f conftest.er1
12000   cat conftest.err >&5
12001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12002   (exit $ac_status); } &&
12003          { ac_try='test -z "$ac_c_werror_flag"
12004                          || test ! -s conftest.err'
12005   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12006   (eval $ac_try) 2>&5
12007   ac_status=$?
12008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12009   (exit $ac_status); }; } &&
12010          { ac_try='test -s conftest$ac_exeext'
12011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12012   (eval $ac_try) 2>&5
12013   ac_status=$?
12014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12015   (exit $ac_status); }; }; then
12016   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
12017 else
12018   echo "$as_me: failed program was:" >&5
12019 sed 's/^/| /' conftest.$ac_ext >&5
12020
12021 ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
12022 fi
12023 rm -f conftest.err conftest.$ac_objext \
12024       conftest$ac_exeext conftest.$ac_ext
12025 LIBS=$ac_check_lib_save_LIBS
12026 fi
12027 echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
12028 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6
12029 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
12030   xrender_libs="-lXrender"
12031 else
12032   true
12033 fi
12034
12035   CPPFLAGS="$ac_save_CPPFLAGS"
12036   LDFLAGS="$ac_save_LDFLAGS"
12037 #  LIBS="$ac_save_LIBS"
12038
12039
12040     # first look for RANDR in -lXext
12041     have_randr=no
12042
12043   ac_save_CPPFLAGS="$CPPFLAGS"
12044   ac_save_LDFLAGS="$LDFLAGS"
12045 #  ac_save_LIBS="$LIBS"
12046
12047   if test \! -z "$includedir" ; then
12048     CPPFLAGS="$CPPFLAGS -I$includedir"
12049   fi
12050   # note: $X_CFLAGS includes $x_includes
12051   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12052
12053   if test \! -z "$libdir" ; then
12054     LDFLAGS="$LDFLAGS -L$libdir"
12055   fi
12056   # note: $X_LIBS includes $x_libraries
12057   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12058
12059   echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
12060 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6
12061 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
12062   echo $ECHO_N "(cached) $ECHO_C" >&6
12063 else
12064   ac_check_lib_save_LIBS=$LIBS
12065 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
12066 cat >conftest.$ac_ext <<_ACEOF
12067 /* confdefs.h.  */
12068 _ACEOF
12069 cat confdefs.h >>conftest.$ac_ext
12070 cat >>conftest.$ac_ext <<_ACEOF
12071 /* end confdefs.h.  */
12072
12073 /* Override any gcc2 internal prototype to avoid an error.  */
12074 #ifdef __cplusplus
12075 extern "C"
12076 #endif
12077 /* We use char because int might match the return type of a gcc2
12078    builtin and then its argument prototype would still apply.  */
12079 char XRRGetScreenInfo ();
12080 int
12081 main ()
12082 {
12083 XRRGetScreenInfo ();
12084   ;
12085   return 0;
12086 }
12087 _ACEOF
12088 rm -f conftest.$ac_objext conftest$ac_exeext
12089 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12090   (eval $ac_link) 2>conftest.er1
12091   ac_status=$?
12092   grep -v '^ *+' conftest.er1 >conftest.err
12093   rm -f conftest.er1
12094   cat conftest.err >&5
12095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12096   (exit $ac_status); } &&
12097          { ac_try='test -z "$ac_c_werror_flag"
12098                          || test ! -s conftest.err'
12099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12100   (eval $ac_try) 2>&5
12101   ac_status=$?
12102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12103   (exit $ac_status); }; } &&
12104          { ac_try='test -s conftest$ac_exeext'
12105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12106   (eval $ac_try) 2>&5
12107   ac_status=$?
12108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12109   (exit $ac_status); }; }; then
12110   ac_cv_lib_Xext_XRRGetScreenInfo=yes
12111 else
12112   echo "$as_me: failed program was:" >&5
12113 sed 's/^/| /' conftest.$ac_ext >&5
12114
12115 ac_cv_lib_Xext_XRRGetScreenInfo=no
12116 fi
12117 rm -f conftest.err conftest.$ac_objext \
12118       conftest$ac_exeext conftest.$ac_ext
12119 LIBS=$ac_check_lib_save_LIBS
12120 fi
12121 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
12122 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6
12123 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
12124   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
12125 else
12126   true
12127 fi
12128
12129   CPPFLAGS="$ac_save_CPPFLAGS"
12130   LDFLAGS="$ac_save_LDFLAGS"
12131 #  LIBS="$ac_save_LIBS"
12132
12133
12134     # if that failed, look in -lXrandr
12135     if test "$have_randr" = no; then
12136
12137   ac_save_CPPFLAGS="$CPPFLAGS"
12138   ac_save_LDFLAGS="$LDFLAGS"
12139 #  ac_save_LIBS="$LIBS"
12140
12141   if test \! -z "$includedir" ; then
12142     CPPFLAGS="$CPPFLAGS -I$includedir"
12143   fi
12144   # note: $X_CFLAGS includes $x_includes
12145   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12146
12147   if test \! -z "$libdir" ; then
12148     LDFLAGS="$LDFLAGS -L$libdir"
12149   fi
12150   # note: $X_LIBS includes $x_libraries
12151   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12152
12153   echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12154 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6
12155 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12156   echo $ECHO_N "(cached) $ECHO_C" >&6
12157 else
12158   ac_check_lib_save_LIBS=$LIBS
12159 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12160 cat >conftest.$ac_ext <<_ACEOF
12161 /* confdefs.h.  */
12162 _ACEOF
12163 cat confdefs.h >>conftest.$ac_ext
12164 cat >>conftest.$ac_ext <<_ACEOF
12165 /* end confdefs.h.  */
12166
12167 /* Override any gcc2 internal prototype to avoid an error.  */
12168 #ifdef __cplusplus
12169 extern "C"
12170 #endif
12171 /* We use char because int might match the return type of a gcc2
12172    builtin and then its argument prototype would still apply.  */
12173 char XRRGetScreenInfo ();
12174 int
12175 main ()
12176 {
12177 XRRGetScreenInfo ();
12178   ;
12179   return 0;
12180 }
12181 _ACEOF
12182 rm -f conftest.$ac_objext conftest$ac_exeext
12183 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12184   (eval $ac_link) 2>conftest.er1
12185   ac_status=$?
12186   grep -v '^ *+' conftest.er1 >conftest.err
12187   rm -f conftest.er1
12188   cat conftest.err >&5
12189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12190   (exit $ac_status); } &&
12191          { ac_try='test -z "$ac_c_werror_flag"
12192                          || test ! -s conftest.err'
12193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12194   (eval $ac_try) 2>&5
12195   ac_status=$?
12196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12197   (exit $ac_status); }; } &&
12198          { ac_try='test -s conftest$ac_exeext'
12199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12200   (eval $ac_try) 2>&5
12201   ac_status=$?
12202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12203   (exit $ac_status); }; }; then
12204   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
12205 else
12206   echo "$as_me: failed program was:" >&5
12207 sed 's/^/| /' conftest.$ac_ext >&5
12208
12209 ac_cv_lib_Xrandr_XRRGetScreenInfo=no
12210 fi
12211 rm -f conftest.err conftest.$ac_objext \
12212       conftest$ac_exeext conftest.$ac_ext
12213 LIBS=$ac_check_lib_save_LIBS
12214 fi
12215 echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
12216 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6
12217 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
12218   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
12219 else
12220   true
12221 fi
12222
12223   CPPFLAGS="$ac_save_CPPFLAGS"
12224   LDFLAGS="$ac_save_LDFLAGS"
12225 #  LIBS="$ac_save_LIBS"
12226
12227     fi
12228   fi
12229
12230   # if that succeeded, then we've really got it.
12231   if test "$have_randr" = yes; then
12232     cat >>confdefs.h <<\_ACEOF
12233 #define HAVE_RANDR 1
12234 _ACEOF
12235
12236   fi
12237
12238 elif test "$with_randr" != no; then
12239   echo "error: must be yes or no: --with-randr-ext=$with_randr"
12240   exit 1
12241 fi
12242
12243
12244 ###############################################################################
12245 #
12246 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
12247 #       using other XF86 stuff.)
12248 #
12249 ###############################################################################
12250
12251 have_xf86miscsetgrabkeysstate=no
12252 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
12253
12254   ac_save_CPPFLAGS="$CPPFLAGS"
12255   ac_save_LDFLAGS="$LDFLAGS"
12256 #  ac_save_LIBS="$LIBS"
12257
12258   if test \! -z "$includedir" ; then
12259     CPPFLAGS="$CPPFLAGS -I$includedir"
12260   fi
12261   # note: $X_CFLAGS includes $x_includes
12262   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12263
12264   if test \! -z "$libdir" ; then
12265     LDFLAGS="$LDFLAGS -L$libdir"
12266   fi
12267   # note: $X_LIBS includes $x_libraries
12268   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12269
12270   echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
12271 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6
12272 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
12273   echo $ECHO_N "(cached) $ECHO_C" >&6
12274 else
12275   ac_check_lib_save_LIBS=$LIBS
12276 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
12277 cat >conftest.$ac_ext <<_ACEOF
12278 /* confdefs.h.  */
12279 _ACEOF
12280 cat confdefs.h >>conftest.$ac_ext
12281 cat >>conftest.$ac_ext <<_ACEOF
12282 /* end confdefs.h.  */
12283
12284 /* Override any gcc2 internal prototype to avoid an error.  */
12285 #ifdef __cplusplus
12286 extern "C"
12287 #endif
12288 /* We use char because int might match the return type of a gcc2
12289    builtin and then its argument prototype would still apply.  */
12290 char XF86MiscSetGrabKeysState ();
12291 int
12292 main ()
12293 {
12294 XF86MiscSetGrabKeysState ();
12295   ;
12296   return 0;
12297 }
12298 _ACEOF
12299 rm -f conftest.$ac_objext conftest$ac_exeext
12300 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12301   (eval $ac_link) 2>conftest.er1
12302   ac_status=$?
12303   grep -v '^ *+' conftest.er1 >conftest.err
12304   rm -f conftest.er1
12305   cat conftest.err >&5
12306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12307   (exit $ac_status); } &&
12308          { ac_try='test -z "$ac_c_werror_flag"
12309                          || test ! -s conftest.err'
12310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12311   (eval $ac_try) 2>&5
12312   ac_status=$?
12313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12314   (exit $ac_status); }; } &&
12315          { ac_try='test -s conftest$ac_exeext'
12316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12317   (eval $ac_try) 2>&5
12318   ac_status=$?
12319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12320   (exit $ac_status); }; }; then
12321   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
12322 else
12323   echo "$as_me: failed program was:" >&5
12324 sed 's/^/| /' conftest.$ac_ext >&5
12325
12326 ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
12327 fi
12328 rm -f conftest.err conftest.$ac_objext \
12329       conftest$ac_exeext conftest.$ac_ext
12330 LIBS=$ac_check_lib_save_LIBS
12331 fi
12332 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
12333 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6
12334 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
12335   have_xf86miscsetgrabkeysstate=yes
12336 else
12337   true
12338 fi
12339
12340   CPPFLAGS="$ac_save_CPPFLAGS"
12341   LDFLAGS="$ac_save_LDFLAGS"
12342 #  LIBS="$ac_save_LIBS"
12343
12344   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
12345     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
12346     cat >>confdefs.h <<\_ACEOF
12347 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
12348 _ACEOF
12349
12350   fi
12351 fi
12352
12353
12354 ###############################################################################
12355 #
12356 #       Check for HP XHPDisableReset and XHPEnableReset.
12357 #
12358 ###############################################################################
12359
12360 echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
12361 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6
12362
12363   ac_save_CPPFLAGS="$CPPFLAGS"
12364   if test \! -z "$includedir" ; then
12365     CPPFLAGS="$CPPFLAGS -I$includedir"
12366   fi
12367   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12368   cat >conftest.$ac_ext <<_ACEOF
12369 /* confdefs.h.  */
12370 _ACEOF
12371 cat confdefs.h >>conftest.$ac_ext
12372 cat >>conftest.$ac_ext <<_ACEOF
12373 /* end confdefs.h.  */
12374 #include <X11/XHPlib.h>
12375
12376 _ACEOF
12377 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12378   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
12379   cat >>confdefs.h <<\_ACEOF
12380 #define HAVE_XHPDISABLERESET 1
12381 _ACEOF
12382
12383                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
12384                    echo "$as_me:$LINENO: result: yes" >&5
12385 echo "${ECHO_T}yes" >&6
12386 else
12387   echo "$as_me:$LINENO: result: no" >&5
12388 echo "${ECHO_T}no" >&6
12389 fi
12390 rm -f conftest*
12391
12392   CPPFLAGS="$ac_save_CPPFLAGS"
12393
12394
12395 ###############################################################################
12396 #
12397 #       Check for /proc/interrupts.
12398 #
12399 ###############################################################################
12400
12401 have_proc_interrupts=no
12402 with_proc_interrupts_req=unspecified
12403
12404 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
12405 if test "${with_proc_interrupts+set}" = set; then
12406   withval="$with_proc_interrupts"
12407   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
12408 else
12409   with_proc_interrupts=yes
12410 fi;
12411
12412 if test "$with_proc_interrupts" = yes; then
12413
12414    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
12415 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
12416 if test "${ac_cv_have_proc_interrupts+set}" = set; then
12417   echo $ECHO_N "(cached) $ECHO_C" >&6
12418 else
12419   ac_cv_have_proc_interrupts=no
12420      if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
12421        ac_cv_have_proc_interrupts=yes
12422      fi
12423
12424 fi
12425 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
12426 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
12427    have_proc_interrupts=$ac_cv_have_proc_interrupts
12428
12429   if test "$have_proc_interrupts" = yes; then
12430     cat >>confdefs.h <<\_ACEOF
12431 #define HAVE_PROC_INTERRUPTS 1
12432 _ACEOF
12433
12434   fi
12435
12436 elif test "$with_proc_interrupts" != no; then
12437   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
12438   exit 1
12439 fi
12440
12441
12442 ###############################################################################
12443 #
12444 #       The --enable-locking option
12445 #
12446 ###############################################################################
12447
12448 # Check whether --enable-locking or --disable-locking was given.
12449 if test "${enable_locking+set}" = set; then
12450   enableval="$enable_locking"
12451   enable_locking="$enableval"
12452 else
12453   enable_locking=yes
12454 fi;
12455 if test "$enable_locking" = yes; then
12456   true
12457 elif test "$enable_locking" = no; then
12458   cat >>confdefs.h <<\_ACEOF
12459 #define NO_LOCKING 1
12460 _ACEOF
12461
12462 else
12463   echo "error: must be yes or no: --enable-locking=$enable_locking"
12464   exit 1
12465 fi
12466
12467 # We can't lock on MacOS X, so don't even bother compiling in support for it.
12468 #
12469 if test "$ac_macosx" = yes; then
12470   if test "$enable_locking" = yes; then
12471     echo "$as_me:$LINENO: result: locking disabled: it doesn't work on MacOS X" >&5
12472 echo "${ECHO_T}locking disabled: it doesn't work on MacOS X" >&6
12473     enable_locking=no
12474     cat >>confdefs.h <<\_ACEOF
12475 #define NO_LOCKING 1
12476 _ACEOF
12477
12478   fi
12479 fi
12480
12481
12482 ###############################################################################
12483 #
12484 #       The --enable-vt-locking option
12485 #
12486 ###############################################################################
12487
12488 #ac_vt_lockswitch=no
12489 #AC_ARG_ENABLE(vt-locking,[
12490 #  --enable-vt-locking     Compile in support for locking Virtual Terminals.
12491 #                          This is the default if the system supports it, and
12492 #                          if locking support is included (--enable-locking.)
12493 #  --disable-vt-locking    Do not allow locking of VTs, even if locking is
12494 #                          enabled.],
12495 #  [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
12496 #if test "$enable_vt_locking" = yes; then
12497 #
12498 #  AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
12499 #   [AC_TRY_COMPILE([#include <fcntl.h>
12500 #                   #include <sys/ioctl.h>
12501 #                   #include <sys/vt.h>],
12502 #                  [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
12503 #                  [ac_cv_vt_lockswitch=yes],
12504 #                  [ac_cv_vt_lockswitch=no])])
12505 #  ac_vt_lockswitch=$ac_cv_vt_lockswitch
12506 #
12507 #elif test "$enable_vt_locking" = no; then
12508 #  true
12509 #else
12510 #  echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
12511 #  exit 1
12512 #fi
12513 #
12514 #if test "$ac_vt_lockswitch" = yes; then
12515 #  AC_DEFINE(HAVE_VT_LOCKSWITCH)
12516 #  # the VT_LOCKSWITCH ioctl can only be used when running as root.
12517 #  # #### but it doesn't work yet, so don't worry about that for now.
12518 ##  need_setuid=yes
12519 #fi
12520
12521
12522 ###############################################################################
12523 #
12524 #       Check for PAM.
12525 #
12526 ###############################################################################
12527
12528 case "$host" in
12529   *-solaris*)
12530    # Solaris systems tend to come with PAM misconfigured.
12531    #  Don't build it by default, even if the headers exist.
12532    with_pam_default=no
12533    ;;
12534   *)
12535    # Default to building PAM support on all other systems, if it exists.
12536    with_pam_default=yes
12537   ;;
12538 esac
12539
12540 have_pam=no
12541 with_pam_req=unspecified
12542
12543
12544 # Check whether --with-pam or --without-pam was given.
12545 if test "${with_pam+set}" = set; then
12546   withval="$with_pam"
12547   with_pam="$withval"; with_pam_req="$withval"
12548 else
12549   with_pam=$with_pam_default
12550 fi;
12551
12552
12553    case "$with_pam" in
12554     yes) ;;
12555     no)  ;;
12556
12557     /*)
12558      echo "$as_me:$LINENO: checking for PAM headers" >&5
12559 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
12560      d=$with_pam/include
12561      if test -d $d; then
12562        X_CFLAGS="-I$d $X_CFLAGS"
12563        echo "$as_me:$LINENO: result: $d" >&5
12564 echo "${ECHO_T}$d" >&6
12565      else
12566        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12567 echo "${ECHO_T}not found ($d: no such directory)" >&6
12568      fi
12569
12570      echo "$as_me:$LINENO: checking for PAM libs" >&5
12571 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
12572      d=$with_pam/lib
12573      if test -d $d; then
12574        X_LIBS="-L$d $X_LIBS"
12575        echo "$as_me:$LINENO: result: $d" >&5
12576 echo "${ECHO_T}$d" >&6
12577      else
12578        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12579 echo "${ECHO_T}not found ($d: no such directory)" >&6
12580      fi
12581
12582      # replace the directory string with "yes".
12583      with_pam_req="yes"
12584      with_pam=$with_pam_req
12585      ;;
12586
12587     *)
12588      echo ""
12589      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
12590      echo "       If it is a directory, then \`DIR/include' will be added to"
12591      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12592      exit 1
12593      ;;
12594    esac
12595
12596
12597 if test "$enable_locking" = yes -a "$with_pam" = yes; then
12598   echo "$as_me:$LINENO: checking for PAM" >&5
12599 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
12600 if test "${ac_cv_pam+set}" = set; then
12601   echo $ECHO_N "(cached) $ECHO_C" >&6
12602 else
12603
12604   ac_save_CPPFLAGS="$CPPFLAGS"
12605   if test \! -z "$includedir" ; then
12606     CPPFLAGS="$CPPFLAGS -I$includedir"
12607   fi
12608   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12609   cat >conftest.$ac_ext <<_ACEOF
12610 /* confdefs.h.  */
12611 _ACEOF
12612 cat confdefs.h >>conftest.$ac_ext
12613 cat >>conftest.$ac_ext <<_ACEOF
12614 /* end confdefs.h.  */
12615 #include <security/pam_appl.h>
12616 int
12617 main ()
12618 {
12619
12620   ;
12621   return 0;
12622 }
12623 _ACEOF
12624 rm -f conftest.$ac_objext
12625 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12626   (eval $ac_compile) 2>conftest.er1
12627   ac_status=$?
12628   grep -v '^ *+' conftest.er1 >conftest.err
12629   rm -f conftest.er1
12630   cat conftest.err >&5
12631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12632   (exit $ac_status); } &&
12633          { ac_try='test -z "$ac_c_werror_flag"
12634                          || test ! -s conftest.err'
12635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12636   (eval $ac_try) 2>&5
12637   ac_status=$?
12638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12639   (exit $ac_status); }; } &&
12640          { ac_try='test -s conftest.$ac_objext'
12641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12642   (eval $ac_try) 2>&5
12643   ac_status=$?
12644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12645   (exit $ac_status); }; }; then
12646   ac_cv_pam=yes
12647 else
12648   echo "$as_me: failed program was:" >&5
12649 sed 's/^/| /' conftest.$ac_ext >&5
12650
12651 ac_cv_pam=no
12652 fi
12653 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12654   CPPFLAGS="$ac_save_CPPFLAGS"
12655 fi
12656 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
12657 echo "${ECHO_T}$ac_cv_pam" >&6
12658   if test "$ac_cv_pam" = yes ; then
12659     have_pam=yes
12660     cat >>confdefs.h <<\_ACEOF
12661 #define HAVE_PAM 1
12662 _ACEOF
12663
12664     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
12665
12666     # libpam typically requires dlopen and dlsym.  On FreeBSD,
12667     # those are in libc.  On Linux and Solaris, they're in libdl.
12668     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12669 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
12670 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12671   echo $ECHO_N "(cached) $ECHO_C" >&6
12672 else
12673   ac_check_lib_save_LIBS=$LIBS
12674 LIBS="-ldl  $LIBS"
12675 cat >conftest.$ac_ext <<_ACEOF
12676 /* confdefs.h.  */
12677 _ACEOF
12678 cat confdefs.h >>conftest.$ac_ext
12679 cat >>conftest.$ac_ext <<_ACEOF
12680 /* end confdefs.h.  */
12681
12682 /* Override any gcc2 internal prototype to avoid an error.  */
12683 #ifdef __cplusplus
12684 extern "C"
12685 #endif
12686 /* We use char because int might match the return type of a gcc2
12687    builtin and then its argument prototype would still apply.  */
12688 char dlopen ();
12689 int
12690 main ()
12691 {
12692 dlopen ();
12693   ;
12694   return 0;
12695 }
12696 _ACEOF
12697 rm -f conftest.$ac_objext conftest$ac_exeext
12698 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12699   (eval $ac_link) 2>conftest.er1
12700   ac_status=$?
12701   grep -v '^ *+' conftest.er1 >conftest.err
12702   rm -f conftest.er1
12703   cat conftest.err >&5
12704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12705   (exit $ac_status); } &&
12706          { ac_try='test -z "$ac_c_werror_flag"
12707                          || test ! -s conftest.err'
12708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12709   (eval $ac_try) 2>&5
12710   ac_status=$?
12711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12712   (exit $ac_status); }; } &&
12713          { ac_try='test -s conftest$ac_exeext'
12714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12715   (eval $ac_try) 2>&5
12716   ac_status=$?
12717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12718   (exit $ac_status); }; }; then
12719   ac_cv_lib_dl_dlopen=yes
12720 else
12721   echo "$as_me: failed program was:" >&5
12722 sed 's/^/| /' conftest.$ac_ext >&5
12723
12724 ac_cv_lib_dl_dlopen=no
12725 fi
12726 rm -f conftest.err conftest.$ac_objext \
12727       conftest$ac_exeext conftest.$ac_ext
12728 LIBS=$ac_check_lib_save_LIBS
12729 fi
12730 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12731 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
12732 if test $ac_cv_lib_dl_dlopen = yes; then
12733   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
12734 fi
12735
12736
12737     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
12738     have_timedwait=no
12739     echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
12740 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6
12741 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
12742   echo $ECHO_N "(cached) $ECHO_C" >&6
12743 else
12744   ac_check_lib_save_LIBS=$LIBS
12745 LIBS="-lc  $LIBS"
12746 cat >conftest.$ac_ext <<_ACEOF
12747 /* confdefs.h.  */
12748 _ACEOF
12749 cat confdefs.h >>conftest.$ac_ext
12750 cat >>conftest.$ac_ext <<_ACEOF
12751 /* end confdefs.h.  */
12752
12753 /* Override any gcc2 internal prototype to avoid an error.  */
12754 #ifdef __cplusplus
12755 extern "C"
12756 #endif
12757 /* We use char because int might match the return type of a gcc2
12758    builtin and then its argument prototype would still apply.  */
12759 char sigtimedwait ();
12760 int
12761 main ()
12762 {
12763 sigtimedwait ();
12764   ;
12765   return 0;
12766 }
12767 _ACEOF
12768 rm -f conftest.$ac_objext conftest$ac_exeext
12769 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12770   (eval $ac_link) 2>conftest.er1
12771   ac_status=$?
12772   grep -v '^ *+' conftest.er1 >conftest.err
12773   rm -f conftest.er1
12774   cat conftest.err >&5
12775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12776   (exit $ac_status); } &&
12777          { ac_try='test -z "$ac_c_werror_flag"
12778                          || test ! -s conftest.err'
12779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12780   (eval $ac_try) 2>&5
12781   ac_status=$?
12782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12783   (exit $ac_status); }; } &&
12784          { ac_try='test -s conftest$ac_exeext'
12785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12786   (eval $ac_try) 2>&5
12787   ac_status=$?
12788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12789   (exit $ac_status); }; }; then
12790   ac_cv_lib_c_sigtimedwait=yes
12791 else
12792   echo "$as_me: failed program was:" >&5
12793 sed 's/^/| /' conftest.$ac_ext >&5
12794
12795 ac_cv_lib_c_sigtimedwait=no
12796 fi
12797 rm -f conftest.err conftest.$ac_objext \
12798       conftest$ac_exeext conftest.$ac_ext
12799 LIBS=$ac_check_lib_save_LIBS
12800 fi
12801 echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
12802 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6
12803 if test $ac_cv_lib_c_sigtimedwait = yes; then
12804   have_timedwait=yes
12805 fi
12806
12807     if test "$have_timedwait" = no ; then
12808       echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
12809 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6
12810 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
12811   echo $ECHO_N "(cached) $ECHO_C" >&6
12812 else
12813   ac_check_lib_save_LIBS=$LIBS
12814 LIBS="-lrt  $LIBS"
12815 cat >conftest.$ac_ext <<_ACEOF
12816 /* confdefs.h.  */
12817 _ACEOF
12818 cat confdefs.h >>conftest.$ac_ext
12819 cat >>conftest.$ac_ext <<_ACEOF
12820 /* end confdefs.h.  */
12821
12822 /* Override any gcc2 internal prototype to avoid an error.  */
12823 #ifdef __cplusplus
12824 extern "C"
12825 #endif
12826 /* We use char because int might match the return type of a gcc2
12827    builtin and then its argument prototype would still apply.  */
12828 char sigtimedwait ();
12829 int
12830 main ()
12831 {
12832 sigtimedwait ();
12833   ;
12834   return 0;
12835 }
12836 _ACEOF
12837 rm -f conftest.$ac_objext conftest$ac_exeext
12838 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12839   (eval $ac_link) 2>conftest.er1
12840   ac_status=$?
12841   grep -v '^ *+' conftest.er1 >conftest.err
12842   rm -f conftest.er1
12843   cat conftest.err >&5
12844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12845   (exit $ac_status); } &&
12846          { ac_try='test -z "$ac_c_werror_flag"
12847                          || test ! -s conftest.err'
12848   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12849   (eval $ac_try) 2>&5
12850   ac_status=$?
12851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12852   (exit $ac_status); }; } &&
12853          { ac_try='test -s conftest$ac_exeext'
12854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12855   (eval $ac_try) 2>&5
12856   ac_status=$?
12857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12858   (exit $ac_status); }; }; then
12859   ac_cv_lib_rt_sigtimedwait=yes
12860 else
12861   echo "$as_me: failed program was:" >&5
12862 sed 's/^/| /' conftest.$ac_ext >&5
12863
12864 ac_cv_lib_rt_sigtimedwait=no
12865 fi
12866 rm -f conftest.err conftest.$ac_objext \
12867       conftest$ac_exeext conftest.$ac_ext
12868 LIBS=$ac_check_lib_save_LIBS
12869 fi
12870 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
12871 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6
12872 if test $ac_cv_lib_rt_sigtimedwait = yes; then
12873   PASSWD_LIBS="${PASSWD_LIBS} -lrt"
12874 fi
12875
12876     fi
12877
12878     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
12879 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
12880     if test "${ac_cv_pam_strerror_args+set}" = set; then
12881   echo $ECHO_N "(cached) $ECHO_C" >&6
12882 else
12883   cat >conftest.$ac_ext <<_ACEOF
12884 /* confdefs.h.  */
12885 _ACEOF
12886 cat confdefs.h >>conftest.$ac_ext
12887 cat >>conftest.$ac_ext <<_ACEOF
12888 /* end confdefs.h.  */
12889 #include <stdio.h>
12890                       #include <stdlib.h>
12891                       #include <security/pam_appl.h>
12892 int
12893 main ()
12894 {
12895 pam_handle_t *pamh = 0;
12896                       char *s = pam_strerror(pamh, PAM_SUCCESS);
12897   ;
12898   return 0;
12899 }
12900 _ACEOF
12901 rm -f conftest.$ac_objext
12902 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12903   (eval $ac_compile) 2>conftest.er1
12904   ac_status=$?
12905   grep -v '^ *+' conftest.er1 >conftest.err
12906   rm -f conftest.er1
12907   cat conftest.err >&5
12908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12909   (exit $ac_status); } &&
12910          { ac_try='test -z "$ac_c_werror_flag"
12911                          || test ! -s conftest.err'
12912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12913   (eval $ac_try) 2>&5
12914   ac_status=$?
12915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12916   (exit $ac_status); }; } &&
12917          { ac_try='test -s conftest.$ac_objext'
12918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12919   (eval $ac_try) 2>&5
12920   ac_status=$?
12921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12922   (exit $ac_status); }; }; then
12923   ac_pam_strerror_args=2
12924 else
12925   echo "$as_me: failed program was:" >&5
12926 sed 's/^/| /' conftest.$ac_ext >&5
12927
12928 cat >conftest.$ac_ext <<_ACEOF
12929 /* confdefs.h.  */
12930 _ACEOF
12931 cat confdefs.h >>conftest.$ac_ext
12932 cat >>conftest.$ac_ext <<_ACEOF
12933 /* end confdefs.h.  */
12934 #include <stdio.h>
12935                                       #include <stdlib.h>
12936                                       #include <security/pam_appl.h>
12937 int
12938 main ()
12939 {
12940 char *s =
12941                                        pam_strerror(PAM_SUCCESS);
12942   ;
12943   return 0;
12944 }
12945 _ACEOF
12946 rm -f conftest.$ac_objext
12947 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12948   (eval $ac_compile) 2>conftest.er1
12949   ac_status=$?
12950   grep -v '^ *+' conftest.er1 >conftest.err
12951   rm -f conftest.er1
12952   cat conftest.err >&5
12953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12954   (exit $ac_status); } &&
12955          { ac_try='test -z "$ac_c_werror_flag"
12956                          || test ! -s conftest.err'
12957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12958   (eval $ac_try) 2>&5
12959   ac_status=$?
12960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12961   (exit $ac_status); }; } &&
12962          { ac_try='test -s conftest.$ac_objext'
12963   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12964   (eval $ac_try) 2>&5
12965   ac_status=$?
12966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12967   (exit $ac_status); }; }; then
12968   ac_pam_strerror_args=1
12969 else
12970   echo "$as_me: failed program was:" >&5
12971 sed 's/^/| /' conftest.$ac_ext >&5
12972
12973 ac_pam_strerror_args=0
12974 fi
12975 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12976 fi
12977 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12978       ac_cv_pam_strerror_args=$ac_pam_strerror_args
12979 fi
12980
12981     ac_pam_strerror_args=$ac_cv_pam_strerror_args
12982     if test "$ac_pam_strerror_args" = 1 ; then
12983       echo "$as_me:$LINENO: result: one argument" >&5
12984 echo "${ECHO_T}one argument" >&6
12985     elif test "$ac_pam_strerror_args" = 2 ; then
12986       cat >>confdefs.h <<\_ACEOF
12987 #define PAM_STRERROR_TWO_ARGS 1
12988 _ACEOF
12989
12990       echo "$as_me:$LINENO: result: two arguments" >&5
12991 echo "${ECHO_T}two arguments" >&6
12992     else
12993       echo "$as_me:$LINENO: result: unknown" >&5
12994 echo "${ECHO_T}unknown" >&6
12995     fi
12996   fi
12997 fi
12998
12999
13000 ###############################################################################
13001 #
13002 #       Check for Kerberos.
13003 #
13004 ###############################################################################
13005
13006 have_kerberos=no
13007 have_kerberos5=no
13008 with_kerberos_req=unspecified
13009
13010
13011 # Check whether --with-kerberos or --without-kerberos was given.
13012 if test "${with_kerberos+set}" = set; then
13013   withval="$with_kerberos"
13014   with_kerberos="$withval"; with_kerberos_req="$withval"
13015 else
13016   with_kerberos=yes
13017 fi;
13018
13019
13020    case "$with_kerberos" in
13021     yes) ;;
13022     no)  ;;
13023
13024     /*)
13025      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
13026 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
13027      d=$with_kerberos/include
13028      if test -d $d; then
13029        X_CFLAGS="-I$d $X_CFLAGS"
13030        echo "$as_me:$LINENO: result: $d" >&5
13031 echo "${ECHO_T}$d" >&6
13032      else
13033        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13034 echo "${ECHO_T}not found ($d: no such directory)" >&6
13035      fi
13036
13037      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
13038 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
13039      d=$with_kerberos/lib
13040      if test -d $d; then
13041        X_LIBS="-L$d $X_LIBS"
13042        echo "$as_me:$LINENO: result: $d" >&5
13043 echo "${ECHO_T}$d" >&6
13044      else
13045        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13046 echo "${ECHO_T}not found ($d: no such directory)" >&6
13047      fi
13048
13049      # replace the directory string with "yes".
13050      with_kerberos_req="yes"
13051      with_kerberos=$with_kerberos_req
13052      ;;
13053
13054     *)
13055      echo ""
13056      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
13057      echo "       If it is a directory, then \`DIR/include' will be added to"
13058      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13059      exit 1
13060      ;;
13061    esac
13062
13063
13064 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
13065   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
13066 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
13067 if test "${ac_cv_kerberos+set}" = set; then
13068   echo $ECHO_N "(cached) $ECHO_C" >&6
13069 else
13070
13071   ac_save_CPPFLAGS="$CPPFLAGS"
13072   if test \! -z "$includedir" ; then
13073     CPPFLAGS="$CPPFLAGS -I$includedir"
13074   fi
13075   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13076   cat >conftest.$ac_ext <<_ACEOF
13077 /* confdefs.h.  */
13078 _ACEOF
13079 cat confdefs.h >>conftest.$ac_ext
13080 cat >>conftest.$ac_ext <<_ACEOF
13081 /* end confdefs.h.  */
13082 #include <krb.h>
13083 int
13084 main ()
13085 {
13086
13087   ;
13088   return 0;
13089 }
13090 _ACEOF
13091 rm -f conftest.$ac_objext
13092 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13093   (eval $ac_compile) 2>conftest.er1
13094   ac_status=$?
13095   grep -v '^ *+' conftest.er1 >conftest.err
13096   rm -f conftest.er1
13097   cat conftest.err >&5
13098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13099   (exit $ac_status); } &&
13100          { ac_try='test -z "$ac_c_werror_flag"
13101                          || test ! -s conftest.err'
13102   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13103   (eval $ac_try) 2>&5
13104   ac_status=$?
13105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13106   (exit $ac_status); }; } &&
13107          { ac_try='test -s conftest.$ac_objext'
13108   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13109   (eval $ac_try) 2>&5
13110   ac_status=$?
13111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13112   (exit $ac_status); }; }; then
13113   ac_cv_kerberos=yes
13114 else
13115   echo "$as_me: failed program was:" >&5
13116 sed 's/^/| /' conftest.$ac_ext >&5
13117
13118 ac_cv_kerberos=no
13119 fi
13120 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13121   CPPFLAGS="$ac_save_CPPFLAGS"
13122 fi
13123 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
13124 echo "${ECHO_T}$ac_cv_kerberos" >&6
13125   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
13126 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
13127 if test "${ac_cv_kerberos5+set}" = set; then
13128   echo $ECHO_N "(cached) $ECHO_C" >&6
13129 else
13130
13131   ac_save_CPPFLAGS="$CPPFLAGS"
13132   if test \! -z "$includedir" ; then
13133     CPPFLAGS="$CPPFLAGS -I$includedir"
13134   fi
13135   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13136   cat >conftest.$ac_ext <<_ACEOF
13137 /* confdefs.h.  */
13138 _ACEOF
13139 cat confdefs.h >>conftest.$ac_ext
13140 cat >>conftest.$ac_ext <<_ACEOF
13141 /* end confdefs.h.  */
13142 #include <kerberosIV/krb.h>
13143 int
13144 main ()
13145 {
13146
13147   ;
13148   return 0;
13149 }
13150 _ACEOF
13151 rm -f conftest.$ac_objext
13152 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13153   (eval $ac_compile) 2>conftest.er1
13154   ac_status=$?
13155   grep -v '^ *+' conftest.er1 >conftest.err
13156   rm -f conftest.er1
13157   cat conftest.err >&5
13158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13159   (exit $ac_status); } &&
13160          { ac_try='test -z "$ac_c_werror_flag"
13161                          || test ! -s conftest.err'
13162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13163   (eval $ac_try) 2>&5
13164   ac_status=$?
13165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13166   (exit $ac_status); }; } &&
13167          { ac_try='test -s conftest.$ac_objext'
13168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13169   (eval $ac_try) 2>&5
13170   ac_status=$?
13171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13172   (exit $ac_status); }; }; then
13173   ac_cv_kerberos5=yes
13174 else
13175   echo "$as_me: failed program was:" >&5
13176 sed 's/^/| /' conftest.$ac_ext >&5
13177
13178 ac_cv_kerberos5=no
13179 fi
13180 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13181   CPPFLAGS="$ac_save_CPPFLAGS"
13182 fi
13183 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
13184 echo "${ECHO_T}$ac_cv_kerberos5" >&6
13185
13186   if test "$ac_cv_kerberos" = yes ; then
13187     have_kerberos=yes
13188     cat >>confdefs.h <<\_ACEOF
13189 #define HAVE_KERBEROS 1
13190 _ACEOF
13191
13192   fi
13193
13194   if test "$ac_cv_kerberos5" = yes ; then
13195
13196     # Andrew Snare <ajs@pigpond.com> wrote:
13197     #
13198     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
13199     # (krb4) was also available.  This turns out not to be the case with
13200     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
13201     # is optional.
13202     #
13203     # So, disable kerberosV support if libkrb4 can't be found.
13204     # This is not the best solution, but it makes the compile not fail.
13205     #
13206
13207   ac_save_CPPFLAGS="$CPPFLAGS"
13208   ac_save_LDFLAGS="$LDFLAGS"
13209 #  ac_save_LIBS="$LIBS"
13210
13211   if test \! -z "$includedir" ; then
13212     CPPFLAGS="$CPPFLAGS -I$includedir"
13213   fi
13214   # note: $X_CFLAGS includes $x_includes
13215   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13216
13217   if test \! -z "$libdir" ; then
13218     LDFLAGS="$LDFLAGS -L$libdir"
13219   fi
13220   # note: $X_LIBS includes $x_libraries
13221   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13222
13223   echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
13224 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6
13225 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
13226   echo $ECHO_N "(cached) $ECHO_C" >&6
13227 else
13228   ac_check_lib_save_LIBS=$LIBS
13229 LIBS="-lkrb4  $LIBS"
13230 cat >conftest.$ac_ext <<_ACEOF
13231 /* confdefs.h.  */
13232 _ACEOF
13233 cat confdefs.h >>conftest.$ac_ext
13234 cat >>conftest.$ac_ext <<_ACEOF
13235 /* end confdefs.h.  */
13236
13237 /* Override any gcc2 internal prototype to avoid an error.  */
13238 #ifdef __cplusplus
13239 extern "C"
13240 #endif
13241 /* We use char because int might match the return type of a gcc2
13242    builtin and then its argument prototype would still apply.  */
13243 char krb_get_tf_realm ();
13244 int
13245 main ()
13246 {
13247 krb_get_tf_realm ();
13248   ;
13249   return 0;
13250 }
13251 _ACEOF
13252 rm -f conftest.$ac_objext conftest$ac_exeext
13253 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13254   (eval $ac_link) 2>conftest.er1
13255   ac_status=$?
13256   grep -v '^ *+' conftest.er1 >conftest.err
13257   rm -f conftest.er1
13258   cat conftest.err >&5
13259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13260   (exit $ac_status); } &&
13261          { ac_try='test -z "$ac_c_werror_flag"
13262                          || test ! -s conftest.err'
13263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13264   (eval $ac_try) 2>&5
13265   ac_status=$?
13266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13267   (exit $ac_status); }; } &&
13268          { ac_try='test -s conftest$ac_exeext'
13269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13270   (eval $ac_try) 2>&5
13271   ac_status=$?
13272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13273   (exit $ac_status); }; }; then
13274   ac_cv_lib_krb4_krb_get_tf_realm=yes
13275 else
13276   echo "$as_me: failed program was:" >&5
13277 sed 's/^/| /' conftest.$ac_ext >&5
13278
13279 ac_cv_lib_krb4_krb_get_tf_realm=no
13280 fi
13281 rm -f conftest.err conftest.$ac_objext \
13282       conftest$ac_exeext conftest.$ac_ext
13283 LIBS=$ac_check_lib_save_LIBS
13284 fi
13285 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
13286 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6
13287 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
13288   have_kerberos=yes
13289 else
13290   have_kerberos=no
13291 fi
13292
13293   CPPFLAGS="$ac_save_CPPFLAGS"
13294   LDFLAGS="$ac_save_LDFLAGS"
13295 #  LIBS="$ac_save_LIBS"
13296
13297     if test "$have_kerberos" = yes ; then
13298       have_kerberos5=yes
13299       cat >>confdefs.h <<\_ACEOF
13300 #define HAVE_KERBEROS 1
13301 _ACEOF
13302
13303       cat >>confdefs.h <<\_ACEOF
13304 #define HAVE_KERBEROS5 1
13305 _ACEOF
13306
13307     else
13308       have_kerberos5=no
13309       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
13310 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
13311     fi
13312
13313   fi
13314
13315   if test "$have_kerberos5" = yes ; then
13316     # from Matt Knopp <mhat@infocalypse.netlag.com>
13317     # (who got it from amu@mit.edu)
13318
13319     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
13320
13321     # jwz: MacOS X uses -lkrb5, but not -lcrypt
13322
13323   ac_save_CPPFLAGS="$CPPFLAGS"
13324   ac_save_LDFLAGS="$LDFLAGS"
13325 #  ac_save_LIBS="$LIBS"
13326
13327   if test \! -z "$includedir" ; then
13328     CPPFLAGS="$CPPFLAGS -I$includedir"
13329   fi
13330   # note: $X_CFLAGS includes $x_includes
13331   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13332
13333   if test \! -z "$libdir" ; then
13334     LDFLAGS="$LDFLAGS -L$libdir"
13335   fi
13336   # note: $X_LIBS includes $x_libraries
13337   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13338
13339   echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
13340 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
13341 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
13342   echo $ECHO_N "(cached) $ECHO_C" >&6
13343 else
13344   ac_check_lib_save_LIBS=$LIBS
13345 LIBS="-lcrypt  $LIBS"
13346 cat >conftest.$ac_ext <<_ACEOF
13347 /* confdefs.h.  */
13348 _ACEOF
13349 cat confdefs.h >>conftest.$ac_ext
13350 cat >>conftest.$ac_ext <<_ACEOF
13351 /* end confdefs.h.  */
13352
13353 /* Override any gcc2 internal prototype to avoid an error.  */
13354 #ifdef __cplusplus
13355 extern "C"
13356 #endif
13357 /* We use char because int might match the return type of a gcc2
13358    builtin and then its argument prototype would still apply.  */
13359 char crypt ();
13360 int
13361 main ()
13362 {
13363 crypt ();
13364   ;
13365   return 0;
13366 }
13367 _ACEOF
13368 rm -f conftest.$ac_objext conftest$ac_exeext
13369 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13370   (eval $ac_link) 2>conftest.er1
13371   ac_status=$?
13372   grep -v '^ *+' conftest.er1 >conftest.err
13373   rm -f conftest.er1
13374   cat conftest.err >&5
13375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13376   (exit $ac_status); } &&
13377          { ac_try='test -z "$ac_c_werror_flag"
13378                          || test ! -s conftest.err'
13379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13380   (eval $ac_try) 2>&5
13381   ac_status=$?
13382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13383   (exit $ac_status); }; } &&
13384          { ac_try='test -s conftest$ac_exeext'
13385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13386   (eval $ac_try) 2>&5
13387   ac_status=$?
13388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13389   (exit $ac_status); }; }; then
13390   ac_cv_lib_crypt_crypt=yes
13391 else
13392   echo "$as_me: failed program was:" >&5
13393 sed 's/^/| /' conftest.$ac_ext >&5
13394
13395 ac_cv_lib_crypt_crypt=no
13396 fi
13397 rm -f conftest.err conftest.$ac_objext \
13398       conftest$ac_exeext conftest.$ac_ext
13399 LIBS=$ac_check_lib_save_LIBS
13400 fi
13401 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
13402 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
13403 if test $ac_cv_lib_crypt_crypt = yes; then
13404   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
13405 fi
13406
13407   CPPFLAGS="$ac_save_CPPFLAGS"
13408   LDFLAGS="$ac_save_LDFLAGS"
13409 #  LIBS="$ac_save_LIBS"
13410
13411
13412   elif test "$have_kerberos" = yes ; then
13413     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
13414     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
13415   fi
13416
13417   if test "$have_kerberos" = yes ; then
13418     echo "$as_me:$LINENO: checking for res_search" >&5
13419 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
13420 if test "${ac_cv_func_res_search+set}" = set; then
13421   echo $ECHO_N "(cached) $ECHO_C" >&6
13422 else
13423   cat >conftest.$ac_ext <<_ACEOF
13424 /* confdefs.h.  */
13425 _ACEOF
13426 cat confdefs.h >>conftest.$ac_ext
13427 cat >>conftest.$ac_ext <<_ACEOF
13428 /* end confdefs.h.  */
13429 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
13430    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13431 #define res_search innocuous_res_search
13432
13433 /* System header to define __stub macros and hopefully few prototypes,
13434     which can conflict with char res_search (); below.
13435     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13436     <limits.h> exists even on freestanding compilers.  */
13437
13438 #ifdef __STDC__
13439 # include <limits.h>
13440 #else
13441 # include <assert.h>
13442 #endif
13443
13444 #undef res_search
13445
13446 /* Override any gcc2 internal prototype to avoid an error.  */
13447 #ifdef __cplusplus
13448 extern "C"
13449 {
13450 #endif
13451 /* We use char because int might match the return type of a gcc2
13452    builtin and then its argument prototype would still apply.  */
13453 char res_search ();
13454 /* The GNU C library defines this for functions which it implements
13455     to always fail with ENOSYS.  Some functions are actually named
13456     something starting with __ and the normal name is an alias.  */
13457 #if defined (__stub_res_search) || defined (__stub___res_search)
13458 choke me
13459 #else
13460 char (*f) () = res_search;
13461 #endif
13462 #ifdef __cplusplus
13463 }
13464 #endif
13465
13466 int
13467 main ()
13468 {
13469 return f != res_search;
13470   ;
13471   return 0;
13472 }
13473 _ACEOF
13474 rm -f conftest.$ac_objext conftest$ac_exeext
13475 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13476   (eval $ac_link) 2>conftest.er1
13477   ac_status=$?
13478   grep -v '^ *+' conftest.er1 >conftest.err
13479   rm -f conftest.er1
13480   cat conftest.err >&5
13481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13482   (exit $ac_status); } &&
13483          { ac_try='test -z "$ac_c_werror_flag"
13484                          || test ! -s conftest.err'
13485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13486   (eval $ac_try) 2>&5
13487   ac_status=$?
13488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13489   (exit $ac_status); }; } &&
13490          { ac_try='test -s conftest$ac_exeext'
13491   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13492   (eval $ac_try) 2>&5
13493   ac_status=$?
13494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13495   (exit $ac_status); }; }; then
13496   ac_cv_func_res_search=yes
13497 else
13498   echo "$as_me: failed program was:" >&5
13499 sed 's/^/| /' conftest.$ac_ext >&5
13500
13501 ac_cv_func_res_search=no
13502 fi
13503 rm -f conftest.err conftest.$ac_objext \
13504       conftest$ac_exeext conftest.$ac_ext
13505 fi
13506 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
13507 echo "${ECHO_T}$ac_cv_func_res_search" >&6
13508 if test $ac_cv_func_res_search = yes; then
13509   :
13510 else
13511   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
13512 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
13513 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
13514   echo $ECHO_N "(cached) $ECHO_C" >&6
13515 else
13516   ac_check_lib_save_LIBS=$LIBS
13517 LIBS="-lresolv  $LIBS"
13518 cat >conftest.$ac_ext <<_ACEOF
13519 /* confdefs.h.  */
13520 _ACEOF
13521 cat confdefs.h >>conftest.$ac_ext
13522 cat >>conftest.$ac_ext <<_ACEOF
13523 /* end confdefs.h.  */
13524
13525 /* Override any gcc2 internal prototype to avoid an error.  */
13526 #ifdef __cplusplus
13527 extern "C"
13528 #endif
13529 /* We use char because int might match the return type of a gcc2
13530    builtin and then its argument prototype would still apply.  */
13531 char res_search ();
13532 int
13533 main ()
13534 {
13535 res_search ();
13536   ;
13537   return 0;
13538 }
13539 _ACEOF
13540 rm -f conftest.$ac_objext conftest$ac_exeext
13541 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13542   (eval $ac_link) 2>conftest.er1
13543   ac_status=$?
13544   grep -v '^ *+' conftest.er1 >conftest.err
13545   rm -f conftest.er1
13546   cat conftest.err >&5
13547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13548   (exit $ac_status); } &&
13549          { ac_try='test -z "$ac_c_werror_flag"
13550                          || test ! -s conftest.err'
13551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13552   (eval $ac_try) 2>&5
13553   ac_status=$?
13554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13555   (exit $ac_status); }; } &&
13556          { ac_try='test -s conftest$ac_exeext'
13557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13558   (eval $ac_try) 2>&5
13559   ac_status=$?
13560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13561   (exit $ac_status); }; }; then
13562   ac_cv_lib_resolv_res_search=yes
13563 else
13564   echo "$as_me: failed program was:" >&5
13565 sed 's/^/| /' conftest.$ac_ext >&5
13566
13567 ac_cv_lib_resolv_res_search=no
13568 fi
13569 rm -f conftest.err conftest.$ac_objext \
13570       conftest$ac_exeext conftest.$ac_ext
13571 LIBS=$ac_check_lib_save_LIBS
13572 fi
13573 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
13574 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
13575 if test $ac_cv_lib_resolv_res_search = yes; then
13576   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
13577 else
13578   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
13579 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
13580
13581 fi
13582
13583 fi
13584
13585   fi
13586 fi
13587
13588
13589 ###############################################################################
13590 #
13591 #       Check for the nine billion variants of shadow passwords...
13592 #
13593 ###############################################################################
13594
13595 need_setuid=no
13596
13597 have_shadow=no
13598 with_shadow_req=unspecified
13599
13600
13601 # Check whether --with-shadow or --without-shadow was given.
13602 if test "${with_shadow+set}" = set; then
13603   withval="$with_shadow"
13604   with_shadow="$withval"; with_shadow_req="$withval"
13605 else
13606   with_shadow=yes
13607 fi;
13608
13609
13610    case "$with_shadow" in
13611     yes) ;;
13612     no)  ;;
13613
13614     /*)
13615      echo "$as_me:$LINENO: checking for shadow password headers" >&5
13616 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
13617      d=$with_shadow/include
13618      if test -d $d; then
13619        X_CFLAGS="-I$d $X_CFLAGS"
13620        echo "$as_me:$LINENO: result: $d" >&5
13621 echo "${ECHO_T}$d" >&6
13622      else
13623        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13624 echo "${ECHO_T}not found ($d: no such directory)" >&6
13625      fi
13626
13627      echo "$as_me:$LINENO: checking for shadow password libs" >&5
13628 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
13629      d=$with_shadow/lib
13630      if test -d $d; then
13631        X_LIBS="-L$d $X_LIBS"
13632        echo "$as_me:$LINENO: result: $d" >&5
13633 echo "${ECHO_T}$d" >&6
13634      else
13635        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13636 echo "${ECHO_T}not found ($d: no such directory)" >&6
13637      fi
13638
13639      # replace the directory string with "yes".
13640      with_shadow_req="yes"
13641      with_shadow=$with_shadow_req
13642      ;;
13643
13644     *)
13645      echo ""
13646      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
13647      echo "       If it is a directory, then \`DIR/include' will be added to"
13648      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13649      exit 1
13650      ;;
13651    esac
13652
13653
13654 if test "$enable_locking" = no ; then
13655   with_shadow_req=no
13656   with_shadow=no
13657 fi
13658
13659
13660 ###############################################################################
13661 #
13662 #       Check for Sun "adjunct" passwords.
13663 #
13664 ###############################################################################
13665
13666 if test "$with_shadow" = yes ; then
13667   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
13668 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
13669 if test "${ac_cv_sun_adjunct+set}" = set; then
13670   echo $ECHO_N "(cached) $ECHO_C" >&6
13671 else
13672
13673   ac_save_CPPFLAGS="$CPPFLAGS"
13674   if test \! -z "$includedir" ; then
13675     CPPFLAGS="$CPPFLAGS -I$includedir"
13676   fi
13677   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13678   cat >conftest.$ac_ext <<_ACEOF
13679 /* confdefs.h.  */
13680 _ACEOF
13681 cat confdefs.h >>conftest.$ac_ext
13682 cat >>conftest.$ac_ext <<_ACEOF
13683 /* end confdefs.h.  */
13684 #include <stdlib.h>
13685                                     #include <unistd.h>
13686                                     #include <sys/types.h>
13687                                     #include <sys/label.h>
13688                                     #include <sys/audit.h>
13689                                     #include <pwdadj.h>
13690 int
13691 main ()
13692 {
13693 struct passwd_adjunct *p = getpwanam("nobody");
13694                        const char *pw = p->pwa_passwd;
13695   ;
13696   return 0;
13697 }
13698 _ACEOF
13699 rm -f conftest.$ac_objext
13700 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13701   (eval $ac_compile) 2>conftest.er1
13702   ac_status=$?
13703   grep -v '^ *+' conftest.er1 >conftest.err
13704   rm -f conftest.er1
13705   cat conftest.err >&5
13706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13707   (exit $ac_status); } &&
13708          { ac_try='test -z "$ac_c_werror_flag"
13709                          || test ! -s conftest.err'
13710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13711   (eval $ac_try) 2>&5
13712   ac_status=$?
13713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13714   (exit $ac_status); }; } &&
13715          { ac_try='test -s conftest.$ac_objext'
13716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13717   (eval $ac_try) 2>&5
13718   ac_status=$?
13719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13720   (exit $ac_status); }; }; then
13721   ac_cv_sun_adjunct=yes
13722 else
13723   echo "$as_me: failed program was:" >&5
13724 sed 's/^/| /' conftest.$ac_ext >&5
13725
13726 ac_cv_sun_adjunct=no
13727 fi
13728 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13729   CPPFLAGS="$ac_save_CPPFLAGS"
13730 fi
13731 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
13732 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
13733   if test "$ac_cv_sun_adjunct" = yes; then
13734     have_shadow_adjunct=yes
13735     have_shadow=yes
13736     need_setuid=yes
13737   fi
13738 fi
13739
13740
13741 ###############################################################################
13742 #
13743 #       Check for DEC and SCO so-called "enhanced" security.
13744 #
13745 ###############################################################################
13746
13747 if test "$with_shadow" = yes ; then
13748   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
13749 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
13750 if test "${ac_cv_enhanced_passwd+set}" = set; then
13751   echo $ECHO_N "(cached) $ECHO_C" >&6
13752 else
13753
13754   ac_save_CPPFLAGS="$CPPFLAGS"
13755   if test \! -z "$includedir" ; then
13756     CPPFLAGS="$CPPFLAGS -I$includedir"
13757   fi
13758   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13759   cat >conftest.$ac_ext <<_ACEOF
13760 /* confdefs.h.  */
13761 _ACEOF
13762 cat confdefs.h >>conftest.$ac_ext
13763 cat >>conftest.$ac_ext <<_ACEOF
13764 /* end confdefs.h.  */
13765 #include <stdlib.h>
13766                                     #include <unistd.h>
13767                                     #include <sys/types.h>
13768                                     #include <pwd.h>
13769                                     #include <sys/security.h>
13770                                     #include <prot.h>
13771 int
13772 main ()
13773 {
13774 struct pr_passwd *p;
13775                        const char *pw;
13776                        set_auth_parameters(0, 0);
13777                        check_auth_parameters();
13778                        p = getprpwnam("nobody");
13779                        pw = p->ufld.fd_encrypt;
13780   ;
13781   return 0;
13782 }
13783 _ACEOF
13784 rm -f conftest.$ac_objext
13785 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13786   (eval $ac_compile) 2>conftest.er1
13787   ac_status=$?
13788   grep -v '^ *+' conftest.er1 >conftest.err
13789   rm -f conftest.er1
13790   cat conftest.err >&5
13791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13792   (exit $ac_status); } &&
13793          { ac_try='test -z "$ac_c_werror_flag"
13794                          || test ! -s conftest.err'
13795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13796   (eval $ac_try) 2>&5
13797   ac_status=$?
13798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13799   (exit $ac_status); }; } &&
13800          { ac_try='test -s conftest.$ac_objext'
13801   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13802   (eval $ac_try) 2>&5
13803   ac_status=$?
13804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13805   (exit $ac_status); }; }; then
13806   ac_cv_enhanced_passwd=yes
13807 else
13808   echo "$as_me: failed program was:" >&5
13809 sed 's/^/| /' conftest.$ac_ext >&5
13810
13811 ac_cv_enhanced_passwd=no
13812 fi
13813 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13814   CPPFLAGS="$ac_save_CPPFLAGS"
13815 fi
13816 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
13817 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
13818   if test $ac_cv_enhanced_passwd = yes; then
13819     have_shadow_enhanced=yes
13820     have_shadow=yes
13821     need_setuid=yes
13822
13823     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
13824     # (I'm told it needs -lcurses too, but I don't understand why.)
13825     # But on DEC, it's in -lsecurity.
13826     #
13827     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
13828 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
13829 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
13830   echo $ECHO_N "(cached) $ECHO_C" >&6
13831 else
13832   ac_check_lib_save_LIBS=$LIBS
13833 LIBS="-lprot -lx $LIBS"
13834 cat >conftest.$ac_ext <<_ACEOF
13835 /* confdefs.h.  */
13836 _ACEOF
13837 cat confdefs.h >>conftest.$ac_ext
13838 cat >>conftest.$ac_ext <<_ACEOF
13839 /* end confdefs.h.  */
13840
13841 /* Override any gcc2 internal prototype to avoid an error.  */
13842 #ifdef __cplusplus
13843 extern "C"
13844 #endif
13845 /* We use char because int might match the return type of a gcc2
13846    builtin and then its argument prototype would still apply.  */
13847 char getprpwnam ();
13848 int
13849 main ()
13850 {
13851 getprpwnam ();
13852   ;
13853   return 0;
13854 }
13855 _ACEOF
13856 rm -f conftest.$ac_objext conftest$ac_exeext
13857 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13858   (eval $ac_link) 2>conftest.er1
13859   ac_status=$?
13860   grep -v '^ *+' conftest.er1 >conftest.err
13861   rm -f conftest.er1
13862   cat conftest.err >&5
13863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13864   (exit $ac_status); } &&
13865          { ac_try='test -z "$ac_c_werror_flag"
13866                          || test ! -s conftest.err'
13867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13868   (eval $ac_try) 2>&5
13869   ac_status=$?
13870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13871   (exit $ac_status); }; } &&
13872          { ac_try='test -s conftest$ac_exeext'
13873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13874   (eval $ac_try) 2>&5
13875   ac_status=$?
13876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13877   (exit $ac_status); }; }; then
13878   ac_cv_lib_prot_getprpwnam=yes
13879 else
13880   echo "$as_me: failed program was:" >&5
13881 sed 's/^/| /' conftest.$ac_ext >&5
13882
13883 ac_cv_lib_prot_getprpwnam=no
13884 fi
13885 rm -f conftest.err conftest.$ac_objext \
13886       conftest$ac_exeext conftest.$ac_ext
13887 LIBS=$ac_check_lib_save_LIBS
13888 fi
13889 echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
13890 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
13891 if test $ac_cv_lib_prot_getprpwnam = yes; then
13892   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
13893 else
13894   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
13895 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
13896 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
13897   echo $ECHO_N "(cached) $ECHO_C" >&6
13898 else
13899   ac_check_lib_save_LIBS=$LIBS
13900 LIBS="-lsecurity  $LIBS"
13901 cat >conftest.$ac_ext <<_ACEOF
13902 /* confdefs.h.  */
13903 _ACEOF
13904 cat confdefs.h >>conftest.$ac_ext
13905 cat >>conftest.$ac_ext <<_ACEOF
13906 /* end confdefs.h.  */
13907
13908 /* Override any gcc2 internal prototype to avoid an error.  */
13909 #ifdef __cplusplus
13910 extern "C"
13911 #endif
13912 /* We use char because int might match the return type of a gcc2
13913    builtin and then its argument prototype would still apply.  */
13914 char getprpwnam ();
13915 int
13916 main ()
13917 {
13918 getprpwnam ();
13919   ;
13920   return 0;
13921 }
13922 _ACEOF
13923 rm -f conftest.$ac_objext conftest$ac_exeext
13924 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13925   (eval $ac_link) 2>conftest.er1
13926   ac_status=$?
13927   grep -v '^ *+' conftest.er1 >conftest.err
13928   rm -f conftest.er1
13929   cat conftest.err >&5
13930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13931   (exit $ac_status); } &&
13932          { ac_try='test -z "$ac_c_werror_flag"
13933                          || test ! -s conftest.err'
13934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13935   (eval $ac_try) 2>&5
13936   ac_status=$?
13937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13938   (exit $ac_status); }; } &&
13939          { ac_try='test -s conftest$ac_exeext'
13940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13941   (eval $ac_try) 2>&5
13942   ac_status=$?
13943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13944   (exit $ac_status); }; }; then
13945   ac_cv_lib_security_getprpwnam=yes
13946 else
13947   echo "$as_me: failed program was:" >&5
13948 sed 's/^/| /' conftest.$ac_ext >&5
13949
13950 ac_cv_lib_security_getprpwnam=no
13951 fi
13952 rm -f conftest.err conftest.$ac_objext \
13953       conftest$ac_exeext conftest.$ac_ext
13954 LIBS=$ac_check_lib_save_LIBS
13955 fi
13956 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
13957 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
13958 if test $ac_cv_lib_security_getprpwnam = yes; then
13959   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
13960 fi
13961
13962 fi
13963
13964   fi
13965 fi
13966
13967 ###############################################################################
13968 #
13969 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
13970 #
13971 ###############################################################################
13972
13973 if test "$with_shadow" = yes ; then
13974   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
13975 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
13976 if test "${ac_cv_hpux_passwd+set}" = set; then
13977   echo $ECHO_N "(cached) $ECHO_C" >&6
13978 else
13979
13980   ac_save_CPPFLAGS="$CPPFLAGS"
13981   if test \! -z "$includedir" ; then
13982     CPPFLAGS="$CPPFLAGS -I$includedir"
13983   fi
13984   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13985   cat >conftest.$ac_ext <<_ACEOF
13986 /* confdefs.h.  */
13987 _ACEOF
13988 cat confdefs.h >>conftest.$ac_ext
13989 cat >>conftest.$ac_ext <<_ACEOF
13990 /* end confdefs.h.  */
13991 #include <stdlib.h>
13992                                     #include <unistd.h>
13993                                     #include <sys/types.h>
13994                                     #include <pwd.h>
13995                                     #include <hpsecurity.h>
13996                                     #include <prot.h>
13997 int
13998 main ()
13999 {
14000 struct s_passwd *p = getspwnam("nobody");
14001                        const char *pw = p->pw_passwd;
14002   ;
14003   return 0;
14004 }
14005 _ACEOF
14006 rm -f conftest.$ac_objext
14007 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14008   (eval $ac_compile) 2>conftest.er1
14009   ac_status=$?
14010   grep -v '^ *+' conftest.er1 >conftest.err
14011   rm -f conftest.er1
14012   cat conftest.err >&5
14013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14014   (exit $ac_status); } &&
14015          { ac_try='test -z "$ac_c_werror_flag"
14016                          || test ! -s conftest.err'
14017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14018   (eval $ac_try) 2>&5
14019   ac_status=$?
14020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14021   (exit $ac_status); }; } &&
14022          { ac_try='test -s conftest.$ac_objext'
14023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14024   (eval $ac_try) 2>&5
14025   ac_status=$?
14026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14027   (exit $ac_status); }; }; then
14028   ac_cv_hpux_passwd=yes
14029 else
14030   echo "$as_me: failed program was:" >&5
14031 sed 's/^/| /' conftest.$ac_ext >&5
14032
14033 ac_cv_hpux_passwd=no
14034 fi
14035 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14036   CPPFLAGS="$ac_save_CPPFLAGS"
14037 fi
14038 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
14039 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
14040   if test "$ac_cv_hpux_passwd" = yes; then
14041     have_shadow_hpux=yes
14042     have_shadow=yes
14043     need_setuid=yes
14044
14045     # on HPUX, bigcrypt is in -lsec
14046     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
14047 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
14048 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
14049   echo $ECHO_N "(cached) $ECHO_C" >&6
14050 else
14051   ac_check_lib_save_LIBS=$LIBS
14052 LIBS="-lsec  $LIBS"
14053 cat >conftest.$ac_ext <<_ACEOF
14054 /* confdefs.h.  */
14055 _ACEOF
14056 cat confdefs.h >>conftest.$ac_ext
14057 cat >>conftest.$ac_ext <<_ACEOF
14058 /* end confdefs.h.  */
14059
14060 /* Override any gcc2 internal prototype to avoid an error.  */
14061 #ifdef __cplusplus
14062 extern "C"
14063 #endif
14064 /* We use char because int might match the return type of a gcc2
14065    builtin and then its argument prototype would still apply.  */
14066 char bigcrypt ();
14067 int
14068 main ()
14069 {
14070 bigcrypt ();
14071   ;
14072   return 0;
14073 }
14074 _ACEOF
14075 rm -f conftest.$ac_objext conftest$ac_exeext
14076 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14077   (eval $ac_link) 2>conftest.er1
14078   ac_status=$?
14079   grep -v '^ *+' conftest.er1 >conftest.err
14080   rm -f conftest.er1
14081   cat conftest.err >&5
14082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14083   (exit $ac_status); } &&
14084          { ac_try='test -z "$ac_c_werror_flag"
14085                          || test ! -s conftest.err'
14086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14087   (eval $ac_try) 2>&5
14088   ac_status=$?
14089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14090   (exit $ac_status); }; } &&
14091          { ac_try='test -s conftest$ac_exeext'
14092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14093   (eval $ac_try) 2>&5
14094   ac_status=$?
14095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14096   (exit $ac_status); }; }; then
14097   ac_cv_lib_sec_bigcrypt=yes
14098 else
14099   echo "$as_me: failed program was:" >&5
14100 sed 's/^/| /' conftest.$ac_ext >&5
14101
14102 ac_cv_lib_sec_bigcrypt=no
14103 fi
14104 rm -f conftest.err conftest.$ac_objext \
14105       conftest$ac_exeext conftest.$ac_ext
14106 LIBS=$ac_check_lib_save_LIBS
14107 fi
14108 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
14109 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
14110 if test $ac_cv_lib_sec_bigcrypt = yes; then
14111   PASSWD_LIBS="$PASSWD_LIBS -lsec"
14112 fi
14113
14114   fi
14115 fi
14116
14117
14118 ###############################################################################
14119 #
14120 #       Check for FreeBSD-style shadow passwords.
14121 #
14122 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
14123 #       password systems -- except you only get stuff in the pw_passwd field
14124 #       if the running program is setuid.  So, guess that we've got this
14125 #       lossage to contend with if /etc/master.passwd exists, and default to
14126 #       a setuid installation.
14127 #
14128 ###############################################################################
14129
14130 if test "$with_shadow" = yes ; then
14131   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
14132 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
14133 if test "${ac_cv_master_passwd+set}" = set; then
14134   echo $ECHO_N "(cached) $ECHO_C" >&6
14135 else
14136   if test -f /etc/master.passwd ; then
14137                     ac_cv_master_passwd=yes
14138                   else
14139                     ac_cv_master_passwd=no
14140                   fi
14141 fi
14142 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
14143 echo "${ECHO_T}$ac_cv_master_passwd" >&6
14144   if test "$ac_cv_master_passwd" = yes; then
14145     need_setuid=yes
14146   fi
14147 fi
14148
14149
14150 ###############################################################################
14151 #
14152 #       Check for traditional (ha!) shadow passwords.
14153 #
14154 ###############################################################################
14155
14156 if test "$with_shadow" = yes ; then
14157   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
14158 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
14159 if test "${ac_cv_shadow+set}" = set; then
14160   echo $ECHO_N "(cached) $ECHO_C" >&6
14161 else
14162
14163   ac_save_CPPFLAGS="$CPPFLAGS"
14164   if test \! -z "$includedir" ; then
14165     CPPFLAGS="$CPPFLAGS -I$includedir"
14166   fi
14167   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14168   cat >conftest.$ac_ext <<_ACEOF
14169 /* confdefs.h.  */
14170 _ACEOF
14171 cat confdefs.h >>conftest.$ac_ext
14172 cat >>conftest.$ac_ext <<_ACEOF
14173 /* end confdefs.h.  */
14174 #include <stdlib.h>
14175                                     #include <unistd.h>
14176                                     #include <sys/types.h>
14177                                     #include <pwd.h>
14178                                     #include <shadow.h>
14179 int
14180 main ()
14181 {
14182 struct spwd *p = getspnam("nobody");
14183                        const char *pw = p->sp_pwdp;
14184   ;
14185   return 0;
14186 }
14187 _ACEOF
14188 rm -f conftest.$ac_objext
14189 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14190   (eval $ac_compile) 2>conftest.er1
14191   ac_status=$?
14192   grep -v '^ *+' conftest.er1 >conftest.err
14193   rm -f conftest.er1
14194   cat conftest.err >&5
14195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14196   (exit $ac_status); } &&
14197          { ac_try='test -z "$ac_c_werror_flag"
14198                          || test ! -s conftest.err'
14199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14200   (eval $ac_try) 2>&5
14201   ac_status=$?
14202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14203   (exit $ac_status); }; } &&
14204          { ac_try='test -s conftest.$ac_objext'
14205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14206   (eval $ac_try) 2>&5
14207   ac_status=$?
14208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209   (exit $ac_status); }; }; then
14210   ac_cv_shadow=yes
14211 else
14212   echo "$as_me: failed program was:" >&5
14213 sed 's/^/| /' conftest.$ac_ext >&5
14214
14215 ac_cv_shadow=no
14216 fi
14217 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14218   CPPFLAGS="$ac_save_CPPFLAGS"
14219 fi
14220 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
14221 echo "${ECHO_T}$ac_cv_shadow" >&6
14222   if test "$ac_cv_shadow" = yes; then
14223     have_shadow=yes
14224     need_setuid=yes
14225
14226     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
14227     have_getspnam=no
14228     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
14229 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
14230 if test "${ac_cv_lib_c_getspnam+set}" = set; then
14231   echo $ECHO_N "(cached) $ECHO_C" >&6
14232 else
14233   ac_check_lib_save_LIBS=$LIBS
14234 LIBS="-lc  $LIBS"
14235 cat >conftest.$ac_ext <<_ACEOF
14236 /* confdefs.h.  */
14237 _ACEOF
14238 cat confdefs.h >>conftest.$ac_ext
14239 cat >>conftest.$ac_ext <<_ACEOF
14240 /* end confdefs.h.  */
14241
14242 /* Override any gcc2 internal prototype to avoid an error.  */
14243 #ifdef __cplusplus
14244 extern "C"
14245 #endif
14246 /* We use char because int might match the return type of a gcc2
14247    builtin and then its argument prototype would still apply.  */
14248 char getspnam ();
14249 int
14250 main ()
14251 {
14252 getspnam ();
14253   ;
14254   return 0;
14255 }
14256 _ACEOF
14257 rm -f conftest.$ac_objext conftest$ac_exeext
14258 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14259   (eval $ac_link) 2>conftest.er1
14260   ac_status=$?
14261   grep -v '^ *+' conftest.er1 >conftest.err
14262   rm -f conftest.er1
14263   cat conftest.err >&5
14264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14265   (exit $ac_status); } &&
14266          { ac_try='test -z "$ac_c_werror_flag"
14267                          || test ! -s conftest.err'
14268   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14269   (eval $ac_try) 2>&5
14270   ac_status=$?
14271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14272   (exit $ac_status); }; } &&
14273          { ac_try='test -s conftest$ac_exeext'
14274   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14275   (eval $ac_try) 2>&5
14276   ac_status=$?
14277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14278   (exit $ac_status); }; }; then
14279   ac_cv_lib_c_getspnam=yes
14280 else
14281   echo "$as_me: failed program was:" >&5
14282 sed 's/^/| /' conftest.$ac_ext >&5
14283
14284 ac_cv_lib_c_getspnam=no
14285 fi
14286 rm -f conftest.err conftest.$ac_objext \
14287       conftest$ac_exeext conftest.$ac_ext
14288 LIBS=$ac_check_lib_save_LIBS
14289 fi
14290 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
14291 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
14292 if test $ac_cv_lib_c_getspnam = yes; then
14293   have_getspnam=yes
14294 fi
14295
14296     if test "$have_getspnam" = no ; then
14297       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
14298 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
14299 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
14300   echo $ECHO_N "(cached) $ECHO_C" >&6
14301 else
14302   ac_check_lib_save_LIBS=$LIBS
14303 LIBS="-lgen  $LIBS"
14304 cat >conftest.$ac_ext <<_ACEOF
14305 /* confdefs.h.  */
14306 _ACEOF
14307 cat confdefs.h >>conftest.$ac_ext
14308 cat >>conftest.$ac_ext <<_ACEOF
14309 /* end confdefs.h.  */
14310
14311 /* Override any gcc2 internal prototype to avoid an error.  */
14312 #ifdef __cplusplus
14313 extern "C"
14314 #endif
14315 /* We use char because int might match the return type of a gcc2
14316    builtin and then its argument prototype would still apply.  */
14317 char getspnam ();
14318 int
14319 main ()
14320 {
14321 getspnam ();
14322   ;
14323   return 0;
14324 }
14325 _ACEOF
14326 rm -f conftest.$ac_objext conftest$ac_exeext
14327 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14328   (eval $ac_link) 2>conftest.er1
14329   ac_status=$?
14330   grep -v '^ *+' conftest.er1 >conftest.err
14331   rm -f conftest.er1
14332   cat conftest.err >&5
14333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14334   (exit $ac_status); } &&
14335          { ac_try='test -z "$ac_c_werror_flag"
14336                          || test ! -s conftest.err'
14337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14338   (eval $ac_try) 2>&5
14339   ac_status=$?
14340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14341   (exit $ac_status); }; } &&
14342          { ac_try='test -s conftest$ac_exeext'
14343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14344   (eval $ac_try) 2>&5
14345   ac_status=$?
14346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14347   (exit $ac_status); }; }; then
14348   ac_cv_lib_gen_getspnam=yes
14349 else
14350   echo "$as_me: failed program was:" >&5
14351 sed 's/^/| /' conftest.$ac_ext >&5
14352
14353 ac_cv_lib_gen_getspnam=no
14354 fi
14355 rm -f conftest.err conftest.$ac_objext \
14356       conftest$ac_exeext conftest.$ac_ext
14357 LIBS=$ac_check_lib_save_LIBS
14358 fi
14359 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
14360 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
14361 if test $ac_cv_lib_gen_getspnam = yes; then
14362   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
14363 fi
14364
14365     fi
14366   fi
14367 fi
14368
14369
14370 ###############################################################################
14371 #
14372 #       Check for other libraries needed for non-shadow passwords.
14373 #
14374 ###############################################################################
14375
14376 if test "$enable_locking" = yes ; then
14377
14378   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
14379   have_crypt=no
14380   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
14381 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
14382 if test "${ac_cv_lib_c_crypt+set}" = set; then
14383   echo $ECHO_N "(cached) $ECHO_C" >&6
14384 else
14385   ac_check_lib_save_LIBS=$LIBS
14386 LIBS="-lc  $LIBS"
14387 cat >conftest.$ac_ext <<_ACEOF
14388 /* confdefs.h.  */
14389 _ACEOF
14390 cat confdefs.h >>conftest.$ac_ext
14391 cat >>conftest.$ac_ext <<_ACEOF
14392 /* end confdefs.h.  */
14393
14394 /* Override any gcc2 internal prototype to avoid an error.  */
14395 #ifdef __cplusplus
14396 extern "C"
14397 #endif
14398 /* We use char because int might match the return type of a gcc2
14399    builtin and then its argument prototype would still apply.  */
14400 char crypt ();
14401 int
14402 main ()
14403 {
14404 crypt ();
14405   ;
14406   return 0;
14407 }
14408 _ACEOF
14409 rm -f conftest.$ac_objext conftest$ac_exeext
14410 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14411   (eval $ac_link) 2>conftest.er1
14412   ac_status=$?
14413   grep -v '^ *+' conftest.er1 >conftest.err
14414   rm -f conftest.er1
14415   cat conftest.err >&5
14416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14417   (exit $ac_status); } &&
14418          { ac_try='test -z "$ac_c_werror_flag"
14419                          || test ! -s conftest.err'
14420   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14421   (eval $ac_try) 2>&5
14422   ac_status=$?
14423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14424   (exit $ac_status); }; } &&
14425          { ac_try='test -s conftest$ac_exeext'
14426   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14427   (eval $ac_try) 2>&5
14428   ac_status=$?
14429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14430   (exit $ac_status); }; }; then
14431   ac_cv_lib_c_crypt=yes
14432 else
14433   echo "$as_me: failed program was:" >&5
14434 sed 's/^/| /' conftest.$ac_ext >&5
14435
14436 ac_cv_lib_c_crypt=no
14437 fi
14438 rm -f conftest.err conftest.$ac_objext \
14439       conftest$ac_exeext conftest.$ac_ext
14440 LIBS=$ac_check_lib_save_LIBS
14441 fi
14442 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
14443 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
14444 if test $ac_cv_lib_c_crypt = yes; then
14445   have_crypt=yes
14446 fi
14447
14448   if test "$have_crypt" = no ; then
14449     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14450 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
14451 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14452   echo $ECHO_N "(cached) $ECHO_C" >&6
14453 else
14454   ac_check_lib_save_LIBS=$LIBS
14455 LIBS="-lcrypt  $LIBS"
14456 cat >conftest.$ac_ext <<_ACEOF
14457 /* confdefs.h.  */
14458 _ACEOF
14459 cat confdefs.h >>conftest.$ac_ext
14460 cat >>conftest.$ac_ext <<_ACEOF
14461 /* end confdefs.h.  */
14462
14463 /* Override any gcc2 internal prototype to avoid an error.  */
14464 #ifdef __cplusplus
14465 extern "C"
14466 #endif
14467 /* We use char because int might match the return type of a gcc2
14468    builtin and then its argument prototype would still apply.  */
14469 char crypt ();
14470 int
14471 main ()
14472 {
14473 crypt ();
14474   ;
14475   return 0;
14476 }
14477 _ACEOF
14478 rm -f conftest.$ac_objext conftest$ac_exeext
14479 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14480   (eval $ac_link) 2>conftest.er1
14481   ac_status=$?
14482   grep -v '^ *+' conftest.er1 >conftest.err
14483   rm -f conftest.er1
14484   cat conftest.err >&5
14485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14486   (exit $ac_status); } &&
14487          { ac_try='test -z "$ac_c_werror_flag"
14488                          || test ! -s conftest.err'
14489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14490   (eval $ac_try) 2>&5
14491   ac_status=$?
14492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14493   (exit $ac_status); }; } &&
14494          { ac_try='test -s conftest$ac_exeext'
14495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14496   (eval $ac_try) 2>&5
14497   ac_status=$?
14498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14499   (exit $ac_status); }; }; then
14500   ac_cv_lib_crypt_crypt=yes
14501 else
14502   echo "$as_me: failed program was:" >&5
14503 sed 's/^/| /' conftest.$ac_ext >&5
14504
14505 ac_cv_lib_crypt_crypt=no
14506 fi
14507 rm -f conftest.err conftest.$ac_objext \
14508       conftest$ac_exeext conftest.$ac_ext
14509 LIBS=$ac_check_lib_save_LIBS
14510 fi
14511 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14512 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
14513 if test $ac_cv_lib_crypt_crypt = yes; then
14514   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14515 fi
14516
14517   fi
14518 fi
14519
14520
14521 # Most of the above shadow mechanisms will have set need_setuid to yes,
14522 # if they were found.  But, on some systems, we need setuid even when
14523 # using plain old vanilla passwords.
14524 #
14525 if test "$enable_locking" = yes ; then
14526   case "$host" in
14527     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
14528       need_setuid=yes
14529     ;;
14530   esac
14531 fi
14532
14533
14534 if test "$have_shadow_adjunct" = yes ; then
14535   cat >>confdefs.h <<\_ACEOF
14536 #define HAVE_ADJUNCT_PASSWD 1
14537 _ACEOF
14538
14539 elif test "$have_shadow_enhanced" = yes ; then
14540   cat >>confdefs.h <<\_ACEOF
14541 #define HAVE_ENHANCED_PASSWD 1
14542 _ACEOF
14543
14544 elif test "$have_shadow_hpux" = yes ; then
14545   cat >>confdefs.h <<\_ACEOF
14546 #define HAVE_HPUX_PASSWD 1
14547 _ACEOF
14548
14549 elif test "$have_shadow" = yes ; then
14550   cat >>confdefs.h <<\_ACEOF
14551 #define HAVE_SHADOW_PASSWD 1
14552 _ACEOF
14553
14554 fi
14555
14556
14557 ###############################################################################
14558 #
14559 #       Check for external password helper
14560 #       On SuSE, instead of having xscreensaver be a setuid program, they
14561 #       fork an external program that takes the password on stdin, and
14562 #       returns true if that password is a valid one.  Then only that
14563 #       smaller program needs to be setuid.
14564 #
14565 #       (Note that this external program is not a GUI: the GUI is still
14566 #       all in xscreensaver itself; the external program just does auth.)
14567 #
14568 ###############################################################################
14569
14570 have_passwd_helper=no
14571 with_passwd_helper_req=unspecified
14572
14573
14574 # Check whether --with-passwd-helper or --without-passwd-helper was given.
14575 if test "${with_passwd_helper+set}" = set; then
14576   withval="$with_passwd_helper"
14577   with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
14578 else
14579   with_passwd_helper=no
14580 fi;
14581 # no HANDLE_X_PATH_ARG for this one
14582
14583 if test "$enable_locking" = no ; then
14584   with_passwd_helper_req=no
14585   with_passwd_helper=no
14586 fi
14587
14588 case "$with_passwd_helper" in
14589   ""|no) : ;;
14590   /*)
14591     cat >>confdefs.h <<_ACEOF
14592 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
14593 _ACEOF
14594
14595     have_passwd_helper=yes;;
14596   *)
14597     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
14598     exit 1
14599 esac
14600
14601
14602 ###############################################################################
14603 #
14604 #       Check for -lXm.
14605 #
14606 ###############################################################################
14607
14608 have_motif=no
14609 with_motif_req=unspecified
14610
14611 # Check whether --with-motif or --without-motif was given.
14612 if test "${with_motif+set}" = set; then
14613   withval="$with_motif"
14614   with_motif="$withval"; with_motif_req="$withval"
14615 else
14616   with_motif=no
14617 fi;
14618
14619
14620    case "$with_motif" in
14621     yes) ;;
14622     no)  ;;
14623
14624     /*)
14625      echo "$as_me:$LINENO: checking for Motif headers" >&5
14626 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
14627      d=$with_motif/include
14628      if test -d $d; then
14629        X_CFLAGS="-I$d $X_CFLAGS"
14630        echo "$as_me:$LINENO: result: $d" >&5
14631 echo "${ECHO_T}$d" >&6
14632      else
14633        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14634 echo "${ECHO_T}not found ($d: no such directory)" >&6
14635      fi
14636
14637      echo "$as_me:$LINENO: checking for Motif libs" >&5
14638 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
14639      d=$with_motif/lib
14640      if test -d $d; then
14641        X_LIBS="-L$d $X_LIBS"
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      # replace the directory string with "yes".
14650      with_motif_req="yes"
14651      with_motif=$with_motif_req
14652      ;;
14653
14654     *)
14655      echo ""
14656      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
14657      echo "       If it is a directory, then \`DIR/include' will be added to"
14658      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14659      exit 1
14660      ;;
14661    esac
14662
14663
14664 if test "$with_motif" != yes -a "$with_motif" != no ; then
14665   echo "error: must be yes or no: --with-motif=$with_motif"
14666   exit 1
14667 fi
14668
14669 if test "$with_motif" = yes; then
14670   have_motif=no
14671
14672   ac_save_CPPFLAGS="$CPPFLAGS"
14673   if test \! -z "$includedir" ; then
14674     CPPFLAGS="$CPPFLAGS -I$includedir"
14675   fi
14676   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14677   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
14678 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
14679 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
14680   echo $ECHO_N "(cached) $ECHO_C" >&6
14681 else
14682   cat >conftest.$ac_ext <<_ACEOF
14683 /* confdefs.h.  */
14684 _ACEOF
14685 cat confdefs.h >>conftest.$ac_ext
14686 cat >>conftest.$ac_ext <<_ACEOF
14687 /* end confdefs.h.  */
14688 #include <stdlib.h>
14689                      #include <stdio.h>
14690                      #include <X11/Intrinsic.h>
14691
14692 #include <Xm/Xm.h>
14693 _ACEOF
14694 rm -f conftest.$ac_objext
14695 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14696   (eval $ac_compile) 2>conftest.er1
14697   ac_status=$?
14698   grep -v '^ *+' conftest.er1 >conftest.err
14699   rm -f conftest.er1
14700   cat conftest.err >&5
14701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14702   (exit $ac_status); } &&
14703          { ac_try='test -z "$ac_c_werror_flag"
14704                          || test ! -s conftest.err'
14705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14706   (eval $ac_try) 2>&5
14707   ac_status=$?
14708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14709   (exit $ac_status); }; } &&
14710          { ac_try='test -s conftest.$ac_objext'
14711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14712   (eval $ac_try) 2>&5
14713   ac_status=$?
14714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14715   (exit $ac_status); }; }; then
14716   ac_cv_header_Xm_Xm_h=yes
14717 else
14718   echo "$as_me: failed program was:" >&5
14719 sed 's/^/| /' conftest.$ac_ext >&5
14720
14721 ac_cv_header_Xm_Xm_h=no
14722 fi
14723 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14724 fi
14725 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
14726 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
14727 if test $ac_cv_header_Xm_Xm_h = yes; then
14728   have_motif=yes
14729                      cat >>confdefs.h <<\_ACEOF
14730 #define HAVE_MOTIF 1
14731 _ACEOF
14732
14733                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
14734 fi
14735
14736
14737   CPPFLAGS="$ac_save_CPPFLAGS"
14738 fi
14739
14740
14741 if test "$have_motif" = yes; then
14742
14743   ac_save_CPPFLAGS="$CPPFLAGS"
14744   if test \! -z "$includedir" ; then
14745     CPPFLAGS="$CPPFLAGS -I$includedir"
14746   fi
14747   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14748   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
14749 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
14750 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
14751   echo $ECHO_N "(cached) $ECHO_C" >&6
14752 else
14753   cat >conftest.$ac_ext <<_ACEOF
14754 /* confdefs.h.  */
14755 _ACEOF
14756 cat confdefs.h >>conftest.$ac_ext
14757 cat >>conftest.$ac_ext <<_ACEOF
14758 /* end confdefs.h.  */
14759 #include <stdlib.h>
14760                      #include <stdio.h>
14761                      #include <X11/Intrinsic.h>
14762
14763 #include <Xm/ComboBox.h>
14764 _ACEOF
14765 rm -f conftest.$ac_objext
14766 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14767   (eval $ac_compile) 2>conftest.er1
14768   ac_status=$?
14769   grep -v '^ *+' conftest.er1 >conftest.err
14770   rm -f conftest.er1
14771   cat conftest.err >&5
14772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14773   (exit $ac_status); } &&
14774          { ac_try='test -z "$ac_c_werror_flag"
14775                          || test ! -s conftest.err'
14776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14777   (eval $ac_try) 2>&5
14778   ac_status=$?
14779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14780   (exit $ac_status); }; } &&
14781          { ac_try='test -s conftest.$ac_objext'
14782   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14783   (eval $ac_try) 2>&5
14784   ac_status=$?
14785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14786   (exit $ac_status); }; }; then
14787   ac_cv_header_Xm_ComboBox_h=yes
14788 else
14789   echo "$as_me: failed program was:" >&5
14790 sed 's/^/| /' conftest.$ac_ext >&5
14791
14792 ac_cv_header_Xm_ComboBox_h=no
14793 fi
14794 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14795 fi
14796 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
14797 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
14798 if test $ac_cv_header_Xm_ComboBox_h = yes; then
14799   cat >>confdefs.h <<\_ACEOF
14800 #define HAVE_XMCOMBOBOX 1
14801 _ACEOF
14802
14803 fi
14804
14805
14806   CPPFLAGS="$ac_save_CPPFLAGS"
14807 fi
14808
14809
14810 ###############################################################################
14811 #
14812 #       Check for -lgtk (and Gnome stuff)
14813 #
14814 ###############################################################################
14815
14816 have_gtk=no
14817 have_gtk2=no
14818 with_gtk_req=unspecified
14819
14820 # Check whether --with-gtk or --without-gtk was given.
14821 if test "${with_gtk+set}" = set; then
14822   withval="$with_gtk"
14823   with_gtk="$withval"; with_gtk_req="$withval"
14824 else
14825   with_gtk=yes
14826 fi;
14827
14828 # if --with-gtk=/directory/ was specified, remember that directory so that
14829 # we can also look for the `gtk-config' program in that directory.
14830 case "$with_gtk" in
14831   /*)
14832     gtk_dir="$with_gtk"
14833     ;;
14834   *)
14835     gtk_dir=""
14836     ;;
14837 esac
14838
14839
14840    case "$with_gtk" in
14841     yes) ;;
14842     no)  ;;
14843
14844     /*)
14845      echo "$as_me:$LINENO: checking for Gtk headers" >&5
14846 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
14847      d=$with_gtk/include
14848      if test -d $d; then
14849        X_CFLAGS="-I$d $X_CFLAGS"
14850        echo "$as_me:$LINENO: result: $d" >&5
14851 echo "${ECHO_T}$d" >&6
14852      else
14853        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14854 echo "${ECHO_T}not found ($d: no such directory)" >&6
14855      fi
14856
14857      echo "$as_me:$LINENO: checking for Gtk libs" >&5
14858 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
14859      d=$with_gtk/lib
14860      if test -d $d; then
14861        X_LIBS="-L$d $X_LIBS"
14862        echo "$as_me:$LINENO: result: $d" >&5
14863 echo "${ECHO_T}$d" >&6
14864      else
14865        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14866 echo "${ECHO_T}not found ($d: no such directory)" >&6
14867      fi
14868
14869      # replace the directory string with "yes".
14870      with_gtk_req="yes"
14871      with_gtk=$with_gtk_req
14872      ;;
14873
14874     *)
14875      echo ""
14876      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
14877      echo "       If it is a directory, then \`DIR/include' will be added to"
14878      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14879      exit 1
14880      ;;
14881    esac
14882
14883
14884 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
14885   echo "error: must be yes or no: --with-gtk=$with_gtk"
14886   exit 1
14887 fi
14888
14889 have_gnome=no
14890 with_gnome_req=unspecified
14891
14892 # Check whether --with-gnome or --without-gnome was given.
14893 if test "${with_gnome+set}" = set; then
14894   withval="$with_gnome"
14895   with_gnome="$withval"; with_gnome_req="$withval"
14896 else
14897   with_gnome=yes
14898 fi;
14899
14900 # if --with-gnome=/directory/ was specified, remember that directory so that
14901 # we can also look for the `gnome-config' program in that directory.
14902 case "$with_gnome" in
14903   /*)
14904     gnome_dir="$with_gnome"
14905     ;;
14906   *)
14907     gnome_dir=""
14908     ;;
14909 esac
14910
14911
14912    case "$with_gnome" in
14913     yes) ;;
14914     no)  ;;
14915
14916     /*)
14917      echo "$as_me:$LINENO: checking for Gnome headers" >&5
14918 echo $ECHO_N "checking for Gnome headers... $ECHO_C" >&6
14919      d=$with_gnome/include
14920      if test -d $d; then
14921        X_CFLAGS="-I$d $X_CFLAGS"
14922        echo "$as_me:$LINENO: result: $d" >&5
14923 echo "${ECHO_T}$d" >&6
14924      else
14925        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14926 echo "${ECHO_T}not found ($d: no such directory)" >&6
14927      fi
14928
14929      echo "$as_me:$LINENO: checking for Gnome libs" >&5
14930 echo $ECHO_N "checking for Gnome libs... $ECHO_C" >&6
14931      d=$with_gnome/lib
14932      if test -d $d; then
14933        X_LIBS="-L$d $X_LIBS"
14934        echo "$as_me:$LINENO: result: $d" >&5
14935 echo "${ECHO_T}$d" >&6
14936      else
14937        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14938 echo "${ECHO_T}not found ($d: no such directory)" >&6
14939      fi
14940
14941      # replace the directory string with "yes".
14942      with_gnome_req="yes"
14943      with_gnome=$with_gnome_req
14944      ;;
14945
14946     *)
14947      echo ""
14948      echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
14949      echo "       If it is a directory, then \`DIR/include' will be added to"
14950      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14951      exit 1
14952      ;;
14953    esac
14954
14955
14956 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
14957   echo "error: must be yes or no: --with-gnome=$with_gnome"
14958   exit 1
14959 fi
14960
14961 parse_gtk_version_string() {
14962   # M4 sucks!!
14963
14964   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
14965   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
14966
14967   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
14968   if test -z "$ac_gtk_version"; then
14969     ac_gtk_version=unknown
14970     ac_gtk_version_string=unknown
14971   fi
14972 }
14973
14974
14975 jurassic_gtk=no
14976 gtk2_halfassed=no
14977
14978 if test "$with_gtk" = yes; then
14979   have_gtk=no
14980
14981   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
14982   # look in /foo/bin/ for glib-config, gtk-config, and gnome-config.
14983   #
14984   gtk_path="$PATH"
14985
14986   if test ! -z "$gtk_dir"; then
14987     # canonicalize slashes.
14988     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
14989     gtk_path="$foo:$gtk_path"
14990   fi
14991
14992   if test ! -z "$gnome_dir"; then
14993     # canonicalize slashes.
14994     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
14995     gtk_path="$foo:$gtk_path"
14996   fi
14997
14998   for ac_prog in pkg-config
14999 do
15000   # Extract the first word of "$ac_prog", so it can be a program name with args.
15001 set dummy $ac_prog; ac_word=$2
15002 echo "$as_me:$LINENO: checking for $ac_word" >&5
15003 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15004 if test "${ac_cv_path_pkg_config+set}" = set; then
15005   echo $ECHO_N "(cached) $ECHO_C" >&6
15006 else
15007   case $pkg_config in
15008   [\\/]* | ?:[\\/]*)
15009   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
15010   ;;
15011   *)
15012   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15013 for as_dir in $gtk_path
15014 do
15015   IFS=$as_save_IFS
15016   test -z "$as_dir" && as_dir=.
15017   for ac_exec_ext in '' $ac_executable_extensions; do
15018   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15019     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
15020     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15021     break 2
15022   fi
15023 done
15024 done
15025
15026   ;;
15027 esac
15028 fi
15029 pkg_config=$ac_cv_path_pkg_config
15030
15031 if test -n "$pkg_config"; then
15032   echo "$as_me:$LINENO: result: $pkg_config" >&5
15033 echo "${ECHO_T}$pkg_config" >&6
15034 else
15035   echo "$as_me:$LINENO: result: no" >&5
15036 echo "${ECHO_T}no" >&6
15037 fi
15038
15039   test -n "$pkg_config" && break
15040 done
15041
15042
15043   if test -n "$pkg_config" ; then
15044     #
15045     # the new way...
15046     # run pkg-config based tests.
15047     #
15048     pkgs=''
15049     pkg_check_version() {
15050       if test "$ok" = yes ; then
15051         req="$1"
15052         min="$2"
15053         echo "$as_me:$LINENO: checking for $req" >&5
15054 echo $ECHO_N "checking for $req... $ECHO_C" >&6
15055         if $pkg_config --exists "$req" ; then
15056           vers=`$pkg_config --modversion "$req"`
15057           if $pkg_config --exists "$req >= $min" ; then
15058             echo "$as_me:$LINENO: result: $vers" >&5
15059 echo "${ECHO_T}$vers" >&6
15060             pkgs="$pkgs $req"
15061             return 1
15062           else
15063             echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
15064 echo "${ECHO_T}$vers (wanted >= $min)" >&6
15065             ok=no
15066             return 0
15067           fi
15068         else
15069           echo "$as_me:$LINENO: result: no" >&5
15070 echo "${ECHO_T}no" >&6
15071           ok=no
15072           return 0
15073         fi
15074       fi
15075     }
15076
15077     echo "$as_me:$LINENO: result: checking for GTK 2.x with pkg-config based tests..." >&5
15078 echo "${ECHO_T}checking for GTK 2.x with pkg-config based tests..." >&6
15079
15080     ok="yes"
15081     pkg_check_version       gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
15082     pkg_check_version    gmodule-2.0  2.0.0
15083     pkg_check_version     libxml-2.0  2.4.6
15084     pkg_check_version   libglade-2.0  1.99.0
15085 #   pkg_check_version gdk_pixbuf      0.1
15086     have_gtk="$ok"
15087
15088     if test "$have_gtk" = yes; then
15089       have_gtk2=yes
15090       cat >>confdefs.h <<\_ACEOF
15091 #define HAVE_GTK2 1
15092 _ACEOF
15093
15094     else
15095       if test -n "$ac_gtk_version_string" ; then
15096         gtk2_halfassed="$ac_gtk_version_string"
15097         gtk2_halfassed_lib="$req"
15098       fi
15099     fi
15100
15101     if test "$have_gtk" = no; then
15102       #
15103       # we don't have GTK 2.  Let's look for GTK 1.
15104       #
15105       echo "$as_me:$LINENO: result: checking for GTK 1.x with pkg-config based tests..." >&5
15106 echo "${ECHO_T}checking for GTK 1.x with pkg-config based tests..." >&6
15107
15108       pkgs=''
15109       ok="yes"
15110       pkg_check_version gtk+       1.2     ; ac_gtk_version_string="$vers"
15111       pkg_check_version glib       1.0
15112       pkg_check_version gdk_pixbuf 0.1
15113       have_gtk="$ok"
15114
15115       # Now check for Gnome...
15116       #
15117       if test "$have_gtk" = yes -a "$with_gnome" = yes; then
15118         old_pkgs="$pkgs"
15119         ok=yes
15120         pkg_check_version capplet    1.0
15121         pkg_check_version gnomeui    1.0
15122         pkg_check_version gdk_pixbuf 0.1
15123         have_gnome="$ok"
15124
15125         if test "$have_gnome" = no; then
15126           pkgs="$old_pkgs"
15127         else
15128           cat >>confdefs.h <<\_ACEOF
15129 #define HAVE_CRAPPLET 1
15130 _ACEOF
15131
15132         fi
15133       fi
15134     fi
15135
15136     if test "$have_gtk" = yes; then
15137       parse_gtk_version_string
15138       jurassic_gtk=no
15139     else
15140       have_gnome=no
15141     fi
15142
15143     if test "$have_gtk" = yes; then
15144       echo "$as_me:$LINENO: checking for Gtk includes" >&5
15145 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
15146 if test "${ac_cv_gtk_config_cflags+set}" = set; then
15147   echo $ECHO_N "(cached) $ECHO_C" >&6
15148 else
15149   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
15150 fi
15151 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
15152 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
15153       echo "$as_me:$LINENO: checking for Gtk libs" >&5
15154 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
15155 if test "${ac_cv_gtk_config_libs+set}" = set; then
15156   echo $ECHO_N "(cached) $ECHO_C" >&6
15157 else
15158   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
15159 fi
15160 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
15161 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
15162     fi
15163     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
15164     ac_gtk_config_libs=$ac_cv_gtk_config_libs
15165
15166     ac_gnome_config_cflags=$ac_gtk_config_cflags
15167     ac_gnome_config_libs=$ac_gtk_config_libs
15168
15169   else
15170     #
15171     # the old way...
15172     # run {gnome,gtk}-config based tests.
15173     #
15174     echo "$as_me:$LINENO: result: checking for GTK 1.x with gtk-config based tests..." >&5
15175 echo "${ECHO_T}checking for GTK 1.x with gtk-config based tests..." >&6
15176
15177     for ac_prog in glib12-config glib-config
15178 do
15179   # Extract the first word of "$ac_prog", so it can be a program name with args.
15180 set dummy $ac_prog; ac_word=$2
15181 echo "$as_me:$LINENO: checking for $ac_word" >&5
15182 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15183 if test "${ac_cv_path_glib_config+set}" = set; then
15184   echo $ECHO_N "(cached) $ECHO_C" >&6
15185 else
15186   case $glib_config in
15187   [\\/]* | ?:[\\/]*)
15188   ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
15189   ;;
15190   *)
15191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15192 for as_dir in $gtk_path
15193 do
15194   IFS=$as_save_IFS
15195   test -z "$as_dir" && as_dir=.
15196   for ac_exec_ext in '' $ac_executable_extensions; do
15197   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15198     ac_cv_path_glib_config="$as_dir/$ac_word$ac_exec_ext"
15199     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15200     break 2
15201   fi
15202 done
15203 done
15204
15205   ;;
15206 esac
15207 fi
15208 glib_config=$ac_cv_path_glib_config
15209
15210 if test -n "$glib_config"; then
15211   echo "$as_me:$LINENO: result: $glib_config" >&5
15212 echo "${ECHO_T}$glib_config" >&6
15213 else
15214   echo "$as_me:$LINENO: result: no" >&5
15215 echo "${ECHO_T}no" >&6
15216 fi
15217
15218   test -n "$glib_config" && break
15219 done
15220
15221     for ac_prog in gtk12-config  gtk-config
15222 do
15223   # Extract the first word of "$ac_prog", so it can be a program name with args.
15224 set dummy $ac_prog; ac_word=$2
15225 echo "$as_me:$LINENO: checking for $ac_word" >&5
15226 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15227 if test "${ac_cv_path_gtk_config+set}" = set; then
15228   echo $ECHO_N "(cached) $ECHO_C" >&6
15229 else
15230   case $gtk_config in
15231   [\\/]* | ?:[\\/]*)
15232   ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
15233   ;;
15234   *)
15235   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15236 for as_dir in $gtk_path
15237 do
15238   IFS=$as_save_IFS
15239   test -z "$as_dir" && as_dir=.
15240   for ac_exec_ext in '' $ac_executable_extensions; do
15241   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15242     ac_cv_path_gtk_config="$as_dir/$ac_word$ac_exec_ext"
15243     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15244     break 2
15245   fi
15246 done
15247 done
15248
15249   ;;
15250 esac
15251 fi
15252 gtk_config=$ac_cv_path_gtk_config
15253
15254 if test -n "$gtk_config"; then
15255   echo "$as_me:$LINENO: result: $gtk_config" >&5
15256 echo "${ECHO_T}$gtk_config" >&6
15257 else
15258   echo "$as_me:$LINENO: result: no" >&5
15259 echo "${ECHO_T}no" >&6
15260 fi
15261
15262   test -n "$gtk_config" && break
15263 done
15264
15265
15266     if test "$with_gnome" = yes; then
15267       for ac_prog in gnome-config
15268 do
15269   # Extract the first word of "$ac_prog", so it can be a program name with args.
15270 set dummy $ac_prog; ac_word=$2
15271 echo "$as_me:$LINENO: checking for $ac_word" >&5
15272 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15273 if test "${ac_cv_path_gnome_config+set}" = set; then
15274   echo $ECHO_N "(cached) $ECHO_C" >&6
15275 else
15276   case $gnome_config in
15277   [\\/]* | ?:[\\/]*)
15278   ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
15279   ;;
15280   *)
15281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15282 for as_dir in $gtk_path
15283 do
15284   IFS=$as_save_IFS
15285   test -z "$as_dir" && as_dir=.
15286   for ac_exec_ext in '' $ac_executable_extensions; do
15287   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15288     ac_cv_path_gnome_config="$as_dir/$ac_word$ac_exec_ext"
15289     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15290     break 2
15291   fi
15292 done
15293 done
15294
15295   ;;
15296 esac
15297 fi
15298 gnome_config=$ac_cv_path_gnome_config
15299
15300 if test -n "$gnome_config"; then
15301   echo "$as_me:$LINENO: result: $gnome_config" >&5
15302 echo "${ECHO_T}$gnome_config" >&6
15303 else
15304   echo "$as_me:$LINENO: result: no" >&5
15305 echo "${ECHO_T}no" >&6
15306 fi
15307
15308   test -n "$gnome_config" && break
15309 done
15310
15311     fi
15312
15313     if test -n "$glib_config" -a  -n "$gtk_config" ; then
15314       have_gtk=yes
15315       if test "$with_gnome" = yes -a -n "$gnome_config" ; then
15316         have_gnome=yes
15317       fi
15318     fi
15319
15320     if test "$have_gtk" = yes; then
15321       echo "$as_me:$LINENO: checking Gtk version number" >&5
15322 echo $ECHO_N "checking Gtk version number... $ECHO_C" >&6
15323 if test "${ac_cv_gtk_version_string+set}" = set; then
15324   echo $ECHO_N "(cached) $ECHO_C" >&6
15325 else
15326   ac_cv_gtk_version_string=`$gtk_config --version`
15327 fi
15328 echo "$as_me:$LINENO: result: $ac_cv_gtk_version_string" >&5
15329 echo "${ECHO_T}$ac_cv_gtk_version_string" >&6
15330       ac_gtk_version_string=$ac_cv_gtk_version_string
15331       parse_gtk_version_string
15332     fi
15333
15334     if test "$have_gtk" = yes; then
15335       if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
15336       then
15337         have_gtk=no
15338         have_gnome=no
15339         jurassic_gtk=yes
15340       fi
15341     fi
15342
15343     if test "$have_gtk" = yes; then
15344       echo "$as_me:$LINENO: checking for Gtk includes" >&5
15345 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
15346 if test "${ac_cv_gtk_config_cflags+set}" = set; then
15347   echo $ECHO_N "(cached) $ECHO_C" >&6
15348 else
15349   ac_cv_gtk_config_cflags=`$gtk_config --cflags`
15350 fi
15351 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
15352 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
15353       echo "$as_me:$LINENO: checking for Gtk libs" >&5
15354 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
15355 if test "${ac_cv_gtk_config_libs+set}" = set; then
15356   echo $ECHO_N "(cached) $ECHO_C" >&6
15357 else
15358   ac_cv_gtk_config_libs=`$gtk_config --libs`
15359 fi
15360 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
15361 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
15362     fi
15363     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
15364     ac_gtk_config_libs=$ac_cv_gtk_config_libs
15365
15366     # Check for Gnome Capplet support.
15367     # Note that this is only needed with Gnome 1.x, not Gnome 2.x.
15368     # In a Gnome 2.x world, libcapplet will not exist.
15369     # (In fact, this likely won't even be checked, since in a Gnome 2.x
15370     # world, we will probably be up in the "$pkg_config" branch instead
15371     # of here in the "$gnome_config" branch.)
15372     #
15373     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
15374       gnome_config_libs="gtk capplet gnomeui gdk_pixbuf"
15375       echo "$as_me:$LINENO: checking for Gnome capplet includes" >&5
15376 echo $ECHO_N "checking for Gnome capplet includes... $ECHO_C" >&6
15377       if test "${ac_cv_gnome_config_cflags+set}" = set; then
15378   echo $ECHO_N "(cached) $ECHO_C" >&6
15379 else
15380   if ( $gnome_config --cflags $gnome_config_libs 2>&1 | \
15381               grep Unknown >/dev/null ) ; then
15382            ac_cv_gnome_config_cflags=''
15383          else
15384           ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
15385          fi
15386 fi
15387
15388       ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
15389       if test "$ac_gnome_config_cflags" = "" ; then
15390         have_gnome=no
15391         echo "$as_me:$LINENO: result: no" >&5
15392 echo "${ECHO_T}no" >&6
15393       else
15394         echo "$as_me:$LINENO: result: $ac_gnome_config_cflags" >&5
15395 echo "${ECHO_T}$ac_gnome_config_cflags" >&6
15396       fi
15397     fi
15398
15399     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
15400       echo "$as_me:$LINENO: checking for Gnome capplet libs" >&5
15401 echo $ECHO_N "checking for Gnome capplet libs... $ECHO_C" >&6
15402       if test "${ac_cv_gnome_config_libs+set}" = set; then
15403   echo $ECHO_N "(cached) $ECHO_C" >&6
15404 else
15405   if ( $gnome_config --libs $gnome_config_libs 2>&1 |
15406               grep Unknown >/dev/null ) ; then
15407            ac_cv_gnome_config_libs=''
15408          else
15409            ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
15410          fi
15411 fi
15412
15413       ac_gnome_config_libs=$ac_cv_gnome_config_libs
15414       if test "$ac_gnome_config_libs" = "" ; then
15415         have_gnome=no
15416         echo "$as_me:$LINENO: result: no" >&5
15417 echo "${ECHO_T}no" >&6
15418       else
15419         echo "$as_me:$LINENO: result: $ac_gnome_config_libs" >&5
15420 echo "${ECHO_T}$ac_gnome_config_libs" >&6
15421       fi
15422     fi
15423
15424     # If we have Gnome, then override the gtk-config values with
15425     # the gnome-config values.
15426     #
15427     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
15428       ac_gtk_config_cflags=$ac_gnome_config_cflags
15429       ac_gtk_config_libs=$ac_gnome_config_libs
15430       cat >>confdefs.h <<\_ACEOF
15431 #define HAVE_CRAPPLET 1
15432 _ACEOF
15433
15434     fi
15435
15436   fi   # end of {gnome,gtk}-config based tests
15437
15438   if test "$have_gtk" = yes -a "$have_gtk2" = no; then
15439     # check for this function that was not in libcapplet 1.2.
15440     # (only needed in Gnome/Gtk 1.x, not Gnome/Gtk 2.x)
15441
15442   ac_save_CPPFLAGS="$CPPFLAGS"
15443   ac_save_LDFLAGS="$LDFLAGS"
15444 #  ac_save_LIBS="$LIBS"
15445
15446   if test \! -z "$includedir" ; then
15447     CPPFLAGS="$CPPFLAGS -I$includedir"
15448   fi
15449   # note: $X_CFLAGS includes $x_includes
15450   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15451
15452   if test \! -z "$libdir" ; then
15453     LDFLAGS="$LDFLAGS -L$libdir"
15454   fi
15455   # note: $X_LIBS includes $x_libraries
15456   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15457
15458   echo "$as_me:$LINENO: checking for capplet_widget_changes_are_immediate in -lcapplet" >&5
15459 echo $ECHO_N "checking for capplet_widget_changes_are_immediate in -lcapplet... $ECHO_C" >&6
15460 if test "${ac_cv_lib_capplet_capplet_widget_changes_are_immediate+set}" = set; then
15461   echo $ECHO_N "(cached) $ECHO_C" >&6
15462 else
15463   ac_check_lib_save_LIBS=$LIBS
15464 LIBS="-lcapplet $ac_gnome_config_libs $LIBS"
15465 cat >conftest.$ac_ext <<_ACEOF
15466 /* confdefs.h.  */
15467 _ACEOF
15468 cat confdefs.h >>conftest.$ac_ext
15469 cat >>conftest.$ac_ext <<_ACEOF
15470 /* end confdefs.h.  */
15471
15472 /* Override any gcc2 internal prototype to avoid an error.  */
15473 #ifdef __cplusplus
15474 extern "C"
15475 #endif
15476 /* We use char because int might match the return type of a gcc2
15477    builtin and then its argument prototype would still apply.  */
15478 char capplet_widget_changes_are_immediate ();
15479 int
15480 main ()
15481 {
15482 capplet_widget_changes_are_immediate ();
15483   ;
15484   return 0;
15485 }
15486 _ACEOF
15487 rm -f conftest.$ac_objext conftest$ac_exeext
15488 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15489   (eval $ac_link) 2>conftest.er1
15490   ac_status=$?
15491   grep -v '^ *+' conftest.er1 >conftest.err
15492   rm -f conftest.er1
15493   cat conftest.err >&5
15494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15495   (exit $ac_status); } &&
15496          { ac_try='test -z "$ac_c_werror_flag"
15497                          || test ! -s conftest.err'
15498   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15499   (eval $ac_try) 2>&5
15500   ac_status=$?
15501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15502   (exit $ac_status); }; } &&
15503          { ac_try='test -s conftest$ac_exeext'
15504   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15505   (eval $ac_try) 2>&5
15506   ac_status=$?
15507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15508   (exit $ac_status); }; }; then
15509   ac_cv_lib_capplet_capplet_widget_changes_are_immediate=yes
15510 else
15511   echo "$as_me: failed program was:" >&5
15512 sed 's/^/| /' conftest.$ac_ext >&5
15513
15514 ac_cv_lib_capplet_capplet_widget_changes_are_immediate=no
15515 fi
15516 rm -f conftest.err conftest.$ac_objext \
15517       conftest$ac_exeext conftest.$ac_ext
15518 LIBS=$ac_check_lib_save_LIBS
15519 fi
15520 echo "$as_me:$LINENO: result: $ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&5
15521 echo "${ECHO_T}$ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&6
15522 if test $ac_cv_lib_capplet_capplet_widget_changes_are_immediate = yes; then
15523   cat >>confdefs.h <<\_ACEOF
15524 #define HAVE_CRAPPLET_IMMEDIATE 1
15525 _ACEOF
15526
15527 else
15528   true
15529 fi
15530
15531   CPPFLAGS="$ac_save_CPPFLAGS"
15532   LDFLAGS="$ac_save_LDFLAGS"
15533 #  LIBS="$ac_save_LIBS"
15534
15535   fi
15536
15537
15538   GNOME_DATADIR=""
15539   if test "$have_gtk" = yes; then
15540     if test -n "$pkg_config"; then
15541       if test "$have_gtk2" = yes; then
15542         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
15543       else
15544         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+`
15545       fi
15546     else
15547       GNOME_DATADIR=`$gtk_config --prefix`
15548     fi
15549     GNOME_DATADIR="$GNOME_DATADIR/share"
15550   fi
15551
15552   # .desktop files go in different places in Gnome 1.x and Gnome 2.x...
15553   if test "$have_gtk2" = yes; then
15554     GNOME_PANELDIR='$(GNOME_PANELDIR2)'
15555   else
15556     GNOME_PANELDIR='$(GNOME_PANELDIR1)'
15557   fi
15558
15559
15560   if test "$have_gtk" = yes; then
15561     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
15562     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
15563     cat >>confdefs.h <<\_ACEOF
15564 #define HAVE_GTK 1
15565 _ACEOF
15566
15567
15568     if test "$have_gtk2" = yes; then
15569       GTK_EXTRA_OBJS=""
15570     else
15571       GTK_EXTRA_OBJS="\$(GTK_EXTRA_OBJS)"
15572     fi
15573   fi
15574
15575 fi
15576
15577
15578 # Check for the Gnome Help Browser.
15579 #
15580 if test "$have_gtk" = yes; then
15581   for ac_prog in yelp gnome-help-browser
15582 do
15583   # Extract the first word of "$ac_prog", so it can be a program name with args.
15584 set dummy $ac_prog; ac_word=$2
15585 echo "$as_me:$LINENO: checking for $ac_word" >&5
15586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15587 if test "${ac_cv_prog_have_gnome_help+set}" = set; then
15588   echo $ECHO_N "(cached) $ECHO_C" >&6
15589 else
15590   if test -n "$have_gnome_help"; then
15591   ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
15592 else
15593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15594 for as_dir in $PATH
15595 do
15596   IFS=$as_save_IFS
15597   test -z "$as_dir" && as_dir=.
15598   for ac_exec_ext in '' $ac_executable_extensions; do
15599   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15600     ac_cv_prog_have_gnome_help="$ac_prog"
15601     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15602     break 2
15603   fi
15604 done
15605 done
15606
15607 fi
15608 fi
15609 have_gnome_help=$ac_cv_prog_have_gnome_help
15610 if test -n "$have_gnome_help"; then
15611   echo "$as_me:$LINENO: result: $have_gnome_help" >&5
15612 echo "${ECHO_T}$have_gnome_help" >&6
15613 else
15614   echo "$as_me:$LINENO: result: no" >&5
15615 echo "${ECHO_T}no" >&6
15616 fi
15617
15618   test -n "$have_gnome_help" && break
15619 done
15620 test -n "$have_gnome_help" || have_gnome_help="no"
15621
15622   if test "$have_gnome_help" != no; then
15623     have_gnome_help=yes
15624   fi
15625 fi
15626
15627
15628 ###############################################################################
15629 #
15630 #       Check for -lxml
15631 #
15632 ###############################################################################
15633
15634 have_xml=no
15635 with_xml_req=unspecified
15636 xml_halfassed=no
15637
15638 # Check whether --with-xml or --without-xml was given.
15639 if test "${with_xml+set}" = set; then
15640   withval="$with_xml"
15641   with_xml="$withval"; with_xml_req="$withval"
15642 else
15643   with_xml=yes
15644 fi;
15645
15646 # if --with-xml=/directory/ was specified, remember that directory so that
15647 # we can also look for the `xml-config' program in that directory.
15648 case "$with_xml" in
15649   /*)
15650     xml_dir="$with_xml"
15651     ;;
15652   *)
15653     xml_dir=""
15654     ;;
15655 esac
15656
15657
15658    case "$with_xml" in
15659     yes) ;;
15660     no)  ;;
15661
15662     /*)
15663      echo "$as_me:$LINENO: checking for XML headers" >&5
15664 echo $ECHO_N "checking for XML headers... $ECHO_C" >&6
15665      d=$with_xml/include
15666      if test -d $d; then
15667        X_CFLAGS="-I$d $X_CFLAGS"
15668        echo "$as_me:$LINENO: result: $d" >&5
15669 echo "${ECHO_T}$d" >&6
15670      else
15671        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15672 echo "${ECHO_T}not found ($d: no such directory)" >&6
15673      fi
15674
15675      echo "$as_me:$LINENO: checking for XML libs" >&5
15676 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
15677      d=$with_xml/lib
15678      if test -d $d; then
15679        X_LIBS="-L$d $X_LIBS"
15680        echo "$as_me:$LINENO: result: $d" >&5
15681 echo "${ECHO_T}$d" >&6
15682      else
15683        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15684 echo "${ECHO_T}not found ($d: no such directory)" >&6
15685      fi
15686
15687      # replace the directory string with "yes".
15688      with_xml_req="yes"
15689      with_xml=$with_xml_req
15690      ;;
15691
15692     *)
15693      echo ""
15694      echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory."
15695      echo "       If it is a directory, then \`DIR/include' will be added to"
15696      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15697      exit 1
15698      ;;
15699    esac
15700
15701
15702 if test "$with_xml" != yes -a "$with_xml" != no ; then
15703   echo "error: must be yes or no: --with-xml=$with_xml"
15704   exit 1
15705 fi
15706
15707 if test "$with_xml" = yes; then
15708   have_xml=no
15709   have_old_xml=no
15710
15711   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
15712   # look in /foo/bin/ for for xml-config.
15713   #
15714   xml_path="$PATH"
15715
15716   if test ! -z "$gtk_dir"; then
15717     # canonicalize slashes.
15718     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
15719     xml_path="$foo:$xml_path"
15720   fi
15721
15722   if test ! -z "$gnome_dir"; then
15723     # canonicalize slashes.
15724     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
15725     xml_path="$foo:$xml_path"
15726   fi
15727
15728   if test -n "$pkg_config" ; then
15729     #
15730     # the new way...
15731     # run pkg-config based tests.
15732     #
15733     pkgs=""
15734     ok="yes"
15735
15736     # If we have Gtk 2.x, then *only* XML 2.x will work.
15737     # If we have Gtk 1.x, or don't have Gtk at all, then
15738     # either XML 1.x or 2.x will work.
15739
15740     # First check for XML 2.x.
15741     #
15742     pkg_check_version libxml-2.0 2.4.6
15743
15744     # If that didn't work (we don't have XML 2.x) and we *don't* have
15745     # Gtk 2.x, then check to see if we have XML 1.x
15746     #
15747     if test "$ok" = no -a "$have_gtk2" = no; then
15748       ok=yes
15749       pkg_check_version libxml 1.0
15750     fi
15751
15752     have_xml="$ok"
15753
15754     if test "$have_xml" = yes; then
15755       echo "$as_me:$LINENO: checking for XML includes" >&5
15756 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
15757 if test "${ac_cv_xml_config_cflags+set}" = set; then
15758   echo $ECHO_N "(cached) $ECHO_C" >&6
15759 else
15760   ac_cv_xml_config_cflags=`$pkg_config --cflags $pkgs`
15761 fi
15762 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
15763 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
15764       echo "$as_me:$LINENO: checking for XML libs" >&5
15765 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
15766 if test "${ac_cv_xml_config_libs+set}" = set; then
15767   echo $ECHO_N "(cached) $ECHO_C" >&6
15768 else
15769   ac_cv_xml_config_libs=`$pkg_config --libs $pkgs`
15770 fi
15771 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
15772 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
15773       ac_xml_config_cflags=$ac_cv_xml_config_cflags
15774       ac_xml_config_libs=$ac_cv_xml_config_libs
15775     fi
15776
15777   else
15778     #
15779     # the old way...
15780     # run {xml2,xml}-config based tests.
15781     #
15782
15783     for ac_prog in xml2-config xml-config
15784 do
15785   # Extract the first word of "$ac_prog", so it can be a program name with args.
15786 set dummy $ac_prog; ac_word=$2
15787 echo "$as_me:$LINENO: checking for $ac_word" >&5
15788 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15789 if test "${ac_cv_path_xml_config+set}" = set; then
15790   echo $ECHO_N "(cached) $ECHO_C" >&6
15791 else
15792   case $xml_config in
15793   [\\/]* | ?:[\\/]*)
15794   ac_cv_path_xml_config="$xml_config" # Let the user override the test with a path.
15795   ;;
15796   *)
15797   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15798 for as_dir in $xml_path
15799 do
15800   IFS=$as_save_IFS
15801   test -z "$as_dir" && as_dir=.
15802   for ac_exec_ext in '' $ac_executable_extensions; do
15803   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15804     ac_cv_path_xml_config="$as_dir/$ac_word$ac_exec_ext"
15805     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15806     break 2
15807   fi
15808 done
15809 done
15810
15811   ;;
15812 esac
15813 fi
15814 xml_config=$ac_cv_path_xml_config
15815
15816 if test -n "$xml_config"; then
15817   echo "$as_me:$LINENO: result: $xml_config" >&5
15818 echo "${ECHO_T}$xml_config" >&6
15819 else
15820   echo "$as_me:$LINENO: result: no" >&5
15821 echo "${ECHO_T}no" >&6
15822 fi
15823
15824   test -n "$xml_config" && break
15825 done
15826
15827
15828     # If we found the xml-config program, run it to get flags.
15829     #
15830     if test -n "$xml_config" ; then
15831       echo "$as_me:$LINENO: checking for XML includes" >&5
15832 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
15833 if test "${ac_cv_xml_config_cflags+set}" = set; then
15834   echo $ECHO_N "(cached) $ECHO_C" >&6
15835 else
15836   ac_cv_xml_config_cflags=`$xml_config --cflags`
15837 fi
15838 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
15839 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
15840       echo "$as_me:$LINENO: checking for XML libs" >&5
15841 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
15842 if test "${ac_cv_xml_config_libs+set}" = set; then
15843   echo $ECHO_N "(cached) $ECHO_C" >&6
15844 else
15845   ac_cv_xml_config_libs=`$xml_config --libs`
15846 fi
15847 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
15848 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
15849       ac_xml_config_cflags=$ac_cv_xml_config_cflags
15850       ac_xml_config_libs=$ac_cv_xml_config_libs
15851     fi
15852
15853     ac_save_xml_CPPFLAGS="$CPPFLAGS"
15854     CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags"
15855
15856     # first try <libxml/parser.h> which is the new way...
15857     #
15858
15859   ac_save_CPPFLAGS="$CPPFLAGS"
15860   if test \! -z "$includedir" ; then
15861     CPPFLAGS="$CPPFLAGS -I$includedir"
15862   fi
15863   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15864   echo "$as_me:$LINENO: checking for libxml/xmlIO.h" >&5
15865 echo $ECHO_N "checking for libxml/xmlIO.h... $ECHO_C" >&6
15866 if test "${ac_cv_header_libxml_xmlIO_h+set}" = set; then
15867   echo $ECHO_N "(cached) $ECHO_C" >&6
15868 else
15869   cat >conftest.$ac_ext <<_ACEOF
15870 /* confdefs.h.  */
15871 _ACEOF
15872 cat confdefs.h >>conftest.$ac_ext
15873 cat >>conftest.$ac_ext <<_ACEOF
15874 /* end confdefs.h.  */
15875 #include <libxml/parser.h>
15876
15877 #include <libxml/xmlIO.h>
15878 _ACEOF
15879 rm -f conftest.$ac_objext
15880 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15881   (eval $ac_compile) 2>conftest.er1
15882   ac_status=$?
15883   grep -v '^ *+' conftest.er1 >conftest.err
15884   rm -f conftest.er1
15885   cat conftest.err >&5
15886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15887   (exit $ac_status); } &&
15888          { ac_try='test -z "$ac_c_werror_flag"
15889                          || test ! -s conftest.err'
15890   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15891   (eval $ac_try) 2>&5
15892   ac_status=$?
15893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15894   (exit $ac_status); }; } &&
15895          { ac_try='test -s conftest.$ac_objext'
15896   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15897   (eval $ac_try) 2>&5
15898   ac_status=$?
15899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15900   (exit $ac_status); }; }; then
15901   ac_cv_header_libxml_xmlIO_h=yes
15902 else
15903   echo "$as_me: failed program was:" >&5
15904 sed 's/^/| /' conftest.$ac_ext >&5
15905
15906 ac_cv_header_libxml_xmlIO_h=no
15907 fi
15908 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15909 fi
15910 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlIO_h" >&5
15911 echo "${ECHO_T}$ac_cv_header_libxml_xmlIO_h" >&6
15912 if test $ac_cv_header_libxml_xmlIO_h = yes; then
15913   have_xml=yes
15914 fi
15915
15916
15917   CPPFLAGS="$ac_save_CPPFLAGS"
15918
15919     # if that didn't work, then try just <parser.h> which is the old way...
15920     #
15921     if test "$have_xml" = no; then
15922
15923   ac_save_CPPFLAGS="$CPPFLAGS"
15924   if test \! -z "$includedir" ; then
15925     CPPFLAGS="$CPPFLAGS -I$includedir"
15926   fi
15927   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15928   echo "$as_me:$LINENO: checking for xmlIO.h" >&5
15929 echo $ECHO_N "checking for xmlIO.h... $ECHO_C" >&6
15930 if test "${ac_cv_header_xmlIO_h+set}" = set; then
15931   echo $ECHO_N "(cached) $ECHO_C" >&6
15932 else
15933   cat >conftest.$ac_ext <<_ACEOF
15934 /* confdefs.h.  */
15935 _ACEOF
15936 cat confdefs.h >>conftest.$ac_ext
15937 cat >>conftest.$ac_ext <<_ACEOF
15938 /* end confdefs.h.  */
15939 #include <parser.h>
15940
15941 #include <xmlIO.h>
15942 _ACEOF
15943 rm -f conftest.$ac_objext
15944 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15945   (eval $ac_compile) 2>conftest.er1
15946   ac_status=$?
15947   grep -v '^ *+' conftest.er1 >conftest.err
15948   rm -f conftest.er1
15949   cat conftest.err >&5
15950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15951   (exit $ac_status); } &&
15952          { ac_try='test -z "$ac_c_werror_flag"
15953                          || test ! -s conftest.err'
15954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15955   (eval $ac_try) 2>&5
15956   ac_status=$?
15957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15958   (exit $ac_status); }; } &&
15959          { ac_try='test -s conftest.$ac_objext'
15960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15961   (eval $ac_try) 2>&5
15962   ac_status=$?
15963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15964   (exit $ac_status); }; }; then
15965   ac_cv_header_xmlIO_h=yes
15966 else
15967   echo "$as_me: failed program was:" >&5
15968 sed 's/^/| /' conftest.$ac_ext >&5
15969
15970 ac_cv_header_xmlIO_h=no
15971 fi
15972 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15973 fi
15974 echo "$as_me:$LINENO: result: $ac_cv_header_xmlIO_h" >&5
15975 echo "${ECHO_T}$ac_cv_header_xmlIO_h" >&6
15976 if test $ac_cv_header_xmlIO_h = yes; then
15977   have_xml=yes; have_old_xml=yes
15978 fi
15979
15980
15981   CPPFLAGS="$ac_save_CPPFLAGS"
15982     fi
15983
15984     CPPFLAGS="$ac_save_xml_CPPFLAGS"
15985   fi
15986
15987
15988   have_zlib=no
15989   if test "$have_xml" = yes; then
15990     # we have the XML headers; now make sure zlib is around.
15991     # yes, it's stupid we have to do this too, but there is
15992     # dependency screwage in Gnome.
15993
15994   ac_save_CPPFLAGS="$CPPFLAGS"
15995   ac_save_LDFLAGS="$LDFLAGS"
15996 #  ac_save_LIBS="$LIBS"
15997
15998   if test \! -z "$includedir" ; then
15999     CPPFLAGS="$CPPFLAGS -I$includedir"
16000   fi
16001   # note: $X_CFLAGS includes $x_includes
16002   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16003
16004   if test \! -z "$libdir" ; then
16005     LDFLAGS="$LDFLAGS -L$libdir"
16006   fi
16007   # note: $X_LIBS includes $x_libraries
16008   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16009
16010   echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5
16011 echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
16012 if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
16013   echo $ECHO_N "(cached) $ECHO_C" >&6
16014 else
16015   ac_check_lib_save_LIBS=$LIBS
16016 LIBS="-lz  $LIBS"
16017 cat >conftest.$ac_ext <<_ACEOF
16018 /* confdefs.h.  */
16019 _ACEOF
16020 cat confdefs.h >>conftest.$ac_ext
16021 cat >>conftest.$ac_ext <<_ACEOF
16022 /* end confdefs.h.  */
16023
16024 /* Override any gcc2 internal prototype to avoid an error.  */
16025 #ifdef __cplusplus
16026 extern "C"
16027 #endif
16028 /* We use char because int might match the return type of a gcc2
16029    builtin and then its argument prototype would still apply.  */
16030 char zlibVersion ();
16031 int
16032 main ()
16033 {
16034 zlibVersion ();
16035   ;
16036   return 0;
16037 }
16038 _ACEOF
16039 rm -f conftest.$ac_objext conftest$ac_exeext
16040 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16041   (eval $ac_link) 2>conftest.er1
16042   ac_status=$?
16043   grep -v '^ *+' conftest.er1 >conftest.err
16044   rm -f conftest.er1
16045   cat conftest.err >&5
16046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16047   (exit $ac_status); } &&
16048          { ac_try='test -z "$ac_c_werror_flag"
16049                          || test ! -s conftest.err'
16050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16051   (eval $ac_try) 2>&5
16052   ac_status=$?
16053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16054   (exit $ac_status); }; } &&
16055          { ac_try='test -s conftest$ac_exeext'
16056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16057   (eval $ac_try) 2>&5
16058   ac_status=$?
16059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16060   (exit $ac_status); }; }; then
16061   ac_cv_lib_z_zlibVersion=yes
16062 else
16063   echo "$as_me: failed program was:" >&5
16064 sed 's/^/| /' conftest.$ac_ext >&5
16065
16066 ac_cv_lib_z_zlibVersion=no
16067 fi
16068 rm -f conftest.err conftest.$ac_objext \
16069       conftest$ac_exeext conftest.$ac_ext
16070 LIBS=$ac_check_lib_save_LIBS
16071 fi
16072 echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5
16073 echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
16074 if test $ac_cv_lib_z_zlibVersion = yes; then
16075   have_zlib=yes
16076 fi
16077
16078   CPPFLAGS="$ac_save_CPPFLAGS"
16079   LDFLAGS="$ac_save_LDFLAGS"
16080 #  LIBS="$ac_save_LIBS"
16081
16082     if test "$have_zlib" = no; then
16083       xml_halfassed=yes
16084       have_xml=no
16085     fi
16086   fi
16087
16088   if test "$have_xml" = yes; then
16089     # we have the header, now check for the library
16090     have_xml=no
16091     xml_halfassed=yes
16092
16093   ac_save_CPPFLAGS="$CPPFLAGS"
16094   ac_save_LDFLAGS="$LDFLAGS"
16095 #  ac_save_LIBS="$LIBS"
16096
16097   if test \! -z "$includedir" ; then
16098     CPPFLAGS="$CPPFLAGS -I$includedir"
16099   fi
16100   # note: $X_CFLAGS includes $x_includes
16101   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16102
16103   if test \! -z "$libdir" ; then
16104     LDFLAGS="$LDFLAGS -L$libdir"
16105   fi
16106   # note: $X_LIBS includes $x_libraries
16107   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16108
16109   echo "$as_me:$LINENO: checking for xmlParseChunk in -lc" >&5
16110 echo $ECHO_N "checking for xmlParseChunk in -lc... $ECHO_C" >&6
16111 if test "${ac_cv_lib_c_xmlParseChunk+set}" = set; then
16112   echo $ECHO_N "(cached) $ECHO_C" >&6
16113 else
16114   ac_check_lib_save_LIBS=$LIBS
16115 LIBS="-lc $ac_xml_config_libs $LIBS"
16116 cat >conftest.$ac_ext <<_ACEOF
16117 /* confdefs.h.  */
16118 _ACEOF
16119 cat confdefs.h >>conftest.$ac_ext
16120 cat >>conftest.$ac_ext <<_ACEOF
16121 /* end confdefs.h.  */
16122
16123 /* Override any gcc2 internal prototype to avoid an error.  */
16124 #ifdef __cplusplus
16125 extern "C"
16126 #endif
16127 /* We use char because int might match the return type of a gcc2
16128    builtin and then its argument prototype would still apply.  */
16129 char xmlParseChunk ();
16130 int
16131 main ()
16132 {
16133 xmlParseChunk ();
16134   ;
16135   return 0;
16136 }
16137 _ACEOF
16138 rm -f conftest.$ac_objext conftest$ac_exeext
16139 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16140   (eval $ac_link) 2>conftest.er1
16141   ac_status=$?
16142   grep -v '^ *+' conftest.er1 >conftest.err
16143   rm -f conftest.er1
16144   cat conftest.err >&5
16145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16146   (exit $ac_status); } &&
16147          { ac_try='test -z "$ac_c_werror_flag"
16148                          || test ! -s conftest.err'
16149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16150   (eval $ac_try) 2>&5
16151   ac_status=$?
16152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16153   (exit $ac_status); }; } &&
16154          { ac_try='test -s conftest$ac_exeext'
16155   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16156   (eval $ac_try) 2>&5
16157   ac_status=$?
16158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16159   (exit $ac_status); }; }; then
16160   ac_cv_lib_c_xmlParseChunk=yes
16161 else
16162   echo "$as_me: failed program was:" >&5
16163 sed 's/^/| /' conftest.$ac_ext >&5
16164
16165 ac_cv_lib_c_xmlParseChunk=no
16166 fi
16167 rm -f conftest.err conftest.$ac_objext \
16168       conftest$ac_exeext conftest.$ac_ext
16169 LIBS=$ac_check_lib_save_LIBS
16170 fi
16171 echo "$as_me:$LINENO: result: $ac_cv_lib_c_xmlParseChunk" >&5
16172 echo "${ECHO_T}$ac_cv_lib_c_xmlParseChunk" >&6
16173 if test $ac_cv_lib_c_xmlParseChunk = yes; then
16174   have_xml=yes
16175                     xml_halfassed=no
16176                     XML_LIBS="$ac_xml_config_libs"
16177                     cat >>confdefs.h <<\_ACEOF
16178 #define HAVE_XML 1
16179 _ACEOF
16180
16181 else
16182   true
16183 fi
16184
16185   CPPFLAGS="$ac_save_CPPFLAGS"
16186   LDFLAGS="$ac_save_LDFLAGS"
16187 #  LIBS="$ac_save_LIBS"
16188
16189   fi
16190
16191   if test "$have_xml" = yes; then
16192     INCLUDES="$INCLUDES $ac_xml_config_cflags"
16193     GTK_LIBS="$GTK_LIBS $ac_xml_config_libs"
16194     cat >>confdefs.h <<\_ACEOF
16195 #define HAVE_XML 1
16196 _ACEOF
16197
16198     if test "$have_old_xml" = yes; then
16199       cat >>confdefs.h <<\_ACEOF
16200 #define HAVE_OLD_XML_HEADERS 1
16201 _ACEOF
16202
16203     fi
16204   fi
16205
16206 fi
16207
16208
16209 ###############################################################################
16210 #
16211 #       Checking whether Motif is really Lesstif.
16212 #
16213 ###############################################################################
16214
16215 have_lesstif=no
16216 if test "$have_motif" = yes ; then
16217   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
16218 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
16219 if test "${ac_cv_have_lesstif+set}" = set; then
16220   echo $ECHO_N "(cached) $ECHO_C" >&6
16221 else
16222
16223   ac_save_CPPFLAGS="$CPPFLAGS"
16224   if test \! -z "$includedir" ; then
16225     CPPFLAGS="$CPPFLAGS -I$includedir"
16226   fi
16227   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16228   cat >conftest.$ac_ext <<_ACEOF
16229 /* confdefs.h.  */
16230 _ACEOF
16231 cat confdefs.h >>conftest.$ac_ext
16232 cat >>conftest.$ac_ext <<_ACEOF
16233 /* end confdefs.h.  */
16234 #include <Xm/Xm.h>
16235 int
16236 main ()
16237 {
16238 long vers = LesstifVersion;
16239   ;
16240   return 0;
16241 }
16242 _ACEOF
16243 rm -f conftest.$ac_objext
16244 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16245   (eval $ac_compile) 2>conftest.er1
16246   ac_status=$?
16247   grep -v '^ *+' conftest.er1 >conftest.err
16248   rm -f conftest.er1
16249   cat conftest.err >&5
16250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16251   (exit $ac_status); } &&
16252          { ac_try='test -z "$ac_c_werror_flag"
16253                          || test ! -s conftest.err'
16254   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16255   (eval $ac_try) 2>&5
16256   ac_status=$?
16257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16258   (exit $ac_status); }; } &&
16259          { ac_try='test -s conftest.$ac_objext'
16260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16261   (eval $ac_try) 2>&5
16262   ac_status=$?
16263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16264   (exit $ac_status); }; }; then
16265   ac_cv_have_lesstif=yes
16266 else
16267   echo "$as_me: failed program was:" >&5
16268 sed 's/^/| /' conftest.$ac_ext >&5
16269
16270 ac_cv_have_lesstif=no
16271 fi
16272 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16273   CPPFLAGS="$ac_save_CPPFLAGS"
16274 fi
16275 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
16276 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
16277   have_lesstif=$ac_cv_have_lesstif
16278 fi
16279
16280
16281 lesstif_version=unknown
16282 lesstif_version_string=unknown
16283
16284 if test "$have_lesstif" = yes ; then
16285   ltv=unknown
16286   echo unknown > conftest-lt
16287   echo "$as_me:$LINENO: checking LessTif version number" >&5
16288 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
16289 if test "${ac_cv_lesstif_version_string+set}" = set; then
16290   echo $ECHO_N "(cached) $ECHO_C" >&6
16291 else
16292
16293   ac_save_CPPFLAGS="$CPPFLAGS"
16294   if test \! -z "$includedir" ; then
16295     CPPFLAGS="$CPPFLAGS -I$includedir"
16296   fi
16297   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16298   if test "$cross_compiling" = yes; then
16299   ac_cv_lesstif_version=unknown
16300                      ac_cv_lesstif_version_string=unknown
16301 else
16302   cat >conftest.$ac_ext <<_ACEOF
16303 /* confdefs.h.  */
16304 _ACEOF
16305 cat confdefs.h >>conftest.$ac_ext
16306 cat >>conftest.$ac_ext <<_ACEOF
16307 /* end confdefs.h.  */
16308 #include <stdio.h>
16309                      #include <Xm/Xm.h>
16310                      int main() {
16311                        FILE *f = fopen("conftest-lt", "w");
16312                        if (!f) exit(1);
16313                        fprintf(f, "%d %d.%d\n", LesstifVersion,
16314                           LESSTIF_VERSION, LESSTIF_REVISION);
16315                        fclose(f);
16316                        exit(0);
16317                      }
16318 _ACEOF
16319 rm -f conftest$ac_exeext
16320 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16321   (eval $ac_link) 2>&5
16322   ac_status=$?
16323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16324   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16326   (eval $ac_try) 2>&5
16327   ac_status=$?
16328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16329   (exit $ac_status); }; }; then
16330   ltv=`cat conftest-lt`
16331                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
16332                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
16333 else
16334   echo "$as_me: program exited with status $ac_status" >&5
16335 echo "$as_me: failed program was:" >&5
16336 sed 's/^/| /' conftest.$ac_ext >&5
16337
16338 ( exit $ac_status )
16339 ac_cv_lesstif_version=unknown
16340                      ac_cv_lesstif_version_string=unknown
16341 fi
16342 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16343 fi
16344   CPPFLAGS="$ac_save_CPPFLAGS"
16345 fi
16346 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
16347 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
16348   rm -f conftest-lt
16349   lesstif_version=$ac_cv_lesstif_version
16350   lesstif_version_string=$ac_cv_lesstif_version_string
16351
16352 fi
16353
16354
16355 if test "$have_motif" = yes ; then
16356   mtv=unknown
16357   echo unknown > conftest-mt
16358   echo "$as_me:$LINENO: checking Motif version number" >&5
16359 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
16360 if test "${ac_cv_motif_version_string+set}" = set; then
16361   echo $ECHO_N "(cached) $ECHO_C" >&6
16362 else
16363
16364   ac_save_CPPFLAGS="$CPPFLAGS"
16365   if test \! -z "$includedir" ; then
16366     CPPFLAGS="$CPPFLAGS -I$includedir"
16367   fi
16368   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16369   if test "$cross_compiling" = yes; then
16370   ac_cv_motif_version=unknown
16371                      ac_cv_motif_version_string=unknown
16372 else
16373   cat >conftest.$ac_ext <<_ACEOF
16374 /* confdefs.h.  */
16375 _ACEOF
16376 cat confdefs.h >>conftest.$ac_ext
16377 cat >>conftest.$ac_ext <<_ACEOF
16378 /* end confdefs.h.  */
16379 #include <stdio.h>
16380                      #include <Xm/Xm.h>
16381                      int main() {
16382                        FILE *f = fopen("conftest-mt", "w");
16383                        if (!f) exit(1);
16384                        fprintf(f, "%d %d.%d\n", XmVersion,
16385                           XmVERSION, XmREVISION);
16386                        fclose(f);
16387                        exit(0);
16388                      }
16389 _ACEOF
16390 rm -f conftest$ac_exeext
16391 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16392   (eval $ac_link) 2>&5
16393   ac_status=$?
16394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16395   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16396   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16397   (eval $ac_try) 2>&5
16398   ac_status=$?
16399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16400   (exit $ac_status); }; }; then
16401   mtv=`cat conftest-mt`
16402                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
16403                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
16404 else
16405   echo "$as_me: program exited with status $ac_status" >&5
16406 echo "$as_me: failed program was:" >&5
16407 sed 's/^/| /' conftest.$ac_ext >&5
16408
16409 ( exit $ac_status )
16410 ac_cv_motif_version=unknown
16411                      ac_cv_motif_version_string=unknown
16412 fi
16413 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16414 fi
16415   CPPFLAGS="$ac_save_CPPFLAGS"
16416 fi
16417 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
16418 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
16419   rm -f conftest-mt
16420   motif_version=$ac_cv_motif_version
16421   motif_version_string=$ac_cv_motif_version_string
16422
16423 fi
16424
16425
16426 ###############################################################################
16427 #
16428 #       Checking whether Motif requires -lXpm.
16429 #
16430 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
16431 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
16432 #       of the library whether to build the XPM code into libXm, or whether
16433 #       to rely on an external libXm.  So the only way to tell whether XPM is
16434 #       a link-time requirement is to examine libXm.a, which is very
16435 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
16436 #       always link against XPM if the XPM lib exists (and this will be a
16437 #       no-op if libXm happens to already have the XPM code in it.)
16438 #
16439 ###############################################################################
16440
16441 motif_requires_xpm=no
16442 if test "$have_motif" = yes ; then
16443    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
16444 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
16445    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
16446    then
16447      motif_requires_xpm=yes
16448      echo "$as_me:$LINENO: result: maybe" >&5
16449 echo "${ECHO_T}maybe" >&6
16450    else
16451      echo "$as_me:$LINENO: result: no" >&5
16452 echo "${ECHO_T}no" >&6
16453    fi
16454 fi
16455
16456
16457 ###############################################################################
16458 #
16459 #       Checking whether Motif requires -lXp.
16460 #
16461 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
16462 #       Extension".   Why this extension isn't in -lXext with all the others,
16463 #       I have no idea.
16464 #
16465 ###############################################################################
16466
16467 have_xp_ext=no
16468 if test "$have_motif" = yes ; then
16469    have_xp_ext=no
16470
16471   ac_save_CPPFLAGS="$CPPFLAGS"
16472   ac_save_LDFLAGS="$LDFLAGS"
16473 #  ac_save_LIBS="$LIBS"
16474
16475   if test \! -z "$includedir" ; then
16476     CPPFLAGS="$CPPFLAGS -I$includedir"
16477   fi
16478   # note: $X_CFLAGS includes $x_includes
16479   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16480
16481   if test \! -z "$libdir" ; then
16482     LDFLAGS="$LDFLAGS -L$libdir"
16483   fi
16484   # note: $X_LIBS includes $x_libraries
16485   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16486
16487   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
16488 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
16489 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
16490   echo $ECHO_N "(cached) $ECHO_C" >&6
16491 else
16492   ac_check_lib_save_LIBS=$LIBS
16493 LIBS="-lXp -lX11 -lXext -lm $LIBS"
16494 cat >conftest.$ac_ext <<_ACEOF
16495 /* confdefs.h.  */
16496 _ACEOF
16497 cat confdefs.h >>conftest.$ac_ext
16498 cat >>conftest.$ac_ext <<_ACEOF
16499 /* end confdefs.h.  */
16500
16501 /* Override any gcc2 internal prototype to avoid an error.  */
16502 #ifdef __cplusplus
16503 extern "C"
16504 #endif
16505 /* We use char because int might match the return type of a gcc2
16506    builtin and then its argument prototype would still apply.  */
16507 char XpQueryExtension ();
16508 int
16509 main ()
16510 {
16511 XpQueryExtension ();
16512   ;
16513   return 0;
16514 }
16515 _ACEOF
16516 rm -f conftest.$ac_objext conftest$ac_exeext
16517 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16518   (eval $ac_link) 2>conftest.er1
16519   ac_status=$?
16520   grep -v '^ *+' conftest.er1 >conftest.err
16521   rm -f conftest.er1
16522   cat conftest.err >&5
16523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16524   (exit $ac_status); } &&
16525          { ac_try='test -z "$ac_c_werror_flag"
16526                          || test ! -s conftest.err'
16527   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16528   (eval $ac_try) 2>&5
16529   ac_status=$?
16530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16531   (exit $ac_status); }; } &&
16532          { ac_try='test -s conftest$ac_exeext'
16533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16534   (eval $ac_try) 2>&5
16535   ac_status=$?
16536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16537   (exit $ac_status); }; }; then
16538   ac_cv_lib_Xp_XpQueryExtension=yes
16539 else
16540   echo "$as_me: failed program was:" >&5
16541 sed 's/^/| /' conftest.$ac_ext >&5
16542
16543 ac_cv_lib_Xp_XpQueryExtension=no
16544 fi
16545 rm -f conftest.err conftest.$ac_objext \
16546       conftest$ac_exeext conftest.$ac_ext
16547 LIBS=$ac_check_lib_save_LIBS
16548 fi
16549 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
16550 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
16551 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
16552   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
16553 else
16554   true
16555 fi
16556
16557   CPPFLAGS="$ac_save_CPPFLAGS"
16558   LDFLAGS="$ac_save_LDFLAGS"
16559 #  LIBS="$ac_save_LIBS"
16560
16561 fi
16562
16563
16564 ###############################################################################
16565 #
16566 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
16567 #
16568 ###############################################################################
16569
16570 have_xintl=no
16571 if test "$have_motif" = yes ; then
16572
16573   ac_save_CPPFLAGS="$CPPFLAGS"
16574   ac_save_LDFLAGS="$LDFLAGS"
16575 #  ac_save_LIBS="$LIBS"
16576
16577   if test \! -z "$includedir" ; then
16578     CPPFLAGS="$CPPFLAGS -I$includedir"
16579   fi
16580   # note: $X_CFLAGS includes $x_includes
16581   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16582
16583   if test \! -z "$libdir" ; then
16584     LDFLAGS="$LDFLAGS -L$libdir"
16585   fi
16586   # note: $X_LIBS includes $x_libraries
16587   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16588
16589   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
16590 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
16591 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
16592   echo $ECHO_N "(cached) $ECHO_C" >&6
16593 else
16594   ac_check_lib_save_LIBS=$LIBS
16595 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
16596 cat >conftest.$ac_ext <<_ACEOF
16597 /* confdefs.h.  */
16598 _ACEOF
16599 cat confdefs.h >>conftest.$ac_ext
16600 cat >>conftest.$ac_ext <<_ACEOF
16601 /* end confdefs.h.  */
16602
16603 /* Override any gcc2 internal prototype to avoid an error.  */
16604 #ifdef __cplusplus
16605 extern "C"
16606 #endif
16607 /* We use char because int might match the return type of a gcc2
16608    builtin and then its argument prototype would still apply.  */
16609 char _Xsetlocale ();
16610 int
16611 main ()
16612 {
16613 _Xsetlocale ();
16614   ;
16615   return 0;
16616 }
16617 _ACEOF
16618 rm -f conftest.$ac_objext conftest$ac_exeext
16619 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16620   (eval $ac_link) 2>conftest.er1
16621   ac_status=$?
16622   grep -v '^ *+' conftest.er1 >conftest.err
16623   rm -f conftest.er1
16624   cat conftest.err >&5
16625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16626   (exit $ac_status); } &&
16627          { ac_try='test -z "$ac_c_werror_flag"
16628                          || test ! -s conftest.err'
16629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16630   (eval $ac_try) 2>&5
16631   ac_status=$?
16632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16633   (exit $ac_status); }; } &&
16634          { ac_try='test -s conftest$ac_exeext'
16635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16636   (eval $ac_try) 2>&5
16637   ac_status=$?
16638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16639   (exit $ac_status); }; }; then
16640   ac_cv_lib_Xintl__Xsetlocale=yes
16641 else
16642   echo "$as_me: failed program was:" >&5
16643 sed 's/^/| /' conftest.$ac_ext >&5
16644
16645 ac_cv_lib_Xintl__Xsetlocale=no
16646 fi
16647 rm -f conftest.err conftest.$ac_objext \
16648       conftest$ac_exeext conftest.$ac_ext
16649 LIBS=$ac_check_lib_save_LIBS
16650 fi
16651 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
16652 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
16653 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
16654   have_xintl=yes
16655 else
16656   have_xintl=no
16657 fi
16658
16659   CPPFLAGS="$ac_save_CPPFLAGS"
16660   LDFLAGS="$ac_save_LDFLAGS"
16661 #  LIBS="$ac_save_LIBS"
16662
16663   if test "$have_xintl" = yes; then
16664     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
16665   fi
16666 fi
16667
16668
16669 ###############################################################################
16670 #
16671 #       Check for -lGL or -lMesaGL.
16672 #
16673 ###############################################################################
16674
16675 have_gl=no
16676 ac_have_mesa_gl=no
16677 with_gl_req=unspecified
16678 gl_halfassed=no
16679
16680 # Check whether --with-gl or --without-gl was given.
16681 if test "${with_gl+set}" = set; then
16682   withval="$with_gl"
16683   with_gl="$withval"; with_gl_req="$withval"
16684 else
16685   with_gl=yes
16686 fi;
16687
16688
16689    case "$with_gl" in
16690     yes) ;;
16691     no)  ;;
16692
16693     /*)
16694      echo "$as_me:$LINENO: checking for GL headers" >&5
16695 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
16696      d=$with_gl/include
16697      if test -d $d; then
16698        X_CFLAGS="-I$d $X_CFLAGS"
16699        echo "$as_me:$LINENO: result: $d" >&5
16700 echo "${ECHO_T}$d" >&6
16701      else
16702        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16703 echo "${ECHO_T}not found ($d: no such directory)" >&6
16704      fi
16705
16706      echo "$as_me:$LINENO: checking for GL libs" >&5
16707 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
16708      d=$with_gl/lib
16709      if test -d $d; then
16710        X_LIBS="-L$d $X_LIBS"
16711        echo "$as_me:$LINENO: result: $d" >&5
16712 echo "${ECHO_T}$d" >&6
16713      else
16714        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16715 echo "${ECHO_T}not found ($d: no such directory)" >&6
16716      fi
16717
16718      # replace the directory string with "yes".
16719      with_gl_req="yes"
16720      with_gl=$with_gl_req
16721      ;;
16722
16723     *)
16724      echo ""
16725      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
16726      echo "       If it is a directory, then \`DIR/include' will be added to"
16727      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16728      exit 1
16729      ;;
16730    esac
16731
16732
16733 ac_mesagl_version=unknown
16734 ac_mesagl_version_string=unknown
16735
16736 if test "$with_gl" = yes; then
16737
16738   ac_save_CPPFLAGS="$CPPFLAGS"
16739   if test \! -z "$includedir" ; then
16740     CPPFLAGS="$CPPFLAGS -I$includedir"
16741   fi
16742   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16743   if test "${ac_cv_header_GL_gl_h+set}" = set; then
16744   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16745 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
16746 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16747   echo $ECHO_N "(cached) $ECHO_C" >&6
16748 fi
16749 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16750 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
16751 else
16752   # Is the header compilable?
16753 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
16754 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
16755 cat >conftest.$ac_ext <<_ACEOF
16756 /* confdefs.h.  */
16757 _ACEOF
16758 cat confdefs.h >>conftest.$ac_ext
16759 cat >>conftest.$ac_ext <<_ACEOF
16760 /* end confdefs.h.  */
16761 $ac_includes_default
16762 #include <GL/gl.h>
16763 _ACEOF
16764 rm -f conftest.$ac_objext
16765 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16766   (eval $ac_compile) 2>conftest.er1
16767   ac_status=$?
16768   grep -v '^ *+' conftest.er1 >conftest.err
16769   rm -f conftest.er1
16770   cat conftest.err >&5
16771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16772   (exit $ac_status); } &&
16773          { ac_try='test -z "$ac_c_werror_flag"
16774                          || test ! -s conftest.err'
16775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16776   (eval $ac_try) 2>&5
16777   ac_status=$?
16778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16779   (exit $ac_status); }; } &&
16780          { ac_try='test -s conftest.$ac_objext'
16781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16782   (eval $ac_try) 2>&5
16783   ac_status=$?
16784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16785   (exit $ac_status); }; }; then
16786   ac_header_compiler=yes
16787 else
16788   echo "$as_me: failed program was:" >&5
16789 sed 's/^/| /' conftest.$ac_ext >&5
16790
16791 ac_header_compiler=no
16792 fi
16793 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16794 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16795 echo "${ECHO_T}$ac_header_compiler" >&6
16796
16797 # Is the header present?
16798 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
16799 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
16800 cat >conftest.$ac_ext <<_ACEOF
16801 /* confdefs.h.  */
16802 _ACEOF
16803 cat confdefs.h >>conftest.$ac_ext
16804 cat >>conftest.$ac_ext <<_ACEOF
16805 /* end confdefs.h.  */
16806 #include <GL/gl.h>
16807 _ACEOF
16808 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16809   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16810   ac_status=$?
16811   grep -v '^ *+' conftest.er1 >conftest.err
16812   rm -f conftest.er1
16813   cat conftest.err >&5
16814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16815   (exit $ac_status); } >/dev/null; then
16816   if test -s conftest.err; then
16817     ac_cpp_err=$ac_c_preproc_warn_flag
16818     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16819   else
16820     ac_cpp_err=
16821   fi
16822 else
16823   ac_cpp_err=yes
16824 fi
16825 if test -z "$ac_cpp_err"; then
16826   ac_header_preproc=yes
16827 else
16828   echo "$as_me: failed program was:" >&5
16829 sed 's/^/| /' conftest.$ac_ext >&5
16830
16831   ac_header_preproc=no
16832 fi
16833 rm -f conftest.err conftest.$ac_ext
16834 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16835 echo "${ECHO_T}$ac_header_preproc" >&6
16836
16837 # So?  What about this header?
16838 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16839   yes:no: )
16840     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
16841 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16842     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
16843 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
16844     ac_header_preproc=yes
16845     ;;
16846   no:yes:* )
16847     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
16848 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
16849     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
16850 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
16851     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
16852 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
16853     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
16854 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16855     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
16856 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
16857     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
16858 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
16859     (
16860       cat <<\_ASBOX
16861 ## ------------------------------------------ ##
16862 ## Report this to the AC_PACKAGE_NAME lists.  ##
16863 ## ------------------------------------------ ##
16864 _ASBOX
16865     ) |
16866       sed "s/^/$as_me: WARNING:     /" >&2
16867     ;;
16868 esac
16869 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
16870 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
16871 if test "${ac_cv_header_GL_gl_h+set}" = set; then
16872   echo $ECHO_N "(cached) $ECHO_C" >&6
16873 else
16874   ac_cv_header_GL_gl_h=$ac_header_preproc
16875 fi
16876 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
16877 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
16878
16879 fi
16880 if test $ac_cv_header_GL_gl_h = yes; then
16881   have_gl=yes
16882 else
16883   have_gl=no
16884 fi
16885
16886
16887   CPPFLAGS="$ac_save_CPPFLAGS"
16888   if test "$have_gl" = yes ; then
16889
16890   ac_save_CPPFLAGS="$CPPFLAGS"
16891   if test \! -z "$includedir" ; then
16892     CPPFLAGS="$CPPFLAGS -I$includedir"
16893   fi
16894   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16895   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
16896 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
16897 if test "${ac_cv_header_GL_glx_h+set}" = set; then
16898   echo $ECHO_N "(cached) $ECHO_C" >&6
16899 else
16900   cat >conftest.$ac_ext <<_ACEOF
16901 /* confdefs.h.  */
16902 _ACEOF
16903 cat confdefs.h >>conftest.$ac_ext
16904 cat >>conftest.$ac_ext <<_ACEOF
16905 /* end confdefs.h.  */
16906 #include <GL/gl.h>
16907
16908 #include <GL/glx.h>
16909 _ACEOF
16910 rm -f conftest.$ac_objext
16911 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16912   (eval $ac_compile) 2>conftest.er1
16913   ac_status=$?
16914   grep -v '^ *+' conftest.er1 >conftest.err
16915   rm -f conftest.er1
16916   cat conftest.err >&5
16917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16918   (exit $ac_status); } &&
16919          { ac_try='test -z "$ac_c_werror_flag"
16920                          || test ! -s conftest.err'
16921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16922   (eval $ac_try) 2>&5
16923   ac_status=$?
16924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16925   (exit $ac_status); }; } &&
16926          { ac_try='test -s conftest.$ac_objext'
16927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16928   (eval $ac_try) 2>&5
16929   ac_status=$?
16930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16931   (exit $ac_status); }; }; then
16932   ac_cv_header_GL_glx_h=yes
16933 else
16934   echo "$as_me: failed program was:" >&5
16935 sed 's/^/| /' conftest.$ac_ext >&5
16936
16937 ac_cv_header_GL_glx_h=no
16938 fi
16939 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16940 fi
16941 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
16942 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
16943 if test $ac_cv_header_GL_glx_h = yes; then
16944   have_gl=yes
16945 else
16946   have_gl=no
16947 fi
16948
16949
16950   CPPFLAGS="$ac_save_CPPFLAGS"
16951   fi
16952
16953   # If we have the headers, try and figure out which vendor it's from.
16954   #
16955   if test "$have_gl" = yes ; then
16956
16957     # We need to know whether it's MesaGL so that we know which libraries
16958     # to link against.
16959     #
16960     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
16961 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
16962 if test "${ac_cv_have_mesa_gl+set}" = set; then
16963   echo $ECHO_N "(cached) $ECHO_C" >&6
16964 else
16965   ac_cv_have_mesa_gl=no
16966
16967   ac_save_CPPFLAGS="$CPPFLAGS"
16968   if test \! -z "$includedir" ; then
16969     CPPFLAGS="$CPPFLAGS -I$includedir"
16970   fi
16971   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16972   cat >conftest.$ac_ext <<_ACEOF
16973 /* confdefs.h.  */
16974 _ACEOF
16975 cat confdefs.h >>conftest.$ac_ext
16976 cat >>conftest.$ac_ext <<_ACEOF
16977 /* end confdefs.h.  */
16978 #include <GL/glx.h>
16979
16980 _ACEOF
16981 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16982   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
16983   ac_cv_have_mesa_gl=yes
16984 fi
16985 rm -f conftest*
16986
16987   CPPFLAGS="$ac_save_CPPFLAGS"
16988
16989 fi
16990 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
16991 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
16992     ac_have_mesa_gl=$ac_cv_have_mesa_gl
16993
16994
16995     gl_lib_1=""
16996     GL_LIBS=""
16997
16998
16999     # Some versions of MesaGL are compiled to require -lpthread.
17000     # So if the Mesa headers exist, and -lpthread exists, then always
17001     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
17002     #
17003     if test "$ac_have_mesa_gl" = yes; then
17004       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
17005 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
17006 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
17007   echo $ECHO_N "(cached) $ECHO_C" >&6
17008 else
17009   ac_check_lib_save_LIBS=$LIBS
17010 LIBS="-lpthread  $LIBS"
17011 cat >conftest.$ac_ext <<_ACEOF
17012 /* confdefs.h.  */
17013 _ACEOF
17014 cat confdefs.h >>conftest.$ac_ext
17015 cat >>conftest.$ac_ext <<_ACEOF
17016 /* end confdefs.h.  */
17017
17018 /* Override any gcc2 internal prototype to avoid an error.  */
17019 #ifdef __cplusplus
17020 extern "C"
17021 #endif
17022 /* We use char because int might match the return type of a gcc2
17023    builtin and then its argument prototype would still apply.  */
17024 char pthread_create ();
17025 int
17026 main ()
17027 {
17028 pthread_create ();
17029   ;
17030   return 0;
17031 }
17032 _ACEOF
17033 rm -f conftest.$ac_objext conftest$ac_exeext
17034 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17035   (eval $ac_link) 2>conftest.er1
17036   ac_status=$?
17037   grep -v '^ *+' conftest.er1 >conftest.err
17038   rm -f conftest.er1
17039   cat conftest.err >&5
17040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17041   (exit $ac_status); } &&
17042          { ac_try='test -z "$ac_c_werror_flag"
17043                          || test ! -s conftest.err'
17044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17045   (eval $ac_try) 2>&5
17046   ac_status=$?
17047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17048   (exit $ac_status); }; } &&
17049          { ac_try='test -s conftest$ac_exeext'
17050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17051   (eval $ac_try) 2>&5
17052   ac_status=$?
17053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17054   (exit $ac_status); }; }; then
17055   ac_cv_lib_pthread_pthread_create=yes
17056 else
17057   echo "$as_me: failed program was:" >&5
17058 sed 's/^/| /' conftest.$ac_ext >&5
17059
17060 ac_cv_lib_pthread_pthread_create=no
17061 fi
17062 rm -f conftest.err conftest.$ac_objext \
17063       conftest$ac_exeext conftest.$ac_ext
17064 LIBS=$ac_check_lib_save_LIBS
17065 fi
17066 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
17067 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
17068 if test $ac_cv_lib_pthread_pthread_create = yes; then
17069   GL_LIBS="-lpthread"
17070 fi
17071
17072     fi
17073
17074
17075     # If we have Mesa headers, check to see if we can link against -lMesaGL.
17076     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
17077     # Else, warn that GL is busted.  (We have the headers, but no libs.)
17078     #
17079
17080     if test "$ac_have_mesa_gl" = yes ; then
17081
17082   ac_save_CPPFLAGS="$CPPFLAGS"
17083   ac_save_LDFLAGS="$LDFLAGS"
17084 #  ac_save_LIBS="$LIBS"
17085
17086   if test \! -z "$includedir" ; then
17087     CPPFLAGS="$CPPFLAGS -I$includedir"
17088   fi
17089   # note: $X_CFLAGS includes $x_includes
17090   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17091
17092   if test \! -z "$libdir" ; then
17093     LDFLAGS="$LDFLAGS -L$libdir"
17094   fi
17095   # note: $X_LIBS includes $x_libraries
17096   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17097
17098   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
17099 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
17100 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
17101   echo $ECHO_N "(cached) $ECHO_C" >&6
17102 else
17103   ac_check_lib_save_LIBS=$LIBS
17104 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
17105 cat >conftest.$ac_ext <<_ACEOF
17106 /* confdefs.h.  */
17107 _ACEOF
17108 cat confdefs.h >>conftest.$ac_ext
17109 cat >>conftest.$ac_ext <<_ACEOF
17110 /* end confdefs.h.  */
17111
17112 /* Override any gcc2 internal prototype to avoid an error.  */
17113 #ifdef __cplusplus
17114 extern "C"
17115 #endif
17116 /* We use char because int might match the return type of a gcc2
17117    builtin and then its argument prototype would still apply.  */
17118 char glXCreateContext ();
17119 int
17120 main ()
17121 {
17122 glXCreateContext ();
17123   ;
17124   return 0;
17125 }
17126 _ACEOF
17127 rm -f conftest.$ac_objext conftest$ac_exeext
17128 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17129   (eval $ac_link) 2>conftest.er1
17130   ac_status=$?
17131   grep -v '^ *+' conftest.er1 >conftest.err
17132   rm -f conftest.er1
17133   cat conftest.err >&5
17134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17135   (exit $ac_status); } &&
17136          { ac_try='test -z "$ac_c_werror_flag"
17137                          || test ! -s conftest.err'
17138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17139   (eval $ac_try) 2>&5
17140   ac_status=$?
17141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17142   (exit $ac_status); }; } &&
17143          { ac_try='test -s conftest$ac_exeext'
17144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17145   (eval $ac_try) 2>&5
17146   ac_status=$?
17147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17148   (exit $ac_status); }; }; then
17149   ac_cv_lib_MesaGL_glXCreateContext=yes
17150 else
17151   echo "$as_me: failed program was:" >&5
17152 sed 's/^/| /' conftest.$ac_ext >&5
17153
17154 ac_cv_lib_MesaGL_glXCreateContext=no
17155 fi
17156 rm -f conftest.err conftest.$ac_objext \
17157       conftest$ac_exeext conftest.$ac_ext
17158 LIBS=$ac_check_lib_save_LIBS
17159 fi
17160 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
17161 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
17162 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
17163   gl_lib_1="MesaGL"
17164                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
17165 fi
17166
17167   CPPFLAGS="$ac_save_CPPFLAGS"
17168   LDFLAGS="$ac_save_LDFLAGS"
17169 #  LIBS="$ac_save_LIBS"
17170
17171     fi
17172
17173     if test "$gl_lib_1" = "" ; then
17174
17175   ac_save_CPPFLAGS="$CPPFLAGS"
17176   ac_save_LDFLAGS="$LDFLAGS"
17177 #  ac_save_LIBS="$LIBS"
17178
17179   if test \! -z "$includedir" ; then
17180     CPPFLAGS="$CPPFLAGS -I$includedir"
17181   fi
17182   # note: $X_CFLAGS includes $x_includes
17183   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17184
17185   if test \! -z "$libdir" ; then
17186     LDFLAGS="$LDFLAGS -L$libdir"
17187   fi
17188   # note: $X_LIBS includes $x_libraries
17189   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17190
17191   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
17192 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
17193 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
17194   echo $ECHO_N "(cached) $ECHO_C" >&6
17195 else
17196   ac_check_lib_save_LIBS=$LIBS
17197 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
17198 cat >conftest.$ac_ext <<_ACEOF
17199 /* confdefs.h.  */
17200 _ACEOF
17201 cat confdefs.h >>conftest.$ac_ext
17202 cat >>conftest.$ac_ext <<_ACEOF
17203 /* end confdefs.h.  */
17204
17205 /* Override any gcc2 internal prototype to avoid an error.  */
17206 #ifdef __cplusplus
17207 extern "C"
17208 #endif
17209 /* We use char because int might match the return type of a gcc2
17210    builtin and then its argument prototype would still apply.  */
17211 char glXCreateContext ();
17212 int
17213 main ()
17214 {
17215 glXCreateContext ();
17216   ;
17217   return 0;
17218 }
17219 _ACEOF
17220 rm -f conftest.$ac_objext conftest$ac_exeext
17221 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17222   (eval $ac_link) 2>conftest.er1
17223   ac_status=$?
17224   grep -v '^ *+' conftest.er1 >conftest.err
17225   rm -f conftest.er1
17226   cat conftest.err >&5
17227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17228   (exit $ac_status); } &&
17229          { ac_try='test -z "$ac_c_werror_flag"
17230                          || test ! -s conftest.err'
17231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17232   (eval $ac_try) 2>&5
17233   ac_status=$?
17234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17235   (exit $ac_status); }; } &&
17236          { ac_try='test -s conftest$ac_exeext'
17237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17238   (eval $ac_try) 2>&5
17239   ac_status=$?
17240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17241   (exit $ac_status); }; }; then
17242   ac_cv_lib_GL_glXCreateContext=yes
17243 else
17244   echo "$as_me: failed program was:" >&5
17245 sed 's/^/| /' conftest.$ac_ext >&5
17246
17247 ac_cv_lib_GL_glXCreateContext=no
17248 fi
17249 rm -f conftest.err conftest.$ac_objext \
17250       conftest$ac_exeext conftest.$ac_ext
17251 LIBS=$ac_check_lib_save_LIBS
17252 fi
17253 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
17254 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
17255 if test $ac_cv_lib_GL_glXCreateContext = yes; then
17256   gl_lib_1="GL"
17257                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
17258 fi
17259
17260   CPPFLAGS="$ac_save_CPPFLAGS"
17261   LDFLAGS="$ac_save_LDFLAGS"
17262 #  LIBS="$ac_save_LIBS"
17263
17264     fi
17265
17266     if test "$gl_lib_1" = "" ; then
17267       # we have headers, but no libs -- bail.
17268       have_gl=no
17269       ac_have_mesa_gl=no
17270       gl_halfassed=yes
17271     else
17272       # linking works -- we can build the GL hacks.
17273       cat >>confdefs.h <<\_ACEOF
17274 #define HAVE_GL 1
17275 _ACEOF
17276
17277       if test "$ac_have_mesa_gl" = yes ; then
17278         cat >>confdefs.h <<\_ACEOF
17279 #define HAVE_MESA_GL 1
17280 _ACEOF
17281
17282       fi
17283     fi
17284   fi
17285
17286
17287   # Now that we know we have GL headers and libs, do some more GL testing.
17288   #
17289
17290   if test "$have_gl" = yes ; then
17291     # If it's MesaGL, we'd like to issue a warning if the version number
17292     # is less than or equal to 2.6, because that version had a security bug.
17293     #
17294     if test "$ac_have_mesa_gl" = yes; then
17295
17296       echo "$as_me:$LINENO: checking MesaGL version number" >&5
17297 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
17298 if test "${ac_cv_mesagl_version_string+set}" = set; then
17299   echo $ECHO_N "(cached) $ECHO_C" >&6
17300 else
17301   cat > conftest.$ac_ext <<EOF
17302 #line 17308 "configure"
17303 #include "confdefs.h"
17304 #include <GL/gl.h>
17305 #ifndef MESA_MAJOR_VERSION
17306 # include <GL/xmesa.h>
17307 # ifdef XMESA_MAJOR_VERSION
17308    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
17309       we have to check the XMesa version number (the number of the X protocol
17310       support, which seems to be the same as the Mesa version number.)
17311     */
17312 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
17313 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
17314 # else
17315    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
17316       so we have no way of telling what version of Mesa this is at all.
17317       So, we'll guess that the osmesa version (the "offscreen protocol")
17318       is less than or equal to the real mesa version number.  Except that
17319       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
17320       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
17321     */
17322 # include <GL/osmesa.h>
17323 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
17324 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
17325 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
17326 #   undef MESA_MINOR_VERSION
17327 #   define MESA_MINOR_VERSION 4 or newer, probably?
17328 #  endif
17329 # endif
17330 #endif
17331 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
17332 EOF
17333
17334          ac_save_CPPFLAGS="$CPPFLAGS"
17335          if test \! -z "$includedir" ; then
17336            CPPFLAGS="$CPPFLAGS -I$includedir"
17337          fi
17338          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17339
17340          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
17341
17342          # M4 sucks!!
17343
17344           mglv=`echo "$mglv" | sed -n \
17345              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
17346
17347
17348          rm -f conftest.$ac_ext
17349
17350          CPPFLAGS="$ac_save_CPPFLAGS"
17351
17352          if test "$mglv" = ""; then
17353            ac_mesagl_version=unknown
17354            ac_mesagl_version_string=unknown
17355          else
17356            ac_mesagl_version_string="$mglv"
17357            # M4 sucks!!
17358
17359            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
17360            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
17361
17362            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
17363            if test -z "$ac_mesagl_version"; then
17364              ac_mesagl_version=unknown
17365              ac_mesagl_version_string=unknown
17366            fi
17367          fi
17368          ac_cv_mesagl_version=$ac_mesagl_version
17369          ac_cv_mesagl_version_string=$ac_mesagl_version_string
17370
17371 fi
17372 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
17373 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
17374       ac_mesagl_version=$ac_cv_mesagl_version
17375       ac_mesagl_version_string=$ac_cv_mesagl_version_string
17376     fi
17377
17378
17379     # Check for OpenGL 1.1 features.
17380     #
17381
17382   ac_save_CPPFLAGS="$CPPFLAGS"
17383   ac_save_LDFLAGS="$LDFLAGS"
17384 #  ac_save_LIBS="$LIBS"
17385
17386   if test \! -z "$includedir" ; then
17387     CPPFLAGS="$CPPFLAGS -I$includedir"
17388   fi
17389   # note: $X_CFLAGS includes $x_includes
17390   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17391
17392   if test \! -z "$libdir" ; then
17393     LDFLAGS="$LDFLAGS -L$libdir"
17394   fi
17395   # note: $X_LIBS includes $x_libraries
17396   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17397
17398   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
17399 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
17400 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
17401 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17402   echo $ECHO_N "(cached) $ECHO_C" >&6
17403 else
17404   ac_check_lib_save_LIBS=$LIBS
17405 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
17406 cat >conftest.$ac_ext <<_ACEOF
17407 /* confdefs.h.  */
17408 _ACEOF
17409 cat confdefs.h >>conftest.$ac_ext
17410 cat >>conftest.$ac_ext <<_ACEOF
17411 /* end confdefs.h.  */
17412
17413 /* Override any gcc2 internal prototype to avoid an error.  */
17414 #ifdef __cplusplus
17415 extern "C"
17416 #endif
17417 /* We use char because int might match the return type of a gcc2
17418    builtin and then its argument prototype would still apply.  */
17419 char glBindTexture ();
17420 int
17421 main ()
17422 {
17423 glBindTexture ();
17424   ;
17425   return 0;
17426 }
17427 _ACEOF
17428 rm -f conftest.$ac_objext conftest$ac_exeext
17429 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17430   (eval $ac_link) 2>conftest.er1
17431   ac_status=$?
17432   grep -v '^ *+' conftest.er1 >conftest.err
17433   rm -f conftest.er1
17434   cat conftest.err >&5
17435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17436   (exit $ac_status); } &&
17437          { ac_try='test -z "$ac_c_werror_flag"
17438                          || test ! -s conftest.err'
17439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17440   (eval $ac_try) 2>&5
17441   ac_status=$?
17442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17443   (exit $ac_status); }; } &&
17444          { ac_try='test -s conftest$ac_exeext'
17445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17446   (eval $ac_try) 2>&5
17447   ac_status=$?
17448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17449   (exit $ac_status); }; }; then
17450   eval "$as_ac_Lib=yes"
17451 else
17452   echo "$as_me: failed program was:" >&5
17453 sed 's/^/| /' conftest.$ac_ext >&5
17454
17455 eval "$as_ac_Lib=no"
17456 fi
17457 rm -f conftest.err conftest.$ac_objext \
17458       conftest$ac_exeext conftest.$ac_ext
17459 LIBS=$ac_check_lib_save_LIBS
17460 fi
17461 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17462 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17463 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17464   cat >>confdefs.h <<\_ACEOF
17465 #define HAVE_GLBINDTEXTURE 1
17466 _ACEOF
17467
17468 else
17469   true
17470 fi
17471
17472   CPPFLAGS="$ac_save_CPPFLAGS"
17473   LDFLAGS="$ac_save_LDFLAGS"
17474 #  LIBS="$ac_save_LIBS"
17475
17476   fi
17477
17478 elif test "$with_gl" != no; then
17479   echo "error: must be yes or no: --with-gl=$with_gl"
17480   exit 1
17481 fi
17482
17483
17484 ###############################################################################
17485 #
17486 #       Check for -lgle.
17487 #
17488 ###############################################################################
17489
17490 have_gle=no
17491 with_gle_req=unspecified
17492 gle_halfassed=no
17493
17494 # Check whether --with-gle or --without-gle was given.
17495 if test "${with_gle+set}" = set; then
17496   withval="$with_gle"
17497   with_gle="$withval"; with_gle_req="$withval"
17498 else
17499   with_gle=yes
17500 fi;
17501
17502
17503    case "$with_gle" in
17504     yes) ;;
17505     no)  ;;
17506
17507     /*)
17508      echo "$as_me:$LINENO: checking for GLE headers" >&5
17509 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
17510      d=$with_gle/include
17511      if test -d $d; then
17512        X_CFLAGS="-I$d $X_CFLAGS"
17513        echo "$as_me:$LINENO: result: $d" >&5
17514 echo "${ECHO_T}$d" >&6
17515      else
17516        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17517 echo "${ECHO_T}not found ($d: no such directory)" >&6
17518      fi
17519
17520      echo "$as_me:$LINENO: checking for GLE libs" >&5
17521 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
17522      d=$with_gle/lib
17523      if test -d $d; then
17524        X_LIBS="-L$d $X_LIBS"
17525        echo "$as_me:$LINENO: result: $d" >&5
17526 echo "${ECHO_T}$d" >&6
17527      else
17528        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17529 echo "${ECHO_T}not found ($d: no such directory)" >&6
17530      fi
17531
17532      # replace the directory string with "yes".
17533      with_gle_req="yes"
17534      with_gle=$with_gle_req
17535      ;;
17536
17537     *)
17538      echo ""
17539      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
17540      echo "       If it is a directory, then \`DIR/include' will be added to"
17541      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17542      exit 1
17543      ;;
17544    esac
17545
17546
17547 GLE_LIBS=""
17548
17549 if test "$have_gl" = no ; then
17550  true
17551 elif test "$with_gle" = yes; then
17552
17553
17554   ac_save_CPPFLAGS="$CPPFLAGS"
17555   if test \! -z "$includedir" ; then
17556     CPPFLAGS="$CPPFLAGS -I$includedir"
17557   fi
17558   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17559   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
17560 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
17561 if test "${ac_cv_header_GL_gle_h+set}" = set; then
17562   echo $ECHO_N "(cached) $ECHO_C" >&6
17563 else
17564   cat >conftest.$ac_ext <<_ACEOF
17565 /* confdefs.h.  */
17566 _ACEOF
17567 cat confdefs.h >>conftest.$ac_ext
17568 cat >>conftest.$ac_ext <<_ACEOF
17569 /* end confdefs.h.  */
17570 #include <GL/gl.h>
17571
17572 #include <GL/gle.h>
17573 _ACEOF
17574 rm -f conftest.$ac_objext
17575 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17576   (eval $ac_compile) 2>conftest.er1
17577   ac_status=$?
17578   grep -v '^ *+' conftest.er1 >conftest.err
17579   rm -f conftest.er1
17580   cat conftest.err >&5
17581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17582   (exit $ac_status); } &&
17583          { ac_try='test -z "$ac_c_werror_flag"
17584                          || test ! -s conftest.err'
17585   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17586   (eval $ac_try) 2>&5
17587   ac_status=$?
17588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17589   (exit $ac_status); }; } &&
17590          { ac_try='test -s conftest.$ac_objext'
17591   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17592   (eval $ac_try) 2>&5
17593   ac_status=$?
17594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17595   (exit $ac_status); }; }; then
17596   ac_cv_header_GL_gle_h=yes
17597 else
17598   echo "$as_me: failed program was:" >&5
17599 sed 's/^/| /' conftest.$ac_ext >&5
17600
17601 ac_cv_header_GL_gle_h=no
17602 fi
17603 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17604 fi
17605 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
17606 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
17607 if test $ac_cv_header_GL_gle_h = yes; then
17608   have_gle3=yes
17609 else
17610   have_gle3=no
17611 fi
17612
17613
17614   CPPFLAGS="$ac_save_CPPFLAGS"
17615   if test "$have_gle3" = yes ; then
17616     have_gle=yes;
17617   else
17618
17619   ac_save_CPPFLAGS="$CPPFLAGS"
17620   if test \! -z "$includedir" ; then
17621     CPPFLAGS="$CPPFLAGS -I$includedir"
17622   fi
17623   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17624   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
17625 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
17626 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
17627   echo $ECHO_N "(cached) $ECHO_C" >&6
17628 else
17629   cat >conftest.$ac_ext <<_ACEOF
17630 /* confdefs.h.  */
17631 _ACEOF
17632 cat confdefs.h >>conftest.$ac_ext
17633 cat >>conftest.$ac_ext <<_ACEOF
17634 /* end confdefs.h.  */
17635 #include <GL/gl.h>
17636
17637 #include <GL/gutil.h>
17638 _ACEOF
17639 rm -f conftest.$ac_objext
17640 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17641   (eval $ac_compile) 2>conftest.er1
17642   ac_status=$?
17643   grep -v '^ *+' conftest.er1 >conftest.err
17644   rm -f conftest.er1
17645   cat conftest.err >&5
17646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17647   (exit $ac_status); } &&
17648          { ac_try='test -z "$ac_c_werror_flag"
17649                          || test ! -s conftest.err'
17650   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17651   (eval $ac_try) 2>&5
17652   ac_status=$?
17653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17654   (exit $ac_status); }; } &&
17655          { ac_try='test -s conftest.$ac_objext'
17656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17657   (eval $ac_try) 2>&5
17658   ac_status=$?
17659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17660   (exit $ac_status); }; }; then
17661   ac_cv_header_GL_gutil_h=yes
17662 else
17663   echo "$as_me: failed program was:" >&5
17664 sed 's/^/| /' conftest.$ac_ext >&5
17665
17666 ac_cv_header_GL_gutil_h=no
17667 fi
17668 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17669 fi
17670 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
17671 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
17672 if test $ac_cv_header_GL_gutil_h = yes; then
17673   have_gle=yes
17674 else
17675   have_gle=no
17676 fi
17677
17678
17679   CPPFLAGS="$ac_save_CPPFLAGS"
17680     if test "$have_gle" = yes ; then
17681
17682   ac_save_CPPFLAGS="$CPPFLAGS"
17683   if test \! -z "$includedir" ; then
17684     CPPFLAGS="$CPPFLAGS -I$includedir"
17685   fi
17686   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17687   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
17688 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
17689 if test "${ac_cv_header_GL_tube_h+set}" = set; then
17690   echo $ECHO_N "(cached) $ECHO_C" >&6
17691 else
17692   cat >conftest.$ac_ext <<_ACEOF
17693 /* confdefs.h.  */
17694 _ACEOF
17695 cat confdefs.h >>conftest.$ac_ext
17696 cat >>conftest.$ac_ext <<_ACEOF
17697 /* end confdefs.h.  */
17698 #include <GL/gl.h>
17699
17700 #include <GL/tube.h>
17701 _ACEOF
17702 rm -f conftest.$ac_objext
17703 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17704   (eval $ac_compile) 2>conftest.er1
17705   ac_status=$?
17706   grep -v '^ *+' conftest.er1 >conftest.err
17707   rm -f conftest.er1
17708   cat conftest.err >&5
17709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17710   (exit $ac_status); } &&
17711          { ac_try='test -z "$ac_c_werror_flag"
17712                          || test ! -s conftest.err'
17713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17714   (eval $ac_try) 2>&5
17715   ac_status=$?
17716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17717   (exit $ac_status); }; } &&
17718          { ac_try='test -s conftest.$ac_objext'
17719   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17720   (eval $ac_try) 2>&5
17721   ac_status=$?
17722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17723   (exit $ac_status); }; }; then
17724   ac_cv_header_GL_tube_h=yes
17725 else
17726   echo "$as_me: failed program was:" >&5
17727 sed 's/^/| /' conftest.$ac_ext >&5
17728
17729 ac_cv_header_GL_tube_h=no
17730 fi
17731 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17732 fi
17733 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
17734 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
17735 if test $ac_cv_header_GL_tube_h = yes; then
17736   have_gle=yes
17737 else
17738   have_gle=no
17739 fi
17740
17741
17742   CPPFLAGS="$ac_save_CPPFLAGS"
17743     fi
17744   fi
17745
17746   if test "$have_gle" = yes ; then
17747     have_gle=no
17748     gle_halfassed=yes
17749
17750   ac_save_CPPFLAGS="$CPPFLAGS"
17751   ac_save_LDFLAGS="$LDFLAGS"
17752 #  ac_save_LIBS="$LIBS"
17753
17754   if test \! -z "$includedir" ; then
17755     CPPFLAGS="$CPPFLAGS -I$includedir"
17756   fi
17757   # note: $X_CFLAGS includes $x_includes
17758   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17759
17760   if test \! -z "$libdir" ; then
17761     LDFLAGS="$LDFLAGS -L$libdir"
17762   fi
17763   # note: $X_LIBS includes $x_libraries
17764   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17765
17766   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
17767 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
17768 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
17769   echo $ECHO_N "(cached) $ECHO_C" >&6
17770 else
17771   ac_check_lib_save_LIBS=$LIBS
17772 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17773 cat >conftest.$ac_ext <<_ACEOF
17774 /* confdefs.h.  */
17775 _ACEOF
17776 cat confdefs.h >>conftest.$ac_ext
17777 cat >>conftest.$ac_ext <<_ACEOF
17778 /* end confdefs.h.  */
17779
17780 /* Override any gcc2 internal prototype to avoid an error.  */
17781 #ifdef __cplusplus
17782 extern "C"
17783 #endif
17784 /* We use char because int might match the return type of a gcc2
17785    builtin and then its argument prototype would still apply.  */
17786 char gleCreateGC ();
17787 int
17788 main ()
17789 {
17790 gleCreateGC ();
17791   ;
17792   return 0;
17793 }
17794 _ACEOF
17795 rm -f conftest.$ac_objext conftest$ac_exeext
17796 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17797   (eval $ac_link) 2>conftest.er1
17798   ac_status=$?
17799   grep -v '^ *+' conftest.er1 >conftest.err
17800   rm -f conftest.er1
17801   cat conftest.err >&5
17802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17803   (exit $ac_status); } &&
17804          { ac_try='test -z "$ac_c_werror_flag"
17805                          || test ! -s conftest.err'
17806   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17807   (eval $ac_try) 2>&5
17808   ac_status=$?
17809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17810   (exit $ac_status); }; } &&
17811          { ac_try='test -s conftest$ac_exeext'
17812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17813   (eval $ac_try) 2>&5
17814   ac_status=$?
17815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17816   (exit $ac_status); }; }; then
17817   ac_cv_lib_gle_gleCreateGC=yes
17818 else
17819   echo "$as_me: failed program was:" >&5
17820 sed 's/^/| /' conftest.$ac_ext >&5
17821
17822 ac_cv_lib_gle_gleCreateGC=no
17823 fi
17824 rm -f conftest.err conftest.$ac_objext \
17825       conftest$ac_exeext conftest.$ac_ext
17826 LIBS=$ac_check_lib_save_LIBS
17827 fi
17828 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
17829 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
17830 if test $ac_cv_lib_gle_gleCreateGC = yes; then
17831   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
17832 fi
17833
17834   CPPFLAGS="$ac_save_CPPFLAGS"
17835   LDFLAGS="$ac_save_LDFLAGS"
17836 #  LIBS="$ac_save_LIBS"
17837
17838   fi
17839   if test "$have_gle" = yes ; then
17840     have_gle=no
17841     gle_halfassed=yes
17842
17843     # sometimes the libmatrix stuff is included in libgle.  look there first.
17844 #
17845 # I don't get it.  For some reason, this test passes on SGI, as if
17846 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
17847 # Yet the link is succeeding.  Why???
17848 #
17849 #    AC_CHECK_X_LIB(gle, uview_direction_d,
17850 #                   [have_gle=yes; gle_halfassed=no],
17851 #                   [], $GL_LIBS -lX11 -lXext -lm)
17852
17853     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
17854     # *sigh*
17855     if test "$have_gle3" = yes ; then
17856
17857   ac_save_CPPFLAGS="$CPPFLAGS"
17858   ac_save_LDFLAGS="$LDFLAGS"
17859 #  ac_save_LIBS="$LIBS"
17860
17861   if test \! -z "$includedir" ; then
17862     CPPFLAGS="$CPPFLAGS -I$includedir"
17863   fi
17864   # note: $X_CFLAGS includes $x_includes
17865   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17866
17867   if test \! -z "$libdir" ; then
17868     LDFLAGS="$LDFLAGS -L$libdir"
17869   fi
17870   # note: $X_LIBS includes $x_libraries
17871   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17872
17873   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
17874 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
17875 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
17876   echo $ECHO_N "(cached) $ECHO_C" >&6
17877 else
17878   ac_check_lib_save_LIBS=$LIBS
17879 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
17880 cat >conftest.$ac_ext <<_ACEOF
17881 /* confdefs.h.  */
17882 _ACEOF
17883 cat confdefs.h >>conftest.$ac_ext
17884 cat >>conftest.$ac_ext <<_ACEOF
17885 /* end confdefs.h.  */
17886
17887 /* Override any gcc2 internal prototype to avoid an error.  */
17888 #ifdef __cplusplus
17889 extern "C"
17890 #endif
17891 /* We use char because int might match the return type of a gcc2
17892    builtin and then its argument prototype would still apply.  */
17893 char uview_direction ();
17894 int
17895 main ()
17896 {
17897 uview_direction ();
17898   ;
17899   return 0;
17900 }
17901 _ACEOF
17902 rm -f conftest.$ac_objext conftest$ac_exeext
17903 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17904   (eval $ac_link) 2>conftest.er1
17905   ac_status=$?
17906   grep -v '^ *+' conftest.er1 >conftest.err
17907   rm -f conftest.er1
17908   cat conftest.err >&5
17909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17910   (exit $ac_status); } &&
17911          { ac_try='test -z "$ac_c_werror_flag"
17912                          || test ! -s conftest.err'
17913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17914   (eval $ac_try) 2>&5
17915   ac_status=$?
17916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17917   (exit $ac_status); }; } &&
17918          { ac_try='test -s conftest$ac_exeext'
17919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17920   (eval $ac_try) 2>&5
17921   ac_status=$?
17922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17923   (exit $ac_status); }; }; then
17924   ac_cv_lib_gle_uview_direction=yes
17925 else
17926   echo "$as_me: failed program was:" >&5
17927 sed 's/^/| /' conftest.$ac_ext >&5
17928
17929 ac_cv_lib_gle_uview_direction=no
17930 fi
17931 rm -f conftest.err conftest.$ac_objext \
17932       conftest$ac_exeext conftest.$ac_ext
17933 LIBS=$ac_check_lib_save_LIBS
17934 fi
17935 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
17936 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
17937 if test $ac_cv_lib_gle_uview_direction = yes; then
17938   have_gle=yes; gle_halfassed=no
17939 fi
17940
17941   CPPFLAGS="$ac_save_CPPFLAGS"
17942   LDFLAGS="$ac_save_LDFLAGS"
17943 #  LIBS="$ac_save_LIBS"
17944
17945     fi
17946     # if it wasn't in libgle, then look in libmatrix.
17947     if test "$have_gle" = no ; then
17948
17949   ac_save_CPPFLAGS="$CPPFLAGS"
17950   ac_save_LDFLAGS="$LDFLAGS"
17951 #  ac_save_LIBS="$LIBS"
17952
17953   if test \! -z "$includedir" ; then
17954     CPPFLAGS="$CPPFLAGS -I$includedir"
17955   fi
17956   # note: $X_CFLAGS includes $x_includes
17957   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17958
17959   if test \! -z "$libdir" ; then
17960     LDFLAGS="$LDFLAGS -L$libdir"
17961   fi
17962   # note: $X_LIBS includes $x_libraries
17963   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17964
17965   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
17966 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
17967 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
17968   echo $ECHO_N "(cached) $ECHO_C" >&6
17969 else
17970   ac_check_lib_save_LIBS=$LIBS
17971 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
17972 cat >conftest.$ac_ext <<_ACEOF
17973 /* confdefs.h.  */
17974 _ACEOF
17975 cat confdefs.h >>conftest.$ac_ext
17976 cat >>conftest.$ac_ext <<_ACEOF
17977 /* end confdefs.h.  */
17978
17979 /* Override any gcc2 internal prototype to avoid an error.  */
17980 #ifdef __cplusplus
17981 extern "C"
17982 #endif
17983 /* We use char because int might match the return type of a gcc2
17984    builtin and then its argument prototype would still apply.  */
17985 char uview_direction_d ();
17986 int
17987 main ()
17988 {
17989 uview_direction_d ();
17990   ;
17991   return 0;
17992 }
17993 _ACEOF
17994 rm -f conftest.$ac_objext conftest$ac_exeext
17995 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17996   (eval $ac_link) 2>conftest.er1
17997   ac_status=$?
17998   grep -v '^ *+' conftest.er1 >conftest.err
17999   rm -f conftest.er1
18000   cat conftest.err >&5
18001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18002   (exit $ac_status); } &&
18003          { ac_try='test -z "$ac_c_werror_flag"
18004                          || test ! -s conftest.err'
18005   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18006   (eval $ac_try) 2>&5
18007   ac_status=$?
18008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18009   (exit $ac_status); }; } &&
18010          { ac_try='test -s conftest$ac_exeext'
18011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18012   (eval $ac_try) 2>&5
18013   ac_status=$?
18014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18015   (exit $ac_status); }; }; then
18016   ac_cv_lib_matrix_uview_direction_d=yes
18017 else
18018   echo "$as_me: failed program was:" >&5
18019 sed 's/^/| /' conftest.$ac_ext >&5
18020
18021 ac_cv_lib_matrix_uview_direction_d=no
18022 fi
18023 rm -f conftest.err conftest.$ac_objext \
18024       conftest$ac_exeext conftest.$ac_ext
18025 LIBS=$ac_check_lib_save_LIBS
18026 fi
18027 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
18028 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
18029 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
18030   have_gle=yes; gle_halfassed=no;
18031                       GLE_LIBS="$GLE_LIBS -lmatrix"
18032 fi
18033
18034   CPPFLAGS="$ac_save_CPPFLAGS"
18035   LDFLAGS="$ac_save_LDFLAGS"
18036 #  LIBS="$ac_save_LIBS"
18037
18038     fi
18039   fi
18040
18041   if test "$have_gle" = yes ; then
18042     cat >>confdefs.h <<\_ACEOF
18043 #define HAVE_GLE 1
18044 _ACEOF
18045
18046     if test "$have_gle3" = yes ; then
18047       cat >>confdefs.h <<\_ACEOF
18048 #define HAVE_GLE3 1
18049 _ACEOF
18050
18051     fi
18052   fi
18053
18054 elif test "$with_gle" != no; then
18055   echo "error: must be yes or no: --with-gle=$with_gle"
18056   exit 1
18057
18058 fi
18059
18060
18061
18062 ###############################################################################
18063 #
18064 #       Check for -lXpm.
18065 #
18066 ###############################################################################
18067
18068 have_xpm=no
18069 with_xpm_req=unspecified
18070
18071 # Check whether --with-xpm or --without-xpm was given.
18072 if test "${with_xpm+set}" = set; then
18073   withval="$with_xpm"
18074   with_xpm="$withval"; with_xpm_req="$withval"
18075 else
18076   with_xpm=yes
18077 fi;
18078
18079
18080    case "$with_xpm" in
18081     yes) ;;
18082     no)  ;;
18083
18084     /*)
18085      echo "$as_me:$LINENO: checking for XPM headers" >&5
18086 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
18087      d=$with_xpm/include
18088      if test -d $d; then
18089        X_CFLAGS="-I$d $X_CFLAGS"
18090        echo "$as_me:$LINENO: result: $d" >&5
18091 echo "${ECHO_T}$d" >&6
18092      else
18093        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18094 echo "${ECHO_T}not found ($d: no such directory)" >&6
18095      fi
18096
18097      echo "$as_me:$LINENO: checking for XPM libs" >&5
18098 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
18099      d=$with_xpm/lib
18100      if test -d $d; then
18101        X_LIBS="-L$d $X_LIBS"
18102        echo "$as_me:$LINENO: result: $d" >&5
18103 echo "${ECHO_T}$d" >&6
18104      else
18105        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18106 echo "${ECHO_T}not found ($d: no such directory)" >&6
18107      fi
18108
18109      # replace the directory string with "yes".
18110      with_xpm_req="yes"
18111      with_xpm=$with_xpm_req
18112      ;;
18113
18114     *)
18115      echo ""
18116      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
18117      echo "       If it is a directory, then \`DIR/include' will be added to"
18118      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18119      exit 1
18120      ;;
18121    esac
18122
18123
18124 if test "$with_xpm" = yes; then
18125
18126   ac_save_CPPFLAGS="$CPPFLAGS"
18127   if test \! -z "$includedir" ; then
18128     CPPFLAGS="$CPPFLAGS -I$includedir"
18129   fi
18130   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18131   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
18132 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
18133 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
18134   echo $ECHO_N "(cached) $ECHO_C" >&6
18135 else
18136   cat >conftest.$ac_ext <<_ACEOF
18137 /* confdefs.h.  */
18138 _ACEOF
18139 cat confdefs.h >>conftest.$ac_ext
18140 cat >>conftest.$ac_ext <<_ACEOF
18141 /* end confdefs.h.  */
18142 #include <X11/Xlib.h>
18143
18144 #include <X11/xpm.h>
18145 _ACEOF
18146 rm -f conftest.$ac_objext
18147 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18148   (eval $ac_compile) 2>conftest.er1
18149   ac_status=$?
18150   grep -v '^ *+' conftest.er1 >conftest.err
18151   rm -f conftest.er1
18152   cat conftest.err >&5
18153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18154   (exit $ac_status); } &&
18155          { ac_try='test -z "$ac_c_werror_flag"
18156                          || test ! -s conftest.err'
18157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18158   (eval $ac_try) 2>&5
18159   ac_status=$?
18160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18161   (exit $ac_status); }; } &&
18162          { ac_try='test -s conftest.$ac_objext'
18163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18164   (eval $ac_try) 2>&5
18165   ac_status=$?
18166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18167   (exit $ac_status); }; }; then
18168   ac_cv_header_X11_xpm_h=yes
18169 else
18170   echo "$as_me: failed program was:" >&5
18171 sed 's/^/| /' conftest.$ac_ext >&5
18172
18173 ac_cv_header_X11_xpm_h=no
18174 fi
18175 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18176 fi
18177 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
18178 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
18179 if test $ac_cv_header_X11_xpm_h = yes; then
18180   have_xpm=yes
18181                     cat >>confdefs.h <<\_ACEOF
18182 #define HAVE_XPM 1
18183 _ACEOF
18184
18185                     XPM_LIBS="-lXpm"
18186 fi
18187
18188
18189   CPPFLAGS="$ac_save_CPPFLAGS"
18190 elif test "$with_xpm" != no; then
18191   echo "error: must be yes or no: --with-xpm=$with_xpm"
18192   exit 1
18193 fi
18194
18195 # See comment near $motif_requires_xpm, above.
18196 # Need to do this here, after both Motif and XPM have been checked for.
18197 #
18198 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
18199   if test "$motif_requires_xpm" = yes ; then
18200     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
18201   fi
18202 fi
18203
18204 ###############################################################################
18205 #
18206 #       Check for -lgdk_pixbuf.
18207 #
18208 ###############################################################################
18209
18210 have_gdk_pixbuf=no
18211 with_gdk_pixbuf_req=unspecified
18212
18213 # Check whether --with-pixbuf or --without-pixbuf was given.
18214 if test "${with_pixbuf+set}" = set; then
18215   withval="$with_pixbuf"
18216   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
18217 else
18218   with_gdk_pixbuf=yes
18219 fi;
18220
18221 # if --with-pixbuf=/directory/ was specified, remember that directory so that
18222 # we can also look for the `gdk-pixbuf-config' program in that directory.
18223 case "$with_gdk_pixbuf" in
18224   /*)
18225     gdk_pixbuf_dir="$with_gdk_pixbuf"
18226     ;;
18227   *)
18228     gdk_pixbuf_dir=""
18229     ;;
18230 esac
18231
18232
18233    case "$with_gdk_pixbuf" in
18234     yes) ;;
18235     no)  ;;
18236
18237     /*)
18238      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
18239 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
18240      d=$with_gdk_pixbuf/include
18241      if test -d $d; then
18242        X_CFLAGS="-I$d $X_CFLAGS"
18243        echo "$as_me:$LINENO: result: $d" >&5
18244 echo "${ECHO_T}$d" >&6
18245      else
18246        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18247 echo "${ECHO_T}not found ($d: no such directory)" >&6
18248      fi
18249
18250      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
18251 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
18252      d=$with_gdk_pixbuf/lib
18253      if test -d $d; then
18254        X_LIBS="-L$d $X_LIBS"
18255        echo "$as_me:$LINENO: result: $d" >&5
18256 echo "${ECHO_T}$d" >&6
18257      else
18258        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18259 echo "${ECHO_T}not found ($d: no such directory)" >&6
18260      fi
18261
18262      # replace the directory string with "yes".
18263      with_gdk_pixbuf_req="yes"
18264      with_gdk_pixbuf=$with_gdk_pixbuf_req
18265      ;;
18266
18267     *)
18268      echo ""
18269      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
18270      echo "       If it is a directory, then \`DIR/include' will be added to"
18271      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18272      exit 1
18273      ;;
18274    esac
18275
18276
18277 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
18278   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
18279   exit 1
18280 fi
18281
18282 if test "$with_gdk_pixbuf" = yes; then
18283   have_gdk_pixbuf=no
18284   have_gdk_pixbuf2=no
18285
18286   if test -n "$pkg_config" ; then
18287     #
18288     # the new way...
18289     # run pkg-config based tests.
18290     #
18291     pkgs=''
18292     ok="yes"
18293
18294     # If we have Gtk 2.x, then *only* gdk-pixbuf 2.x will work.
18295     # If we have Gtk 1.x, then *only* gdk-pixbuf 1.x will work.
18296     # If we don't have Gtk at all, then either will work.
18297
18298     if test "$have_gtk" = no -o "$have_gtk2" = yes; then
18299       #
18300       # we don't have Gtk; or we have Gtk 2.x.  Check for pixbuf 2.x.
18301       #
18302       echo "$as_me:$LINENO: result: checking for gdk_pixbuf 2.x with gtk-config based tests..." >&5
18303 echo "${ECHO_T}checking for gdk_pixbuf 2.x with gtk-config based tests..." >&6
18304       pkg_check_version gdk-pixbuf-2.0      2.0.0
18305       pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
18306       have_gdk_pixbuf="$ok"
18307       have_gdk_pixbuf2="$ok"
18308     fi
18309
18310     if test "$have_gtk" = no -o "$have_gtk2" = no; then
18311       #
18312       # we don't have Gtk; or we have Gtk 1.x.
18313       # If we don't have pixbuf 2.x, then check for pixbuf 1.x.
18314       #
18315       if test "$have_gdk_pixbuf2" = no; then
18316         pkgs=''
18317         ok="yes"
18318       echo "$as_me:$LINENO: result: checking for gdk_pixbuf 1.x with gtk-config based tests..." >&5
18319 echo "${ECHO_T}checking for gdk_pixbuf 1.x with gtk-config based tests..." >&6
18320         pkg_check_version gdk_pixbuf      0.0
18321         pkg_check_version gdk_pixbuf_xlib 0.0
18322         have_gdk_pixbuf="$ok"
18323       fi
18324     fi
18325
18326     if test "$have_gdk_pixbuf" = yes; then
18327       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
18328 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
18329 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
18330   echo $ECHO_N "(cached) $ECHO_C" >&6
18331 else
18332   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
18333 fi
18334 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
18335 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
18336       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
18337 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
18338 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
18339   echo $ECHO_N "(cached) $ECHO_C" >&6
18340 else
18341   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
18342 fi
18343 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
18344 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
18345     fi
18346     ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
18347     ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
18348   fi
18349
18350
18351   if test "$have_gdk_pixbuf" = no; then
18352     #
18353     # the old way...
18354     # run gdk-pixbuf-config based tests.
18355     # note that we can't assume that the existence of "pkg-config" means
18356     # that we don't have to look for gdk-pixbuf-config -- in Gnome 1.4,
18357     # pkg-config exists, but doesn't know about pixbuf.
18358     #
18359
18360    echo "$as_me:$LINENO: result: checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&5
18361 echo "${ECHO_T}checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&6
18362
18363     # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
18364     # look in /foo/bin/ for for gdk-pixbuf-config.
18365     #
18366     gdk_pixbuf_path="$PATH"
18367
18368     if test ! -z "$gtk_dir"; then
18369       # canonicalize slashes.
18370       foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
18371       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
18372     fi
18373
18374     if test ! -z "$gnome_dir"; then
18375       # canonicalize slashes.
18376       foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
18377       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
18378     fi
18379
18380     for ac_prog in gdk-pixbuf-config
18381 do
18382   # Extract the first word of "$ac_prog", so it can be a program name with args.
18383 set dummy $ac_prog; ac_word=$2
18384 echo "$as_me:$LINENO: checking for $ac_word" >&5
18385 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18386 if test "${ac_cv_path_gdk_pixbuf_config+set}" = set; then
18387   echo $ECHO_N "(cached) $ECHO_C" >&6
18388 else
18389   case $gdk_pixbuf_config in
18390   [\\/]* | ?:[\\/]*)
18391   ac_cv_path_gdk_pixbuf_config="$gdk_pixbuf_config" # Let the user override the test with a path.
18392   ;;
18393   *)
18394   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18395 for as_dir in $gdk_pixbuf_path
18396 do
18397   IFS=$as_save_IFS
18398   test -z "$as_dir" && as_dir=.
18399   for ac_exec_ext in '' $ac_executable_extensions; do
18400   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18401     ac_cv_path_gdk_pixbuf_config="$as_dir/$ac_word$ac_exec_ext"
18402     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18403     break 2
18404   fi
18405 done
18406 done
18407
18408   ;;
18409 esac
18410 fi
18411 gdk_pixbuf_config=$ac_cv_path_gdk_pixbuf_config
18412
18413 if test -n "$gdk_pixbuf_config"; then
18414   echo "$as_me:$LINENO: result: $gdk_pixbuf_config" >&5
18415 echo "${ECHO_T}$gdk_pixbuf_config" >&6
18416 else
18417   echo "$as_me:$LINENO: result: no" >&5
18418 echo "${ECHO_T}no" >&6
18419 fi
18420
18421   test -n "$gdk_pixbuf_config" && break
18422 done
18423
18424
18425     # If we found the gdk-pixbuf-config program, run it to get flags.
18426     #
18427     if test -n "$gdk_pixbuf_config" ; then
18428       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
18429 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
18430 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
18431   echo $ECHO_N "(cached) $ECHO_C" >&6
18432 else
18433   ac_cv_gdk_pixbuf_config_cflags=`$gdk_pixbuf_config --cflags`
18434 fi
18435 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
18436 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
18437       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
18438 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
18439 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
18440   echo $ECHO_N "(cached) $ECHO_C" >&6
18441 else
18442   ac_cv_gdk_pixbuf_config_libs=`$gdk_pixbuf_config --libs`
18443 fi
18444 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
18445 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
18446
18447       # note that "gdk-pixbuf-config --libs" produces a link line including
18448       # -lgdk_pixbuf, but there's no way to get it to produce one that also
18449       # includes -lgdk_pixbuf_xlib.  Since we don't know *exactly* what the
18450       # name of the library will be, construct it with sed...
18451       # M4 sucks!!
18452
18453       ac_cv_gdk_pixbuf_config_libs=`echo $ac_cv_gdk_pixbuf_config_libs | \
18454        sed 's@ \(-lgdk_pixbuf\([-_a-zA-Z0-9.]*\)\) @ \1 -lgdk_pixbuf_xlib\2 @'`
18455
18456
18457       ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
18458       ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
18459     fi
18460   fi
18461
18462   ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
18463   CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
18464
18465   if test "$have_gdk_pixbuf" = no; then
18466     #
18467     # we appear to have pixbuf; check for headers/libs to be sure.
18468     #
18469
18470     have_gdk_pixbuf=no
18471
18472     # check for header A...
18473
18474   ac_save_CPPFLAGS="$CPPFLAGS"
18475   if test \! -z "$includedir" ; then
18476     CPPFLAGS="$CPPFLAGS -I$includedir"
18477   fi
18478   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18479   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18480   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
18481 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
18482 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18483   echo $ECHO_N "(cached) $ECHO_C" >&6
18484 fi
18485 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
18486 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
18487 else
18488   # Is the header compilable?
18489 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
18490 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
18491 cat >conftest.$ac_ext <<_ACEOF
18492 /* confdefs.h.  */
18493 _ACEOF
18494 cat confdefs.h >>conftest.$ac_ext
18495 cat >>conftest.$ac_ext <<_ACEOF
18496 /* end confdefs.h.  */
18497 $ac_includes_default
18498 #include <gdk-pixbuf/gdk-pixbuf.h>
18499 _ACEOF
18500 rm -f conftest.$ac_objext
18501 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18502   (eval $ac_compile) 2>conftest.er1
18503   ac_status=$?
18504   grep -v '^ *+' conftest.er1 >conftest.err
18505   rm -f conftest.er1
18506   cat conftest.err >&5
18507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18508   (exit $ac_status); } &&
18509          { ac_try='test -z "$ac_c_werror_flag"
18510                          || test ! -s conftest.err'
18511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18512   (eval $ac_try) 2>&5
18513   ac_status=$?
18514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18515   (exit $ac_status); }; } &&
18516          { ac_try='test -s conftest.$ac_objext'
18517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18518   (eval $ac_try) 2>&5
18519   ac_status=$?
18520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18521   (exit $ac_status); }; }; then
18522   ac_header_compiler=yes
18523 else
18524   echo "$as_me: failed program was:" >&5
18525 sed 's/^/| /' conftest.$ac_ext >&5
18526
18527 ac_header_compiler=no
18528 fi
18529 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18530 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18531 echo "${ECHO_T}$ac_header_compiler" >&6
18532
18533 # Is the header present?
18534 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
18535 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
18536 cat >conftest.$ac_ext <<_ACEOF
18537 /* confdefs.h.  */
18538 _ACEOF
18539 cat confdefs.h >>conftest.$ac_ext
18540 cat >>conftest.$ac_ext <<_ACEOF
18541 /* end confdefs.h.  */
18542 #include <gdk-pixbuf/gdk-pixbuf.h>
18543 _ACEOF
18544 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18545   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18546   ac_status=$?
18547   grep -v '^ *+' conftest.er1 >conftest.err
18548   rm -f conftest.er1
18549   cat conftest.err >&5
18550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18551   (exit $ac_status); } >/dev/null; then
18552   if test -s conftest.err; then
18553     ac_cpp_err=$ac_c_preproc_warn_flag
18554     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18555   else
18556     ac_cpp_err=
18557   fi
18558 else
18559   ac_cpp_err=yes
18560 fi
18561 if test -z "$ac_cpp_err"; then
18562   ac_header_preproc=yes
18563 else
18564   echo "$as_me: failed program was:" >&5
18565 sed 's/^/| /' conftest.$ac_ext >&5
18566
18567   ac_header_preproc=no
18568 fi
18569 rm -f conftest.err conftest.$ac_ext
18570 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18571 echo "${ECHO_T}$ac_header_preproc" >&6
18572
18573 # So?  What about this header?
18574 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18575   yes:no: )
18576     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
18577 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18578     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
18579 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
18580     ac_header_preproc=yes
18581     ;;
18582   no:yes:* )
18583     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
18584 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
18585     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
18586 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
18587     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
18588 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
18589     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
18590 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18591     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
18592 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
18593     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
18594 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
18595     (
18596       cat <<\_ASBOX
18597 ## ------------------------------------------ ##
18598 ## Report this to the AC_PACKAGE_NAME lists.  ##
18599 ## ------------------------------------------ ##
18600 _ASBOX
18601     ) |
18602       sed "s/^/$as_me: WARNING:     /" >&2
18603     ;;
18604 esac
18605 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
18606 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
18607 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
18608   echo $ECHO_N "(cached) $ECHO_C" >&6
18609 else
18610   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
18611 fi
18612 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
18613 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
18614
18615 fi
18616 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
18617   have_gdk_pixbuf=yes
18618 fi
18619
18620
18621   CPPFLAGS="$ac_save_CPPFLAGS"
18622
18623     # if that worked, check for header B...
18624     if test "$have_gdk_pixbuf" = yes; then
18625       have_gdk_pixbuf=no
18626       gdk_pixbuf_halfassed=yes
18627
18628   ac_save_CPPFLAGS="$CPPFLAGS"
18629   if test \! -z "$includedir" ; then
18630     CPPFLAGS="$CPPFLAGS -I$includedir"
18631   fi
18632   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18633   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18634   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
18635 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
18636 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18637   echo $ECHO_N "(cached) $ECHO_C" >&6
18638 fi
18639 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
18640 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
18641 else
18642   # Is the header compilable?
18643 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
18644 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
18645 cat >conftest.$ac_ext <<_ACEOF
18646 /* confdefs.h.  */
18647 _ACEOF
18648 cat confdefs.h >>conftest.$ac_ext
18649 cat >>conftest.$ac_ext <<_ACEOF
18650 /* end confdefs.h.  */
18651 $ac_includes_default
18652 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
18653 _ACEOF
18654 rm -f conftest.$ac_objext
18655 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18656   (eval $ac_compile) 2>conftest.er1
18657   ac_status=$?
18658   grep -v '^ *+' conftest.er1 >conftest.err
18659   rm -f conftest.er1
18660   cat conftest.err >&5
18661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18662   (exit $ac_status); } &&
18663          { ac_try='test -z "$ac_c_werror_flag"
18664                          || test ! -s conftest.err'
18665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18666   (eval $ac_try) 2>&5
18667   ac_status=$?
18668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18669   (exit $ac_status); }; } &&
18670          { ac_try='test -s conftest.$ac_objext'
18671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18672   (eval $ac_try) 2>&5
18673   ac_status=$?
18674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18675   (exit $ac_status); }; }; then
18676   ac_header_compiler=yes
18677 else
18678   echo "$as_me: failed program was:" >&5
18679 sed 's/^/| /' conftest.$ac_ext >&5
18680
18681 ac_header_compiler=no
18682 fi
18683 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18684 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18685 echo "${ECHO_T}$ac_header_compiler" >&6
18686
18687 # Is the header present?
18688 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
18689 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
18690 cat >conftest.$ac_ext <<_ACEOF
18691 /* confdefs.h.  */
18692 _ACEOF
18693 cat confdefs.h >>conftest.$ac_ext
18694 cat >>conftest.$ac_ext <<_ACEOF
18695 /* end confdefs.h.  */
18696 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
18697 _ACEOF
18698 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18699   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18700   ac_status=$?
18701   grep -v '^ *+' conftest.er1 >conftest.err
18702   rm -f conftest.er1
18703   cat conftest.err >&5
18704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18705   (exit $ac_status); } >/dev/null; then
18706   if test -s conftest.err; then
18707     ac_cpp_err=$ac_c_preproc_warn_flag
18708     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18709   else
18710     ac_cpp_err=
18711   fi
18712 else
18713   ac_cpp_err=yes
18714 fi
18715 if test -z "$ac_cpp_err"; then
18716   ac_header_preproc=yes
18717 else
18718   echo "$as_me: failed program was:" >&5
18719 sed 's/^/| /' conftest.$ac_ext >&5
18720
18721   ac_header_preproc=no
18722 fi
18723 rm -f conftest.err conftest.$ac_ext
18724 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18725 echo "${ECHO_T}$ac_header_preproc" >&6
18726
18727 # So?  What about this header?
18728 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18729   yes:no: )
18730     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18731 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18732     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18733 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18734     ac_header_preproc=yes
18735     ;;
18736   no:yes:* )
18737     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18738 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18739     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18740 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18741     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18742 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18743     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18744 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18745     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18746 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18747     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18748 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18749     (
18750       cat <<\_ASBOX
18751 ## ------------------------------------------ ##
18752 ## Report this to the AC_PACKAGE_NAME lists.  ##
18753 ## ------------------------------------------ ##
18754 _ASBOX
18755     ) |
18756       sed "s/^/$as_me: WARNING:     /" >&2
18757     ;;
18758 esac
18759 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
18760 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
18761 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
18762   echo $ECHO_N "(cached) $ECHO_C" >&6
18763 else
18764   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
18765 fi
18766 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
18767 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
18768
18769 fi
18770 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
18771   have_gdk_pixbuf=yes
18772                          gdk_pixbuf_halfassed=no
18773 fi
18774
18775
18776   CPPFLAGS="$ac_save_CPPFLAGS"
18777
18778       # yay, it has a new name in Gtk 2.x...
18779       if test "$have_gdk_pixbuf" = no; then
18780         have_gdk_pixbuf=no
18781         gdk_pixbuf_halfassed=yes
18782
18783   ac_save_CPPFLAGS="$CPPFLAGS"
18784   if test \! -z "$includedir" ; then
18785     CPPFLAGS="$CPPFLAGS -I$includedir"
18786   fi
18787   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18788   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18789   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18790 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
18791 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18792   echo $ECHO_N "(cached) $ECHO_C" >&6
18793 fi
18794 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18795 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
18796 else
18797   # Is the header compilable?
18798 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
18799 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
18800 cat >conftest.$ac_ext <<_ACEOF
18801 /* confdefs.h.  */
18802 _ACEOF
18803 cat confdefs.h >>conftest.$ac_ext
18804 cat >>conftest.$ac_ext <<_ACEOF
18805 /* end confdefs.h.  */
18806 $ac_includes_default
18807 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18808 _ACEOF
18809 rm -f conftest.$ac_objext
18810 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18811   (eval $ac_compile) 2>conftest.er1
18812   ac_status=$?
18813   grep -v '^ *+' conftest.er1 >conftest.err
18814   rm -f conftest.er1
18815   cat conftest.err >&5
18816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18817   (exit $ac_status); } &&
18818          { ac_try='test -z "$ac_c_werror_flag"
18819                          || test ! -s conftest.err'
18820   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18821   (eval $ac_try) 2>&5
18822   ac_status=$?
18823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18824   (exit $ac_status); }; } &&
18825          { ac_try='test -s conftest.$ac_objext'
18826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18827   (eval $ac_try) 2>&5
18828   ac_status=$?
18829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18830   (exit $ac_status); }; }; then
18831   ac_header_compiler=yes
18832 else
18833   echo "$as_me: failed program was:" >&5
18834 sed 's/^/| /' conftest.$ac_ext >&5
18835
18836 ac_header_compiler=no
18837 fi
18838 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18839 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18840 echo "${ECHO_T}$ac_header_compiler" >&6
18841
18842 # Is the header present?
18843 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
18844 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
18845 cat >conftest.$ac_ext <<_ACEOF
18846 /* confdefs.h.  */
18847 _ACEOF
18848 cat confdefs.h >>conftest.$ac_ext
18849 cat >>conftest.$ac_ext <<_ACEOF
18850 /* end confdefs.h.  */
18851 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18852 _ACEOF
18853 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18854   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18855   ac_status=$?
18856   grep -v '^ *+' conftest.er1 >conftest.err
18857   rm -f conftest.er1
18858   cat conftest.err >&5
18859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18860   (exit $ac_status); } >/dev/null; then
18861   if test -s conftest.err; then
18862     ac_cpp_err=$ac_c_preproc_warn_flag
18863     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18864   else
18865     ac_cpp_err=
18866   fi
18867 else
18868   ac_cpp_err=yes
18869 fi
18870 if test -z "$ac_cpp_err"; then
18871   ac_header_preproc=yes
18872 else
18873   echo "$as_me: failed program was:" >&5
18874 sed 's/^/| /' conftest.$ac_ext >&5
18875
18876   ac_header_preproc=no
18877 fi
18878 rm -f conftest.err conftest.$ac_ext
18879 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18880 echo "${ECHO_T}$ac_header_preproc" >&6
18881
18882 # So?  What about this header?
18883 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18884   yes:no: )
18885     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18886 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18887     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
18888 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
18889     ac_header_preproc=yes
18890     ;;
18891   no:yes:* )
18892     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
18893 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
18894     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
18895 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
18896     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
18897 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
18898     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
18899 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18900     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
18901 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
18902     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
18903 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
18904     (
18905       cat <<\_ASBOX
18906 ## ------------------------------------------ ##
18907 ## Report this to the AC_PACKAGE_NAME lists.  ##
18908 ## ------------------------------------------ ##
18909 _ASBOX
18910     ) |
18911       sed "s/^/$as_me: WARNING:     /" >&2
18912     ;;
18913 esac
18914 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
18915 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
18916 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
18917   echo $ECHO_N "(cached) $ECHO_C" >&6
18918 else
18919   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
18920 fi
18921 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
18922 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
18923
18924 fi
18925 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
18926   have_gdk_pixbuf=yes
18927                            gdk_pixbuf_halfassed=no
18928 fi
18929
18930
18931   CPPFLAGS="$ac_save_CPPFLAGS"
18932       fi
18933     fi
18934   fi
18935
18936   CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
18937
18938   if test "$have_gdk_pixbuf" = yes; then
18939     # we have the headers, now check for the libraries
18940     have_gdk_pixbuf=no
18941     gdk_pixbuf_halfassed=yes
18942
18943     # library A...
18944
18945   ac_save_CPPFLAGS="$CPPFLAGS"
18946   ac_save_LDFLAGS="$LDFLAGS"
18947 #  ac_save_LIBS="$LIBS"
18948
18949   if test \! -z "$includedir" ; then
18950     CPPFLAGS="$CPPFLAGS -I$includedir"
18951   fi
18952   # note: $X_CFLAGS includes $x_includes
18953   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18954
18955   if test \! -z "$libdir" ; then
18956     LDFLAGS="$LDFLAGS -L$libdir"
18957   fi
18958   # note: $X_LIBS includes $x_libraries
18959   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18960
18961   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
18962 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
18963 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
18964   echo $ECHO_N "(cached) $ECHO_C" >&6
18965 else
18966   ac_check_lib_save_LIBS=$LIBS
18967 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
18968 cat >conftest.$ac_ext <<_ACEOF
18969 /* confdefs.h.  */
18970 _ACEOF
18971 cat confdefs.h >>conftest.$ac_ext
18972 cat >>conftest.$ac_ext <<_ACEOF
18973 /* end confdefs.h.  */
18974
18975 /* Override any gcc2 internal prototype to avoid an error.  */
18976 #ifdef __cplusplus
18977 extern "C"
18978 #endif
18979 /* We use char because int might match the return type of a gcc2
18980    builtin and then its argument prototype would still apply.  */
18981 char gdk_pixbuf_new_from_file ();
18982 int
18983 main ()
18984 {
18985 gdk_pixbuf_new_from_file ();
18986   ;
18987   return 0;
18988 }
18989 _ACEOF
18990 rm -f conftest.$ac_objext conftest$ac_exeext
18991 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18992   (eval $ac_link) 2>conftest.er1
18993   ac_status=$?
18994   grep -v '^ *+' conftest.er1 >conftest.err
18995   rm -f conftest.er1
18996   cat conftest.err >&5
18997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18998   (exit $ac_status); } &&
18999          { ac_try='test -z "$ac_c_werror_flag"
19000                          || test ! -s conftest.err'
19001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19002   (eval $ac_try) 2>&5
19003   ac_status=$?
19004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19005   (exit $ac_status); }; } &&
19006          { ac_try='test -s conftest$ac_exeext'
19007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19008   (eval $ac_try) 2>&5
19009   ac_status=$?
19010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19011   (exit $ac_status); }; }; then
19012   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
19013 else
19014   echo "$as_me: failed program was:" >&5
19015 sed 's/^/| /' conftest.$ac_ext >&5
19016
19017 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
19018 fi
19019 rm -f conftest.err conftest.$ac_objext \
19020       conftest$ac_exeext conftest.$ac_ext
19021 LIBS=$ac_check_lib_save_LIBS
19022 fi
19023 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
19024 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
19025 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
19026   have_gdk_pixbuf=yes
19027 fi
19028
19029   CPPFLAGS="$ac_save_CPPFLAGS"
19030   LDFLAGS="$ac_save_LDFLAGS"
19031 #  LIBS="$ac_save_LIBS"
19032
19033     # library B...
19034     if test "$have_gdk_pixbuf" = yes; then
19035       have_gdk_pixbuf=no
19036
19037   ac_save_CPPFLAGS="$CPPFLAGS"
19038   ac_save_LDFLAGS="$LDFLAGS"
19039 #  ac_save_LIBS="$LIBS"
19040
19041   if test \! -z "$includedir" ; then
19042     CPPFLAGS="$CPPFLAGS -I$includedir"
19043   fi
19044   # note: $X_CFLAGS includes $x_includes
19045   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19046
19047   if test \! -z "$libdir" ; then
19048     LDFLAGS="$LDFLAGS -L$libdir"
19049   fi
19050   # note: $X_LIBS includes $x_libraries
19051   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19052
19053   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
19054 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
19055 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
19056   echo $ECHO_N "(cached) $ECHO_C" >&6
19057 else
19058   ac_check_lib_save_LIBS=$LIBS
19059 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
19060 cat >conftest.$ac_ext <<_ACEOF
19061 /* confdefs.h.  */
19062 _ACEOF
19063 cat confdefs.h >>conftest.$ac_ext
19064 cat >>conftest.$ac_ext <<_ACEOF
19065 /* end confdefs.h.  */
19066
19067 /* Override any gcc2 internal prototype to avoid an error.  */
19068 #ifdef __cplusplus
19069 extern "C"
19070 #endif
19071 /* We use char because int might match the return type of a gcc2
19072    builtin and then its argument prototype would still apply.  */
19073 char gdk_pixbuf_xlib_init ();
19074 int
19075 main ()
19076 {
19077 gdk_pixbuf_xlib_init ();
19078   ;
19079   return 0;
19080 }
19081 _ACEOF
19082 rm -f conftest.$ac_objext conftest$ac_exeext
19083 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19084   (eval $ac_link) 2>conftest.er1
19085   ac_status=$?
19086   grep -v '^ *+' conftest.er1 >conftest.err
19087   rm -f conftest.er1
19088   cat conftest.err >&5
19089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19090   (exit $ac_status); } &&
19091          { ac_try='test -z "$ac_c_werror_flag"
19092                          || test ! -s conftest.err'
19093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19094   (eval $ac_try) 2>&5
19095   ac_status=$?
19096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19097   (exit $ac_status); }; } &&
19098          { ac_try='test -s conftest$ac_exeext'
19099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19100   (eval $ac_try) 2>&5
19101   ac_status=$?
19102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19103   (exit $ac_status); }; }; then
19104   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
19105 else
19106   echo "$as_me: failed program was:" >&5
19107 sed 's/^/| /' conftest.$ac_ext >&5
19108
19109 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
19110 fi
19111 rm -f conftest.err conftest.$ac_objext \
19112       conftest$ac_exeext conftest.$ac_ext
19113 LIBS=$ac_check_lib_save_LIBS
19114 fi
19115 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
19116 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
19117 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
19118   have_gdk_pixbuf=yes
19119                       gdk_pixbuf_halfassed=no
19120 fi
19121
19122   CPPFLAGS="$ac_save_CPPFLAGS"
19123   LDFLAGS="$ac_save_LDFLAGS"
19124 #  LIBS="$ac_save_LIBS"
19125
19126     fi
19127   fi
19128
19129   if test "$have_gdk_pixbuf" = yes; then
19130     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
19131     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
19132     cat >>confdefs.h <<\_ACEOF
19133 #define HAVE_GDK_PIXBUF 1
19134 _ACEOF
19135
19136   else
19137     have_gdk_pixbuf2=no
19138   fi
19139 fi
19140
19141
19142 ###############################################################################
19143 #
19144 #       Check for -ljpeg
19145 #
19146 ###############################################################################
19147
19148 have_jpeg=no
19149 with_jpeg_req=unspecified
19150 jpeg_halfassed=no
19151
19152 # Check whether --with-jpeg or --without-jpeg was given.
19153 if test "${with_jpeg+set}" = set; then
19154   withval="$with_jpeg"
19155   with_jpeg="$withval"; with_jpeg_req="$withval"
19156 else
19157   with_jpeg=yes
19158 fi;
19159
19160
19161    case "$with_jpeg" in
19162     yes) ;;
19163     no)  ;;
19164
19165     /*)
19166      echo "$as_me:$LINENO: checking for JPEG headers" >&5
19167 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
19168      d=$with_jpeg/include
19169      if test -d $d; then
19170        X_CFLAGS="-I$d $X_CFLAGS"
19171        echo "$as_me:$LINENO: result: $d" >&5
19172 echo "${ECHO_T}$d" >&6
19173      else
19174        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19175 echo "${ECHO_T}not found ($d: no such directory)" >&6
19176      fi
19177
19178      echo "$as_me:$LINENO: checking for JPEG libs" >&5
19179 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
19180      d=$with_jpeg/lib
19181      if test -d $d; then
19182        X_LIBS="-L$d $X_LIBS"
19183        echo "$as_me:$LINENO: result: $d" >&5
19184 echo "${ECHO_T}$d" >&6
19185      else
19186        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19187 echo "${ECHO_T}not found ($d: no such directory)" >&6
19188      fi
19189
19190      # replace the directory string with "yes".
19191      with_jpeg_req="yes"
19192      with_jpeg=$with_jpeg_req
19193      ;;
19194
19195     *)
19196      echo ""
19197      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
19198      echo "       If it is a directory, then \`DIR/include' will be added to"
19199      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19200      exit 1
19201      ;;
19202    esac
19203
19204
19205 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
19206   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
19207   exit 1
19208 fi
19209
19210 if test "$with_jpeg" = yes; then
19211
19212   have_jpeg=no
19213
19214   ac_save_CPPFLAGS="$CPPFLAGS"
19215   if test \! -z "$includedir" ; then
19216     CPPFLAGS="$CPPFLAGS -I$includedir"
19217   fi
19218   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19219   if test "${ac_cv_header_jpeglib_h+set}" = set; then
19220   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
19221 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
19222 if test "${ac_cv_header_jpeglib_h+set}" = set; then
19223   echo $ECHO_N "(cached) $ECHO_C" >&6
19224 fi
19225 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
19226 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
19227 else
19228   # Is the header compilable?
19229 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
19230 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
19231 cat >conftest.$ac_ext <<_ACEOF
19232 /* confdefs.h.  */
19233 _ACEOF
19234 cat confdefs.h >>conftest.$ac_ext
19235 cat >>conftest.$ac_ext <<_ACEOF
19236 /* end confdefs.h.  */
19237 $ac_includes_default
19238 #include <jpeglib.h>
19239 _ACEOF
19240 rm -f conftest.$ac_objext
19241 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19242   (eval $ac_compile) 2>conftest.er1
19243   ac_status=$?
19244   grep -v '^ *+' conftest.er1 >conftest.err
19245   rm -f conftest.er1
19246   cat conftest.err >&5
19247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19248   (exit $ac_status); } &&
19249          { ac_try='test -z "$ac_c_werror_flag"
19250                          || test ! -s conftest.err'
19251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19252   (eval $ac_try) 2>&5
19253   ac_status=$?
19254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19255   (exit $ac_status); }; } &&
19256          { ac_try='test -s conftest.$ac_objext'
19257   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19258   (eval $ac_try) 2>&5
19259   ac_status=$?
19260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19261   (exit $ac_status); }; }; then
19262   ac_header_compiler=yes
19263 else
19264   echo "$as_me: failed program was:" >&5
19265 sed 's/^/| /' conftest.$ac_ext >&5
19266
19267 ac_header_compiler=no
19268 fi
19269 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19270 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19271 echo "${ECHO_T}$ac_header_compiler" >&6
19272
19273 # Is the header present?
19274 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
19275 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
19276 cat >conftest.$ac_ext <<_ACEOF
19277 /* confdefs.h.  */
19278 _ACEOF
19279 cat confdefs.h >>conftest.$ac_ext
19280 cat >>conftest.$ac_ext <<_ACEOF
19281 /* end confdefs.h.  */
19282 #include <jpeglib.h>
19283 _ACEOF
19284 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19285   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19286   ac_status=$?
19287   grep -v '^ *+' conftest.er1 >conftest.err
19288   rm -f conftest.er1
19289   cat conftest.err >&5
19290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19291   (exit $ac_status); } >/dev/null; then
19292   if test -s conftest.err; then
19293     ac_cpp_err=$ac_c_preproc_warn_flag
19294     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19295   else
19296     ac_cpp_err=
19297   fi
19298 else
19299   ac_cpp_err=yes
19300 fi
19301 if test -z "$ac_cpp_err"; then
19302   ac_header_preproc=yes
19303 else
19304   echo "$as_me: failed program was:" >&5
19305 sed 's/^/| /' conftest.$ac_ext >&5
19306
19307   ac_header_preproc=no
19308 fi
19309 rm -f conftest.err conftest.$ac_ext
19310 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19311 echo "${ECHO_T}$ac_header_preproc" >&6
19312
19313 # So?  What about this header?
19314 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19315   yes:no: )
19316     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
19317 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19318     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
19319 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
19320     ac_header_preproc=yes
19321     ;;
19322   no:yes:* )
19323     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
19324 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
19325     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
19326 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
19327     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
19328 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
19329     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
19330 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19331     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
19332 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
19333     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
19334 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
19335     (
19336       cat <<\_ASBOX
19337 ## ------------------------------------------ ##
19338 ## Report this to the AC_PACKAGE_NAME lists.  ##
19339 ## ------------------------------------------ ##
19340 _ASBOX
19341     ) |
19342       sed "s/^/$as_me: WARNING:     /" >&2
19343     ;;
19344 esac
19345 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
19346 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
19347 if test "${ac_cv_header_jpeglib_h+set}" = set; then
19348   echo $ECHO_N "(cached) $ECHO_C" >&6
19349 else
19350   ac_cv_header_jpeglib_h=$ac_header_preproc
19351 fi
19352 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
19353 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
19354
19355 fi
19356 if test $ac_cv_header_jpeglib_h = yes; then
19357   have_jpeg=yes
19358 fi
19359
19360
19361   CPPFLAGS="$ac_save_CPPFLAGS"
19362
19363   if test "$have_jpeg" = yes; then
19364     # we have the header, now check for the library
19365     have_jpeg=no
19366     jpeg_halfassed=yes
19367
19368   ac_save_CPPFLAGS="$CPPFLAGS"
19369   ac_save_LDFLAGS="$LDFLAGS"
19370 #  ac_save_LIBS="$LIBS"
19371
19372   if test \! -z "$includedir" ; then
19373     CPPFLAGS="$CPPFLAGS -I$includedir"
19374   fi
19375   # note: $X_CFLAGS includes $x_includes
19376   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19377
19378   if test \! -z "$libdir" ; then
19379     LDFLAGS="$LDFLAGS -L$libdir"
19380   fi
19381   # note: $X_LIBS includes $x_libraries
19382   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19383
19384   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
19385 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
19386 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
19387   echo $ECHO_N "(cached) $ECHO_C" >&6
19388 else
19389   ac_check_lib_save_LIBS=$LIBS
19390 LIBS="-ljpeg  $LIBS"
19391 cat >conftest.$ac_ext <<_ACEOF
19392 /* confdefs.h.  */
19393 _ACEOF
19394 cat confdefs.h >>conftest.$ac_ext
19395 cat >>conftest.$ac_ext <<_ACEOF
19396 /* end confdefs.h.  */
19397
19398 /* Override any gcc2 internal prototype to avoid an error.  */
19399 #ifdef __cplusplus
19400 extern "C"
19401 #endif
19402 /* We use char because int might match the return type of a gcc2
19403    builtin and then its argument prototype would still apply.  */
19404 char jpeg_start_compress ();
19405 int
19406 main ()
19407 {
19408 jpeg_start_compress ();
19409   ;
19410   return 0;
19411 }
19412 _ACEOF
19413 rm -f conftest.$ac_objext conftest$ac_exeext
19414 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19415   (eval $ac_link) 2>conftest.er1
19416   ac_status=$?
19417   grep -v '^ *+' conftest.er1 >conftest.err
19418   rm -f conftest.er1
19419   cat conftest.err >&5
19420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19421   (exit $ac_status); } &&
19422          { ac_try='test -z "$ac_c_werror_flag"
19423                          || test ! -s conftest.err'
19424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19425   (eval $ac_try) 2>&5
19426   ac_status=$?
19427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19428   (exit $ac_status); }; } &&
19429          { ac_try='test -s conftest$ac_exeext'
19430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19431   (eval $ac_try) 2>&5
19432   ac_status=$?
19433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19434   (exit $ac_status); }; }; then
19435   ac_cv_lib_jpeg_jpeg_start_compress=yes
19436 else
19437   echo "$as_me: failed program was:" >&5
19438 sed 's/^/| /' conftest.$ac_ext >&5
19439
19440 ac_cv_lib_jpeg_jpeg_start_compress=no
19441 fi
19442 rm -f conftest.err conftest.$ac_objext \
19443       conftest$ac_exeext conftest.$ac_ext
19444 LIBS=$ac_check_lib_save_LIBS
19445 fi
19446 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
19447 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
19448 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
19449   have_jpeg=yes
19450                     jpeg_halfassed=no
19451                     JPEG_LIBS="-ljpeg"
19452                     cat >>confdefs.h <<\_ACEOF
19453 #define HAVE_JPEGLIB 1
19454 _ACEOF
19455
19456 fi
19457
19458   CPPFLAGS="$ac_save_CPPFLAGS"
19459   LDFLAGS="$ac_save_LDFLAGS"
19460 #  LIBS="$ac_save_LIBS"
19461
19462   fi
19463 fi
19464
19465
19466 ###############################################################################
19467 #
19468 #       Check for pty support for 'phosphor'
19469 #
19470 ###############################################################################
19471
19472 PTY_LIBS=
19473
19474
19475 for ac_header in pty.h util.h
19476 do
19477 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19478 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19479   echo "$as_me:$LINENO: checking for $ac_header" >&5
19480 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19481 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19482   echo $ECHO_N "(cached) $ECHO_C" >&6
19483 fi
19484 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19485 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19486 else
19487   # Is the header compilable?
19488 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19489 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19490 cat >conftest.$ac_ext <<_ACEOF
19491 /* confdefs.h.  */
19492 _ACEOF
19493 cat confdefs.h >>conftest.$ac_ext
19494 cat >>conftest.$ac_ext <<_ACEOF
19495 /* end confdefs.h.  */
19496 $ac_includes_default
19497 #include <$ac_header>
19498 _ACEOF
19499 rm -f conftest.$ac_objext
19500 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19501   (eval $ac_compile) 2>conftest.er1
19502   ac_status=$?
19503   grep -v '^ *+' conftest.er1 >conftest.err
19504   rm -f conftest.er1
19505   cat conftest.err >&5
19506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19507   (exit $ac_status); } &&
19508          { ac_try='test -z "$ac_c_werror_flag"
19509                          || test ! -s conftest.err'
19510   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19511   (eval $ac_try) 2>&5
19512   ac_status=$?
19513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19514   (exit $ac_status); }; } &&
19515          { ac_try='test -s conftest.$ac_objext'
19516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19517   (eval $ac_try) 2>&5
19518   ac_status=$?
19519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19520   (exit $ac_status); }; }; then
19521   ac_header_compiler=yes
19522 else
19523   echo "$as_me: failed program was:" >&5
19524 sed 's/^/| /' conftest.$ac_ext >&5
19525
19526 ac_header_compiler=no
19527 fi
19528 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19529 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19530 echo "${ECHO_T}$ac_header_compiler" >&6
19531
19532 # Is the header present?
19533 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19534 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19535 cat >conftest.$ac_ext <<_ACEOF
19536 /* confdefs.h.  */
19537 _ACEOF
19538 cat confdefs.h >>conftest.$ac_ext
19539 cat >>conftest.$ac_ext <<_ACEOF
19540 /* end confdefs.h.  */
19541 #include <$ac_header>
19542 _ACEOF
19543 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19544   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19545   ac_status=$?
19546   grep -v '^ *+' conftest.er1 >conftest.err
19547   rm -f conftest.er1
19548   cat conftest.err >&5
19549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19550   (exit $ac_status); } >/dev/null; then
19551   if test -s conftest.err; then
19552     ac_cpp_err=$ac_c_preproc_warn_flag
19553     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19554   else
19555     ac_cpp_err=
19556   fi
19557 else
19558   ac_cpp_err=yes
19559 fi
19560 if test -z "$ac_cpp_err"; then
19561   ac_header_preproc=yes
19562 else
19563   echo "$as_me: failed program was:" >&5
19564 sed 's/^/| /' conftest.$ac_ext >&5
19565
19566   ac_header_preproc=no
19567 fi
19568 rm -f conftest.err conftest.$ac_ext
19569 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19570 echo "${ECHO_T}$ac_header_preproc" >&6
19571
19572 # So?  What about this header?
19573 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19574   yes:no: )
19575     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19576 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19577     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19578 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19579     ac_header_preproc=yes
19580     ;;
19581   no:yes:* )
19582     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19583 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19584     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19585 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19586     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19587 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19588     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19589 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19590     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19591 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19592     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19593 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19594     (
19595       cat <<\_ASBOX
19596 ## ------------------------------------------ ##
19597 ## Report this to the AC_PACKAGE_NAME lists.  ##
19598 ## ------------------------------------------ ##
19599 _ASBOX
19600     ) |
19601       sed "s/^/$as_me: WARNING:     /" >&2
19602     ;;
19603 esac
19604 echo "$as_me:$LINENO: checking for $ac_header" >&5
19605 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19606 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19607   echo $ECHO_N "(cached) $ECHO_C" >&6
19608 else
19609   eval "$as_ac_Header=\$ac_header_preproc"
19610 fi
19611 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19612 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19613
19614 fi
19615 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19616   cat >>confdefs.h <<_ACEOF
19617 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19618 _ACEOF
19619
19620 fi
19621
19622 done
19623
19624
19625   ac_save_CPPFLAGS="$CPPFLAGS"
19626   ac_save_LDFLAGS="$LDFLAGS"
19627 #  ac_save_LIBS="$LIBS"
19628
19629   if test \! -z "$includedir" ; then
19630     CPPFLAGS="$CPPFLAGS -I$includedir"
19631   fi
19632   # note: $X_CFLAGS includes $x_includes
19633   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19634
19635   if test \! -z "$libdir" ; then
19636     LDFLAGS="$LDFLAGS -L$libdir"
19637   fi
19638   # note: $X_LIBS includes $x_libraries
19639   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19640
19641   echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19642 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
19643 if test "${ac_cv_lib_util_forkpty+set}" = set; then
19644   echo $ECHO_N "(cached) $ECHO_C" >&6
19645 else
19646   ac_check_lib_save_LIBS=$LIBS
19647 LIBS="-lutil  $LIBS"
19648 cat >conftest.$ac_ext <<_ACEOF
19649 /* confdefs.h.  */
19650 _ACEOF
19651 cat confdefs.h >>conftest.$ac_ext
19652 cat >>conftest.$ac_ext <<_ACEOF
19653 /* end confdefs.h.  */
19654
19655 /* Override any gcc2 internal prototype to avoid an error.  */
19656 #ifdef __cplusplus
19657 extern "C"
19658 #endif
19659 /* We use char because int might match the return type of a gcc2
19660    builtin and then its argument prototype would still apply.  */
19661 char forkpty ();
19662 int
19663 main ()
19664 {
19665 forkpty ();
19666   ;
19667   return 0;
19668 }
19669 _ACEOF
19670 rm -f conftest.$ac_objext conftest$ac_exeext
19671 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19672   (eval $ac_link) 2>conftest.er1
19673   ac_status=$?
19674   grep -v '^ *+' conftest.er1 >conftest.err
19675   rm -f conftest.er1
19676   cat conftest.err >&5
19677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19678   (exit $ac_status); } &&
19679          { ac_try='test -z "$ac_c_werror_flag"
19680                          || test ! -s conftest.err'
19681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19682   (eval $ac_try) 2>&5
19683   ac_status=$?
19684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19685   (exit $ac_status); }; } &&
19686          { ac_try='test -s conftest$ac_exeext'
19687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19688   (eval $ac_try) 2>&5
19689   ac_status=$?
19690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19691   (exit $ac_status); }; }; then
19692   ac_cv_lib_util_forkpty=yes
19693 else
19694   echo "$as_me: failed program was:" >&5
19695 sed 's/^/| /' conftest.$ac_ext >&5
19696
19697 ac_cv_lib_util_forkpty=no
19698 fi
19699 rm -f conftest.err conftest.$ac_objext \
19700       conftest$ac_exeext conftest.$ac_ext
19701 LIBS=$ac_check_lib_save_LIBS
19702 fi
19703 echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19704 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
19705 if test $ac_cv_lib_util_forkpty = yes; then
19706   PTY_LIBS="-lutil"
19707                 cat >>confdefs.h <<\_ACEOF
19708 #define HAVE_FORKPTY 1
19709 _ACEOF
19710
19711 fi
19712
19713   CPPFLAGS="$ac_save_CPPFLAGS"
19714   LDFLAGS="$ac_save_LDFLAGS"
19715 #  LIBS="$ac_save_LIBS"
19716
19717
19718
19719 ###############################################################################
19720 #
19721 #       Check for the XSHM server extension.
19722 #
19723 ###############################################################################
19724
19725 have_xshm=no
19726 with_xshm_req=unspecified
19727
19728 # Check whether --with-xshm-ext or --without-xshm-ext was given.
19729 if test "${with_xshm_ext+set}" = set; then
19730   withval="$with_xshm_ext"
19731   with_xshm="$withval"; with_xshm_req="$withval"
19732 else
19733   with_xshm=yes
19734 fi;
19735
19736
19737    case "$with_xshm" in
19738     yes) ;;
19739     no)  ;;
19740
19741     /*)
19742      echo "$as_me:$LINENO: checking for XSHM headers" >&5
19743 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
19744      d=$with_xshm/include
19745      if test -d $d; then
19746        X_CFLAGS="-I$d $X_CFLAGS"
19747        echo "$as_me:$LINENO: result: $d" >&5
19748 echo "${ECHO_T}$d" >&6
19749      else
19750        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19751 echo "${ECHO_T}not found ($d: no such directory)" >&6
19752      fi
19753
19754      echo "$as_me:$LINENO: checking for XSHM libs" >&5
19755 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
19756      d=$with_xshm/lib
19757      if test -d $d; then
19758        X_LIBS="-L$d $X_LIBS"
19759        echo "$as_me:$LINENO: result: $d" >&5
19760 echo "${ECHO_T}$d" >&6
19761      else
19762        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19763 echo "${ECHO_T}not found ($d: no such directory)" >&6
19764      fi
19765
19766      # replace the directory string with "yes".
19767      with_xshm_req="yes"
19768      with_xshm=$with_xshm_req
19769      ;;
19770
19771     *)
19772      echo ""
19773      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
19774      echo "       If it is a directory, then \`DIR/include' will be added to"
19775      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19776      exit 1
19777      ;;
19778    esac
19779
19780
19781 if test "$with_xshm" = yes; then
19782
19783   # first check for Xshm.h.
19784
19785   ac_save_CPPFLAGS="$CPPFLAGS"
19786   if test \! -z "$includedir" ; then
19787     CPPFLAGS="$CPPFLAGS -I$includedir"
19788   fi
19789   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19790   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
19791 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
19792 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
19793   echo $ECHO_N "(cached) $ECHO_C" >&6
19794 else
19795   cat >conftest.$ac_ext <<_ACEOF
19796 /* confdefs.h.  */
19797 _ACEOF
19798 cat confdefs.h >>conftest.$ac_ext
19799 cat >>conftest.$ac_ext <<_ACEOF
19800 /* end confdefs.h.  */
19801 #include <X11/Xlib.h>
19802
19803 #include <X11/extensions/XShm.h>
19804 _ACEOF
19805 rm -f conftest.$ac_objext
19806 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19807   (eval $ac_compile) 2>conftest.er1
19808   ac_status=$?
19809   grep -v '^ *+' conftest.er1 >conftest.err
19810   rm -f conftest.er1
19811   cat conftest.err >&5
19812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19813   (exit $ac_status); } &&
19814          { ac_try='test -z "$ac_c_werror_flag"
19815                          || test ! -s conftest.err'
19816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19817   (eval $ac_try) 2>&5
19818   ac_status=$?
19819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19820   (exit $ac_status); }; } &&
19821          { ac_try='test -s conftest.$ac_objext'
19822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19823   (eval $ac_try) 2>&5
19824   ac_status=$?
19825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19826   (exit $ac_status); }; }; then
19827   ac_cv_header_X11_extensions_XShm_h=yes
19828 else
19829   echo "$as_me: failed program was:" >&5
19830 sed 's/^/| /' conftest.$ac_ext >&5
19831
19832 ac_cv_header_X11_extensions_XShm_h=no
19833 fi
19834 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19835 fi
19836 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
19837 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
19838 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
19839   have_xshm=yes
19840 fi
19841
19842
19843   CPPFLAGS="$ac_save_CPPFLAGS"
19844
19845   # if that succeeded, then check for sys/ipc.h.
19846   if test "$have_xshm" = yes; then
19847     have_xshm=no
19848
19849   ac_save_CPPFLAGS="$CPPFLAGS"
19850   if test \! -z "$includedir" ; then
19851     CPPFLAGS="$CPPFLAGS -I$includedir"
19852   fi
19853   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19854   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19855   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19856 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
19857 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19858   echo $ECHO_N "(cached) $ECHO_C" >&6
19859 fi
19860 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19861 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
19862 else
19863   # Is the header compilable?
19864 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
19865 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
19866 cat >conftest.$ac_ext <<_ACEOF
19867 /* confdefs.h.  */
19868 _ACEOF
19869 cat confdefs.h >>conftest.$ac_ext
19870 cat >>conftest.$ac_ext <<_ACEOF
19871 /* end confdefs.h.  */
19872 $ac_includes_default
19873 #include <sys/ipc.h>
19874 _ACEOF
19875 rm -f conftest.$ac_objext
19876 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19877   (eval $ac_compile) 2>conftest.er1
19878   ac_status=$?
19879   grep -v '^ *+' conftest.er1 >conftest.err
19880   rm -f conftest.er1
19881   cat conftest.err >&5
19882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19883   (exit $ac_status); } &&
19884          { ac_try='test -z "$ac_c_werror_flag"
19885                          || test ! -s conftest.err'
19886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19887   (eval $ac_try) 2>&5
19888   ac_status=$?
19889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19890   (exit $ac_status); }; } &&
19891          { ac_try='test -s conftest.$ac_objext'
19892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19893   (eval $ac_try) 2>&5
19894   ac_status=$?
19895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19896   (exit $ac_status); }; }; then
19897   ac_header_compiler=yes
19898 else
19899   echo "$as_me: failed program was:" >&5
19900 sed 's/^/| /' conftest.$ac_ext >&5
19901
19902 ac_header_compiler=no
19903 fi
19904 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19905 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19906 echo "${ECHO_T}$ac_header_compiler" >&6
19907
19908 # Is the header present?
19909 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
19910 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
19911 cat >conftest.$ac_ext <<_ACEOF
19912 /* confdefs.h.  */
19913 _ACEOF
19914 cat confdefs.h >>conftest.$ac_ext
19915 cat >>conftest.$ac_ext <<_ACEOF
19916 /* end confdefs.h.  */
19917 #include <sys/ipc.h>
19918 _ACEOF
19919 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19920   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19921   ac_status=$?
19922   grep -v '^ *+' conftest.er1 >conftest.err
19923   rm -f conftest.er1
19924   cat conftest.err >&5
19925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19926   (exit $ac_status); } >/dev/null; then
19927   if test -s conftest.err; then
19928     ac_cpp_err=$ac_c_preproc_warn_flag
19929     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19930   else
19931     ac_cpp_err=
19932   fi
19933 else
19934   ac_cpp_err=yes
19935 fi
19936 if test -z "$ac_cpp_err"; then
19937   ac_header_preproc=yes
19938 else
19939   echo "$as_me: failed program was:" >&5
19940 sed 's/^/| /' conftest.$ac_ext >&5
19941
19942   ac_header_preproc=no
19943 fi
19944 rm -f conftest.err conftest.$ac_ext
19945 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19946 echo "${ECHO_T}$ac_header_preproc" >&6
19947
19948 # So?  What about this header?
19949 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19950   yes:no: )
19951     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
19952 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19953     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
19954 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
19955     ac_header_preproc=yes
19956     ;;
19957   no:yes:* )
19958     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
19959 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
19960     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
19961 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
19962     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
19963 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
19964     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
19965 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19966     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
19967 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
19968     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
19969 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
19970     (
19971       cat <<\_ASBOX
19972 ## ------------------------------------------ ##
19973 ## Report this to the AC_PACKAGE_NAME lists.  ##
19974 ## ------------------------------------------ ##
19975 _ASBOX
19976     ) |
19977       sed "s/^/$as_me: WARNING:     /" >&2
19978     ;;
19979 esac
19980 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
19981 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
19982 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
19983   echo $ECHO_N "(cached) $ECHO_C" >&6
19984 else
19985   ac_cv_header_sys_ipc_h=$ac_header_preproc
19986 fi
19987 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
19988 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
19989
19990 fi
19991 if test $ac_cv_header_sys_ipc_h = yes; then
19992   have_xshm=yes
19993 fi
19994
19995
19996   CPPFLAGS="$ac_save_CPPFLAGS"
19997   fi
19998
19999   # if that succeeded, then check for sys/shm.h.
20000   if test "$have_xshm" = yes; then
20001     have_xshm=no
20002
20003   ac_save_CPPFLAGS="$CPPFLAGS"
20004   if test \! -z "$includedir" ; then
20005     CPPFLAGS="$CPPFLAGS -I$includedir"
20006   fi
20007   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20008   if test "${ac_cv_header_sys_shm_h+set}" = set; then
20009   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
20010 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
20011 if test "${ac_cv_header_sys_shm_h+set}" = set; then
20012   echo $ECHO_N "(cached) $ECHO_C" >&6
20013 fi
20014 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
20015 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
20016 else
20017   # Is the header compilable?
20018 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
20019 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
20020 cat >conftest.$ac_ext <<_ACEOF
20021 /* confdefs.h.  */
20022 _ACEOF
20023 cat confdefs.h >>conftest.$ac_ext
20024 cat >>conftest.$ac_ext <<_ACEOF
20025 /* end confdefs.h.  */
20026 $ac_includes_default
20027 #include <sys/shm.h>
20028 _ACEOF
20029 rm -f conftest.$ac_objext
20030 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20031   (eval $ac_compile) 2>conftest.er1
20032   ac_status=$?
20033   grep -v '^ *+' conftest.er1 >conftest.err
20034   rm -f conftest.er1
20035   cat conftest.err >&5
20036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20037   (exit $ac_status); } &&
20038          { ac_try='test -z "$ac_c_werror_flag"
20039                          || test ! -s conftest.err'
20040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20041   (eval $ac_try) 2>&5
20042   ac_status=$?
20043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20044   (exit $ac_status); }; } &&
20045          { ac_try='test -s conftest.$ac_objext'
20046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20047   (eval $ac_try) 2>&5
20048   ac_status=$?
20049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20050   (exit $ac_status); }; }; then
20051   ac_header_compiler=yes
20052 else
20053   echo "$as_me: failed program was:" >&5
20054 sed 's/^/| /' conftest.$ac_ext >&5
20055
20056 ac_header_compiler=no
20057 fi
20058 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20059 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20060 echo "${ECHO_T}$ac_header_compiler" >&6
20061
20062 # Is the header present?
20063 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
20064 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
20065 cat >conftest.$ac_ext <<_ACEOF
20066 /* confdefs.h.  */
20067 _ACEOF
20068 cat confdefs.h >>conftest.$ac_ext
20069 cat >>conftest.$ac_ext <<_ACEOF
20070 /* end confdefs.h.  */
20071 #include <sys/shm.h>
20072 _ACEOF
20073 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20074   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20075   ac_status=$?
20076   grep -v '^ *+' conftest.er1 >conftest.err
20077   rm -f conftest.er1
20078   cat conftest.err >&5
20079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20080   (exit $ac_status); } >/dev/null; then
20081   if test -s conftest.err; then
20082     ac_cpp_err=$ac_c_preproc_warn_flag
20083     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20084   else
20085     ac_cpp_err=
20086   fi
20087 else
20088   ac_cpp_err=yes
20089 fi
20090 if test -z "$ac_cpp_err"; then
20091   ac_header_preproc=yes
20092 else
20093   echo "$as_me: failed program was:" >&5
20094 sed 's/^/| /' conftest.$ac_ext >&5
20095
20096   ac_header_preproc=no
20097 fi
20098 rm -f conftest.err conftest.$ac_ext
20099 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20100 echo "${ECHO_T}$ac_header_preproc" >&6
20101
20102 # So?  What about this header?
20103 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20104   yes:no: )
20105     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
20106 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20107     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
20108 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
20109     ac_header_preproc=yes
20110     ;;
20111   no:yes:* )
20112     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
20113 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
20114     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
20115 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
20116     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
20117 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
20118     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
20119 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
20120     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
20121 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
20122     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
20123 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
20124     (
20125       cat <<\_ASBOX
20126 ## ------------------------------------------ ##
20127 ## Report this to the AC_PACKAGE_NAME lists.  ##
20128 ## ------------------------------------------ ##
20129 _ASBOX
20130     ) |
20131       sed "s/^/$as_me: WARNING:     /" >&2
20132     ;;
20133 esac
20134 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
20135 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
20136 if test "${ac_cv_header_sys_shm_h+set}" = set; then
20137   echo $ECHO_N "(cached) $ECHO_C" >&6
20138 else
20139   ac_cv_header_sys_shm_h=$ac_header_preproc
20140 fi
20141 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
20142 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
20143
20144 fi
20145 if test $ac_cv_header_sys_shm_h = yes; then
20146   have_xshm=yes
20147 fi
20148
20149
20150   CPPFLAGS="$ac_save_CPPFLAGS"
20151   fi
20152
20153   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
20154   # to exist, but the library code to not exist.  And even better, the library
20155   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
20156   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
20157   # that's not quite right, but close enough.)
20158   #
20159   case "$host" in
20160     *-aix*)
20161       if  `uname -v` -eq 3 ; then
20162         have_xshm=no
20163
20164   ac_save_CPPFLAGS="$CPPFLAGS"
20165   ac_save_LDFLAGS="$LDFLAGS"
20166 #  ac_save_LIBS="$LIBS"
20167
20168   if test \! -z "$includedir" ; then
20169     CPPFLAGS="$CPPFLAGS -I$includedir"
20170   fi
20171   # note: $X_CFLAGS includes $x_includes
20172   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20173
20174   if test \! -z "$libdir" ; then
20175     LDFLAGS="$LDFLAGS -L$libdir"
20176   fi
20177   # note: $X_LIBS includes $x_libraries
20178   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
20179
20180   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
20181 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
20182 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
20183   echo $ECHO_N "(cached) $ECHO_C" >&6
20184 else
20185   ac_check_lib_save_LIBS=$LIBS
20186 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
20187 cat >conftest.$ac_ext <<_ACEOF
20188 /* confdefs.h.  */
20189 _ACEOF
20190 cat confdefs.h >>conftest.$ac_ext
20191 cat >>conftest.$ac_ext <<_ACEOF
20192 /* end confdefs.h.  */
20193
20194 /* Override any gcc2 internal prototype to avoid an error.  */
20195 #ifdef __cplusplus
20196 extern "C"
20197 #endif
20198 /* We use char because int might match the return type of a gcc2
20199    builtin and then its argument prototype would still apply.  */
20200 char XShmQueryExtension ();
20201 int
20202 main ()
20203 {
20204 XShmQueryExtension ();
20205   ;
20206   return 0;
20207 }
20208 _ACEOF
20209 rm -f conftest.$ac_objext conftest$ac_exeext
20210 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20211   (eval $ac_link) 2>conftest.er1
20212   ac_status=$?
20213   grep -v '^ *+' conftest.er1 >conftest.err
20214   rm -f conftest.er1
20215   cat conftest.err >&5
20216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20217   (exit $ac_status); } &&
20218          { ac_try='test -z "$ac_c_werror_flag"
20219                          || test ! -s conftest.err'
20220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20221   (eval $ac_try) 2>&5
20222   ac_status=$?
20223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20224   (exit $ac_status); }; } &&
20225          { ac_try='test -s conftest$ac_exeext'
20226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20227   (eval $ac_try) 2>&5
20228   ac_status=$?
20229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20230   (exit $ac_status); }; }; then
20231   ac_cv_lib_XextSam_XShmQueryExtension=yes
20232 else
20233   echo "$as_me: failed program was:" >&5
20234 sed 's/^/| /' conftest.$ac_ext >&5
20235
20236 ac_cv_lib_XextSam_XShmQueryExtension=no
20237 fi
20238 rm -f conftest.err conftest.$ac_objext \
20239       conftest$ac_exeext conftest.$ac_ext
20240 LIBS=$ac_check_lib_save_LIBS
20241 fi
20242 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
20243 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
20244 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
20245   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
20246 else
20247   true
20248 fi
20249
20250   CPPFLAGS="$ac_save_CPPFLAGS"
20251   LDFLAGS="$ac_save_LDFLAGS"
20252 #  LIBS="$ac_save_LIBS"
20253
20254       fi
20255     ;;
20256   esac
20257
20258   # if that succeeded, then we've really got it.
20259   if test "$have_xshm" = yes; then
20260     cat >>confdefs.h <<\_ACEOF
20261 #define HAVE_XSHM_EXTENSION 1
20262 _ACEOF
20263
20264   fi
20265
20266 elif test "$with_xshm" != no; then
20267   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
20268   exit 1
20269 fi
20270
20271
20272 ###############################################################################
20273 #
20274 #       Check for the DOUBLE-BUFFER server extension.
20275 #
20276 ###############################################################################
20277
20278 have_xdbe=no
20279 with_xdbe_req=unspecified
20280
20281 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
20282 if test "${with_xdbe_ext+set}" = set; then
20283   withval="$with_xdbe_ext"
20284   with_xdbe="$withval"; with_xdbe_req="$withval"
20285 else
20286   with_xdbe=yes
20287 fi;
20288
20289
20290    case "$with_xdbe" in
20291     yes) ;;
20292     no)  ;;
20293
20294     /*)
20295      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
20296 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
20297      d=$with_xdbe/include
20298      if test -d $d; then
20299        X_CFLAGS="-I$d $X_CFLAGS"
20300        echo "$as_me:$LINENO: result: $d" >&5
20301 echo "${ECHO_T}$d" >&6
20302      else
20303        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20304 echo "${ECHO_T}not found ($d: no such directory)" >&6
20305      fi
20306
20307      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
20308 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
20309      d=$with_xdbe/lib
20310      if test -d $d; then
20311        X_LIBS="-L$d $X_LIBS"
20312        echo "$as_me:$LINENO: result: $d" >&5
20313 echo "${ECHO_T}$d" >&6
20314      else
20315        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20316 echo "${ECHO_T}not found ($d: no such directory)" >&6
20317      fi
20318
20319      # replace the directory string with "yes".
20320      with_xdbe_req="yes"
20321      with_xdbe=$with_xdbe_req
20322      ;;
20323
20324     *)
20325      echo ""
20326      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
20327      echo "       If it is a directory, then \`DIR/include' will be added to"
20328      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20329      exit 1
20330      ;;
20331    esac
20332
20333
20334 if test "$with_xdbe" = yes; then
20335
20336
20337   ac_save_CPPFLAGS="$CPPFLAGS"
20338   if test \! -z "$includedir" ; then
20339     CPPFLAGS="$CPPFLAGS -I$includedir"
20340   fi
20341   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20342   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
20343 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
20344 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
20345   echo $ECHO_N "(cached) $ECHO_C" >&6
20346 else
20347   cat >conftest.$ac_ext <<_ACEOF
20348 /* confdefs.h.  */
20349 _ACEOF
20350 cat confdefs.h >>conftest.$ac_ext
20351 cat >>conftest.$ac_ext <<_ACEOF
20352 /* end confdefs.h.  */
20353 #include <X11/Xlib.h>
20354
20355 #include <X11/extensions/Xdbe.h>
20356 _ACEOF
20357 rm -f conftest.$ac_objext
20358 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20359   (eval $ac_compile) 2>conftest.er1
20360   ac_status=$?
20361   grep -v '^ *+' conftest.er1 >conftest.err
20362   rm -f conftest.er1
20363   cat conftest.err >&5
20364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20365   (exit $ac_status); } &&
20366          { ac_try='test -z "$ac_c_werror_flag"
20367                          || test ! -s conftest.err'
20368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20369   (eval $ac_try) 2>&5
20370   ac_status=$?
20371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20372   (exit $ac_status); }; } &&
20373          { ac_try='test -s conftest.$ac_objext'
20374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20375   (eval $ac_try) 2>&5
20376   ac_status=$?
20377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20378   (exit $ac_status); }; }; then
20379   ac_cv_header_X11_extensions_Xdbe_h=yes
20380 else
20381   echo "$as_me: failed program was:" >&5
20382 sed 's/^/| /' conftest.$ac_ext >&5
20383
20384 ac_cv_header_X11_extensions_Xdbe_h=no
20385 fi
20386 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20387 fi
20388 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
20389 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
20390 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
20391   have_xdbe=yes
20392 fi
20393
20394
20395   CPPFLAGS="$ac_save_CPPFLAGS"
20396   if test "$have_xdbe" = yes; then
20397     cat >>confdefs.h <<\_ACEOF
20398 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
20399 _ACEOF
20400
20401   fi
20402
20403 elif test "$with_xdbe" != no; then
20404   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
20405   exit 1
20406 fi
20407
20408
20409 ###############################################################################
20410 #
20411 #       Check for the SGI XReadDisplay server extension.
20412 #
20413 #       Note: this has to be down here, rather than up with the other server
20414 #       extension tests, so that the output of `configure --help' is in the
20415 #       right order.  Arrgh!
20416 #
20417 ###############################################################################
20418
20419 have_readdisplay=no
20420 with_readdisplay_req=unspecified
20421
20422 # Check whether --with-readdisplay or --without-readdisplay was given.
20423 if test "${with_readdisplay+set}" = set; then
20424   withval="$with_readdisplay"
20425   with_readdisplay="$withval"; with_readdisplay_req="$withval"
20426 else
20427   with_readdisplay=yes
20428 fi;
20429
20430
20431    case "$with_readdisplay" in
20432     yes) ;;
20433     no)  ;;
20434
20435     /*)
20436      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
20437 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
20438      d=$with_readdisplay/include
20439      if test -d $d; then
20440        X_CFLAGS="-I$d $X_CFLAGS"
20441        echo "$as_me:$LINENO: result: $d" >&5
20442 echo "${ECHO_T}$d" >&6
20443      else
20444        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20445 echo "${ECHO_T}not found ($d: no such directory)" >&6
20446      fi
20447
20448      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
20449 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
20450      d=$with_readdisplay/lib
20451      if test -d $d; then
20452        X_LIBS="-L$d $X_LIBS"
20453        echo "$as_me:$LINENO: result: $d" >&5
20454 echo "${ECHO_T}$d" >&6
20455      else
20456        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20457 echo "${ECHO_T}not found ($d: no such directory)" >&6
20458      fi
20459
20460      # replace the directory string with "yes".
20461      with_readdisplay_req="yes"
20462      with_readdisplay=$with_readdisplay_req
20463      ;;
20464
20465     *)
20466      echo ""
20467      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
20468      echo "       If it is a directory, then \`DIR/include' will be added to"
20469      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20470      exit 1
20471      ;;
20472    esac
20473
20474
20475 if test "$with_readdisplay" = yes; then
20476
20477   ac_save_CPPFLAGS="$CPPFLAGS"
20478   if test \! -z "$includedir" ; then
20479     CPPFLAGS="$CPPFLAGS -I$includedir"
20480   fi
20481   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
20482   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
20483 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
20484 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
20485   echo $ECHO_N "(cached) $ECHO_C" >&6
20486 else
20487   cat >conftest.$ac_ext <<_ACEOF
20488 /* confdefs.h.  */
20489 _ACEOF
20490 cat confdefs.h >>conftest.$ac_ext
20491 cat >>conftest.$ac_ext <<_ACEOF
20492 /* end confdefs.h.  */
20493 #include <X11/Xlib.h>
20494
20495 #include <X11/extensions/readdisplay.h>
20496 _ACEOF
20497 rm -f conftest.$ac_objext
20498 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20499   (eval $ac_compile) 2>conftest.er1
20500   ac_status=$?
20501   grep -v '^ *+' conftest.er1 >conftest.err
20502   rm -f conftest.er1
20503   cat conftest.err >&5
20504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20505   (exit $ac_status); } &&
20506          { ac_try='test -z "$ac_c_werror_flag"
20507                          || test ! -s conftest.err'
20508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20509   (eval $ac_try) 2>&5
20510   ac_status=$?
20511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20512   (exit $ac_status); }; } &&
20513          { ac_try='test -s conftest.$ac_objext'
20514   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20515   (eval $ac_try) 2>&5
20516   ac_status=$?
20517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20518   (exit $ac_status); }; }; then
20519   ac_cv_header_X11_extensions_readdisplay_h=yes
20520 else
20521   echo "$as_me: failed program was:" >&5
20522 sed 's/^/| /' conftest.$ac_ext >&5
20523
20524 ac_cv_header_X11_extensions_readdisplay_h=no
20525 fi
20526 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20527 fi
20528 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
20529 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
20530 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
20531   cat >>confdefs.h <<\_ACEOF
20532 #define HAVE_READ_DISPLAY_EXTENSION 1
20533 _ACEOF
20534
20535 fi
20536
20537
20538   CPPFLAGS="$ac_save_CPPFLAGS"
20539 elif test "$with_readdisplay" != no; then
20540   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
20541   exit 1
20542 fi
20543
20544
20545 ###############################################################################
20546 #
20547 #       Check for a program to generate random text.
20548 #
20549 #       Zippy is funnier than the idiocy generally spat out by `fortune',
20550 #       so first see if "fortune zippy" works.  Else, use plain "fortune".
20551 #
20552 #       We used to dig around in Emacs to look for the "yow" program, but
20553 #       most people who have Emacs also have "fortune zippy", so nevermind.
20554 #
20555 ###############################################################################
20556
20557 with_fortune_req=""
20558
20559 # Check whether --with-fortune or --without-fortune was given.
20560 if test "${with_fortune+set}" = set; then
20561   withval="$with_fortune"
20562   with_fortune_req="$withval"; with_fortune="$withval"
20563 else
20564   with_fortune=yes
20565 fi;
20566
20567 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
20568   with_fortune=""
20569   with_fortune_req=""
20570 fi
20571
20572 if test -n "$with_fortune_req" ; then
20573   ac_cv_fortune_program=""
20574   case "$with_fortune_req" in
20575     /*)
20576
20577       set dummy $with_fortune_req ; fortune_tmp=$2
20578       echo "$as_me:$LINENO: checking for $fortune_tmp" >&5
20579 echo $ECHO_N "checking for $fortune_tmp... $ECHO_C" >&6
20580       if test -x "$fortune_tmp" ; then
20581         echo "$as_me:$LINENO: result: yes" >&5
20582 echo "${ECHO_T}yes" >&6
20583       else
20584         echo "$as_me:$LINENO: result: no" >&5
20585 echo "${ECHO_T}no" >&6
20586         with_fortune=""
20587       fi
20588     ;;
20589     *)
20590       set dummy $with_fortune_req ; fortune_tmp=$2
20591       # don't cache
20592       unset ac_cv_path_fortune_tmp
20593       # Extract the first word of "$fortune_tmp", so it can be a program name with args.
20594 set dummy $fortune_tmp; ac_word=$2
20595 echo "$as_me:$LINENO: checking for $ac_word" >&5
20596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20597 if test "${ac_cv_path_fortune_tmp+set}" = set; then
20598   echo $ECHO_N "(cached) $ECHO_C" >&6
20599 else
20600   case $fortune_tmp in
20601   [\\/]* | ?:[\\/]*)
20602   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
20603   ;;
20604   *)
20605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20606 for as_dir in $PATH
20607 do
20608   IFS=$as_save_IFS
20609   test -z "$as_dir" && as_dir=.
20610   for ac_exec_ext in '' $ac_executable_extensions; do
20611   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20612     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
20613     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20614     break 2
20615   fi
20616 done
20617 done
20618
20619   ;;
20620 esac
20621 fi
20622 fortune_tmp=$ac_cv_path_fortune_tmp
20623
20624 if test -n "$fortune_tmp"; then
20625   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
20626 echo "${ECHO_T}$fortune_tmp" >&6
20627 else
20628   echo "$as_me:$LINENO: result: no" >&5
20629 echo "${ECHO_T}no" >&6
20630 fi
20631
20632       if test -z "$fortune_tmp" ; then
20633         with_fortune=""
20634       fi
20635     ;;
20636   esac
20637   ac_cv_fortune_program="$with_fortune"
20638
20639 elif test -n "$ac_cv_fortune_program"; then
20640   echo "$as_me:$LINENO: result: checking for fortune... (cached) $ac_cv_fortune_program" >&5
20641 echo "${ECHO_T}checking for fortune... (cached) $ac_cv_fortune_program" >&6
20642 fi
20643
20644 unset ac_cv_path_fortune_tmp
20645 unset fortune_tmp
20646
20647 if test -z "$ac_cv_fortune_program" ; then
20648
20649   # first look for fortune in /usr/games/ (and use absolute path)
20650   for ac_prog in fortune
20651 do
20652   # Extract the first word of "$ac_prog", so it can be a program name with args.
20653 set dummy $ac_prog; ac_word=$2
20654 echo "$as_me:$LINENO: checking for $ac_word" >&5
20655 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20656 if test "${ac_cv_path_fortune_tmp+set}" = set; then
20657   echo $ECHO_N "(cached) $ECHO_C" >&6
20658 else
20659   case $fortune_tmp in
20660   [\\/]* | ?:[\\/]*)
20661   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
20662   ;;
20663   *)
20664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20665 for as_dir in "/usr/games"
20666 do
20667   IFS=$as_save_IFS
20668   test -z "$as_dir" && as_dir=.
20669   for ac_exec_ext in '' $ac_executable_extensions; do
20670   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20671     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
20672     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20673     break 2
20674   fi
20675 done
20676 done
20677
20678   ;;
20679 esac
20680 fi
20681 fortune_tmp=$ac_cv_path_fortune_tmp
20682
20683 if test -n "$fortune_tmp"; then
20684   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
20685 echo "${ECHO_T}$fortune_tmp" >&6
20686 else
20687   echo "$as_me:$LINENO: result: no" >&5
20688 echo "${ECHO_T}no" >&6
20689 fi
20690
20691   test -n "$fortune_tmp" && break
20692 done
20693
20694
20695   # if it's not there, look on $PATH (and don't use absolute path)
20696   if test -z "$fortune_tmp" ; then
20697      for ac_prog in fortune
20698 do
20699   # Extract the first word of "$ac_prog", so it can be a program name with args.
20700 set dummy $ac_prog; ac_word=$2
20701 echo "$as_me:$LINENO: checking for $ac_word" >&5
20702 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20703 if test "${ac_cv_prog_fortune_tmp+set}" = set; then
20704   echo $ECHO_N "(cached) $ECHO_C" >&6
20705 else
20706   if test -n "$fortune_tmp"; then
20707   ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
20708 else
20709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20710 for as_dir in $PATH
20711 do
20712   IFS=$as_save_IFS
20713   test -z "$as_dir" && as_dir=.
20714   for ac_exec_ext in '' $ac_executable_extensions; do
20715   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20716     ac_cv_prog_fortune_tmp="$ac_prog"
20717     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20718     break 2
20719   fi
20720 done
20721 done
20722
20723 fi
20724 fi
20725 fortune_tmp=$ac_cv_prog_fortune_tmp
20726 if test -n "$fortune_tmp"; then
20727   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
20728 echo "${ECHO_T}$fortune_tmp" >&6
20729 else
20730   echo "$as_me:$LINENO: result: no" >&5
20731 echo "${ECHO_T}no" >&6
20732 fi
20733
20734   test -n "$fortune_tmp" && break
20735 done
20736
20737   fi
20738
20739   # if we didn't find anything, then just assume /usr/games/
20740   if test -z "$fortune_tmp" ; then
20741      fortune_tmp="/usr/games/fortune"
20742   fi
20743
20744   ac_cv_fortune_program="$fortune_tmp"
20745
20746   # now check to see whether "fortune zippy" works.
20747   #
20748   fortune_tmp="$fortune_tmp zippy"
20749   echo "$as_me:$LINENO: checking for zippy quotes" >&5
20750 echo $ECHO_N "checking for zippy quotes... $ECHO_C" >&6
20751   if ( $fortune_tmp >/dev/null 2>&1 ); then
20752     ac_cv_fortune_program="$fortune_tmp"
20753     echo "$as_me:$LINENO: result: $fortune_tmp" >&5
20754 echo "${ECHO_T}$fortune_tmp" >&6
20755   else
20756     echo "$as_me:$LINENO: result: no" >&5
20757 echo "${ECHO_T}no" >&6
20758   fi
20759
20760 fi
20761
20762 unset ac_cv_path_fortune_tmp
20763 unset fortune_tmp
20764
20765 cat >>confdefs.h <<_ACEOF
20766 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
20767 _ACEOF
20768
20769
20770
20771 ###############################################################################
20772 #
20773 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
20774 #       This should be safe, but let's give people the option.
20775 #
20776 ###############################################################################
20777
20778 setuid_hacks_default=no
20779 setuid_hacks="$setuid_hacks_default"
20780
20781 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
20782 if test "${with_setuid_hacks+set}" = set; then
20783   withval="$with_setuid_hacks"
20784   setuid_hacks="$withval"
20785 else
20786   setuid_hacks="$setuid_hacks_default"
20787 fi;
20788
20789
20790    case "$setuid_hacks" in
20791     yes) ;;
20792     no)  ;;
20793
20794     /*)
20795      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
20796 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
20797      d=$setuid_hacks/include
20798      if test -d $d; then
20799        X_CFLAGS="-I$d $X_CFLAGS"
20800        echo "$as_me:$LINENO: result: $d" >&5
20801 echo "${ECHO_T}$d" >&6
20802      else
20803        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20804 echo "${ECHO_T}not found ($d: no such directory)" >&6
20805      fi
20806
20807      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
20808 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
20809      d=$setuid_hacks/lib
20810      if test -d $d; then
20811        X_LIBS="-L$d $X_LIBS"
20812        echo "$as_me:$LINENO: result: $d" >&5
20813 echo "${ECHO_T}$d" >&6
20814      else
20815        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
20816 echo "${ECHO_T}not found ($d: no such directory)" >&6
20817      fi
20818
20819      # replace the directory string with "yes".
20820      setuid_hacks_req="yes"
20821      setuid_hacks=$setuid_hacks_req
20822      ;;
20823
20824     *)
20825      echo ""
20826      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
20827      echo "       If it is a directory, then \`DIR/include' will be added to"
20828      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
20829      exit 1
20830      ;;
20831    esac
20832
20833
20834 if test "$setuid_hacks" = yes; then
20835   true
20836 elif test "$setuid_hacks" != no; then
20837   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
20838   exit 1
20839 fi
20840
20841
20842 ###############################################################################
20843 #
20844 #       Done testing.  Now, set up the various -I and -L variables,
20845 #       and decide which GUI program to build by default.
20846 #
20847 ###############################################################################
20848
20849 DEPEND=makedepend
20850 DEPEND_FLAGS=
20851 DEPEND_DEFINES=
20852
20853
20854 if test \! -z "$includedir" ; then
20855   INCLUDES="$INCLUDES -I$includedir"
20856 fi
20857
20858 if test \! -z "$libdir" ; then
20859   LDFLAGS="$LDFLAGS -L$libdir"
20860 fi
20861
20862
20863 PREFERRED_DEMO_PROGRAM=''
20864 ALL_DEMO_PROGRAMS=
20865 if test "$have_motif" = yes; then
20866   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
20867   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20868 fi
20869 if test "$have_gtk" = yes; then
20870   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
20871   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
20872 fi
20873
20874
20875 if test "$have_kerberos" = yes; then
20876   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
20877   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
20878 fi
20879 if test "$have_pam" = yes; then
20880   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
20881   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
20882   INSTALL_PAM="install-pam"
20883 fi
20884 if test "$have_passwd_helper" = yes; then
20885   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
20886   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
20887 fi
20888   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
20889   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
20890
20891
20892 if test "$enable_locking" = yes; then
20893   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
20894   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
20895 else
20896   LOCK_SRCS='$(NOLOCK_SRCS_1)'
20897   LOCK_OBJS='$(NOLOCK_OBJS_1)'
20898 fi
20899
20900 if test "$ac_macosx" = yes; then
20901   EXES_OSX='$(EXES_OSX)'
20902   SCRIPTS_OSX='$(SCRIPTS_OSX)'
20903   MEN_OSX='$(MEN_OSX)'
20904 else
20905   EXES_OSX=
20906   SCRIPTS_OSX=
20907   MEN_OSX=
20908 fi
20909
20910
20911 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
20912
20913 if test "$need_setuid" = yes; then
20914   NEED_SETUID=yes
20915 else
20916   NEED_SETUID=no
20917 fi
20918
20919 if test "$setuid_hacks" = yes; then
20920   SETUID_HACKS=yes
20921 else
20922   SETUID_HACKS=no
20923 fi
20924
20925 tab='   '
20926 if test "$have_gl" = yes; then
20927   GL_EXES='$(GL_EXES)'
20928   GL_UTIL_EXES='$(GL_UTIL_EXES)'
20929   GL_MEN='$(GL_MEN)'
20930   GL_KLUDGE="${tab}  "
20931 else
20932   GL_KLUDGE="-${tab}  "
20933 fi
20934
20935 if test "$have_gle" = yes; then
20936   GLE_EXES='$(GLE_EXES)'
20937   GLE_KLUDGE="${tab}   "
20938 else
20939   GLE_KLUDGE="-${tab}   "
20940 fi
20941
20942 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
20943  JPEG_EXES='$(JPEG_EXES)'
20944 fi
20945
20946
20947 # Another substitution in the XScreenSaver.ad.in file:
20948 #
20949 if test "$have_gnome_help" = yes; then
20950   GNOMEHELP_Y=''
20951   GNOMEHELP_N='!    '
20952 else
20953   GNOMEHELP_Y='!    '
20954   GNOMEHELP_N=''
20955 fi
20956
20957
20958 # Now that we know whether we have Gnome, we can decide where the XML
20959 # config files get installed.
20960 #
20961 if test -z "$HACK_CONF_DIR" ; then
20962   if test -n "$GNOME_DATADIR" ; then
20963     HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
20964   else
20965     HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
20966   fi
20967 fi
20968
20969
20970
20971 # After computing $HACK_CONF_DIR, make sure $GLADE_DATADIR has a value
20972 # so that we know where to install the Gtk pixmaps.
20973 #
20974 # It should usually be "/usr/share/pixmaps/", but we can't just use
20975 # "$(prefix)/share/pixmaps" because that would usually result in
20976 # "/usr/X11R6/share/pixmaps/", which is wrong.  It needs to be the
20977 # Gnome/Gtk prefix, not the overall prefix.
20978 #
20979 if test -n "$GNOME_DATADIR" ; then
20980   GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver'
20981 elif test "$have_gtk" = yes; then
20982   if test -n "$pkg_config"; then
20983     if test "$have_gtk2" = yes; then
20984       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
20985     else
20986       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+`
20987     fi
20988   else
20989     GLADE_DATADIR=`$gtk_config --prefix`
20990   fi
20991   GLADE_DATADIR="$GLADE_DATADIR/share/xscreensaver"
20992 else
20993   GLADE_DATADIR=''
20994 fi
20995
20996
20997 # Set PO_DATADIR to something sensible.
20998 #
20999 echo "$as_me:$LINENO: checking for locale directory" >&5
21000 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
21001 if test -n "$GNOME_DATADIR" ; then
21002   PO_DATADIR="$GNOME_DATADIR"
21003 elif test "$have_gtk" = yes; then
21004   if test -n "$pkg_config"; then
21005     if test "$have_gtk2" = yes; then
21006       PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
21007     else
21008       PO_DATADIR=`$pkg_config --variable=prefix gtk+`
21009     fi
21010   else
21011     PO_DATADIR=`$gtk_config --prefix`
21012   fi
21013   PO_DATADIR="$PO_DATADIR/share"
21014 fi
21015
21016 if test -z "$PO_DATADIR" ; then
21017   #
21018   # #### Total fucking kludge --
21019   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
21020   # but of course we need to expand all the nested variables to do that...
21021   #
21022   dd=$datadir
21023   eval dd=${dd}
21024   eval dd=${dd}
21025   eval dd=${dd}
21026   eval dd=${dd}
21027   eval dd=${dd}
21028   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
21029 fi
21030
21031 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
21032 echo "${ECHO_T}$PO_DATADIR/locale" >&6
21033
21034
21035 # canonicalize slashes.
21036 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
21037
21038 # gcc 3.0 likes to issue this warning for every file:
21039 #
21040 # cc1: warning: changing search order for system directory "/usr/local/include"
21041 # cc1: warning:   as it has already been specified as a non-system directory
21042 #
21043 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
21044 # Which *should* be totally redundant, and thus an ok thing to delete?
21045 #
21046 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
21047
21048
21049 ###############################################################################
21050 #
21051 #       Perform substitutions and write Makefiles.
21052 #
21053 ###############################################################################
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109 APPDEFAULTS=$ac_x_app_defaults
21110
21111
21112
21113
21114
21115
21116
21117                                                                                 ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad driver/xscreensaver.kss"
21118 cat >confcache <<\_ACEOF
21119 # This file is a shell script that caches the results of configure
21120 # tests run on this system so they can be shared between configure
21121 # scripts and configure runs, see configure's option --config-cache.
21122 # It is not useful on other systems.  If it contains results you don't
21123 # want to keep, you may remove or edit it.
21124 #
21125 # config.status only pays attention to the cache file if you give it
21126 # the --recheck option to rerun configure.
21127 #
21128 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21129 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21130 # following values.
21131
21132 _ACEOF
21133
21134 # The following way of writing the cache mishandles newlines in values,
21135 # but we know of no workaround that is simple, portable, and efficient.
21136 # So, don't put newlines in cache variables' values.
21137 # Ultrix sh set writes to stderr and can't be redirected directly,
21138 # and sets the high bit in the cache file unless we assign to the vars.
21139 {
21140   (set) 2>&1 |
21141     case `(ac_space=' '; set | grep ac_space) 2>&1` in
21142     *ac_space=\ *)
21143       # `set' does not quote correctly, so add quotes (double-quote
21144       # substitution turns \\\\ into \\, and sed turns \\ into \).
21145       sed -n \
21146         "s/'/'\\\\''/g;
21147           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21148       ;;
21149     *)
21150       # `set' quotes correctly as required by POSIX, so do not add quotes.
21151       sed -n \
21152         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21153       ;;
21154     esac;
21155 } |
21156   sed '
21157      t clear
21158      : clear
21159      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21160      t end
21161      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21162      : end' >>confcache
21163 if diff $cache_file confcache >/dev/null 2>&1; then :; else
21164   if test -w $cache_file; then
21165     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21166     cat confcache >$cache_file
21167   else
21168     echo "not updating unwritable cache $cache_file"
21169   fi
21170 fi
21171 rm -f confcache
21172
21173 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21174 # Let make expand exec_prefix.
21175 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21176
21177 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21178 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21179 # trailing colons and then remove the whole line if VPATH becomes empty
21180 # (actually we leave an empty line to preserve line numbers).
21181 if test "x$srcdir" = x.; then
21182   ac_vpsub='/^[  ]*VPATH[        ]*=/{
21183 s/:*\$(srcdir):*/:/;
21184 s/:*\${srcdir}:*/:/;
21185 s/:*@srcdir@:*/:/;
21186 s/^\([^=]*=[     ]*\):*/\1/;
21187 s/:*$//;
21188 s/^[^=]*=[       ]*$//;
21189 }'
21190 fi
21191
21192 DEFS=-DHAVE_CONFIG_H
21193
21194 ac_libobjs=
21195 ac_ltlibobjs=
21196 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21197   # 1. Remove the extension, and $U if already installed.
21198   ac_i=`echo "$ac_i" |
21199          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
21200   # 2. Add them.
21201   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21202   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
21203 done
21204 LIBOBJS=$ac_libobjs
21205
21206 LTLIBOBJS=$ac_ltlibobjs
21207
21208
21209
21210
21211         mv -f po/POTFILES po/POTFILES.tmp
21212         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
21213         rm -f po/POTFILES.tmp
21214
21215
21216
21217 : ${CONFIG_STATUS=./config.status}
21218 ac_clean_files_save=$ac_clean_files
21219 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21220 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21221 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21222 cat >$CONFIG_STATUS <<_ACEOF
21223 #! $SHELL
21224 # Generated by $as_me.
21225 # Run this file to recreate the current configuration.
21226 # Compiler output produced by configure, useful for debugging
21227 # configure, is in config.log if it exists.
21228
21229 debug=false
21230 ac_cs_recheck=false
21231 ac_cs_silent=false
21232 SHELL=\${CONFIG_SHELL-$SHELL}
21233 _ACEOF
21234
21235 cat >>$CONFIG_STATUS <<\_ACEOF
21236 ## --------------------- ##
21237 ## M4sh Initialization.  ##
21238 ## --------------------- ##
21239
21240 # Be Bourne compatible
21241 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21242   emulate sh
21243   NULLCMD=:
21244   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21245   # is contrary to our usage.  Disable this feature.
21246   alias -g '${1+"$@"}'='"$@"'
21247 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21248   set -o posix
21249 fi
21250 DUALCASE=1; export DUALCASE # for MKS sh
21251
21252 # Support unset when possible.
21253 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
21254   as_unset=unset
21255 else
21256   as_unset=false
21257 fi
21258
21259
21260 # Work around bugs in pre-3.0 UWIN ksh.
21261 $as_unset ENV MAIL MAILPATH
21262 PS1='$ '
21263 PS2='> '
21264 PS4='+ '
21265
21266 # NLS nuisances.
21267 for as_var in \
21268   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21269   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21270   LC_TELEPHONE LC_TIME
21271 do
21272   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
21273     eval $as_var=C; export $as_var
21274   else
21275     $as_unset $as_var
21276   fi
21277 done
21278
21279 # Required to use basename.
21280 if expr a : '\(a\)' >/dev/null 2>&1; then
21281   as_expr=expr
21282 else
21283   as_expr=false
21284 fi
21285
21286 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
21287   as_basename=basename
21288 else
21289   as_basename=false
21290 fi
21291
21292
21293 # Name of the executable.
21294 as_me=`$as_basename "$0" ||
21295 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21296          X"$0" : 'X\(//\)$' \| \
21297          X"$0" : 'X\(/\)$' \| \
21298          .     : '\(.\)' 2>/dev/null ||
21299 echo X/"$0" |
21300     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
21301           /^X\/\(\/\/\)$/{ s//\1/; q; }
21302           /^X\/\(\/\).*/{ s//\1/; q; }
21303           s/.*/./; q'`
21304
21305
21306 # PATH needs CR, and LINENO needs CR and PATH.
21307 # Avoid depending upon Character Ranges.
21308 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21309 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21310 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21311 as_cr_digits='0123456789'
21312 as_cr_alnum=$as_cr_Letters$as_cr_digits
21313
21314 # The user is always right.
21315 if test "${PATH_SEPARATOR+set}" != set; then
21316   echo "#! /bin/sh" >conf$$.sh
21317   echo  "exit 0"   >>conf$$.sh
21318   chmod +x conf$$.sh
21319   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
21320     PATH_SEPARATOR=';'
21321   else
21322     PATH_SEPARATOR=:
21323   fi
21324   rm -f conf$$.sh
21325 fi
21326
21327
21328   as_lineno_1=$LINENO
21329   as_lineno_2=$LINENO
21330   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21331   test "x$as_lineno_1" != "x$as_lineno_2" &&
21332   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
21333   # Find who we are.  Look in the path if we contain no path at all
21334   # relative or not.
21335   case $0 in
21336     *[\\/]* ) as_myself=$0 ;;
21337     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21338 for as_dir in $PATH
21339 do
21340   IFS=$as_save_IFS
21341   test -z "$as_dir" && as_dir=.
21342   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21343 done
21344
21345        ;;
21346   esac
21347   # We did not find ourselves, most probably we were run as `sh COMMAND'
21348   # in which case we are not to be found in the path.
21349   if test "x$as_myself" = x; then
21350     as_myself=$0
21351   fi
21352   if test ! -f "$as_myself"; then
21353     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
21354 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
21355    { (exit 1); exit 1; }; }
21356   fi
21357   case $CONFIG_SHELL in
21358   '')
21359     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21360 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21361 do
21362   IFS=$as_save_IFS
21363   test -z "$as_dir" && as_dir=.
21364   for as_base in sh bash ksh sh5; do
21365          case $as_dir in
21366          /*)
21367            if ("$as_dir/$as_base" -c '
21368   as_lineno_1=$LINENO
21369   as_lineno_2=$LINENO
21370   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
21371   test "x$as_lineno_1" != "x$as_lineno_2" &&
21372   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
21373              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
21374              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
21375              CONFIG_SHELL=$as_dir/$as_base
21376              export CONFIG_SHELL
21377              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
21378            fi;;
21379          esac
21380        done
21381 done
21382 ;;
21383   esac
21384
21385   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21386   # uniformly replaced by the line number.  The first 'sed' inserts a
21387   # line-number line before each line; the second 'sed' does the real
21388   # work.  The second script uses 'N' to pair each line-number line
21389   # with the numbered line, and appends trailing '-' during
21390   # substitution so that $LINENO is not a special case at line end.
21391   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
21392   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
21393   sed '=' <$as_myself |
21394     sed '
21395       N
21396       s,$,-,
21397       : loop
21398       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
21399       t loop
21400       s,-$,,
21401       s,^['$as_cr_digits']*\n,,
21402     ' >$as_me.lineno &&
21403   chmod +x $as_me.lineno ||
21404     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
21405 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
21406    { (exit 1); exit 1; }; }
21407
21408   # Don't try to exec as it changes $[0], causing all sort of problems
21409   # (the dirname of $[0] is not the place where we might find the
21410   # original and so on.  Autoconf is especially sensible to this).
21411   . ./$as_me.lineno
21412   # Exit status is that of the last command.
21413   exit
21414 }
21415
21416
21417 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
21418   *c*,-n*) ECHO_N= ECHO_C='
21419 ' ECHO_T='      ' ;;
21420   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
21421   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
21422 esac
21423
21424 if expr a : '\(a\)' >/dev/null 2>&1; then
21425   as_expr=expr
21426 else
21427   as_expr=false
21428 fi
21429
21430 rm -f conf$$ conf$$.exe conf$$.file
21431 echo >conf$$.file
21432 if ln -s conf$$.file conf$$ 2>/dev/null; then
21433   # We could just check for DJGPP; but this test a) works b) is more generic
21434   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21435   if test -f conf$$.exe; then
21436     # Don't use ln at all; we don't have any links
21437     as_ln_s='cp -p'
21438   else
21439     as_ln_s='ln -s'
21440   fi
21441 elif ln conf$$.file conf$$ 2>/dev/null; then
21442   as_ln_s=ln
21443 else
21444   as_ln_s='cp -p'
21445 fi
21446 rm -f conf$$ conf$$.exe conf$$.file
21447
21448 if mkdir -p . 2>/dev/null; then
21449   as_mkdir_p=:
21450 else
21451   test -d ./-p && rmdir ./-p
21452   as_mkdir_p=false
21453 fi
21454
21455 as_executable_p="test -f"
21456
21457 # Sed expression to map a string onto a valid CPP name.
21458 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21459
21460 # Sed expression to map a string onto a valid variable name.
21461 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21462
21463
21464 # IFS
21465 # We need space, tab and new line, in precisely that order.
21466 as_nl='
21467 '
21468 IFS="   $as_nl"
21469
21470 # CDPATH.
21471 $as_unset CDPATH
21472
21473 exec 6>&1
21474
21475 # Open the log real soon, to keep \$[0] and so on meaningful, and to
21476 # report actual input values of CONFIG_FILES etc. instead of their
21477 # values after options handling.  Logging --version etc. is OK.
21478 exec 5>>config.log
21479 {
21480   echo
21481   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21482 ## Running $as_me. ##
21483 _ASBOX
21484 } >&5
21485 cat >&5 <<_CSEOF
21486
21487 This file was extended by $as_me, which was
21488 generated by GNU Autoconf 2.59.  Invocation command line was
21489
21490   CONFIG_FILES    = $CONFIG_FILES
21491   CONFIG_HEADERS  = $CONFIG_HEADERS
21492   CONFIG_LINKS    = $CONFIG_LINKS
21493   CONFIG_COMMANDS = $CONFIG_COMMANDS
21494   $ $0 $@
21495
21496 _CSEOF
21497 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
21498 echo >&5
21499 _ACEOF
21500
21501 # Files that config.status was made for.
21502 if test -n "$ac_config_files"; then
21503   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21504 fi
21505
21506 if test -n "$ac_config_headers"; then
21507   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21508 fi
21509
21510 if test -n "$ac_config_links"; then
21511   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21512 fi
21513
21514 if test -n "$ac_config_commands"; then
21515   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21516 fi
21517
21518 cat >>$CONFIG_STATUS <<\_ACEOF
21519
21520 ac_cs_usage="\
21521 \`$as_me' instantiates files from templates according to the
21522 current configuration.
21523
21524 Usage: $0 [OPTIONS] [FILE]...
21525
21526   -h, --help       print this help, then exit
21527   -V, --version    print version number, then exit
21528   -q, --quiet      do not print progress messages
21529   -d, --debug      don't remove temporary files
21530       --recheck    update $as_me by reconfiguring in the same conditions
21531   --file=FILE[:TEMPLATE]
21532                    instantiate the configuration file FILE
21533   --header=FILE[:TEMPLATE]
21534                    instantiate the configuration header FILE
21535
21536 Configuration files:
21537 $config_files
21538
21539 Configuration headers:
21540 $config_headers
21541
21542 Configuration commands:
21543 $config_commands
21544
21545 Report bugs to <bug-autoconf@gnu.org>."
21546 _ACEOF
21547
21548 cat >>$CONFIG_STATUS <<_ACEOF
21549 ac_cs_version="\\
21550 config.status
21551 configured by $0, generated by GNU Autoconf 2.59,
21552   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21553
21554 Copyright (C) 2003 Free Software Foundation, Inc.
21555 This config.status script is free software; the Free Software Foundation
21556 gives unlimited permission to copy, distribute and modify it."
21557 srcdir=$srcdir
21558 INSTALL="$INSTALL"
21559 _ACEOF
21560
21561 cat >>$CONFIG_STATUS <<\_ACEOF
21562 # If no file are specified by the user, then we need to provide default
21563 # value.  By we need to know if files were specified by the user.
21564 ac_need_defaults=:
21565 while test $# != 0
21566 do
21567   case $1 in
21568   --*=*)
21569     ac_option=`expr "x$1" : 'x\([^=]*\)='`
21570     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21571     ac_shift=:
21572     ;;
21573   -*)
21574     ac_option=$1
21575     ac_optarg=$2
21576     ac_shift=shift
21577     ;;
21578   *) # This is not an option, so the user has probably given explicit
21579      # arguments.
21580      ac_option=$1
21581      ac_need_defaults=false;;
21582   esac
21583
21584   case $ac_option in
21585   # Handling of the options.
21586 _ACEOF
21587 cat >>$CONFIG_STATUS <<\_ACEOF
21588   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21589     ac_cs_recheck=: ;;
21590   --version | --vers* | -V )
21591     echo "$ac_cs_version"; exit 0 ;;
21592   --he | --h)
21593     # Conflict between --help and --header
21594     { { echo "$as_me:$LINENO: error: ambiguous option: $1
21595 Try \`$0 --help' for more information." >&5
21596 echo "$as_me: error: ambiguous option: $1
21597 Try \`$0 --help' for more information." >&2;}
21598    { (exit 1); exit 1; }; };;
21599   --help | --hel | -h )
21600     echo "$ac_cs_usage"; exit 0 ;;
21601   --debug | --d* | -d )
21602     debug=: ;;
21603   --file | --fil | --fi | --f )
21604     $ac_shift
21605     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
21606     ac_need_defaults=false;;
21607   --header | --heade | --head | --hea )
21608     $ac_shift
21609     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
21610     ac_need_defaults=false;;
21611   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21612   | -silent | --silent | --silen | --sile | --sil | --si | --s)
21613     ac_cs_silent=: ;;
21614
21615   # This is an error.
21616   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
21617 Try \`$0 --help' for more information." >&5
21618 echo "$as_me: error: unrecognized option: $1
21619 Try \`$0 --help' for more information." >&2;}
21620    { (exit 1); exit 1; }; } ;;
21621
21622   *) ac_config_targets="$ac_config_targets $1" ;;
21623
21624   esac
21625   shift
21626 done
21627
21628 ac_configure_extra_args=
21629
21630 if $ac_cs_silent; then
21631   exec 6>/dev/null
21632   ac_configure_extra_args="$ac_configure_extra_args --silent"
21633 fi
21634
21635 _ACEOF
21636 cat >>$CONFIG_STATUS <<_ACEOF
21637 if \$ac_cs_recheck; then
21638   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21639   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21640 fi
21641
21642 _ACEOF
21643
21644 cat >>$CONFIG_STATUS <<_ACEOF
21645 #
21646 # INIT-COMMANDS section.
21647 #
21648
21649 INTLTOOL_PERL=${INTLTOOL_PERL}
21650
21651
21652 _ACEOF
21653
21654
21655
21656 cat >>$CONFIG_STATUS <<\_ACEOF
21657 for ac_config_target in $ac_config_targets
21658 do
21659   case "$ac_config_target" in
21660   # Handling of arguments.
21661   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21662   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
21663   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
21664   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
21665   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
21666   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
21667   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
21668   "driver/xscreensaver.kss" ) CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.kss" ;;
21669   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
21670   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
21671   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
21672   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21673 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21674    { (exit 1); exit 1; }; };;
21675   esac
21676 done
21677
21678 # If the user did not use the arguments to specify the items to instantiate,
21679 # then the envvar interface is used.  Set only those that are not.
21680 # We use the long form for the default assignment because of an extremely
21681 # bizarre bug on SunOS 4.1.3.
21682 if $ac_need_defaults; then
21683   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21684   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21685   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21686 fi
21687
21688 # Have a temporary directory for convenience.  Make it in the build tree
21689 # simply because there is no reason to put it here, and in addition,
21690 # creating and moving files from /tmp can sometimes cause problems.
21691 # Create a temporary directory, and hook for its removal unless debugging.
21692 $debug ||
21693 {
21694   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21695   trap '{ (exit 1); exit 1; }' 1 2 13 15
21696 }
21697
21698 # Create a (secure) tmp directory for tmp files.
21699
21700 {
21701   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
21702   test -n "$tmp" && test -d "$tmp"
21703 }  ||
21704 {
21705   tmp=./confstat$$-$RANDOM
21706   (umask 077 && mkdir $tmp)
21707 } ||
21708 {
21709    echo "$me: cannot create a temporary directory in ." >&2
21710    { (exit 1); exit 1; }
21711 }
21712
21713 _ACEOF
21714
21715 cat >>$CONFIG_STATUS <<_ACEOF
21716
21717 #
21718 # CONFIG_FILES section.
21719 #
21720
21721 # No need to generate the scripts if there are no CONFIG_FILES.
21722 # This happens for instance when ./config.status config.h
21723 if test -n "\$CONFIG_FILES"; then
21724   # Protect against being on the right side of a sed subst in config.status.
21725   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21726    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21727 s,@SHELL@,$SHELL,;t t
21728 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21729 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21730 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21731 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21732 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21733 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21734 s,@exec_prefix@,$exec_prefix,;t t
21735 s,@prefix@,$prefix,;t t
21736 s,@program_transform_name@,$program_transform_name,;t t
21737 s,@bindir@,$bindir,;t t
21738 s,@sbindir@,$sbindir,;t t
21739 s,@libexecdir@,$libexecdir,;t t
21740 s,@datadir@,$datadir,;t t
21741 s,@sysconfdir@,$sysconfdir,;t t
21742 s,@sharedstatedir@,$sharedstatedir,;t t
21743 s,@localstatedir@,$localstatedir,;t t
21744 s,@libdir@,$libdir,;t t
21745 s,@includedir@,$includedir,;t t
21746 s,@oldincludedir@,$oldincludedir,;t t
21747 s,@infodir@,$infodir,;t t
21748 s,@mandir@,$mandir,;t t
21749 s,@build_alias@,$build_alias,;t t
21750 s,@host_alias@,$host_alias,;t t
21751 s,@target_alias@,$target_alias,;t t
21752 s,@DEFS@,$DEFS,;t t
21753 s,@ECHO_C@,$ECHO_C,;t t
21754 s,@ECHO_N@,$ECHO_N,;t t
21755 s,@ECHO_T@,$ECHO_T,;t t
21756 s,@LIBS@,$LIBS,;t t
21757 s,@build@,$build,;t t
21758 s,@build_cpu@,$build_cpu,;t t
21759 s,@build_vendor@,$build_vendor,;t t
21760 s,@build_os@,$build_os,;t t
21761 s,@host@,$host,;t t
21762 s,@host_cpu@,$host_cpu,;t t
21763 s,@host_vendor@,$host_vendor,;t t
21764 s,@host_os@,$host_os,;t t
21765 s,@CC@,$CC,;t t
21766 s,@CFLAGS@,$CFLAGS,;t t
21767 s,@LDFLAGS@,$LDFLAGS,;t t
21768 s,@CPPFLAGS@,$CPPFLAGS,;t t
21769 s,@ac_ct_CC@,$ac_ct_CC,;t t
21770 s,@EXEEXT@,$EXEEXT,;t t
21771 s,@OBJEXT@,$OBJEXT,;t t
21772 s,@CPP@,$CPP,;t t
21773 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21774 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21775 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21776 s,@SET_MAKE@,$SET_MAKE,;t t
21777 s,@EGREP@,$EGREP,;t t
21778 s,@PERL@,$PERL,;t t
21779 s,@X_CFLAGS@,$X_CFLAGS,;t t
21780 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
21781 s,@X_LIBS@,$X_LIBS,;t t
21782 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
21783 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
21784 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
21785 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
21786 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
21787 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
21788 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
21789 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
21790 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
21791 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
21792 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
21793 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
21794 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
21795 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
21796 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
21797 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
21798 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
21799 s,@RANLIB@,$RANLIB,;t t
21800 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21801 s,@ALLOCA@,$ALLOCA,;t t
21802 s,@USE_NLS@,$USE_NLS,;t t
21803 s,@MSGFMT@,$MSGFMT,;t t
21804 s,@GMSGFMT@,$GMSGFMT,;t t
21805 s,@XGETTEXT@,$XGETTEXT,;t t
21806 s,@CATALOGS@,$CATALOGS,;t t
21807 s,@CATOBJEXT@,$CATOBJEXT,;t t
21808 s,@DATADIRNAME@,$DATADIRNAME,;t t
21809 s,@GMOFILES@,$GMOFILES,;t t
21810 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
21811 s,@INTLDEPS@,$INTLDEPS,;t t
21812 s,@INTLLIBS@,$INTLLIBS,;t t
21813 s,@INTLOBJS@,$INTLOBJS,;t t
21814 s,@POFILES@,$POFILES,;t t
21815 s,@POSUB@,$POSUB,;t t
21816 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
21817 s,@pkg_config@,$pkg_config,;t t
21818 s,@glib_config@,$glib_config,;t t
21819 s,@gtk_config@,$gtk_config,;t t
21820 s,@gnome_config@,$gnome_config,;t t
21821 s,@have_gnome_help@,$have_gnome_help,;t t
21822 s,@xml_config@,$xml_config,;t t
21823 s,@gdk_pixbuf_config@,$gdk_pixbuf_config,;t t
21824 s,@fortune_tmp@,$fortune_tmp,;t t
21825 s,@INCLUDES@,$INCLUDES,;t t
21826 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
21827 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
21828 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
21829 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
21830 s,@GTK_LIBS@,$GTK_LIBS,;t t
21831 s,@XML_LIBS@,$XML_LIBS,;t t
21832 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
21833 s,@HACK_LIBS@,$HACK_LIBS,;t t
21834 s,@XPM_LIBS@,$XPM_LIBS,;t t
21835 s,@PTY_LIBS@,$PTY_LIBS,;t t
21836 s,@GL_LIBS@,$GL_LIBS,;t t
21837 s,@GLE_LIBS@,$GLE_LIBS,;t t
21838 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
21839 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
21840 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
21841 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
21842 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
21843 s,@NEED_SETUID@,$NEED_SETUID,;t t
21844 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
21845 s,@OBJCC@,$OBJCC,;t t
21846 s,@EXES_OSX@,$EXES_OSX,;t t
21847 s,@SCRIPTS_OSX@,$SCRIPTS_OSX,;t t
21848 s,@MEN_OSX@,$MEN_OSX,;t t
21849 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
21850 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
21851 s,@XMU_SRCS@,$XMU_SRCS,;t t
21852 s,@XMU_OBJS@,$XMU_OBJS,;t t
21853 s,@XMU_LIBS@,$XMU_LIBS,;t t
21854 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
21855 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
21856 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
21857 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
21858 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
21859 s,@JPEG_EXES@,$JPEG_EXES,;t t
21860 s,@GL_EXES@,$GL_EXES,;t t
21861 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
21862 s,@GL_MEN@,$GL_MEN,;t t
21863 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
21864 s,@GLE_EXES@,$GLE_EXES,;t t
21865 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
21866 s,@GNOMEHELP_Y@,$GNOMEHELP_Y,;t t
21867 s,@GNOMEHELP_N@,$GNOMEHELP_N,;t t
21868 s,@HACKDIR@,$HACKDIR,;t t
21869 s,@GNOME_DATADIR@,$GNOME_DATADIR,;t t
21870 s,@GLADE_DATADIR@,$GLADE_DATADIR,;t t
21871 s,@PO_DATADIR@,$PO_DATADIR,;t t
21872 s,@GNOME_PANELDIR@,$GNOME_PANELDIR,;t t
21873 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
21874 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
21875 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
21876 s,@DEPEND@,$DEPEND,;t t
21877 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
21878 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
21879 s,@LIBOBJS@,$LIBOBJS,;t t
21880 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
21881 CEOF
21882
21883 _ACEOF
21884
21885   cat >>$CONFIG_STATUS <<\_ACEOF
21886   # Split the substitutions into bite-sized pieces for seds with
21887   # small command number limits, like on Digital OSF/1 and HP-UX.
21888   ac_max_sed_lines=48
21889   ac_sed_frag=1 # Number of current file.
21890   ac_beg=1 # First line for current file.
21891   ac_end=$ac_max_sed_lines # Line after last line for current file.
21892   ac_more_lines=:
21893   ac_sed_cmds=
21894   while $ac_more_lines; do
21895     if test $ac_beg -gt 1; then
21896       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21897     else
21898       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21899     fi
21900     if test ! -s $tmp/subs.frag; then
21901       ac_more_lines=false
21902     else
21903       # The purpose of the label and of the branching condition is to
21904       # speed up the sed processing (if there are no `@' at all, there
21905       # is no need to browse any of the substitutions).
21906       # These are the two extra sed commands mentioned above.
21907       (echo ':t
21908   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21909       if test -z "$ac_sed_cmds"; then
21910         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21911       else
21912         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21913       fi
21914       ac_sed_frag=`expr $ac_sed_frag + 1`
21915       ac_beg=$ac_end
21916       ac_end=`expr $ac_end + $ac_max_sed_lines`
21917     fi
21918   done
21919   if test -z "$ac_sed_cmds"; then
21920     ac_sed_cmds=cat
21921   fi
21922 fi # test -n "$CONFIG_FILES"
21923
21924 _ACEOF
21925 cat >>$CONFIG_STATUS <<\_ACEOF
21926 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21927   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21928   case $ac_file in
21929   - | *:- | *:-:* ) # input from stdin
21930         cat >$tmp/stdin
21931         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21932         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21933   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21934         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21935   * )   ac_file_in=$ac_file.in ;;
21936   esac
21937
21938   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21939   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21940 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21941          X"$ac_file" : 'X\(//\)[^/]' \| \
21942          X"$ac_file" : 'X\(//\)$' \| \
21943          X"$ac_file" : 'X\(/\)' \| \
21944          .     : '\(.\)' 2>/dev/null ||
21945 echo X"$ac_file" |
21946     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21947           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21948           /^X\(\/\/\)$/{ s//\1/; q; }
21949           /^X\(\/\).*/{ s//\1/; q; }
21950           s/.*/./; q'`
21951   { if $as_mkdir_p; then
21952     mkdir -p "$ac_dir"
21953   else
21954     as_dir="$ac_dir"
21955     as_dirs=
21956     while test ! -d "$as_dir"; do
21957       as_dirs="$as_dir $as_dirs"
21958       as_dir=`(dirname "$as_dir") 2>/dev/null ||
21959 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21960          X"$as_dir" : 'X\(//\)[^/]' \| \
21961          X"$as_dir" : 'X\(//\)$' \| \
21962          X"$as_dir" : 'X\(/\)' \| \
21963          .     : '\(.\)' 2>/dev/null ||
21964 echo X"$as_dir" |
21965     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21966           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21967           /^X\(\/\/\)$/{ s//\1/; q; }
21968           /^X\(\/\).*/{ s//\1/; q; }
21969           s/.*/./; q'`
21970     done
21971     test ! -n "$as_dirs" || mkdir $as_dirs
21972   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21973 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21974    { (exit 1); exit 1; }; }; }
21975
21976   ac_builddir=.
21977
21978 if test "$ac_dir" != .; then
21979   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21980   # A "../" for each directory in $ac_dir_suffix.
21981   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
21982 else
21983   ac_dir_suffix= ac_top_builddir=
21984 fi
21985
21986 case $srcdir in
21987   .)  # No --srcdir option.  We are building in place.
21988     ac_srcdir=.
21989     if test -z "$ac_top_builddir"; then
21990        ac_top_srcdir=.
21991     else
21992        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
21993     fi ;;
21994   [\\/]* | ?:[\\/]* )  # Absolute path.
21995     ac_srcdir=$srcdir$ac_dir_suffix;
21996     ac_top_srcdir=$srcdir ;;
21997   *) # Relative path.
21998     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
21999     ac_top_srcdir=$ac_top_builddir$srcdir ;;
22000 esac
22001
22002 # Do not use `cd foo && pwd` to compute absolute paths, because
22003 # the directories may not exist.
22004 case `pwd` in
22005 .) ac_abs_builddir="$ac_dir";;
22006 *)
22007   case "$ac_dir" in
22008   .) ac_abs_builddir=`pwd`;;
22009   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22010   *) ac_abs_builddir=`pwd`/"$ac_dir";;
22011   esac;;
22012 esac
22013 case $ac_abs_builddir in
22014 .) ac_abs_top_builddir=${ac_top_builddir}.;;
22015 *)
22016   case ${ac_top_builddir}. in
22017   .) ac_abs_top_builddir=$ac_abs_builddir;;
22018   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22019   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22020   esac;;
22021 esac
22022 case $ac_abs_builddir in
22023 .) ac_abs_srcdir=$ac_srcdir;;
22024 *)
22025   case $ac_srcdir in
22026   .) ac_abs_srcdir=$ac_abs_builddir;;
22027   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22028   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22029   esac;;
22030 esac
22031 case $ac_abs_builddir in
22032 .) ac_abs_top_srcdir=$ac_top_srcdir;;
22033 *)
22034   case $ac_top_srcdir in
22035   .) ac_abs_top_srcdir=$ac_abs_builddir;;
22036   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22037   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22038   esac;;
22039 esac
22040
22041
22042   case $INSTALL in
22043   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22044   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
22045   esac
22046
22047   if test x"$ac_file" != x-; then
22048     { echo "$as_me:$LINENO: creating $ac_file" >&5
22049 echo "$as_me: creating $ac_file" >&6;}
22050     rm -f "$ac_file"
22051   fi
22052   # Let's still pretend it is `configure' which instantiates (i.e., don't
22053   # use $as_me), people would be surprised to read:
22054   #    /* config.h.  Generated by config.status.  */
22055   if test x"$ac_file" = x-; then
22056     configure_input=
22057   else
22058     configure_input="$ac_file.  "
22059   fi
22060   configure_input=$configure_input"Generated from `echo $ac_file_in |
22061                                      sed 's,.*/,,'` by configure."
22062
22063   # First look for the input files in the build tree, otherwise in the
22064   # src tree.
22065   ac_file_inputs=`IFS=:
22066     for f in $ac_file_in; do
22067       case $f in
22068       -) echo $tmp/stdin ;;
22069       [\\/$]*)
22070          # Absolute (can't be DOS-style, as IFS=:)
22071          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22072 echo "$as_me: error: cannot find input file: $f" >&2;}
22073    { (exit 1); exit 1; }; }
22074          echo "$f";;
22075       *) # Relative
22076          if test -f "$f"; then
22077            # Build tree
22078            echo "$f"
22079          elif test -f "$srcdir/$f"; then
22080            # Source tree
22081            echo "$srcdir/$f"
22082          else
22083            # /dev/null tree
22084            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22085 echo "$as_me: error: cannot find input file: $f" >&2;}
22086    { (exit 1); exit 1; }; }
22087          fi;;
22088       esac
22089     done` || { (exit 1); exit 1; }
22090 _ACEOF
22091 cat >>$CONFIG_STATUS <<_ACEOF
22092   sed "$ac_vpsub
22093 $extrasub
22094 _ACEOF
22095 cat >>$CONFIG_STATUS <<\_ACEOF
22096 :t
22097 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22098 s,@configure_input@,$configure_input,;t t
22099 s,@srcdir@,$ac_srcdir,;t t
22100 s,@abs_srcdir@,$ac_abs_srcdir,;t t
22101 s,@top_srcdir@,$ac_top_srcdir,;t t
22102 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22103 s,@builddir@,$ac_builddir,;t t
22104 s,@abs_builddir@,$ac_abs_builddir,;t t
22105 s,@top_builddir@,$ac_top_builddir,;t t
22106 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
22107 s,@INSTALL@,$ac_INSTALL,;t t
22108 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22109   rm -f $tmp/stdin
22110   if test x"$ac_file" != x-; then
22111     mv $tmp/out $ac_file
22112   else
22113     cat $tmp/out
22114     rm -f $tmp/out
22115   fi
22116
22117 done
22118 _ACEOF
22119 cat >>$CONFIG_STATUS <<\_ACEOF
22120
22121 #
22122 # CONFIG_HEADER section.
22123 #
22124
22125 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22126 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22127 #
22128 # ac_d sets the value in "#define NAME VALUE" lines.
22129 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
22130 ac_dB='[         ].*$,\1#\2'
22131 ac_dC=' '
22132 ac_dD=',;t'
22133 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22134 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22135 ac_uB='$,\1#\2define\3'
22136 ac_uC=' '
22137 ac_uD=',;t'
22138
22139 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22140   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22141   case $ac_file in
22142   - | *:- | *:-:* ) # input from stdin
22143         cat >$tmp/stdin
22144         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22145         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22146   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22147         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22148   * )   ac_file_in=$ac_file.in ;;
22149   esac
22150
22151   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
22152 echo "$as_me: creating $ac_file" >&6;}
22153
22154   # First look for the input files in the build tree, otherwise in the
22155   # src tree.
22156   ac_file_inputs=`IFS=:
22157     for f in $ac_file_in; do
22158       case $f in
22159       -) echo $tmp/stdin ;;
22160       [\\/$]*)
22161          # Absolute (can't be DOS-style, as IFS=:)
22162          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22163 echo "$as_me: error: cannot find input file: $f" >&2;}
22164    { (exit 1); exit 1; }; }
22165          # Do quote $f, to prevent DOS paths from being IFS'd.
22166          echo "$f";;
22167       *) # Relative
22168          if test -f "$f"; then
22169            # Build tree
22170            echo "$f"
22171          elif test -f "$srcdir/$f"; then
22172            # Source tree
22173            echo "$srcdir/$f"
22174          else
22175            # /dev/null tree
22176            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
22177 echo "$as_me: error: cannot find input file: $f" >&2;}
22178    { (exit 1); exit 1; }; }
22179          fi;;
22180       esac
22181     done` || { (exit 1); exit 1; }
22182   # Remove the trailing spaces.
22183   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
22184
22185 _ACEOF
22186
22187 # Transform confdefs.h into two sed scripts, `conftest.defines' and
22188 # `conftest.undefs', that substitutes the proper values into
22189 # config.h.in to produce config.h.  The first handles `#define'
22190 # templates, and the second `#undef' templates.
22191 # And first: Protect against being on the right side of a sed subst in
22192 # config.status.  Protect against being in an unquoted here document
22193 # in config.status.
22194 rm -f conftest.defines conftest.undefs
22195 # Using a here document instead of a string reduces the quoting nightmare.
22196 # Putting comments in sed scripts is not portable.
22197 #
22198 # `end' is used to avoid that the second main sed command (meant for
22199 # 0-ary CPP macros) applies to n-ary macro definitions.
22200 # See the Autoconf documentation for `clear'.
22201 cat >confdef2sed.sed <<\_ACEOF
22202 s/[\\&,]/\\&/g
22203 s,[\\$`],\\&,g
22204 t clear
22205 : clear
22206 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
22207 t end
22208 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
22209 : end
22210 _ACEOF
22211 # If some macros were called several times there might be several times
22212 # the same #defines, which is useless.  Nevertheless, we may not want to
22213 # sort them, since we want the *last* AC-DEFINE to be honored.
22214 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22215 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22216 rm -f confdef2sed.sed
22217
22218 # This sed command replaces #undef with comments.  This is necessary, for
22219 # example, in the case of _POSIX_SOURCE, which is predefined and required
22220 # on some systems where configure will not decide to define it.
22221 cat >>conftest.undefs <<\_ACEOF
22222 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
22223 _ACEOF
22224
22225 # Break up conftest.defines because some shells have a limit on the size
22226 # of here documents, and old seds have small limits too (100 cmds).
22227 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
22228 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
22229 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22230 echo '  :' >>$CONFIG_STATUS
22231 rm -f conftest.tail
22232 while grep . conftest.defines >/dev/null
22233 do
22234   # Write a limited-size here document to $tmp/defines.sed.
22235   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22236   # Speed up: don't consider the non `#define' lines.
22237   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
22238   # Work around the forget-to-reset-the-flag bug.
22239   echo 't clr' >>$CONFIG_STATUS
22240   echo ': clr' >>$CONFIG_STATUS
22241   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
22242   echo 'CEOF
22243   sed -f $tmp/defines.sed $tmp/in >$tmp/out
22244   rm -f $tmp/in
22245   mv $tmp/out $tmp/in
22246 ' >>$CONFIG_STATUS
22247   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
22248   rm -f conftest.defines
22249   mv conftest.tail conftest.defines
22250 done
22251 rm -f conftest.defines
22252 echo '  fi # grep' >>$CONFIG_STATUS
22253 echo >>$CONFIG_STATUS
22254
22255 # Break up conftest.undefs because some shells have a limit on the size
22256 # of here documents, and old seds have small limits too (100 cmds).
22257 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
22258 rm -f conftest.tail
22259 while grep . conftest.undefs >/dev/null
22260 do
22261   # Write a limited-size here document to $tmp/undefs.sed.
22262   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22263   # Speed up: don't consider the non `#undef'
22264   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
22265   # Work around the forget-to-reset-the-flag bug.
22266   echo 't clr' >>$CONFIG_STATUS
22267   echo ': clr' >>$CONFIG_STATUS
22268   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22269   echo 'CEOF
22270   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22271   rm -f $tmp/in
22272   mv $tmp/out $tmp/in
22273 ' >>$CONFIG_STATUS
22274   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22275   rm -f conftest.undefs
22276   mv conftest.tail conftest.undefs
22277 done
22278 rm -f conftest.undefs
22279
22280 cat >>$CONFIG_STATUS <<\_ACEOF
22281   # Let's still pretend it is `configure' which instantiates (i.e., don't
22282   # use $as_me), people would be surprised to read:
22283   #    /* config.h.  Generated by config.status.  */
22284   if test x"$ac_file" = x-; then
22285     echo "/* Generated by configure.  */" >$tmp/config.h
22286   else
22287     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
22288   fi
22289   cat $tmp/in >>$tmp/config.h
22290   rm -f $tmp/in
22291   if test x"$ac_file" != x-; then
22292     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
22293       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22294 echo "$as_me: $ac_file is unchanged" >&6;}
22295     else
22296       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22297 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22298          X"$ac_file" : 'X\(//\)[^/]' \| \
22299          X"$ac_file" : 'X\(//\)$' \| \
22300          X"$ac_file" : 'X\(/\)' \| \
22301          .     : '\(.\)' 2>/dev/null ||
22302 echo X"$ac_file" |
22303     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22304           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22305           /^X\(\/\/\)$/{ s//\1/; q; }
22306           /^X\(\/\).*/{ s//\1/; q; }
22307           s/.*/./; q'`
22308       { if $as_mkdir_p; then
22309     mkdir -p "$ac_dir"
22310   else
22311     as_dir="$ac_dir"
22312     as_dirs=
22313     while test ! -d "$as_dir"; do
22314       as_dirs="$as_dir $as_dirs"
22315       as_dir=`(dirname "$as_dir") 2>/dev/null ||
22316 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22317          X"$as_dir" : 'X\(//\)[^/]' \| \
22318          X"$as_dir" : 'X\(//\)$' \| \
22319          X"$as_dir" : 'X\(/\)' \| \
22320          .     : '\(.\)' 2>/dev/null ||
22321 echo X"$as_dir" |
22322     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22323           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22324           /^X\(\/\/\)$/{ s//\1/; q; }
22325           /^X\(\/\).*/{ s//\1/; q; }
22326           s/.*/./; q'`
22327     done
22328     test ! -n "$as_dirs" || mkdir $as_dirs
22329   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22330 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22331    { (exit 1); exit 1; }; }; }
22332
22333       rm -f $ac_file
22334       mv $tmp/config.h $ac_file
22335     fi
22336   else
22337     cat $tmp/config.h
22338     rm -f $tmp/config.h
22339   fi
22340 done
22341 _ACEOF
22342 cat >>$CONFIG_STATUS <<\_ACEOF
22343
22344 #
22345 # CONFIG_COMMANDS section.
22346 #
22347 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22348   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22349   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22350   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
22351 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22352          X"$ac_dest" : 'X\(//\)[^/]' \| \
22353          X"$ac_dest" : 'X\(//\)$' \| \
22354          X"$ac_dest" : 'X\(/\)' \| \
22355          .     : '\(.\)' 2>/dev/null ||
22356 echo X"$ac_dest" |
22357     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22358           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22359           /^X\(\/\/\)$/{ s//\1/; q; }
22360           /^X\(\/\).*/{ s//\1/; q; }
22361           s/.*/./; q'`
22362   { if $as_mkdir_p; then
22363     mkdir -p "$ac_dir"
22364   else
22365     as_dir="$ac_dir"
22366     as_dirs=
22367     while test ! -d "$as_dir"; do
22368       as_dirs="$as_dir $as_dirs"
22369       as_dir=`(dirname "$as_dir") 2>/dev/null ||
22370 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22371          X"$as_dir" : 'X\(//\)[^/]' \| \
22372          X"$as_dir" : 'X\(//\)$' \| \
22373          X"$as_dir" : 'X\(/\)' \| \
22374          .     : '\(.\)' 2>/dev/null ||
22375 echo X"$as_dir" |
22376     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22377           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22378           /^X\(\/\/\)$/{ s//\1/; q; }
22379           /^X\(\/\).*/{ s//\1/; q; }
22380           s/.*/./; q'`
22381     done
22382     test ! -n "$as_dirs" || mkdir $as_dirs
22383   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22384 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22385    { (exit 1); exit 1; }; }; }
22386
22387   ac_builddir=.
22388
22389 if test "$ac_dir" != .; then
22390   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22391   # A "../" for each directory in $ac_dir_suffix.
22392   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22393 else
22394   ac_dir_suffix= ac_top_builddir=
22395 fi
22396
22397 case $srcdir in
22398   .)  # No --srcdir option.  We are building in place.
22399     ac_srcdir=.
22400     if test -z "$ac_top_builddir"; then
22401        ac_top_srcdir=.
22402     else
22403        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22404     fi ;;
22405   [\\/]* | ?:[\\/]* )  # Absolute path.
22406     ac_srcdir=$srcdir$ac_dir_suffix;
22407     ac_top_srcdir=$srcdir ;;
22408   *) # Relative path.
22409     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22410     ac_top_srcdir=$ac_top_builddir$srcdir ;;
22411 esac
22412
22413 # Do not use `cd foo && pwd` to compute absolute paths, because
22414 # the directories may not exist.
22415 case `pwd` in
22416 .) ac_abs_builddir="$ac_dir";;
22417 *)
22418   case "$ac_dir" in
22419   .) ac_abs_builddir=`pwd`;;
22420   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22421   *) ac_abs_builddir=`pwd`/"$ac_dir";;
22422   esac;;
22423 esac
22424 case $ac_abs_builddir in
22425 .) ac_abs_top_builddir=${ac_top_builddir}.;;
22426 *)
22427   case ${ac_top_builddir}. in
22428   .) ac_abs_top_builddir=$ac_abs_builddir;;
22429   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22430   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22431   esac;;
22432 esac
22433 case $ac_abs_builddir in
22434 .) ac_abs_srcdir=$ac_srcdir;;
22435 *)
22436   case $ac_srcdir in
22437   .) ac_abs_srcdir=$ac_abs_builddir;;
22438   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22439   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22440   esac;;
22441 esac
22442 case $ac_abs_builddir in
22443 .) ac_abs_top_srcdir=$ac_top_srcdir;;
22444 *)
22445   case $ac_top_srcdir in
22446   .) ac_abs_top_srcdir=$ac_abs_builddir;;
22447   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22448   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22449   esac;;
22450 esac
22451
22452
22453   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
22454 echo "$as_me: executing $ac_dest commands" >&6;}
22455   case $ac_dest in
22456     default-1 )
22457
22458 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
22459 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
22460   rm -f intltool-extract.out
22461 else
22462   mv -f intltool-extract.out intltool-extract
22463 fi
22464 chmod ugo+x intltool-extract
22465 chmod u+w intltool-extract
22466
22467 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
22468 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
22469   rm -f intltool-merge.out
22470 else
22471   mv -f intltool-merge.out intltool-merge
22472 fi
22473 chmod ugo+x intltool-merge
22474 chmod u+w intltool-merge
22475
22476 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
22477 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
22478   rm -f intltool-update.out
22479 else
22480   mv -f intltool-update.out intltool-update
22481 fi
22482 chmod ugo+x intltool-update
22483 chmod u+w intltool-update
22484
22485  ;;
22486     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
22487         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
22488       esac ;;
22489   esac
22490 done
22491 _ACEOF
22492
22493 cat >>$CONFIG_STATUS <<\_ACEOF
22494
22495 { (exit 0); exit 0; }
22496 _ACEOF
22497 chmod +x $CONFIG_STATUS
22498 ac_clean_files=$ac_clean_files_save
22499
22500
22501 # configure is writing to config.log, and then calls config.status.
22502 # config.status does its own redirection, appending to config.log.
22503 # Unfortunately, on DOS this fails, as config.log is still kept open
22504 # by configure, so config.status won't be able to write to it; its
22505 # output is simply discarded.  So we exec the FD to /dev/null,
22506 # effectively closing config.log, so it can be properly (re)opened and
22507 # appended to by config.status.  When coming back to configure, we
22508 # need to make the FD available again.
22509 if test "$no_create" != yes; then
22510   ac_cs_success=:
22511   ac_config_status_args=
22512   test "$silent" = yes &&
22513     ac_config_status_args="$ac_config_status_args --quiet"
22514   exec 5>/dev/null
22515   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
22516   exec 5>>config.log
22517   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22518   # would make configure fail if this is the last instruction.
22519   $ac_cs_success || { (exit 1); exit 1; }
22520 fi
22521
22522
22523 ###############################################################################
22524 #
22525 #       Print some warnings at the end.
22526 #
22527 ###############################################################################
22528
22529 warn_prefix_1="    Warning:"
22530 warn_prefix_2="       Note:"
22531 warn_prefix="$warn_prefix_1"
22532
22533 warning=no
22534 warnsep='    #################################################################'
22535
22536 warnpre() {
22537   if test "$warning" = no ; then
22538     echo '' ; echo "$warnsep" ; echo ''
22539     warning=yes
22540   fi
22541 }
22542
22543 warn() {
22544   warnpre
22545   if test "$warning" = long ; then echo '' ; fi
22546   warning=yes
22547   rest="$@"
22548   echo "$warn_prefix $rest"
22549 }
22550
22551 warnL() {
22552   was=$warning
22553   warnpre
22554   warning=yes
22555   if test "$was" != no ; then echo '' ; fi
22556   rest="$@"
22557   echo "$warn_prefix $rest"
22558 }
22559
22560 warn2() {
22561   rest="$@"
22562   echo "             $rest"
22563   warning=long
22564 }
22565
22566 note() {
22567   warn_prefix="$warn_prefix_2"
22568   warn $@
22569   warn_prefix="$warn_prefix_1"
22570 }
22571
22572 noteL() {
22573   warn_prefix="$warn_prefix_2"
22574   warnL $@
22575   warn_prefix="$warn_prefix_1"
22576 }
22577
22578
22579 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
22580   warn 'The SGI saver extension was requested, but was not found.'
22581 fi
22582
22583 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
22584   warn 'The MIT saver extension was requested, but was not found.'
22585 fi
22586
22587 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
22588   warn 'The XIdle extension was requested, but was not found.'
22589 fi
22590
22591 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
22592   warn 'The XSHM extension was requested, but was not found.'
22593 fi
22594
22595 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
22596   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
22597 fi
22598
22599 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
22600   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
22601 fi
22602
22603 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
22604   warn 'The DPMS extension was requested, but was not found.'
22605 fi
22606
22607 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
22608   warn 'The Xinerama extension was requested, but was not found.'
22609 fi
22610
22611 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
22612   warn 'The XF86VMODE extension was requested, but was not found.'
22613 fi
22614
22615 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
22616   warn 'The RANDR extension was requested, but was not found.'
22617 fi
22618
22619 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
22620   warn "Checking of /proc/interrupts was requested, but it's bogus."
22621 fi
22622
22623 motif_warn2() {
22624   warn2 'Though the Motif front-end to xscreensaver is still'
22625   warn2 'maintained, it is no longer being updated with new'
22626   warn2 'features: all new development on the xscreensaver-demo'
22627   warn2 'program is happening in the GTK version, and not in the'
22628   warn2 'Motif version.  It is recommended that you build against'
22629   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
22630 }
22631
22632 if test "$have_motif" = no -a "$have_gtk" = no; then
22633
22634   if test "$with_motif" = yes; then
22635     warnL "Neither the GTK nor Motif libraries were found; the"
22636     warn2 "\`xscreensaver-demo' program requires one of these."
22637     echo ''
22638     motif_warn2
22639   else
22640     warnL "The GTK libraries do not seem to be available; the"
22641     warn2 "\`xscreensaver-demo' program requires them."
22642     echo ''
22643     warn2 'You can use Motif or Lesstif instead of GTK (use the'
22644     warn2 "\`--with-motif' option) but that is NOT recommended."
22645     motif_warn2
22646   fi
22647
22648 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
22649   warnL "Use of Motif was requested, but it wasn't found;"
22650   warn2 "Gtk will be used instead."
22651
22652 elif test "$jurassic_gtk" = yes ; then
22653
22654   pref_gtk=1.2
22655
22656   v="$ac_gtk_version_string"
22657   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
22658     warnL "Use of Gtk was requested, but its version number is unknown;"
22659   elif test "$with_gtk_req" = yes ; then
22660     warnL "Use of Gtk was requested, but it is version $v;"
22661   else
22662     warnL "Gtk was found on this system, but it is version $v;"
22663   fi
22664
22665   warn2 "Gtk $pref_gtk or newer is required."
22666
22667 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
22668   warnL "Use of Gtk was requested, but it wasn't found."
22669 fi
22670
22671 if test "$gtk2_halfassed" != no ; then
22672   warnL "GTK version $gtk2_halfassed was found, but at least one supporting"
22673   warn2 "library ($gtk2_halfassed_lib) was not, so GTK 2.x can't be used."
22674   if test "$have_gtk" = yes ; then
22675     v="$ac_gtk_version_string"
22676     warn2 "GTK $v is also installed, so it will be used instead."
22677     warn2 "Please read the above output and the \`config.log' file"
22678     warn2 "for more details."
22679   fi
22680 fi
22681
22682
22683 if test "$with_gnome_req" = yes -a "$have_gnome" = no \
22684         -a "$have_gtk2" = no; then
22685   # don't issue this warning if we have GTK2 -- in that case, the
22686   # Gnome-specific code isn't needed.
22687   warn  'Use of the Gnome Control Panel was requested, but the necessary'
22688   warn2 'headers and/or libraries were not found.'
22689 fi
22690
22691 if test "$have_gtk" = yes ; then
22692   if test "$have_xml" = no ; then
22693     if test "$with_xml_req" = yes ; then
22694       warn  'Use of the XML library was requested, but the necessary'
22695       warn2 'headers and/or libraries were not found.'
22696     else
22697       warn  'GTK is being used, but the XML library was not found.'
22698     fi
22699
22700     if test "$xml_halfassed" = yes ; then
22701
22702       if test "$have_zlib" = yes ; then
22703         which="XML libraries"
22704       else
22705         which="\`zlib' library"
22706       fi
22707
22708       echo ''
22709       warn2 'More specifically, we found the headers, but not the'
22710       warn2 "$which; so either XML is half-installed on this"
22711       warn2 "system, or something else went wrong.  The \`config.log'"
22712       warn2 'file might contain some clues.'
22713     fi
22714
22715     echo ''
22716     warn2 "Without XML, the per-display-mode \`Settings' dialogs"
22717     warn2 'will not be available.  Specify the location of the XML'
22718     warn2 'library through the --with-xml option to configure.'
22719   fi
22720 fi
22721
22722 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
22723   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
22724   warn2 "headers were not found.  That can't be good.  Please"
22725   warn2 "install the GDK-Pixbuf development kit and re-configure."
22726 fi
22727
22728 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
22729
22730   preferred_lesstif=0.92
22731
22732   if test "$lesstif_version" = unknown; then
22733     warnL "Unable to determine the LessTif version number!"
22734     warn2 "Make sure you are using version $preferred_lesstif or newer."
22735     warn2 "See <http://www.lesstif.org/>."
22736
22737   elif test \! $lesstif_version -gt 82; then
22738     warnL "LessTif version $lesstif_version_string is being used."
22739     warn2 "LessTif versions 0.82 and earlier are too buggy to"
22740     warn2 "use with XScreenSaver; it is strongly recommended"
22741     warn2 "that you upgrade to at least version $preferred_lesstif!"
22742     warn2 "See <http://www.lesstif.org/>."
22743   fi
22744 fi
22745
22746
22747 if test "$have_motif" = yes -a "$have_gtk" = no ; then
22748   warn  'Motif is being used, and GTK is not.'
22749   echo  ''
22750   motif_warn2
22751 fi
22752
22753
22754 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
22755   warnL 'Use of XPM was requested, but it was not found.'
22756 fi
22757
22758 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
22759   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
22760 fi
22761
22762 if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \
22763    test "$gdk_pixbuf_halfassed" = yes; then
22764
22765   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
22766     true
22767   elif test "$with_xpm_req" = no ; then
22768     warnL 'The XPM library is not being used.'
22769   else
22770     warnL 'The XPM library was not found.'
22771   fi
22772
22773   if test "$with_gdk_pixbuf_req" = yes ; then
22774     true
22775   elif test "$with_gdk_pixbuf_req" = no ; then
22776     warnL 'The GDK-Pixbuf library is not being used.'
22777   else
22778     warnL 'The GDK-Pixbuf library was not found.'
22779   fi
22780
22781   if test "$gdk_pixbuf_halfassed" = yes ; then
22782     echo ''
22783     warn2 'More specifically, we found the headers, but not the'
22784     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
22785     warn2 "system, or something else went wrong.  The \`config.log'"
22786     warn2 'file might contain some clues.'
22787   fi
22788
22789   echo ''
22790   warn2 'Some of the demos will not be as colorful as they'
22791   warn2 'could be.  You should consider installing Pixbuf or'
22792   warn2 'XPM and re-running configure.  The Pixbuf library is'
22793   warn2 'a part of GNOME.  The XPM library comes with most'
22794   warn2 'X11 installations; you can also find it at the X11'
22795   warn2 'archive sites, such as <http://sunsite.unc.edu/>.'
22796   echo  ''
22797   warn2 'GDK-Pixbuf is recommended over XPM, as it provides'
22798   warn2 'support for more image formats.'
22799 fi
22800
22801
22802 if test "$have_jpeg" = no ; then
22803   if test "$with_jpeg_req" = yes ; then
22804     warnL 'Use of libjpeg was requested, but it was not found.'
22805   elif test "$with_jpeg_req" = no ; then
22806     noteL 'The JPEG library is not being used.'
22807   else
22808     noteL 'The JPEG library was not found.'
22809   fi
22810
22811   if test "$jpeg_halfassed" = yes ; then
22812     echo ''
22813     warn2 'More specifically, we found the headers, but not the'
22814     warn2 'library; so either JPEG is half-installed on this'
22815     warn2 "system, or something else went wrong.  The \`config.log'"
22816     warn2 'file might contain some clues.'
22817     echo ''
22818   fi
22819
22820   if test "$have_gdk_pixbuf" = no ; then
22821     warn2 "This means that it won't be possible for the image-manipulating"
22822     warn2 "display modes to load files from disk; and it also means that"
22823     warn2 "the \`webcollage' program will be much slower."
22824   else
22825     warn2 "This means the \`webcollage' program will be much slower."
22826   fi
22827 fi
22828
22829
22830 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
22831   preferred_mesagl=3.4
22832   mgv="$ac_mesagl_version_string"
22833   pgl="$preferred_mesagl"
22834
22835   if test "$ac_mesagl_version" = unknown; then
22836     warnL "Unable to determine the MesaGL version number!"
22837     warn2 "Make sure you are using version $preferred_mesagl or newer."
22838
22839   elif test \! "$ac_mesagl_version" -gt 2006; then
22840     warnL "MesaGL version number is $mgv --"
22841     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
22842     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
22843
22844   elif test \! "$ac_mesagl_version" -gt 3003; then
22845     warnL "MesaGL version number is $mgv --"
22846     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
22847     warn2 "that you upgrade to $pgl or newer."
22848   fi
22849 fi
22850
22851 if test "$have_gl" = no ; then
22852   if test "$with_gl_req" = yes ; then
22853     warnL 'Use of GL was requested, but it was not found.'
22854   elif test "$with_gl_req" = no ; then
22855     noteL 'The OpenGL 3D library is not being used.'
22856   else
22857     noteL 'The OpenGL 3D library was not found.'
22858   fi
22859
22860   if test "$gl_halfassed" = yes ; then
22861     echo ''
22862     warn2 'More specifically, we found the headers, but not the'
22863     warn2 'libraries; so either GL is half-installed on this'
22864     warn2 "system, or something else went wrong.  The \`config.log'"
22865     warn2 'file might contain some clues.'
22866   fi
22867
22868   echo ''
22869   warn2 'Those demos which use 3D will not be built or installed.'
22870   warn2 'You might want to consider installing OpenGL and'
22871   warn2 "re-running configure.  If your vendor doesn't ship"
22872   warn2 'their own implementation of OpenGL, you can get a free'
22873   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
22874   warn2 'info, see <http://www.opengl.org/>.'
22875
22876 fi
22877
22878
22879 if test "$have_gl" = yes -a "$have_gle" = no ; then
22880
22881  # nobody cares about this; don't print the warning unless it was
22882  # requested and not found, or halfway-found.
22883  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
22884
22885   if test "$with_gle_req" = yes ; then
22886     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
22887     warn2 'it was not found (though the OpenGL library was found, and'
22888     warn2 'is being used.)'
22889   elif test "$with_gle_req" = no ; then
22890     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
22891     warn2 'library is not.'
22892   else
22893     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
22894     warn2 'was not.'
22895   fi
22896
22897   if test "$gle_halfassed" = yes ; then
22898     echo ''
22899     warn2 'More specifically, we found the headers, but not the'
22900     warn2 'libraries; so either GLE is half-installed on this'
22901     warn2 "system, or something else went wrong.  The \`config.log'"
22902     warn2 'file might contain some clues.'
22903   fi
22904
22905   echo ''
22906   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
22907   warn2 'will not be built or installed.  You might want to consider'
22908   warn2 'installing GLE and re-running configure.  You can find the'
22909   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
22910   warn2 'OpenGL info, see <http://www.opengl.org/>.'
22911
22912  fi
22913 fi
22914
22915
22916 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
22917   warn 'Use of XReadDisplay was requested, but it was not found.'
22918 fi
22919
22920 if test -n "$with_fortune_req"; then
22921   if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
22922     warnL "$with_fortune_req was requested as the Fortune program,"
22923     warn2 "but was not found.  The default will be used instead."
22924   fi
22925 fi
22926
22927 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
22928   warn 'Use of Kerberos was requested, but it was not found.'
22929 fi
22930
22931 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
22932   warn 'Use of PAM was requested, but it was not found.'
22933 fi
22934
22935 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
22936   warn 'Use of shadow passwords was requested, but they were not found.'
22937 fi
22938
22939
22940 # You are in a twisty maze of namespaces and syntaxes, all alike.
22941 # Fuck the skull of Unix.
22942 #
22943 eval bindir=${bindir}
22944 eval bindir=${bindir}
22945 eval bindir=${bindir}
22946 eval bindir=${bindir}
22947 eval bindir=${bindir}
22948 eval bindir=${bindir}
22949 eval HACKDIR=${HACKDIR}
22950 eval HACKDIR=${HACKDIR}
22951 eval HACKDIR=${HACKDIR}
22952 eval HACKDIR=${HACKDIR}
22953 eval HACKDIR=${HACKDIR}
22954 eval HACKDIR=${HACKDIR}
22955 eval HACK_CONF_DIR=${HACK_CONF_DIR}
22956 eval HACK_CONF_DIR=${HACK_CONF_DIR}
22957 eval HACK_CONF_DIR=${HACK_CONF_DIR}
22958 eval HACK_CONF_DIR=${HACK_CONF_DIR}
22959 eval HACK_CONF_DIR=${HACK_CONF_DIR}
22960 eval HACK_CONF_DIR=${HACK_CONF_DIR}
22961
22962 # canonicalize slashes.
22963 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
22964 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
22965 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
22966
22967
22968 # Sanity check the hackdir
22969 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
22970   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
22971     echo ""
22972     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22973                    There will be an executable installed with that name, so
22974                    that can't be the name of a directory as well.  Please
22975                    re-configure with a different directory name." >&5
22976 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
22977                    There will be an executable installed with that name, so
22978                    that can't be the name of a directory as well.  Please
22979                    re-configure with a different directory name." >&2;}
22980    { (exit 1); exit 1; }; }
22981   fi
22982 done
22983
22984
22985 do_dir_warning=no
22986
22987 # Now let's see if there's a previous RPM version already installed.  Blargh!
22988
22989 # M4 sucks!!
22990
22991 rpmv=`(rpm -qv xscreensaver) 2>/dev/null | \
22992       sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
22993
22994
22995 if test \! -z "$rpmv" ; then
22996   rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
22997   rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
22998
22999   warning=no
23000   warnL "There is already an installed RPM of xscreensaver $rpmv"
23001   warn2 "on this system.  You might want to remove it (with"
23002   warn2 '"rpm -ve xscreensaver") before running "make install"'
23003   warn2 "from this directory."
23004   echo ""
23005   warn2 "Alternately, you could build this version of xscreensaver"
23006   warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
23007   warn2 "file is included.  See the RPM documentation for more info."
23008   echo ""
23009
23010   if test "$rpmbdir" = "$rpmhdir" ; then
23011     warn2 "The RPM version was installed in $rpmbdir/."
23012   else
23013     warn2 "The RPM version was installed in $rpmbdir/,"
23014     warn2 "with demos in $rpmhdir/."
23015   fi
23016
23017   do_dir_warning=yes
23018 fi
23019
23020
23021 if test "${bindir}" = "${HACKDIR}" ; then
23022   do_dir_warning=yes
23023 fi
23024
23025 if test "$do_dir_warning" = yes; then
23026   echo ""
23027   echo "$warnsep"
23028   echo ""
23029   echo '      When you run "make install", the "xscreensaver",'
23030   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
23031   echo "      will be installed in ${bindir}/."
23032   echo ""
23033   echo "      The various graphics demos (180+ different executables) will"
23034   echo "      be installed in ${HACKDIR}/."
23035   echo ""
23036   echo "      If you would prefer the demos to be installed elsewhere,"
23037   echo "      you should re-run configure with the --with-hackdir=DIR"
23038   echo "      option.  For more information, run \`./configure --help'."
23039   warning=yes
23040 fi
23041
23042 if test "$warning" != no; then
23043   echo '' ; echo "$warnsep" ; echo ''
23044 fi
23045
23046 if test "$do_dir_warning" = no; then
23047   if test "$warning" = no; then
23048     echo ''
23049   fi
23050   echo "User programs will be installed in ${bindir}/"
23051   echo "Screen savers will be installed in ${HACKDIR}/"
23052   echo "Configuration will be installed in ${HACK_CONF_DIR}/"
23053   echo ''
23054 fi