ftp://ftp.swin.edu.au/slackware/slackware-9.1/source/xap/xscreensaver/xscreensaver...
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.57.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9 ## --------------------- ##
10 ## M4sh Initialization.  ##
11 ## --------------------- ##
12
13 # Be Bourne compatible
14 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15   emulate sh
16   NULLCMD=:
17   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18   # is contrary to our usage.  Disable this feature.
19   alias -g '${1+"$@"}'='"$@"'
20 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21   set -o posix
22 fi
23
24 # Support unset when possible.
25 if (FOO=FOO; unset FOO) >/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 -n "`(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   as_mkdir_p=false
222 fi
223
224 as_executable_p="test -f"
225
226 # Sed expression to map a string onto a valid CPP name.
227 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
228
229 # Sed expression to map a string onto a valid variable name.
230 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
231
232
233 # IFS
234 # We need space, tab and new line, in precisely that order.
235 as_nl='
236 '
237 IFS="   $as_nl"
238
239 # CDPATH.
240 $as_unset CDPATH
241
242
243 # Name of the host.
244 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
245 # so uname gets run too.
246 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
247
248 exec 6>&1
249
250 #
251 # Initializations.
252 #
253 ac_default_prefix=/usr/local
254 ac_config_libobj_dir=.
255 cross_compiling=no
256 subdirs=
257 MFLAGS=
258 MAKEFLAGS=
259 SHELL=${CONFIG_SHELL-/bin/sh}
260
261 # Maximum number of lines to put in a shell here document.
262 # This variable seems obsolete.  It should probably be removed, and
263 # only ac_max_sed_lines should be used.
264 : ${ac_max_here_lines=38}
265
266 # Identity of this package.
267 PACKAGE_NAME=
268 PACKAGE_TARNAME=
269 PACKAGE_VERSION=
270 PACKAGE_STRING=
271 PACKAGE_BUGREPORT=
272
273 ac_unique_file="driver/subprocs.c"
274 # Factoring default headers for most tests.
275 ac_includes_default="\
276 #include <stdio.h>
277 #if HAVE_SYS_TYPES_H
278 # include <sys/types.h>
279 #endif
280 #if HAVE_SYS_STAT_H
281 # include <sys/stat.h>
282 #endif
283 #if STDC_HEADERS
284 # include <stdlib.h>
285 # include <stddef.h>
286 #else
287 # if HAVE_STDLIB_H
288 #  include <stdlib.h>
289 # endif
290 #endif
291 #if HAVE_STRING_H
292 # if !STDC_HEADERS && HAVE_MEMORY_H
293 #  include <memory.h>
294 # endif
295 # include <string.h>
296 #endif
297 #if HAVE_STRINGS_H
298 # include <strings.h>
299 #endif
300 #if HAVE_INTTYPES_H
301 # include <inttypes.h>
302 #else
303 # if HAVE_STDINT_H
304 #  include <stdint.h>
305 # endif
306 #endif
307 #if HAVE_UNISTD_H
308 # include <unistd.h>
309 #endif"
310
311 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 GL_LIBS GLE_LIBS XDPMS_LIBS PASSWD_LIBS INSTALL_SETUID SETUID_HACKS INSTALL_DIRS NEED_SETUID INSTALL_PAM 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'
312 ac_subst_files=''
313
314 # Initialize some variables set by options.
315 ac_init_help=
316 ac_init_version=false
317 # The variables have the same names as the options, with
318 # dashes changed to underlines.
319 cache_file=/dev/null
320 exec_prefix=NONE
321 no_create=
322 no_recursion=
323 prefix=NONE
324 program_prefix=NONE
325 program_suffix=NONE
326 program_transform_name=s,x,x,
327 silent=
328 site=
329 srcdir=
330 verbose=
331 x_includes=NONE
332 x_libraries=NONE
333
334 # Installation directory options.
335 # These are left unexpanded so users can "make install exec_prefix=/foo"
336 # and all the variables that are supposed to be based on exec_prefix
337 # by default will actually change.
338 # Use braces instead of parens because sh, perl, etc. also accept them.
339 bindir='${exec_prefix}/bin'
340 sbindir='${exec_prefix}/sbin'
341 libexecdir='${exec_prefix}/libexec'
342 datadir='${prefix}/share'
343 sysconfdir='${prefix}/etc'
344 sharedstatedir='${prefix}/com'
345 localstatedir='${prefix}/var'
346 libdir='${exec_prefix}/lib'
347 includedir='${prefix}/include'
348 oldincludedir='/usr/include'
349 infodir='${prefix}/info'
350 mandir='${prefix}/man'
351
352 ac_prev=
353 for ac_option
354 do
355   # If the previous option needs an argument, assign it.
356   if test -n "$ac_prev"; then
357     eval "$ac_prev=\$ac_option"
358     ac_prev=
359     continue
360   fi
361
362   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
363
364   # Accept the important Cygnus configure options, so we can diagnose typos.
365
366   case $ac_option in
367
368   -bindir | --bindir | --bindi | --bind | --bin | --bi)
369     ac_prev=bindir ;;
370   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
371     bindir=$ac_optarg ;;
372
373   -build | --build | --buil | --bui | --bu)
374     ac_prev=build_alias ;;
375   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
376     build_alias=$ac_optarg ;;
377
378   -cache-file | --cache-file | --cache-fil | --cache-fi \
379   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
380     ac_prev=cache_file ;;
381   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
382   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
383     cache_file=$ac_optarg ;;
384
385   --config-cache | -C)
386     cache_file=config.cache ;;
387
388   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
389     ac_prev=datadir ;;
390   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
391   | --da=*)
392     datadir=$ac_optarg ;;
393
394   -disable-* | --disable-*)
395     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
396     # Reject names that are not valid shell variable names.
397     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
398       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
399    { (exit 1); exit 1; }; }
400     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
401     eval "enable_$ac_feature=no" ;;
402
403   -enable-* | --enable-*)
404     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
405     # Reject names that are not valid shell variable names.
406     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
407       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
408    { (exit 1); exit 1; }; }
409     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
410     case $ac_option in
411       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
412       *) ac_optarg=yes ;;
413     esac
414     eval "enable_$ac_feature='$ac_optarg'" ;;
415
416   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
417   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
418   | --exec | --exe | --ex)
419     ac_prev=exec_prefix ;;
420   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
421   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
422   | --exec=* | --exe=* | --ex=*)
423     exec_prefix=$ac_optarg ;;
424
425   -gas | --gas | --ga | --g)
426     # Obsolete; use --with-gas.
427     with_gas=yes ;;
428
429   -help | --help | --hel | --he | -h)
430     ac_init_help=long ;;
431   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
432     ac_init_help=recursive ;;
433   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
434     ac_init_help=short ;;
435
436   -host | --host | --hos | --ho)
437     ac_prev=host_alias ;;
438   -host=* | --host=* | --hos=* | --ho=*)
439     host_alias=$ac_optarg ;;
440
441   -includedir | --includedir | --includedi | --included | --include \
442   | --includ | --inclu | --incl | --inc)
443     ac_prev=includedir ;;
444   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
445   | --includ=* | --inclu=* | --incl=* | --inc=*)
446     includedir=$ac_optarg ;;
447
448   -infodir | --infodir | --infodi | --infod | --info | --inf)
449     ac_prev=infodir ;;
450   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
451     infodir=$ac_optarg ;;
452
453   -libdir | --libdir | --libdi | --libd)
454     ac_prev=libdir ;;
455   -libdir=* | --libdir=* | --libdi=* | --libd=*)
456     libdir=$ac_optarg ;;
457
458   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
459   | --libexe | --libex | --libe)
460     ac_prev=libexecdir ;;
461   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
462   | --libexe=* | --libex=* | --libe=*)
463     libexecdir=$ac_optarg ;;
464
465   -localstatedir | --localstatedir | --localstatedi | --localstated \
466   | --localstate | --localstat | --localsta | --localst \
467   | --locals | --local | --loca | --loc | --lo)
468     ac_prev=localstatedir ;;
469   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
470   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
471   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
472     localstatedir=$ac_optarg ;;
473
474   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
475     ac_prev=mandir ;;
476   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
477     mandir=$ac_optarg ;;
478
479   -nfp | --nfp | --nf)
480     # Obsolete; use --without-fp.
481     with_fp=no ;;
482
483   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
484   | --no-cr | --no-c | -n)
485     no_create=yes ;;
486
487   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
489     no_recursion=yes ;;
490
491   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
492   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
493   | --oldin | --oldi | --old | --ol | --o)
494     ac_prev=oldincludedir ;;
495   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
496   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
497   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
498     oldincludedir=$ac_optarg ;;
499
500   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
501     ac_prev=prefix ;;
502   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503     prefix=$ac_optarg ;;
504
505   -program-prefix | --program-prefix | --program-prefi | --program-pref \
506   | --program-pre | --program-pr | --program-p)
507     ac_prev=program_prefix ;;
508   -program-prefix=* | --program-prefix=* | --program-prefi=* \
509   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
510     program_prefix=$ac_optarg ;;
511
512   -program-suffix | --program-suffix | --program-suffi | --program-suff \
513   | --program-suf | --program-su | --program-s)
514     ac_prev=program_suffix ;;
515   -program-suffix=* | --program-suffix=* | --program-suffi=* \
516   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
517     program_suffix=$ac_optarg ;;
518
519   -program-transform-name | --program-transform-name \
520   | --program-transform-nam | --program-transform-na \
521   | --program-transform-n | --program-transform- \
522   | --program-transform | --program-transfor \
523   | --program-transfo | --program-transf \
524   | --program-trans | --program-tran \
525   | --progr-tra | --program-tr | --program-t)
526     ac_prev=program_transform_name ;;
527   -program-transform-name=* | --program-transform-name=* \
528   | --program-transform-nam=* | --program-transform-na=* \
529   | --program-transform-n=* | --program-transform-=* \
530   | --program-transform=* | --program-transfor=* \
531   | --program-transfo=* | --program-transf=* \
532   | --program-trans=* | --program-tran=* \
533   | --progr-tra=* | --program-tr=* | --program-t=*)
534     program_transform_name=$ac_optarg ;;
535
536   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
537   | -silent | --silent | --silen | --sile | --sil)
538     silent=yes ;;
539
540   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
541     ac_prev=sbindir ;;
542   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
543   | --sbi=* | --sb=*)
544     sbindir=$ac_optarg ;;
545
546   -sharedstatedir | --sharedstatedir | --sharedstatedi \
547   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
548   | --sharedst | --shareds | --shared | --share | --shar \
549   | --sha | --sh)
550     ac_prev=sharedstatedir ;;
551   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
552   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
553   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
554   | --sha=* | --sh=*)
555     sharedstatedir=$ac_optarg ;;
556
557   -site | --site | --sit)
558     ac_prev=site ;;
559   -site=* | --site=* | --sit=*)
560     site=$ac_optarg ;;
561
562   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
563     ac_prev=srcdir ;;
564   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
565     srcdir=$ac_optarg ;;
566
567   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
568   | --syscon | --sysco | --sysc | --sys | --sy)
569     ac_prev=sysconfdir ;;
570   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
571   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
572     sysconfdir=$ac_optarg ;;
573
574   -target | --target | --targe | --targ | --tar | --ta | --t)
575     ac_prev=target_alias ;;
576   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
577     target_alias=$ac_optarg ;;
578
579   -v | -verbose | --verbose | --verbos | --verbo | --verb)
580     verbose=yes ;;
581
582   -version | --version | --versio | --versi | --vers | -V)
583     ac_init_version=: ;;
584
585   -with-* | --with-*)
586     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
587     # Reject names that are not valid shell variable names.
588     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589       { echo "$as_me: error: invalid package name: $ac_package" >&2
590    { (exit 1); exit 1; }; }
591     ac_package=`echo $ac_package| sed 's/-/_/g'`
592     case $ac_option in
593       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
594       *) ac_optarg=yes ;;
595     esac
596     eval "with_$ac_package='$ac_optarg'" ;;
597
598   -without-* | --without-*)
599     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
600     # Reject names that are not valid shell variable names.
601     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
602       { echo "$as_me: error: invalid package name: $ac_package" >&2
603    { (exit 1); exit 1; }; }
604     ac_package=`echo $ac_package | sed 's/-/_/g'`
605     eval "with_$ac_package=no" ;;
606
607   --x)
608     # Obsolete; use --with-x.
609     with_x=yes ;;
610
611   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
612   | --x-incl | --x-inc | --x-in | --x-i)
613     ac_prev=x_includes ;;
614   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
615   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
616     x_includes=$ac_optarg ;;
617
618   -x-libraries | --x-libraries | --x-librarie | --x-librari \
619   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
620     ac_prev=x_libraries ;;
621   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
622   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
623     x_libraries=$ac_optarg ;;
624
625   -*) { echo "$as_me: error: unrecognized option: $ac_option
626 Try \`$0 --help' for more information." >&2
627    { (exit 1); exit 1; }; }
628     ;;
629
630   *=*)
631     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
632     # Reject names that are not valid shell variable names.
633     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
634       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
635    { (exit 1); exit 1; }; }
636     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
637     eval "$ac_envvar='$ac_optarg'"
638     export $ac_envvar ;;
639
640   *)
641     # FIXME: should be removed in autoconf 3.0.
642     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
643     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
644       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
645     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
646     ;;
647
648   esac
649 done
650
651 if test -n "$ac_prev"; then
652   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
653   { echo "$as_me: error: missing argument to $ac_option" >&2
654    { (exit 1); exit 1; }; }
655 fi
656
657 # Be sure to have absolute paths.
658 for ac_var in exec_prefix prefix
659 do
660   eval ac_val=$`echo $ac_var`
661   case $ac_val in
662     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
663     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
664    { (exit 1); exit 1; }; };;
665   esac
666 done
667
668 # Be sure to have absolute paths.
669 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
670               localstatedir libdir includedir oldincludedir infodir mandir
671 do
672   eval ac_val=$`echo $ac_var`
673   case $ac_val in
674     [\\/$]* | ?:[\\/]* ) ;;
675     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
676    { (exit 1); exit 1; }; };;
677   esac
678 done
679
680 # There might be people who depend on the old broken behavior: `$host'
681 # used to hold the argument of --host etc.
682 # FIXME: To remove some day.
683 build=$build_alias
684 host=$host_alias
685 target=$target_alias
686
687 # FIXME: To remove some day.
688 if test "x$host_alias" != x; then
689   if test "x$build_alias" = x; then
690     cross_compiling=maybe
691     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
692     If a cross compiler is detected then cross compile mode will be used." >&2
693   elif test "x$build_alias" != "x$host_alias"; then
694     cross_compiling=yes
695   fi
696 fi
697
698 ac_tool_prefix=
699 test -n "$host_alias" && ac_tool_prefix=$host_alias-
700
701 test "$silent" = yes && exec 6>/dev/null
702
703
704 # Find the source files, if location was not specified.
705 if test -z "$srcdir"; then
706   ac_srcdir_defaulted=yes
707   # Try the directory containing this script, then its parent.
708   ac_confdir=`(dirname "$0") 2>/dev/null ||
709 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
710          X"$0" : 'X\(//\)[^/]' \| \
711          X"$0" : 'X\(//\)$' \| \
712          X"$0" : 'X\(/\)' \| \
713          .     : '\(.\)' 2>/dev/null ||
714 echo X"$0" |
715     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
716           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
717           /^X\(\/\/\)$/{ s//\1/; q; }
718           /^X\(\/\).*/{ s//\1/; q; }
719           s/.*/./; q'`
720   srcdir=$ac_confdir
721   if test ! -r $srcdir/$ac_unique_file; then
722     srcdir=..
723   fi
724 else
725   ac_srcdir_defaulted=no
726 fi
727 if test ! -r $srcdir/$ac_unique_file; then
728   if test "$ac_srcdir_defaulted" = yes; then
729     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
730    { (exit 1); exit 1; }; }
731   else
732     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
733    { (exit 1); exit 1; }; }
734   fi
735 fi
736 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
737   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
738    { (exit 1); exit 1; }; }
739 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
740 ac_env_build_alias_set=${build_alias+set}
741 ac_env_build_alias_value=$build_alias
742 ac_cv_env_build_alias_set=${build_alias+set}
743 ac_cv_env_build_alias_value=$build_alias
744 ac_env_host_alias_set=${host_alias+set}
745 ac_env_host_alias_value=$host_alias
746 ac_cv_env_host_alias_set=${host_alias+set}
747 ac_cv_env_host_alias_value=$host_alias
748 ac_env_target_alias_set=${target_alias+set}
749 ac_env_target_alias_value=$target_alias
750 ac_cv_env_target_alias_set=${target_alias+set}
751 ac_cv_env_target_alias_value=$target_alias
752 ac_env_CC_set=${CC+set}
753 ac_env_CC_value=$CC
754 ac_cv_env_CC_set=${CC+set}
755 ac_cv_env_CC_value=$CC
756 ac_env_CFLAGS_set=${CFLAGS+set}
757 ac_env_CFLAGS_value=$CFLAGS
758 ac_cv_env_CFLAGS_set=${CFLAGS+set}
759 ac_cv_env_CFLAGS_value=$CFLAGS
760 ac_env_LDFLAGS_set=${LDFLAGS+set}
761 ac_env_LDFLAGS_value=$LDFLAGS
762 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
763 ac_cv_env_LDFLAGS_value=$LDFLAGS
764 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
765 ac_env_CPPFLAGS_value=$CPPFLAGS
766 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
767 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
768 ac_env_CPP_set=${CPP+set}
769 ac_env_CPP_value=$CPP
770 ac_cv_env_CPP_set=${CPP+set}
771 ac_cv_env_CPP_value=$CPP
772
773 #
774 # Report the --help message.
775 #
776 if test "$ac_init_help" = "long"; then
777   # Omit some internal or obsolete options to make the list less imposing.
778   # This message is too long to be a string in the A/UX 3.1 sh.
779   cat <<_ACEOF
780 \`configure' configures this package to adapt to many kinds of systems.
781
782 Usage: $0 [OPTION]... [VAR=VALUE]...
783
784 To assign environment variables (e.g., CC, CFLAGS...), specify them as
785 VAR=VALUE.  See below for descriptions of some of the useful variables.
786
787 Defaults for the options are specified in brackets.
788
789
790 Configuration:
791
792   -h, --help              display this help and exit
793       --help=short        display options specific to this package
794       --help=recursive    display the short help of all the included packages
795   -V, --version           display version information and exit
796   -q, --quiet, --silent   do not print \`checking...' messages
797       --cache-file=FILE   cache test results in FILE [disabled]
798   -C, --config-cache      alias for \`--cache-file=config.cache'
799   -n, --no-create         do not create output files
800       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
801
802 _ACEOF
803
804   cat <<_ACEOF
805 Installation directories:
806   --prefix=PREFIX         install architecture-independent files in PREFIX
807                           [$ac_default_prefix]
808   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
809                           [PREFIX]
810
811 By default, \`make install' will install all the files in
812 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
813 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
814 for instance \`--prefix=\$HOME'.
815
816 For better control, use the options below.
817
818 Fine tuning of the installation directories:
819   --bindir=DIR           user executables [EPREFIX/bin]
820   --libdir=DIR           object code libraries [EPREFIX/lib]
821   --includedir=DIR       C header files [PREFIX/include]
822   --x-includes=DIR        X include files are in DIR
823   --x-libraries=DIR       X library files are in DIR
824   --mandir=DIR           man documentation [PREFIX/man]
825 _ACEOF
826
827   cat <<\_ACEOF
828
829 X features:
830   --x-includes=DIR    X include files are in DIR
831   --x-libraries=DIR   X library files are in DIR
832
833 System types:
834   --build=BUILD     configure for building on BUILD [guessed]
835   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
836 _ACEOF
837 fi
838
839 if test -n "$ac_init_help"; then
840
841   cat <<\_ACEOF
842
843 Optional Features:
844   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
845   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
846
847
848 Screen locking options:
849
850   --enable-locking        Compile in support for locking the display.
851   --disable-locking       Do not allow locking at all.
852
853 Optional Packages:
854   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
855   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
856 Installation options:
857
858   --with-hackdir=DIR      Where to install the hundreds of demo executables.
859                           Default: \`PREFIX/lib/xscreensaver/'
860   --with-configdir=DIR    Where to install the data files that describe each
861                           of the display modes to the GUI.
862                           Default: \`GNOMEPREFIX/control-center/screensavers/'
863                           or \`PREFIX/lib/xscreensaver/config/', depending on
864                           whether GNOME is available.
865
866 Except where noted, all of the --with options below can also take a
867 directory argument: for example, \`--with-motif=/opt/Motif'.  That would
868 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
869 to be added to the -L list, assuming those directories exist.
870
871 By default, support for each of these options will be built in, if the
872 relevant library routines exist.  At run time, they will then be used
873 only if the X server being used supports them.  Each --with option has
874 a corresponding --without option, to override building support for them
875 at all.
876
877 Screen blanking and idle-detection options:
878
879   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
880   --with-mit-ext          Include support for the MIT-SCREEN-SAVER extension.
881   --with-xidle-ext        Include support for the XIDLE extension.
882   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
883   --with-dpms-ext         Include support for the DPMS extension.
884   --with-xinerama-ext     Include support for the XINERAMA extension.
885   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
886   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
887   --with-proc-interrupts  Include support for consulting the /proc/interrupts
888                           file to notice keyboard activity.
889   --with-pam              Include support for PAM (Pluggable Auth Modules.)
890   --with-kerberos         Include support for Kerberos authentication.
891   --with-shadow           Include support for shadow password authentication.
892
893 User interface options:
894
895   --with-motif            Use the Motif toolkit for the user interface
896                           (not recommended.)
897   --with-gtk              Use the Gtk toolkit for the user interface.
898   --with-gnome            Include support for the Gnome 1.x Control Center.
899                           (This option is not needed with GTK 2.x / Gnome 2.x.)
900
901   --with-xml              The XML toolkit is needed for some parts of
902                           the Gtk interface.  Without it, the configuration
903                           interface will be much less featureful.
904
905 Graphics options:
906
907   --with-gl               Build those demos which depend on OpenGL.
908   --with-gle              Build those demos which depend on GLE
909                           (the OpenGL "extrusion" library.)
910   --with-xpm              Include support for XPM files in some demos.
911                           (Not needed if Pixbuf is used.)
912   --with-pixbuf           Include support for the GDK-Pixbuf library in some
913                           demos, which will make it possible for them to read
914                           GIF, JPEG, and PNG files as well.  (The path here is
915                           ignored if GTK 2.x is being used.)
916   --with-jpeg             Include support for the JPEG library.
917   --with-xshm-ext         Include support for the Shared Memory extension.
918   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
919   --with-readdisplay      Include support for the XReadDisplay extension.
920
921   --with-fortune=PROGRAM  Some demos are able to run an external program and
922                           display its text; this names the program to use by
923                           default (though it can be overridden with X
924                           resources.)  Default is \"/usr/games/fortune\".
925   --with-setuid-hacks     Allow some demos to be installed \`setuid root'
926                           (which is needed in order to ping other hosts.)
927
928
929 Some influential environment variables:
930   CC          C compiler command
931   CFLAGS      C compiler flags
932   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
933               nonstandard directory <lib dir>
934   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
935               headers in a nonstandard directory <include dir>
936   CPP         C preprocessor
937
938 Use these variables to override the choices made by `configure' or to help
939 it to find libraries and programs with nonstandard names/locations.
940
941 _ACEOF
942 fi
943
944 if test "$ac_init_help" = "recursive"; then
945   # If there are subdirs, report their specific --help.
946   ac_popdir=`pwd`
947   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
948     test -d $ac_dir || continue
949     ac_builddir=.
950
951 if test "$ac_dir" != .; then
952   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
953   # A "../" for each directory in $ac_dir_suffix.
954   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
955 else
956   ac_dir_suffix= ac_top_builddir=
957 fi
958
959 case $srcdir in
960   .)  # No --srcdir option.  We are building in place.
961     ac_srcdir=.
962     if test -z "$ac_top_builddir"; then
963        ac_top_srcdir=.
964     else
965        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
966     fi ;;
967   [\\/]* | ?:[\\/]* )  # Absolute path.
968     ac_srcdir=$srcdir$ac_dir_suffix;
969     ac_top_srcdir=$srcdir ;;
970   *) # Relative path.
971     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
972     ac_top_srcdir=$ac_top_builddir$srcdir ;;
973 esac
974 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
975 # absolute.
976 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
977 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
978 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
979 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
980
981     cd $ac_dir
982     # Check for guested configure; otherwise get Cygnus style configure.
983     if test -f $ac_srcdir/configure.gnu; then
984       echo
985       $SHELL $ac_srcdir/configure.gnu  --help=recursive
986     elif test -f $ac_srcdir/configure; then
987       echo
988       $SHELL $ac_srcdir/configure  --help=recursive
989     elif test -f $ac_srcdir/configure.ac ||
990            test -f $ac_srcdir/configure.in; then
991       echo
992       $ac_configure --help
993     else
994       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
995     fi
996     cd $ac_popdir
997   done
998 fi
999
1000 test -n "$ac_init_help" && exit 0
1001 if $ac_init_version; then
1002   cat <<\_ACEOF
1003
1004 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
1005 Free Software Foundation, Inc.
1006 This configure script is free software; the Free Software Foundation
1007 gives unlimited permission to copy, distribute and modify it.
1008 _ACEOF
1009   exit 0
1010 fi
1011 exec 5>config.log
1012 cat >&5 <<_ACEOF
1013 This file contains any messages produced by compilers while
1014 running configure, to aid debugging if configure makes a mistake.
1015
1016 It was created by $as_me, which was
1017 generated by GNU Autoconf 2.57.  Invocation command line was
1018
1019   $ $0 $@
1020
1021 _ACEOF
1022 {
1023 cat <<_ASUNAME
1024 ## --------- ##
1025 ## Platform. ##
1026 ## --------- ##
1027
1028 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1029 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1030 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1031 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1032 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1033
1034 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1035 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1036
1037 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1038 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1039 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1040 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1041 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1042 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1043 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1044
1045 _ASUNAME
1046
1047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1048 for as_dir in $PATH
1049 do
1050   IFS=$as_save_IFS
1051   test -z "$as_dir" && as_dir=.
1052   echo "PATH: $as_dir"
1053 done
1054
1055 } >&5
1056
1057 cat >&5 <<_ACEOF
1058
1059
1060 ## ----------- ##
1061 ## Core tests. ##
1062 ## ----------- ##
1063
1064 _ACEOF
1065
1066
1067 # Keep a trace of the command line.
1068 # Strip out --no-create and --no-recursion so they do not pile up.
1069 # Strip out --silent because we don't want to record it for future runs.
1070 # Also quote any args containing shell meta-characters.
1071 # Make two passes to allow for proper duplicate-argument suppression.
1072 ac_configure_args=
1073 ac_configure_args0=
1074 ac_configure_args1=
1075 ac_sep=
1076 ac_must_keep_next=false
1077 for ac_pass in 1 2
1078 do
1079   for ac_arg
1080   do
1081     case $ac_arg in
1082     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1083     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1084     | -silent | --silent | --silen | --sile | --sil)
1085       continue ;;
1086     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1087       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1088     esac
1089     case $ac_pass in
1090     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1091     2)
1092       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1093       if test $ac_must_keep_next = true; then
1094         ac_must_keep_next=false # Got value, back to normal.
1095       else
1096         case $ac_arg in
1097           *=* | --config-cache | -C | -disable-* | --disable-* \
1098           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1099           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1100           | -with-* | --with-* | -without-* | --without-* | --x)
1101             case "$ac_configure_args0 " in
1102               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1103             esac
1104             ;;
1105           -* ) ac_must_keep_next=true ;;
1106         esac
1107       fi
1108       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1109       # Get rid of the leading space.
1110       ac_sep=" "
1111       ;;
1112     esac
1113   done
1114 done
1115 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1116 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1117
1118 # When interrupted or exit'd, cleanup temporary files, and complete
1119 # config.log.  We remove comments because anyway the quotes in there
1120 # would cause problems or look ugly.
1121 # WARNING: Be sure not to use single quotes in there, as some shells,
1122 # such as our DU 5.0 friend, will then `close' the trap.
1123 trap 'exit_status=$?
1124   # Save into config.log some information that might help in debugging.
1125   {
1126     echo
1127
1128     cat <<\_ASBOX
1129 ## ---------------- ##
1130 ## Cache variables. ##
1131 ## ---------------- ##
1132 _ASBOX
1133     echo
1134     # The following way of writing the cache mishandles newlines in values,
1135 {
1136   (set) 2>&1 |
1137     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1138     *ac_space=\ *)
1139       sed -n \
1140         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1141           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1142       ;;
1143     *)
1144       sed -n \
1145         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1146       ;;
1147     esac;
1148 }
1149     echo
1150
1151     cat <<\_ASBOX
1152 ## ----------------- ##
1153 ## Output variables. ##
1154 ## ----------------- ##
1155 _ASBOX
1156     echo
1157     for ac_var in $ac_subst_vars
1158     do
1159       eval ac_val=$`echo $ac_var`
1160       echo "$ac_var='"'"'$ac_val'"'"'"
1161     done | sort
1162     echo
1163
1164     if test -n "$ac_subst_files"; then
1165       cat <<\_ASBOX
1166 ## ------------- ##
1167 ## Output files. ##
1168 ## ------------- ##
1169 _ASBOX
1170       echo
1171       for ac_var in $ac_subst_files
1172       do
1173         eval ac_val=$`echo $ac_var`
1174         echo "$ac_var='"'"'$ac_val'"'"'"
1175       done | sort
1176       echo
1177     fi
1178
1179     if test -s confdefs.h; then
1180       cat <<\_ASBOX
1181 ## ----------- ##
1182 ## confdefs.h. ##
1183 ## ----------- ##
1184 _ASBOX
1185       echo
1186       sed "/^$/d" confdefs.h | sort
1187       echo
1188     fi
1189     test "$ac_signal" != 0 &&
1190       echo "$as_me: caught signal $ac_signal"
1191     echo "$as_me: exit $exit_status"
1192   } >&5
1193   rm -f core core.* *.core &&
1194   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1195     exit $exit_status
1196      ' 0
1197 for ac_signal in 1 2 13 15; do
1198   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1199 done
1200 ac_signal=0
1201
1202 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1203 rm -rf conftest* confdefs.h
1204 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1205 echo >confdefs.h
1206
1207 # Predefined preprocessor variables.
1208
1209 cat >>confdefs.h <<_ACEOF
1210 #define PACKAGE_NAME "$PACKAGE_NAME"
1211 _ACEOF
1212
1213
1214 cat >>confdefs.h <<_ACEOF
1215 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1216 _ACEOF
1217
1218
1219 cat >>confdefs.h <<_ACEOF
1220 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1221 _ACEOF
1222
1223
1224 cat >>confdefs.h <<_ACEOF
1225 #define PACKAGE_STRING "$PACKAGE_STRING"
1226 _ACEOF
1227
1228
1229 cat >>confdefs.h <<_ACEOF
1230 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1231 _ACEOF
1232
1233
1234 # Let the site file select an alternate cache file if it wants to.
1235 # Prefer explicitly selected file to automatically selected ones.
1236 if test -z "$CONFIG_SITE"; then
1237   if test "x$prefix" != xNONE; then
1238     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1239   else
1240     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1241   fi
1242 fi
1243 for ac_site_file in $CONFIG_SITE; do
1244   if test -r "$ac_site_file"; then
1245     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1246 echo "$as_me: loading site script $ac_site_file" >&6;}
1247     sed 's/^/| /' "$ac_site_file" >&5
1248     . "$ac_site_file"
1249   fi
1250 done
1251
1252 if test -r "$cache_file"; then
1253   # Some versions of bash will fail to source /dev/null (special
1254   # files actually), so we avoid doing that.
1255   if test -f "$cache_file"; then
1256     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1257 echo "$as_me: loading cache $cache_file" >&6;}
1258     case $cache_file in
1259       [\\/]* | ?:[\\/]* ) . $cache_file;;
1260       *)                      . ./$cache_file;;
1261     esac
1262   fi
1263 else
1264   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1265 echo "$as_me: creating cache $cache_file" >&6;}
1266   >$cache_file
1267 fi
1268
1269 # Check that the precious variables saved in the cache have kept the same
1270 # value.
1271 ac_cache_corrupted=false
1272 for ac_var in `(set) 2>&1 |
1273                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1274   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1275   eval ac_new_set=\$ac_env_${ac_var}_set
1276   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1277   eval ac_new_val="\$ac_env_${ac_var}_value"
1278   case $ac_old_set,$ac_new_set in
1279     set,)
1280       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1281 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1282       ac_cache_corrupted=: ;;
1283     ,set)
1284       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1285 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1286       ac_cache_corrupted=: ;;
1287     ,);;
1288     *)
1289       if test "x$ac_old_val" != "x$ac_new_val"; then
1290         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1291 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1292         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1293 echo "$as_me:   former value:  $ac_old_val" >&2;}
1294         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1295 echo "$as_me:   current value: $ac_new_val" >&2;}
1296         ac_cache_corrupted=:
1297       fi;;
1298   esac
1299   # Pass precious variables to config.status.
1300   if test "$ac_new_set" = set; then
1301     case $ac_new_val in
1302     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1303       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1304     *) ac_arg=$ac_var=$ac_new_val ;;
1305     esac
1306     case " $ac_configure_args " in
1307       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1308       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1309     esac
1310   fi
1311 done
1312 if $ac_cache_corrupted; then
1313   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1314 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1315   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1316 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1317    { (exit 1); exit 1; }; }
1318 fi
1319
1320 ac_ext=c
1321 ac_cpp='$CPP $CPPFLAGS'
1322 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1323 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1324 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344           ac_config_headers="$ac_config_headers config.h"
1345
1346
1347 echo "current directory: `pwd`"
1348 echo "command line was: $0 $@"
1349
1350
1351 # After checking to see that --srcdir is correct (which AC_INIT does)
1352 # check for some random other files that come later in the tar file,
1353 # to make sure everything is here.
1354 #
1355 for d in driver utils hacks hacks/glx ; do
1356   f=$srcdir/$d/Makefile.in
1357   if test \! -r $f ; then
1358     echo ""
1359     echo "ERROR: The package is incomplete: $f does not exist."
1360     echo "       This probably means that your download was truncated."
1361     echo ""
1362     exit 1
1363   fi
1364 done
1365
1366 ###############################################################################
1367 #
1368 #       Function to figure out how to run the compiler.
1369 #
1370 ###############################################################################
1371
1372
1373
1374
1375 ###############################################################################
1376 #
1377 #       Functions to figure out how to disable // comments in ANSI C code.
1378 #
1379 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
1380 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
1381 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
1382 #       so much for compatibility!)
1383 #
1384 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
1385 #       declarations preceed statements, without resorting to "-pedantic".
1386 #       This means that there is no way to get gcc3 to issue warnings that
1387 #       ensure that your code complies with the ANSI/ISO C89 standard, without
1388 #       also drowning in totally useless warnings.  Thank you master may I
1389 #       have another.
1390 #
1391 #       So, I give up, let's just use -pedantic.
1392 #
1393 ###############################################################################
1394
1395
1396
1397
1398
1399
1400 ###############################################################################
1401 #
1402 #       Function to figure out how to turn off Objective C on MacOS X.
1403 #       (We have to do this to work around an Apple-specific gcc bug.)
1404 #
1405 ###############################################################################
1406
1407
1408
1409
1410
1411
1412 ###############################################################################
1413 #
1414 #       Function to figure out how to create directory trees.
1415 #
1416 ###############################################################################
1417
1418
1419
1420
1421 ###############################################################################
1422 #
1423 #       Function to check whether gettimeofday() exists, and how to call it.
1424 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1425 #
1426 ###############################################################################
1427
1428
1429
1430
1431 ###############################################################################
1432 #
1433 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1434 #
1435 ###############################################################################
1436
1437 # M4 sucks!!  perl sucks too!!
1438
1439 perl_version_cmd='print $]'
1440
1441
1442
1443
1444
1445 ###############################################################################
1446 #
1447 #       Function to demand "bc".  Losers.
1448 #
1449 ###############################################################################
1450
1451
1452
1453 ###############################################################################
1454 #
1455 #       Functions to check how to do ICMP PING requests.
1456 #
1457 ###############################################################################
1458
1459
1460
1461
1462
1463
1464 ###############################################################################
1465 #
1466 #       Functions to check for various X11 crap.
1467 #
1468 ###############################################################################
1469
1470 # Try and find the app-defaults directory.
1471 # It sucks that autoconf doesn't do this already...
1472 #
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483 # Random special-cases for X on certain pathological OSes.
1484 # You know who you are.
1485 #
1486
1487
1488
1489
1490 ###############################################################################
1491 #
1492 #       Some utility functions to make checking for X things easier.
1493 #
1494 ###############################################################################
1495
1496 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1497 #
1498
1499
1500 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1501 #
1502
1503
1504 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1505 #
1506
1507
1508
1509 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1510 # Use this sparingly; it probably doesn't work very well on X programs.
1511 #
1512
1513
1514 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1515 # (But not the -L directories!)
1516 #
1517
1518
1519
1520
1521 # Usage: HANDLE_X_PATH_ARG([variable_name],
1522 #                          [--command-line-option],
1523 #                          [descriptive string])
1524 #
1525 # All of the --with options take three forms:
1526 #
1527 #   --with-foo (or --with-foo=yes)
1528 #   --without-foo (or --with-foo=no)
1529 #   --with-foo=/DIR
1530 #
1531 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1532 # a directory (string beginning with a slash) it checks to see whether
1533 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1534 # as appropriate.
1535 #
1536
1537
1538
1539
1540 ###############################################################################
1541 ###############################################################################
1542 #
1543 #       End of function definitions.  Now start actually executing stuff.
1544 #
1545 ###############################################################################
1546 ###############################################################################
1547
1548 # random compiler setup
1549 ac_aux_dir=
1550 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1551   if test -f $ac_dir/install-sh; then
1552     ac_aux_dir=$ac_dir
1553     ac_install_sh="$ac_aux_dir/install-sh -c"
1554     break
1555   elif test -f $ac_dir/install.sh; then
1556     ac_aux_dir=$ac_dir
1557     ac_install_sh="$ac_aux_dir/install.sh -c"
1558     break
1559   elif test -f $ac_dir/shtool; then
1560     ac_aux_dir=$ac_dir
1561     ac_install_sh="$ac_aux_dir/shtool install -c"
1562     break
1563   fi
1564 done
1565 if test -z "$ac_aux_dir"; then
1566   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1567 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1568    { (exit 1); exit 1; }; }
1569 fi
1570 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1571 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1572 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1573
1574 # Make sure we can run config.sub.
1575 $ac_config_sub sun4 >/dev/null 2>&1 ||
1576   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1577 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1578    { (exit 1); exit 1; }; }
1579
1580 echo "$as_me:$LINENO: checking build system type" >&5
1581 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1582 if test "${ac_cv_build+set}" = set; then
1583   echo $ECHO_N "(cached) $ECHO_C" >&6
1584 else
1585   ac_cv_build_alias=$build_alias
1586 test -z "$ac_cv_build_alias" &&
1587   ac_cv_build_alias=`$ac_config_guess`
1588 test -z "$ac_cv_build_alias" &&
1589   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1590 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1591    { (exit 1); exit 1; }; }
1592 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1593   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1594 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1595    { (exit 1); exit 1; }; }
1596
1597 fi
1598 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1599 echo "${ECHO_T}$ac_cv_build" >&6
1600 build=$ac_cv_build
1601 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1602 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1603 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1604
1605
1606 echo "$as_me:$LINENO: checking host system type" >&5
1607 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1608 if test "${ac_cv_host+set}" = set; then
1609   echo $ECHO_N "(cached) $ECHO_C" >&6
1610 else
1611   ac_cv_host_alias=$host_alias
1612 test -z "$ac_cv_host_alias" &&
1613   ac_cv_host_alias=$ac_cv_build_alias
1614 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1615   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1616 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1617    { (exit 1); exit 1; }; }
1618
1619 fi
1620 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1621 echo "${ECHO_T}$ac_cv_host" >&6
1622 host=$ac_cv_host
1623 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1624 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1625 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1626
1627
1628
1629 ac_ext=c
1630 ac_cpp='$CPP $CPPFLAGS'
1631 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1632 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1633 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1634 if test -n "$ac_tool_prefix"; then
1635   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1636 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1637 echo "$as_me:$LINENO: checking for $ac_word" >&5
1638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1639 if test "${ac_cv_prog_CC+set}" = set; then
1640   echo $ECHO_N "(cached) $ECHO_C" >&6
1641 else
1642   if test -n "$CC"; then
1643   ac_cv_prog_CC="$CC" # Let the user override the test.
1644 else
1645 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1646 for as_dir in $PATH
1647 do
1648   IFS=$as_save_IFS
1649   test -z "$as_dir" && as_dir=.
1650   for ac_exec_ext in '' $ac_executable_extensions; do
1651   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1652     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1653     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1654     break 2
1655   fi
1656 done
1657 done
1658
1659 fi
1660 fi
1661 CC=$ac_cv_prog_CC
1662 if test -n "$CC"; then
1663   echo "$as_me:$LINENO: result: $CC" >&5
1664 echo "${ECHO_T}$CC" >&6
1665 else
1666   echo "$as_me:$LINENO: result: no" >&5
1667 echo "${ECHO_T}no" >&6
1668 fi
1669
1670 fi
1671 if test -z "$ac_cv_prog_CC"; then
1672   ac_ct_CC=$CC
1673   # Extract the first word of "gcc", so it can be a program name with args.
1674 set dummy gcc; ac_word=$2
1675 echo "$as_me:$LINENO: checking for $ac_word" >&5
1676 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1677 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1678   echo $ECHO_N "(cached) $ECHO_C" >&6
1679 else
1680   if test -n "$ac_ct_CC"; then
1681   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1682 else
1683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1684 for as_dir in $PATH
1685 do
1686   IFS=$as_save_IFS
1687   test -z "$as_dir" && as_dir=.
1688   for ac_exec_ext in '' $ac_executable_extensions; do
1689   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1690     ac_cv_prog_ac_ct_CC="gcc"
1691     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1692     break 2
1693   fi
1694 done
1695 done
1696
1697 fi
1698 fi
1699 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1700 if test -n "$ac_ct_CC"; then
1701   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1702 echo "${ECHO_T}$ac_ct_CC" >&6
1703 else
1704   echo "$as_me:$LINENO: result: no" >&5
1705 echo "${ECHO_T}no" >&6
1706 fi
1707
1708   CC=$ac_ct_CC
1709 else
1710   CC="$ac_cv_prog_CC"
1711 fi
1712
1713 if test -z "$CC"; then
1714   if test -n "$ac_tool_prefix"; then
1715   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1716 set dummy ${ac_tool_prefix}cc; ac_word=$2
1717 echo "$as_me:$LINENO: checking for $ac_word" >&5
1718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1719 if test "${ac_cv_prog_CC+set}" = set; then
1720   echo $ECHO_N "(cached) $ECHO_C" >&6
1721 else
1722   if test -n "$CC"; then
1723   ac_cv_prog_CC="$CC" # Let the user override the test.
1724 else
1725 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1726 for as_dir in $PATH
1727 do
1728   IFS=$as_save_IFS
1729   test -z "$as_dir" && as_dir=.
1730   for ac_exec_ext in '' $ac_executable_extensions; do
1731   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1732     ac_cv_prog_CC="${ac_tool_prefix}cc"
1733     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1734     break 2
1735   fi
1736 done
1737 done
1738
1739 fi
1740 fi
1741 CC=$ac_cv_prog_CC
1742 if test -n "$CC"; then
1743   echo "$as_me:$LINENO: result: $CC" >&5
1744 echo "${ECHO_T}$CC" >&6
1745 else
1746   echo "$as_me:$LINENO: result: no" >&5
1747 echo "${ECHO_T}no" >&6
1748 fi
1749
1750 fi
1751 if test -z "$ac_cv_prog_CC"; then
1752   ac_ct_CC=$CC
1753   # Extract the first word of "cc", so it can be a program name with args.
1754 set dummy cc; ac_word=$2
1755 echo "$as_me:$LINENO: checking for $ac_word" >&5
1756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1757 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1758   echo $ECHO_N "(cached) $ECHO_C" >&6
1759 else
1760   if test -n "$ac_ct_CC"; then
1761   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1762 else
1763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1764 for as_dir in $PATH
1765 do
1766   IFS=$as_save_IFS
1767   test -z "$as_dir" && as_dir=.
1768   for ac_exec_ext in '' $ac_executable_extensions; do
1769   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1770     ac_cv_prog_ac_ct_CC="cc"
1771     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1772     break 2
1773   fi
1774 done
1775 done
1776
1777 fi
1778 fi
1779 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1780 if test -n "$ac_ct_CC"; then
1781   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1782 echo "${ECHO_T}$ac_ct_CC" >&6
1783 else
1784   echo "$as_me:$LINENO: result: no" >&5
1785 echo "${ECHO_T}no" >&6
1786 fi
1787
1788   CC=$ac_ct_CC
1789 else
1790   CC="$ac_cv_prog_CC"
1791 fi
1792
1793 fi
1794 if test -z "$CC"; then
1795   # Extract the first word of "cc", so it can be a program name with args.
1796 set dummy cc; ac_word=$2
1797 echo "$as_me:$LINENO: checking for $ac_word" >&5
1798 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1799 if test "${ac_cv_prog_CC+set}" = set; then
1800   echo $ECHO_N "(cached) $ECHO_C" >&6
1801 else
1802   if test -n "$CC"; then
1803   ac_cv_prog_CC="$CC" # Let the user override the test.
1804 else
1805   ac_prog_rejected=no
1806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1807 for as_dir in $PATH
1808 do
1809   IFS=$as_save_IFS
1810   test -z "$as_dir" && as_dir=.
1811   for ac_exec_ext in '' $ac_executable_extensions; do
1812   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1813     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1814        ac_prog_rejected=yes
1815        continue
1816      fi
1817     ac_cv_prog_CC="cc"
1818     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1819     break 2
1820   fi
1821 done
1822 done
1823
1824 if test $ac_prog_rejected = yes; then
1825   # We found a bogon in the path, so make sure we never use it.
1826   set dummy $ac_cv_prog_CC
1827   shift
1828   if test $# != 0; then
1829     # We chose a different compiler from the bogus one.
1830     # However, it has the same basename, so the bogon will be chosen
1831     # first if we set CC to just the basename; use the full file name.
1832     shift
1833     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1834   fi
1835 fi
1836 fi
1837 fi
1838 CC=$ac_cv_prog_CC
1839 if test -n "$CC"; then
1840   echo "$as_me:$LINENO: result: $CC" >&5
1841 echo "${ECHO_T}$CC" >&6
1842 else
1843   echo "$as_me:$LINENO: result: no" >&5
1844 echo "${ECHO_T}no" >&6
1845 fi
1846
1847 fi
1848 if test -z "$CC"; then
1849   if test -n "$ac_tool_prefix"; then
1850   for ac_prog in cl
1851   do
1852     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1853 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1854 echo "$as_me:$LINENO: checking for $ac_word" >&5
1855 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1856 if test "${ac_cv_prog_CC+set}" = set; then
1857   echo $ECHO_N "(cached) $ECHO_C" >&6
1858 else
1859   if test -n "$CC"; then
1860   ac_cv_prog_CC="$CC" # Let the user override the test.
1861 else
1862 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1863 for as_dir in $PATH
1864 do
1865   IFS=$as_save_IFS
1866   test -z "$as_dir" && as_dir=.
1867   for ac_exec_ext in '' $ac_executable_extensions; do
1868   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1869     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1870     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1871     break 2
1872   fi
1873 done
1874 done
1875
1876 fi
1877 fi
1878 CC=$ac_cv_prog_CC
1879 if test -n "$CC"; then
1880   echo "$as_me:$LINENO: result: $CC" >&5
1881 echo "${ECHO_T}$CC" >&6
1882 else
1883   echo "$as_me:$LINENO: result: no" >&5
1884 echo "${ECHO_T}no" >&6
1885 fi
1886
1887     test -n "$CC" && break
1888   done
1889 fi
1890 if test -z "$CC"; then
1891   ac_ct_CC=$CC
1892   for ac_prog in cl
1893 do
1894   # Extract the first word of "$ac_prog", so it can be a program name with args.
1895 set dummy $ac_prog; ac_word=$2
1896 echo "$as_me:$LINENO: checking for $ac_word" >&5
1897 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1898 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1899   echo $ECHO_N "(cached) $ECHO_C" >&6
1900 else
1901   if test -n "$ac_ct_CC"; then
1902   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1903 else
1904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1905 for as_dir in $PATH
1906 do
1907   IFS=$as_save_IFS
1908   test -z "$as_dir" && as_dir=.
1909   for ac_exec_ext in '' $ac_executable_extensions; do
1910   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1911     ac_cv_prog_ac_ct_CC="$ac_prog"
1912     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1913     break 2
1914   fi
1915 done
1916 done
1917
1918 fi
1919 fi
1920 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1921 if test -n "$ac_ct_CC"; then
1922   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1923 echo "${ECHO_T}$ac_ct_CC" >&6
1924 else
1925   echo "$as_me:$LINENO: result: no" >&5
1926 echo "${ECHO_T}no" >&6
1927 fi
1928
1929   test -n "$ac_ct_CC" && break
1930 done
1931
1932   CC=$ac_ct_CC
1933 fi
1934
1935 fi
1936
1937
1938 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1939 See \`config.log' for more details." >&5
1940 echo "$as_me: error: no acceptable C compiler found in \$PATH
1941 See \`config.log' for more details." >&2;}
1942    { (exit 1); exit 1; }; }
1943
1944 # Provide some information about the compiler.
1945 echo "$as_me:$LINENO:" \
1946      "checking for C compiler version" >&5
1947 ac_compiler=`set X $ac_compile; echo $2`
1948 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1949   (eval $ac_compiler --version </dev/null >&5) 2>&5
1950   ac_status=$?
1951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1952   (exit $ac_status); }
1953 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1954   (eval $ac_compiler -v </dev/null >&5) 2>&5
1955   ac_status=$?
1956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1957   (exit $ac_status); }
1958 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1959   (eval $ac_compiler -V </dev/null >&5) 2>&5
1960   ac_status=$?
1961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1962   (exit $ac_status); }
1963
1964 cat >conftest.$ac_ext <<_ACEOF
1965 #line $LINENO "configure"
1966 /* confdefs.h.  */
1967 _ACEOF
1968 cat confdefs.h >>conftest.$ac_ext
1969 cat >>conftest.$ac_ext <<_ACEOF
1970 /* end confdefs.h.  */
1971
1972 int
1973 main ()
1974 {
1975
1976   ;
1977   return 0;
1978 }
1979 _ACEOF
1980 ac_clean_files_save=$ac_clean_files
1981 ac_clean_files="$ac_clean_files a.out a.exe b.out"
1982 # Try to create an executable without -o first, disregard a.out.
1983 # It will help us diagnose broken compilers, and finding out an intuition
1984 # of exeext.
1985 echo "$as_me:$LINENO: checking for C compiler default output" >&5
1986 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1987 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1988 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1989   (eval $ac_link_default) 2>&5
1990   ac_status=$?
1991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1992   (exit $ac_status); }; then
1993   # Find the output, starting from the most likely.  This scheme is
1994 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1995 # resort.
1996
1997 # Be careful to initialize this variable, since it used to be cached.
1998 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1999 ac_cv_exeext=
2000 # b.out is created by i960 compilers.
2001 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2002 do
2003   test -f "$ac_file" || continue
2004   case $ac_file in
2005     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2006         ;;
2007     conftest.$ac_ext )
2008         # This is the source file.
2009         ;;
2010     [ab].out )
2011         # We found the default executable, but exeext='' is most
2012         # certainly right.
2013         break;;
2014     *.* )
2015         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2016         # FIXME: I believe we export ac_cv_exeext for Libtool,
2017         # but it would be cool to find out if it's true.  Does anybody
2018         # maintain Libtool? --akim.
2019         export ac_cv_exeext
2020         break;;
2021     * )
2022         break;;
2023   esac
2024 done
2025 else
2026   echo "$as_me: failed program was:" >&5
2027 sed 's/^/| /' conftest.$ac_ext >&5
2028
2029 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2030 See \`config.log' for more details." >&5
2031 echo "$as_me: error: C compiler cannot create executables
2032 See \`config.log' for more details." >&2;}
2033    { (exit 77); exit 77; }; }
2034 fi
2035
2036 ac_exeext=$ac_cv_exeext
2037 echo "$as_me:$LINENO: result: $ac_file" >&5
2038 echo "${ECHO_T}$ac_file" >&6
2039
2040 # Check the compiler produces executables we can run.  If not, either
2041 # the compiler is broken, or we cross compile.
2042 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2043 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2044 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2045 # If not cross compiling, check that we can run a simple program.
2046 if test "$cross_compiling" != yes; then
2047   if { ac_try='./$ac_file'
2048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2049   (eval $ac_try) 2>&5
2050   ac_status=$?
2051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2052   (exit $ac_status); }; }; then
2053     cross_compiling=no
2054   else
2055     if test "$cross_compiling" = maybe; then
2056         cross_compiling=yes
2057     else
2058         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2059 If you meant to cross compile, use \`--host'.
2060 See \`config.log' for more details." >&5
2061 echo "$as_me: error: cannot run C compiled programs.
2062 If you meant to cross compile, use \`--host'.
2063 See \`config.log' for more details." >&2;}
2064    { (exit 1); exit 1; }; }
2065     fi
2066   fi
2067 fi
2068 echo "$as_me:$LINENO: result: yes" >&5
2069 echo "${ECHO_T}yes" >&6
2070
2071 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2072 ac_clean_files=$ac_clean_files_save
2073 # Check the compiler produces executables we can run.  If not, either
2074 # the compiler is broken, or we cross compile.
2075 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2076 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2077 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2078 echo "${ECHO_T}$cross_compiling" >&6
2079
2080 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2081 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2082 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2083   (eval $ac_link) 2>&5
2084   ac_status=$?
2085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2086   (exit $ac_status); }; then
2087   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2088 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2089 # work properly (i.e., refer to `conftest.exe'), while it won't with
2090 # `rm'.
2091 for ac_file in conftest.exe conftest conftest.*; do
2092   test -f "$ac_file" || continue
2093   case $ac_file in
2094     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2095     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2096           export ac_cv_exeext
2097           break;;
2098     * ) break;;
2099   esac
2100 done
2101 else
2102   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2103 See \`config.log' for more details." >&5
2104 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2105 See \`config.log' for more details." >&2;}
2106    { (exit 1); exit 1; }; }
2107 fi
2108
2109 rm -f conftest$ac_cv_exeext
2110 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2111 echo "${ECHO_T}$ac_cv_exeext" >&6
2112
2113 rm -f conftest.$ac_ext
2114 EXEEXT=$ac_cv_exeext
2115 ac_exeext=$EXEEXT
2116 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2117 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2118 if test "${ac_cv_objext+set}" = set; then
2119   echo $ECHO_N "(cached) $ECHO_C" >&6
2120 else
2121   cat >conftest.$ac_ext <<_ACEOF
2122 #line $LINENO "configure"
2123 /* confdefs.h.  */
2124 _ACEOF
2125 cat confdefs.h >>conftest.$ac_ext
2126 cat >>conftest.$ac_ext <<_ACEOF
2127 /* end confdefs.h.  */
2128
2129 int
2130 main ()
2131 {
2132
2133   ;
2134   return 0;
2135 }
2136 _ACEOF
2137 rm -f conftest.o conftest.obj
2138 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2139   (eval $ac_compile) 2>&5
2140   ac_status=$?
2141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2142   (exit $ac_status); }; then
2143   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2144   case $ac_file in
2145     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2146     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2147        break;;
2148   esac
2149 done
2150 else
2151   echo "$as_me: failed program was:" >&5
2152 sed 's/^/| /' conftest.$ac_ext >&5
2153
2154 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2155 See \`config.log' for more details." >&5
2156 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2157 See \`config.log' for more details." >&2;}
2158    { (exit 1); exit 1; }; }
2159 fi
2160
2161 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2162 fi
2163 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2164 echo "${ECHO_T}$ac_cv_objext" >&6
2165 OBJEXT=$ac_cv_objext
2166 ac_objext=$OBJEXT
2167 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2168 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2169 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2170   echo $ECHO_N "(cached) $ECHO_C" >&6
2171 else
2172   cat >conftest.$ac_ext <<_ACEOF
2173 #line $LINENO "configure"
2174 /* confdefs.h.  */
2175 _ACEOF
2176 cat confdefs.h >>conftest.$ac_ext
2177 cat >>conftest.$ac_ext <<_ACEOF
2178 /* end confdefs.h.  */
2179
2180 int
2181 main ()
2182 {
2183 #ifndef __GNUC__
2184        choke me
2185 #endif
2186
2187   ;
2188   return 0;
2189 }
2190 _ACEOF
2191 rm -f conftest.$ac_objext
2192 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2193   (eval $ac_compile) 2>&5
2194   ac_status=$?
2195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2196   (exit $ac_status); } &&
2197          { ac_try='test -s conftest.$ac_objext'
2198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2199   (eval $ac_try) 2>&5
2200   ac_status=$?
2201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2202   (exit $ac_status); }; }; then
2203   ac_compiler_gnu=yes
2204 else
2205   echo "$as_me: failed program was:" >&5
2206 sed 's/^/| /' conftest.$ac_ext >&5
2207
2208 ac_compiler_gnu=no
2209 fi
2210 rm -f conftest.$ac_objext conftest.$ac_ext
2211 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2212
2213 fi
2214 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2215 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2216 GCC=`test $ac_compiler_gnu = yes && echo yes`
2217 ac_test_CFLAGS=${CFLAGS+set}
2218 ac_save_CFLAGS=$CFLAGS
2219 CFLAGS="-g"
2220 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2221 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2222 if test "${ac_cv_prog_cc_g+set}" = set; then
2223   echo $ECHO_N "(cached) $ECHO_C" >&6
2224 else
2225   cat >conftest.$ac_ext <<_ACEOF
2226 #line $LINENO "configure"
2227 /* confdefs.h.  */
2228 _ACEOF
2229 cat confdefs.h >>conftest.$ac_ext
2230 cat >>conftest.$ac_ext <<_ACEOF
2231 /* end confdefs.h.  */
2232
2233 int
2234 main ()
2235 {
2236
2237   ;
2238   return 0;
2239 }
2240 _ACEOF
2241 rm -f conftest.$ac_objext
2242 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2243   (eval $ac_compile) 2>&5
2244   ac_status=$?
2245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2246   (exit $ac_status); } &&
2247          { ac_try='test -s conftest.$ac_objext'
2248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2249   (eval $ac_try) 2>&5
2250   ac_status=$?
2251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2252   (exit $ac_status); }; }; then
2253   ac_cv_prog_cc_g=yes
2254 else
2255   echo "$as_me: failed program was:" >&5
2256 sed 's/^/| /' conftest.$ac_ext >&5
2257
2258 ac_cv_prog_cc_g=no
2259 fi
2260 rm -f conftest.$ac_objext conftest.$ac_ext
2261 fi
2262 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2263 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2264 if test "$ac_test_CFLAGS" = set; then
2265   CFLAGS=$ac_save_CFLAGS
2266 elif test $ac_cv_prog_cc_g = yes; then
2267   if test "$GCC" = yes; then
2268     CFLAGS="-g -O2"
2269   else
2270     CFLAGS="-g"
2271   fi
2272 else
2273   if test "$GCC" = yes; then
2274     CFLAGS="-O2"
2275   else
2276     CFLAGS=
2277   fi
2278 fi
2279 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2280 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2281 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2282   echo $ECHO_N "(cached) $ECHO_C" >&6
2283 else
2284   ac_cv_prog_cc_stdc=no
2285 ac_save_CC=$CC
2286 cat >conftest.$ac_ext <<_ACEOF
2287 #line $LINENO "configure"
2288 /* confdefs.h.  */
2289 _ACEOF
2290 cat confdefs.h >>conftest.$ac_ext
2291 cat >>conftest.$ac_ext <<_ACEOF
2292 /* end confdefs.h.  */
2293 #include <stdarg.h>
2294 #include <stdio.h>
2295 #include <sys/types.h>
2296 #include <sys/stat.h>
2297 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2298 struct buf { int x; };
2299 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2300 static char *e (p, i)
2301      char **p;
2302      int i;
2303 {
2304   return p[i];
2305 }
2306 static char *f (char * (*g) (char **, int), char **p, ...)
2307 {
2308   char *s;
2309   va_list v;
2310   va_start (v,p);
2311   s = g (p, va_arg (v,int));
2312   va_end (v);
2313   return s;
2314 }
2315 int test (int i, double x);
2316 struct s1 {int (*f) (int a);};
2317 struct s2 {int (*f) (double a);};
2318 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2319 int argc;
2320 char **argv;
2321 int
2322 main ()
2323 {
2324 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2325   ;
2326   return 0;
2327 }
2328 _ACEOF
2329 # Don't try gcc -ansi; that turns off useful extensions and
2330 # breaks some systems' header files.
2331 # AIX                   -qlanglvl=ansi
2332 # Ultrix and OSF/1      -std1
2333 # HP-UX 10.20 and later -Ae
2334 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2335 # SVR4                  -Xc -D__EXTENSIONS__
2336 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2337 do
2338   CC="$ac_save_CC $ac_arg"
2339   rm -f conftest.$ac_objext
2340 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2341   (eval $ac_compile) 2>&5
2342   ac_status=$?
2343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2344   (exit $ac_status); } &&
2345          { ac_try='test -s conftest.$ac_objext'
2346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2347   (eval $ac_try) 2>&5
2348   ac_status=$?
2349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2350   (exit $ac_status); }; }; then
2351   ac_cv_prog_cc_stdc=$ac_arg
2352 break
2353 else
2354   echo "$as_me: failed program was:" >&5
2355 sed 's/^/| /' conftest.$ac_ext >&5
2356
2357 fi
2358 rm -f conftest.$ac_objext
2359 done
2360 rm -f conftest.$ac_ext conftest.$ac_objext
2361 CC=$ac_save_CC
2362
2363 fi
2364
2365 case "x$ac_cv_prog_cc_stdc" in
2366   x|xno)
2367     echo "$as_me:$LINENO: result: none needed" >&5
2368 echo "${ECHO_T}none needed" >&6 ;;
2369   *)
2370     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2371 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2372     CC="$CC $ac_cv_prog_cc_stdc" ;;
2373 esac
2374
2375 # Some people use a C++ compiler to compile C.  Since we use `exit',
2376 # in C++ we need to declare it.  In case someone uses the same compiler
2377 # for both compiling C and C++ we need to have the C++ compiler decide
2378 # the declaration of exit, since it's the most demanding environment.
2379 cat >conftest.$ac_ext <<_ACEOF
2380 #ifndef __cplusplus
2381   choke me
2382 #endif
2383 _ACEOF
2384 rm -f conftest.$ac_objext
2385 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2386   (eval $ac_compile) 2>&5
2387   ac_status=$?
2388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2389   (exit $ac_status); } &&
2390          { ac_try='test -s conftest.$ac_objext'
2391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2392   (eval $ac_try) 2>&5
2393   ac_status=$?
2394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2395   (exit $ac_status); }; }; then
2396   for ac_declaration in \
2397    ''\
2398    '#include <stdlib.h>' \
2399    'extern "C" void std::exit (int) throw (); using std::exit;' \
2400    'extern "C" void std::exit (int); using std::exit;' \
2401    'extern "C" void exit (int) throw ();' \
2402    'extern "C" void exit (int);' \
2403    'void exit (int);'
2404 do
2405   cat >conftest.$ac_ext <<_ACEOF
2406 #line $LINENO "configure"
2407 /* confdefs.h.  */
2408 _ACEOF
2409 cat confdefs.h >>conftest.$ac_ext
2410 cat >>conftest.$ac_ext <<_ACEOF
2411 /* end confdefs.h.  */
2412 #include <stdlib.h>
2413 $ac_declaration
2414 int
2415 main ()
2416 {
2417 exit (42);
2418   ;
2419   return 0;
2420 }
2421 _ACEOF
2422 rm -f conftest.$ac_objext
2423 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2424   (eval $ac_compile) 2>&5
2425   ac_status=$?
2426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2427   (exit $ac_status); } &&
2428          { ac_try='test -s conftest.$ac_objext'
2429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2430   (eval $ac_try) 2>&5
2431   ac_status=$?
2432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2433   (exit $ac_status); }; }; then
2434   :
2435 else
2436   echo "$as_me: failed program was:" >&5
2437 sed 's/^/| /' conftest.$ac_ext >&5
2438
2439 continue
2440 fi
2441 rm -f conftest.$ac_objext conftest.$ac_ext
2442   cat >conftest.$ac_ext <<_ACEOF
2443 #line $LINENO "configure"
2444 /* confdefs.h.  */
2445 _ACEOF
2446 cat confdefs.h >>conftest.$ac_ext
2447 cat >>conftest.$ac_ext <<_ACEOF
2448 /* end confdefs.h.  */
2449 $ac_declaration
2450 int
2451 main ()
2452 {
2453 exit (42);
2454   ;
2455   return 0;
2456 }
2457 _ACEOF
2458 rm -f conftest.$ac_objext
2459 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2460   (eval $ac_compile) 2>&5
2461   ac_status=$?
2462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2463   (exit $ac_status); } &&
2464          { ac_try='test -s conftest.$ac_objext'
2465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2466   (eval $ac_try) 2>&5
2467   ac_status=$?
2468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2469   (exit $ac_status); }; }; then
2470   break
2471 else
2472   echo "$as_me: failed program was:" >&5
2473 sed 's/^/| /' conftest.$ac_ext >&5
2474
2475 fi
2476 rm -f conftest.$ac_objext conftest.$ac_ext
2477 done
2478 rm -f conftest*
2479 if test -n "$ac_declaration"; then
2480   echo '#ifdef __cplusplus' >>confdefs.h
2481   echo $ac_declaration      >>confdefs.h
2482   echo '#endif'             >>confdefs.h
2483 fi
2484
2485 else
2486   echo "$as_me: failed program was:" >&5
2487 sed 's/^/| /' conftest.$ac_ext >&5
2488
2489 fi
2490 rm -f conftest.$ac_objext conftest.$ac_ext
2491 ac_ext=c
2492 ac_cpp='$CPP $CPPFLAGS'
2493 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2494 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2495 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2496
2497
2498   if test -z "$GCC"; then
2499     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2500 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2501     case "$host" in
2502       *-hpux* )
2503         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2504 echo "${ECHO_T}HPUX: adding -Ae" >&6
2505         CC="$CC -Ae"
2506       ;;
2507       *-aix* )
2508         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2509 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2510         CC="$CC -qlanglvl=ansi -qhalt=e"
2511       ;;
2512
2513       *-dec-* )
2514         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2515 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2516         CC="$CC -std1"
2517       ;;
2518
2519       *)
2520         echo "$as_me:$LINENO: result: no idea" >&5
2521 echo "${ECHO_T}no idea" >&6
2522       ;;
2523     esac
2524   fi
2525
2526   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2527 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2528   if test "$cross_compiling" = yes; then
2529   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2530 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2531    { (exit 1); exit 1; }; }
2532 else
2533   cat >conftest.$ac_ext <<_ACEOF
2534 #line $LINENO "configure"
2535 /* confdefs.h.  */
2536 _ACEOF
2537 cat confdefs.h >>conftest.$ac_ext
2538 cat >>conftest.$ac_ext <<_ACEOF
2539 /* end confdefs.h.  */
2540  main(int ac, char **av) { return 0; }
2541 _ACEOF
2542 rm -f conftest$ac_exeext
2543 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2544   (eval $ac_link) 2>&5
2545   ac_status=$?
2546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2547   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2549   (eval $ac_try) 2>&5
2550   ac_status=$?
2551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2552   (exit $ac_status); }; }; then
2553   echo "$as_me:$LINENO: result: yes" >&5
2554 echo "${ECHO_T}yes" >&6
2555 else
2556   echo "$as_me: program exited with status $ac_status" >&5
2557 echo "$as_me: failed program was:" >&5
2558 sed 's/^/| /' conftest.$ac_ext >&5
2559
2560 ( exit $ac_status )
2561 echo "$as_me:$LINENO: result: no" >&5
2562 echo "${ECHO_T}no" >&6
2563      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2564 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2565    { (exit 1); exit 1; }; }
2566 fi
2567 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2568 fi
2569
2570   if test -n "$GCC"; then
2571     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2572 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2573     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs"
2574     # supposedly gcc 3.4 will have "-Wdeclaration-after-statement"
2575     # and then perhaps we can do without -pedantic?
2576   else
2577     case "$host" in
2578       *-irix5* |*-irix6.0-3* )
2579         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2580 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2581         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2582       ;;
2583 #     *-dec-osf* )
2584 #       if test -z "$GCC"; then
2585 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2586 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2587 #       fi
2588 #     ;;
2589     esac
2590   fi
2591
2592 if test -n "$GCC"; then
2593    if test -n "$GCC"; then
2594    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2595 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2596 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2597   echo $ECHO_N "(cached) $ECHO_C" >&6
2598 else
2599   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
2600           grep unrecognized >/dev/null ); then
2601        ac_cv_gcc_accepts_std=no
2602      else
2603        ac_cv_gcc_accepts_std=yes
2604      fi
2605 fi
2606 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2607 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2608    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2609   fi
2610
2611    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2612 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2613    #
2614    # The reason that // comments are banned from xscreensaver is that gcc is
2615    # basically the only compiler in the world that supports them in C code.
2616    # All other vendors support them only in their C++ compilers, not in their
2617    # ANSI C compilers.  This means that it's a portability problem: every time
2618    # these comments have snuck into the xscreensaver source code, I've gotten
2619    # complaints about it the next day.  So we turn off support for them in gcc
2620    # as well to prevent them from accidentially slipping in.
2621    #
2622    if test "$ac_gcc_accepts_std" = yes ; then
2623      #
2624      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2625      # (That appears to be the only additional preprocessor symbol
2626      # it defines, in addition to the syntax changes it makes.)
2627      #
2628      # -std=gnu89 is no good, because // comments were a GNU extension
2629      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2630      # with -std=gnu89 but not with -std=c89.)
2631      #
2632      CC="$CC -std=c89 -U__STRICT_ANSI__"
2633    else
2634      # The old way:
2635      CC="$CC -Wp,-lang-c89"
2636    fi
2637   fi
2638
2639 if test -n "$GCC"; then
2640    if test -n "$GCC"; then
2641    echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
2642 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6
2643 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
2644   echo $ECHO_N "(cached) $ECHO_C" >&6
2645 else
2646   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
2647           grep unrecognized >/dev/null ); then
2648        ac_cv_gcc_accepts_no_cpp_precomp=no
2649      else
2650        ac_cv_gcc_accepts_no_cpp_precomp=yes
2651      fi
2652 fi
2653 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
2654 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6
2655    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
2656   fi
2657
2658    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
2659      echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
2660 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6
2661      CC="$CC -no-cpp-precomp"
2662    fi
2663   fi
2664
2665 ac_ext=c
2666 ac_cpp='$CPP $CPPFLAGS'
2667 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2668 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2669 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2670 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2671 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2672 # On Suns, sometimes $CPP names a directory.
2673 if test -n "$CPP" && test -d "$CPP"; then
2674   CPP=
2675 fi
2676 if test -z "$CPP"; then
2677   if test "${ac_cv_prog_CPP+set}" = set; then
2678   echo $ECHO_N "(cached) $ECHO_C" >&6
2679 else
2680       # Double quotes because CPP needs to be expanded
2681     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2682     do
2683       ac_preproc_ok=false
2684 for ac_c_preproc_warn_flag in '' yes
2685 do
2686   # Use a header file that comes with gcc, so configuring glibc
2687   # with a fresh cross-compiler works.
2688   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2689   # <limits.h> exists even on freestanding compilers.
2690   # On the NeXT, cc -E runs the code through the compiler's parser,
2691   # not just through cpp. "Syntax error" is here to catch this case.
2692   cat >conftest.$ac_ext <<_ACEOF
2693 #line $LINENO "configure"
2694 /* confdefs.h.  */
2695 _ACEOF
2696 cat confdefs.h >>conftest.$ac_ext
2697 cat >>conftest.$ac_ext <<_ACEOF
2698 /* end confdefs.h.  */
2699 #ifdef __STDC__
2700 # include <limits.h>
2701 #else
2702 # include <assert.h>
2703 #endif
2704                      Syntax error
2705 _ACEOF
2706 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2707   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2708   ac_status=$?
2709   grep -v '^ *+' conftest.er1 >conftest.err
2710   rm -f conftest.er1
2711   cat conftest.err >&5
2712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2713   (exit $ac_status); } >/dev/null; then
2714   if test -s conftest.err; then
2715     ac_cpp_err=$ac_c_preproc_warn_flag
2716   else
2717     ac_cpp_err=
2718   fi
2719 else
2720   ac_cpp_err=yes
2721 fi
2722 if test -z "$ac_cpp_err"; then
2723   :
2724 else
2725   echo "$as_me: failed program was:" >&5
2726 sed 's/^/| /' conftest.$ac_ext >&5
2727
2728   # Broken: fails on valid input.
2729 continue
2730 fi
2731 rm -f conftest.err conftest.$ac_ext
2732
2733   # OK, works on sane cases.  Now check whether non-existent headers
2734   # can be detected and how.
2735   cat >conftest.$ac_ext <<_ACEOF
2736 #line $LINENO "configure"
2737 /* confdefs.h.  */
2738 _ACEOF
2739 cat confdefs.h >>conftest.$ac_ext
2740 cat >>conftest.$ac_ext <<_ACEOF
2741 /* end confdefs.h.  */
2742 #include <ac_nonexistent.h>
2743 _ACEOF
2744 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2745   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2746   ac_status=$?
2747   grep -v '^ *+' conftest.er1 >conftest.err
2748   rm -f conftest.er1
2749   cat conftest.err >&5
2750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2751   (exit $ac_status); } >/dev/null; then
2752   if test -s conftest.err; then
2753     ac_cpp_err=$ac_c_preproc_warn_flag
2754   else
2755     ac_cpp_err=
2756   fi
2757 else
2758   ac_cpp_err=yes
2759 fi
2760 if test -z "$ac_cpp_err"; then
2761   # Broken: success on invalid input.
2762 continue
2763 else
2764   echo "$as_me: failed program was:" >&5
2765 sed 's/^/| /' conftest.$ac_ext >&5
2766
2767   # Passes both tests.
2768 ac_preproc_ok=:
2769 break
2770 fi
2771 rm -f conftest.err conftest.$ac_ext
2772
2773 done
2774 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2775 rm -f conftest.err conftest.$ac_ext
2776 if $ac_preproc_ok; then
2777   break
2778 fi
2779
2780     done
2781     ac_cv_prog_CPP=$CPP
2782
2783 fi
2784   CPP=$ac_cv_prog_CPP
2785 else
2786   ac_cv_prog_CPP=$CPP
2787 fi
2788 echo "$as_me:$LINENO: result: $CPP" >&5
2789 echo "${ECHO_T}$CPP" >&6
2790 ac_preproc_ok=false
2791 for ac_c_preproc_warn_flag in '' yes
2792 do
2793   # Use a header file that comes with gcc, so configuring glibc
2794   # with a fresh cross-compiler works.
2795   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2796   # <limits.h> exists even on freestanding compilers.
2797   # On the NeXT, cc -E runs the code through the compiler's parser,
2798   # not just through cpp. "Syntax error" is here to catch this case.
2799   cat >conftest.$ac_ext <<_ACEOF
2800 #line $LINENO "configure"
2801 /* confdefs.h.  */
2802 _ACEOF
2803 cat confdefs.h >>conftest.$ac_ext
2804 cat >>conftest.$ac_ext <<_ACEOF
2805 /* end confdefs.h.  */
2806 #ifdef __STDC__
2807 # include <limits.h>
2808 #else
2809 # include <assert.h>
2810 #endif
2811                      Syntax error
2812 _ACEOF
2813 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2814   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2815   ac_status=$?
2816   grep -v '^ *+' conftest.er1 >conftest.err
2817   rm -f conftest.er1
2818   cat conftest.err >&5
2819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2820   (exit $ac_status); } >/dev/null; then
2821   if test -s conftest.err; then
2822     ac_cpp_err=$ac_c_preproc_warn_flag
2823   else
2824     ac_cpp_err=
2825   fi
2826 else
2827   ac_cpp_err=yes
2828 fi
2829 if test -z "$ac_cpp_err"; then
2830   :
2831 else
2832   echo "$as_me: failed program was:" >&5
2833 sed 's/^/| /' conftest.$ac_ext >&5
2834
2835   # Broken: fails on valid input.
2836 continue
2837 fi
2838 rm -f conftest.err conftest.$ac_ext
2839
2840   # OK, works on sane cases.  Now check whether non-existent headers
2841   # can be detected and how.
2842   cat >conftest.$ac_ext <<_ACEOF
2843 #line $LINENO "configure"
2844 /* confdefs.h.  */
2845 _ACEOF
2846 cat confdefs.h >>conftest.$ac_ext
2847 cat >>conftest.$ac_ext <<_ACEOF
2848 /* end confdefs.h.  */
2849 #include <ac_nonexistent.h>
2850 _ACEOF
2851 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2852   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2853   ac_status=$?
2854   grep -v '^ *+' conftest.er1 >conftest.err
2855   rm -f conftest.er1
2856   cat conftest.err >&5
2857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2858   (exit $ac_status); } >/dev/null; then
2859   if test -s conftest.err; then
2860     ac_cpp_err=$ac_c_preproc_warn_flag
2861   else
2862     ac_cpp_err=
2863   fi
2864 else
2865   ac_cpp_err=yes
2866 fi
2867 if test -z "$ac_cpp_err"; then
2868   # Broken: success on invalid input.
2869 continue
2870 else
2871   echo "$as_me: failed program was:" >&5
2872 sed 's/^/| /' conftest.$ac_ext >&5
2873
2874   # Passes both tests.
2875 ac_preproc_ok=:
2876 break
2877 fi
2878 rm -f conftest.err conftest.$ac_ext
2879
2880 done
2881 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2882 rm -f conftest.err conftest.$ac_ext
2883 if $ac_preproc_ok; then
2884   :
2885 else
2886   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2887 See \`config.log' for more details." >&5
2888 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2889 See \`config.log' for more details." >&2;}
2890    { (exit 1); exit 1; }; }
2891 fi
2892
2893 ac_ext=c
2894 ac_cpp='$CPP $CPPFLAGS'
2895 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2896 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2897 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2898
2899 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
2900 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2901 if test "${ac_cv_c_const+set}" = set; then
2902   echo $ECHO_N "(cached) $ECHO_C" >&6
2903 else
2904   cat >conftest.$ac_ext <<_ACEOF
2905 #line $LINENO "configure"
2906 /* confdefs.h.  */
2907 _ACEOF
2908 cat confdefs.h >>conftest.$ac_ext
2909 cat >>conftest.$ac_ext <<_ACEOF
2910 /* end confdefs.h.  */
2911
2912 int
2913 main ()
2914 {
2915 /* FIXME: Include the comments suggested by Paul. */
2916 #ifndef __cplusplus
2917   /* Ultrix mips cc rejects this.  */
2918   typedef int charset[2];
2919   const charset x;
2920   /* SunOS 4.1.1 cc rejects this.  */
2921   char const *const *ccp;
2922   char **p;
2923   /* NEC SVR4.0.2 mips cc rejects this.  */
2924   struct point {int x, y;};
2925   static struct point const zero = {0,0};
2926   /* AIX XL C 1.02.0.0 rejects this.
2927      It does not let you subtract one const X* pointer from another in
2928      an arm of an if-expression whose if-part is not a constant
2929      expression */
2930   const char *g = "string";
2931   ccp = &g + (g ? g-g : 0);
2932   /* HPUX 7.0 cc rejects these. */
2933   ++ccp;
2934   p = (char**) ccp;
2935   ccp = (char const *const *) p;
2936   { /* SCO 3.2v4 cc rejects this.  */
2937     char *t;
2938     char const *s = 0 ? (char *) 0 : (char const *) 0;
2939
2940     *t++ = 0;
2941   }
2942   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2943     int x[] = {25, 17};
2944     const int *foo = &x[0];
2945     ++foo;
2946   }
2947   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2948     typedef const int *iptr;
2949     iptr p = 0;
2950     ++p;
2951   }
2952   { /* AIX XL C 1.02.0.0 rejects this saying
2953        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2954     struct s { int j; const int *ap[3]; };
2955     struct s *b; b->j = 5;
2956   }
2957   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2958     const int foo = 10;
2959   }
2960 #endif
2961
2962   ;
2963   return 0;
2964 }
2965 _ACEOF
2966 rm -f conftest.$ac_objext
2967 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2968   (eval $ac_compile) 2>&5
2969   ac_status=$?
2970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2971   (exit $ac_status); } &&
2972          { ac_try='test -s conftest.$ac_objext'
2973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2974   (eval $ac_try) 2>&5
2975   ac_status=$?
2976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2977   (exit $ac_status); }; }; then
2978   ac_cv_c_const=yes
2979 else
2980   echo "$as_me: failed program was:" >&5
2981 sed 's/^/| /' conftest.$ac_ext >&5
2982
2983 ac_cv_c_const=no
2984 fi
2985 rm -f conftest.$ac_objext conftest.$ac_ext
2986 fi
2987 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
2988 echo "${ECHO_T}$ac_cv_c_const" >&6
2989 if test $ac_cv_c_const = no; then
2990
2991 cat >>confdefs.h <<\_ACEOF
2992 #define const
2993 _ACEOF
2994
2995 fi
2996
2997 echo "$as_me:$LINENO: checking for inline" >&5
2998 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2999 if test "${ac_cv_c_inline+set}" = set; then
3000   echo $ECHO_N "(cached) $ECHO_C" >&6
3001 else
3002   ac_cv_c_inline=no
3003 for ac_kw in inline __inline__ __inline; do
3004   cat >conftest.$ac_ext <<_ACEOF
3005 #line $LINENO "configure"
3006 /* confdefs.h.  */
3007 _ACEOF
3008 cat confdefs.h >>conftest.$ac_ext
3009 cat >>conftest.$ac_ext <<_ACEOF
3010 /* end confdefs.h.  */
3011 #ifndef __cplusplus
3012 typedef int foo_t;
3013 static $ac_kw foo_t static_foo () {return 0; }
3014 $ac_kw foo_t foo () {return 0; }
3015 #endif
3016
3017 _ACEOF
3018 rm -f conftest.$ac_objext
3019 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3020   (eval $ac_compile) 2>&5
3021   ac_status=$?
3022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3023   (exit $ac_status); } &&
3024          { ac_try='test -s conftest.$ac_objext'
3025   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3026   (eval $ac_try) 2>&5
3027   ac_status=$?
3028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3029   (exit $ac_status); }; }; then
3030   ac_cv_c_inline=$ac_kw; break
3031 else
3032   echo "$as_me: failed program was:" >&5
3033 sed 's/^/| /' conftest.$ac_ext >&5
3034
3035 fi
3036 rm -f conftest.$ac_objext conftest.$ac_ext
3037 done
3038
3039 fi
3040 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3041 echo "${ECHO_T}$ac_cv_c_inline" >&6
3042 case $ac_cv_c_inline in
3043   inline | yes) ;;
3044   no)
3045 cat >>confdefs.h <<\_ACEOF
3046 #define inline
3047 _ACEOF
3048  ;;
3049   *)  cat >>confdefs.h <<_ACEOF
3050 #define inline $ac_cv_c_inline
3051 _ACEOF
3052  ;;
3053 esac
3054
3055
3056 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3057   echo "$as_me:$LINENO: checking for bc" >&5
3058 echo $ECHO_N "checking for bc... $ECHO_C" >&6
3059   if test "$ac_bc_result" = "15" ; then
3060     echo "$as_me:$LINENO: result: yes" >&5
3061 echo "${ECHO_T}yes" >&6
3062   else
3063     echo "$as_me:$LINENO: result: no" >&5
3064 echo "${ECHO_T}no" >&6
3065     echo ''
3066     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3067                   part of Unix since the 1970s.  Come back when your vendor
3068                   has grown a clue." >&5
3069 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3070                   part of Unix since the 1970s.  Come back when your vendor
3071                   has grown a clue." >&2;}
3072    { (exit 1); exit 1; }; }
3073   fi
3074
3075
3076 # stuff for Makefiles
3077 # Find a good install program.  We prefer a C program (faster),
3078 # so one script is as good as another.  But avoid the broken or
3079 # incompatible versions:
3080 # SysV /etc/install, /usr/sbin/install
3081 # SunOS /usr/etc/install
3082 # IRIX /sbin/install
3083 # AIX /bin/install
3084 # AmigaOS /C/install, which installs bootblocks on floppy discs
3085 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3086 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3087 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3088 # ./install, which can be erroneously created by make from ./install.sh.
3089 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3090 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3091 if test -z "$INSTALL"; then
3092 if test "${ac_cv_path_install+set}" = set; then
3093   echo $ECHO_N "(cached) $ECHO_C" >&6
3094 else
3095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3096 for as_dir in $PATH
3097 do
3098   IFS=$as_save_IFS
3099   test -z "$as_dir" && as_dir=.
3100   # Account for people who put trailing slashes in PATH elements.
3101 case $as_dir/ in
3102   ./ | .// | /cC/* | \
3103   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3104   /usr/ucb/* ) ;;
3105   *)
3106     # OSF1 and SCO ODT 3.0 have their own names for install.
3107     # Don't use installbsd from OSF since it installs stuff as root
3108     # by default.
3109     for ac_prog in ginstall scoinst install; do
3110       for ac_exec_ext in '' $ac_executable_extensions; do
3111         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3112           if test $ac_prog = install &&
3113             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3114             # AIX install.  It has an incompatible calling convention.
3115             :
3116           elif test $ac_prog = install &&
3117             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3118             # program-specific install script used by HP pwplus--don't use.
3119             :
3120           else
3121             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3122             break 3
3123           fi
3124         fi
3125       done
3126     done
3127     ;;
3128 esac
3129 done
3130
3131
3132 fi
3133   if test "${ac_cv_path_install+set}" = set; then
3134     INSTALL=$ac_cv_path_install
3135   else
3136     # As a last resort, use the slow shell script.  We don't cache a
3137     # path for INSTALL within a source directory, because that will
3138     # break other packages using the cache if that directory is
3139     # removed, or if the path is relative.
3140     INSTALL=$ac_install_sh
3141   fi
3142 fi
3143 echo "$as_me:$LINENO: result: $INSTALL" >&5
3144 echo "${ECHO_T}$INSTALL" >&6
3145
3146 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3147 # It thinks the first close brace ends the variable substitution.
3148 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3149
3150 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3151
3152 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3153
3154 echo "$as_me:$LINENO: checking whether \\"\${INSTALL} -d\\" creates intermediate directories" >&5
3155 echo $ECHO_N "checking whether \\"\${INSTALL} -d\\" creates intermediate directories... $ECHO_C" >&6
3156 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
3157   echo $ECHO_N "(cached) $ECHO_C" >&6
3158 else
3159   ac_cv_install_d_creates_dirs=no
3160      rm -rf conftestdir
3161      if mkdir conftestdir; then
3162        cd conftestdir 2>/dev/null
3163        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
3164        if test -d dir1/dir2/. ; then
3165          ac_cv_install_d_creates_dirs=yes
3166        fi
3167        cd .. 2>/dev/null
3168        rm -rf conftestdir
3169      fi
3170
3171 fi
3172 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
3173 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
3174
3175   if test "$ac_cv_install_d_creates_dirs" = no ; then
3176     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
3177 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
3178 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
3179   echo $ECHO_N "(cached) $ECHO_C" >&6
3180 else
3181   ac_cv_mkdir_p_creates_dirs=no
3182        rm -rf conftestdir
3183        if mkdir conftestdir; then
3184          cd conftestdir 2>/dev/null
3185          mkdir -p dir1/dir2 >/dev/null 2>&1
3186          if test -d dir1/dir2/. ; then
3187            ac_cv_mkdir_p_creates_dirs=yes
3188          fi
3189          cd .. 2>/dev/null
3190          rm -rf conftestdir
3191        fi
3192
3193 fi
3194 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3195 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3196   fi
3197
3198   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3199     INSTALL_DIRS='${INSTALL} -d'
3200   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3201     INSTALL_DIRS='mkdir -p'
3202   else
3203     # any other ideas?
3204     INSTALL_DIRS='${INSTALL} -d'
3205   fi
3206
3207 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3208 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3209 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3210 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3211   echo $ECHO_N "(cached) $ECHO_C" >&6
3212 else
3213   cat >conftest.make <<\_ACEOF
3214 all:
3215         @echo 'ac_maketemp="$(MAKE)"'
3216 _ACEOF
3217 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3218 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3219 if test -n "$ac_maketemp"; then
3220   eval ac_cv_prog_make_${ac_make}_set=yes
3221 else
3222   eval ac_cv_prog_make_${ac_make}_set=no
3223 fi
3224 rm -f conftest.make
3225 fi
3226 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3227   echo "$as_me:$LINENO: result: yes" >&5
3228 echo "${ECHO_T}yes" >&6
3229   SET_MAKE=
3230 else
3231   echo "$as_me:$LINENO: result: no" >&5
3232 echo "${ECHO_T}no" >&6
3233   SET_MAKE="MAKE=${MAKE-make}"
3234 fi
3235
3236
3237 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3238 # That's wrong: it should be set to '${INSTALL}', so that one can
3239 # implement the "install-strip" target properly (strip executables,
3240 # but do not try to strip scripts.)
3241 #
3242 INSTALL_SCRIPT='${INSTALL}'
3243
3244 # random libc stuff
3245
3246 echo "$as_me:$LINENO: checking for egrep" >&5
3247 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3248 if test "${ac_cv_prog_egrep+set}" = set; then
3249   echo $ECHO_N "(cached) $ECHO_C" >&6
3250 else
3251   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3252     then ac_cv_prog_egrep='grep -E'
3253     else ac_cv_prog_egrep='egrep'
3254     fi
3255 fi
3256 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3257 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3258  EGREP=$ac_cv_prog_egrep
3259
3260
3261 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3262 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3263 if test "${ac_cv_header_stdc+set}" = set; then
3264   echo $ECHO_N "(cached) $ECHO_C" >&6
3265 else
3266   cat >conftest.$ac_ext <<_ACEOF
3267 #line $LINENO "configure"
3268 /* confdefs.h.  */
3269 _ACEOF
3270 cat confdefs.h >>conftest.$ac_ext
3271 cat >>conftest.$ac_ext <<_ACEOF
3272 /* end confdefs.h.  */
3273 #include <stdlib.h>
3274 #include <stdarg.h>
3275 #include <string.h>
3276 #include <float.h>
3277
3278 int
3279 main ()
3280 {
3281
3282   ;
3283   return 0;
3284 }
3285 _ACEOF
3286 rm -f conftest.$ac_objext
3287 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3288   (eval $ac_compile) 2>&5
3289   ac_status=$?
3290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3291   (exit $ac_status); } &&
3292          { ac_try='test -s conftest.$ac_objext'
3293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3294   (eval $ac_try) 2>&5
3295   ac_status=$?
3296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3297   (exit $ac_status); }; }; then
3298   ac_cv_header_stdc=yes
3299 else
3300   echo "$as_me: failed program was:" >&5
3301 sed 's/^/| /' conftest.$ac_ext >&5
3302
3303 ac_cv_header_stdc=no
3304 fi
3305 rm -f conftest.$ac_objext conftest.$ac_ext
3306
3307 if test $ac_cv_header_stdc = yes; then
3308   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3309   cat >conftest.$ac_ext <<_ACEOF
3310 #line $LINENO "configure"
3311 /* confdefs.h.  */
3312 _ACEOF
3313 cat confdefs.h >>conftest.$ac_ext
3314 cat >>conftest.$ac_ext <<_ACEOF
3315 /* end confdefs.h.  */
3316 #include <string.h>
3317
3318 _ACEOF
3319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3320   $EGREP "memchr" >/dev/null 2>&1; then
3321   :
3322 else
3323   ac_cv_header_stdc=no
3324 fi
3325 rm -f conftest*
3326
3327 fi
3328
3329 if test $ac_cv_header_stdc = yes; then
3330   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3331   cat >conftest.$ac_ext <<_ACEOF
3332 #line $LINENO "configure"
3333 /* confdefs.h.  */
3334 _ACEOF
3335 cat confdefs.h >>conftest.$ac_ext
3336 cat >>conftest.$ac_ext <<_ACEOF
3337 /* end confdefs.h.  */
3338 #include <stdlib.h>
3339
3340 _ACEOF
3341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3342   $EGREP "free" >/dev/null 2>&1; then
3343   :
3344 else
3345   ac_cv_header_stdc=no
3346 fi
3347 rm -f conftest*
3348
3349 fi
3350
3351 if test $ac_cv_header_stdc = yes; then
3352   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3353   if test "$cross_compiling" = yes; then
3354   :
3355 else
3356   cat >conftest.$ac_ext <<_ACEOF
3357 #line $LINENO "configure"
3358 /* confdefs.h.  */
3359 _ACEOF
3360 cat confdefs.h >>conftest.$ac_ext
3361 cat >>conftest.$ac_ext <<_ACEOF
3362 /* end confdefs.h.  */
3363 #include <ctype.h>
3364 #if ((' ' & 0x0FF) == 0x020)
3365 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3366 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3367 #else
3368 # define ISLOWER(c) \
3369                    (('a' <= (c) && (c) <= 'i') \
3370                      || ('j' <= (c) && (c) <= 'r') \
3371                      || ('s' <= (c) && (c) <= 'z'))
3372 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3373 #endif
3374
3375 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3376 int
3377 main ()
3378 {
3379   int i;
3380   for (i = 0; i < 256; i++)
3381     if (XOR (islower (i), ISLOWER (i))
3382         || toupper (i) != TOUPPER (i))
3383       exit(2);
3384   exit (0);
3385 }
3386 _ACEOF
3387 rm -f conftest$ac_exeext
3388 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3389   (eval $ac_link) 2>&5
3390   ac_status=$?
3391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3392   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3394   (eval $ac_try) 2>&5
3395   ac_status=$?
3396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3397   (exit $ac_status); }; }; then
3398   :
3399 else
3400   echo "$as_me: program exited with status $ac_status" >&5
3401 echo "$as_me: failed program was:" >&5
3402 sed 's/^/| /' conftest.$ac_ext >&5
3403
3404 ( exit $ac_status )
3405 ac_cv_header_stdc=no
3406 fi
3407 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3408 fi
3409 fi
3410 fi
3411 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3412 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3413 if test $ac_cv_header_stdc = yes; then
3414
3415 cat >>confdefs.h <<\_ACEOF
3416 #define STDC_HEADERS 1
3417 _ACEOF
3418
3419 fi
3420
3421 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3432                   inttypes.h stdint.h unistd.h
3433 do
3434 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3435 echo "$as_me:$LINENO: checking for $ac_header" >&5
3436 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3437 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3438   echo $ECHO_N "(cached) $ECHO_C" >&6
3439 else
3440   cat >conftest.$ac_ext <<_ACEOF
3441 #line $LINENO "configure"
3442 /* confdefs.h.  */
3443 _ACEOF
3444 cat confdefs.h >>conftest.$ac_ext
3445 cat >>conftest.$ac_ext <<_ACEOF
3446 /* end confdefs.h.  */
3447 $ac_includes_default
3448
3449 #include <$ac_header>
3450 _ACEOF
3451 rm -f conftest.$ac_objext
3452 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3453   (eval $ac_compile) 2>&5
3454   ac_status=$?
3455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3456   (exit $ac_status); } &&
3457          { ac_try='test -s conftest.$ac_objext'
3458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3459   (eval $ac_try) 2>&5
3460   ac_status=$?
3461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3462   (exit $ac_status); }; }; then
3463   eval "$as_ac_Header=yes"
3464 else
3465   echo "$as_me: failed program was:" >&5
3466 sed 's/^/| /' conftest.$ac_ext >&5
3467
3468 eval "$as_ac_Header=no"
3469 fi
3470 rm -f conftest.$ac_objext conftest.$ac_ext
3471 fi
3472 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3473 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3474 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3475   cat >>confdefs.h <<_ACEOF
3476 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3477 _ACEOF
3478
3479 fi
3480
3481 done
3482
3483
3484
3485 for ac_header in unistd.h
3486 do
3487 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3488 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3489   echo "$as_me:$LINENO: checking for $ac_header" >&5
3490 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3491 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3492   echo $ECHO_N "(cached) $ECHO_C" >&6
3493 fi
3494 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3495 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3496 else
3497   # Is the header compilable?
3498 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3499 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3500 cat >conftest.$ac_ext <<_ACEOF
3501 #line $LINENO "configure"
3502 /* confdefs.h.  */
3503 _ACEOF
3504 cat confdefs.h >>conftest.$ac_ext
3505 cat >>conftest.$ac_ext <<_ACEOF
3506 /* end confdefs.h.  */
3507 $ac_includes_default
3508 #include <$ac_header>
3509 _ACEOF
3510 rm -f conftest.$ac_objext
3511 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3512   (eval $ac_compile) 2>&5
3513   ac_status=$?
3514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3515   (exit $ac_status); } &&
3516          { ac_try='test -s conftest.$ac_objext'
3517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3518   (eval $ac_try) 2>&5
3519   ac_status=$?
3520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3521   (exit $ac_status); }; }; then
3522   ac_header_compiler=yes
3523 else
3524   echo "$as_me: failed program was:" >&5
3525 sed 's/^/| /' conftest.$ac_ext >&5
3526
3527 ac_header_compiler=no
3528 fi
3529 rm -f conftest.$ac_objext conftest.$ac_ext
3530 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3531 echo "${ECHO_T}$ac_header_compiler" >&6
3532
3533 # Is the header present?
3534 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3535 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3536 cat >conftest.$ac_ext <<_ACEOF
3537 #line $LINENO "configure"
3538 /* confdefs.h.  */
3539 _ACEOF
3540 cat confdefs.h >>conftest.$ac_ext
3541 cat >>conftest.$ac_ext <<_ACEOF
3542 /* end confdefs.h.  */
3543 #include <$ac_header>
3544 _ACEOF
3545 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3546   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3547   ac_status=$?
3548   grep -v '^ *+' conftest.er1 >conftest.err
3549   rm -f conftest.er1
3550   cat conftest.err >&5
3551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3552   (exit $ac_status); } >/dev/null; then
3553   if test -s conftest.err; then
3554     ac_cpp_err=$ac_c_preproc_warn_flag
3555   else
3556     ac_cpp_err=
3557   fi
3558 else
3559   ac_cpp_err=yes
3560 fi
3561 if test -z "$ac_cpp_err"; then
3562   ac_header_preproc=yes
3563 else
3564   echo "$as_me: failed program was:" >&5
3565 sed 's/^/| /' conftest.$ac_ext >&5
3566
3567   ac_header_preproc=no
3568 fi
3569 rm -f conftest.err conftest.$ac_ext
3570 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3571 echo "${ECHO_T}$ac_header_preproc" >&6
3572
3573 # So?  What about this header?
3574 case $ac_header_compiler:$ac_header_preproc in
3575   yes:no )
3576     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3577 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3578     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3579 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3580     (
3581       cat <<\_ASBOX
3582 ## ------------------------------------ ##
3583 ## Report this to bug-autoconf@gnu.org. ##
3584 ## ------------------------------------ ##
3585 _ASBOX
3586     ) |
3587       sed "s/^/$as_me: WARNING:     /" >&2
3588     ;;
3589   no:yes )
3590     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3591 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3592     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3593 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3594     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3595 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3596     (
3597       cat <<\_ASBOX
3598 ## ------------------------------------ ##
3599 ## Report this to bug-autoconf@gnu.org. ##
3600 ## ------------------------------------ ##
3601 _ASBOX
3602     ) |
3603       sed "s/^/$as_me: WARNING:     /" >&2
3604     ;;
3605 esac
3606 echo "$as_me:$LINENO: checking for $ac_header" >&5
3607 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3608 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3609   echo $ECHO_N "(cached) $ECHO_C" >&6
3610 else
3611   eval "$as_ac_Header=$ac_header_preproc"
3612 fi
3613 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3614 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3615
3616 fi
3617 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3618   cat >>confdefs.h <<_ACEOF
3619 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3620 _ACEOF
3621
3622 fi
3623
3624 done
3625
3626 echo "$as_me:$LINENO: checking for mode_t" >&5
3627 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3628 if test "${ac_cv_type_mode_t+set}" = set; then
3629   echo $ECHO_N "(cached) $ECHO_C" >&6
3630 else
3631   cat >conftest.$ac_ext <<_ACEOF
3632 #line $LINENO "configure"
3633 /* confdefs.h.  */
3634 _ACEOF
3635 cat confdefs.h >>conftest.$ac_ext
3636 cat >>conftest.$ac_ext <<_ACEOF
3637 /* end confdefs.h.  */
3638 $ac_includes_default
3639 int
3640 main ()
3641 {
3642 if ((mode_t *) 0)
3643   return 0;
3644 if (sizeof (mode_t))
3645   return 0;
3646   ;
3647   return 0;
3648 }
3649 _ACEOF
3650 rm -f conftest.$ac_objext
3651 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3652   (eval $ac_compile) 2>&5
3653   ac_status=$?
3654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3655   (exit $ac_status); } &&
3656          { ac_try='test -s conftest.$ac_objext'
3657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3658   (eval $ac_try) 2>&5
3659   ac_status=$?
3660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3661   (exit $ac_status); }; }; then
3662   ac_cv_type_mode_t=yes
3663 else
3664   echo "$as_me: failed program was:" >&5
3665 sed 's/^/| /' conftest.$ac_ext >&5
3666
3667 ac_cv_type_mode_t=no
3668 fi
3669 rm -f conftest.$ac_objext conftest.$ac_ext
3670 fi
3671 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
3672 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3673 if test $ac_cv_type_mode_t = yes; then
3674   :
3675 else
3676
3677 cat >>confdefs.h <<_ACEOF
3678 #define mode_t int
3679 _ACEOF
3680
3681 fi
3682
3683 echo "$as_me:$LINENO: checking for pid_t" >&5
3684 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
3685 if test "${ac_cv_type_pid_t+set}" = set; then
3686   echo $ECHO_N "(cached) $ECHO_C" >&6
3687 else
3688   cat >conftest.$ac_ext <<_ACEOF
3689 #line $LINENO "configure"
3690 /* confdefs.h.  */
3691 _ACEOF
3692 cat confdefs.h >>conftest.$ac_ext
3693 cat >>conftest.$ac_ext <<_ACEOF
3694 /* end confdefs.h.  */
3695 $ac_includes_default
3696 int
3697 main ()
3698 {
3699 if ((pid_t *) 0)
3700   return 0;
3701 if (sizeof (pid_t))
3702   return 0;
3703   ;
3704   return 0;
3705 }
3706 _ACEOF
3707 rm -f conftest.$ac_objext
3708 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3709   (eval $ac_compile) 2>&5
3710   ac_status=$?
3711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3712   (exit $ac_status); } &&
3713          { ac_try='test -s conftest.$ac_objext'
3714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3715   (eval $ac_try) 2>&5
3716   ac_status=$?
3717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3718   (exit $ac_status); }; }; then
3719   ac_cv_type_pid_t=yes
3720 else
3721   echo "$as_me: failed program was:" >&5
3722 sed 's/^/| /' conftest.$ac_ext >&5
3723
3724 ac_cv_type_pid_t=no
3725 fi
3726 rm -f conftest.$ac_objext conftest.$ac_ext
3727 fi
3728 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
3729 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3730 if test $ac_cv_type_pid_t = yes; then
3731   :
3732 else
3733
3734 cat >>confdefs.h <<_ACEOF
3735 #define pid_t int
3736 _ACEOF
3737
3738 fi
3739
3740 echo "$as_me:$LINENO: checking for size_t" >&5
3741 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
3742 if test "${ac_cv_type_size_t+set}" = set; then
3743   echo $ECHO_N "(cached) $ECHO_C" >&6
3744 else
3745   cat >conftest.$ac_ext <<_ACEOF
3746 #line $LINENO "configure"
3747 /* confdefs.h.  */
3748 _ACEOF
3749 cat confdefs.h >>conftest.$ac_ext
3750 cat >>conftest.$ac_ext <<_ACEOF
3751 /* end confdefs.h.  */
3752 $ac_includes_default
3753 int
3754 main ()
3755 {
3756 if ((size_t *) 0)
3757   return 0;
3758 if (sizeof (size_t))
3759   return 0;
3760   ;
3761   return 0;
3762 }
3763 _ACEOF
3764 rm -f conftest.$ac_objext
3765 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3766   (eval $ac_compile) 2>&5
3767   ac_status=$?
3768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3769   (exit $ac_status); } &&
3770          { ac_try='test -s conftest.$ac_objext'
3771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3772   (eval $ac_try) 2>&5
3773   ac_status=$?
3774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3775   (exit $ac_status); }; }; then
3776   ac_cv_type_size_t=yes
3777 else
3778   echo "$as_me: failed program was:" >&5
3779 sed 's/^/| /' conftest.$ac_ext >&5
3780
3781 ac_cv_type_size_t=no
3782 fi
3783 rm -f conftest.$ac_objext conftest.$ac_ext
3784 fi
3785 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
3786 echo "${ECHO_T}$ac_cv_type_size_t" >&6
3787 if test $ac_cv_type_size_t = yes; then
3788   :
3789 else
3790
3791 cat >>confdefs.h <<_ACEOF
3792 #define size_t unsigned
3793 _ACEOF
3794
3795 fi
3796
3797 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
3798 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
3799 if test "${ac_cv_type_signal+set}" = set; then
3800   echo $ECHO_N "(cached) $ECHO_C" >&6
3801 else
3802   cat >conftest.$ac_ext <<_ACEOF
3803 #line $LINENO "configure"
3804 /* confdefs.h.  */
3805 _ACEOF
3806 cat confdefs.h >>conftest.$ac_ext
3807 cat >>conftest.$ac_ext <<_ACEOF
3808 /* end confdefs.h.  */
3809 #include <sys/types.h>
3810 #include <signal.h>
3811 #ifdef signal
3812 # undef signal
3813 #endif
3814 #ifdef __cplusplus
3815 extern "C" void (*signal (int, void (*)(int)))(int);
3816 #else
3817 void (*signal ()) ();
3818 #endif
3819
3820 int
3821 main ()
3822 {
3823 int i;
3824   ;
3825   return 0;
3826 }
3827 _ACEOF
3828 rm -f conftest.$ac_objext
3829 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3830   (eval $ac_compile) 2>&5
3831   ac_status=$?
3832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3833   (exit $ac_status); } &&
3834          { ac_try='test -s conftest.$ac_objext'
3835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3836   (eval $ac_try) 2>&5
3837   ac_status=$?
3838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3839   (exit $ac_status); }; }; then
3840   ac_cv_type_signal=void
3841 else
3842   echo "$as_me: failed program was:" >&5
3843 sed 's/^/| /' conftest.$ac_ext >&5
3844
3845 ac_cv_type_signal=int
3846 fi
3847 rm -f conftest.$ac_objext conftest.$ac_ext
3848 fi
3849 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
3850 echo "${ECHO_T}$ac_cv_type_signal" >&6
3851
3852 cat >>confdefs.h <<_ACEOF
3853 #define RETSIGTYPE $ac_cv_type_signal
3854 _ACEOF
3855
3856
3857 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
3858 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3859 if test "${ac_cv_header_time+set}" = set; then
3860   echo $ECHO_N "(cached) $ECHO_C" >&6
3861 else
3862   cat >conftest.$ac_ext <<_ACEOF
3863 #line $LINENO "configure"
3864 /* confdefs.h.  */
3865 _ACEOF
3866 cat confdefs.h >>conftest.$ac_ext
3867 cat >>conftest.$ac_ext <<_ACEOF
3868 /* end confdefs.h.  */
3869 #include <sys/types.h>
3870 #include <sys/time.h>
3871 #include <time.h>
3872
3873 int
3874 main ()
3875 {
3876 if ((struct tm *) 0)
3877 return 0;
3878   ;
3879   return 0;
3880 }
3881 _ACEOF
3882 rm -f conftest.$ac_objext
3883 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3884   (eval $ac_compile) 2>&5
3885   ac_status=$?
3886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3887   (exit $ac_status); } &&
3888          { ac_try='test -s conftest.$ac_objext'
3889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3890   (eval $ac_try) 2>&5
3891   ac_status=$?
3892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3893   (exit $ac_status); }; }; then
3894   ac_cv_header_time=yes
3895 else
3896   echo "$as_me: failed program was:" >&5
3897 sed 's/^/| /' conftest.$ac_ext >&5
3898
3899 ac_cv_header_time=no
3900 fi
3901 rm -f conftest.$ac_objext conftest.$ac_ext
3902 fi
3903 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
3904 echo "${ECHO_T}$ac_cv_header_time" >&6
3905 if test $ac_cv_header_time = yes; then
3906
3907 cat >>confdefs.h <<\_ACEOF
3908 #define TIME_WITH_SYS_TIME 1
3909 _ACEOF
3910
3911 fi
3912
3913 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
3914 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
3915 if test "${ac_cv_header_sys_wait_h+set}" = set; then
3916   echo $ECHO_N "(cached) $ECHO_C" >&6
3917 else
3918   cat >conftest.$ac_ext <<_ACEOF
3919 #line $LINENO "configure"
3920 /* confdefs.h.  */
3921 _ACEOF
3922 cat confdefs.h >>conftest.$ac_ext
3923 cat >>conftest.$ac_ext <<_ACEOF
3924 /* end confdefs.h.  */
3925 #include <sys/types.h>
3926 #include <sys/wait.h>
3927 #ifndef WEXITSTATUS
3928 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3929 #endif
3930 #ifndef WIFEXITED
3931 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3932 #endif
3933
3934 int
3935 main ()
3936 {
3937   int s;
3938   wait (&s);
3939   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3940   ;
3941   return 0;
3942 }
3943 _ACEOF
3944 rm -f conftest.$ac_objext
3945 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3946   (eval $ac_compile) 2>&5
3947   ac_status=$?
3948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3949   (exit $ac_status); } &&
3950          { ac_try='test -s conftest.$ac_objext'
3951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3952   (eval $ac_try) 2>&5
3953   ac_status=$?
3954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3955   (exit $ac_status); }; }; then
3956   ac_cv_header_sys_wait_h=yes
3957 else
3958   echo "$as_me: failed program was:" >&5
3959 sed 's/^/| /' conftest.$ac_ext >&5
3960
3961 ac_cv_header_sys_wait_h=no
3962 fi
3963 rm -f conftest.$ac_objext conftest.$ac_ext
3964 fi
3965 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3966 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3967 if test $ac_cv_header_sys_wait_h = yes; then
3968
3969 cat >>confdefs.h <<\_ACEOF
3970 #define HAVE_SYS_WAIT_H 1
3971 _ACEOF
3972
3973 fi
3974
3975
3976
3977
3978
3979
3980 ac_header_dirent=no
3981 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3982   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3983 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3984 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3985 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3986   echo $ECHO_N "(cached) $ECHO_C" >&6
3987 else
3988   cat >conftest.$ac_ext <<_ACEOF
3989 #line $LINENO "configure"
3990 /* confdefs.h.  */
3991 _ACEOF
3992 cat confdefs.h >>conftest.$ac_ext
3993 cat >>conftest.$ac_ext <<_ACEOF
3994 /* end confdefs.h.  */
3995 #include <sys/types.h>
3996 #include <$ac_hdr>
3997
3998 int
3999 main ()
4000 {
4001 if ((DIR *) 0)
4002 return 0;
4003   ;
4004   return 0;
4005 }
4006 _ACEOF
4007 rm -f conftest.$ac_objext
4008 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4009   (eval $ac_compile) 2>&5
4010   ac_status=$?
4011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4012   (exit $ac_status); } &&
4013          { ac_try='test -s conftest.$ac_objext'
4014   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4015   (eval $ac_try) 2>&5
4016   ac_status=$?
4017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4018   (exit $ac_status); }; }; then
4019   eval "$as_ac_Header=yes"
4020 else
4021   echo "$as_me: failed program was:" >&5
4022 sed 's/^/| /' conftest.$ac_ext >&5
4023
4024 eval "$as_ac_Header=no"
4025 fi
4026 rm -f conftest.$ac_objext conftest.$ac_ext
4027 fi
4028 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4029 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4030 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4031   cat >>confdefs.h <<_ACEOF
4032 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4033 _ACEOF
4034
4035 ac_header_dirent=$ac_hdr; break
4036 fi
4037
4038 done
4039 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4040 if test $ac_header_dirent = dirent.h; then
4041   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4042 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4043 if test "${ac_cv_search_opendir+set}" = set; then
4044   echo $ECHO_N "(cached) $ECHO_C" >&6
4045 else
4046   ac_func_search_save_LIBS=$LIBS
4047 ac_cv_search_opendir=no
4048 cat >conftest.$ac_ext <<_ACEOF
4049 #line $LINENO "configure"
4050 /* confdefs.h.  */
4051 _ACEOF
4052 cat confdefs.h >>conftest.$ac_ext
4053 cat >>conftest.$ac_ext <<_ACEOF
4054 /* end confdefs.h.  */
4055
4056 /* Override any gcc2 internal prototype to avoid an error.  */
4057 #ifdef __cplusplus
4058 extern "C"
4059 #endif
4060 /* We use char because int might match the return type of a gcc2
4061    builtin and then its argument prototype would still apply.  */
4062 char opendir ();
4063 int
4064 main ()
4065 {
4066 opendir ();
4067   ;
4068   return 0;
4069 }
4070 _ACEOF
4071 rm -f conftest.$ac_objext conftest$ac_exeext
4072 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4073   (eval $ac_link) 2>&5
4074   ac_status=$?
4075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4076   (exit $ac_status); } &&
4077          { ac_try='test -s conftest$ac_exeext'
4078   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4079   (eval $ac_try) 2>&5
4080   ac_status=$?
4081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4082   (exit $ac_status); }; }; then
4083   ac_cv_search_opendir="none required"
4084 else
4085   echo "$as_me: failed program was:" >&5
4086 sed 's/^/| /' conftest.$ac_ext >&5
4087
4088 fi
4089 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4090 if test "$ac_cv_search_opendir" = no; then
4091   for ac_lib in dir; do
4092     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4093     cat >conftest.$ac_ext <<_ACEOF
4094 #line $LINENO "configure"
4095 /* confdefs.h.  */
4096 _ACEOF
4097 cat confdefs.h >>conftest.$ac_ext
4098 cat >>conftest.$ac_ext <<_ACEOF
4099 /* end confdefs.h.  */
4100
4101 /* Override any gcc2 internal prototype to avoid an error.  */
4102 #ifdef __cplusplus
4103 extern "C"
4104 #endif
4105 /* We use char because int might match the return type of a gcc2
4106    builtin and then its argument prototype would still apply.  */
4107 char opendir ();
4108 int
4109 main ()
4110 {
4111 opendir ();
4112   ;
4113   return 0;
4114 }
4115 _ACEOF
4116 rm -f conftest.$ac_objext conftest$ac_exeext
4117 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4118   (eval $ac_link) 2>&5
4119   ac_status=$?
4120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4121   (exit $ac_status); } &&
4122          { ac_try='test -s conftest$ac_exeext'
4123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4124   (eval $ac_try) 2>&5
4125   ac_status=$?
4126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4127   (exit $ac_status); }; }; then
4128   ac_cv_search_opendir="-l$ac_lib"
4129 break
4130 else
4131   echo "$as_me: failed program was:" >&5
4132 sed 's/^/| /' conftest.$ac_ext >&5
4133
4134 fi
4135 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4136   done
4137 fi
4138 LIBS=$ac_func_search_save_LIBS
4139 fi
4140 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4141 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4142 if test "$ac_cv_search_opendir" != no; then
4143   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4144
4145 fi
4146
4147 else
4148   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4149 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4150 if test "${ac_cv_search_opendir+set}" = set; then
4151   echo $ECHO_N "(cached) $ECHO_C" >&6
4152 else
4153   ac_func_search_save_LIBS=$LIBS
4154 ac_cv_search_opendir=no
4155 cat >conftest.$ac_ext <<_ACEOF
4156 #line $LINENO "configure"
4157 /* confdefs.h.  */
4158 _ACEOF
4159 cat confdefs.h >>conftest.$ac_ext
4160 cat >>conftest.$ac_ext <<_ACEOF
4161 /* end confdefs.h.  */
4162
4163 /* Override any gcc2 internal prototype to avoid an error.  */
4164 #ifdef __cplusplus
4165 extern "C"
4166 #endif
4167 /* We use char because int might match the return type of a gcc2
4168    builtin and then its argument prototype would still apply.  */
4169 char opendir ();
4170 int
4171 main ()
4172 {
4173 opendir ();
4174   ;
4175   return 0;
4176 }
4177 _ACEOF
4178 rm -f conftest.$ac_objext conftest$ac_exeext
4179 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4180   (eval $ac_link) 2>&5
4181   ac_status=$?
4182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4183   (exit $ac_status); } &&
4184          { ac_try='test -s conftest$ac_exeext'
4185   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4186   (eval $ac_try) 2>&5
4187   ac_status=$?
4188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4189   (exit $ac_status); }; }; then
4190   ac_cv_search_opendir="none required"
4191 else
4192   echo "$as_me: failed program was:" >&5
4193 sed 's/^/| /' conftest.$ac_ext >&5
4194
4195 fi
4196 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4197 if test "$ac_cv_search_opendir" = no; then
4198   for ac_lib in x; do
4199     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4200     cat >conftest.$ac_ext <<_ACEOF
4201 #line $LINENO "configure"
4202 /* confdefs.h.  */
4203 _ACEOF
4204 cat confdefs.h >>conftest.$ac_ext
4205 cat >>conftest.$ac_ext <<_ACEOF
4206 /* end confdefs.h.  */
4207
4208 /* Override any gcc2 internal prototype to avoid an error.  */
4209 #ifdef __cplusplus
4210 extern "C"
4211 #endif
4212 /* We use char because int might match the return type of a gcc2
4213    builtin and then its argument prototype would still apply.  */
4214 char opendir ();
4215 int
4216 main ()
4217 {
4218 opendir ();
4219   ;
4220   return 0;
4221 }
4222 _ACEOF
4223 rm -f conftest.$ac_objext conftest$ac_exeext
4224 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4225   (eval $ac_link) 2>&5
4226   ac_status=$?
4227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4228   (exit $ac_status); } &&
4229          { ac_try='test -s conftest$ac_exeext'
4230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4231   (eval $ac_try) 2>&5
4232   ac_status=$?
4233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4234   (exit $ac_status); }; }; then
4235   ac_cv_search_opendir="-l$ac_lib"
4236 break
4237 else
4238   echo "$as_me: failed program was:" >&5
4239 sed 's/^/| /' conftest.$ac_ext >&5
4240
4241 fi
4242 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4243   done
4244 fi
4245 LIBS=$ac_func_search_save_LIBS
4246 fi
4247 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4248 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4249 if test "$ac_cv_search_opendir" != no; then
4250   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4251
4252 fi
4253
4254 fi
4255
4256 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4257 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4258   if test "${ac_cv_gettimeofday_args+set}" = set; then
4259   echo $ECHO_N "(cached) $ECHO_C" >&6
4260 else
4261   cat >conftest.$ac_ext <<_ACEOF
4262 #line $LINENO "configure"
4263 /* confdefs.h.  */
4264 _ACEOF
4265 cat confdefs.h >>conftest.$ac_ext
4266 cat >>conftest.$ac_ext <<_ACEOF
4267 /* end confdefs.h.  */
4268 #include <stdlib.h>
4269                     #include <sys/time.h>
4270 int
4271 main ()
4272 {
4273 struct timeval tv; struct timezone tzp;
4274                     gettimeofday(&tv, &tzp);
4275   ;
4276   return 0;
4277 }
4278 _ACEOF
4279 rm -f conftest.$ac_objext
4280 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4281   (eval $ac_compile) 2>&5
4282   ac_status=$?
4283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4284   (exit $ac_status); } &&
4285          { ac_try='test -s conftest.$ac_objext'
4286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4287   (eval $ac_try) 2>&5
4288   ac_status=$?
4289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4290   (exit $ac_status); }; }; then
4291   ac_gettimeofday_args=2
4292 else
4293   echo "$as_me: failed program was:" >&5
4294 sed 's/^/| /' conftest.$ac_ext >&5
4295
4296 cat >conftest.$ac_ext <<_ACEOF
4297 #line $LINENO "configure"
4298 /* confdefs.h.  */
4299 _ACEOF
4300 cat confdefs.h >>conftest.$ac_ext
4301 cat >>conftest.$ac_ext <<_ACEOF
4302 /* end confdefs.h.  */
4303 #include <stdlib.h>
4304                                     #include <sys/time.h>
4305 int
4306 main ()
4307 {
4308 struct timeval tv; gettimeofday(&tv);
4309   ;
4310   return 0;
4311 }
4312 _ACEOF
4313 rm -f conftest.$ac_objext
4314 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4315   (eval $ac_compile) 2>&5
4316   ac_status=$?
4317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4318   (exit $ac_status); } &&
4319          { ac_try='test -s conftest.$ac_objext'
4320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4321   (eval $ac_try) 2>&5
4322   ac_status=$?
4323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4324   (exit $ac_status); }; }; then
4325   ac_gettimeofday_args=1
4326 else
4327   echo "$as_me: failed program was:" >&5
4328 sed 's/^/| /' conftest.$ac_ext >&5
4329
4330 ac_gettimeofday_args=0
4331 fi
4332 rm -f conftest.$ac_objext conftest.$ac_ext
4333 fi
4334 rm -f conftest.$ac_objext conftest.$ac_ext
4335     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4336 fi
4337
4338   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4339   if test "$ac_gettimeofday_args" = 1 ; then
4340     cat >>confdefs.h <<\_ACEOF
4341 #define HAVE_GETTIMEOFDAY 1
4342 _ACEOF
4343
4344     echo "$as_me:$LINENO: result: one argument" >&5
4345 echo "${ECHO_T}one argument" >&6
4346   elif test "$ac_gettimeofday_args" = 2 ; then
4347     cat >>confdefs.h <<\_ACEOF
4348 #define HAVE_GETTIMEOFDAY 1
4349 _ACEOF
4350
4351     cat >>confdefs.h <<\_ACEOF
4352 #define GETTIMEOFDAY_TWO_ARGS 1
4353 _ACEOF
4354
4355     echo "$as_me:$LINENO: result: two arguments" >&5
4356 echo "${ECHO_T}two arguments" >&6
4357   else
4358     echo "$as_me:$LINENO: result: unknown" >&5
4359 echo "${ECHO_T}unknown" >&6
4360   fi
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4372 do
4373 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4374 echo "$as_me:$LINENO: checking for $ac_func" >&5
4375 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4376 if eval "test \"\${$as_ac_var+set}\" = set"; then
4377   echo $ECHO_N "(cached) $ECHO_C" >&6
4378 else
4379   cat >conftest.$ac_ext <<_ACEOF
4380 #line $LINENO "configure"
4381 /* confdefs.h.  */
4382 _ACEOF
4383 cat confdefs.h >>conftest.$ac_ext
4384 cat >>conftest.$ac_ext <<_ACEOF
4385 /* end confdefs.h.  */
4386 /* System header to define __stub macros and hopefully few prototypes,
4387     which can conflict with char $ac_func (); below.
4388     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4389     <limits.h> exists even on freestanding compilers.  */
4390 #ifdef __STDC__
4391 # include <limits.h>
4392 #else
4393 # include <assert.h>
4394 #endif
4395 /* Override any gcc2 internal prototype to avoid an error.  */
4396 #ifdef __cplusplus
4397 extern "C"
4398 {
4399 #endif
4400 /* We use char because int might match the return type of a gcc2
4401    builtin and then its argument prototype would still apply.  */
4402 char $ac_func ();
4403 /* The GNU C library defines this for functions which it implements
4404     to always fail with ENOSYS.  Some functions are actually named
4405     something starting with __ and the normal name is an alias.  */
4406 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4407 choke me
4408 #else
4409 char (*f) () = $ac_func;
4410 #endif
4411 #ifdef __cplusplus
4412 }
4413 #endif
4414
4415 int
4416 main ()
4417 {
4418 return f != $ac_func;
4419   ;
4420   return 0;
4421 }
4422 _ACEOF
4423 rm -f conftest.$ac_objext conftest$ac_exeext
4424 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4425   (eval $ac_link) 2>&5
4426   ac_status=$?
4427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4428   (exit $ac_status); } &&
4429          { ac_try='test -s conftest$ac_exeext'
4430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4431   (eval $ac_try) 2>&5
4432   ac_status=$?
4433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4434   (exit $ac_status); }; }; then
4435   eval "$as_ac_var=yes"
4436 else
4437   echo "$as_me: failed program was:" >&5
4438 sed 's/^/| /' conftest.$ac_ext >&5
4439
4440 eval "$as_ac_var=no"
4441 fi
4442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4443 fi
4444 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4445 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4446 if test `eval echo '${'$as_ac_var'}'` = yes; then
4447   cat >>confdefs.h <<_ACEOF
4448 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4449 _ACEOF
4450
4451 fi
4452 done
4453
4454
4455
4456
4457
4458
4459 for ac_func in sigaction syslog realpath setrlimit
4460 do
4461 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4462 echo "$as_me:$LINENO: checking for $ac_func" >&5
4463 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4464 if eval "test \"\${$as_ac_var+set}\" = set"; then
4465   echo $ECHO_N "(cached) $ECHO_C" >&6
4466 else
4467   cat >conftest.$ac_ext <<_ACEOF
4468 #line $LINENO "configure"
4469 /* confdefs.h.  */
4470 _ACEOF
4471 cat confdefs.h >>conftest.$ac_ext
4472 cat >>conftest.$ac_ext <<_ACEOF
4473 /* end confdefs.h.  */
4474 /* System header to define __stub macros and hopefully few prototypes,
4475     which can conflict with char $ac_func (); below.
4476     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4477     <limits.h> exists even on freestanding compilers.  */
4478 #ifdef __STDC__
4479 # include <limits.h>
4480 #else
4481 # include <assert.h>
4482 #endif
4483 /* Override any gcc2 internal prototype to avoid an error.  */
4484 #ifdef __cplusplus
4485 extern "C"
4486 {
4487 #endif
4488 /* We use char because int might match the return type of a gcc2
4489    builtin and then its argument prototype would still apply.  */
4490 char $ac_func ();
4491 /* The GNU C library defines this for functions which it implements
4492     to always fail with ENOSYS.  Some functions are actually named
4493     something starting with __ and the normal name is an alias.  */
4494 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4495 choke me
4496 #else
4497 char (*f) () = $ac_func;
4498 #endif
4499 #ifdef __cplusplus
4500 }
4501 #endif
4502
4503 int
4504 main ()
4505 {
4506 return f != $ac_func;
4507   ;
4508   return 0;
4509 }
4510 _ACEOF
4511 rm -f conftest.$ac_objext conftest$ac_exeext
4512 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4513   (eval $ac_link) 2>&5
4514   ac_status=$?
4515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4516   (exit $ac_status); } &&
4517          { ac_try='test -s conftest$ac_exeext'
4518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4519   (eval $ac_try) 2>&5
4520   ac_status=$?
4521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4522   (exit $ac_status); }; }; then
4523   eval "$as_ac_var=yes"
4524 else
4525   echo "$as_me: failed program was:" >&5
4526 sed 's/^/| /' conftest.$ac_ext >&5
4527
4528 eval "$as_ac_var=no"
4529 fi
4530 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4531 fi
4532 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4533 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4534 if test `eval echo '${'$as_ac_var'}'` = yes; then
4535   cat >>confdefs.h <<_ACEOF
4536 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4537 _ACEOF
4538
4539 fi
4540 done
4541
4542 echo "$as_me:$LINENO: checking for struct icmp" >&5
4543 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
4544 if test "${ac_cv_have_icmp+set}" = set; then
4545   echo $ECHO_N "(cached) $ECHO_C" >&6
4546 else
4547   cat >conftest.$ac_ext <<_ACEOF
4548 #line $LINENO "configure"
4549 /* confdefs.h.  */
4550 _ACEOF
4551 cat confdefs.h >>conftest.$ac_ext
4552 cat >>conftest.$ac_ext <<_ACEOF
4553 /* end confdefs.h.  */
4554 #include <stdlib.h>
4555                    #include <stdio.h>
4556                    #include <math.h>
4557                    #include <unistd.h>
4558                    #include <limits.h>
4559                    #include <signal.h>
4560                    #include <fcntl.h>
4561                    #include <sys/types.h>
4562                    #include <sys/time.h>
4563                    #include <sys/ipc.h>
4564                    #include <sys/shm.h>
4565                    #include <sys/socket.h>
4566                    #include <netinet/in_systm.h>
4567                    #include <netinet/in.h>
4568                    #include <netinet/ip.h>
4569                    #include <netinet/ip_icmp.h>
4570                    #include <netinet/udp.h>
4571                    #include <arpa/inet.h>
4572                    #include <netdb.h>
4573 int
4574 main ()
4575 {
4576 struct icmp i;
4577                    struct sockaddr s;
4578                    struct sockaddr_in si;
4579                    struct ip ip;
4580                    i.icmp_type = ICMP_ECHO;
4581                    i.icmp_code = 0;
4582                    i.icmp_cksum = 0;
4583                    i.icmp_id = 0;
4584                    i.icmp_seq = 0;
4585                    si.sin_family = AF_INET;
4586                    #if defined(__DECC) || defined(_IP_VHL)
4587                    ip.ip_vhl = 0;
4588                    #else
4589                    ip.ip_hl = 0;
4590                    #endif
4591
4592   ;
4593   return 0;
4594 }
4595 _ACEOF
4596 rm -f conftest.$ac_objext
4597 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4598   (eval $ac_compile) 2>&5
4599   ac_status=$?
4600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4601   (exit $ac_status); } &&
4602          { ac_try='test -s conftest.$ac_objext'
4603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4604   (eval $ac_try) 2>&5
4605   ac_status=$?
4606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4607   (exit $ac_status); }; }; then
4608   ac_cv_have_icmp=yes
4609 else
4610   echo "$as_me: failed program was:" >&5
4611 sed 's/^/| /' conftest.$ac_ext >&5
4612
4613 ac_cv_have_icmp=no
4614 fi
4615 rm -f conftest.$ac_objext conftest.$ac_ext
4616 fi
4617 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
4618 echo "${ECHO_T}$ac_cv_have_icmp" >&6
4619  if test "$ac_cv_have_icmp" = yes ; then
4620    cat >>confdefs.h <<\_ACEOF
4621 #define HAVE_ICMP 1
4622 _ACEOF
4623
4624  fi
4625 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
4626 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
4627 if test "${ac_cv_have_icmphdr+set}" = set; then
4628   echo $ECHO_N "(cached) $ECHO_C" >&6
4629 else
4630   cat >conftest.$ac_ext <<_ACEOF
4631 #line $LINENO "configure"
4632 /* confdefs.h.  */
4633 _ACEOF
4634 cat confdefs.h >>conftest.$ac_ext
4635 cat >>conftest.$ac_ext <<_ACEOF
4636 /* end confdefs.h.  */
4637 #include <stdlib.h>
4638                    #include <stdio.h>
4639                    #include <math.h>
4640                    #include <unistd.h>
4641                    #include <limits.h>
4642                    #include <signal.h>
4643                    #include <fcntl.h>
4644                    #include <sys/types.h>
4645                    #include <sys/time.h>
4646                    #include <sys/ipc.h>
4647                    #include <sys/shm.h>
4648                    #include <sys/socket.h>
4649                    #include <netinet/in_systm.h>
4650                    #include <netinet/in.h>
4651                    #include <netinet/ip.h>
4652                    #include <netinet/ip_icmp.h>
4653                    #include <netinet/udp.h>
4654                    #include <arpa/inet.h>
4655                    #include <netdb.h>
4656 int
4657 main ()
4658 {
4659 struct icmphdr i;
4660                    struct sockaddr s;
4661                    struct sockaddr_in si;
4662                    struct ip ip;
4663                    i.type = ICMP_ECHO;
4664                    i.code = 0;
4665                    i.checksum = 0;
4666                    i.un.echo.id = 0;
4667                    i.un.echo.sequence = 0;
4668                    si.sin_family = AF_INET;
4669                    ip.ip_hl = 0;
4670   ;
4671   return 0;
4672 }
4673 _ACEOF
4674 rm -f conftest.$ac_objext
4675 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4676   (eval $ac_compile) 2>&5
4677   ac_status=$?
4678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4679   (exit $ac_status); } &&
4680          { ac_try='test -s conftest.$ac_objext'
4681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4682   (eval $ac_try) 2>&5
4683   ac_status=$?
4684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4685   (exit $ac_status); }; }; then
4686   ac_cv_have_icmphdr=yes
4687 else
4688   echo "$as_me: failed program was:" >&5
4689 sed 's/^/| /' conftest.$ac_ext >&5
4690
4691 ac_cv_have_icmphdr=no
4692 fi
4693 rm -f conftest.$ac_objext conftest.$ac_ext
4694 fi
4695 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
4696 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
4697  if test "$ac_cv_have_icmphdr" = yes ; then
4698    cat >>confdefs.h <<\_ACEOF
4699 #define HAVE_ICMPHDR 1
4700 _ACEOF
4701
4702  fi
4703
4704
4705 for ac_header in crypt.h sys/select.h
4706 do
4707 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4708 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4709   echo "$as_me:$LINENO: checking for $ac_header" >&5
4710 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4711 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4712   echo $ECHO_N "(cached) $ECHO_C" >&6
4713 fi
4714 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4715 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4716 else
4717   # Is the header compilable?
4718 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4719 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4720 cat >conftest.$ac_ext <<_ACEOF
4721 #line $LINENO "configure"
4722 /* confdefs.h.  */
4723 _ACEOF
4724 cat confdefs.h >>conftest.$ac_ext
4725 cat >>conftest.$ac_ext <<_ACEOF
4726 /* end confdefs.h.  */
4727 $ac_includes_default
4728 #include <$ac_header>
4729 _ACEOF
4730 rm -f conftest.$ac_objext
4731 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4732   (eval $ac_compile) 2>&5
4733   ac_status=$?
4734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4735   (exit $ac_status); } &&
4736          { ac_try='test -s conftest.$ac_objext'
4737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4738   (eval $ac_try) 2>&5
4739   ac_status=$?
4740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4741   (exit $ac_status); }; }; then
4742   ac_header_compiler=yes
4743 else
4744   echo "$as_me: failed program was:" >&5
4745 sed 's/^/| /' conftest.$ac_ext >&5
4746
4747 ac_header_compiler=no
4748 fi
4749 rm -f conftest.$ac_objext conftest.$ac_ext
4750 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4751 echo "${ECHO_T}$ac_header_compiler" >&6
4752
4753 # Is the header present?
4754 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4755 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4756 cat >conftest.$ac_ext <<_ACEOF
4757 #line $LINENO "configure"
4758 /* confdefs.h.  */
4759 _ACEOF
4760 cat confdefs.h >>conftest.$ac_ext
4761 cat >>conftest.$ac_ext <<_ACEOF
4762 /* end confdefs.h.  */
4763 #include <$ac_header>
4764 _ACEOF
4765 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4766   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4767   ac_status=$?
4768   grep -v '^ *+' conftest.er1 >conftest.err
4769   rm -f conftest.er1
4770   cat conftest.err >&5
4771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4772   (exit $ac_status); } >/dev/null; then
4773   if test -s conftest.err; then
4774     ac_cpp_err=$ac_c_preproc_warn_flag
4775   else
4776     ac_cpp_err=
4777   fi
4778 else
4779   ac_cpp_err=yes
4780 fi
4781 if test -z "$ac_cpp_err"; then
4782   ac_header_preproc=yes
4783 else
4784   echo "$as_me: failed program was:" >&5
4785 sed 's/^/| /' conftest.$ac_ext >&5
4786
4787   ac_header_preproc=no
4788 fi
4789 rm -f conftest.err conftest.$ac_ext
4790 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4791 echo "${ECHO_T}$ac_header_preproc" >&6
4792
4793 # So?  What about this header?
4794 case $ac_header_compiler:$ac_header_preproc in
4795   yes:no )
4796     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4797 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4798     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4799 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4800     (
4801       cat <<\_ASBOX
4802 ## ------------------------------------ ##
4803 ## Report this to bug-autoconf@gnu.org. ##
4804 ## ------------------------------------ ##
4805 _ASBOX
4806     ) |
4807       sed "s/^/$as_me: WARNING:     /" >&2
4808     ;;
4809   no:yes )
4810     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4811 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4812     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4813 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4814     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4815 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4816     (
4817       cat <<\_ASBOX
4818 ## ------------------------------------ ##
4819 ## Report this to bug-autoconf@gnu.org. ##
4820 ## ------------------------------------ ##
4821 _ASBOX
4822     ) |
4823       sed "s/^/$as_me: WARNING:     /" >&2
4824     ;;
4825 esac
4826 echo "$as_me:$LINENO: checking for $ac_header" >&5
4827 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4828 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4829   echo $ECHO_N "(cached) $ECHO_C" >&6
4830 else
4831   eval "$as_ac_Header=$ac_header_preproc"
4832 fi
4833 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4834 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4835
4836 fi
4837 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4838   cat >>confdefs.h <<_ACEOF
4839 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4840 _ACEOF
4841
4842 fi
4843
4844 done
4845
4846 for ac_prog in perl5 perl
4847 do
4848   # Extract the first word of "$ac_prog", so it can be a program name with args.
4849 set dummy $ac_prog; ac_word=$2
4850 echo "$as_me:$LINENO: checking for $ac_word" >&5
4851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4852 if test "${ac_cv_path_PERL+set}" = set; then
4853   echo $ECHO_N "(cached) $ECHO_C" >&6
4854 else
4855   case $PERL in
4856   [\\/]* | ?:[\\/]*)
4857   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4858   ;;
4859   *)
4860   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4861 for as_dir in $PATH
4862 do
4863   IFS=$as_save_IFS
4864   test -z "$as_dir" && as_dir=.
4865   for ac_exec_ext in '' $ac_executable_extensions; do
4866   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4867     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4868     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4869     break 2
4870   fi
4871 done
4872 done
4873
4874   ;;
4875 esac
4876 fi
4877 PERL=$ac_cv_path_PERL
4878
4879 if test -n "$PERL"; then
4880   echo "$as_me:$LINENO: result: $PERL" >&5
4881 echo "${ECHO_T}$PERL" >&6
4882 else
4883   echo "$as_me:$LINENO: result: no" >&5
4884 echo "${ECHO_T}no" >&6
4885 fi
4886
4887   test -n "$PERL" && break
4888 done
4889
4890   if test -z "$PERL" ; then
4891     PERL_VERSION=0
4892   else
4893     echo "$as_me:$LINENO: checking perl version" >&5
4894 echo $ECHO_N "checking perl version... $ECHO_C" >&6
4895 if test "${ac_cv_perl_version+set}" = set; then
4896   echo $ECHO_N "(cached) $ECHO_C" >&6
4897 else
4898   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
4899 fi
4900 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
4901 echo "${ECHO_T}$ac_cv_perl_version" >&6
4902     PERL_VERSION=$ac_cv_perl_version
4903   fi
4904
4905
4906 if test -z "$PERL" ; then
4907   # don't let it be blank...
4908   PERL=/usr/bin/perl
4909 fi
4910
4911 echo "$as_me:$LINENO: checking for X" >&5
4912 echo $ECHO_N "checking for X... $ECHO_C" >&6
4913
4914
4915 # Check whether --with-x or --without-x was given.
4916 if test "${with_x+set}" = set; then
4917   withval="$with_x"
4918
4919 fi;
4920 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4921 if test "x$with_x" = xno; then
4922   # The user explicitly disabled X.
4923   have_x=disabled
4924 else
4925   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4926     # Both variables are already set.
4927     have_x=yes
4928   else
4929     if test "${ac_cv_have_x+set}" = set; then
4930   echo $ECHO_N "(cached) $ECHO_C" >&6
4931 else
4932   # One or both of the vars are not set, and there is no cached value.
4933 ac_x_includes=no ac_x_libraries=no
4934 rm -fr conftest.dir
4935 if mkdir conftest.dir; then
4936   cd conftest.dir
4937   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4938   cat >Imakefile <<'_ACEOF'
4939 acfindx:
4940         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4941 _ACEOF
4942   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4943     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4944     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4945     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4946     for ac_extension in a so sl; do
4947       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4948          test -f $ac_im_libdir/libX11.$ac_extension; then
4949         ac_im_usrlibdir=$ac_im_libdir; break
4950       fi
4951     done
4952     # Screen out bogus values from the imake configuration.  They are
4953     # bogus both because they are the default anyway, and because
4954     # using them would break gcc on systems where it needs fixed includes.
4955     case $ac_im_incroot in
4956         /usr/include) ;;
4957         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4958     esac
4959     case $ac_im_usrlibdir in
4960         /usr/lib | /lib) ;;
4961         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4962     esac
4963   fi
4964   cd ..
4965   rm -fr conftest.dir
4966 fi
4967
4968 # Standard set of common directories for X headers.
4969 # Check X11 before X11Rn because it is often a symlink to the current release.
4970 ac_x_header_dirs='
4971 /usr/X11/include
4972 /usr/X11R6/include
4973 /usr/X11R5/include
4974 /usr/X11R4/include
4975
4976 /usr/include/X11
4977 /usr/include/X11R6
4978 /usr/include/X11R5
4979 /usr/include/X11R4
4980
4981 /usr/local/X11/include
4982 /usr/local/X11R6/include
4983 /usr/local/X11R5/include
4984 /usr/local/X11R4/include
4985
4986 /usr/local/include/X11
4987 /usr/local/include/X11R6
4988 /usr/local/include/X11R5
4989 /usr/local/include/X11R4
4990
4991 /usr/X386/include
4992 /usr/x386/include
4993 /usr/XFree86/include/X11
4994
4995 /usr/include
4996 /usr/local/include
4997 /usr/unsupported/include
4998 /usr/athena/include
4999 /usr/local/x11r5/include
5000 /usr/lpp/Xamples/include
5001
5002 /usr/openwin/include
5003 /usr/openwin/share/include'
5004
5005 if test "$ac_x_includes" = no; then
5006   # Guess where to find include files, by looking for Intrinsic.h.
5007   # First, try using that file with no special directory specified.
5008   cat >conftest.$ac_ext <<_ACEOF
5009 #line $LINENO "configure"
5010 /* confdefs.h.  */
5011 _ACEOF
5012 cat confdefs.h >>conftest.$ac_ext
5013 cat >>conftest.$ac_ext <<_ACEOF
5014 /* end confdefs.h.  */
5015 #include <X11/Intrinsic.h>
5016 _ACEOF
5017 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5018   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5019   ac_status=$?
5020   grep -v '^ *+' conftest.er1 >conftest.err
5021   rm -f conftest.er1
5022   cat conftest.err >&5
5023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5024   (exit $ac_status); } >/dev/null; then
5025   if test -s conftest.err; then
5026     ac_cpp_err=$ac_c_preproc_warn_flag
5027   else
5028     ac_cpp_err=
5029   fi
5030 else
5031   ac_cpp_err=yes
5032 fi
5033 if test -z "$ac_cpp_err"; then
5034   # We can compile using X headers with no special include directory.
5035 ac_x_includes=
5036 else
5037   echo "$as_me: failed program was:" >&5
5038 sed 's/^/| /' conftest.$ac_ext >&5
5039
5040   for ac_dir in $ac_x_header_dirs; do
5041   if test -r "$ac_dir/X11/Intrinsic.h"; then
5042     ac_x_includes=$ac_dir
5043     break
5044   fi
5045 done
5046 fi
5047 rm -f conftest.err conftest.$ac_ext
5048 fi # $ac_x_includes = no
5049
5050 if test "$ac_x_libraries" = no; then
5051   # Check for the libraries.
5052   # See if we find them without any special options.
5053   # Don't add to $LIBS permanently.
5054   ac_save_LIBS=$LIBS
5055   LIBS="-lXt $LIBS"
5056   cat >conftest.$ac_ext <<_ACEOF
5057 #line $LINENO "configure"
5058 /* confdefs.h.  */
5059 _ACEOF
5060 cat confdefs.h >>conftest.$ac_ext
5061 cat >>conftest.$ac_ext <<_ACEOF
5062 /* end confdefs.h.  */
5063 #include <X11/Intrinsic.h>
5064 int
5065 main ()
5066 {
5067 XtMalloc (0)
5068   ;
5069   return 0;
5070 }
5071 _ACEOF
5072 rm -f conftest.$ac_objext conftest$ac_exeext
5073 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5074   (eval $ac_link) 2>&5
5075   ac_status=$?
5076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5077   (exit $ac_status); } &&
5078          { ac_try='test -s conftest$ac_exeext'
5079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5080   (eval $ac_try) 2>&5
5081   ac_status=$?
5082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5083   (exit $ac_status); }; }; then
5084   LIBS=$ac_save_LIBS
5085 # We can link X programs with no special library path.
5086 ac_x_libraries=
5087 else
5088   echo "$as_me: failed program was:" >&5
5089 sed 's/^/| /' conftest.$ac_ext >&5
5090
5091 LIBS=$ac_save_LIBS
5092 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5093 do
5094   # Don't even attempt the hair of trying to link an X program!
5095   for ac_extension in a so sl; do
5096     if test -r $ac_dir/libXt.$ac_extension; then
5097       ac_x_libraries=$ac_dir
5098       break 2
5099     fi
5100   done
5101 done
5102 fi
5103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5104 fi # $ac_x_libraries = no
5105
5106 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
5107   # Didn't find X anywhere.  Cache the known absence of X.
5108   ac_cv_have_x="have_x=no"
5109 else
5110   # Record where we found X for the cache.
5111   ac_cv_have_x="have_x=yes \
5112                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5113 fi
5114 fi
5115
5116   fi
5117   eval "$ac_cv_have_x"
5118 fi # $with_x != no
5119
5120 if test "$have_x" != yes; then
5121   echo "$as_me:$LINENO: result: $have_x" >&5
5122 echo "${ECHO_T}$have_x" >&6
5123   no_x=yes
5124 else
5125   # If each of the values was on the command line, it overrides each guess.
5126   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5127   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5128   # Update the cache value to reflect the command line values.
5129   ac_cv_have_x="have_x=yes \
5130                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5131   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
5132 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5133 fi
5134
5135 if test "$no_x" = yes; then
5136   # Not all programs may use this symbol, but it does not hurt to define it.
5137
5138 cat >>confdefs.h <<\_ACEOF
5139 #define X_DISPLAY_MISSING 1
5140 _ACEOF
5141
5142   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5143 else
5144   if test -n "$x_includes"; then
5145     X_CFLAGS="$X_CFLAGS -I$x_includes"
5146   fi
5147
5148   # It would also be nice to do this for all -L options, not just this one.
5149   if test -n "$x_libraries"; then
5150     X_LIBS="$X_LIBS -L$x_libraries"
5151     # For Solaris; some versions of Sun CC require a space after -R and
5152     # others require no space.  Words are not sufficient . . . .
5153     case `(uname -sr) 2>/dev/null` in
5154     "SunOS 5"*)
5155       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
5156 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
5157       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
5158       cat >conftest.$ac_ext <<_ACEOF
5159 #line $LINENO "configure"
5160 /* confdefs.h.  */
5161 _ACEOF
5162 cat confdefs.h >>conftest.$ac_ext
5163 cat >>conftest.$ac_ext <<_ACEOF
5164 /* end confdefs.h.  */
5165
5166 int
5167 main ()
5168 {
5169
5170   ;
5171   return 0;
5172 }
5173 _ACEOF
5174 rm -f conftest.$ac_objext conftest$ac_exeext
5175 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5176   (eval $ac_link) 2>&5
5177   ac_status=$?
5178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5179   (exit $ac_status); } &&
5180          { ac_try='test -s conftest$ac_exeext'
5181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5182   (eval $ac_try) 2>&5
5183   ac_status=$?
5184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5185   (exit $ac_status); }; }; then
5186   ac_R_nospace=yes
5187 else
5188   echo "$as_me: failed program was:" >&5
5189 sed 's/^/| /' conftest.$ac_ext >&5
5190
5191 ac_R_nospace=no
5192 fi
5193 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5194       if test $ac_R_nospace = yes; then
5195         echo "$as_me:$LINENO: result: no" >&5
5196 echo "${ECHO_T}no" >&6
5197         X_LIBS="$X_LIBS -R$x_libraries"
5198       else
5199         LIBS="$ac_xsave_LIBS -R $x_libraries"
5200         cat >conftest.$ac_ext <<_ACEOF
5201 #line $LINENO "configure"
5202 /* confdefs.h.  */
5203 _ACEOF
5204 cat confdefs.h >>conftest.$ac_ext
5205 cat >>conftest.$ac_ext <<_ACEOF
5206 /* end confdefs.h.  */
5207
5208 int
5209 main ()
5210 {
5211
5212   ;
5213   return 0;
5214 }
5215 _ACEOF
5216 rm -f conftest.$ac_objext conftest$ac_exeext
5217 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5218   (eval $ac_link) 2>&5
5219   ac_status=$?
5220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5221   (exit $ac_status); } &&
5222          { ac_try='test -s conftest$ac_exeext'
5223   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5224   (eval $ac_try) 2>&5
5225   ac_status=$?
5226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5227   (exit $ac_status); }; }; then
5228   ac_R_space=yes
5229 else
5230   echo "$as_me: failed program was:" >&5
5231 sed 's/^/| /' conftest.$ac_ext >&5
5232
5233 ac_R_space=no
5234 fi
5235 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5236         if test $ac_R_space = yes; then
5237           echo "$as_me:$LINENO: result: yes" >&5
5238 echo "${ECHO_T}yes" >&6
5239           X_LIBS="$X_LIBS -R $x_libraries"
5240         else
5241           echo "$as_me:$LINENO: result: neither works" >&5
5242 echo "${ECHO_T}neither works" >&6
5243         fi
5244       fi
5245       LIBS=$ac_xsave_LIBS
5246     esac
5247   fi
5248
5249   # Check for system-dependent libraries X programs must link with.
5250   # Do this before checking for the system-independent R6 libraries
5251   # (-lICE), since we may need -lsocket or whatever for X linking.
5252
5253   if test "$ISC" = yes; then
5254     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5255   else
5256     # Martyn Johnson says this is needed for Ultrix, if the X
5257     # libraries were built with DECnet support.  And Karl Berry says
5258     # the Alpha needs dnet_stub (dnet does not exist).
5259     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5260     cat >conftest.$ac_ext <<_ACEOF
5261 #line $LINENO "configure"
5262 /* confdefs.h.  */
5263 _ACEOF
5264 cat confdefs.h >>conftest.$ac_ext
5265 cat >>conftest.$ac_ext <<_ACEOF
5266 /* end confdefs.h.  */
5267
5268 /* Override any gcc2 internal prototype to avoid an error.  */
5269 #ifdef __cplusplus
5270 extern "C"
5271 #endif
5272 /* We use char because int might match the return type of a gcc2
5273    builtin and then its argument prototype would still apply.  */
5274 char XOpenDisplay ();
5275 int
5276 main ()
5277 {
5278 XOpenDisplay ();
5279   ;
5280   return 0;
5281 }
5282 _ACEOF
5283 rm -f conftest.$ac_objext conftest$ac_exeext
5284 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5285   (eval $ac_link) 2>&5
5286   ac_status=$?
5287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5288   (exit $ac_status); } &&
5289          { ac_try='test -s conftest$ac_exeext'
5290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5291   (eval $ac_try) 2>&5
5292   ac_status=$?
5293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5294   (exit $ac_status); }; }; then
5295   :
5296 else
5297   echo "$as_me: failed program was:" >&5
5298 sed 's/^/| /' conftest.$ac_ext >&5
5299
5300 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5301 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5302 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5303   echo $ECHO_N "(cached) $ECHO_C" >&6
5304 else
5305   ac_check_lib_save_LIBS=$LIBS
5306 LIBS="-ldnet  $LIBS"
5307 cat >conftest.$ac_ext <<_ACEOF
5308 #line $LINENO "configure"
5309 /* confdefs.h.  */
5310 _ACEOF
5311 cat confdefs.h >>conftest.$ac_ext
5312 cat >>conftest.$ac_ext <<_ACEOF
5313 /* end confdefs.h.  */
5314
5315 /* Override any gcc2 internal prototype to avoid an error.  */
5316 #ifdef __cplusplus
5317 extern "C"
5318 #endif
5319 /* We use char because int might match the return type of a gcc2
5320    builtin and then its argument prototype would still apply.  */
5321 char dnet_ntoa ();
5322 int
5323 main ()
5324 {
5325 dnet_ntoa ();
5326   ;
5327   return 0;
5328 }
5329 _ACEOF
5330 rm -f conftest.$ac_objext conftest$ac_exeext
5331 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5332   (eval $ac_link) 2>&5
5333   ac_status=$?
5334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5335   (exit $ac_status); } &&
5336          { ac_try='test -s conftest$ac_exeext'
5337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5338   (eval $ac_try) 2>&5
5339   ac_status=$?
5340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5341   (exit $ac_status); }; }; then
5342   ac_cv_lib_dnet_dnet_ntoa=yes
5343 else
5344   echo "$as_me: failed program was:" >&5
5345 sed 's/^/| /' conftest.$ac_ext >&5
5346
5347 ac_cv_lib_dnet_dnet_ntoa=no
5348 fi
5349 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5350 LIBS=$ac_check_lib_save_LIBS
5351 fi
5352 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5353 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5354 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5355   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5356 fi
5357
5358     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5359       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5360 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5361 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5362   echo $ECHO_N "(cached) $ECHO_C" >&6
5363 else
5364   ac_check_lib_save_LIBS=$LIBS
5365 LIBS="-ldnet_stub  $LIBS"
5366 cat >conftest.$ac_ext <<_ACEOF
5367 #line $LINENO "configure"
5368 /* confdefs.h.  */
5369 _ACEOF
5370 cat confdefs.h >>conftest.$ac_ext
5371 cat >>conftest.$ac_ext <<_ACEOF
5372 /* end confdefs.h.  */
5373
5374 /* Override any gcc2 internal prototype to avoid an error.  */
5375 #ifdef __cplusplus
5376 extern "C"
5377 #endif
5378 /* We use char because int might match the return type of a gcc2
5379    builtin and then its argument prototype would still apply.  */
5380 char dnet_ntoa ();
5381 int
5382 main ()
5383 {
5384 dnet_ntoa ();
5385   ;
5386   return 0;
5387 }
5388 _ACEOF
5389 rm -f conftest.$ac_objext conftest$ac_exeext
5390 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5391   (eval $ac_link) 2>&5
5392   ac_status=$?
5393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5394   (exit $ac_status); } &&
5395          { ac_try='test -s conftest$ac_exeext'
5396   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5397   (eval $ac_try) 2>&5
5398   ac_status=$?
5399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5400   (exit $ac_status); }; }; then
5401   ac_cv_lib_dnet_stub_dnet_ntoa=yes
5402 else
5403   echo "$as_me: failed program was:" >&5
5404 sed 's/^/| /' conftest.$ac_ext >&5
5405
5406 ac_cv_lib_dnet_stub_dnet_ntoa=no
5407 fi
5408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5409 LIBS=$ac_check_lib_save_LIBS
5410 fi
5411 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5412 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5413 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5414   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5415 fi
5416
5417     fi
5418 fi
5419 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5420     LIBS="$ac_xsave_LIBS"
5421
5422     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5423     # to get the SysV transport functions.
5424     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5425     # needs -lnsl.
5426     # The nsl library prevents programs from opening the X display
5427     # on Irix 5.2, according to T.E. Dickey.
5428     # The functions gethostbyname, getservbyname, and inet_addr are
5429     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5430     echo "$as_me:$LINENO: checking for gethostbyname" >&5
5431 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5432 if test "${ac_cv_func_gethostbyname+set}" = set; then
5433   echo $ECHO_N "(cached) $ECHO_C" >&6
5434 else
5435   cat >conftest.$ac_ext <<_ACEOF
5436 #line $LINENO "configure"
5437 /* confdefs.h.  */
5438 _ACEOF
5439 cat confdefs.h >>conftest.$ac_ext
5440 cat >>conftest.$ac_ext <<_ACEOF
5441 /* end confdefs.h.  */
5442 /* System header to define __stub macros and hopefully few prototypes,
5443     which can conflict with char gethostbyname (); below.
5444     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5445     <limits.h> exists even on freestanding compilers.  */
5446 #ifdef __STDC__
5447 # include <limits.h>
5448 #else
5449 # include <assert.h>
5450 #endif
5451 /* Override any gcc2 internal prototype to avoid an error.  */
5452 #ifdef __cplusplus
5453 extern "C"
5454 {
5455 #endif
5456 /* We use char because int might match the return type of a gcc2
5457    builtin and then its argument prototype would still apply.  */
5458 char gethostbyname ();
5459 /* The GNU C library defines this for functions which it implements
5460     to always fail with ENOSYS.  Some functions are actually named
5461     something starting with __ and the normal name is an alias.  */
5462 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5463 choke me
5464 #else
5465 char (*f) () = gethostbyname;
5466 #endif
5467 #ifdef __cplusplus
5468 }
5469 #endif
5470
5471 int
5472 main ()
5473 {
5474 return f != gethostbyname;
5475   ;
5476   return 0;
5477 }
5478 _ACEOF
5479 rm -f conftest.$ac_objext conftest$ac_exeext
5480 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5481   (eval $ac_link) 2>&5
5482   ac_status=$?
5483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5484   (exit $ac_status); } &&
5485          { ac_try='test -s conftest$ac_exeext'
5486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5487   (eval $ac_try) 2>&5
5488   ac_status=$?
5489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5490   (exit $ac_status); }; }; then
5491   ac_cv_func_gethostbyname=yes
5492 else
5493   echo "$as_me: failed program was:" >&5
5494 sed 's/^/| /' conftest.$ac_ext >&5
5495
5496 ac_cv_func_gethostbyname=no
5497 fi
5498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5499 fi
5500 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5501 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5502
5503     if test $ac_cv_func_gethostbyname = no; then
5504       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5505 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5506 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5507   echo $ECHO_N "(cached) $ECHO_C" >&6
5508 else
5509   ac_check_lib_save_LIBS=$LIBS
5510 LIBS="-lnsl  $LIBS"
5511 cat >conftest.$ac_ext <<_ACEOF
5512 #line $LINENO "configure"
5513 /* confdefs.h.  */
5514 _ACEOF
5515 cat confdefs.h >>conftest.$ac_ext
5516 cat >>conftest.$ac_ext <<_ACEOF
5517 /* end confdefs.h.  */
5518
5519 /* Override any gcc2 internal prototype to avoid an error.  */
5520 #ifdef __cplusplus
5521 extern "C"
5522 #endif
5523 /* We use char because int might match the return type of a gcc2
5524    builtin and then its argument prototype would still apply.  */
5525 char gethostbyname ();
5526 int
5527 main ()
5528 {
5529 gethostbyname ();
5530   ;
5531   return 0;
5532 }
5533 _ACEOF
5534 rm -f conftest.$ac_objext conftest$ac_exeext
5535 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5536   (eval $ac_link) 2>&5
5537   ac_status=$?
5538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5539   (exit $ac_status); } &&
5540          { ac_try='test -s conftest$ac_exeext'
5541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5542   (eval $ac_try) 2>&5
5543   ac_status=$?
5544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5545   (exit $ac_status); }; }; then
5546   ac_cv_lib_nsl_gethostbyname=yes
5547 else
5548   echo "$as_me: failed program was:" >&5
5549 sed 's/^/| /' conftest.$ac_ext >&5
5550
5551 ac_cv_lib_nsl_gethostbyname=no
5552 fi
5553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5554 LIBS=$ac_check_lib_save_LIBS
5555 fi
5556 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5557 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5558 if test $ac_cv_lib_nsl_gethostbyname = yes; then
5559   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5560 fi
5561
5562       if test $ac_cv_lib_nsl_gethostbyname = no; then
5563         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5564 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5565 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5566   echo $ECHO_N "(cached) $ECHO_C" >&6
5567 else
5568   ac_check_lib_save_LIBS=$LIBS
5569 LIBS="-lbsd  $LIBS"
5570 cat >conftest.$ac_ext <<_ACEOF
5571 #line $LINENO "configure"
5572 /* confdefs.h.  */
5573 _ACEOF
5574 cat confdefs.h >>conftest.$ac_ext
5575 cat >>conftest.$ac_ext <<_ACEOF
5576 /* end confdefs.h.  */
5577
5578 /* Override any gcc2 internal prototype to avoid an error.  */
5579 #ifdef __cplusplus
5580 extern "C"
5581 #endif
5582 /* We use char because int might match the return type of a gcc2
5583    builtin and then its argument prototype would still apply.  */
5584 char gethostbyname ();
5585 int
5586 main ()
5587 {
5588 gethostbyname ();
5589   ;
5590   return 0;
5591 }
5592 _ACEOF
5593 rm -f conftest.$ac_objext conftest$ac_exeext
5594 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5595   (eval $ac_link) 2>&5
5596   ac_status=$?
5597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5598   (exit $ac_status); } &&
5599          { ac_try='test -s conftest$ac_exeext'
5600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5601   (eval $ac_try) 2>&5
5602   ac_status=$?
5603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5604   (exit $ac_status); }; }; then
5605   ac_cv_lib_bsd_gethostbyname=yes
5606 else
5607   echo "$as_me: failed program was:" >&5
5608 sed 's/^/| /' conftest.$ac_ext >&5
5609
5610 ac_cv_lib_bsd_gethostbyname=no
5611 fi
5612 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5613 LIBS=$ac_check_lib_save_LIBS
5614 fi
5615 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
5616 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
5617 if test $ac_cv_lib_bsd_gethostbyname = yes; then
5618   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5619 fi
5620
5621       fi
5622     fi
5623
5624     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5625     # socket/setsockopt and other routines are undefined under SCO ODT
5626     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5627     # on later versions), says Simon Leinen: it contains gethostby*
5628     # variants that don't use the name server (or something).  -lsocket
5629     # must be given before -lnsl if both are needed.  We assume that
5630     # if connect needs -lnsl, so does gethostbyname.
5631     echo "$as_me:$LINENO: checking for connect" >&5
5632 echo $ECHO_N "checking for connect... $ECHO_C" >&6
5633 if test "${ac_cv_func_connect+set}" = set; then
5634   echo $ECHO_N "(cached) $ECHO_C" >&6
5635 else
5636   cat >conftest.$ac_ext <<_ACEOF
5637 #line $LINENO "configure"
5638 /* confdefs.h.  */
5639 _ACEOF
5640 cat confdefs.h >>conftest.$ac_ext
5641 cat >>conftest.$ac_ext <<_ACEOF
5642 /* end confdefs.h.  */
5643 /* System header to define __stub macros and hopefully few prototypes,
5644     which can conflict with char connect (); below.
5645     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5646     <limits.h> exists even on freestanding compilers.  */
5647 #ifdef __STDC__
5648 # include <limits.h>
5649 #else
5650 # include <assert.h>
5651 #endif
5652 /* Override any gcc2 internal prototype to avoid an error.  */
5653 #ifdef __cplusplus
5654 extern "C"
5655 {
5656 #endif
5657 /* We use char because int might match the return type of a gcc2
5658    builtin and then its argument prototype would still apply.  */
5659 char connect ();
5660 /* The GNU C library defines this for functions which it implements
5661     to always fail with ENOSYS.  Some functions are actually named
5662     something starting with __ and the normal name is an alias.  */
5663 #if defined (__stub_connect) || defined (__stub___connect)
5664 choke me
5665 #else
5666 char (*f) () = connect;
5667 #endif
5668 #ifdef __cplusplus
5669 }
5670 #endif
5671
5672 int
5673 main ()
5674 {
5675 return f != connect;
5676   ;
5677   return 0;
5678 }
5679 _ACEOF
5680 rm -f conftest.$ac_objext conftest$ac_exeext
5681 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5682   (eval $ac_link) 2>&5
5683   ac_status=$?
5684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5685   (exit $ac_status); } &&
5686          { ac_try='test -s conftest$ac_exeext'
5687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5688   (eval $ac_try) 2>&5
5689   ac_status=$?
5690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5691   (exit $ac_status); }; }; then
5692   ac_cv_func_connect=yes
5693 else
5694   echo "$as_me: failed program was:" >&5
5695 sed 's/^/| /' conftest.$ac_ext >&5
5696
5697 ac_cv_func_connect=no
5698 fi
5699 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5700 fi
5701 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5702 echo "${ECHO_T}$ac_cv_func_connect" >&6
5703
5704     if test $ac_cv_func_connect = no; then
5705       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
5706 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
5707 if test "${ac_cv_lib_socket_connect+set}" = set; then
5708   echo $ECHO_N "(cached) $ECHO_C" >&6
5709 else
5710   ac_check_lib_save_LIBS=$LIBS
5711 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5712 cat >conftest.$ac_ext <<_ACEOF
5713 #line $LINENO "configure"
5714 /* confdefs.h.  */
5715 _ACEOF
5716 cat confdefs.h >>conftest.$ac_ext
5717 cat >>conftest.$ac_ext <<_ACEOF
5718 /* end confdefs.h.  */
5719
5720 /* Override any gcc2 internal prototype to avoid an error.  */
5721 #ifdef __cplusplus
5722 extern "C"
5723 #endif
5724 /* We use char because int might match the return type of a gcc2
5725    builtin and then its argument prototype would still apply.  */
5726 char connect ();
5727 int
5728 main ()
5729 {
5730 connect ();
5731   ;
5732   return 0;
5733 }
5734 _ACEOF
5735 rm -f conftest.$ac_objext conftest$ac_exeext
5736 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5737   (eval $ac_link) 2>&5
5738   ac_status=$?
5739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5740   (exit $ac_status); } &&
5741          { ac_try='test -s conftest$ac_exeext'
5742   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5743   (eval $ac_try) 2>&5
5744   ac_status=$?
5745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5746   (exit $ac_status); }; }; then
5747   ac_cv_lib_socket_connect=yes
5748 else
5749   echo "$as_me: failed program was:" >&5
5750 sed 's/^/| /' conftest.$ac_ext >&5
5751
5752 ac_cv_lib_socket_connect=no
5753 fi
5754 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5755 LIBS=$ac_check_lib_save_LIBS
5756 fi
5757 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
5758 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
5759 if test $ac_cv_lib_socket_connect = yes; then
5760   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5761 fi
5762
5763     fi
5764
5765     # Guillermo Gomez says -lposix is necessary on A/UX.
5766     echo "$as_me:$LINENO: checking for remove" >&5
5767 echo $ECHO_N "checking for remove... $ECHO_C" >&6
5768 if test "${ac_cv_func_remove+set}" = set; then
5769   echo $ECHO_N "(cached) $ECHO_C" >&6
5770 else
5771   cat >conftest.$ac_ext <<_ACEOF
5772 #line $LINENO "configure"
5773 /* confdefs.h.  */
5774 _ACEOF
5775 cat confdefs.h >>conftest.$ac_ext
5776 cat >>conftest.$ac_ext <<_ACEOF
5777 /* end confdefs.h.  */
5778 /* System header to define __stub macros and hopefully few prototypes,
5779     which can conflict with char remove (); below.
5780     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5781     <limits.h> exists even on freestanding compilers.  */
5782 #ifdef __STDC__
5783 # include <limits.h>
5784 #else
5785 # include <assert.h>
5786 #endif
5787 /* Override any gcc2 internal prototype to avoid an error.  */
5788 #ifdef __cplusplus
5789 extern "C"
5790 {
5791 #endif
5792 /* We use char because int might match the return type of a gcc2
5793    builtin and then its argument prototype would still apply.  */
5794 char remove ();
5795 /* The GNU C library defines this for functions which it implements
5796     to always fail with ENOSYS.  Some functions are actually named
5797     something starting with __ and the normal name is an alias.  */
5798 #if defined (__stub_remove) || defined (__stub___remove)
5799 choke me
5800 #else
5801 char (*f) () = remove;
5802 #endif
5803 #ifdef __cplusplus
5804 }
5805 #endif
5806
5807 int
5808 main ()
5809 {
5810 return f != remove;
5811   ;
5812   return 0;
5813 }
5814 _ACEOF
5815 rm -f conftest.$ac_objext conftest$ac_exeext
5816 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5817   (eval $ac_link) 2>&5
5818   ac_status=$?
5819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820   (exit $ac_status); } &&
5821          { ac_try='test -s conftest$ac_exeext'
5822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5823   (eval $ac_try) 2>&5
5824   ac_status=$?
5825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5826   (exit $ac_status); }; }; then
5827   ac_cv_func_remove=yes
5828 else
5829   echo "$as_me: failed program was:" >&5
5830 sed 's/^/| /' conftest.$ac_ext >&5
5831
5832 ac_cv_func_remove=no
5833 fi
5834 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5835 fi
5836 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
5837 echo "${ECHO_T}$ac_cv_func_remove" >&6
5838
5839     if test $ac_cv_func_remove = no; then
5840       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
5841 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
5842 if test "${ac_cv_lib_posix_remove+set}" = set; then
5843   echo $ECHO_N "(cached) $ECHO_C" >&6
5844 else
5845   ac_check_lib_save_LIBS=$LIBS
5846 LIBS="-lposix  $LIBS"
5847 cat >conftest.$ac_ext <<_ACEOF
5848 #line $LINENO "configure"
5849 /* confdefs.h.  */
5850 _ACEOF
5851 cat confdefs.h >>conftest.$ac_ext
5852 cat >>conftest.$ac_ext <<_ACEOF
5853 /* end confdefs.h.  */
5854
5855 /* Override any gcc2 internal prototype to avoid an error.  */
5856 #ifdef __cplusplus
5857 extern "C"
5858 #endif
5859 /* We use char because int might match the return type of a gcc2
5860    builtin and then its argument prototype would still apply.  */
5861 char remove ();
5862 int
5863 main ()
5864 {
5865 remove ();
5866   ;
5867   return 0;
5868 }
5869 _ACEOF
5870 rm -f conftest.$ac_objext conftest$ac_exeext
5871 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5872   (eval $ac_link) 2>&5
5873   ac_status=$?
5874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5875   (exit $ac_status); } &&
5876          { ac_try='test -s conftest$ac_exeext'
5877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5878   (eval $ac_try) 2>&5
5879   ac_status=$?
5880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5881   (exit $ac_status); }; }; then
5882   ac_cv_lib_posix_remove=yes
5883 else
5884   echo "$as_me: failed program was:" >&5
5885 sed 's/^/| /' conftest.$ac_ext >&5
5886
5887 ac_cv_lib_posix_remove=no
5888 fi
5889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5890 LIBS=$ac_check_lib_save_LIBS
5891 fi
5892 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
5893 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
5894 if test $ac_cv_lib_posix_remove = yes; then
5895   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5896 fi
5897
5898     fi
5899
5900     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5901     echo "$as_me:$LINENO: checking for shmat" >&5
5902 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
5903 if test "${ac_cv_func_shmat+set}" = set; then
5904   echo $ECHO_N "(cached) $ECHO_C" >&6
5905 else
5906   cat >conftest.$ac_ext <<_ACEOF
5907 #line $LINENO "configure"
5908 /* confdefs.h.  */
5909 _ACEOF
5910 cat confdefs.h >>conftest.$ac_ext
5911 cat >>conftest.$ac_ext <<_ACEOF
5912 /* end confdefs.h.  */
5913 /* System header to define __stub macros and hopefully few prototypes,
5914     which can conflict with char shmat (); below.
5915     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5916     <limits.h> exists even on freestanding compilers.  */
5917 #ifdef __STDC__
5918 # include <limits.h>
5919 #else
5920 # include <assert.h>
5921 #endif
5922 /* Override any gcc2 internal prototype to avoid an error.  */
5923 #ifdef __cplusplus
5924 extern "C"
5925 {
5926 #endif
5927 /* We use char because int might match the return type of a gcc2
5928    builtin and then its argument prototype would still apply.  */
5929 char shmat ();
5930 /* The GNU C library defines this for functions which it implements
5931     to always fail with ENOSYS.  Some functions are actually named
5932     something starting with __ and the normal name is an alias.  */
5933 #if defined (__stub_shmat) || defined (__stub___shmat)
5934 choke me
5935 #else
5936 char (*f) () = shmat;
5937 #endif
5938 #ifdef __cplusplus
5939 }
5940 #endif
5941
5942 int
5943 main ()
5944 {
5945 return f != shmat;
5946   ;
5947   return 0;
5948 }
5949 _ACEOF
5950 rm -f conftest.$ac_objext conftest$ac_exeext
5951 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5952   (eval $ac_link) 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_func_shmat=yes
5963 else
5964   echo "$as_me: failed program was:" >&5
5965 sed 's/^/| /' conftest.$ac_ext >&5
5966
5967 ac_cv_func_shmat=no
5968 fi
5969 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5970 fi
5971 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
5972 echo "${ECHO_T}$ac_cv_func_shmat" >&6
5973
5974     if test $ac_cv_func_shmat = no; then
5975       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
5976 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
5977 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
5978   echo $ECHO_N "(cached) $ECHO_C" >&6
5979 else
5980   ac_check_lib_save_LIBS=$LIBS
5981 LIBS="-lipc  $LIBS"
5982 cat >conftest.$ac_ext <<_ACEOF
5983 #line $LINENO "configure"
5984 /* confdefs.h.  */
5985 _ACEOF
5986 cat confdefs.h >>conftest.$ac_ext
5987 cat >>conftest.$ac_ext <<_ACEOF
5988 /* end confdefs.h.  */
5989
5990 /* Override any gcc2 internal prototype to avoid an error.  */
5991 #ifdef __cplusplus
5992 extern "C"
5993 #endif
5994 /* We use char because int might match the return type of a gcc2
5995    builtin and then its argument prototype would still apply.  */
5996 char shmat ();
5997 int
5998 main ()
5999 {
6000 shmat ();
6001   ;
6002   return 0;
6003 }
6004 _ACEOF
6005 rm -f conftest.$ac_objext conftest$ac_exeext
6006 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6007   (eval $ac_link) 2>&5
6008   ac_status=$?
6009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6010   (exit $ac_status); } &&
6011          { ac_try='test -s conftest$ac_exeext'
6012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6013   (eval $ac_try) 2>&5
6014   ac_status=$?
6015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6016   (exit $ac_status); }; }; then
6017   ac_cv_lib_ipc_shmat=yes
6018 else
6019   echo "$as_me: failed program was:" >&5
6020 sed 's/^/| /' conftest.$ac_ext >&5
6021
6022 ac_cv_lib_ipc_shmat=no
6023 fi
6024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6025 LIBS=$ac_check_lib_save_LIBS
6026 fi
6027 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
6028 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
6029 if test $ac_cv_lib_ipc_shmat = yes; then
6030   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6031 fi
6032
6033     fi
6034   fi
6035
6036   # Check for libraries that X11R6 Xt/Xaw programs need.
6037   ac_save_LDFLAGS=$LDFLAGS
6038   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6039   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6040   # check for ICE first), but we must link in the order -lSM -lICE or
6041   # we get undefined symbols.  So assume we have SM if we have ICE.
6042   # These have to be linked with before -lX11, unlike the other
6043   # libraries we check for below, so use a different variable.
6044   # John Interrante, Karl Berry
6045   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
6046 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
6047 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
6048   echo $ECHO_N "(cached) $ECHO_C" >&6
6049 else
6050   ac_check_lib_save_LIBS=$LIBS
6051 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6052 cat >conftest.$ac_ext <<_ACEOF
6053 #line $LINENO "configure"
6054 /* confdefs.h.  */
6055 _ACEOF
6056 cat confdefs.h >>conftest.$ac_ext
6057 cat >>conftest.$ac_ext <<_ACEOF
6058 /* end confdefs.h.  */
6059
6060 /* Override any gcc2 internal prototype to avoid an error.  */
6061 #ifdef __cplusplus
6062 extern "C"
6063 #endif
6064 /* We use char because int might match the return type of a gcc2
6065    builtin and then its argument prototype would still apply.  */
6066 char IceConnectionNumber ();
6067 int
6068 main ()
6069 {
6070 IceConnectionNumber ();
6071   ;
6072   return 0;
6073 }
6074 _ACEOF
6075 rm -f conftest.$ac_objext conftest$ac_exeext
6076 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6077   (eval $ac_link) 2>&5
6078   ac_status=$?
6079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6080   (exit $ac_status); } &&
6081          { ac_try='test -s conftest$ac_exeext'
6082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6083   (eval $ac_try) 2>&5
6084   ac_status=$?
6085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6086   (exit $ac_status); }; }; then
6087   ac_cv_lib_ICE_IceConnectionNumber=yes
6088 else
6089   echo "$as_me: failed program was:" >&5
6090 sed 's/^/| /' conftest.$ac_ext >&5
6091
6092 ac_cv_lib_ICE_IceConnectionNumber=no
6093 fi
6094 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6095 LIBS=$ac_check_lib_save_LIBS
6096 fi
6097 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6098 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
6099 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
6100   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6101 fi
6102
6103   LDFLAGS=$ac_save_LDFLAGS
6104
6105 fi
6106
6107
6108 if test "$have_x" != yes; then
6109   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
6110 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
6111    { (exit 1); exit 1; }; }
6112 fi
6113
6114
6115     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
6116 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
6117 if test "${ac_cv_x_app_defaults+set}" = set; then
6118   echo $ECHO_N "(cached) $ECHO_C" >&6
6119 else
6120
6121   rm -fr conftestdir
6122   if mkdir conftestdir; then
6123     cd conftestdir 2>/dev/null
6124     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6125     cat > Imakefile <<'EOF'
6126 acfindx:
6127         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
6128 EOF
6129     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
6130       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
6131       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6132     fi
6133     cd .. 2>/dev/null
6134     rm -fr conftestdir
6135   fi
6136       if test x"$ac_x_app_defaults" = x; then
6137
6138   # Look for the directory under a standard set of common directories.
6139   # Check X11 before X11Rn because it's often a symlink to the current release.
6140   for ac_dir in                                 \
6141     /usr/X11/lib/app-defaults                   \
6142     /usr/X11R6/lib/app-defaults                 \
6143     /usr/X11R6/lib/X11/app-defaults             \
6144     /usr/X11R5/lib/app-defaults                 \
6145     /usr/X11R5/lib/X11/app-defaults             \
6146     /usr/X11R4/lib/app-defaults                 \
6147     /usr/X11R4/lib/X11/app-defaults             \
6148                                                 \
6149     /usr/lib/X11/app-defaults                   \
6150     /usr/lib/X11R6/app-defaults                 \
6151     /usr/lib/X11R5/app-defaults                 \
6152     /usr/lib/X11R4/app-defaults                 \
6153                                                 \
6154     /usr/local/X11/lib/app-defaults             \
6155     /usr/local/X11R6/lib/app-defaults           \
6156     /usr/local/X11R5/lib/app-defaults           \
6157     /usr/local/X11R4/lib/app-defaults           \
6158                                                 \
6159     /usr/local/lib/X11/app-defaults             \
6160     /usr/local/lib/X11R6/app-defaults           \
6161     /usr/local/lib/X11R6/X11/app-defaults       \
6162     /usr/local/lib/X11R5/app-defaults           \
6163     /usr/local/lib/X11R5/X11/app-defaults       \
6164     /usr/local/lib/X11R4/app-defaults           \
6165     /usr/local/lib/X11R4/X11/app-defaults       \
6166                                                 \
6167     /usr/X386/lib/X11/app-defaults              \
6168     /usr/x386/lib/X11/app-defaults              \
6169     /usr/XFree86/lib/X11/app-defaults           \
6170                                                 \
6171     /usr/lib/X11/app-defaults                   \
6172     /usr/local/lib/X11/app-defaults             \
6173     /usr/unsupported/lib/X11/app-defaults       \
6174     /usr/athena/lib/X11/app-defaults            \
6175     /usr/local/x11r5/lib/X11/app-defaults       \
6176     /usr/lpp/Xamples/lib/X11/app-defaults       \
6177     /lib/usr/lib/X11/app-defaults               \
6178                                                 \
6179     /usr/openwin/lib/app-defaults               \
6180     /usr/openwin/lib/X11/app-defaults           \
6181     /usr/openwin/share/lib/app-defaults         \
6182     /usr/openwin/share/lib/X11/app-defaults     \
6183                                                 \
6184     /X11R6/lib/app-defaults                     \
6185     /X11R5/lib/app-defaults                     \
6186     /X11R4/lib/app-defaults                     \
6187     ; \
6188   do
6189     if test -d "$ac_dir"; then
6190       ac_x_app_defaults=$ac_dir
6191       break
6192     fi
6193   done
6194
6195       fi
6196       if test x"$ac_x_app_defaults" = x; then
6197         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
6198       else
6199         # Record where we found app-defaults for the cache.
6200         ac_cv_x_app_defaults="$ac_x_app_defaults"
6201       fi
6202 fi
6203 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
6204 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
6205     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
6206 case "$host" in
6207     *-hpux*)
6208
6209       # The following arcana was gleaned from conversations with
6210       # Eric Schwartz <erics@col.hp.com>:
6211       #
6212       # On HPUX 10.x, the parts of X that HP considers "standard" live in
6213       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6214       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6215       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6216       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6217       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6218       # you don't need any -I or -L arguments.
6219       #
6220       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6221       # are the same division as 10.x.  However, there are no symlinks to
6222       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6223       # arguments are always necessary.
6224       #
6225       # However, X11R6 was available on HPUX 9.x as a patch: if that
6226       # patch was installed, then all of X11R6 went in to
6227       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6228       #
6229       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6230       # whether R5 was available as a patch; R6 undoubtedly was not.)
6231       #
6232       # So.  We try and use the highest numbered pair of
6233       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6234       # that are available.  We do not mix and match different versions
6235       # of X.
6236       #
6237       # Question I still don't know the answer to: (do you?)
6238       #
6239       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6240       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6241       #     that contrib directory?  Did it contain so-called "standard"
6242       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6243       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6244       #     be a situation where one had to reach into the R5 headers and
6245       #     libs to find Xmu?  That is, must both R6 and R5 directories
6246       #     be on the -I and -L lists in that case?
6247       #
6248       for version in X11R6 X11R5 X11R4 ; do
6249         # if either pair of directories exists...
6250         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6251         then
6252            # if contrib exists, use it...
6253            if test -d /usr/contrib/$version/include ; then
6254              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6255              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6256            fi
6257            # if the "standard" one exists, use it.
6258            if test -d /usr/include/$version ; then
6259              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6260              X_LIBS="$X_LIBS -L/usr/lib/$version"
6261            fi
6262            # since at least one of the pair exists, go no farther.
6263            break
6264         fi
6265       done
6266
6267       # Now find Motif.  Thanks for not making xmkmf find this by
6268       # default, you losers.
6269       #
6270       if test -d /usr/include/Motif2.1 ; then
6271         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6272         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6273       elif test -d /usr/include/Motif1.2 ; then
6274         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6275         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6276       elif test -d /usr/include/Motif1.1 ; then
6277         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6278         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6279       fi
6280
6281       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6282       #
6283       if test -d /opt/graphics/OpenGL/include ; then
6284         # HP-UX 10.20 puts it here
6285         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6286         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6287       elif test -d /opt/Mesa/lib ; then
6288         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6289         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6290       fi
6291
6292
6293       if test -d /opt/xpm/lib/X11 ; then
6294         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6295         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6296       fi
6297
6298       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6299       # in /usr/local/, unless there is already an xscreensaver in
6300       # /usr/local/bin/.  This can be overridden with the --prefix arg
6301       # to configure.  I'm not sure this is the right thing to do, but
6302       # Richard Lloyd says so...
6303       #
6304       if test \! -x /usr/local/bin/xscreensaver ; then
6305         ac_default_prefix=/opt/xscreensaver
6306       fi
6307
6308     ;;
6309     *-solaris*)
6310
6311       # Thanks for not making xmkmf find this by default, pinheads.
6312       # And thanks for moving things around again, too.  Is this
6313       # really the standard location now?  What happened to the
6314       # joke that this kind of thing went in /opt?
6315       # cthomp says "answer: CDE (Common Disorganized Environment)"
6316       #
6317       if test -f /usr/dt/include/Xm/Xm.h ; then
6318         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6319         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
6320
6321         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6322         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
6323 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
6324 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
6325   echo $ECHO_N "(cached) $ECHO_C" >&6
6326 else
6327   ac_check_lib_save_LIBS=$LIBS
6328 LIBS="-lgen  $LIBS"
6329 cat >conftest.$ac_ext <<_ACEOF
6330 #line $LINENO "configure"
6331 /* confdefs.h.  */
6332 _ACEOF
6333 cat confdefs.h >>conftest.$ac_ext
6334 cat >>conftest.$ac_ext <<_ACEOF
6335 /* end confdefs.h.  */
6336
6337 /* Override any gcc2 internal prototype to avoid an error.  */
6338 #ifdef __cplusplus
6339 extern "C"
6340 #endif
6341 /* We use char because int might match the return type of a gcc2
6342    builtin and then its argument prototype would still apply.  */
6343 char regcmp ();
6344 int
6345 main ()
6346 {
6347 regcmp ();
6348   ;
6349   return 0;
6350 }
6351 _ACEOF
6352 rm -f conftest.$ac_objext conftest$ac_exeext
6353 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6354   (eval $ac_link) 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_gen_regcmp=yes
6365 else
6366   echo "$as_me: failed program was:" >&5
6367 sed 's/^/| /' conftest.$ac_ext >&5
6368
6369 ac_cv_lib_gen_regcmp=no
6370 fi
6371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6372 LIBS=$ac_check_lib_save_LIBS
6373 fi
6374 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
6375 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
6376 if test $ac_cv_lib_gen_regcmp = yes; then
6377   MOTIF_LIBS="$MOTIF_LIBS -lgen"
6378 fi
6379
6380       fi
6381
6382     ;;
6383     *-darwin*)
6384
6385       # On MacOS X (10.x with "fink"), many things are under /sw/.
6386       #
6387       if test -d /sw/include ; then
6388         X_CFLAGS="-I/sw/include $X_CFLAGS"
6389         X_LIBS="-L/sw/lib $X_LIBS"
6390       fi
6391     ;;
6392   esac
6393 echo "$as_me:$LINENO: checking for XPointer" >&5
6394 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
6395 if test "${ac_cv_xpointer+set}" = set; then
6396   echo $ECHO_N "(cached) $ECHO_C" >&6
6397 else
6398
6399   ac_save_CPPFLAGS="$CPPFLAGS"
6400   if test \! -z "$includedir" ; then
6401     CPPFLAGS="$CPPFLAGS -I$includedir"
6402   fi
6403   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6404   cat >conftest.$ac_ext <<_ACEOF
6405 #line $LINENO "configure"
6406 /* confdefs.h.  */
6407 _ACEOF
6408 cat confdefs.h >>conftest.$ac_ext
6409 cat >>conftest.$ac_ext <<_ACEOF
6410 /* end confdefs.h.  */
6411 #include <X11/Xlib.h>
6412 int
6413 main ()
6414 {
6415 XPointer foo = (XPointer) 0;
6416   ;
6417   return 0;
6418 }
6419 _ACEOF
6420 rm -f conftest.$ac_objext
6421 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6422   (eval $ac_compile) 2>&5
6423   ac_status=$?
6424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6425   (exit $ac_status); } &&
6426          { ac_try='test -s conftest.$ac_objext'
6427   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6428   (eval $ac_try) 2>&5
6429   ac_status=$?
6430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6431   (exit $ac_status); }; }; then
6432   ac_cv_xpointer=yes
6433 else
6434   echo "$as_me: failed program was:" >&5
6435 sed 's/^/| /' conftest.$ac_ext >&5
6436
6437 ac_cv_xpointer=no
6438 fi
6439 rm -f conftest.$ac_objext conftest.$ac_ext
6440   CPPFLAGS="$ac_save_CPPFLAGS"
6441 fi
6442 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
6443 echo "${ECHO_T}$ac_cv_xpointer" >&6
6444   if test "$ac_cv_xpointer" != yes; then
6445    cat >>confdefs.h <<\_ACEOF
6446 #define XPointer char*
6447 _ACEOF
6448
6449   fi
6450
6451
6452 ###############################################################################
6453 #
6454 #       Gettext support
6455 #
6456 ###############################################################################
6457
6458
6459
6460 if test -n ""; then
6461     echo "$as_me:$LINENO: checking for intltool >= " >&5
6462 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
6463
6464     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
6465     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
6466
6467     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
6468
6469
6470     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
6471         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
6472 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
6473     else
6474         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
6475 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
6476         exit 1
6477     fi
6478 fi
6479
6480   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'
6481 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'
6482      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'
6483       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
6484      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'
6485    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'
6486     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'
6487 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'
6488        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'
6489       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'
6490     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'
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504 # Use the tools built into the package, not the ones that are installed.
6505
6506 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
6507 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
6508 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
6509
6510
6511
6512
6513
6514 # Extract the first word of "perl", so it can be a program name with args.
6515 set dummy perl; ac_word=$2
6516 echo "$as_me:$LINENO: checking for $ac_word" >&5
6517 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6518 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
6519   echo $ECHO_N "(cached) $ECHO_C" >&6
6520 else
6521   case $INTLTOOL_PERL in
6522   [\\/]* | ?:[\\/]*)
6523   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
6524   ;;
6525   *)
6526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527 for as_dir in $PATH
6528 do
6529   IFS=$as_save_IFS
6530   test -z "$as_dir" && as_dir=.
6531   for ac_exec_ext in '' $ac_executable_extensions; do
6532   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6533     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
6534     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6535     break 2
6536   fi
6537 done
6538 done
6539
6540   ;;
6541 esac
6542 fi
6543 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
6544
6545 if test -n "$INTLTOOL_PERL"; then
6546   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
6547 echo "${ECHO_T}$INTLTOOL_PERL" >&6
6548 else
6549   echo "$as_me:$LINENO: result: no" >&5
6550 echo "${ECHO_T}no" >&6
6551 fi
6552
6553 if test -z "$INTLTOOL_PERL"; then
6554    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
6555 echo "$as_me: error: perl not found; required for intltool" >&2;}
6556    { (exit 1); exit 1; }; }
6557 fi
6558 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
6559    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
6560 echo "$as_me: error: perl 5.x required for intltool" >&2;}
6561    { (exit 1); exit 1; }; }
6562 fi
6563
6564 # Remove file type tags (using []) from po/POTFILES.
6565
6566
6567
6568
6569
6570
6571
6572 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
6573
6574           ac_config_commands="$ac_config_commands default-1"
6575
6576
6577
6578 GETTEXT_PACKAGE=xscreensaver
6579 cat >>confdefs.h <<_ACEOF
6580 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
6581 _ACEOF
6582
6583 cat >>confdefs.h <<_ACEOF
6584 #define PACKAGE "$GETTEXT_PACKAGE"
6585 _ACEOF
6586
6587
6588
6589 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"
6590 if test -n "$ac_tool_prefix"; then
6591   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6592 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6593 echo "$as_me:$LINENO: checking for $ac_word" >&5
6594 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6595 if test "${ac_cv_prog_RANLIB+set}" = set; then
6596   echo $ECHO_N "(cached) $ECHO_C" >&6
6597 else
6598   if test -n "$RANLIB"; then
6599   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6600 else
6601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6602 for as_dir in $PATH
6603 do
6604   IFS=$as_save_IFS
6605   test -z "$as_dir" && as_dir=.
6606   for ac_exec_ext in '' $ac_executable_extensions; do
6607   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6608     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6609     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6610     break 2
6611   fi
6612 done
6613 done
6614
6615 fi
6616 fi
6617 RANLIB=$ac_cv_prog_RANLIB
6618 if test -n "$RANLIB"; then
6619   echo "$as_me:$LINENO: result: $RANLIB" >&5
6620 echo "${ECHO_T}$RANLIB" >&6
6621 else
6622   echo "$as_me:$LINENO: result: no" >&5
6623 echo "${ECHO_T}no" >&6
6624 fi
6625
6626 fi
6627 if test -z "$ac_cv_prog_RANLIB"; then
6628   ac_ct_RANLIB=$RANLIB
6629   # Extract the first word of "ranlib", so it can be a program name with args.
6630 set dummy ranlib; ac_word=$2
6631 echo "$as_me:$LINENO: checking for $ac_word" >&5
6632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6633 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6634   echo $ECHO_N "(cached) $ECHO_C" >&6
6635 else
6636   if test -n "$ac_ct_RANLIB"; then
6637   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6638 else
6639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6640 for as_dir in $PATH
6641 do
6642   IFS=$as_save_IFS
6643   test -z "$as_dir" && as_dir=.
6644   for ac_exec_ext in '' $ac_executable_extensions; do
6645   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6646     ac_cv_prog_ac_ct_RANLIB="ranlib"
6647     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6648     break 2
6649   fi
6650 done
6651 done
6652
6653   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6654 fi
6655 fi
6656 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6657 if test -n "$ac_ct_RANLIB"; then
6658   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6659 echo "${ECHO_T}$ac_ct_RANLIB" >&6
6660 else
6661   echo "$as_me:$LINENO: result: no" >&5
6662 echo "${ECHO_T}no" >&6
6663 fi
6664
6665   RANLIB=$ac_ct_RANLIB
6666 else
6667   RANLIB="$ac_cv_prog_RANLIB"
6668 fi
6669
6670 echo "$as_me:$LINENO: checking for off_t" >&5
6671 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
6672 if test "${ac_cv_type_off_t+set}" = set; then
6673   echo $ECHO_N "(cached) $ECHO_C" >&6
6674 else
6675   cat >conftest.$ac_ext <<_ACEOF
6676 #line $LINENO "configure"
6677 /* confdefs.h.  */
6678 _ACEOF
6679 cat confdefs.h >>conftest.$ac_ext
6680 cat >>conftest.$ac_ext <<_ACEOF
6681 /* end confdefs.h.  */
6682 $ac_includes_default
6683 int
6684 main ()
6685 {
6686 if ((off_t *) 0)
6687   return 0;
6688 if (sizeof (off_t))
6689   return 0;
6690   ;
6691   return 0;
6692 }
6693 _ACEOF
6694 rm -f conftest.$ac_objext
6695 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6696   (eval $ac_compile) 2>&5
6697   ac_status=$?
6698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6699   (exit $ac_status); } &&
6700          { ac_try='test -s conftest.$ac_objext'
6701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6702   (eval $ac_try) 2>&5
6703   ac_status=$?
6704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6705   (exit $ac_status); }; }; then
6706   ac_cv_type_off_t=yes
6707 else
6708   echo "$as_me: failed program was:" >&5
6709 sed 's/^/| /' conftest.$ac_ext >&5
6710
6711 ac_cv_type_off_t=no
6712 fi
6713 rm -f conftest.$ac_objext conftest.$ac_ext
6714 fi
6715 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6716 echo "${ECHO_T}$ac_cv_type_off_t" >&6
6717 if test $ac_cv_type_off_t = yes; then
6718   :
6719 else
6720
6721 cat >>confdefs.h <<_ACEOF
6722 #define off_t long
6723 _ACEOF
6724
6725 fi
6726
6727 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6728 # for constant arguments.  Useless!
6729 echo "$as_me:$LINENO: checking for working alloca.h" >&5
6730 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
6731 if test "${ac_cv_working_alloca_h+set}" = set; then
6732   echo $ECHO_N "(cached) $ECHO_C" >&6
6733 else
6734   cat >conftest.$ac_ext <<_ACEOF
6735 #line $LINENO "configure"
6736 /* confdefs.h.  */
6737 _ACEOF
6738 cat confdefs.h >>conftest.$ac_ext
6739 cat >>conftest.$ac_ext <<_ACEOF
6740 /* end confdefs.h.  */
6741 #include <alloca.h>
6742 int
6743 main ()
6744 {
6745 char *p = (char *) alloca (2 * sizeof (int));
6746   ;
6747   return 0;
6748 }
6749 _ACEOF
6750 rm -f conftest.$ac_objext conftest$ac_exeext
6751 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6752   (eval $ac_link) 2>&5
6753   ac_status=$?
6754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6755   (exit $ac_status); } &&
6756          { ac_try='test -s conftest$ac_exeext'
6757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6758   (eval $ac_try) 2>&5
6759   ac_status=$?
6760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6761   (exit $ac_status); }; }; then
6762   ac_cv_working_alloca_h=yes
6763 else
6764   echo "$as_me: failed program was:" >&5
6765 sed 's/^/| /' conftest.$ac_ext >&5
6766
6767 ac_cv_working_alloca_h=no
6768 fi
6769 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6770 fi
6771 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
6772 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
6773 if test $ac_cv_working_alloca_h = yes; then
6774
6775 cat >>confdefs.h <<\_ACEOF
6776 #define HAVE_ALLOCA_H 1
6777 _ACEOF
6778
6779 fi
6780
6781 echo "$as_me:$LINENO: checking for alloca" >&5
6782 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
6783 if test "${ac_cv_func_alloca_works+set}" = set; then
6784   echo $ECHO_N "(cached) $ECHO_C" >&6
6785 else
6786   cat >conftest.$ac_ext <<_ACEOF
6787 #line $LINENO "configure"
6788 /* confdefs.h.  */
6789 _ACEOF
6790 cat confdefs.h >>conftest.$ac_ext
6791 cat >>conftest.$ac_ext <<_ACEOF
6792 /* end confdefs.h.  */
6793 #ifdef __GNUC__
6794 # define alloca __builtin_alloca
6795 #else
6796 # ifdef _MSC_VER
6797 #  include <malloc.h>
6798 #  define alloca _alloca
6799 # else
6800 #  if HAVE_ALLOCA_H
6801 #   include <alloca.h>
6802 #  else
6803 #   ifdef _AIX
6804  #pragma alloca
6805 #   else
6806 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6807 char *alloca ();
6808 #    endif
6809 #   endif
6810 #  endif
6811 # endif
6812 #endif
6813
6814 int
6815 main ()
6816 {
6817 char *p = (char *) alloca (1);
6818   ;
6819   return 0;
6820 }
6821 _ACEOF
6822 rm -f conftest.$ac_objext conftest$ac_exeext
6823 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6824   (eval $ac_link) 2>&5
6825   ac_status=$?
6826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6827   (exit $ac_status); } &&
6828          { ac_try='test -s conftest$ac_exeext'
6829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6830   (eval $ac_try) 2>&5
6831   ac_status=$?
6832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6833   (exit $ac_status); }; }; then
6834   ac_cv_func_alloca_works=yes
6835 else
6836   echo "$as_me: failed program was:" >&5
6837 sed 's/^/| /' conftest.$ac_ext >&5
6838
6839 ac_cv_func_alloca_works=no
6840 fi
6841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6842 fi
6843 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
6844 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
6845
6846 if test $ac_cv_func_alloca_works = yes; then
6847
6848 cat >>confdefs.h <<\_ACEOF
6849 #define HAVE_ALLOCA 1
6850 _ACEOF
6851
6852 else
6853   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6854 # that cause trouble.  Some versions do not even contain alloca or
6855 # contain a buggy version.  If you still want to use their alloca,
6856 # use ar to extract alloca.o from them instead of compiling alloca.c.
6857
6858 ALLOCA=alloca.$ac_objext
6859
6860 cat >>confdefs.h <<\_ACEOF
6861 #define C_ALLOCA 1
6862 _ACEOF
6863
6864
6865 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
6866 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
6867 if test "${ac_cv_os_cray+set}" = set; then
6868   echo $ECHO_N "(cached) $ECHO_C" >&6
6869 else
6870   cat >conftest.$ac_ext <<_ACEOF
6871 #line $LINENO "configure"
6872 /* confdefs.h.  */
6873 _ACEOF
6874 cat confdefs.h >>conftest.$ac_ext
6875 cat >>conftest.$ac_ext <<_ACEOF
6876 /* end confdefs.h.  */
6877 #if defined(CRAY) && ! defined(CRAY2)
6878 webecray
6879 #else
6880 wenotbecray
6881 #endif
6882
6883 _ACEOF
6884 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6885   $EGREP "webecray" >/dev/null 2>&1; then
6886   ac_cv_os_cray=yes
6887 else
6888   ac_cv_os_cray=no
6889 fi
6890 rm -f conftest*
6891
6892 fi
6893 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
6894 echo "${ECHO_T}$ac_cv_os_cray" >&6
6895 if test $ac_cv_os_cray = yes; then
6896   for ac_func in _getb67 GETB67 getb67; do
6897     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6898 echo "$as_me:$LINENO: checking for $ac_func" >&5
6899 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6900 if eval "test \"\${$as_ac_var+set}\" = set"; then
6901   echo $ECHO_N "(cached) $ECHO_C" >&6
6902 else
6903   cat >conftest.$ac_ext <<_ACEOF
6904 #line $LINENO "configure"
6905 /* confdefs.h.  */
6906 _ACEOF
6907 cat confdefs.h >>conftest.$ac_ext
6908 cat >>conftest.$ac_ext <<_ACEOF
6909 /* end confdefs.h.  */
6910 /* System header to define __stub macros and hopefully few prototypes,
6911     which can conflict with char $ac_func (); below.
6912     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6913     <limits.h> exists even on freestanding compilers.  */
6914 #ifdef __STDC__
6915 # include <limits.h>
6916 #else
6917 # include <assert.h>
6918 #endif
6919 /* Override any gcc2 internal prototype to avoid an error.  */
6920 #ifdef __cplusplus
6921 extern "C"
6922 {
6923 #endif
6924 /* We use char because int might match the return type of a gcc2
6925    builtin and then its argument prototype would still apply.  */
6926 char $ac_func ();
6927 /* The GNU C library defines this for functions which it implements
6928     to always fail with ENOSYS.  Some functions are actually named
6929     something starting with __ and the normal name is an alias.  */
6930 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6931 choke me
6932 #else
6933 char (*f) () = $ac_func;
6934 #endif
6935 #ifdef __cplusplus
6936 }
6937 #endif
6938
6939 int
6940 main ()
6941 {
6942 return f != $ac_func;
6943   ;
6944   return 0;
6945 }
6946 _ACEOF
6947 rm -f conftest.$ac_objext conftest$ac_exeext
6948 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6949   (eval $ac_link) 2>&5
6950   ac_status=$?
6951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6952   (exit $ac_status); } &&
6953          { ac_try='test -s conftest$ac_exeext'
6954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6955   (eval $ac_try) 2>&5
6956   ac_status=$?
6957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6958   (exit $ac_status); }; }; then
6959   eval "$as_ac_var=yes"
6960 else
6961   echo "$as_me: failed program was:" >&5
6962 sed 's/^/| /' conftest.$ac_ext >&5
6963
6964 eval "$as_ac_var=no"
6965 fi
6966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6967 fi
6968 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6969 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6970 if test `eval echo '${'$as_ac_var'}'` = yes; then
6971
6972 cat >>confdefs.h <<_ACEOF
6973 #define CRAY_STACKSEG_END $ac_func
6974 _ACEOF
6975
6976     break
6977 fi
6978
6979   done
6980 fi
6981
6982 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
6983 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
6984 if test "${ac_cv_c_stack_direction+set}" = set; then
6985   echo $ECHO_N "(cached) $ECHO_C" >&6
6986 else
6987   if test "$cross_compiling" = yes; then
6988   ac_cv_c_stack_direction=0
6989 else
6990   cat >conftest.$ac_ext <<_ACEOF
6991 #line $LINENO "configure"
6992 /* confdefs.h.  */
6993 _ACEOF
6994 cat confdefs.h >>conftest.$ac_ext
6995 cat >>conftest.$ac_ext <<_ACEOF
6996 /* end confdefs.h.  */
6997 int
6998 find_stack_direction ()
6999 {
7000   static char *addr = 0;
7001   auto char dummy;
7002   if (addr == 0)
7003     {
7004       addr = &dummy;
7005       return find_stack_direction ();
7006     }
7007   else
7008     return (&dummy > addr) ? 1 : -1;
7009 }
7010
7011 int
7012 main ()
7013 {
7014   exit (find_stack_direction () < 0);
7015 }
7016 _ACEOF
7017 rm -f conftest$ac_exeext
7018 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7019   (eval $ac_link) 2>&5
7020   ac_status=$?
7021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7022   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7024   (eval $ac_try) 2>&5
7025   ac_status=$?
7026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7027   (exit $ac_status); }; }; then
7028   ac_cv_c_stack_direction=1
7029 else
7030   echo "$as_me: program exited with status $ac_status" >&5
7031 echo "$as_me: failed program was:" >&5
7032 sed 's/^/| /' conftest.$ac_ext >&5
7033
7034 ( exit $ac_status )
7035 ac_cv_c_stack_direction=-1
7036 fi
7037 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7038 fi
7039 fi
7040 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
7041 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
7042
7043 cat >>confdefs.h <<_ACEOF
7044 #define STACK_DIRECTION $ac_cv_c_stack_direction
7045 _ACEOF
7046
7047
7048 fi
7049
7050
7051
7052 for ac_header in stdlib.h unistd.h
7053 do
7054 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7055 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7056   echo "$as_me:$LINENO: checking for $ac_header" >&5
7057 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7058 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7059   echo $ECHO_N "(cached) $ECHO_C" >&6
7060 fi
7061 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7062 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7063 else
7064   # Is the header compilable?
7065 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7066 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7067 cat >conftest.$ac_ext <<_ACEOF
7068 #line $LINENO "configure"
7069 /* confdefs.h.  */
7070 _ACEOF
7071 cat confdefs.h >>conftest.$ac_ext
7072 cat >>conftest.$ac_ext <<_ACEOF
7073 /* end confdefs.h.  */
7074 $ac_includes_default
7075 #include <$ac_header>
7076 _ACEOF
7077 rm -f conftest.$ac_objext
7078 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7079   (eval $ac_compile) 2>&5
7080   ac_status=$?
7081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7082   (exit $ac_status); } &&
7083          { ac_try='test -s conftest.$ac_objext'
7084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7085   (eval $ac_try) 2>&5
7086   ac_status=$?
7087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7088   (exit $ac_status); }; }; then
7089   ac_header_compiler=yes
7090 else
7091   echo "$as_me: failed program was:" >&5
7092 sed 's/^/| /' conftest.$ac_ext >&5
7093
7094 ac_header_compiler=no
7095 fi
7096 rm -f conftest.$ac_objext conftest.$ac_ext
7097 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7098 echo "${ECHO_T}$ac_header_compiler" >&6
7099
7100 # Is the header present?
7101 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7102 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7103 cat >conftest.$ac_ext <<_ACEOF
7104 #line $LINENO "configure"
7105 /* confdefs.h.  */
7106 _ACEOF
7107 cat confdefs.h >>conftest.$ac_ext
7108 cat >>conftest.$ac_ext <<_ACEOF
7109 /* end confdefs.h.  */
7110 #include <$ac_header>
7111 _ACEOF
7112 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7113   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7114   ac_status=$?
7115   grep -v '^ *+' conftest.er1 >conftest.err
7116   rm -f conftest.er1
7117   cat conftest.err >&5
7118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7119   (exit $ac_status); } >/dev/null; then
7120   if test -s conftest.err; then
7121     ac_cpp_err=$ac_c_preproc_warn_flag
7122   else
7123     ac_cpp_err=
7124   fi
7125 else
7126   ac_cpp_err=yes
7127 fi
7128 if test -z "$ac_cpp_err"; then
7129   ac_header_preproc=yes
7130 else
7131   echo "$as_me: failed program was:" >&5
7132 sed 's/^/| /' conftest.$ac_ext >&5
7133
7134   ac_header_preproc=no
7135 fi
7136 rm -f conftest.err conftest.$ac_ext
7137 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7138 echo "${ECHO_T}$ac_header_preproc" >&6
7139
7140 # So?  What about this header?
7141 case $ac_header_compiler:$ac_header_preproc in
7142   yes:no )
7143     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7144 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7145     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7146 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7147     (
7148       cat <<\_ASBOX
7149 ## ------------------------------------ ##
7150 ## Report this to bug-autoconf@gnu.org. ##
7151 ## ------------------------------------ ##
7152 _ASBOX
7153     ) |
7154       sed "s/^/$as_me: WARNING:     /" >&2
7155     ;;
7156   no:yes )
7157     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7158 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7159     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7160 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7161     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7162 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7163     (
7164       cat <<\_ASBOX
7165 ## ------------------------------------ ##
7166 ## Report this to bug-autoconf@gnu.org. ##
7167 ## ------------------------------------ ##
7168 _ASBOX
7169     ) |
7170       sed "s/^/$as_me: WARNING:     /" >&2
7171     ;;
7172 esac
7173 echo "$as_me:$LINENO: checking for $ac_header" >&5
7174 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7175 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7176   echo $ECHO_N "(cached) $ECHO_C" >&6
7177 else
7178   eval "$as_ac_Header=$ac_header_preproc"
7179 fi
7180 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7181 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7182
7183 fi
7184 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7185   cat >>confdefs.h <<_ACEOF
7186 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7187 _ACEOF
7188
7189 fi
7190
7191 done
7192
7193
7194 for ac_func in getpagesize
7195 do
7196 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7197 echo "$as_me:$LINENO: checking for $ac_func" >&5
7198 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7199 if eval "test \"\${$as_ac_var+set}\" = set"; then
7200   echo $ECHO_N "(cached) $ECHO_C" >&6
7201 else
7202   cat >conftest.$ac_ext <<_ACEOF
7203 #line $LINENO "configure"
7204 /* confdefs.h.  */
7205 _ACEOF
7206 cat confdefs.h >>conftest.$ac_ext
7207 cat >>conftest.$ac_ext <<_ACEOF
7208 /* end confdefs.h.  */
7209 /* System header to define __stub macros and hopefully few prototypes,
7210     which can conflict with char $ac_func (); below.
7211     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7212     <limits.h> exists even on freestanding compilers.  */
7213 #ifdef __STDC__
7214 # include <limits.h>
7215 #else
7216 # include <assert.h>
7217 #endif
7218 /* Override any gcc2 internal prototype to avoid an error.  */
7219 #ifdef __cplusplus
7220 extern "C"
7221 {
7222 #endif
7223 /* We use char because int might match the return type of a gcc2
7224    builtin and then its argument prototype would still apply.  */
7225 char $ac_func ();
7226 /* The GNU C library defines this for functions which it implements
7227     to always fail with ENOSYS.  Some functions are actually named
7228     something starting with __ and the normal name is an alias.  */
7229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7230 choke me
7231 #else
7232 char (*f) () = $ac_func;
7233 #endif
7234 #ifdef __cplusplus
7235 }
7236 #endif
7237
7238 int
7239 main ()
7240 {
7241 return f != $ac_func;
7242   ;
7243   return 0;
7244 }
7245 _ACEOF
7246 rm -f conftest.$ac_objext conftest$ac_exeext
7247 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7248   (eval $ac_link) 2>&5
7249   ac_status=$?
7250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7251   (exit $ac_status); } &&
7252          { ac_try='test -s conftest$ac_exeext'
7253   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7254   (eval $ac_try) 2>&5
7255   ac_status=$?
7256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7257   (exit $ac_status); }; }; then
7258   eval "$as_ac_var=yes"
7259 else
7260   echo "$as_me: failed program was:" >&5
7261 sed 's/^/| /' conftest.$ac_ext >&5
7262
7263 eval "$as_ac_var=no"
7264 fi
7265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7266 fi
7267 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7268 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7269 if test `eval echo '${'$as_ac_var'}'` = yes; then
7270   cat >>confdefs.h <<_ACEOF
7271 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7272 _ACEOF
7273
7274 fi
7275 done
7276
7277 echo "$as_me:$LINENO: checking for working mmap" >&5
7278 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7279 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7280   echo $ECHO_N "(cached) $ECHO_C" >&6
7281 else
7282   if test "$cross_compiling" = yes; then
7283   ac_cv_func_mmap_fixed_mapped=no
7284 else
7285   cat >conftest.$ac_ext <<_ACEOF
7286 #line $LINENO "configure"
7287 /* confdefs.h.  */
7288 _ACEOF
7289 cat confdefs.h >>conftest.$ac_ext
7290 cat >>conftest.$ac_ext <<_ACEOF
7291 /* end confdefs.h.  */
7292 $ac_includes_default
7293 /* malloc might have been renamed as rpl_malloc. */
7294 #undef malloc
7295
7296 /* Thanks to Mike Haertel and Jim Avera for this test.
7297    Here is a matrix of mmap possibilities:
7298         mmap private not fixed
7299         mmap private fixed at somewhere currently unmapped
7300         mmap private fixed at somewhere already mapped
7301         mmap shared not fixed
7302         mmap shared fixed at somewhere currently unmapped
7303         mmap shared fixed at somewhere already mapped
7304    For private mappings, we should verify that changes cannot be read()
7305    back from the file, nor mmap's back from the file at a different
7306    address.  (There have been systems where private was not correctly
7307    implemented like the infamous i386 svr4.0, and systems where the
7308    VM page cache was not coherent with the file system buffer cache
7309    like early versions of FreeBSD and possibly contemporary NetBSD.)
7310    For shared mappings, we should conversely verify that changes get
7311    propagated back to all the places they're supposed to be.
7312
7313    Grep wants private fixed already mapped.
7314    The main things grep needs to know about mmap are:
7315    * does it exist and is it safe to write into the mmap'd area
7316    * how to use it (BSD variants)  */
7317
7318 #include <fcntl.h>
7319 #include <sys/mman.h>
7320
7321 #if !STDC_HEADERS && !HAVE_STDLIB_H
7322 char *malloc ();
7323 #endif
7324
7325 /* This mess was copied from the GNU getpagesize.h.  */
7326 #if !HAVE_GETPAGESIZE
7327 /* Assume that all systems that can run configure have sys/param.h.  */
7328 # if !HAVE_SYS_PARAM_H
7329 #  define HAVE_SYS_PARAM_H 1
7330 # endif
7331
7332 # ifdef _SC_PAGESIZE
7333 #  define getpagesize() sysconf(_SC_PAGESIZE)
7334 # else /* no _SC_PAGESIZE */
7335 #  if HAVE_SYS_PARAM_H
7336 #   include <sys/param.h>
7337 #   ifdef EXEC_PAGESIZE
7338 #    define getpagesize() EXEC_PAGESIZE
7339 #   else /* no EXEC_PAGESIZE */
7340 #    ifdef NBPG
7341 #     define getpagesize() NBPG * CLSIZE
7342 #     ifndef CLSIZE
7343 #      define CLSIZE 1
7344 #     endif /* no CLSIZE */
7345 #    else /* no NBPG */
7346 #     ifdef NBPC
7347 #      define getpagesize() NBPC
7348 #     else /* no NBPC */
7349 #      ifdef PAGESIZE
7350 #       define getpagesize() PAGESIZE
7351 #      endif /* PAGESIZE */
7352 #     endif /* no NBPC */
7353 #    endif /* no NBPG */
7354 #   endif /* no EXEC_PAGESIZE */
7355 #  else /* no HAVE_SYS_PARAM_H */
7356 #   define getpagesize() 8192   /* punt totally */
7357 #  endif /* no HAVE_SYS_PARAM_H */
7358 # endif /* no _SC_PAGESIZE */
7359
7360 #endif /* no HAVE_GETPAGESIZE */
7361
7362 int
7363 main ()
7364 {
7365   char *data, *data2, *data3;
7366   int i, pagesize;
7367   int fd;
7368
7369   pagesize = getpagesize ();
7370
7371   /* First, make a file with some known garbage in it. */
7372   data = (char *) malloc (pagesize);
7373   if (!data)
7374     exit (1);
7375   for (i = 0; i < pagesize; ++i)
7376     *(data + i) = rand ();
7377   umask (0);
7378   fd = creat ("conftest.mmap", 0600);
7379   if (fd < 0)
7380     exit (1);
7381   if (write (fd, data, pagesize) != pagesize)
7382     exit (1);
7383   close (fd);
7384
7385   /* Next, try to mmap the file at a fixed address which already has
7386      something else allocated at it.  If we can, also make sure that
7387      we see the same garbage.  */
7388   fd = open ("conftest.mmap", O_RDWR);
7389   if (fd < 0)
7390     exit (1);
7391   data2 = (char *) malloc (2 * pagesize);
7392   if (!data2)
7393     exit (1);
7394   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7395   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7396                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
7397     exit (1);
7398   for (i = 0; i < pagesize; ++i)
7399     if (*(data + i) != *(data2 + i))
7400       exit (1);
7401
7402   /* Finally, make sure that changes to the mapped area do not
7403      percolate back to the file as seen by read().  (This is a bug on
7404      some variants of i386 svr4.0.)  */
7405   for (i = 0; i < pagesize; ++i)
7406     *(data2 + i) = *(data2 + i) + 1;
7407   data3 = (char *) malloc (pagesize);
7408   if (!data3)
7409     exit (1);
7410   if (read (fd, data3, pagesize) != pagesize)
7411     exit (1);
7412   for (i = 0; i < pagesize; ++i)
7413     if (*(data + i) != *(data3 + i))
7414       exit (1);
7415   close (fd);
7416   exit (0);
7417 }
7418 _ACEOF
7419 rm -f conftest$ac_exeext
7420 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7421   (eval $ac_link) 2>&5
7422   ac_status=$?
7423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7424   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7426   (eval $ac_try) 2>&5
7427   ac_status=$?
7428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7429   (exit $ac_status); }; }; then
7430   ac_cv_func_mmap_fixed_mapped=yes
7431 else
7432   echo "$as_me: program exited with status $ac_status" >&5
7433 echo "$as_me: failed program was:" >&5
7434 sed 's/^/| /' conftest.$ac_ext >&5
7435
7436 ( exit $ac_status )
7437 ac_cv_func_mmap_fixed_mapped=no
7438 fi
7439 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7440 fi
7441 fi
7442 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
7443 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7444 if test $ac_cv_func_mmap_fixed_mapped = yes; then
7445
7446 cat >>confdefs.h <<\_ACEOF
7447 #define HAVE_MMAP 1
7448 _ACEOF
7449
7450 fi
7451 rm -f conftest.mmap
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
7463 unistd.h sys/param.h
7464 do
7465 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7466 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7467   echo "$as_me:$LINENO: checking for $ac_header" >&5
7468 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7469 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7470   echo $ECHO_N "(cached) $ECHO_C" >&6
7471 fi
7472 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7473 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7474 else
7475   # Is the header compilable?
7476 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7477 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7478 cat >conftest.$ac_ext <<_ACEOF
7479 #line $LINENO "configure"
7480 /* confdefs.h.  */
7481 _ACEOF
7482 cat confdefs.h >>conftest.$ac_ext
7483 cat >>conftest.$ac_ext <<_ACEOF
7484 /* end confdefs.h.  */
7485 $ac_includes_default
7486 #include <$ac_header>
7487 _ACEOF
7488 rm -f conftest.$ac_objext
7489 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7490   (eval $ac_compile) 2>&5
7491   ac_status=$?
7492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7493   (exit $ac_status); } &&
7494          { ac_try='test -s conftest.$ac_objext'
7495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7496   (eval $ac_try) 2>&5
7497   ac_status=$?
7498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7499   (exit $ac_status); }; }; then
7500   ac_header_compiler=yes
7501 else
7502   echo "$as_me: failed program was:" >&5
7503 sed 's/^/| /' conftest.$ac_ext >&5
7504
7505 ac_header_compiler=no
7506 fi
7507 rm -f conftest.$ac_objext conftest.$ac_ext
7508 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7509 echo "${ECHO_T}$ac_header_compiler" >&6
7510
7511 # Is the header present?
7512 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7513 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7514 cat >conftest.$ac_ext <<_ACEOF
7515 #line $LINENO "configure"
7516 /* confdefs.h.  */
7517 _ACEOF
7518 cat confdefs.h >>conftest.$ac_ext
7519 cat >>conftest.$ac_ext <<_ACEOF
7520 /* end confdefs.h.  */
7521 #include <$ac_header>
7522 _ACEOF
7523 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7524   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7525   ac_status=$?
7526   grep -v '^ *+' conftest.er1 >conftest.err
7527   rm -f conftest.er1
7528   cat conftest.err >&5
7529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7530   (exit $ac_status); } >/dev/null; then
7531   if test -s conftest.err; then
7532     ac_cpp_err=$ac_c_preproc_warn_flag
7533   else
7534     ac_cpp_err=
7535   fi
7536 else
7537   ac_cpp_err=yes
7538 fi
7539 if test -z "$ac_cpp_err"; then
7540   ac_header_preproc=yes
7541 else
7542   echo "$as_me: failed program was:" >&5
7543 sed 's/^/| /' conftest.$ac_ext >&5
7544
7545   ac_header_preproc=no
7546 fi
7547 rm -f conftest.err conftest.$ac_ext
7548 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7549 echo "${ECHO_T}$ac_header_preproc" >&6
7550
7551 # So?  What about this header?
7552 case $ac_header_compiler:$ac_header_preproc in
7553   yes:no )
7554     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7555 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7556     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7557 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7558     (
7559       cat <<\_ASBOX
7560 ## ------------------------------------ ##
7561 ## Report this to bug-autoconf@gnu.org. ##
7562 ## ------------------------------------ ##
7563 _ASBOX
7564     ) |
7565       sed "s/^/$as_me: WARNING:     /" >&2
7566     ;;
7567   no:yes )
7568     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7569 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7570     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7571 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7572     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7573 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7574     (
7575       cat <<\_ASBOX
7576 ## ------------------------------------ ##
7577 ## Report this to bug-autoconf@gnu.org. ##
7578 ## ------------------------------------ ##
7579 _ASBOX
7580     ) |
7581       sed "s/^/$as_me: WARNING:     /" >&2
7582     ;;
7583 esac
7584 echo "$as_me:$LINENO: checking for $ac_header" >&5
7585 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7586 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7587   echo $ECHO_N "(cached) $ECHO_C" >&6
7588 else
7589   eval "$as_ac_Header=$ac_header_preproc"
7590 fi
7591 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7592 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7593
7594 fi
7595 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7596   cat >>confdefs.h <<_ACEOF
7597 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7598 _ACEOF
7599
7600 fi
7601
7602 done
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
7616 strdup __argz_count __argz_stringify __argz_next
7617 do
7618 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7619 echo "$as_me:$LINENO: checking for $ac_func" >&5
7620 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7621 if eval "test \"\${$as_ac_var+set}\" = set"; then
7622   echo $ECHO_N "(cached) $ECHO_C" >&6
7623 else
7624   cat >conftest.$ac_ext <<_ACEOF
7625 #line $LINENO "configure"
7626 /* confdefs.h.  */
7627 _ACEOF
7628 cat confdefs.h >>conftest.$ac_ext
7629 cat >>conftest.$ac_ext <<_ACEOF
7630 /* end confdefs.h.  */
7631 /* System header to define __stub macros and hopefully few prototypes,
7632     which can conflict with char $ac_func (); below.
7633     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7634     <limits.h> exists even on freestanding compilers.  */
7635 #ifdef __STDC__
7636 # include <limits.h>
7637 #else
7638 # include <assert.h>
7639 #endif
7640 /* Override any gcc2 internal prototype to avoid an error.  */
7641 #ifdef __cplusplus
7642 extern "C"
7643 {
7644 #endif
7645 /* We use char because int might match the return type of a gcc2
7646    builtin and then its argument prototype would still apply.  */
7647 char $ac_func ();
7648 /* The GNU C library defines this for functions which it implements
7649     to always fail with ENOSYS.  Some functions are actually named
7650     something starting with __ and the normal name is an alias.  */
7651 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7652 choke me
7653 #else
7654 char (*f) () = $ac_func;
7655 #endif
7656 #ifdef __cplusplus
7657 }
7658 #endif
7659
7660 int
7661 main ()
7662 {
7663 return f != $ac_func;
7664   ;
7665   return 0;
7666 }
7667 _ACEOF
7668 rm -f conftest.$ac_objext conftest$ac_exeext
7669 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7670   (eval $ac_link) 2>&5
7671   ac_status=$?
7672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7673   (exit $ac_status); } &&
7674          { ac_try='test -s conftest$ac_exeext'
7675   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7676   (eval $ac_try) 2>&5
7677   ac_status=$?
7678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7679   (exit $ac_status); }; }; then
7680   eval "$as_ac_var=yes"
7681 else
7682   echo "$as_me: failed program was:" >&5
7683 sed 's/^/| /' conftest.$ac_ext >&5
7684
7685 eval "$as_ac_var=no"
7686 fi
7687 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7688 fi
7689 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7690 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7691 if test `eval echo '${'$as_ac_var'}'` = yes; then
7692   cat >>confdefs.h <<_ACEOF
7693 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7694 _ACEOF
7695
7696 fi
7697 done
7698
7699
7700    if test $ac_cv_header_locale_h = yes; then
7701     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
7702 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7703 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7704   echo $ECHO_N "(cached) $ECHO_C" >&6
7705 else
7706   cat >conftest.$ac_ext <<_ACEOF
7707 #line $LINENO "configure"
7708 /* confdefs.h.  */
7709 _ACEOF
7710 cat confdefs.h >>conftest.$ac_ext
7711 cat >>conftest.$ac_ext <<_ACEOF
7712 /* end confdefs.h.  */
7713 #include <locale.h>
7714 int
7715 main ()
7716 {
7717 return LC_MESSAGES
7718   ;
7719   return 0;
7720 }
7721 _ACEOF
7722 rm -f conftest.$ac_objext conftest$ac_exeext
7723 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7724   (eval $ac_link) 2>&5
7725   ac_status=$?
7726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7727   (exit $ac_status); } &&
7728          { ac_try='test -s conftest$ac_exeext'
7729   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7730   (eval $ac_try) 2>&5
7731   ac_status=$?
7732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7733   (exit $ac_status); }; }; then
7734   am_cv_val_LC_MESSAGES=yes
7735 else
7736   echo "$as_me: failed program was:" >&5
7737 sed 's/^/| /' conftest.$ac_ext >&5
7738
7739 am_cv_val_LC_MESSAGES=no
7740 fi
7741 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7742 fi
7743 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
7744 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
7745     if test $am_cv_val_LC_MESSAGES = yes; then
7746
7747 cat >>confdefs.h <<\_ACEOF
7748 #define HAVE_LC_MESSAGES 1
7749 _ACEOF
7750
7751     fi
7752   fi
7753      USE_NLS=yes
7754
7755
7756         nls_cv_force_use_gnu_gettext="no"
7757
7758     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7759     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7760                               nls_cv_header_intl=
7761       nls_cv_header_libgt=
7762       CATOBJEXT=NONE
7763
7764       if test "${ac_cv_header_libintl_h+set}" = set; then
7765   echo "$as_me:$LINENO: checking for libintl.h" >&5
7766 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7767 if test "${ac_cv_header_libintl_h+set}" = set; then
7768   echo $ECHO_N "(cached) $ECHO_C" >&6
7769 fi
7770 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7771 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7772 else
7773   # Is the header compilable?
7774 echo "$as_me:$LINENO: checking libintl.h usability" >&5
7775 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
7776 cat >conftest.$ac_ext <<_ACEOF
7777 #line $LINENO "configure"
7778 /* confdefs.h.  */
7779 _ACEOF
7780 cat confdefs.h >>conftest.$ac_ext
7781 cat >>conftest.$ac_ext <<_ACEOF
7782 /* end confdefs.h.  */
7783 $ac_includes_default
7784 #include <libintl.h>
7785 _ACEOF
7786 rm -f conftest.$ac_objext
7787 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7788   (eval $ac_compile) 2>&5
7789   ac_status=$?
7790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7791   (exit $ac_status); } &&
7792          { ac_try='test -s conftest.$ac_objext'
7793   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7794   (eval $ac_try) 2>&5
7795   ac_status=$?
7796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7797   (exit $ac_status); }; }; then
7798   ac_header_compiler=yes
7799 else
7800   echo "$as_me: failed program was:" >&5
7801 sed 's/^/| /' conftest.$ac_ext >&5
7802
7803 ac_header_compiler=no
7804 fi
7805 rm -f conftest.$ac_objext conftest.$ac_ext
7806 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7807 echo "${ECHO_T}$ac_header_compiler" >&6
7808
7809 # Is the header present?
7810 echo "$as_me:$LINENO: checking libintl.h presence" >&5
7811 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
7812 cat >conftest.$ac_ext <<_ACEOF
7813 #line $LINENO "configure"
7814 /* confdefs.h.  */
7815 _ACEOF
7816 cat confdefs.h >>conftest.$ac_ext
7817 cat >>conftest.$ac_ext <<_ACEOF
7818 /* end confdefs.h.  */
7819 #include <libintl.h>
7820 _ACEOF
7821 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7822   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7823   ac_status=$?
7824   grep -v '^ *+' conftest.er1 >conftest.err
7825   rm -f conftest.er1
7826   cat conftest.err >&5
7827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7828   (exit $ac_status); } >/dev/null; then
7829   if test -s conftest.err; then
7830     ac_cpp_err=$ac_c_preproc_warn_flag
7831   else
7832     ac_cpp_err=
7833   fi
7834 else
7835   ac_cpp_err=yes
7836 fi
7837 if test -z "$ac_cpp_err"; then
7838   ac_header_preproc=yes
7839 else
7840   echo "$as_me: failed program was:" >&5
7841 sed 's/^/| /' conftest.$ac_ext >&5
7842
7843   ac_header_preproc=no
7844 fi
7845 rm -f conftest.err conftest.$ac_ext
7846 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7847 echo "${ECHO_T}$ac_header_preproc" >&6
7848
7849 # So?  What about this header?
7850 case $ac_header_compiler:$ac_header_preproc in
7851   yes:no )
7852     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
7853 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7854     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7855 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
7856     (
7857       cat <<\_ASBOX
7858 ## ------------------------------------ ##
7859 ## Report this to bug-autoconf@gnu.org. ##
7860 ## ------------------------------------ ##
7861 _ASBOX
7862     ) |
7863       sed "s/^/$as_me: WARNING:     /" >&2
7864     ;;
7865   no:yes )
7866     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
7867 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
7868     { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
7869 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
7870     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7871 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
7872     (
7873       cat <<\_ASBOX
7874 ## ------------------------------------ ##
7875 ## Report this to bug-autoconf@gnu.org. ##
7876 ## ------------------------------------ ##
7877 _ASBOX
7878     ) |
7879       sed "s/^/$as_me: WARNING:     /" >&2
7880     ;;
7881 esac
7882 echo "$as_me:$LINENO: checking for libintl.h" >&5
7883 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7884 if test "${ac_cv_header_libintl_h+set}" = set; then
7885   echo $ECHO_N "(cached) $ECHO_C" >&6
7886 else
7887   ac_cv_header_libintl_h=$ac_header_preproc
7888 fi
7889 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7890 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7891
7892 fi
7893 if test $ac_cv_header_libintl_h = yes; then
7894   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
7895 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
7896 if test "${gt_cv_func_dgettext_libc+set}" = set; then
7897   echo $ECHO_N "(cached) $ECHO_C" >&6
7898 else
7899   cat >conftest.$ac_ext <<_ACEOF
7900 #line $LINENO "configure"
7901 /* confdefs.h.  */
7902 _ACEOF
7903 cat confdefs.h >>conftest.$ac_ext
7904 cat >>conftest.$ac_ext <<_ACEOF
7905 /* end confdefs.h.  */
7906 #include <libintl.h>
7907 int
7908 main ()
7909 {
7910 return (int) dgettext ("","")
7911   ;
7912   return 0;
7913 }
7914 _ACEOF
7915 rm -f conftest.$ac_objext conftest$ac_exeext
7916 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7917   (eval $ac_link) 2>&5
7918   ac_status=$?
7919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7920   (exit $ac_status); } &&
7921          { ac_try='test -s conftest$ac_exeext'
7922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7923   (eval $ac_try) 2>&5
7924   ac_status=$?
7925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7926   (exit $ac_status); }; }; then
7927   gt_cv_func_dgettext_libc=yes
7928 else
7929   echo "$as_me: failed program was:" >&5
7930 sed 's/^/| /' conftest.$ac_ext >&5
7931
7932 gt_cv_func_dgettext_libc=no
7933 fi
7934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7935 fi
7936 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
7937 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
7938
7939           if test "$gt_cv_func_dgettext_libc" != "yes"; then
7940             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
7941 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
7942 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
7943   echo $ECHO_N "(cached) $ECHO_C" >&6
7944 else
7945   ac_check_lib_save_LIBS=$LIBS
7946 LIBS="-lintl  $LIBS"
7947 cat >conftest.$ac_ext <<_ACEOF
7948 #line $LINENO "configure"
7949 /* confdefs.h.  */
7950 _ACEOF
7951 cat confdefs.h >>conftest.$ac_ext
7952 cat >>conftest.$ac_ext <<_ACEOF
7953 /* end confdefs.h.  */
7954
7955 /* Override any gcc2 internal prototype to avoid an error.  */
7956 #ifdef __cplusplus
7957 extern "C"
7958 #endif
7959 /* We use char because int might match the return type of a gcc2
7960    builtin and then its argument prototype would still apply.  */
7961 char bindtextdomain ();
7962 int
7963 main ()
7964 {
7965 bindtextdomain ();
7966   ;
7967   return 0;
7968 }
7969 _ACEOF
7970 rm -f conftest.$ac_objext conftest$ac_exeext
7971 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7972   (eval $ac_link) 2>&5
7973   ac_status=$?
7974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7975   (exit $ac_status); } &&
7976          { ac_try='test -s conftest$ac_exeext'
7977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7978   (eval $ac_try) 2>&5
7979   ac_status=$?
7980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7981   (exit $ac_status); }; }; then
7982   ac_cv_lib_intl_bindtextdomain=yes
7983 else
7984   echo "$as_me: failed program was:" >&5
7985 sed 's/^/| /' conftest.$ac_ext >&5
7986
7987 ac_cv_lib_intl_bindtextdomain=no
7988 fi
7989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7990 LIBS=$ac_check_lib_save_LIBS
7991 fi
7992 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
7993 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
7994 if test $ac_cv_lib_intl_bindtextdomain = yes; then
7995   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
7996 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
7997 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
7998   echo $ECHO_N "(cached) $ECHO_C" >&6
7999 else
8000   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
8001 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
8002 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
8003   echo $ECHO_N "(cached) $ECHO_C" >&6
8004 else
8005   ac_check_lib_save_LIBS=$LIBS
8006 LIBS="-lintl  $LIBS"
8007 cat >conftest.$ac_ext <<_ACEOF
8008 #line $LINENO "configure"
8009 /* confdefs.h.  */
8010 _ACEOF
8011 cat confdefs.h >>conftest.$ac_ext
8012 cat >>conftest.$ac_ext <<_ACEOF
8013 /* end confdefs.h.  */
8014
8015 /* Override any gcc2 internal prototype to avoid an error.  */
8016 #ifdef __cplusplus
8017 extern "C"
8018 #endif
8019 /* We use char because int might match the return type of a gcc2
8020    builtin and then its argument prototype would still apply.  */
8021 char dgettext ();
8022 int
8023 main ()
8024 {
8025 dgettext ();
8026   ;
8027   return 0;
8028 }
8029 _ACEOF
8030 rm -f conftest.$ac_objext conftest$ac_exeext
8031 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8032   (eval $ac_link) 2>&5
8033   ac_status=$?
8034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8035   (exit $ac_status); } &&
8036          { ac_try='test -s conftest$ac_exeext'
8037   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8038   (eval $ac_try) 2>&5
8039   ac_status=$?
8040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8041   (exit $ac_status); }; }; then
8042   ac_cv_lib_intl_dgettext=yes
8043 else
8044   echo "$as_me: failed program was:" >&5
8045 sed 's/^/| /' conftest.$ac_ext >&5
8046
8047 ac_cv_lib_intl_dgettext=no
8048 fi
8049 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8050 LIBS=$ac_check_lib_save_LIBS
8051 fi
8052 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
8053 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
8054 if test $ac_cv_lib_intl_dgettext = yes; then
8055   gt_cv_func_dgettext_libintl=yes
8056 else
8057   gt_cv_func_dgettext_libintl=no
8058 fi
8059
8060 fi
8061 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
8062 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
8063 fi
8064
8065           fi
8066
8067           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
8068             LIBS="$LIBS -lintl";
8069           fi
8070
8071           if test "$gt_cv_func_dgettext_libc" = "yes" \
8072             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
8073
8074 cat >>confdefs.h <<\_ACEOF
8075 #define HAVE_GETTEXT 1
8076 _ACEOF
8077
8078             # Extract the first word of "msgfmt", so it can be a program name with args.
8079 set dummy msgfmt; ac_word=$2
8080 echo "$as_me:$LINENO: checking for $ac_word" >&5
8081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8082 if test "${ac_cv_path_MSGFMT+set}" = set; then
8083   echo $ECHO_N "(cached) $ECHO_C" >&6
8084 else
8085   case "$MSGFMT" in
8086   /*)
8087   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8088   ;;
8089   *)
8090   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8091   for ac_dir in $PATH; do
8092     test -z "$ac_dir" && ac_dir=.
8093     if test -f $ac_dir/$ac_word; then
8094       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
8095         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
8096         break
8097       fi
8098     fi
8099   done
8100   IFS="$ac_save_ifs"
8101   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
8102   ;;
8103 esac
8104 fi
8105 MSGFMT="$ac_cv_path_MSGFMT"
8106 if test -n "$MSGFMT"; then
8107   echo "$as_me:$LINENO: result: $MSGFMT" >&5
8108 echo "${ECHO_T}$MSGFMT" >&6
8109 else
8110   echo "$as_me:$LINENO: result: no" >&5
8111 echo "${ECHO_T}no" >&6
8112 fi
8113             if test "$MSGFMT" != "no"; then
8114
8115 for ac_func in dcgettext
8116 do
8117 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8118 echo "$as_me:$LINENO: checking for $ac_func" >&5
8119 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8120 if eval "test \"\${$as_ac_var+set}\" = set"; then
8121   echo $ECHO_N "(cached) $ECHO_C" >&6
8122 else
8123   cat >conftest.$ac_ext <<_ACEOF
8124 #line $LINENO "configure"
8125 /* confdefs.h.  */
8126 _ACEOF
8127 cat confdefs.h >>conftest.$ac_ext
8128 cat >>conftest.$ac_ext <<_ACEOF
8129 /* end confdefs.h.  */
8130 /* System header to define __stub macros and hopefully few prototypes,
8131     which can conflict with char $ac_func (); below.
8132     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8133     <limits.h> exists even on freestanding compilers.  */
8134 #ifdef __STDC__
8135 # include <limits.h>
8136 #else
8137 # include <assert.h>
8138 #endif
8139 /* Override any gcc2 internal prototype to avoid an error.  */
8140 #ifdef __cplusplus
8141 extern "C"
8142 {
8143 #endif
8144 /* We use char because int might match the return type of a gcc2
8145    builtin and then its argument prototype would still apply.  */
8146 char $ac_func ();
8147 /* The GNU C library defines this for functions which it implements
8148     to always fail with ENOSYS.  Some functions are actually named
8149     something starting with __ and the normal name is an alias.  */
8150 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8151 choke me
8152 #else
8153 char (*f) () = $ac_func;
8154 #endif
8155 #ifdef __cplusplus
8156 }
8157 #endif
8158
8159 int
8160 main ()
8161 {
8162 return f != $ac_func;
8163   ;
8164   return 0;
8165 }
8166 _ACEOF
8167 rm -f conftest.$ac_objext conftest$ac_exeext
8168 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8169   (eval $ac_link) 2>&5
8170   ac_status=$?
8171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8172   (exit $ac_status); } &&
8173          { ac_try='test -s conftest$ac_exeext'
8174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8175   (eval $ac_try) 2>&5
8176   ac_status=$?
8177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8178   (exit $ac_status); }; }; then
8179   eval "$as_ac_var=yes"
8180 else
8181   echo "$as_me: failed program was:" >&5
8182 sed 's/^/| /' conftest.$ac_ext >&5
8183
8184 eval "$as_ac_var=no"
8185 fi
8186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8187 fi
8188 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8189 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8190 if test `eval echo '${'$as_ac_var'}'` = yes; then
8191   cat >>confdefs.h <<_ACEOF
8192 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8193 _ACEOF
8194
8195 fi
8196 done
8197
8198               # Extract the first word of "gmsgfmt", so it can be a program name with args.
8199 set dummy gmsgfmt; ac_word=$2
8200 echo "$as_me:$LINENO: checking for $ac_word" >&5
8201 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8202 if test "${ac_cv_path_GMSGFMT+set}" = set; then
8203   echo $ECHO_N "(cached) $ECHO_C" >&6
8204 else
8205   case $GMSGFMT in
8206   [\\/]* | ?:[\\/]*)
8207   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8208   ;;
8209   *)
8210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8211 for as_dir in $PATH
8212 do
8213   IFS=$as_save_IFS
8214   test -z "$as_dir" && as_dir=.
8215   for ac_exec_ext in '' $ac_executable_extensions; do
8216   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8217     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
8218     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8219     break 2
8220   fi
8221 done
8222 done
8223
8224   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8225   ;;
8226 esac
8227 fi
8228 GMSGFMT=$ac_cv_path_GMSGFMT
8229
8230 if test -n "$GMSGFMT"; then
8231   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
8232 echo "${ECHO_T}$GMSGFMT" >&6
8233 else
8234   echo "$as_me:$LINENO: result: no" >&5
8235 echo "${ECHO_T}no" >&6
8236 fi
8237
8238               # Extract the first word of "xgettext", so it can be a program name with args.
8239 set dummy xgettext; ac_word=$2
8240 echo "$as_me:$LINENO: checking for $ac_word" >&5
8241 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8242 if test "${ac_cv_path_XGETTEXT+set}" = set; then
8243   echo $ECHO_N "(cached) $ECHO_C" >&6
8244 else
8245   case "$XGETTEXT" in
8246   /*)
8247   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8248   ;;
8249   *)
8250   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8251   for ac_dir in $PATH; do
8252     test -z "$ac_dir" && ac_dir=.
8253     if test -f $ac_dir/$ac_word; then
8254       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8255         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8256         break
8257       fi
8258     fi
8259   done
8260   IFS="$ac_save_ifs"
8261   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8262   ;;
8263 esac
8264 fi
8265 XGETTEXT="$ac_cv_path_XGETTEXT"
8266 if test -n "$XGETTEXT"; then
8267   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
8268 echo "${ECHO_T}$XGETTEXT" >&6
8269 else
8270   echo "$as_me:$LINENO: result: no" >&5
8271 echo "${ECHO_T}no" >&6
8272 fi
8273
8274               cat >conftest.$ac_ext <<_ACEOF
8275 #line $LINENO "configure"
8276 /* confdefs.h.  */
8277 _ACEOF
8278 cat confdefs.h >>conftest.$ac_ext
8279 cat >>conftest.$ac_ext <<_ACEOF
8280 /* end confdefs.h.  */
8281
8282 int
8283 main ()
8284 {
8285 extern int _nl_msg_cat_cntr;
8286                              return _nl_msg_cat_cntr
8287   ;
8288   return 0;
8289 }
8290 _ACEOF
8291 rm -f conftest.$ac_objext conftest$ac_exeext
8292 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8293   (eval $ac_link) 2>&5
8294   ac_status=$?
8295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8296   (exit $ac_status); } &&
8297          { ac_try='test -s conftest$ac_exeext'
8298   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8299   (eval $ac_try) 2>&5
8300   ac_status=$?
8301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8302   (exit $ac_status); }; }; then
8303   CATOBJEXT=.gmo
8304                  DATADIRNAME=share
8305 else
8306   echo "$as_me: failed program was:" >&5
8307 sed 's/^/| /' conftest.$ac_ext >&5
8308
8309 CATOBJEXT=.mo
8310                  DATADIRNAME=lib
8311 fi
8312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8313               INSTOBJEXT=.mo
8314             fi
8315           fi
8316
8317           # Added by Martin Baulig 12/15/98 for libc5 systems
8318           if test "$gt_cv_func_dgettext_libc" != "yes" \
8319             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
8320             INTLLIBS=-lintl
8321             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
8322           fi
8323
8324 fi
8325
8326
8327
8328       if test "$CATOBJEXT" = "NONE"; then
8329                         nls_cv_use_gnu_gettext=yes
8330       fi
8331     fi
8332
8333     if test "$nls_cv_use_gnu_gettext" != "yes"; then
8334
8335 cat >>confdefs.h <<\_ACEOF
8336 #define ENABLE_NLS 1
8337 _ACEOF
8338
8339     else
8340             CATOBJEXT=
8341     fi
8342
8343         if test "$XGETTEXT" != ":"; then
8344                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
8345         : ;
8346       else
8347         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
8348 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
8349         XGETTEXT=":"
8350       fi
8351     fi
8352
8353     # We need to process the po/ directory.
8354     POSUB=po
8355
8356               ac_config_commands="$ac_config_commands default-2"
8357
8358
8359                 for lang in $ALL_LINGUAS; do
8360       GMOFILES="$GMOFILES $lang.gmo"
8361       POFILES="$POFILES $lang.po"
8362     done
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376    if test "x$CATOBJEXT" != "x"; then
8377      if test "x$ALL_LINGUAS" = "x"; then
8378        LINGUAS=
8379      else
8380        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
8381 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
8382        NEW_LINGUAS=
8383        for lang in ${LINGUAS=$ALL_LINGUAS}; do
8384          case "$ALL_LINGUAS" in
8385           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
8386          esac
8387        done
8388        LINGUAS=$NEW_LINGUAS
8389        echo "$as_me:$LINENO: result: $LINGUAS" >&5
8390 echo "${ECHO_T}$LINGUAS" >&6
8391      fi
8392
8393           if test -n "$LINGUAS"; then
8394        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8395      fi
8396    fi
8397
8398             test -d po || mkdir po
8399    if test "$CATOBJEXT" = ".cat"; then
8400      if test "${ac_cv_header_linux_version_h+set}" = set; then
8401   echo "$as_me:$LINENO: checking for linux/version.h" >&5
8402 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8403 if test "${ac_cv_header_linux_version_h+set}" = set; then
8404   echo $ECHO_N "(cached) $ECHO_C" >&6
8405 fi
8406 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8407 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8408 else
8409   # Is the header compilable?
8410 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
8411 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
8412 cat >conftest.$ac_ext <<_ACEOF
8413 #line $LINENO "configure"
8414 /* confdefs.h.  */
8415 _ACEOF
8416 cat confdefs.h >>conftest.$ac_ext
8417 cat >>conftest.$ac_ext <<_ACEOF
8418 /* end confdefs.h.  */
8419 $ac_includes_default
8420 #include <linux/version.h>
8421 _ACEOF
8422 rm -f conftest.$ac_objext
8423 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8424   (eval $ac_compile) 2>&5
8425   ac_status=$?
8426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8427   (exit $ac_status); } &&
8428          { ac_try='test -s conftest.$ac_objext'
8429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8430   (eval $ac_try) 2>&5
8431   ac_status=$?
8432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8433   (exit $ac_status); }; }; then
8434   ac_header_compiler=yes
8435 else
8436   echo "$as_me: failed program was:" >&5
8437 sed 's/^/| /' conftest.$ac_ext >&5
8438
8439 ac_header_compiler=no
8440 fi
8441 rm -f conftest.$ac_objext conftest.$ac_ext
8442 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8443 echo "${ECHO_T}$ac_header_compiler" >&6
8444
8445 # Is the header present?
8446 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
8447 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
8448 cat >conftest.$ac_ext <<_ACEOF
8449 #line $LINENO "configure"
8450 /* confdefs.h.  */
8451 _ACEOF
8452 cat confdefs.h >>conftest.$ac_ext
8453 cat >>conftest.$ac_ext <<_ACEOF
8454 /* end confdefs.h.  */
8455 #include <linux/version.h>
8456 _ACEOF
8457 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8458   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8459   ac_status=$?
8460   grep -v '^ *+' conftest.er1 >conftest.err
8461   rm -f conftest.er1
8462   cat conftest.err >&5
8463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8464   (exit $ac_status); } >/dev/null; then
8465   if test -s conftest.err; then
8466     ac_cpp_err=$ac_c_preproc_warn_flag
8467   else
8468     ac_cpp_err=
8469   fi
8470 else
8471   ac_cpp_err=yes
8472 fi
8473 if test -z "$ac_cpp_err"; then
8474   ac_header_preproc=yes
8475 else
8476   echo "$as_me: failed program was:" >&5
8477 sed 's/^/| /' conftest.$ac_ext >&5
8478
8479   ac_header_preproc=no
8480 fi
8481 rm -f conftest.err conftest.$ac_ext
8482 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8483 echo "${ECHO_T}$ac_header_preproc" >&6
8484
8485 # So?  What about this header?
8486 case $ac_header_compiler:$ac_header_preproc in
8487   yes:no )
8488     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
8489 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8490     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8491 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
8492     (
8493       cat <<\_ASBOX
8494 ## ------------------------------------ ##
8495 ## Report this to bug-autoconf@gnu.org. ##
8496 ## ------------------------------------ ##
8497 _ASBOX
8498     ) |
8499       sed "s/^/$as_me: WARNING:     /" >&2
8500     ;;
8501   no:yes )
8502     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
8503 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
8504     { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
8505 echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
8506     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8507 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
8508     (
8509       cat <<\_ASBOX
8510 ## ------------------------------------ ##
8511 ## Report this to bug-autoconf@gnu.org. ##
8512 ## ------------------------------------ ##
8513 _ASBOX
8514     ) |
8515       sed "s/^/$as_me: WARNING:     /" >&2
8516     ;;
8517 esac
8518 echo "$as_me:$LINENO: checking for linux/version.h" >&5
8519 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8520 if test "${ac_cv_header_linux_version_h+set}" = set; then
8521   echo $ECHO_N "(cached) $ECHO_C" >&6
8522 else
8523   ac_cv_header_linux_version_h=$ac_header_preproc
8524 fi
8525 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8526 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8527
8528 fi
8529 if test $ac_cv_header_linux_version_h = yes; then
8530   msgformat=linux
8531 else
8532   msgformat=xopen
8533 fi
8534
8535
8536
8537                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
8538    fi
8539
8540             MKINSTALLDIRS=
8541 #
8542 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
8543 #
8544 #   if test -n "$ac_aux_dir"; then
8545 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8546 #   fi
8547    if test -z "$MKINSTALLDIRS"; then
8548      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8549    fi
8550
8551    # jwz: you know what, screw it.  Let's just use the version that I
8552    # already computed in configure.in, instead of this version that came
8553    # with the i18n crud, ok?
8554    MKINSTALLDIRS="$INSTALL_DIRS"
8555
8556
8557
8558
8559          test -d po || mkdir po
8560    if test "x$srcdir" != "x."; then
8561      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8562        posrcprefix="$srcdir/"
8563      else
8564        posrcprefix="../$srcdir/"
8565      fi
8566    else
8567      posrcprefix="../"
8568    fi
8569    rm -f po/POTFILES
8570    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8571         < $srcdir/po/POTFILES.in > po/POTFILES
8572
8573
8574
8575 ###############################################################################
8576 #
8577 #       Check for -lXmu (some fucked up vendors don't ship it...)
8578 #
8579 ###############################################################################
8580
8581 have_xmu=no
8582
8583   ac_save_CPPFLAGS="$CPPFLAGS"
8584   if test \! -z "$includedir" ; then
8585     CPPFLAGS="$CPPFLAGS -I$includedir"
8586   fi
8587   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8588   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
8589 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
8590 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
8591   echo $ECHO_N "(cached) $ECHO_C" >&6
8592 else
8593   cat >conftest.$ac_ext <<_ACEOF
8594 #line $LINENO "configure"
8595 /* confdefs.h.  */
8596 _ACEOF
8597 cat confdefs.h >>conftest.$ac_ext
8598 cat >>conftest.$ac_ext <<_ACEOF
8599 /* end confdefs.h.  */
8600 #include <stdlib.h>
8601                    #include <stdio.h>
8602                    #include <X11/Intrinsic.h>
8603
8604 #include <X11/Xmu/Error.h>
8605 _ACEOF
8606 rm -f conftest.$ac_objext
8607 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8608   (eval $ac_compile) 2>&5
8609   ac_status=$?
8610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8611   (exit $ac_status); } &&
8612          { ac_try='test -s conftest.$ac_objext'
8613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8614   (eval $ac_try) 2>&5
8615   ac_status=$?
8616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8617   (exit $ac_status); }; }; then
8618   ac_cv_header_X11_Xmu_Error_h=yes
8619 else
8620   echo "$as_me: failed program was:" >&5
8621 sed 's/^/| /' conftest.$ac_ext >&5
8622
8623 ac_cv_header_X11_Xmu_Error_h=no
8624 fi
8625 rm -f conftest.$ac_objext conftest.$ac_ext
8626 fi
8627 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
8628 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
8629 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
8630   have_xmu=yes
8631 fi
8632
8633
8634   CPPFLAGS="$ac_save_CPPFLAGS"
8635 if test "$have_xmu" = no ; then
8636   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8637   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8638   XMU_LIBS=''
8639 else
8640   XMU_SRCS=''
8641   XMU_OBJS=''
8642   XMU_LIBS='-lXmu'
8643   cat >>confdefs.h <<\_ACEOF
8644 #define HAVE_XMU 1
8645 _ACEOF
8646
8647 fi
8648
8649
8650 ###############################################################################
8651 #
8652 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8653 #       See comp.windows.x FAQ question 124.  The right fix is to
8654 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8655 #
8656 ###############################################################################
8657
8658 if test "$have_xmu" = yes ; then
8659   case "$host" in
8660     *-sunos4*)
8661     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8662 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
8663 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
8664   echo $ECHO_N "(cached) $ECHO_C" >&6
8665 else
8666   ac_save_LDFLAGS="$LDFLAGS"
8667                     if test \! -z "$x_libraries" ; then
8668                       LDFLAGS="$LDFLAGS -L$x_libraries"
8669                     fi
8670                     # Note: this trick never works!  (Generally.)
8671                     # We're only getting away with using AC_TRY_LINK
8672                     # with X libraries because we know it's SunOS.
8673                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8674                     cat >conftest.$ac_ext <<_ACEOF
8675 #line $LINENO "configure"
8676 /* confdefs.h.  */
8677 _ACEOF
8678 cat confdefs.h >>conftest.$ac_ext
8679 cat >>conftest.$ac_ext <<_ACEOF
8680 /* end confdefs.h.  */
8681
8682 int
8683 main ()
8684 {
8685
8686   ;
8687   return 0;
8688 }
8689 _ACEOF
8690 rm -f conftest.$ac_objext conftest$ac_exeext
8691 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8692   (eval $ac_link) 2>&5
8693   ac_status=$?
8694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8695   (exit $ac_status); } &&
8696          { ac_try='test -s conftest$ac_exeext'
8697   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8698   (eval $ac_try) 2>&5
8699   ac_status=$?
8700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8701   (exit $ac_status); }; }; then
8702   ac_cv_sunos_xmu_bug=no
8703 else
8704   echo "$as_me: failed program was:" >&5
8705 sed 's/^/| /' conftest.$ac_ext >&5
8706
8707 ac_cv_sunos_xmu_bug=yes
8708 fi
8709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8710                     LDFLAGS="$ac_save_LDFLAGS"
8711 fi
8712 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
8713 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
8714     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8715       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
8716 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
8717 if test "${ac_cv_ld_static+set}" = set; then
8718   echo $ECHO_N "(cached) $ECHO_C" >&6
8719 else
8720   ac_save_LDFLAGS="$LDFLAGS"
8721                       LDFLAGS="$LDFLAGS -static"
8722                       cat >conftest.$ac_ext <<_ACEOF
8723 #line $LINENO "configure"
8724 /* confdefs.h.  */
8725 _ACEOF
8726 cat confdefs.h >>conftest.$ac_ext
8727 cat >>conftest.$ac_ext <<_ACEOF
8728 /* end confdefs.h.  */
8729
8730 int
8731 main ()
8732 {
8733
8734   ;
8735   return 0;
8736 }
8737 _ACEOF
8738 rm -f conftest.$ac_objext conftest$ac_exeext
8739 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8740   (eval $ac_link) 2>&5
8741   ac_status=$?
8742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8743   (exit $ac_status); } &&
8744          { ac_try='test -s conftest$ac_exeext'
8745   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8746   (eval $ac_try) 2>&5
8747   ac_status=$?
8748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8749   (exit $ac_status); }; }; then
8750   ac_cv_ld_static=yes
8751 else
8752   echo "$as_me: failed program was:" >&5
8753 sed 's/^/| /' conftest.$ac_ext >&5
8754
8755 ac_cv_ld_static=no
8756 fi
8757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8758                     LDFLAGS="$ac_save_LDFLAGS"
8759 fi
8760 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
8761 echo "${ECHO_T}$ac_cv_ld_static" >&6
8762       if test "$ac_cv_ld_static" = yes ; then
8763         LDFLAGS="$LDFLAGS -static"
8764       else
8765         LDFLAGS="$LDFLAGS -Bstatic"
8766       fi
8767     fi
8768     ;;
8769   esac
8770 fi
8771
8772
8773 ###############################################################################
8774 #
8775 #       Handle the --with-hackdir option
8776 #
8777 ###############################################################################
8778
8779 have_hackdir=yes
8780 with_hackdir_req=unspecified
8781
8782 # Check whether --with-hackdir or --without-hackdir was given.
8783 if test "${with_hackdir+set}" = set; then
8784   withval="$with_hackdir"
8785   with_hackdir="$withval"; with_hackdir_req="$withval"
8786 else
8787   with_hackdir=yes
8788 fi;
8789
8790 if test x"$with_hackdir" = xyes; then
8791   HACKDIR='${exec_prefix}/lib/xscreensaver'
8792 elif test x"$with_hackdir" = xno; then
8793   HACKDIR='${bindir}'
8794 else
8795   # there must be a better way than this...
8796   if test -z "`echo $with_hackdir | sed 's@^/.*@@'`" ; then
8797     # absolute path
8798     HACKDIR=$with_hackdir
8799   else
8800     # relative path
8801     HACKDIR="\${exec_prefix}$with_hackdir"
8802   fi
8803 fi
8804
8805 # canonicalize slashes.
8806 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8807
8808 # This option used to be called --enable-subdir; make sure that is no longer
8809 # used, since configure brain-damagedly ignores unknown --enable options.
8810
8811 obsolete_enable=
8812 # Check whether --enable-subdir or --disable-subdir was given.
8813 if test "${enable_subdir+set}" = set; then
8814   enableval="$enable_subdir"
8815   obsolete_enable=yes
8816 fi;
8817 if test -n "$obsolete_enable"; then
8818   echo "error: the --enable-subdir option has been replaced with"
8819   echo "       the new --with-hackdir option; see \`configure --help'"
8820   echo "       for more information."
8821   exit 1
8822 fi
8823
8824
8825 ###############################################################################
8826 #
8827 #       Handle the --with-configdir option
8828 #
8829 ###############################################################################
8830
8831 have_configdir=yes
8832 with_configdir_req=unspecified
8833
8834 # Check whether --with-configdir or --without-configdir was given.
8835 if test "${with_configdir+set}" = set; then
8836   withval="$with_configdir"
8837   with_configdir="$withval"; with_configdir_req="$withval"
8838 else
8839   with_configdir=yes
8840 fi;
8841
8842 if test x"$with_configdir" = xyes; then
8843   # filled in later...
8844   HACK_CONF_DIR=''
8845 elif test x"$with_configdir" = xno; then
8846   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8847   exit 1
8848 else
8849   # there must be a better way than this...
8850   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8851     # absolute path
8852     HACK_CONF_DIR=$with_configdir
8853   else
8854     # relative path
8855     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8856   fi
8857 fi
8858
8859
8860
8861
8862 ###############################################################################
8863 #
8864 #       Check for the SGI SCREEN_SAVER server extension.
8865 #
8866 ###############################################################################
8867
8868 have_sgi=no
8869 with_sgi_req=unspecified
8870
8871 # Check whether --with-sgi-ext or --without-sgi-ext was given.
8872 if test "${with_sgi_ext+set}" = set; then
8873   withval="$with_sgi_ext"
8874   with_sgi="$withval"; with_sgi_req="$withval"
8875 else
8876   with_sgi=yes
8877 fi;
8878
8879
8880    case "$with_sgi" in
8881     yes) ;;
8882     no)  ;;
8883
8884     /*)
8885      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
8886 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
8887      d=$with_sgi/include
8888      if test -d $d; then
8889        X_CFLAGS="-I$d $X_CFLAGS"
8890        echo "$as_me:$LINENO: result: $d" >&5
8891 echo "${ECHO_T}$d" >&6
8892      else
8893        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8894 echo "${ECHO_T}not found ($d: no such directory)" >&6
8895      fi
8896
8897      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
8898 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
8899      d=$with_sgi/lib
8900      if test -d $d; then
8901        X_LIBS="-L$d $X_LIBS"
8902        echo "$as_me:$LINENO: result: $d" >&5
8903 echo "${ECHO_T}$d" >&6
8904      else
8905        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8906 echo "${ECHO_T}not found ($d: no such directory)" >&6
8907      fi
8908
8909      # replace the directory string with "yes".
8910      with_sgi_req="yes"
8911      with_sgi=$with_sgi_req
8912      ;;
8913
8914     *)
8915      echo ""
8916      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
8917      echo "       If it is a directory, then \`DIR/include' will be added to"
8918      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8919      exit 1
8920      ;;
8921    esac
8922
8923
8924 if test "$with_sgi" = yes; then
8925
8926   ac_save_CPPFLAGS="$CPPFLAGS"
8927   if test \! -z "$includedir" ; then
8928     CPPFLAGS="$CPPFLAGS -I$includedir"
8929   fi
8930   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8931   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
8932 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
8933 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
8934   echo $ECHO_N "(cached) $ECHO_C" >&6
8935 else
8936   cat >conftest.$ac_ext <<_ACEOF
8937 #line $LINENO "configure"
8938 /* confdefs.h.  */
8939 _ACEOF
8940 cat confdefs.h >>conftest.$ac_ext
8941 cat >>conftest.$ac_ext <<_ACEOF
8942 /* end confdefs.h.  */
8943 #include <X11/Xlib.h>
8944
8945 #include <X11/extensions/XScreenSaver.h>
8946 _ACEOF
8947 rm -f conftest.$ac_objext
8948 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8949   (eval $ac_compile) 2>&5
8950   ac_status=$?
8951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8952   (exit $ac_status); } &&
8953          { ac_try='test -s conftest.$ac_objext'
8954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8955   (eval $ac_try) 2>&5
8956   ac_status=$?
8957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8958   (exit $ac_status); }; }; then
8959   ac_cv_header_X11_extensions_XScreenSaver_h=yes
8960 else
8961   echo "$as_me: failed program was:" >&5
8962 sed 's/^/| /' conftest.$ac_ext >&5
8963
8964 ac_cv_header_X11_extensions_XScreenSaver_h=no
8965 fi
8966 rm -f conftest.$ac_objext conftest.$ac_ext
8967 fi
8968 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
8969 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
8970 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
8971   have_sgi=yes
8972                      cat >>confdefs.h <<\_ACEOF
8973 #define HAVE_SGI_SAVER_EXTENSION 1
8974 _ACEOF
8975
8976 fi
8977
8978
8979   CPPFLAGS="$ac_save_CPPFLAGS"
8980
8981 elif test "$with_sgi" != no; then
8982   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
8983   exit 1
8984 fi
8985
8986
8987 ###############################################################################
8988 #
8989 #       Check for the MIT-SCREEN-SAVER server extension.
8990 #
8991 ###############################################################################
8992
8993 have_mit=no
8994 with_mit_req=unspecified
8995
8996 # Check whether --with-mit-ext or --without-mit-ext was given.
8997 if test "${with_mit_ext+set}" = set; then
8998   withval="$with_mit_ext"
8999   with_mit="$withval"; with_mit_req="$withval"
9000 else
9001   with_mit=yes
9002 fi;
9003
9004
9005    case "$with_mit" in
9006     yes) ;;
9007     no)  ;;
9008
9009     /*)
9010      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER headers" >&5
9011 echo $ECHO_N "checking for MIT-SCREEN-SAVER headers... $ECHO_C" >&6
9012      d=$with_mit/include
9013      if test -d $d; then
9014        X_CFLAGS="-I$d $X_CFLAGS"
9015        echo "$as_me:$LINENO: result: $d" >&5
9016 echo "${ECHO_T}$d" >&6
9017      else
9018        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9019 echo "${ECHO_T}not found ($d: no such directory)" >&6
9020      fi
9021
9022      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER libs" >&5
9023 echo $ECHO_N "checking for MIT-SCREEN-SAVER libs... $ECHO_C" >&6
9024      d=$with_mit/lib
9025      if test -d $d; then
9026        X_LIBS="-L$d $X_LIBS"
9027        echo "$as_me:$LINENO: result: $d" >&5
9028 echo "${ECHO_T}$d" >&6
9029      else
9030        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9031 echo "${ECHO_T}not found ($d: no such directory)" >&6
9032      fi
9033
9034      # replace the directory string with "yes".
9035      with_mit_req="yes"
9036      with_mit=$with_mit_req
9037      ;;
9038
9039     *)
9040      echo ""
9041      echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
9042      echo "       If it is a directory, then \`DIR/include' will be added to"
9043      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9044      exit 1
9045      ;;
9046    esac
9047
9048
9049 if test "$with_mit" = yes; then
9050
9051   ac_save_CPPFLAGS="$CPPFLAGS"
9052   if test \! -z "$includedir" ; then
9053     CPPFLAGS="$CPPFLAGS -I$includedir"
9054   fi
9055   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9056   echo "$as_me:$LINENO: checking for X11/extensions/scrnsaver.h" >&5
9057 echo $ECHO_N "checking for X11/extensions/scrnsaver.h... $ECHO_C" >&6
9058 if test "${ac_cv_header_X11_extensions_scrnsaver_h+set}" = set; then
9059   echo $ECHO_N "(cached) $ECHO_C" >&6
9060 else
9061   cat >conftest.$ac_ext <<_ACEOF
9062 #line $LINENO "configure"
9063 /* confdefs.h.  */
9064 _ACEOF
9065 cat confdefs.h >>conftest.$ac_ext
9066 cat >>conftest.$ac_ext <<_ACEOF
9067 /* end confdefs.h.  */
9068 #include <X11/Xlib.h>
9069
9070 #include <X11/extensions/scrnsaver.h>
9071 _ACEOF
9072 rm -f conftest.$ac_objext
9073 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9074   (eval $ac_compile) 2>&5
9075   ac_status=$?
9076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9077   (exit $ac_status); } &&
9078          { ac_try='test -s conftest.$ac_objext'
9079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9080   (eval $ac_try) 2>&5
9081   ac_status=$?
9082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9083   (exit $ac_status); }; }; then
9084   ac_cv_header_X11_extensions_scrnsaver_h=yes
9085 else
9086   echo "$as_me: failed program was:" >&5
9087 sed 's/^/| /' conftest.$ac_ext >&5
9088
9089 ac_cv_header_X11_extensions_scrnsaver_h=no
9090 fi
9091 rm -f conftest.$ac_objext conftest.$ac_ext
9092 fi
9093 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_scrnsaver_h" >&5
9094 echo "${ECHO_T}$ac_cv_header_X11_extensions_scrnsaver_h" >&6
9095 if test $ac_cv_header_X11_extensions_scrnsaver_h = yes; then
9096   have_mit=yes
9097 fi
9098
9099
9100   CPPFLAGS="$ac_save_CPPFLAGS"
9101
9102   # Now check to see if it's really in the library; XF86Free-3.3 ships
9103   # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
9104   #
9105   if test "$have_mit" = yes; then
9106
9107   ac_save_CPPFLAGS="$CPPFLAGS"
9108   ac_save_LDFLAGS="$LDFLAGS"
9109 #  ac_save_LIBS="$LIBS"
9110
9111   if test \! -z "$includedir" ; then
9112     CPPFLAGS="$CPPFLAGS -I$includedir"
9113   fi
9114   # note: $X_CFLAGS includes $x_includes
9115   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9116
9117   if test \! -z "$libdir" ; then
9118     LDFLAGS="$LDFLAGS -L$libdir"
9119   fi
9120   # note: $X_LIBS includes $x_libraries
9121   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9122
9123   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXext" >&5
9124 echo $ECHO_N "checking for XScreenSaverRegister in -lXext... $ECHO_C" >&6
9125 if test "${ac_cv_lib_Xext_XScreenSaverRegister+set}" = set; then
9126   echo $ECHO_N "(cached) $ECHO_C" >&6
9127 else
9128   ac_check_lib_save_LIBS=$LIBS
9129 LIBS="-lXext -lm $LIBS"
9130 cat >conftest.$ac_ext <<_ACEOF
9131 #line $LINENO "configure"
9132 /* confdefs.h.  */
9133 _ACEOF
9134 cat confdefs.h >>conftest.$ac_ext
9135 cat >>conftest.$ac_ext <<_ACEOF
9136 /* end confdefs.h.  */
9137
9138 /* Override any gcc2 internal prototype to avoid an error.  */
9139 #ifdef __cplusplus
9140 extern "C"
9141 #endif
9142 /* We use char because int might match the return type of a gcc2
9143    builtin and then its argument prototype would still apply.  */
9144 char XScreenSaverRegister ();
9145 int
9146 main ()
9147 {
9148 XScreenSaverRegister ();
9149   ;
9150   return 0;
9151 }
9152 _ACEOF
9153 rm -f conftest.$ac_objext conftest$ac_exeext
9154 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9155   (eval $ac_link) 2>&5
9156   ac_status=$?
9157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9158   (exit $ac_status); } &&
9159          { ac_try='test -s conftest$ac_exeext'
9160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9161   (eval $ac_try) 2>&5
9162   ac_status=$?
9163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9164   (exit $ac_status); }; }; then
9165   ac_cv_lib_Xext_XScreenSaverRegister=yes
9166 else
9167   echo "$as_me: failed program was:" >&5
9168 sed 's/^/| /' conftest.$ac_ext >&5
9169
9170 ac_cv_lib_Xext_XScreenSaverRegister=no
9171 fi
9172 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9173 LIBS=$ac_check_lib_save_LIBS
9174 fi
9175 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XScreenSaverRegister" >&5
9176 echo "${ECHO_T}$ac_cv_lib_Xext_XScreenSaverRegister" >&6
9177 if test $ac_cv_lib_Xext_XScreenSaverRegister = yes; then
9178   true
9179 else
9180   have_mit=no
9181 fi
9182
9183   CPPFLAGS="$ac_save_CPPFLAGS"
9184   LDFLAGS="$ac_save_LDFLAGS"
9185 #  LIBS="$ac_save_LIBS"
9186
9187
9188     if test "$have_mit" = no; then
9189       # Fuck!  Looks like XF86Free-3.3 actually puts it in XExExt instead
9190       # of in Xext.  Thank you master, may I have another.
9191
9192   ac_save_CPPFLAGS="$CPPFLAGS"
9193   ac_save_LDFLAGS="$LDFLAGS"
9194 #  ac_save_LIBS="$LIBS"
9195
9196   if test \! -z "$includedir" ; then
9197     CPPFLAGS="$CPPFLAGS -I$includedir"
9198   fi
9199   # note: $X_CFLAGS includes $x_includes
9200   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9201
9202   if test \! -z "$libdir" ; then
9203     LDFLAGS="$LDFLAGS -L$libdir"
9204   fi
9205   # note: $X_LIBS includes $x_libraries
9206   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9207
9208   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXExExt" >&5
9209 echo $ECHO_N "checking for XScreenSaverRegister in -lXExExt... $ECHO_C" >&6
9210 if test "${ac_cv_lib_XExExt_XScreenSaverRegister+set}" = set; then
9211   echo $ECHO_N "(cached) $ECHO_C" >&6
9212 else
9213   ac_check_lib_save_LIBS=$LIBS
9214 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
9215 cat >conftest.$ac_ext <<_ACEOF
9216 #line $LINENO "configure"
9217 /* confdefs.h.  */
9218 _ACEOF
9219 cat confdefs.h >>conftest.$ac_ext
9220 cat >>conftest.$ac_ext <<_ACEOF
9221 /* end confdefs.h.  */
9222
9223 /* Override any gcc2 internal prototype to avoid an error.  */
9224 #ifdef __cplusplus
9225 extern "C"
9226 #endif
9227 /* We use char because int might match the return type of a gcc2
9228    builtin and then its argument prototype would still apply.  */
9229 char XScreenSaverRegister ();
9230 int
9231 main ()
9232 {
9233 XScreenSaverRegister ();
9234   ;
9235   return 0;
9236 }
9237 _ACEOF
9238 rm -f conftest.$ac_objext conftest$ac_exeext
9239 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9240   (eval $ac_link) 2>&5
9241   ac_status=$?
9242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9243   (exit $ac_status); } &&
9244          { ac_try='test -s conftest$ac_exeext'
9245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9246   (eval $ac_try) 2>&5
9247   ac_status=$?
9248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9249   (exit $ac_status); }; }; then
9250   ac_cv_lib_XExExt_XScreenSaverRegister=yes
9251 else
9252   echo "$as_me: failed program was:" >&5
9253 sed 's/^/| /' conftest.$ac_ext >&5
9254
9255 ac_cv_lib_XExExt_XScreenSaverRegister=no
9256 fi
9257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9258 LIBS=$ac_check_lib_save_LIBS
9259 fi
9260 echo "$as_me:$LINENO: result: $ac_cv_lib_XExExt_XScreenSaverRegister" >&5
9261 echo "${ECHO_T}$ac_cv_lib_XExExt_XScreenSaverRegister" >&6
9262 if test $ac_cv_lib_XExExt_XScreenSaverRegister = yes; then
9263   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
9264 else
9265   true
9266 fi
9267
9268   CPPFLAGS="$ac_save_CPPFLAGS"
9269   LDFLAGS="$ac_save_LDFLAGS"
9270 #  LIBS="$ac_save_LIBS"
9271
9272     fi
9273
9274     if test "$have_mit" = no; then
9275       # Double fuck!  Looks like some versions of XFree86 (whichever version
9276       # it is that comes with RedHat Linux 2.0 -- I can't find a version
9277       # number) put this garbage in Xss instead of Xext.  Thank you master,
9278       #  may I have another.
9279
9280   ac_save_CPPFLAGS="$CPPFLAGS"
9281   ac_save_LDFLAGS="$LDFLAGS"
9282 #  ac_save_LIBS="$LIBS"
9283
9284   if test \! -z "$includedir" ; then
9285     CPPFLAGS="$CPPFLAGS -I$includedir"
9286   fi
9287   # note: $X_CFLAGS includes $x_includes
9288   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9289
9290   if test \! -z "$libdir" ; then
9291     LDFLAGS="$LDFLAGS -L$libdir"
9292   fi
9293   # note: $X_LIBS includes $x_libraries
9294   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9295
9296   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXss" >&5
9297 echo $ECHO_N "checking for XScreenSaverRegister in -lXss... $ECHO_C" >&6
9298 if test "${ac_cv_lib_Xss_XScreenSaverRegister+set}" = set; then
9299   echo $ECHO_N "(cached) $ECHO_C" >&6
9300 else
9301   ac_check_lib_save_LIBS=$LIBS
9302 LIBS="-lXss -lX11 -lXext -lm $LIBS"
9303 cat >conftest.$ac_ext <<_ACEOF
9304 #line $LINENO "configure"
9305 /* confdefs.h.  */
9306 _ACEOF
9307 cat confdefs.h >>conftest.$ac_ext
9308 cat >>conftest.$ac_ext <<_ACEOF
9309 /* end confdefs.h.  */
9310
9311 /* Override any gcc2 internal prototype to avoid an error.  */
9312 #ifdef __cplusplus
9313 extern "C"
9314 #endif
9315 /* We use char because int might match the return type of a gcc2
9316    builtin and then its argument prototype would still apply.  */
9317 char XScreenSaverRegister ();
9318 int
9319 main ()
9320 {
9321 XScreenSaverRegister ();
9322   ;
9323   return 0;
9324 }
9325 _ACEOF
9326 rm -f conftest.$ac_objext conftest$ac_exeext
9327 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9328   (eval $ac_link) 2>&5
9329   ac_status=$?
9330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9331   (exit $ac_status); } &&
9332          { ac_try='test -s conftest$ac_exeext'
9333   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9334   (eval $ac_try) 2>&5
9335   ac_status=$?
9336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9337   (exit $ac_status); }; }; then
9338   ac_cv_lib_Xss_XScreenSaverRegister=yes
9339 else
9340   echo "$as_me: failed program was:" >&5
9341 sed 's/^/| /' conftest.$ac_ext >&5
9342
9343 ac_cv_lib_Xss_XScreenSaverRegister=no
9344 fi
9345 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9346 LIBS=$ac_check_lib_save_LIBS
9347 fi
9348 echo "$as_me:$LINENO: result: $ac_cv_lib_Xss_XScreenSaverRegister" >&5
9349 echo "${ECHO_T}$ac_cv_lib_Xss_XScreenSaverRegister" >&6
9350 if test $ac_cv_lib_Xss_XScreenSaverRegister = yes; then
9351   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
9352 else
9353   true
9354 fi
9355
9356   CPPFLAGS="$ac_save_CPPFLAGS"
9357   LDFLAGS="$ac_save_LDFLAGS"
9358 #  LIBS="$ac_save_LIBS"
9359
9360     fi
9361
9362   if test "$have_mit" = yes; then
9363     cat >>confdefs.h <<\_ACEOF
9364 #define HAVE_MIT_SAVER_EXTENSION 1
9365 _ACEOF
9366
9367   fi
9368
9369   fi
9370
9371 elif test "$with_mit" != no; then
9372   echo "error: must be yes or no: --with-mit-ext=$with_mit"
9373   exit 1
9374 fi
9375
9376
9377 ###############################################################################
9378 #
9379 #       Check for the XIDLE server extension.
9380 #
9381 ###############################################################################
9382
9383 have_xidle=no
9384 with_xidle_req=unspecified
9385
9386 # Check whether --with-xidle-ext or --without-xidle-ext was given.
9387 if test "${with_xidle_ext+set}" = set; then
9388   withval="$with_xidle_ext"
9389   with_xidle="$withval"; with_xidle_req="$withval"
9390 else
9391   with_xidle=yes
9392 fi;
9393
9394
9395    case "$with_xidle" in
9396     yes) ;;
9397     no)  ;;
9398
9399     /*)
9400      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
9401 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
9402      d=$with_xidle/include
9403      if test -d $d; then
9404        X_CFLAGS="-I$d $X_CFLAGS"
9405        echo "$as_me:$LINENO: result: $d" >&5
9406 echo "${ECHO_T}$d" >&6
9407      else
9408        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9409 echo "${ECHO_T}not found ($d: no such directory)" >&6
9410      fi
9411
9412      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
9413 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
9414      d=$with_xidle/lib
9415      if test -d $d; then
9416        X_LIBS="-L$d $X_LIBS"
9417        echo "$as_me:$LINENO: result: $d" >&5
9418 echo "${ECHO_T}$d" >&6
9419      else
9420        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9421 echo "${ECHO_T}not found ($d: no such directory)" >&6
9422      fi
9423
9424      # replace the directory string with "yes".
9425      with_xidle_req="yes"
9426      with_xidle=$with_xidle_req
9427      ;;
9428
9429     *)
9430      echo ""
9431      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
9432      echo "       If it is a directory, then \`DIR/include' will be added to"
9433      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9434      exit 1
9435      ;;
9436    esac
9437
9438
9439 if test "$with_xidle" = yes; then
9440
9441   ac_save_CPPFLAGS="$CPPFLAGS"
9442   if test \! -z "$includedir" ; then
9443     CPPFLAGS="$CPPFLAGS -I$includedir"
9444   fi
9445   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9446   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
9447 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
9448 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
9449   echo $ECHO_N "(cached) $ECHO_C" >&6
9450 else
9451   cat >conftest.$ac_ext <<_ACEOF
9452 #line $LINENO "configure"
9453 /* confdefs.h.  */
9454 _ACEOF
9455 cat confdefs.h >>conftest.$ac_ext
9456 cat >>conftest.$ac_ext <<_ACEOF
9457 /* end confdefs.h.  */
9458 #include <X11/Xlib.h>
9459
9460 #include <X11/extensions/xidle.h>
9461 _ACEOF
9462 rm -f conftest.$ac_objext
9463 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9464   (eval $ac_compile) 2>&5
9465   ac_status=$?
9466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9467   (exit $ac_status); } &&
9468          { ac_try='test -s conftest.$ac_objext'
9469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9470   (eval $ac_try) 2>&5
9471   ac_status=$?
9472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9473   (exit $ac_status); }; }; then
9474   ac_cv_header_X11_extensions_xidle_h=yes
9475 else
9476   echo "$as_me: failed program was:" >&5
9477 sed 's/^/| /' conftest.$ac_ext >&5
9478
9479 ac_cv_header_X11_extensions_xidle_h=no
9480 fi
9481 rm -f conftest.$ac_objext conftest.$ac_ext
9482 fi
9483 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
9484 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
9485 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
9486   have_xidle=yes
9487                      cat >>confdefs.h <<\_ACEOF
9488 #define HAVE_XIDLE_EXTENSION 1
9489 _ACEOF
9490
9491 fi
9492
9493
9494   CPPFLAGS="$ac_save_CPPFLAGS"
9495 elif test "$with_xidle" != no; then
9496   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
9497   exit 1
9498 fi
9499
9500
9501 ###############################################################################
9502 #
9503 #       Check for the SGI-VIDEO-CONTROL server extension.
9504 #
9505 ###############################################################################
9506
9507 have_sgivc=no
9508 with_sgivc_req=unspecified
9509
9510 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
9511 if test "${with_sgivc_ext+set}" = set; then
9512   withval="$with_sgivc_ext"
9513   with_sgivc="$withval"; with_sgivc_req="$withval"
9514 else
9515   with_sgivc=yes
9516 fi;
9517
9518
9519    case "$with_sgivc" in
9520     yes) ;;
9521     no)  ;;
9522
9523     /*)
9524      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
9525 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
9526      d=$with_sgivc/include
9527      if test -d $d; then
9528        X_CFLAGS="-I$d $X_CFLAGS"
9529        echo "$as_me:$LINENO: result: $d" >&5
9530 echo "${ECHO_T}$d" >&6
9531      else
9532        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9533 echo "${ECHO_T}not found ($d: no such directory)" >&6
9534      fi
9535
9536      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
9537 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
9538      d=$with_sgivc/lib
9539      if test -d $d; then
9540        X_LIBS="-L$d $X_LIBS"
9541        echo "$as_me:$LINENO: result: $d" >&5
9542 echo "${ECHO_T}$d" >&6
9543      else
9544        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9545 echo "${ECHO_T}not found ($d: no such directory)" >&6
9546      fi
9547
9548      # replace the directory string with "yes".
9549      with_sgivc_req="yes"
9550      with_sgivc=$with_sgivc_req
9551      ;;
9552
9553     *)
9554      echo ""
9555      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
9556      echo "       If it is a directory, then \`DIR/include' will be added to"
9557      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9558      exit 1
9559      ;;
9560    esac
9561
9562
9563 if test "$with_sgivc" = yes; then
9564
9565   # first check for XSGIvc.h
9566
9567   ac_save_CPPFLAGS="$CPPFLAGS"
9568   if test \! -z "$includedir" ; then
9569     CPPFLAGS="$CPPFLAGS -I$includedir"
9570   fi
9571   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9572   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
9573 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
9574 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
9575   echo $ECHO_N "(cached) $ECHO_C" >&6
9576 else
9577   cat >conftest.$ac_ext <<_ACEOF
9578 #line $LINENO "configure"
9579 /* confdefs.h.  */
9580 _ACEOF
9581 cat confdefs.h >>conftest.$ac_ext
9582 cat >>conftest.$ac_ext <<_ACEOF
9583 /* end confdefs.h.  */
9584 #include <X11/Xlib.h>
9585
9586 #include <X11/extensions/XSGIvc.h>
9587 _ACEOF
9588 rm -f conftest.$ac_objext
9589 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9590   (eval $ac_compile) 2>&5
9591   ac_status=$?
9592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9593   (exit $ac_status); } &&
9594          { ac_try='test -s conftest.$ac_objext'
9595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9596   (eval $ac_try) 2>&5
9597   ac_status=$?
9598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9599   (exit $ac_status); }; }; then
9600   ac_cv_header_X11_extensions_XSGIvc_h=yes
9601 else
9602   echo "$as_me: failed program was:" >&5
9603 sed 's/^/| /' conftest.$ac_ext >&5
9604
9605 ac_cv_header_X11_extensions_XSGIvc_h=no
9606 fi
9607 rm -f conftest.$ac_objext conftest.$ac_ext
9608 fi
9609 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
9610 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
9611 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
9612   have_sgivc=yes
9613 fi
9614
9615
9616   CPPFLAGS="$ac_save_CPPFLAGS"
9617
9618   # if that succeeded, then check for the -lXsgivc
9619   if test "$have_sgivc" = yes; then
9620     have_sgivc=no
9621
9622   ac_save_CPPFLAGS="$CPPFLAGS"
9623   ac_save_LDFLAGS="$LDFLAGS"
9624 #  ac_save_LIBS="$LIBS"
9625
9626   if test \! -z "$includedir" ; then
9627     CPPFLAGS="$CPPFLAGS -I$includedir"
9628   fi
9629   # note: $X_CFLAGS includes $x_includes
9630   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9631
9632   if test \! -z "$libdir" ; then
9633     LDFLAGS="$LDFLAGS -L$libdir"
9634   fi
9635   # note: $X_LIBS includes $x_libraries
9636   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9637
9638   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
9639 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
9640 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
9641   echo $ECHO_N "(cached) $ECHO_C" >&6
9642 else
9643   ac_check_lib_save_LIBS=$LIBS
9644 LIBS="-lXsgivc -lXext -lX11 $LIBS"
9645 cat >conftest.$ac_ext <<_ACEOF
9646 #line $LINENO "configure"
9647 /* confdefs.h.  */
9648 _ACEOF
9649 cat confdefs.h >>conftest.$ac_ext
9650 cat >>conftest.$ac_ext <<_ACEOF
9651 /* end confdefs.h.  */
9652
9653 /* Override any gcc2 internal prototype to avoid an error.  */
9654 #ifdef __cplusplus
9655 extern "C"
9656 #endif
9657 /* We use char because int might match the return type of a gcc2
9658    builtin and then its argument prototype would still apply.  */
9659 char XSGIvcQueryGammaMap ();
9660 int
9661 main ()
9662 {
9663 XSGIvcQueryGammaMap ();
9664   ;
9665   return 0;
9666 }
9667 _ACEOF
9668 rm -f conftest.$ac_objext conftest$ac_exeext
9669 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9670   (eval $ac_link) 2>&5
9671   ac_status=$?
9672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9673   (exit $ac_status); } &&
9674          { ac_try='test -s conftest$ac_exeext'
9675   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9676   (eval $ac_try) 2>&5
9677   ac_status=$?
9678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9679   (exit $ac_status); }; }; then
9680   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
9681 else
9682   echo "$as_me: failed program was:" >&5
9683 sed 's/^/| /' conftest.$ac_ext >&5
9684
9685 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
9686 fi
9687 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9688 LIBS=$ac_check_lib_save_LIBS
9689 fi
9690 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
9691 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
9692 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
9693   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
9694 else
9695   true
9696 fi
9697
9698   CPPFLAGS="$ac_save_CPPFLAGS"
9699   LDFLAGS="$ac_save_LDFLAGS"
9700 #  LIBS="$ac_save_LIBS"
9701
9702   fi
9703
9704   # if that succeeded, then we've really got it.
9705   if test "$have_sgivc" = yes; then
9706     cat >>confdefs.h <<\_ACEOF
9707 #define HAVE_SGI_VC_EXTENSION 1
9708 _ACEOF
9709
9710   fi
9711
9712 elif test "$with_sgivc" != no; then
9713   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
9714   exit 1
9715 fi
9716
9717
9718 ###############################################################################
9719 #
9720 #       Check for the DPMS server extension.
9721 #
9722 ###############################################################################
9723
9724 have_dpms=no
9725 with_dpms_req=unspecified
9726
9727 # Check whether --with-dpms-ext or --without-dpms-ext was given.
9728 if test "${with_dpms_ext+set}" = set; then
9729   withval="$with_dpms_ext"
9730   with_dpms="$withval"; with_dpms_req="$withval"
9731 else
9732   with_dpms=yes
9733 fi;
9734
9735
9736    case "$with_dpms" in
9737     yes) ;;
9738     no)  ;;
9739
9740     /*)
9741      echo "$as_me:$LINENO: checking for DPMS headers" >&5
9742 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
9743      d=$with_dpms/include
9744      if test -d $d; then
9745        X_CFLAGS="-I$d $X_CFLAGS"
9746        echo "$as_me:$LINENO: result: $d" >&5
9747 echo "${ECHO_T}$d" >&6
9748      else
9749        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9750 echo "${ECHO_T}not found ($d: no such directory)" >&6
9751      fi
9752
9753      echo "$as_me:$LINENO: checking for DPMS libs" >&5
9754 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
9755      d=$with_dpms/lib
9756      if test -d $d; then
9757        X_LIBS="-L$d $X_LIBS"
9758        echo "$as_me:$LINENO: result: $d" >&5
9759 echo "${ECHO_T}$d" >&6
9760      else
9761        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9762 echo "${ECHO_T}not found ($d: no such directory)" >&6
9763      fi
9764
9765      # replace the directory string with "yes".
9766      with_dpms_req="yes"
9767      with_dpms=$with_dpms_req
9768      ;;
9769
9770     *)
9771      echo ""
9772      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
9773      echo "       If it is a directory, then \`DIR/include' will be added to"
9774      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9775      exit 1
9776      ;;
9777    esac
9778
9779
9780 if test "$with_dpms" = yes; then
9781
9782   # first check for dpms.h
9783
9784   ac_save_CPPFLAGS="$CPPFLAGS"
9785   if test \! -z "$includedir" ; then
9786     CPPFLAGS="$CPPFLAGS -I$includedir"
9787   fi
9788   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9789   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
9790 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
9791 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
9792   echo $ECHO_N "(cached) $ECHO_C" >&6
9793 else
9794   cat >conftest.$ac_ext <<_ACEOF
9795 #line $LINENO "configure"
9796 /* confdefs.h.  */
9797 _ACEOF
9798 cat confdefs.h >>conftest.$ac_ext
9799 cat >>conftest.$ac_ext <<_ACEOF
9800 /* end confdefs.h.  */
9801 #include <X11/Xlib.h>
9802                      #include <X11/Xmd.h>
9803
9804 #include <X11/extensions/dpms.h>
9805 _ACEOF
9806 rm -f conftest.$ac_objext
9807 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9808   (eval $ac_compile) 2>&5
9809   ac_status=$?
9810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9811   (exit $ac_status); } &&
9812          { ac_try='test -s conftest.$ac_objext'
9813   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9814   (eval $ac_try) 2>&5
9815   ac_status=$?
9816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9817   (exit $ac_status); }; }; then
9818   ac_cv_header_X11_extensions_dpms_h=yes
9819 else
9820   echo "$as_me: failed program was:" >&5
9821 sed 's/^/| /' conftest.$ac_ext >&5
9822
9823 ac_cv_header_X11_extensions_dpms_h=no
9824 fi
9825 rm -f conftest.$ac_objext conftest.$ac_ext
9826 fi
9827 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
9828 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
9829 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
9830   have_dpms=yes
9831 fi
9832
9833
9834   CPPFLAGS="$ac_save_CPPFLAGS"
9835
9836   # if that succeeded, then check for the DPMS code in the libraries
9837   if test "$have_dpms" = yes; then
9838
9839     # first look in -lXext (this is where it is with XFree86 4.0)
9840     have_dpms=no
9841
9842   ac_save_CPPFLAGS="$CPPFLAGS"
9843   ac_save_LDFLAGS="$LDFLAGS"
9844 #  ac_save_LIBS="$LIBS"
9845
9846   if test \! -z "$includedir" ; then
9847     CPPFLAGS="$CPPFLAGS -I$includedir"
9848   fi
9849   # note: $X_CFLAGS includes $x_includes
9850   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9851
9852   if test \! -z "$libdir" ; then
9853     LDFLAGS="$LDFLAGS -L$libdir"
9854   fi
9855   # note: $X_LIBS includes $x_libraries
9856   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9857
9858   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
9859 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
9860 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
9861   echo $ECHO_N "(cached) $ECHO_C" >&6
9862 else
9863   ac_check_lib_save_LIBS=$LIBS
9864 LIBS="-lXext -lXext -lX11 $LIBS"
9865 cat >conftest.$ac_ext <<_ACEOF
9866 #line $LINENO "configure"
9867 /* confdefs.h.  */
9868 _ACEOF
9869 cat confdefs.h >>conftest.$ac_ext
9870 cat >>conftest.$ac_ext <<_ACEOF
9871 /* end confdefs.h.  */
9872
9873 /* Override any gcc2 internal prototype to avoid an error.  */
9874 #ifdef __cplusplus
9875 extern "C"
9876 #endif
9877 /* We use char because int might match the return type of a gcc2
9878    builtin and then its argument prototype would still apply.  */
9879 char DPMSInfo ();
9880 int
9881 main ()
9882 {
9883 DPMSInfo ();
9884   ;
9885   return 0;
9886 }
9887 _ACEOF
9888 rm -f conftest.$ac_objext conftest$ac_exeext
9889 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9890   (eval $ac_link) 2>&5
9891   ac_status=$?
9892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9893   (exit $ac_status); } &&
9894          { ac_try='test -s conftest$ac_exeext'
9895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9896   (eval $ac_try) 2>&5
9897   ac_status=$?
9898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9899   (exit $ac_status); }; }; then
9900   ac_cv_lib_Xext_DPMSInfo=yes
9901 else
9902   echo "$as_me: failed program was:" >&5
9903 sed 's/^/| /' conftest.$ac_ext >&5
9904
9905 ac_cv_lib_Xext_DPMSInfo=no
9906 fi
9907 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9908 LIBS=$ac_check_lib_save_LIBS
9909 fi
9910 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
9911 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
9912 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
9913   have_dpms=yes
9914 else
9915   true
9916 fi
9917
9918   CPPFLAGS="$ac_save_CPPFLAGS"
9919   LDFLAGS="$ac_save_LDFLAGS"
9920 #  LIBS="$ac_save_LIBS"
9921
9922
9923     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
9924     if test "$have_dpms" = no; then
9925
9926   ac_save_CPPFLAGS="$CPPFLAGS"
9927   ac_save_LDFLAGS="$LDFLAGS"
9928 #  ac_save_LIBS="$LIBS"
9929
9930   if test \! -z "$includedir" ; then
9931     CPPFLAGS="$CPPFLAGS -I$includedir"
9932   fi
9933   # note: $X_CFLAGS includes $x_includes
9934   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9935
9936   if test \! -z "$libdir" ; then
9937     LDFLAGS="$LDFLAGS -L$libdir"
9938   fi
9939   # note: $X_LIBS includes $x_libraries
9940   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9941
9942   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
9943 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
9944 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
9945   echo $ECHO_N "(cached) $ECHO_C" >&6
9946 else
9947   ac_check_lib_save_LIBS=$LIBS
9948 LIBS="-lXdpms -lXext -lX11 $LIBS"
9949 cat >conftest.$ac_ext <<_ACEOF
9950 #line $LINENO "configure"
9951 /* confdefs.h.  */
9952 _ACEOF
9953 cat confdefs.h >>conftest.$ac_ext
9954 cat >>conftest.$ac_ext <<_ACEOF
9955 /* end confdefs.h.  */
9956
9957 /* Override any gcc2 internal prototype to avoid an error.  */
9958 #ifdef __cplusplus
9959 extern "C"
9960 #endif
9961 /* We use char because int might match the return type of a gcc2
9962    builtin and then its argument prototype would still apply.  */
9963 char DPMSInfo ();
9964 int
9965 main ()
9966 {
9967 DPMSInfo ();
9968   ;
9969   return 0;
9970 }
9971 _ACEOF
9972 rm -f conftest.$ac_objext conftest$ac_exeext
9973 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9974   (eval $ac_link) 2>&5
9975   ac_status=$?
9976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9977   (exit $ac_status); } &&
9978          { ac_try='test -s conftest$ac_exeext'
9979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9980   (eval $ac_try) 2>&5
9981   ac_status=$?
9982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9983   (exit $ac_status); }; }; then
9984   ac_cv_lib_Xdpms_DPMSInfo=yes
9985 else
9986   echo "$as_me: failed program was:" >&5
9987 sed 's/^/| /' conftest.$ac_ext >&5
9988
9989 ac_cv_lib_Xdpms_DPMSInfo=no
9990 fi
9991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9992 LIBS=$ac_check_lib_save_LIBS
9993 fi
9994 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
9995 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
9996 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
9997   have_dpms=yes; XDPMS_LIBS="-lXdpms"
9998 else
9999   true
10000 fi
10001
10002   CPPFLAGS="$ac_save_CPPFLAGS"
10003   LDFLAGS="$ac_save_LDFLAGS"
10004 #  LIBS="$ac_save_LIBS"
10005
10006     fi
10007   fi
10008
10009
10010   # if that succeeded, then we've really got it.
10011   if test "$have_dpms" = yes; then
10012     cat >>confdefs.h <<\_ACEOF
10013 #define HAVE_DPMS_EXTENSION 1
10014 _ACEOF
10015
10016   fi
10017
10018 elif test "$with_dpms" != no; then
10019   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
10020   exit 1
10021 fi
10022
10023
10024 ###############################################################################
10025 #
10026 #       Check for the XINERAMA server extension.
10027 #
10028 ###############################################################################
10029
10030 have_xinerama=no
10031 with_xinerama_req=unspecified
10032
10033 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
10034 if test "${with_xinerama_ext+set}" = set; then
10035   withval="$with_xinerama_ext"
10036   with_xinerama="$withval"; with_xinerama_req="$withval"
10037 else
10038   with_xinerama=yes
10039 fi;
10040
10041
10042    case "$with_xinerama" in
10043     yes) ;;
10044     no)  ;;
10045
10046     /*)
10047      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
10048 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
10049      d=$with_xinerama/include
10050      if test -d $d; then
10051        X_CFLAGS="-I$d $X_CFLAGS"
10052        echo "$as_me:$LINENO: result: $d" >&5
10053 echo "${ECHO_T}$d" >&6
10054      else
10055        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10056 echo "${ECHO_T}not found ($d: no such directory)" >&6
10057      fi
10058
10059      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
10060 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
10061      d=$with_xinerama/lib
10062      if test -d $d; then
10063        X_LIBS="-L$d $X_LIBS"
10064        echo "$as_me:$LINENO: result: $d" >&5
10065 echo "${ECHO_T}$d" >&6
10066      else
10067        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10068 echo "${ECHO_T}not found ($d: no such directory)" >&6
10069      fi
10070
10071      # replace the directory string with "yes".
10072      with_xinerama_req="yes"
10073      with_xinerama=$with_xinerama_req
10074      ;;
10075
10076     *)
10077      echo ""
10078      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
10079      echo "       If it is a directory, then \`DIR/include' will be added to"
10080      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10081      exit 1
10082      ;;
10083    esac
10084
10085
10086 if test "$with_xinerama" = yes; then
10087
10088   # first check for Xinerama.h
10089
10090   ac_save_CPPFLAGS="$CPPFLAGS"
10091   if test \! -z "$includedir" ; then
10092     CPPFLAGS="$CPPFLAGS -I$includedir"
10093   fi
10094   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10095   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
10096 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
10097 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
10098   echo $ECHO_N "(cached) $ECHO_C" >&6
10099 else
10100   cat >conftest.$ac_ext <<_ACEOF
10101 #line $LINENO "configure"
10102 /* confdefs.h.  */
10103 _ACEOF
10104 cat confdefs.h >>conftest.$ac_ext
10105 cat >>conftest.$ac_ext <<_ACEOF
10106 /* end confdefs.h.  */
10107 #include <X11/Xlib.h>
10108
10109 #include <X11/extensions/Xinerama.h>
10110 _ACEOF
10111 rm -f conftest.$ac_objext
10112 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10113   (eval $ac_compile) 2>&5
10114   ac_status=$?
10115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10116   (exit $ac_status); } &&
10117          { ac_try='test -s conftest.$ac_objext'
10118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10119   (eval $ac_try) 2>&5
10120   ac_status=$?
10121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10122   (exit $ac_status); }; }; then
10123   ac_cv_header_X11_extensions_Xinerama_h=yes
10124 else
10125   echo "$as_me: failed program was:" >&5
10126 sed 's/^/| /' conftest.$ac_ext >&5
10127
10128 ac_cv_header_X11_extensions_Xinerama_h=no
10129 fi
10130 rm -f conftest.$ac_objext conftest.$ac_ext
10131 fi
10132 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
10133 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
10134 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
10135   have_xinerama=yes
10136 fi
10137
10138
10139   CPPFLAGS="$ac_save_CPPFLAGS"
10140
10141   # if that succeeded, then check for the XINERAMA code in the libraries
10142   if test "$have_xinerama" = yes; then
10143
10144     # first look in -lXext
10145     have_xinerama=no
10146
10147   ac_save_CPPFLAGS="$CPPFLAGS"
10148   ac_save_LDFLAGS="$LDFLAGS"
10149 #  ac_save_LIBS="$LIBS"
10150
10151   if test \! -z "$includedir" ; then
10152     CPPFLAGS="$CPPFLAGS -I$includedir"
10153   fi
10154   # note: $X_CFLAGS includes $x_includes
10155   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10156
10157   if test \! -z "$libdir" ; then
10158     LDFLAGS="$LDFLAGS -L$libdir"
10159   fi
10160   # note: $X_LIBS includes $x_libraries
10161   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10162
10163   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXext" >&5
10164 echo $ECHO_N "checking for XineramaQueryExtension in -lXext... $ECHO_C" >&6
10165 if test "${ac_cv_lib_Xext_XineramaQueryExtension+set}" = set; then
10166   echo $ECHO_N "(cached) $ECHO_C" >&6
10167 else
10168   ac_check_lib_save_LIBS=$LIBS
10169 LIBS="-lXext -lXext -lX11 $LIBS"
10170 cat >conftest.$ac_ext <<_ACEOF
10171 #line $LINENO "configure"
10172 /* confdefs.h.  */
10173 _ACEOF
10174 cat confdefs.h >>conftest.$ac_ext
10175 cat >>conftest.$ac_ext <<_ACEOF
10176 /* end confdefs.h.  */
10177
10178 /* Override any gcc2 internal prototype to avoid an error.  */
10179 #ifdef __cplusplus
10180 extern "C"
10181 #endif
10182 /* We use char because int might match the return type of a gcc2
10183    builtin and then its argument prototype would still apply.  */
10184 char XineramaQueryExtension ();
10185 int
10186 main ()
10187 {
10188 XineramaQueryExtension ();
10189   ;
10190   return 0;
10191 }
10192 _ACEOF
10193 rm -f conftest.$ac_objext conftest$ac_exeext
10194 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10195   (eval $ac_link) 2>&5
10196   ac_status=$?
10197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10198   (exit $ac_status); } &&
10199          { ac_try='test -s conftest$ac_exeext'
10200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10201   (eval $ac_try) 2>&5
10202   ac_status=$?
10203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10204   (exit $ac_status); }; }; then
10205   ac_cv_lib_Xext_XineramaQueryExtension=yes
10206 else
10207   echo "$as_me: failed program was:" >&5
10208 sed 's/^/| /' conftest.$ac_ext >&5
10209
10210 ac_cv_lib_Xext_XineramaQueryExtension=no
10211 fi
10212 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10213 LIBS=$ac_check_lib_save_LIBS
10214 fi
10215 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryExtension" >&5
10216 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryExtension" >&6
10217 if test $ac_cv_lib_Xext_XineramaQueryExtension = yes; then
10218   have_xinerama=yes
10219 else
10220   true
10221 fi
10222
10223   CPPFLAGS="$ac_save_CPPFLAGS"
10224   LDFLAGS="$ac_save_LDFLAGS"
10225 #  LIBS="$ac_save_LIBS"
10226
10227
10228     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
10229     if test "$have_xinerama" = no; then
10230
10231   ac_save_CPPFLAGS="$CPPFLAGS"
10232   ac_save_LDFLAGS="$LDFLAGS"
10233 #  ac_save_LIBS="$LIBS"
10234
10235   if test \! -z "$includedir" ; then
10236     CPPFLAGS="$CPPFLAGS -I$includedir"
10237   fi
10238   # note: $X_CFLAGS includes $x_includes
10239   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10240
10241   if test \! -z "$libdir" ; then
10242     LDFLAGS="$LDFLAGS -L$libdir"
10243   fi
10244   # note: $X_LIBS includes $x_libraries
10245   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10246
10247   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXinerama" >&5
10248 echo $ECHO_N "checking for XineramaQueryExtension in -lXinerama... $ECHO_C" >&6
10249 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then
10250   echo $ECHO_N "(cached) $ECHO_C" >&6
10251 else
10252   ac_check_lib_save_LIBS=$LIBS
10253 LIBS="-lXinerama -lXext -lX11 $LIBS"
10254 cat >conftest.$ac_ext <<_ACEOF
10255 #line $LINENO "configure"
10256 /* confdefs.h.  */
10257 _ACEOF
10258 cat confdefs.h >>conftest.$ac_ext
10259 cat >>conftest.$ac_ext <<_ACEOF
10260 /* end confdefs.h.  */
10261
10262 /* Override any gcc2 internal prototype to avoid an error.  */
10263 #ifdef __cplusplus
10264 extern "C"
10265 #endif
10266 /* We use char because int might match the return type of a gcc2
10267    builtin and then its argument prototype would still apply.  */
10268 char XineramaQueryExtension ();
10269 int
10270 main ()
10271 {
10272 XineramaQueryExtension ();
10273   ;
10274   return 0;
10275 }
10276 _ACEOF
10277 rm -f conftest.$ac_objext conftest$ac_exeext
10278 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10279   (eval $ac_link) 2>&5
10280   ac_status=$?
10281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10282   (exit $ac_status); } &&
10283          { ac_try='test -s conftest$ac_exeext'
10284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10285   (eval $ac_try) 2>&5
10286   ac_status=$?
10287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10288   (exit $ac_status); }; }; then
10289   ac_cv_lib_Xinerama_XineramaQueryExtension=yes
10290 else
10291   echo "$as_me: failed program was:" >&5
10292 sed 's/^/| /' conftest.$ac_ext >&5
10293
10294 ac_cv_lib_Xinerama_XineramaQueryExtension=no
10295 fi
10296 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10297 LIBS=$ac_check_lib_save_LIBS
10298 fi
10299 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
10300 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6
10301 if test $ac_cv_lib_Xinerama_XineramaQueryExtension = yes; then
10302   have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"
10303 else
10304   true
10305 fi
10306
10307   CPPFLAGS="$ac_save_CPPFLAGS"
10308   LDFLAGS="$ac_save_LDFLAGS"
10309 #  LIBS="$ac_save_LIBS"
10310
10311     fi
10312   fi
10313
10314   # if that succeeded, then we've really got it.
10315   if test "$have_xinerama" = yes; then
10316     cat >>confdefs.h <<\_ACEOF
10317 #define HAVE_XINERAMA 1
10318 _ACEOF
10319
10320   fi
10321
10322 elif test "$with_xinerama" != no; then
10323   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
10324   exit 1
10325 fi
10326
10327
10328 ###############################################################################
10329 #
10330 #       Check for the XF86VMODE server extension (for virtual screens.)
10331 #
10332 ###############################################################################
10333
10334 have_xf86vmode=no
10335 with_xf86vmode_req=unspecified
10336
10337 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
10338 if test "${with_xf86vmode_ext+set}" = set; then
10339   withval="$with_xf86vmode_ext"
10340   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
10341 else
10342   with_xf86vmode=yes
10343 fi;
10344
10345
10346    case "$with_xf86vmode" in
10347     yes) ;;
10348     no)  ;;
10349
10350     /*)
10351      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
10352 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
10353      d=$with_xf86vmode/include
10354      if test -d $d; then
10355        X_CFLAGS="-I$d $X_CFLAGS"
10356        echo "$as_me:$LINENO: result: $d" >&5
10357 echo "${ECHO_T}$d" >&6
10358      else
10359        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10360 echo "${ECHO_T}not found ($d: no such directory)" >&6
10361      fi
10362
10363      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
10364 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
10365      d=$with_xf86vmode/lib
10366      if test -d $d; then
10367        X_LIBS="-L$d $X_LIBS"
10368        echo "$as_me:$LINENO: result: $d" >&5
10369 echo "${ECHO_T}$d" >&6
10370      else
10371        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10372 echo "${ECHO_T}not found ($d: no such directory)" >&6
10373      fi
10374
10375      # replace the directory string with "yes".
10376      with_xf86vmode_req="yes"
10377      with_xf86vmode=$with_xf86vmode_req
10378      ;;
10379
10380     *)
10381      echo ""
10382      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
10383      echo "       If it is a directory, then \`DIR/include' will be added to"
10384      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10385      exit 1
10386      ;;
10387    esac
10388
10389
10390 if test "$with_xf86vmode" = yes; then
10391
10392   # first check for xf86vmode.h
10393
10394   ac_save_CPPFLAGS="$CPPFLAGS"
10395   if test \! -z "$includedir" ; then
10396     CPPFLAGS="$CPPFLAGS -I$includedir"
10397   fi
10398   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10399   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10400 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10401 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10402   echo $ECHO_N "(cached) $ECHO_C" >&6
10403 else
10404   cat >conftest.$ac_ext <<_ACEOF
10405 #line $LINENO "configure"
10406 /* confdefs.h.  */
10407 _ACEOF
10408 cat confdefs.h >>conftest.$ac_ext
10409 cat >>conftest.$ac_ext <<_ACEOF
10410 /* end confdefs.h.  */
10411 #include <X11/Xlib.h>
10412
10413 #include <X11/extensions/xf86vmode.h>
10414 _ACEOF
10415 rm -f conftest.$ac_objext
10416 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10417   (eval $ac_compile) 2>&5
10418   ac_status=$?
10419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10420   (exit $ac_status); } &&
10421          { ac_try='test -s conftest.$ac_objext'
10422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10423   (eval $ac_try) 2>&5
10424   ac_status=$?
10425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10426   (exit $ac_status); }; }; then
10427   ac_cv_header_X11_extensions_xf86vmode_h=yes
10428 else
10429   echo "$as_me: failed program was:" >&5
10430 sed 's/^/| /' conftest.$ac_ext >&5
10431
10432 ac_cv_header_X11_extensions_xf86vmode_h=no
10433 fi
10434 rm -f conftest.$ac_objext conftest.$ac_ext
10435 fi
10436 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10437 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10438 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10439   have_xf86vmode=yes
10440 fi
10441
10442
10443   CPPFLAGS="$ac_save_CPPFLAGS"
10444
10445   # if that succeeded, then check for the -lXxf86vm
10446   if test "$have_xf86vmode" = yes; then
10447     have_xf86vmode=no
10448
10449   ac_save_CPPFLAGS="$CPPFLAGS"
10450   ac_save_LDFLAGS="$LDFLAGS"
10451 #  ac_save_LIBS="$LIBS"
10452
10453   if test \! -z "$includedir" ; then
10454     CPPFLAGS="$CPPFLAGS -I$includedir"
10455   fi
10456   # note: $X_CFLAGS includes $x_includes
10457   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10458
10459   if test \! -z "$libdir" ; then
10460     LDFLAGS="$LDFLAGS -L$libdir"
10461   fi
10462   # note: $X_LIBS includes $x_libraries
10463   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10464
10465   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
10466 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
10467 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
10468   echo $ECHO_N "(cached) $ECHO_C" >&6
10469 else
10470   ac_check_lib_save_LIBS=$LIBS
10471 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10472 cat >conftest.$ac_ext <<_ACEOF
10473 #line $LINENO "configure"
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 XF86VidModeGetViewPort ();
10487 int
10488 main ()
10489 {
10490 XF86VidModeGetViewPort ();
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>&5
10498   ac_status=$?
10499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10500   (exit $ac_status); } &&
10501          { ac_try='test -s conftest$ac_exeext'
10502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10503   (eval $ac_try) 2>&5
10504   ac_status=$?
10505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10506   (exit $ac_status); }; }; then
10507   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
10508 else
10509   echo "$as_me: failed program was:" >&5
10510 sed 's/^/| /' conftest.$ac_ext >&5
10511
10512 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
10513 fi
10514 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10515 LIBS=$ac_check_lib_save_LIBS
10516 fi
10517 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
10518 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
10519 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
10520   have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10521 else
10522   true
10523 fi
10524
10525   CPPFLAGS="$ac_save_CPPFLAGS"
10526   LDFLAGS="$ac_save_LDFLAGS"
10527 #  LIBS="$ac_save_LIBS"
10528
10529   fi
10530
10531   # if that succeeded, then we've really got it.
10532   if test "$have_xf86vmode" = yes; then
10533     cat >>confdefs.h <<\_ACEOF
10534 #define HAVE_XF86VMODE 1
10535 _ACEOF
10536
10537   fi
10538
10539 elif test "$with_xf86vmode" != no; then
10540   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
10541   exit 1
10542 fi
10543
10544
10545 ###############################################################################
10546 #
10547 #       Check for the XF86VMODE server extension (for gamma fading.)
10548 #
10549 ###############################################################################
10550
10551 have_xf86gamma=no
10552 have_xf86gamma_ramp=no
10553 with_xf86gamma_req=unspecified
10554
10555 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
10556 if test "${with_xf86gamma_ext+set}" = set; then
10557   withval="$with_xf86gamma_ext"
10558   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
10559 else
10560   with_xf86gamma=yes
10561 fi;
10562
10563
10564    case "$with_xf86gamma" in
10565     yes) ;;
10566     no)  ;;
10567
10568     /*)
10569      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
10570 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
10571      d=$with_xf86gamma/include
10572      if test -d $d; then
10573        X_CFLAGS="-I$d $X_CFLAGS"
10574        echo "$as_me:$LINENO: result: $d" >&5
10575 echo "${ECHO_T}$d" >&6
10576      else
10577        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10578 echo "${ECHO_T}not found ($d: no such directory)" >&6
10579      fi
10580
10581      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
10582 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
10583      d=$with_xf86gamma/lib
10584      if test -d $d; then
10585        X_LIBS="-L$d $X_LIBS"
10586        echo "$as_me:$LINENO: result: $d" >&5
10587 echo "${ECHO_T}$d" >&6
10588      else
10589        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10590 echo "${ECHO_T}not found ($d: no such directory)" >&6
10591      fi
10592
10593      # replace the directory string with "yes".
10594      with_xf86gamma_req="yes"
10595      with_xf86gamma=$with_xf86gamma_req
10596      ;;
10597
10598     *)
10599      echo ""
10600      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
10601      echo "       If it is a directory, then \`DIR/include' will be added to"
10602      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10603      exit 1
10604      ;;
10605    esac
10606
10607
10608 if test "$with_xf86gamma" = yes; then
10609
10610   # first check for xf86vmode.h, if we haven't already
10611   if test "$have_xf86vmode" = yes; then
10612     have_xf86gamma=yes
10613   else
10614
10615   ac_save_CPPFLAGS="$CPPFLAGS"
10616   if test \! -z "$includedir" ; then
10617     CPPFLAGS="$CPPFLAGS -I$includedir"
10618   fi
10619   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10620   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10621 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10622 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10623   echo $ECHO_N "(cached) $ECHO_C" >&6
10624 else
10625   cat >conftest.$ac_ext <<_ACEOF
10626 #line $LINENO "configure"
10627 /* confdefs.h.  */
10628 _ACEOF
10629 cat confdefs.h >>conftest.$ac_ext
10630 cat >>conftest.$ac_ext <<_ACEOF
10631 /* end confdefs.h.  */
10632 #include <X11/Xlib.h>
10633
10634 #include <X11/extensions/xf86vmode.h>
10635 _ACEOF
10636 rm -f conftest.$ac_objext
10637 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10638   (eval $ac_compile) 2>&5
10639   ac_status=$?
10640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10641   (exit $ac_status); } &&
10642          { ac_try='test -s conftest.$ac_objext'
10643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10644   (eval $ac_try) 2>&5
10645   ac_status=$?
10646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10647   (exit $ac_status); }; }; then
10648   ac_cv_header_X11_extensions_xf86vmode_h=yes
10649 else
10650   echo "$as_me: failed program was:" >&5
10651 sed 's/^/| /' conftest.$ac_ext >&5
10652
10653 ac_cv_header_X11_extensions_xf86vmode_h=no
10654 fi
10655 rm -f conftest.$ac_objext conftest.$ac_ext
10656 fi
10657 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10658 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10659 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10660   have_xf86gamma=yes
10661 fi
10662
10663
10664   CPPFLAGS="$ac_save_CPPFLAGS"
10665   fi
10666
10667   # if that succeeded, then check for the -lXxf86vm
10668   if test "$have_xf86gamma" = yes; then
10669     have_xf86gamma=no
10670
10671   ac_save_CPPFLAGS="$CPPFLAGS"
10672   ac_save_LDFLAGS="$LDFLAGS"
10673 #  ac_save_LIBS="$LIBS"
10674
10675   if test \! -z "$includedir" ; then
10676     CPPFLAGS="$CPPFLAGS -I$includedir"
10677   fi
10678   # note: $X_CFLAGS includes $x_includes
10679   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10680
10681   if test \! -z "$libdir" ; then
10682     LDFLAGS="$LDFLAGS -L$libdir"
10683   fi
10684   # note: $X_LIBS includes $x_libraries
10685   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10686
10687   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
10688 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
10689 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
10690   echo $ECHO_N "(cached) $ECHO_C" >&6
10691 else
10692   ac_check_lib_save_LIBS=$LIBS
10693 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10694 cat >conftest.$ac_ext <<_ACEOF
10695 #line $LINENO "configure"
10696 /* confdefs.h.  */
10697 _ACEOF
10698 cat confdefs.h >>conftest.$ac_ext
10699 cat >>conftest.$ac_ext <<_ACEOF
10700 /* end confdefs.h.  */
10701
10702 /* Override any gcc2 internal prototype to avoid an error.  */
10703 #ifdef __cplusplus
10704 extern "C"
10705 #endif
10706 /* We use char because int might match the return type of a gcc2
10707    builtin and then its argument prototype would still apply.  */
10708 char XF86VidModeSetGamma ();
10709 int
10710 main ()
10711 {
10712 XF86VidModeSetGamma ();
10713   ;
10714   return 0;
10715 }
10716 _ACEOF
10717 rm -f conftest.$ac_objext conftest$ac_exeext
10718 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10719   (eval $ac_link) 2>&5
10720   ac_status=$?
10721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10722   (exit $ac_status); } &&
10723          { ac_try='test -s conftest$ac_exeext'
10724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10725   (eval $ac_try) 2>&5
10726   ac_status=$?
10727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10728   (exit $ac_status); }; }; then
10729   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
10730 else
10731   echo "$as_me: failed program was:" >&5
10732 sed 's/^/| /' conftest.$ac_ext >&5
10733
10734 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
10735 fi
10736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10737 LIBS=$ac_check_lib_save_LIBS
10738 fi
10739 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
10740 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
10741 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
10742   have_xf86gamma=yes
10743 else
10744   true
10745 fi
10746
10747   CPPFLAGS="$ac_save_CPPFLAGS"
10748   LDFLAGS="$ac_save_LDFLAGS"
10749 #  LIBS="$ac_save_LIBS"
10750
10751   fi
10752
10753   # check for the Ramp versions of the functions too.
10754   if test "$have_xf86gamma" = yes; then
10755     have_xf86gamma_ramp=no
10756
10757   ac_save_CPPFLAGS="$CPPFLAGS"
10758   ac_save_LDFLAGS="$LDFLAGS"
10759 #  ac_save_LIBS="$LIBS"
10760
10761   if test \! -z "$includedir" ; then
10762     CPPFLAGS="$CPPFLAGS -I$includedir"
10763   fi
10764   # note: $X_CFLAGS includes $x_includes
10765   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10766
10767   if test \! -z "$libdir" ; then
10768     LDFLAGS="$LDFLAGS -L$libdir"
10769   fi
10770   # note: $X_LIBS includes $x_libraries
10771   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10772
10773   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
10774 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
10775 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
10776   echo $ECHO_N "(cached) $ECHO_C" >&6
10777 else
10778   ac_check_lib_save_LIBS=$LIBS
10779 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10780 cat >conftest.$ac_ext <<_ACEOF
10781 #line $LINENO "configure"
10782 /* confdefs.h.  */
10783 _ACEOF
10784 cat confdefs.h >>conftest.$ac_ext
10785 cat >>conftest.$ac_ext <<_ACEOF
10786 /* end confdefs.h.  */
10787
10788 /* Override any gcc2 internal prototype to avoid an error.  */
10789 #ifdef __cplusplus
10790 extern "C"
10791 #endif
10792 /* We use char because int might match the return type of a gcc2
10793    builtin and then its argument prototype would still apply.  */
10794 char XF86VidModeSetGammaRamp ();
10795 int
10796 main ()
10797 {
10798 XF86VidModeSetGammaRamp ();
10799   ;
10800   return 0;
10801 }
10802 _ACEOF
10803 rm -f conftest.$ac_objext conftest$ac_exeext
10804 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10805   (eval $ac_link) 2>&5
10806   ac_status=$?
10807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10808   (exit $ac_status); } &&
10809          { ac_try='test -s conftest$ac_exeext'
10810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10811   (eval $ac_try) 2>&5
10812   ac_status=$?
10813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10814   (exit $ac_status); }; }; then
10815   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
10816 else
10817   echo "$as_me: failed program was:" >&5
10818 sed 's/^/| /' conftest.$ac_ext >&5
10819
10820 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
10821 fi
10822 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10823 LIBS=$ac_check_lib_save_LIBS
10824 fi
10825 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
10826 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
10827 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
10828   have_xf86gamma_ramp=yes
10829 else
10830   true
10831 fi
10832
10833   CPPFLAGS="$ac_save_CPPFLAGS"
10834   LDFLAGS="$ac_save_LDFLAGS"
10835 #  LIBS="$ac_save_LIBS"
10836
10837   fi
10838
10839   # if those tests succeeded, then we've really got the functions.
10840   if test "$have_xf86gamma" = yes; then
10841     cat >>confdefs.h <<\_ACEOF
10842 #define HAVE_XF86VMODE_GAMMA 1
10843 _ACEOF
10844
10845   fi
10846
10847   if test "$have_xf86gamma_ramp" = yes; then
10848     cat >>confdefs.h <<\_ACEOF
10849 #define HAVE_XF86VMODE_GAMMA_RAMP 1
10850 _ACEOF
10851
10852   fi
10853
10854   # pull in the lib, if we haven't already
10855   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
10856     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10857   fi
10858
10859 elif test "$with_xf86gamma" != no; then
10860   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
10861   exit 1
10862 fi
10863
10864
10865 ###############################################################################
10866 #
10867 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
10868 #       using other XF86 stuff.)
10869 #
10870 ###############################################################################
10871
10872 have_xf86miscsetgrabkeysstate=no
10873 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
10874
10875   ac_save_CPPFLAGS="$CPPFLAGS"
10876   ac_save_LDFLAGS="$LDFLAGS"
10877 #  ac_save_LIBS="$LIBS"
10878
10879   if test \! -z "$includedir" ; then
10880     CPPFLAGS="$CPPFLAGS -I$includedir"
10881   fi
10882   # note: $X_CFLAGS includes $x_includes
10883   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10884
10885   if test \! -z "$libdir" ; then
10886     LDFLAGS="$LDFLAGS -L$libdir"
10887   fi
10888   # note: $X_LIBS includes $x_libraries
10889   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10890
10891   echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
10892 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6
10893 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
10894   echo $ECHO_N "(cached) $ECHO_C" >&6
10895 else
10896   ac_check_lib_save_LIBS=$LIBS
10897 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
10898 cat >conftest.$ac_ext <<_ACEOF
10899 #line $LINENO "configure"
10900 /* confdefs.h.  */
10901 _ACEOF
10902 cat confdefs.h >>conftest.$ac_ext
10903 cat >>conftest.$ac_ext <<_ACEOF
10904 /* end confdefs.h.  */
10905
10906 /* Override any gcc2 internal prototype to avoid an error.  */
10907 #ifdef __cplusplus
10908 extern "C"
10909 #endif
10910 /* We use char because int might match the return type of a gcc2
10911    builtin and then its argument prototype would still apply.  */
10912 char XF86MiscSetGrabKeysState ();
10913 int
10914 main ()
10915 {
10916 XF86MiscSetGrabKeysState ();
10917   ;
10918   return 0;
10919 }
10920 _ACEOF
10921 rm -f conftest.$ac_objext conftest$ac_exeext
10922 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10923   (eval $ac_link) 2>&5
10924   ac_status=$?
10925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10926   (exit $ac_status); } &&
10927          { ac_try='test -s conftest$ac_exeext'
10928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10929   (eval $ac_try) 2>&5
10930   ac_status=$?
10931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10932   (exit $ac_status); }; }; then
10933   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
10934 else
10935   echo "$as_me: failed program was:" >&5
10936 sed 's/^/| /' conftest.$ac_ext >&5
10937
10938 ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
10939 fi
10940 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10941 LIBS=$ac_check_lib_save_LIBS
10942 fi
10943 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
10944 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6
10945 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
10946   have_xf86miscsetgrabkeysstate=yes
10947 else
10948   true
10949 fi
10950
10951   CPPFLAGS="$ac_save_CPPFLAGS"
10952   LDFLAGS="$ac_save_LDFLAGS"
10953 #  LIBS="$ac_save_LIBS"
10954
10955   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
10956     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
10957     cat >>confdefs.h <<\_ACEOF
10958 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
10959 _ACEOF
10960
10961   fi
10962 fi
10963
10964
10965 ###############################################################################
10966 #
10967 #       Check for HP XHPDisableReset and XHPEnableReset.
10968 #
10969 ###############################################################################
10970
10971 echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
10972 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6
10973
10974   ac_save_CPPFLAGS="$CPPFLAGS"
10975   if test \! -z "$includedir" ; then
10976     CPPFLAGS="$CPPFLAGS -I$includedir"
10977   fi
10978   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10979   cat >conftest.$ac_ext <<_ACEOF
10980 #line $LINENO "configure"
10981 /* confdefs.h.  */
10982 _ACEOF
10983 cat confdefs.h >>conftest.$ac_ext
10984 cat >>conftest.$ac_ext <<_ACEOF
10985 /* end confdefs.h.  */
10986 #include <X11/XHPlib.h>
10987
10988 _ACEOF
10989 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10990   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
10991   cat >>confdefs.h <<\_ACEOF
10992 #define HAVE_XHPDISABLERESET 1
10993 _ACEOF
10994
10995                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
10996                    echo "$as_me:$LINENO: result: yes" >&5
10997 echo "${ECHO_T}yes" >&6
10998 else
10999   echo "$as_me:$LINENO: result: no" >&5
11000 echo "${ECHO_T}no" >&6
11001 fi
11002 rm -f conftest*
11003
11004   CPPFLAGS="$ac_save_CPPFLAGS"
11005
11006
11007 ###############################################################################
11008 #
11009 #       Check for /proc/interrupts.
11010 #
11011 ###############################################################################
11012
11013 have_proc_interrupts=no
11014 with_proc_interrupts_req=unspecified
11015
11016 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
11017 if test "${with_proc_interrupts+set}" = set; then
11018   withval="$with_proc_interrupts"
11019   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
11020 else
11021   with_proc_interrupts=yes
11022 fi;
11023
11024 if test "$with_proc_interrupts" = yes; then
11025
11026    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
11027 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
11028 if test "${ac_cv_have_proc_interrupts+set}" = set; then
11029   echo $ECHO_N "(cached) $ECHO_C" >&6
11030 else
11031   ac_cv_have_proc_interrupts=no
11032      if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
11033        ac_cv_have_proc_interrupts=yes
11034      fi
11035
11036 fi
11037 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
11038 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
11039    have_proc_interrupts=$ac_cv_have_proc_interrupts
11040
11041   if test "$have_proc_interrupts" = yes; then
11042     cat >>confdefs.h <<\_ACEOF
11043 #define HAVE_PROC_INTERRUPTS 1
11044 _ACEOF
11045
11046   fi
11047
11048 elif test "$with_proc_interrupts" != no; then
11049   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
11050   exit 1
11051 fi
11052
11053
11054 ###############################################################################
11055 #
11056 #       The --enable-locking option
11057 #
11058 ###############################################################################
11059
11060 # Check whether --enable-locking or --disable-locking was given.
11061 if test "${enable_locking+set}" = set; then
11062   enableval="$enable_locking"
11063   enable_locking="$enableval"
11064 else
11065   enable_locking=yes
11066 fi;
11067 if test "$enable_locking" = yes; then
11068   true
11069 elif test "$enable_locking" = no; then
11070   cat >>confdefs.h <<\_ACEOF
11071 #define NO_LOCKING 1
11072 _ACEOF
11073
11074 else
11075   echo "error: must be yes or no: --enable-locking=$enable_locking"
11076   exit 1
11077 fi
11078
11079
11080
11081 ###############################################################################
11082 #
11083 #       The --enable-vt-locking option
11084 #
11085 ###############################################################################
11086
11087 #ac_vt_lockswitch=no
11088 #AC_ARG_ENABLE(vt-locking,[
11089 #  --enable-vt-locking     Compile in support for locking Virtual Terminals.
11090 #                          This is the default if the system supports it, and
11091 #                          if locking support is included (--enable-locking.)
11092 #  --disable-vt-locking    Do not allow locking of VTs, even if locking is
11093 #                          enabled.],
11094 #  [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
11095 #if test "$enable_vt_locking" = yes; then
11096 #
11097 #  AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
11098 #   [AC_TRY_COMPILE([#include <fcntl.h>
11099 #                   #include <sys/ioctl.h>
11100 #                   #include <sys/vt.h>],
11101 #                  [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
11102 #                  [ac_cv_vt_lockswitch=yes],
11103 #                  [ac_cv_vt_lockswitch=no])])
11104 #  ac_vt_lockswitch=$ac_cv_vt_lockswitch
11105 #
11106 #elif test "$enable_vt_locking" = no; then
11107 #  true
11108 #else
11109 #  echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
11110 #  exit 1
11111 #fi
11112 #
11113 #if test "$ac_vt_lockswitch" = yes; then
11114 #  AC_DEFINE(HAVE_VT_LOCKSWITCH)
11115 #  # the VT_LOCKSWITCH ioctl can only be used when running as root.
11116 #  # #### but it doesn't work yet, so don't worry about that for now.
11117 ##  need_setuid=yes
11118 #fi
11119
11120
11121 ###############################################################################
11122 #
11123 #       Check for PAM.
11124 #
11125 ###############################################################################
11126
11127 case "$host" in
11128   *-solaris*)
11129    # Solaris systems tend to come with PAM misconfigured.
11130    #  Don't build it by default, even if the headers exist.
11131    with_pam_default=no
11132    ;;
11133   *)
11134    # Default to building PAM support on all other systems, if it exists.
11135    with_pam_default=yes
11136   ;;
11137 esac
11138
11139 have_pam=no
11140 with_pam_req=unspecified
11141
11142
11143 # Check whether --with-pam or --without-pam was given.
11144 if test "${with_pam+set}" = set; then
11145   withval="$with_pam"
11146   with_pam="$withval"; with_pam_req="$withval"
11147 else
11148   with_pam=$with_pam_default
11149 fi;
11150
11151
11152    case "$with_pam" in
11153     yes) ;;
11154     no)  ;;
11155
11156     /*)
11157      echo "$as_me:$LINENO: checking for PAM headers" >&5
11158 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
11159      d=$with_pam/include
11160      if test -d $d; then
11161        X_CFLAGS="-I$d $X_CFLAGS"
11162        echo "$as_me:$LINENO: result: $d" >&5
11163 echo "${ECHO_T}$d" >&6
11164      else
11165        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11166 echo "${ECHO_T}not found ($d: no such directory)" >&6
11167      fi
11168
11169      echo "$as_me:$LINENO: checking for PAM libs" >&5
11170 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
11171      d=$with_pam/lib
11172      if test -d $d; then
11173        X_LIBS="-L$d $X_LIBS"
11174        echo "$as_me:$LINENO: result: $d" >&5
11175 echo "${ECHO_T}$d" >&6
11176      else
11177        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11178 echo "${ECHO_T}not found ($d: no such directory)" >&6
11179      fi
11180
11181      # replace the directory string with "yes".
11182      with_pam_req="yes"
11183      with_pam=$with_pam_req
11184      ;;
11185
11186     *)
11187      echo ""
11188      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
11189      echo "       If it is a directory, then \`DIR/include' will be added to"
11190      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11191      exit 1
11192      ;;
11193    esac
11194
11195
11196 if test "$enable_locking" = yes -a "$with_pam" = yes; then
11197   echo "$as_me:$LINENO: checking for PAM" >&5
11198 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
11199 if test "${ac_cv_pam+set}" = set; then
11200   echo $ECHO_N "(cached) $ECHO_C" >&6
11201 else
11202
11203   ac_save_CPPFLAGS="$CPPFLAGS"
11204   if test \! -z "$includedir" ; then
11205     CPPFLAGS="$CPPFLAGS -I$includedir"
11206   fi
11207   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11208   cat >conftest.$ac_ext <<_ACEOF
11209 #line $LINENO "configure"
11210 /* confdefs.h.  */
11211 _ACEOF
11212 cat confdefs.h >>conftest.$ac_ext
11213 cat >>conftest.$ac_ext <<_ACEOF
11214 /* end confdefs.h.  */
11215 #include <security/pam_appl.h>
11216 int
11217 main ()
11218 {
11219
11220   ;
11221   return 0;
11222 }
11223 _ACEOF
11224 rm -f conftest.$ac_objext
11225 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11226   (eval $ac_compile) 2>&5
11227   ac_status=$?
11228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11229   (exit $ac_status); } &&
11230          { ac_try='test -s conftest.$ac_objext'
11231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11232   (eval $ac_try) 2>&5
11233   ac_status=$?
11234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11235   (exit $ac_status); }; }; then
11236   ac_cv_pam=yes
11237 else
11238   echo "$as_me: failed program was:" >&5
11239 sed 's/^/| /' conftest.$ac_ext >&5
11240
11241 ac_cv_pam=no
11242 fi
11243 rm -f conftest.$ac_objext conftest.$ac_ext
11244   CPPFLAGS="$ac_save_CPPFLAGS"
11245 fi
11246 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
11247 echo "${ECHO_T}$ac_cv_pam" >&6
11248   if test "$ac_cv_pam" = yes ; then
11249     have_pam=yes
11250     cat >>confdefs.h <<\_ACEOF
11251 #define HAVE_PAM 1
11252 _ACEOF
11253
11254     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
11255
11256     # libpam typically requires dlopen and dlsym.  On FreeBSD,
11257     # those are in libc.  On Linux and Solaris, they're in libdl.
11258     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
11259 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
11260 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
11261   echo $ECHO_N "(cached) $ECHO_C" >&6
11262 else
11263   ac_check_lib_save_LIBS=$LIBS
11264 LIBS="-ldl  $LIBS"
11265 cat >conftest.$ac_ext <<_ACEOF
11266 #line $LINENO "configure"
11267 /* confdefs.h.  */
11268 _ACEOF
11269 cat confdefs.h >>conftest.$ac_ext
11270 cat >>conftest.$ac_ext <<_ACEOF
11271 /* end confdefs.h.  */
11272
11273 /* Override any gcc2 internal prototype to avoid an error.  */
11274 #ifdef __cplusplus
11275 extern "C"
11276 #endif
11277 /* We use char because int might match the return type of a gcc2
11278    builtin and then its argument prototype would still apply.  */
11279 char dlopen ();
11280 int
11281 main ()
11282 {
11283 dlopen ();
11284   ;
11285   return 0;
11286 }
11287 _ACEOF
11288 rm -f conftest.$ac_objext conftest$ac_exeext
11289 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11290   (eval $ac_link) 2>&5
11291   ac_status=$?
11292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11293   (exit $ac_status); } &&
11294          { ac_try='test -s conftest$ac_exeext'
11295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11296   (eval $ac_try) 2>&5
11297   ac_status=$?
11298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11299   (exit $ac_status); }; }; then
11300   ac_cv_lib_dl_dlopen=yes
11301 else
11302   echo "$as_me: failed program was:" >&5
11303 sed 's/^/| /' conftest.$ac_ext >&5
11304
11305 ac_cv_lib_dl_dlopen=no
11306 fi
11307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11308 LIBS=$ac_check_lib_save_LIBS
11309 fi
11310 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
11311 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
11312 if test $ac_cv_lib_dl_dlopen = yes; then
11313   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
11314 fi
11315
11316
11317     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
11318 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
11319     if test "${ac_cv_pam_strerror_args+set}" = set; then
11320   echo $ECHO_N "(cached) $ECHO_C" >&6
11321 else
11322   cat >conftest.$ac_ext <<_ACEOF
11323 #line $LINENO "configure"
11324 /* confdefs.h.  */
11325 _ACEOF
11326 cat confdefs.h >>conftest.$ac_ext
11327 cat >>conftest.$ac_ext <<_ACEOF
11328 /* end confdefs.h.  */
11329 #include <stdio.h>
11330                       #include <stdlib.h>
11331                       #include <security/pam_appl.h>
11332 int
11333 main ()
11334 {
11335 pam_handle_t *pamh = 0;
11336                       char *s = pam_strerror(pamh, PAM_SUCCESS);
11337   ;
11338   return 0;
11339 }
11340 _ACEOF
11341 rm -f conftest.$ac_objext
11342 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11343   (eval $ac_compile) 2>&5
11344   ac_status=$?
11345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11346   (exit $ac_status); } &&
11347          { ac_try='test -s conftest.$ac_objext'
11348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11349   (eval $ac_try) 2>&5
11350   ac_status=$?
11351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11352   (exit $ac_status); }; }; then
11353   ac_pam_strerror_args=2
11354 else
11355   echo "$as_me: failed program was:" >&5
11356 sed 's/^/| /' conftest.$ac_ext >&5
11357
11358 cat >conftest.$ac_ext <<_ACEOF
11359 #line $LINENO "configure"
11360 /* confdefs.h.  */
11361 _ACEOF
11362 cat confdefs.h >>conftest.$ac_ext
11363 cat >>conftest.$ac_ext <<_ACEOF
11364 /* end confdefs.h.  */
11365 #include <stdio.h>
11366                                       #include <stdlib.h>
11367                                       #include <security/pam_appl.h>
11368 int
11369 main ()
11370 {
11371 char *s =
11372                                        pam_strerror(PAM_SUCCESS);
11373   ;
11374   return 0;
11375 }
11376 _ACEOF
11377 rm -f conftest.$ac_objext
11378 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11379   (eval $ac_compile) 2>&5
11380   ac_status=$?
11381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11382   (exit $ac_status); } &&
11383          { ac_try='test -s conftest.$ac_objext'
11384   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11385   (eval $ac_try) 2>&5
11386   ac_status=$?
11387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11388   (exit $ac_status); }; }; then
11389   ac_pam_strerror_args=1
11390 else
11391   echo "$as_me: failed program was:" >&5
11392 sed 's/^/| /' conftest.$ac_ext >&5
11393
11394 ac_pam_strerror_args=0
11395 fi
11396 rm -f conftest.$ac_objext conftest.$ac_ext
11397 fi
11398 rm -f conftest.$ac_objext conftest.$ac_ext
11399       ac_cv_pam_strerror_args=$ac_pam_strerror_args
11400 fi
11401
11402     ac_pam_strerror_args=$ac_cv_pam_strerror_args
11403     if test "$ac_pam_strerror_args" = 1 ; then
11404       echo "$as_me:$LINENO: result: one argument" >&5
11405 echo "${ECHO_T}one argument" >&6
11406     elif test "$ac_pam_strerror_args" = 2 ; then
11407       cat >>confdefs.h <<\_ACEOF
11408 #define PAM_STRERROR_TWO_ARGS 1
11409 _ACEOF
11410
11411       echo "$as_me:$LINENO: result: two arguments" >&5
11412 echo "${ECHO_T}two arguments" >&6
11413     else
11414       echo "$as_me:$LINENO: result: unknown" >&5
11415 echo "${ECHO_T}unknown" >&6
11416     fi
11417   fi
11418 fi
11419
11420
11421 ###############################################################################
11422 #
11423 #       Check for Kerberos.
11424 #
11425 ###############################################################################
11426
11427 have_kerberos=no
11428 have_kerberos5=no
11429 with_kerberos_req=unspecified
11430
11431
11432 # Check whether --with-kerberos or --without-kerberos was given.
11433 if test "${with_kerberos+set}" = set; then
11434   withval="$with_kerberos"
11435   with_kerberos="$withval"; with_kerberos_req="$withval"
11436 else
11437   with_kerberos=yes
11438 fi;
11439
11440
11441    case "$with_kerberos" in
11442     yes) ;;
11443     no)  ;;
11444
11445     /*)
11446      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
11447 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
11448      d=$with_kerberos/include
11449      if test -d $d; then
11450        X_CFLAGS="-I$d $X_CFLAGS"
11451        echo "$as_me:$LINENO: result: $d" >&5
11452 echo "${ECHO_T}$d" >&6
11453      else
11454        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11455 echo "${ECHO_T}not found ($d: no such directory)" >&6
11456      fi
11457
11458      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
11459 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
11460      d=$with_kerberos/lib
11461      if test -d $d; then
11462        X_LIBS="-L$d $X_LIBS"
11463        echo "$as_me:$LINENO: result: $d" >&5
11464 echo "${ECHO_T}$d" >&6
11465      else
11466        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11467 echo "${ECHO_T}not found ($d: no such directory)" >&6
11468      fi
11469
11470      # replace the directory string with "yes".
11471      with_kerberos_req="yes"
11472      with_kerberos=$with_kerberos_req
11473      ;;
11474
11475     *)
11476      echo ""
11477      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
11478      echo "       If it is a directory, then \`DIR/include' will be added to"
11479      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11480      exit 1
11481      ;;
11482    esac
11483
11484
11485 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
11486   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
11487 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
11488 if test "${ac_cv_kerberos+set}" = set; then
11489   echo $ECHO_N "(cached) $ECHO_C" >&6
11490 else
11491
11492   ac_save_CPPFLAGS="$CPPFLAGS"
11493   if test \! -z "$includedir" ; then
11494     CPPFLAGS="$CPPFLAGS -I$includedir"
11495   fi
11496   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11497   cat >conftest.$ac_ext <<_ACEOF
11498 #line $LINENO "configure"
11499 /* confdefs.h.  */
11500 _ACEOF
11501 cat confdefs.h >>conftest.$ac_ext
11502 cat >>conftest.$ac_ext <<_ACEOF
11503 /* end confdefs.h.  */
11504 #include <krb.h>
11505 int
11506 main ()
11507 {
11508
11509   ;
11510   return 0;
11511 }
11512 _ACEOF
11513 rm -f conftest.$ac_objext
11514 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11515   (eval $ac_compile) 2>&5
11516   ac_status=$?
11517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11518   (exit $ac_status); } &&
11519          { ac_try='test -s conftest.$ac_objext'
11520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11521   (eval $ac_try) 2>&5
11522   ac_status=$?
11523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11524   (exit $ac_status); }; }; then
11525   ac_cv_kerberos=yes
11526 else
11527   echo "$as_me: failed program was:" >&5
11528 sed 's/^/| /' conftest.$ac_ext >&5
11529
11530 ac_cv_kerberos=no
11531 fi
11532 rm -f conftest.$ac_objext conftest.$ac_ext
11533   CPPFLAGS="$ac_save_CPPFLAGS"
11534 fi
11535 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
11536 echo "${ECHO_T}$ac_cv_kerberos" >&6
11537   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
11538 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
11539 if test "${ac_cv_kerberos5+set}" = set; then
11540   echo $ECHO_N "(cached) $ECHO_C" >&6
11541 else
11542
11543   ac_save_CPPFLAGS="$CPPFLAGS"
11544   if test \! -z "$includedir" ; then
11545     CPPFLAGS="$CPPFLAGS -I$includedir"
11546   fi
11547   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11548   cat >conftest.$ac_ext <<_ACEOF
11549 #line $LINENO "configure"
11550 /* confdefs.h.  */
11551 _ACEOF
11552 cat confdefs.h >>conftest.$ac_ext
11553 cat >>conftest.$ac_ext <<_ACEOF
11554 /* end confdefs.h.  */
11555 #include <kerberosIV/krb.h>
11556 int
11557 main ()
11558 {
11559
11560   ;
11561   return 0;
11562 }
11563 _ACEOF
11564 rm -f conftest.$ac_objext
11565 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11566   (eval $ac_compile) 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_kerberos5=yes
11577 else
11578   echo "$as_me: failed program was:" >&5
11579 sed 's/^/| /' conftest.$ac_ext >&5
11580
11581 ac_cv_kerberos5=no
11582 fi
11583 rm -f conftest.$ac_objext conftest.$ac_ext
11584   CPPFLAGS="$ac_save_CPPFLAGS"
11585 fi
11586 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
11587 echo "${ECHO_T}$ac_cv_kerberos5" >&6
11588
11589   if test "$ac_cv_kerberos" = yes ; then
11590     have_kerberos=yes
11591     cat >>confdefs.h <<\_ACEOF
11592 #define HAVE_KERBEROS 1
11593 _ACEOF
11594
11595   fi
11596
11597   if test "$ac_cv_kerberos5" = yes ; then
11598
11599     # Andrew Snare <ajs@pigpond.com> wrote:
11600     #
11601     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
11602     # (krb4) was also available.  This turns out not to be the case with
11603     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
11604     # is optional.
11605     #
11606     # So, disable kerberosV support if libkrb4 can't be found.
11607     # This is not the best solution, but it makes the compile not fail.
11608     #
11609
11610   ac_save_CPPFLAGS="$CPPFLAGS"
11611   ac_save_LDFLAGS="$LDFLAGS"
11612 #  ac_save_LIBS="$LIBS"
11613
11614   if test \! -z "$includedir" ; then
11615     CPPFLAGS="$CPPFLAGS -I$includedir"
11616   fi
11617   # note: $X_CFLAGS includes $x_includes
11618   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11619
11620   if test \! -z "$libdir" ; then
11621     LDFLAGS="$LDFLAGS -L$libdir"
11622   fi
11623   # note: $X_LIBS includes $x_libraries
11624   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11625
11626   echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
11627 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6
11628 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
11629   echo $ECHO_N "(cached) $ECHO_C" >&6
11630 else
11631   ac_check_lib_save_LIBS=$LIBS
11632 LIBS="-lkrb4  $LIBS"
11633 cat >conftest.$ac_ext <<_ACEOF
11634 #line $LINENO "configure"
11635 /* confdefs.h.  */
11636 _ACEOF
11637 cat confdefs.h >>conftest.$ac_ext
11638 cat >>conftest.$ac_ext <<_ACEOF
11639 /* end confdefs.h.  */
11640
11641 /* Override any gcc2 internal prototype to avoid an error.  */
11642 #ifdef __cplusplus
11643 extern "C"
11644 #endif
11645 /* We use char because int might match the return type of a gcc2
11646    builtin and then its argument prototype would still apply.  */
11647 char krb_get_tf_realm ();
11648 int
11649 main ()
11650 {
11651 krb_get_tf_realm ();
11652   ;
11653   return 0;
11654 }
11655 _ACEOF
11656 rm -f conftest.$ac_objext conftest$ac_exeext
11657 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11658   (eval $ac_link) 2>&5
11659   ac_status=$?
11660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11661   (exit $ac_status); } &&
11662          { ac_try='test -s conftest$ac_exeext'
11663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11664   (eval $ac_try) 2>&5
11665   ac_status=$?
11666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11667   (exit $ac_status); }; }; then
11668   ac_cv_lib_krb4_krb_get_tf_realm=yes
11669 else
11670   echo "$as_me: failed program was:" >&5
11671 sed 's/^/| /' conftest.$ac_ext >&5
11672
11673 ac_cv_lib_krb4_krb_get_tf_realm=no
11674 fi
11675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11676 LIBS=$ac_check_lib_save_LIBS
11677 fi
11678 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
11679 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6
11680 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
11681   have_kerberos=yes
11682 else
11683   have_kerberos=no
11684 fi
11685
11686   CPPFLAGS="$ac_save_CPPFLAGS"
11687   LDFLAGS="$ac_save_LDFLAGS"
11688 #  LIBS="$ac_save_LIBS"
11689
11690     if test "$have_kerberos" = yes ; then
11691       have_kerberos5=yes
11692       cat >>confdefs.h <<\_ACEOF
11693 #define HAVE_KERBEROS 1
11694 _ACEOF
11695
11696       cat >>confdefs.h <<\_ACEOF
11697 #define HAVE_KERBEROS5 1
11698 _ACEOF
11699
11700     else
11701       have_kerberos5=no
11702       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
11703 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
11704     fi
11705
11706   fi
11707
11708   if test "$have_kerberos5" = yes ; then
11709     # from Matt Knopp <mhat@infocalypse.netlag.com>
11710     # (who got it from amu@mit.edu)
11711
11712     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
11713
11714     # jwz: MacOS X uses -lkrb5, but not -lcrypt
11715
11716   ac_save_CPPFLAGS="$CPPFLAGS"
11717   ac_save_LDFLAGS="$LDFLAGS"
11718 #  ac_save_LIBS="$LIBS"
11719
11720   if test \! -z "$includedir" ; then
11721     CPPFLAGS="$CPPFLAGS -I$includedir"
11722   fi
11723   # note: $X_CFLAGS includes $x_includes
11724   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11725
11726   if test \! -z "$libdir" ; then
11727     LDFLAGS="$LDFLAGS -L$libdir"
11728   fi
11729   # note: $X_LIBS includes $x_libraries
11730   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11731
11732   echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
11733 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
11734 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
11735   echo $ECHO_N "(cached) $ECHO_C" >&6
11736 else
11737   ac_check_lib_save_LIBS=$LIBS
11738 LIBS="-lcrypt  $LIBS"
11739 cat >conftest.$ac_ext <<_ACEOF
11740 #line $LINENO "configure"
11741 /* confdefs.h.  */
11742 _ACEOF
11743 cat confdefs.h >>conftest.$ac_ext
11744 cat >>conftest.$ac_ext <<_ACEOF
11745 /* end confdefs.h.  */
11746
11747 /* Override any gcc2 internal prototype to avoid an error.  */
11748 #ifdef __cplusplus
11749 extern "C"
11750 #endif
11751 /* We use char because int might match the return type of a gcc2
11752    builtin and then its argument prototype would still apply.  */
11753 char crypt ();
11754 int
11755 main ()
11756 {
11757 crypt ();
11758   ;
11759   return 0;
11760 }
11761 _ACEOF
11762 rm -f conftest.$ac_objext conftest$ac_exeext
11763 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11764   (eval $ac_link) 2>&5
11765   ac_status=$?
11766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11767   (exit $ac_status); } &&
11768          { ac_try='test -s conftest$ac_exeext'
11769   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11770   (eval $ac_try) 2>&5
11771   ac_status=$?
11772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11773   (exit $ac_status); }; }; then
11774   ac_cv_lib_crypt_crypt=yes
11775 else
11776   echo "$as_me: failed program was:" >&5
11777 sed 's/^/| /' conftest.$ac_ext >&5
11778
11779 ac_cv_lib_crypt_crypt=no
11780 fi
11781 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11782 LIBS=$ac_check_lib_save_LIBS
11783 fi
11784 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
11785 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
11786 if test $ac_cv_lib_crypt_crypt = yes; then
11787   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11788 fi
11789
11790   CPPFLAGS="$ac_save_CPPFLAGS"
11791   LDFLAGS="$ac_save_LDFLAGS"
11792 #  LIBS="$ac_save_LIBS"
11793
11794
11795   elif test "$have_kerberos" = yes ; then
11796     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
11797     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
11798   fi
11799
11800   if test "$have_kerberos" = yes ; then
11801     echo "$as_me:$LINENO: checking for res_search" >&5
11802 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
11803 if test "${ac_cv_func_res_search+set}" = set; then
11804   echo $ECHO_N "(cached) $ECHO_C" >&6
11805 else
11806   cat >conftest.$ac_ext <<_ACEOF
11807 #line $LINENO "configure"
11808 /* confdefs.h.  */
11809 _ACEOF
11810 cat confdefs.h >>conftest.$ac_ext
11811 cat >>conftest.$ac_ext <<_ACEOF
11812 /* end confdefs.h.  */
11813 /* System header to define __stub macros and hopefully few prototypes,
11814     which can conflict with char res_search (); below.
11815     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11816     <limits.h> exists even on freestanding compilers.  */
11817 #ifdef __STDC__
11818 # include <limits.h>
11819 #else
11820 # include <assert.h>
11821 #endif
11822 /* Override any gcc2 internal prototype to avoid an error.  */
11823 #ifdef __cplusplus
11824 extern "C"
11825 {
11826 #endif
11827 /* We use char because int might match the return type of a gcc2
11828    builtin and then its argument prototype would still apply.  */
11829 char res_search ();
11830 /* The GNU C library defines this for functions which it implements
11831     to always fail with ENOSYS.  Some functions are actually named
11832     something starting with __ and the normal name is an alias.  */
11833 #if defined (__stub_res_search) || defined (__stub___res_search)
11834 choke me
11835 #else
11836 char (*f) () = res_search;
11837 #endif
11838 #ifdef __cplusplus
11839 }
11840 #endif
11841
11842 int
11843 main ()
11844 {
11845 return f != res_search;
11846   ;
11847   return 0;
11848 }
11849 _ACEOF
11850 rm -f conftest.$ac_objext conftest$ac_exeext
11851 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11852   (eval $ac_link) 2>&5
11853   ac_status=$?
11854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11855   (exit $ac_status); } &&
11856          { ac_try='test -s conftest$ac_exeext'
11857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11858   (eval $ac_try) 2>&5
11859   ac_status=$?
11860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11861   (exit $ac_status); }; }; then
11862   ac_cv_func_res_search=yes
11863 else
11864   echo "$as_me: failed program was:" >&5
11865 sed 's/^/| /' conftest.$ac_ext >&5
11866
11867 ac_cv_func_res_search=no
11868 fi
11869 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11870 fi
11871 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
11872 echo "${ECHO_T}$ac_cv_func_res_search" >&6
11873 if test $ac_cv_func_res_search = yes; then
11874   :
11875 else
11876   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
11877 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
11878 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
11879   echo $ECHO_N "(cached) $ECHO_C" >&6
11880 else
11881   ac_check_lib_save_LIBS=$LIBS
11882 LIBS="-lresolv  $LIBS"
11883 cat >conftest.$ac_ext <<_ACEOF
11884 #line $LINENO "configure"
11885 /* confdefs.h.  */
11886 _ACEOF
11887 cat confdefs.h >>conftest.$ac_ext
11888 cat >>conftest.$ac_ext <<_ACEOF
11889 /* end confdefs.h.  */
11890
11891 /* Override any gcc2 internal prototype to avoid an error.  */
11892 #ifdef __cplusplus
11893 extern "C"
11894 #endif
11895 /* We use char because int might match the return type of a gcc2
11896    builtin and then its argument prototype would still apply.  */
11897 char res_search ();
11898 int
11899 main ()
11900 {
11901 res_search ();
11902   ;
11903   return 0;
11904 }
11905 _ACEOF
11906 rm -f conftest.$ac_objext conftest$ac_exeext
11907 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11908   (eval $ac_link) 2>&5
11909   ac_status=$?
11910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11911   (exit $ac_status); } &&
11912          { ac_try='test -s conftest$ac_exeext'
11913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11914   (eval $ac_try) 2>&5
11915   ac_status=$?
11916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11917   (exit $ac_status); }; }; then
11918   ac_cv_lib_resolv_res_search=yes
11919 else
11920   echo "$as_me: failed program was:" >&5
11921 sed 's/^/| /' conftest.$ac_ext >&5
11922
11923 ac_cv_lib_resolv_res_search=no
11924 fi
11925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11926 LIBS=$ac_check_lib_save_LIBS
11927 fi
11928 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
11929 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
11930 if test $ac_cv_lib_resolv_res_search = yes; then
11931   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
11932 else
11933   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
11934 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
11935
11936 fi
11937
11938 fi
11939
11940   fi
11941 fi
11942
11943
11944 ###############################################################################
11945 #
11946 #       Check for the nine billion variants of shadow passwords...
11947 #
11948 ###############################################################################
11949
11950 need_setuid=no
11951
11952 have_shadow=no
11953 with_shadow_req=unspecified
11954
11955
11956 # Check whether --with-shadow or --without-shadow was given.
11957 if test "${with_shadow+set}" = set; then
11958   withval="$with_shadow"
11959   with_shadow="$withval"; with_shadow_req="$withval"
11960 else
11961   with_shadow=yes
11962 fi;
11963
11964
11965    case "$with_shadow" in
11966     yes) ;;
11967     no)  ;;
11968
11969     /*)
11970      echo "$as_me:$LINENO: checking for shadow password headers" >&5
11971 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
11972      d=$with_shadow/include
11973      if test -d $d; then
11974        X_CFLAGS="-I$d $X_CFLAGS"
11975        echo "$as_me:$LINENO: result: $d" >&5
11976 echo "${ECHO_T}$d" >&6
11977      else
11978        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11979 echo "${ECHO_T}not found ($d: no such directory)" >&6
11980      fi
11981
11982      echo "$as_me:$LINENO: checking for shadow password libs" >&5
11983 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
11984      d=$with_shadow/lib
11985      if test -d $d; then
11986        X_LIBS="-L$d $X_LIBS"
11987        echo "$as_me:$LINENO: result: $d" >&5
11988 echo "${ECHO_T}$d" >&6
11989      else
11990        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11991 echo "${ECHO_T}not found ($d: no such directory)" >&6
11992      fi
11993
11994      # replace the directory string with "yes".
11995      with_shadow_req="yes"
11996      with_shadow=$with_shadow_req
11997      ;;
11998
11999     *)
12000      echo ""
12001      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
12002      echo "       If it is a directory, then \`DIR/include' will be added to"
12003      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12004      exit 1
12005      ;;
12006    esac
12007
12008
12009 if test "$enable_locking" = no ; then
12010   with_shadow_req=no
12011   with_shadow=no
12012 fi
12013
12014
12015 ###############################################################################
12016 #
12017 #       Check for Sun "adjunct" passwords.
12018 #
12019 ###############################################################################
12020
12021 if test "$with_shadow" = yes ; then
12022   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
12023 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
12024 if test "${ac_cv_sun_adjunct+set}" = set; then
12025   echo $ECHO_N "(cached) $ECHO_C" >&6
12026 else
12027
12028   ac_save_CPPFLAGS="$CPPFLAGS"
12029   if test \! -z "$includedir" ; then
12030     CPPFLAGS="$CPPFLAGS -I$includedir"
12031   fi
12032   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12033   cat >conftest.$ac_ext <<_ACEOF
12034 #line $LINENO "configure"
12035 /* confdefs.h.  */
12036 _ACEOF
12037 cat confdefs.h >>conftest.$ac_ext
12038 cat >>conftest.$ac_ext <<_ACEOF
12039 /* end confdefs.h.  */
12040 #include <stdlib.h>
12041                                     #include <unistd.h>
12042                                     #include <sys/types.h>
12043                                     #include <sys/label.h>
12044                                     #include <sys/audit.h>
12045                                     #include <pwdadj.h>
12046 int
12047 main ()
12048 {
12049 struct passwd_adjunct *p = getpwanam("nobody");
12050                        const char *pw = p->pwa_passwd;
12051   ;
12052   return 0;
12053 }
12054 _ACEOF
12055 rm -f conftest.$ac_objext
12056 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12057   (eval $ac_compile) 2>&5
12058   ac_status=$?
12059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12060   (exit $ac_status); } &&
12061          { ac_try='test -s conftest.$ac_objext'
12062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12063   (eval $ac_try) 2>&5
12064   ac_status=$?
12065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12066   (exit $ac_status); }; }; then
12067   ac_cv_sun_adjunct=yes
12068 else
12069   echo "$as_me: failed program was:" >&5
12070 sed 's/^/| /' conftest.$ac_ext >&5
12071
12072 ac_cv_sun_adjunct=no
12073 fi
12074 rm -f conftest.$ac_objext conftest.$ac_ext
12075   CPPFLAGS="$ac_save_CPPFLAGS"
12076 fi
12077 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
12078 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
12079   if test "$ac_cv_sun_adjunct" = yes; then
12080     have_shadow_adjunct=yes
12081     have_shadow=yes
12082     need_setuid=yes
12083   fi
12084 fi
12085
12086
12087 ###############################################################################
12088 #
12089 #       Check for DEC and SCO so-called "enhanced" security.
12090 #
12091 ###############################################################################
12092
12093 if test "$with_shadow" = yes ; then
12094   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
12095 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
12096 if test "${ac_cv_enhanced_passwd+set}" = set; then
12097   echo $ECHO_N "(cached) $ECHO_C" >&6
12098 else
12099
12100   ac_save_CPPFLAGS="$CPPFLAGS"
12101   if test \! -z "$includedir" ; then
12102     CPPFLAGS="$CPPFLAGS -I$includedir"
12103   fi
12104   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12105   cat >conftest.$ac_ext <<_ACEOF
12106 #line $LINENO "configure"
12107 /* confdefs.h.  */
12108 _ACEOF
12109 cat confdefs.h >>conftest.$ac_ext
12110 cat >>conftest.$ac_ext <<_ACEOF
12111 /* end confdefs.h.  */
12112 #include <stdlib.h>
12113                                     #include <unistd.h>
12114                                     #include <sys/types.h>
12115                                     #include <pwd.h>
12116                                     #include <sys/security.h>
12117                                     #include <prot.h>
12118 int
12119 main ()
12120 {
12121 struct pr_passwd *p;
12122                        const char *pw;
12123                        set_auth_parameters(0, 0);
12124                        check_auth_parameters();
12125                        p = getprpwnam("nobody");
12126                        pw = p->ufld.fd_encrypt;
12127   ;
12128   return 0;
12129 }
12130 _ACEOF
12131 rm -f conftest.$ac_objext
12132 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12133   (eval $ac_compile) 2>&5
12134   ac_status=$?
12135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12136   (exit $ac_status); } &&
12137          { ac_try='test -s conftest.$ac_objext'
12138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12139   (eval $ac_try) 2>&5
12140   ac_status=$?
12141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12142   (exit $ac_status); }; }; then
12143   ac_cv_enhanced_passwd=yes
12144 else
12145   echo "$as_me: failed program was:" >&5
12146 sed 's/^/| /' conftest.$ac_ext >&5
12147
12148 ac_cv_enhanced_passwd=no
12149 fi
12150 rm -f conftest.$ac_objext conftest.$ac_ext
12151   CPPFLAGS="$ac_save_CPPFLAGS"
12152 fi
12153 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
12154 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
12155   if test $ac_cv_enhanced_passwd = yes; then
12156     have_shadow_enhanced=yes
12157     have_shadow=yes
12158     need_setuid=yes
12159
12160     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
12161     # (I'm told it needs -lcurses too, but I don't understand why.)
12162     # But on DEC, it's in -lsecurity.
12163     #
12164     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
12165 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
12166 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
12167   echo $ECHO_N "(cached) $ECHO_C" >&6
12168 else
12169   ac_check_lib_save_LIBS=$LIBS
12170 LIBS="-lprot -lx $LIBS"
12171 cat >conftest.$ac_ext <<_ACEOF
12172 #line $LINENO "configure"
12173 /* confdefs.h.  */
12174 _ACEOF
12175 cat confdefs.h >>conftest.$ac_ext
12176 cat >>conftest.$ac_ext <<_ACEOF
12177 /* end confdefs.h.  */
12178
12179 /* Override any gcc2 internal prototype to avoid an error.  */
12180 #ifdef __cplusplus
12181 extern "C"
12182 #endif
12183 /* We use char because int might match the return type of a gcc2
12184    builtin and then its argument prototype would still apply.  */
12185 char getprpwnam ();
12186 int
12187 main ()
12188 {
12189 getprpwnam ();
12190   ;
12191   return 0;
12192 }
12193 _ACEOF
12194 rm -f conftest.$ac_objext conftest$ac_exeext
12195 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12196   (eval $ac_link) 2>&5
12197   ac_status=$?
12198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12199   (exit $ac_status); } &&
12200          { ac_try='test -s conftest$ac_exeext'
12201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12202   (eval $ac_try) 2>&5
12203   ac_status=$?
12204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12205   (exit $ac_status); }; }; then
12206   ac_cv_lib_prot_getprpwnam=yes
12207 else
12208   echo "$as_me: failed program was:" >&5
12209 sed 's/^/| /' conftest.$ac_ext >&5
12210
12211 ac_cv_lib_prot_getprpwnam=no
12212 fi
12213 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12214 LIBS=$ac_check_lib_save_LIBS
12215 fi
12216 echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
12217 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
12218 if test $ac_cv_lib_prot_getprpwnam = yes; then
12219   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
12220 else
12221   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
12222 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
12223 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
12224   echo $ECHO_N "(cached) $ECHO_C" >&6
12225 else
12226   ac_check_lib_save_LIBS=$LIBS
12227 LIBS="-lsecurity  $LIBS"
12228 cat >conftest.$ac_ext <<_ACEOF
12229 #line $LINENO "configure"
12230 /* confdefs.h.  */
12231 _ACEOF
12232 cat confdefs.h >>conftest.$ac_ext
12233 cat >>conftest.$ac_ext <<_ACEOF
12234 /* end confdefs.h.  */
12235
12236 /* Override any gcc2 internal prototype to avoid an error.  */
12237 #ifdef __cplusplus
12238 extern "C"
12239 #endif
12240 /* We use char because int might match the return type of a gcc2
12241    builtin and then its argument prototype would still apply.  */
12242 char getprpwnam ();
12243 int
12244 main ()
12245 {
12246 getprpwnam ();
12247   ;
12248   return 0;
12249 }
12250 _ACEOF
12251 rm -f conftest.$ac_objext conftest$ac_exeext
12252 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12253   (eval $ac_link) 2>&5
12254   ac_status=$?
12255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12256   (exit $ac_status); } &&
12257          { ac_try='test -s conftest$ac_exeext'
12258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12259   (eval $ac_try) 2>&5
12260   ac_status=$?
12261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12262   (exit $ac_status); }; }; then
12263   ac_cv_lib_security_getprpwnam=yes
12264 else
12265   echo "$as_me: failed program was:" >&5
12266 sed 's/^/| /' conftest.$ac_ext >&5
12267
12268 ac_cv_lib_security_getprpwnam=no
12269 fi
12270 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12271 LIBS=$ac_check_lib_save_LIBS
12272 fi
12273 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
12274 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
12275 if test $ac_cv_lib_security_getprpwnam = yes; then
12276   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
12277 fi
12278
12279 fi
12280
12281   fi
12282 fi
12283
12284 ###############################################################################
12285 #
12286 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
12287 #
12288 ###############################################################################
12289
12290 if test "$with_shadow" = yes ; then
12291   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
12292 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
12293 if test "${ac_cv_hpux_passwd+set}" = set; then
12294   echo $ECHO_N "(cached) $ECHO_C" >&6
12295 else
12296
12297   ac_save_CPPFLAGS="$CPPFLAGS"
12298   if test \! -z "$includedir" ; then
12299     CPPFLAGS="$CPPFLAGS -I$includedir"
12300   fi
12301   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12302   cat >conftest.$ac_ext <<_ACEOF
12303 #line $LINENO "configure"
12304 /* confdefs.h.  */
12305 _ACEOF
12306 cat confdefs.h >>conftest.$ac_ext
12307 cat >>conftest.$ac_ext <<_ACEOF
12308 /* end confdefs.h.  */
12309 #include <stdlib.h>
12310                                     #include <unistd.h>
12311                                     #include <sys/types.h>
12312                                     #include <pwd.h>
12313                                     #include <hpsecurity.h>
12314                                     #include <prot.h>
12315 int
12316 main ()
12317 {
12318 struct s_passwd *p = getspwnam("nobody");
12319                        const char *pw = p->pw_passwd;
12320   ;
12321   return 0;
12322 }
12323 _ACEOF
12324 rm -f conftest.$ac_objext
12325 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12326   (eval $ac_compile) 2>&5
12327   ac_status=$?
12328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12329   (exit $ac_status); } &&
12330          { ac_try='test -s conftest.$ac_objext'
12331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12332   (eval $ac_try) 2>&5
12333   ac_status=$?
12334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12335   (exit $ac_status); }; }; then
12336   ac_cv_hpux_passwd=yes
12337 else
12338   echo "$as_me: failed program was:" >&5
12339 sed 's/^/| /' conftest.$ac_ext >&5
12340
12341 ac_cv_hpux_passwd=no
12342 fi
12343 rm -f conftest.$ac_objext conftest.$ac_ext
12344   CPPFLAGS="$ac_save_CPPFLAGS"
12345 fi
12346 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
12347 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
12348   if test "$ac_cv_hpux_passwd" = yes; then
12349     have_shadow_hpux=yes
12350     have_shadow=yes
12351     need_setuid=yes
12352
12353     # on HPUX, bigcrypt is in -lsec
12354     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
12355 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
12356 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
12357   echo $ECHO_N "(cached) $ECHO_C" >&6
12358 else
12359   ac_check_lib_save_LIBS=$LIBS
12360 LIBS="-lsec  $LIBS"
12361 cat >conftest.$ac_ext <<_ACEOF
12362 #line $LINENO "configure"
12363 /* confdefs.h.  */
12364 _ACEOF
12365 cat confdefs.h >>conftest.$ac_ext
12366 cat >>conftest.$ac_ext <<_ACEOF
12367 /* end confdefs.h.  */
12368
12369 /* Override any gcc2 internal prototype to avoid an error.  */
12370 #ifdef __cplusplus
12371 extern "C"
12372 #endif
12373 /* We use char because int might match the return type of a gcc2
12374    builtin and then its argument prototype would still apply.  */
12375 char bigcrypt ();
12376 int
12377 main ()
12378 {
12379 bigcrypt ();
12380   ;
12381   return 0;
12382 }
12383 _ACEOF
12384 rm -f conftest.$ac_objext conftest$ac_exeext
12385 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12386   (eval $ac_link) 2>&5
12387   ac_status=$?
12388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12389   (exit $ac_status); } &&
12390          { ac_try='test -s conftest$ac_exeext'
12391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12392   (eval $ac_try) 2>&5
12393   ac_status=$?
12394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12395   (exit $ac_status); }; }; then
12396   ac_cv_lib_sec_bigcrypt=yes
12397 else
12398   echo "$as_me: failed program was:" >&5
12399 sed 's/^/| /' conftest.$ac_ext >&5
12400
12401 ac_cv_lib_sec_bigcrypt=no
12402 fi
12403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12404 LIBS=$ac_check_lib_save_LIBS
12405 fi
12406 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
12407 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
12408 if test $ac_cv_lib_sec_bigcrypt = yes; then
12409   PASSWD_LIBS="$PASSWD_LIBS -lsec"
12410 fi
12411
12412   fi
12413 fi
12414
12415
12416 ###############################################################################
12417 #
12418 #       Check for FreeBSD-style shadow passwords.
12419 #
12420 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
12421 #       password systems -- except you only get stuff in the pw_passwd field
12422 #       if the running program is setuid.  So, guess that we've got this
12423 #       lossage to contend with if /etc/master.passwd exists, and default to
12424 #       a setuid installation.
12425 #
12426 ###############################################################################
12427
12428 if test "$with_shadow" = yes ; then
12429   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
12430 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
12431 if test "${ac_cv_master_passwd+set}" = set; then
12432   echo $ECHO_N "(cached) $ECHO_C" >&6
12433 else
12434   if test -f /etc/master.passwd ; then
12435                     ac_cv_master_passwd=yes
12436                   else
12437                     ac_cv_master_passwd=no
12438                   fi
12439 fi
12440 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
12441 echo "${ECHO_T}$ac_cv_master_passwd" >&6
12442   if test "$ac_cv_master_passwd" = yes; then
12443     need_setuid=yes
12444   fi
12445 fi
12446
12447
12448 ###############################################################################
12449 #
12450 #       Check for traditional (ha!) shadow passwords.
12451 #
12452 ###############################################################################
12453
12454 if test "$with_shadow" = yes ; then
12455   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
12456 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
12457 if test "${ac_cv_shadow+set}" = set; then
12458   echo $ECHO_N "(cached) $ECHO_C" >&6
12459 else
12460
12461   ac_save_CPPFLAGS="$CPPFLAGS"
12462   if test \! -z "$includedir" ; then
12463     CPPFLAGS="$CPPFLAGS -I$includedir"
12464   fi
12465   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12466   cat >conftest.$ac_ext <<_ACEOF
12467 #line $LINENO "configure"
12468 /* confdefs.h.  */
12469 _ACEOF
12470 cat confdefs.h >>conftest.$ac_ext
12471 cat >>conftest.$ac_ext <<_ACEOF
12472 /* end confdefs.h.  */
12473 #include <stdlib.h>
12474                                     #include <unistd.h>
12475                                     #include <sys/types.h>
12476                                     #include <pwd.h>
12477                                     #include <shadow.h>
12478 int
12479 main ()
12480 {
12481 struct spwd *p = getspnam("nobody");
12482                        const char *pw = p->sp_pwdp;
12483   ;
12484   return 0;
12485 }
12486 _ACEOF
12487 rm -f conftest.$ac_objext
12488 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12489   (eval $ac_compile) 2>&5
12490   ac_status=$?
12491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12492   (exit $ac_status); } &&
12493          { ac_try='test -s conftest.$ac_objext'
12494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12495   (eval $ac_try) 2>&5
12496   ac_status=$?
12497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12498   (exit $ac_status); }; }; then
12499   ac_cv_shadow=yes
12500 else
12501   echo "$as_me: failed program was:" >&5
12502 sed 's/^/| /' conftest.$ac_ext >&5
12503
12504 ac_cv_shadow=no
12505 fi
12506 rm -f conftest.$ac_objext conftest.$ac_ext
12507   CPPFLAGS="$ac_save_CPPFLAGS"
12508 fi
12509 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
12510 echo "${ECHO_T}$ac_cv_shadow" >&6
12511   if test "$ac_cv_shadow" = yes; then
12512     have_shadow=yes
12513     need_setuid=yes
12514
12515     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
12516     have_getspnam=no
12517     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
12518 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
12519 if test "${ac_cv_lib_c_getspnam+set}" = set; then
12520   echo $ECHO_N "(cached) $ECHO_C" >&6
12521 else
12522   ac_check_lib_save_LIBS=$LIBS
12523 LIBS="-lc  $LIBS"
12524 cat >conftest.$ac_ext <<_ACEOF
12525 #line $LINENO "configure"
12526 /* confdefs.h.  */
12527 _ACEOF
12528 cat confdefs.h >>conftest.$ac_ext
12529 cat >>conftest.$ac_ext <<_ACEOF
12530 /* end confdefs.h.  */
12531
12532 /* Override any gcc2 internal prototype to avoid an error.  */
12533 #ifdef __cplusplus
12534 extern "C"
12535 #endif
12536 /* We use char because int might match the return type of a gcc2
12537    builtin and then its argument prototype would still apply.  */
12538 char getspnam ();
12539 int
12540 main ()
12541 {
12542 getspnam ();
12543   ;
12544   return 0;
12545 }
12546 _ACEOF
12547 rm -f conftest.$ac_objext conftest$ac_exeext
12548 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12549   (eval $ac_link) 2>&5
12550   ac_status=$?
12551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12552   (exit $ac_status); } &&
12553          { ac_try='test -s conftest$ac_exeext'
12554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12555   (eval $ac_try) 2>&5
12556   ac_status=$?
12557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12558   (exit $ac_status); }; }; then
12559   ac_cv_lib_c_getspnam=yes
12560 else
12561   echo "$as_me: failed program was:" >&5
12562 sed 's/^/| /' conftest.$ac_ext >&5
12563
12564 ac_cv_lib_c_getspnam=no
12565 fi
12566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12567 LIBS=$ac_check_lib_save_LIBS
12568 fi
12569 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
12570 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
12571 if test $ac_cv_lib_c_getspnam = yes; then
12572   have_getspnam=yes
12573 fi
12574
12575     if test "$have_getspnam" = no ; then
12576       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
12577 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
12578 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
12579   echo $ECHO_N "(cached) $ECHO_C" >&6
12580 else
12581   ac_check_lib_save_LIBS=$LIBS
12582 LIBS="-lgen  $LIBS"
12583 cat >conftest.$ac_ext <<_ACEOF
12584 #line $LINENO "configure"
12585 /* confdefs.h.  */
12586 _ACEOF
12587 cat confdefs.h >>conftest.$ac_ext
12588 cat >>conftest.$ac_ext <<_ACEOF
12589 /* end confdefs.h.  */
12590
12591 /* Override any gcc2 internal prototype to avoid an error.  */
12592 #ifdef __cplusplus
12593 extern "C"
12594 #endif
12595 /* We use char because int might match the return type of a gcc2
12596    builtin and then its argument prototype would still apply.  */
12597 char getspnam ();
12598 int
12599 main ()
12600 {
12601 getspnam ();
12602   ;
12603   return 0;
12604 }
12605 _ACEOF
12606 rm -f conftest.$ac_objext conftest$ac_exeext
12607 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12608   (eval $ac_link) 2>&5
12609   ac_status=$?
12610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12611   (exit $ac_status); } &&
12612          { ac_try='test -s conftest$ac_exeext'
12613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12614   (eval $ac_try) 2>&5
12615   ac_status=$?
12616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12617   (exit $ac_status); }; }; then
12618   ac_cv_lib_gen_getspnam=yes
12619 else
12620   echo "$as_me: failed program was:" >&5
12621 sed 's/^/| /' conftest.$ac_ext >&5
12622
12623 ac_cv_lib_gen_getspnam=no
12624 fi
12625 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12626 LIBS=$ac_check_lib_save_LIBS
12627 fi
12628 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
12629 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
12630 if test $ac_cv_lib_gen_getspnam = yes; then
12631   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
12632 fi
12633
12634     fi
12635   fi
12636 fi
12637
12638
12639 ###############################################################################
12640 #
12641 #       Check for other libraries needed for non-shadow passwords.
12642 #
12643 ###############################################################################
12644
12645 if test "$enable_locking" = yes ; then
12646
12647   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
12648   have_crypt=no
12649   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
12650 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
12651 if test "${ac_cv_lib_c_crypt+set}" = set; then
12652   echo $ECHO_N "(cached) $ECHO_C" >&6
12653 else
12654   ac_check_lib_save_LIBS=$LIBS
12655 LIBS="-lc  $LIBS"
12656 cat >conftest.$ac_ext <<_ACEOF
12657 #line $LINENO "configure"
12658 /* confdefs.h.  */
12659 _ACEOF
12660 cat confdefs.h >>conftest.$ac_ext
12661 cat >>conftest.$ac_ext <<_ACEOF
12662 /* end confdefs.h.  */
12663
12664 /* Override any gcc2 internal prototype to avoid an error.  */
12665 #ifdef __cplusplus
12666 extern "C"
12667 #endif
12668 /* We use char because int might match the return type of a gcc2
12669    builtin and then its argument prototype would still apply.  */
12670 char crypt ();
12671 int
12672 main ()
12673 {
12674 crypt ();
12675   ;
12676   return 0;
12677 }
12678 _ACEOF
12679 rm -f conftest.$ac_objext conftest$ac_exeext
12680 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12681   (eval $ac_link) 2>&5
12682   ac_status=$?
12683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12684   (exit $ac_status); } &&
12685          { ac_try='test -s conftest$ac_exeext'
12686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12687   (eval $ac_try) 2>&5
12688   ac_status=$?
12689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12690   (exit $ac_status); }; }; then
12691   ac_cv_lib_c_crypt=yes
12692 else
12693   echo "$as_me: failed program was:" >&5
12694 sed 's/^/| /' conftest.$ac_ext >&5
12695
12696 ac_cv_lib_c_crypt=no
12697 fi
12698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12699 LIBS=$ac_check_lib_save_LIBS
12700 fi
12701 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
12702 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
12703 if test $ac_cv_lib_c_crypt = yes; then
12704   have_crypt=yes
12705 fi
12706
12707   if test "$have_crypt" = no ; then
12708     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
12709 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
12710 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
12711   echo $ECHO_N "(cached) $ECHO_C" >&6
12712 else
12713   ac_check_lib_save_LIBS=$LIBS
12714 LIBS="-lcrypt  $LIBS"
12715 cat >conftest.$ac_ext <<_ACEOF
12716 #line $LINENO "configure"
12717 /* confdefs.h.  */
12718 _ACEOF
12719 cat confdefs.h >>conftest.$ac_ext
12720 cat >>conftest.$ac_ext <<_ACEOF
12721 /* end confdefs.h.  */
12722
12723 /* Override any gcc2 internal prototype to avoid an error.  */
12724 #ifdef __cplusplus
12725 extern "C"
12726 #endif
12727 /* We use char because int might match the return type of a gcc2
12728    builtin and then its argument prototype would still apply.  */
12729 char crypt ();
12730 int
12731 main ()
12732 {
12733 crypt ();
12734   ;
12735   return 0;
12736 }
12737 _ACEOF
12738 rm -f conftest.$ac_objext conftest$ac_exeext
12739 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12740   (eval $ac_link) 2>&5
12741   ac_status=$?
12742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12743   (exit $ac_status); } &&
12744          { ac_try='test -s conftest$ac_exeext'
12745   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12746   (eval $ac_try) 2>&5
12747   ac_status=$?
12748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12749   (exit $ac_status); }; }; then
12750   ac_cv_lib_crypt_crypt=yes
12751 else
12752   echo "$as_me: failed program was:" >&5
12753 sed 's/^/| /' conftest.$ac_ext >&5
12754
12755 ac_cv_lib_crypt_crypt=no
12756 fi
12757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12758 LIBS=$ac_check_lib_save_LIBS
12759 fi
12760 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
12761 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
12762 if test $ac_cv_lib_crypt_crypt = yes; then
12763   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
12764 fi
12765
12766   fi
12767 fi
12768
12769
12770 # Most of the above shadow mechanisms will have set need_setuid to yes,
12771 # if they were found.  But, on some systems, we need setuid even when
12772 # using plain old vanilla passwords.
12773 #
12774 if test "$enable_locking" = yes ; then
12775   case "$host" in
12776     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
12777       need_setuid=yes
12778     ;;
12779   esac
12780 fi
12781
12782
12783 if test "$have_shadow_adjunct" = yes ; then
12784   cat >>confdefs.h <<\_ACEOF
12785 #define HAVE_ADJUNCT_PASSWD 1
12786 _ACEOF
12787
12788 elif test "$have_shadow_enhanced" = yes ; then
12789   cat >>confdefs.h <<\_ACEOF
12790 #define HAVE_ENHANCED_PASSWD 1
12791 _ACEOF
12792
12793 elif test "$have_shadow_hpux" = yes ; then
12794   cat >>confdefs.h <<\_ACEOF
12795 #define HAVE_HPUX_PASSWD 1
12796 _ACEOF
12797
12798 elif test "$have_shadow" = yes ; then
12799   cat >>confdefs.h <<\_ACEOF
12800 #define HAVE_SHADOW_PASSWD 1
12801 _ACEOF
12802
12803 fi
12804
12805
12806 ###############################################################################
12807 #
12808 #       Check for -lXm.
12809 #
12810 ###############################################################################
12811
12812 have_motif=no
12813 with_motif_req=unspecified
12814
12815 # Check whether --with-motif or --without-motif was given.
12816 if test "${with_motif+set}" = set; then
12817   withval="$with_motif"
12818   with_motif="$withval"; with_motif_req="$withval"
12819 else
12820   with_motif=no
12821 fi;
12822
12823
12824    case "$with_motif" in
12825     yes) ;;
12826     no)  ;;
12827
12828     /*)
12829      echo "$as_me:$LINENO: checking for Motif headers" >&5
12830 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
12831      d=$with_motif/include
12832      if test -d $d; then
12833        X_CFLAGS="-I$d $X_CFLAGS"
12834        echo "$as_me:$LINENO: result: $d" >&5
12835 echo "${ECHO_T}$d" >&6
12836      else
12837        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12838 echo "${ECHO_T}not found ($d: no such directory)" >&6
12839      fi
12840
12841      echo "$as_me:$LINENO: checking for Motif libs" >&5
12842 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
12843      d=$with_motif/lib
12844      if test -d $d; then
12845        X_LIBS="-L$d $X_LIBS"
12846        echo "$as_me:$LINENO: result: $d" >&5
12847 echo "${ECHO_T}$d" >&6
12848      else
12849        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12850 echo "${ECHO_T}not found ($d: no such directory)" >&6
12851      fi
12852
12853      # replace the directory string with "yes".
12854      with_motif_req="yes"
12855      with_motif=$with_motif_req
12856      ;;
12857
12858     *)
12859      echo ""
12860      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
12861      echo "       If it is a directory, then \`DIR/include' will be added to"
12862      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12863      exit 1
12864      ;;
12865    esac
12866
12867
12868 if test "$with_motif" != yes -a "$with_motif" != no ; then
12869   echo "error: must be yes or no: --with-motif=$with_motif"
12870   exit 1
12871 fi
12872
12873 if test "$with_motif" = yes; then
12874   have_motif=no
12875
12876   ac_save_CPPFLAGS="$CPPFLAGS"
12877   if test \! -z "$includedir" ; then
12878     CPPFLAGS="$CPPFLAGS -I$includedir"
12879   fi
12880   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12881   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
12882 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
12883 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
12884   echo $ECHO_N "(cached) $ECHO_C" >&6
12885 else
12886   cat >conftest.$ac_ext <<_ACEOF
12887 #line $LINENO "configure"
12888 /* confdefs.h.  */
12889 _ACEOF
12890 cat confdefs.h >>conftest.$ac_ext
12891 cat >>conftest.$ac_ext <<_ACEOF
12892 /* end confdefs.h.  */
12893 #include <stdlib.h>
12894                      #include <stdio.h>
12895                      #include <X11/Intrinsic.h>
12896
12897 #include <Xm/Xm.h>
12898 _ACEOF
12899 rm -f conftest.$ac_objext
12900 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12901   (eval $ac_compile) 2>&5
12902   ac_status=$?
12903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12904   (exit $ac_status); } &&
12905          { ac_try='test -s conftest.$ac_objext'
12906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12907   (eval $ac_try) 2>&5
12908   ac_status=$?
12909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12910   (exit $ac_status); }; }; then
12911   ac_cv_header_Xm_Xm_h=yes
12912 else
12913   echo "$as_me: failed program was:" >&5
12914 sed 's/^/| /' conftest.$ac_ext >&5
12915
12916 ac_cv_header_Xm_Xm_h=no
12917 fi
12918 rm -f conftest.$ac_objext conftest.$ac_ext
12919 fi
12920 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
12921 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
12922 if test $ac_cv_header_Xm_Xm_h = yes; then
12923   have_motif=yes
12924                      cat >>confdefs.h <<\_ACEOF
12925 #define HAVE_MOTIF 1
12926 _ACEOF
12927
12928                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
12929 fi
12930
12931
12932   CPPFLAGS="$ac_save_CPPFLAGS"
12933 fi
12934
12935
12936 if test "$have_motif" = yes; then
12937
12938   ac_save_CPPFLAGS="$CPPFLAGS"
12939   if test \! -z "$includedir" ; then
12940     CPPFLAGS="$CPPFLAGS -I$includedir"
12941   fi
12942   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12943   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
12944 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
12945 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
12946   echo $ECHO_N "(cached) $ECHO_C" >&6
12947 else
12948   cat >conftest.$ac_ext <<_ACEOF
12949 #line $LINENO "configure"
12950 /* confdefs.h.  */
12951 _ACEOF
12952 cat confdefs.h >>conftest.$ac_ext
12953 cat >>conftest.$ac_ext <<_ACEOF
12954 /* end confdefs.h.  */
12955 #include <stdlib.h>
12956                      #include <stdio.h>
12957                      #include <X11/Intrinsic.h>
12958
12959 #include <Xm/ComboBox.h>
12960 _ACEOF
12961 rm -f conftest.$ac_objext
12962 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12963   (eval $ac_compile) 2>&5
12964   ac_status=$?
12965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12966   (exit $ac_status); } &&
12967          { ac_try='test -s conftest.$ac_objext'
12968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12969   (eval $ac_try) 2>&5
12970   ac_status=$?
12971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12972   (exit $ac_status); }; }; then
12973   ac_cv_header_Xm_ComboBox_h=yes
12974 else
12975   echo "$as_me: failed program was:" >&5
12976 sed 's/^/| /' conftest.$ac_ext >&5
12977
12978 ac_cv_header_Xm_ComboBox_h=no
12979 fi
12980 rm -f conftest.$ac_objext conftest.$ac_ext
12981 fi
12982 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
12983 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
12984 if test $ac_cv_header_Xm_ComboBox_h = yes; then
12985   cat >>confdefs.h <<\_ACEOF
12986 #define HAVE_XMCOMBOBOX 1
12987 _ACEOF
12988
12989 fi
12990
12991
12992   CPPFLAGS="$ac_save_CPPFLAGS"
12993 fi
12994
12995
12996 ###############################################################################
12997 #
12998 #       Check for -lgtk (and Gnome stuff)
12999 #
13000 ###############################################################################
13001
13002 have_gtk=no
13003 have_gtk2=no
13004 with_gtk_req=unspecified
13005
13006 # Check whether --with-gtk or --without-gtk was given.
13007 if test "${with_gtk+set}" = set; then
13008   withval="$with_gtk"
13009   with_gtk="$withval"; with_gtk_req="$withval"
13010 else
13011   with_gtk=yes
13012 fi;
13013
13014 # if --with-gtk=/directory/ was specified, remember that directory so that
13015 # we can also look for the `gtk-config' program in that directory.
13016 case "$with_gtk" in
13017   /*)
13018     gtk_dir="$with_gtk"
13019     ;;
13020   *)
13021     gtk_dir=""
13022     ;;
13023 esac
13024
13025
13026    case "$with_gtk" in
13027     yes) ;;
13028     no)  ;;
13029
13030     /*)
13031      echo "$as_me:$LINENO: checking for Gtk headers" >&5
13032 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
13033      d=$with_gtk/include
13034      if test -d $d; then
13035        X_CFLAGS="-I$d $X_CFLAGS"
13036        echo "$as_me:$LINENO: result: $d" >&5
13037 echo "${ECHO_T}$d" >&6
13038      else
13039        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13040 echo "${ECHO_T}not found ($d: no such directory)" >&6
13041      fi
13042
13043      echo "$as_me:$LINENO: checking for Gtk libs" >&5
13044 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
13045      d=$with_gtk/lib
13046      if test -d $d; then
13047        X_LIBS="-L$d $X_LIBS"
13048        echo "$as_me:$LINENO: result: $d" >&5
13049 echo "${ECHO_T}$d" >&6
13050      else
13051        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13052 echo "${ECHO_T}not found ($d: no such directory)" >&6
13053      fi
13054
13055      # replace the directory string with "yes".
13056      with_gtk_req="yes"
13057      with_gtk=$with_gtk_req
13058      ;;
13059
13060     *)
13061      echo ""
13062      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
13063      echo "       If it is a directory, then \`DIR/include' will be added to"
13064      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13065      exit 1
13066      ;;
13067    esac
13068
13069
13070 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
13071   echo "error: must be yes or no: --with-gtk=$with_gtk"
13072   exit 1
13073 fi
13074
13075 have_gnome=no
13076 with_gnome_req=unspecified
13077
13078 # Check whether --with-gnome or --without-gnome was given.
13079 if test "${with_gnome+set}" = set; then
13080   withval="$with_gnome"
13081   with_gnome="$withval"; with_gnome_req="$withval"
13082 else
13083   with_gnome=yes
13084 fi;
13085
13086 # if --with-gnome=/directory/ was specified, remember that directory so that
13087 # we can also look for the `gnome-config' program in that directory.
13088 case "$with_gnome" in
13089   /*)
13090     gnome_dir="$with_gnome"
13091     ;;
13092   *)
13093     gnome_dir=""
13094     ;;
13095 esac
13096
13097
13098    case "$with_gnome" in
13099     yes) ;;
13100     no)  ;;
13101
13102     /*)
13103      echo "$as_me:$LINENO: checking for Gnome headers" >&5
13104 echo $ECHO_N "checking for Gnome headers... $ECHO_C" >&6
13105      d=$with_gnome/include
13106      if test -d $d; then
13107        X_CFLAGS="-I$d $X_CFLAGS"
13108        echo "$as_me:$LINENO: result: $d" >&5
13109 echo "${ECHO_T}$d" >&6
13110      else
13111        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13112 echo "${ECHO_T}not found ($d: no such directory)" >&6
13113      fi
13114
13115      echo "$as_me:$LINENO: checking for Gnome libs" >&5
13116 echo $ECHO_N "checking for Gnome libs... $ECHO_C" >&6
13117      d=$with_gnome/lib
13118      if test -d $d; then
13119        X_LIBS="-L$d $X_LIBS"
13120        echo "$as_me:$LINENO: result: $d" >&5
13121 echo "${ECHO_T}$d" >&6
13122      else
13123        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13124 echo "${ECHO_T}not found ($d: no such directory)" >&6
13125      fi
13126
13127      # replace the directory string with "yes".
13128      with_gnome_req="yes"
13129      with_gnome=$with_gnome_req
13130      ;;
13131
13132     *)
13133      echo ""
13134      echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
13135      echo "       If it is a directory, then \`DIR/include' will be added to"
13136      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13137      exit 1
13138      ;;
13139    esac
13140
13141
13142 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
13143   echo "error: must be yes or no: --with-gnome=$with_gnome"
13144   exit 1
13145 fi
13146
13147 parse_gtk_version_string() {
13148   # M4 sucks!!
13149
13150   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
13151   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
13152
13153   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
13154   if test -z "$ac_gtk_version"; then
13155     ac_gtk_version=unknown
13156     ac_gtk_version_string=unknown
13157   fi
13158 }
13159
13160
13161 jurassic_gtk=no
13162 gtk2_halfassed=no
13163
13164 if test "$with_gtk" = yes; then
13165   have_gtk=no
13166
13167   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
13168   # look in /foo/bin/ for glib-config, gtk-config, and gnome-config.
13169   #
13170   gtk_path="$PATH"
13171
13172   if test ! -z "$gtk_dir"; then
13173     # canonicalize slashes.
13174     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
13175     gtk_path="$foo:$gtk_path"
13176   fi
13177
13178   if test ! -z "$gnome_dir"; then
13179     # canonicalize slashes.
13180     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
13181     gtk_path="$foo:$gtk_path"
13182   fi
13183
13184   for ac_prog in pkg-config
13185 do
13186   # Extract the first word of "$ac_prog", so it can be a program name with args.
13187 set dummy $ac_prog; ac_word=$2
13188 echo "$as_me:$LINENO: checking for $ac_word" >&5
13189 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13190 if test "${ac_cv_path_pkg_config+set}" = set; then
13191   echo $ECHO_N "(cached) $ECHO_C" >&6
13192 else
13193   case $pkg_config in
13194   [\\/]* | ?:[\\/]*)
13195   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
13196   ;;
13197   *)
13198   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13199 for as_dir in $gtk_path
13200 do
13201   IFS=$as_save_IFS
13202   test -z "$as_dir" && as_dir=.
13203   for ac_exec_ext in '' $ac_executable_extensions; do
13204   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13205     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
13206     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13207     break 2
13208   fi
13209 done
13210 done
13211
13212   ;;
13213 esac
13214 fi
13215 pkg_config=$ac_cv_path_pkg_config
13216
13217 if test -n "$pkg_config"; then
13218   echo "$as_me:$LINENO: result: $pkg_config" >&5
13219 echo "${ECHO_T}$pkg_config" >&6
13220 else
13221   echo "$as_me:$LINENO: result: no" >&5
13222 echo "${ECHO_T}no" >&6
13223 fi
13224
13225   test -n "$pkg_config" && break
13226 done
13227
13228
13229   if test -n "$pkg_config" ; then
13230     #
13231     # the new way...
13232     # run pkg-config based tests.
13233     #
13234     pkgs=''
13235     pkg_check_version() {
13236       if test "$ok" = yes ; then
13237         req="$1"
13238         min="$2"
13239         echo "$as_me:$LINENO: checking for $req" >&5
13240 echo $ECHO_N "checking for $req... $ECHO_C" >&6
13241         if $pkg_config --exists "$req" ; then
13242           vers=`$pkg_config --modversion "$req"`
13243           if $pkg_config --exists "$req >= $min" ; then
13244             echo "$as_me:$LINENO: result: $vers" >&5
13245 echo "${ECHO_T}$vers" >&6
13246             pkgs="$pkgs $req"
13247             return 1
13248           else
13249             echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
13250 echo "${ECHO_T}$vers (wanted >= $min)" >&6
13251             ok=no
13252             return 0
13253           fi
13254         else
13255           echo "$as_me:$LINENO: result: no" >&5
13256 echo "${ECHO_T}no" >&6
13257           ok=no
13258           return 0
13259         fi
13260       fi
13261     }
13262
13263     echo "$as_me:$LINENO: result: checking for GTK 2.x with pkg-config based tests..." >&5
13264 echo "${ECHO_T}checking for GTK 2.x with pkg-config based tests..." >&6
13265
13266     ok="yes"
13267     pkg_check_version       gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
13268     pkg_check_version    gmodule-2.0  2.0.0
13269     pkg_check_version     libxml-2.0  2.4.6
13270     pkg_check_version   libglade-2.0  1.99.0
13271 #   pkg_check_version gdk_pixbuf      0.1
13272     have_gtk="$ok"
13273
13274     if test "$have_gtk" = yes; then
13275       have_gtk2=yes
13276       cat >>confdefs.h <<\_ACEOF
13277 #define HAVE_GTK2 1
13278 _ACEOF
13279
13280     else
13281       if test -n "$ac_gtk_version_string" ; then
13282         gtk2_halfassed="$ac_gtk_version_string"
13283         gtk2_halfassed_lib="$req"
13284       fi
13285     fi
13286
13287     if test "$have_gtk" = no; then
13288       #
13289       # we don't have GTK 2.  Let's look for GTK 1.
13290       #
13291       echo "$as_me:$LINENO: result: checking for GTK 1.x with pkg-config based tests..." >&5
13292 echo "${ECHO_T}checking for GTK 1.x with pkg-config based tests..." >&6
13293
13294       pkgs=''
13295       ok="yes"
13296       pkg_check_version gtk+       1.2     ; ac_gtk_version_string="$vers"
13297       pkg_check_version glib       1.0
13298       pkg_check_version gdk_pixbuf 0.1
13299       have_gtk="$ok"
13300
13301       # Now check for Gnome...
13302       #
13303       if test "$have_gtk" = yes -a "$with_gnome" = yes; then
13304         old_pkgs="$pkgs"
13305         ok=yes
13306         pkg_check_version capplet    1.0
13307         pkg_check_version gnomeui    1.0
13308         pkg_check_version gdk_pixbuf 0.1
13309         have_gnome="$ok"
13310
13311         if test "$have_gnome" = no; then
13312           pkgs="$old_pkgs"
13313         else
13314           cat >>confdefs.h <<\_ACEOF
13315 #define HAVE_CRAPPLET 1
13316 _ACEOF
13317
13318         fi
13319       fi
13320     fi
13321
13322     if test "$have_gtk" = yes; then
13323       parse_gtk_version_string
13324       jurassic_gtk=no
13325     else
13326       have_gnome=no
13327     fi
13328
13329     if test "$have_gtk" = yes; then
13330       echo "$as_me:$LINENO: checking for Gtk includes" >&5
13331 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
13332 if test "${ac_cv_gtk_config_cflags+set}" = set; then
13333   echo $ECHO_N "(cached) $ECHO_C" >&6
13334 else
13335   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
13336 fi
13337 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
13338 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
13339       echo "$as_me:$LINENO: checking for Gtk libs" >&5
13340 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
13341 if test "${ac_cv_gtk_config_libs+set}" = set; then
13342   echo $ECHO_N "(cached) $ECHO_C" >&6
13343 else
13344   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
13345 fi
13346 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
13347 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
13348     fi
13349     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
13350     ac_gtk_config_libs=$ac_cv_gtk_config_libs
13351
13352     ac_gnome_config_cflags=$ac_gtk_config_cflags
13353     ac_gnome_config_libs=$ac_gtk_config_libs
13354
13355   else
13356     #
13357     # the old way...
13358     # run {gnome,gtk}-config based tests.
13359     #
13360     echo "$as_me:$LINENO: result: checking for GTK 1.x with gtk-config based tests..." >&5
13361 echo "${ECHO_T}checking for GTK 1.x with gtk-config based tests..." >&6
13362
13363     for ac_prog in glib12-config glib-config
13364 do
13365   # Extract the first word of "$ac_prog", so it can be a program name with args.
13366 set dummy $ac_prog; ac_word=$2
13367 echo "$as_me:$LINENO: checking for $ac_word" >&5
13368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13369 if test "${ac_cv_path_glib_config+set}" = set; then
13370   echo $ECHO_N "(cached) $ECHO_C" >&6
13371 else
13372   case $glib_config in
13373   [\\/]* | ?:[\\/]*)
13374   ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
13375   ;;
13376   *)
13377   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13378 for as_dir in $gtk_path
13379 do
13380   IFS=$as_save_IFS
13381   test -z "$as_dir" && as_dir=.
13382   for ac_exec_ext in '' $ac_executable_extensions; do
13383   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13384     ac_cv_path_glib_config="$as_dir/$ac_word$ac_exec_ext"
13385     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13386     break 2
13387   fi
13388 done
13389 done
13390
13391   ;;
13392 esac
13393 fi
13394 glib_config=$ac_cv_path_glib_config
13395
13396 if test -n "$glib_config"; then
13397   echo "$as_me:$LINENO: result: $glib_config" >&5
13398 echo "${ECHO_T}$glib_config" >&6
13399 else
13400   echo "$as_me:$LINENO: result: no" >&5
13401 echo "${ECHO_T}no" >&6
13402 fi
13403
13404   test -n "$glib_config" && break
13405 done
13406
13407     for ac_prog in gtk12-config  gtk-config
13408 do
13409   # Extract the first word of "$ac_prog", so it can be a program name with args.
13410 set dummy $ac_prog; ac_word=$2
13411 echo "$as_me:$LINENO: checking for $ac_word" >&5
13412 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13413 if test "${ac_cv_path_gtk_config+set}" = set; then
13414   echo $ECHO_N "(cached) $ECHO_C" >&6
13415 else
13416   case $gtk_config in
13417   [\\/]* | ?:[\\/]*)
13418   ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
13419   ;;
13420   *)
13421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13422 for as_dir in $gtk_path
13423 do
13424   IFS=$as_save_IFS
13425   test -z "$as_dir" && as_dir=.
13426   for ac_exec_ext in '' $ac_executable_extensions; do
13427   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13428     ac_cv_path_gtk_config="$as_dir/$ac_word$ac_exec_ext"
13429     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13430     break 2
13431   fi
13432 done
13433 done
13434
13435   ;;
13436 esac
13437 fi
13438 gtk_config=$ac_cv_path_gtk_config
13439
13440 if test -n "$gtk_config"; then
13441   echo "$as_me:$LINENO: result: $gtk_config" >&5
13442 echo "${ECHO_T}$gtk_config" >&6
13443 else
13444   echo "$as_me:$LINENO: result: no" >&5
13445 echo "${ECHO_T}no" >&6
13446 fi
13447
13448   test -n "$gtk_config" && break
13449 done
13450
13451
13452     if test "$with_gnome" = yes; then
13453       for ac_prog in gnome-config
13454 do
13455   # Extract the first word of "$ac_prog", so it can be a program name with args.
13456 set dummy $ac_prog; ac_word=$2
13457 echo "$as_me:$LINENO: checking for $ac_word" >&5
13458 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13459 if test "${ac_cv_path_gnome_config+set}" = set; then
13460   echo $ECHO_N "(cached) $ECHO_C" >&6
13461 else
13462   case $gnome_config in
13463   [\\/]* | ?:[\\/]*)
13464   ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
13465   ;;
13466   *)
13467   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13468 for as_dir in $gtk_path
13469 do
13470   IFS=$as_save_IFS
13471   test -z "$as_dir" && as_dir=.
13472   for ac_exec_ext in '' $ac_executable_extensions; do
13473   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13474     ac_cv_path_gnome_config="$as_dir/$ac_word$ac_exec_ext"
13475     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13476     break 2
13477   fi
13478 done
13479 done
13480
13481   ;;
13482 esac
13483 fi
13484 gnome_config=$ac_cv_path_gnome_config
13485
13486 if test -n "$gnome_config"; then
13487   echo "$as_me:$LINENO: result: $gnome_config" >&5
13488 echo "${ECHO_T}$gnome_config" >&6
13489 else
13490   echo "$as_me:$LINENO: result: no" >&5
13491 echo "${ECHO_T}no" >&6
13492 fi
13493
13494   test -n "$gnome_config" && break
13495 done
13496
13497     fi
13498
13499     if test -n "$glib_config" -a  -n "$gtk_config" ; then
13500       have_gtk=yes
13501       if test "$with_gnome" = yes -a -n "$gnome_config" ; then
13502         have_gnome=yes
13503       fi
13504     fi
13505
13506     if test "$have_gtk" = yes; then
13507       echo "$as_me:$LINENO: checking Gtk version number" >&5
13508 echo $ECHO_N "checking Gtk version number... $ECHO_C" >&6
13509 if test "${ac_cv_gtk_version_string+set}" = set; then
13510   echo $ECHO_N "(cached) $ECHO_C" >&6
13511 else
13512   ac_cv_gtk_version_string=`$gtk_config --version`
13513 fi
13514 echo "$as_me:$LINENO: result: $ac_cv_gtk_version_string" >&5
13515 echo "${ECHO_T}$ac_cv_gtk_version_string" >&6
13516       ac_gtk_version_string=$ac_cv_gtk_version_string
13517       parse_gtk_version_string
13518     fi
13519
13520     if test "$have_gtk" = yes; then
13521       if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
13522       then
13523         have_gtk=no
13524         have_gnome=no
13525         jurassic_gtk=yes
13526       fi
13527     fi
13528
13529     if test "$have_gtk" = yes; then
13530       echo "$as_me:$LINENO: checking for Gtk includes" >&5
13531 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
13532 if test "${ac_cv_gtk_config_cflags+set}" = set; then
13533   echo $ECHO_N "(cached) $ECHO_C" >&6
13534 else
13535   ac_cv_gtk_config_cflags=`$gtk_config --cflags`
13536 fi
13537 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
13538 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
13539       echo "$as_me:$LINENO: checking for Gtk libs" >&5
13540 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
13541 if test "${ac_cv_gtk_config_libs+set}" = set; then
13542   echo $ECHO_N "(cached) $ECHO_C" >&6
13543 else
13544   ac_cv_gtk_config_libs=`$gtk_config --libs`
13545 fi
13546 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
13547 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
13548     fi
13549     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
13550     ac_gtk_config_libs=$ac_cv_gtk_config_libs
13551
13552     # Check for Gnome Capplet support.
13553     # Note that this is only needed with Gnome 1.x, not Gnome 2.x.
13554     # In a Gnome 2.x world, libcapplet will not exist.
13555     # (In fact, this likely won't even be checked, since in a Gnome 2.x
13556     # world, we will probably be up in the "$pkg_config" branch instead
13557     # of here in the "$gnome_config" branch.)
13558     #
13559     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13560       gnome_config_libs="gtk capplet gnomeui gdk_pixbuf"
13561       echo "$as_me:$LINENO: checking for Gnome capplet includes" >&5
13562 echo $ECHO_N "checking for Gnome capplet includes... $ECHO_C" >&6
13563       if test "${ac_cv_gnome_config_cflags+set}" = set; then
13564   echo $ECHO_N "(cached) $ECHO_C" >&6
13565 else
13566   if ( $gnome_config --cflags $gnome_config_libs 2>&1 | \
13567               grep Unknown >/dev/null ) ; then
13568            ac_cv_gnome_config_cflags=''
13569          else
13570           ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
13571          fi
13572 fi
13573
13574       ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
13575       if test "$ac_gnome_config_cflags" = "" ; then
13576         have_gnome=no
13577         echo "$as_me:$LINENO: result: no" >&5
13578 echo "${ECHO_T}no" >&6
13579       else
13580         echo "$as_me:$LINENO: result: $ac_gnome_config_cflags" >&5
13581 echo "${ECHO_T}$ac_gnome_config_cflags" >&6
13582       fi
13583     fi
13584
13585     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13586       echo "$as_me:$LINENO: checking for Gnome capplet libs" >&5
13587 echo $ECHO_N "checking for Gnome capplet libs... $ECHO_C" >&6
13588       if test "${ac_cv_gnome_config_libs+set}" = set; then
13589   echo $ECHO_N "(cached) $ECHO_C" >&6
13590 else
13591   if ( $gnome_config --libs $gnome_config_libs 2>&1 |
13592               grep Unknown >/dev/null ) ; then
13593            ac_cv_gnome_config_libs=''
13594          else
13595            ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
13596          fi
13597 fi
13598
13599       ac_gnome_config_libs=$ac_cv_gnome_config_libs
13600       if test "$ac_gnome_config_libs" = "" ; then
13601         have_gnome=no
13602         echo "$as_me:$LINENO: result: no" >&5
13603 echo "${ECHO_T}no" >&6
13604       else
13605         echo "$as_me:$LINENO: result: $ac_gnome_config_libs" >&5
13606 echo "${ECHO_T}$ac_gnome_config_libs" >&6
13607       fi
13608     fi
13609
13610     # If we have Gnome, then override the gtk-config values with
13611     # the gnome-config values.
13612     #
13613     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13614       ac_gtk_config_cflags=$ac_gnome_config_cflags
13615       ac_gtk_config_libs=$ac_gnome_config_libs
13616       cat >>confdefs.h <<\_ACEOF
13617 #define HAVE_CRAPPLET 1
13618 _ACEOF
13619
13620     fi
13621
13622   fi   # end of {gnome,gtk}-config based tests
13623
13624   if test "$have_gtk" = yes -a "$have_gtk2" = no; then
13625     # check for this function that was not in libcapplet 1.2.
13626     # (only needed in Gnome/Gtk 1.x, not Gnome/Gtk 2.x)
13627
13628   ac_save_CPPFLAGS="$CPPFLAGS"
13629   ac_save_LDFLAGS="$LDFLAGS"
13630 #  ac_save_LIBS="$LIBS"
13631
13632   if test \! -z "$includedir" ; then
13633     CPPFLAGS="$CPPFLAGS -I$includedir"
13634   fi
13635   # note: $X_CFLAGS includes $x_includes
13636   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13637
13638   if test \! -z "$libdir" ; then
13639     LDFLAGS="$LDFLAGS -L$libdir"
13640   fi
13641   # note: $X_LIBS includes $x_libraries
13642   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13643
13644   echo "$as_me:$LINENO: checking for capplet_widget_changes_are_immediate in -lcapplet" >&5
13645 echo $ECHO_N "checking for capplet_widget_changes_are_immediate in -lcapplet... $ECHO_C" >&6
13646 if test "${ac_cv_lib_capplet_capplet_widget_changes_are_immediate+set}" = set; then
13647   echo $ECHO_N "(cached) $ECHO_C" >&6
13648 else
13649   ac_check_lib_save_LIBS=$LIBS
13650 LIBS="-lcapplet $ac_gnome_config_libs $LIBS"
13651 cat >conftest.$ac_ext <<_ACEOF
13652 #line $LINENO "configure"
13653 /* confdefs.h.  */
13654 _ACEOF
13655 cat confdefs.h >>conftest.$ac_ext
13656 cat >>conftest.$ac_ext <<_ACEOF
13657 /* end confdefs.h.  */
13658
13659 /* Override any gcc2 internal prototype to avoid an error.  */
13660 #ifdef __cplusplus
13661 extern "C"
13662 #endif
13663 /* We use char because int might match the return type of a gcc2
13664    builtin and then its argument prototype would still apply.  */
13665 char capplet_widget_changes_are_immediate ();
13666 int
13667 main ()
13668 {
13669 capplet_widget_changes_are_immediate ();
13670   ;
13671   return 0;
13672 }
13673 _ACEOF
13674 rm -f conftest.$ac_objext conftest$ac_exeext
13675 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13676   (eval $ac_link) 2>&5
13677   ac_status=$?
13678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13679   (exit $ac_status); } &&
13680          { ac_try='test -s conftest$ac_exeext'
13681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13682   (eval $ac_try) 2>&5
13683   ac_status=$?
13684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13685   (exit $ac_status); }; }; then
13686   ac_cv_lib_capplet_capplet_widget_changes_are_immediate=yes
13687 else
13688   echo "$as_me: failed program was:" >&5
13689 sed 's/^/| /' conftest.$ac_ext >&5
13690
13691 ac_cv_lib_capplet_capplet_widget_changes_are_immediate=no
13692 fi
13693 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13694 LIBS=$ac_check_lib_save_LIBS
13695 fi
13696 echo "$as_me:$LINENO: result: $ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&5
13697 echo "${ECHO_T}$ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&6
13698 if test $ac_cv_lib_capplet_capplet_widget_changes_are_immediate = yes; then
13699   cat >>confdefs.h <<\_ACEOF
13700 #define HAVE_CRAPPLET_IMMEDIATE 1
13701 _ACEOF
13702
13703 else
13704   true
13705 fi
13706
13707   CPPFLAGS="$ac_save_CPPFLAGS"
13708   LDFLAGS="$ac_save_LDFLAGS"
13709 #  LIBS="$ac_save_LIBS"
13710
13711   fi
13712
13713
13714   GNOME_DATADIR=""
13715   if test "$have_gtk" = yes; then
13716     if test -n "$pkg_config"; then
13717       if test "$have_gtk2" = yes; then
13718         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
13719       else
13720         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+`
13721       fi
13722     else
13723       GNOME_DATADIR=`$gtk_config --prefix`
13724     fi
13725     GNOME_DATADIR="$GNOME_DATADIR/share"
13726   fi
13727
13728   # .desktop files go in different places in Gnome 1.x and Gnome 2.x...
13729   if test "$have_gtk2" = yes; then
13730     GNOME_PANELDIR='$(GNOME_PANELDIR2)'
13731   else
13732     GNOME_PANELDIR='$(GNOME_PANELDIR1)'
13733   fi
13734
13735
13736   if test "$have_gtk" = yes; then
13737     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
13738     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
13739     cat >>confdefs.h <<\_ACEOF
13740 #define HAVE_GTK 1
13741 _ACEOF
13742
13743
13744     if test "$have_gtk2" = yes; then
13745       GTK_EXTRA_OBJS=""
13746     else
13747       GTK_EXTRA_OBJS="\$(GTK_EXTRA_OBJS)"
13748     fi
13749   fi
13750
13751 fi
13752
13753
13754 # Check for the Gnome Help Browser.
13755 #
13756 if test "$have_gtk" = yes; then
13757   for ac_prog in yelp gnome-help-browser
13758 do
13759   # Extract the first word of "$ac_prog", so it can be a program name with args.
13760 set dummy $ac_prog; ac_word=$2
13761 echo "$as_me:$LINENO: checking for $ac_word" >&5
13762 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13763 if test "${ac_cv_prog_have_gnome_help+set}" = set; then
13764   echo $ECHO_N "(cached) $ECHO_C" >&6
13765 else
13766   if test -n "$have_gnome_help"; then
13767   ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
13768 else
13769 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13770 for as_dir in $PATH
13771 do
13772   IFS=$as_save_IFS
13773   test -z "$as_dir" && as_dir=.
13774   for ac_exec_ext in '' $ac_executable_extensions; do
13775   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13776     ac_cv_prog_have_gnome_help="$ac_prog"
13777     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13778     break 2
13779   fi
13780 done
13781 done
13782
13783 fi
13784 fi
13785 have_gnome_help=$ac_cv_prog_have_gnome_help
13786 if test -n "$have_gnome_help"; then
13787   echo "$as_me:$LINENO: result: $have_gnome_help" >&5
13788 echo "${ECHO_T}$have_gnome_help" >&6
13789 else
13790   echo "$as_me:$LINENO: result: no" >&5
13791 echo "${ECHO_T}no" >&6
13792 fi
13793
13794   test -n "$have_gnome_help" && break
13795 done
13796 test -n "$have_gnome_help" || have_gnome_help="no"
13797
13798   if test "$have_gnome_help" != no; then
13799     have_gnome_help=yes
13800   fi
13801 fi
13802
13803
13804 ###############################################################################
13805 #
13806 #       Check for -lxml
13807 #
13808 ###############################################################################
13809
13810 have_xml=no
13811 with_xml_req=unspecified
13812 xml_halfassed=no
13813
13814 # Check whether --with-xml or --without-xml was given.
13815 if test "${with_xml+set}" = set; then
13816   withval="$with_xml"
13817   with_xml="$withval"; with_xml_req="$withval"
13818 else
13819   with_xml=yes
13820 fi;
13821
13822 # if --with-xml=/directory/ was specified, remember that directory so that
13823 # we can also look for the `xml-config' program in that directory.
13824 case "$with_xml" in
13825   /*)
13826     xml_dir="$with_xml"
13827     ;;
13828   *)
13829     xml_dir=""
13830     ;;
13831 esac
13832
13833
13834    case "$with_xml" in
13835     yes) ;;
13836     no)  ;;
13837
13838     /*)
13839      echo "$as_me:$LINENO: checking for XML headers" >&5
13840 echo $ECHO_N "checking for XML headers... $ECHO_C" >&6
13841      d=$with_xml/include
13842      if test -d $d; then
13843        X_CFLAGS="-I$d $X_CFLAGS"
13844        echo "$as_me:$LINENO: result: $d" >&5
13845 echo "${ECHO_T}$d" >&6
13846      else
13847        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13848 echo "${ECHO_T}not found ($d: no such directory)" >&6
13849      fi
13850
13851      echo "$as_me:$LINENO: checking for XML libs" >&5
13852 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13853      d=$with_xml/lib
13854      if test -d $d; then
13855        X_LIBS="-L$d $X_LIBS"
13856        echo "$as_me:$LINENO: result: $d" >&5
13857 echo "${ECHO_T}$d" >&6
13858      else
13859        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13860 echo "${ECHO_T}not found ($d: no such directory)" >&6
13861      fi
13862
13863      # replace the directory string with "yes".
13864      with_xml_req="yes"
13865      with_xml=$with_xml_req
13866      ;;
13867
13868     *)
13869      echo ""
13870      echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory."
13871      echo "       If it is a directory, then \`DIR/include' will be added to"
13872      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13873      exit 1
13874      ;;
13875    esac
13876
13877
13878 if test "$with_xml" != yes -a "$with_xml" != no ; then
13879   echo "error: must be yes or no: --with-xml=$with_xml"
13880   exit 1
13881 fi
13882
13883 if test "$with_xml" = yes; then
13884   have_xml=no
13885   have_old_xml=no
13886
13887   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
13888   # look in /foo/bin/ for for xml-config.
13889   #
13890   xml_path="$PATH"
13891
13892   if test ! -z "$gtk_dir"; then
13893     # canonicalize slashes.
13894     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
13895     xml_path="$foo:$xml_path"
13896   fi
13897
13898   if test ! -z "$gnome_dir"; then
13899     # canonicalize slashes.
13900     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
13901     xml_path="$foo:$xml_path"
13902   fi
13903
13904   if test -n "$pkg_config" ; then
13905     #
13906     # the new way...
13907     # run pkg-config based tests.
13908     #
13909     pkgs=""
13910     ok="yes"
13911
13912     # If we have Gtk 2.x, then *only* XML 2.x will work.
13913     # If we have Gtk 1.x, or don't have Gtk at all, then
13914     # either XML 1.x or 2.x will work.
13915
13916     # First check for XML 2.x.
13917     #
13918     pkg_check_version libxml-2.0 2.4.6
13919
13920     # If that didn't work (we don't have XML 2.x) and we *don't* have
13921     # Gtk 2.x, then check to see if we have XML 1.x
13922     #
13923     if test "$ok" = no -a "$have_gtk2" = no; then
13924       ok=yes
13925       pkg_check_version libxml 1.0
13926     fi
13927
13928     have_xml="$ok"
13929
13930     if test "$have_xml" = yes; then
13931       echo "$as_me:$LINENO: checking for XML includes" >&5
13932 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
13933 if test "${ac_cv_xml_config_cflags+set}" = set; then
13934   echo $ECHO_N "(cached) $ECHO_C" >&6
13935 else
13936   ac_cv_xml_config_cflags=`$pkg_config --cflags $pkgs`
13937 fi
13938 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
13939 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
13940       echo "$as_me:$LINENO: checking for XML libs" >&5
13941 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13942 if test "${ac_cv_xml_config_libs+set}" = set; then
13943   echo $ECHO_N "(cached) $ECHO_C" >&6
13944 else
13945   ac_cv_xml_config_libs=`$pkg_config --libs $pkgs`
13946 fi
13947 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
13948 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
13949       ac_xml_config_cflags=$ac_cv_xml_config_cflags
13950       ac_xml_config_libs=$ac_cv_xml_config_libs
13951     fi
13952
13953   else
13954     #
13955     # the old way...
13956     # run {xml2,xml}-config based tests.
13957     #
13958
13959     for ac_prog in xml2-config xml-config
13960 do
13961   # Extract the first word of "$ac_prog", so it can be a program name with args.
13962 set dummy $ac_prog; ac_word=$2
13963 echo "$as_me:$LINENO: checking for $ac_word" >&5
13964 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13965 if test "${ac_cv_path_xml_config+set}" = set; then
13966   echo $ECHO_N "(cached) $ECHO_C" >&6
13967 else
13968   case $xml_config in
13969   [\\/]* | ?:[\\/]*)
13970   ac_cv_path_xml_config="$xml_config" # Let the user override the test with a path.
13971   ;;
13972   *)
13973   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13974 for as_dir in $xml_path
13975 do
13976   IFS=$as_save_IFS
13977   test -z "$as_dir" && as_dir=.
13978   for ac_exec_ext in '' $ac_executable_extensions; do
13979   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13980     ac_cv_path_xml_config="$as_dir/$ac_word$ac_exec_ext"
13981     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13982     break 2
13983   fi
13984 done
13985 done
13986
13987   ;;
13988 esac
13989 fi
13990 xml_config=$ac_cv_path_xml_config
13991
13992 if test -n "$xml_config"; then
13993   echo "$as_me:$LINENO: result: $xml_config" >&5
13994 echo "${ECHO_T}$xml_config" >&6
13995 else
13996   echo "$as_me:$LINENO: result: no" >&5
13997 echo "${ECHO_T}no" >&6
13998 fi
13999
14000   test -n "$xml_config" && break
14001 done
14002
14003
14004     # If we found the xml-config program, run it to get flags.
14005     #
14006     if test -n "$xml_config" ; then
14007       echo "$as_me:$LINENO: checking for XML includes" >&5
14008 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
14009 if test "${ac_cv_xml_config_cflags+set}" = set; then
14010   echo $ECHO_N "(cached) $ECHO_C" >&6
14011 else
14012   ac_cv_xml_config_cflags=`$xml_config --cflags`
14013 fi
14014 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
14015 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
14016       echo "$as_me:$LINENO: checking for XML libs" >&5
14017 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
14018 if test "${ac_cv_xml_config_libs+set}" = set; then
14019   echo $ECHO_N "(cached) $ECHO_C" >&6
14020 else
14021   ac_cv_xml_config_libs=`$xml_config --libs`
14022 fi
14023 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
14024 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
14025       ac_xml_config_cflags=$ac_cv_xml_config_cflags
14026       ac_xml_config_libs=$ac_cv_xml_config_libs
14027     fi
14028
14029     ac_save_xml_CPPFLAGS="$CPPFLAGS"
14030     CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags"
14031
14032     # first try <libxml/parser.h> which is the new way...
14033     #
14034
14035   ac_save_CPPFLAGS="$CPPFLAGS"
14036   if test \! -z "$includedir" ; then
14037     CPPFLAGS="$CPPFLAGS -I$includedir"
14038   fi
14039   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14040   echo "$as_me:$LINENO: checking for libxml/xmlIO.h" >&5
14041 echo $ECHO_N "checking for libxml/xmlIO.h... $ECHO_C" >&6
14042 if test "${ac_cv_header_libxml_xmlIO_h+set}" = set; then
14043   echo $ECHO_N "(cached) $ECHO_C" >&6
14044 else
14045   cat >conftest.$ac_ext <<_ACEOF
14046 #line $LINENO "configure"
14047 /* confdefs.h.  */
14048 _ACEOF
14049 cat confdefs.h >>conftest.$ac_ext
14050 cat >>conftest.$ac_ext <<_ACEOF
14051 /* end confdefs.h.  */
14052 #include <libxml/parser.h>
14053
14054 #include <libxml/xmlIO.h>
14055 _ACEOF
14056 rm -f conftest.$ac_objext
14057 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14058   (eval $ac_compile) 2>&5
14059   ac_status=$?
14060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14061   (exit $ac_status); } &&
14062          { ac_try='test -s conftest.$ac_objext'
14063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14064   (eval $ac_try) 2>&5
14065   ac_status=$?
14066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14067   (exit $ac_status); }; }; then
14068   ac_cv_header_libxml_xmlIO_h=yes
14069 else
14070   echo "$as_me: failed program was:" >&5
14071 sed 's/^/| /' conftest.$ac_ext >&5
14072
14073 ac_cv_header_libxml_xmlIO_h=no
14074 fi
14075 rm -f conftest.$ac_objext conftest.$ac_ext
14076 fi
14077 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlIO_h" >&5
14078 echo "${ECHO_T}$ac_cv_header_libxml_xmlIO_h" >&6
14079 if test $ac_cv_header_libxml_xmlIO_h = yes; then
14080   have_xml=yes
14081 fi
14082
14083
14084   CPPFLAGS="$ac_save_CPPFLAGS"
14085
14086     # if that didn't work, then try just <parser.h> which is the old way...
14087     #
14088     if test "$have_xml" = no; then
14089
14090   ac_save_CPPFLAGS="$CPPFLAGS"
14091   if test \! -z "$includedir" ; then
14092     CPPFLAGS="$CPPFLAGS -I$includedir"
14093   fi
14094   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14095   echo "$as_me:$LINENO: checking for xmlIO.h" >&5
14096 echo $ECHO_N "checking for xmlIO.h... $ECHO_C" >&6
14097 if test "${ac_cv_header_xmlIO_h+set}" = set; then
14098   echo $ECHO_N "(cached) $ECHO_C" >&6
14099 else
14100   cat >conftest.$ac_ext <<_ACEOF
14101 #line $LINENO "configure"
14102 /* confdefs.h.  */
14103 _ACEOF
14104 cat confdefs.h >>conftest.$ac_ext
14105 cat >>conftest.$ac_ext <<_ACEOF
14106 /* end confdefs.h.  */
14107 #include <parser.h>
14108
14109 #include <xmlIO.h>
14110 _ACEOF
14111 rm -f conftest.$ac_objext
14112 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14113   (eval $ac_compile) 2>&5
14114   ac_status=$?
14115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14116   (exit $ac_status); } &&
14117          { ac_try='test -s conftest.$ac_objext'
14118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14119   (eval $ac_try) 2>&5
14120   ac_status=$?
14121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14122   (exit $ac_status); }; }; then
14123   ac_cv_header_xmlIO_h=yes
14124 else
14125   echo "$as_me: failed program was:" >&5
14126 sed 's/^/| /' conftest.$ac_ext >&5
14127
14128 ac_cv_header_xmlIO_h=no
14129 fi
14130 rm -f conftest.$ac_objext conftest.$ac_ext
14131 fi
14132 echo "$as_me:$LINENO: result: $ac_cv_header_xmlIO_h" >&5
14133 echo "${ECHO_T}$ac_cv_header_xmlIO_h" >&6
14134 if test $ac_cv_header_xmlIO_h = yes; then
14135   have_xml=yes; have_old_xml=yes
14136 fi
14137
14138
14139   CPPFLAGS="$ac_save_CPPFLAGS"
14140     fi
14141
14142     CPPFLAGS="$ac_save_xml_CPPFLAGS"
14143   fi
14144
14145
14146   have_zlib=no
14147   if test "$have_xml" = yes; then
14148     # we have the XML headers; now make sure zlib is around.
14149     # yes, it's stupid we have to do this too, but there is
14150     # dependency screwage in Gnome.
14151
14152   ac_save_CPPFLAGS="$CPPFLAGS"
14153   ac_save_LDFLAGS="$LDFLAGS"
14154 #  ac_save_LIBS="$LIBS"
14155
14156   if test \! -z "$includedir" ; then
14157     CPPFLAGS="$CPPFLAGS -I$includedir"
14158   fi
14159   # note: $X_CFLAGS includes $x_includes
14160   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14161
14162   if test \! -z "$libdir" ; then
14163     LDFLAGS="$LDFLAGS -L$libdir"
14164   fi
14165   # note: $X_LIBS includes $x_libraries
14166   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14167
14168   echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5
14169 echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
14170 if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
14171   echo $ECHO_N "(cached) $ECHO_C" >&6
14172 else
14173   ac_check_lib_save_LIBS=$LIBS
14174 LIBS="-lz  $LIBS"
14175 cat >conftest.$ac_ext <<_ACEOF
14176 #line $LINENO "configure"
14177 /* confdefs.h.  */
14178 _ACEOF
14179 cat confdefs.h >>conftest.$ac_ext
14180 cat >>conftest.$ac_ext <<_ACEOF
14181 /* end confdefs.h.  */
14182
14183 /* Override any gcc2 internal prototype to avoid an error.  */
14184 #ifdef __cplusplus
14185 extern "C"
14186 #endif
14187 /* We use char because int might match the return type of a gcc2
14188    builtin and then its argument prototype would still apply.  */
14189 char zlibVersion ();
14190 int
14191 main ()
14192 {
14193 zlibVersion ();
14194   ;
14195   return 0;
14196 }
14197 _ACEOF
14198 rm -f conftest.$ac_objext conftest$ac_exeext
14199 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14200   (eval $ac_link) 2>&5
14201   ac_status=$?
14202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14203   (exit $ac_status); } &&
14204          { ac_try='test -s conftest$ac_exeext'
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_lib_z_zlibVersion=yes
14211 else
14212   echo "$as_me: failed program was:" >&5
14213 sed 's/^/| /' conftest.$ac_ext >&5
14214
14215 ac_cv_lib_z_zlibVersion=no
14216 fi
14217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14218 LIBS=$ac_check_lib_save_LIBS
14219 fi
14220 echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5
14221 echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
14222 if test $ac_cv_lib_z_zlibVersion = yes; then
14223   have_zlib=yes
14224 fi
14225
14226   CPPFLAGS="$ac_save_CPPFLAGS"
14227   LDFLAGS="$ac_save_LDFLAGS"
14228 #  LIBS="$ac_save_LIBS"
14229
14230     if test "$have_zlib" = no; then
14231       xml_halfassed=yes
14232       have_xml=no
14233     fi
14234   fi
14235
14236   if test "$have_xml" = yes; then
14237     # we have the header, now check for the library
14238     have_xml=no
14239     xml_halfassed=yes
14240
14241   ac_save_CPPFLAGS="$CPPFLAGS"
14242   ac_save_LDFLAGS="$LDFLAGS"
14243 #  ac_save_LIBS="$LIBS"
14244
14245   if test \! -z "$includedir" ; then
14246     CPPFLAGS="$CPPFLAGS -I$includedir"
14247   fi
14248   # note: $X_CFLAGS includes $x_includes
14249   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14250
14251   if test \! -z "$libdir" ; then
14252     LDFLAGS="$LDFLAGS -L$libdir"
14253   fi
14254   # note: $X_LIBS includes $x_libraries
14255   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14256
14257   echo "$as_me:$LINENO: checking for xmlParseChunk in -lc" >&5
14258 echo $ECHO_N "checking for xmlParseChunk in -lc... $ECHO_C" >&6
14259 if test "${ac_cv_lib_c_xmlParseChunk+set}" = set; then
14260   echo $ECHO_N "(cached) $ECHO_C" >&6
14261 else
14262   ac_check_lib_save_LIBS=$LIBS
14263 LIBS="-lc $ac_xml_config_libs $LIBS"
14264 cat >conftest.$ac_ext <<_ACEOF
14265 #line $LINENO "configure"
14266 /* confdefs.h.  */
14267 _ACEOF
14268 cat confdefs.h >>conftest.$ac_ext
14269 cat >>conftest.$ac_ext <<_ACEOF
14270 /* end confdefs.h.  */
14271
14272 /* Override any gcc2 internal prototype to avoid an error.  */
14273 #ifdef __cplusplus
14274 extern "C"
14275 #endif
14276 /* We use char because int might match the return type of a gcc2
14277    builtin and then its argument prototype would still apply.  */
14278 char xmlParseChunk ();
14279 int
14280 main ()
14281 {
14282 xmlParseChunk ();
14283   ;
14284   return 0;
14285 }
14286 _ACEOF
14287 rm -f conftest.$ac_objext conftest$ac_exeext
14288 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14289   (eval $ac_link) 2>&5
14290   ac_status=$?
14291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14292   (exit $ac_status); } &&
14293          { ac_try='test -s conftest$ac_exeext'
14294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14295   (eval $ac_try) 2>&5
14296   ac_status=$?
14297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14298   (exit $ac_status); }; }; then
14299   ac_cv_lib_c_xmlParseChunk=yes
14300 else
14301   echo "$as_me: failed program was:" >&5
14302 sed 's/^/| /' conftest.$ac_ext >&5
14303
14304 ac_cv_lib_c_xmlParseChunk=no
14305 fi
14306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14307 LIBS=$ac_check_lib_save_LIBS
14308 fi
14309 echo "$as_me:$LINENO: result: $ac_cv_lib_c_xmlParseChunk" >&5
14310 echo "${ECHO_T}$ac_cv_lib_c_xmlParseChunk" >&6
14311 if test $ac_cv_lib_c_xmlParseChunk = yes; then
14312   have_xml=yes
14313                     xml_halfassed=no
14314                     XML_LIBS="$ac_xml_config_libs"
14315                     cat >>confdefs.h <<\_ACEOF
14316 #define HAVE_XML 1
14317 _ACEOF
14318
14319 else
14320   true
14321 fi
14322
14323   CPPFLAGS="$ac_save_CPPFLAGS"
14324   LDFLAGS="$ac_save_LDFLAGS"
14325 #  LIBS="$ac_save_LIBS"
14326
14327   fi
14328
14329   if test "$have_xml" = yes; then
14330     INCLUDES="$INCLUDES $ac_xml_config_cflags"
14331     GTK_LIBS="$GTK_LIBS $ac_xml_config_libs"
14332     cat >>confdefs.h <<\_ACEOF
14333 #define HAVE_XML 1
14334 _ACEOF
14335
14336     if test "$have_old_xml" = yes; then
14337       cat >>confdefs.h <<\_ACEOF
14338 #define HAVE_OLD_XML_HEADERS 1
14339 _ACEOF
14340
14341     fi
14342   fi
14343
14344 fi
14345
14346
14347 ###############################################################################
14348 #
14349 #       Checking whether Motif is really Lesstif.
14350 #
14351 ###############################################################################
14352
14353 have_lesstif=no
14354 if test "$have_motif" = yes ; then
14355   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
14356 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
14357 if test "${ac_cv_have_lesstif+set}" = set; then
14358   echo $ECHO_N "(cached) $ECHO_C" >&6
14359 else
14360
14361   ac_save_CPPFLAGS="$CPPFLAGS"
14362   if test \! -z "$includedir" ; then
14363     CPPFLAGS="$CPPFLAGS -I$includedir"
14364   fi
14365   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14366   cat >conftest.$ac_ext <<_ACEOF
14367 #line $LINENO "configure"
14368 /* confdefs.h.  */
14369 _ACEOF
14370 cat confdefs.h >>conftest.$ac_ext
14371 cat >>conftest.$ac_ext <<_ACEOF
14372 /* end confdefs.h.  */
14373 #include <Xm/Xm.h>
14374 int
14375 main ()
14376 {
14377 long vers = LesstifVersion;
14378   ;
14379   return 0;
14380 }
14381 _ACEOF
14382 rm -f conftest.$ac_objext
14383 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14384   (eval $ac_compile) 2>&5
14385   ac_status=$?
14386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14387   (exit $ac_status); } &&
14388          { ac_try='test -s conftest.$ac_objext'
14389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14390   (eval $ac_try) 2>&5
14391   ac_status=$?
14392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14393   (exit $ac_status); }; }; then
14394   ac_cv_have_lesstif=yes
14395 else
14396   echo "$as_me: failed program was:" >&5
14397 sed 's/^/| /' conftest.$ac_ext >&5
14398
14399 ac_cv_have_lesstif=no
14400 fi
14401 rm -f conftest.$ac_objext conftest.$ac_ext
14402   CPPFLAGS="$ac_save_CPPFLAGS"
14403 fi
14404 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
14405 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
14406   have_lesstif=$ac_cv_have_lesstif
14407 fi
14408
14409
14410 lesstif_version=unknown
14411 lesstif_version_string=unknown
14412
14413 if test "$have_lesstif" = yes ; then
14414   ltv=unknown
14415   echo unknown > conftest-lt
14416   echo "$as_me:$LINENO: checking LessTif version number" >&5
14417 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
14418 if test "${ac_cv_lesstif_version_string+set}" = set; then
14419   echo $ECHO_N "(cached) $ECHO_C" >&6
14420 else
14421
14422   ac_save_CPPFLAGS="$CPPFLAGS"
14423   if test \! -z "$includedir" ; then
14424     CPPFLAGS="$CPPFLAGS -I$includedir"
14425   fi
14426   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14427   if test "$cross_compiling" = yes; then
14428   ac_cv_lesstif_version=unknown
14429                      ac_cv_lesstif_version_string=unknown
14430 else
14431   cat >conftest.$ac_ext <<_ACEOF
14432 #line $LINENO "configure"
14433 /* confdefs.h.  */
14434 _ACEOF
14435 cat confdefs.h >>conftest.$ac_ext
14436 cat >>conftest.$ac_ext <<_ACEOF
14437 /* end confdefs.h.  */
14438 #include <stdio.h>
14439                      #include <Xm/Xm.h>
14440                      int main() {
14441                        FILE *f = fopen("conftest-lt", "w");
14442                        if (!f) exit(1);
14443                        fprintf(f, "%d %d.%d\n", LesstifVersion,
14444                           LESSTIF_VERSION, LESSTIF_REVISION);
14445                        fclose(f);
14446                        exit(0);
14447                      }
14448 _ACEOF
14449 rm -f conftest$ac_exeext
14450 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14451   (eval $ac_link) 2>&5
14452   ac_status=$?
14453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14454   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14456   (eval $ac_try) 2>&5
14457   ac_status=$?
14458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14459   (exit $ac_status); }; }; then
14460   ltv=`cat conftest-lt`
14461                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
14462                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
14463 else
14464   echo "$as_me: program exited with status $ac_status" >&5
14465 echo "$as_me: failed program was:" >&5
14466 sed 's/^/| /' conftest.$ac_ext >&5
14467
14468 ( exit $ac_status )
14469 ac_cv_lesstif_version=unknown
14470                      ac_cv_lesstif_version_string=unknown
14471 fi
14472 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14473 fi
14474   CPPFLAGS="$ac_save_CPPFLAGS"
14475 fi
14476 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
14477 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
14478   rm -f conftest-lt
14479   lesstif_version=$ac_cv_lesstif_version
14480   lesstif_version_string=$ac_cv_lesstif_version_string
14481
14482 fi
14483
14484
14485 if test "$have_motif" = yes ; then
14486   mtv=unknown
14487   echo unknown > conftest-mt
14488   echo "$as_me:$LINENO: checking Motif version number" >&5
14489 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
14490 if test "${ac_cv_motif_version_string+set}" = set; then
14491   echo $ECHO_N "(cached) $ECHO_C" >&6
14492 else
14493
14494   ac_save_CPPFLAGS="$CPPFLAGS"
14495   if test \! -z "$includedir" ; then
14496     CPPFLAGS="$CPPFLAGS -I$includedir"
14497   fi
14498   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14499   if test "$cross_compiling" = yes; then
14500   ac_cv_motif_version=unknown
14501                      ac_cv_motif_version_string=unknown
14502 else
14503   cat >conftest.$ac_ext <<_ACEOF
14504 #line $LINENO "configure"
14505 /* confdefs.h.  */
14506 _ACEOF
14507 cat confdefs.h >>conftest.$ac_ext
14508 cat >>conftest.$ac_ext <<_ACEOF
14509 /* end confdefs.h.  */
14510 #include <stdio.h>
14511                      #include <Xm/Xm.h>
14512                      int main() {
14513                        FILE *f = fopen("conftest-mt", "w");
14514                        if (!f) exit(1);
14515                        fprintf(f, "%d %d.%d\n", XmVersion,
14516                           XmVERSION, XmREVISION);
14517                        fclose(f);
14518                        exit(0);
14519                      }
14520 _ACEOF
14521 rm -f conftest$ac_exeext
14522 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14523   (eval $ac_link) 2>&5
14524   ac_status=$?
14525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14526   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14527   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14528   (eval $ac_try) 2>&5
14529   ac_status=$?
14530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14531   (exit $ac_status); }; }; then
14532   mtv=`cat conftest-mt`
14533                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
14534                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
14535 else
14536   echo "$as_me: program exited with status $ac_status" >&5
14537 echo "$as_me: failed program was:" >&5
14538 sed 's/^/| /' conftest.$ac_ext >&5
14539
14540 ( exit $ac_status )
14541 ac_cv_motif_version=unknown
14542                      ac_cv_motif_version_string=unknown
14543 fi
14544 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14545 fi
14546   CPPFLAGS="$ac_save_CPPFLAGS"
14547 fi
14548 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
14549 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
14550   rm -f conftest-mt
14551   motif_version=$ac_cv_motif_version
14552   motif_version_string=$ac_cv_motif_version_string
14553
14554 fi
14555
14556
14557 ###############################################################################
14558 #
14559 #       Checking whether Motif requires -lXpm.
14560 #
14561 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
14562 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
14563 #       of the library whether to build the XPM code into libXm, or whether
14564 #       to rely on an external libXm.  So the only way to tell whether XPM is
14565 #       a link-time requirement is to examine libXm.a, which is very
14566 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
14567 #       always link against XPM if the XPM lib exists (and this will be a
14568 #       no-op if libXm happens to already have the XPM code in it.)
14569 #
14570 ###############################################################################
14571
14572 motif_requires_xpm=no
14573 if test "$have_motif" = yes ; then
14574    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
14575 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
14576    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
14577    then
14578      motif_requires_xpm=yes
14579      echo "$as_me:$LINENO: result: maybe" >&5
14580 echo "${ECHO_T}maybe" >&6
14581    else
14582      echo "$as_me:$LINENO: result: no" >&5
14583 echo "${ECHO_T}no" >&6
14584    fi
14585 fi
14586
14587
14588 ###############################################################################
14589 #
14590 #       Checking whether Motif requires -lXp.
14591 #
14592 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
14593 #       Extension".   Why this extension isn't in -lXext with all the others,
14594 #       I have no idea.
14595 #
14596 ###############################################################################
14597
14598 have_xp_ext=no
14599 if test "$have_motif" = yes ; then
14600    have_xp_ext=no
14601
14602   ac_save_CPPFLAGS="$CPPFLAGS"
14603   ac_save_LDFLAGS="$LDFLAGS"
14604 #  ac_save_LIBS="$LIBS"
14605
14606   if test \! -z "$includedir" ; then
14607     CPPFLAGS="$CPPFLAGS -I$includedir"
14608   fi
14609   # note: $X_CFLAGS includes $x_includes
14610   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14611
14612   if test \! -z "$libdir" ; then
14613     LDFLAGS="$LDFLAGS -L$libdir"
14614   fi
14615   # note: $X_LIBS includes $x_libraries
14616   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14617
14618   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
14619 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
14620 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
14621   echo $ECHO_N "(cached) $ECHO_C" >&6
14622 else
14623   ac_check_lib_save_LIBS=$LIBS
14624 LIBS="-lXp -lX11 -lXext -lm $LIBS"
14625 cat >conftest.$ac_ext <<_ACEOF
14626 #line $LINENO "configure"
14627 /* confdefs.h.  */
14628 _ACEOF
14629 cat confdefs.h >>conftest.$ac_ext
14630 cat >>conftest.$ac_ext <<_ACEOF
14631 /* end confdefs.h.  */
14632
14633 /* Override any gcc2 internal prototype to avoid an error.  */
14634 #ifdef __cplusplus
14635 extern "C"
14636 #endif
14637 /* We use char because int might match the return type of a gcc2
14638    builtin and then its argument prototype would still apply.  */
14639 char XpQueryExtension ();
14640 int
14641 main ()
14642 {
14643 XpQueryExtension ();
14644   ;
14645   return 0;
14646 }
14647 _ACEOF
14648 rm -f conftest.$ac_objext conftest$ac_exeext
14649 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14650   (eval $ac_link) 2>&5
14651   ac_status=$?
14652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14653   (exit $ac_status); } &&
14654          { ac_try='test -s conftest$ac_exeext'
14655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14656   (eval $ac_try) 2>&5
14657   ac_status=$?
14658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14659   (exit $ac_status); }; }; then
14660   ac_cv_lib_Xp_XpQueryExtension=yes
14661 else
14662   echo "$as_me: failed program was:" >&5
14663 sed 's/^/| /' conftest.$ac_ext >&5
14664
14665 ac_cv_lib_Xp_XpQueryExtension=no
14666 fi
14667 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14668 LIBS=$ac_check_lib_save_LIBS
14669 fi
14670 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
14671 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
14672 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
14673   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
14674 else
14675   true
14676 fi
14677
14678   CPPFLAGS="$ac_save_CPPFLAGS"
14679   LDFLAGS="$ac_save_LDFLAGS"
14680 #  LIBS="$ac_save_LIBS"
14681
14682 fi
14683
14684
14685 ###############################################################################
14686 #
14687 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
14688 #
14689 ###############################################################################
14690
14691 have_xintl=no
14692 if test "$have_motif" = yes ; then
14693
14694   ac_save_CPPFLAGS="$CPPFLAGS"
14695   ac_save_LDFLAGS="$LDFLAGS"
14696 #  ac_save_LIBS="$LIBS"
14697
14698   if test \! -z "$includedir" ; then
14699     CPPFLAGS="$CPPFLAGS -I$includedir"
14700   fi
14701   # note: $X_CFLAGS includes $x_includes
14702   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14703
14704   if test \! -z "$libdir" ; then
14705     LDFLAGS="$LDFLAGS -L$libdir"
14706   fi
14707   # note: $X_LIBS includes $x_libraries
14708   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14709
14710   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
14711 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
14712 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
14713   echo $ECHO_N "(cached) $ECHO_C" >&6
14714 else
14715   ac_check_lib_save_LIBS=$LIBS
14716 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
14717 cat >conftest.$ac_ext <<_ACEOF
14718 #line $LINENO "configure"
14719 /* confdefs.h.  */
14720 _ACEOF
14721 cat confdefs.h >>conftest.$ac_ext
14722 cat >>conftest.$ac_ext <<_ACEOF
14723 /* end confdefs.h.  */
14724
14725 /* Override any gcc2 internal prototype to avoid an error.  */
14726 #ifdef __cplusplus
14727 extern "C"
14728 #endif
14729 /* We use char because int might match the return type of a gcc2
14730    builtin and then its argument prototype would still apply.  */
14731 char _Xsetlocale ();
14732 int
14733 main ()
14734 {
14735 _Xsetlocale ();
14736   ;
14737   return 0;
14738 }
14739 _ACEOF
14740 rm -f conftest.$ac_objext conftest$ac_exeext
14741 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14742   (eval $ac_link) 2>&5
14743   ac_status=$?
14744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14745   (exit $ac_status); } &&
14746          { ac_try='test -s conftest$ac_exeext'
14747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14748   (eval $ac_try) 2>&5
14749   ac_status=$?
14750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14751   (exit $ac_status); }; }; then
14752   ac_cv_lib_Xintl__Xsetlocale=yes
14753 else
14754   echo "$as_me: failed program was:" >&5
14755 sed 's/^/| /' conftest.$ac_ext >&5
14756
14757 ac_cv_lib_Xintl__Xsetlocale=no
14758 fi
14759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14760 LIBS=$ac_check_lib_save_LIBS
14761 fi
14762 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
14763 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
14764 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
14765   have_xintl=yes
14766 else
14767   have_xintl=no
14768 fi
14769
14770   CPPFLAGS="$ac_save_CPPFLAGS"
14771   LDFLAGS="$ac_save_LDFLAGS"
14772 #  LIBS="$ac_save_LIBS"
14773
14774   if test "$have_xintl" = yes; then
14775     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
14776   fi
14777 fi
14778
14779
14780 ###############################################################################
14781 #
14782 #       Check for -lGL or -lMesaGL.
14783 #
14784 ###############################################################################
14785
14786 have_gl=no
14787 ac_have_mesa_gl=no
14788 with_gl_req=unspecified
14789 gl_halfassed=no
14790
14791 # Check whether --with-gl or --without-gl was given.
14792 if test "${with_gl+set}" = set; then
14793   withval="$with_gl"
14794   with_gl="$withval"; with_gl_req="$withval"
14795 else
14796   with_gl=yes
14797 fi;
14798
14799
14800    case "$with_gl" in
14801     yes) ;;
14802     no)  ;;
14803
14804     /*)
14805      echo "$as_me:$LINENO: checking for GL headers" >&5
14806 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
14807      d=$with_gl/include
14808      if test -d $d; then
14809        X_CFLAGS="-I$d $X_CFLAGS"
14810        echo "$as_me:$LINENO: result: $d" >&5
14811 echo "${ECHO_T}$d" >&6
14812      else
14813        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14814 echo "${ECHO_T}not found ($d: no such directory)" >&6
14815      fi
14816
14817      echo "$as_me:$LINENO: checking for GL libs" >&5
14818 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
14819      d=$with_gl/lib
14820      if test -d $d; then
14821        X_LIBS="-L$d $X_LIBS"
14822        echo "$as_me:$LINENO: result: $d" >&5
14823 echo "${ECHO_T}$d" >&6
14824      else
14825        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14826 echo "${ECHO_T}not found ($d: no such directory)" >&6
14827      fi
14828
14829      # replace the directory string with "yes".
14830      with_gl_req="yes"
14831      with_gl=$with_gl_req
14832      ;;
14833
14834     *)
14835      echo ""
14836      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
14837      echo "       If it is a directory, then \`DIR/include' will be added to"
14838      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14839      exit 1
14840      ;;
14841    esac
14842
14843
14844 ac_mesagl_version=unknown
14845 ac_mesagl_version_string=unknown
14846
14847 if test "$with_gl" = yes; then
14848
14849   ac_save_CPPFLAGS="$CPPFLAGS"
14850   if test \! -z "$includedir" ; then
14851     CPPFLAGS="$CPPFLAGS -I$includedir"
14852   fi
14853   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14854   if test "${ac_cv_header_GL_gl_h+set}" = set; then
14855   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
14856 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
14857 if test "${ac_cv_header_GL_gl_h+set}" = set; then
14858   echo $ECHO_N "(cached) $ECHO_C" >&6
14859 fi
14860 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
14861 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
14862 else
14863   # Is the header compilable?
14864 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
14865 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
14866 cat >conftest.$ac_ext <<_ACEOF
14867 #line $LINENO "configure"
14868 /* confdefs.h.  */
14869 _ACEOF
14870 cat confdefs.h >>conftest.$ac_ext
14871 cat >>conftest.$ac_ext <<_ACEOF
14872 /* end confdefs.h.  */
14873 $ac_includes_default
14874 #include <GL/gl.h>
14875 _ACEOF
14876 rm -f conftest.$ac_objext
14877 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14878   (eval $ac_compile) 2>&5
14879   ac_status=$?
14880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14881   (exit $ac_status); } &&
14882          { ac_try='test -s conftest.$ac_objext'
14883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14884   (eval $ac_try) 2>&5
14885   ac_status=$?
14886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14887   (exit $ac_status); }; }; then
14888   ac_header_compiler=yes
14889 else
14890   echo "$as_me: failed program was:" >&5
14891 sed 's/^/| /' conftest.$ac_ext >&5
14892
14893 ac_header_compiler=no
14894 fi
14895 rm -f conftest.$ac_objext conftest.$ac_ext
14896 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14897 echo "${ECHO_T}$ac_header_compiler" >&6
14898
14899 # Is the header present?
14900 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
14901 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
14902 cat >conftest.$ac_ext <<_ACEOF
14903 #line $LINENO "configure"
14904 /* confdefs.h.  */
14905 _ACEOF
14906 cat confdefs.h >>conftest.$ac_ext
14907 cat >>conftest.$ac_ext <<_ACEOF
14908 /* end confdefs.h.  */
14909 #include <GL/gl.h>
14910 _ACEOF
14911 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14912   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14913   ac_status=$?
14914   grep -v '^ *+' conftest.er1 >conftest.err
14915   rm -f conftest.er1
14916   cat conftest.err >&5
14917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14918   (exit $ac_status); } >/dev/null; then
14919   if test -s conftest.err; then
14920     ac_cpp_err=$ac_c_preproc_warn_flag
14921   else
14922     ac_cpp_err=
14923   fi
14924 else
14925   ac_cpp_err=yes
14926 fi
14927 if test -z "$ac_cpp_err"; then
14928   ac_header_preproc=yes
14929 else
14930   echo "$as_me: failed program was:" >&5
14931 sed 's/^/| /' conftest.$ac_ext >&5
14932
14933   ac_header_preproc=no
14934 fi
14935 rm -f conftest.err conftest.$ac_ext
14936 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14937 echo "${ECHO_T}$ac_header_preproc" >&6
14938
14939 # So?  What about this header?
14940 case $ac_header_compiler:$ac_header_preproc in
14941   yes:no )
14942     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
14943 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14944     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
14945 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
14946     (
14947       cat <<\_ASBOX
14948 ## ------------------------------------ ##
14949 ## Report this to bug-autoconf@gnu.org. ##
14950 ## ------------------------------------ ##
14951 _ASBOX
14952     ) |
14953       sed "s/^/$as_me: WARNING:     /" >&2
14954     ;;
14955   no:yes )
14956     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
14957 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
14958     { echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5
14959 echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;}
14960     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
14961 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
14962     (
14963       cat <<\_ASBOX
14964 ## ------------------------------------ ##
14965 ## Report this to bug-autoconf@gnu.org. ##
14966 ## ------------------------------------ ##
14967 _ASBOX
14968     ) |
14969       sed "s/^/$as_me: WARNING:     /" >&2
14970     ;;
14971 esac
14972 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
14973 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
14974 if test "${ac_cv_header_GL_gl_h+set}" = set; then
14975   echo $ECHO_N "(cached) $ECHO_C" >&6
14976 else
14977   ac_cv_header_GL_gl_h=$ac_header_preproc
14978 fi
14979 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
14980 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
14981
14982 fi
14983 if test $ac_cv_header_GL_gl_h = yes; then
14984   have_gl=yes
14985 else
14986   have_gl=no
14987 fi
14988
14989
14990   CPPFLAGS="$ac_save_CPPFLAGS"
14991   if test "$have_gl" = yes ; then
14992
14993   ac_save_CPPFLAGS="$CPPFLAGS"
14994   if test \! -z "$includedir" ; then
14995     CPPFLAGS="$CPPFLAGS -I$includedir"
14996   fi
14997   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14998   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
14999 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
15000 if test "${ac_cv_header_GL_glx_h+set}" = set; then
15001   echo $ECHO_N "(cached) $ECHO_C" >&6
15002 else
15003   cat >conftest.$ac_ext <<_ACEOF
15004 #line $LINENO "configure"
15005 /* confdefs.h.  */
15006 _ACEOF
15007 cat confdefs.h >>conftest.$ac_ext
15008 cat >>conftest.$ac_ext <<_ACEOF
15009 /* end confdefs.h.  */
15010 #include <GL/gl.h>
15011
15012 #include <GL/glx.h>
15013 _ACEOF
15014 rm -f conftest.$ac_objext
15015 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15016   (eval $ac_compile) 2>&5
15017   ac_status=$?
15018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15019   (exit $ac_status); } &&
15020          { ac_try='test -s conftest.$ac_objext'
15021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15022   (eval $ac_try) 2>&5
15023   ac_status=$?
15024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15025   (exit $ac_status); }; }; then
15026   ac_cv_header_GL_glx_h=yes
15027 else
15028   echo "$as_me: failed program was:" >&5
15029 sed 's/^/| /' conftest.$ac_ext >&5
15030
15031 ac_cv_header_GL_glx_h=no
15032 fi
15033 rm -f conftest.$ac_objext conftest.$ac_ext
15034 fi
15035 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
15036 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
15037 if test $ac_cv_header_GL_glx_h = yes; then
15038   have_gl=yes
15039 else
15040   have_gl=no
15041 fi
15042
15043
15044   CPPFLAGS="$ac_save_CPPFLAGS"
15045   fi
15046
15047   # If we have the headers, try and figure out which vendor it's from.
15048   #
15049   if test "$have_gl" = yes ; then
15050
15051     # We need to know whether it's MesaGL so that we know which libraries
15052     # to link against.
15053     #
15054     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
15055 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
15056 if test "${ac_cv_have_mesa_gl+set}" = set; then
15057   echo $ECHO_N "(cached) $ECHO_C" >&6
15058 else
15059   ac_cv_have_mesa_gl=no
15060
15061   ac_save_CPPFLAGS="$CPPFLAGS"
15062   if test \! -z "$includedir" ; then
15063     CPPFLAGS="$CPPFLAGS -I$includedir"
15064   fi
15065   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15066   cat >conftest.$ac_ext <<_ACEOF
15067 #line $LINENO "configure"
15068 /* confdefs.h.  */
15069 _ACEOF
15070 cat confdefs.h >>conftest.$ac_ext
15071 cat >>conftest.$ac_ext <<_ACEOF
15072 /* end confdefs.h.  */
15073 #include <GL/glx.h>
15074
15075 _ACEOF
15076 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15077   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
15078   ac_cv_have_mesa_gl=yes
15079 fi
15080 rm -f conftest*
15081
15082   CPPFLAGS="$ac_save_CPPFLAGS"
15083
15084 fi
15085 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
15086 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
15087     ac_have_mesa_gl=$ac_cv_have_mesa_gl
15088
15089
15090     gl_lib_1=""
15091     GL_LIBS=""
15092
15093
15094     # Some versions of MesaGL are compiled to require -lpthread.
15095     # So if the Mesa headers exist, and -lpthread exists, then always
15096     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
15097     #
15098     if test "$ac_have_mesa_gl" = yes; then
15099       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15100 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
15101 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
15102   echo $ECHO_N "(cached) $ECHO_C" >&6
15103 else
15104   ac_check_lib_save_LIBS=$LIBS
15105 LIBS="-lpthread  $LIBS"
15106 cat >conftest.$ac_ext <<_ACEOF
15107 #line $LINENO "configure"
15108 /* confdefs.h.  */
15109 _ACEOF
15110 cat confdefs.h >>conftest.$ac_ext
15111 cat >>conftest.$ac_ext <<_ACEOF
15112 /* end confdefs.h.  */
15113
15114 /* Override any gcc2 internal prototype to avoid an error.  */
15115 #ifdef __cplusplus
15116 extern "C"
15117 #endif
15118 /* We use char because int might match the return type of a gcc2
15119    builtin and then its argument prototype would still apply.  */
15120 char pthread_create ();
15121 int
15122 main ()
15123 {
15124 pthread_create ();
15125   ;
15126   return 0;
15127 }
15128 _ACEOF
15129 rm -f conftest.$ac_objext conftest$ac_exeext
15130 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15131   (eval $ac_link) 2>&5
15132   ac_status=$?
15133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15134   (exit $ac_status); } &&
15135          { ac_try='test -s conftest$ac_exeext'
15136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15137   (eval $ac_try) 2>&5
15138   ac_status=$?
15139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15140   (exit $ac_status); }; }; then
15141   ac_cv_lib_pthread_pthread_create=yes
15142 else
15143   echo "$as_me: failed program was:" >&5
15144 sed 's/^/| /' conftest.$ac_ext >&5
15145
15146 ac_cv_lib_pthread_pthread_create=no
15147 fi
15148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15149 LIBS=$ac_check_lib_save_LIBS
15150 fi
15151 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
15152 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
15153 if test $ac_cv_lib_pthread_pthread_create = yes; then
15154   GL_LIBS="-lpthread"
15155 fi
15156
15157     fi
15158
15159
15160     # If we have Mesa headers, check to see if we can link against -lMesaGL.
15161     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
15162     # Else, warn that GL is busted.  (We have the headers, but no libs.)
15163     #
15164
15165     if test "$ac_have_mesa_gl" = yes ; then
15166
15167   ac_save_CPPFLAGS="$CPPFLAGS"
15168   ac_save_LDFLAGS="$LDFLAGS"
15169 #  ac_save_LIBS="$LIBS"
15170
15171   if test \! -z "$includedir" ; then
15172     CPPFLAGS="$CPPFLAGS -I$includedir"
15173   fi
15174   # note: $X_CFLAGS includes $x_includes
15175   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15176
15177   if test \! -z "$libdir" ; then
15178     LDFLAGS="$LDFLAGS -L$libdir"
15179   fi
15180   # note: $X_LIBS includes $x_libraries
15181   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15182
15183   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
15184 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
15185 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
15186   echo $ECHO_N "(cached) $ECHO_C" >&6
15187 else
15188   ac_check_lib_save_LIBS=$LIBS
15189 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
15190 cat >conftest.$ac_ext <<_ACEOF
15191 #line $LINENO "configure"
15192 /* confdefs.h.  */
15193 _ACEOF
15194 cat confdefs.h >>conftest.$ac_ext
15195 cat >>conftest.$ac_ext <<_ACEOF
15196 /* end confdefs.h.  */
15197
15198 /* Override any gcc2 internal prototype to avoid an error.  */
15199 #ifdef __cplusplus
15200 extern "C"
15201 #endif
15202 /* We use char because int might match the return type of a gcc2
15203    builtin and then its argument prototype would still apply.  */
15204 char glXCreateContext ();
15205 int
15206 main ()
15207 {
15208 glXCreateContext ();
15209   ;
15210   return 0;
15211 }
15212 _ACEOF
15213 rm -f conftest.$ac_objext conftest$ac_exeext
15214 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15215   (eval $ac_link) 2>&5
15216   ac_status=$?
15217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15218   (exit $ac_status); } &&
15219          { ac_try='test -s conftest$ac_exeext'
15220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15221   (eval $ac_try) 2>&5
15222   ac_status=$?
15223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15224   (exit $ac_status); }; }; then
15225   ac_cv_lib_MesaGL_glXCreateContext=yes
15226 else
15227   echo "$as_me: failed program was:" >&5
15228 sed 's/^/| /' conftest.$ac_ext >&5
15229
15230 ac_cv_lib_MesaGL_glXCreateContext=no
15231 fi
15232 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15233 LIBS=$ac_check_lib_save_LIBS
15234 fi
15235 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
15236 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
15237 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
15238   gl_lib_1="MesaGL"
15239                       GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
15240 fi
15241
15242   CPPFLAGS="$ac_save_CPPFLAGS"
15243   LDFLAGS="$ac_save_LDFLAGS"
15244 #  LIBS="$ac_save_LIBS"
15245
15246     fi
15247
15248     if test "$gl_lib_1" = "" ; then
15249
15250   ac_save_CPPFLAGS="$CPPFLAGS"
15251   ac_save_LDFLAGS="$LDFLAGS"
15252 #  ac_save_LIBS="$LIBS"
15253
15254   if test \! -z "$includedir" ; then
15255     CPPFLAGS="$CPPFLAGS -I$includedir"
15256   fi
15257   # note: $X_CFLAGS includes $x_includes
15258   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15259
15260   if test \! -z "$libdir" ; then
15261     LDFLAGS="$LDFLAGS -L$libdir"
15262   fi
15263   # note: $X_LIBS includes $x_libraries
15264   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15265
15266   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
15267 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
15268 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
15269   echo $ECHO_N "(cached) $ECHO_C" >&6
15270 else
15271   ac_check_lib_save_LIBS=$LIBS
15272 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
15273 cat >conftest.$ac_ext <<_ACEOF
15274 #line $LINENO "configure"
15275 /* confdefs.h.  */
15276 _ACEOF
15277 cat confdefs.h >>conftest.$ac_ext
15278 cat >>conftest.$ac_ext <<_ACEOF
15279 /* end confdefs.h.  */
15280
15281 /* Override any gcc2 internal prototype to avoid an error.  */
15282 #ifdef __cplusplus
15283 extern "C"
15284 #endif
15285 /* We use char because int might match the return type of a gcc2
15286    builtin and then its argument prototype would still apply.  */
15287 char glXCreateContext ();
15288 int
15289 main ()
15290 {
15291 glXCreateContext ();
15292   ;
15293   return 0;
15294 }
15295 _ACEOF
15296 rm -f conftest.$ac_objext conftest$ac_exeext
15297 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15298   (eval $ac_link) 2>&5
15299   ac_status=$?
15300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15301   (exit $ac_status); } &&
15302          { ac_try='test -s conftest$ac_exeext'
15303   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15304   (eval $ac_try) 2>&5
15305   ac_status=$?
15306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15307   (exit $ac_status); }; }; then
15308   ac_cv_lib_GL_glXCreateContext=yes
15309 else
15310   echo "$as_me: failed program was:" >&5
15311 sed 's/^/| /' conftest.$ac_ext >&5
15312
15313 ac_cv_lib_GL_glXCreateContext=no
15314 fi
15315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15316 LIBS=$ac_check_lib_save_LIBS
15317 fi
15318 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
15319 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
15320 if test $ac_cv_lib_GL_glXCreateContext = yes; then
15321   gl_lib_1="GL"
15322                       GL_LIBS="-lGL -lGLU $GL_LIBS"
15323 fi
15324
15325   CPPFLAGS="$ac_save_CPPFLAGS"
15326   LDFLAGS="$ac_save_LDFLAGS"
15327 #  LIBS="$ac_save_LIBS"
15328
15329     fi
15330
15331     if test "$gl_lib_1" = "" ; then
15332       # we have headers, but no libs -- bail.
15333       have_gl=no
15334       ac_have_mesa_gl=no
15335       gl_halfassed=yes
15336     else
15337       # linking works -- we can build the GL hacks.
15338       cat >>confdefs.h <<\_ACEOF
15339 #define HAVE_GL 1
15340 _ACEOF
15341
15342       if test "$ac_have_mesa_gl" = yes ; then
15343         cat >>confdefs.h <<\_ACEOF
15344 #define HAVE_MESA_GL 1
15345 _ACEOF
15346
15347       fi
15348     fi
15349   fi
15350
15351
15352   # Now that we know we have GL headers and libs, do some more GL testing.
15353   #
15354
15355   if test "$have_gl" = yes ; then
15356     # If it's MesaGL, we'd like to issue a warning if the version number
15357     # is less than or equal to 2.6, because that version had a security bug.
15358     #
15359     if test "$ac_have_mesa_gl" = yes; then
15360
15361       echo "$as_me:$LINENO: checking MesaGL version number" >&5
15362 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
15363 if test "${ac_cv_mesagl_version_string+set}" = set; then
15364   echo $ECHO_N "(cached) $ECHO_C" >&6
15365 else
15366   cat > conftest.$ac_ext <<EOF
15367 #line 15373 "configure"
15368 #include "confdefs.h"
15369 #include <GL/gl.h>
15370 #ifndef MESA_MAJOR_VERSION
15371 # include <GL/xmesa.h>
15372 # ifdef XMESA_MAJOR_VERSION
15373    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
15374       we have to check the XMesa version number (the number of the X protocol
15375       support, which seems to be the same as the Mesa version number.)
15376     */
15377 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
15378 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
15379 # else
15380    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
15381       so we have no way of telling what version of Mesa this is at all.
15382       So, we'll guess that the osmesa version (the "offscreen protocol")
15383       is less than or equal to the real mesa version number.  Except that
15384       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
15385       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
15386     */
15387 # include <GL/osmesa.h>
15388 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
15389 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
15390 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
15391 #   undef MESA_MINOR_VERSION
15392 #   define MESA_MINOR_VERSION 4 or newer, probably?
15393 #  endif
15394 # endif
15395 #endif
15396 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
15397 EOF
15398
15399          ac_save_CPPFLAGS="$CPPFLAGS"
15400          if test \! -z "$includedir" ; then
15401            CPPFLAGS="$CPPFLAGS -I$includedir"
15402          fi
15403          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15404
15405          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
15406
15407          # M4 sucks!!
15408
15409           mglv=`echo "$mglv" | sed -n \
15410              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
15411
15412
15413          rm -f conftest.$ac_ext
15414
15415          CPPFLAGS="$ac_save_CPPFLAGS"
15416
15417          if test "$mglv" = ""; then
15418            ac_mesagl_version=unknown
15419            ac_mesagl_version_string=unknown
15420          else
15421            ac_mesagl_version_string="$mglv"
15422            # M4 sucks!!
15423
15424            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
15425            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
15426
15427            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
15428            if test -z "$ac_mesagl_version"; then
15429              ac_mesagl_version=unknown
15430              ac_mesagl_version_string=unknown
15431            fi
15432          fi
15433          ac_cv_mesagl_version=$ac_mesagl_version
15434          ac_cv_mesagl_version_string=$ac_mesagl_version_string
15435
15436 fi
15437 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
15438 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
15439       ac_mesagl_version=$ac_cv_mesagl_version
15440       ac_mesagl_version_string=$ac_cv_mesagl_version_string
15441     fi
15442
15443
15444     # Check for OpenGL 1.1 features.
15445     #
15446
15447   ac_save_CPPFLAGS="$CPPFLAGS"
15448   ac_save_LDFLAGS="$LDFLAGS"
15449 #  ac_save_LIBS="$LIBS"
15450
15451   if test \! -z "$includedir" ; then
15452     CPPFLAGS="$CPPFLAGS -I$includedir"
15453   fi
15454   # note: $X_CFLAGS includes $x_includes
15455   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15456
15457   if test \! -z "$libdir" ; then
15458     LDFLAGS="$LDFLAGS -L$libdir"
15459   fi
15460   # note: $X_LIBS includes $x_libraries
15461   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15462
15463   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
15464 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
15465 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
15466 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15467   echo $ECHO_N "(cached) $ECHO_C" >&6
15468 else
15469   ac_check_lib_save_LIBS=$LIBS
15470 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
15471 cat >conftest.$ac_ext <<_ACEOF
15472 #line $LINENO "configure"
15473 /* confdefs.h.  */
15474 _ACEOF
15475 cat confdefs.h >>conftest.$ac_ext
15476 cat >>conftest.$ac_ext <<_ACEOF
15477 /* end confdefs.h.  */
15478
15479 /* Override any gcc2 internal prototype to avoid an error.  */
15480 #ifdef __cplusplus
15481 extern "C"
15482 #endif
15483 /* We use char because int might match the return type of a gcc2
15484    builtin and then its argument prototype would still apply.  */
15485 char glBindTexture ();
15486 int
15487 main ()
15488 {
15489 glBindTexture ();
15490   ;
15491   return 0;
15492 }
15493 _ACEOF
15494 rm -f conftest.$ac_objext conftest$ac_exeext
15495 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15496   (eval $ac_link) 2>&5
15497   ac_status=$?
15498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15499   (exit $ac_status); } &&
15500          { ac_try='test -s conftest$ac_exeext'
15501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15502   (eval $ac_try) 2>&5
15503   ac_status=$?
15504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15505   (exit $ac_status); }; }; then
15506   eval "$as_ac_Lib=yes"
15507 else
15508   echo "$as_me: failed program was:" >&5
15509 sed 's/^/| /' conftest.$ac_ext >&5
15510
15511 eval "$as_ac_Lib=no"
15512 fi
15513 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15514 LIBS=$ac_check_lib_save_LIBS
15515 fi
15516 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15517 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15518 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15519   cat >>confdefs.h <<\_ACEOF
15520 #define HAVE_GLBINDTEXTURE 1
15521 _ACEOF
15522
15523 else
15524   true
15525 fi
15526
15527   CPPFLAGS="$ac_save_CPPFLAGS"
15528   LDFLAGS="$ac_save_LDFLAGS"
15529 #  LIBS="$ac_save_LIBS"
15530
15531   fi
15532
15533 elif test "$with_gl" != no; then
15534   echo "error: must be yes or no: --with-gl=$with_gl"
15535   exit 1
15536 fi
15537
15538
15539 ###############################################################################
15540 #
15541 #       Check for -lgle.
15542 #
15543 ###############################################################################
15544
15545 have_gle=no
15546 with_gle_req=unspecified
15547 gle_halfassed=no
15548
15549 # Check whether --with-gle or --without-gle was given.
15550 if test "${with_gle+set}" = set; then
15551   withval="$with_gle"
15552   with_gle="$withval"; with_gle_req="$withval"
15553 else
15554   with_gle=yes
15555 fi;
15556
15557
15558    case "$with_gle" in
15559     yes) ;;
15560     no)  ;;
15561
15562     /*)
15563      echo "$as_me:$LINENO: checking for GLE headers" >&5
15564 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
15565      d=$with_gle/include
15566      if test -d $d; then
15567        X_CFLAGS="-I$d $X_CFLAGS"
15568        echo "$as_me:$LINENO: result: $d" >&5
15569 echo "${ECHO_T}$d" >&6
15570      else
15571        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15572 echo "${ECHO_T}not found ($d: no such directory)" >&6
15573      fi
15574
15575      echo "$as_me:$LINENO: checking for GLE libs" >&5
15576 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
15577      d=$with_gle/lib
15578      if test -d $d; then
15579        X_LIBS="-L$d $X_LIBS"
15580        echo "$as_me:$LINENO: result: $d" >&5
15581 echo "${ECHO_T}$d" >&6
15582      else
15583        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15584 echo "${ECHO_T}not found ($d: no such directory)" >&6
15585      fi
15586
15587      # replace the directory string with "yes".
15588      with_gle_req="yes"
15589      with_gle=$with_gle_req
15590      ;;
15591
15592     *)
15593      echo ""
15594      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
15595      echo "       If it is a directory, then \`DIR/include' will be added to"
15596      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15597      exit 1
15598      ;;
15599    esac
15600
15601
15602 GLE_LIBS=""
15603
15604 if test "$have_gl" = no ; then
15605  true
15606 elif test "$with_gle" = yes; then
15607
15608
15609   ac_save_CPPFLAGS="$CPPFLAGS"
15610   if test \! -z "$includedir" ; then
15611     CPPFLAGS="$CPPFLAGS -I$includedir"
15612   fi
15613   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15614   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
15615 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
15616 if test "${ac_cv_header_GL_gle_h+set}" = set; then
15617   echo $ECHO_N "(cached) $ECHO_C" >&6
15618 else
15619   cat >conftest.$ac_ext <<_ACEOF
15620 #line $LINENO "configure"
15621 /* confdefs.h.  */
15622 _ACEOF
15623 cat confdefs.h >>conftest.$ac_ext
15624 cat >>conftest.$ac_ext <<_ACEOF
15625 /* end confdefs.h.  */
15626 #include <GL/gl.h>
15627
15628 #include <GL/gle.h>
15629 _ACEOF
15630 rm -f conftest.$ac_objext
15631 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15632   (eval $ac_compile) 2>&5
15633   ac_status=$?
15634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15635   (exit $ac_status); } &&
15636          { ac_try='test -s conftest.$ac_objext'
15637   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15638   (eval $ac_try) 2>&5
15639   ac_status=$?
15640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15641   (exit $ac_status); }; }; then
15642   ac_cv_header_GL_gle_h=yes
15643 else
15644   echo "$as_me: failed program was:" >&5
15645 sed 's/^/| /' conftest.$ac_ext >&5
15646
15647 ac_cv_header_GL_gle_h=no
15648 fi
15649 rm -f conftest.$ac_objext conftest.$ac_ext
15650 fi
15651 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
15652 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
15653 if test $ac_cv_header_GL_gle_h = yes; then
15654   have_gle3=yes
15655 else
15656   have_gle3=no
15657 fi
15658
15659
15660   CPPFLAGS="$ac_save_CPPFLAGS"
15661   if test "$have_gle3" = yes ; then
15662     have_gle=yes;
15663   else
15664
15665   ac_save_CPPFLAGS="$CPPFLAGS"
15666   if test \! -z "$includedir" ; then
15667     CPPFLAGS="$CPPFLAGS -I$includedir"
15668   fi
15669   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15670   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
15671 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
15672 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
15673   echo $ECHO_N "(cached) $ECHO_C" >&6
15674 else
15675   cat >conftest.$ac_ext <<_ACEOF
15676 #line $LINENO "configure"
15677 /* confdefs.h.  */
15678 _ACEOF
15679 cat confdefs.h >>conftest.$ac_ext
15680 cat >>conftest.$ac_ext <<_ACEOF
15681 /* end confdefs.h.  */
15682 #include <GL/gl.h>
15683
15684 #include <GL/gutil.h>
15685 _ACEOF
15686 rm -f conftest.$ac_objext
15687 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15688   (eval $ac_compile) 2>&5
15689   ac_status=$?
15690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15691   (exit $ac_status); } &&
15692          { ac_try='test -s conftest.$ac_objext'
15693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15694   (eval $ac_try) 2>&5
15695   ac_status=$?
15696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15697   (exit $ac_status); }; }; then
15698   ac_cv_header_GL_gutil_h=yes
15699 else
15700   echo "$as_me: failed program was:" >&5
15701 sed 's/^/| /' conftest.$ac_ext >&5
15702
15703 ac_cv_header_GL_gutil_h=no
15704 fi
15705 rm -f conftest.$ac_objext conftest.$ac_ext
15706 fi
15707 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
15708 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
15709 if test $ac_cv_header_GL_gutil_h = yes; then
15710   have_gle=yes
15711 else
15712   have_gle=no
15713 fi
15714
15715
15716   CPPFLAGS="$ac_save_CPPFLAGS"
15717     if test "$have_gle" = yes ; then
15718
15719   ac_save_CPPFLAGS="$CPPFLAGS"
15720   if test \! -z "$includedir" ; then
15721     CPPFLAGS="$CPPFLAGS -I$includedir"
15722   fi
15723   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15724   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
15725 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
15726 if test "${ac_cv_header_GL_tube_h+set}" = set; then
15727   echo $ECHO_N "(cached) $ECHO_C" >&6
15728 else
15729   cat >conftest.$ac_ext <<_ACEOF
15730 #line $LINENO "configure"
15731 /* confdefs.h.  */
15732 _ACEOF
15733 cat confdefs.h >>conftest.$ac_ext
15734 cat >>conftest.$ac_ext <<_ACEOF
15735 /* end confdefs.h.  */
15736 #include <GL/gl.h>
15737
15738 #include <GL/tube.h>
15739 _ACEOF
15740 rm -f conftest.$ac_objext
15741 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15742   (eval $ac_compile) 2>&5
15743   ac_status=$?
15744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15745   (exit $ac_status); } &&
15746          { ac_try='test -s conftest.$ac_objext'
15747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15748   (eval $ac_try) 2>&5
15749   ac_status=$?
15750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15751   (exit $ac_status); }; }; then
15752   ac_cv_header_GL_tube_h=yes
15753 else
15754   echo "$as_me: failed program was:" >&5
15755 sed 's/^/| /' conftest.$ac_ext >&5
15756
15757 ac_cv_header_GL_tube_h=no
15758 fi
15759 rm -f conftest.$ac_objext conftest.$ac_ext
15760 fi
15761 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
15762 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
15763 if test $ac_cv_header_GL_tube_h = yes; then
15764   have_gle=yes
15765 else
15766   have_gle=no
15767 fi
15768
15769
15770   CPPFLAGS="$ac_save_CPPFLAGS"
15771     fi
15772   fi
15773
15774   if test "$have_gle" = yes ; then
15775     have_gle=no
15776     gle_halfassed=yes
15777
15778   ac_save_CPPFLAGS="$CPPFLAGS"
15779   ac_save_LDFLAGS="$LDFLAGS"
15780 #  ac_save_LIBS="$LIBS"
15781
15782   if test \! -z "$includedir" ; then
15783     CPPFLAGS="$CPPFLAGS -I$includedir"
15784   fi
15785   # note: $X_CFLAGS includes $x_includes
15786   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15787
15788   if test \! -z "$libdir" ; then
15789     LDFLAGS="$LDFLAGS -L$libdir"
15790   fi
15791   # note: $X_LIBS includes $x_libraries
15792   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15793
15794   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
15795 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
15796 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
15797   echo $ECHO_N "(cached) $ECHO_C" >&6
15798 else
15799   ac_check_lib_save_LIBS=$LIBS
15800 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
15801 cat >conftest.$ac_ext <<_ACEOF
15802 #line $LINENO "configure"
15803 /* confdefs.h.  */
15804 _ACEOF
15805 cat confdefs.h >>conftest.$ac_ext
15806 cat >>conftest.$ac_ext <<_ACEOF
15807 /* end confdefs.h.  */
15808
15809 /* Override any gcc2 internal prototype to avoid an error.  */
15810 #ifdef __cplusplus
15811 extern "C"
15812 #endif
15813 /* We use char because int might match the return type of a gcc2
15814    builtin and then its argument prototype would still apply.  */
15815 char gleCreateGC ();
15816 int
15817 main ()
15818 {
15819 gleCreateGC ();
15820   ;
15821   return 0;
15822 }
15823 _ACEOF
15824 rm -f conftest.$ac_objext conftest$ac_exeext
15825 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15826   (eval $ac_link) 2>&5
15827   ac_status=$?
15828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15829   (exit $ac_status); } &&
15830          { ac_try='test -s conftest$ac_exeext'
15831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15832   (eval $ac_try) 2>&5
15833   ac_status=$?
15834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15835   (exit $ac_status); }; }; then
15836   ac_cv_lib_gle_gleCreateGC=yes
15837 else
15838   echo "$as_me: failed program was:" >&5
15839 sed 's/^/| /' conftest.$ac_ext >&5
15840
15841 ac_cv_lib_gle_gleCreateGC=no
15842 fi
15843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15844 LIBS=$ac_check_lib_save_LIBS
15845 fi
15846 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
15847 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
15848 if test $ac_cv_lib_gle_gleCreateGC = yes; then
15849   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
15850 fi
15851
15852   CPPFLAGS="$ac_save_CPPFLAGS"
15853   LDFLAGS="$ac_save_LDFLAGS"
15854 #  LIBS="$ac_save_LIBS"
15855
15856   fi
15857   if test "$have_gle" = yes ; then
15858     have_gle=no
15859     gle_halfassed=yes
15860
15861     # sometimes the libmatrix stuff is included in libgle.  look there first.
15862 #
15863 # I don't get it.  For some reason, this test passes on SGI, as if
15864 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
15865 # Yet the link is succeeding.  Why???
15866 #
15867 #    AC_CHECK_X_LIB(gle, uview_direction_d,
15868 #                   [have_gle=yes; gle_halfassed=no],
15869 #                   [], $GL_LIBS -lX11 -lXext -lm)
15870
15871     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
15872     # *sigh*
15873     if test "$have_gle3" = yes ; then
15874
15875   ac_save_CPPFLAGS="$CPPFLAGS"
15876   ac_save_LDFLAGS="$LDFLAGS"
15877 #  ac_save_LIBS="$LIBS"
15878
15879   if test \! -z "$includedir" ; then
15880     CPPFLAGS="$CPPFLAGS -I$includedir"
15881   fi
15882   # note: $X_CFLAGS includes $x_includes
15883   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15884
15885   if test \! -z "$libdir" ; then
15886     LDFLAGS="$LDFLAGS -L$libdir"
15887   fi
15888   # note: $X_LIBS includes $x_libraries
15889   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15890
15891   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
15892 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
15893 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
15894   echo $ECHO_N "(cached) $ECHO_C" >&6
15895 else
15896   ac_check_lib_save_LIBS=$LIBS
15897 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
15898 cat >conftest.$ac_ext <<_ACEOF
15899 #line $LINENO "configure"
15900 /* confdefs.h.  */
15901 _ACEOF
15902 cat confdefs.h >>conftest.$ac_ext
15903 cat >>conftest.$ac_ext <<_ACEOF
15904 /* end confdefs.h.  */
15905
15906 /* Override any gcc2 internal prototype to avoid an error.  */
15907 #ifdef __cplusplus
15908 extern "C"
15909 #endif
15910 /* We use char because int might match the return type of a gcc2
15911    builtin and then its argument prototype would still apply.  */
15912 char uview_direction ();
15913 int
15914 main ()
15915 {
15916 uview_direction ();
15917   ;
15918   return 0;
15919 }
15920 _ACEOF
15921 rm -f conftest.$ac_objext conftest$ac_exeext
15922 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15923   (eval $ac_link) 2>&5
15924   ac_status=$?
15925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15926   (exit $ac_status); } &&
15927          { ac_try='test -s conftest$ac_exeext'
15928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15929   (eval $ac_try) 2>&5
15930   ac_status=$?
15931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15932   (exit $ac_status); }; }; then
15933   ac_cv_lib_gle_uview_direction=yes
15934 else
15935   echo "$as_me: failed program was:" >&5
15936 sed 's/^/| /' conftest.$ac_ext >&5
15937
15938 ac_cv_lib_gle_uview_direction=no
15939 fi
15940 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15941 LIBS=$ac_check_lib_save_LIBS
15942 fi
15943 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
15944 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
15945 if test $ac_cv_lib_gle_uview_direction = yes; then
15946   have_gle=yes; gle_halfassed=no
15947 fi
15948
15949   CPPFLAGS="$ac_save_CPPFLAGS"
15950   LDFLAGS="$ac_save_LDFLAGS"
15951 #  LIBS="$ac_save_LIBS"
15952
15953     fi
15954     # if it wasn't in libgle, then look in libmatrix.
15955     if test "$have_gle" = no ; then
15956
15957   ac_save_CPPFLAGS="$CPPFLAGS"
15958   ac_save_LDFLAGS="$LDFLAGS"
15959 #  ac_save_LIBS="$LIBS"
15960
15961   if test \! -z "$includedir" ; then
15962     CPPFLAGS="$CPPFLAGS -I$includedir"
15963   fi
15964   # note: $X_CFLAGS includes $x_includes
15965   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15966
15967   if test \! -z "$libdir" ; then
15968     LDFLAGS="$LDFLAGS -L$libdir"
15969   fi
15970   # note: $X_LIBS includes $x_libraries
15971   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15972
15973   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
15974 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
15975 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
15976   echo $ECHO_N "(cached) $ECHO_C" >&6
15977 else
15978   ac_check_lib_save_LIBS=$LIBS
15979 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
15980 cat >conftest.$ac_ext <<_ACEOF
15981 #line $LINENO "configure"
15982 /* confdefs.h.  */
15983 _ACEOF
15984 cat confdefs.h >>conftest.$ac_ext
15985 cat >>conftest.$ac_ext <<_ACEOF
15986 /* end confdefs.h.  */
15987
15988 /* Override any gcc2 internal prototype to avoid an error.  */
15989 #ifdef __cplusplus
15990 extern "C"
15991 #endif
15992 /* We use char because int might match the return type of a gcc2
15993    builtin and then its argument prototype would still apply.  */
15994 char uview_direction_d ();
15995 int
15996 main ()
15997 {
15998 uview_direction_d ();
15999   ;
16000   return 0;
16001 }
16002 _ACEOF
16003 rm -f conftest.$ac_objext conftest$ac_exeext
16004 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16005   (eval $ac_link) 2>&5
16006   ac_status=$?
16007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16008   (exit $ac_status); } &&
16009          { ac_try='test -s conftest$ac_exeext'
16010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16011   (eval $ac_try) 2>&5
16012   ac_status=$?
16013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16014   (exit $ac_status); }; }; then
16015   ac_cv_lib_matrix_uview_direction_d=yes
16016 else
16017   echo "$as_me: failed program was:" >&5
16018 sed 's/^/| /' conftest.$ac_ext >&5
16019
16020 ac_cv_lib_matrix_uview_direction_d=no
16021 fi
16022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16023 LIBS=$ac_check_lib_save_LIBS
16024 fi
16025 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
16026 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
16027 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
16028   have_gle=yes; gle_halfassed=no;
16029                       GLE_LIBS="$GLE_LIBS -lmatrix"
16030 fi
16031
16032   CPPFLAGS="$ac_save_CPPFLAGS"
16033   LDFLAGS="$ac_save_LDFLAGS"
16034 #  LIBS="$ac_save_LIBS"
16035
16036     fi
16037   fi
16038
16039   if test "$have_gle" = yes ; then
16040     cat >>confdefs.h <<\_ACEOF
16041 #define HAVE_GLE 1
16042 _ACEOF
16043
16044     if test "$have_gle3" = yes ; then
16045       cat >>confdefs.h <<\_ACEOF
16046 #define HAVE_GLE3 1
16047 _ACEOF
16048
16049     fi
16050   fi
16051
16052 elif test "$with_gle" != no; then
16053   echo "error: must be yes or no: --with-gle=$with_gle"
16054   exit 1
16055
16056 fi
16057
16058
16059
16060 ###############################################################################
16061 #
16062 #       Check for -lXpm.
16063 #
16064 ###############################################################################
16065
16066 have_xpm=no
16067 with_xpm_req=unspecified
16068
16069 # Check whether --with-xpm or --without-xpm was given.
16070 if test "${with_xpm+set}" = set; then
16071   withval="$with_xpm"
16072   with_xpm="$withval"; with_xpm_req="$withval"
16073 else
16074   with_xpm=yes
16075 fi;
16076
16077
16078    case "$with_xpm" in
16079     yes) ;;
16080     no)  ;;
16081
16082     /*)
16083      echo "$as_me:$LINENO: checking for XPM headers" >&5
16084 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
16085      d=$with_xpm/include
16086      if test -d $d; then
16087        X_CFLAGS="-I$d $X_CFLAGS"
16088        echo "$as_me:$LINENO: result: $d" >&5
16089 echo "${ECHO_T}$d" >&6
16090      else
16091        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16092 echo "${ECHO_T}not found ($d: no such directory)" >&6
16093      fi
16094
16095      echo "$as_me:$LINENO: checking for XPM libs" >&5
16096 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
16097      d=$with_xpm/lib
16098      if test -d $d; then
16099        X_LIBS="-L$d $X_LIBS"
16100        echo "$as_me:$LINENO: result: $d" >&5
16101 echo "${ECHO_T}$d" >&6
16102      else
16103        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16104 echo "${ECHO_T}not found ($d: no such directory)" >&6
16105      fi
16106
16107      # replace the directory string with "yes".
16108      with_xpm_req="yes"
16109      with_xpm=$with_xpm_req
16110      ;;
16111
16112     *)
16113      echo ""
16114      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
16115      echo "       If it is a directory, then \`DIR/include' will be added to"
16116      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16117      exit 1
16118      ;;
16119    esac
16120
16121
16122 if test "$with_xpm" = yes; then
16123
16124   ac_save_CPPFLAGS="$CPPFLAGS"
16125   if test \! -z "$includedir" ; then
16126     CPPFLAGS="$CPPFLAGS -I$includedir"
16127   fi
16128   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16129   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
16130 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
16131 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
16132   echo $ECHO_N "(cached) $ECHO_C" >&6
16133 else
16134   cat >conftest.$ac_ext <<_ACEOF
16135 #line $LINENO "configure"
16136 /* confdefs.h.  */
16137 _ACEOF
16138 cat confdefs.h >>conftest.$ac_ext
16139 cat >>conftest.$ac_ext <<_ACEOF
16140 /* end confdefs.h.  */
16141 #include <X11/Xlib.h>
16142
16143 #include <X11/xpm.h>
16144 _ACEOF
16145 rm -f conftest.$ac_objext
16146 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16147   (eval $ac_compile) 2>&5
16148   ac_status=$?
16149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16150   (exit $ac_status); } &&
16151          { ac_try='test -s conftest.$ac_objext'
16152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16153   (eval $ac_try) 2>&5
16154   ac_status=$?
16155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16156   (exit $ac_status); }; }; then
16157   ac_cv_header_X11_xpm_h=yes
16158 else
16159   echo "$as_me: failed program was:" >&5
16160 sed 's/^/| /' conftest.$ac_ext >&5
16161
16162 ac_cv_header_X11_xpm_h=no
16163 fi
16164 rm -f conftest.$ac_objext conftest.$ac_ext
16165 fi
16166 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
16167 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
16168 if test $ac_cv_header_X11_xpm_h = yes; then
16169   have_xpm=yes
16170                     cat >>confdefs.h <<\_ACEOF
16171 #define HAVE_XPM 1
16172 _ACEOF
16173
16174                     XPM_LIBS="-lXpm"
16175 fi
16176
16177
16178   CPPFLAGS="$ac_save_CPPFLAGS"
16179 elif test "$with_xpm" != no; then
16180   echo "error: must be yes or no: --with-xpm=$with_xpm"
16181   exit 1
16182 fi
16183
16184 # See comment near $motif_requires_xpm, above.
16185 # Need to do this here, after both Motif and XPM have been checked for.
16186 #
16187 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
16188   if test "$motif_requires_xpm" = yes ; then
16189     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
16190   fi
16191 fi
16192
16193 ###############################################################################
16194 #
16195 #       Check for -lgdk_pixbuf.
16196 #
16197 ###############################################################################
16198
16199 have_gdk_pixbuf=no
16200 with_gdk_pixbuf_req=unspecified
16201
16202 # Check whether --with-pixbuf or --without-pixbuf was given.
16203 if test "${with_pixbuf+set}" = set; then
16204   withval="$with_pixbuf"
16205   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
16206 else
16207   with_gdk_pixbuf=yes
16208 fi;
16209
16210 # if --with-pixbuf=/directory/ was specified, remember that directory so that
16211 # we can also look for the `gdk-pixbuf-config' program in that directory.
16212 case "$with_gdk_pixbuf" in
16213   /*)
16214     gdk_pixbuf_dir="$with_gdk_pixbuf"
16215     ;;
16216   *)
16217     gdk_pixbuf_dir=""
16218     ;;
16219 esac
16220
16221
16222    case "$with_gdk_pixbuf" in
16223     yes) ;;
16224     no)  ;;
16225
16226     /*)
16227      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
16228 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
16229      d=$with_gdk_pixbuf/include
16230      if test -d $d; then
16231        X_CFLAGS="-I$d $X_CFLAGS"
16232        echo "$as_me:$LINENO: result: $d" >&5
16233 echo "${ECHO_T}$d" >&6
16234      else
16235        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16236 echo "${ECHO_T}not found ($d: no such directory)" >&6
16237      fi
16238
16239      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
16240 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
16241      d=$with_gdk_pixbuf/lib
16242      if test -d $d; then
16243        X_LIBS="-L$d $X_LIBS"
16244        echo "$as_me:$LINENO: result: $d" >&5
16245 echo "${ECHO_T}$d" >&6
16246      else
16247        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16248 echo "${ECHO_T}not found ($d: no such directory)" >&6
16249      fi
16250
16251      # replace the directory string with "yes".
16252      with_gdk_pixbuf_req="yes"
16253      with_gdk_pixbuf=$with_gdk_pixbuf_req
16254      ;;
16255
16256     *)
16257      echo ""
16258      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
16259      echo "       If it is a directory, then \`DIR/include' will be added to"
16260      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16261      exit 1
16262      ;;
16263    esac
16264
16265
16266 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
16267   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
16268   exit 1
16269 fi
16270
16271 if test "$with_gdk_pixbuf" = yes; then
16272   have_gdk_pixbuf=no
16273   have_gdk_pixbuf2=no
16274
16275   if test -n "$pkg_config" ; then
16276     #
16277     # the new way...
16278     # run pkg-config based tests.
16279     #
16280     pkgs=''
16281     ok="yes"
16282
16283     # If we have Gtk 2.x, then *only* gdk-pixbuf 2.x will work.
16284     # If we have Gtk 1.x, then *only* gdk-pixbuf 1.x will work.
16285     # If we don't have Gtk at all, then either will work.
16286
16287     if test "$have_gtk" = no -o "$have_gtk2" = yes; then
16288       #
16289       # we don't have Gtk; or we have Gtk 2.x.  Check for pixbuf 2.x.
16290       #
16291       echo "$as_me:$LINENO: result: checking for gdk_pixbuf 2.x with gtk-config based tests..." >&5
16292 echo "${ECHO_T}checking for gdk_pixbuf 2.x with gtk-config based tests..." >&6
16293       pkg_check_version gdk-pixbuf-2.0      2.0.0
16294       pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
16295       have_gdk_pixbuf="$ok"
16296       have_gdk_pixbuf2="$ok"
16297     fi
16298
16299     if test "$have_gtk" = no -o "$have_gtk2" = no; then
16300       #
16301       # we don't have Gtk; or we have Gtk 1.x.
16302       # If we don't have pixbuf 2.x, then check for pixbuf 1.x.
16303       #
16304       if test "$have_gdk_pixbuf2" = no; then
16305         pkgs=''
16306         ok="yes"
16307       echo "$as_me:$LINENO: result: checking for gdk_pixbuf 1.x with gtk-config based tests..." >&5
16308 echo "${ECHO_T}checking for gdk_pixbuf 1.x with gtk-config based tests..." >&6
16309         pkg_check_version gdk_pixbuf      0.0
16310         pkg_check_version gdk_pixbuf_xlib 0.0
16311         have_gdk_pixbuf="$ok"
16312       fi
16313     fi
16314
16315     if test "$have_gdk_pixbuf" = yes; then
16316       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
16317 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
16318 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
16319   echo $ECHO_N "(cached) $ECHO_C" >&6
16320 else
16321   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
16322 fi
16323 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
16324 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
16325       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
16326 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
16327 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
16328   echo $ECHO_N "(cached) $ECHO_C" >&6
16329 else
16330   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
16331 fi
16332 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
16333 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
16334     fi
16335     ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
16336     ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
16337   fi
16338
16339
16340   if test "$have_gdk_pixbuf" = no; then
16341     #
16342     # the old way...
16343     # run gdk-pixbuf-config based tests.
16344     # note that we can't assume that the existence of "pkg-config" means
16345     # that we don't have to look for gdk-pixbuf-config -- in Gnome 1.4,
16346     # pkg-config exists, but doesn't know about pixbuf.
16347     #
16348
16349    echo "$as_me:$LINENO: result: checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&5
16350 echo "${ECHO_T}checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&6
16351
16352     # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
16353     # look in /foo/bin/ for for gdk-pixbuf-config.
16354     #
16355     gdk_pixbuf_path="$PATH"
16356
16357     if test ! -z "$gtk_dir"; then
16358       # canonicalize slashes.
16359       foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
16360       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
16361     fi
16362
16363     if test ! -z "$gnome_dir"; then
16364       # canonicalize slashes.
16365       foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
16366       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
16367     fi
16368
16369     for ac_prog in gdk-pixbuf-config
16370 do
16371   # Extract the first word of "$ac_prog", so it can be a program name with args.
16372 set dummy $ac_prog; ac_word=$2
16373 echo "$as_me:$LINENO: checking for $ac_word" >&5
16374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16375 if test "${ac_cv_path_gdk_pixbuf_config+set}" = set; then
16376   echo $ECHO_N "(cached) $ECHO_C" >&6
16377 else
16378   case $gdk_pixbuf_config in
16379   [\\/]* | ?:[\\/]*)
16380   ac_cv_path_gdk_pixbuf_config="$gdk_pixbuf_config" # Let the user override the test with a path.
16381   ;;
16382   *)
16383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16384 for as_dir in $gdk_pixbuf_path
16385 do
16386   IFS=$as_save_IFS
16387   test -z "$as_dir" && as_dir=.
16388   for ac_exec_ext in '' $ac_executable_extensions; do
16389   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16390     ac_cv_path_gdk_pixbuf_config="$as_dir/$ac_word$ac_exec_ext"
16391     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16392     break 2
16393   fi
16394 done
16395 done
16396
16397   ;;
16398 esac
16399 fi
16400 gdk_pixbuf_config=$ac_cv_path_gdk_pixbuf_config
16401
16402 if test -n "$gdk_pixbuf_config"; then
16403   echo "$as_me:$LINENO: result: $gdk_pixbuf_config" >&5
16404 echo "${ECHO_T}$gdk_pixbuf_config" >&6
16405 else
16406   echo "$as_me:$LINENO: result: no" >&5
16407 echo "${ECHO_T}no" >&6
16408 fi
16409
16410   test -n "$gdk_pixbuf_config" && break
16411 done
16412
16413
16414     # If we found the gdk-pixbuf-config program, run it to get flags.
16415     #
16416     if test -n "$gdk_pixbuf_config" ; then
16417       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
16418 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
16419 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
16420   echo $ECHO_N "(cached) $ECHO_C" >&6
16421 else
16422   ac_cv_gdk_pixbuf_config_cflags=`$gdk_pixbuf_config --cflags`
16423 fi
16424 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
16425 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
16426       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
16427 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
16428 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
16429   echo $ECHO_N "(cached) $ECHO_C" >&6
16430 else
16431   ac_cv_gdk_pixbuf_config_libs=`$gdk_pixbuf_config --libs`
16432 fi
16433 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
16434 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
16435
16436       # note that "gdk-pixbuf-config --libs" produces a link line including
16437       # -lgdk_pixbuf, but there's no way to get it to produce one that also
16438       # includes -lgdk_pixbuf_xlib.  Since we don't know *exactly* what the
16439       # name of the library will be, construct it with sed...
16440       # M4 sucks!!
16441
16442       ac_cv_gdk_pixbuf_config_libs=`echo $ac_cv_gdk_pixbuf_config_libs | \
16443        sed 's@ \(-lgdk_pixbuf\([-_a-zA-Z0-9.]*\)\) @ \1 -lgdk_pixbuf_xlib\2 @'`
16444
16445
16446       ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
16447       ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
16448     fi
16449   fi
16450
16451   ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
16452   CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
16453
16454   if test "$have_gdk_pixbuf" = no; then
16455     #
16456     # we appear to have pixbuf; check for headers/libs to be sure.
16457     #
16458
16459     have_gdk_pixbuf=no
16460
16461     # check for header A...
16462
16463   ac_save_CPPFLAGS="$CPPFLAGS"
16464   if test \! -z "$includedir" ; then
16465     CPPFLAGS="$CPPFLAGS -I$includedir"
16466   fi
16467   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16468   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
16469   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
16470 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
16471 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
16472   echo $ECHO_N "(cached) $ECHO_C" >&6
16473 fi
16474 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
16475 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
16476 else
16477   # Is the header compilable?
16478 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
16479 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
16480 cat >conftest.$ac_ext <<_ACEOF
16481 #line $LINENO "configure"
16482 /* confdefs.h.  */
16483 _ACEOF
16484 cat confdefs.h >>conftest.$ac_ext
16485 cat >>conftest.$ac_ext <<_ACEOF
16486 /* end confdefs.h.  */
16487 $ac_includes_default
16488 #include <gdk-pixbuf/gdk-pixbuf.h>
16489 _ACEOF
16490 rm -f conftest.$ac_objext
16491 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16492   (eval $ac_compile) 2>&5
16493   ac_status=$?
16494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16495   (exit $ac_status); } &&
16496          { ac_try='test -s conftest.$ac_objext'
16497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16498   (eval $ac_try) 2>&5
16499   ac_status=$?
16500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16501   (exit $ac_status); }; }; then
16502   ac_header_compiler=yes
16503 else
16504   echo "$as_me: failed program was:" >&5
16505 sed 's/^/| /' conftest.$ac_ext >&5
16506
16507 ac_header_compiler=no
16508 fi
16509 rm -f conftest.$ac_objext conftest.$ac_ext
16510 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16511 echo "${ECHO_T}$ac_header_compiler" >&6
16512
16513 # Is the header present?
16514 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
16515 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
16516 cat >conftest.$ac_ext <<_ACEOF
16517 #line $LINENO "configure"
16518 /* confdefs.h.  */
16519 _ACEOF
16520 cat confdefs.h >>conftest.$ac_ext
16521 cat >>conftest.$ac_ext <<_ACEOF
16522 /* end confdefs.h.  */
16523 #include <gdk-pixbuf/gdk-pixbuf.h>
16524 _ACEOF
16525 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16526   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16527   ac_status=$?
16528   grep -v '^ *+' conftest.er1 >conftest.err
16529   rm -f conftest.er1
16530   cat conftest.err >&5
16531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16532   (exit $ac_status); } >/dev/null; then
16533   if test -s conftest.err; then
16534     ac_cpp_err=$ac_c_preproc_warn_flag
16535   else
16536     ac_cpp_err=
16537   fi
16538 else
16539   ac_cpp_err=yes
16540 fi
16541 if test -z "$ac_cpp_err"; then
16542   ac_header_preproc=yes
16543 else
16544   echo "$as_me: failed program was:" >&5
16545 sed 's/^/| /' conftest.$ac_ext >&5
16546
16547   ac_header_preproc=no
16548 fi
16549 rm -f conftest.err conftest.$ac_ext
16550 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16551 echo "${ECHO_T}$ac_header_preproc" >&6
16552
16553 # So?  What about this header?
16554 case $ac_header_compiler:$ac_header_preproc in
16555   yes:no )
16556     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
16557 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16558     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
16559 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
16560     (
16561       cat <<\_ASBOX
16562 ## ------------------------------------ ##
16563 ## Report this to bug-autoconf@gnu.org. ##
16564 ## ------------------------------------ ##
16565 _ASBOX
16566     ) |
16567       sed "s/^/$as_me: WARNING:     /" >&2
16568     ;;
16569   no:yes )
16570     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
16571 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
16572     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&5
16573 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&2;}
16574     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
16575 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
16576     (
16577       cat <<\_ASBOX
16578 ## ------------------------------------ ##
16579 ## Report this to bug-autoconf@gnu.org. ##
16580 ## ------------------------------------ ##
16581 _ASBOX
16582     ) |
16583       sed "s/^/$as_me: WARNING:     /" >&2
16584     ;;
16585 esac
16586 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
16587 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
16588 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
16589   echo $ECHO_N "(cached) $ECHO_C" >&6
16590 else
16591   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
16592 fi
16593 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
16594 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
16595
16596 fi
16597 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
16598   have_gdk_pixbuf=yes
16599 fi
16600
16601
16602   CPPFLAGS="$ac_save_CPPFLAGS"
16603
16604     # if that worked, check for header B...
16605     if test "$have_gdk_pixbuf" = yes; then
16606       have_gdk_pixbuf=no
16607       gdk_pixbuf_halfassed=yes
16608
16609   ac_save_CPPFLAGS="$CPPFLAGS"
16610   if test \! -z "$includedir" ; then
16611     CPPFLAGS="$CPPFLAGS -I$includedir"
16612   fi
16613   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16614   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16615   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
16616 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16617 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16618   echo $ECHO_N "(cached) $ECHO_C" >&6
16619 fi
16620 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
16621 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
16622 else
16623   # Is the header compilable?
16624 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
16625 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
16626 cat >conftest.$ac_ext <<_ACEOF
16627 #line $LINENO "configure"
16628 /* confdefs.h.  */
16629 _ACEOF
16630 cat confdefs.h >>conftest.$ac_ext
16631 cat >>conftest.$ac_ext <<_ACEOF
16632 /* end confdefs.h.  */
16633 $ac_includes_default
16634 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
16635 _ACEOF
16636 rm -f conftest.$ac_objext
16637 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16638   (eval $ac_compile) 2>&5
16639   ac_status=$?
16640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16641   (exit $ac_status); } &&
16642          { ac_try='test -s conftest.$ac_objext'
16643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16644   (eval $ac_try) 2>&5
16645   ac_status=$?
16646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16647   (exit $ac_status); }; }; then
16648   ac_header_compiler=yes
16649 else
16650   echo "$as_me: failed program was:" >&5
16651 sed 's/^/| /' conftest.$ac_ext >&5
16652
16653 ac_header_compiler=no
16654 fi
16655 rm -f conftest.$ac_objext conftest.$ac_ext
16656 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16657 echo "${ECHO_T}$ac_header_compiler" >&6
16658
16659 # Is the header present?
16660 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
16661 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
16662 cat >conftest.$ac_ext <<_ACEOF
16663 #line $LINENO "configure"
16664 /* confdefs.h.  */
16665 _ACEOF
16666 cat confdefs.h >>conftest.$ac_ext
16667 cat >>conftest.$ac_ext <<_ACEOF
16668 /* end confdefs.h.  */
16669 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
16670 _ACEOF
16671 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16672   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16673   ac_status=$?
16674   grep -v '^ *+' conftest.er1 >conftest.err
16675   rm -f conftest.er1
16676   cat conftest.err >&5
16677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16678   (exit $ac_status); } >/dev/null; then
16679   if test -s conftest.err; then
16680     ac_cpp_err=$ac_c_preproc_warn_flag
16681   else
16682     ac_cpp_err=
16683   fi
16684 else
16685   ac_cpp_err=yes
16686 fi
16687 if test -z "$ac_cpp_err"; then
16688   ac_header_preproc=yes
16689 else
16690   echo "$as_me: failed program was:" >&5
16691 sed 's/^/| /' conftest.$ac_ext >&5
16692
16693   ac_header_preproc=no
16694 fi
16695 rm -f conftest.err conftest.$ac_ext
16696 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16697 echo "${ECHO_T}$ac_header_preproc" >&6
16698
16699 # So?  What about this header?
16700 case $ac_header_compiler:$ac_header_preproc in
16701   yes:no )
16702     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16703 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16704     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16705 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
16706     (
16707       cat <<\_ASBOX
16708 ## ------------------------------------ ##
16709 ## Report this to bug-autoconf@gnu.org. ##
16710 ## ------------------------------------ ##
16711 _ASBOX
16712     ) |
16713       sed "s/^/$as_me: WARNING:     /" >&2
16714     ;;
16715   no:yes )
16716     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
16717 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
16718     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
16719 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
16720     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16721 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
16722     (
16723       cat <<\_ASBOX
16724 ## ------------------------------------ ##
16725 ## Report this to bug-autoconf@gnu.org. ##
16726 ## ------------------------------------ ##
16727 _ASBOX
16728     ) |
16729       sed "s/^/$as_me: WARNING:     /" >&2
16730     ;;
16731 esac
16732 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
16733 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16734 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16735   echo $ECHO_N "(cached) $ECHO_C" >&6
16736 else
16737   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
16738 fi
16739 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
16740 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
16741
16742 fi
16743 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
16744   have_gdk_pixbuf=yes
16745                          gdk_pixbuf_halfassed=no
16746 fi
16747
16748
16749   CPPFLAGS="$ac_save_CPPFLAGS"
16750
16751       # yay, it has a new name in Gtk 2.x...
16752       if test "$have_gdk_pixbuf" = no; then
16753         have_gdk_pixbuf=no
16754         gdk_pixbuf_halfassed=yes
16755
16756   ac_save_CPPFLAGS="$CPPFLAGS"
16757   if test \! -z "$includedir" ; then
16758     CPPFLAGS="$CPPFLAGS -I$includedir"
16759   fi
16760   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16761   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16762   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
16763 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16764 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16765   echo $ECHO_N "(cached) $ECHO_C" >&6
16766 fi
16767 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
16768 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
16769 else
16770   # Is the header compilable?
16771 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
16772 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
16773 cat >conftest.$ac_ext <<_ACEOF
16774 #line $LINENO "configure"
16775 /* confdefs.h.  */
16776 _ACEOF
16777 cat confdefs.h >>conftest.$ac_ext
16778 cat >>conftest.$ac_ext <<_ACEOF
16779 /* end confdefs.h.  */
16780 $ac_includes_default
16781 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
16782 _ACEOF
16783 rm -f conftest.$ac_objext
16784 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16785   (eval $ac_compile) 2>&5
16786   ac_status=$?
16787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16788   (exit $ac_status); } &&
16789          { ac_try='test -s conftest.$ac_objext'
16790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16791   (eval $ac_try) 2>&5
16792   ac_status=$?
16793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16794   (exit $ac_status); }; }; then
16795   ac_header_compiler=yes
16796 else
16797   echo "$as_me: failed program was:" >&5
16798 sed 's/^/| /' conftest.$ac_ext >&5
16799
16800 ac_header_compiler=no
16801 fi
16802 rm -f conftest.$ac_objext conftest.$ac_ext
16803 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16804 echo "${ECHO_T}$ac_header_compiler" >&6
16805
16806 # Is the header present?
16807 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
16808 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
16809 cat >conftest.$ac_ext <<_ACEOF
16810 #line $LINENO "configure"
16811 /* confdefs.h.  */
16812 _ACEOF
16813 cat confdefs.h >>conftest.$ac_ext
16814 cat >>conftest.$ac_ext <<_ACEOF
16815 /* end confdefs.h.  */
16816 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
16817 _ACEOF
16818 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16819   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16820   ac_status=$?
16821   grep -v '^ *+' conftest.er1 >conftest.err
16822   rm -f conftest.er1
16823   cat conftest.err >&5
16824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16825   (exit $ac_status); } >/dev/null; then
16826   if test -s conftest.err; then
16827     ac_cpp_err=$ac_c_preproc_warn_flag
16828   else
16829     ac_cpp_err=
16830   fi
16831 else
16832   ac_cpp_err=yes
16833 fi
16834 if test -z "$ac_cpp_err"; then
16835   ac_header_preproc=yes
16836 else
16837   echo "$as_me: failed program was:" >&5
16838 sed 's/^/| /' conftest.$ac_ext >&5
16839
16840   ac_header_preproc=no
16841 fi
16842 rm -f conftest.err conftest.$ac_ext
16843 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16844 echo "${ECHO_T}$ac_header_preproc" >&6
16845
16846 # So?  What about this header?
16847 case $ac_header_compiler:$ac_header_preproc in
16848   yes:no )
16849     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16850 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16851     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16852 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
16853     (
16854       cat <<\_ASBOX
16855 ## ------------------------------------ ##
16856 ## Report this to bug-autoconf@gnu.org. ##
16857 ## ------------------------------------ ##
16858 _ASBOX
16859     ) |
16860       sed "s/^/$as_me: WARNING:     /" >&2
16861     ;;
16862   no:yes )
16863     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
16864 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
16865     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
16866 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
16867     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16868 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
16869     (
16870       cat <<\_ASBOX
16871 ## ------------------------------------ ##
16872 ## Report this to bug-autoconf@gnu.org. ##
16873 ## ------------------------------------ ##
16874 _ASBOX
16875     ) |
16876       sed "s/^/$as_me: WARNING:     /" >&2
16877     ;;
16878 esac
16879 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
16880 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16881 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16882   echo $ECHO_N "(cached) $ECHO_C" >&6
16883 else
16884   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
16885 fi
16886 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
16887 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
16888
16889 fi
16890 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
16891   have_gdk_pixbuf=yes
16892                            gdk_pixbuf_halfassed=no
16893 fi
16894
16895
16896   CPPFLAGS="$ac_save_CPPFLAGS"
16897       fi
16898     fi
16899   fi
16900
16901   CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
16902
16903   if test "$have_gdk_pixbuf" = yes; then
16904     # we have the headers, now check for the libraries
16905     have_gdk_pixbuf=no
16906     gdk_pixbuf_halfassed=yes
16907
16908     # library A...
16909
16910   ac_save_CPPFLAGS="$CPPFLAGS"
16911   ac_save_LDFLAGS="$LDFLAGS"
16912 #  ac_save_LIBS="$LIBS"
16913
16914   if test \! -z "$includedir" ; then
16915     CPPFLAGS="$CPPFLAGS -I$includedir"
16916   fi
16917   # note: $X_CFLAGS includes $x_includes
16918   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16919
16920   if test \! -z "$libdir" ; then
16921     LDFLAGS="$LDFLAGS -L$libdir"
16922   fi
16923   # note: $X_LIBS includes $x_libraries
16924   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16925
16926   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
16927 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
16928 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
16929   echo $ECHO_N "(cached) $ECHO_C" >&6
16930 else
16931   ac_check_lib_save_LIBS=$LIBS
16932 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
16933 cat >conftest.$ac_ext <<_ACEOF
16934 #line $LINENO "configure"
16935 /* confdefs.h.  */
16936 _ACEOF
16937 cat confdefs.h >>conftest.$ac_ext
16938 cat >>conftest.$ac_ext <<_ACEOF
16939 /* end confdefs.h.  */
16940
16941 /* Override any gcc2 internal prototype to avoid an error.  */
16942 #ifdef __cplusplus
16943 extern "C"
16944 #endif
16945 /* We use char because int might match the return type of a gcc2
16946    builtin and then its argument prototype would still apply.  */
16947 char gdk_pixbuf_new_from_file ();
16948 int
16949 main ()
16950 {
16951 gdk_pixbuf_new_from_file ();
16952   ;
16953   return 0;
16954 }
16955 _ACEOF
16956 rm -f conftest.$ac_objext conftest$ac_exeext
16957 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16958   (eval $ac_link) 2>&5
16959   ac_status=$?
16960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16961   (exit $ac_status); } &&
16962          { ac_try='test -s conftest$ac_exeext'
16963   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16964   (eval $ac_try) 2>&5
16965   ac_status=$?
16966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16967   (exit $ac_status); }; }; then
16968   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
16969 else
16970   echo "$as_me: failed program was:" >&5
16971 sed 's/^/| /' conftest.$ac_ext >&5
16972
16973 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
16974 fi
16975 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16976 LIBS=$ac_check_lib_save_LIBS
16977 fi
16978 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
16979 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
16980 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
16981   have_gdk_pixbuf=yes
16982 fi
16983
16984   CPPFLAGS="$ac_save_CPPFLAGS"
16985   LDFLAGS="$ac_save_LDFLAGS"
16986 #  LIBS="$ac_save_LIBS"
16987
16988     # library B...
16989     if test "$have_gdk_pixbuf" = yes; then
16990       have_gdk_pixbuf=no
16991
16992   ac_save_CPPFLAGS="$CPPFLAGS"
16993   ac_save_LDFLAGS="$LDFLAGS"
16994 #  ac_save_LIBS="$LIBS"
16995
16996   if test \! -z "$includedir" ; then
16997     CPPFLAGS="$CPPFLAGS -I$includedir"
16998   fi
16999   # note: $X_CFLAGS includes $x_includes
17000   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17001
17002   if test \! -z "$libdir" ; then
17003     LDFLAGS="$LDFLAGS -L$libdir"
17004   fi
17005   # note: $X_LIBS includes $x_libraries
17006   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17007
17008   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
17009 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
17010 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
17011   echo $ECHO_N "(cached) $ECHO_C" >&6
17012 else
17013   ac_check_lib_save_LIBS=$LIBS
17014 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17015 cat >conftest.$ac_ext <<_ACEOF
17016 #line $LINENO "configure"
17017 /* confdefs.h.  */
17018 _ACEOF
17019 cat confdefs.h >>conftest.$ac_ext
17020 cat >>conftest.$ac_ext <<_ACEOF
17021 /* end confdefs.h.  */
17022
17023 /* Override any gcc2 internal prototype to avoid an error.  */
17024 #ifdef __cplusplus
17025 extern "C"
17026 #endif
17027 /* We use char because int might match the return type of a gcc2
17028    builtin and then its argument prototype would still apply.  */
17029 char gdk_pixbuf_xlib_init ();
17030 int
17031 main ()
17032 {
17033 gdk_pixbuf_xlib_init ();
17034   ;
17035   return 0;
17036 }
17037 _ACEOF
17038 rm -f conftest.$ac_objext conftest$ac_exeext
17039 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17040   (eval $ac_link) 2>&5
17041   ac_status=$?
17042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17043   (exit $ac_status); } &&
17044          { ac_try='test -s conftest$ac_exeext'
17045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17046   (eval $ac_try) 2>&5
17047   ac_status=$?
17048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17049   (exit $ac_status); }; }; then
17050   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
17051 else
17052   echo "$as_me: failed program was:" >&5
17053 sed 's/^/| /' conftest.$ac_ext >&5
17054
17055 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
17056 fi
17057 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17058 LIBS=$ac_check_lib_save_LIBS
17059 fi
17060 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
17061 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
17062 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
17063   have_gdk_pixbuf=yes
17064                       gdk_pixbuf_halfassed=no
17065 fi
17066
17067   CPPFLAGS="$ac_save_CPPFLAGS"
17068   LDFLAGS="$ac_save_LDFLAGS"
17069 #  LIBS="$ac_save_LIBS"
17070
17071     fi
17072   fi
17073
17074   if test "$have_gdk_pixbuf" = yes; then
17075     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
17076     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
17077     cat >>confdefs.h <<\_ACEOF
17078 #define HAVE_GDK_PIXBUF 1
17079 _ACEOF
17080
17081   else
17082     have_gdk_pixbuf2=no
17083   fi
17084 fi
17085
17086
17087 ###############################################################################
17088 #
17089 #       Check for -ljpeg
17090 #
17091 ###############################################################################
17092
17093 have_jpeg=no
17094 with_jpeg_req=unspecified
17095 jpeg_halfassed=no
17096
17097 # Check whether --with-jpeg or --without-jpeg was given.
17098 if test "${with_jpeg+set}" = set; then
17099   withval="$with_jpeg"
17100   with_jpeg="$withval"; with_jpeg_req="$withval"
17101 else
17102   with_jpeg=yes
17103 fi;
17104
17105
17106    case "$with_jpeg" in
17107     yes) ;;
17108     no)  ;;
17109
17110     /*)
17111      echo "$as_me:$LINENO: checking for JPEG headers" >&5
17112 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
17113      d=$with_jpeg/include
17114      if test -d $d; then
17115        X_CFLAGS="-I$d $X_CFLAGS"
17116        echo "$as_me:$LINENO: result: $d" >&5
17117 echo "${ECHO_T}$d" >&6
17118      else
17119        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17120 echo "${ECHO_T}not found ($d: no such directory)" >&6
17121      fi
17122
17123      echo "$as_me:$LINENO: checking for JPEG libs" >&5
17124 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
17125      d=$with_jpeg/lib
17126      if test -d $d; then
17127        X_LIBS="-L$d $X_LIBS"
17128        echo "$as_me:$LINENO: result: $d" >&5
17129 echo "${ECHO_T}$d" >&6
17130      else
17131        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17132 echo "${ECHO_T}not found ($d: no such directory)" >&6
17133      fi
17134
17135      # replace the directory string with "yes".
17136      with_jpeg_req="yes"
17137      with_jpeg=$with_jpeg_req
17138      ;;
17139
17140     *)
17141      echo ""
17142      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
17143      echo "       If it is a directory, then \`DIR/include' will be added to"
17144      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17145      exit 1
17146      ;;
17147    esac
17148
17149
17150 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
17151   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
17152   exit 1
17153 fi
17154
17155 if test "$with_jpeg" = yes; then
17156
17157   have_jpeg=no
17158
17159   ac_save_CPPFLAGS="$CPPFLAGS"
17160   if test \! -z "$includedir" ; then
17161     CPPFLAGS="$CPPFLAGS -I$includedir"
17162   fi
17163   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17164   if test "${ac_cv_header_jpeglib_h+set}" = set; then
17165   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
17166 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
17167 if test "${ac_cv_header_jpeglib_h+set}" = set; then
17168   echo $ECHO_N "(cached) $ECHO_C" >&6
17169 fi
17170 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
17171 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
17172 else
17173   # Is the header compilable?
17174 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
17175 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
17176 cat >conftest.$ac_ext <<_ACEOF
17177 #line $LINENO "configure"
17178 /* confdefs.h.  */
17179 _ACEOF
17180 cat confdefs.h >>conftest.$ac_ext
17181 cat >>conftest.$ac_ext <<_ACEOF
17182 /* end confdefs.h.  */
17183 $ac_includes_default
17184 #include <jpeglib.h>
17185 _ACEOF
17186 rm -f conftest.$ac_objext
17187 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17188   (eval $ac_compile) 2>&5
17189   ac_status=$?
17190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17191   (exit $ac_status); } &&
17192          { ac_try='test -s conftest.$ac_objext'
17193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17194   (eval $ac_try) 2>&5
17195   ac_status=$?
17196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17197   (exit $ac_status); }; }; then
17198   ac_header_compiler=yes
17199 else
17200   echo "$as_me: failed program was:" >&5
17201 sed 's/^/| /' conftest.$ac_ext >&5
17202
17203 ac_header_compiler=no
17204 fi
17205 rm -f conftest.$ac_objext conftest.$ac_ext
17206 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17207 echo "${ECHO_T}$ac_header_compiler" >&6
17208
17209 # Is the header present?
17210 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
17211 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
17212 cat >conftest.$ac_ext <<_ACEOF
17213 #line $LINENO "configure"
17214 /* confdefs.h.  */
17215 _ACEOF
17216 cat confdefs.h >>conftest.$ac_ext
17217 cat >>conftest.$ac_ext <<_ACEOF
17218 /* end confdefs.h.  */
17219 #include <jpeglib.h>
17220 _ACEOF
17221 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17222   (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
17229   if test -s conftest.err; then
17230     ac_cpp_err=$ac_c_preproc_warn_flag
17231   else
17232     ac_cpp_err=
17233   fi
17234 else
17235   ac_cpp_err=yes
17236 fi
17237 if test -z "$ac_cpp_err"; then
17238   ac_header_preproc=yes
17239 else
17240   echo "$as_me: failed program was:" >&5
17241 sed 's/^/| /' conftest.$ac_ext >&5
17242
17243   ac_header_preproc=no
17244 fi
17245 rm -f conftest.err conftest.$ac_ext
17246 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17247 echo "${ECHO_T}$ac_header_preproc" >&6
17248
17249 # So?  What about this header?
17250 case $ac_header_compiler:$ac_header_preproc in
17251   yes:no )
17252     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17253 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17254     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
17255 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
17256     (
17257       cat <<\_ASBOX
17258 ## ------------------------------------ ##
17259 ## Report this to bug-autoconf@gnu.org. ##
17260 ## ------------------------------------ ##
17261 _ASBOX
17262     ) |
17263       sed "s/^/$as_me: WARNING:     /" >&2
17264     ;;
17265   no:yes )
17266     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
17267 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
17268     { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5
17269 echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;}
17270     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
17271 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
17272     (
17273       cat <<\_ASBOX
17274 ## ------------------------------------ ##
17275 ## Report this to bug-autoconf@gnu.org. ##
17276 ## ------------------------------------ ##
17277 _ASBOX
17278     ) |
17279       sed "s/^/$as_me: WARNING:     /" >&2
17280     ;;
17281 esac
17282 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
17283 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
17284 if test "${ac_cv_header_jpeglib_h+set}" = set; then
17285   echo $ECHO_N "(cached) $ECHO_C" >&6
17286 else
17287   ac_cv_header_jpeglib_h=$ac_header_preproc
17288 fi
17289 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
17290 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
17291
17292 fi
17293 if test $ac_cv_header_jpeglib_h = yes; then
17294   have_jpeg=yes
17295 fi
17296
17297
17298   CPPFLAGS="$ac_save_CPPFLAGS"
17299
17300   if test "$have_jpeg" = yes; then
17301     # we have the header, now check for the library
17302     have_jpeg=no
17303     jpeg_halfassed=yes
17304
17305   ac_save_CPPFLAGS="$CPPFLAGS"
17306   ac_save_LDFLAGS="$LDFLAGS"
17307 #  ac_save_LIBS="$LIBS"
17308
17309   if test \! -z "$includedir" ; then
17310     CPPFLAGS="$CPPFLAGS -I$includedir"
17311   fi
17312   # note: $X_CFLAGS includes $x_includes
17313   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17314
17315   if test \! -z "$libdir" ; then
17316     LDFLAGS="$LDFLAGS -L$libdir"
17317   fi
17318   # note: $X_LIBS includes $x_libraries
17319   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17320
17321   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
17322 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
17323 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
17324   echo $ECHO_N "(cached) $ECHO_C" >&6
17325 else
17326   ac_check_lib_save_LIBS=$LIBS
17327 LIBS="-ljpeg  $LIBS"
17328 cat >conftest.$ac_ext <<_ACEOF
17329 #line $LINENO "configure"
17330 /* confdefs.h.  */
17331 _ACEOF
17332 cat confdefs.h >>conftest.$ac_ext
17333 cat >>conftest.$ac_ext <<_ACEOF
17334 /* end confdefs.h.  */
17335
17336 /* Override any gcc2 internal prototype to avoid an error.  */
17337 #ifdef __cplusplus
17338 extern "C"
17339 #endif
17340 /* We use char because int might match the return type of a gcc2
17341    builtin and then its argument prototype would still apply.  */
17342 char jpeg_start_compress ();
17343 int
17344 main ()
17345 {
17346 jpeg_start_compress ();
17347   ;
17348   return 0;
17349 }
17350 _ACEOF
17351 rm -f conftest.$ac_objext conftest$ac_exeext
17352 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17353   (eval $ac_link) 2>&5
17354   ac_status=$?
17355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17356   (exit $ac_status); } &&
17357          { ac_try='test -s conftest$ac_exeext'
17358   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17359   (eval $ac_try) 2>&5
17360   ac_status=$?
17361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17362   (exit $ac_status); }; }; then
17363   ac_cv_lib_jpeg_jpeg_start_compress=yes
17364 else
17365   echo "$as_me: failed program was:" >&5
17366 sed 's/^/| /' conftest.$ac_ext >&5
17367
17368 ac_cv_lib_jpeg_jpeg_start_compress=no
17369 fi
17370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17371 LIBS=$ac_check_lib_save_LIBS
17372 fi
17373 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
17374 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
17375 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
17376   have_jpeg=yes
17377                     jpeg_halfassed=no
17378                     JPEG_LIBS="-ljpeg"
17379                     cat >>confdefs.h <<\_ACEOF
17380 #define HAVE_JPEGLIB 1
17381 _ACEOF
17382
17383 fi
17384
17385   CPPFLAGS="$ac_save_CPPFLAGS"
17386   LDFLAGS="$ac_save_LDFLAGS"
17387 #  LIBS="$ac_save_LIBS"
17388
17389   fi
17390 fi
17391
17392
17393 ###############################################################################
17394 #
17395 #       Check for the XSHM server extension.
17396 #
17397 ###############################################################################
17398
17399 have_xshm=no
17400 with_xshm_req=unspecified
17401
17402 # Check whether --with-xshm-ext or --without-xshm-ext was given.
17403 if test "${with_xshm_ext+set}" = set; then
17404   withval="$with_xshm_ext"
17405   with_xshm="$withval"; with_xshm_req="$withval"
17406 else
17407   with_xshm=yes
17408 fi;
17409
17410
17411    case "$with_xshm" in
17412     yes) ;;
17413     no)  ;;
17414
17415     /*)
17416      echo "$as_me:$LINENO: checking for XSHM headers" >&5
17417 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
17418      d=$with_xshm/include
17419      if test -d $d; then
17420        X_CFLAGS="-I$d $X_CFLAGS"
17421        echo "$as_me:$LINENO: result: $d" >&5
17422 echo "${ECHO_T}$d" >&6
17423      else
17424        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17425 echo "${ECHO_T}not found ($d: no such directory)" >&6
17426      fi
17427
17428      echo "$as_me:$LINENO: checking for XSHM libs" >&5
17429 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
17430      d=$with_xshm/lib
17431      if test -d $d; then
17432        X_LIBS="-L$d $X_LIBS"
17433        echo "$as_me:$LINENO: result: $d" >&5
17434 echo "${ECHO_T}$d" >&6
17435      else
17436        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17437 echo "${ECHO_T}not found ($d: no such directory)" >&6
17438      fi
17439
17440      # replace the directory string with "yes".
17441      with_xshm_req="yes"
17442      with_xshm=$with_xshm_req
17443      ;;
17444
17445     *)
17446      echo ""
17447      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
17448      echo "       If it is a directory, then \`DIR/include' will be added to"
17449      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17450      exit 1
17451      ;;
17452    esac
17453
17454
17455 if test "$with_xshm" = yes; then
17456
17457   # first check for Xshm.h.
17458
17459   ac_save_CPPFLAGS="$CPPFLAGS"
17460   if test \! -z "$includedir" ; then
17461     CPPFLAGS="$CPPFLAGS -I$includedir"
17462   fi
17463   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17464   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
17465 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
17466 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
17467   echo $ECHO_N "(cached) $ECHO_C" >&6
17468 else
17469   cat >conftest.$ac_ext <<_ACEOF
17470 #line $LINENO "configure"
17471 /* confdefs.h.  */
17472 _ACEOF
17473 cat confdefs.h >>conftest.$ac_ext
17474 cat >>conftest.$ac_ext <<_ACEOF
17475 /* end confdefs.h.  */
17476 #include <X11/Xlib.h>
17477
17478 #include <X11/extensions/XShm.h>
17479 _ACEOF
17480 rm -f conftest.$ac_objext
17481 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17482   (eval $ac_compile) 2>&5
17483   ac_status=$?
17484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17485   (exit $ac_status); } &&
17486          { ac_try='test -s conftest.$ac_objext'
17487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17488   (eval $ac_try) 2>&5
17489   ac_status=$?
17490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17491   (exit $ac_status); }; }; then
17492   ac_cv_header_X11_extensions_XShm_h=yes
17493 else
17494   echo "$as_me: failed program was:" >&5
17495 sed 's/^/| /' conftest.$ac_ext >&5
17496
17497 ac_cv_header_X11_extensions_XShm_h=no
17498 fi
17499 rm -f conftest.$ac_objext conftest.$ac_ext
17500 fi
17501 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
17502 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
17503 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
17504   have_xshm=yes
17505 fi
17506
17507
17508   CPPFLAGS="$ac_save_CPPFLAGS"
17509
17510   # if that succeeded, then check for sys/ipc.h.
17511   if test "$have_xshm" = yes; then
17512     have_xshm=no
17513
17514   ac_save_CPPFLAGS="$CPPFLAGS"
17515   if test \! -z "$includedir" ; then
17516     CPPFLAGS="$CPPFLAGS -I$includedir"
17517   fi
17518   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17519   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
17520   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
17521 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
17522 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
17523   echo $ECHO_N "(cached) $ECHO_C" >&6
17524 fi
17525 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
17526 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
17527 else
17528   # Is the header compilable?
17529 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
17530 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
17531 cat >conftest.$ac_ext <<_ACEOF
17532 #line $LINENO "configure"
17533 /* confdefs.h.  */
17534 _ACEOF
17535 cat confdefs.h >>conftest.$ac_ext
17536 cat >>conftest.$ac_ext <<_ACEOF
17537 /* end confdefs.h.  */
17538 $ac_includes_default
17539 #include <sys/ipc.h>
17540 _ACEOF
17541 rm -f conftest.$ac_objext
17542 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17543   (eval $ac_compile) 2>&5
17544   ac_status=$?
17545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17546   (exit $ac_status); } &&
17547          { ac_try='test -s conftest.$ac_objext'
17548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17549   (eval $ac_try) 2>&5
17550   ac_status=$?
17551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17552   (exit $ac_status); }; }; then
17553   ac_header_compiler=yes
17554 else
17555   echo "$as_me: failed program was:" >&5
17556 sed 's/^/| /' conftest.$ac_ext >&5
17557
17558 ac_header_compiler=no
17559 fi
17560 rm -f conftest.$ac_objext conftest.$ac_ext
17561 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17562 echo "${ECHO_T}$ac_header_compiler" >&6
17563
17564 # Is the header present?
17565 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
17566 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
17567 cat >conftest.$ac_ext <<_ACEOF
17568 #line $LINENO "configure"
17569 /* confdefs.h.  */
17570 _ACEOF
17571 cat confdefs.h >>conftest.$ac_ext
17572 cat >>conftest.$ac_ext <<_ACEOF
17573 /* end confdefs.h.  */
17574 #include <sys/ipc.h>
17575 _ACEOF
17576 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17577   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17578   ac_status=$?
17579   grep -v '^ *+' conftest.er1 >conftest.err
17580   rm -f conftest.er1
17581   cat conftest.err >&5
17582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17583   (exit $ac_status); } >/dev/null; then
17584   if test -s conftest.err; then
17585     ac_cpp_err=$ac_c_preproc_warn_flag
17586   else
17587     ac_cpp_err=
17588   fi
17589 else
17590   ac_cpp_err=yes
17591 fi
17592 if test -z "$ac_cpp_err"; then
17593   ac_header_preproc=yes
17594 else
17595   echo "$as_me: failed program was:" >&5
17596 sed 's/^/| /' conftest.$ac_ext >&5
17597
17598   ac_header_preproc=no
17599 fi
17600 rm -f conftest.err conftest.$ac_ext
17601 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17602 echo "${ECHO_T}$ac_header_preproc" >&6
17603
17604 # So?  What about this header?
17605 case $ac_header_compiler:$ac_header_preproc in
17606   yes:no )
17607     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
17608 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17609     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
17610 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
17611     (
17612       cat <<\_ASBOX
17613 ## ------------------------------------ ##
17614 ## Report this to bug-autoconf@gnu.org. ##
17615 ## ------------------------------------ ##
17616 _ASBOX
17617     ) |
17618       sed "s/^/$as_me: WARNING:     /" >&2
17619     ;;
17620   no:yes )
17621     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
17622 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
17623     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&5
17624 echo "$as_me: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&2;}
17625     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
17626 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
17627     (
17628       cat <<\_ASBOX
17629 ## ------------------------------------ ##
17630 ## Report this to bug-autoconf@gnu.org. ##
17631 ## ------------------------------------ ##
17632 _ASBOX
17633     ) |
17634       sed "s/^/$as_me: WARNING:     /" >&2
17635     ;;
17636 esac
17637 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
17638 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
17639 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
17640   echo $ECHO_N "(cached) $ECHO_C" >&6
17641 else
17642   ac_cv_header_sys_ipc_h=$ac_header_preproc
17643 fi
17644 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
17645 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
17646
17647 fi
17648 if test $ac_cv_header_sys_ipc_h = yes; then
17649   have_xshm=yes
17650 fi
17651
17652
17653   CPPFLAGS="$ac_save_CPPFLAGS"
17654   fi
17655
17656   # if that succeeded, then check for sys/shm.h.
17657   if test "$have_xshm" = yes; then
17658     have_xshm=no
17659
17660   ac_save_CPPFLAGS="$CPPFLAGS"
17661   if test \! -z "$includedir" ; then
17662     CPPFLAGS="$CPPFLAGS -I$includedir"
17663   fi
17664   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17665   if test "${ac_cv_header_sys_shm_h+set}" = set; then
17666   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
17667 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
17668 if test "${ac_cv_header_sys_shm_h+set}" = set; then
17669   echo $ECHO_N "(cached) $ECHO_C" >&6
17670 fi
17671 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
17672 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
17673 else
17674   # Is the header compilable?
17675 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
17676 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
17677 cat >conftest.$ac_ext <<_ACEOF
17678 #line $LINENO "configure"
17679 /* confdefs.h.  */
17680 _ACEOF
17681 cat confdefs.h >>conftest.$ac_ext
17682 cat >>conftest.$ac_ext <<_ACEOF
17683 /* end confdefs.h.  */
17684 $ac_includes_default
17685 #include <sys/shm.h>
17686 _ACEOF
17687 rm -f conftest.$ac_objext
17688 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17689   (eval $ac_compile) 2>&5
17690   ac_status=$?
17691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17692   (exit $ac_status); } &&
17693          { ac_try='test -s conftest.$ac_objext'
17694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17695   (eval $ac_try) 2>&5
17696   ac_status=$?
17697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17698   (exit $ac_status); }; }; then
17699   ac_header_compiler=yes
17700 else
17701   echo "$as_me: failed program was:" >&5
17702 sed 's/^/| /' conftest.$ac_ext >&5
17703
17704 ac_header_compiler=no
17705 fi
17706 rm -f conftest.$ac_objext conftest.$ac_ext
17707 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17708 echo "${ECHO_T}$ac_header_compiler" >&6
17709
17710 # Is the header present?
17711 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
17712 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
17713 cat >conftest.$ac_ext <<_ACEOF
17714 #line $LINENO "configure"
17715 /* confdefs.h.  */
17716 _ACEOF
17717 cat confdefs.h >>conftest.$ac_ext
17718 cat >>conftest.$ac_ext <<_ACEOF
17719 /* end confdefs.h.  */
17720 #include <sys/shm.h>
17721 _ACEOF
17722 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17723   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17724   ac_status=$?
17725   grep -v '^ *+' conftest.er1 >conftest.err
17726   rm -f conftest.er1
17727   cat conftest.err >&5
17728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17729   (exit $ac_status); } >/dev/null; then
17730   if test -s conftest.err; then
17731     ac_cpp_err=$ac_c_preproc_warn_flag
17732   else
17733     ac_cpp_err=
17734   fi
17735 else
17736   ac_cpp_err=yes
17737 fi
17738 if test -z "$ac_cpp_err"; then
17739   ac_header_preproc=yes
17740 else
17741   echo "$as_me: failed program was:" >&5
17742 sed 's/^/| /' conftest.$ac_ext >&5
17743
17744   ac_header_preproc=no
17745 fi
17746 rm -f conftest.err conftest.$ac_ext
17747 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17748 echo "${ECHO_T}$ac_header_preproc" >&6
17749
17750 # So?  What about this header?
17751 case $ac_header_compiler:$ac_header_preproc in
17752   yes:no )
17753     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
17754 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17755     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
17756 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
17757     (
17758       cat <<\_ASBOX
17759 ## ------------------------------------ ##
17760 ## Report this to bug-autoconf@gnu.org. ##
17761 ## ------------------------------------ ##
17762 _ASBOX
17763     ) |
17764       sed "s/^/$as_me: WARNING:     /" >&2
17765     ;;
17766   no:yes )
17767     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
17768 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
17769     { echo "$as_me:$LINENO: WARNING: sys/shm.h: check for missing prerequisite headers?" >&5
17770 echo "$as_me: WARNING: sys/shm.h: check for missing prerequisite headers?" >&2;}
17771     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
17772 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
17773     (
17774       cat <<\_ASBOX
17775 ## ------------------------------------ ##
17776 ## Report this to bug-autoconf@gnu.org. ##
17777 ## ------------------------------------ ##
17778 _ASBOX
17779     ) |
17780       sed "s/^/$as_me: WARNING:     /" >&2
17781     ;;
17782 esac
17783 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
17784 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
17785 if test "${ac_cv_header_sys_shm_h+set}" = set; then
17786   echo $ECHO_N "(cached) $ECHO_C" >&6
17787 else
17788   ac_cv_header_sys_shm_h=$ac_header_preproc
17789 fi
17790 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
17791 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
17792
17793 fi
17794 if test $ac_cv_header_sys_shm_h = yes; then
17795   have_xshm=yes
17796 fi
17797
17798
17799   CPPFLAGS="$ac_save_CPPFLAGS"
17800   fi
17801
17802   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
17803   # to exist, but the library code to not exist.  And even better, the library
17804   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
17805   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
17806   # that's not quite right, but close enough.)
17807   #
17808   case "$host" in
17809     *-aix*)
17810       if  `uname -v` -eq 3 ; then
17811         have_xshm=no
17812
17813   ac_save_CPPFLAGS="$CPPFLAGS"
17814   ac_save_LDFLAGS="$LDFLAGS"
17815 #  ac_save_LIBS="$LIBS"
17816
17817   if test \! -z "$includedir" ; then
17818     CPPFLAGS="$CPPFLAGS -I$includedir"
17819   fi
17820   # note: $X_CFLAGS includes $x_includes
17821   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17822
17823   if test \! -z "$libdir" ; then
17824     LDFLAGS="$LDFLAGS -L$libdir"
17825   fi
17826   # note: $X_LIBS includes $x_libraries
17827   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17828
17829   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
17830 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
17831 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
17832   echo $ECHO_N "(cached) $ECHO_C" >&6
17833 else
17834   ac_check_lib_save_LIBS=$LIBS
17835 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
17836 cat >conftest.$ac_ext <<_ACEOF
17837 #line $LINENO "configure"
17838 /* confdefs.h.  */
17839 _ACEOF
17840 cat confdefs.h >>conftest.$ac_ext
17841 cat >>conftest.$ac_ext <<_ACEOF
17842 /* end confdefs.h.  */
17843
17844 /* Override any gcc2 internal prototype to avoid an error.  */
17845 #ifdef __cplusplus
17846 extern "C"
17847 #endif
17848 /* We use char because int might match the return type of a gcc2
17849    builtin and then its argument prototype would still apply.  */
17850 char XShmQueryExtension ();
17851 int
17852 main ()
17853 {
17854 XShmQueryExtension ();
17855   ;
17856   return 0;
17857 }
17858 _ACEOF
17859 rm -f conftest.$ac_objext conftest$ac_exeext
17860 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17861   (eval $ac_link) 2>&5
17862   ac_status=$?
17863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17864   (exit $ac_status); } &&
17865          { ac_try='test -s conftest$ac_exeext'
17866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17867   (eval $ac_try) 2>&5
17868   ac_status=$?
17869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17870   (exit $ac_status); }; }; then
17871   ac_cv_lib_XextSam_XShmQueryExtension=yes
17872 else
17873   echo "$as_me: failed program was:" >&5
17874 sed 's/^/| /' conftest.$ac_ext >&5
17875
17876 ac_cv_lib_XextSam_XShmQueryExtension=no
17877 fi
17878 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17879 LIBS=$ac_check_lib_save_LIBS
17880 fi
17881 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
17882 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
17883 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
17884   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
17885 else
17886   true
17887 fi
17888
17889   CPPFLAGS="$ac_save_CPPFLAGS"
17890   LDFLAGS="$ac_save_LDFLAGS"
17891 #  LIBS="$ac_save_LIBS"
17892
17893       fi
17894     ;;
17895   esac
17896
17897   # if that succeeded, then we've really got it.
17898   if test "$have_xshm" = yes; then
17899     cat >>confdefs.h <<\_ACEOF
17900 #define HAVE_XSHM_EXTENSION 1
17901 _ACEOF
17902
17903   fi
17904
17905 elif test "$with_xshm" != no; then
17906   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
17907   exit 1
17908 fi
17909
17910
17911 ###############################################################################
17912 #
17913 #       Check for the DOUBLE-BUFFER server extension.
17914 #
17915 ###############################################################################
17916
17917 have_xdbe=no
17918 with_xdbe_req=unspecified
17919
17920 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
17921 if test "${with_xdbe_ext+set}" = set; then
17922   withval="$with_xdbe_ext"
17923   with_xdbe="$withval"; with_xdbe_req="$withval"
17924 else
17925   with_xdbe=yes
17926 fi;
17927
17928
17929    case "$with_xdbe" in
17930     yes) ;;
17931     no)  ;;
17932
17933     /*)
17934      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
17935 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
17936      d=$with_xdbe/include
17937      if test -d $d; then
17938        X_CFLAGS="-I$d $X_CFLAGS"
17939        echo "$as_me:$LINENO: result: $d" >&5
17940 echo "${ECHO_T}$d" >&6
17941      else
17942        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17943 echo "${ECHO_T}not found ($d: no such directory)" >&6
17944      fi
17945
17946      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
17947 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
17948      d=$with_xdbe/lib
17949      if test -d $d; then
17950        X_LIBS="-L$d $X_LIBS"
17951        echo "$as_me:$LINENO: result: $d" >&5
17952 echo "${ECHO_T}$d" >&6
17953      else
17954        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17955 echo "${ECHO_T}not found ($d: no such directory)" >&6
17956      fi
17957
17958      # replace the directory string with "yes".
17959      with_xdbe_req="yes"
17960      with_xdbe=$with_xdbe_req
17961      ;;
17962
17963     *)
17964      echo ""
17965      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
17966      echo "       If it is a directory, then \`DIR/include' will be added to"
17967      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17968      exit 1
17969      ;;
17970    esac
17971
17972
17973 if test "$with_xdbe" = yes; then
17974
17975
17976   ac_save_CPPFLAGS="$CPPFLAGS"
17977   if test \! -z "$includedir" ; then
17978     CPPFLAGS="$CPPFLAGS -I$includedir"
17979   fi
17980   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17981   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
17982 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
17983 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
17984   echo $ECHO_N "(cached) $ECHO_C" >&6
17985 else
17986   cat >conftest.$ac_ext <<_ACEOF
17987 #line $LINENO "configure"
17988 /* confdefs.h.  */
17989 _ACEOF
17990 cat confdefs.h >>conftest.$ac_ext
17991 cat >>conftest.$ac_ext <<_ACEOF
17992 /* end confdefs.h.  */
17993 #include <X11/Xlib.h>
17994
17995 #include <X11/extensions/Xdbe.h>
17996 _ACEOF
17997 rm -f conftest.$ac_objext
17998 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17999   (eval $ac_compile) 2>&5
18000   ac_status=$?
18001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18002   (exit $ac_status); } &&
18003          { ac_try='test -s conftest.$ac_objext'
18004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18005   (eval $ac_try) 2>&5
18006   ac_status=$?
18007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18008   (exit $ac_status); }; }; then
18009   ac_cv_header_X11_extensions_Xdbe_h=yes
18010 else
18011   echo "$as_me: failed program was:" >&5
18012 sed 's/^/| /' conftest.$ac_ext >&5
18013
18014 ac_cv_header_X11_extensions_Xdbe_h=no
18015 fi
18016 rm -f conftest.$ac_objext conftest.$ac_ext
18017 fi
18018 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
18019 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
18020 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
18021   have_xdbe=yes
18022 fi
18023
18024
18025   CPPFLAGS="$ac_save_CPPFLAGS"
18026   if test "$have_xdbe" = yes; then
18027     cat >>confdefs.h <<\_ACEOF
18028 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
18029 _ACEOF
18030
18031   fi
18032
18033 elif test "$with_xdbe" != no; then
18034   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
18035   exit 1
18036 fi
18037
18038
18039 ###############################################################################
18040 #
18041 #       Check for the SGI XReadDisplay server extension.
18042 #
18043 #       Note: this has to be down here, rather than up with the other server
18044 #       extension tests, so that the output of `configure --help' is in the
18045 #       right order.  Arrgh!
18046 #
18047 ###############################################################################
18048
18049 have_readdisplay=no
18050 with_readdisplay_req=unspecified
18051
18052 # Check whether --with-readdisplay or --without-readdisplay was given.
18053 if test "${with_readdisplay+set}" = set; then
18054   withval="$with_readdisplay"
18055   with_readdisplay="$withval"; with_readdisplay_req="$withval"
18056 else
18057   with_readdisplay=yes
18058 fi;
18059
18060
18061    case "$with_readdisplay" in
18062     yes) ;;
18063     no)  ;;
18064
18065     /*)
18066      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
18067 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
18068      d=$with_readdisplay/include
18069      if test -d $d; then
18070        X_CFLAGS="-I$d $X_CFLAGS"
18071        echo "$as_me:$LINENO: result: $d" >&5
18072 echo "${ECHO_T}$d" >&6
18073      else
18074        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18075 echo "${ECHO_T}not found ($d: no such directory)" >&6
18076      fi
18077
18078      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
18079 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
18080      d=$with_readdisplay/lib
18081      if test -d $d; then
18082        X_LIBS="-L$d $X_LIBS"
18083        echo "$as_me:$LINENO: result: $d" >&5
18084 echo "${ECHO_T}$d" >&6
18085      else
18086        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18087 echo "${ECHO_T}not found ($d: no such directory)" >&6
18088      fi
18089
18090      # replace the directory string with "yes".
18091      with_readdisplay_req="yes"
18092      with_readdisplay=$with_readdisplay_req
18093      ;;
18094
18095     *)
18096      echo ""
18097      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
18098      echo "       If it is a directory, then \`DIR/include' will be added to"
18099      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18100      exit 1
18101      ;;
18102    esac
18103
18104
18105 if test "$with_readdisplay" = yes; then
18106
18107   ac_save_CPPFLAGS="$CPPFLAGS"
18108   if test \! -z "$includedir" ; then
18109     CPPFLAGS="$CPPFLAGS -I$includedir"
18110   fi
18111   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18112   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
18113 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
18114 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
18115   echo $ECHO_N "(cached) $ECHO_C" >&6
18116 else
18117   cat >conftest.$ac_ext <<_ACEOF
18118 #line $LINENO "configure"
18119 /* confdefs.h.  */
18120 _ACEOF
18121 cat confdefs.h >>conftest.$ac_ext
18122 cat >>conftest.$ac_ext <<_ACEOF
18123 /* end confdefs.h.  */
18124 #include <X11/Xlib.h>
18125
18126 #include <X11/extensions/readdisplay.h>
18127 _ACEOF
18128 rm -f conftest.$ac_objext
18129 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18130   (eval $ac_compile) 2>&5
18131   ac_status=$?
18132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18133   (exit $ac_status); } &&
18134          { ac_try='test -s conftest.$ac_objext'
18135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18136   (eval $ac_try) 2>&5
18137   ac_status=$?
18138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18139   (exit $ac_status); }; }; then
18140   ac_cv_header_X11_extensions_readdisplay_h=yes
18141 else
18142   echo "$as_me: failed program was:" >&5
18143 sed 's/^/| /' conftest.$ac_ext >&5
18144
18145 ac_cv_header_X11_extensions_readdisplay_h=no
18146 fi
18147 rm -f conftest.$ac_objext conftest.$ac_ext
18148 fi
18149 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
18150 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
18151 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
18152   cat >>confdefs.h <<\_ACEOF
18153 #define HAVE_READ_DISPLAY_EXTENSION 1
18154 _ACEOF
18155
18156 fi
18157
18158
18159   CPPFLAGS="$ac_save_CPPFLAGS"
18160 elif test "$with_readdisplay" != no; then
18161   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
18162   exit 1
18163 fi
18164
18165
18166 ###############################################################################
18167 #
18168 #       Check for a program to generate random text.
18169 #
18170 #       Zippy is funnier than the idiocy generally spat out by `fortune',
18171 #       so first see if "fortune zippy" works.  Else, use plain "fortune".
18172 #
18173 #       We used to dig around in Emacs to look for the "yow" program, but
18174 #       most people who have Emacs also have "fortune zippy", so nevermind.
18175 #
18176 ###############################################################################
18177
18178 with_fortune_req=""
18179
18180 # Check whether --with-fortune or --without-fortune was given.
18181 if test "${with_fortune+set}" = set; then
18182   withval="$with_fortune"
18183   with_fortune_req="$withval"; with_fortune="$withval"
18184 else
18185   with_fortune=yes
18186 fi;
18187
18188 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
18189   with_fortune=""
18190   with_fortune_req=""
18191 fi
18192
18193 if test -n "$with_fortune_req" ; then
18194   ac_cv_fortune_program=""
18195   case "$with_fortune_req" in
18196     /*)
18197
18198       set dummy $with_fortune_req ; fortune_tmp=$2
18199       echo "$as_me:$LINENO: checking for $fortune_tmp" >&5
18200 echo $ECHO_N "checking for $fortune_tmp... $ECHO_C" >&6
18201       if test -x "$fortune_tmp" ; then
18202         echo "$as_me:$LINENO: result: yes" >&5
18203 echo "${ECHO_T}yes" >&6
18204       else
18205         echo "$as_me:$LINENO: result: no" >&5
18206 echo "${ECHO_T}no" >&6
18207         with_fortune=""
18208       fi
18209     ;;
18210     *)
18211       set dummy $with_fortune_req ; fortune_tmp=$2
18212       # don't cache
18213       unset ac_cv_path_fortune_tmp
18214       # Extract the first word of "$fortune_tmp", so it can be a program name with args.
18215 set dummy $fortune_tmp; ac_word=$2
18216 echo "$as_me:$LINENO: checking for $ac_word" >&5
18217 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18218 if test "${ac_cv_path_fortune_tmp+set}" = set; then
18219   echo $ECHO_N "(cached) $ECHO_C" >&6
18220 else
18221   case $fortune_tmp in
18222   [\\/]* | ?:[\\/]*)
18223   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
18224   ;;
18225   *)
18226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18227 for as_dir in $PATH
18228 do
18229   IFS=$as_save_IFS
18230   test -z "$as_dir" && as_dir=.
18231   for ac_exec_ext in '' $ac_executable_extensions; do
18232   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18233     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
18234     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18235     break 2
18236   fi
18237 done
18238 done
18239
18240   ;;
18241 esac
18242 fi
18243 fortune_tmp=$ac_cv_path_fortune_tmp
18244
18245 if test -n "$fortune_tmp"; then
18246   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
18247 echo "${ECHO_T}$fortune_tmp" >&6
18248 else
18249   echo "$as_me:$LINENO: result: no" >&5
18250 echo "${ECHO_T}no" >&6
18251 fi
18252
18253       if test -z "$fortune_tmp" ; then
18254         with_fortune=""
18255       fi
18256     ;;
18257   esac
18258   ac_cv_fortune_program="$with_fortune"
18259
18260 elif test -n "$ac_cv_fortune_program"; then
18261   echo "$as_me:$LINENO: result: checking for fortune... (cached) $ac_cv_fortune_program" >&5
18262 echo "${ECHO_T}checking for fortune... (cached) $ac_cv_fortune_program" >&6
18263 fi
18264
18265 unset ac_cv_path_fortune_tmp
18266 unset fortune_tmp
18267
18268 if test -z "$ac_cv_fortune_program" ; then
18269
18270   # first look for fortune in /usr/games/ (and use absolute path)
18271   for ac_prog in fortune
18272 do
18273   # Extract the first word of "$ac_prog", so it can be a program name with args.
18274 set dummy $ac_prog; ac_word=$2
18275 echo "$as_me:$LINENO: checking for $ac_word" >&5
18276 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18277 if test "${ac_cv_path_fortune_tmp+set}" = set; then
18278   echo $ECHO_N "(cached) $ECHO_C" >&6
18279 else
18280   case $fortune_tmp in
18281   [\\/]* | ?:[\\/]*)
18282   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
18283   ;;
18284   *)
18285   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18286 for as_dir in "/usr/games"
18287 do
18288   IFS=$as_save_IFS
18289   test -z "$as_dir" && as_dir=.
18290   for ac_exec_ext in '' $ac_executable_extensions; do
18291   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18292     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
18293     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18294     break 2
18295   fi
18296 done
18297 done
18298
18299   ;;
18300 esac
18301 fi
18302 fortune_tmp=$ac_cv_path_fortune_tmp
18303
18304 if test -n "$fortune_tmp"; then
18305   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
18306 echo "${ECHO_T}$fortune_tmp" >&6
18307 else
18308   echo "$as_me:$LINENO: result: no" >&5
18309 echo "${ECHO_T}no" >&6
18310 fi
18311
18312   test -n "$fortune_tmp" && break
18313 done
18314
18315
18316   # if it's not there, look on $PATH (and don't use absolute path)
18317   if test -z "$fortune_tmp" ; then
18318      for ac_prog in fortune
18319 do
18320   # Extract the first word of "$ac_prog", so it can be a program name with args.
18321 set dummy $ac_prog; ac_word=$2
18322 echo "$as_me:$LINENO: checking for $ac_word" >&5
18323 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18324 if test "${ac_cv_prog_fortune_tmp+set}" = set; then
18325   echo $ECHO_N "(cached) $ECHO_C" >&6
18326 else
18327   if test -n "$fortune_tmp"; then
18328   ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
18329 else
18330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18331 for as_dir in $PATH
18332 do
18333   IFS=$as_save_IFS
18334   test -z "$as_dir" && as_dir=.
18335   for ac_exec_ext in '' $ac_executable_extensions; do
18336   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18337     ac_cv_prog_fortune_tmp="$ac_prog"
18338     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18339     break 2
18340   fi
18341 done
18342 done
18343
18344 fi
18345 fi
18346 fortune_tmp=$ac_cv_prog_fortune_tmp
18347 if test -n "$fortune_tmp"; then
18348   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
18349 echo "${ECHO_T}$fortune_tmp" >&6
18350 else
18351   echo "$as_me:$LINENO: result: no" >&5
18352 echo "${ECHO_T}no" >&6
18353 fi
18354
18355   test -n "$fortune_tmp" && break
18356 done
18357
18358   fi
18359
18360   # if we didn't find anything, then just assume /usr/games/
18361   if test -z "$fortune_tmp" ; then
18362      fortune_tmp="/usr/games/fortune"
18363   fi
18364
18365   ac_cv_fortune_program="$fortune_tmp"
18366
18367   # now check to see whether "fortune zippy" works.
18368   #
18369   fortune_tmp="$fortune_tmp zippy"
18370   echo "$as_me:$LINENO: checking for zippy quotes" >&5
18371 echo $ECHO_N "checking for zippy quotes... $ECHO_C" >&6
18372   if ( $fortune_tmp >/dev/null 2>&1 ); then
18373     ac_cv_fortune_program="$fortune_tmp"
18374     echo "$as_me:$LINENO: result: $fortune_tmp" >&5
18375 echo "${ECHO_T}$fortune_tmp" >&6
18376   else
18377     echo "$as_me:$LINENO: result: no" >&5
18378 echo "${ECHO_T}no" >&6
18379   fi
18380
18381 fi
18382
18383 unset ac_cv_path_fortune_tmp
18384 unset fortune_tmp
18385
18386 cat >>confdefs.h <<_ACEOF
18387 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
18388 _ACEOF
18389
18390
18391
18392 ###############################################################################
18393 #
18394 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
18395 #       This should be safe, but let's give people the option.
18396 #
18397 ###############################################################################
18398
18399 setuid_hacks_default=no
18400 setuid_hacks="$setuid_hacks_default"
18401
18402 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
18403 if test "${with_setuid_hacks+set}" = set; then
18404   withval="$with_setuid_hacks"
18405   setuid_hacks="$withval"
18406 else
18407   setuid_hacks="$setuid_hacks_default"
18408 fi;
18409
18410
18411    case "$setuid_hacks" in
18412     yes) ;;
18413     no)  ;;
18414
18415     /*)
18416      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
18417 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
18418      d=$setuid_hacks/include
18419      if test -d $d; then
18420        X_CFLAGS="-I$d $X_CFLAGS"
18421        echo "$as_me:$LINENO: result: $d" >&5
18422 echo "${ECHO_T}$d" >&6
18423      else
18424        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18425 echo "${ECHO_T}not found ($d: no such directory)" >&6
18426      fi
18427
18428      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
18429 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
18430      d=$setuid_hacks/lib
18431      if test -d $d; then
18432        X_LIBS="-L$d $X_LIBS"
18433        echo "$as_me:$LINENO: result: $d" >&5
18434 echo "${ECHO_T}$d" >&6
18435      else
18436        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18437 echo "${ECHO_T}not found ($d: no such directory)" >&6
18438      fi
18439
18440      # replace the directory string with "yes".
18441      setuid_hacks_req="yes"
18442      setuid_hacks=$setuid_hacks_req
18443      ;;
18444
18445     *)
18446      echo ""
18447      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
18448      echo "       If it is a directory, then \`DIR/include' will be added to"
18449      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18450      exit 1
18451      ;;
18452    esac
18453
18454
18455 if test "$setuid_hacks" = yes; then
18456   true
18457 elif test "$setuid_hacks" != no; then
18458   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
18459   exit 1
18460 fi
18461
18462
18463 ###############################################################################
18464 #
18465 #       Done testing.  Now, set up the various -I and -L variables,
18466 #       and decide which GUI program to build by default.
18467 #
18468 ###############################################################################
18469
18470 DEPEND=makedepend
18471 DEPEND_FLAGS=
18472 DEPEND_DEFINES=
18473
18474
18475 if test \! -z "$includedir" ; then
18476   INCLUDES="$INCLUDES -I$includedir"
18477 fi
18478
18479 if test \! -z "$libdir" ; then
18480   LDFLAGS="$LDFLAGS -L$libdir"
18481 fi
18482
18483
18484 PREFERRED_DEMO_PROGRAM=''
18485 ALL_DEMO_PROGRAMS=
18486 if test "$have_motif" = yes; then
18487   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
18488   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
18489 fi
18490 if test "$have_gtk" = yes; then
18491   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
18492   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
18493 fi
18494
18495
18496 if test "$have_kerberos" = yes; then
18497   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
18498   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
18499 fi
18500 if test "$have_pam" = yes; then
18501   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
18502   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
18503   INSTALL_PAM="install-pam"
18504 fi
18505   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
18506   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
18507
18508
18509 if test "$enable_locking" = yes; then
18510   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
18511   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
18512 else
18513   LOCK_SRCS='$(NOLOCK_SRCS_1)'
18514   LOCK_OBJS='$(NOLOCK_OBJS_1)'
18515 fi
18516
18517 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
18518
18519 if test "$need_setuid" = yes; then
18520   NEED_SETUID=yes
18521 else
18522   NEED_SETUID=no
18523 fi
18524
18525 if test "$setuid_hacks" = yes; then
18526   SETUID_HACKS=yes
18527 else
18528   SETUID_HACKS=no
18529 fi
18530
18531 tab='   '
18532 if test "$have_gl" = yes; then
18533   GL_EXES='$(GL_EXES)'
18534   GL_UTIL_EXES='$(GL_UTIL_EXES)'
18535   GL_MEN='$(GL_MEN)'
18536   GL_KLUDGE="${tab}  "
18537 else
18538   GL_KLUDGE="-${tab}  "
18539 fi
18540
18541 if test "$have_gle" = yes; then
18542   GLE_EXES='$(GLE_EXES)'
18543   GLE_KLUDGE="${tab}   "
18544 else
18545   GLE_KLUDGE="-${tab}   "
18546 fi
18547
18548 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
18549  JPEG_EXES='$(JPEG_EXES)'
18550 fi
18551
18552
18553 # Another substitution in the XScreenSaver.ad.in file:
18554 #
18555 if test "$have_gnome_help" = yes; then
18556   GNOMEHELP_Y=''
18557   GNOMEHELP_N='!    '
18558 else
18559   GNOMEHELP_Y='!    '
18560   GNOMEHELP_N=''
18561 fi
18562
18563
18564 # Now that we know whether we have Gnome, we can decide where the XML
18565 # config files get installed.
18566 #
18567 if test -z "$HACK_CONF_DIR" ; then
18568   if test -n "$GNOME_DATADIR" ; then
18569     HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
18570   else
18571     HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
18572   fi
18573 fi
18574
18575
18576
18577 # After computing $HACK_CONF_DIR, make sure $GLADE_DATADIR has a value
18578 # so that we know where to install the Gtk pixmaps.
18579 #
18580 # It should usually be "/usr/share/pixmaps/", but we can't just use
18581 # "$(prefix)/share/pixmaps" because that would usually result in
18582 # "/usr/X11R6/share/pixmaps/", which is wrong.  It needs to be the
18583 # Gnome/Gtk prefix, not the overall prefix.
18584 #
18585 if test -n "$GNOME_DATADIR" ; then
18586   GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver'
18587 elif test "$have_gtk" = yes; then
18588   if test -n "$pkg_config"; then
18589     if test "$have_gtk2" = yes; then
18590       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
18591     else
18592       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+`
18593     fi
18594   else
18595     GLADE_DATADIR=`$gtk_config --prefix`
18596   fi
18597   GLADE_DATADIR="$GLADE_DATADIR/share/xscreensaver"
18598 else
18599   GLADE_DATADIR=''
18600 fi
18601
18602
18603 # Set PO_DATADIR to something sensible.
18604 #
18605 echo "$as_me:$LINENO: checking for locale directory" >&5
18606 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
18607 if test -n "$GNOME_DATADIR" ; then
18608   PO_DATADIR="$GNOME_DATADIR"
18609 elif test "$have_gtk" = yes; then
18610   if test -n "$pkg_config"; then
18611     if test "$have_gtk2" = yes; then
18612       PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
18613     else
18614       PO_DATADIR=`$pkg_config --variable=prefix gtk+`
18615     fi
18616   else
18617     PO_DATADIR=`$gtk_config --prefix`
18618   fi
18619   PO_DATADIR="$PO_DATADIR/share"
18620 fi
18621
18622 if test -z "$PO_DATADIR" ; then
18623   #
18624   # #### Total fucking kludge --
18625   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
18626   # but of course we need to expand all the nested variables to do that...
18627   #
18628   dd=$datadir
18629   eval dd=${dd}
18630   eval dd=${dd}
18631   eval dd=${dd}
18632   eval dd=${dd}
18633   eval dd=${dd}
18634   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
18635 fi
18636
18637 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
18638 echo "${ECHO_T}$PO_DATADIR/locale" >&6
18639
18640
18641 # canonicalize slashes.
18642 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
18643
18644 # gcc 3.0 likes to issue this warning for every file:
18645 #
18646 # cc1: warning: changing search order for system directory "/usr/local/include"
18647 # cc1: warning:   as it has already been specified as a non-system directory
18648 #
18649 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
18650 # Which *should* be totally redundant, and thus an ok thing to delete?
18651 #
18652 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
18653
18654
18655 ###############################################################################
18656 #
18657 #       Perform substitutions and write Makefiles.
18658 #
18659 ###############################################################################
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709 APPDEFAULTS=$ac_x_app_defaults
18710
18711
18712
18713
18714
18715
18716
18717                                                                                 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"
18718 cat >confcache <<\_ACEOF
18719 # This file is a shell script that caches the results of configure
18720 # tests run on this system so they can be shared between configure
18721 # scripts and configure runs, see configure's option --config-cache.
18722 # It is not useful on other systems.  If it contains results you don't
18723 # want to keep, you may remove or edit it.
18724 #
18725 # config.status only pays attention to the cache file if you give it
18726 # the --recheck option to rerun configure.
18727 #
18728 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18729 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18730 # following values.
18731
18732 _ACEOF
18733
18734 # The following way of writing the cache mishandles newlines in values,
18735 # but we know of no workaround that is simple, portable, and efficient.
18736 # So, don't put newlines in cache variables' values.
18737 # Ultrix sh set writes to stderr and can't be redirected directly,
18738 # and sets the high bit in the cache file unless we assign to the vars.
18739 {
18740   (set) 2>&1 |
18741     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18742     *ac_space=\ *)
18743       # `set' does not quote correctly, so add quotes (double-quote
18744       # substitution turns \\\\ into \\, and sed turns \\ into \).
18745       sed -n \
18746         "s/'/'\\\\''/g;
18747           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18748       ;;
18749     *)
18750       # `set' quotes correctly as required by POSIX, so do not add quotes.
18751       sed -n \
18752         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18753       ;;
18754     esac;
18755 } |
18756   sed '
18757      t clear
18758      : clear
18759      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18760      t end
18761      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18762      : end' >>confcache
18763 if diff $cache_file confcache >/dev/null 2>&1; then :; else
18764   if test -w $cache_file; then
18765     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18766     cat confcache >$cache_file
18767   else
18768     echo "not updating unwritable cache $cache_file"
18769   fi
18770 fi
18771 rm -f confcache
18772
18773 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18774 # Let make expand exec_prefix.
18775 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18776
18777 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18778 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18779 # trailing colons and then remove the whole line if VPATH becomes empty
18780 # (actually we leave an empty line to preserve line numbers).
18781 if test "x$srcdir" = x.; then
18782   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18783 s/:*\$(srcdir):*/:/;
18784 s/:*\${srcdir}:*/:/;
18785 s/:*@srcdir@:*/:/;
18786 s/^\([^=]*=[    ]*\):*/\1/;
18787 s/:*$//;
18788 s/^[^=]*=[      ]*$//;
18789 }'
18790 fi
18791
18792 DEFS=-DHAVE_CONFIG_H
18793
18794 ac_libobjs=
18795 ac_ltlibobjs=
18796 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18797   # 1. Remove the extension, and $U if already installed.
18798   ac_i=`echo "$ac_i" |
18799          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18800   # 2. Add them.
18801   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18802   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18803 done
18804 LIBOBJS=$ac_libobjs
18805
18806 LTLIBOBJS=$ac_ltlibobjs
18807
18808
18809
18810
18811         mv -f po/POTFILES po/POTFILES.tmp
18812         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
18813         rm -f po/POTFILES.tmp
18814
18815
18816
18817 : ${CONFIG_STATUS=./config.status}
18818 ac_clean_files_save=$ac_clean_files
18819 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18820 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18821 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18822 cat >$CONFIG_STATUS <<_ACEOF
18823 #! $SHELL
18824 # Generated by $as_me.
18825 # Run this file to recreate the current configuration.
18826 # Compiler output produced by configure, useful for debugging
18827 # configure, is in config.log if it exists.
18828
18829 debug=false
18830 ac_cs_recheck=false
18831 ac_cs_silent=false
18832 SHELL=\${CONFIG_SHELL-$SHELL}
18833 _ACEOF
18834
18835 cat >>$CONFIG_STATUS <<\_ACEOF
18836 ## --------------------- ##
18837 ## M4sh Initialization.  ##
18838 ## --------------------- ##
18839
18840 # Be Bourne compatible
18841 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18842   emulate sh
18843   NULLCMD=:
18844   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18845   # is contrary to our usage.  Disable this feature.
18846   alias -g '${1+"$@"}'='"$@"'
18847 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18848   set -o posix
18849 fi
18850
18851 # Support unset when possible.
18852 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18853   as_unset=unset
18854 else
18855   as_unset=false
18856 fi
18857
18858
18859 # Work around bugs in pre-3.0 UWIN ksh.
18860 $as_unset ENV MAIL MAILPATH
18861 PS1='$ '
18862 PS2='> '
18863 PS4='+ '
18864
18865 # NLS nuisances.
18866 for as_var in \
18867   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18868   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18869   LC_TELEPHONE LC_TIME
18870 do
18871   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18872     eval $as_var=C; export $as_var
18873   else
18874     $as_unset $as_var
18875   fi
18876 done
18877
18878 # Required to use basename.
18879 if expr a : '\(a\)' >/dev/null 2>&1; then
18880   as_expr=expr
18881 else
18882   as_expr=false
18883 fi
18884
18885 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18886   as_basename=basename
18887 else
18888   as_basename=false
18889 fi
18890
18891
18892 # Name of the executable.
18893 as_me=`$as_basename "$0" ||
18894 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18895          X"$0" : 'X\(//\)$' \| \
18896          X"$0" : 'X\(/\)$' \| \
18897          .     : '\(.\)' 2>/dev/null ||
18898 echo X/"$0" |
18899     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18900           /^X\/\(\/\/\)$/{ s//\1/; q; }
18901           /^X\/\(\/\).*/{ s//\1/; q; }
18902           s/.*/./; q'`
18903
18904
18905 # PATH needs CR, and LINENO needs CR and PATH.
18906 # Avoid depending upon Character Ranges.
18907 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18908 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18909 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18910 as_cr_digits='0123456789'
18911 as_cr_alnum=$as_cr_Letters$as_cr_digits
18912
18913 # The user is always right.
18914 if test "${PATH_SEPARATOR+set}" != set; then
18915   echo "#! /bin/sh" >conf$$.sh
18916   echo  "exit 0"   >>conf$$.sh
18917   chmod +x conf$$.sh
18918   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
18919     PATH_SEPARATOR=';'
18920   else
18921     PATH_SEPARATOR=:
18922   fi
18923   rm -f conf$$.sh
18924 fi
18925
18926
18927   as_lineno_1=$LINENO
18928   as_lineno_2=$LINENO
18929   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18930   test "x$as_lineno_1" != "x$as_lineno_2" &&
18931   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
18932   # Find who we are.  Look in the path if we contain no path at all
18933   # relative or not.
18934   case $0 in
18935     *[\\/]* ) as_myself=$0 ;;
18936     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18937 for as_dir in $PATH
18938 do
18939   IFS=$as_save_IFS
18940   test -z "$as_dir" && as_dir=.
18941   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18942 done
18943
18944        ;;
18945   esac
18946   # We did not find ourselves, most probably we were run as `sh COMMAND'
18947   # in which case we are not to be found in the path.
18948   if test "x$as_myself" = x; then
18949     as_myself=$0
18950   fi
18951   if test ! -f "$as_myself"; then
18952     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18953 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18954    { (exit 1); exit 1; }; }
18955   fi
18956   case $CONFIG_SHELL in
18957   '')
18958     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18959 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18960 do
18961   IFS=$as_save_IFS
18962   test -z "$as_dir" && as_dir=.
18963   for as_base in sh bash ksh sh5; do
18964          case $as_dir in
18965          /*)
18966            if ("$as_dir/$as_base" -c '
18967   as_lineno_1=$LINENO
18968   as_lineno_2=$LINENO
18969   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18970   test "x$as_lineno_1" != "x$as_lineno_2" &&
18971   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
18972              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18973              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
18974              CONFIG_SHELL=$as_dir/$as_base
18975              export CONFIG_SHELL
18976              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18977            fi;;
18978          esac
18979        done
18980 done
18981 ;;
18982   esac
18983
18984   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18985   # uniformly replaced by the line number.  The first 'sed' inserts a
18986   # line-number line before each line; the second 'sed' does the real
18987   # work.  The second script uses 'N' to pair each line-number line
18988   # with the numbered line, and appends trailing '-' during
18989   # substitution so that $LINENO is not a special case at line end.
18990   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18991   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
18992   sed '=' <$as_myself |
18993     sed '
18994       N
18995       s,$,-,
18996       : loop
18997       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18998       t loop
18999       s,-$,,
19000       s,^['$as_cr_digits']*\n,,
19001     ' >$as_me.lineno &&
19002   chmod +x $as_me.lineno ||
19003     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
19004 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
19005    { (exit 1); exit 1; }; }
19006
19007   # Don't try to exec as it changes $[0], causing all sort of problems
19008   # (the dirname of $[0] is not the place where we might find the
19009   # original and so on.  Autoconf is especially sensible to this).
19010   . ./$as_me.lineno
19011   # Exit status is that of the last command.
19012   exit
19013 }
19014
19015
19016 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
19017   *c*,-n*) ECHO_N= ECHO_C='
19018 ' ECHO_T='      ' ;;
19019   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
19020   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
19021 esac
19022
19023 if expr a : '\(a\)' >/dev/null 2>&1; then
19024   as_expr=expr
19025 else
19026   as_expr=false
19027 fi
19028
19029 rm -f conf$$ conf$$.exe conf$$.file
19030 echo >conf$$.file
19031 if ln -s conf$$.file conf$$ 2>/dev/null; then
19032   # We could just check for DJGPP; but this test a) works b) is more generic
19033   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19034   if test -f conf$$.exe; then
19035     # Don't use ln at all; we don't have any links
19036     as_ln_s='cp -p'
19037   else
19038     as_ln_s='ln -s'
19039   fi
19040 elif ln conf$$.file conf$$ 2>/dev/null; then
19041   as_ln_s=ln
19042 else
19043   as_ln_s='cp -p'
19044 fi
19045 rm -f conf$$ conf$$.exe conf$$.file
19046
19047 if mkdir -p . 2>/dev/null; then
19048   as_mkdir_p=:
19049 else
19050   as_mkdir_p=false
19051 fi
19052
19053 as_executable_p="test -f"
19054
19055 # Sed expression to map a string onto a valid CPP name.
19056 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
19057
19058 # Sed expression to map a string onto a valid variable name.
19059 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19060
19061
19062 # IFS
19063 # We need space, tab and new line, in precisely that order.
19064 as_nl='
19065 '
19066 IFS="   $as_nl"
19067
19068 # CDPATH.
19069 $as_unset CDPATH
19070
19071 exec 6>&1
19072
19073 # Open the log real soon, to keep \$[0] and so on meaningful, and to
19074 # report actual input values of CONFIG_FILES etc. instead of their
19075 # values after options handling.  Logging --version etc. is OK.
19076 exec 5>>config.log
19077 {
19078   echo
19079   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19080 ## Running $as_me. ##
19081 _ASBOX
19082 } >&5
19083 cat >&5 <<_CSEOF
19084
19085 This file was extended by $as_me, which was
19086 generated by GNU Autoconf 2.57.  Invocation command line was
19087
19088   CONFIG_FILES    = $CONFIG_FILES
19089   CONFIG_HEADERS  = $CONFIG_HEADERS
19090   CONFIG_LINKS    = $CONFIG_LINKS
19091   CONFIG_COMMANDS = $CONFIG_COMMANDS
19092   $ $0 $@
19093
19094 _CSEOF
19095 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19096 echo >&5
19097 _ACEOF
19098
19099 # Files that config.status was made for.
19100 if test -n "$ac_config_files"; then
19101   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19102 fi
19103
19104 if test -n "$ac_config_headers"; then
19105   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19106 fi
19107
19108 if test -n "$ac_config_links"; then
19109   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19110 fi
19111
19112 if test -n "$ac_config_commands"; then
19113   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19114 fi
19115
19116 cat >>$CONFIG_STATUS <<\_ACEOF
19117
19118 ac_cs_usage="\
19119 \`$as_me' instantiates files from templates according to the
19120 current configuration.
19121
19122 Usage: $0 [OPTIONS] [FILE]...
19123
19124   -h, --help       print this help, then exit
19125   -V, --version    print version number, then exit
19126   -q, --quiet      do not print progress messages
19127   -d, --debug      don't remove temporary files
19128       --recheck    update $as_me by reconfiguring in the same conditions
19129   --file=FILE[:TEMPLATE]
19130                    instantiate the configuration file FILE
19131   --header=FILE[:TEMPLATE]
19132                    instantiate the configuration header FILE
19133
19134 Configuration files:
19135 $config_files
19136
19137 Configuration headers:
19138 $config_headers
19139
19140 Configuration commands:
19141 $config_commands
19142
19143 Report bugs to <bug-autoconf@gnu.org>."
19144 _ACEOF
19145
19146 cat >>$CONFIG_STATUS <<_ACEOF
19147 ac_cs_version="\\
19148 config.status
19149 configured by $0, generated by GNU Autoconf 2.57,
19150   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19151
19152 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19153 Free Software Foundation, Inc.
19154 This config.status script is free software; the Free Software Foundation
19155 gives unlimited permission to copy, distribute and modify it."
19156 srcdir=$srcdir
19157 INSTALL="$INSTALL"
19158 _ACEOF
19159
19160 cat >>$CONFIG_STATUS <<\_ACEOF
19161 # If no file are specified by the user, then we need to provide default
19162 # value.  By we need to know if files were specified by the user.
19163 ac_need_defaults=:
19164 while test $# != 0
19165 do
19166   case $1 in
19167   --*=*)
19168     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19169     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19170     ac_shift=:
19171     ;;
19172   -*)
19173     ac_option=$1
19174     ac_optarg=$2
19175     ac_shift=shift
19176     ;;
19177   *) # This is not an option, so the user has probably given explicit
19178      # arguments.
19179      ac_option=$1
19180      ac_need_defaults=false;;
19181   esac
19182
19183   case $ac_option in
19184   # Handling of the options.
19185 _ACEOF
19186 cat >>$CONFIG_STATUS <<\_ACEOF
19187   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19188     ac_cs_recheck=: ;;
19189   --version | --vers* | -V )
19190     echo "$ac_cs_version"; exit 0 ;;
19191   --he | --h)
19192     # Conflict between --help and --header
19193     { { echo "$as_me:$LINENO: error: ambiguous option: $1
19194 Try \`$0 --help' for more information." >&5
19195 echo "$as_me: error: ambiguous option: $1
19196 Try \`$0 --help' for more information." >&2;}
19197    { (exit 1); exit 1; }; };;
19198   --help | --hel | -h )
19199     echo "$ac_cs_usage"; exit 0 ;;
19200   --debug | --d* | -d )
19201     debug=: ;;
19202   --file | --fil | --fi | --f )
19203     $ac_shift
19204     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
19205     ac_need_defaults=false;;
19206   --header | --heade | --head | --hea )
19207     $ac_shift
19208     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
19209     ac_need_defaults=false;;
19210   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19211   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19212     ac_cs_silent=: ;;
19213
19214   # This is an error.
19215   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
19216 Try \`$0 --help' for more information." >&5
19217 echo "$as_me: error: unrecognized option: $1
19218 Try \`$0 --help' for more information." >&2;}
19219    { (exit 1); exit 1; }; } ;;
19220
19221   *) ac_config_targets="$ac_config_targets $1" ;;
19222
19223   esac
19224   shift
19225 done
19226
19227 ac_configure_extra_args=
19228
19229 if $ac_cs_silent; then
19230   exec 6>/dev/null
19231   ac_configure_extra_args="$ac_configure_extra_args --silent"
19232 fi
19233
19234 _ACEOF
19235 cat >>$CONFIG_STATUS <<_ACEOF
19236 if \$ac_cs_recheck; then
19237   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19238   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19239 fi
19240
19241 _ACEOF
19242
19243 cat >>$CONFIG_STATUS <<_ACEOF
19244 #
19245 # INIT-COMMANDS section.
19246 #
19247
19248 INTLTOOL_PERL=${INTLTOOL_PERL}
19249
19250
19251 _ACEOF
19252
19253
19254
19255 cat >>$CONFIG_STATUS <<\_ACEOF
19256 for ac_config_target in $ac_config_targets
19257 do
19258   case "$ac_config_target" in
19259   # Handling of arguments.
19260   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19261   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
19262   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
19263   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
19264   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
19265   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
19266   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
19267   "driver/xscreensaver.kss" ) CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.kss" ;;
19268   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
19269   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
19270   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
19271   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19272 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19273    { (exit 1); exit 1; }; };;
19274   esac
19275 done
19276
19277 # If the user did not use the arguments to specify the items to instantiate,
19278 # then the envvar interface is used.  Set only those that are not.
19279 # We use the long form for the default assignment because of an extremely
19280 # bizarre bug on SunOS 4.1.3.
19281 if $ac_need_defaults; then
19282   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19283   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19284   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19285 fi
19286
19287 # Have a temporary directory for convenience.  Make it in the build tree
19288 # simply because there is no reason to put it here, and in addition,
19289 # creating and moving files from /tmp can sometimes cause problems.
19290 # Create a temporary directory, and hook for its removal unless debugging.
19291 $debug ||
19292 {
19293   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19294   trap '{ (exit 1); exit 1; }' 1 2 13 15
19295 }
19296
19297 # Create a (secure) tmp directory for tmp files.
19298
19299 {
19300   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
19301   test -n "$tmp" && test -d "$tmp"
19302 }  ||
19303 {
19304   tmp=./confstat$$-$RANDOM
19305   (umask 077 && mkdir $tmp)
19306 } ||
19307 {
19308    echo "$me: cannot create a temporary directory in ." >&2
19309    { (exit 1); exit 1; }
19310 }
19311
19312 _ACEOF
19313
19314 cat >>$CONFIG_STATUS <<_ACEOF
19315
19316 #
19317 # CONFIG_FILES section.
19318 #
19319
19320 # No need to generate the scripts if there are no CONFIG_FILES.
19321 # This happens for instance when ./config.status config.h
19322 if test -n "\$CONFIG_FILES"; then
19323   # Protect against being on the right side of a sed subst in config.status.
19324   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19325    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19326 s,@SHELL@,$SHELL,;t t
19327 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19328 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19329 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19330 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19331 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19332 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19333 s,@exec_prefix@,$exec_prefix,;t t
19334 s,@prefix@,$prefix,;t t
19335 s,@program_transform_name@,$program_transform_name,;t t
19336 s,@bindir@,$bindir,;t t
19337 s,@sbindir@,$sbindir,;t t
19338 s,@libexecdir@,$libexecdir,;t t
19339 s,@datadir@,$datadir,;t t
19340 s,@sysconfdir@,$sysconfdir,;t t
19341 s,@sharedstatedir@,$sharedstatedir,;t t
19342 s,@localstatedir@,$localstatedir,;t t
19343 s,@libdir@,$libdir,;t t
19344 s,@includedir@,$includedir,;t t
19345 s,@oldincludedir@,$oldincludedir,;t t
19346 s,@infodir@,$infodir,;t t
19347 s,@mandir@,$mandir,;t t
19348 s,@build_alias@,$build_alias,;t t
19349 s,@host_alias@,$host_alias,;t t
19350 s,@target_alias@,$target_alias,;t t
19351 s,@DEFS@,$DEFS,;t t
19352 s,@ECHO_C@,$ECHO_C,;t t
19353 s,@ECHO_N@,$ECHO_N,;t t
19354 s,@ECHO_T@,$ECHO_T,;t t
19355 s,@LIBS@,$LIBS,;t t
19356 s,@build@,$build,;t t
19357 s,@build_cpu@,$build_cpu,;t t
19358 s,@build_vendor@,$build_vendor,;t t
19359 s,@build_os@,$build_os,;t t
19360 s,@host@,$host,;t t
19361 s,@host_cpu@,$host_cpu,;t t
19362 s,@host_vendor@,$host_vendor,;t t
19363 s,@host_os@,$host_os,;t t
19364 s,@CC@,$CC,;t t
19365 s,@CFLAGS@,$CFLAGS,;t t
19366 s,@LDFLAGS@,$LDFLAGS,;t t
19367 s,@CPPFLAGS@,$CPPFLAGS,;t t
19368 s,@ac_ct_CC@,$ac_ct_CC,;t t
19369 s,@EXEEXT@,$EXEEXT,;t t
19370 s,@OBJEXT@,$OBJEXT,;t t
19371 s,@CPP@,$CPP,;t t
19372 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19373 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19374 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19375 s,@SET_MAKE@,$SET_MAKE,;t t
19376 s,@EGREP@,$EGREP,;t t
19377 s,@PERL@,$PERL,;t t
19378 s,@X_CFLAGS@,$X_CFLAGS,;t t
19379 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
19380 s,@X_LIBS@,$X_LIBS,;t t
19381 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
19382 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
19383 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
19384 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
19385 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
19386 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
19387 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
19388 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
19389 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
19390 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
19391 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
19392 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
19393 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
19394 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
19395 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
19396 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
19397 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
19398 s,@RANLIB@,$RANLIB,;t t
19399 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19400 s,@ALLOCA@,$ALLOCA,;t t
19401 s,@USE_NLS@,$USE_NLS,;t t
19402 s,@MSGFMT@,$MSGFMT,;t t
19403 s,@GMSGFMT@,$GMSGFMT,;t t
19404 s,@XGETTEXT@,$XGETTEXT,;t t
19405 s,@CATALOGS@,$CATALOGS,;t t
19406 s,@CATOBJEXT@,$CATOBJEXT,;t t
19407 s,@DATADIRNAME@,$DATADIRNAME,;t t
19408 s,@GMOFILES@,$GMOFILES,;t t
19409 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
19410 s,@INTLDEPS@,$INTLDEPS,;t t
19411 s,@INTLLIBS@,$INTLLIBS,;t t
19412 s,@INTLOBJS@,$INTLOBJS,;t t
19413 s,@POFILES@,$POFILES,;t t
19414 s,@POSUB@,$POSUB,;t t
19415 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
19416 s,@pkg_config@,$pkg_config,;t t
19417 s,@glib_config@,$glib_config,;t t
19418 s,@gtk_config@,$gtk_config,;t t
19419 s,@gnome_config@,$gnome_config,;t t
19420 s,@have_gnome_help@,$have_gnome_help,;t t
19421 s,@xml_config@,$xml_config,;t t
19422 s,@gdk_pixbuf_config@,$gdk_pixbuf_config,;t t
19423 s,@fortune_tmp@,$fortune_tmp,;t t
19424 s,@INCLUDES@,$INCLUDES,;t t
19425 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
19426 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
19427 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
19428 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
19429 s,@GTK_LIBS@,$GTK_LIBS,;t t
19430 s,@XML_LIBS@,$XML_LIBS,;t t
19431 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
19432 s,@HACK_LIBS@,$HACK_LIBS,;t t
19433 s,@XPM_LIBS@,$XPM_LIBS,;t t
19434 s,@GL_LIBS@,$GL_LIBS,;t t
19435 s,@GLE_LIBS@,$GLE_LIBS,;t t
19436 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
19437 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
19438 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
19439 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
19440 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
19441 s,@NEED_SETUID@,$NEED_SETUID,;t t
19442 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
19443 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
19444 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
19445 s,@XMU_SRCS@,$XMU_SRCS,;t t
19446 s,@XMU_OBJS@,$XMU_OBJS,;t t
19447 s,@XMU_LIBS@,$XMU_LIBS,;t t
19448 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
19449 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
19450 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
19451 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
19452 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
19453 s,@JPEG_EXES@,$JPEG_EXES,;t t
19454 s,@GL_EXES@,$GL_EXES,;t t
19455 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
19456 s,@GL_MEN@,$GL_MEN,;t t
19457 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
19458 s,@GLE_EXES@,$GLE_EXES,;t t
19459 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
19460 s,@GNOMEHELP_Y@,$GNOMEHELP_Y,;t t
19461 s,@GNOMEHELP_N@,$GNOMEHELP_N,;t t
19462 s,@HACKDIR@,$HACKDIR,;t t
19463 s,@GNOME_DATADIR@,$GNOME_DATADIR,;t t
19464 s,@GLADE_DATADIR@,$GLADE_DATADIR,;t t
19465 s,@PO_DATADIR@,$PO_DATADIR,;t t
19466 s,@GNOME_PANELDIR@,$GNOME_PANELDIR,;t t
19467 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
19468 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
19469 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
19470 s,@DEPEND@,$DEPEND,;t t
19471 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
19472 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
19473 s,@LIBOBJS@,$LIBOBJS,;t t
19474 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
19475 CEOF
19476
19477 _ACEOF
19478
19479   cat >>$CONFIG_STATUS <<\_ACEOF
19480   # Split the substitutions into bite-sized pieces for seds with
19481   # small command number limits, like on Digital OSF/1 and HP-UX.
19482   ac_max_sed_lines=48
19483   ac_sed_frag=1 # Number of current file.
19484   ac_beg=1 # First line for current file.
19485   ac_end=$ac_max_sed_lines # Line after last line for current file.
19486   ac_more_lines=:
19487   ac_sed_cmds=
19488   while $ac_more_lines; do
19489     if test $ac_beg -gt 1; then
19490       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19491     else
19492       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19493     fi
19494     if test ! -s $tmp/subs.frag; then
19495       ac_more_lines=false
19496     else
19497       # The purpose of the label and of the branching condition is to
19498       # speed up the sed processing (if there are no `@' at all, there
19499       # is no need to browse any of the substitutions).
19500       # These are the two extra sed commands mentioned above.
19501       (echo ':t
19502   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19503       if test -z "$ac_sed_cmds"; then
19504         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19505       else
19506         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19507       fi
19508       ac_sed_frag=`expr $ac_sed_frag + 1`
19509       ac_beg=$ac_end
19510       ac_end=`expr $ac_end + $ac_max_sed_lines`
19511     fi
19512   done
19513   if test -z "$ac_sed_cmds"; then
19514     ac_sed_cmds=cat
19515   fi
19516 fi # test -n "$CONFIG_FILES"
19517
19518 _ACEOF
19519 cat >>$CONFIG_STATUS <<\_ACEOF
19520 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19521   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19522   case $ac_file in
19523   - | *:- | *:-:* ) # input from stdin
19524         cat >$tmp/stdin
19525         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19526         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19527   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19528         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19529   * )   ac_file_in=$ac_file.in ;;
19530   esac
19531
19532   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19533   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19534 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19535          X"$ac_file" : 'X\(//\)[^/]' \| \
19536          X"$ac_file" : 'X\(//\)$' \| \
19537          X"$ac_file" : 'X\(/\)' \| \
19538          .     : '\(.\)' 2>/dev/null ||
19539 echo X"$ac_file" |
19540     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19541           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19542           /^X\(\/\/\)$/{ s//\1/; q; }
19543           /^X\(\/\).*/{ s//\1/; q; }
19544           s/.*/./; q'`
19545   { if $as_mkdir_p; then
19546     mkdir -p "$ac_dir"
19547   else
19548     as_dir="$ac_dir"
19549     as_dirs=
19550     while test ! -d "$as_dir"; do
19551       as_dirs="$as_dir $as_dirs"
19552       as_dir=`(dirname "$as_dir") 2>/dev/null ||
19553 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19554          X"$as_dir" : 'X\(//\)[^/]' \| \
19555          X"$as_dir" : 'X\(//\)$' \| \
19556          X"$as_dir" : 'X\(/\)' \| \
19557          .     : '\(.\)' 2>/dev/null ||
19558 echo X"$as_dir" |
19559     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19560           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19561           /^X\(\/\/\)$/{ s//\1/; q; }
19562           /^X\(\/\).*/{ s//\1/; q; }
19563           s/.*/./; q'`
19564     done
19565     test ! -n "$as_dirs" || mkdir $as_dirs
19566   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19567 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19568    { (exit 1); exit 1; }; }; }
19569
19570   ac_builddir=.
19571
19572 if test "$ac_dir" != .; then
19573   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19574   # A "../" for each directory in $ac_dir_suffix.
19575   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19576 else
19577   ac_dir_suffix= ac_top_builddir=
19578 fi
19579
19580 case $srcdir in
19581   .)  # No --srcdir option.  We are building in place.
19582     ac_srcdir=.
19583     if test -z "$ac_top_builddir"; then
19584        ac_top_srcdir=.
19585     else
19586        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19587     fi ;;
19588   [\\/]* | ?:[\\/]* )  # Absolute path.
19589     ac_srcdir=$srcdir$ac_dir_suffix;
19590     ac_top_srcdir=$srcdir ;;
19591   *) # Relative path.
19592     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19593     ac_top_srcdir=$ac_top_builddir$srcdir ;;
19594 esac
19595 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19596 # absolute.
19597 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
19598 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
19599 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19600 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19601
19602
19603   case $INSTALL in
19604   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19605   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
19606   esac
19607
19608   if test x"$ac_file" != x-; then
19609     { echo "$as_me:$LINENO: creating $ac_file" >&5
19610 echo "$as_me: creating $ac_file" >&6;}
19611     rm -f "$ac_file"
19612   fi
19613   # Let's still pretend it is `configure' which instantiates (i.e., don't
19614   # use $as_me), people would be surprised to read:
19615   #    /* config.h.  Generated by config.status.  */
19616   if test x"$ac_file" = x-; then
19617     configure_input=
19618   else
19619     configure_input="$ac_file.  "
19620   fi
19621   configure_input=$configure_input"Generated from `echo $ac_file_in |
19622                                      sed 's,.*/,,'` by configure."
19623
19624   # First look for the input files in the build tree, otherwise in the
19625   # src tree.
19626   ac_file_inputs=`IFS=:
19627     for f in $ac_file_in; do
19628       case $f in
19629       -) echo $tmp/stdin ;;
19630       [\\/$]*)
19631          # Absolute (can't be DOS-style, as IFS=:)
19632          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19633 echo "$as_me: error: cannot find input file: $f" >&2;}
19634    { (exit 1); exit 1; }; }
19635          echo $f;;
19636       *) # Relative
19637          if test -f "$f"; then
19638            # Build tree
19639            echo $f
19640          elif test -f "$srcdir/$f"; then
19641            # Source tree
19642            echo $srcdir/$f
19643          else
19644            # /dev/null tree
19645            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19646 echo "$as_me: error: cannot find input file: $f" >&2;}
19647    { (exit 1); exit 1; }; }
19648          fi;;
19649       esac
19650     done` || { (exit 1); exit 1; }
19651 _ACEOF
19652 cat >>$CONFIG_STATUS <<_ACEOF
19653   sed "$ac_vpsub
19654 $extrasub
19655 _ACEOF
19656 cat >>$CONFIG_STATUS <<\_ACEOF
19657 :t
19658 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19659 s,@configure_input@,$configure_input,;t t
19660 s,@srcdir@,$ac_srcdir,;t t
19661 s,@abs_srcdir@,$ac_abs_srcdir,;t t
19662 s,@top_srcdir@,$ac_top_srcdir,;t t
19663 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19664 s,@builddir@,$ac_builddir,;t t
19665 s,@abs_builddir@,$ac_abs_builddir,;t t
19666 s,@top_builddir@,$ac_top_builddir,;t t
19667 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19668 s,@INSTALL@,$ac_INSTALL,;t t
19669 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19670   rm -f $tmp/stdin
19671   if test x"$ac_file" != x-; then
19672     mv $tmp/out $ac_file
19673   else
19674     cat $tmp/out
19675     rm -f $tmp/out
19676   fi
19677
19678 done
19679 _ACEOF
19680 cat >>$CONFIG_STATUS <<\_ACEOF
19681
19682 #
19683 # CONFIG_HEADER section.
19684 #
19685
19686 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19687 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19688 #
19689 # ac_d sets the value in "#define NAME VALUE" lines.
19690 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
19691 ac_dB='[        ].*$,\1#\2'
19692 ac_dC=' '
19693 ac_dD=',;t'
19694 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19695 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19696 ac_uB='$,\1#\2define\3'
19697 ac_uC=' '
19698 ac_uD=',;t'
19699
19700 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19701   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19702   case $ac_file in
19703   - | *:- | *:-:* ) # input from stdin
19704         cat >$tmp/stdin
19705         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19706         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19707   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19708         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19709   * )   ac_file_in=$ac_file.in ;;
19710   esac
19711
19712   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19713 echo "$as_me: creating $ac_file" >&6;}
19714
19715   # First look for the input files in the build tree, otherwise in the
19716   # src tree.
19717   ac_file_inputs=`IFS=:
19718     for f in $ac_file_in; do
19719       case $f in
19720       -) echo $tmp/stdin ;;
19721       [\\/$]*)
19722          # Absolute (can't be DOS-style, as IFS=:)
19723          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19724 echo "$as_me: error: cannot find input file: $f" >&2;}
19725    { (exit 1); exit 1; }; }
19726          echo $f;;
19727       *) # Relative
19728          if test -f "$f"; then
19729            # Build tree
19730            echo $f
19731          elif test -f "$srcdir/$f"; then
19732            # Source tree
19733            echo $srcdir/$f
19734          else
19735            # /dev/null tree
19736            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19737 echo "$as_me: error: cannot find input file: $f" >&2;}
19738    { (exit 1); exit 1; }; }
19739          fi;;
19740       esac
19741     done` || { (exit 1); exit 1; }
19742   # Remove the trailing spaces.
19743   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
19744
19745 _ACEOF
19746
19747 # Transform confdefs.h into two sed scripts, `conftest.defines' and
19748 # `conftest.undefs', that substitutes the proper values into
19749 # config.h.in to produce config.h.  The first handles `#define'
19750 # templates, and the second `#undef' templates.
19751 # And first: Protect against being on the right side of a sed subst in
19752 # config.status.  Protect against being in an unquoted here document
19753 # in config.status.
19754 rm -f conftest.defines conftest.undefs
19755 # Using a here document instead of a string reduces the quoting nightmare.
19756 # Putting comments in sed scripts is not portable.
19757 #
19758 # `end' is used to avoid that the second main sed command (meant for
19759 # 0-ary CPP macros) applies to n-ary macro definitions.
19760 # See the Autoconf documentation for `clear'.
19761 cat >confdef2sed.sed <<\_ACEOF
19762 s/[\\&,]/\\&/g
19763 s,[\\$`],\\&,g
19764 t clear
19765 : clear
19766 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19767 t end
19768 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19769 : end
19770 _ACEOF
19771 # If some macros were called several times there might be several times
19772 # the same #defines, which is useless.  Nevertheless, we may not want to
19773 # sort them, since we want the *last* AC-DEFINE to be honored.
19774 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19775 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19776 rm -f confdef2sed.sed
19777
19778 # This sed command replaces #undef with comments.  This is necessary, for
19779 # example, in the case of _POSIX_SOURCE, which is predefined and required
19780 # on some systems where configure will not decide to define it.
19781 cat >>conftest.undefs <<\_ACEOF
19782 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19783 _ACEOF
19784
19785 # Break up conftest.defines because some shells have a limit on the size
19786 # of here documents, and old seds have small limits too (100 cmds).
19787 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
19788 echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
19789 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19790 echo '  :' >>$CONFIG_STATUS
19791 rm -f conftest.tail
19792 while grep . conftest.defines >/dev/null
19793 do
19794   # Write a limited-size here document to $tmp/defines.sed.
19795   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19796   # Speed up: don't consider the non `#define' lines.
19797   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
19798   # Work around the forget-to-reset-the-flag bug.
19799   echo 't clr' >>$CONFIG_STATUS
19800   echo ': clr' >>$CONFIG_STATUS
19801   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
19802   echo 'CEOF
19803   sed -f $tmp/defines.sed $tmp/in >$tmp/out
19804   rm -f $tmp/in
19805   mv $tmp/out $tmp/in
19806 ' >>$CONFIG_STATUS
19807   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19808   rm -f conftest.defines
19809   mv conftest.tail conftest.defines
19810 done
19811 rm -f conftest.defines
19812 echo '  fi # grep' >>$CONFIG_STATUS
19813 echo >>$CONFIG_STATUS
19814
19815 # Break up conftest.undefs because some shells have a limit on the size
19816 # of here documents, and old seds have small limits too (100 cmds).
19817 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
19818 rm -f conftest.tail
19819 while grep . conftest.undefs >/dev/null
19820 do
19821   # Write a limited-size here document to $tmp/undefs.sed.
19822   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19823   # Speed up: don't consider the non `#undef'
19824   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
19825   # Work around the forget-to-reset-the-flag bug.
19826   echo 't clr' >>$CONFIG_STATUS
19827   echo ': clr' >>$CONFIG_STATUS
19828   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19829   echo 'CEOF
19830   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19831   rm -f $tmp/in
19832   mv $tmp/out $tmp/in
19833 ' >>$CONFIG_STATUS
19834   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19835   rm -f conftest.undefs
19836   mv conftest.tail conftest.undefs
19837 done
19838 rm -f conftest.undefs
19839
19840 cat >>$CONFIG_STATUS <<\_ACEOF
19841   # Let's still pretend it is `configure' which instantiates (i.e., don't
19842   # use $as_me), people would be surprised to read:
19843   #    /* config.h.  Generated by config.status.  */
19844   if test x"$ac_file" = x-; then
19845     echo "/* Generated by configure.  */" >$tmp/config.h
19846   else
19847     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
19848   fi
19849   cat $tmp/in >>$tmp/config.h
19850   rm -f $tmp/in
19851   if test x"$ac_file" != x-; then
19852     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
19853       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19854 echo "$as_me: $ac_file is unchanged" >&6;}
19855     else
19856       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19857 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19858          X"$ac_file" : 'X\(//\)[^/]' \| \
19859          X"$ac_file" : 'X\(//\)$' \| \
19860          X"$ac_file" : 'X\(/\)' \| \
19861          .     : '\(.\)' 2>/dev/null ||
19862 echo X"$ac_file" |
19863     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19864           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19865           /^X\(\/\/\)$/{ s//\1/; q; }
19866           /^X\(\/\).*/{ s//\1/; q; }
19867           s/.*/./; q'`
19868       { if $as_mkdir_p; then
19869     mkdir -p "$ac_dir"
19870   else
19871     as_dir="$ac_dir"
19872     as_dirs=
19873     while test ! -d "$as_dir"; do
19874       as_dirs="$as_dir $as_dirs"
19875       as_dir=`(dirname "$as_dir") 2>/dev/null ||
19876 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19877          X"$as_dir" : 'X\(//\)[^/]' \| \
19878          X"$as_dir" : 'X\(//\)$' \| \
19879          X"$as_dir" : 'X\(/\)' \| \
19880          .     : '\(.\)' 2>/dev/null ||
19881 echo X"$as_dir" |
19882     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19883           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19884           /^X\(\/\/\)$/{ s//\1/; q; }
19885           /^X\(\/\).*/{ s//\1/; q; }
19886           s/.*/./; q'`
19887     done
19888     test ! -n "$as_dirs" || mkdir $as_dirs
19889   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19890 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19891    { (exit 1); exit 1; }; }; }
19892
19893       rm -f $ac_file
19894       mv $tmp/config.h $ac_file
19895     fi
19896   else
19897     cat $tmp/config.h
19898     rm -f $tmp/config.h
19899   fi
19900 done
19901 _ACEOF
19902 cat >>$CONFIG_STATUS <<\_ACEOF
19903
19904 #
19905 # CONFIG_COMMANDS section.
19906 #
19907 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19908   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19909   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19910   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
19911 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19912          X"$ac_dest" : 'X\(//\)[^/]' \| \
19913          X"$ac_dest" : 'X\(//\)$' \| \
19914          X"$ac_dest" : 'X\(/\)' \| \
19915          .     : '\(.\)' 2>/dev/null ||
19916 echo X"$ac_dest" |
19917     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19918           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19919           /^X\(\/\/\)$/{ s//\1/; q; }
19920           /^X\(\/\).*/{ s//\1/; q; }
19921           s/.*/./; q'`
19922   ac_builddir=.
19923
19924 if test "$ac_dir" != .; then
19925   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19926   # A "../" for each directory in $ac_dir_suffix.
19927   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19928 else
19929   ac_dir_suffix= ac_top_builddir=
19930 fi
19931
19932 case $srcdir in
19933   .)  # No --srcdir option.  We are building in place.
19934     ac_srcdir=.
19935     if test -z "$ac_top_builddir"; then
19936        ac_top_srcdir=.
19937     else
19938        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19939     fi ;;
19940   [\\/]* | ?:[\\/]* )  # Absolute path.
19941     ac_srcdir=$srcdir$ac_dir_suffix;
19942     ac_top_srcdir=$srcdir ;;
19943   *) # Relative path.
19944     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19945     ac_top_srcdir=$ac_top_builddir$srcdir ;;
19946 esac
19947 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19948 # absolute.
19949 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
19950 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
19951 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19952 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19953
19954
19955   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
19956 echo "$as_me: executing $ac_dest commands" >&6;}
19957   case $ac_dest in
19958     default-1 )
19959
19960 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
19961 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
19962   rm -f intltool-extract.out
19963 else
19964   mv -f intltool-extract.out intltool-extract
19965 fi
19966 chmod ugo+x intltool-extract
19967 chmod u+w intltool-extract
19968
19969 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
19970 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
19971   rm -f intltool-merge.out
19972 else
19973   mv -f intltool-merge.out intltool-merge
19974 fi
19975 chmod ugo+x intltool-merge
19976 chmod u+w intltool-merge
19977
19978 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
19979 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
19980   rm -f intltool-update.out
19981 else
19982   mv -f intltool-update.out intltool-update
19983 fi
19984 chmod ugo+x intltool-update
19985 chmod u+w intltool-update
19986
19987  ;;
19988     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
19989         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
19990       esac ;;
19991   esac
19992 done
19993 _ACEOF
19994
19995 cat >>$CONFIG_STATUS <<\_ACEOF
19996
19997 { (exit 0); exit 0; }
19998 _ACEOF
19999 chmod +x $CONFIG_STATUS
20000 ac_clean_files=$ac_clean_files_save
20001
20002
20003 # configure is writing to config.log, and then calls config.status.
20004 # config.status does its own redirection, appending to config.log.
20005 # Unfortunately, on DOS this fails, as config.log is still kept open
20006 # by configure, so config.status won't be able to write to it; its
20007 # output is simply discarded.  So we exec the FD to /dev/null,
20008 # effectively closing config.log, so it can be properly (re)opened and
20009 # appended to by config.status.  When coming back to configure, we
20010 # need to make the FD available again.
20011 if test "$no_create" != yes; then
20012   ac_cs_success=:
20013   ac_config_status_args=
20014   test "$silent" = yes &&
20015     ac_config_status_args="$ac_config_status_args --quiet"
20016   exec 5>/dev/null
20017   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20018   exec 5>>config.log
20019   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20020   # would make configure fail if this is the last instruction.
20021   $ac_cs_success || { (exit 1); exit 1; }
20022 fi
20023
20024
20025 ###############################################################################
20026 #
20027 #       Print some warnings at the end.
20028 #
20029 ###############################################################################
20030
20031 warn_prefix_1="    Warning:"
20032 warn_prefix_2="       Note:"
20033 warn_prefix="$warn_prefix_1"
20034
20035 warning=no
20036 warnsep='    #################################################################'
20037
20038 warnpre() {
20039   if test "$warning" = no ; then
20040     echo '' ; echo "$warnsep" ; echo ''
20041     warning=yes
20042   fi
20043 }
20044
20045 warn() {
20046   warnpre
20047   if test "$warning" = long ; then echo '' ; fi
20048   warning=yes
20049   rest="$@"
20050   echo "$warn_prefix $rest"
20051 }
20052
20053 warnL() {
20054   was=$warning
20055   warnpre
20056   warning=yes
20057   if test "$was" != no ; then echo '' ; fi
20058   rest="$@"
20059   echo "$warn_prefix $rest"
20060 }
20061
20062 warn2() {
20063   rest="$@"
20064   echo "             $rest"
20065   warning=long
20066 }
20067
20068 note() {
20069   warn_prefix="$warn_prefix_2"
20070   warn $@
20071   warn_prefix="$warn_prefix_1"
20072 }
20073
20074 noteL() {
20075   warn_prefix="$warn_prefix_2"
20076   warnL $@
20077   warn_prefix="$warn_prefix_1"
20078 }
20079
20080
20081 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
20082   warn 'The SGI saver extension was requested, but was not found.'
20083 fi
20084
20085 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
20086   warn 'The MIT saver extension was requested, but was not found.'
20087 fi
20088
20089 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
20090   warn 'The XIdle extension was requested, but was not found.'
20091 fi
20092
20093 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
20094   warn 'The XSHM extension was requested, but was not found.'
20095 fi
20096
20097 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
20098   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
20099 fi
20100
20101 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
20102   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
20103 fi
20104
20105 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
20106   warn 'The DPMS extension was requested, but was not found.'
20107 fi
20108
20109 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
20110   warn 'The Xinerama extension was requested, but was not found.'
20111 fi
20112
20113 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
20114   warn 'The XF86VMODE extension was requested, but was not found.'
20115 fi
20116
20117 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
20118   warn "Checking of /proc/interrupts was requested, but it's bogus."
20119 fi
20120
20121 motif_warn2() {
20122   warn2 'Though the Motif front-end to xscreensaver is still'
20123   warn2 'maintained, it is no longer being updated with new'
20124   warn2 'features: all new development on the xscreensaver-demo'
20125   warn2 'program is happening in the GTK version, and not in the'
20126   warn2 'Motif version.  It is recommended that you build against'
20127   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
20128 }
20129
20130 if test "$have_motif" = no -a "$have_gtk" = no; then
20131
20132   if test "$with_motif" = yes; then
20133     warnL "Neither the GTK nor Motif libraries were found; the"
20134     warn2 "\`xscreensaver-demo' program requires one of these."
20135     echo ''
20136     motif_warn2
20137   else
20138     warnL "The GTK libraries do not seem to be available; the"
20139     warn2 "\`xscreensaver-demo' program requires them."
20140     echo ''
20141     warn2 'You can use Motif or Lesstif instead of GTK (use the'
20142     warn2 "\`--with-motif' option) but that is NOT recommended."
20143     motif_warn2
20144   fi
20145
20146 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
20147   warnL "Use of Motif was requested, but it wasn't found;"
20148   warn2 "Gtk will be used instead."
20149
20150 elif test "$jurassic_gtk" = yes ; then
20151
20152   pref_gtk=1.2
20153
20154   v="$ac_gtk_version_string"
20155   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
20156     warnL "Use of Gtk was requested, but its version number is unknown;"
20157   elif test "$with_gtk_req" = yes ; then
20158     warnL "Use of Gtk was requested, but it is version $v;"
20159   else
20160     warnL "Gtk was found on this system, but it is version $v;"
20161   fi
20162
20163   warn2 "Gtk $pref_gtk or newer is required."
20164
20165 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
20166   warnL "Use of Gtk was requested, but it wasn't found."
20167 fi
20168
20169 if test "$gtk2_halfassed" != no ; then
20170   warnL "GTK version $gtk2_halfassed was found, but at least one supporting"
20171   warn2 "library ($gtk2_halfassed_lib) was not, so GTK 2.x can't be used."
20172   v="$ac_gtk_version_string"
20173   warn2 "GTK $v is also installed, so it will be used instead."
20174   warn2 "Please read the above output and the \`config.log' file"
20175   warn2 "for more details."
20176 fi
20177
20178
20179 if test "$with_gnome_req" = yes -a "$have_gnome" = no \
20180         -a "$have_gtk2" = no; then
20181   # don't issue this warning if we have GTK2 -- in that case, the
20182   # Gnome-specific code isn't needed.
20183   warn  'Use of the Gnome Control Panel was requested, but the necessary'
20184   warn2 'headers and/or libraries were not found.'
20185 fi
20186
20187 if test "$have_gtk" = yes ; then
20188   if test "$have_xml" = no ; then
20189     if test "$with_xml_req" = yes ; then
20190       warn  'Use of the XML library was requested, but the necessary'
20191       warn2 'headers and/or libraries were not found.'
20192     else
20193       warn  'GTK is being used, but the XML library was not found.'
20194     fi
20195
20196     if test "$xml_halfassed" = yes ; then
20197
20198       if test "$have_zlib" = yes ; then
20199         which="XML libraries"
20200       else
20201         which="\`zlib' library"
20202       fi
20203
20204       echo ''
20205       warn2 'More specifically, we found the headers, but not the'
20206       warn2 "$which; so either XML is half-installed on this"
20207       warn2 "system, or something else went wrong.  The \`config.log'"
20208       warn2 'file might contain some clues.'
20209     fi
20210
20211     echo ''
20212     warn2 "Without XML, the per-display-mode \`Settings' dialogs"
20213     warn2 'will not be available.  Specify the location of the XML'
20214     warn2 'library through the --with-xml option to configure.'
20215   fi
20216 fi
20217
20218 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
20219   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
20220   warn2 "headers were not found.  That can't be good.  Please"
20221   warn2 "install the GDK-Pixbuf development kit and re-configure."
20222 fi
20223
20224 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
20225
20226   preferred_lesstif=0.92
20227
20228   if test "$lesstif_version" = unknown; then
20229     warnL "Unable to determine the LessTif version number!"
20230     warn2 "Make sure you are using version $preferred_lesstif or newer."
20231     warn2 "See <http://www.lesstif.org/>."
20232
20233   elif test \! $lesstif_version -gt 82; then
20234     warnL "LessTif version $lesstif_version_string is being used."
20235     warn2 "LessTif versions 0.82 and earlier are too buggy to"
20236     warn2 "use with XScreenSaver; it is strongly recommended"
20237     warn2 "that you upgrade to at least version $preferred_lesstif!"
20238     warn2 "See <http://www.lesstif.org/>."
20239   fi
20240 fi
20241
20242
20243 if test "$have_motif" = yes -a "$have_gtk" = no ; then
20244   warn  'Motif is being used, and GTK is not.'
20245   echo  ''
20246   motif_warn2
20247 fi
20248
20249
20250 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
20251   warnL 'Use of XPM was requested, but it was not found.'
20252 fi
20253
20254 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
20255   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
20256 fi
20257
20258 if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \
20259    test "$gdk_pixbuf_halfassed" = yes; then
20260
20261   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
20262     true
20263   elif test "$with_xpm_req" = no ; then
20264     warnL 'The XPM library is not being used.'
20265   else
20266     warnL 'The XPM library was not found.'
20267   fi
20268
20269   if test "$with_gdk_pixbuf_req" = yes ; then
20270     true
20271   elif test "$with_gdk_pixbuf_req" = no ; then
20272     warnL 'The GDK-Pixbuf library is not being used.'
20273   else
20274     warnL 'The GDK-Pixbuf library was not found.'
20275   fi
20276
20277   if test "$gdk_pixbuf_halfassed" = yes ; then
20278     echo ''
20279     warn2 'More specifically, we found the headers, but not the'
20280     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
20281     warn2 "system, or something else went wrong.  The \`config.log'"
20282     warn2 'file might contain some clues.'
20283   fi
20284
20285   echo ''
20286   warn2 'Some of the demos will not be as colorful as they'
20287   warn2 'could be.  You should consider installing Pixbuf or'
20288   warn2 'XPM and re-running configure.  The Pixbuf library is'
20289   warn2 'a part of GNOME.  The XPM library comes with most'
20290   warn2 'X11 installations; you can also find it at the X11'
20291   warn2 'archive sites, such as <http://sunsite.unc.edu/>.'
20292   echo  ''
20293   warn2 'GDK-Pixbuf is recommended over XPM, as it provides'
20294   warn2 'support for more image formats.'
20295 fi
20296
20297
20298 if test "$have_jpeg" = no ; then
20299   if test "$with_jpeg_req" = yes ; then
20300     warnL 'Use of libjpeg was requested, but it was not found.'
20301   elif test "$with_jpeg_req" = no ; then
20302     noteL 'The JPEG library is not being used.'
20303   else
20304     noteL 'The JPEG library was not found.'
20305   fi
20306
20307   if test "$jpeg_halfassed" = yes ; then
20308     echo ''
20309     warn2 'More specifically, we found the headers, but not the'
20310     warn2 'library; so either JPEG is half-installed on this'
20311     warn2 "system, or something else went wrong.  The \`config.log'"
20312     warn2 'file might contain some clues.'
20313     echo ''
20314   fi
20315
20316   if test "$have_gdk_pixbuf" = no ; then
20317     warn2 "This means that it won't be possible for the image-manipulating"
20318     warn2 "display modes to load files from disk; and it also means that"
20319     warn2 "the \`webcollage' program will be much slower."
20320   else
20321     warn2 "This means the \`webcollage' program will be much slower."
20322   fi
20323 fi
20324
20325
20326 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
20327   preferred_mesagl=3.4
20328   mgv="$ac_mesagl_version_string"
20329   pgl="$preferred_mesagl"
20330
20331   if test "$ac_mesagl_version" = unknown; then
20332     warnL "Unable to determine the MesaGL version number!"
20333     warn2 "Make sure you are using version $preferred_mesagl or newer."
20334
20335   elif test \! "$ac_mesagl_version" -gt 2006; then
20336     warnL "MesaGL version number is $mgv --"
20337     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
20338     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
20339
20340   elif test \! "$ac_mesagl_version" -gt 3003; then
20341     warnL "MesaGL version number is $mgv --"
20342     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
20343     warn2 "that you upgrade to $pgl or newer."
20344   fi
20345 fi
20346
20347 if test "$have_gl" = no ; then
20348   if test "$with_gl_req" = yes ; then
20349     warnL 'Use of GL was requested, but it was not found.'
20350   elif test "$with_gl_req" = no ; then
20351     noteL 'The OpenGL 3D library is not being used.'
20352   else
20353     noteL 'The OpenGL 3D library was not found.'
20354   fi
20355
20356   if test "$gl_halfassed" = yes ; then
20357     echo ''
20358     warn2 'More specifically, we found the headers, but not the'
20359     warn2 'libraries; so either GL is half-installed on this'
20360     warn2 "system, or something else went wrong.  The \`config.log'"
20361     warn2 'file might contain some clues.'
20362   fi
20363
20364   echo ''
20365   warn2 'Those demos which use 3D will not be built or installed.'
20366   warn2 'You might want to consider installing OpenGL and'
20367   warn2 "re-running configure.  If your vendor doesn't ship"
20368   warn2 'their own implementation of OpenGL, you can get a free'
20369   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
20370   warn2 'info, see <http://www.opengl.org/>.'
20371
20372 fi
20373
20374
20375 if test "$have_gl" = yes -a "$have_gle" = no ; then
20376
20377  # nobody cares about this; don't print the warning unless it was
20378  # requested and not found, or halfway-found.
20379  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
20380
20381   if test "$with_gle_req" = yes ; then
20382     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
20383     warn2 'it was not found (though the OpenGL library was found, and'
20384     warn2 'is being used.)'
20385   elif test "$with_gle_req" = no ; then
20386     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
20387     warn2 'library is not.'
20388   else
20389     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
20390     warn2 'was not.'
20391   fi
20392
20393   if test "$gle_halfassed" = yes ; then
20394     echo ''
20395     warn2 'More specifically, we found the headers, but not the'
20396     warn2 'libraries; so either GLE is half-installed on this'
20397     warn2 "system, or something else went wrong.  The \`config.log'"
20398     warn2 'file might contain some clues.'
20399   fi
20400
20401   echo ''
20402   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
20403   warn2 'will not be built or installed.  You might want to consider'
20404   warn2 'installing GLE and re-running configure.  You can find the'
20405   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
20406   warn2 'OpenGL info, see <http://www.opengl.org/>.'
20407
20408  fi
20409 fi
20410
20411
20412 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
20413   warn 'Use of XReadDisplay was requested, but it was not found.'
20414 fi
20415
20416 if test -n "$with_fortune_req"; then
20417   if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
20418     warnL "$with_fortune_req was requested as the Fortune program,"
20419     warn2 "but was not found.  The default will be used instead."
20420   fi
20421 fi
20422
20423 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
20424   warn 'Use of Kerberos was requested, but it was not found.'
20425 fi
20426
20427 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
20428   warn 'Use of PAM was requested, but it was not found.'
20429 fi
20430
20431 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
20432   warn 'Use of shadow passwords was requested, but they were not found.'
20433 fi
20434
20435
20436 # You are in a twisty maze of namespaces and syntaxes, all alike.
20437 # Fuck the skull of Unix.
20438 #
20439 eval bindir=${bindir}
20440 eval bindir=${bindir}
20441 eval bindir=${bindir}
20442 eval bindir=${bindir}
20443 eval bindir=${bindir}
20444 eval bindir=${bindir}
20445 eval HACKDIR=${HACKDIR}
20446 eval HACKDIR=${HACKDIR}
20447 eval HACKDIR=${HACKDIR}
20448 eval HACKDIR=${HACKDIR}
20449 eval HACKDIR=${HACKDIR}
20450 eval HACKDIR=${HACKDIR}
20451 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20452 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20453 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20454 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20455 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20456 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20457
20458 # canonicalize slashes.
20459 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
20460 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
20461 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
20462
20463
20464 # Sanity check the hackdir
20465 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
20466   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
20467     echo ""
20468     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
20469                    There will be an executable installed with that name, so
20470                    that can't be the name of a directory as well.  Please
20471                    re-configure with a different directory name." >&5
20472 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
20473                    There will be an executable installed with that name, so
20474                    that can't be the name of a directory as well.  Please
20475                    re-configure with a different directory name." >&2;}
20476    { (exit 1); exit 1; }; }
20477   fi
20478 done
20479
20480
20481 do_dir_warning=no
20482
20483 # Now let's see if there's a previous RPM version already installed.  Blargh!
20484
20485 # M4 sucks!!
20486
20487 rpmv=`(rpm -qv xscreensaver) 2>/dev/null | \
20488       sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
20489
20490
20491 if test \! -z "$rpmv" ; then
20492   rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
20493   rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
20494
20495   warning=no
20496   warnL "There is already an installed RPM of xscreensaver $rpmv"
20497   warn2 "on this system.  You might want to remove it (with"
20498   warn2 '"rpm -ve xscreensaver") before running "make install"'
20499   warn2 "from this directory."
20500   echo ""
20501   warn2 "Alternately, you could build this version of xscreensaver"
20502   warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
20503   warn2 "file is included.  See the RPM documentation for more info."
20504   echo ""
20505
20506   if test "$rpmbdir" = "$rpmhdir" ; then
20507     warn2 "The RPM version was installed in $rpmbdir/."
20508   else
20509     warn2 "The RPM version was installed in $rpmbdir/,"
20510     warn2 "with demos in $rpmhdir/."
20511   fi
20512
20513   do_dir_warning=yes
20514 fi
20515
20516
20517 if test "${bindir}" = "${HACKDIR}" ; then
20518   do_dir_warning=yes
20519 fi
20520
20521 if test "$do_dir_warning" = yes; then
20522   echo ""
20523   echo "$warnsep"
20524   echo ""
20525   echo '      When you run "make install", the "xscreensaver",'
20526   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
20527   echo "      will be installed in ${bindir}/."
20528   echo ""
20529   echo "      The various graphics demos (160+ different executables) will"
20530   echo "      be installed in ${HACKDIR}/."
20531   echo ""
20532   echo "      If you would prefer the demos to be installed elsewhere,"
20533   echo "      you should re-run configure with the --with-hackdir=DIR"
20534   echo "      option.  For more information, run \`./configure --help'."
20535   warning=yes
20536 fi
20537
20538 if test "$warning" != no; then
20539   echo '' ; echo "$warnsep" ; echo ''
20540 fi
20541
20542 if test "$do_dir_warning" = no; then
20543   if test "$warning" = no; then
20544     echo ''
20545   fi
20546   echo "User programs will be installed in ${bindir}/"
20547   echo "Screen savers will be installed in ${HACKDIR}/"
20548   echo "Configuration will be installed in ${HACK_CONF_DIR}/"
20549   echo ''
20550 fi