c62fcae96235ff6b48fcdb73c689352c117785cd
[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 PTY_LIBS GL_LIBS GLE_LIBS XDPMS_LIBS PASSWD_LIBS INSTALL_SETUID SETUID_HACKS INSTALL_DIRS NEED_SETUID INSTALL_PAM OBJCC EXES_OSX SCRIPTS_OSX MEN_OSX PASSWD_SRCS PASSWD_OBJS XMU_SRCS XMU_OBJS XMU_LIBS SAVER_GL_SRCS SAVER_GL_OBJS SAVER_GL_LIBS LOCK_SRCS LOCK_OBJS JPEG_EXES GL_EXES GL_UTIL_EXES GL_MEN GL_KLUDGE GLE_EXES GLE_KLUDGE GNOMEHELP_Y GNOMEHELP_N HACKDIR GNOME_DATADIR GLADE_DATADIR PO_DATADIR GNOME_PANELDIR HACK_CONF_DIR GTK_EXTRA_OBJS APPDEFAULTS DEPEND DEPEND_FLAGS DEPEND_DEFINES LIBOBJS LTLIBOBJS'
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-randr-ext        Include support for the X Resize+Rotate extension.
888   --with-proc-interrupts  Include support for consulting the /proc/interrupts
889                           file to notice keyboard activity.
890   --with-pam              Include support for PAM (Pluggable Auth Modules.)
891   --with-kerberos         Include support for Kerberos authentication.
892   --with-shadow           Include support for shadow password authentication.
893   --with-passwd-helper    Include support for an external password
894                           verification helper program.
895
896 User interface options:
897
898   --with-motif            Use the Motif toolkit for the user interface
899                           (not recommended.)
900   --with-gtk              Use the Gtk toolkit for the user interface.
901   --with-gnome            Include support for the Gnome 1.x Control Center.
902                           (This option is not needed with GTK 2.x / Gnome 2.x.)
903
904   --with-xml              The XML toolkit is needed for some parts of
905                           the Gtk interface.  Without it, the configuration
906                           interface will be much less featureful.
907
908 Graphics options:
909
910   --with-gl               Build those demos which depend on OpenGL.
911   --with-gle              Build those demos which depend on GLE
912                           (the OpenGL "extrusion" library.)
913   --with-xpm              Include support for XPM files in some demos.
914                           (Not needed if Pixbuf is used.)
915   --with-pixbuf           Include support for the GDK-Pixbuf library in some
916                           demos, which will make it possible for them to read
917                           GIF, JPEG, and PNG files as well.  (The path here is
918                           ignored if GTK 2.x is being used.)
919   --with-jpeg             Include support for the JPEG library.
920   --with-xshm-ext         Include support for the Shared Memory extension.
921   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
922   --with-readdisplay      Include support for the XReadDisplay extension.
923
924   --with-fortune=PROGRAM  Some demos are able to run an external program and
925                           display its text; this names the program to use by
926                           default (though it can be overridden with X
927                           resources.)  Default is "/usr/games/fortune".
928   --with-setuid-hacks     Allow some demos to be installed `setuid root'
929                           (which is needed in order to ping other hosts.)
930
931
932 Some influential environment variables:
933   CC          C compiler command
934   CFLAGS      C compiler flags
935   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
936               nonstandard directory <lib dir>
937   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
938               headers in a nonstandard directory <include dir>
939   CPP         C preprocessor
940
941 Use these variables to override the choices made by `configure' or to help
942 it to find libraries and programs with nonstandard names/locations.
943
944 _ACEOF
945 fi
946
947 if test "$ac_init_help" = "recursive"; then
948   # If there are subdirs, report their specific --help.
949   ac_popdir=`pwd`
950   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
951     test -d $ac_dir || continue
952     ac_builddir=.
953
954 if test "$ac_dir" != .; then
955   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
956   # A "../" for each directory in $ac_dir_suffix.
957   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
958 else
959   ac_dir_suffix= ac_top_builddir=
960 fi
961
962 case $srcdir in
963   .)  # No --srcdir option.  We are building in place.
964     ac_srcdir=.
965     if test -z "$ac_top_builddir"; then
966        ac_top_srcdir=.
967     else
968        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
969     fi ;;
970   [\\/]* | ?:[\\/]* )  # Absolute path.
971     ac_srcdir=$srcdir$ac_dir_suffix;
972     ac_top_srcdir=$srcdir ;;
973   *) # Relative path.
974     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
975     ac_top_srcdir=$ac_top_builddir$srcdir ;;
976 esac
977 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
978 # absolute.
979 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
980 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
981 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
982 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
983
984     cd $ac_dir
985     # Check for guested configure; otherwise get Cygnus style configure.
986     if test -f $ac_srcdir/configure.gnu; then
987       echo
988       $SHELL $ac_srcdir/configure.gnu  --help=recursive
989     elif test -f $ac_srcdir/configure; then
990       echo
991       $SHELL $ac_srcdir/configure  --help=recursive
992     elif test -f $ac_srcdir/configure.ac ||
993            test -f $ac_srcdir/configure.in; then
994       echo
995       $ac_configure --help
996     else
997       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
998     fi
999     cd $ac_popdir
1000   done
1001 fi
1002
1003 test -n "$ac_init_help" && exit 0
1004 if $ac_init_version; then
1005   cat <<\_ACEOF
1006
1007 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
1008 Free Software Foundation, Inc.
1009 This configure script is free software; the Free Software Foundation
1010 gives unlimited permission to copy, distribute and modify it.
1011 _ACEOF
1012   exit 0
1013 fi
1014 exec 5>config.log
1015 cat >&5 <<_ACEOF
1016 This file contains any messages produced by compilers while
1017 running configure, to aid debugging if configure makes a mistake.
1018
1019 It was created by $as_me, which was
1020 generated by GNU Autoconf 2.57.  Invocation command line was
1021
1022   $ $0 $@
1023
1024 _ACEOF
1025 {
1026 cat <<_ASUNAME
1027 ## --------- ##
1028 ## Platform. ##
1029 ## --------- ##
1030
1031 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1032 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1033 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1034 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1035 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1036
1037 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1038 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1039
1040 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1041 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1042 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1043 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1044 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1045 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1046 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1047
1048 _ASUNAME
1049
1050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1051 for as_dir in $PATH
1052 do
1053   IFS=$as_save_IFS
1054   test -z "$as_dir" && as_dir=.
1055   echo "PATH: $as_dir"
1056 done
1057
1058 } >&5
1059
1060 cat >&5 <<_ACEOF
1061
1062
1063 ## ----------- ##
1064 ## Core tests. ##
1065 ## ----------- ##
1066
1067 _ACEOF
1068
1069
1070 # Keep a trace of the command line.
1071 # Strip out --no-create and --no-recursion so they do not pile up.
1072 # Strip out --silent because we don't want to record it for future runs.
1073 # Also quote any args containing shell meta-characters.
1074 # Make two passes to allow for proper duplicate-argument suppression.
1075 ac_configure_args=
1076 ac_configure_args0=
1077 ac_configure_args1=
1078 ac_sep=
1079 ac_must_keep_next=false
1080 for ac_pass in 1 2
1081 do
1082   for ac_arg
1083   do
1084     case $ac_arg in
1085     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1086     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1087     | -silent | --silent | --silen | --sile | --sil)
1088       continue ;;
1089     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1090       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1091     esac
1092     case $ac_pass in
1093     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1094     2)
1095       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1096       if test $ac_must_keep_next = true; then
1097         ac_must_keep_next=false # Got value, back to normal.
1098       else
1099         case $ac_arg in
1100           *=* | --config-cache | -C | -disable-* | --disable-* \
1101           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1102           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1103           | -with-* | --with-* | -without-* | --without-* | --x)
1104             case "$ac_configure_args0 " in
1105               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1106             esac
1107             ;;
1108           -* ) ac_must_keep_next=true ;;
1109         esac
1110       fi
1111       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1112       # Get rid of the leading space.
1113       ac_sep=" "
1114       ;;
1115     esac
1116   done
1117 done
1118 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1119 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1120
1121 # When interrupted or exit'd, cleanup temporary files, and complete
1122 # config.log.  We remove comments because anyway the quotes in there
1123 # would cause problems or look ugly.
1124 # WARNING: Be sure not to use single quotes in there, as some shells,
1125 # such as our DU 5.0 friend, will then `close' the trap.
1126 trap 'exit_status=$?
1127   # Save into config.log some information that might help in debugging.
1128   {
1129     echo
1130
1131     cat <<\_ASBOX
1132 ## ---------------- ##
1133 ## Cache variables. ##
1134 ## ---------------- ##
1135 _ASBOX
1136     echo
1137     # The following way of writing the cache mishandles newlines in values,
1138 {
1139   (set) 2>&1 |
1140     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1141     *ac_space=\ *)
1142       sed -n \
1143         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1144           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1145       ;;
1146     *)
1147       sed -n \
1148         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1149       ;;
1150     esac;
1151 }
1152     echo
1153
1154     cat <<\_ASBOX
1155 ## ----------------- ##
1156 ## Output variables. ##
1157 ## ----------------- ##
1158 _ASBOX
1159     echo
1160     for ac_var in $ac_subst_vars
1161     do
1162       eval ac_val=$`echo $ac_var`
1163       echo "$ac_var='"'"'$ac_val'"'"'"
1164     done | sort
1165     echo
1166
1167     if test -n "$ac_subst_files"; then
1168       cat <<\_ASBOX
1169 ## ------------- ##
1170 ## Output files. ##
1171 ## ------------- ##
1172 _ASBOX
1173       echo
1174       for ac_var in $ac_subst_files
1175       do
1176         eval ac_val=$`echo $ac_var`
1177         echo "$ac_var='"'"'$ac_val'"'"'"
1178       done | sort
1179       echo
1180     fi
1181
1182     if test -s confdefs.h; then
1183       cat <<\_ASBOX
1184 ## ----------- ##
1185 ## confdefs.h. ##
1186 ## ----------- ##
1187 _ASBOX
1188       echo
1189       sed "/^$/d" confdefs.h | sort
1190       echo
1191     fi
1192     test "$ac_signal" != 0 &&
1193       echo "$as_me: caught signal $ac_signal"
1194     echo "$as_me: exit $exit_status"
1195   } >&5
1196   rm -f core core.* *.core &&
1197   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1198     exit $exit_status
1199      ' 0
1200 for ac_signal in 1 2 13 15; do
1201   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1202 done
1203 ac_signal=0
1204
1205 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1206 rm -rf conftest* confdefs.h
1207 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1208 echo >confdefs.h
1209
1210 # Predefined preprocessor variables.
1211
1212 cat >>confdefs.h <<_ACEOF
1213 #define PACKAGE_NAME "$PACKAGE_NAME"
1214 _ACEOF
1215
1216
1217 cat >>confdefs.h <<_ACEOF
1218 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1219 _ACEOF
1220
1221
1222 cat >>confdefs.h <<_ACEOF
1223 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1224 _ACEOF
1225
1226
1227 cat >>confdefs.h <<_ACEOF
1228 #define PACKAGE_STRING "$PACKAGE_STRING"
1229 _ACEOF
1230
1231
1232 cat >>confdefs.h <<_ACEOF
1233 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1234 _ACEOF
1235
1236
1237 # Let the site file select an alternate cache file if it wants to.
1238 # Prefer explicitly selected file to automatically selected ones.
1239 if test -z "$CONFIG_SITE"; then
1240   if test "x$prefix" != xNONE; then
1241     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1242   else
1243     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1244   fi
1245 fi
1246 for ac_site_file in $CONFIG_SITE; do
1247   if test -r "$ac_site_file"; then
1248     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1249 echo "$as_me: loading site script $ac_site_file" >&6;}
1250     sed 's/^/| /' "$ac_site_file" >&5
1251     . "$ac_site_file"
1252   fi
1253 done
1254
1255 if test -r "$cache_file"; then
1256   # Some versions of bash will fail to source /dev/null (special
1257   # files actually), so we avoid doing that.
1258   if test -f "$cache_file"; then
1259     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1260 echo "$as_me: loading cache $cache_file" >&6;}
1261     case $cache_file in
1262       [\\/]* | ?:[\\/]* ) . $cache_file;;
1263       *)                      . ./$cache_file;;
1264     esac
1265   fi
1266 else
1267   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1268 echo "$as_me: creating cache $cache_file" >&6;}
1269   >$cache_file
1270 fi
1271
1272 # Check that the precious variables saved in the cache have kept the same
1273 # value.
1274 ac_cache_corrupted=false
1275 for ac_var in `(set) 2>&1 |
1276                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1277   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1278   eval ac_new_set=\$ac_env_${ac_var}_set
1279   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1280   eval ac_new_val="\$ac_env_${ac_var}_value"
1281   case $ac_old_set,$ac_new_set in
1282     set,)
1283       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1284 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1285       ac_cache_corrupted=: ;;
1286     ,set)
1287       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1288 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1289       ac_cache_corrupted=: ;;
1290     ,);;
1291     *)
1292       if test "x$ac_old_val" != "x$ac_new_val"; then
1293         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1294 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1295         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1296 echo "$as_me:   former value:  $ac_old_val" >&2;}
1297         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1298 echo "$as_me:   current value: $ac_new_val" >&2;}
1299         ac_cache_corrupted=:
1300       fi;;
1301   esac
1302   # Pass precious variables to config.status.
1303   if test "$ac_new_set" = set; then
1304     case $ac_new_val in
1305     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1306       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1307     *) ac_arg=$ac_var=$ac_new_val ;;
1308     esac
1309     case " $ac_configure_args " in
1310       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1311       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1312     esac
1313   fi
1314 done
1315 if $ac_cache_corrupted; then
1316   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1317 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1318   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1319 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1320    { (exit 1); exit 1; }; }
1321 fi
1322
1323 ac_ext=c
1324 ac_cpp='$CPP $CPPFLAGS'
1325 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1326 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1327 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347           ac_config_headers="$ac_config_headers config.h"
1348
1349
1350 echo "current directory: `pwd`"
1351 echo "command line was: $0 $@"
1352
1353
1354 # After checking to see that --srcdir is correct (which AC_INIT does)
1355 # check for some random other files that come later in the tar file,
1356 # to make sure everything is here.
1357 #
1358 for d in driver utils hacks hacks/glx ; do
1359   f=$srcdir/$d/Makefile.in
1360   if test \! -r $f ; then
1361     echo ""
1362     echo "ERROR: The package is incomplete: $f does not exist."
1363     echo "       This probably means that your download was truncated."
1364     echo ""
1365     exit 1
1366   fi
1367 done
1368
1369 ###############################################################################
1370 #
1371 #       Function to figure out how to run the compiler.
1372 #
1373 ###############################################################################
1374
1375
1376
1377
1378 ###############################################################################
1379 #
1380 #       Functions to figure out how to disable // comments in ANSI C code.
1381 #
1382 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
1383 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
1384 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
1385 #       so much for compatibility!)
1386 #
1387 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
1388 #       declarations preceed statements, without resorting to "-pedantic".
1389 #       This means that there is no way to get gcc3 to issue warnings that
1390 #       ensure that your code complies with the ANSI/ISO C89 standard, without
1391 #       also drowning in totally useless warnings.  Thank you master may I
1392 #       have another.
1393 #
1394 #       So, I give up, let's just use -pedantic.
1395 #
1396 ###############################################################################
1397
1398
1399
1400
1401
1402
1403 ###############################################################################
1404 #
1405 #       Function to figure out how to turn off Objective C on MacOS X.
1406 #       (We have to do this to work around an Apple-specific gcc bug.)
1407 #
1408 ###############################################################################
1409
1410
1411
1412
1413
1414
1415 ###############################################################################
1416 #
1417 #       Function to figure out how to create directory trees.
1418 #
1419 ###############################################################################
1420
1421
1422
1423
1424 ###############################################################################
1425 #
1426 #       Function to check whether gettimeofday() exists, and how to call it.
1427 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1428 #
1429 ###############################################################################
1430
1431
1432
1433
1434 ###############################################################################
1435 #
1436 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1437 #
1438 ###############################################################################
1439
1440 # M4 sucks!!  perl sucks too!!
1441
1442 perl_version_cmd='print $]'
1443
1444
1445
1446
1447
1448 ###############################################################################
1449 #
1450 #       Function to demand "bc".  Losers.
1451 #
1452 ###############################################################################
1453
1454
1455
1456 ###############################################################################
1457 #
1458 #       Functions to check how to do ICMP PING requests.
1459 #
1460 ###############################################################################
1461
1462
1463
1464
1465
1466
1467 ###############################################################################
1468 #
1469 #       Functions to check for various X11 crap.
1470 #
1471 ###############################################################################
1472
1473 # Try and find the app-defaults directory.
1474 # It sucks that autoconf doesn't do this already...
1475 #
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486 # Random special-cases for X on certain pathological OSes.
1487 # You know who you are.
1488 #
1489
1490
1491
1492
1493 ###############################################################################
1494 #
1495 #       Some utility functions to make checking for X things easier.
1496 #
1497 ###############################################################################
1498
1499 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1500 #
1501
1502
1503 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1504 #
1505
1506
1507 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1508 #
1509
1510
1511
1512 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1513 # Use this sparingly; it probably doesn't work very well on X programs.
1514 #
1515
1516
1517 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1518 # (But not the -L directories!)
1519 #
1520
1521
1522
1523
1524 # Usage: HANDLE_X_PATH_ARG([variable_name],
1525 #                          [--command-line-option],
1526 #                          [descriptive string])
1527 #
1528 # All of the --with options take three forms:
1529 #
1530 #   --with-foo (or --with-foo=yes)
1531 #   --without-foo (or --with-foo=no)
1532 #   --with-foo=/DIR
1533 #
1534 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1535 # a directory (string beginning with a slash) it checks to see whether
1536 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1537 # as appropriate.
1538 #
1539
1540
1541
1542
1543 ###############################################################################
1544 ###############################################################################
1545 #
1546 #       End of function definitions.  Now start actually executing stuff.
1547 #
1548 ###############################################################################
1549 ###############################################################################
1550
1551 # random compiler setup
1552 ac_aux_dir=
1553 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1554   if test -f $ac_dir/install-sh; then
1555     ac_aux_dir=$ac_dir
1556     ac_install_sh="$ac_aux_dir/install-sh -c"
1557     break
1558   elif test -f $ac_dir/install.sh; then
1559     ac_aux_dir=$ac_dir
1560     ac_install_sh="$ac_aux_dir/install.sh -c"
1561     break
1562   elif test -f $ac_dir/shtool; then
1563     ac_aux_dir=$ac_dir
1564     ac_install_sh="$ac_aux_dir/shtool install -c"
1565     break
1566   fi
1567 done
1568 if test -z "$ac_aux_dir"; then
1569   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1570 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1571    { (exit 1); exit 1; }; }
1572 fi
1573 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1574 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1575 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1576
1577 # Make sure we can run config.sub.
1578 $ac_config_sub sun4 >/dev/null 2>&1 ||
1579   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1580 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1581    { (exit 1); exit 1; }; }
1582
1583 echo "$as_me:$LINENO: checking build system type" >&5
1584 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1585 if test "${ac_cv_build+set}" = set; then
1586   echo $ECHO_N "(cached) $ECHO_C" >&6
1587 else
1588   ac_cv_build_alias=$build_alias
1589 test -z "$ac_cv_build_alias" &&
1590   ac_cv_build_alias=`$ac_config_guess`
1591 test -z "$ac_cv_build_alias" &&
1592   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1593 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1594    { (exit 1); exit 1; }; }
1595 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1596   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1597 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1598    { (exit 1); exit 1; }; }
1599
1600 fi
1601 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1602 echo "${ECHO_T}$ac_cv_build" >&6
1603 build=$ac_cv_build
1604 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1605 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1606 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1607
1608
1609 echo "$as_me:$LINENO: checking host system type" >&5
1610 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1611 if test "${ac_cv_host+set}" = set; then
1612   echo $ECHO_N "(cached) $ECHO_C" >&6
1613 else
1614   ac_cv_host_alias=$host_alias
1615 test -z "$ac_cv_host_alias" &&
1616   ac_cv_host_alias=$ac_cv_build_alias
1617 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1618   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1619 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1620    { (exit 1); exit 1; }; }
1621
1622 fi
1623 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1624 echo "${ECHO_T}$ac_cv_host" >&6
1625 host=$ac_cv_host
1626 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1627 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1628 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1629
1630
1631
1632 ac_ext=c
1633 ac_cpp='$CPP $CPPFLAGS'
1634 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1635 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1636 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1637 if test -n "$ac_tool_prefix"; then
1638   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1639 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1640 echo "$as_me:$LINENO: checking for $ac_word" >&5
1641 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1642 if test "${ac_cv_prog_CC+set}" = set; then
1643   echo $ECHO_N "(cached) $ECHO_C" >&6
1644 else
1645   if test -n "$CC"; then
1646   ac_cv_prog_CC="$CC" # Let the user override the test.
1647 else
1648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1649 for as_dir in $PATH
1650 do
1651   IFS=$as_save_IFS
1652   test -z "$as_dir" && as_dir=.
1653   for ac_exec_ext in '' $ac_executable_extensions; do
1654   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1655     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1656     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1657     break 2
1658   fi
1659 done
1660 done
1661
1662 fi
1663 fi
1664 CC=$ac_cv_prog_CC
1665 if test -n "$CC"; then
1666   echo "$as_me:$LINENO: result: $CC" >&5
1667 echo "${ECHO_T}$CC" >&6
1668 else
1669   echo "$as_me:$LINENO: result: no" >&5
1670 echo "${ECHO_T}no" >&6
1671 fi
1672
1673 fi
1674 if test -z "$ac_cv_prog_CC"; then
1675   ac_ct_CC=$CC
1676   # Extract the first word of "gcc", so it can be a program name with args.
1677 set dummy gcc; ac_word=$2
1678 echo "$as_me:$LINENO: checking for $ac_word" >&5
1679 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1680 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1681   echo $ECHO_N "(cached) $ECHO_C" >&6
1682 else
1683   if test -n "$ac_ct_CC"; then
1684   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1685 else
1686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1687 for as_dir in $PATH
1688 do
1689   IFS=$as_save_IFS
1690   test -z "$as_dir" && as_dir=.
1691   for ac_exec_ext in '' $ac_executable_extensions; do
1692   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1693     ac_cv_prog_ac_ct_CC="gcc"
1694     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1695     break 2
1696   fi
1697 done
1698 done
1699
1700 fi
1701 fi
1702 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1703 if test -n "$ac_ct_CC"; then
1704   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1705 echo "${ECHO_T}$ac_ct_CC" >&6
1706 else
1707   echo "$as_me:$LINENO: result: no" >&5
1708 echo "${ECHO_T}no" >&6
1709 fi
1710
1711   CC=$ac_ct_CC
1712 else
1713   CC="$ac_cv_prog_CC"
1714 fi
1715
1716 if test -z "$CC"; then
1717   if test -n "$ac_tool_prefix"; then
1718   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1719 set dummy ${ac_tool_prefix}cc; ac_word=$2
1720 echo "$as_me:$LINENO: checking for $ac_word" >&5
1721 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1722 if test "${ac_cv_prog_CC+set}" = set; then
1723   echo $ECHO_N "(cached) $ECHO_C" >&6
1724 else
1725   if test -n "$CC"; then
1726   ac_cv_prog_CC="$CC" # Let the user override the test.
1727 else
1728 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1729 for as_dir in $PATH
1730 do
1731   IFS=$as_save_IFS
1732   test -z "$as_dir" && as_dir=.
1733   for ac_exec_ext in '' $ac_executable_extensions; do
1734   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1735     ac_cv_prog_CC="${ac_tool_prefix}cc"
1736     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1737     break 2
1738   fi
1739 done
1740 done
1741
1742 fi
1743 fi
1744 CC=$ac_cv_prog_CC
1745 if test -n "$CC"; then
1746   echo "$as_me:$LINENO: result: $CC" >&5
1747 echo "${ECHO_T}$CC" >&6
1748 else
1749   echo "$as_me:$LINENO: result: no" >&5
1750 echo "${ECHO_T}no" >&6
1751 fi
1752
1753 fi
1754 if test -z "$ac_cv_prog_CC"; then
1755   ac_ct_CC=$CC
1756   # Extract the first word of "cc", so it can be a program name with args.
1757 set dummy cc; ac_word=$2
1758 echo "$as_me:$LINENO: checking for $ac_word" >&5
1759 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1760 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1761   echo $ECHO_N "(cached) $ECHO_C" >&6
1762 else
1763   if test -n "$ac_ct_CC"; then
1764   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1765 else
1766 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1767 for as_dir in $PATH
1768 do
1769   IFS=$as_save_IFS
1770   test -z "$as_dir" && as_dir=.
1771   for ac_exec_ext in '' $ac_executable_extensions; do
1772   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1773     ac_cv_prog_ac_ct_CC="cc"
1774     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1775     break 2
1776   fi
1777 done
1778 done
1779
1780 fi
1781 fi
1782 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1783 if test -n "$ac_ct_CC"; then
1784   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1785 echo "${ECHO_T}$ac_ct_CC" >&6
1786 else
1787   echo "$as_me:$LINENO: result: no" >&5
1788 echo "${ECHO_T}no" >&6
1789 fi
1790
1791   CC=$ac_ct_CC
1792 else
1793   CC="$ac_cv_prog_CC"
1794 fi
1795
1796 fi
1797 if test -z "$CC"; then
1798   # Extract the first word of "cc", so it can be a program name with args.
1799 set dummy cc; ac_word=$2
1800 echo "$as_me:$LINENO: checking for $ac_word" >&5
1801 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1802 if test "${ac_cv_prog_CC+set}" = set; then
1803   echo $ECHO_N "(cached) $ECHO_C" >&6
1804 else
1805   if test -n "$CC"; then
1806   ac_cv_prog_CC="$CC" # Let the user override the test.
1807 else
1808   ac_prog_rejected=no
1809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1810 for as_dir in $PATH
1811 do
1812   IFS=$as_save_IFS
1813   test -z "$as_dir" && as_dir=.
1814   for ac_exec_ext in '' $ac_executable_extensions; do
1815   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1816     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1817        ac_prog_rejected=yes
1818        continue
1819      fi
1820     ac_cv_prog_CC="cc"
1821     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1822     break 2
1823   fi
1824 done
1825 done
1826
1827 if test $ac_prog_rejected = yes; then
1828   # We found a bogon in the path, so make sure we never use it.
1829   set dummy $ac_cv_prog_CC
1830   shift
1831   if test $# != 0; then
1832     # We chose a different compiler from the bogus one.
1833     # However, it has the same basename, so the bogon will be chosen
1834     # first if we set CC to just the basename; use the full file name.
1835     shift
1836     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1837   fi
1838 fi
1839 fi
1840 fi
1841 CC=$ac_cv_prog_CC
1842 if test -n "$CC"; then
1843   echo "$as_me:$LINENO: result: $CC" >&5
1844 echo "${ECHO_T}$CC" >&6
1845 else
1846   echo "$as_me:$LINENO: result: no" >&5
1847 echo "${ECHO_T}no" >&6
1848 fi
1849
1850 fi
1851 if test -z "$CC"; then
1852   if test -n "$ac_tool_prefix"; then
1853   for ac_prog in cl
1854   do
1855     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1856 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1857 echo "$as_me:$LINENO: checking for $ac_word" >&5
1858 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1859 if test "${ac_cv_prog_CC+set}" = set; then
1860   echo $ECHO_N "(cached) $ECHO_C" >&6
1861 else
1862   if test -n "$CC"; then
1863   ac_cv_prog_CC="$CC" # Let the user override the test.
1864 else
1865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1866 for as_dir in $PATH
1867 do
1868   IFS=$as_save_IFS
1869   test -z "$as_dir" && as_dir=.
1870   for ac_exec_ext in '' $ac_executable_extensions; do
1871   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1872     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1873     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1874     break 2
1875   fi
1876 done
1877 done
1878
1879 fi
1880 fi
1881 CC=$ac_cv_prog_CC
1882 if test -n "$CC"; then
1883   echo "$as_me:$LINENO: result: $CC" >&5
1884 echo "${ECHO_T}$CC" >&6
1885 else
1886   echo "$as_me:$LINENO: result: no" >&5
1887 echo "${ECHO_T}no" >&6
1888 fi
1889
1890     test -n "$CC" && break
1891   done
1892 fi
1893 if test -z "$CC"; then
1894   ac_ct_CC=$CC
1895   for ac_prog in cl
1896 do
1897   # Extract the first word of "$ac_prog", so it can be a program name with args.
1898 set dummy $ac_prog; ac_word=$2
1899 echo "$as_me:$LINENO: checking for $ac_word" >&5
1900 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1901 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1902   echo $ECHO_N "(cached) $ECHO_C" >&6
1903 else
1904   if test -n "$ac_ct_CC"; then
1905   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1906 else
1907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1908 for as_dir in $PATH
1909 do
1910   IFS=$as_save_IFS
1911   test -z "$as_dir" && as_dir=.
1912   for ac_exec_ext in '' $ac_executable_extensions; do
1913   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1914     ac_cv_prog_ac_ct_CC="$ac_prog"
1915     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1916     break 2
1917   fi
1918 done
1919 done
1920
1921 fi
1922 fi
1923 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1924 if test -n "$ac_ct_CC"; then
1925   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1926 echo "${ECHO_T}$ac_ct_CC" >&6
1927 else
1928   echo "$as_me:$LINENO: result: no" >&5
1929 echo "${ECHO_T}no" >&6
1930 fi
1931
1932   test -n "$ac_ct_CC" && break
1933 done
1934
1935   CC=$ac_ct_CC
1936 fi
1937
1938 fi
1939
1940
1941 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1942 See \`config.log' for more details." >&5
1943 echo "$as_me: error: no acceptable C compiler found in \$PATH
1944 See \`config.log' for more details." >&2;}
1945    { (exit 1); exit 1; }; }
1946
1947 # Provide some information about the compiler.
1948 echo "$as_me:$LINENO:" \
1949      "checking for C compiler version" >&5
1950 ac_compiler=`set X $ac_compile; echo $2`
1951 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1952   (eval $ac_compiler --version </dev/null >&5) 2>&5
1953   ac_status=$?
1954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1955   (exit $ac_status); }
1956 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1957   (eval $ac_compiler -v </dev/null >&5) 2>&5
1958   ac_status=$?
1959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1960   (exit $ac_status); }
1961 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1962   (eval $ac_compiler -V </dev/null >&5) 2>&5
1963   ac_status=$?
1964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1965   (exit $ac_status); }
1966
1967 cat >conftest.$ac_ext <<_ACEOF
1968 #line $LINENO "configure"
1969 /* confdefs.h.  */
1970 _ACEOF
1971 cat confdefs.h >>conftest.$ac_ext
1972 cat >>conftest.$ac_ext <<_ACEOF
1973 /* end confdefs.h.  */
1974
1975 int
1976 main ()
1977 {
1978
1979   ;
1980   return 0;
1981 }
1982 _ACEOF
1983 ac_clean_files_save=$ac_clean_files
1984 ac_clean_files="$ac_clean_files a.out a.exe b.out"
1985 # Try to create an executable without -o first, disregard a.out.
1986 # It will help us diagnose broken compilers, and finding out an intuition
1987 # of exeext.
1988 echo "$as_me:$LINENO: checking for C compiler default output" >&5
1989 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1990 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1991 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1992   (eval $ac_link_default) 2>&5
1993   ac_status=$?
1994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1995   (exit $ac_status); }; then
1996   # Find the output, starting from the most likely.  This scheme is
1997 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1998 # resort.
1999
2000 # Be careful to initialize this variable, since it used to be cached.
2001 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2002 ac_cv_exeext=
2003 # b.out is created by i960 compilers.
2004 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2005 do
2006   test -f "$ac_file" || continue
2007   case $ac_file in
2008     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2009         ;;
2010     conftest.$ac_ext )
2011         # This is the source file.
2012         ;;
2013     [ab].out )
2014         # We found the default executable, but exeext='' is most
2015         # certainly right.
2016         break;;
2017     *.* )
2018         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2019         # FIXME: I believe we export ac_cv_exeext for Libtool,
2020         # but it would be cool to find out if it's true.  Does anybody
2021         # maintain Libtool? --akim.
2022         export ac_cv_exeext
2023         break;;
2024     * )
2025         break;;
2026   esac
2027 done
2028 else
2029   echo "$as_me: failed program was:" >&5
2030 sed 's/^/| /' conftest.$ac_ext >&5
2031
2032 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2033 See \`config.log' for more details." >&5
2034 echo "$as_me: error: C compiler cannot create executables
2035 See \`config.log' for more details." >&2;}
2036    { (exit 77); exit 77; }; }
2037 fi
2038
2039 ac_exeext=$ac_cv_exeext
2040 echo "$as_me:$LINENO: result: $ac_file" >&5
2041 echo "${ECHO_T}$ac_file" >&6
2042
2043 # Check the compiler produces executables we can run.  If not, either
2044 # the compiler is broken, or we cross compile.
2045 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2046 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2047 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2048 # If not cross compiling, check that we can run a simple program.
2049 if test "$cross_compiling" != yes; then
2050   if { ac_try='./$ac_file'
2051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2052   (eval $ac_try) 2>&5
2053   ac_status=$?
2054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2055   (exit $ac_status); }; }; then
2056     cross_compiling=no
2057   else
2058     if test "$cross_compiling" = maybe; then
2059         cross_compiling=yes
2060     else
2061         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2062 If you meant to cross compile, use \`--host'.
2063 See \`config.log' for more details." >&5
2064 echo "$as_me: error: cannot run C compiled programs.
2065 If you meant to cross compile, use \`--host'.
2066 See \`config.log' for more details." >&2;}
2067    { (exit 1); exit 1; }; }
2068     fi
2069   fi
2070 fi
2071 echo "$as_me:$LINENO: result: yes" >&5
2072 echo "${ECHO_T}yes" >&6
2073
2074 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2075 ac_clean_files=$ac_clean_files_save
2076 # Check the compiler produces executables we can run.  If not, either
2077 # the compiler is broken, or we cross compile.
2078 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2079 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2080 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2081 echo "${ECHO_T}$cross_compiling" >&6
2082
2083 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2084 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2085 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2086   (eval $ac_link) 2>&5
2087   ac_status=$?
2088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2089   (exit $ac_status); }; then
2090   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2091 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2092 # work properly (i.e., refer to `conftest.exe'), while it won't with
2093 # `rm'.
2094 for ac_file in conftest.exe conftest conftest.*; do
2095   test -f "$ac_file" || continue
2096   case $ac_file in
2097     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2098     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2099           export ac_cv_exeext
2100           break;;
2101     * ) break;;
2102   esac
2103 done
2104 else
2105   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2106 See \`config.log' for more details." >&5
2107 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2108 See \`config.log' for more details." >&2;}
2109    { (exit 1); exit 1; }; }
2110 fi
2111
2112 rm -f conftest$ac_cv_exeext
2113 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2114 echo "${ECHO_T}$ac_cv_exeext" >&6
2115
2116 rm -f conftest.$ac_ext
2117 EXEEXT=$ac_cv_exeext
2118 ac_exeext=$EXEEXT
2119 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2120 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2121 if test "${ac_cv_objext+set}" = set; then
2122   echo $ECHO_N "(cached) $ECHO_C" >&6
2123 else
2124   cat >conftest.$ac_ext <<_ACEOF
2125 #line $LINENO "configure"
2126 /* confdefs.h.  */
2127 _ACEOF
2128 cat confdefs.h >>conftest.$ac_ext
2129 cat >>conftest.$ac_ext <<_ACEOF
2130 /* end confdefs.h.  */
2131
2132 int
2133 main ()
2134 {
2135
2136   ;
2137   return 0;
2138 }
2139 _ACEOF
2140 rm -f conftest.o conftest.obj
2141 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2142   (eval $ac_compile) 2>&5
2143   ac_status=$?
2144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2145   (exit $ac_status); }; then
2146   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2147   case $ac_file in
2148     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2149     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2150        break;;
2151   esac
2152 done
2153 else
2154   echo "$as_me: failed program was:" >&5
2155 sed 's/^/| /' conftest.$ac_ext >&5
2156
2157 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2158 See \`config.log' for more details." >&5
2159 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2160 See \`config.log' for more details." >&2;}
2161    { (exit 1); exit 1; }; }
2162 fi
2163
2164 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2165 fi
2166 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2167 echo "${ECHO_T}$ac_cv_objext" >&6
2168 OBJEXT=$ac_cv_objext
2169 ac_objext=$OBJEXT
2170 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2171 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2172 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2173   echo $ECHO_N "(cached) $ECHO_C" >&6
2174 else
2175   cat >conftest.$ac_ext <<_ACEOF
2176 #line $LINENO "configure"
2177 /* confdefs.h.  */
2178 _ACEOF
2179 cat confdefs.h >>conftest.$ac_ext
2180 cat >>conftest.$ac_ext <<_ACEOF
2181 /* end confdefs.h.  */
2182
2183 int
2184 main ()
2185 {
2186 #ifndef __GNUC__
2187        choke me
2188 #endif
2189
2190   ;
2191   return 0;
2192 }
2193 _ACEOF
2194 rm -f conftest.$ac_objext
2195 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2196   (eval $ac_compile) 2>&5
2197   ac_status=$?
2198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2199   (exit $ac_status); } &&
2200          { ac_try='test -s conftest.$ac_objext'
2201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2202   (eval $ac_try) 2>&5
2203   ac_status=$?
2204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2205   (exit $ac_status); }; }; then
2206   ac_compiler_gnu=yes
2207 else
2208   echo "$as_me: failed program was:" >&5
2209 sed 's/^/| /' conftest.$ac_ext >&5
2210
2211 ac_compiler_gnu=no
2212 fi
2213 rm -f conftest.$ac_objext conftest.$ac_ext
2214 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2215
2216 fi
2217 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2218 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2219 GCC=`test $ac_compiler_gnu = yes && echo yes`
2220 ac_test_CFLAGS=${CFLAGS+set}
2221 ac_save_CFLAGS=$CFLAGS
2222 CFLAGS="-g"
2223 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2224 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2225 if test "${ac_cv_prog_cc_g+set}" = set; then
2226   echo $ECHO_N "(cached) $ECHO_C" >&6
2227 else
2228   cat >conftest.$ac_ext <<_ACEOF
2229 #line $LINENO "configure"
2230 /* confdefs.h.  */
2231 _ACEOF
2232 cat confdefs.h >>conftest.$ac_ext
2233 cat >>conftest.$ac_ext <<_ACEOF
2234 /* end confdefs.h.  */
2235
2236 int
2237 main ()
2238 {
2239
2240   ;
2241   return 0;
2242 }
2243 _ACEOF
2244 rm -f conftest.$ac_objext
2245 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2246   (eval $ac_compile) 2>&5
2247   ac_status=$?
2248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2249   (exit $ac_status); } &&
2250          { ac_try='test -s conftest.$ac_objext'
2251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2252   (eval $ac_try) 2>&5
2253   ac_status=$?
2254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2255   (exit $ac_status); }; }; then
2256   ac_cv_prog_cc_g=yes
2257 else
2258   echo "$as_me: failed program was:" >&5
2259 sed 's/^/| /' conftest.$ac_ext >&5
2260
2261 ac_cv_prog_cc_g=no
2262 fi
2263 rm -f conftest.$ac_objext conftest.$ac_ext
2264 fi
2265 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2266 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2267 if test "$ac_test_CFLAGS" = set; then
2268   CFLAGS=$ac_save_CFLAGS
2269 elif test $ac_cv_prog_cc_g = yes; then
2270   if test "$GCC" = yes; then
2271     CFLAGS="-g -O2"
2272   else
2273     CFLAGS="-g"
2274   fi
2275 else
2276   if test "$GCC" = yes; then
2277     CFLAGS="-O2"
2278   else
2279     CFLAGS=
2280   fi
2281 fi
2282 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2283 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2284 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2285   echo $ECHO_N "(cached) $ECHO_C" >&6
2286 else
2287   ac_cv_prog_cc_stdc=no
2288 ac_save_CC=$CC
2289 cat >conftest.$ac_ext <<_ACEOF
2290 #line $LINENO "configure"
2291 /* confdefs.h.  */
2292 _ACEOF
2293 cat confdefs.h >>conftest.$ac_ext
2294 cat >>conftest.$ac_ext <<_ACEOF
2295 /* end confdefs.h.  */
2296 #include <stdarg.h>
2297 #include <stdio.h>
2298 #include <sys/types.h>
2299 #include <sys/stat.h>
2300 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2301 struct buf { int x; };
2302 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2303 static char *e (p, i)
2304      char **p;
2305      int i;
2306 {
2307   return p[i];
2308 }
2309 static char *f (char * (*g) (char **, int), char **p, ...)
2310 {
2311   char *s;
2312   va_list v;
2313   va_start (v,p);
2314   s = g (p, va_arg (v,int));
2315   va_end (v);
2316   return s;
2317 }
2318 int test (int i, double x);
2319 struct s1 {int (*f) (int a);};
2320 struct s2 {int (*f) (double a);};
2321 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2322 int argc;
2323 char **argv;
2324 int
2325 main ()
2326 {
2327 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2328   ;
2329   return 0;
2330 }
2331 _ACEOF
2332 # Don't try gcc -ansi; that turns off useful extensions and
2333 # breaks some systems' header files.
2334 # AIX                   -qlanglvl=ansi
2335 # Ultrix and OSF/1      -std1
2336 # HP-UX 10.20 and later -Ae
2337 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2338 # SVR4                  -Xc -D__EXTENSIONS__
2339 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2340 do
2341   CC="$ac_save_CC $ac_arg"
2342   rm -f conftest.$ac_objext
2343 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2344   (eval $ac_compile) 2>&5
2345   ac_status=$?
2346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2347   (exit $ac_status); } &&
2348          { ac_try='test -s conftest.$ac_objext'
2349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2350   (eval $ac_try) 2>&5
2351   ac_status=$?
2352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2353   (exit $ac_status); }; }; then
2354   ac_cv_prog_cc_stdc=$ac_arg
2355 break
2356 else
2357   echo "$as_me: failed program was:" >&5
2358 sed 's/^/| /' conftest.$ac_ext >&5
2359
2360 fi
2361 rm -f conftest.$ac_objext
2362 done
2363 rm -f conftest.$ac_ext conftest.$ac_objext
2364 CC=$ac_save_CC
2365
2366 fi
2367
2368 case "x$ac_cv_prog_cc_stdc" in
2369   x|xno)
2370     echo "$as_me:$LINENO: result: none needed" >&5
2371 echo "${ECHO_T}none needed" >&6 ;;
2372   *)
2373     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2374 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2375     CC="$CC $ac_cv_prog_cc_stdc" ;;
2376 esac
2377
2378 # Some people use a C++ compiler to compile C.  Since we use `exit',
2379 # in C++ we need to declare it.  In case someone uses the same compiler
2380 # for both compiling C and C++ we need to have the C++ compiler decide
2381 # the declaration of exit, since it's the most demanding environment.
2382 cat >conftest.$ac_ext <<_ACEOF
2383 #ifndef __cplusplus
2384   choke me
2385 #endif
2386 _ACEOF
2387 rm -f conftest.$ac_objext
2388 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2389   (eval $ac_compile) 2>&5
2390   ac_status=$?
2391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2392   (exit $ac_status); } &&
2393          { ac_try='test -s conftest.$ac_objext'
2394   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2395   (eval $ac_try) 2>&5
2396   ac_status=$?
2397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2398   (exit $ac_status); }; }; then
2399   for ac_declaration in \
2400    ''\
2401    '#include <stdlib.h>' \
2402    'extern "C" void std::exit (int) throw (); using std::exit;' \
2403    'extern "C" void std::exit (int); using std::exit;' \
2404    'extern "C" void exit (int) throw ();' \
2405    'extern "C" void exit (int);' \
2406    'void exit (int);'
2407 do
2408   cat >conftest.$ac_ext <<_ACEOF
2409 #line $LINENO "configure"
2410 /* confdefs.h.  */
2411 _ACEOF
2412 cat confdefs.h >>conftest.$ac_ext
2413 cat >>conftest.$ac_ext <<_ACEOF
2414 /* end confdefs.h.  */
2415 #include <stdlib.h>
2416 $ac_declaration
2417 int
2418 main ()
2419 {
2420 exit (42);
2421   ;
2422   return 0;
2423 }
2424 _ACEOF
2425 rm -f conftest.$ac_objext
2426 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2427   (eval $ac_compile) 2>&5
2428   ac_status=$?
2429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2430   (exit $ac_status); } &&
2431          { ac_try='test -s conftest.$ac_objext'
2432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2433   (eval $ac_try) 2>&5
2434   ac_status=$?
2435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2436   (exit $ac_status); }; }; then
2437   :
2438 else
2439   echo "$as_me: failed program was:" >&5
2440 sed 's/^/| /' conftest.$ac_ext >&5
2441
2442 continue
2443 fi
2444 rm -f conftest.$ac_objext conftest.$ac_ext
2445   cat >conftest.$ac_ext <<_ACEOF
2446 #line $LINENO "configure"
2447 /* confdefs.h.  */
2448 _ACEOF
2449 cat confdefs.h >>conftest.$ac_ext
2450 cat >>conftest.$ac_ext <<_ACEOF
2451 /* end confdefs.h.  */
2452 $ac_declaration
2453 int
2454 main ()
2455 {
2456 exit (42);
2457   ;
2458   return 0;
2459 }
2460 _ACEOF
2461 rm -f conftest.$ac_objext
2462 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2463   (eval $ac_compile) 2>&5
2464   ac_status=$?
2465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2466   (exit $ac_status); } &&
2467          { ac_try='test -s conftest.$ac_objext'
2468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2469   (eval $ac_try) 2>&5
2470   ac_status=$?
2471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2472   (exit $ac_status); }; }; then
2473   break
2474 else
2475   echo "$as_me: failed program was:" >&5
2476 sed 's/^/| /' conftest.$ac_ext >&5
2477
2478 fi
2479 rm -f conftest.$ac_objext conftest.$ac_ext
2480 done
2481 rm -f conftest*
2482 if test -n "$ac_declaration"; then
2483   echo '#ifdef __cplusplus' >>confdefs.h
2484   echo $ac_declaration      >>confdefs.h
2485   echo '#endif'             >>confdefs.h
2486 fi
2487
2488 else
2489   echo "$as_me: failed program was:" >&5
2490 sed 's/^/| /' conftest.$ac_ext >&5
2491
2492 fi
2493 rm -f conftest.$ac_objext conftest.$ac_ext
2494 ac_ext=c
2495 ac_cpp='$CPP $CPPFLAGS'
2496 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2497 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2498 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2499
2500
2501   if test -z "$GCC"; then
2502     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2503 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2504     case "$host" in
2505       *-hpux* )
2506         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2507 echo "${ECHO_T}HPUX: adding -Ae" >&6
2508         CC="$CC -Ae"
2509       ;;
2510       *-aix* )
2511         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2512 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2513         CC="$CC -qlanglvl=ansi -qhalt=e"
2514       ;;
2515
2516       *-dec-* )
2517         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2518 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2519         CC="$CC -std1"
2520       ;;
2521
2522       *)
2523         echo "$as_me:$LINENO: result: no idea" >&5
2524 echo "${ECHO_T}no idea" >&6
2525       ;;
2526     esac
2527   fi
2528
2529   OBJCC="$CC"
2530
2531   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2532 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2533   if test "$cross_compiling" = yes; then
2534   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2535 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2536    { (exit 1); exit 1; }; }
2537 else
2538   cat >conftest.$ac_ext <<_ACEOF
2539 #line $LINENO "configure"
2540 /* confdefs.h.  */
2541 _ACEOF
2542 cat confdefs.h >>conftest.$ac_ext
2543 cat >>conftest.$ac_ext <<_ACEOF
2544 /* end confdefs.h.  */
2545  main(int ac, char **av) { return 0; }
2546 _ACEOF
2547 rm -f conftest$ac_exeext
2548 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2549   (eval $ac_link) 2>&5
2550   ac_status=$?
2551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2552   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2554   (eval $ac_try) 2>&5
2555   ac_status=$?
2556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2557   (exit $ac_status); }; }; then
2558   echo "$as_me:$LINENO: result: yes" >&5
2559 echo "${ECHO_T}yes" >&6
2560 else
2561   echo "$as_me: program exited with status $ac_status" >&5
2562 echo "$as_me: failed program was:" >&5
2563 sed 's/^/| /' conftest.$ac_ext >&5
2564
2565 ( exit $ac_status )
2566 echo "$as_me:$LINENO: result: no" >&5
2567 echo "${ECHO_T}no" >&6
2568      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2569 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2570    { (exit 1); exit 1; }; }
2571 fi
2572 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2573 fi
2574
2575   if test -n "$GCC"; then
2576     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2577 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2578     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs"
2579     OBJCC="$OBJCC -Wall"
2580     # supposedly gcc 3.4 will have "-Wdeclaration-after-statement"
2581     # and then perhaps we can do without -pedantic?
2582   else
2583     case "$host" in
2584       *-irix5* |*-irix6.0-3* )
2585         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2586 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2587         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2588       ;;
2589 #     *-dec-osf* )
2590 #       if test -z "$GCC"; then
2591 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2592 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2593 #       fi
2594 #     ;;
2595     esac
2596   fi
2597
2598 if test -n "$GCC"; then
2599    if test -n "$GCC"; then
2600    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2601 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2602 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2603   echo $ECHO_N "(cached) $ECHO_C" >&6
2604 else
2605   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
2606           grep unrecognized >/dev/null ); then
2607        ac_cv_gcc_accepts_std=no
2608      else
2609        ac_cv_gcc_accepts_std=yes
2610      fi
2611 fi
2612 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2613 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2614    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2615   fi
2616
2617    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2618 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2619    #
2620    # The reason that // comments are banned from xscreensaver is that gcc is
2621    # basically the only compiler in the world that supports them in C code.
2622    # All other vendors support them only in their C++ compilers, not in their
2623    # ANSI C compilers.  This means that it's a portability problem: every time
2624    # these comments have snuck into the xscreensaver source code, I've gotten
2625    # complaints about it the next day.  So we turn off support for them in gcc
2626    # as well to prevent them from accidentially slipping in.
2627    #
2628    if test "$ac_gcc_accepts_std" = yes ; then
2629      #
2630      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2631      # (That appears to be the only additional preprocessor symbol
2632      # it defines, in addition to the syntax changes it makes.)
2633      #
2634      # -std=gnu89 is no good, because // comments were a GNU extension
2635      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2636      # with -std=gnu89 but not with -std=c89.)
2637      #
2638      CC="$CC -std=c89 -U__STRICT_ANSI__"
2639    else
2640      # The old way:
2641      CC="$CC -Wp,-lang-c89"
2642    fi
2643   fi
2644
2645 if test -n "$GCC"; then
2646    if test -n "$GCC"; then
2647    echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
2648 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6
2649 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
2650   echo $ECHO_N "(cached) $ECHO_C" >&6
2651 else
2652   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
2653           grep unrecognized >/dev/null ); then
2654        ac_cv_gcc_accepts_no_cpp_precomp=no
2655      else
2656        ac_cv_gcc_accepts_no_cpp_precomp=yes
2657      fi
2658 fi
2659 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
2660 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6
2661    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
2662   fi
2663
2664    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
2665      echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
2666 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6
2667      CC="$CC -no-cpp-precomp"
2668    fi
2669   fi
2670
2671 ac_ext=c
2672 ac_cpp='$CPP $CPPFLAGS'
2673 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2674 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2675 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2676 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2677 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2678 # On Suns, sometimes $CPP names a directory.
2679 if test -n "$CPP" && test -d "$CPP"; then
2680   CPP=
2681 fi
2682 if test -z "$CPP"; then
2683   if test "${ac_cv_prog_CPP+set}" = set; then
2684   echo $ECHO_N "(cached) $ECHO_C" >&6
2685 else
2686       # Double quotes because CPP needs to be expanded
2687     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2688     do
2689       ac_preproc_ok=false
2690 for ac_c_preproc_warn_flag in '' yes
2691 do
2692   # Use a header file that comes with gcc, so configuring glibc
2693   # with a fresh cross-compiler works.
2694   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2695   # <limits.h> exists even on freestanding compilers.
2696   # On the NeXT, cc -E runs the code through the compiler's parser,
2697   # not just through cpp. "Syntax error" is here to catch this case.
2698   cat >conftest.$ac_ext <<_ACEOF
2699 #line $LINENO "configure"
2700 /* confdefs.h.  */
2701 _ACEOF
2702 cat confdefs.h >>conftest.$ac_ext
2703 cat >>conftest.$ac_ext <<_ACEOF
2704 /* end confdefs.h.  */
2705 #ifdef __STDC__
2706 # include <limits.h>
2707 #else
2708 # include <assert.h>
2709 #endif
2710                      Syntax error
2711 _ACEOF
2712 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2713   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2714   ac_status=$?
2715   grep -v '^ *+' conftest.er1 >conftest.err
2716   rm -f conftest.er1
2717   cat conftest.err >&5
2718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2719   (exit $ac_status); } >/dev/null; then
2720   if test -s conftest.err; then
2721     ac_cpp_err=$ac_c_preproc_warn_flag
2722   else
2723     ac_cpp_err=
2724   fi
2725 else
2726   ac_cpp_err=yes
2727 fi
2728 if test -z "$ac_cpp_err"; then
2729   :
2730 else
2731   echo "$as_me: failed program was:" >&5
2732 sed 's/^/| /' conftest.$ac_ext >&5
2733
2734   # Broken: fails on valid input.
2735 continue
2736 fi
2737 rm -f conftest.err conftest.$ac_ext
2738
2739   # OK, works on sane cases.  Now check whether non-existent headers
2740   # can be detected and how.
2741   cat >conftest.$ac_ext <<_ACEOF
2742 #line $LINENO "configure"
2743 /* confdefs.h.  */
2744 _ACEOF
2745 cat confdefs.h >>conftest.$ac_ext
2746 cat >>conftest.$ac_ext <<_ACEOF
2747 /* end confdefs.h.  */
2748 #include <ac_nonexistent.h>
2749 _ACEOF
2750 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2751   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2752   ac_status=$?
2753   grep -v '^ *+' conftest.er1 >conftest.err
2754   rm -f conftest.er1
2755   cat conftest.err >&5
2756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2757   (exit $ac_status); } >/dev/null; then
2758   if test -s conftest.err; then
2759     ac_cpp_err=$ac_c_preproc_warn_flag
2760   else
2761     ac_cpp_err=
2762   fi
2763 else
2764   ac_cpp_err=yes
2765 fi
2766 if test -z "$ac_cpp_err"; then
2767   # Broken: success on invalid input.
2768 continue
2769 else
2770   echo "$as_me: failed program was:" >&5
2771 sed 's/^/| /' conftest.$ac_ext >&5
2772
2773   # Passes both tests.
2774 ac_preproc_ok=:
2775 break
2776 fi
2777 rm -f conftest.err conftest.$ac_ext
2778
2779 done
2780 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2781 rm -f conftest.err conftest.$ac_ext
2782 if $ac_preproc_ok; then
2783   break
2784 fi
2785
2786     done
2787     ac_cv_prog_CPP=$CPP
2788
2789 fi
2790   CPP=$ac_cv_prog_CPP
2791 else
2792   ac_cv_prog_CPP=$CPP
2793 fi
2794 echo "$as_me:$LINENO: result: $CPP" >&5
2795 echo "${ECHO_T}$CPP" >&6
2796 ac_preproc_ok=false
2797 for ac_c_preproc_warn_flag in '' yes
2798 do
2799   # Use a header file that comes with gcc, so configuring glibc
2800   # with a fresh cross-compiler works.
2801   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2802   # <limits.h> exists even on freestanding compilers.
2803   # On the NeXT, cc -E runs the code through the compiler's parser,
2804   # not just through cpp. "Syntax error" is here to catch this case.
2805   cat >conftest.$ac_ext <<_ACEOF
2806 #line $LINENO "configure"
2807 /* confdefs.h.  */
2808 _ACEOF
2809 cat confdefs.h >>conftest.$ac_ext
2810 cat >>conftest.$ac_ext <<_ACEOF
2811 /* end confdefs.h.  */
2812 #ifdef __STDC__
2813 # include <limits.h>
2814 #else
2815 # include <assert.h>
2816 #endif
2817                      Syntax error
2818 _ACEOF
2819 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2820   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2821   ac_status=$?
2822   grep -v '^ *+' conftest.er1 >conftest.err
2823   rm -f conftest.er1
2824   cat conftest.err >&5
2825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2826   (exit $ac_status); } >/dev/null; then
2827   if test -s conftest.err; then
2828     ac_cpp_err=$ac_c_preproc_warn_flag
2829   else
2830     ac_cpp_err=
2831   fi
2832 else
2833   ac_cpp_err=yes
2834 fi
2835 if test -z "$ac_cpp_err"; then
2836   :
2837 else
2838   echo "$as_me: failed program was:" >&5
2839 sed 's/^/| /' conftest.$ac_ext >&5
2840
2841   # Broken: fails on valid input.
2842 continue
2843 fi
2844 rm -f conftest.err conftest.$ac_ext
2845
2846   # OK, works on sane cases.  Now check whether non-existent headers
2847   # can be detected and how.
2848   cat >conftest.$ac_ext <<_ACEOF
2849 #line $LINENO "configure"
2850 /* confdefs.h.  */
2851 _ACEOF
2852 cat confdefs.h >>conftest.$ac_ext
2853 cat >>conftest.$ac_ext <<_ACEOF
2854 /* end confdefs.h.  */
2855 #include <ac_nonexistent.h>
2856 _ACEOF
2857 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2858   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2859   ac_status=$?
2860   grep -v '^ *+' conftest.er1 >conftest.err
2861   rm -f conftest.er1
2862   cat conftest.err >&5
2863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2864   (exit $ac_status); } >/dev/null; then
2865   if test -s conftest.err; then
2866     ac_cpp_err=$ac_c_preproc_warn_flag
2867   else
2868     ac_cpp_err=
2869   fi
2870 else
2871   ac_cpp_err=yes
2872 fi
2873 if test -z "$ac_cpp_err"; then
2874   # Broken: success on invalid input.
2875 continue
2876 else
2877   echo "$as_me: failed program was:" >&5
2878 sed 's/^/| /' conftest.$ac_ext >&5
2879
2880   # Passes both tests.
2881 ac_preproc_ok=:
2882 break
2883 fi
2884 rm -f conftest.err conftest.$ac_ext
2885
2886 done
2887 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2888 rm -f conftest.err conftest.$ac_ext
2889 if $ac_preproc_ok; then
2890   :
2891 else
2892   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2893 See \`config.log' for more details." >&5
2894 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2895 See \`config.log' for more details." >&2;}
2896    { (exit 1); exit 1; }; }
2897 fi
2898
2899 ac_ext=c
2900 ac_cpp='$CPP $CPPFLAGS'
2901 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2902 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2903 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2904
2905 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
2906 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2907 if test "${ac_cv_c_const+set}" = set; then
2908   echo $ECHO_N "(cached) $ECHO_C" >&6
2909 else
2910   cat >conftest.$ac_ext <<_ACEOF
2911 #line $LINENO "configure"
2912 /* confdefs.h.  */
2913 _ACEOF
2914 cat confdefs.h >>conftest.$ac_ext
2915 cat >>conftest.$ac_ext <<_ACEOF
2916 /* end confdefs.h.  */
2917
2918 int
2919 main ()
2920 {
2921 /* FIXME: Include the comments suggested by Paul. */
2922 #ifndef __cplusplus
2923   /* Ultrix mips cc rejects this.  */
2924   typedef int charset[2];
2925   const charset x;
2926   /* SunOS 4.1.1 cc rejects this.  */
2927   char const *const *ccp;
2928   char **p;
2929   /* NEC SVR4.0.2 mips cc rejects this.  */
2930   struct point {int x, y;};
2931   static struct point const zero = {0,0};
2932   /* AIX XL C 1.02.0.0 rejects this.
2933      It does not let you subtract one const X* pointer from another in
2934      an arm of an if-expression whose if-part is not a constant
2935      expression */
2936   const char *g = "string";
2937   ccp = &g + (g ? g-g : 0);
2938   /* HPUX 7.0 cc rejects these. */
2939   ++ccp;
2940   p = (char**) ccp;
2941   ccp = (char const *const *) p;
2942   { /* SCO 3.2v4 cc rejects this.  */
2943     char *t;
2944     char const *s = 0 ? (char *) 0 : (char const *) 0;
2945
2946     *t++ = 0;
2947   }
2948   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2949     int x[] = {25, 17};
2950     const int *foo = &x[0];
2951     ++foo;
2952   }
2953   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2954     typedef const int *iptr;
2955     iptr p = 0;
2956     ++p;
2957   }
2958   { /* AIX XL C 1.02.0.0 rejects this saying
2959        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2960     struct s { int j; const int *ap[3]; };
2961     struct s *b; b->j = 5;
2962   }
2963   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2964     const int foo = 10;
2965   }
2966 #endif
2967
2968   ;
2969   return 0;
2970 }
2971 _ACEOF
2972 rm -f conftest.$ac_objext
2973 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2974   (eval $ac_compile) 2>&5
2975   ac_status=$?
2976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2977   (exit $ac_status); } &&
2978          { ac_try='test -s conftest.$ac_objext'
2979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2980   (eval $ac_try) 2>&5
2981   ac_status=$?
2982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2983   (exit $ac_status); }; }; then
2984   ac_cv_c_const=yes
2985 else
2986   echo "$as_me: failed program was:" >&5
2987 sed 's/^/| /' conftest.$ac_ext >&5
2988
2989 ac_cv_c_const=no
2990 fi
2991 rm -f conftest.$ac_objext conftest.$ac_ext
2992 fi
2993 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
2994 echo "${ECHO_T}$ac_cv_c_const" >&6
2995 if test $ac_cv_c_const = no; then
2996
2997 cat >>confdefs.h <<\_ACEOF
2998 #define const
2999 _ACEOF
3000
3001 fi
3002
3003 echo "$as_me:$LINENO: checking for inline" >&5
3004 echo $ECHO_N "checking for inline... $ECHO_C" >&6
3005 if test "${ac_cv_c_inline+set}" = set; then
3006   echo $ECHO_N "(cached) $ECHO_C" >&6
3007 else
3008   ac_cv_c_inline=no
3009 for ac_kw in inline __inline__ __inline; do
3010   cat >conftest.$ac_ext <<_ACEOF
3011 #line $LINENO "configure"
3012 /* confdefs.h.  */
3013 _ACEOF
3014 cat confdefs.h >>conftest.$ac_ext
3015 cat >>conftest.$ac_ext <<_ACEOF
3016 /* end confdefs.h.  */
3017 #ifndef __cplusplus
3018 typedef int foo_t;
3019 static $ac_kw foo_t static_foo () {return 0; }
3020 $ac_kw foo_t foo () {return 0; }
3021 #endif
3022
3023 _ACEOF
3024 rm -f conftest.$ac_objext
3025 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3026   (eval $ac_compile) 2>&5
3027   ac_status=$?
3028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3029   (exit $ac_status); } &&
3030          { ac_try='test -s conftest.$ac_objext'
3031   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3032   (eval $ac_try) 2>&5
3033   ac_status=$?
3034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3035   (exit $ac_status); }; }; then
3036   ac_cv_c_inline=$ac_kw; break
3037 else
3038   echo "$as_me: failed program was:" >&5
3039 sed 's/^/| /' conftest.$ac_ext >&5
3040
3041 fi
3042 rm -f conftest.$ac_objext conftest.$ac_ext
3043 done
3044
3045 fi
3046 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3047 echo "${ECHO_T}$ac_cv_c_inline" >&6
3048 case $ac_cv_c_inline in
3049   inline | yes) ;;
3050   no)
3051 cat >>confdefs.h <<\_ACEOF
3052 #define inline
3053 _ACEOF
3054  ;;
3055   *)  cat >>confdefs.h <<_ACEOF
3056 #define inline $ac_cv_c_inline
3057 _ACEOF
3058  ;;
3059 esac
3060
3061
3062 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3063   echo "$as_me:$LINENO: checking for bc" >&5
3064 echo $ECHO_N "checking for bc... $ECHO_C" >&6
3065   if test "$ac_bc_result" = "15" ; then
3066     echo "$as_me:$LINENO: result: yes" >&5
3067 echo "${ECHO_T}yes" >&6
3068   else
3069     echo "$as_me:$LINENO: result: no" >&5
3070 echo "${ECHO_T}no" >&6
3071     echo ''
3072     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3073                   part of Unix since the 1970s.  Come back when your vendor
3074                   has grown a clue." >&5
3075 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3076                   part of Unix since the 1970s.  Come back when your vendor
3077                   has grown a clue." >&2;}
3078    { (exit 1); exit 1; }; }
3079   fi
3080
3081
3082 # stuff for Makefiles
3083 # Find a good install program.  We prefer a C program (faster),
3084 # so one script is as good as another.  But avoid the broken or
3085 # incompatible versions:
3086 # SysV /etc/install, /usr/sbin/install
3087 # SunOS /usr/etc/install
3088 # IRIX /sbin/install
3089 # AIX /bin/install
3090 # AmigaOS /C/install, which installs bootblocks on floppy discs
3091 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3092 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3093 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3094 # ./install, which can be erroneously created by make from ./install.sh.
3095 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3096 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3097 if test -z "$INSTALL"; then
3098 if test "${ac_cv_path_install+set}" = set; then
3099   echo $ECHO_N "(cached) $ECHO_C" >&6
3100 else
3101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3102 for as_dir in $PATH
3103 do
3104   IFS=$as_save_IFS
3105   test -z "$as_dir" && as_dir=.
3106   # Account for people who put trailing slashes in PATH elements.
3107 case $as_dir/ in
3108   ./ | .// | /cC/* | \
3109   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3110   /usr/ucb/* ) ;;
3111   *)
3112     # OSF1 and SCO ODT 3.0 have their own names for install.
3113     # Don't use installbsd from OSF since it installs stuff as root
3114     # by default.
3115     for ac_prog in ginstall scoinst install; do
3116       for ac_exec_ext in '' $ac_executable_extensions; do
3117         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3118           if test $ac_prog = install &&
3119             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3120             # AIX install.  It has an incompatible calling convention.
3121             :
3122           elif test $ac_prog = install &&
3123             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3124             # program-specific install script used by HP pwplus--don't use.
3125             :
3126           else
3127             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3128             break 3
3129           fi
3130         fi
3131       done
3132     done
3133     ;;
3134 esac
3135 done
3136
3137
3138 fi
3139   if test "${ac_cv_path_install+set}" = set; then
3140     INSTALL=$ac_cv_path_install
3141   else
3142     # As a last resort, use the slow shell script.  We don't cache a
3143     # path for INSTALL within a source directory, because that will
3144     # break other packages using the cache if that directory is
3145     # removed, or if the path is relative.
3146     INSTALL=$ac_install_sh
3147   fi
3148 fi
3149 echo "$as_me:$LINENO: result: $INSTALL" >&5
3150 echo "${ECHO_T}$INSTALL" >&6
3151
3152 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3153 # It thinks the first close brace ends the variable substitution.
3154 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3155
3156 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3157
3158 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3159
3160 echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
3161 echo $ECHO_N "checking whether \"\${INSTALL} -d\" creates intermediate directories... $ECHO_C" >&6
3162 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
3163   echo $ECHO_N "(cached) $ECHO_C" >&6
3164 else
3165   ac_cv_install_d_creates_dirs=no
3166      rm -rf conftestdir
3167      if mkdir conftestdir; then
3168        cd conftestdir 2>/dev/null
3169        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
3170        if test -d dir1/dir2/. ; then
3171          ac_cv_install_d_creates_dirs=yes
3172        fi
3173        cd .. 2>/dev/null
3174        rm -rf conftestdir
3175      fi
3176
3177 fi
3178 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
3179 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
3180
3181   if test "$ac_cv_install_d_creates_dirs" = no ; then
3182     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
3183 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
3184 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
3185   echo $ECHO_N "(cached) $ECHO_C" >&6
3186 else
3187   ac_cv_mkdir_p_creates_dirs=no
3188        rm -rf conftestdir
3189        if mkdir conftestdir; then
3190          cd conftestdir 2>/dev/null
3191          mkdir -p dir1/dir2 >/dev/null 2>&1
3192          if test -d dir1/dir2/. ; then
3193            ac_cv_mkdir_p_creates_dirs=yes
3194          fi
3195          cd .. 2>/dev/null
3196          rm -rf conftestdir
3197        fi
3198
3199 fi
3200 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3201 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3202   fi
3203
3204   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3205     INSTALL_DIRS='${INSTALL} -d'
3206   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3207     INSTALL_DIRS='mkdir -p'
3208   else
3209     # any other ideas?
3210     INSTALL_DIRS='${INSTALL} -d'
3211   fi
3212
3213 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3214 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3215 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3216 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3217   echo $ECHO_N "(cached) $ECHO_C" >&6
3218 else
3219   cat >conftest.make <<\_ACEOF
3220 all:
3221         @echo 'ac_maketemp="$(MAKE)"'
3222 _ACEOF
3223 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3224 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3225 if test -n "$ac_maketemp"; then
3226   eval ac_cv_prog_make_${ac_make}_set=yes
3227 else
3228   eval ac_cv_prog_make_${ac_make}_set=no
3229 fi
3230 rm -f conftest.make
3231 fi
3232 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3233   echo "$as_me:$LINENO: result: yes" >&5
3234 echo "${ECHO_T}yes" >&6
3235   SET_MAKE=
3236 else
3237   echo "$as_me:$LINENO: result: no" >&5
3238 echo "${ECHO_T}no" >&6
3239   SET_MAKE="MAKE=${MAKE-make}"
3240 fi
3241
3242
3243 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3244 # That's wrong: it should be set to '${INSTALL}', so that one can
3245 # implement the "install-strip" target properly (strip executables,
3246 # but do not try to strip scripts.)
3247 #
3248 INSTALL_SCRIPT='${INSTALL}'
3249
3250 # random libc stuff
3251
3252 echo "$as_me:$LINENO: checking for egrep" >&5
3253 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3254 if test "${ac_cv_prog_egrep+set}" = set; then
3255   echo $ECHO_N "(cached) $ECHO_C" >&6
3256 else
3257   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3258     then ac_cv_prog_egrep='grep -E'
3259     else ac_cv_prog_egrep='egrep'
3260     fi
3261 fi
3262 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3263 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3264  EGREP=$ac_cv_prog_egrep
3265
3266
3267 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3268 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3269 if test "${ac_cv_header_stdc+set}" = set; then
3270   echo $ECHO_N "(cached) $ECHO_C" >&6
3271 else
3272   cat >conftest.$ac_ext <<_ACEOF
3273 #line $LINENO "configure"
3274 /* confdefs.h.  */
3275 _ACEOF
3276 cat confdefs.h >>conftest.$ac_ext
3277 cat >>conftest.$ac_ext <<_ACEOF
3278 /* end confdefs.h.  */
3279 #include <stdlib.h>
3280 #include <stdarg.h>
3281 #include <string.h>
3282 #include <float.h>
3283
3284 int
3285 main ()
3286 {
3287
3288   ;
3289   return 0;
3290 }
3291 _ACEOF
3292 rm -f conftest.$ac_objext
3293 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3294   (eval $ac_compile) 2>&5
3295   ac_status=$?
3296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3297   (exit $ac_status); } &&
3298          { ac_try='test -s conftest.$ac_objext'
3299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3300   (eval $ac_try) 2>&5
3301   ac_status=$?
3302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3303   (exit $ac_status); }; }; then
3304   ac_cv_header_stdc=yes
3305 else
3306   echo "$as_me: failed program was:" >&5
3307 sed 's/^/| /' conftest.$ac_ext >&5
3308
3309 ac_cv_header_stdc=no
3310 fi
3311 rm -f conftest.$ac_objext conftest.$ac_ext
3312
3313 if test $ac_cv_header_stdc = yes; then
3314   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3315   cat >conftest.$ac_ext <<_ACEOF
3316 #line $LINENO "configure"
3317 /* confdefs.h.  */
3318 _ACEOF
3319 cat confdefs.h >>conftest.$ac_ext
3320 cat >>conftest.$ac_ext <<_ACEOF
3321 /* end confdefs.h.  */
3322 #include <string.h>
3323
3324 _ACEOF
3325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3326   $EGREP "memchr" >/dev/null 2>&1; then
3327   :
3328 else
3329   ac_cv_header_stdc=no
3330 fi
3331 rm -f conftest*
3332
3333 fi
3334
3335 if test $ac_cv_header_stdc = yes; then
3336   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3337   cat >conftest.$ac_ext <<_ACEOF
3338 #line $LINENO "configure"
3339 /* confdefs.h.  */
3340 _ACEOF
3341 cat confdefs.h >>conftest.$ac_ext
3342 cat >>conftest.$ac_ext <<_ACEOF
3343 /* end confdefs.h.  */
3344 #include <stdlib.h>
3345
3346 _ACEOF
3347 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3348   $EGREP "free" >/dev/null 2>&1; then
3349   :
3350 else
3351   ac_cv_header_stdc=no
3352 fi
3353 rm -f conftest*
3354
3355 fi
3356
3357 if test $ac_cv_header_stdc = yes; then
3358   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3359   if test "$cross_compiling" = yes; then
3360   :
3361 else
3362   cat >conftest.$ac_ext <<_ACEOF
3363 #line $LINENO "configure"
3364 /* confdefs.h.  */
3365 _ACEOF
3366 cat confdefs.h >>conftest.$ac_ext
3367 cat >>conftest.$ac_ext <<_ACEOF
3368 /* end confdefs.h.  */
3369 #include <ctype.h>
3370 #if ((' ' & 0x0FF) == 0x020)
3371 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3372 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3373 #else
3374 # define ISLOWER(c) \
3375                    (('a' <= (c) && (c) <= 'i') \
3376                      || ('j' <= (c) && (c) <= 'r') \
3377                      || ('s' <= (c) && (c) <= 'z'))
3378 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3379 #endif
3380
3381 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3382 int
3383 main ()
3384 {
3385   int i;
3386   for (i = 0; i < 256; i++)
3387     if (XOR (islower (i), ISLOWER (i))
3388         || toupper (i) != TOUPPER (i))
3389       exit(2);
3390   exit (0);
3391 }
3392 _ACEOF
3393 rm -f conftest$ac_exeext
3394 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3395   (eval $ac_link) 2>&5
3396   ac_status=$?
3397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3398   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3400   (eval $ac_try) 2>&5
3401   ac_status=$?
3402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3403   (exit $ac_status); }; }; then
3404   :
3405 else
3406   echo "$as_me: program exited with status $ac_status" >&5
3407 echo "$as_me: failed program was:" >&5
3408 sed 's/^/| /' conftest.$ac_ext >&5
3409
3410 ( exit $ac_status )
3411 ac_cv_header_stdc=no
3412 fi
3413 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3414 fi
3415 fi
3416 fi
3417 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3418 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3419 if test $ac_cv_header_stdc = yes; then
3420
3421 cat >>confdefs.h <<\_ACEOF
3422 #define STDC_HEADERS 1
3423 _ACEOF
3424
3425 fi
3426
3427 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3438                   inttypes.h stdint.h unistd.h
3439 do
3440 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3441 echo "$as_me:$LINENO: checking for $ac_header" >&5
3442 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3443 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3444   echo $ECHO_N "(cached) $ECHO_C" >&6
3445 else
3446   cat >conftest.$ac_ext <<_ACEOF
3447 #line $LINENO "configure"
3448 /* confdefs.h.  */
3449 _ACEOF
3450 cat confdefs.h >>conftest.$ac_ext
3451 cat >>conftest.$ac_ext <<_ACEOF
3452 /* end confdefs.h.  */
3453 $ac_includes_default
3454
3455 #include <$ac_header>
3456 _ACEOF
3457 rm -f conftest.$ac_objext
3458 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3459   (eval $ac_compile) 2>&5
3460   ac_status=$?
3461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3462   (exit $ac_status); } &&
3463          { ac_try='test -s conftest.$ac_objext'
3464   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3465   (eval $ac_try) 2>&5
3466   ac_status=$?
3467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3468   (exit $ac_status); }; }; then
3469   eval "$as_ac_Header=yes"
3470 else
3471   echo "$as_me: failed program was:" >&5
3472 sed 's/^/| /' conftest.$ac_ext >&5
3473
3474 eval "$as_ac_Header=no"
3475 fi
3476 rm -f conftest.$ac_objext conftest.$ac_ext
3477 fi
3478 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3479 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3480 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3481   cat >>confdefs.h <<_ACEOF
3482 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3483 _ACEOF
3484
3485 fi
3486
3487 done
3488
3489
3490
3491 for ac_header in unistd.h
3492 do
3493 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3494 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3495   echo "$as_me:$LINENO: checking for $ac_header" >&5
3496 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3497 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3498   echo $ECHO_N "(cached) $ECHO_C" >&6
3499 fi
3500 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3501 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3502 else
3503   # Is the header compilable?
3504 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3505 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3506 cat >conftest.$ac_ext <<_ACEOF
3507 #line $LINENO "configure"
3508 /* confdefs.h.  */
3509 _ACEOF
3510 cat confdefs.h >>conftest.$ac_ext
3511 cat >>conftest.$ac_ext <<_ACEOF
3512 /* end confdefs.h.  */
3513 $ac_includes_default
3514 #include <$ac_header>
3515 _ACEOF
3516 rm -f conftest.$ac_objext
3517 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3518   (eval $ac_compile) 2>&5
3519   ac_status=$?
3520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3521   (exit $ac_status); } &&
3522          { ac_try='test -s conftest.$ac_objext'
3523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3524   (eval $ac_try) 2>&5
3525   ac_status=$?
3526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3527   (exit $ac_status); }; }; then
3528   ac_header_compiler=yes
3529 else
3530   echo "$as_me: failed program was:" >&5
3531 sed 's/^/| /' conftest.$ac_ext >&5
3532
3533 ac_header_compiler=no
3534 fi
3535 rm -f conftest.$ac_objext conftest.$ac_ext
3536 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3537 echo "${ECHO_T}$ac_header_compiler" >&6
3538
3539 # Is the header present?
3540 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3541 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3542 cat >conftest.$ac_ext <<_ACEOF
3543 #line $LINENO "configure"
3544 /* confdefs.h.  */
3545 _ACEOF
3546 cat confdefs.h >>conftest.$ac_ext
3547 cat >>conftest.$ac_ext <<_ACEOF
3548 /* end confdefs.h.  */
3549 #include <$ac_header>
3550 _ACEOF
3551 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3552   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3553   ac_status=$?
3554   grep -v '^ *+' conftest.er1 >conftest.err
3555   rm -f conftest.er1
3556   cat conftest.err >&5
3557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3558   (exit $ac_status); } >/dev/null; then
3559   if test -s conftest.err; then
3560     ac_cpp_err=$ac_c_preproc_warn_flag
3561   else
3562     ac_cpp_err=
3563   fi
3564 else
3565   ac_cpp_err=yes
3566 fi
3567 if test -z "$ac_cpp_err"; then
3568   ac_header_preproc=yes
3569 else
3570   echo "$as_me: failed program was:" >&5
3571 sed 's/^/| /' conftest.$ac_ext >&5
3572
3573   ac_header_preproc=no
3574 fi
3575 rm -f conftest.err conftest.$ac_ext
3576 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3577 echo "${ECHO_T}$ac_header_preproc" >&6
3578
3579 # So?  What about this header?
3580 case $ac_header_compiler:$ac_header_preproc in
3581   yes:no )
3582     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3583 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3584     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3585 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3586     (
3587       cat <<\_ASBOX
3588 ## ------------------------------------ ##
3589 ## Report this to bug-autoconf@gnu.org. ##
3590 ## ------------------------------------ ##
3591 _ASBOX
3592     ) |
3593       sed "s/^/$as_me: WARNING:     /" >&2
3594     ;;
3595   no:yes )
3596     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3597 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3598     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3599 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3600     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3601 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3602     (
3603       cat <<\_ASBOX
3604 ## ------------------------------------ ##
3605 ## Report this to bug-autoconf@gnu.org. ##
3606 ## ------------------------------------ ##
3607 _ASBOX
3608     ) |
3609       sed "s/^/$as_me: WARNING:     /" >&2
3610     ;;
3611 esac
3612 echo "$as_me:$LINENO: checking for $ac_header" >&5
3613 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3614 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3615   echo $ECHO_N "(cached) $ECHO_C" >&6
3616 else
3617   eval "$as_ac_Header=$ac_header_preproc"
3618 fi
3619 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3620 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3621
3622 fi
3623 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3624   cat >>confdefs.h <<_ACEOF
3625 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3626 _ACEOF
3627
3628 fi
3629
3630 done
3631
3632 echo "$as_me:$LINENO: checking for mode_t" >&5
3633 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3634 if test "${ac_cv_type_mode_t+set}" = set; then
3635   echo $ECHO_N "(cached) $ECHO_C" >&6
3636 else
3637   cat >conftest.$ac_ext <<_ACEOF
3638 #line $LINENO "configure"
3639 /* confdefs.h.  */
3640 _ACEOF
3641 cat confdefs.h >>conftest.$ac_ext
3642 cat >>conftest.$ac_ext <<_ACEOF
3643 /* end confdefs.h.  */
3644 $ac_includes_default
3645 int
3646 main ()
3647 {
3648 if ((mode_t *) 0)
3649   return 0;
3650 if (sizeof (mode_t))
3651   return 0;
3652   ;
3653   return 0;
3654 }
3655 _ACEOF
3656 rm -f conftest.$ac_objext
3657 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3658   (eval $ac_compile) 2>&5
3659   ac_status=$?
3660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3661   (exit $ac_status); } &&
3662          { ac_try='test -s conftest.$ac_objext'
3663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3664   (eval $ac_try) 2>&5
3665   ac_status=$?
3666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3667   (exit $ac_status); }; }; then
3668   ac_cv_type_mode_t=yes
3669 else
3670   echo "$as_me: failed program was:" >&5
3671 sed 's/^/| /' conftest.$ac_ext >&5
3672
3673 ac_cv_type_mode_t=no
3674 fi
3675 rm -f conftest.$ac_objext conftest.$ac_ext
3676 fi
3677 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
3678 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3679 if test $ac_cv_type_mode_t = yes; then
3680   :
3681 else
3682
3683 cat >>confdefs.h <<_ACEOF
3684 #define mode_t int
3685 _ACEOF
3686
3687 fi
3688
3689 echo "$as_me:$LINENO: checking for pid_t" >&5
3690 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
3691 if test "${ac_cv_type_pid_t+set}" = set; then
3692   echo $ECHO_N "(cached) $ECHO_C" >&6
3693 else
3694   cat >conftest.$ac_ext <<_ACEOF
3695 #line $LINENO "configure"
3696 /* confdefs.h.  */
3697 _ACEOF
3698 cat confdefs.h >>conftest.$ac_ext
3699 cat >>conftest.$ac_ext <<_ACEOF
3700 /* end confdefs.h.  */
3701 $ac_includes_default
3702 int
3703 main ()
3704 {
3705 if ((pid_t *) 0)
3706   return 0;
3707 if (sizeof (pid_t))
3708   return 0;
3709   ;
3710   return 0;
3711 }
3712 _ACEOF
3713 rm -f conftest.$ac_objext
3714 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3715   (eval $ac_compile) 2>&5
3716   ac_status=$?
3717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3718   (exit $ac_status); } &&
3719          { ac_try='test -s conftest.$ac_objext'
3720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3721   (eval $ac_try) 2>&5
3722   ac_status=$?
3723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3724   (exit $ac_status); }; }; then
3725   ac_cv_type_pid_t=yes
3726 else
3727   echo "$as_me: failed program was:" >&5
3728 sed 's/^/| /' conftest.$ac_ext >&5
3729
3730 ac_cv_type_pid_t=no
3731 fi
3732 rm -f conftest.$ac_objext conftest.$ac_ext
3733 fi
3734 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
3735 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3736 if test $ac_cv_type_pid_t = yes; then
3737   :
3738 else
3739
3740 cat >>confdefs.h <<_ACEOF
3741 #define pid_t int
3742 _ACEOF
3743
3744 fi
3745
3746 echo "$as_me:$LINENO: checking for size_t" >&5
3747 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
3748 if test "${ac_cv_type_size_t+set}" = set; then
3749   echo $ECHO_N "(cached) $ECHO_C" >&6
3750 else
3751   cat >conftest.$ac_ext <<_ACEOF
3752 #line $LINENO "configure"
3753 /* confdefs.h.  */
3754 _ACEOF
3755 cat confdefs.h >>conftest.$ac_ext
3756 cat >>conftest.$ac_ext <<_ACEOF
3757 /* end confdefs.h.  */
3758 $ac_includes_default
3759 int
3760 main ()
3761 {
3762 if ((size_t *) 0)
3763   return 0;
3764 if (sizeof (size_t))
3765   return 0;
3766   ;
3767   return 0;
3768 }
3769 _ACEOF
3770 rm -f conftest.$ac_objext
3771 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3772   (eval $ac_compile) 2>&5
3773   ac_status=$?
3774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3775   (exit $ac_status); } &&
3776          { ac_try='test -s conftest.$ac_objext'
3777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3778   (eval $ac_try) 2>&5
3779   ac_status=$?
3780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3781   (exit $ac_status); }; }; then
3782   ac_cv_type_size_t=yes
3783 else
3784   echo "$as_me: failed program was:" >&5
3785 sed 's/^/| /' conftest.$ac_ext >&5
3786
3787 ac_cv_type_size_t=no
3788 fi
3789 rm -f conftest.$ac_objext conftest.$ac_ext
3790 fi
3791 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
3792 echo "${ECHO_T}$ac_cv_type_size_t" >&6
3793 if test $ac_cv_type_size_t = yes; then
3794   :
3795 else
3796
3797 cat >>confdefs.h <<_ACEOF
3798 #define size_t unsigned
3799 _ACEOF
3800
3801 fi
3802
3803 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
3804 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
3805 if test "${ac_cv_type_signal+set}" = set; then
3806   echo $ECHO_N "(cached) $ECHO_C" >&6
3807 else
3808   cat >conftest.$ac_ext <<_ACEOF
3809 #line $LINENO "configure"
3810 /* confdefs.h.  */
3811 _ACEOF
3812 cat confdefs.h >>conftest.$ac_ext
3813 cat >>conftest.$ac_ext <<_ACEOF
3814 /* end confdefs.h.  */
3815 #include <sys/types.h>
3816 #include <signal.h>
3817 #ifdef signal
3818 # undef signal
3819 #endif
3820 #ifdef __cplusplus
3821 extern "C" void (*signal (int, void (*)(int)))(int);
3822 #else
3823 void (*signal ()) ();
3824 #endif
3825
3826 int
3827 main ()
3828 {
3829 int i;
3830   ;
3831   return 0;
3832 }
3833 _ACEOF
3834 rm -f conftest.$ac_objext
3835 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3836   (eval $ac_compile) 2>&5
3837   ac_status=$?
3838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3839   (exit $ac_status); } &&
3840          { ac_try='test -s conftest.$ac_objext'
3841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3842   (eval $ac_try) 2>&5
3843   ac_status=$?
3844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3845   (exit $ac_status); }; }; then
3846   ac_cv_type_signal=void
3847 else
3848   echo "$as_me: failed program was:" >&5
3849 sed 's/^/| /' conftest.$ac_ext >&5
3850
3851 ac_cv_type_signal=int
3852 fi
3853 rm -f conftest.$ac_objext conftest.$ac_ext
3854 fi
3855 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
3856 echo "${ECHO_T}$ac_cv_type_signal" >&6
3857
3858 cat >>confdefs.h <<_ACEOF
3859 #define RETSIGTYPE $ac_cv_type_signal
3860 _ACEOF
3861
3862
3863 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
3864 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3865 if test "${ac_cv_header_time+set}" = set; then
3866   echo $ECHO_N "(cached) $ECHO_C" >&6
3867 else
3868   cat >conftest.$ac_ext <<_ACEOF
3869 #line $LINENO "configure"
3870 /* confdefs.h.  */
3871 _ACEOF
3872 cat confdefs.h >>conftest.$ac_ext
3873 cat >>conftest.$ac_ext <<_ACEOF
3874 /* end confdefs.h.  */
3875 #include <sys/types.h>
3876 #include <sys/time.h>
3877 #include <time.h>
3878
3879 int
3880 main ()
3881 {
3882 if ((struct tm *) 0)
3883 return 0;
3884   ;
3885   return 0;
3886 }
3887 _ACEOF
3888 rm -f conftest.$ac_objext
3889 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3890   (eval $ac_compile) 2>&5
3891   ac_status=$?
3892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3893   (exit $ac_status); } &&
3894          { ac_try='test -s conftest.$ac_objext'
3895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3896   (eval $ac_try) 2>&5
3897   ac_status=$?
3898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3899   (exit $ac_status); }; }; then
3900   ac_cv_header_time=yes
3901 else
3902   echo "$as_me: failed program was:" >&5
3903 sed 's/^/| /' conftest.$ac_ext >&5
3904
3905 ac_cv_header_time=no
3906 fi
3907 rm -f conftest.$ac_objext conftest.$ac_ext
3908 fi
3909 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
3910 echo "${ECHO_T}$ac_cv_header_time" >&6
3911 if test $ac_cv_header_time = yes; then
3912
3913 cat >>confdefs.h <<\_ACEOF
3914 #define TIME_WITH_SYS_TIME 1
3915 _ACEOF
3916
3917 fi
3918
3919 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
3920 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
3921 if test "${ac_cv_header_sys_wait_h+set}" = set; then
3922   echo $ECHO_N "(cached) $ECHO_C" >&6
3923 else
3924   cat >conftest.$ac_ext <<_ACEOF
3925 #line $LINENO "configure"
3926 /* confdefs.h.  */
3927 _ACEOF
3928 cat confdefs.h >>conftest.$ac_ext
3929 cat >>conftest.$ac_ext <<_ACEOF
3930 /* end confdefs.h.  */
3931 #include <sys/types.h>
3932 #include <sys/wait.h>
3933 #ifndef WEXITSTATUS
3934 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3935 #endif
3936 #ifndef WIFEXITED
3937 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3938 #endif
3939
3940 int
3941 main ()
3942 {
3943   int s;
3944   wait (&s);
3945   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3946   ;
3947   return 0;
3948 }
3949 _ACEOF
3950 rm -f conftest.$ac_objext
3951 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3952   (eval $ac_compile) 2>&5
3953   ac_status=$?
3954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3955   (exit $ac_status); } &&
3956          { ac_try='test -s conftest.$ac_objext'
3957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3958   (eval $ac_try) 2>&5
3959   ac_status=$?
3960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3961   (exit $ac_status); }; }; then
3962   ac_cv_header_sys_wait_h=yes
3963 else
3964   echo "$as_me: failed program was:" >&5
3965 sed 's/^/| /' conftest.$ac_ext >&5
3966
3967 ac_cv_header_sys_wait_h=no
3968 fi
3969 rm -f conftest.$ac_objext conftest.$ac_ext
3970 fi
3971 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3972 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3973 if test $ac_cv_header_sys_wait_h = yes; then
3974
3975 cat >>confdefs.h <<\_ACEOF
3976 #define HAVE_SYS_WAIT_H 1
3977 _ACEOF
3978
3979 fi
3980
3981
3982
3983
3984
3985
3986 ac_header_dirent=no
3987 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3988   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3989 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3990 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3991 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3992   echo $ECHO_N "(cached) $ECHO_C" >&6
3993 else
3994   cat >conftest.$ac_ext <<_ACEOF
3995 #line $LINENO "configure"
3996 /* confdefs.h.  */
3997 _ACEOF
3998 cat confdefs.h >>conftest.$ac_ext
3999 cat >>conftest.$ac_ext <<_ACEOF
4000 /* end confdefs.h.  */
4001 #include <sys/types.h>
4002 #include <$ac_hdr>
4003
4004 int
4005 main ()
4006 {
4007 if ((DIR *) 0)
4008 return 0;
4009   ;
4010   return 0;
4011 }
4012 _ACEOF
4013 rm -f conftest.$ac_objext
4014 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4015   (eval $ac_compile) 2>&5
4016   ac_status=$?
4017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4018   (exit $ac_status); } &&
4019          { ac_try='test -s conftest.$ac_objext'
4020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4021   (eval $ac_try) 2>&5
4022   ac_status=$?
4023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4024   (exit $ac_status); }; }; then
4025   eval "$as_ac_Header=yes"
4026 else
4027   echo "$as_me: failed program was:" >&5
4028 sed 's/^/| /' conftest.$ac_ext >&5
4029
4030 eval "$as_ac_Header=no"
4031 fi
4032 rm -f conftest.$ac_objext conftest.$ac_ext
4033 fi
4034 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4035 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4036 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4037   cat >>confdefs.h <<_ACEOF
4038 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4039 _ACEOF
4040
4041 ac_header_dirent=$ac_hdr; break
4042 fi
4043
4044 done
4045 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4046 if test $ac_header_dirent = dirent.h; then
4047   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4048 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4049 if test "${ac_cv_search_opendir+set}" = set; then
4050   echo $ECHO_N "(cached) $ECHO_C" >&6
4051 else
4052   ac_func_search_save_LIBS=$LIBS
4053 ac_cv_search_opendir=no
4054 cat >conftest.$ac_ext <<_ACEOF
4055 #line $LINENO "configure"
4056 /* confdefs.h.  */
4057 _ACEOF
4058 cat confdefs.h >>conftest.$ac_ext
4059 cat >>conftest.$ac_ext <<_ACEOF
4060 /* end confdefs.h.  */
4061
4062 /* Override any gcc2 internal prototype to avoid an error.  */
4063 #ifdef __cplusplus
4064 extern "C"
4065 #endif
4066 /* We use char because int might match the return type of a gcc2
4067    builtin and then its argument prototype would still apply.  */
4068 char opendir ();
4069 int
4070 main ()
4071 {
4072 opendir ();
4073   ;
4074   return 0;
4075 }
4076 _ACEOF
4077 rm -f conftest.$ac_objext conftest$ac_exeext
4078 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4079   (eval $ac_link) 2>&5
4080   ac_status=$?
4081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4082   (exit $ac_status); } &&
4083          { ac_try='test -s conftest$ac_exeext'
4084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4085   (eval $ac_try) 2>&5
4086   ac_status=$?
4087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4088   (exit $ac_status); }; }; then
4089   ac_cv_search_opendir="none required"
4090 else
4091   echo "$as_me: failed program was:" >&5
4092 sed 's/^/| /' conftest.$ac_ext >&5
4093
4094 fi
4095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4096 if test "$ac_cv_search_opendir" = no; then
4097   for ac_lib in dir; do
4098     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4099     cat >conftest.$ac_ext <<_ACEOF
4100 #line $LINENO "configure"
4101 /* confdefs.h.  */
4102 _ACEOF
4103 cat confdefs.h >>conftest.$ac_ext
4104 cat >>conftest.$ac_ext <<_ACEOF
4105 /* end confdefs.h.  */
4106
4107 /* Override any gcc2 internal prototype to avoid an error.  */
4108 #ifdef __cplusplus
4109 extern "C"
4110 #endif
4111 /* We use char because int might match the return type of a gcc2
4112    builtin and then its argument prototype would still apply.  */
4113 char opendir ();
4114 int
4115 main ()
4116 {
4117 opendir ();
4118   ;
4119   return 0;
4120 }
4121 _ACEOF
4122 rm -f conftest.$ac_objext conftest$ac_exeext
4123 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4124   (eval $ac_link) 2>&5
4125   ac_status=$?
4126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4127   (exit $ac_status); } &&
4128          { ac_try='test -s conftest$ac_exeext'
4129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4130   (eval $ac_try) 2>&5
4131   ac_status=$?
4132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4133   (exit $ac_status); }; }; then
4134   ac_cv_search_opendir="-l$ac_lib"
4135 break
4136 else
4137   echo "$as_me: failed program was:" >&5
4138 sed 's/^/| /' conftest.$ac_ext >&5
4139
4140 fi
4141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4142   done
4143 fi
4144 LIBS=$ac_func_search_save_LIBS
4145 fi
4146 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4147 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4148 if test "$ac_cv_search_opendir" != no; then
4149   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4150
4151 fi
4152
4153 else
4154   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4155 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4156 if test "${ac_cv_search_opendir+set}" = set; then
4157   echo $ECHO_N "(cached) $ECHO_C" >&6
4158 else
4159   ac_func_search_save_LIBS=$LIBS
4160 ac_cv_search_opendir=no
4161 cat >conftest.$ac_ext <<_ACEOF
4162 #line $LINENO "configure"
4163 /* confdefs.h.  */
4164 _ACEOF
4165 cat confdefs.h >>conftest.$ac_ext
4166 cat >>conftest.$ac_ext <<_ACEOF
4167 /* end confdefs.h.  */
4168
4169 /* Override any gcc2 internal prototype to avoid an error.  */
4170 #ifdef __cplusplus
4171 extern "C"
4172 #endif
4173 /* We use char because int might match the return type of a gcc2
4174    builtin and then its argument prototype would still apply.  */
4175 char opendir ();
4176 int
4177 main ()
4178 {
4179 opendir ();
4180   ;
4181   return 0;
4182 }
4183 _ACEOF
4184 rm -f conftest.$ac_objext conftest$ac_exeext
4185 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4186   (eval $ac_link) 2>&5
4187   ac_status=$?
4188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4189   (exit $ac_status); } &&
4190          { ac_try='test -s conftest$ac_exeext'
4191   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4192   (eval $ac_try) 2>&5
4193   ac_status=$?
4194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195   (exit $ac_status); }; }; then
4196   ac_cv_search_opendir="none required"
4197 else
4198   echo "$as_me: failed program was:" >&5
4199 sed 's/^/| /' conftest.$ac_ext >&5
4200
4201 fi
4202 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4203 if test "$ac_cv_search_opendir" = no; then
4204   for ac_lib in x; do
4205     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4206     cat >conftest.$ac_ext <<_ACEOF
4207 #line $LINENO "configure"
4208 /* confdefs.h.  */
4209 _ACEOF
4210 cat confdefs.h >>conftest.$ac_ext
4211 cat >>conftest.$ac_ext <<_ACEOF
4212 /* end confdefs.h.  */
4213
4214 /* Override any gcc2 internal prototype to avoid an error.  */
4215 #ifdef __cplusplus
4216 extern "C"
4217 #endif
4218 /* We use char because int might match the return type of a gcc2
4219    builtin and then its argument prototype would still apply.  */
4220 char opendir ();
4221 int
4222 main ()
4223 {
4224 opendir ();
4225   ;
4226   return 0;
4227 }
4228 _ACEOF
4229 rm -f conftest.$ac_objext conftest$ac_exeext
4230 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4231   (eval $ac_link) 2>&5
4232   ac_status=$?
4233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4234   (exit $ac_status); } &&
4235          { ac_try='test -s conftest$ac_exeext'
4236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4237   (eval $ac_try) 2>&5
4238   ac_status=$?
4239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4240   (exit $ac_status); }; }; then
4241   ac_cv_search_opendir="-l$ac_lib"
4242 break
4243 else
4244   echo "$as_me: failed program was:" >&5
4245 sed 's/^/| /' conftest.$ac_ext >&5
4246
4247 fi
4248 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4249   done
4250 fi
4251 LIBS=$ac_func_search_save_LIBS
4252 fi
4253 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4254 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4255 if test "$ac_cv_search_opendir" != no; then
4256   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4257
4258 fi
4259
4260 fi
4261
4262 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4263 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4264   if test "${ac_cv_gettimeofday_args+set}" = set; then
4265   echo $ECHO_N "(cached) $ECHO_C" >&6
4266 else
4267   cat >conftest.$ac_ext <<_ACEOF
4268 #line $LINENO "configure"
4269 /* confdefs.h.  */
4270 _ACEOF
4271 cat confdefs.h >>conftest.$ac_ext
4272 cat >>conftest.$ac_ext <<_ACEOF
4273 /* end confdefs.h.  */
4274 #include <stdlib.h>
4275                     #include <sys/time.h>
4276 int
4277 main ()
4278 {
4279 struct timeval tv; struct timezone tzp;
4280                     gettimeofday(&tv, &tzp);
4281   ;
4282   return 0;
4283 }
4284 _ACEOF
4285 rm -f conftest.$ac_objext
4286 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4287   (eval $ac_compile) 2>&5
4288   ac_status=$?
4289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4290   (exit $ac_status); } &&
4291          { ac_try='test -s conftest.$ac_objext'
4292   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4293   (eval $ac_try) 2>&5
4294   ac_status=$?
4295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4296   (exit $ac_status); }; }; then
4297   ac_gettimeofday_args=2
4298 else
4299   echo "$as_me: failed program was:" >&5
4300 sed 's/^/| /' conftest.$ac_ext >&5
4301
4302 cat >conftest.$ac_ext <<_ACEOF
4303 #line $LINENO "configure"
4304 /* confdefs.h.  */
4305 _ACEOF
4306 cat confdefs.h >>conftest.$ac_ext
4307 cat >>conftest.$ac_ext <<_ACEOF
4308 /* end confdefs.h.  */
4309 #include <stdlib.h>
4310                                     #include <sys/time.h>
4311 int
4312 main ()
4313 {
4314 struct timeval tv; gettimeofday(&tv);
4315   ;
4316   return 0;
4317 }
4318 _ACEOF
4319 rm -f conftest.$ac_objext
4320 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4321   (eval $ac_compile) 2>&5
4322   ac_status=$?
4323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4324   (exit $ac_status); } &&
4325          { ac_try='test -s conftest.$ac_objext'
4326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4327   (eval $ac_try) 2>&5
4328   ac_status=$?
4329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4330   (exit $ac_status); }; }; then
4331   ac_gettimeofday_args=1
4332 else
4333   echo "$as_me: failed program was:" >&5
4334 sed 's/^/| /' conftest.$ac_ext >&5
4335
4336 ac_gettimeofday_args=0
4337 fi
4338 rm -f conftest.$ac_objext conftest.$ac_ext
4339 fi
4340 rm -f conftest.$ac_objext conftest.$ac_ext
4341     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4342 fi
4343
4344   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4345   if test "$ac_gettimeofday_args" = 1 ; then
4346     cat >>confdefs.h <<\_ACEOF
4347 #define HAVE_GETTIMEOFDAY 1
4348 _ACEOF
4349
4350     echo "$as_me:$LINENO: result: one argument" >&5
4351 echo "${ECHO_T}one argument" >&6
4352   elif test "$ac_gettimeofday_args" = 2 ; then
4353     cat >>confdefs.h <<\_ACEOF
4354 #define HAVE_GETTIMEOFDAY 1
4355 _ACEOF
4356
4357     cat >>confdefs.h <<\_ACEOF
4358 #define GETTIMEOFDAY_TWO_ARGS 1
4359 _ACEOF
4360
4361     echo "$as_me:$LINENO: result: two arguments" >&5
4362 echo "${ECHO_T}two arguments" >&6
4363   else
4364     echo "$as_me:$LINENO: result: unknown" >&5
4365 echo "${ECHO_T}unknown" >&6
4366   fi
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4378 do
4379 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4380 echo "$as_me:$LINENO: checking for $ac_func" >&5
4381 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4382 if eval "test \"\${$as_ac_var+set}\" = set"; then
4383   echo $ECHO_N "(cached) $ECHO_C" >&6
4384 else
4385   cat >conftest.$ac_ext <<_ACEOF
4386 #line $LINENO "configure"
4387 /* confdefs.h.  */
4388 _ACEOF
4389 cat confdefs.h >>conftest.$ac_ext
4390 cat >>conftest.$ac_ext <<_ACEOF
4391 /* end confdefs.h.  */
4392 /* System header to define __stub macros and hopefully few prototypes,
4393     which can conflict with char $ac_func (); below.
4394     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4395     <limits.h> exists even on freestanding compilers.  */
4396 #ifdef __STDC__
4397 # include <limits.h>
4398 #else
4399 # include <assert.h>
4400 #endif
4401 /* Override any gcc2 internal prototype to avoid an error.  */
4402 #ifdef __cplusplus
4403 extern "C"
4404 {
4405 #endif
4406 /* We use char because int might match the return type of a gcc2
4407    builtin and then its argument prototype would still apply.  */
4408 char $ac_func ();
4409 /* The GNU C library defines this for functions which it implements
4410     to always fail with ENOSYS.  Some functions are actually named
4411     something starting with __ and the normal name is an alias.  */
4412 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4413 choke me
4414 #else
4415 char (*f) () = $ac_func;
4416 #endif
4417 #ifdef __cplusplus
4418 }
4419 #endif
4420
4421 int
4422 main ()
4423 {
4424 return f != $ac_func;
4425   ;
4426   return 0;
4427 }
4428 _ACEOF
4429 rm -f conftest.$ac_objext conftest$ac_exeext
4430 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4431   (eval $ac_link) 2>&5
4432   ac_status=$?
4433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4434   (exit $ac_status); } &&
4435          { ac_try='test -s conftest$ac_exeext'
4436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4437   (eval $ac_try) 2>&5
4438   ac_status=$?
4439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4440   (exit $ac_status); }; }; then
4441   eval "$as_ac_var=yes"
4442 else
4443   echo "$as_me: failed program was:" >&5
4444 sed 's/^/| /' conftest.$ac_ext >&5
4445
4446 eval "$as_ac_var=no"
4447 fi
4448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4449 fi
4450 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4451 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4452 if test `eval echo '${'$as_ac_var'}'` = yes; then
4453   cat >>confdefs.h <<_ACEOF
4454 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4455 _ACEOF
4456
4457 fi
4458 done
4459
4460
4461
4462
4463
4464 for ac_func in sigaction syslog realpath setrlimit
4465 do
4466 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4467 echo "$as_me:$LINENO: checking for $ac_func" >&5
4468 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4469 if eval "test \"\${$as_ac_var+set}\" = set"; then
4470   echo $ECHO_N "(cached) $ECHO_C" >&6
4471 else
4472   cat >conftest.$ac_ext <<_ACEOF
4473 #line $LINENO "configure"
4474 /* confdefs.h.  */
4475 _ACEOF
4476 cat confdefs.h >>conftest.$ac_ext
4477 cat >>conftest.$ac_ext <<_ACEOF
4478 /* end confdefs.h.  */
4479 /* System header to define __stub macros and hopefully few prototypes,
4480     which can conflict with char $ac_func (); below.
4481     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4482     <limits.h> exists even on freestanding compilers.  */
4483 #ifdef __STDC__
4484 # include <limits.h>
4485 #else
4486 # include <assert.h>
4487 #endif
4488 /* Override any gcc2 internal prototype to avoid an error.  */
4489 #ifdef __cplusplus
4490 extern "C"
4491 {
4492 #endif
4493 /* We use char because int might match the return type of a gcc2
4494    builtin and then its argument prototype would still apply.  */
4495 char $ac_func ();
4496 /* The GNU C library defines this for functions which it implements
4497     to always fail with ENOSYS.  Some functions are actually named
4498     something starting with __ and the normal name is an alias.  */
4499 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4500 choke me
4501 #else
4502 char (*f) () = $ac_func;
4503 #endif
4504 #ifdef __cplusplus
4505 }
4506 #endif
4507
4508 int
4509 main ()
4510 {
4511 return f != $ac_func;
4512   ;
4513   return 0;
4514 }
4515 _ACEOF
4516 rm -f conftest.$ac_objext conftest$ac_exeext
4517 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4518   (eval $ac_link) 2>&5
4519   ac_status=$?
4520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4521   (exit $ac_status); } &&
4522          { ac_try='test -s conftest$ac_exeext'
4523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4524   (eval $ac_try) 2>&5
4525   ac_status=$?
4526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4527   (exit $ac_status); }; }; then
4528   eval "$as_ac_var=yes"
4529 else
4530   echo "$as_me: failed program was:" >&5
4531 sed 's/^/| /' conftest.$ac_ext >&5
4532
4533 eval "$as_ac_var=no"
4534 fi
4535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4536 fi
4537 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4538 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4539 if test `eval echo '${'$as_ac_var'}'` = yes; then
4540   cat >>confdefs.h <<_ACEOF
4541 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4542 _ACEOF
4543
4544 fi
4545 done
4546
4547 echo "$as_me:$LINENO: checking for struct icmp" >&5
4548 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
4549 if test "${ac_cv_have_icmp+set}" = set; then
4550   echo $ECHO_N "(cached) $ECHO_C" >&6
4551 else
4552   cat >conftest.$ac_ext <<_ACEOF
4553 #line $LINENO "configure"
4554 /* confdefs.h.  */
4555 _ACEOF
4556 cat confdefs.h >>conftest.$ac_ext
4557 cat >>conftest.$ac_ext <<_ACEOF
4558 /* end confdefs.h.  */
4559 #include <stdlib.h>
4560                    #include <stdio.h>
4561                    #include <math.h>
4562                    #include <unistd.h>
4563                    #include <limits.h>
4564                    #include <signal.h>
4565                    #include <fcntl.h>
4566                    #include <sys/types.h>
4567                    #include <sys/time.h>
4568                    #include <sys/ipc.h>
4569                    #include <sys/shm.h>
4570                    #include <sys/socket.h>
4571                    #include <netinet/in_systm.h>
4572                    #include <netinet/in.h>
4573                    #include <netinet/ip.h>
4574                    #include <netinet/ip_icmp.h>
4575                    #include <netinet/udp.h>
4576                    #include <arpa/inet.h>
4577                    #include <netdb.h>
4578 int
4579 main ()
4580 {
4581 struct icmp i;
4582                    struct sockaddr s;
4583                    struct sockaddr_in si;
4584                    struct ip ip;
4585                    i.icmp_type = ICMP_ECHO;
4586                    i.icmp_code = 0;
4587                    i.icmp_cksum = 0;
4588                    i.icmp_id = 0;
4589                    i.icmp_seq = 0;
4590                    si.sin_family = AF_INET;
4591                    #if defined(__DECC) || defined(_IP_VHL)
4592                    ip.ip_vhl = 0;
4593                    #else
4594                    ip.ip_hl = 0;
4595                    #endif
4596
4597   ;
4598   return 0;
4599 }
4600 _ACEOF
4601 rm -f conftest.$ac_objext
4602 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4603   (eval $ac_compile) 2>&5
4604   ac_status=$?
4605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4606   (exit $ac_status); } &&
4607          { ac_try='test -s conftest.$ac_objext'
4608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4609   (eval $ac_try) 2>&5
4610   ac_status=$?
4611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4612   (exit $ac_status); }; }; then
4613   ac_cv_have_icmp=yes
4614 else
4615   echo "$as_me: failed program was:" >&5
4616 sed 's/^/| /' conftest.$ac_ext >&5
4617
4618 ac_cv_have_icmp=no
4619 fi
4620 rm -f conftest.$ac_objext conftest.$ac_ext
4621 fi
4622 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
4623 echo "${ECHO_T}$ac_cv_have_icmp" >&6
4624  if test "$ac_cv_have_icmp" = yes ; then
4625    cat >>confdefs.h <<\_ACEOF
4626 #define HAVE_ICMP 1
4627 _ACEOF
4628
4629  fi
4630 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
4631 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
4632 if test "${ac_cv_have_icmphdr+set}" = set; then
4633   echo $ECHO_N "(cached) $ECHO_C" >&6
4634 else
4635   cat >conftest.$ac_ext <<_ACEOF
4636 #line $LINENO "configure"
4637 /* confdefs.h.  */
4638 _ACEOF
4639 cat confdefs.h >>conftest.$ac_ext
4640 cat >>conftest.$ac_ext <<_ACEOF
4641 /* end confdefs.h.  */
4642 #include <stdlib.h>
4643                    #include <stdio.h>
4644                    #include <math.h>
4645                    #include <unistd.h>
4646                    #include <limits.h>
4647                    #include <signal.h>
4648                    #include <fcntl.h>
4649                    #include <sys/types.h>
4650                    #include <sys/time.h>
4651                    #include <sys/ipc.h>
4652                    #include <sys/shm.h>
4653                    #include <sys/socket.h>
4654                    #include <netinet/in_systm.h>
4655                    #include <netinet/in.h>
4656                    #include <netinet/ip.h>
4657                    #include <netinet/ip_icmp.h>
4658                    #include <netinet/udp.h>
4659                    #include <arpa/inet.h>
4660                    #include <netdb.h>
4661 int
4662 main ()
4663 {
4664 struct icmphdr i;
4665                    struct sockaddr s;
4666                    struct sockaddr_in si;
4667                    struct ip ip;
4668                    i.type = ICMP_ECHO;
4669                    i.code = 0;
4670                    i.checksum = 0;
4671                    i.un.echo.id = 0;
4672                    i.un.echo.sequence = 0;
4673                    si.sin_family = AF_INET;
4674                    ip.ip_hl = 0;
4675   ;
4676   return 0;
4677 }
4678 _ACEOF
4679 rm -f conftest.$ac_objext
4680 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4681   (eval $ac_compile) 2>&5
4682   ac_status=$?
4683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4684   (exit $ac_status); } &&
4685          { ac_try='test -s conftest.$ac_objext'
4686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4687   (eval $ac_try) 2>&5
4688   ac_status=$?
4689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4690   (exit $ac_status); }; }; then
4691   ac_cv_have_icmphdr=yes
4692 else
4693   echo "$as_me: failed program was:" >&5
4694 sed 's/^/| /' conftest.$ac_ext >&5
4695
4696 ac_cv_have_icmphdr=no
4697 fi
4698 rm -f conftest.$ac_objext conftest.$ac_ext
4699 fi
4700 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
4701 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
4702  if test "$ac_cv_have_icmphdr" = yes ; then
4703    cat >>confdefs.h <<\_ACEOF
4704 #define HAVE_ICMPHDR 1
4705 _ACEOF
4706
4707  fi
4708
4709
4710 for ac_header in crypt.h sys/select.h
4711 do
4712 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4713 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4714   echo "$as_me:$LINENO: checking for $ac_header" >&5
4715 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4716 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4717   echo $ECHO_N "(cached) $ECHO_C" >&6
4718 fi
4719 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4720 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4721 else
4722   # Is the header compilable?
4723 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4724 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4725 cat >conftest.$ac_ext <<_ACEOF
4726 #line $LINENO "configure"
4727 /* confdefs.h.  */
4728 _ACEOF
4729 cat confdefs.h >>conftest.$ac_ext
4730 cat >>conftest.$ac_ext <<_ACEOF
4731 /* end confdefs.h.  */
4732 $ac_includes_default
4733 #include <$ac_header>
4734 _ACEOF
4735 rm -f conftest.$ac_objext
4736 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4737   (eval $ac_compile) 2>&5
4738   ac_status=$?
4739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4740   (exit $ac_status); } &&
4741          { ac_try='test -s conftest.$ac_objext'
4742   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4743   (eval $ac_try) 2>&5
4744   ac_status=$?
4745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4746   (exit $ac_status); }; }; then
4747   ac_header_compiler=yes
4748 else
4749   echo "$as_me: failed program was:" >&5
4750 sed 's/^/| /' conftest.$ac_ext >&5
4751
4752 ac_header_compiler=no
4753 fi
4754 rm -f conftest.$ac_objext conftest.$ac_ext
4755 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4756 echo "${ECHO_T}$ac_header_compiler" >&6
4757
4758 # Is the header present?
4759 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4760 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4761 cat >conftest.$ac_ext <<_ACEOF
4762 #line $LINENO "configure"
4763 /* confdefs.h.  */
4764 _ACEOF
4765 cat confdefs.h >>conftest.$ac_ext
4766 cat >>conftest.$ac_ext <<_ACEOF
4767 /* end confdefs.h.  */
4768 #include <$ac_header>
4769 _ACEOF
4770 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4771   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4772   ac_status=$?
4773   grep -v '^ *+' conftest.er1 >conftest.err
4774   rm -f conftest.er1
4775   cat conftest.err >&5
4776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4777   (exit $ac_status); } >/dev/null; then
4778   if test -s conftest.err; then
4779     ac_cpp_err=$ac_c_preproc_warn_flag
4780   else
4781     ac_cpp_err=
4782   fi
4783 else
4784   ac_cpp_err=yes
4785 fi
4786 if test -z "$ac_cpp_err"; then
4787   ac_header_preproc=yes
4788 else
4789   echo "$as_me: failed program was:" >&5
4790 sed 's/^/| /' conftest.$ac_ext >&5
4791
4792   ac_header_preproc=no
4793 fi
4794 rm -f conftest.err conftest.$ac_ext
4795 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4796 echo "${ECHO_T}$ac_header_preproc" >&6
4797
4798 # So?  What about this header?
4799 case $ac_header_compiler:$ac_header_preproc in
4800   yes:no )
4801     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4802 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4803     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4804 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4805     (
4806       cat <<\_ASBOX
4807 ## ------------------------------------ ##
4808 ## Report this to bug-autoconf@gnu.org. ##
4809 ## ------------------------------------ ##
4810 _ASBOX
4811     ) |
4812       sed "s/^/$as_me: WARNING:     /" >&2
4813     ;;
4814   no:yes )
4815     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4816 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4817     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4818 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4819     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4820 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4821     (
4822       cat <<\_ASBOX
4823 ## ------------------------------------ ##
4824 ## Report this to bug-autoconf@gnu.org. ##
4825 ## ------------------------------------ ##
4826 _ASBOX
4827     ) |
4828       sed "s/^/$as_me: WARNING:     /" >&2
4829     ;;
4830 esac
4831 echo "$as_me:$LINENO: checking for $ac_header" >&5
4832 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4833 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4834   echo $ECHO_N "(cached) $ECHO_C" >&6
4835 else
4836   eval "$as_ac_Header=$ac_header_preproc"
4837 fi
4838 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4839 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4840
4841 fi
4842 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4843   cat >>confdefs.h <<_ACEOF
4844 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4845 _ACEOF
4846
4847 fi
4848
4849 done
4850
4851 for ac_prog in perl5 perl
4852 do
4853   # Extract the first word of "$ac_prog", so it can be a program name with args.
4854 set dummy $ac_prog; ac_word=$2
4855 echo "$as_me:$LINENO: checking for $ac_word" >&5
4856 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4857 if test "${ac_cv_path_PERL+set}" = set; then
4858   echo $ECHO_N "(cached) $ECHO_C" >&6
4859 else
4860   case $PERL in
4861   [\\/]* | ?:[\\/]*)
4862   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4863   ;;
4864   *)
4865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4866 for as_dir in $PATH
4867 do
4868   IFS=$as_save_IFS
4869   test -z "$as_dir" && as_dir=.
4870   for ac_exec_ext in '' $ac_executable_extensions; do
4871   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4872     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4873     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4874     break 2
4875   fi
4876 done
4877 done
4878
4879   ;;
4880 esac
4881 fi
4882 PERL=$ac_cv_path_PERL
4883
4884 if test -n "$PERL"; then
4885   echo "$as_me:$LINENO: result: $PERL" >&5
4886 echo "${ECHO_T}$PERL" >&6
4887 else
4888   echo "$as_me:$LINENO: result: no" >&5
4889 echo "${ECHO_T}no" >&6
4890 fi
4891
4892   test -n "$PERL" && break
4893 done
4894
4895   if test -z "$PERL" ; then
4896     PERL_VERSION=0
4897   else
4898     echo "$as_me:$LINENO: checking perl version" >&5
4899 echo $ECHO_N "checking perl version... $ECHO_C" >&6
4900 if test "${ac_cv_perl_version+set}" = set; then
4901   echo $ECHO_N "(cached) $ECHO_C" >&6
4902 else
4903   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
4904 fi
4905 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
4906 echo "${ECHO_T}$ac_cv_perl_version" >&6
4907     PERL_VERSION=$ac_cv_perl_version
4908   fi
4909
4910
4911 if test -z "$PERL" ; then
4912   # don't let it be blank...
4913   PERL=/usr/bin/perl
4914 fi
4915
4916 echo "$as_me:$LINENO: checking for X" >&5
4917 echo $ECHO_N "checking for X... $ECHO_C" >&6
4918
4919
4920 # Check whether --with-x or --without-x was given.
4921 if test "${with_x+set}" = set; then
4922   withval="$with_x"
4923
4924 fi;
4925 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4926 if test "x$with_x" = xno; then
4927   # The user explicitly disabled X.
4928   have_x=disabled
4929 else
4930   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4931     # Both variables are already set.
4932     have_x=yes
4933   else
4934     if test "${ac_cv_have_x+set}" = set; then
4935   echo $ECHO_N "(cached) $ECHO_C" >&6
4936 else
4937   # One or both of the vars are not set, and there is no cached value.
4938 ac_x_includes=no ac_x_libraries=no
4939 rm -fr conftest.dir
4940 if mkdir conftest.dir; then
4941   cd conftest.dir
4942   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4943   cat >Imakefile <<'_ACEOF'
4944 acfindx:
4945         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4946 _ACEOF
4947   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4948     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4949     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4950     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4951     for ac_extension in a so sl; do
4952       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4953          test -f $ac_im_libdir/libX11.$ac_extension; then
4954         ac_im_usrlibdir=$ac_im_libdir; break
4955       fi
4956     done
4957     # Screen out bogus values from the imake configuration.  They are
4958     # bogus both because they are the default anyway, and because
4959     # using them would break gcc on systems where it needs fixed includes.
4960     case $ac_im_incroot in
4961         /usr/include) ;;
4962         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4963     esac
4964     case $ac_im_usrlibdir in
4965         /usr/lib | /lib) ;;
4966         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4967     esac
4968   fi
4969   cd ..
4970   rm -fr conftest.dir
4971 fi
4972
4973 # Standard set of common directories for X headers.
4974 # Check X11 before X11Rn because it is often a symlink to the current release.
4975 ac_x_header_dirs='
4976 /usr/X11/include
4977 /usr/X11R6/include
4978 /usr/X11R5/include
4979 /usr/X11R4/include
4980
4981 /usr/include/X11
4982 /usr/include/X11R6
4983 /usr/include/X11R5
4984 /usr/include/X11R4
4985
4986 /usr/local/X11/include
4987 /usr/local/X11R6/include
4988 /usr/local/X11R5/include
4989 /usr/local/X11R4/include
4990
4991 /usr/local/include/X11
4992 /usr/local/include/X11R6
4993 /usr/local/include/X11R5
4994 /usr/local/include/X11R4
4995
4996 /usr/X386/include
4997 /usr/x386/include
4998 /usr/XFree86/include/X11
4999
5000 /usr/include
5001 /usr/local/include
5002 /usr/unsupported/include
5003 /usr/athena/include
5004 /usr/local/x11r5/include
5005 /usr/lpp/Xamples/include
5006
5007 /usr/openwin/include
5008 /usr/openwin/share/include'
5009
5010 if test "$ac_x_includes" = no; then
5011   # Guess where to find include files, by looking for Intrinsic.h.
5012   # First, try using that file with no special directory specified.
5013   cat >conftest.$ac_ext <<_ACEOF
5014 #line $LINENO "configure"
5015 /* confdefs.h.  */
5016 _ACEOF
5017 cat confdefs.h >>conftest.$ac_ext
5018 cat >>conftest.$ac_ext <<_ACEOF
5019 /* end confdefs.h.  */
5020 #include <X11/Intrinsic.h>
5021 _ACEOF
5022 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5023   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5024   ac_status=$?
5025   grep -v '^ *+' conftest.er1 >conftest.err
5026   rm -f conftest.er1
5027   cat conftest.err >&5
5028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5029   (exit $ac_status); } >/dev/null; then
5030   if test -s conftest.err; then
5031     ac_cpp_err=$ac_c_preproc_warn_flag
5032   else
5033     ac_cpp_err=
5034   fi
5035 else
5036   ac_cpp_err=yes
5037 fi
5038 if test -z "$ac_cpp_err"; then
5039   # We can compile using X headers with no special include directory.
5040 ac_x_includes=
5041 else
5042   echo "$as_me: failed program was:" >&5
5043 sed 's/^/| /' conftest.$ac_ext >&5
5044
5045   for ac_dir in $ac_x_header_dirs; do
5046   if test -r "$ac_dir/X11/Intrinsic.h"; then
5047     ac_x_includes=$ac_dir
5048     break
5049   fi
5050 done
5051 fi
5052 rm -f conftest.err conftest.$ac_ext
5053 fi # $ac_x_includes = no
5054
5055 if test "$ac_x_libraries" = no; then
5056   # Check for the libraries.
5057   # See if we find them without any special options.
5058   # Don't add to $LIBS permanently.
5059   ac_save_LIBS=$LIBS
5060   LIBS="-lXt $LIBS"
5061   cat >conftest.$ac_ext <<_ACEOF
5062 #line $LINENO "configure"
5063 /* confdefs.h.  */
5064 _ACEOF
5065 cat confdefs.h >>conftest.$ac_ext
5066 cat >>conftest.$ac_ext <<_ACEOF
5067 /* end confdefs.h.  */
5068 #include <X11/Intrinsic.h>
5069 int
5070 main ()
5071 {
5072 XtMalloc (0)
5073   ;
5074   return 0;
5075 }
5076 _ACEOF
5077 rm -f conftest.$ac_objext conftest$ac_exeext
5078 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5079   (eval $ac_link) 2>&5
5080   ac_status=$?
5081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5082   (exit $ac_status); } &&
5083          { ac_try='test -s conftest$ac_exeext'
5084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5085   (eval $ac_try) 2>&5
5086   ac_status=$?
5087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5088   (exit $ac_status); }; }; then
5089   LIBS=$ac_save_LIBS
5090 # We can link X programs with no special library path.
5091 ac_x_libraries=
5092 else
5093   echo "$as_me: failed program was:" >&5
5094 sed 's/^/| /' conftest.$ac_ext >&5
5095
5096 LIBS=$ac_save_LIBS
5097 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5098 do
5099   # Don't even attempt the hair of trying to link an X program!
5100   for ac_extension in a so sl; do
5101     if test -r $ac_dir/libXt.$ac_extension; then
5102       ac_x_libraries=$ac_dir
5103       break 2
5104     fi
5105   done
5106 done
5107 fi
5108 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5109 fi # $ac_x_libraries = no
5110
5111 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
5112   # Didn't find X anywhere.  Cache the known absence of X.
5113   ac_cv_have_x="have_x=no"
5114 else
5115   # Record where we found X for the cache.
5116   ac_cv_have_x="have_x=yes \
5117                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5118 fi
5119 fi
5120
5121   fi
5122   eval "$ac_cv_have_x"
5123 fi # $with_x != no
5124
5125 if test "$have_x" != yes; then
5126   echo "$as_me:$LINENO: result: $have_x" >&5
5127 echo "${ECHO_T}$have_x" >&6
5128   no_x=yes
5129 else
5130   # If each of the values was on the command line, it overrides each guess.
5131   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5132   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5133   # Update the cache value to reflect the command line values.
5134   ac_cv_have_x="have_x=yes \
5135                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5136   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
5137 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5138 fi
5139
5140 if test "$no_x" = yes; then
5141   # Not all programs may use this symbol, but it does not hurt to define it.
5142
5143 cat >>confdefs.h <<\_ACEOF
5144 #define X_DISPLAY_MISSING 1
5145 _ACEOF
5146
5147   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5148 else
5149   if test -n "$x_includes"; then
5150     X_CFLAGS="$X_CFLAGS -I$x_includes"
5151   fi
5152
5153   # It would also be nice to do this for all -L options, not just this one.
5154   if test -n "$x_libraries"; then
5155     X_LIBS="$X_LIBS -L$x_libraries"
5156     # For Solaris; some versions of Sun CC require a space after -R and
5157     # others require no space.  Words are not sufficient . . . .
5158     case `(uname -sr) 2>/dev/null` in
5159     "SunOS 5"*)
5160       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
5161 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
5162       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
5163       cat >conftest.$ac_ext <<_ACEOF
5164 #line $LINENO "configure"
5165 /* confdefs.h.  */
5166 _ACEOF
5167 cat confdefs.h >>conftest.$ac_ext
5168 cat >>conftest.$ac_ext <<_ACEOF
5169 /* end confdefs.h.  */
5170
5171 int
5172 main ()
5173 {
5174
5175   ;
5176   return 0;
5177 }
5178 _ACEOF
5179 rm -f conftest.$ac_objext conftest$ac_exeext
5180 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5181   (eval $ac_link) 2>&5
5182   ac_status=$?
5183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5184   (exit $ac_status); } &&
5185          { ac_try='test -s conftest$ac_exeext'
5186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5187   (eval $ac_try) 2>&5
5188   ac_status=$?
5189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5190   (exit $ac_status); }; }; then
5191   ac_R_nospace=yes
5192 else
5193   echo "$as_me: failed program was:" >&5
5194 sed 's/^/| /' conftest.$ac_ext >&5
5195
5196 ac_R_nospace=no
5197 fi
5198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5199       if test $ac_R_nospace = yes; then
5200         echo "$as_me:$LINENO: result: no" >&5
5201 echo "${ECHO_T}no" >&6
5202         X_LIBS="$X_LIBS -R$x_libraries"
5203       else
5204         LIBS="$ac_xsave_LIBS -R $x_libraries"
5205         cat >conftest.$ac_ext <<_ACEOF
5206 #line $LINENO "configure"
5207 /* confdefs.h.  */
5208 _ACEOF
5209 cat confdefs.h >>conftest.$ac_ext
5210 cat >>conftest.$ac_ext <<_ACEOF
5211 /* end confdefs.h.  */
5212
5213 int
5214 main ()
5215 {
5216
5217   ;
5218   return 0;
5219 }
5220 _ACEOF
5221 rm -f conftest.$ac_objext conftest$ac_exeext
5222 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5223   (eval $ac_link) 2>&5
5224   ac_status=$?
5225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5226   (exit $ac_status); } &&
5227          { ac_try='test -s conftest$ac_exeext'
5228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5229   (eval $ac_try) 2>&5
5230   ac_status=$?
5231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5232   (exit $ac_status); }; }; then
5233   ac_R_space=yes
5234 else
5235   echo "$as_me: failed program was:" >&5
5236 sed 's/^/| /' conftest.$ac_ext >&5
5237
5238 ac_R_space=no
5239 fi
5240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5241         if test $ac_R_space = yes; then
5242           echo "$as_me:$LINENO: result: yes" >&5
5243 echo "${ECHO_T}yes" >&6
5244           X_LIBS="$X_LIBS -R $x_libraries"
5245         else
5246           echo "$as_me:$LINENO: result: neither works" >&5
5247 echo "${ECHO_T}neither works" >&6
5248         fi
5249       fi
5250       LIBS=$ac_xsave_LIBS
5251     esac
5252   fi
5253
5254   # Check for system-dependent libraries X programs must link with.
5255   # Do this before checking for the system-independent R6 libraries
5256   # (-lICE), since we may need -lsocket or whatever for X linking.
5257
5258   if test "$ISC" = yes; then
5259     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5260   else
5261     # Martyn Johnson says this is needed for Ultrix, if the X
5262     # libraries were built with DECnet support.  And Karl Berry says
5263     # the Alpha needs dnet_stub (dnet does not exist).
5264     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5265     cat >conftest.$ac_ext <<_ACEOF
5266 #line $LINENO "configure"
5267 /* confdefs.h.  */
5268 _ACEOF
5269 cat confdefs.h >>conftest.$ac_ext
5270 cat >>conftest.$ac_ext <<_ACEOF
5271 /* end confdefs.h.  */
5272
5273 /* Override any gcc2 internal prototype to avoid an error.  */
5274 #ifdef __cplusplus
5275 extern "C"
5276 #endif
5277 /* We use char because int might match the return type of a gcc2
5278    builtin and then its argument prototype would still apply.  */
5279 char XOpenDisplay ();
5280 int
5281 main ()
5282 {
5283 XOpenDisplay ();
5284   ;
5285   return 0;
5286 }
5287 _ACEOF
5288 rm -f conftest.$ac_objext conftest$ac_exeext
5289 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5290   (eval $ac_link) 2>&5
5291   ac_status=$?
5292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5293   (exit $ac_status); } &&
5294          { ac_try='test -s conftest$ac_exeext'
5295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5296   (eval $ac_try) 2>&5
5297   ac_status=$?
5298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5299   (exit $ac_status); }; }; then
5300   :
5301 else
5302   echo "$as_me: failed program was:" >&5
5303 sed 's/^/| /' conftest.$ac_ext >&5
5304
5305 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5306 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5307 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5308   echo $ECHO_N "(cached) $ECHO_C" >&6
5309 else
5310   ac_check_lib_save_LIBS=$LIBS
5311 LIBS="-ldnet  $LIBS"
5312 cat >conftest.$ac_ext <<_ACEOF
5313 #line $LINENO "configure"
5314 /* confdefs.h.  */
5315 _ACEOF
5316 cat confdefs.h >>conftest.$ac_ext
5317 cat >>conftest.$ac_ext <<_ACEOF
5318 /* end confdefs.h.  */
5319
5320 /* Override any gcc2 internal prototype to avoid an error.  */
5321 #ifdef __cplusplus
5322 extern "C"
5323 #endif
5324 /* We use char because int might match the return type of a gcc2
5325    builtin and then its argument prototype would still apply.  */
5326 char dnet_ntoa ();
5327 int
5328 main ()
5329 {
5330 dnet_ntoa ();
5331   ;
5332   return 0;
5333 }
5334 _ACEOF
5335 rm -f conftest.$ac_objext conftest$ac_exeext
5336 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5337   (eval $ac_link) 2>&5
5338   ac_status=$?
5339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5340   (exit $ac_status); } &&
5341          { ac_try='test -s conftest$ac_exeext'
5342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5343   (eval $ac_try) 2>&5
5344   ac_status=$?
5345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5346   (exit $ac_status); }; }; then
5347   ac_cv_lib_dnet_dnet_ntoa=yes
5348 else
5349   echo "$as_me: failed program was:" >&5
5350 sed 's/^/| /' conftest.$ac_ext >&5
5351
5352 ac_cv_lib_dnet_dnet_ntoa=no
5353 fi
5354 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5355 LIBS=$ac_check_lib_save_LIBS
5356 fi
5357 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5358 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5359 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5360   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5361 fi
5362
5363     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5364       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5365 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5366 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5367   echo $ECHO_N "(cached) $ECHO_C" >&6
5368 else
5369   ac_check_lib_save_LIBS=$LIBS
5370 LIBS="-ldnet_stub  $LIBS"
5371 cat >conftest.$ac_ext <<_ACEOF
5372 #line $LINENO "configure"
5373 /* confdefs.h.  */
5374 _ACEOF
5375 cat confdefs.h >>conftest.$ac_ext
5376 cat >>conftest.$ac_ext <<_ACEOF
5377 /* end confdefs.h.  */
5378
5379 /* Override any gcc2 internal prototype to avoid an error.  */
5380 #ifdef __cplusplus
5381 extern "C"
5382 #endif
5383 /* We use char because int might match the return type of a gcc2
5384    builtin and then its argument prototype would still apply.  */
5385 char dnet_ntoa ();
5386 int
5387 main ()
5388 {
5389 dnet_ntoa ();
5390   ;
5391   return 0;
5392 }
5393 _ACEOF
5394 rm -f conftest.$ac_objext conftest$ac_exeext
5395 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5396   (eval $ac_link) 2>&5
5397   ac_status=$?
5398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5399   (exit $ac_status); } &&
5400          { ac_try='test -s conftest$ac_exeext'
5401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5402   (eval $ac_try) 2>&5
5403   ac_status=$?
5404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5405   (exit $ac_status); }; }; then
5406   ac_cv_lib_dnet_stub_dnet_ntoa=yes
5407 else
5408   echo "$as_me: failed program was:" >&5
5409 sed 's/^/| /' conftest.$ac_ext >&5
5410
5411 ac_cv_lib_dnet_stub_dnet_ntoa=no
5412 fi
5413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5414 LIBS=$ac_check_lib_save_LIBS
5415 fi
5416 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5417 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5418 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5419   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5420 fi
5421
5422     fi
5423 fi
5424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5425     LIBS="$ac_xsave_LIBS"
5426
5427     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5428     # to get the SysV transport functions.
5429     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5430     # needs -lnsl.
5431     # The nsl library prevents programs from opening the X display
5432     # on Irix 5.2, according to T.E. Dickey.
5433     # The functions gethostbyname, getservbyname, and inet_addr are
5434     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5435     echo "$as_me:$LINENO: checking for gethostbyname" >&5
5436 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5437 if test "${ac_cv_func_gethostbyname+set}" = set; then
5438   echo $ECHO_N "(cached) $ECHO_C" >&6
5439 else
5440   cat >conftest.$ac_ext <<_ACEOF
5441 #line $LINENO "configure"
5442 /* confdefs.h.  */
5443 _ACEOF
5444 cat confdefs.h >>conftest.$ac_ext
5445 cat >>conftest.$ac_ext <<_ACEOF
5446 /* end confdefs.h.  */
5447 /* System header to define __stub macros and hopefully few prototypes,
5448     which can conflict with char gethostbyname (); below.
5449     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5450     <limits.h> exists even on freestanding compilers.  */
5451 #ifdef __STDC__
5452 # include <limits.h>
5453 #else
5454 # include <assert.h>
5455 #endif
5456 /* Override any gcc2 internal prototype to avoid an error.  */
5457 #ifdef __cplusplus
5458 extern "C"
5459 {
5460 #endif
5461 /* We use char because int might match the return type of a gcc2
5462    builtin and then its argument prototype would still apply.  */
5463 char gethostbyname ();
5464 /* The GNU C library defines this for functions which it implements
5465     to always fail with ENOSYS.  Some functions are actually named
5466     something starting with __ and the normal name is an alias.  */
5467 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5468 choke me
5469 #else
5470 char (*f) () = gethostbyname;
5471 #endif
5472 #ifdef __cplusplus
5473 }
5474 #endif
5475
5476 int
5477 main ()
5478 {
5479 return f != gethostbyname;
5480   ;
5481   return 0;
5482 }
5483 _ACEOF
5484 rm -f conftest.$ac_objext conftest$ac_exeext
5485 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5486   (eval $ac_link) 2>&5
5487   ac_status=$?
5488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5489   (exit $ac_status); } &&
5490          { ac_try='test -s conftest$ac_exeext'
5491   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5492   (eval $ac_try) 2>&5
5493   ac_status=$?
5494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5495   (exit $ac_status); }; }; then
5496   ac_cv_func_gethostbyname=yes
5497 else
5498   echo "$as_me: failed program was:" >&5
5499 sed 's/^/| /' conftest.$ac_ext >&5
5500
5501 ac_cv_func_gethostbyname=no
5502 fi
5503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5504 fi
5505 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5506 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5507
5508     if test $ac_cv_func_gethostbyname = no; then
5509       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5510 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5511 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5512   echo $ECHO_N "(cached) $ECHO_C" >&6
5513 else
5514   ac_check_lib_save_LIBS=$LIBS
5515 LIBS="-lnsl  $LIBS"
5516 cat >conftest.$ac_ext <<_ACEOF
5517 #line $LINENO "configure"
5518 /* confdefs.h.  */
5519 _ACEOF
5520 cat confdefs.h >>conftest.$ac_ext
5521 cat >>conftest.$ac_ext <<_ACEOF
5522 /* end confdefs.h.  */
5523
5524 /* Override any gcc2 internal prototype to avoid an error.  */
5525 #ifdef __cplusplus
5526 extern "C"
5527 #endif
5528 /* We use char because int might match the return type of a gcc2
5529    builtin and then its argument prototype would still apply.  */
5530 char gethostbyname ();
5531 int
5532 main ()
5533 {
5534 gethostbyname ();
5535   ;
5536   return 0;
5537 }
5538 _ACEOF
5539 rm -f conftest.$ac_objext conftest$ac_exeext
5540 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5541   (eval $ac_link) 2>&5
5542   ac_status=$?
5543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5544   (exit $ac_status); } &&
5545          { ac_try='test -s conftest$ac_exeext'
5546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5547   (eval $ac_try) 2>&5
5548   ac_status=$?
5549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5550   (exit $ac_status); }; }; then
5551   ac_cv_lib_nsl_gethostbyname=yes
5552 else
5553   echo "$as_me: failed program was:" >&5
5554 sed 's/^/| /' conftest.$ac_ext >&5
5555
5556 ac_cv_lib_nsl_gethostbyname=no
5557 fi
5558 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5559 LIBS=$ac_check_lib_save_LIBS
5560 fi
5561 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5562 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5563 if test $ac_cv_lib_nsl_gethostbyname = yes; then
5564   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5565 fi
5566
5567       if test $ac_cv_lib_nsl_gethostbyname = no; then
5568         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5569 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5570 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5571   echo $ECHO_N "(cached) $ECHO_C" >&6
5572 else
5573   ac_check_lib_save_LIBS=$LIBS
5574 LIBS="-lbsd  $LIBS"
5575 cat >conftest.$ac_ext <<_ACEOF
5576 #line $LINENO "configure"
5577 /* confdefs.h.  */
5578 _ACEOF
5579 cat confdefs.h >>conftest.$ac_ext
5580 cat >>conftest.$ac_ext <<_ACEOF
5581 /* end confdefs.h.  */
5582
5583 /* Override any gcc2 internal prototype to avoid an error.  */
5584 #ifdef __cplusplus
5585 extern "C"
5586 #endif
5587 /* We use char because int might match the return type of a gcc2
5588    builtin and then its argument prototype would still apply.  */
5589 char gethostbyname ();
5590 int
5591 main ()
5592 {
5593 gethostbyname ();
5594   ;
5595   return 0;
5596 }
5597 _ACEOF
5598 rm -f conftest.$ac_objext conftest$ac_exeext
5599 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5600   (eval $ac_link) 2>&5
5601   ac_status=$?
5602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5603   (exit $ac_status); } &&
5604          { ac_try='test -s conftest$ac_exeext'
5605   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5606   (eval $ac_try) 2>&5
5607   ac_status=$?
5608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5609   (exit $ac_status); }; }; then
5610   ac_cv_lib_bsd_gethostbyname=yes
5611 else
5612   echo "$as_me: failed program was:" >&5
5613 sed 's/^/| /' conftest.$ac_ext >&5
5614
5615 ac_cv_lib_bsd_gethostbyname=no
5616 fi
5617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5618 LIBS=$ac_check_lib_save_LIBS
5619 fi
5620 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
5621 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
5622 if test $ac_cv_lib_bsd_gethostbyname = yes; then
5623   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5624 fi
5625
5626       fi
5627     fi
5628
5629     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5630     # socket/setsockopt and other routines are undefined under SCO ODT
5631     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5632     # on later versions), says Simon Leinen: it contains gethostby*
5633     # variants that don't use the name server (or something).  -lsocket
5634     # must be given before -lnsl if both are needed.  We assume that
5635     # if connect needs -lnsl, so does gethostbyname.
5636     echo "$as_me:$LINENO: checking for connect" >&5
5637 echo $ECHO_N "checking for connect... $ECHO_C" >&6
5638 if test "${ac_cv_func_connect+set}" = set; then
5639   echo $ECHO_N "(cached) $ECHO_C" >&6
5640 else
5641   cat >conftest.$ac_ext <<_ACEOF
5642 #line $LINENO "configure"
5643 /* confdefs.h.  */
5644 _ACEOF
5645 cat confdefs.h >>conftest.$ac_ext
5646 cat >>conftest.$ac_ext <<_ACEOF
5647 /* end confdefs.h.  */
5648 /* System header to define __stub macros and hopefully few prototypes,
5649     which can conflict with char connect (); below.
5650     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5651     <limits.h> exists even on freestanding compilers.  */
5652 #ifdef __STDC__
5653 # include <limits.h>
5654 #else
5655 # include <assert.h>
5656 #endif
5657 /* Override any gcc2 internal prototype to avoid an error.  */
5658 #ifdef __cplusplus
5659 extern "C"
5660 {
5661 #endif
5662 /* We use char because int might match the return type of a gcc2
5663    builtin and then its argument prototype would still apply.  */
5664 char connect ();
5665 /* The GNU C library defines this for functions which it implements
5666     to always fail with ENOSYS.  Some functions are actually named
5667     something starting with __ and the normal name is an alias.  */
5668 #if defined (__stub_connect) || defined (__stub___connect)
5669 choke me
5670 #else
5671 char (*f) () = connect;
5672 #endif
5673 #ifdef __cplusplus
5674 }
5675 #endif
5676
5677 int
5678 main ()
5679 {
5680 return f != connect;
5681   ;
5682   return 0;
5683 }
5684 _ACEOF
5685 rm -f conftest.$ac_objext conftest$ac_exeext
5686 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5687   (eval $ac_link) 2>&5
5688   ac_status=$?
5689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5690   (exit $ac_status); } &&
5691          { ac_try='test -s conftest$ac_exeext'
5692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5693   (eval $ac_try) 2>&5
5694   ac_status=$?
5695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5696   (exit $ac_status); }; }; then
5697   ac_cv_func_connect=yes
5698 else
5699   echo "$as_me: failed program was:" >&5
5700 sed 's/^/| /' conftest.$ac_ext >&5
5701
5702 ac_cv_func_connect=no
5703 fi
5704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5705 fi
5706 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5707 echo "${ECHO_T}$ac_cv_func_connect" >&6
5708
5709     if test $ac_cv_func_connect = no; then
5710       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
5711 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
5712 if test "${ac_cv_lib_socket_connect+set}" = set; then
5713   echo $ECHO_N "(cached) $ECHO_C" >&6
5714 else
5715   ac_check_lib_save_LIBS=$LIBS
5716 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5717 cat >conftest.$ac_ext <<_ACEOF
5718 #line $LINENO "configure"
5719 /* confdefs.h.  */
5720 _ACEOF
5721 cat confdefs.h >>conftest.$ac_ext
5722 cat >>conftest.$ac_ext <<_ACEOF
5723 /* end confdefs.h.  */
5724
5725 /* Override any gcc2 internal prototype to avoid an error.  */
5726 #ifdef __cplusplus
5727 extern "C"
5728 #endif
5729 /* We use char because int might match the return type of a gcc2
5730    builtin and then its argument prototype would still apply.  */
5731 char connect ();
5732 int
5733 main ()
5734 {
5735 connect ();
5736   ;
5737   return 0;
5738 }
5739 _ACEOF
5740 rm -f conftest.$ac_objext conftest$ac_exeext
5741 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5742   (eval $ac_link) 2>&5
5743   ac_status=$?
5744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5745   (exit $ac_status); } &&
5746          { ac_try='test -s conftest$ac_exeext'
5747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5748   (eval $ac_try) 2>&5
5749   ac_status=$?
5750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5751   (exit $ac_status); }; }; then
5752   ac_cv_lib_socket_connect=yes
5753 else
5754   echo "$as_me: failed program was:" >&5
5755 sed 's/^/| /' conftest.$ac_ext >&5
5756
5757 ac_cv_lib_socket_connect=no
5758 fi
5759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5760 LIBS=$ac_check_lib_save_LIBS
5761 fi
5762 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
5763 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
5764 if test $ac_cv_lib_socket_connect = yes; then
5765   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5766 fi
5767
5768     fi
5769
5770     # Guillermo Gomez says -lposix is necessary on A/UX.
5771     echo "$as_me:$LINENO: checking for remove" >&5
5772 echo $ECHO_N "checking for remove... $ECHO_C" >&6
5773 if test "${ac_cv_func_remove+set}" = set; then
5774   echo $ECHO_N "(cached) $ECHO_C" >&6
5775 else
5776   cat >conftest.$ac_ext <<_ACEOF
5777 #line $LINENO "configure"
5778 /* confdefs.h.  */
5779 _ACEOF
5780 cat confdefs.h >>conftest.$ac_ext
5781 cat >>conftest.$ac_ext <<_ACEOF
5782 /* end confdefs.h.  */
5783 /* System header to define __stub macros and hopefully few prototypes,
5784     which can conflict with char remove (); below.
5785     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5786     <limits.h> exists even on freestanding compilers.  */
5787 #ifdef __STDC__
5788 # include <limits.h>
5789 #else
5790 # include <assert.h>
5791 #endif
5792 /* Override any gcc2 internal prototype to avoid an error.  */
5793 #ifdef __cplusplus
5794 extern "C"
5795 {
5796 #endif
5797 /* We use char because int might match the return type of a gcc2
5798    builtin and then its argument prototype would still apply.  */
5799 char remove ();
5800 /* The GNU C library defines this for functions which it implements
5801     to always fail with ENOSYS.  Some functions are actually named
5802     something starting with __ and the normal name is an alias.  */
5803 #if defined (__stub_remove) || defined (__stub___remove)
5804 choke me
5805 #else
5806 char (*f) () = remove;
5807 #endif
5808 #ifdef __cplusplus
5809 }
5810 #endif
5811
5812 int
5813 main ()
5814 {
5815 return f != remove;
5816   ;
5817   return 0;
5818 }
5819 _ACEOF
5820 rm -f conftest.$ac_objext conftest$ac_exeext
5821 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5822   (eval $ac_link) 2>&5
5823   ac_status=$?
5824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5825   (exit $ac_status); } &&
5826          { ac_try='test -s conftest$ac_exeext'
5827   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5828   (eval $ac_try) 2>&5
5829   ac_status=$?
5830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5831   (exit $ac_status); }; }; then
5832   ac_cv_func_remove=yes
5833 else
5834   echo "$as_me: failed program was:" >&5
5835 sed 's/^/| /' conftest.$ac_ext >&5
5836
5837 ac_cv_func_remove=no
5838 fi
5839 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5840 fi
5841 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
5842 echo "${ECHO_T}$ac_cv_func_remove" >&6
5843
5844     if test $ac_cv_func_remove = no; then
5845       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
5846 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
5847 if test "${ac_cv_lib_posix_remove+set}" = set; then
5848   echo $ECHO_N "(cached) $ECHO_C" >&6
5849 else
5850   ac_check_lib_save_LIBS=$LIBS
5851 LIBS="-lposix  $LIBS"
5852 cat >conftest.$ac_ext <<_ACEOF
5853 #line $LINENO "configure"
5854 /* confdefs.h.  */
5855 _ACEOF
5856 cat confdefs.h >>conftest.$ac_ext
5857 cat >>conftest.$ac_ext <<_ACEOF
5858 /* end confdefs.h.  */
5859
5860 /* Override any gcc2 internal prototype to avoid an error.  */
5861 #ifdef __cplusplus
5862 extern "C"
5863 #endif
5864 /* We use char because int might match the return type of a gcc2
5865    builtin and then its argument prototype would still apply.  */
5866 char remove ();
5867 int
5868 main ()
5869 {
5870 remove ();
5871   ;
5872   return 0;
5873 }
5874 _ACEOF
5875 rm -f conftest.$ac_objext conftest$ac_exeext
5876 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5877   (eval $ac_link) 2>&5
5878   ac_status=$?
5879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880   (exit $ac_status); } &&
5881          { ac_try='test -s conftest$ac_exeext'
5882   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5883   (eval $ac_try) 2>&5
5884   ac_status=$?
5885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5886   (exit $ac_status); }; }; then
5887   ac_cv_lib_posix_remove=yes
5888 else
5889   echo "$as_me: failed program was:" >&5
5890 sed 's/^/| /' conftest.$ac_ext >&5
5891
5892 ac_cv_lib_posix_remove=no
5893 fi
5894 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5895 LIBS=$ac_check_lib_save_LIBS
5896 fi
5897 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
5898 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
5899 if test $ac_cv_lib_posix_remove = yes; then
5900   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5901 fi
5902
5903     fi
5904
5905     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5906     echo "$as_me:$LINENO: checking for shmat" >&5
5907 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
5908 if test "${ac_cv_func_shmat+set}" = set; then
5909   echo $ECHO_N "(cached) $ECHO_C" >&6
5910 else
5911   cat >conftest.$ac_ext <<_ACEOF
5912 #line $LINENO "configure"
5913 /* confdefs.h.  */
5914 _ACEOF
5915 cat confdefs.h >>conftest.$ac_ext
5916 cat >>conftest.$ac_ext <<_ACEOF
5917 /* end confdefs.h.  */
5918 /* System header to define __stub macros and hopefully few prototypes,
5919     which can conflict with char shmat (); below.
5920     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5921     <limits.h> exists even on freestanding compilers.  */
5922 #ifdef __STDC__
5923 # include <limits.h>
5924 #else
5925 # include <assert.h>
5926 #endif
5927 /* Override any gcc2 internal prototype to avoid an error.  */
5928 #ifdef __cplusplus
5929 extern "C"
5930 {
5931 #endif
5932 /* We use char because int might match the return type of a gcc2
5933    builtin and then its argument prototype would still apply.  */
5934 char shmat ();
5935 /* The GNU C library defines this for functions which it implements
5936     to always fail with ENOSYS.  Some functions are actually named
5937     something starting with __ and the normal name is an alias.  */
5938 #if defined (__stub_shmat) || defined (__stub___shmat)
5939 choke me
5940 #else
5941 char (*f) () = shmat;
5942 #endif
5943 #ifdef __cplusplus
5944 }
5945 #endif
5946
5947 int
5948 main ()
5949 {
5950 return f != shmat;
5951   ;
5952   return 0;
5953 }
5954 _ACEOF
5955 rm -f conftest.$ac_objext conftest$ac_exeext
5956 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5957   (eval $ac_link) 2>&5
5958   ac_status=$?
5959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5960   (exit $ac_status); } &&
5961          { ac_try='test -s conftest$ac_exeext'
5962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5963   (eval $ac_try) 2>&5
5964   ac_status=$?
5965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5966   (exit $ac_status); }; }; then
5967   ac_cv_func_shmat=yes
5968 else
5969   echo "$as_me: failed program was:" >&5
5970 sed 's/^/| /' conftest.$ac_ext >&5
5971
5972 ac_cv_func_shmat=no
5973 fi
5974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5975 fi
5976 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
5977 echo "${ECHO_T}$ac_cv_func_shmat" >&6
5978
5979     if test $ac_cv_func_shmat = no; then
5980       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
5981 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
5982 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
5983   echo $ECHO_N "(cached) $ECHO_C" >&6
5984 else
5985   ac_check_lib_save_LIBS=$LIBS
5986 LIBS="-lipc  $LIBS"
5987 cat >conftest.$ac_ext <<_ACEOF
5988 #line $LINENO "configure"
5989 /* confdefs.h.  */
5990 _ACEOF
5991 cat confdefs.h >>conftest.$ac_ext
5992 cat >>conftest.$ac_ext <<_ACEOF
5993 /* end confdefs.h.  */
5994
5995 /* Override any gcc2 internal prototype to avoid an error.  */
5996 #ifdef __cplusplus
5997 extern "C"
5998 #endif
5999 /* We use char because int might match the return type of a gcc2
6000    builtin and then its argument prototype would still apply.  */
6001 char shmat ();
6002 int
6003 main ()
6004 {
6005 shmat ();
6006   ;
6007   return 0;
6008 }
6009 _ACEOF
6010 rm -f conftest.$ac_objext conftest$ac_exeext
6011 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6012   (eval $ac_link) 2>&5
6013   ac_status=$?
6014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6015   (exit $ac_status); } &&
6016          { ac_try='test -s conftest$ac_exeext'
6017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6018   (eval $ac_try) 2>&5
6019   ac_status=$?
6020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6021   (exit $ac_status); }; }; then
6022   ac_cv_lib_ipc_shmat=yes
6023 else
6024   echo "$as_me: failed program was:" >&5
6025 sed 's/^/| /' conftest.$ac_ext >&5
6026
6027 ac_cv_lib_ipc_shmat=no
6028 fi
6029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6030 LIBS=$ac_check_lib_save_LIBS
6031 fi
6032 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
6033 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
6034 if test $ac_cv_lib_ipc_shmat = yes; then
6035   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6036 fi
6037
6038     fi
6039   fi
6040
6041   # Check for libraries that X11R6 Xt/Xaw programs need.
6042   ac_save_LDFLAGS=$LDFLAGS
6043   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6044   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6045   # check for ICE first), but we must link in the order -lSM -lICE or
6046   # we get undefined symbols.  So assume we have SM if we have ICE.
6047   # These have to be linked with before -lX11, unlike the other
6048   # libraries we check for below, so use a different variable.
6049   # John Interrante, Karl Berry
6050   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
6051 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
6052 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
6053   echo $ECHO_N "(cached) $ECHO_C" >&6
6054 else
6055   ac_check_lib_save_LIBS=$LIBS
6056 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6057 cat >conftest.$ac_ext <<_ACEOF
6058 #line $LINENO "configure"
6059 /* confdefs.h.  */
6060 _ACEOF
6061 cat confdefs.h >>conftest.$ac_ext
6062 cat >>conftest.$ac_ext <<_ACEOF
6063 /* end confdefs.h.  */
6064
6065 /* Override any gcc2 internal prototype to avoid an error.  */
6066 #ifdef __cplusplus
6067 extern "C"
6068 #endif
6069 /* We use char because int might match the return type of a gcc2
6070    builtin and then its argument prototype would still apply.  */
6071 char IceConnectionNumber ();
6072 int
6073 main ()
6074 {
6075 IceConnectionNumber ();
6076   ;
6077   return 0;
6078 }
6079 _ACEOF
6080 rm -f conftest.$ac_objext conftest$ac_exeext
6081 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6082   (eval $ac_link) 2>&5
6083   ac_status=$?
6084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6085   (exit $ac_status); } &&
6086          { ac_try='test -s conftest$ac_exeext'
6087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6088   (eval $ac_try) 2>&5
6089   ac_status=$?
6090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6091   (exit $ac_status); }; }; then
6092   ac_cv_lib_ICE_IceConnectionNumber=yes
6093 else
6094   echo "$as_me: failed program was:" >&5
6095 sed 's/^/| /' conftest.$ac_ext >&5
6096
6097 ac_cv_lib_ICE_IceConnectionNumber=no
6098 fi
6099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6100 LIBS=$ac_check_lib_save_LIBS
6101 fi
6102 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6103 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
6104 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
6105   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6106 fi
6107
6108   LDFLAGS=$ac_save_LDFLAGS
6109
6110 fi
6111
6112
6113 if test "$have_x" != yes; then
6114   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
6115 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
6116    { (exit 1); exit 1; }; }
6117 fi
6118
6119
6120     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
6121 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
6122 if test "${ac_cv_x_app_defaults+set}" = set; then
6123   echo $ECHO_N "(cached) $ECHO_C" >&6
6124 else
6125
6126   rm -fr conftestdir
6127   if mkdir conftestdir; then
6128     cd conftestdir 2>/dev/null
6129     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6130     cat > Imakefile <<'EOF'
6131 acfindx:
6132         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
6133 EOF
6134     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
6135       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
6136       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6137     fi
6138     cd .. 2>/dev/null
6139     rm -fr conftestdir
6140   fi
6141       if test x"$ac_x_app_defaults" = x; then
6142
6143   # Look for the directory under a standard set of common directories.
6144   # Check X11 before X11Rn because it's often a symlink to the current release.
6145   for ac_dir in                                 \
6146     /usr/X11/lib/app-defaults                   \
6147     /usr/X11R6/lib/app-defaults                 \
6148     /usr/X11R6/lib/X11/app-defaults             \
6149     /usr/X11R5/lib/app-defaults                 \
6150     /usr/X11R5/lib/X11/app-defaults             \
6151     /usr/X11R4/lib/app-defaults                 \
6152     /usr/X11R4/lib/X11/app-defaults             \
6153                                                 \
6154     /usr/lib/X11/app-defaults                   \
6155     /usr/lib/X11R6/app-defaults                 \
6156     /usr/lib/X11R5/app-defaults                 \
6157     /usr/lib/X11R4/app-defaults                 \
6158                                                 \
6159     /usr/local/X11/lib/app-defaults             \
6160     /usr/local/X11R6/lib/app-defaults           \
6161     /usr/local/X11R5/lib/app-defaults           \
6162     /usr/local/X11R4/lib/app-defaults           \
6163                                                 \
6164     /usr/local/lib/X11/app-defaults             \
6165     /usr/local/lib/X11R6/app-defaults           \
6166     /usr/local/lib/X11R6/X11/app-defaults       \
6167     /usr/local/lib/X11R5/app-defaults           \
6168     /usr/local/lib/X11R5/X11/app-defaults       \
6169     /usr/local/lib/X11R4/app-defaults           \
6170     /usr/local/lib/X11R4/X11/app-defaults       \
6171                                                 \
6172     /usr/X386/lib/X11/app-defaults              \
6173     /usr/x386/lib/X11/app-defaults              \
6174     /usr/XFree86/lib/X11/app-defaults           \
6175                                                 \
6176     /usr/lib/X11/app-defaults                   \
6177     /usr/local/lib/X11/app-defaults             \
6178     /usr/unsupported/lib/X11/app-defaults       \
6179     /usr/athena/lib/X11/app-defaults            \
6180     /usr/local/x11r5/lib/X11/app-defaults       \
6181     /usr/lpp/Xamples/lib/X11/app-defaults       \
6182     /lib/usr/lib/X11/app-defaults               \
6183                                                 \
6184     /usr/openwin/lib/app-defaults               \
6185     /usr/openwin/lib/X11/app-defaults           \
6186     /usr/openwin/share/lib/app-defaults         \
6187     /usr/openwin/share/lib/X11/app-defaults     \
6188                                                 \
6189     /X11R6/lib/app-defaults                     \
6190     /X11R5/lib/app-defaults                     \
6191     /X11R4/lib/app-defaults                     \
6192     ; \
6193   do
6194     if test -d "$ac_dir"; then
6195       ac_x_app_defaults=$ac_dir
6196       break
6197     fi
6198   done
6199
6200       fi
6201       if test x"$ac_x_app_defaults" = x; then
6202         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
6203       else
6204         # Record where we found app-defaults for the cache.
6205         ac_cv_x_app_defaults="$ac_x_app_defaults"
6206       fi
6207 fi
6208 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
6209 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
6210     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
6211 case "$host" in
6212     *-hpux*)
6213
6214       # The following arcana was gleaned from conversations with
6215       # Eric Schwartz <erics@col.hp.com>:
6216       #
6217       # On HPUX 10.x, the parts of X that HP considers "standard" live in
6218       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6219       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6220       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6221       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6222       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6223       # you don't need any -I or -L arguments.
6224       #
6225       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6226       # are the same division as 10.x.  However, there are no symlinks to
6227       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6228       # arguments are always necessary.
6229       #
6230       # However, X11R6 was available on HPUX 9.x as a patch: if that
6231       # patch was installed, then all of X11R6 went in to
6232       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6233       #
6234       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6235       # whether R5 was available as a patch; R6 undoubtedly was not.)
6236       #
6237       # So.  We try and use the highest numbered pair of
6238       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6239       # that are available.  We do not mix and match different versions
6240       # of X.
6241       #
6242       # Question I still don't know the answer to: (do you?)
6243       #
6244       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6245       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6246       #     that contrib directory?  Did it contain so-called "standard"
6247       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6248       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6249       #     be a situation where one had to reach into the R5 headers and
6250       #     libs to find Xmu?  That is, must both R6 and R5 directories
6251       #     be on the -I and -L lists in that case?
6252       #
6253       for version in X11R6 X11R5 X11R4 ; do
6254         # if either pair of directories exists...
6255         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6256         then
6257            # if contrib exists, use it...
6258            if test -d /usr/contrib/$version/include ; then
6259              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6260              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6261            fi
6262            # if the "standard" one exists, use it.
6263            if test -d /usr/include/$version ; then
6264              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6265              X_LIBS="$X_LIBS -L/usr/lib/$version"
6266            fi
6267            # since at least one of the pair exists, go no farther.
6268            break
6269         fi
6270       done
6271
6272       # Now find Motif.  Thanks for not making xmkmf find this by
6273       # default, you losers.
6274       #
6275       if test -d /usr/include/Motif2.1 ; then
6276         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6277         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6278       elif test -d /usr/include/Motif1.2 ; then
6279         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6280         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6281       elif test -d /usr/include/Motif1.1 ; then
6282         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6283         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6284       fi
6285
6286       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6287       #
6288       if test -d /opt/graphics/OpenGL/include ; then
6289         # HP-UX 10.20 puts it here
6290         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6291         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6292       elif test -d /opt/Mesa/lib ; then
6293         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6294         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6295       fi
6296
6297
6298       if test -d /opt/xpm/lib/X11 ; then
6299         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6300         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6301       fi
6302
6303       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6304       # in /usr/local/, unless there is already an xscreensaver in
6305       # /usr/local/bin/.  This can be overridden with the --prefix arg
6306       # to configure.  I'm not sure this is the right thing to do, but
6307       # Richard Lloyd says so...
6308       #
6309       if test \! -x /usr/local/bin/xscreensaver ; then
6310         ac_default_prefix=/opt/xscreensaver
6311       fi
6312
6313     ;;
6314     *-solaris*)
6315
6316       # Thanks for not making xmkmf find this by default, pinheads.
6317       # And thanks for moving things around again, too.  Is this
6318       # really the standard location now?  What happened to the
6319       # joke that this kind of thing went in /opt?
6320       # cthomp says "answer: CDE (Common Disorganized Environment)"
6321       #
6322       if test -f /usr/dt/include/Xm/Xm.h ; then
6323         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6324         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
6325
6326         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6327         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
6328 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
6329 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
6330   echo $ECHO_N "(cached) $ECHO_C" >&6
6331 else
6332   ac_check_lib_save_LIBS=$LIBS
6333 LIBS="-lgen  $LIBS"
6334 cat >conftest.$ac_ext <<_ACEOF
6335 #line $LINENO "configure"
6336 /* confdefs.h.  */
6337 _ACEOF
6338 cat confdefs.h >>conftest.$ac_ext
6339 cat >>conftest.$ac_ext <<_ACEOF
6340 /* end confdefs.h.  */
6341
6342 /* Override any gcc2 internal prototype to avoid an error.  */
6343 #ifdef __cplusplus
6344 extern "C"
6345 #endif
6346 /* We use char because int might match the return type of a gcc2
6347    builtin and then its argument prototype would still apply.  */
6348 char regcmp ();
6349 int
6350 main ()
6351 {
6352 regcmp ();
6353   ;
6354   return 0;
6355 }
6356 _ACEOF
6357 rm -f conftest.$ac_objext conftest$ac_exeext
6358 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6359   (eval $ac_link) 2>&5
6360   ac_status=$?
6361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6362   (exit $ac_status); } &&
6363          { ac_try='test -s conftest$ac_exeext'
6364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6365   (eval $ac_try) 2>&5
6366   ac_status=$?
6367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6368   (exit $ac_status); }; }; then
6369   ac_cv_lib_gen_regcmp=yes
6370 else
6371   echo "$as_me: failed program was:" >&5
6372 sed 's/^/| /' conftest.$ac_ext >&5
6373
6374 ac_cv_lib_gen_regcmp=no
6375 fi
6376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6377 LIBS=$ac_check_lib_save_LIBS
6378 fi
6379 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
6380 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
6381 if test $ac_cv_lib_gen_regcmp = yes; then
6382   MOTIF_LIBS="$MOTIF_LIBS -lgen"
6383 fi
6384
6385       fi
6386
6387     ;;
6388     *-darwin*)
6389
6390       # On MacOS X (10.x with "fink"), many things are under /sw/.
6391       #
6392       if test -d /sw/include ; then
6393         X_CFLAGS="-I/sw/include $X_CFLAGS"
6394         X_LIBS="-L/sw/lib $X_LIBS"
6395       fi
6396     ;;
6397   esac
6398 echo "$as_me:$LINENO: checking for XPointer" >&5
6399 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
6400 if test "${ac_cv_xpointer+set}" = set; then
6401   echo $ECHO_N "(cached) $ECHO_C" >&6
6402 else
6403
6404   ac_save_CPPFLAGS="$CPPFLAGS"
6405   if test \! -z "$includedir" ; then
6406     CPPFLAGS="$CPPFLAGS -I$includedir"
6407   fi
6408   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6409   cat >conftest.$ac_ext <<_ACEOF
6410 #line $LINENO "configure"
6411 /* confdefs.h.  */
6412 _ACEOF
6413 cat confdefs.h >>conftest.$ac_ext
6414 cat >>conftest.$ac_ext <<_ACEOF
6415 /* end confdefs.h.  */
6416 #include <X11/Xlib.h>
6417 int
6418 main ()
6419 {
6420 XPointer foo = (XPointer) 0;
6421   ;
6422   return 0;
6423 }
6424 _ACEOF
6425 rm -f conftest.$ac_objext
6426 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6427   (eval $ac_compile) 2>&5
6428   ac_status=$?
6429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6430   (exit $ac_status); } &&
6431          { ac_try='test -s conftest.$ac_objext'
6432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6433   (eval $ac_try) 2>&5
6434   ac_status=$?
6435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6436   (exit $ac_status); }; }; then
6437   ac_cv_xpointer=yes
6438 else
6439   echo "$as_me: failed program was:" >&5
6440 sed 's/^/| /' conftest.$ac_ext >&5
6441
6442 ac_cv_xpointer=no
6443 fi
6444 rm -f conftest.$ac_objext conftest.$ac_ext
6445   CPPFLAGS="$ac_save_CPPFLAGS"
6446 fi
6447 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
6448 echo "${ECHO_T}$ac_cv_xpointer" >&6
6449   if test "$ac_cv_xpointer" != yes; then
6450    cat >>confdefs.h <<\_ACEOF
6451 #define XPointer char*
6452 _ACEOF
6453
6454   fi
6455
6456 echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
6457 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6
6458   ac_macosx=no
6459   case "$host" in
6460     *-apple-darwin* )
6461       ac_macosx=yes
6462     ;;
6463   esac
6464 echo "$as_me:$LINENO: result: $ac_macosx" >&5
6465 echo "${ECHO_T}$ac_macosx" >&6
6466
6467
6468
6469 ###############################################################################
6470 #
6471 #       Gettext support
6472 #
6473 ###############################################################################
6474
6475
6476
6477 if test -n ""; then
6478     echo "$as_me:$LINENO: checking for intltool >= " >&5
6479 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
6480
6481     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
6482     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
6483
6484     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
6485
6486
6487     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
6488         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
6489 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
6490     else
6491         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
6492 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
6493         exit 1
6494     fi
6495 fi
6496
6497   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'
6498 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'
6499      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'
6500       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
6501      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'
6502    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'
6503     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'
6504 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'
6505        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'
6506       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'
6507     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'
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521 # Use the tools built into the package, not the ones that are installed.
6522
6523 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
6524 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
6525 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
6526
6527
6528
6529
6530
6531 # Extract the first word of "perl", so it can be a program name with args.
6532 set dummy perl; ac_word=$2
6533 echo "$as_me:$LINENO: checking for $ac_word" >&5
6534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6535 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
6536   echo $ECHO_N "(cached) $ECHO_C" >&6
6537 else
6538   case $INTLTOOL_PERL in
6539   [\\/]* | ?:[\\/]*)
6540   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
6541   ;;
6542   *)
6543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6544 for as_dir in $PATH
6545 do
6546   IFS=$as_save_IFS
6547   test -z "$as_dir" && as_dir=.
6548   for ac_exec_ext in '' $ac_executable_extensions; do
6549   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6550     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
6551     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6552     break 2
6553   fi
6554 done
6555 done
6556
6557   ;;
6558 esac
6559 fi
6560 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
6561
6562 if test -n "$INTLTOOL_PERL"; then
6563   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
6564 echo "${ECHO_T}$INTLTOOL_PERL" >&6
6565 else
6566   echo "$as_me:$LINENO: result: no" >&5
6567 echo "${ECHO_T}no" >&6
6568 fi
6569
6570 if test -z "$INTLTOOL_PERL"; then
6571    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
6572 echo "$as_me: error: perl not found; required for intltool" >&2;}
6573    { (exit 1); exit 1; }; }
6574 fi
6575 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
6576    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
6577 echo "$as_me: error: perl 5.x required for intltool" >&2;}
6578    { (exit 1); exit 1; }; }
6579 fi
6580
6581 # Remove file type tags (using []) from po/POTFILES.
6582
6583
6584
6585
6586
6587
6588
6589 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
6590
6591           ac_config_commands="$ac_config_commands default-1"
6592
6593
6594
6595 GETTEXT_PACKAGE=xscreensaver
6596 cat >>confdefs.h <<_ACEOF
6597 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
6598 _ACEOF
6599
6600 cat >>confdefs.h <<_ACEOF
6601 #define PACKAGE "$GETTEXT_PACKAGE"
6602 _ACEOF
6603
6604
6605
6606 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"
6607 if test -n "$ac_tool_prefix"; then
6608   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6609 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6610 echo "$as_me:$LINENO: checking for $ac_word" >&5
6611 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6612 if test "${ac_cv_prog_RANLIB+set}" = set; then
6613   echo $ECHO_N "(cached) $ECHO_C" >&6
6614 else
6615   if test -n "$RANLIB"; then
6616   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6617 else
6618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6619 for as_dir in $PATH
6620 do
6621   IFS=$as_save_IFS
6622   test -z "$as_dir" && as_dir=.
6623   for ac_exec_ext in '' $ac_executable_extensions; do
6624   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6625     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6626     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6627     break 2
6628   fi
6629 done
6630 done
6631
6632 fi
6633 fi
6634 RANLIB=$ac_cv_prog_RANLIB
6635 if test -n "$RANLIB"; then
6636   echo "$as_me:$LINENO: result: $RANLIB" >&5
6637 echo "${ECHO_T}$RANLIB" >&6
6638 else
6639   echo "$as_me:$LINENO: result: no" >&5
6640 echo "${ECHO_T}no" >&6
6641 fi
6642
6643 fi
6644 if test -z "$ac_cv_prog_RANLIB"; then
6645   ac_ct_RANLIB=$RANLIB
6646   # Extract the first word of "ranlib", so it can be a program name with args.
6647 set dummy ranlib; ac_word=$2
6648 echo "$as_me:$LINENO: checking for $ac_word" >&5
6649 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6650 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6651   echo $ECHO_N "(cached) $ECHO_C" >&6
6652 else
6653   if test -n "$ac_ct_RANLIB"; then
6654   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6655 else
6656 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6657 for as_dir in $PATH
6658 do
6659   IFS=$as_save_IFS
6660   test -z "$as_dir" && as_dir=.
6661   for ac_exec_ext in '' $ac_executable_extensions; do
6662   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6663     ac_cv_prog_ac_ct_RANLIB="ranlib"
6664     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6665     break 2
6666   fi
6667 done
6668 done
6669
6670   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6671 fi
6672 fi
6673 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6674 if test -n "$ac_ct_RANLIB"; then
6675   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6676 echo "${ECHO_T}$ac_ct_RANLIB" >&6
6677 else
6678   echo "$as_me:$LINENO: result: no" >&5
6679 echo "${ECHO_T}no" >&6
6680 fi
6681
6682   RANLIB=$ac_ct_RANLIB
6683 else
6684   RANLIB="$ac_cv_prog_RANLIB"
6685 fi
6686
6687 echo "$as_me:$LINENO: checking for off_t" >&5
6688 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
6689 if test "${ac_cv_type_off_t+set}" = set; then
6690   echo $ECHO_N "(cached) $ECHO_C" >&6
6691 else
6692   cat >conftest.$ac_ext <<_ACEOF
6693 #line $LINENO "configure"
6694 /* confdefs.h.  */
6695 _ACEOF
6696 cat confdefs.h >>conftest.$ac_ext
6697 cat >>conftest.$ac_ext <<_ACEOF
6698 /* end confdefs.h.  */
6699 $ac_includes_default
6700 int
6701 main ()
6702 {
6703 if ((off_t *) 0)
6704   return 0;
6705 if (sizeof (off_t))
6706   return 0;
6707   ;
6708   return 0;
6709 }
6710 _ACEOF
6711 rm -f conftest.$ac_objext
6712 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6713   (eval $ac_compile) 2>&5
6714   ac_status=$?
6715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6716   (exit $ac_status); } &&
6717          { ac_try='test -s conftest.$ac_objext'
6718   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6719   (eval $ac_try) 2>&5
6720   ac_status=$?
6721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6722   (exit $ac_status); }; }; then
6723   ac_cv_type_off_t=yes
6724 else
6725   echo "$as_me: failed program was:" >&5
6726 sed 's/^/| /' conftest.$ac_ext >&5
6727
6728 ac_cv_type_off_t=no
6729 fi
6730 rm -f conftest.$ac_objext conftest.$ac_ext
6731 fi
6732 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6733 echo "${ECHO_T}$ac_cv_type_off_t" >&6
6734 if test $ac_cv_type_off_t = yes; then
6735   :
6736 else
6737
6738 cat >>confdefs.h <<_ACEOF
6739 #define off_t long
6740 _ACEOF
6741
6742 fi
6743
6744 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6745 # for constant arguments.  Useless!
6746 echo "$as_me:$LINENO: checking for working alloca.h" >&5
6747 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
6748 if test "${ac_cv_working_alloca_h+set}" = set; then
6749   echo $ECHO_N "(cached) $ECHO_C" >&6
6750 else
6751   cat >conftest.$ac_ext <<_ACEOF
6752 #line $LINENO "configure"
6753 /* confdefs.h.  */
6754 _ACEOF
6755 cat confdefs.h >>conftest.$ac_ext
6756 cat >>conftest.$ac_ext <<_ACEOF
6757 /* end confdefs.h.  */
6758 #include <alloca.h>
6759 int
6760 main ()
6761 {
6762 char *p = (char *) alloca (2 * sizeof (int));
6763   ;
6764   return 0;
6765 }
6766 _ACEOF
6767 rm -f conftest.$ac_objext conftest$ac_exeext
6768 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6769   (eval $ac_link) 2>&5
6770   ac_status=$?
6771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6772   (exit $ac_status); } &&
6773          { ac_try='test -s conftest$ac_exeext'
6774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6775   (eval $ac_try) 2>&5
6776   ac_status=$?
6777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6778   (exit $ac_status); }; }; then
6779   ac_cv_working_alloca_h=yes
6780 else
6781   echo "$as_me: failed program was:" >&5
6782 sed 's/^/| /' conftest.$ac_ext >&5
6783
6784 ac_cv_working_alloca_h=no
6785 fi
6786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6787 fi
6788 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
6789 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
6790 if test $ac_cv_working_alloca_h = yes; then
6791
6792 cat >>confdefs.h <<\_ACEOF
6793 #define HAVE_ALLOCA_H 1
6794 _ACEOF
6795
6796 fi
6797
6798 echo "$as_me:$LINENO: checking for alloca" >&5
6799 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
6800 if test "${ac_cv_func_alloca_works+set}" = set; then
6801   echo $ECHO_N "(cached) $ECHO_C" >&6
6802 else
6803   cat >conftest.$ac_ext <<_ACEOF
6804 #line $LINENO "configure"
6805 /* confdefs.h.  */
6806 _ACEOF
6807 cat confdefs.h >>conftest.$ac_ext
6808 cat >>conftest.$ac_ext <<_ACEOF
6809 /* end confdefs.h.  */
6810 #ifdef __GNUC__
6811 # define alloca __builtin_alloca
6812 #else
6813 # ifdef _MSC_VER
6814 #  include <malloc.h>
6815 #  define alloca _alloca
6816 # else
6817 #  if HAVE_ALLOCA_H
6818 #   include <alloca.h>
6819 #  else
6820 #   ifdef _AIX
6821  #pragma alloca
6822 #   else
6823 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6824 char *alloca ();
6825 #    endif
6826 #   endif
6827 #  endif
6828 # endif
6829 #endif
6830
6831 int
6832 main ()
6833 {
6834 char *p = (char *) alloca (1);
6835   ;
6836   return 0;
6837 }
6838 _ACEOF
6839 rm -f conftest.$ac_objext conftest$ac_exeext
6840 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6841   (eval $ac_link) 2>&5
6842   ac_status=$?
6843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6844   (exit $ac_status); } &&
6845          { ac_try='test -s conftest$ac_exeext'
6846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6847   (eval $ac_try) 2>&5
6848   ac_status=$?
6849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6850   (exit $ac_status); }; }; then
6851   ac_cv_func_alloca_works=yes
6852 else
6853   echo "$as_me: failed program was:" >&5
6854 sed 's/^/| /' conftest.$ac_ext >&5
6855
6856 ac_cv_func_alloca_works=no
6857 fi
6858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6859 fi
6860 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
6861 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
6862
6863 if test $ac_cv_func_alloca_works = yes; then
6864
6865 cat >>confdefs.h <<\_ACEOF
6866 #define HAVE_ALLOCA 1
6867 _ACEOF
6868
6869 else
6870   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6871 # that cause trouble.  Some versions do not even contain alloca or
6872 # contain a buggy version.  If you still want to use their alloca,
6873 # use ar to extract alloca.o from them instead of compiling alloca.c.
6874
6875 ALLOCA=alloca.$ac_objext
6876
6877 cat >>confdefs.h <<\_ACEOF
6878 #define C_ALLOCA 1
6879 _ACEOF
6880
6881
6882 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
6883 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
6884 if test "${ac_cv_os_cray+set}" = set; then
6885   echo $ECHO_N "(cached) $ECHO_C" >&6
6886 else
6887   cat >conftest.$ac_ext <<_ACEOF
6888 #line $LINENO "configure"
6889 /* confdefs.h.  */
6890 _ACEOF
6891 cat confdefs.h >>conftest.$ac_ext
6892 cat >>conftest.$ac_ext <<_ACEOF
6893 /* end confdefs.h.  */
6894 #if defined(CRAY) && ! defined(CRAY2)
6895 webecray
6896 #else
6897 wenotbecray
6898 #endif
6899
6900 _ACEOF
6901 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6902   $EGREP "webecray" >/dev/null 2>&1; then
6903   ac_cv_os_cray=yes
6904 else
6905   ac_cv_os_cray=no
6906 fi
6907 rm -f conftest*
6908
6909 fi
6910 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
6911 echo "${ECHO_T}$ac_cv_os_cray" >&6
6912 if test $ac_cv_os_cray = yes; then
6913   for ac_func in _getb67 GETB67 getb67; do
6914     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6915 echo "$as_me:$LINENO: checking for $ac_func" >&5
6916 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6917 if eval "test \"\${$as_ac_var+set}\" = set"; then
6918   echo $ECHO_N "(cached) $ECHO_C" >&6
6919 else
6920   cat >conftest.$ac_ext <<_ACEOF
6921 #line $LINENO "configure"
6922 /* confdefs.h.  */
6923 _ACEOF
6924 cat confdefs.h >>conftest.$ac_ext
6925 cat >>conftest.$ac_ext <<_ACEOF
6926 /* end confdefs.h.  */
6927 /* System header to define __stub macros and hopefully few prototypes,
6928     which can conflict with char $ac_func (); below.
6929     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6930     <limits.h> exists even on freestanding compilers.  */
6931 #ifdef __STDC__
6932 # include <limits.h>
6933 #else
6934 # include <assert.h>
6935 #endif
6936 /* Override any gcc2 internal prototype to avoid an error.  */
6937 #ifdef __cplusplus
6938 extern "C"
6939 {
6940 #endif
6941 /* We use char because int might match the return type of a gcc2
6942    builtin and then its argument prototype would still apply.  */
6943 char $ac_func ();
6944 /* The GNU C library defines this for functions which it implements
6945     to always fail with ENOSYS.  Some functions are actually named
6946     something starting with __ and the normal name is an alias.  */
6947 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6948 choke me
6949 #else
6950 char (*f) () = $ac_func;
6951 #endif
6952 #ifdef __cplusplus
6953 }
6954 #endif
6955
6956 int
6957 main ()
6958 {
6959 return f != $ac_func;
6960   ;
6961   return 0;
6962 }
6963 _ACEOF
6964 rm -f conftest.$ac_objext conftest$ac_exeext
6965 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6966   (eval $ac_link) 2>&5
6967   ac_status=$?
6968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6969   (exit $ac_status); } &&
6970          { ac_try='test -s conftest$ac_exeext'
6971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6972   (eval $ac_try) 2>&5
6973   ac_status=$?
6974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6975   (exit $ac_status); }; }; then
6976   eval "$as_ac_var=yes"
6977 else
6978   echo "$as_me: failed program was:" >&5
6979 sed 's/^/| /' conftest.$ac_ext >&5
6980
6981 eval "$as_ac_var=no"
6982 fi
6983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6984 fi
6985 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6986 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6987 if test `eval echo '${'$as_ac_var'}'` = yes; then
6988
6989 cat >>confdefs.h <<_ACEOF
6990 #define CRAY_STACKSEG_END $ac_func
6991 _ACEOF
6992
6993     break
6994 fi
6995
6996   done
6997 fi
6998
6999 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
7000 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7001 if test "${ac_cv_c_stack_direction+set}" = set; then
7002   echo $ECHO_N "(cached) $ECHO_C" >&6
7003 else
7004   if test "$cross_compiling" = yes; then
7005   ac_cv_c_stack_direction=0
7006 else
7007   cat >conftest.$ac_ext <<_ACEOF
7008 #line $LINENO "configure"
7009 /* confdefs.h.  */
7010 _ACEOF
7011 cat confdefs.h >>conftest.$ac_ext
7012 cat >>conftest.$ac_ext <<_ACEOF
7013 /* end confdefs.h.  */
7014 int
7015 find_stack_direction ()
7016 {
7017   static char *addr = 0;
7018   auto char dummy;
7019   if (addr == 0)
7020     {
7021       addr = &dummy;
7022       return find_stack_direction ();
7023     }
7024   else
7025     return (&dummy > addr) ? 1 : -1;
7026 }
7027
7028 int
7029 main ()
7030 {
7031   exit (find_stack_direction () < 0);
7032 }
7033 _ACEOF
7034 rm -f conftest$ac_exeext
7035 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7036   (eval $ac_link) 2>&5
7037   ac_status=$?
7038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7039   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7041   (eval $ac_try) 2>&5
7042   ac_status=$?
7043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7044   (exit $ac_status); }; }; then
7045   ac_cv_c_stack_direction=1
7046 else
7047   echo "$as_me: program exited with status $ac_status" >&5
7048 echo "$as_me: failed program was:" >&5
7049 sed 's/^/| /' conftest.$ac_ext >&5
7050
7051 ( exit $ac_status )
7052 ac_cv_c_stack_direction=-1
7053 fi
7054 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7055 fi
7056 fi
7057 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
7058 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
7059
7060 cat >>confdefs.h <<_ACEOF
7061 #define STACK_DIRECTION $ac_cv_c_stack_direction
7062 _ACEOF
7063
7064
7065 fi
7066
7067
7068
7069 for ac_header in stdlib.h unistd.h
7070 do
7071 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7072 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7073   echo "$as_me:$LINENO: checking for $ac_header" >&5
7074 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7075 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7076   echo $ECHO_N "(cached) $ECHO_C" >&6
7077 fi
7078 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7079 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7080 else
7081   # Is the header compilable?
7082 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7083 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7084 cat >conftest.$ac_ext <<_ACEOF
7085 #line $LINENO "configure"
7086 /* confdefs.h.  */
7087 _ACEOF
7088 cat confdefs.h >>conftest.$ac_ext
7089 cat >>conftest.$ac_ext <<_ACEOF
7090 /* end confdefs.h.  */
7091 $ac_includes_default
7092 #include <$ac_header>
7093 _ACEOF
7094 rm -f conftest.$ac_objext
7095 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7096   (eval $ac_compile) 2>&5
7097   ac_status=$?
7098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7099   (exit $ac_status); } &&
7100          { ac_try='test -s conftest.$ac_objext'
7101   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7102   (eval $ac_try) 2>&5
7103   ac_status=$?
7104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7105   (exit $ac_status); }; }; then
7106   ac_header_compiler=yes
7107 else
7108   echo "$as_me: failed program was:" >&5
7109 sed 's/^/| /' conftest.$ac_ext >&5
7110
7111 ac_header_compiler=no
7112 fi
7113 rm -f conftest.$ac_objext conftest.$ac_ext
7114 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7115 echo "${ECHO_T}$ac_header_compiler" >&6
7116
7117 # Is the header present?
7118 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7119 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7120 cat >conftest.$ac_ext <<_ACEOF
7121 #line $LINENO "configure"
7122 /* confdefs.h.  */
7123 _ACEOF
7124 cat confdefs.h >>conftest.$ac_ext
7125 cat >>conftest.$ac_ext <<_ACEOF
7126 /* end confdefs.h.  */
7127 #include <$ac_header>
7128 _ACEOF
7129 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7130   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7131   ac_status=$?
7132   grep -v '^ *+' conftest.er1 >conftest.err
7133   rm -f conftest.er1
7134   cat conftest.err >&5
7135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7136   (exit $ac_status); } >/dev/null; then
7137   if test -s conftest.err; then
7138     ac_cpp_err=$ac_c_preproc_warn_flag
7139   else
7140     ac_cpp_err=
7141   fi
7142 else
7143   ac_cpp_err=yes
7144 fi
7145 if test -z "$ac_cpp_err"; then
7146   ac_header_preproc=yes
7147 else
7148   echo "$as_me: failed program was:" >&5
7149 sed 's/^/| /' conftest.$ac_ext >&5
7150
7151   ac_header_preproc=no
7152 fi
7153 rm -f conftest.err conftest.$ac_ext
7154 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7155 echo "${ECHO_T}$ac_header_preproc" >&6
7156
7157 # So?  What about this header?
7158 case $ac_header_compiler:$ac_header_preproc in
7159   yes:no )
7160     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7161 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7162     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7163 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7164     (
7165       cat <<\_ASBOX
7166 ## ------------------------------------ ##
7167 ## Report this to bug-autoconf@gnu.org. ##
7168 ## ------------------------------------ ##
7169 _ASBOX
7170     ) |
7171       sed "s/^/$as_me: WARNING:     /" >&2
7172     ;;
7173   no:yes )
7174     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7175 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7176     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7177 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7178     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7179 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7180     (
7181       cat <<\_ASBOX
7182 ## ------------------------------------ ##
7183 ## Report this to bug-autoconf@gnu.org. ##
7184 ## ------------------------------------ ##
7185 _ASBOX
7186     ) |
7187       sed "s/^/$as_me: WARNING:     /" >&2
7188     ;;
7189 esac
7190 echo "$as_me:$LINENO: checking for $ac_header" >&5
7191 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7192 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7193   echo $ECHO_N "(cached) $ECHO_C" >&6
7194 else
7195   eval "$as_ac_Header=$ac_header_preproc"
7196 fi
7197 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7198 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7199
7200 fi
7201 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7202   cat >>confdefs.h <<_ACEOF
7203 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7204 _ACEOF
7205
7206 fi
7207
7208 done
7209
7210
7211 for ac_func in getpagesize
7212 do
7213 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7214 echo "$as_me:$LINENO: checking for $ac_func" >&5
7215 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7216 if eval "test \"\${$as_ac_var+set}\" = set"; then
7217   echo $ECHO_N "(cached) $ECHO_C" >&6
7218 else
7219   cat >conftest.$ac_ext <<_ACEOF
7220 #line $LINENO "configure"
7221 /* confdefs.h.  */
7222 _ACEOF
7223 cat confdefs.h >>conftest.$ac_ext
7224 cat >>conftest.$ac_ext <<_ACEOF
7225 /* end confdefs.h.  */
7226 /* System header to define __stub macros and hopefully few prototypes,
7227     which can conflict with char $ac_func (); below.
7228     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7229     <limits.h> exists even on freestanding compilers.  */
7230 #ifdef __STDC__
7231 # include <limits.h>
7232 #else
7233 # include <assert.h>
7234 #endif
7235 /* Override any gcc2 internal prototype to avoid an error.  */
7236 #ifdef __cplusplus
7237 extern "C"
7238 {
7239 #endif
7240 /* We use char because int might match the return type of a gcc2
7241    builtin and then its argument prototype would still apply.  */
7242 char $ac_func ();
7243 /* The GNU C library defines this for functions which it implements
7244     to always fail with ENOSYS.  Some functions are actually named
7245     something starting with __ and the normal name is an alias.  */
7246 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7247 choke me
7248 #else
7249 char (*f) () = $ac_func;
7250 #endif
7251 #ifdef __cplusplus
7252 }
7253 #endif
7254
7255 int
7256 main ()
7257 {
7258 return f != $ac_func;
7259   ;
7260   return 0;
7261 }
7262 _ACEOF
7263 rm -f conftest.$ac_objext conftest$ac_exeext
7264 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7265   (eval $ac_link) 2>&5
7266   ac_status=$?
7267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7268   (exit $ac_status); } &&
7269          { ac_try='test -s conftest$ac_exeext'
7270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7271   (eval $ac_try) 2>&5
7272   ac_status=$?
7273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7274   (exit $ac_status); }; }; then
7275   eval "$as_ac_var=yes"
7276 else
7277   echo "$as_me: failed program was:" >&5
7278 sed 's/^/| /' conftest.$ac_ext >&5
7279
7280 eval "$as_ac_var=no"
7281 fi
7282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7283 fi
7284 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7285 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7286 if test `eval echo '${'$as_ac_var'}'` = yes; then
7287   cat >>confdefs.h <<_ACEOF
7288 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7289 _ACEOF
7290
7291 fi
7292 done
7293
7294 echo "$as_me:$LINENO: checking for working mmap" >&5
7295 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7296 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7297   echo $ECHO_N "(cached) $ECHO_C" >&6
7298 else
7299   if test "$cross_compiling" = yes; then
7300   ac_cv_func_mmap_fixed_mapped=no
7301 else
7302   cat >conftest.$ac_ext <<_ACEOF
7303 #line $LINENO "configure"
7304 /* confdefs.h.  */
7305 _ACEOF
7306 cat confdefs.h >>conftest.$ac_ext
7307 cat >>conftest.$ac_ext <<_ACEOF
7308 /* end confdefs.h.  */
7309 $ac_includes_default
7310 /* malloc might have been renamed as rpl_malloc. */
7311 #undef malloc
7312
7313 /* Thanks to Mike Haertel and Jim Avera for this test.
7314    Here is a matrix of mmap possibilities:
7315         mmap private not fixed
7316         mmap private fixed at somewhere currently unmapped
7317         mmap private fixed at somewhere already mapped
7318         mmap shared not fixed
7319         mmap shared fixed at somewhere currently unmapped
7320         mmap shared fixed at somewhere already mapped
7321    For private mappings, we should verify that changes cannot be read()
7322    back from the file, nor mmap's back from the file at a different
7323    address.  (There have been systems where private was not correctly
7324    implemented like the infamous i386 svr4.0, and systems where the
7325    VM page cache was not coherent with the file system buffer cache
7326    like early versions of FreeBSD and possibly contemporary NetBSD.)
7327    For shared mappings, we should conversely verify that changes get
7328    propagated back to all the places they're supposed to be.
7329
7330    Grep wants private fixed already mapped.
7331    The main things grep needs to know about mmap are:
7332    * does it exist and is it safe to write into the mmap'd area
7333    * how to use it (BSD variants)  */
7334
7335 #include <fcntl.h>
7336 #include <sys/mman.h>
7337
7338 #if !STDC_HEADERS && !HAVE_STDLIB_H
7339 char *malloc ();
7340 #endif
7341
7342 /* This mess was copied from the GNU getpagesize.h.  */
7343 #if !HAVE_GETPAGESIZE
7344 /* Assume that all systems that can run configure have sys/param.h.  */
7345 # if !HAVE_SYS_PARAM_H
7346 #  define HAVE_SYS_PARAM_H 1
7347 # endif
7348
7349 # ifdef _SC_PAGESIZE
7350 #  define getpagesize() sysconf(_SC_PAGESIZE)
7351 # else /* no _SC_PAGESIZE */
7352 #  if HAVE_SYS_PARAM_H
7353 #   include <sys/param.h>
7354 #   ifdef EXEC_PAGESIZE
7355 #    define getpagesize() EXEC_PAGESIZE
7356 #   else /* no EXEC_PAGESIZE */
7357 #    ifdef NBPG
7358 #     define getpagesize() NBPG * CLSIZE
7359 #     ifndef CLSIZE
7360 #      define CLSIZE 1
7361 #     endif /* no CLSIZE */
7362 #    else /* no NBPG */
7363 #     ifdef NBPC
7364 #      define getpagesize() NBPC
7365 #     else /* no NBPC */
7366 #      ifdef PAGESIZE
7367 #       define getpagesize() PAGESIZE
7368 #      endif /* PAGESIZE */
7369 #     endif /* no NBPC */
7370 #    endif /* no NBPG */
7371 #   endif /* no EXEC_PAGESIZE */
7372 #  else /* no HAVE_SYS_PARAM_H */
7373 #   define getpagesize() 8192   /* punt totally */
7374 #  endif /* no HAVE_SYS_PARAM_H */
7375 # endif /* no _SC_PAGESIZE */
7376
7377 #endif /* no HAVE_GETPAGESIZE */
7378
7379 int
7380 main ()
7381 {
7382   char *data, *data2, *data3;
7383   int i, pagesize;
7384   int fd;
7385
7386   pagesize = getpagesize ();
7387
7388   /* First, make a file with some known garbage in it. */
7389   data = (char *) malloc (pagesize);
7390   if (!data)
7391     exit (1);
7392   for (i = 0; i < pagesize; ++i)
7393     *(data + i) = rand ();
7394   umask (0);
7395   fd = creat ("conftest.mmap", 0600);
7396   if (fd < 0)
7397     exit (1);
7398   if (write (fd, data, pagesize) != pagesize)
7399     exit (1);
7400   close (fd);
7401
7402   /* Next, try to mmap the file at a fixed address which already has
7403      something else allocated at it.  If we can, also make sure that
7404      we see the same garbage.  */
7405   fd = open ("conftest.mmap", O_RDWR);
7406   if (fd < 0)
7407     exit (1);
7408   data2 = (char *) malloc (2 * pagesize);
7409   if (!data2)
7410     exit (1);
7411   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7412   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7413                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
7414     exit (1);
7415   for (i = 0; i < pagesize; ++i)
7416     if (*(data + i) != *(data2 + i))
7417       exit (1);
7418
7419   /* Finally, make sure that changes to the mapped area do not
7420      percolate back to the file as seen by read().  (This is a bug on
7421      some variants of i386 svr4.0.)  */
7422   for (i = 0; i < pagesize; ++i)
7423     *(data2 + i) = *(data2 + i) + 1;
7424   data3 = (char *) malloc (pagesize);
7425   if (!data3)
7426     exit (1);
7427   if (read (fd, data3, pagesize) != pagesize)
7428     exit (1);
7429   for (i = 0; i < pagesize; ++i)
7430     if (*(data + i) != *(data3 + i))
7431       exit (1);
7432   close (fd);
7433   exit (0);
7434 }
7435 _ACEOF
7436 rm -f conftest$ac_exeext
7437 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7438   (eval $ac_link) 2>&5
7439   ac_status=$?
7440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7441   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7442   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7443   (eval $ac_try) 2>&5
7444   ac_status=$?
7445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7446   (exit $ac_status); }; }; then
7447   ac_cv_func_mmap_fixed_mapped=yes
7448 else
7449   echo "$as_me: program exited with status $ac_status" >&5
7450 echo "$as_me: failed program was:" >&5
7451 sed 's/^/| /' conftest.$ac_ext >&5
7452
7453 ( exit $ac_status )
7454 ac_cv_func_mmap_fixed_mapped=no
7455 fi
7456 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7457 fi
7458 fi
7459 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
7460 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7461 if test $ac_cv_func_mmap_fixed_mapped = yes; then
7462
7463 cat >>confdefs.h <<\_ACEOF
7464 #define HAVE_MMAP 1
7465 _ACEOF
7466
7467 fi
7468 rm -f conftest.mmap
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
7480 unistd.h sys/param.h
7481 do
7482 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7483 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7484   echo "$as_me:$LINENO: checking for $ac_header" >&5
7485 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7486 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7487   echo $ECHO_N "(cached) $ECHO_C" >&6
7488 fi
7489 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7490 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7491 else
7492   # Is the header compilable?
7493 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7494 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7495 cat >conftest.$ac_ext <<_ACEOF
7496 #line $LINENO "configure"
7497 /* confdefs.h.  */
7498 _ACEOF
7499 cat confdefs.h >>conftest.$ac_ext
7500 cat >>conftest.$ac_ext <<_ACEOF
7501 /* end confdefs.h.  */
7502 $ac_includes_default
7503 #include <$ac_header>
7504 _ACEOF
7505 rm -f conftest.$ac_objext
7506 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7507   (eval $ac_compile) 2>&5
7508   ac_status=$?
7509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7510   (exit $ac_status); } &&
7511          { ac_try='test -s conftest.$ac_objext'
7512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7513   (eval $ac_try) 2>&5
7514   ac_status=$?
7515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7516   (exit $ac_status); }; }; then
7517   ac_header_compiler=yes
7518 else
7519   echo "$as_me: failed program was:" >&5
7520 sed 's/^/| /' conftest.$ac_ext >&5
7521
7522 ac_header_compiler=no
7523 fi
7524 rm -f conftest.$ac_objext conftest.$ac_ext
7525 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7526 echo "${ECHO_T}$ac_header_compiler" >&6
7527
7528 # Is the header present?
7529 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7530 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7531 cat >conftest.$ac_ext <<_ACEOF
7532 #line $LINENO "configure"
7533 /* confdefs.h.  */
7534 _ACEOF
7535 cat confdefs.h >>conftest.$ac_ext
7536 cat >>conftest.$ac_ext <<_ACEOF
7537 /* end confdefs.h.  */
7538 #include <$ac_header>
7539 _ACEOF
7540 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7541   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7542   ac_status=$?
7543   grep -v '^ *+' conftest.er1 >conftest.err
7544   rm -f conftest.er1
7545   cat conftest.err >&5
7546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7547   (exit $ac_status); } >/dev/null; then
7548   if test -s conftest.err; then
7549     ac_cpp_err=$ac_c_preproc_warn_flag
7550   else
7551     ac_cpp_err=
7552   fi
7553 else
7554   ac_cpp_err=yes
7555 fi
7556 if test -z "$ac_cpp_err"; then
7557   ac_header_preproc=yes
7558 else
7559   echo "$as_me: failed program was:" >&5
7560 sed 's/^/| /' conftest.$ac_ext >&5
7561
7562   ac_header_preproc=no
7563 fi
7564 rm -f conftest.err conftest.$ac_ext
7565 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7566 echo "${ECHO_T}$ac_header_preproc" >&6
7567
7568 # So?  What about this header?
7569 case $ac_header_compiler:$ac_header_preproc in
7570   yes:no )
7571     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7572 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7573     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7574 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7575     (
7576       cat <<\_ASBOX
7577 ## ------------------------------------ ##
7578 ## Report this to bug-autoconf@gnu.org. ##
7579 ## ------------------------------------ ##
7580 _ASBOX
7581     ) |
7582       sed "s/^/$as_me: WARNING:     /" >&2
7583     ;;
7584   no:yes )
7585     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7586 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7587     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7588 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7589     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7590 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7591     (
7592       cat <<\_ASBOX
7593 ## ------------------------------------ ##
7594 ## Report this to bug-autoconf@gnu.org. ##
7595 ## ------------------------------------ ##
7596 _ASBOX
7597     ) |
7598       sed "s/^/$as_me: WARNING:     /" >&2
7599     ;;
7600 esac
7601 echo "$as_me:$LINENO: checking for $ac_header" >&5
7602 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7603 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7604   echo $ECHO_N "(cached) $ECHO_C" >&6
7605 else
7606   eval "$as_ac_Header=$ac_header_preproc"
7607 fi
7608 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7609 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7610
7611 fi
7612 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7613   cat >>confdefs.h <<_ACEOF
7614 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7615 _ACEOF
7616
7617 fi
7618
7619 done
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
7633 strdup __argz_count __argz_stringify __argz_next
7634 do
7635 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7636 echo "$as_me:$LINENO: checking for $ac_func" >&5
7637 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7638 if eval "test \"\${$as_ac_var+set}\" = set"; then
7639   echo $ECHO_N "(cached) $ECHO_C" >&6
7640 else
7641   cat >conftest.$ac_ext <<_ACEOF
7642 #line $LINENO "configure"
7643 /* confdefs.h.  */
7644 _ACEOF
7645 cat confdefs.h >>conftest.$ac_ext
7646 cat >>conftest.$ac_ext <<_ACEOF
7647 /* end confdefs.h.  */
7648 /* System header to define __stub macros and hopefully few prototypes,
7649     which can conflict with char $ac_func (); below.
7650     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7651     <limits.h> exists even on freestanding compilers.  */
7652 #ifdef __STDC__
7653 # include <limits.h>
7654 #else
7655 # include <assert.h>
7656 #endif
7657 /* Override any gcc2 internal prototype to avoid an error.  */
7658 #ifdef __cplusplus
7659 extern "C"
7660 {
7661 #endif
7662 /* We use char because int might match the return type of a gcc2
7663    builtin and then its argument prototype would still apply.  */
7664 char $ac_func ();
7665 /* The GNU C library defines this for functions which it implements
7666     to always fail with ENOSYS.  Some functions are actually named
7667     something starting with __ and the normal name is an alias.  */
7668 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7669 choke me
7670 #else
7671 char (*f) () = $ac_func;
7672 #endif
7673 #ifdef __cplusplus
7674 }
7675 #endif
7676
7677 int
7678 main ()
7679 {
7680 return f != $ac_func;
7681   ;
7682   return 0;
7683 }
7684 _ACEOF
7685 rm -f conftest.$ac_objext conftest$ac_exeext
7686 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7687   (eval $ac_link) 2>&5
7688   ac_status=$?
7689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7690   (exit $ac_status); } &&
7691          { ac_try='test -s conftest$ac_exeext'
7692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7693   (eval $ac_try) 2>&5
7694   ac_status=$?
7695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7696   (exit $ac_status); }; }; then
7697   eval "$as_ac_var=yes"
7698 else
7699   echo "$as_me: failed program was:" >&5
7700 sed 's/^/| /' conftest.$ac_ext >&5
7701
7702 eval "$as_ac_var=no"
7703 fi
7704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7705 fi
7706 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7707 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7708 if test `eval echo '${'$as_ac_var'}'` = yes; then
7709   cat >>confdefs.h <<_ACEOF
7710 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7711 _ACEOF
7712
7713 fi
7714 done
7715
7716
7717    if test $ac_cv_header_locale_h = yes; then
7718     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
7719 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7720 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7721   echo $ECHO_N "(cached) $ECHO_C" >&6
7722 else
7723   cat >conftest.$ac_ext <<_ACEOF
7724 #line $LINENO "configure"
7725 /* confdefs.h.  */
7726 _ACEOF
7727 cat confdefs.h >>conftest.$ac_ext
7728 cat >>conftest.$ac_ext <<_ACEOF
7729 /* end confdefs.h.  */
7730 #include <locale.h>
7731 int
7732 main ()
7733 {
7734 return LC_MESSAGES
7735   ;
7736   return 0;
7737 }
7738 _ACEOF
7739 rm -f conftest.$ac_objext conftest$ac_exeext
7740 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7741   (eval $ac_link) 2>&5
7742   ac_status=$?
7743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7744   (exit $ac_status); } &&
7745          { ac_try='test -s conftest$ac_exeext'
7746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7747   (eval $ac_try) 2>&5
7748   ac_status=$?
7749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7750   (exit $ac_status); }; }; then
7751   am_cv_val_LC_MESSAGES=yes
7752 else
7753   echo "$as_me: failed program was:" >&5
7754 sed 's/^/| /' conftest.$ac_ext >&5
7755
7756 am_cv_val_LC_MESSAGES=no
7757 fi
7758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7759 fi
7760 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
7761 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
7762     if test $am_cv_val_LC_MESSAGES = yes; then
7763
7764 cat >>confdefs.h <<\_ACEOF
7765 #define HAVE_LC_MESSAGES 1
7766 _ACEOF
7767
7768     fi
7769   fi
7770      USE_NLS=yes
7771
7772
7773         nls_cv_force_use_gnu_gettext="no"
7774
7775     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7776     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7777                               nls_cv_header_intl=
7778       nls_cv_header_libgt=
7779       CATOBJEXT=NONE
7780
7781       if test "${ac_cv_header_libintl_h+set}" = set; then
7782   echo "$as_me:$LINENO: checking for libintl.h" >&5
7783 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7784 if test "${ac_cv_header_libintl_h+set}" = set; then
7785   echo $ECHO_N "(cached) $ECHO_C" >&6
7786 fi
7787 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7788 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7789 else
7790   # Is the header compilable?
7791 echo "$as_me:$LINENO: checking libintl.h usability" >&5
7792 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
7793 cat >conftest.$ac_ext <<_ACEOF
7794 #line $LINENO "configure"
7795 /* confdefs.h.  */
7796 _ACEOF
7797 cat confdefs.h >>conftest.$ac_ext
7798 cat >>conftest.$ac_ext <<_ACEOF
7799 /* end confdefs.h.  */
7800 $ac_includes_default
7801 #include <libintl.h>
7802 _ACEOF
7803 rm -f conftest.$ac_objext
7804 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7805   (eval $ac_compile) 2>&5
7806   ac_status=$?
7807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7808   (exit $ac_status); } &&
7809          { ac_try='test -s conftest.$ac_objext'
7810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7811   (eval $ac_try) 2>&5
7812   ac_status=$?
7813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7814   (exit $ac_status); }; }; then
7815   ac_header_compiler=yes
7816 else
7817   echo "$as_me: failed program was:" >&5
7818 sed 's/^/| /' conftest.$ac_ext >&5
7819
7820 ac_header_compiler=no
7821 fi
7822 rm -f conftest.$ac_objext conftest.$ac_ext
7823 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7824 echo "${ECHO_T}$ac_header_compiler" >&6
7825
7826 # Is the header present?
7827 echo "$as_me:$LINENO: checking libintl.h presence" >&5
7828 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
7829 cat >conftest.$ac_ext <<_ACEOF
7830 #line $LINENO "configure"
7831 /* confdefs.h.  */
7832 _ACEOF
7833 cat confdefs.h >>conftest.$ac_ext
7834 cat >>conftest.$ac_ext <<_ACEOF
7835 /* end confdefs.h.  */
7836 #include <libintl.h>
7837 _ACEOF
7838 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7839   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7840   ac_status=$?
7841   grep -v '^ *+' conftest.er1 >conftest.err
7842   rm -f conftest.er1
7843   cat conftest.err >&5
7844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7845   (exit $ac_status); } >/dev/null; then
7846   if test -s conftest.err; then
7847     ac_cpp_err=$ac_c_preproc_warn_flag
7848   else
7849     ac_cpp_err=
7850   fi
7851 else
7852   ac_cpp_err=yes
7853 fi
7854 if test -z "$ac_cpp_err"; then
7855   ac_header_preproc=yes
7856 else
7857   echo "$as_me: failed program was:" >&5
7858 sed 's/^/| /' conftest.$ac_ext >&5
7859
7860   ac_header_preproc=no
7861 fi
7862 rm -f conftest.err conftest.$ac_ext
7863 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7864 echo "${ECHO_T}$ac_header_preproc" >&6
7865
7866 # So?  What about this header?
7867 case $ac_header_compiler:$ac_header_preproc in
7868   yes:no )
7869     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
7870 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7871     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7872 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
7873     (
7874       cat <<\_ASBOX
7875 ## ------------------------------------ ##
7876 ## Report this to bug-autoconf@gnu.org. ##
7877 ## ------------------------------------ ##
7878 _ASBOX
7879     ) |
7880       sed "s/^/$as_me: WARNING:     /" >&2
7881     ;;
7882   no:yes )
7883     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
7884 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
7885     { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
7886 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
7887     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7888 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
7889     (
7890       cat <<\_ASBOX
7891 ## ------------------------------------ ##
7892 ## Report this to bug-autoconf@gnu.org. ##
7893 ## ------------------------------------ ##
7894 _ASBOX
7895     ) |
7896       sed "s/^/$as_me: WARNING:     /" >&2
7897     ;;
7898 esac
7899 echo "$as_me:$LINENO: checking for libintl.h" >&5
7900 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7901 if test "${ac_cv_header_libintl_h+set}" = set; then
7902   echo $ECHO_N "(cached) $ECHO_C" >&6
7903 else
7904   ac_cv_header_libintl_h=$ac_header_preproc
7905 fi
7906 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7907 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7908
7909 fi
7910 if test $ac_cv_header_libintl_h = yes; then
7911   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
7912 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
7913 if test "${gt_cv_func_dgettext_libc+set}" = set; then
7914   echo $ECHO_N "(cached) $ECHO_C" >&6
7915 else
7916   cat >conftest.$ac_ext <<_ACEOF
7917 #line $LINENO "configure"
7918 /* confdefs.h.  */
7919 _ACEOF
7920 cat confdefs.h >>conftest.$ac_ext
7921 cat >>conftest.$ac_ext <<_ACEOF
7922 /* end confdefs.h.  */
7923 #include <libintl.h>
7924 int
7925 main ()
7926 {
7927 return (int) dgettext ("","")
7928   ;
7929   return 0;
7930 }
7931 _ACEOF
7932 rm -f conftest.$ac_objext conftest$ac_exeext
7933 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7934   (eval $ac_link) 2>&5
7935   ac_status=$?
7936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7937   (exit $ac_status); } &&
7938          { ac_try='test -s conftest$ac_exeext'
7939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7940   (eval $ac_try) 2>&5
7941   ac_status=$?
7942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7943   (exit $ac_status); }; }; then
7944   gt_cv_func_dgettext_libc=yes
7945 else
7946   echo "$as_me: failed program was:" >&5
7947 sed 's/^/| /' conftest.$ac_ext >&5
7948
7949 gt_cv_func_dgettext_libc=no
7950 fi
7951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7952 fi
7953 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
7954 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
7955
7956           if test "$gt_cv_func_dgettext_libc" != "yes"; then
7957             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
7958 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
7959 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
7960   echo $ECHO_N "(cached) $ECHO_C" >&6
7961 else
7962   ac_check_lib_save_LIBS=$LIBS
7963 LIBS="-lintl  $LIBS"
7964 cat >conftest.$ac_ext <<_ACEOF
7965 #line $LINENO "configure"
7966 /* confdefs.h.  */
7967 _ACEOF
7968 cat confdefs.h >>conftest.$ac_ext
7969 cat >>conftest.$ac_ext <<_ACEOF
7970 /* end confdefs.h.  */
7971
7972 /* Override any gcc2 internal prototype to avoid an error.  */
7973 #ifdef __cplusplus
7974 extern "C"
7975 #endif
7976 /* We use char because int might match the return type of a gcc2
7977    builtin and then its argument prototype would still apply.  */
7978 char bindtextdomain ();
7979 int
7980 main ()
7981 {
7982 bindtextdomain ();
7983   ;
7984   return 0;
7985 }
7986 _ACEOF
7987 rm -f conftest.$ac_objext conftest$ac_exeext
7988 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7989   (eval $ac_link) 2>&5
7990   ac_status=$?
7991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7992   (exit $ac_status); } &&
7993          { ac_try='test -s conftest$ac_exeext'
7994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7995   (eval $ac_try) 2>&5
7996   ac_status=$?
7997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7998   (exit $ac_status); }; }; then
7999   ac_cv_lib_intl_bindtextdomain=yes
8000 else
8001   echo "$as_me: failed program was:" >&5
8002 sed 's/^/| /' conftest.$ac_ext >&5
8003
8004 ac_cv_lib_intl_bindtextdomain=no
8005 fi
8006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8007 LIBS=$ac_check_lib_save_LIBS
8008 fi
8009 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
8010 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
8011 if test $ac_cv_lib_intl_bindtextdomain = yes; then
8012   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
8013 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
8014 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
8015   echo $ECHO_N "(cached) $ECHO_C" >&6
8016 else
8017   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
8018 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
8019 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
8020   echo $ECHO_N "(cached) $ECHO_C" >&6
8021 else
8022   ac_check_lib_save_LIBS=$LIBS
8023 LIBS="-lintl  $LIBS"
8024 cat >conftest.$ac_ext <<_ACEOF
8025 #line $LINENO "configure"
8026 /* confdefs.h.  */
8027 _ACEOF
8028 cat confdefs.h >>conftest.$ac_ext
8029 cat >>conftest.$ac_ext <<_ACEOF
8030 /* end confdefs.h.  */
8031
8032 /* Override any gcc2 internal prototype to avoid an error.  */
8033 #ifdef __cplusplus
8034 extern "C"
8035 #endif
8036 /* We use char because int might match the return type of a gcc2
8037    builtin and then its argument prototype would still apply.  */
8038 char dgettext ();
8039 int
8040 main ()
8041 {
8042 dgettext ();
8043   ;
8044   return 0;
8045 }
8046 _ACEOF
8047 rm -f conftest.$ac_objext conftest$ac_exeext
8048 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8049   (eval $ac_link) 2>&5
8050   ac_status=$?
8051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8052   (exit $ac_status); } &&
8053          { ac_try='test -s conftest$ac_exeext'
8054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8055   (eval $ac_try) 2>&5
8056   ac_status=$?
8057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8058   (exit $ac_status); }; }; then
8059   ac_cv_lib_intl_dgettext=yes
8060 else
8061   echo "$as_me: failed program was:" >&5
8062 sed 's/^/| /' conftest.$ac_ext >&5
8063
8064 ac_cv_lib_intl_dgettext=no
8065 fi
8066 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8067 LIBS=$ac_check_lib_save_LIBS
8068 fi
8069 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
8070 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
8071 if test $ac_cv_lib_intl_dgettext = yes; then
8072   gt_cv_func_dgettext_libintl=yes
8073 else
8074   gt_cv_func_dgettext_libintl=no
8075 fi
8076
8077 fi
8078 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
8079 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
8080 fi
8081
8082           fi
8083
8084           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
8085             LIBS="$LIBS -lintl";
8086           fi
8087
8088           if test "$gt_cv_func_dgettext_libc" = "yes" \
8089             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
8090
8091 cat >>confdefs.h <<\_ACEOF
8092 #define HAVE_GETTEXT 1
8093 _ACEOF
8094
8095             # Extract the first word of "msgfmt", so it can be a program name with args.
8096 set dummy msgfmt; ac_word=$2
8097 echo "$as_me:$LINENO: checking for $ac_word" >&5
8098 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8099 if test "${ac_cv_path_MSGFMT+set}" = set; then
8100   echo $ECHO_N "(cached) $ECHO_C" >&6
8101 else
8102   case "$MSGFMT" in
8103   /*)
8104   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8105   ;;
8106   *)
8107   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8108   for ac_dir in $PATH; do
8109     test -z "$ac_dir" && ac_dir=.
8110     if test -f $ac_dir/$ac_word; then
8111       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
8112         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
8113         break
8114       fi
8115     fi
8116   done
8117   IFS="$ac_save_ifs"
8118   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
8119   ;;
8120 esac
8121 fi
8122 MSGFMT="$ac_cv_path_MSGFMT"
8123 if test -n "$MSGFMT"; then
8124   echo "$as_me:$LINENO: result: $MSGFMT" >&5
8125 echo "${ECHO_T}$MSGFMT" >&6
8126 else
8127   echo "$as_me:$LINENO: result: no" >&5
8128 echo "${ECHO_T}no" >&6
8129 fi
8130             if test "$MSGFMT" != "no"; then
8131
8132 for ac_func in dcgettext
8133 do
8134 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8135 echo "$as_me:$LINENO: checking for $ac_func" >&5
8136 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8137 if eval "test \"\${$as_ac_var+set}\" = set"; then
8138   echo $ECHO_N "(cached) $ECHO_C" >&6
8139 else
8140   cat >conftest.$ac_ext <<_ACEOF
8141 #line $LINENO "configure"
8142 /* confdefs.h.  */
8143 _ACEOF
8144 cat confdefs.h >>conftest.$ac_ext
8145 cat >>conftest.$ac_ext <<_ACEOF
8146 /* end confdefs.h.  */
8147 /* System header to define __stub macros and hopefully few prototypes,
8148     which can conflict with char $ac_func (); below.
8149     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8150     <limits.h> exists even on freestanding compilers.  */
8151 #ifdef __STDC__
8152 # include <limits.h>
8153 #else
8154 # include <assert.h>
8155 #endif
8156 /* Override any gcc2 internal prototype to avoid an error.  */
8157 #ifdef __cplusplus
8158 extern "C"
8159 {
8160 #endif
8161 /* We use char because int might match the return type of a gcc2
8162    builtin and then its argument prototype would still apply.  */
8163 char $ac_func ();
8164 /* The GNU C library defines this for functions which it implements
8165     to always fail with ENOSYS.  Some functions are actually named
8166     something starting with __ and the normal name is an alias.  */
8167 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8168 choke me
8169 #else
8170 char (*f) () = $ac_func;
8171 #endif
8172 #ifdef __cplusplus
8173 }
8174 #endif
8175
8176 int
8177 main ()
8178 {
8179 return f != $ac_func;
8180   ;
8181   return 0;
8182 }
8183 _ACEOF
8184 rm -f conftest.$ac_objext conftest$ac_exeext
8185 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8186   (eval $ac_link) 2>&5
8187   ac_status=$?
8188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8189   (exit $ac_status); } &&
8190          { ac_try='test -s conftest$ac_exeext'
8191   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8192   (eval $ac_try) 2>&5
8193   ac_status=$?
8194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8195   (exit $ac_status); }; }; then
8196   eval "$as_ac_var=yes"
8197 else
8198   echo "$as_me: failed program was:" >&5
8199 sed 's/^/| /' conftest.$ac_ext >&5
8200
8201 eval "$as_ac_var=no"
8202 fi
8203 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8204 fi
8205 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8206 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8207 if test `eval echo '${'$as_ac_var'}'` = yes; then
8208   cat >>confdefs.h <<_ACEOF
8209 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8210 _ACEOF
8211
8212 fi
8213 done
8214
8215               # Extract the first word of "gmsgfmt", so it can be a program name with args.
8216 set dummy gmsgfmt; ac_word=$2
8217 echo "$as_me:$LINENO: checking for $ac_word" >&5
8218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8219 if test "${ac_cv_path_GMSGFMT+set}" = set; then
8220   echo $ECHO_N "(cached) $ECHO_C" >&6
8221 else
8222   case $GMSGFMT in
8223   [\\/]* | ?:[\\/]*)
8224   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8225   ;;
8226   *)
8227   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8228 for as_dir in $PATH
8229 do
8230   IFS=$as_save_IFS
8231   test -z "$as_dir" && as_dir=.
8232   for ac_exec_ext in '' $ac_executable_extensions; do
8233   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8234     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
8235     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8236     break 2
8237   fi
8238 done
8239 done
8240
8241   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8242   ;;
8243 esac
8244 fi
8245 GMSGFMT=$ac_cv_path_GMSGFMT
8246
8247 if test -n "$GMSGFMT"; then
8248   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
8249 echo "${ECHO_T}$GMSGFMT" >&6
8250 else
8251   echo "$as_me:$LINENO: result: no" >&5
8252 echo "${ECHO_T}no" >&6
8253 fi
8254
8255               # Extract the first word of "xgettext", so it can be a program name with args.
8256 set dummy xgettext; ac_word=$2
8257 echo "$as_me:$LINENO: checking for $ac_word" >&5
8258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8259 if test "${ac_cv_path_XGETTEXT+set}" = set; then
8260   echo $ECHO_N "(cached) $ECHO_C" >&6
8261 else
8262   case "$XGETTEXT" in
8263   /*)
8264   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8265   ;;
8266   *)
8267   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8268   for ac_dir in $PATH; do
8269     test -z "$ac_dir" && ac_dir=.
8270     if test -f $ac_dir/$ac_word; then
8271       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8272         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8273         break
8274       fi
8275     fi
8276   done
8277   IFS="$ac_save_ifs"
8278   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8279   ;;
8280 esac
8281 fi
8282 XGETTEXT="$ac_cv_path_XGETTEXT"
8283 if test -n "$XGETTEXT"; then
8284   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
8285 echo "${ECHO_T}$XGETTEXT" >&6
8286 else
8287   echo "$as_me:$LINENO: result: no" >&5
8288 echo "${ECHO_T}no" >&6
8289 fi
8290
8291               cat >conftest.$ac_ext <<_ACEOF
8292 #line $LINENO "configure"
8293 /* confdefs.h.  */
8294 _ACEOF
8295 cat confdefs.h >>conftest.$ac_ext
8296 cat >>conftest.$ac_ext <<_ACEOF
8297 /* end confdefs.h.  */
8298
8299 int
8300 main ()
8301 {
8302 extern int _nl_msg_cat_cntr;
8303                              return _nl_msg_cat_cntr
8304   ;
8305   return 0;
8306 }
8307 _ACEOF
8308 rm -f conftest.$ac_objext conftest$ac_exeext
8309 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8310   (eval $ac_link) 2>&5
8311   ac_status=$?
8312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8313   (exit $ac_status); } &&
8314          { ac_try='test -s conftest$ac_exeext'
8315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8316   (eval $ac_try) 2>&5
8317   ac_status=$?
8318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8319   (exit $ac_status); }; }; then
8320   CATOBJEXT=.gmo
8321                  DATADIRNAME=share
8322 else
8323   echo "$as_me: failed program was:" >&5
8324 sed 's/^/| /' conftest.$ac_ext >&5
8325
8326 CATOBJEXT=.mo
8327                  DATADIRNAME=lib
8328 fi
8329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8330               INSTOBJEXT=.mo
8331             fi
8332           fi
8333
8334           # Added by Martin Baulig 12/15/98 for libc5 systems
8335           if test "$gt_cv_func_dgettext_libc" != "yes" \
8336             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
8337             INTLLIBS=-lintl
8338             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
8339           fi
8340
8341 fi
8342
8343
8344
8345       if test "$CATOBJEXT" = "NONE"; then
8346                         nls_cv_use_gnu_gettext=yes
8347       fi
8348     fi
8349
8350     if test "$nls_cv_use_gnu_gettext" != "yes"; then
8351
8352 cat >>confdefs.h <<\_ACEOF
8353 #define ENABLE_NLS 1
8354 _ACEOF
8355
8356     else
8357             CATOBJEXT=
8358     fi
8359
8360         if test "$XGETTEXT" != ":"; then
8361                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
8362         : ;
8363       else
8364         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
8365 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
8366         XGETTEXT=":"
8367       fi
8368     fi
8369
8370     # We need to process the po/ directory.
8371     POSUB=po
8372
8373               ac_config_commands="$ac_config_commands default-2"
8374
8375
8376                 for lang in $ALL_LINGUAS; do
8377       GMOFILES="$GMOFILES $lang.gmo"
8378       POFILES="$POFILES $lang.po"
8379     done
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393    if test "x$CATOBJEXT" != "x"; then
8394      if test "x$ALL_LINGUAS" = "x"; then
8395        LINGUAS=
8396      else
8397        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
8398 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
8399        NEW_LINGUAS=
8400        for lang in ${LINGUAS=$ALL_LINGUAS}; do
8401          case "$ALL_LINGUAS" in
8402           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
8403          esac
8404        done
8405        LINGUAS=$NEW_LINGUAS
8406        echo "$as_me:$LINENO: result: $LINGUAS" >&5
8407 echo "${ECHO_T}$LINGUAS" >&6
8408      fi
8409
8410           if test -n "$LINGUAS"; then
8411        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8412      fi
8413    fi
8414
8415             test -d po || mkdir po
8416    if test "$CATOBJEXT" = ".cat"; then
8417      if test "${ac_cv_header_linux_version_h+set}" = set; then
8418   echo "$as_me:$LINENO: checking for linux/version.h" >&5
8419 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8420 if test "${ac_cv_header_linux_version_h+set}" = set; then
8421   echo $ECHO_N "(cached) $ECHO_C" >&6
8422 fi
8423 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8424 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8425 else
8426   # Is the header compilable?
8427 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
8428 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
8429 cat >conftest.$ac_ext <<_ACEOF
8430 #line $LINENO "configure"
8431 /* confdefs.h.  */
8432 _ACEOF
8433 cat confdefs.h >>conftest.$ac_ext
8434 cat >>conftest.$ac_ext <<_ACEOF
8435 /* end confdefs.h.  */
8436 $ac_includes_default
8437 #include <linux/version.h>
8438 _ACEOF
8439 rm -f conftest.$ac_objext
8440 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8441   (eval $ac_compile) 2>&5
8442   ac_status=$?
8443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8444   (exit $ac_status); } &&
8445          { ac_try='test -s conftest.$ac_objext'
8446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8447   (eval $ac_try) 2>&5
8448   ac_status=$?
8449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8450   (exit $ac_status); }; }; then
8451   ac_header_compiler=yes
8452 else
8453   echo "$as_me: failed program was:" >&5
8454 sed 's/^/| /' conftest.$ac_ext >&5
8455
8456 ac_header_compiler=no
8457 fi
8458 rm -f conftest.$ac_objext conftest.$ac_ext
8459 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8460 echo "${ECHO_T}$ac_header_compiler" >&6
8461
8462 # Is the header present?
8463 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
8464 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
8465 cat >conftest.$ac_ext <<_ACEOF
8466 #line $LINENO "configure"
8467 /* confdefs.h.  */
8468 _ACEOF
8469 cat confdefs.h >>conftest.$ac_ext
8470 cat >>conftest.$ac_ext <<_ACEOF
8471 /* end confdefs.h.  */
8472 #include <linux/version.h>
8473 _ACEOF
8474 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8475   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8476   ac_status=$?
8477   grep -v '^ *+' conftest.er1 >conftest.err
8478   rm -f conftest.er1
8479   cat conftest.err >&5
8480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8481   (exit $ac_status); } >/dev/null; then
8482   if test -s conftest.err; then
8483     ac_cpp_err=$ac_c_preproc_warn_flag
8484   else
8485     ac_cpp_err=
8486   fi
8487 else
8488   ac_cpp_err=yes
8489 fi
8490 if test -z "$ac_cpp_err"; then
8491   ac_header_preproc=yes
8492 else
8493   echo "$as_me: failed program was:" >&5
8494 sed 's/^/| /' conftest.$ac_ext >&5
8495
8496   ac_header_preproc=no
8497 fi
8498 rm -f conftest.err conftest.$ac_ext
8499 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8500 echo "${ECHO_T}$ac_header_preproc" >&6
8501
8502 # So?  What about this header?
8503 case $ac_header_compiler:$ac_header_preproc in
8504   yes:no )
8505     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
8506 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8507     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8508 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
8509     (
8510       cat <<\_ASBOX
8511 ## ------------------------------------ ##
8512 ## Report this to bug-autoconf@gnu.org. ##
8513 ## ------------------------------------ ##
8514 _ASBOX
8515     ) |
8516       sed "s/^/$as_me: WARNING:     /" >&2
8517     ;;
8518   no:yes )
8519     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
8520 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
8521     { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
8522 echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
8523     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8524 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
8525     (
8526       cat <<\_ASBOX
8527 ## ------------------------------------ ##
8528 ## Report this to bug-autoconf@gnu.org. ##
8529 ## ------------------------------------ ##
8530 _ASBOX
8531     ) |
8532       sed "s/^/$as_me: WARNING:     /" >&2
8533     ;;
8534 esac
8535 echo "$as_me:$LINENO: checking for linux/version.h" >&5
8536 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8537 if test "${ac_cv_header_linux_version_h+set}" = set; then
8538   echo $ECHO_N "(cached) $ECHO_C" >&6
8539 else
8540   ac_cv_header_linux_version_h=$ac_header_preproc
8541 fi
8542 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8543 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8544
8545 fi
8546 if test $ac_cv_header_linux_version_h = yes; then
8547   msgformat=linux
8548 else
8549   msgformat=xopen
8550 fi
8551
8552
8553
8554                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
8555    fi
8556
8557             MKINSTALLDIRS=
8558 #
8559 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
8560 #
8561 #   if test -n "$ac_aux_dir"; then
8562 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8563 #   fi
8564    if test -z "$MKINSTALLDIRS"; then
8565      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8566    fi
8567
8568    # jwz: you know what, screw it.  Let's just use the version that I
8569    # already computed in configure.in, instead of this version that came
8570    # with the i18n crud, ok?
8571    MKINSTALLDIRS="$INSTALL_DIRS"
8572
8573
8574
8575
8576          test -d po || mkdir po
8577    if test "x$srcdir" != "x."; then
8578      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8579        posrcprefix="$srcdir/"
8580      else
8581        posrcprefix="../$srcdir/"
8582      fi
8583    else
8584      posrcprefix="../"
8585    fi
8586    rm -f po/POTFILES
8587    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8588         < $srcdir/po/POTFILES.in > po/POTFILES
8589
8590 MKINSTALLDIRS="$INSTALL_DIRS"
8591
8592
8593 ###############################################################################
8594 #
8595 #       Check for -lXmu (some fucked up vendors don't ship it...)
8596 #
8597 ###############################################################################
8598
8599 have_xmu=no
8600
8601   ac_save_CPPFLAGS="$CPPFLAGS"
8602   if test \! -z "$includedir" ; then
8603     CPPFLAGS="$CPPFLAGS -I$includedir"
8604   fi
8605   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8606   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
8607 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
8608 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
8609   echo $ECHO_N "(cached) $ECHO_C" >&6
8610 else
8611   cat >conftest.$ac_ext <<_ACEOF
8612 #line $LINENO "configure"
8613 /* confdefs.h.  */
8614 _ACEOF
8615 cat confdefs.h >>conftest.$ac_ext
8616 cat >>conftest.$ac_ext <<_ACEOF
8617 /* end confdefs.h.  */
8618 #include <stdlib.h>
8619                    #include <stdio.h>
8620                    #include <X11/Intrinsic.h>
8621
8622 #include <X11/Xmu/Error.h>
8623 _ACEOF
8624 rm -f conftest.$ac_objext
8625 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8626   (eval $ac_compile) 2>&5
8627   ac_status=$?
8628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8629   (exit $ac_status); } &&
8630          { ac_try='test -s conftest.$ac_objext'
8631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8632   (eval $ac_try) 2>&5
8633   ac_status=$?
8634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8635   (exit $ac_status); }; }; then
8636   ac_cv_header_X11_Xmu_Error_h=yes
8637 else
8638   echo "$as_me: failed program was:" >&5
8639 sed 's/^/| /' conftest.$ac_ext >&5
8640
8641 ac_cv_header_X11_Xmu_Error_h=no
8642 fi
8643 rm -f conftest.$ac_objext conftest.$ac_ext
8644 fi
8645 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
8646 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
8647 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
8648   have_xmu=yes
8649 fi
8650
8651
8652   CPPFLAGS="$ac_save_CPPFLAGS"
8653 if test "$have_xmu" = no ; then
8654   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8655   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8656   XMU_LIBS=''
8657 else
8658   XMU_SRCS=''
8659   XMU_OBJS=''
8660   XMU_LIBS='-lXmu'
8661   cat >>confdefs.h <<\_ACEOF
8662 #define HAVE_XMU 1
8663 _ACEOF
8664
8665 fi
8666
8667
8668 ###############################################################################
8669 #
8670 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8671 #       See comp.windows.x FAQ question 124.  The right fix is to
8672 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8673 #
8674 ###############################################################################
8675
8676 if test "$have_xmu" = yes ; then
8677   case "$host" in
8678     *-sunos4*)
8679     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8680 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
8681 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
8682   echo $ECHO_N "(cached) $ECHO_C" >&6
8683 else
8684   ac_save_LDFLAGS="$LDFLAGS"
8685                     if test \! -z "$x_libraries" ; then
8686                       LDFLAGS="$LDFLAGS -L$x_libraries"
8687                     fi
8688                     # Note: this trick never works!  (Generally.)
8689                     # We're only getting away with using AC_TRY_LINK
8690                     # with X libraries because we know it's SunOS.
8691                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8692                     cat >conftest.$ac_ext <<_ACEOF
8693 #line $LINENO "configure"
8694 /* confdefs.h.  */
8695 _ACEOF
8696 cat confdefs.h >>conftest.$ac_ext
8697 cat >>conftest.$ac_ext <<_ACEOF
8698 /* end confdefs.h.  */
8699
8700 int
8701 main ()
8702 {
8703
8704   ;
8705   return 0;
8706 }
8707 _ACEOF
8708 rm -f conftest.$ac_objext conftest$ac_exeext
8709 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8710   (eval $ac_link) 2>&5
8711   ac_status=$?
8712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8713   (exit $ac_status); } &&
8714          { ac_try='test -s conftest$ac_exeext'
8715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8716   (eval $ac_try) 2>&5
8717   ac_status=$?
8718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8719   (exit $ac_status); }; }; then
8720   ac_cv_sunos_xmu_bug=no
8721 else
8722   echo "$as_me: failed program was:" >&5
8723 sed 's/^/| /' conftest.$ac_ext >&5
8724
8725 ac_cv_sunos_xmu_bug=yes
8726 fi
8727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8728                     LDFLAGS="$ac_save_LDFLAGS"
8729 fi
8730 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
8731 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
8732     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8733       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
8734 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
8735 if test "${ac_cv_ld_static+set}" = set; then
8736   echo $ECHO_N "(cached) $ECHO_C" >&6
8737 else
8738   ac_save_LDFLAGS="$LDFLAGS"
8739                       LDFLAGS="$LDFLAGS -static"
8740                       cat >conftest.$ac_ext <<_ACEOF
8741 #line $LINENO "configure"
8742 /* confdefs.h.  */
8743 _ACEOF
8744 cat confdefs.h >>conftest.$ac_ext
8745 cat >>conftest.$ac_ext <<_ACEOF
8746 /* end confdefs.h.  */
8747
8748 int
8749 main ()
8750 {
8751
8752   ;
8753   return 0;
8754 }
8755 _ACEOF
8756 rm -f conftest.$ac_objext conftest$ac_exeext
8757 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8758   (eval $ac_link) 2>&5
8759   ac_status=$?
8760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8761   (exit $ac_status); } &&
8762          { ac_try='test -s conftest$ac_exeext'
8763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8764   (eval $ac_try) 2>&5
8765   ac_status=$?
8766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8767   (exit $ac_status); }; }; then
8768   ac_cv_ld_static=yes
8769 else
8770   echo "$as_me: failed program was:" >&5
8771 sed 's/^/| /' conftest.$ac_ext >&5
8772
8773 ac_cv_ld_static=no
8774 fi
8775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8776                     LDFLAGS="$ac_save_LDFLAGS"
8777 fi
8778 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
8779 echo "${ECHO_T}$ac_cv_ld_static" >&6
8780       if test "$ac_cv_ld_static" = yes ; then
8781         LDFLAGS="$LDFLAGS -static"
8782       else
8783         LDFLAGS="$LDFLAGS -Bstatic"
8784       fi
8785     fi
8786     ;;
8787   esac
8788 fi
8789
8790
8791 ###############################################################################
8792 #
8793 #       Handle the --with-hackdir option
8794 #
8795 ###############################################################################
8796
8797 have_hackdir=yes
8798 with_hackdir_req=unspecified
8799
8800 # Check whether --with-hackdir or --without-hackdir was given.
8801 if test "${with_hackdir+set}" = set; then
8802   withval="$with_hackdir"
8803   with_hackdir="$withval"; with_hackdir_req="$withval"
8804 else
8805   with_hackdir=yes
8806 fi;
8807
8808 if test x"$with_hackdir" = xyes; then
8809   HACKDIR='${exec_prefix}/lib/xscreensaver'
8810 elif test x"$with_hackdir" = xno; then
8811   HACKDIR='${bindir}'
8812 else
8813   # there must be a better way than this...
8814   if test -z "`echo $with_hackdir | sed 's@^/.*@@'`" ; then
8815     # absolute path
8816     HACKDIR=$with_hackdir
8817   else
8818     # relative path
8819     HACKDIR="\${exec_prefix}$with_hackdir"
8820   fi
8821 fi
8822
8823 # canonicalize slashes.
8824 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8825
8826 # This option used to be called --enable-subdir; make sure that is no longer
8827 # used, since configure brain-damagedly ignores unknown --enable options.
8828
8829 obsolete_enable=
8830 # Check whether --enable-subdir or --disable-subdir was given.
8831 if test "${enable_subdir+set}" = set; then
8832   enableval="$enable_subdir"
8833   obsolete_enable=yes
8834 fi;
8835 if test -n "$obsolete_enable"; then
8836   echo "error: the --enable-subdir option has been replaced with"
8837   echo "       the new --with-hackdir option; see \`configure --help'"
8838   echo "       for more information."
8839   exit 1
8840 fi
8841
8842
8843 ###############################################################################
8844 #
8845 #       Handle the --with-configdir option
8846 #
8847 ###############################################################################
8848
8849 have_configdir=yes
8850 with_configdir_req=unspecified
8851
8852 # Check whether --with-configdir or --without-configdir was given.
8853 if test "${with_configdir+set}" = set; then
8854   withval="$with_configdir"
8855   with_configdir="$withval"; with_configdir_req="$withval"
8856 else
8857   with_configdir=yes
8858 fi;
8859
8860 if test x"$with_configdir" = xyes; then
8861   # filled in later...
8862   HACK_CONF_DIR=''
8863 elif test x"$with_configdir" = xno; then
8864   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8865   exit 1
8866 else
8867   # there must be a better way than this...
8868   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8869     # absolute path
8870     HACK_CONF_DIR=$with_configdir
8871   else
8872     # relative path
8873     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8874   fi
8875 fi
8876
8877
8878
8879
8880 ###############################################################################
8881 #
8882 #       Check for the SGI SCREEN_SAVER server extension.
8883 #
8884 ###############################################################################
8885
8886 have_sgi=no
8887 with_sgi_req=unspecified
8888
8889 # Check whether --with-sgi-ext or --without-sgi-ext was given.
8890 if test "${with_sgi_ext+set}" = set; then
8891   withval="$with_sgi_ext"
8892   with_sgi="$withval"; with_sgi_req="$withval"
8893 else
8894   with_sgi=yes
8895 fi;
8896
8897
8898    case "$with_sgi" in
8899     yes) ;;
8900     no)  ;;
8901
8902     /*)
8903      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
8904 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
8905      d=$with_sgi/include
8906      if test -d $d; then
8907        X_CFLAGS="-I$d $X_CFLAGS"
8908        echo "$as_me:$LINENO: result: $d" >&5
8909 echo "${ECHO_T}$d" >&6
8910      else
8911        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8912 echo "${ECHO_T}not found ($d: no such directory)" >&6
8913      fi
8914
8915      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
8916 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
8917      d=$with_sgi/lib
8918      if test -d $d; then
8919        X_LIBS="-L$d $X_LIBS"
8920        echo "$as_me:$LINENO: result: $d" >&5
8921 echo "${ECHO_T}$d" >&6
8922      else
8923        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8924 echo "${ECHO_T}not found ($d: no such directory)" >&6
8925      fi
8926
8927      # replace the directory string with "yes".
8928      with_sgi_req="yes"
8929      with_sgi=$with_sgi_req
8930      ;;
8931
8932     *)
8933      echo ""
8934      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
8935      echo "       If it is a directory, then \`DIR/include' will be added to"
8936      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8937      exit 1
8938      ;;
8939    esac
8940
8941
8942 if test "$with_sgi" = yes; then
8943
8944   ac_save_CPPFLAGS="$CPPFLAGS"
8945   if test \! -z "$includedir" ; then
8946     CPPFLAGS="$CPPFLAGS -I$includedir"
8947   fi
8948   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8949   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
8950 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
8951 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
8952   echo $ECHO_N "(cached) $ECHO_C" >&6
8953 else
8954   cat >conftest.$ac_ext <<_ACEOF
8955 #line $LINENO "configure"
8956 /* confdefs.h.  */
8957 _ACEOF
8958 cat confdefs.h >>conftest.$ac_ext
8959 cat >>conftest.$ac_ext <<_ACEOF
8960 /* end confdefs.h.  */
8961 #include <X11/Xlib.h>
8962
8963 #include <X11/extensions/XScreenSaver.h>
8964 _ACEOF
8965 rm -f conftest.$ac_objext
8966 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8967   (eval $ac_compile) 2>&5
8968   ac_status=$?
8969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8970   (exit $ac_status); } &&
8971          { ac_try='test -s conftest.$ac_objext'
8972   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8973   (eval $ac_try) 2>&5
8974   ac_status=$?
8975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8976   (exit $ac_status); }; }; then
8977   ac_cv_header_X11_extensions_XScreenSaver_h=yes
8978 else
8979   echo "$as_me: failed program was:" >&5
8980 sed 's/^/| /' conftest.$ac_ext >&5
8981
8982 ac_cv_header_X11_extensions_XScreenSaver_h=no
8983 fi
8984 rm -f conftest.$ac_objext conftest.$ac_ext
8985 fi
8986 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
8987 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
8988 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
8989   have_sgi=yes
8990                      cat >>confdefs.h <<\_ACEOF
8991 #define HAVE_SGI_SAVER_EXTENSION 1
8992 _ACEOF
8993
8994 fi
8995
8996
8997   CPPFLAGS="$ac_save_CPPFLAGS"
8998
8999 elif test "$with_sgi" != no; then
9000   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
9001   exit 1
9002 fi
9003
9004
9005 ###############################################################################
9006 #
9007 #       Check for the MIT-SCREEN-SAVER server extension.
9008 #
9009 ###############################################################################
9010
9011 have_mit=no
9012 with_mit_req=unspecified
9013
9014 # Check whether --with-mit-ext or --without-mit-ext was given.
9015 if test "${with_mit_ext+set}" = set; then
9016   withval="$with_mit_ext"
9017   with_mit="$withval"; with_mit_req="$withval"
9018 else
9019   with_mit=yes
9020 fi;
9021
9022
9023    case "$with_mit" in
9024     yes) ;;
9025     no)  ;;
9026
9027     /*)
9028      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER headers" >&5
9029 echo $ECHO_N "checking for MIT-SCREEN-SAVER headers... $ECHO_C" >&6
9030      d=$with_mit/include
9031      if test -d $d; then
9032        X_CFLAGS="-I$d $X_CFLAGS"
9033        echo "$as_me:$LINENO: result: $d" >&5
9034 echo "${ECHO_T}$d" >&6
9035      else
9036        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9037 echo "${ECHO_T}not found ($d: no such directory)" >&6
9038      fi
9039
9040      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER libs" >&5
9041 echo $ECHO_N "checking for MIT-SCREEN-SAVER libs... $ECHO_C" >&6
9042      d=$with_mit/lib
9043      if test -d $d; then
9044        X_LIBS="-L$d $X_LIBS"
9045        echo "$as_me:$LINENO: result: $d" >&5
9046 echo "${ECHO_T}$d" >&6
9047      else
9048        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9049 echo "${ECHO_T}not found ($d: no such directory)" >&6
9050      fi
9051
9052      # replace the directory string with "yes".
9053      with_mit_req="yes"
9054      with_mit=$with_mit_req
9055      ;;
9056
9057     *)
9058      echo ""
9059      echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
9060      echo "       If it is a directory, then \`DIR/include' will be added to"
9061      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9062      exit 1
9063      ;;
9064    esac
9065
9066
9067 if test "$with_mit" = yes; then
9068
9069   ac_save_CPPFLAGS="$CPPFLAGS"
9070   if test \! -z "$includedir" ; then
9071     CPPFLAGS="$CPPFLAGS -I$includedir"
9072   fi
9073   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9074   echo "$as_me:$LINENO: checking for X11/extensions/scrnsaver.h" >&5
9075 echo $ECHO_N "checking for X11/extensions/scrnsaver.h... $ECHO_C" >&6
9076 if test "${ac_cv_header_X11_extensions_scrnsaver_h+set}" = set; then
9077   echo $ECHO_N "(cached) $ECHO_C" >&6
9078 else
9079   cat >conftest.$ac_ext <<_ACEOF
9080 #line $LINENO "configure"
9081 /* confdefs.h.  */
9082 _ACEOF
9083 cat confdefs.h >>conftest.$ac_ext
9084 cat >>conftest.$ac_ext <<_ACEOF
9085 /* end confdefs.h.  */
9086 #include <X11/Xlib.h>
9087
9088 #include <X11/extensions/scrnsaver.h>
9089 _ACEOF
9090 rm -f conftest.$ac_objext
9091 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9092   (eval $ac_compile) 2>&5
9093   ac_status=$?
9094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9095   (exit $ac_status); } &&
9096          { ac_try='test -s conftest.$ac_objext'
9097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9098   (eval $ac_try) 2>&5
9099   ac_status=$?
9100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9101   (exit $ac_status); }; }; then
9102   ac_cv_header_X11_extensions_scrnsaver_h=yes
9103 else
9104   echo "$as_me: failed program was:" >&5
9105 sed 's/^/| /' conftest.$ac_ext >&5
9106
9107 ac_cv_header_X11_extensions_scrnsaver_h=no
9108 fi
9109 rm -f conftest.$ac_objext conftest.$ac_ext
9110 fi
9111 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_scrnsaver_h" >&5
9112 echo "${ECHO_T}$ac_cv_header_X11_extensions_scrnsaver_h" >&6
9113 if test $ac_cv_header_X11_extensions_scrnsaver_h = yes; then
9114   have_mit=yes
9115 fi
9116
9117
9118   CPPFLAGS="$ac_save_CPPFLAGS"
9119
9120   # Now check to see if it's really in the library; XF86Free-3.3 ships
9121   # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
9122   #
9123   if test "$have_mit" = yes; then
9124
9125   ac_save_CPPFLAGS="$CPPFLAGS"
9126   ac_save_LDFLAGS="$LDFLAGS"
9127 #  ac_save_LIBS="$LIBS"
9128
9129   if test \! -z "$includedir" ; then
9130     CPPFLAGS="$CPPFLAGS -I$includedir"
9131   fi
9132   # note: $X_CFLAGS includes $x_includes
9133   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9134
9135   if test \! -z "$libdir" ; then
9136     LDFLAGS="$LDFLAGS -L$libdir"
9137   fi
9138   # note: $X_LIBS includes $x_libraries
9139   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9140
9141   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXext" >&5
9142 echo $ECHO_N "checking for XScreenSaverRegister in -lXext... $ECHO_C" >&6
9143 if test "${ac_cv_lib_Xext_XScreenSaverRegister+set}" = set; then
9144   echo $ECHO_N "(cached) $ECHO_C" >&6
9145 else
9146   ac_check_lib_save_LIBS=$LIBS
9147 LIBS="-lXext -lm $LIBS"
9148 cat >conftest.$ac_ext <<_ACEOF
9149 #line $LINENO "configure"
9150 /* confdefs.h.  */
9151 _ACEOF
9152 cat confdefs.h >>conftest.$ac_ext
9153 cat >>conftest.$ac_ext <<_ACEOF
9154 /* end confdefs.h.  */
9155
9156 /* Override any gcc2 internal prototype to avoid an error.  */
9157 #ifdef __cplusplus
9158 extern "C"
9159 #endif
9160 /* We use char because int might match the return type of a gcc2
9161    builtin and then its argument prototype would still apply.  */
9162 char XScreenSaverRegister ();
9163 int
9164 main ()
9165 {
9166 XScreenSaverRegister ();
9167   ;
9168   return 0;
9169 }
9170 _ACEOF
9171 rm -f conftest.$ac_objext conftest$ac_exeext
9172 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9173   (eval $ac_link) 2>&5
9174   ac_status=$?
9175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176   (exit $ac_status); } &&
9177          { ac_try='test -s conftest$ac_exeext'
9178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9179   (eval $ac_try) 2>&5
9180   ac_status=$?
9181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9182   (exit $ac_status); }; }; then
9183   ac_cv_lib_Xext_XScreenSaverRegister=yes
9184 else
9185   echo "$as_me: failed program was:" >&5
9186 sed 's/^/| /' conftest.$ac_ext >&5
9187
9188 ac_cv_lib_Xext_XScreenSaverRegister=no
9189 fi
9190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9191 LIBS=$ac_check_lib_save_LIBS
9192 fi
9193 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XScreenSaverRegister" >&5
9194 echo "${ECHO_T}$ac_cv_lib_Xext_XScreenSaverRegister" >&6
9195 if test $ac_cv_lib_Xext_XScreenSaverRegister = yes; then
9196   true
9197 else
9198   have_mit=no
9199 fi
9200
9201   CPPFLAGS="$ac_save_CPPFLAGS"
9202   LDFLAGS="$ac_save_LDFLAGS"
9203 #  LIBS="$ac_save_LIBS"
9204
9205
9206     if test "$have_mit" = no; then
9207       # Fuck!  Looks like XF86Free-3.3 actually puts it in XExExt instead
9208       # of in Xext.  Thank you master, may I have another.
9209
9210   ac_save_CPPFLAGS="$CPPFLAGS"
9211   ac_save_LDFLAGS="$LDFLAGS"
9212 #  ac_save_LIBS="$LIBS"
9213
9214   if test \! -z "$includedir" ; then
9215     CPPFLAGS="$CPPFLAGS -I$includedir"
9216   fi
9217   # note: $X_CFLAGS includes $x_includes
9218   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9219
9220   if test \! -z "$libdir" ; then
9221     LDFLAGS="$LDFLAGS -L$libdir"
9222   fi
9223   # note: $X_LIBS includes $x_libraries
9224   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9225
9226   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXExExt" >&5
9227 echo $ECHO_N "checking for XScreenSaverRegister in -lXExExt... $ECHO_C" >&6
9228 if test "${ac_cv_lib_XExExt_XScreenSaverRegister+set}" = set; then
9229   echo $ECHO_N "(cached) $ECHO_C" >&6
9230 else
9231   ac_check_lib_save_LIBS=$LIBS
9232 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
9233 cat >conftest.$ac_ext <<_ACEOF
9234 #line $LINENO "configure"
9235 /* confdefs.h.  */
9236 _ACEOF
9237 cat confdefs.h >>conftest.$ac_ext
9238 cat >>conftest.$ac_ext <<_ACEOF
9239 /* end confdefs.h.  */
9240
9241 /* Override any gcc2 internal prototype to avoid an error.  */
9242 #ifdef __cplusplus
9243 extern "C"
9244 #endif
9245 /* We use char because int might match the return type of a gcc2
9246    builtin and then its argument prototype would still apply.  */
9247 char XScreenSaverRegister ();
9248 int
9249 main ()
9250 {
9251 XScreenSaverRegister ();
9252   ;
9253   return 0;
9254 }
9255 _ACEOF
9256 rm -f conftest.$ac_objext conftest$ac_exeext
9257 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9258   (eval $ac_link) 2>&5
9259   ac_status=$?
9260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9261   (exit $ac_status); } &&
9262          { ac_try='test -s conftest$ac_exeext'
9263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9264   (eval $ac_try) 2>&5
9265   ac_status=$?
9266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9267   (exit $ac_status); }; }; then
9268   ac_cv_lib_XExExt_XScreenSaverRegister=yes
9269 else
9270   echo "$as_me: failed program was:" >&5
9271 sed 's/^/| /' conftest.$ac_ext >&5
9272
9273 ac_cv_lib_XExExt_XScreenSaverRegister=no
9274 fi
9275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9276 LIBS=$ac_check_lib_save_LIBS
9277 fi
9278 echo "$as_me:$LINENO: result: $ac_cv_lib_XExExt_XScreenSaverRegister" >&5
9279 echo "${ECHO_T}$ac_cv_lib_XExExt_XScreenSaverRegister" >&6
9280 if test $ac_cv_lib_XExExt_XScreenSaverRegister = yes; then
9281   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
9282 else
9283   true
9284 fi
9285
9286   CPPFLAGS="$ac_save_CPPFLAGS"
9287   LDFLAGS="$ac_save_LDFLAGS"
9288 #  LIBS="$ac_save_LIBS"
9289
9290     fi
9291
9292     if test "$have_mit" = no; then
9293       # Double fuck!  Looks like some versions of XFree86 (whichever version
9294       # it is that comes with RedHat Linux 2.0 -- I can't find a version
9295       # number) put this garbage in Xss instead of Xext.  Thank you master,
9296       #  may I have another.
9297
9298   ac_save_CPPFLAGS="$CPPFLAGS"
9299   ac_save_LDFLAGS="$LDFLAGS"
9300 #  ac_save_LIBS="$LIBS"
9301
9302   if test \! -z "$includedir" ; then
9303     CPPFLAGS="$CPPFLAGS -I$includedir"
9304   fi
9305   # note: $X_CFLAGS includes $x_includes
9306   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9307
9308   if test \! -z "$libdir" ; then
9309     LDFLAGS="$LDFLAGS -L$libdir"
9310   fi
9311   # note: $X_LIBS includes $x_libraries
9312   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9313
9314   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXss" >&5
9315 echo $ECHO_N "checking for XScreenSaverRegister in -lXss... $ECHO_C" >&6
9316 if test "${ac_cv_lib_Xss_XScreenSaverRegister+set}" = set; then
9317   echo $ECHO_N "(cached) $ECHO_C" >&6
9318 else
9319   ac_check_lib_save_LIBS=$LIBS
9320 LIBS="-lXss -lX11 -lXext -lm $LIBS"
9321 cat >conftest.$ac_ext <<_ACEOF
9322 #line $LINENO "configure"
9323 /* confdefs.h.  */
9324 _ACEOF
9325 cat confdefs.h >>conftest.$ac_ext
9326 cat >>conftest.$ac_ext <<_ACEOF
9327 /* end confdefs.h.  */
9328
9329 /* Override any gcc2 internal prototype to avoid an error.  */
9330 #ifdef __cplusplus
9331 extern "C"
9332 #endif
9333 /* We use char because int might match the return type of a gcc2
9334    builtin and then its argument prototype would still apply.  */
9335 char XScreenSaverRegister ();
9336 int
9337 main ()
9338 {
9339 XScreenSaverRegister ();
9340   ;
9341   return 0;
9342 }
9343 _ACEOF
9344 rm -f conftest.$ac_objext conftest$ac_exeext
9345 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9346   (eval $ac_link) 2>&5
9347   ac_status=$?
9348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9349   (exit $ac_status); } &&
9350          { ac_try='test -s conftest$ac_exeext'
9351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9352   (eval $ac_try) 2>&5
9353   ac_status=$?
9354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9355   (exit $ac_status); }; }; then
9356   ac_cv_lib_Xss_XScreenSaverRegister=yes
9357 else
9358   echo "$as_me: failed program was:" >&5
9359 sed 's/^/| /' conftest.$ac_ext >&5
9360
9361 ac_cv_lib_Xss_XScreenSaverRegister=no
9362 fi
9363 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9364 LIBS=$ac_check_lib_save_LIBS
9365 fi
9366 echo "$as_me:$LINENO: result: $ac_cv_lib_Xss_XScreenSaverRegister" >&5
9367 echo "${ECHO_T}$ac_cv_lib_Xss_XScreenSaverRegister" >&6
9368 if test $ac_cv_lib_Xss_XScreenSaverRegister = yes; then
9369   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
9370 else
9371   true
9372 fi
9373
9374   CPPFLAGS="$ac_save_CPPFLAGS"
9375   LDFLAGS="$ac_save_LDFLAGS"
9376 #  LIBS="$ac_save_LIBS"
9377
9378     fi
9379
9380   if test "$have_mit" = yes; then
9381     cat >>confdefs.h <<\_ACEOF
9382 #define HAVE_MIT_SAVER_EXTENSION 1
9383 _ACEOF
9384
9385   fi
9386
9387   fi
9388
9389 elif test "$with_mit" != no; then
9390   echo "error: must be yes or no: --with-mit-ext=$with_mit"
9391   exit 1
9392 fi
9393
9394
9395 ###############################################################################
9396 #
9397 #       Check for the XIDLE server extension.
9398 #
9399 ###############################################################################
9400
9401 have_xidle=no
9402 with_xidle_req=unspecified
9403
9404 # Check whether --with-xidle-ext or --without-xidle-ext was given.
9405 if test "${with_xidle_ext+set}" = set; then
9406   withval="$with_xidle_ext"
9407   with_xidle="$withval"; with_xidle_req="$withval"
9408 else
9409   with_xidle=yes
9410 fi;
9411
9412
9413    case "$with_xidle" in
9414     yes) ;;
9415     no)  ;;
9416
9417     /*)
9418      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
9419 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
9420      d=$with_xidle/include
9421      if test -d $d; then
9422        X_CFLAGS="-I$d $X_CFLAGS"
9423        echo "$as_me:$LINENO: result: $d" >&5
9424 echo "${ECHO_T}$d" >&6
9425      else
9426        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9427 echo "${ECHO_T}not found ($d: no such directory)" >&6
9428      fi
9429
9430      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
9431 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
9432      d=$with_xidle/lib
9433      if test -d $d; then
9434        X_LIBS="-L$d $X_LIBS"
9435        echo "$as_me:$LINENO: result: $d" >&5
9436 echo "${ECHO_T}$d" >&6
9437      else
9438        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9439 echo "${ECHO_T}not found ($d: no such directory)" >&6
9440      fi
9441
9442      # replace the directory string with "yes".
9443      with_xidle_req="yes"
9444      with_xidle=$with_xidle_req
9445      ;;
9446
9447     *)
9448      echo ""
9449      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
9450      echo "       If it is a directory, then \`DIR/include' will be added to"
9451      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9452      exit 1
9453      ;;
9454    esac
9455
9456
9457 if test "$with_xidle" = yes; then
9458
9459   ac_save_CPPFLAGS="$CPPFLAGS"
9460   if test \! -z "$includedir" ; then
9461     CPPFLAGS="$CPPFLAGS -I$includedir"
9462   fi
9463   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9464   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
9465 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
9466 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
9467   echo $ECHO_N "(cached) $ECHO_C" >&6
9468 else
9469   cat >conftest.$ac_ext <<_ACEOF
9470 #line $LINENO "configure"
9471 /* confdefs.h.  */
9472 _ACEOF
9473 cat confdefs.h >>conftest.$ac_ext
9474 cat >>conftest.$ac_ext <<_ACEOF
9475 /* end confdefs.h.  */
9476 #include <X11/Xlib.h>
9477
9478 #include <X11/extensions/xidle.h>
9479 _ACEOF
9480 rm -f conftest.$ac_objext
9481 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9482   (eval $ac_compile) 2>&5
9483   ac_status=$?
9484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9485   (exit $ac_status); } &&
9486          { ac_try='test -s conftest.$ac_objext'
9487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9488   (eval $ac_try) 2>&5
9489   ac_status=$?
9490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9491   (exit $ac_status); }; }; then
9492   ac_cv_header_X11_extensions_xidle_h=yes
9493 else
9494   echo "$as_me: failed program was:" >&5
9495 sed 's/^/| /' conftest.$ac_ext >&5
9496
9497 ac_cv_header_X11_extensions_xidle_h=no
9498 fi
9499 rm -f conftest.$ac_objext conftest.$ac_ext
9500 fi
9501 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
9502 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
9503 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
9504   have_xidle=yes
9505                      cat >>confdefs.h <<\_ACEOF
9506 #define HAVE_XIDLE_EXTENSION 1
9507 _ACEOF
9508
9509 fi
9510
9511
9512   CPPFLAGS="$ac_save_CPPFLAGS"
9513 elif test "$with_xidle" != no; then
9514   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
9515   exit 1
9516 fi
9517
9518
9519 ###############################################################################
9520 #
9521 #       Check for the SGI-VIDEO-CONTROL server extension.
9522 #
9523 ###############################################################################
9524
9525 have_sgivc=no
9526 with_sgivc_req=unspecified
9527
9528 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
9529 if test "${with_sgivc_ext+set}" = set; then
9530   withval="$with_sgivc_ext"
9531   with_sgivc="$withval"; with_sgivc_req="$withval"
9532 else
9533   with_sgivc=yes
9534 fi;
9535
9536
9537    case "$with_sgivc" in
9538     yes) ;;
9539     no)  ;;
9540
9541     /*)
9542      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
9543 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
9544      d=$with_sgivc/include
9545      if test -d $d; then
9546        X_CFLAGS="-I$d $X_CFLAGS"
9547        echo "$as_me:$LINENO: result: $d" >&5
9548 echo "${ECHO_T}$d" >&6
9549      else
9550        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9551 echo "${ECHO_T}not found ($d: no such directory)" >&6
9552      fi
9553
9554      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
9555 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
9556      d=$with_sgivc/lib
9557      if test -d $d; then
9558        X_LIBS="-L$d $X_LIBS"
9559        echo "$as_me:$LINENO: result: $d" >&5
9560 echo "${ECHO_T}$d" >&6
9561      else
9562        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9563 echo "${ECHO_T}not found ($d: no such directory)" >&6
9564      fi
9565
9566      # replace the directory string with "yes".
9567      with_sgivc_req="yes"
9568      with_sgivc=$with_sgivc_req
9569      ;;
9570
9571     *)
9572      echo ""
9573      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
9574      echo "       If it is a directory, then \`DIR/include' will be added to"
9575      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9576      exit 1
9577      ;;
9578    esac
9579
9580
9581 if test "$with_sgivc" = yes; then
9582
9583   # first check for XSGIvc.h
9584
9585   ac_save_CPPFLAGS="$CPPFLAGS"
9586   if test \! -z "$includedir" ; then
9587     CPPFLAGS="$CPPFLAGS -I$includedir"
9588   fi
9589   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9590   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
9591 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
9592 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
9593   echo $ECHO_N "(cached) $ECHO_C" >&6
9594 else
9595   cat >conftest.$ac_ext <<_ACEOF
9596 #line $LINENO "configure"
9597 /* confdefs.h.  */
9598 _ACEOF
9599 cat confdefs.h >>conftest.$ac_ext
9600 cat >>conftest.$ac_ext <<_ACEOF
9601 /* end confdefs.h.  */
9602 #include <X11/Xlib.h>
9603
9604 #include <X11/extensions/XSGIvc.h>
9605 _ACEOF
9606 rm -f conftest.$ac_objext
9607 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9608   (eval $ac_compile) 2>&5
9609   ac_status=$?
9610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9611   (exit $ac_status); } &&
9612          { ac_try='test -s conftest.$ac_objext'
9613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9614   (eval $ac_try) 2>&5
9615   ac_status=$?
9616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9617   (exit $ac_status); }; }; then
9618   ac_cv_header_X11_extensions_XSGIvc_h=yes
9619 else
9620   echo "$as_me: failed program was:" >&5
9621 sed 's/^/| /' conftest.$ac_ext >&5
9622
9623 ac_cv_header_X11_extensions_XSGIvc_h=no
9624 fi
9625 rm -f conftest.$ac_objext conftest.$ac_ext
9626 fi
9627 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
9628 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
9629 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
9630   have_sgivc=yes
9631 fi
9632
9633
9634   CPPFLAGS="$ac_save_CPPFLAGS"
9635
9636   # if that succeeded, then check for the -lXsgivc
9637   if test "$have_sgivc" = yes; then
9638     have_sgivc=no
9639
9640   ac_save_CPPFLAGS="$CPPFLAGS"
9641   ac_save_LDFLAGS="$LDFLAGS"
9642 #  ac_save_LIBS="$LIBS"
9643
9644   if test \! -z "$includedir" ; then
9645     CPPFLAGS="$CPPFLAGS -I$includedir"
9646   fi
9647   # note: $X_CFLAGS includes $x_includes
9648   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9649
9650   if test \! -z "$libdir" ; then
9651     LDFLAGS="$LDFLAGS -L$libdir"
9652   fi
9653   # note: $X_LIBS includes $x_libraries
9654   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9655
9656   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
9657 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
9658 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
9659   echo $ECHO_N "(cached) $ECHO_C" >&6
9660 else
9661   ac_check_lib_save_LIBS=$LIBS
9662 LIBS="-lXsgivc -lXext -lX11 $LIBS"
9663 cat >conftest.$ac_ext <<_ACEOF
9664 #line $LINENO "configure"
9665 /* confdefs.h.  */
9666 _ACEOF
9667 cat confdefs.h >>conftest.$ac_ext
9668 cat >>conftest.$ac_ext <<_ACEOF
9669 /* end confdefs.h.  */
9670
9671 /* Override any gcc2 internal prototype to avoid an error.  */
9672 #ifdef __cplusplus
9673 extern "C"
9674 #endif
9675 /* We use char because int might match the return type of a gcc2
9676    builtin and then its argument prototype would still apply.  */
9677 char XSGIvcQueryGammaMap ();
9678 int
9679 main ()
9680 {
9681 XSGIvcQueryGammaMap ();
9682   ;
9683   return 0;
9684 }
9685 _ACEOF
9686 rm -f conftest.$ac_objext conftest$ac_exeext
9687 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9688   (eval $ac_link) 2>&5
9689   ac_status=$?
9690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9691   (exit $ac_status); } &&
9692          { ac_try='test -s conftest$ac_exeext'
9693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9694   (eval $ac_try) 2>&5
9695   ac_status=$?
9696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9697   (exit $ac_status); }; }; then
9698   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
9699 else
9700   echo "$as_me: failed program was:" >&5
9701 sed 's/^/| /' conftest.$ac_ext >&5
9702
9703 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
9704 fi
9705 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9706 LIBS=$ac_check_lib_save_LIBS
9707 fi
9708 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
9709 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
9710 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
9711   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
9712 else
9713   true
9714 fi
9715
9716   CPPFLAGS="$ac_save_CPPFLAGS"
9717   LDFLAGS="$ac_save_LDFLAGS"
9718 #  LIBS="$ac_save_LIBS"
9719
9720   fi
9721
9722   # if that succeeded, then we've really got it.
9723   if test "$have_sgivc" = yes; then
9724     cat >>confdefs.h <<\_ACEOF
9725 #define HAVE_SGI_VC_EXTENSION 1
9726 _ACEOF
9727
9728   fi
9729
9730 elif test "$with_sgivc" != no; then
9731   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
9732   exit 1
9733 fi
9734
9735
9736 ###############################################################################
9737 #
9738 #       Check for the DPMS server extension.
9739 #
9740 ###############################################################################
9741
9742 have_dpms=no
9743 with_dpms_req=unspecified
9744
9745 # Check whether --with-dpms-ext or --without-dpms-ext was given.
9746 if test "${with_dpms_ext+set}" = set; then
9747   withval="$with_dpms_ext"
9748   with_dpms="$withval"; with_dpms_req="$withval"
9749 else
9750   with_dpms=yes
9751 fi;
9752
9753
9754    case "$with_dpms" in
9755     yes) ;;
9756     no)  ;;
9757
9758     /*)
9759      echo "$as_me:$LINENO: checking for DPMS headers" >&5
9760 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
9761      d=$with_dpms/include
9762      if test -d $d; then
9763        X_CFLAGS="-I$d $X_CFLAGS"
9764        echo "$as_me:$LINENO: result: $d" >&5
9765 echo "${ECHO_T}$d" >&6
9766      else
9767        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9768 echo "${ECHO_T}not found ($d: no such directory)" >&6
9769      fi
9770
9771      echo "$as_me:$LINENO: checking for DPMS libs" >&5
9772 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
9773      d=$with_dpms/lib
9774      if test -d $d; then
9775        X_LIBS="-L$d $X_LIBS"
9776        echo "$as_me:$LINENO: result: $d" >&5
9777 echo "${ECHO_T}$d" >&6
9778      else
9779        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9780 echo "${ECHO_T}not found ($d: no such directory)" >&6
9781      fi
9782
9783      # replace the directory string with "yes".
9784      with_dpms_req="yes"
9785      with_dpms=$with_dpms_req
9786      ;;
9787
9788     *)
9789      echo ""
9790      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
9791      echo "       If it is a directory, then \`DIR/include' will be added to"
9792      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9793      exit 1
9794      ;;
9795    esac
9796
9797
9798 if test "$with_dpms" = yes; then
9799
9800   # first check for dpms.h
9801
9802   ac_save_CPPFLAGS="$CPPFLAGS"
9803   if test \! -z "$includedir" ; then
9804     CPPFLAGS="$CPPFLAGS -I$includedir"
9805   fi
9806   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9807   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
9808 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
9809 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
9810   echo $ECHO_N "(cached) $ECHO_C" >&6
9811 else
9812   cat >conftest.$ac_ext <<_ACEOF
9813 #line $LINENO "configure"
9814 /* confdefs.h.  */
9815 _ACEOF
9816 cat confdefs.h >>conftest.$ac_ext
9817 cat >>conftest.$ac_ext <<_ACEOF
9818 /* end confdefs.h.  */
9819 #include <X11/Xlib.h>
9820                      #include <X11/Xmd.h>
9821
9822 #include <X11/extensions/dpms.h>
9823 _ACEOF
9824 rm -f conftest.$ac_objext
9825 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9826   (eval $ac_compile) 2>&5
9827   ac_status=$?
9828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9829   (exit $ac_status); } &&
9830          { ac_try='test -s conftest.$ac_objext'
9831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9832   (eval $ac_try) 2>&5
9833   ac_status=$?
9834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9835   (exit $ac_status); }; }; then
9836   ac_cv_header_X11_extensions_dpms_h=yes
9837 else
9838   echo "$as_me: failed program was:" >&5
9839 sed 's/^/| /' conftest.$ac_ext >&5
9840
9841 ac_cv_header_X11_extensions_dpms_h=no
9842 fi
9843 rm -f conftest.$ac_objext conftest.$ac_ext
9844 fi
9845 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
9846 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
9847 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
9848   have_dpms=yes
9849 fi
9850
9851
9852   CPPFLAGS="$ac_save_CPPFLAGS"
9853
9854   # if that succeeded, then check for the DPMS code in the libraries
9855   if test "$have_dpms" = yes; then
9856
9857     # first look in -lXext (this is where it is with XFree86 4.0)
9858     have_dpms=no
9859
9860   ac_save_CPPFLAGS="$CPPFLAGS"
9861   ac_save_LDFLAGS="$LDFLAGS"
9862 #  ac_save_LIBS="$LIBS"
9863
9864   if test \! -z "$includedir" ; then
9865     CPPFLAGS="$CPPFLAGS -I$includedir"
9866   fi
9867   # note: $X_CFLAGS includes $x_includes
9868   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9869
9870   if test \! -z "$libdir" ; then
9871     LDFLAGS="$LDFLAGS -L$libdir"
9872   fi
9873   # note: $X_LIBS includes $x_libraries
9874   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9875
9876   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
9877 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
9878 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
9879   echo $ECHO_N "(cached) $ECHO_C" >&6
9880 else
9881   ac_check_lib_save_LIBS=$LIBS
9882 LIBS="-lXext -lXext -lX11 $LIBS"
9883 cat >conftest.$ac_ext <<_ACEOF
9884 #line $LINENO "configure"
9885 /* confdefs.h.  */
9886 _ACEOF
9887 cat confdefs.h >>conftest.$ac_ext
9888 cat >>conftest.$ac_ext <<_ACEOF
9889 /* end confdefs.h.  */
9890
9891 /* Override any gcc2 internal prototype to avoid an error.  */
9892 #ifdef __cplusplus
9893 extern "C"
9894 #endif
9895 /* We use char because int might match the return type of a gcc2
9896    builtin and then its argument prototype would still apply.  */
9897 char DPMSInfo ();
9898 int
9899 main ()
9900 {
9901 DPMSInfo ();
9902   ;
9903   return 0;
9904 }
9905 _ACEOF
9906 rm -f conftest.$ac_objext conftest$ac_exeext
9907 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9908   (eval $ac_link) 2>&5
9909   ac_status=$?
9910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9911   (exit $ac_status); } &&
9912          { ac_try='test -s conftest$ac_exeext'
9913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9914   (eval $ac_try) 2>&5
9915   ac_status=$?
9916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9917   (exit $ac_status); }; }; then
9918   ac_cv_lib_Xext_DPMSInfo=yes
9919 else
9920   echo "$as_me: failed program was:" >&5
9921 sed 's/^/| /' conftest.$ac_ext >&5
9922
9923 ac_cv_lib_Xext_DPMSInfo=no
9924 fi
9925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9926 LIBS=$ac_check_lib_save_LIBS
9927 fi
9928 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
9929 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
9930 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
9931   have_dpms=yes
9932 else
9933   true
9934 fi
9935
9936   CPPFLAGS="$ac_save_CPPFLAGS"
9937   LDFLAGS="$ac_save_LDFLAGS"
9938 #  LIBS="$ac_save_LIBS"
9939
9940
9941     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
9942     if test "$have_dpms" = no; then
9943
9944   ac_save_CPPFLAGS="$CPPFLAGS"
9945   ac_save_LDFLAGS="$LDFLAGS"
9946 #  ac_save_LIBS="$LIBS"
9947
9948   if test \! -z "$includedir" ; then
9949     CPPFLAGS="$CPPFLAGS -I$includedir"
9950   fi
9951   # note: $X_CFLAGS includes $x_includes
9952   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9953
9954   if test \! -z "$libdir" ; then
9955     LDFLAGS="$LDFLAGS -L$libdir"
9956   fi
9957   # note: $X_LIBS includes $x_libraries
9958   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9959
9960   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
9961 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
9962 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
9963   echo $ECHO_N "(cached) $ECHO_C" >&6
9964 else
9965   ac_check_lib_save_LIBS=$LIBS
9966 LIBS="-lXdpms -lXext -lX11 $LIBS"
9967 cat >conftest.$ac_ext <<_ACEOF
9968 #line $LINENO "configure"
9969 /* confdefs.h.  */
9970 _ACEOF
9971 cat confdefs.h >>conftest.$ac_ext
9972 cat >>conftest.$ac_ext <<_ACEOF
9973 /* end confdefs.h.  */
9974
9975 /* Override any gcc2 internal prototype to avoid an error.  */
9976 #ifdef __cplusplus
9977 extern "C"
9978 #endif
9979 /* We use char because int might match the return type of a gcc2
9980    builtin and then its argument prototype would still apply.  */
9981 char DPMSInfo ();
9982 int
9983 main ()
9984 {
9985 DPMSInfo ();
9986   ;
9987   return 0;
9988 }
9989 _ACEOF
9990 rm -f conftest.$ac_objext conftest$ac_exeext
9991 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9992   (eval $ac_link) 2>&5
9993   ac_status=$?
9994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9995   (exit $ac_status); } &&
9996          { ac_try='test -s conftest$ac_exeext'
9997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9998   (eval $ac_try) 2>&5
9999   ac_status=$?
10000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10001   (exit $ac_status); }; }; then
10002   ac_cv_lib_Xdpms_DPMSInfo=yes
10003 else
10004   echo "$as_me: failed program was:" >&5
10005 sed 's/^/| /' conftest.$ac_ext >&5
10006
10007 ac_cv_lib_Xdpms_DPMSInfo=no
10008 fi
10009 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10010 LIBS=$ac_check_lib_save_LIBS
10011 fi
10012 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
10013 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
10014 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
10015   have_dpms=yes; XDPMS_LIBS="-lXdpms"
10016 else
10017   true
10018 fi
10019
10020   CPPFLAGS="$ac_save_CPPFLAGS"
10021   LDFLAGS="$ac_save_LDFLAGS"
10022 #  LIBS="$ac_save_LIBS"
10023
10024     fi
10025   fi
10026
10027
10028   # if that succeeded, then we've really got it.
10029   if test "$have_dpms" = yes; then
10030     cat >>confdefs.h <<\_ACEOF
10031 #define HAVE_DPMS_EXTENSION 1
10032 _ACEOF
10033
10034   fi
10035
10036 elif test "$with_dpms" != no; then
10037   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
10038   exit 1
10039 fi
10040
10041
10042 ###############################################################################
10043 #
10044 #       Check for the XINERAMA server extension.
10045 #
10046 ###############################################################################
10047
10048 have_xinerama=no
10049 with_xinerama_req=unspecified
10050
10051 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
10052 if test "${with_xinerama_ext+set}" = set; then
10053   withval="$with_xinerama_ext"
10054   with_xinerama="$withval"; with_xinerama_req="$withval"
10055 else
10056   with_xinerama=yes
10057 fi;
10058
10059
10060    case "$with_xinerama" in
10061     yes) ;;
10062     no)  ;;
10063
10064     /*)
10065      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
10066 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
10067      d=$with_xinerama/include
10068      if test -d $d; then
10069        X_CFLAGS="-I$d $X_CFLAGS"
10070        echo "$as_me:$LINENO: result: $d" >&5
10071 echo "${ECHO_T}$d" >&6
10072      else
10073        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10074 echo "${ECHO_T}not found ($d: no such directory)" >&6
10075      fi
10076
10077      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
10078 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
10079      d=$with_xinerama/lib
10080      if test -d $d; then
10081        X_LIBS="-L$d $X_LIBS"
10082        echo "$as_me:$LINENO: result: $d" >&5
10083 echo "${ECHO_T}$d" >&6
10084      else
10085        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10086 echo "${ECHO_T}not found ($d: no such directory)" >&6
10087      fi
10088
10089      # replace the directory string with "yes".
10090      with_xinerama_req="yes"
10091      with_xinerama=$with_xinerama_req
10092      ;;
10093
10094     *)
10095      echo ""
10096      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
10097      echo "       If it is a directory, then \`DIR/include' will be added to"
10098      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10099      exit 1
10100      ;;
10101    esac
10102
10103
10104 if test "$with_xinerama" = yes; then
10105
10106   # first check for Xinerama.h
10107
10108   ac_save_CPPFLAGS="$CPPFLAGS"
10109   if test \! -z "$includedir" ; then
10110     CPPFLAGS="$CPPFLAGS -I$includedir"
10111   fi
10112   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10113   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
10114 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
10115 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
10116   echo $ECHO_N "(cached) $ECHO_C" >&6
10117 else
10118   cat >conftest.$ac_ext <<_ACEOF
10119 #line $LINENO "configure"
10120 /* confdefs.h.  */
10121 _ACEOF
10122 cat confdefs.h >>conftest.$ac_ext
10123 cat >>conftest.$ac_ext <<_ACEOF
10124 /* end confdefs.h.  */
10125 #include <X11/Xlib.h>
10126
10127 #include <X11/extensions/Xinerama.h>
10128 _ACEOF
10129 rm -f conftest.$ac_objext
10130 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10131   (eval $ac_compile) 2>&5
10132   ac_status=$?
10133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10134   (exit $ac_status); } &&
10135          { ac_try='test -s conftest.$ac_objext'
10136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10137   (eval $ac_try) 2>&5
10138   ac_status=$?
10139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10140   (exit $ac_status); }; }; then
10141   ac_cv_header_X11_extensions_Xinerama_h=yes
10142 else
10143   echo "$as_me: failed program was:" >&5
10144 sed 's/^/| /' conftest.$ac_ext >&5
10145
10146 ac_cv_header_X11_extensions_Xinerama_h=no
10147 fi
10148 rm -f conftest.$ac_objext conftest.$ac_ext
10149 fi
10150 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
10151 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
10152 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
10153   have_xinerama=yes
10154 fi
10155
10156
10157   CPPFLAGS="$ac_save_CPPFLAGS"
10158
10159   # if that succeeded, then check for the XINERAMA code in the libraries
10160   if test "$have_xinerama" = yes; then
10161
10162     # first look in -lXext
10163     have_xinerama=no
10164
10165   ac_save_CPPFLAGS="$CPPFLAGS"
10166   ac_save_LDFLAGS="$LDFLAGS"
10167 #  ac_save_LIBS="$LIBS"
10168
10169   if test \! -z "$includedir" ; then
10170     CPPFLAGS="$CPPFLAGS -I$includedir"
10171   fi
10172   # note: $X_CFLAGS includes $x_includes
10173   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10174
10175   if test \! -z "$libdir" ; then
10176     LDFLAGS="$LDFLAGS -L$libdir"
10177   fi
10178   # note: $X_LIBS includes $x_libraries
10179   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10180
10181   echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
10182 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6
10183 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
10184   echo $ECHO_N "(cached) $ECHO_C" >&6
10185 else
10186   ac_check_lib_save_LIBS=$LIBS
10187 LIBS="-lXext -lXext -lX11 $LIBS"
10188 cat >conftest.$ac_ext <<_ACEOF
10189 #line $LINENO "configure"
10190 /* confdefs.h.  */
10191 _ACEOF
10192 cat confdefs.h >>conftest.$ac_ext
10193 cat >>conftest.$ac_ext <<_ACEOF
10194 /* end confdefs.h.  */
10195
10196 /* Override any gcc2 internal prototype to avoid an error.  */
10197 #ifdef __cplusplus
10198 extern "C"
10199 #endif
10200 /* We use char because int might match the return type of a gcc2
10201    builtin and then its argument prototype would still apply.  */
10202 char XineramaQueryScreens ();
10203 int
10204 main ()
10205 {
10206 XineramaQueryScreens ();
10207   ;
10208   return 0;
10209 }
10210 _ACEOF
10211 rm -f conftest.$ac_objext conftest$ac_exeext
10212 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10213   (eval $ac_link) 2>&5
10214   ac_status=$?
10215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10216   (exit $ac_status); } &&
10217          { ac_try='test -s conftest$ac_exeext'
10218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10219   (eval $ac_try) 2>&5
10220   ac_status=$?
10221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10222   (exit $ac_status); }; }; then
10223   ac_cv_lib_Xext_XineramaQueryScreens=yes
10224 else
10225   echo "$as_me: failed program was:" >&5
10226 sed 's/^/| /' conftest.$ac_ext >&5
10227
10228 ac_cv_lib_Xext_XineramaQueryScreens=no
10229 fi
10230 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10231 LIBS=$ac_check_lib_save_LIBS
10232 fi
10233 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
10234 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6
10235 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
10236   have_xinerama=yes
10237 else
10238   true
10239 fi
10240
10241   CPPFLAGS="$ac_save_CPPFLAGS"
10242   LDFLAGS="$ac_save_LDFLAGS"
10243 #  LIBS="$ac_save_LIBS"
10244
10245
10246     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
10247     if test "$have_xinerama" = no; then
10248
10249   ac_save_CPPFLAGS="$CPPFLAGS"
10250   ac_save_LDFLAGS="$LDFLAGS"
10251 #  ac_save_LIBS="$LIBS"
10252
10253   if test \! -z "$includedir" ; then
10254     CPPFLAGS="$CPPFLAGS -I$includedir"
10255   fi
10256   # note: $X_CFLAGS includes $x_includes
10257   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10258
10259   if test \! -z "$libdir" ; then
10260     LDFLAGS="$LDFLAGS -L$libdir"
10261   fi
10262   # note: $X_LIBS includes $x_libraries
10263   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10264
10265   echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
10266 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
10267 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
10268   echo $ECHO_N "(cached) $ECHO_C" >&6
10269 else
10270   ac_check_lib_save_LIBS=$LIBS
10271 LIBS="-lXinerama -lXext -lX11 $LIBS"
10272 cat >conftest.$ac_ext <<_ACEOF
10273 #line $LINENO "configure"
10274 /* confdefs.h.  */
10275 _ACEOF
10276 cat confdefs.h >>conftest.$ac_ext
10277 cat >>conftest.$ac_ext <<_ACEOF
10278 /* end confdefs.h.  */
10279
10280 /* Override any gcc2 internal prototype to avoid an error.  */
10281 #ifdef __cplusplus
10282 extern "C"
10283 #endif
10284 /* We use char because int might match the return type of a gcc2
10285    builtin and then its argument prototype would still apply.  */
10286 char XineramaQueryScreens ();
10287 int
10288 main ()
10289 {
10290 XineramaQueryScreens ();
10291   ;
10292   return 0;
10293 }
10294 _ACEOF
10295 rm -f conftest.$ac_objext conftest$ac_exeext
10296 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10297   (eval $ac_link) 2>&5
10298   ac_status=$?
10299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10300   (exit $ac_status); } &&
10301          { ac_try='test -s conftest$ac_exeext'
10302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10303   (eval $ac_try) 2>&5
10304   ac_status=$?
10305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10306   (exit $ac_status); }; }; then
10307   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
10308 else
10309   echo "$as_me: failed program was:" >&5
10310 sed 's/^/| /' conftest.$ac_ext >&5
10311
10312 ac_cv_lib_Xinerama_XineramaQueryScreens=no
10313 fi
10314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10315 LIBS=$ac_check_lib_save_LIBS
10316 fi
10317 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
10318 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
10319 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
10320   have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"
10321 else
10322   true
10323 fi
10324
10325   CPPFLAGS="$ac_save_CPPFLAGS"
10326   LDFLAGS="$ac_save_LDFLAGS"
10327 #  LIBS="$ac_save_LIBS"
10328
10329     fi
10330   fi
10331
10332   # if that succeeded, then we've really got it.
10333   if test "$have_xinerama" = yes; then
10334     cat >>confdefs.h <<\_ACEOF
10335 #define HAVE_XINERAMA 1
10336 _ACEOF
10337
10338   fi
10339
10340 elif test "$with_xinerama" != no; then
10341   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
10342   exit 1
10343 fi
10344
10345
10346 ###############################################################################
10347 #
10348 #       Check for the XF86VMODE server extension (for virtual screens.)
10349 #
10350 ###############################################################################
10351
10352 have_xf86vmode=no
10353 with_xf86vmode_req=unspecified
10354
10355 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
10356 if test "${with_xf86vmode_ext+set}" = set; then
10357   withval="$with_xf86vmode_ext"
10358   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
10359 else
10360   with_xf86vmode=yes
10361 fi;
10362
10363
10364    case "$with_xf86vmode" in
10365     yes) ;;
10366     no)  ;;
10367
10368     /*)
10369      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
10370 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
10371      d=$with_xf86vmode/include
10372      if test -d $d; then
10373        X_CFLAGS="-I$d $X_CFLAGS"
10374        echo "$as_me:$LINENO: result: $d" >&5
10375 echo "${ECHO_T}$d" >&6
10376      else
10377        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10378 echo "${ECHO_T}not found ($d: no such directory)" >&6
10379      fi
10380
10381      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
10382 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
10383      d=$with_xf86vmode/lib
10384      if test -d $d; then
10385        X_LIBS="-L$d $X_LIBS"
10386        echo "$as_me:$LINENO: result: $d" >&5
10387 echo "${ECHO_T}$d" >&6
10388      else
10389        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10390 echo "${ECHO_T}not found ($d: no such directory)" >&6
10391      fi
10392
10393      # replace the directory string with "yes".
10394      with_xf86vmode_req="yes"
10395      with_xf86vmode=$with_xf86vmode_req
10396      ;;
10397
10398     *)
10399      echo ""
10400      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
10401      echo "       If it is a directory, then \`DIR/include' will be added to"
10402      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10403      exit 1
10404      ;;
10405    esac
10406
10407
10408 if test "$with_xf86vmode" = yes; then
10409
10410   # first check for xf86vmode.h
10411
10412   ac_save_CPPFLAGS="$CPPFLAGS"
10413   if test \! -z "$includedir" ; then
10414     CPPFLAGS="$CPPFLAGS -I$includedir"
10415   fi
10416   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10417   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10418 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10419 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10420   echo $ECHO_N "(cached) $ECHO_C" >&6
10421 else
10422   cat >conftest.$ac_ext <<_ACEOF
10423 #line $LINENO "configure"
10424 /* confdefs.h.  */
10425 _ACEOF
10426 cat confdefs.h >>conftest.$ac_ext
10427 cat >>conftest.$ac_ext <<_ACEOF
10428 /* end confdefs.h.  */
10429 #include <X11/Xlib.h>
10430
10431 #include <X11/extensions/xf86vmode.h>
10432 _ACEOF
10433 rm -f conftest.$ac_objext
10434 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10435   (eval $ac_compile) 2>&5
10436   ac_status=$?
10437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10438   (exit $ac_status); } &&
10439          { ac_try='test -s conftest.$ac_objext'
10440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10441   (eval $ac_try) 2>&5
10442   ac_status=$?
10443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10444   (exit $ac_status); }; }; then
10445   ac_cv_header_X11_extensions_xf86vmode_h=yes
10446 else
10447   echo "$as_me: failed program was:" >&5
10448 sed 's/^/| /' conftest.$ac_ext >&5
10449
10450 ac_cv_header_X11_extensions_xf86vmode_h=no
10451 fi
10452 rm -f conftest.$ac_objext conftest.$ac_ext
10453 fi
10454 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10455 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10456 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10457   have_xf86vmode=yes
10458 fi
10459
10460
10461   CPPFLAGS="$ac_save_CPPFLAGS"
10462
10463   # if that succeeded, then check for the -lXxf86vm
10464   if test "$have_xf86vmode" = yes; then
10465     have_xf86vmode=no
10466
10467   ac_save_CPPFLAGS="$CPPFLAGS"
10468   ac_save_LDFLAGS="$LDFLAGS"
10469 #  ac_save_LIBS="$LIBS"
10470
10471   if test \! -z "$includedir" ; then
10472     CPPFLAGS="$CPPFLAGS -I$includedir"
10473   fi
10474   # note: $X_CFLAGS includes $x_includes
10475   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10476
10477   if test \! -z "$libdir" ; then
10478     LDFLAGS="$LDFLAGS -L$libdir"
10479   fi
10480   # note: $X_LIBS includes $x_libraries
10481   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10482
10483   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
10484 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
10485 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
10486   echo $ECHO_N "(cached) $ECHO_C" >&6
10487 else
10488   ac_check_lib_save_LIBS=$LIBS
10489 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10490 cat >conftest.$ac_ext <<_ACEOF
10491 #line $LINENO "configure"
10492 /* confdefs.h.  */
10493 _ACEOF
10494 cat confdefs.h >>conftest.$ac_ext
10495 cat >>conftest.$ac_ext <<_ACEOF
10496 /* end confdefs.h.  */
10497
10498 /* Override any gcc2 internal prototype to avoid an error.  */
10499 #ifdef __cplusplus
10500 extern "C"
10501 #endif
10502 /* We use char because int might match the return type of a gcc2
10503    builtin and then its argument prototype would still apply.  */
10504 char XF86VidModeGetViewPort ();
10505 int
10506 main ()
10507 {
10508 XF86VidModeGetViewPort ();
10509   ;
10510   return 0;
10511 }
10512 _ACEOF
10513 rm -f conftest.$ac_objext conftest$ac_exeext
10514 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10515   (eval $ac_link) 2>&5
10516   ac_status=$?
10517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10518   (exit $ac_status); } &&
10519          { ac_try='test -s conftest$ac_exeext'
10520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10521   (eval $ac_try) 2>&5
10522   ac_status=$?
10523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10524   (exit $ac_status); }; }; then
10525   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
10526 else
10527   echo "$as_me: failed program was:" >&5
10528 sed 's/^/| /' conftest.$ac_ext >&5
10529
10530 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
10531 fi
10532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10533 LIBS=$ac_check_lib_save_LIBS
10534 fi
10535 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
10536 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
10537 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
10538   have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10539 else
10540   true
10541 fi
10542
10543   CPPFLAGS="$ac_save_CPPFLAGS"
10544   LDFLAGS="$ac_save_LDFLAGS"
10545 #  LIBS="$ac_save_LIBS"
10546
10547   fi
10548
10549   # if that succeeded, then we've really got it.
10550   if test "$have_xf86vmode" = yes; then
10551     cat >>confdefs.h <<\_ACEOF
10552 #define HAVE_XF86VMODE 1
10553 _ACEOF
10554
10555   fi
10556
10557 elif test "$with_xf86vmode" != no; then
10558   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
10559   exit 1
10560 fi
10561
10562
10563 ###############################################################################
10564 #
10565 #       Check for the XF86VMODE server extension (for gamma fading.)
10566 #
10567 ###############################################################################
10568
10569 have_xf86gamma=no
10570 have_xf86gamma_ramp=no
10571 with_xf86gamma_req=unspecified
10572
10573 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
10574 if test "${with_xf86gamma_ext+set}" = set; then
10575   withval="$with_xf86gamma_ext"
10576   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
10577 else
10578   with_xf86gamma=yes
10579 fi;
10580
10581
10582    case "$with_xf86gamma" in
10583     yes) ;;
10584     no)  ;;
10585
10586     /*)
10587      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
10588 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
10589      d=$with_xf86gamma/include
10590      if test -d $d; then
10591        X_CFLAGS="-I$d $X_CFLAGS"
10592        echo "$as_me:$LINENO: result: $d" >&5
10593 echo "${ECHO_T}$d" >&6
10594      else
10595        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10596 echo "${ECHO_T}not found ($d: no such directory)" >&6
10597      fi
10598
10599      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
10600 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
10601      d=$with_xf86gamma/lib
10602      if test -d $d; then
10603        X_LIBS="-L$d $X_LIBS"
10604        echo "$as_me:$LINENO: result: $d" >&5
10605 echo "${ECHO_T}$d" >&6
10606      else
10607        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10608 echo "${ECHO_T}not found ($d: no such directory)" >&6
10609      fi
10610
10611      # replace the directory string with "yes".
10612      with_xf86gamma_req="yes"
10613      with_xf86gamma=$with_xf86gamma_req
10614      ;;
10615
10616     *)
10617      echo ""
10618      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
10619      echo "       If it is a directory, then \`DIR/include' will be added to"
10620      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10621      exit 1
10622      ;;
10623    esac
10624
10625
10626 if test "$with_xf86gamma" = yes; then
10627
10628   # first check for xf86vmode.h, if we haven't already
10629   if test "$have_xf86vmode" = yes; then
10630     have_xf86gamma=yes
10631   else
10632
10633   ac_save_CPPFLAGS="$CPPFLAGS"
10634   if test \! -z "$includedir" ; then
10635     CPPFLAGS="$CPPFLAGS -I$includedir"
10636   fi
10637   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10638   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10639 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10640 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10641   echo $ECHO_N "(cached) $ECHO_C" >&6
10642 else
10643   cat >conftest.$ac_ext <<_ACEOF
10644 #line $LINENO "configure"
10645 /* confdefs.h.  */
10646 _ACEOF
10647 cat confdefs.h >>conftest.$ac_ext
10648 cat >>conftest.$ac_ext <<_ACEOF
10649 /* end confdefs.h.  */
10650 #include <X11/Xlib.h>
10651
10652 #include <X11/extensions/xf86vmode.h>
10653 _ACEOF
10654 rm -f conftest.$ac_objext
10655 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10656   (eval $ac_compile) 2>&5
10657   ac_status=$?
10658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10659   (exit $ac_status); } &&
10660          { ac_try='test -s conftest.$ac_objext'
10661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10662   (eval $ac_try) 2>&5
10663   ac_status=$?
10664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10665   (exit $ac_status); }; }; then
10666   ac_cv_header_X11_extensions_xf86vmode_h=yes
10667 else
10668   echo "$as_me: failed program was:" >&5
10669 sed 's/^/| /' conftest.$ac_ext >&5
10670
10671 ac_cv_header_X11_extensions_xf86vmode_h=no
10672 fi
10673 rm -f conftest.$ac_objext conftest.$ac_ext
10674 fi
10675 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10676 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10677 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10678   have_xf86gamma=yes
10679 fi
10680
10681
10682   CPPFLAGS="$ac_save_CPPFLAGS"
10683   fi
10684
10685   # if that succeeded, then check for the -lXxf86vm
10686   if test "$have_xf86gamma" = yes; then
10687     have_xf86gamma=no
10688
10689   ac_save_CPPFLAGS="$CPPFLAGS"
10690   ac_save_LDFLAGS="$LDFLAGS"
10691 #  ac_save_LIBS="$LIBS"
10692
10693   if test \! -z "$includedir" ; then
10694     CPPFLAGS="$CPPFLAGS -I$includedir"
10695   fi
10696   # note: $X_CFLAGS includes $x_includes
10697   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10698
10699   if test \! -z "$libdir" ; then
10700     LDFLAGS="$LDFLAGS -L$libdir"
10701   fi
10702   # note: $X_LIBS includes $x_libraries
10703   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10704
10705   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
10706 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
10707 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
10708   echo $ECHO_N "(cached) $ECHO_C" >&6
10709 else
10710   ac_check_lib_save_LIBS=$LIBS
10711 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10712 cat >conftest.$ac_ext <<_ACEOF
10713 #line $LINENO "configure"
10714 /* confdefs.h.  */
10715 _ACEOF
10716 cat confdefs.h >>conftest.$ac_ext
10717 cat >>conftest.$ac_ext <<_ACEOF
10718 /* end confdefs.h.  */
10719
10720 /* Override any gcc2 internal prototype to avoid an error.  */
10721 #ifdef __cplusplus
10722 extern "C"
10723 #endif
10724 /* We use char because int might match the return type of a gcc2
10725    builtin and then its argument prototype would still apply.  */
10726 char XF86VidModeSetGamma ();
10727 int
10728 main ()
10729 {
10730 XF86VidModeSetGamma ();
10731   ;
10732   return 0;
10733 }
10734 _ACEOF
10735 rm -f conftest.$ac_objext conftest$ac_exeext
10736 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10737   (eval $ac_link) 2>&5
10738   ac_status=$?
10739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10740   (exit $ac_status); } &&
10741          { ac_try='test -s conftest$ac_exeext'
10742   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10743   (eval $ac_try) 2>&5
10744   ac_status=$?
10745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10746   (exit $ac_status); }; }; then
10747   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
10748 else
10749   echo "$as_me: failed program was:" >&5
10750 sed 's/^/| /' conftest.$ac_ext >&5
10751
10752 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
10753 fi
10754 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10755 LIBS=$ac_check_lib_save_LIBS
10756 fi
10757 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
10758 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
10759 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
10760   have_xf86gamma=yes
10761 else
10762   true
10763 fi
10764
10765   CPPFLAGS="$ac_save_CPPFLAGS"
10766   LDFLAGS="$ac_save_LDFLAGS"
10767 #  LIBS="$ac_save_LIBS"
10768
10769   fi
10770
10771   # check for the Ramp versions of the functions too.
10772   if test "$have_xf86gamma" = yes; then
10773     have_xf86gamma_ramp=no
10774
10775   ac_save_CPPFLAGS="$CPPFLAGS"
10776   ac_save_LDFLAGS="$LDFLAGS"
10777 #  ac_save_LIBS="$LIBS"
10778
10779   if test \! -z "$includedir" ; then
10780     CPPFLAGS="$CPPFLAGS -I$includedir"
10781   fi
10782   # note: $X_CFLAGS includes $x_includes
10783   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10784
10785   if test \! -z "$libdir" ; then
10786     LDFLAGS="$LDFLAGS -L$libdir"
10787   fi
10788   # note: $X_LIBS includes $x_libraries
10789   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10790
10791   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
10792 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
10793 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
10794   echo $ECHO_N "(cached) $ECHO_C" >&6
10795 else
10796   ac_check_lib_save_LIBS=$LIBS
10797 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10798 cat >conftest.$ac_ext <<_ACEOF
10799 #line $LINENO "configure"
10800 /* confdefs.h.  */
10801 _ACEOF
10802 cat confdefs.h >>conftest.$ac_ext
10803 cat >>conftest.$ac_ext <<_ACEOF
10804 /* end confdefs.h.  */
10805
10806 /* Override any gcc2 internal prototype to avoid an error.  */
10807 #ifdef __cplusplus
10808 extern "C"
10809 #endif
10810 /* We use char because int might match the return type of a gcc2
10811    builtin and then its argument prototype would still apply.  */
10812 char XF86VidModeSetGammaRamp ();
10813 int
10814 main ()
10815 {
10816 XF86VidModeSetGammaRamp ();
10817   ;
10818   return 0;
10819 }
10820 _ACEOF
10821 rm -f conftest.$ac_objext conftest$ac_exeext
10822 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10823   (eval $ac_link) 2>&5
10824   ac_status=$?
10825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10826   (exit $ac_status); } &&
10827          { ac_try='test -s conftest$ac_exeext'
10828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10829   (eval $ac_try) 2>&5
10830   ac_status=$?
10831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10832   (exit $ac_status); }; }; then
10833   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
10834 else
10835   echo "$as_me: failed program was:" >&5
10836 sed 's/^/| /' conftest.$ac_ext >&5
10837
10838 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
10839 fi
10840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10841 LIBS=$ac_check_lib_save_LIBS
10842 fi
10843 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
10844 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
10845 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
10846   have_xf86gamma_ramp=yes
10847 else
10848   true
10849 fi
10850
10851   CPPFLAGS="$ac_save_CPPFLAGS"
10852   LDFLAGS="$ac_save_LDFLAGS"
10853 #  LIBS="$ac_save_LIBS"
10854
10855   fi
10856
10857   # if those tests succeeded, then we've really got the functions.
10858   if test "$have_xf86gamma" = yes; then
10859     cat >>confdefs.h <<\_ACEOF
10860 #define HAVE_XF86VMODE_GAMMA 1
10861 _ACEOF
10862
10863   fi
10864
10865   if test "$have_xf86gamma_ramp" = yes; then
10866     cat >>confdefs.h <<\_ACEOF
10867 #define HAVE_XF86VMODE_GAMMA_RAMP 1
10868 _ACEOF
10869
10870   fi
10871
10872   # pull in the lib, if we haven't already
10873   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
10874     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10875   fi
10876
10877 elif test "$with_xf86gamma" != no; then
10878   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
10879   exit 1
10880 fi
10881
10882
10883 ###############################################################################
10884 #
10885 #       Check for the RANDR (Resize and Rotate) server extension.
10886 #
10887 #       We need this to detect when the resolution of the desktop
10888 #       has changed out from under us (this is a newer, different
10889 #       mechanism than the XF86VMODE virtual viewports.)
10890 #
10891 ###############################################################################
10892
10893 have_randr=no
10894 with_randr_req=unspecified
10895
10896 # Check whether --with-randr-ext or --without-randr-ext was given.
10897 if test "${with_randr_ext+set}" = set; then
10898   withval="$with_randr_ext"
10899   with_randr="$withval"; with_randr_req="$withval"
10900 else
10901   with_randr=yes
10902 fi;
10903
10904
10905    case "$with_randr" in
10906     yes) ;;
10907     no)  ;;
10908
10909     /*)
10910      echo "$as_me:$LINENO: checking for RANDR headers" >&5
10911 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6
10912      d=$with_randr/include
10913      if test -d $d; then
10914        X_CFLAGS="-I$d $X_CFLAGS"
10915        echo "$as_me:$LINENO: result: $d" >&5
10916 echo "${ECHO_T}$d" >&6
10917      else
10918        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10919 echo "${ECHO_T}not found ($d: no such directory)" >&6
10920      fi
10921
10922      echo "$as_me:$LINENO: checking for RANDR libs" >&5
10923 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6
10924      d=$with_randr/lib
10925      if test -d $d; then
10926        X_LIBS="-L$d $X_LIBS"
10927        echo "$as_me:$LINENO: result: $d" >&5
10928 echo "${ECHO_T}$d" >&6
10929      else
10930        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10931 echo "${ECHO_T}not found ($d: no such directory)" >&6
10932      fi
10933
10934      # replace the directory string with "yes".
10935      with_randr_req="yes"
10936      with_randr=$with_randr_req
10937      ;;
10938
10939     *)
10940      echo ""
10941      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
10942      echo "       If it is a directory, then \`DIR/include' will be added to"
10943      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10944      exit 1
10945      ;;
10946    esac
10947
10948
10949 if test "$with_randr" = yes; then
10950
10951   # first check for Randr.h
10952
10953   ac_save_CPPFLAGS="$CPPFLAGS"
10954   if test \! -z "$includedir" ; then
10955     CPPFLAGS="$CPPFLAGS -I$includedir"
10956   fi
10957   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10958   echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
10959 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6
10960 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
10961   echo $ECHO_N "(cached) $ECHO_C" >&6
10962 else
10963   cat >conftest.$ac_ext <<_ACEOF
10964 #line $LINENO "configure"
10965 /* confdefs.h.  */
10966 _ACEOF
10967 cat confdefs.h >>conftest.$ac_ext
10968 cat >>conftest.$ac_ext <<_ACEOF
10969 /* end confdefs.h.  */
10970 #include <X11/Xlib.h>
10971
10972 #include <X11/extensions/Xrandr.h>
10973 _ACEOF
10974 rm -f conftest.$ac_objext
10975 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10976   (eval $ac_compile) 2>&5
10977   ac_status=$?
10978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10979   (exit $ac_status); } &&
10980          { ac_try='test -s conftest.$ac_objext'
10981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10982   (eval $ac_try) 2>&5
10983   ac_status=$?
10984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10985   (exit $ac_status); }; }; then
10986   ac_cv_header_X11_extensions_Xrandr_h=yes
10987 else
10988   echo "$as_me: failed program was:" >&5
10989 sed 's/^/| /' conftest.$ac_ext >&5
10990
10991 ac_cv_header_X11_extensions_Xrandr_h=no
10992 fi
10993 rm -f conftest.$ac_objext conftest.$ac_ext
10994 fi
10995 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
10996 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6
10997 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
10998   have_randr=yes
10999 fi
11000
11001
11002   CPPFLAGS="$ac_save_CPPFLAGS"
11003
11004   # if that succeeded, then check for the XRR code in the libraries
11005   if test "$have_randr" = yes; then
11006
11007     # RANDR probably needs -lXrender
11008     xrender_libs=
11009
11010   ac_save_CPPFLAGS="$CPPFLAGS"
11011   ac_save_LDFLAGS="$LDFLAGS"
11012 #  ac_save_LIBS="$LIBS"
11013
11014   if test \! -z "$includedir" ; then
11015     CPPFLAGS="$CPPFLAGS -I$includedir"
11016   fi
11017   # note: $X_CFLAGS includes $x_includes
11018   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11019
11020   if test \! -z "$libdir" ; then
11021     LDFLAGS="$LDFLAGS -L$libdir"
11022   fi
11023   # note: $X_LIBS includes $x_libraries
11024   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11025
11026   echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
11027 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6
11028 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
11029   echo $ECHO_N "(cached) $ECHO_C" >&6
11030 else
11031   ac_check_lib_save_LIBS=$LIBS
11032 LIBS="-lXrender -lXext -lX11 $LIBS"
11033 cat >conftest.$ac_ext <<_ACEOF
11034 #line $LINENO "configure"
11035 /* confdefs.h.  */
11036 _ACEOF
11037 cat confdefs.h >>conftest.$ac_ext
11038 cat >>conftest.$ac_ext <<_ACEOF
11039 /* end confdefs.h.  */
11040
11041 /* Override any gcc2 internal prototype to avoid an error.  */
11042 #ifdef __cplusplus
11043 extern "C"
11044 #endif
11045 /* We use char because int might match the return type of a gcc2
11046    builtin and then its argument prototype would still apply.  */
11047 char XRenderSetSubpixelOrder ();
11048 int
11049 main ()
11050 {
11051 XRenderSetSubpixelOrder ();
11052   ;
11053   return 0;
11054 }
11055 _ACEOF
11056 rm -f conftest.$ac_objext conftest$ac_exeext
11057 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11058   (eval $ac_link) 2>&5
11059   ac_status=$?
11060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11061   (exit $ac_status); } &&
11062          { ac_try='test -s conftest$ac_exeext'
11063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11064   (eval $ac_try) 2>&5
11065   ac_status=$?
11066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11067   (exit $ac_status); }; }; then
11068   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
11069 else
11070   echo "$as_me: failed program was:" >&5
11071 sed 's/^/| /' conftest.$ac_ext >&5
11072
11073 ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
11074 fi
11075 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11076 LIBS=$ac_check_lib_save_LIBS
11077 fi
11078 echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
11079 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6
11080 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
11081   xrender_libs="-lXrender"
11082 else
11083   true
11084 fi
11085
11086   CPPFLAGS="$ac_save_CPPFLAGS"
11087   LDFLAGS="$ac_save_LDFLAGS"
11088 #  LIBS="$ac_save_LIBS"
11089
11090
11091     # first look for RANDR in -lXext
11092     have_randr=no
11093
11094   ac_save_CPPFLAGS="$CPPFLAGS"
11095   ac_save_LDFLAGS="$LDFLAGS"
11096 #  ac_save_LIBS="$LIBS"
11097
11098   if test \! -z "$includedir" ; then
11099     CPPFLAGS="$CPPFLAGS -I$includedir"
11100   fi
11101   # note: $X_CFLAGS includes $x_includes
11102   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11103
11104   if test \! -z "$libdir" ; then
11105     LDFLAGS="$LDFLAGS -L$libdir"
11106   fi
11107   # note: $X_LIBS includes $x_libraries
11108   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11109
11110   echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
11111 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6
11112 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
11113   echo $ECHO_N "(cached) $ECHO_C" >&6
11114 else
11115   ac_check_lib_save_LIBS=$LIBS
11116 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
11117 cat >conftest.$ac_ext <<_ACEOF
11118 #line $LINENO "configure"
11119 /* confdefs.h.  */
11120 _ACEOF
11121 cat confdefs.h >>conftest.$ac_ext
11122 cat >>conftest.$ac_ext <<_ACEOF
11123 /* end confdefs.h.  */
11124
11125 /* Override any gcc2 internal prototype to avoid an error.  */
11126 #ifdef __cplusplus
11127 extern "C"
11128 #endif
11129 /* We use char because int might match the return type of a gcc2
11130    builtin and then its argument prototype would still apply.  */
11131 char XRRGetScreenInfo ();
11132 int
11133 main ()
11134 {
11135 XRRGetScreenInfo ();
11136   ;
11137   return 0;
11138 }
11139 _ACEOF
11140 rm -f conftest.$ac_objext conftest$ac_exeext
11141 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11142   (eval $ac_link) 2>&5
11143   ac_status=$?
11144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11145   (exit $ac_status); } &&
11146          { ac_try='test -s conftest$ac_exeext'
11147   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11148   (eval $ac_try) 2>&5
11149   ac_status=$?
11150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11151   (exit $ac_status); }; }; then
11152   ac_cv_lib_Xext_XRRGetScreenInfo=yes
11153 else
11154   echo "$as_me: failed program was:" >&5
11155 sed 's/^/| /' conftest.$ac_ext >&5
11156
11157 ac_cv_lib_Xext_XRRGetScreenInfo=no
11158 fi
11159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11160 LIBS=$ac_check_lib_save_LIBS
11161 fi
11162 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
11163 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6
11164 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
11165   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
11166 else
11167   true
11168 fi
11169
11170   CPPFLAGS="$ac_save_CPPFLAGS"
11171   LDFLAGS="$ac_save_LDFLAGS"
11172 #  LIBS="$ac_save_LIBS"
11173
11174
11175     # if that failed, look in -lXrandr
11176     if test "$have_randr" = no; then
11177
11178   ac_save_CPPFLAGS="$CPPFLAGS"
11179   ac_save_LDFLAGS="$LDFLAGS"
11180 #  ac_save_LIBS="$LIBS"
11181
11182   if test \! -z "$includedir" ; then
11183     CPPFLAGS="$CPPFLAGS -I$includedir"
11184   fi
11185   # note: $X_CFLAGS includes $x_includes
11186   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11187
11188   if test \! -z "$libdir" ; then
11189     LDFLAGS="$LDFLAGS -L$libdir"
11190   fi
11191   # note: $X_LIBS includes $x_libraries
11192   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11193
11194   echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
11195 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6
11196 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
11197   echo $ECHO_N "(cached) $ECHO_C" >&6
11198 else
11199   ac_check_lib_save_LIBS=$LIBS
11200 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
11201 cat >conftest.$ac_ext <<_ACEOF
11202 #line $LINENO "configure"
11203 /* confdefs.h.  */
11204 _ACEOF
11205 cat confdefs.h >>conftest.$ac_ext
11206 cat >>conftest.$ac_ext <<_ACEOF
11207 /* end confdefs.h.  */
11208
11209 /* Override any gcc2 internal prototype to avoid an error.  */
11210 #ifdef __cplusplus
11211 extern "C"
11212 #endif
11213 /* We use char because int might match the return type of a gcc2
11214    builtin and then its argument prototype would still apply.  */
11215 char XRRGetScreenInfo ();
11216 int
11217 main ()
11218 {
11219 XRRGetScreenInfo ();
11220   ;
11221   return 0;
11222 }
11223 _ACEOF
11224 rm -f conftest.$ac_objext conftest$ac_exeext
11225 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11226   (eval $ac_link) 2>&5
11227   ac_status=$?
11228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11229   (exit $ac_status); } &&
11230          { ac_try='test -s conftest$ac_exeext'
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_lib_Xrandr_XRRGetScreenInfo=yes
11237 else
11238   echo "$as_me: failed program was:" >&5
11239 sed 's/^/| /' conftest.$ac_ext >&5
11240
11241 ac_cv_lib_Xrandr_XRRGetScreenInfo=no
11242 fi
11243 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11244 LIBS=$ac_check_lib_save_LIBS
11245 fi
11246 echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
11247 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6
11248 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
11249   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
11250 else
11251   true
11252 fi
11253
11254   CPPFLAGS="$ac_save_CPPFLAGS"
11255   LDFLAGS="$ac_save_LDFLAGS"
11256 #  LIBS="$ac_save_LIBS"
11257
11258     fi
11259   fi
11260
11261   # if that succeeded, then we've really got it.
11262   if test "$have_randr" = yes; then
11263     cat >>confdefs.h <<\_ACEOF
11264 #define HAVE_RANDR 1
11265 _ACEOF
11266
11267   fi
11268
11269 elif test "$with_randr" != no; then
11270   echo "error: must be yes or no: --with-randr-ext=$with_randr"
11271   exit 1
11272 fi
11273
11274
11275 ###############################################################################
11276 #
11277 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
11278 #       using other XF86 stuff.)
11279 #
11280 ###############################################################################
11281
11282 have_xf86miscsetgrabkeysstate=no
11283 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
11284
11285   ac_save_CPPFLAGS="$CPPFLAGS"
11286   ac_save_LDFLAGS="$LDFLAGS"
11287 #  ac_save_LIBS="$LIBS"
11288
11289   if test \! -z "$includedir" ; then
11290     CPPFLAGS="$CPPFLAGS -I$includedir"
11291   fi
11292   # note: $X_CFLAGS includes $x_includes
11293   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11294
11295   if test \! -z "$libdir" ; then
11296     LDFLAGS="$LDFLAGS -L$libdir"
11297   fi
11298   # note: $X_LIBS includes $x_libraries
11299   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11300
11301   echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
11302 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6
11303 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
11304   echo $ECHO_N "(cached) $ECHO_C" >&6
11305 else
11306   ac_check_lib_save_LIBS=$LIBS
11307 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
11308 cat >conftest.$ac_ext <<_ACEOF
11309 #line $LINENO "configure"
11310 /* confdefs.h.  */
11311 _ACEOF
11312 cat confdefs.h >>conftest.$ac_ext
11313 cat >>conftest.$ac_ext <<_ACEOF
11314 /* end confdefs.h.  */
11315
11316 /* Override any gcc2 internal prototype to avoid an error.  */
11317 #ifdef __cplusplus
11318 extern "C"
11319 #endif
11320 /* We use char because int might match the return type of a gcc2
11321    builtin and then its argument prototype would still apply.  */
11322 char XF86MiscSetGrabKeysState ();
11323 int
11324 main ()
11325 {
11326 XF86MiscSetGrabKeysState ();
11327   ;
11328   return 0;
11329 }
11330 _ACEOF
11331 rm -f conftest.$ac_objext conftest$ac_exeext
11332 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11333   (eval $ac_link) 2>&5
11334   ac_status=$?
11335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11336   (exit $ac_status); } &&
11337          { ac_try='test -s conftest$ac_exeext'
11338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11339   (eval $ac_try) 2>&5
11340   ac_status=$?
11341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11342   (exit $ac_status); }; }; then
11343   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
11344 else
11345   echo "$as_me: failed program was:" >&5
11346 sed 's/^/| /' conftest.$ac_ext >&5
11347
11348 ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
11349 fi
11350 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11351 LIBS=$ac_check_lib_save_LIBS
11352 fi
11353 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
11354 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6
11355 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
11356   have_xf86miscsetgrabkeysstate=yes
11357 else
11358   true
11359 fi
11360
11361   CPPFLAGS="$ac_save_CPPFLAGS"
11362   LDFLAGS="$ac_save_LDFLAGS"
11363 #  LIBS="$ac_save_LIBS"
11364
11365   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
11366     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
11367     cat >>confdefs.h <<\_ACEOF
11368 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
11369 _ACEOF
11370
11371   fi
11372 fi
11373
11374
11375 ###############################################################################
11376 #
11377 #       Check for HP XHPDisableReset and XHPEnableReset.
11378 #
11379 ###############################################################################
11380
11381 echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
11382 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6
11383
11384   ac_save_CPPFLAGS="$CPPFLAGS"
11385   if test \! -z "$includedir" ; then
11386     CPPFLAGS="$CPPFLAGS -I$includedir"
11387   fi
11388   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11389   cat >conftest.$ac_ext <<_ACEOF
11390 #line $LINENO "configure"
11391 /* confdefs.h.  */
11392 _ACEOF
11393 cat confdefs.h >>conftest.$ac_ext
11394 cat >>conftest.$ac_ext <<_ACEOF
11395 /* end confdefs.h.  */
11396 #include <X11/XHPlib.h>
11397
11398 _ACEOF
11399 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11400   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
11401   cat >>confdefs.h <<\_ACEOF
11402 #define HAVE_XHPDISABLERESET 1
11403 _ACEOF
11404
11405                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
11406                    echo "$as_me:$LINENO: result: yes" >&5
11407 echo "${ECHO_T}yes" >&6
11408 else
11409   echo "$as_me:$LINENO: result: no" >&5
11410 echo "${ECHO_T}no" >&6
11411 fi
11412 rm -f conftest*
11413
11414   CPPFLAGS="$ac_save_CPPFLAGS"
11415
11416
11417 ###############################################################################
11418 #
11419 #       Check for /proc/interrupts.
11420 #
11421 ###############################################################################
11422
11423 have_proc_interrupts=no
11424 with_proc_interrupts_req=unspecified
11425
11426 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
11427 if test "${with_proc_interrupts+set}" = set; then
11428   withval="$with_proc_interrupts"
11429   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
11430 else
11431   with_proc_interrupts=yes
11432 fi;
11433
11434 if test "$with_proc_interrupts" = yes; then
11435
11436    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
11437 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
11438 if test "${ac_cv_have_proc_interrupts+set}" = set; then
11439   echo $ECHO_N "(cached) $ECHO_C" >&6
11440 else
11441   ac_cv_have_proc_interrupts=no
11442      if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
11443        ac_cv_have_proc_interrupts=yes
11444      fi
11445
11446 fi
11447 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
11448 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
11449    have_proc_interrupts=$ac_cv_have_proc_interrupts
11450
11451   if test "$have_proc_interrupts" = yes; then
11452     cat >>confdefs.h <<\_ACEOF
11453 #define HAVE_PROC_INTERRUPTS 1
11454 _ACEOF
11455
11456   fi
11457
11458 elif test "$with_proc_interrupts" != no; then
11459   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
11460   exit 1
11461 fi
11462
11463
11464 ###############################################################################
11465 #
11466 #       The --enable-locking option
11467 #
11468 ###############################################################################
11469
11470 # Check whether --enable-locking or --disable-locking was given.
11471 if test "${enable_locking+set}" = set; then
11472   enableval="$enable_locking"
11473   enable_locking="$enableval"
11474 else
11475   enable_locking=yes
11476 fi;
11477 if test "$enable_locking" = yes; then
11478   true
11479 elif test "$enable_locking" = no; then
11480   cat >>confdefs.h <<\_ACEOF
11481 #define NO_LOCKING 1
11482 _ACEOF
11483
11484 else
11485   echo "error: must be yes or no: --enable-locking=$enable_locking"
11486   exit 1
11487 fi
11488
11489 # We can't lock on MacOS X, so don't even bother compiling in support for it.
11490 #
11491 if test "$ac_macosx" = yes; then
11492   if test "$enable_locking" = yes; then
11493     echo "$as_me:$LINENO: result: locking disabled: it doesn't work on MacOS X" >&5
11494 echo "${ECHO_T}locking disabled: it doesn't work on MacOS X" >&6
11495     enable_locking=no
11496     cat >>confdefs.h <<\_ACEOF
11497 #define NO_LOCKING 1
11498 _ACEOF
11499
11500   fi
11501 fi
11502
11503
11504 ###############################################################################
11505 #
11506 #       The --enable-vt-locking option
11507 #
11508 ###############################################################################
11509
11510 #ac_vt_lockswitch=no
11511 #AC_ARG_ENABLE(vt-locking,[
11512 #  --enable-vt-locking     Compile in support for locking Virtual Terminals.
11513 #                          This is the default if the system supports it, and
11514 #                          if locking support is included (--enable-locking.)
11515 #  --disable-vt-locking    Do not allow locking of VTs, even if locking is
11516 #                          enabled.],
11517 #  [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
11518 #if test "$enable_vt_locking" = yes; then
11519 #
11520 #  AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
11521 #   [AC_TRY_COMPILE([#include <fcntl.h>
11522 #                   #include <sys/ioctl.h>
11523 #                   #include <sys/vt.h>],
11524 #                  [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
11525 #                  [ac_cv_vt_lockswitch=yes],
11526 #                  [ac_cv_vt_lockswitch=no])])
11527 #  ac_vt_lockswitch=$ac_cv_vt_lockswitch
11528 #
11529 #elif test "$enable_vt_locking" = no; then
11530 #  true
11531 #else
11532 #  echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
11533 #  exit 1
11534 #fi
11535 #
11536 #if test "$ac_vt_lockswitch" = yes; then
11537 #  AC_DEFINE(HAVE_VT_LOCKSWITCH)
11538 #  # the VT_LOCKSWITCH ioctl can only be used when running as root.
11539 #  # #### but it doesn't work yet, so don't worry about that for now.
11540 ##  need_setuid=yes
11541 #fi
11542
11543
11544 ###############################################################################
11545 #
11546 #       Check for PAM.
11547 #
11548 ###############################################################################
11549
11550 case "$host" in
11551   *-solaris*)
11552    # Solaris systems tend to come with PAM misconfigured.
11553    #  Don't build it by default, even if the headers exist.
11554    with_pam_default=no
11555    ;;
11556   *)
11557    # Default to building PAM support on all other systems, if it exists.
11558    with_pam_default=yes
11559   ;;
11560 esac
11561
11562 have_pam=no
11563 with_pam_req=unspecified
11564
11565
11566 # Check whether --with-pam or --without-pam was given.
11567 if test "${with_pam+set}" = set; then
11568   withval="$with_pam"
11569   with_pam="$withval"; with_pam_req="$withval"
11570 else
11571   with_pam=$with_pam_default
11572 fi;
11573
11574
11575    case "$with_pam" in
11576     yes) ;;
11577     no)  ;;
11578
11579     /*)
11580      echo "$as_me:$LINENO: checking for PAM headers" >&5
11581 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
11582      d=$with_pam/include
11583      if test -d $d; then
11584        X_CFLAGS="-I$d $X_CFLAGS"
11585        echo "$as_me:$LINENO: result: $d" >&5
11586 echo "${ECHO_T}$d" >&6
11587      else
11588        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11589 echo "${ECHO_T}not found ($d: no such directory)" >&6
11590      fi
11591
11592      echo "$as_me:$LINENO: checking for PAM libs" >&5
11593 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
11594      d=$with_pam/lib
11595      if test -d $d; then
11596        X_LIBS="-L$d $X_LIBS"
11597        echo "$as_me:$LINENO: result: $d" >&5
11598 echo "${ECHO_T}$d" >&6
11599      else
11600        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11601 echo "${ECHO_T}not found ($d: no such directory)" >&6
11602      fi
11603
11604      # replace the directory string with "yes".
11605      with_pam_req="yes"
11606      with_pam=$with_pam_req
11607      ;;
11608
11609     *)
11610      echo ""
11611      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
11612      echo "       If it is a directory, then \`DIR/include' will be added to"
11613      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11614      exit 1
11615      ;;
11616    esac
11617
11618
11619 if test "$enable_locking" = yes -a "$with_pam" = yes; then
11620   echo "$as_me:$LINENO: checking for PAM" >&5
11621 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
11622 if test "${ac_cv_pam+set}" = set; then
11623   echo $ECHO_N "(cached) $ECHO_C" >&6
11624 else
11625
11626   ac_save_CPPFLAGS="$CPPFLAGS"
11627   if test \! -z "$includedir" ; then
11628     CPPFLAGS="$CPPFLAGS -I$includedir"
11629   fi
11630   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11631   cat >conftest.$ac_ext <<_ACEOF
11632 #line $LINENO "configure"
11633 /* confdefs.h.  */
11634 _ACEOF
11635 cat confdefs.h >>conftest.$ac_ext
11636 cat >>conftest.$ac_ext <<_ACEOF
11637 /* end confdefs.h.  */
11638 #include <security/pam_appl.h>
11639 int
11640 main ()
11641 {
11642
11643   ;
11644   return 0;
11645 }
11646 _ACEOF
11647 rm -f conftest.$ac_objext
11648 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11649   (eval $ac_compile) 2>&5
11650   ac_status=$?
11651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11652   (exit $ac_status); } &&
11653          { ac_try='test -s conftest.$ac_objext'
11654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11655   (eval $ac_try) 2>&5
11656   ac_status=$?
11657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11658   (exit $ac_status); }; }; then
11659   ac_cv_pam=yes
11660 else
11661   echo "$as_me: failed program was:" >&5
11662 sed 's/^/| /' conftest.$ac_ext >&5
11663
11664 ac_cv_pam=no
11665 fi
11666 rm -f conftest.$ac_objext conftest.$ac_ext
11667   CPPFLAGS="$ac_save_CPPFLAGS"
11668 fi
11669 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
11670 echo "${ECHO_T}$ac_cv_pam" >&6
11671   if test "$ac_cv_pam" = yes ; then
11672     have_pam=yes
11673     cat >>confdefs.h <<\_ACEOF
11674 #define HAVE_PAM 1
11675 _ACEOF
11676
11677     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
11678
11679     # libpam typically requires dlopen and dlsym.  On FreeBSD,
11680     # those are in libc.  On Linux and Solaris, they're in libdl.
11681     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
11682 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
11683 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
11684   echo $ECHO_N "(cached) $ECHO_C" >&6
11685 else
11686   ac_check_lib_save_LIBS=$LIBS
11687 LIBS="-ldl  $LIBS"
11688 cat >conftest.$ac_ext <<_ACEOF
11689 #line $LINENO "configure"
11690 /* confdefs.h.  */
11691 _ACEOF
11692 cat confdefs.h >>conftest.$ac_ext
11693 cat >>conftest.$ac_ext <<_ACEOF
11694 /* end confdefs.h.  */
11695
11696 /* Override any gcc2 internal prototype to avoid an error.  */
11697 #ifdef __cplusplus
11698 extern "C"
11699 #endif
11700 /* We use char because int might match the return type of a gcc2
11701    builtin and then its argument prototype would still apply.  */
11702 char dlopen ();
11703 int
11704 main ()
11705 {
11706 dlopen ();
11707   ;
11708   return 0;
11709 }
11710 _ACEOF
11711 rm -f conftest.$ac_objext conftest$ac_exeext
11712 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11713   (eval $ac_link) 2>&5
11714   ac_status=$?
11715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11716   (exit $ac_status); } &&
11717          { ac_try='test -s conftest$ac_exeext'
11718   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11719   (eval $ac_try) 2>&5
11720   ac_status=$?
11721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11722   (exit $ac_status); }; }; then
11723   ac_cv_lib_dl_dlopen=yes
11724 else
11725   echo "$as_me: failed program was:" >&5
11726 sed 's/^/| /' conftest.$ac_ext >&5
11727
11728 ac_cv_lib_dl_dlopen=no
11729 fi
11730 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11731 LIBS=$ac_check_lib_save_LIBS
11732 fi
11733 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
11734 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
11735 if test $ac_cv_lib_dl_dlopen = yes; then
11736   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
11737 fi
11738
11739
11740     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
11741     have_timedwait=no
11742     echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
11743 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6
11744 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
11745   echo $ECHO_N "(cached) $ECHO_C" >&6
11746 else
11747   ac_check_lib_save_LIBS=$LIBS
11748 LIBS="-lc  $LIBS"
11749 cat >conftest.$ac_ext <<_ACEOF
11750 #line $LINENO "configure"
11751 /* confdefs.h.  */
11752 _ACEOF
11753 cat confdefs.h >>conftest.$ac_ext
11754 cat >>conftest.$ac_ext <<_ACEOF
11755 /* end confdefs.h.  */
11756
11757 /* Override any gcc2 internal prototype to avoid an error.  */
11758 #ifdef __cplusplus
11759 extern "C"
11760 #endif
11761 /* We use char because int might match the return type of a gcc2
11762    builtin and then its argument prototype would still apply.  */
11763 char sigtimedwait ();
11764 int
11765 main ()
11766 {
11767 sigtimedwait ();
11768   ;
11769   return 0;
11770 }
11771 _ACEOF
11772 rm -f conftest.$ac_objext conftest$ac_exeext
11773 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11774   (eval $ac_link) 2>&5
11775   ac_status=$?
11776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11777   (exit $ac_status); } &&
11778          { ac_try='test -s conftest$ac_exeext'
11779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11780   (eval $ac_try) 2>&5
11781   ac_status=$?
11782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11783   (exit $ac_status); }; }; then
11784   ac_cv_lib_c_sigtimedwait=yes
11785 else
11786   echo "$as_me: failed program was:" >&5
11787 sed 's/^/| /' conftest.$ac_ext >&5
11788
11789 ac_cv_lib_c_sigtimedwait=no
11790 fi
11791 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11792 LIBS=$ac_check_lib_save_LIBS
11793 fi
11794 echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
11795 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6
11796 if test $ac_cv_lib_c_sigtimedwait = yes; then
11797   have_timedwait=yes
11798 fi
11799
11800     if test "$have_timedwait" = no ; then
11801       echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
11802 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6
11803 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
11804   echo $ECHO_N "(cached) $ECHO_C" >&6
11805 else
11806   ac_check_lib_save_LIBS=$LIBS
11807 LIBS="-lrt  $LIBS"
11808 cat >conftest.$ac_ext <<_ACEOF
11809 #line $LINENO "configure"
11810 /* confdefs.h.  */
11811 _ACEOF
11812 cat confdefs.h >>conftest.$ac_ext
11813 cat >>conftest.$ac_ext <<_ACEOF
11814 /* end confdefs.h.  */
11815
11816 /* Override any gcc2 internal prototype to avoid an error.  */
11817 #ifdef __cplusplus
11818 extern "C"
11819 #endif
11820 /* We use char because int might match the return type of a gcc2
11821    builtin and then its argument prototype would still apply.  */
11822 char sigtimedwait ();
11823 int
11824 main ()
11825 {
11826 sigtimedwait ();
11827   ;
11828   return 0;
11829 }
11830 _ACEOF
11831 rm -f conftest.$ac_objext conftest$ac_exeext
11832 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11833   (eval $ac_link) 2>&5
11834   ac_status=$?
11835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11836   (exit $ac_status); } &&
11837          { ac_try='test -s conftest$ac_exeext'
11838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11839   (eval $ac_try) 2>&5
11840   ac_status=$?
11841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11842   (exit $ac_status); }; }; then
11843   ac_cv_lib_rt_sigtimedwait=yes
11844 else
11845   echo "$as_me: failed program was:" >&5
11846 sed 's/^/| /' conftest.$ac_ext >&5
11847
11848 ac_cv_lib_rt_sigtimedwait=no
11849 fi
11850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11851 LIBS=$ac_check_lib_save_LIBS
11852 fi
11853 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
11854 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6
11855 if test $ac_cv_lib_rt_sigtimedwait = yes; then
11856   PASSWD_LIBS="${PASSWD_LIBS} -lrt"
11857 fi
11858
11859     fi
11860
11861     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
11862 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
11863     if test "${ac_cv_pam_strerror_args+set}" = set; then
11864   echo $ECHO_N "(cached) $ECHO_C" >&6
11865 else
11866   cat >conftest.$ac_ext <<_ACEOF
11867 #line $LINENO "configure"
11868 /* confdefs.h.  */
11869 _ACEOF
11870 cat confdefs.h >>conftest.$ac_ext
11871 cat >>conftest.$ac_ext <<_ACEOF
11872 /* end confdefs.h.  */
11873 #include <stdio.h>
11874                       #include <stdlib.h>
11875                       #include <security/pam_appl.h>
11876 int
11877 main ()
11878 {
11879 pam_handle_t *pamh = 0;
11880                       char *s = pam_strerror(pamh, PAM_SUCCESS);
11881   ;
11882   return 0;
11883 }
11884 _ACEOF
11885 rm -f conftest.$ac_objext
11886 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11887   (eval $ac_compile) 2>&5
11888   ac_status=$?
11889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11890   (exit $ac_status); } &&
11891          { ac_try='test -s conftest.$ac_objext'
11892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11893   (eval $ac_try) 2>&5
11894   ac_status=$?
11895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11896   (exit $ac_status); }; }; then
11897   ac_pam_strerror_args=2
11898 else
11899   echo "$as_me: failed program was:" >&5
11900 sed 's/^/| /' conftest.$ac_ext >&5
11901
11902 cat >conftest.$ac_ext <<_ACEOF
11903 #line $LINENO "configure"
11904 /* confdefs.h.  */
11905 _ACEOF
11906 cat confdefs.h >>conftest.$ac_ext
11907 cat >>conftest.$ac_ext <<_ACEOF
11908 /* end confdefs.h.  */
11909 #include <stdio.h>
11910                                       #include <stdlib.h>
11911                                       #include <security/pam_appl.h>
11912 int
11913 main ()
11914 {
11915 char *s =
11916                                        pam_strerror(PAM_SUCCESS);
11917   ;
11918   return 0;
11919 }
11920 _ACEOF
11921 rm -f conftest.$ac_objext
11922 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11923   (eval $ac_compile) 2>&5
11924   ac_status=$?
11925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11926   (exit $ac_status); } &&
11927          { ac_try='test -s conftest.$ac_objext'
11928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11929   (eval $ac_try) 2>&5
11930   ac_status=$?
11931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11932   (exit $ac_status); }; }; then
11933   ac_pam_strerror_args=1
11934 else
11935   echo "$as_me: failed program was:" >&5
11936 sed 's/^/| /' conftest.$ac_ext >&5
11937
11938 ac_pam_strerror_args=0
11939 fi
11940 rm -f conftest.$ac_objext conftest.$ac_ext
11941 fi
11942 rm -f conftest.$ac_objext conftest.$ac_ext
11943       ac_cv_pam_strerror_args=$ac_pam_strerror_args
11944 fi
11945
11946     ac_pam_strerror_args=$ac_cv_pam_strerror_args
11947     if test "$ac_pam_strerror_args" = 1 ; then
11948       echo "$as_me:$LINENO: result: one argument" >&5
11949 echo "${ECHO_T}one argument" >&6
11950     elif test "$ac_pam_strerror_args" = 2 ; then
11951       cat >>confdefs.h <<\_ACEOF
11952 #define PAM_STRERROR_TWO_ARGS 1
11953 _ACEOF
11954
11955       echo "$as_me:$LINENO: result: two arguments" >&5
11956 echo "${ECHO_T}two arguments" >&6
11957     else
11958       echo "$as_me:$LINENO: result: unknown" >&5
11959 echo "${ECHO_T}unknown" >&6
11960     fi
11961   fi
11962 fi
11963
11964
11965 ###############################################################################
11966 #
11967 #       Check for Kerberos.
11968 #
11969 ###############################################################################
11970
11971 have_kerberos=no
11972 have_kerberos5=no
11973 with_kerberos_req=unspecified
11974
11975
11976 # Check whether --with-kerberos or --without-kerberos was given.
11977 if test "${with_kerberos+set}" = set; then
11978   withval="$with_kerberos"
11979   with_kerberos="$withval"; with_kerberos_req="$withval"
11980 else
11981   with_kerberos=yes
11982 fi;
11983
11984
11985    case "$with_kerberos" in
11986     yes) ;;
11987     no)  ;;
11988
11989     /*)
11990      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
11991 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
11992      d=$with_kerberos/include
11993      if test -d $d; then
11994        X_CFLAGS="-I$d $X_CFLAGS"
11995        echo "$as_me:$LINENO: result: $d" >&5
11996 echo "${ECHO_T}$d" >&6
11997      else
11998        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11999 echo "${ECHO_T}not found ($d: no such directory)" >&6
12000      fi
12001
12002      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
12003 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
12004      d=$with_kerberos/lib
12005      if test -d $d; then
12006        X_LIBS="-L$d $X_LIBS"
12007        echo "$as_me:$LINENO: result: $d" >&5
12008 echo "${ECHO_T}$d" >&6
12009      else
12010        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12011 echo "${ECHO_T}not found ($d: no such directory)" >&6
12012      fi
12013
12014      # replace the directory string with "yes".
12015      with_kerberos_req="yes"
12016      with_kerberos=$with_kerberos_req
12017      ;;
12018
12019     *)
12020      echo ""
12021      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
12022      echo "       If it is a directory, then \`DIR/include' will be added to"
12023      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12024      exit 1
12025      ;;
12026    esac
12027
12028
12029 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
12030   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
12031 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
12032 if test "${ac_cv_kerberos+set}" = set; then
12033   echo $ECHO_N "(cached) $ECHO_C" >&6
12034 else
12035
12036   ac_save_CPPFLAGS="$CPPFLAGS"
12037   if test \! -z "$includedir" ; then
12038     CPPFLAGS="$CPPFLAGS -I$includedir"
12039   fi
12040   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12041   cat >conftest.$ac_ext <<_ACEOF
12042 #line $LINENO "configure"
12043 /* confdefs.h.  */
12044 _ACEOF
12045 cat confdefs.h >>conftest.$ac_ext
12046 cat >>conftest.$ac_ext <<_ACEOF
12047 /* end confdefs.h.  */
12048 #include <krb.h>
12049 int
12050 main ()
12051 {
12052
12053   ;
12054   return 0;
12055 }
12056 _ACEOF
12057 rm -f conftest.$ac_objext
12058 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12059   (eval $ac_compile) 2>&5
12060   ac_status=$?
12061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12062   (exit $ac_status); } &&
12063          { ac_try='test -s conftest.$ac_objext'
12064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12065   (eval $ac_try) 2>&5
12066   ac_status=$?
12067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12068   (exit $ac_status); }; }; then
12069   ac_cv_kerberos=yes
12070 else
12071   echo "$as_me: failed program was:" >&5
12072 sed 's/^/| /' conftest.$ac_ext >&5
12073
12074 ac_cv_kerberos=no
12075 fi
12076 rm -f conftest.$ac_objext conftest.$ac_ext
12077   CPPFLAGS="$ac_save_CPPFLAGS"
12078 fi
12079 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
12080 echo "${ECHO_T}$ac_cv_kerberos" >&6
12081   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
12082 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
12083 if test "${ac_cv_kerberos5+set}" = set; then
12084   echo $ECHO_N "(cached) $ECHO_C" >&6
12085 else
12086
12087   ac_save_CPPFLAGS="$CPPFLAGS"
12088   if test \! -z "$includedir" ; then
12089     CPPFLAGS="$CPPFLAGS -I$includedir"
12090   fi
12091   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12092   cat >conftest.$ac_ext <<_ACEOF
12093 #line $LINENO "configure"
12094 /* confdefs.h.  */
12095 _ACEOF
12096 cat confdefs.h >>conftest.$ac_ext
12097 cat >>conftest.$ac_ext <<_ACEOF
12098 /* end confdefs.h.  */
12099 #include <kerberosIV/krb.h>
12100 int
12101 main ()
12102 {
12103
12104   ;
12105   return 0;
12106 }
12107 _ACEOF
12108 rm -f conftest.$ac_objext
12109 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12110   (eval $ac_compile) 2>&5
12111   ac_status=$?
12112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12113   (exit $ac_status); } &&
12114          { ac_try='test -s conftest.$ac_objext'
12115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12116   (eval $ac_try) 2>&5
12117   ac_status=$?
12118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12119   (exit $ac_status); }; }; then
12120   ac_cv_kerberos5=yes
12121 else
12122   echo "$as_me: failed program was:" >&5
12123 sed 's/^/| /' conftest.$ac_ext >&5
12124
12125 ac_cv_kerberos5=no
12126 fi
12127 rm -f conftest.$ac_objext conftest.$ac_ext
12128   CPPFLAGS="$ac_save_CPPFLAGS"
12129 fi
12130 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
12131 echo "${ECHO_T}$ac_cv_kerberos5" >&6
12132
12133   if test "$ac_cv_kerberos" = yes ; then
12134     have_kerberos=yes
12135     cat >>confdefs.h <<\_ACEOF
12136 #define HAVE_KERBEROS 1
12137 _ACEOF
12138
12139   fi
12140
12141   if test "$ac_cv_kerberos5" = yes ; then
12142
12143     # Andrew Snare <ajs@pigpond.com> wrote:
12144     #
12145     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
12146     # (krb4) was also available.  This turns out not to be the case with
12147     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
12148     # is optional.
12149     #
12150     # So, disable kerberosV support if libkrb4 can't be found.
12151     # This is not the best solution, but it makes the compile not fail.
12152     #
12153
12154   ac_save_CPPFLAGS="$CPPFLAGS"
12155   ac_save_LDFLAGS="$LDFLAGS"
12156 #  ac_save_LIBS="$LIBS"
12157
12158   if test \! -z "$includedir" ; then
12159     CPPFLAGS="$CPPFLAGS -I$includedir"
12160   fi
12161   # note: $X_CFLAGS includes $x_includes
12162   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12163
12164   if test \! -z "$libdir" ; then
12165     LDFLAGS="$LDFLAGS -L$libdir"
12166   fi
12167   # note: $X_LIBS includes $x_libraries
12168   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12169
12170   echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
12171 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6
12172 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
12173   echo $ECHO_N "(cached) $ECHO_C" >&6
12174 else
12175   ac_check_lib_save_LIBS=$LIBS
12176 LIBS="-lkrb4  $LIBS"
12177 cat >conftest.$ac_ext <<_ACEOF
12178 #line $LINENO "configure"
12179 /* confdefs.h.  */
12180 _ACEOF
12181 cat confdefs.h >>conftest.$ac_ext
12182 cat >>conftest.$ac_ext <<_ACEOF
12183 /* end confdefs.h.  */
12184
12185 /* Override any gcc2 internal prototype to avoid an error.  */
12186 #ifdef __cplusplus
12187 extern "C"
12188 #endif
12189 /* We use char because int might match the return type of a gcc2
12190    builtin and then its argument prototype would still apply.  */
12191 char krb_get_tf_realm ();
12192 int
12193 main ()
12194 {
12195 krb_get_tf_realm ();
12196   ;
12197   return 0;
12198 }
12199 _ACEOF
12200 rm -f conftest.$ac_objext conftest$ac_exeext
12201 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12202   (eval $ac_link) 2>&5
12203   ac_status=$?
12204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12205   (exit $ac_status); } &&
12206          { ac_try='test -s conftest$ac_exeext'
12207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12208   (eval $ac_try) 2>&5
12209   ac_status=$?
12210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12211   (exit $ac_status); }; }; then
12212   ac_cv_lib_krb4_krb_get_tf_realm=yes
12213 else
12214   echo "$as_me: failed program was:" >&5
12215 sed 's/^/| /' conftest.$ac_ext >&5
12216
12217 ac_cv_lib_krb4_krb_get_tf_realm=no
12218 fi
12219 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12220 LIBS=$ac_check_lib_save_LIBS
12221 fi
12222 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
12223 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6
12224 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
12225   have_kerberos=yes
12226 else
12227   have_kerberos=no
12228 fi
12229
12230   CPPFLAGS="$ac_save_CPPFLAGS"
12231   LDFLAGS="$ac_save_LDFLAGS"
12232 #  LIBS="$ac_save_LIBS"
12233
12234     if test "$have_kerberos" = yes ; then
12235       have_kerberos5=yes
12236       cat >>confdefs.h <<\_ACEOF
12237 #define HAVE_KERBEROS 1
12238 _ACEOF
12239
12240       cat >>confdefs.h <<\_ACEOF
12241 #define HAVE_KERBEROS5 1
12242 _ACEOF
12243
12244     else
12245       have_kerberos5=no
12246       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
12247 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
12248     fi
12249
12250   fi
12251
12252   if test "$have_kerberos5" = yes ; then
12253     # from Matt Knopp <mhat@infocalypse.netlag.com>
12254     # (who got it from amu@mit.edu)
12255
12256     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
12257
12258     # jwz: MacOS X uses -lkrb5, but not -lcrypt
12259
12260   ac_save_CPPFLAGS="$CPPFLAGS"
12261   ac_save_LDFLAGS="$LDFLAGS"
12262 #  ac_save_LIBS="$LIBS"
12263
12264   if test \! -z "$includedir" ; then
12265     CPPFLAGS="$CPPFLAGS -I$includedir"
12266   fi
12267   # note: $X_CFLAGS includes $x_includes
12268   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12269
12270   if test \! -z "$libdir" ; then
12271     LDFLAGS="$LDFLAGS -L$libdir"
12272   fi
12273   # note: $X_LIBS includes $x_libraries
12274   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12275
12276   echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
12277 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
12278 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
12279   echo $ECHO_N "(cached) $ECHO_C" >&6
12280 else
12281   ac_check_lib_save_LIBS=$LIBS
12282 LIBS="-lcrypt  $LIBS"
12283 cat >conftest.$ac_ext <<_ACEOF
12284 #line $LINENO "configure"
12285 /* confdefs.h.  */
12286 _ACEOF
12287 cat confdefs.h >>conftest.$ac_ext
12288 cat >>conftest.$ac_ext <<_ACEOF
12289 /* end confdefs.h.  */
12290
12291 /* Override any gcc2 internal prototype to avoid an error.  */
12292 #ifdef __cplusplus
12293 extern "C"
12294 #endif
12295 /* We use char because int might match the return type of a gcc2
12296    builtin and then its argument prototype would still apply.  */
12297 char crypt ();
12298 int
12299 main ()
12300 {
12301 crypt ();
12302   ;
12303   return 0;
12304 }
12305 _ACEOF
12306 rm -f conftest.$ac_objext conftest$ac_exeext
12307 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12308   (eval $ac_link) 2>&5
12309   ac_status=$?
12310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12311   (exit $ac_status); } &&
12312          { ac_try='test -s conftest$ac_exeext'
12313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12314   (eval $ac_try) 2>&5
12315   ac_status=$?
12316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12317   (exit $ac_status); }; }; then
12318   ac_cv_lib_crypt_crypt=yes
12319 else
12320   echo "$as_me: failed program was:" >&5
12321 sed 's/^/| /' conftest.$ac_ext >&5
12322
12323 ac_cv_lib_crypt_crypt=no
12324 fi
12325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12326 LIBS=$ac_check_lib_save_LIBS
12327 fi
12328 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
12329 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
12330 if test $ac_cv_lib_crypt_crypt = yes; then
12331   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
12332 fi
12333
12334   CPPFLAGS="$ac_save_CPPFLAGS"
12335   LDFLAGS="$ac_save_LDFLAGS"
12336 #  LIBS="$ac_save_LIBS"
12337
12338
12339   elif test "$have_kerberos" = yes ; then
12340     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
12341     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
12342   fi
12343
12344   if test "$have_kerberos" = yes ; then
12345     echo "$as_me:$LINENO: checking for res_search" >&5
12346 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
12347 if test "${ac_cv_func_res_search+set}" = set; then
12348   echo $ECHO_N "(cached) $ECHO_C" >&6
12349 else
12350   cat >conftest.$ac_ext <<_ACEOF
12351 #line $LINENO "configure"
12352 /* confdefs.h.  */
12353 _ACEOF
12354 cat confdefs.h >>conftest.$ac_ext
12355 cat >>conftest.$ac_ext <<_ACEOF
12356 /* end confdefs.h.  */
12357 /* System header to define __stub macros and hopefully few prototypes,
12358     which can conflict with char res_search (); below.
12359     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12360     <limits.h> exists even on freestanding compilers.  */
12361 #ifdef __STDC__
12362 # include <limits.h>
12363 #else
12364 # include <assert.h>
12365 #endif
12366 /* Override any gcc2 internal prototype to avoid an error.  */
12367 #ifdef __cplusplus
12368 extern "C"
12369 {
12370 #endif
12371 /* We use char because int might match the return type of a gcc2
12372    builtin and then its argument prototype would still apply.  */
12373 char res_search ();
12374 /* The GNU C library defines this for functions which it implements
12375     to always fail with ENOSYS.  Some functions are actually named
12376     something starting with __ and the normal name is an alias.  */
12377 #if defined (__stub_res_search) || defined (__stub___res_search)
12378 choke me
12379 #else
12380 char (*f) () = res_search;
12381 #endif
12382 #ifdef __cplusplus
12383 }
12384 #endif
12385
12386 int
12387 main ()
12388 {
12389 return f != res_search;
12390   ;
12391   return 0;
12392 }
12393 _ACEOF
12394 rm -f conftest.$ac_objext conftest$ac_exeext
12395 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12396   (eval $ac_link) 2>&5
12397   ac_status=$?
12398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12399   (exit $ac_status); } &&
12400          { ac_try='test -s conftest$ac_exeext'
12401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12402   (eval $ac_try) 2>&5
12403   ac_status=$?
12404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12405   (exit $ac_status); }; }; then
12406   ac_cv_func_res_search=yes
12407 else
12408   echo "$as_me: failed program was:" >&5
12409 sed 's/^/| /' conftest.$ac_ext >&5
12410
12411 ac_cv_func_res_search=no
12412 fi
12413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12414 fi
12415 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
12416 echo "${ECHO_T}$ac_cv_func_res_search" >&6
12417 if test $ac_cv_func_res_search = yes; then
12418   :
12419 else
12420   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
12421 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
12422 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
12423   echo $ECHO_N "(cached) $ECHO_C" >&6
12424 else
12425   ac_check_lib_save_LIBS=$LIBS
12426 LIBS="-lresolv  $LIBS"
12427 cat >conftest.$ac_ext <<_ACEOF
12428 #line $LINENO "configure"
12429 /* confdefs.h.  */
12430 _ACEOF
12431 cat confdefs.h >>conftest.$ac_ext
12432 cat >>conftest.$ac_ext <<_ACEOF
12433 /* end confdefs.h.  */
12434
12435 /* Override any gcc2 internal prototype to avoid an error.  */
12436 #ifdef __cplusplus
12437 extern "C"
12438 #endif
12439 /* We use char because int might match the return type of a gcc2
12440    builtin and then its argument prototype would still apply.  */
12441 char res_search ();
12442 int
12443 main ()
12444 {
12445 res_search ();
12446   ;
12447   return 0;
12448 }
12449 _ACEOF
12450 rm -f conftest.$ac_objext conftest$ac_exeext
12451 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12452   (eval $ac_link) 2>&5
12453   ac_status=$?
12454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12455   (exit $ac_status); } &&
12456          { ac_try='test -s conftest$ac_exeext'
12457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12458   (eval $ac_try) 2>&5
12459   ac_status=$?
12460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12461   (exit $ac_status); }; }; then
12462   ac_cv_lib_resolv_res_search=yes
12463 else
12464   echo "$as_me: failed program was:" >&5
12465 sed 's/^/| /' conftest.$ac_ext >&5
12466
12467 ac_cv_lib_resolv_res_search=no
12468 fi
12469 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12470 LIBS=$ac_check_lib_save_LIBS
12471 fi
12472 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
12473 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
12474 if test $ac_cv_lib_resolv_res_search = yes; then
12475   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
12476 else
12477   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
12478 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
12479
12480 fi
12481
12482 fi
12483
12484   fi
12485 fi
12486
12487
12488 ###############################################################################
12489 #
12490 #       Check for the nine billion variants of shadow passwords...
12491 #
12492 ###############################################################################
12493
12494 need_setuid=no
12495
12496 have_shadow=no
12497 with_shadow_req=unspecified
12498
12499
12500 # Check whether --with-shadow or --without-shadow was given.
12501 if test "${with_shadow+set}" = set; then
12502   withval="$with_shadow"
12503   with_shadow="$withval"; with_shadow_req="$withval"
12504 else
12505   with_shadow=yes
12506 fi;
12507
12508
12509    case "$with_shadow" in
12510     yes) ;;
12511     no)  ;;
12512
12513     /*)
12514      echo "$as_me:$LINENO: checking for shadow password headers" >&5
12515 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
12516      d=$with_shadow/include
12517      if test -d $d; then
12518        X_CFLAGS="-I$d $X_CFLAGS"
12519        echo "$as_me:$LINENO: result: $d" >&5
12520 echo "${ECHO_T}$d" >&6
12521      else
12522        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12523 echo "${ECHO_T}not found ($d: no such directory)" >&6
12524      fi
12525
12526      echo "$as_me:$LINENO: checking for shadow password libs" >&5
12527 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
12528      d=$with_shadow/lib
12529      if test -d $d; then
12530        X_LIBS="-L$d $X_LIBS"
12531        echo "$as_me:$LINENO: result: $d" >&5
12532 echo "${ECHO_T}$d" >&6
12533      else
12534        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12535 echo "${ECHO_T}not found ($d: no such directory)" >&6
12536      fi
12537
12538      # replace the directory string with "yes".
12539      with_shadow_req="yes"
12540      with_shadow=$with_shadow_req
12541      ;;
12542
12543     *)
12544      echo ""
12545      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
12546      echo "       If it is a directory, then \`DIR/include' will be added to"
12547      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12548      exit 1
12549      ;;
12550    esac
12551
12552
12553 if test "$enable_locking" = no ; then
12554   with_shadow_req=no
12555   with_shadow=no
12556 fi
12557
12558
12559 ###############################################################################
12560 #
12561 #       Check for Sun "adjunct" passwords.
12562 #
12563 ###############################################################################
12564
12565 if test "$with_shadow" = yes ; then
12566   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
12567 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
12568 if test "${ac_cv_sun_adjunct+set}" = set; then
12569   echo $ECHO_N "(cached) $ECHO_C" >&6
12570 else
12571
12572   ac_save_CPPFLAGS="$CPPFLAGS"
12573   if test \! -z "$includedir" ; then
12574     CPPFLAGS="$CPPFLAGS -I$includedir"
12575   fi
12576   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12577   cat >conftest.$ac_ext <<_ACEOF
12578 #line $LINENO "configure"
12579 /* confdefs.h.  */
12580 _ACEOF
12581 cat confdefs.h >>conftest.$ac_ext
12582 cat >>conftest.$ac_ext <<_ACEOF
12583 /* end confdefs.h.  */
12584 #include <stdlib.h>
12585                                     #include <unistd.h>
12586                                     #include <sys/types.h>
12587                                     #include <sys/label.h>
12588                                     #include <sys/audit.h>
12589                                     #include <pwdadj.h>
12590 int
12591 main ()
12592 {
12593 struct passwd_adjunct *p = getpwanam("nobody");
12594                        const char *pw = p->pwa_passwd;
12595   ;
12596   return 0;
12597 }
12598 _ACEOF
12599 rm -f conftest.$ac_objext
12600 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12601   (eval $ac_compile) 2>&5
12602   ac_status=$?
12603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12604   (exit $ac_status); } &&
12605          { ac_try='test -s conftest.$ac_objext'
12606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12607   (eval $ac_try) 2>&5
12608   ac_status=$?
12609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12610   (exit $ac_status); }; }; then
12611   ac_cv_sun_adjunct=yes
12612 else
12613   echo "$as_me: failed program was:" >&5
12614 sed 's/^/| /' conftest.$ac_ext >&5
12615
12616 ac_cv_sun_adjunct=no
12617 fi
12618 rm -f conftest.$ac_objext conftest.$ac_ext
12619   CPPFLAGS="$ac_save_CPPFLAGS"
12620 fi
12621 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
12622 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
12623   if test "$ac_cv_sun_adjunct" = yes; then
12624     have_shadow_adjunct=yes
12625     have_shadow=yes
12626     need_setuid=yes
12627   fi
12628 fi
12629
12630
12631 ###############################################################################
12632 #
12633 #       Check for DEC and SCO so-called "enhanced" security.
12634 #
12635 ###############################################################################
12636
12637 if test "$with_shadow" = yes ; then
12638   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
12639 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
12640 if test "${ac_cv_enhanced_passwd+set}" = set; then
12641   echo $ECHO_N "(cached) $ECHO_C" >&6
12642 else
12643
12644   ac_save_CPPFLAGS="$CPPFLAGS"
12645   if test \! -z "$includedir" ; then
12646     CPPFLAGS="$CPPFLAGS -I$includedir"
12647   fi
12648   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12649   cat >conftest.$ac_ext <<_ACEOF
12650 #line $LINENO "configure"
12651 /* confdefs.h.  */
12652 _ACEOF
12653 cat confdefs.h >>conftest.$ac_ext
12654 cat >>conftest.$ac_ext <<_ACEOF
12655 /* end confdefs.h.  */
12656 #include <stdlib.h>
12657                                     #include <unistd.h>
12658                                     #include <sys/types.h>
12659                                     #include <pwd.h>
12660                                     #include <sys/security.h>
12661                                     #include <prot.h>
12662 int
12663 main ()
12664 {
12665 struct pr_passwd *p;
12666                        const char *pw;
12667                        set_auth_parameters(0, 0);
12668                        check_auth_parameters();
12669                        p = getprpwnam("nobody");
12670                        pw = p->ufld.fd_encrypt;
12671   ;
12672   return 0;
12673 }
12674 _ACEOF
12675 rm -f conftest.$ac_objext
12676 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12677   (eval $ac_compile) 2>&5
12678   ac_status=$?
12679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12680   (exit $ac_status); } &&
12681          { ac_try='test -s conftest.$ac_objext'
12682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12683   (eval $ac_try) 2>&5
12684   ac_status=$?
12685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12686   (exit $ac_status); }; }; then
12687   ac_cv_enhanced_passwd=yes
12688 else
12689   echo "$as_me: failed program was:" >&5
12690 sed 's/^/| /' conftest.$ac_ext >&5
12691
12692 ac_cv_enhanced_passwd=no
12693 fi
12694 rm -f conftest.$ac_objext conftest.$ac_ext
12695   CPPFLAGS="$ac_save_CPPFLAGS"
12696 fi
12697 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
12698 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
12699   if test $ac_cv_enhanced_passwd = yes; then
12700     have_shadow_enhanced=yes
12701     have_shadow=yes
12702     need_setuid=yes
12703
12704     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
12705     # (I'm told it needs -lcurses too, but I don't understand why.)
12706     # But on DEC, it's in -lsecurity.
12707     #
12708     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
12709 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
12710 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
12711   echo $ECHO_N "(cached) $ECHO_C" >&6
12712 else
12713   ac_check_lib_save_LIBS=$LIBS
12714 LIBS="-lprot -lx $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 getprpwnam ();
12730 int
12731 main ()
12732 {
12733 getprpwnam ();
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_prot_getprpwnam=yes
12751 else
12752   echo "$as_me: failed program was:" >&5
12753 sed 's/^/| /' conftest.$ac_ext >&5
12754
12755 ac_cv_lib_prot_getprpwnam=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_prot_getprpwnam" >&5
12761 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
12762 if test $ac_cv_lib_prot_getprpwnam = yes; then
12763   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
12764 else
12765   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
12766 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
12767 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
12768   echo $ECHO_N "(cached) $ECHO_C" >&6
12769 else
12770   ac_check_lib_save_LIBS=$LIBS
12771 LIBS="-lsecurity  $LIBS"
12772 cat >conftest.$ac_ext <<_ACEOF
12773 #line $LINENO "configure"
12774 /* confdefs.h.  */
12775 _ACEOF
12776 cat confdefs.h >>conftest.$ac_ext
12777 cat >>conftest.$ac_ext <<_ACEOF
12778 /* end confdefs.h.  */
12779
12780 /* Override any gcc2 internal prototype to avoid an error.  */
12781 #ifdef __cplusplus
12782 extern "C"
12783 #endif
12784 /* We use char because int might match the return type of a gcc2
12785    builtin and then its argument prototype would still apply.  */
12786 char getprpwnam ();
12787 int
12788 main ()
12789 {
12790 getprpwnam ();
12791   ;
12792   return 0;
12793 }
12794 _ACEOF
12795 rm -f conftest.$ac_objext conftest$ac_exeext
12796 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12797   (eval $ac_link) 2>&5
12798   ac_status=$?
12799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12800   (exit $ac_status); } &&
12801          { ac_try='test -s conftest$ac_exeext'
12802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12803   (eval $ac_try) 2>&5
12804   ac_status=$?
12805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12806   (exit $ac_status); }; }; then
12807   ac_cv_lib_security_getprpwnam=yes
12808 else
12809   echo "$as_me: failed program was:" >&5
12810 sed 's/^/| /' conftest.$ac_ext >&5
12811
12812 ac_cv_lib_security_getprpwnam=no
12813 fi
12814 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12815 LIBS=$ac_check_lib_save_LIBS
12816 fi
12817 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
12818 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
12819 if test $ac_cv_lib_security_getprpwnam = yes; then
12820   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
12821 fi
12822
12823 fi
12824
12825   fi
12826 fi
12827
12828 ###############################################################################
12829 #
12830 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
12831 #
12832 ###############################################################################
12833
12834 if test "$with_shadow" = yes ; then
12835   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
12836 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
12837 if test "${ac_cv_hpux_passwd+set}" = set; then
12838   echo $ECHO_N "(cached) $ECHO_C" >&6
12839 else
12840
12841   ac_save_CPPFLAGS="$CPPFLAGS"
12842   if test \! -z "$includedir" ; then
12843     CPPFLAGS="$CPPFLAGS -I$includedir"
12844   fi
12845   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12846   cat >conftest.$ac_ext <<_ACEOF
12847 #line $LINENO "configure"
12848 /* confdefs.h.  */
12849 _ACEOF
12850 cat confdefs.h >>conftest.$ac_ext
12851 cat >>conftest.$ac_ext <<_ACEOF
12852 /* end confdefs.h.  */
12853 #include <stdlib.h>
12854                                     #include <unistd.h>
12855                                     #include <sys/types.h>
12856                                     #include <pwd.h>
12857                                     #include <hpsecurity.h>
12858                                     #include <prot.h>
12859 int
12860 main ()
12861 {
12862 struct s_passwd *p = getspwnam("nobody");
12863                        const char *pw = p->pw_passwd;
12864   ;
12865   return 0;
12866 }
12867 _ACEOF
12868 rm -f conftest.$ac_objext
12869 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12870   (eval $ac_compile) 2>&5
12871   ac_status=$?
12872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12873   (exit $ac_status); } &&
12874          { ac_try='test -s conftest.$ac_objext'
12875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12876   (eval $ac_try) 2>&5
12877   ac_status=$?
12878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12879   (exit $ac_status); }; }; then
12880   ac_cv_hpux_passwd=yes
12881 else
12882   echo "$as_me: failed program was:" >&5
12883 sed 's/^/| /' conftest.$ac_ext >&5
12884
12885 ac_cv_hpux_passwd=no
12886 fi
12887 rm -f conftest.$ac_objext conftest.$ac_ext
12888   CPPFLAGS="$ac_save_CPPFLAGS"
12889 fi
12890 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
12891 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
12892   if test "$ac_cv_hpux_passwd" = yes; then
12893     have_shadow_hpux=yes
12894     have_shadow=yes
12895     need_setuid=yes
12896
12897     # on HPUX, bigcrypt is in -lsec
12898     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
12899 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
12900 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
12901   echo $ECHO_N "(cached) $ECHO_C" >&6
12902 else
12903   ac_check_lib_save_LIBS=$LIBS
12904 LIBS="-lsec  $LIBS"
12905 cat >conftest.$ac_ext <<_ACEOF
12906 #line $LINENO "configure"
12907 /* confdefs.h.  */
12908 _ACEOF
12909 cat confdefs.h >>conftest.$ac_ext
12910 cat >>conftest.$ac_ext <<_ACEOF
12911 /* end confdefs.h.  */
12912
12913 /* Override any gcc2 internal prototype to avoid an error.  */
12914 #ifdef __cplusplus
12915 extern "C"
12916 #endif
12917 /* We use char because int might match the return type of a gcc2
12918    builtin and then its argument prototype would still apply.  */
12919 char bigcrypt ();
12920 int
12921 main ()
12922 {
12923 bigcrypt ();
12924   ;
12925   return 0;
12926 }
12927 _ACEOF
12928 rm -f conftest.$ac_objext conftest$ac_exeext
12929 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12930   (eval $ac_link) 2>&5
12931   ac_status=$?
12932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12933   (exit $ac_status); } &&
12934          { ac_try='test -s conftest$ac_exeext'
12935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12936   (eval $ac_try) 2>&5
12937   ac_status=$?
12938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12939   (exit $ac_status); }; }; then
12940   ac_cv_lib_sec_bigcrypt=yes
12941 else
12942   echo "$as_me: failed program was:" >&5
12943 sed 's/^/| /' conftest.$ac_ext >&5
12944
12945 ac_cv_lib_sec_bigcrypt=no
12946 fi
12947 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12948 LIBS=$ac_check_lib_save_LIBS
12949 fi
12950 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
12951 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
12952 if test $ac_cv_lib_sec_bigcrypt = yes; then
12953   PASSWD_LIBS="$PASSWD_LIBS -lsec"
12954 fi
12955
12956   fi
12957 fi
12958
12959
12960 ###############################################################################
12961 #
12962 #       Check for FreeBSD-style shadow passwords.
12963 #
12964 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
12965 #       password systems -- except you only get stuff in the pw_passwd field
12966 #       if the running program is setuid.  So, guess that we've got this
12967 #       lossage to contend with if /etc/master.passwd exists, and default to
12968 #       a setuid installation.
12969 #
12970 ###############################################################################
12971
12972 if test "$with_shadow" = yes ; then
12973   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
12974 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
12975 if test "${ac_cv_master_passwd+set}" = set; then
12976   echo $ECHO_N "(cached) $ECHO_C" >&6
12977 else
12978   if test -f /etc/master.passwd ; then
12979                     ac_cv_master_passwd=yes
12980                   else
12981                     ac_cv_master_passwd=no
12982                   fi
12983 fi
12984 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
12985 echo "${ECHO_T}$ac_cv_master_passwd" >&6
12986   if test "$ac_cv_master_passwd" = yes; then
12987     need_setuid=yes
12988   fi
12989 fi
12990
12991
12992 ###############################################################################
12993 #
12994 #       Check for traditional (ha!) shadow passwords.
12995 #
12996 ###############################################################################
12997
12998 if test "$with_shadow" = yes ; then
12999   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
13000 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
13001 if test "${ac_cv_shadow+set}" = set; then
13002   echo $ECHO_N "(cached) $ECHO_C" >&6
13003 else
13004
13005   ac_save_CPPFLAGS="$CPPFLAGS"
13006   if test \! -z "$includedir" ; then
13007     CPPFLAGS="$CPPFLAGS -I$includedir"
13008   fi
13009   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13010   cat >conftest.$ac_ext <<_ACEOF
13011 #line $LINENO "configure"
13012 /* confdefs.h.  */
13013 _ACEOF
13014 cat confdefs.h >>conftest.$ac_ext
13015 cat >>conftest.$ac_ext <<_ACEOF
13016 /* end confdefs.h.  */
13017 #include <stdlib.h>
13018                                     #include <unistd.h>
13019                                     #include <sys/types.h>
13020                                     #include <pwd.h>
13021                                     #include <shadow.h>
13022 int
13023 main ()
13024 {
13025 struct spwd *p = getspnam("nobody");
13026                        const char *pw = p->sp_pwdp;
13027   ;
13028   return 0;
13029 }
13030 _ACEOF
13031 rm -f conftest.$ac_objext
13032 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13033   (eval $ac_compile) 2>&5
13034   ac_status=$?
13035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13036   (exit $ac_status); } &&
13037          { ac_try='test -s conftest.$ac_objext'
13038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13039   (eval $ac_try) 2>&5
13040   ac_status=$?
13041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13042   (exit $ac_status); }; }; then
13043   ac_cv_shadow=yes
13044 else
13045   echo "$as_me: failed program was:" >&5
13046 sed 's/^/| /' conftest.$ac_ext >&5
13047
13048 ac_cv_shadow=no
13049 fi
13050 rm -f conftest.$ac_objext conftest.$ac_ext
13051   CPPFLAGS="$ac_save_CPPFLAGS"
13052 fi
13053 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
13054 echo "${ECHO_T}$ac_cv_shadow" >&6
13055   if test "$ac_cv_shadow" = yes; then
13056     have_shadow=yes
13057     need_setuid=yes
13058
13059     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
13060     have_getspnam=no
13061     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
13062 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
13063 if test "${ac_cv_lib_c_getspnam+set}" = set; then
13064   echo $ECHO_N "(cached) $ECHO_C" >&6
13065 else
13066   ac_check_lib_save_LIBS=$LIBS
13067 LIBS="-lc  $LIBS"
13068 cat >conftest.$ac_ext <<_ACEOF
13069 #line $LINENO "configure"
13070 /* confdefs.h.  */
13071 _ACEOF
13072 cat confdefs.h >>conftest.$ac_ext
13073 cat >>conftest.$ac_ext <<_ACEOF
13074 /* end confdefs.h.  */
13075
13076 /* Override any gcc2 internal prototype to avoid an error.  */
13077 #ifdef __cplusplus
13078 extern "C"
13079 #endif
13080 /* We use char because int might match the return type of a gcc2
13081    builtin and then its argument prototype would still apply.  */
13082 char getspnam ();
13083 int
13084 main ()
13085 {
13086 getspnam ();
13087   ;
13088   return 0;
13089 }
13090 _ACEOF
13091 rm -f conftest.$ac_objext conftest$ac_exeext
13092 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13093   (eval $ac_link) 2>&5
13094   ac_status=$?
13095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13096   (exit $ac_status); } &&
13097          { ac_try='test -s conftest$ac_exeext'
13098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13099   (eval $ac_try) 2>&5
13100   ac_status=$?
13101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13102   (exit $ac_status); }; }; then
13103   ac_cv_lib_c_getspnam=yes
13104 else
13105   echo "$as_me: failed program was:" >&5
13106 sed 's/^/| /' conftest.$ac_ext >&5
13107
13108 ac_cv_lib_c_getspnam=no
13109 fi
13110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13111 LIBS=$ac_check_lib_save_LIBS
13112 fi
13113 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
13114 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
13115 if test $ac_cv_lib_c_getspnam = yes; then
13116   have_getspnam=yes
13117 fi
13118
13119     if test "$have_getspnam" = no ; then
13120       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
13121 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
13122 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
13123   echo $ECHO_N "(cached) $ECHO_C" >&6
13124 else
13125   ac_check_lib_save_LIBS=$LIBS
13126 LIBS="-lgen  $LIBS"
13127 cat >conftest.$ac_ext <<_ACEOF
13128 #line $LINENO "configure"
13129 /* confdefs.h.  */
13130 _ACEOF
13131 cat confdefs.h >>conftest.$ac_ext
13132 cat >>conftest.$ac_ext <<_ACEOF
13133 /* end confdefs.h.  */
13134
13135 /* Override any gcc2 internal prototype to avoid an error.  */
13136 #ifdef __cplusplus
13137 extern "C"
13138 #endif
13139 /* We use char because int might match the return type of a gcc2
13140    builtin and then its argument prototype would still apply.  */
13141 char getspnam ();
13142 int
13143 main ()
13144 {
13145 getspnam ();
13146   ;
13147   return 0;
13148 }
13149 _ACEOF
13150 rm -f conftest.$ac_objext conftest$ac_exeext
13151 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13152   (eval $ac_link) 2>&5
13153   ac_status=$?
13154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13155   (exit $ac_status); } &&
13156          { ac_try='test -s conftest$ac_exeext'
13157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13158   (eval $ac_try) 2>&5
13159   ac_status=$?
13160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13161   (exit $ac_status); }; }; then
13162   ac_cv_lib_gen_getspnam=yes
13163 else
13164   echo "$as_me: failed program was:" >&5
13165 sed 's/^/| /' conftest.$ac_ext >&5
13166
13167 ac_cv_lib_gen_getspnam=no
13168 fi
13169 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13170 LIBS=$ac_check_lib_save_LIBS
13171 fi
13172 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
13173 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
13174 if test $ac_cv_lib_gen_getspnam = yes; then
13175   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
13176 fi
13177
13178     fi
13179   fi
13180 fi
13181
13182
13183 ###############################################################################
13184 #
13185 #       Check for other libraries needed for non-shadow passwords.
13186 #
13187 ###############################################################################
13188
13189 if test "$enable_locking" = yes ; then
13190
13191   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
13192   have_crypt=no
13193   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
13194 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
13195 if test "${ac_cv_lib_c_crypt+set}" = set; then
13196   echo $ECHO_N "(cached) $ECHO_C" >&6
13197 else
13198   ac_check_lib_save_LIBS=$LIBS
13199 LIBS="-lc  $LIBS"
13200 cat >conftest.$ac_ext <<_ACEOF
13201 #line $LINENO "configure"
13202 /* confdefs.h.  */
13203 _ACEOF
13204 cat confdefs.h >>conftest.$ac_ext
13205 cat >>conftest.$ac_ext <<_ACEOF
13206 /* end confdefs.h.  */
13207
13208 /* Override any gcc2 internal prototype to avoid an error.  */
13209 #ifdef __cplusplus
13210 extern "C"
13211 #endif
13212 /* We use char because int might match the return type of a gcc2
13213    builtin and then its argument prototype would still apply.  */
13214 char crypt ();
13215 int
13216 main ()
13217 {
13218 crypt ();
13219   ;
13220   return 0;
13221 }
13222 _ACEOF
13223 rm -f conftest.$ac_objext conftest$ac_exeext
13224 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13225   (eval $ac_link) 2>&5
13226   ac_status=$?
13227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13228   (exit $ac_status); } &&
13229          { ac_try='test -s conftest$ac_exeext'
13230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13231   (eval $ac_try) 2>&5
13232   ac_status=$?
13233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13234   (exit $ac_status); }; }; then
13235   ac_cv_lib_c_crypt=yes
13236 else
13237   echo "$as_me: failed program was:" >&5
13238 sed 's/^/| /' conftest.$ac_ext >&5
13239
13240 ac_cv_lib_c_crypt=no
13241 fi
13242 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13243 LIBS=$ac_check_lib_save_LIBS
13244 fi
13245 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
13246 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
13247 if test $ac_cv_lib_c_crypt = yes; then
13248   have_crypt=yes
13249 fi
13250
13251   if test "$have_crypt" = no ; then
13252     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
13253 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
13254 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
13255   echo $ECHO_N "(cached) $ECHO_C" >&6
13256 else
13257   ac_check_lib_save_LIBS=$LIBS
13258 LIBS="-lcrypt  $LIBS"
13259 cat >conftest.$ac_ext <<_ACEOF
13260 #line $LINENO "configure"
13261 /* confdefs.h.  */
13262 _ACEOF
13263 cat confdefs.h >>conftest.$ac_ext
13264 cat >>conftest.$ac_ext <<_ACEOF
13265 /* end confdefs.h.  */
13266
13267 /* Override any gcc2 internal prototype to avoid an error.  */
13268 #ifdef __cplusplus
13269 extern "C"
13270 #endif
13271 /* We use char because int might match the return type of a gcc2
13272    builtin and then its argument prototype would still apply.  */
13273 char crypt ();
13274 int
13275 main ()
13276 {
13277 crypt ();
13278   ;
13279   return 0;
13280 }
13281 _ACEOF
13282 rm -f conftest.$ac_objext conftest$ac_exeext
13283 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13284   (eval $ac_link) 2>&5
13285   ac_status=$?
13286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13287   (exit $ac_status); } &&
13288          { ac_try='test -s conftest$ac_exeext'
13289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13290   (eval $ac_try) 2>&5
13291   ac_status=$?
13292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13293   (exit $ac_status); }; }; then
13294   ac_cv_lib_crypt_crypt=yes
13295 else
13296   echo "$as_me: failed program was:" >&5
13297 sed 's/^/| /' conftest.$ac_ext >&5
13298
13299 ac_cv_lib_crypt_crypt=no
13300 fi
13301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13302 LIBS=$ac_check_lib_save_LIBS
13303 fi
13304 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
13305 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
13306 if test $ac_cv_lib_crypt_crypt = yes; then
13307   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
13308 fi
13309
13310   fi
13311 fi
13312
13313
13314 # Most of the above shadow mechanisms will have set need_setuid to yes,
13315 # if they were found.  But, on some systems, we need setuid even when
13316 # using plain old vanilla passwords.
13317 #
13318 if test "$enable_locking" = yes ; then
13319   case "$host" in
13320     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
13321       need_setuid=yes
13322     ;;
13323   esac
13324 fi
13325
13326
13327 if test "$have_shadow_adjunct" = yes ; then
13328   cat >>confdefs.h <<\_ACEOF
13329 #define HAVE_ADJUNCT_PASSWD 1
13330 _ACEOF
13331
13332 elif test "$have_shadow_enhanced" = yes ; then
13333   cat >>confdefs.h <<\_ACEOF
13334 #define HAVE_ENHANCED_PASSWD 1
13335 _ACEOF
13336
13337 elif test "$have_shadow_hpux" = yes ; then
13338   cat >>confdefs.h <<\_ACEOF
13339 #define HAVE_HPUX_PASSWD 1
13340 _ACEOF
13341
13342 elif test "$have_shadow" = yes ; then
13343   cat >>confdefs.h <<\_ACEOF
13344 #define HAVE_SHADOW_PASSWD 1
13345 _ACEOF
13346
13347 fi
13348
13349
13350 ###############################################################################
13351 #
13352 #       Check for external password helper
13353 #       On SuSE, instead of having xscreensaver be a setuid program, they
13354 #       fork an external program that takes the password on stdin, and
13355 #       returns true if that password is a valid one.  Then only that
13356 #       smaller program needs to be setuid.
13357 #
13358 #       (Note that this external program is not a GUI: the GUI is still
13359 #       all in xscreensaver itself; the external program just does auth.)
13360 #
13361 ###############################################################################
13362
13363 have_passwd_helper=no
13364 with_passwd_helper_req=unspecified
13365
13366
13367 # Check whether --with-passwd-helper or --without-passwd-helper was given.
13368 if test "${with_passwd_helper+set}" = set; then
13369   withval="$with_passwd_helper"
13370   with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
13371 else
13372   with_passwd_helper=no
13373 fi;
13374 # no HANDLE_X_PATH_ARG for this one
13375
13376 if test "$enable_locking" = no ; then
13377   with_passwd_helper_req=no
13378   with_passwd_helper=no
13379 fi
13380
13381 case "$with_passwd_helper" in
13382   ""|no) : ;;
13383   /*)
13384     cat >>confdefs.h <<_ACEOF
13385 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
13386 _ACEOF
13387
13388     have_passwd_helper=yes;;
13389   *)
13390     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
13391     exit 1
13392 esac
13393
13394
13395 ###############################################################################
13396 #
13397 #       Check for -lXm.
13398 #
13399 ###############################################################################
13400
13401 have_motif=no
13402 with_motif_req=unspecified
13403
13404 # Check whether --with-motif or --without-motif was given.
13405 if test "${with_motif+set}" = set; then
13406   withval="$with_motif"
13407   with_motif="$withval"; with_motif_req="$withval"
13408 else
13409   with_motif=no
13410 fi;
13411
13412
13413    case "$with_motif" in
13414     yes) ;;
13415     no)  ;;
13416
13417     /*)
13418      echo "$as_me:$LINENO: checking for Motif headers" >&5
13419 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
13420      d=$with_motif/include
13421      if test -d $d; then
13422        X_CFLAGS="-I$d $X_CFLAGS"
13423        echo "$as_me:$LINENO: result: $d" >&5
13424 echo "${ECHO_T}$d" >&6
13425      else
13426        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13427 echo "${ECHO_T}not found ($d: no such directory)" >&6
13428      fi
13429
13430      echo "$as_me:$LINENO: checking for Motif libs" >&5
13431 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
13432      d=$with_motif/lib
13433      if test -d $d; then
13434        X_LIBS="-L$d $X_LIBS"
13435        echo "$as_me:$LINENO: result: $d" >&5
13436 echo "${ECHO_T}$d" >&6
13437      else
13438        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13439 echo "${ECHO_T}not found ($d: no such directory)" >&6
13440      fi
13441
13442      # replace the directory string with "yes".
13443      with_motif_req="yes"
13444      with_motif=$with_motif_req
13445      ;;
13446
13447     *)
13448      echo ""
13449      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
13450      echo "       If it is a directory, then \`DIR/include' will be added to"
13451      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13452      exit 1
13453      ;;
13454    esac
13455
13456
13457 if test "$with_motif" != yes -a "$with_motif" != no ; then
13458   echo "error: must be yes or no: --with-motif=$with_motif"
13459   exit 1
13460 fi
13461
13462 if test "$with_motif" = yes; then
13463   have_motif=no
13464
13465   ac_save_CPPFLAGS="$CPPFLAGS"
13466   if test \! -z "$includedir" ; then
13467     CPPFLAGS="$CPPFLAGS -I$includedir"
13468   fi
13469   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13470   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
13471 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
13472 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
13473   echo $ECHO_N "(cached) $ECHO_C" >&6
13474 else
13475   cat >conftest.$ac_ext <<_ACEOF
13476 #line $LINENO "configure"
13477 /* confdefs.h.  */
13478 _ACEOF
13479 cat confdefs.h >>conftest.$ac_ext
13480 cat >>conftest.$ac_ext <<_ACEOF
13481 /* end confdefs.h.  */
13482 #include <stdlib.h>
13483                      #include <stdio.h>
13484                      #include <X11/Intrinsic.h>
13485
13486 #include <Xm/Xm.h>
13487 _ACEOF
13488 rm -f conftest.$ac_objext
13489 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13490   (eval $ac_compile) 2>&5
13491   ac_status=$?
13492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13493   (exit $ac_status); } &&
13494          { ac_try='test -s conftest.$ac_objext'
13495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13496   (eval $ac_try) 2>&5
13497   ac_status=$?
13498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13499   (exit $ac_status); }; }; then
13500   ac_cv_header_Xm_Xm_h=yes
13501 else
13502   echo "$as_me: failed program was:" >&5
13503 sed 's/^/| /' conftest.$ac_ext >&5
13504
13505 ac_cv_header_Xm_Xm_h=no
13506 fi
13507 rm -f conftest.$ac_objext conftest.$ac_ext
13508 fi
13509 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
13510 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
13511 if test $ac_cv_header_Xm_Xm_h = yes; then
13512   have_motif=yes
13513                      cat >>confdefs.h <<\_ACEOF
13514 #define HAVE_MOTIF 1
13515 _ACEOF
13516
13517                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
13518 fi
13519
13520
13521   CPPFLAGS="$ac_save_CPPFLAGS"
13522 fi
13523
13524
13525 if test "$have_motif" = yes; then
13526
13527   ac_save_CPPFLAGS="$CPPFLAGS"
13528   if test \! -z "$includedir" ; then
13529     CPPFLAGS="$CPPFLAGS -I$includedir"
13530   fi
13531   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13532   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
13533 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
13534 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
13535   echo $ECHO_N "(cached) $ECHO_C" >&6
13536 else
13537   cat >conftest.$ac_ext <<_ACEOF
13538 #line $LINENO "configure"
13539 /* confdefs.h.  */
13540 _ACEOF
13541 cat confdefs.h >>conftest.$ac_ext
13542 cat >>conftest.$ac_ext <<_ACEOF
13543 /* end confdefs.h.  */
13544 #include <stdlib.h>
13545                      #include <stdio.h>
13546                      #include <X11/Intrinsic.h>
13547
13548 #include <Xm/ComboBox.h>
13549 _ACEOF
13550 rm -f conftest.$ac_objext
13551 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13552   (eval $ac_compile) 2>&5
13553   ac_status=$?
13554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13555   (exit $ac_status); } &&
13556          { ac_try='test -s conftest.$ac_objext'
13557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13558   (eval $ac_try) 2>&5
13559   ac_status=$?
13560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13561   (exit $ac_status); }; }; then
13562   ac_cv_header_Xm_ComboBox_h=yes
13563 else
13564   echo "$as_me: failed program was:" >&5
13565 sed 's/^/| /' conftest.$ac_ext >&5
13566
13567 ac_cv_header_Xm_ComboBox_h=no
13568 fi
13569 rm -f conftest.$ac_objext conftest.$ac_ext
13570 fi
13571 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
13572 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
13573 if test $ac_cv_header_Xm_ComboBox_h = yes; then
13574   cat >>confdefs.h <<\_ACEOF
13575 #define HAVE_XMCOMBOBOX 1
13576 _ACEOF
13577
13578 fi
13579
13580
13581   CPPFLAGS="$ac_save_CPPFLAGS"
13582 fi
13583
13584
13585 ###############################################################################
13586 #
13587 #       Check for -lgtk (and Gnome stuff)
13588 #
13589 ###############################################################################
13590
13591 have_gtk=no
13592 have_gtk2=no
13593 with_gtk_req=unspecified
13594
13595 # Check whether --with-gtk or --without-gtk was given.
13596 if test "${with_gtk+set}" = set; then
13597   withval="$with_gtk"
13598   with_gtk="$withval"; with_gtk_req="$withval"
13599 else
13600   with_gtk=yes
13601 fi;
13602
13603 # if --with-gtk=/directory/ was specified, remember that directory so that
13604 # we can also look for the `gtk-config' program in that directory.
13605 case "$with_gtk" in
13606   /*)
13607     gtk_dir="$with_gtk"
13608     ;;
13609   *)
13610     gtk_dir=""
13611     ;;
13612 esac
13613
13614
13615    case "$with_gtk" in
13616     yes) ;;
13617     no)  ;;
13618
13619     /*)
13620      echo "$as_me:$LINENO: checking for Gtk headers" >&5
13621 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
13622      d=$with_gtk/include
13623      if test -d $d; then
13624        X_CFLAGS="-I$d $X_CFLAGS"
13625        echo "$as_me:$LINENO: result: $d" >&5
13626 echo "${ECHO_T}$d" >&6
13627      else
13628        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13629 echo "${ECHO_T}not found ($d: no such directory)" >&6
13630      fi
13631
13632      echo "$as_me:$LINENO: checking for Gtk libs" >&5
13633 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
13634      d=$with_gtk/lib
13635      if test -d $d; then
13636        X_LIBS="-L$d $X_LIBS"
13637        echo "$as_me:$LINENO: result: $d" >&5
13638 echo "${ECHO_T}$d" >&6
13639      else
13640        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13641 echo "${ECHO_T}not found ($d: no such directory)" >&6
13642      fi
13643
13644      # replace the directory string with "yes".
13645      with_gtk_req="yes"
13646      with_gtk=$with_gtk_req
13647      ;;
13648
13649     *)
13650      echo ""
13651      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
13652      echo "       If it is a directory, then \`DIR/include' will be added to"
13653      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13654      exit 1
13655      ;;
13656    esac
13657
13658
13659 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
13660   echo "error: must be yes or no: --with-gtk=$with_gtk"
13661   exit 1
13662 fi
13663
13664 have_gnome=no
13665 with_gnome_req=unspecified
13666
13667 # Check whether --with-gnome or --without-gnome was given.
13668 if test "${with_gnome+set}" = set; then
13669   withval="$with_gnome"
13670   with_gnome="$withval"; with_gnome_req="$withval"
13671 else
13672   with_gnome=yes
13673 fi;
13674
13675 # if --with-gnome=/directory/ was specified, remember that directory so that
13676 # we can also look for the `gnome-config' program in that directory.
13677 case "$with_gnome" in
13678   /*)
13679     gnome_dir="$with_gnome"
13680     ;;
13681   *)
13682     gnome_dir=""
13683     ;;
13684 esac
13685
13686
13687    case "$with_gnome" in
13688     yes) ;;
13689     no)  ;;
13690
13691     /*)
13692      echo "$as_me:$LINENO: checking for Gnome headers" >&5
13693 echo $ECHO_N "checking for Gnome headers... $ECHO_C" >&6
13694      d=$with_gnome/include
13695      if test -d $d; then
13696        X_CFLAGS="-I$d $X_CFLAGS"
13697        echo "$as_me:$LINENO: result: $d" >&5
13698 echo "${ECHO_T}$d" >&6
13699      else
13700        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13701 echo "${ECHO_T}not found ($d: no such directory)" >&6
13702      fi
13703
13704      echo "$as_me:$LINENO: checking for Gnome libs" >&5
13705 echo $ECHO_N "checking for Gnome libs... $ECHO_C" >&6
13706      d=$with_gnome/lib
13707      if test -d $d; then
13708        X_LIBS="-L$d $X_LIBS"
13709        echo "$as_me:$LINENO: result: $d" >&5
13710 echo "${ECHO_T}$d" >&6
13711      else
13712        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13713 echo "${ECHO_T}not found ($d: no such directory)" >&6
13714      fi
13715
13716      # replace the directory string with "yes".
13717      with_gnome_req="yes"
13718      with_gnome=$with_gnome_req
13719      ;;
13720
13721     *)
13722      echo ""
13723      echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
13724      echo "       If it is a directory, then \`DIR/include' will be added to"
13725      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13726      exit 1
13727      ;;
13728    esac
13729
13730
13731 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
13732   echo "error: must be yes or no: --with-gnome=$with_gnome"
13733   exit 1
13734 fi
13735
13736 parse_gtk_version_string() {
13737   # M4 sucks!!
13738
13739   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
13740   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
13741
13742   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
13743   if test -z "$ac_gtk_version"; then
13744     ac_gtk_version=unknown
13745     ac_gtk_version_string=unknown
13746   fi
13747 }
13748
13749
13750 jurassic_gtk=no
13751 gtk2_halfassed=no
13752
13753 if test "$with_gtk" = yes; then
13754   have_gtk=no
13755
13756   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
13757   # look in /foo/bin/ for glib-config, gtk-config, and gnome-config.
13758   #
13759   gtk_path="$PATH"
13760
13761   if test ! -z "$gtk_dir"; then
13762     # canonicalize slashes.
13763     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
13764     gtk_path="$foo:$gtk_path"
13765   fi
13766
13767   if test ! -z "$gnome_dir"; then
13768     # canonicalize slashes.
13769     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
13770     gtk_path="$foo:$gtk_path"
13771   fi
13772
13773   for ac_prog in pkg-config
13774 do
13775   # Extract the first word of "$ac_prog", so it can be a program name with args.
13776 set dummy $ac_prog; ac_word=$2
13777 echo "$as_me:$LINENO: checking for $ac_word" >&5
13778 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13779 if test "${ac_cv_path_pkg_config+set}" = set; then
13780   echo $ECHO_N "(cached) $ECHO_C" >&6
13781 else
13782   case $pkg_config in
13783   [\\/]* | ?:[\\/]*)
13784   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
13785   ;;
13786   *)
13787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13788 for as_dir in $gtk_path
13789 do
13790   IFS=$as_save_IFS
13791   test -z "$as_dir" && as_dir=.
13792   for ac_exec_ext in '' $ac_executable_extensions; do
13793   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13794     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
13795     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13796     break 2
13797   fi
13798 done
13799 done
13800
13801   ;;
13802 esac
13803 fi
13804 pkg_config=$ac_cv_path_pkg_config
13805
13806 if test -n "$pkg_config"; then
13807   echo "$as_me:$LINENO: result: $pkg_config" >&5
13808 echo "${ECHO_T}$pkg_config" >&6
13809 else
13810   echo "$as_me:$LINENO: result: no" >&5
13811 echo "${ECHO_T}no" >&6
13812 fi
13813
13814   test -n "$pkg_config" && break
13815 done
13816
13817
13818   if test -n "$pkg_config" ; then
13819     #
13820     # the new way...
13821     # run pkg-config based tests.
13822     #
13823     pkgs=''
13824     pkg_check_version() {
13825       if test "$ok" = yes ; then
13826         req="$1"
13827         min="$2"
13828         echo "$as_me:$LINENO: checking for $req" >&5
13829 echo $ECHO_N "checking for $req... $ECHO_C" >&6
13830         if $pkg_config --exists "$req" ; then
13831           vers=`$pkg_config --modversion "$req"`
13832           if $pkg_config --exists "$req >= $min" ; then
13833             echo "$as_me:$LINENO: result: $vers" >&5
13834 echo "${ECHO_T}$vers" >&6
13835             pkgs="$pkgs $req"
13836             return 1
13837           else
13838             echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
13839 echo "${ECHO_T}$vers (wanted >= $min)" >&6
13840             ok=no
13841             return 0
13842           fi
13843         else
13844           echo "$as_me:$LINENO: result: no" >&5
13845 echo "${ECHO_T}no" >&6
13846           ok=no
13847           return 0
13848         fi
13849       fi
13850     }
13851
13852     echo "$as_me:$LINENO: result: checking for GTK 2.x with pkg-config based tests..." >&5
13853 echo "${ECHO_T}checking for GTK 2.x with pkg-config based tests..." >&6
13854
13855     ok="yes"
13856     pkg_check_version       gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
13857     pkg_check_version    gmodule-2.0  2.0.0
13858     pkg_check_version     libxml-2.0  2.4.6
13859     pkg_check_version   libglade-2.0  1.99.0
13860 #   pkg_check_version gdk_pixbuf      0.1
13861     have_gtk="$ok"
13862
13863     if test "$have_gtk" = yes; then
13864       have_gtk2=yes
13865       cat >>confdefs.h <<\_ACEOF
13866 #define HAVE_GTK2 1
13867 _ACEOF
13868
13869     else
13870       if test -n "$ac_gtk_version_string" ; then
13871         gtk2_halfassed="$ac_gtk_version_string"
13872         gtk2_halfassed_lib="$req"
13873       fi
13874     fi
13875
13876     if test "$have_gtk" = no; then
13877       #
13878       # we don't have GTK 2.  Let's look for GTK 1.
13879       #
13880       echo "$as_me:$LINENO: result: checking for GTK 1.x with pkg-config based tests..." >&5
13881 echo "${ECHO_T}checking for GTK 1.x with pkg-config based tests..." >&6
13882
13883       pkgs=''
13884       ok="yes"
13885       pkg_check_version gtk+       1.2     ; ac_gtk_version_string="$vers"
13886       pkg_check_version glib       1.0
13887       pkg_check_version gdk_pixbuf 0.1
13888       have_gtk="$ok"
13889
13890       # Now check for Gnome...
13891       #
13892       if test "$have_gtk" = yes -a "$with_gnome" = yes; then
13893         old_pkgs="$pkgs"
13894         ok=yes
13895         pkg_check_version capplet    1.0
13896         pkg_check_version gnomeui    1.0
13897         pkg_check_version gdk_pixbuf 0.1
13898         have_gnome="$ok"
13899
13900         if test "$have_gnome" = no; then
13901           pkgs="$old_pkgs"
13902         else
13903           cat >>confdefs.h <<\_ACEOF
13904 #define HAVE_CRAPPLET 1
13905 _ACEOF
13906
13907         fi
13908       fi
13909     fi
13910
13911     if test "$have_gtk" = yes; then
13912       parse_gtk_version_string
13913       jurassic_gtk=no
13914     else
13915       have_gnome=no
13916     fi
13917
13918     if test "$have_gtk" = yes; then
13919       echo "$as_me:$LINENO: checking for Gtk includes" >&5
13920 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
13921 if test "${ac_cv_gtk_config_cflags+set}" = set; then
13922   echo $ECHO_N "(cached) $ECHO_C" >&6
13923 else
13924   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
13925 fi
13926 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
13927 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
13928       echo "$as_me:$LINENO: checking for Gtk libs" >&5
13929 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
13930 if test "${ac_cv_gtk_config_libs+set}" = set; then
13931   echo $ECHO_N "(cached) $ECHO_C" >&6
13932 else
13933   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
13934 fi
13935 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
13936 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
13937     fi
13938     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
13939     ac_gtk_config_libs=$ac_cv_gtk_config_libs
13940
13941     ac_gnome_config_cflags=$ac_gtk_config_cflags
13942     ac_gnome_config_libs=$ac_gtk_config_libs
13943
13944   else
13945     #
13946     # the old way...
13947     # run {gnome,gtk}-config based tests.
13948     #
13949     echo "$as_me:$LINENO: result: checking for GTK 1.x with gtk-config based tests..." >&5
13950 echo "${ECHO_T}checking for GTK 1.x with gtk-config based tests..." >&6
13951
13952     for ac_prog in glib12-config glib-config
13953 do
13954   # Extract the first word of "$ac_prog", so it can be a program name with args.
13955 set dummy $ac_prog; ac_word=$2
13956 echo "$as_me:$LINENO: checking for $ac_word" >&5
13957 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13958 if test "${ac_cv_path_glib_config+set}" = set; then
13959   echo $ECHO_N "(cached) $ECHO_C" >&6
13960 else
13961   case $glib_config in
13962   [\\/]* | ?:[\\/]*)
13963   ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
13964   ;;
13965   *)
13966   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13967 for as_dir in $gtk_path
13968 do
13969   IFS=$as_save_IFS
13970   test -z "$as_dir" && as_dir=.
13971   for ac_exec_ext in '' $ac_executable_extensions; do
13972   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13973     ac_cv_path_glib_config="$as_dir/$ac_word$ac_exec_ext"
13974     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13975     break 2
13976   fi
13977 done
13978 done
13979
13980   ;;
13981 esac
13982 fi
13983 glib_config=$ac_cv_path_glib_config
13984
13985 if test -n "$glib_config"; then
13986   echo "$as_me:$LINENO: result: $glib_config" >&5
13987 echo "${ECHO_T}$glib_config" >&6
13988 else
13989   echo "$as_me:$LINENO: result: no" >&5
13990 echo "${ECHO_T}no" >&6
13991 fi
13992
13993   test -n "$glib_config" && break
13994 done
13995
13996     for ac_prog in gtk12-config  gtk-config
13997 do
13998   # Extract the first word of "$ac_prog", so it can be a program name with args.
13999 set dummy $ac_prog; ac_word=$2
14000 echo "$as_me:$LINENO: checking for $ac_word" >&5
14001 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14002 if test "${ac_cv_path_gtk_config+set}" = set; then
14003   echo $ECHO_N "(cached) $ECHO_C" >&6
14004 else
14005   case $gtk_config in
14006   [\\/]* | ?:[\\/]*)
14007   ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
14008   ;;
14009   *)
14010   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14011 for as_dir in $gtk_path
14012 do
14013   IFS=$as_save_IFS
14014   test -z "$as_dir" && as_dir=.
14015   for ac_exec_ext in '' $ac_executable_extensions; do
14016   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14017     ac_cv_path_gtk_config="$as_dir/$ac_word$ac_exec_ext"
14018     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14019     break 2
14020   fi
14021 done
14022 done
14023
14024   ;;
14025 esac
14026 fi
14027 gtk_config=$ac_cv_path_gtk_config
14028
14029 if test -n "$gtk_config"; then
14030   echo "$as_me:$LINENO: result: $gtk_config" >&5
14031 echo "${ECHO_T}$gtk_config" >&6
14032 else
14033   echo "$as_me:$LINENO: result: no" >&5
14034 echo "${ECHO_T}no" >&6
14035 fi
14036
14037   test -n "$gtk_config" && break
14038 done
14039
14040
14041     if test "$with_gnome" = yes; then
14042       for ac_prog in gnome-config
14043 do
14044   # Extract the first word of "$ac_prog", so it can be a program name with args.
14045 set dummy $ac_prog; ac_word=$2
14046 echo "$as_me:$LINENO: checking for $ac_word" >&5
14047 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14048 if test "${ac_cv_path_gnome_config+set}" = set; then
14049   echo $ECHO_N "(cached) $ECHO_C" >&6
14050 else
14051   case $gnome_config in
14052   [\\/]* | ?:[\\/]*)
14053   ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
14054   ;;
14055   *)
14056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14057 for as_dir in $gtk_path
14058 do
14059   IFS=$as_save_IFS
14060   test -z "$as_dir" && as_dir=.
14061   for ac_exec_ext in '' $ac_executable_extensions; do
14062   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14063     ac_cv_path_gnome_config="$as_dir/$ac_word$ac_exec_ext"
14064     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14065     break 2
14066   fi
14067 done
14068 done
14069
14070   ;;
14071 esac
14072 fi
14073 gnome_config=$ac_cv_path_gnome_config
14074
14075 if test -n "$gnome_config"; then
14076   echo "$as_me:$LINENO: result: $gnome_config" >&5
14077 echo "${ECHO_T}$gnome_config" >&6
14078 else
14079   echo "$as_me:$LINENO: result: no" >&5
14080 echo "${ECHO_T}no" >&6
14081 fi
14082
14083   test -n "$gnome_config" && break
14084 done
14085
14086     fi
14087
14088     if test -n "$glib_config" -a  -n "$gtk_config" ; then
14089       have_gtk=yes
14090       if test "$with_gnome" = yes -a -n "$gnome_config" ; then
14091         have_gnome=yes
14092       fi
14093     fi
14094
14095     if test "$have_gtk" = yes; then
14096       echo "$as_me:$LINENO: checking Gtk version number" >&5
14097 echo $ECHO_N "checking Gtk version number... $ECHO_C" >&6
14098 if test "${ac_cv_gtk_version_string+set}" = set; then
14099   echo $ECHO_N "(cached) $ECHO_C" >&6
14100 else
14101   ac_cv_gtk_version_string=`$gtk_config --version`
14102 fi
14103 echo "$as_me:$LINENO: result: $ac_cv_gtk_version_string" >&5
14104 echo "${ECHO_T}$ac_cv_gtk_version_string" >&6
14105       ac_gtk_version_string=$ac_cv_gtk_version_string
14106       parse_gtk_version_string
14107     fi
14108
14109     if test "$have_gtk" = yes; then
14110       if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
14111       then
14112         have_gtk=no
14113         have_gnome=no
14114         jurassic_gtk=yes
14115       fi
14116     fi
14117
14118     if test "$have_gtk" = yes; then
14119       echo "$as_me:$LINENO: checking for Gtk includes" >&5
14120 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
14121 if test "${ac_cv_gtk_config_cflags+set}" = set; then
14122   echo $ECHO_N "(cached) $ECHO_C" >&6
14123 else
14124   ac_cv_gtk_config_cflags=`$gtk_config --cflags`
14125 fi
14126 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
14127 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
14128       echo "$as_me:$LINENO: checking for Gtk libs" >&5
14129 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
14130 if test "${ac_cv_gtk_config_libs+set}" = set; then
14131   echo $ECHO_N "(cached) $ECHO_C" >&6
14132 else
14133   ac_cv_gtk_config_libs=`$gtk_config --libs`
14134 fi
14135 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
14136 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
14137     fi
14138     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
14139     ac_gtk_config_libs=$ac_cv_gtk_config_libs
14140
14141     # Check for Gnome Capplet support.
14142     # Note that this is only needed with Gnome 1.x, not Gnome 2.x.
14143     # In a Gnome 2.x world, libcapplet will not exist.
14144     # (In fact, this likely won't even be checked, since in a Gnome 2.x
14145     # world, we will probably be up in the "$pkg_config" branch instead
14146     # of here in the "$gnome_config" branch.)
14147     #
14148     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
14149       gnome_config_libs="gtk capplet gnomeui gdk_pixbuf"
14150       echo "$as_me:$LINENO: checking for Gnome capplet includes" >&5
14151 echo $ECHO_N "checking for Gnome capplet includes... $ECHO_C" >&6
14152       if test "${ac_cv_gnome_config_cflags+set}" = set; then
14153   echo $ECHO_N "(cached) $ECHO_C" >&6
14154 else
14155   if ( $gnome_config --cflags $gnome_config_libs 2>&1 | \
14156               grep Unknown >/dev/null ) ; then
14157            ac_cv_gnome_config_cflags=''
14158          else
14159           ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
14160          fi
14161 fi
14162
14163       ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
14164       if test "$ac_gnome_config_cflags" = "" ; then
14165         have_gnome=no
14166         echo "$as_me:$LINENO: result: no" >&5
14167 echo "${ECHO_T}no" >&6
14168       else
14169         echo "$as_me:$LINENO: result: $ac_gnome_config_cflags" >&5
14170 echo "${ECHO_T}$ac_gnome_config_cflags" >&6
14171       fi
14172     fi
14173
14174     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
14175       echo "$as_me:$LINENO: checking for Gnome capplet libs" >&5
14176 echo $ECHO_N "checking for Gnome capplet libs... $ECHO_C" >&6
14177       if test "${ac_cv_gnome_config_libs+set}" = set; then
14178   echo $ECHO_N "(cached) $ECHO_C" >&6
14179 else
14180   if ( $gnome_config --libs $gnome_config_libs 2>&1 |
14181               grep Unknown >/dev/null ) ; then
14182            ac_cv_gnome_config_libs=''
14183          else
14184            ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
14185          fi
14186 fi
14187
14188       ac_gnome_config_libs=$ac_cv_gnome_config_libs
14189       if test "$ac_gnome_config_libs" = "" ; then
14190         have_gnome=no
14191         echo "$as_me:$LINENO: result: no" >&5
14192 echo "${ECHO_T}no" >&6
14193       else
14194         echo "$as_me:$LINENO: result: $ac_gnome_config_libs" >&5
14195 echo "${ECHO_T}$ac_gnome_config_libs" >&6
14196       fi
14197     fi
14198
14199     # If we have Gnome, then override the gtk-config values with
14200     # the gnome-config values.
14201     #
14202     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
14203       ac_gtk_config_cflags=$ac_gnome_config_cflags
14204       ac_gtk_config_libs=$ac_gnome_config_libs
14205       cat >>confdefs.h <<\_ACEOF
14206 #define HAVE_CRAPPLET 1
14207 _ACEOF
14208
14209     fi
14210
14211   fi   # end of {gnome,gtk}-config based tests
14212
14213   if test "$have_gtk" = yes -a "$have_gtk2" = no; then
14214     # check for this function that was not in libcapplet 1.2.
14215     # (only needed in Gnome/Gtk 1.x, not Gnome/Gtk 2.x)
14216
14217   ac_save_CPPFLAGS="$CPPFLAGS"
14218   ac_save_LDFLAGS="$LDFLAGS"
14219 #  ac_save_LIBS="$LIBS"
14220
14221   if test \! -z "$includedir" ; then
14222     CPPFLAGS="$CPPFLAGS -I$includedir"
14223   fi
14224   # note: $X_CFLAGS includes $x_includes
14225   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14226
14227   if test \! -z "$libdir" ; then
14228     LDFLAGS="$LDFLAGS -L$libdir"
14229   fi
14230   # note: $X_LIBS includes $x_libraries
14231   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14232
14233   echo "$as_me:$LINENO: checking for capplet_widget_changes_are_immediate in -lcapplet" >&5
14234 echo $ECHO_N "checking for capplet_widget_changes_are_immediate in -lcapplet... $ECHO_C" >&6
14235 if test "${ac_cv_lib_capplet_capplet_widget_changes_are_immediate+set}" = set; then
14236   echo $ECHO_N "(cached) $ECHO_C" >&6
14237 else
14238   ac_check_lib_save_LIBS=$LIBS
14239 LIBS="-lcapplet $ac_gnome_config_libs $LIBS"
14240 cat >conftest.$ac_ext <<_ACEOF
14241 #line $LINENO "configure"
14242 /* confdefs.h.  */
14243 _ACEOF
14244 cat confdefs.h >>conftest.$ac_ext
14245 cat >>conftest.$ac_ext <<_ACEOF
14246 /* end confdefs.h.  */
14247
14248 /* Override any gcc2 internal prototype to avoid an error.  */
14249 #ifdef __cplusplus
14250 extern "C"
14251 #endif
14252 /* We use char because int might match the return type of a gcc2
14253    builtin and then its argument prototype would still apply.  */
14254 char capplet_widget_changes_are_immediate ();
14255 int
14256 main ()
14257 {
14258 capplet_widget_changes_are_immediate ();
14259   ;
14260   return 0;
14261 }
14262 _ACEOF
14263 rm -f conftest.$ac_objext conftest$ac_exeext
14264 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14265   (eval $ac_link) 2>&5
14266   ac_status=$?
14267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14268   (exit $ac_status); } &&
14269          { ac_try='test -s conftest$ac_exeext'
14270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14271   (eval $ac_try) 2>&5
14272   ac_status=$?
14273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14274   (exit $ac_status); }; }; then
14275   ac_cv_lib_capplet_capplet_widget_changes_are_immediate=yes
14276 else
14277   echo "$as_me: failed program was:" >&5
14278 sed 's/^/| /' conftest.$ac_ext >&5
14279
14280 ac_cv_lib_capplet_capplet_widget_changes_are_immediate=no
14281 fi
14282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14283 LIBS=$ac_check_lib_save_LIBS
14284 fi
14285 echo "$as_me:$LINENO: result: $ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&5
14286 echo "${ECHO_T}$ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&6
14287 if test $ac_cv_lib_capplet_capplet_widget_changes_are_immediate = yes; then
14288   cat >>confdefs.h <<\_ACEOF
14289 #define HAVE_CRAPPLET_IMMEDIATE 1
14290 _ACEOF
14291
14292 else
14293   true
14294 fi
14295
14296   CPPFLAGS="$ac_save_CPPFLAGS"
14297   LDFLAGS="$ac_save_LDFLAGS"
14298 #  LIBS="$ac_save_LIBS"
14299
14300   fi
14301
14302
14303   GNOME_DATADIR=""
14304   if test "$have_gtk" = yes; then
14305     if test -n "$pkg_config"; then
14306       if test "$have_gtk2" = yes; then
14307         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
14308       else
14309         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+`
14310       fi
14311     else
14312       GNOME_DATADIR=`$gtk_config --prefix`
14313     fi
14314     GNOME_DATADIR="$GNOME_DATADIR/share"
14315   fi
14316
14317   # .desktop files go in different places in Gnome 1.x and Gnome 2.x...
14318   if test "$have_gtk2" = yes; then
14319     GNOME_PANELDIR='$(GNOME_PANELDIR2)'
14320   else
14321     GNOME_PANELDIR='$(GNOME_PANELDIR1)'
14322   fi
14323
14324
14325   if test "$have_gtk" = yes; then
14326     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
14327     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
14328     cat >>confdefs.h <<\_ACEOF
14329 #define HAVE_GTK 1
14330 _ACEOF
14331
14332
14333     if test "$have_gtk2" = yes; then
14334       GTK_EXTRA_OBJS=""
14335     else
14336       GTK_EXTRA_OBJS="\$(GTK_EXTRA_OBJS)"
14337     fi
14338   fi
14339
14340 fi
14341
14342
14343 # Check for the Gnome Help Browser.
14344 #
14345 if test "$have_gtk" = yes; then
14346   for ac_prog in yelp gnome-help-browser
14347 do
14348   # Extract the first word of "$ac_prog", so it can be a program name with args.
14349 set dummy $ac_prog; ac_word=$2
14350 echo "$as_me:$LINENO: checking for $ac_word" >&5
14351 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14352 if test "${ac_cv_prog_have_gnome_help+set}" = set; then
14353   echo $ECHO_N "(cached) $ECHO_C" >&6
14354 else
14355   if test -n "$have_gnome_help"; then
14356   ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
14357 else
14358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14359 for as_dir in $PATH
14360 do
14361   IFS=$as_save_IFS
14362   test -z "$as_dir" && as_dir=.
14363   for ac_exec_ext in '' $ac_executable_extensions; do
14364   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14365     ac_cv_prog_have_gnome_help="$ac_prog"
14366     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14367     break 2
14368   fi
14369 done
14370 done
14371
14372 fi
14373 fi
14374 have_gnome_help=$ac_cv_prog_have_gnome_help
14375 if test -n "$have_gnome_help"; then
14376   echo "$as_me:$LINENO: result: $have_gnome_help" >&5
14377 echo "${ECHO_T}$have_gnome_help" >&6
14378 else
14379   echo "$as_me:$LINENO: result: no" >&5
14380 echo "${ECHO_T}no" >&6
14381 fi
14382
14383   test -n "$have_gnome_help" && break
14384 done
14385 test -n "$have_gnome_help" || have_gnome_help="no"
14386
14387   if test "$have_gnome_help" != no; then
14388     have_gnome_help=yes
14389   fi
14390 fi
14391
14392
14393 ###############################################################################
14394 #
14395 #       Check for -lxml
14396 #
14397 ###############################################################################
14398
14399 have_xml=no
14400 with_xml_req=unspecified
14401 xml_halfassed=no
14402
14403 # Check whether --with-xml or --without-xml was given.
14404 if test "${with_xml+set}" = set; then
14405   withval="$with_xml"
14406   with_xml="$withval"; with_xml_req="$withval"
14407 else
14408   with_xml=yes
14409 fi;
14410
14411 # if --with-xml=/directory/ was specified, remember that directory so that
14412 # we can also look for the `xml-config' program in that directory.
14413 case "$with_xml" in
14414   /*)
14415     xml_dir="$with_xml"
14416     ;;
14417   *)
14418     xml_dir=""
14419     ;;
14420 esac
14421
14422
14423    case "$with_xml" in
14424     yes) ;;
14425     no)  ;;
14426
14427     /*)
14428      echo "$as_me:$LINENO: checking for XML headers" >&5
14429 echo $ECHO_N "checking for XML headers... $ECHO_C" >&6
14430      d=$with_xml/include
14431      if test -d $d; then
14432        X_CFLAGS="-I$d $X_CFLAGS"
14433        echo "$as_me:$LINENO: result: $d" >&5
14434 echo "${ECHO_T}$d" >&6
14435      else
14436        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14437 echo "${ECHO_T}not found ($d: no such directory)" >&6
14438      fi
14439
14440      echo "$as_me:$LINENO: checking for XML libs" >&5
14441 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
14442      d=$with_xml/lib
14443      if test -d $d; then
14444        X_LIBS="-L$d $X_LIBS"
14445        echo "$as_me:$LINENO: result: $d" >&5
14446 echo "${ECHO_T}$d" >&6
14447      else
14448        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14449 echo "${ECHO_T}not found ($d: no such directory)" >&6
14450      fi
14451
14452      # replace the directory string with "yes".
14453      with_xml_req="yes"
14454      with_xml=$with_xml_req
14455      ;;
14456
14457     *)
14458      echo ""
14459      echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory."
14460      echo "       If it is a directory, then \`DIR/include' will be added to"
14461      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14462      exit 1
14463      ;;
14464    esac
14465
14466
14467 if test "$with_xml" != yes -a "$with_xml" != no ; then
14468   echo "error: must be yes or no: --with-xml=$with_xml"
14469   exit 1
14470 fi
14471
14472 if test "$with_xml" = yes; then
14473   have_xml=no
14474   have_old_xml=no
14475
14476   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
14477   # look in /foo/bin/ for for xml-config.
14478   #
14479   xml_path="$PATH"
14480
14481   if test ! -z "$gtk_dir"; then
14482     # canonicalize slashes.
14483     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
14484     xml_path="$foo:$xml_path"
14485   fi
14486
14487   if test ! -z "$gnome_dir"; then
14488     # canonicalize slashes.
14489     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
14490     xml_path="$foo:$xml_path"
14491   fi
14492
14493   if test -n "$pkg_config" ; then
14494     #
14495     # the new way...
14496     # run pkg-config based tests.
14497     #
14498     pkgs=""
14499     ok="yes"
14500
14501     # If we have Gtk 2.x, then *only* XML 2.x will work.
14502     # If we have Gtk 1.x, or don't have Gtk at all, then
14503     # either XML 1.x or 2.x will work.
14504
14505     # First check for XML 2.x.
14506     #
14507     pkg_check_version libxml-2.0 2.4.6
14508
14509     # If that didn't work (we don't have XML 2.x) and we *don't* have
14510     # Gtk 2.x, then check to see if we have XML 1.x
14511     #
14512     if test "$ok" = no -a "$have_gtk2" = no; then
14513       ok=yes
14514       pkg_check_version libxml 1.0
14515     fi
14516
14517     have_xml="$ok"
14518
14519     if test "$have_xml" = yes; then
14520       echo "$as_me:$LINENO: checking for XML includes" >&5
14521 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
14522 if test "${ac_cv_xml_config_cflags+set}" = set; then
14523   echo $ECHO_N "(cached) $ECHO_C" >&6
14524 else
14525   ac_cv_xml_config_cflags=`$pkg_config --cflags $pkgs`
14526 fi
14527 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
14528 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
14529       echo "$as_me:$LINENO: checking for XML libs" >&5
14530 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
14531 if test "${ac_cv_xml_config_libs+set}" = set; then
14532   echo $ECHO_N "(cached) $ECHO_C" >&6
14533 else
14534   ac_cv_xml_config_libs=`$pkg_config --libs $pkgs`
14535 fi
14536 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
14537 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
14538       ac_xml_config_cflags=$ac_cv_xml_config_cflags
14539       ac_xml_config_libs=$ac_cv_xml_config_libs
14540     fi
14541
14542   else
14543     #
14544     # the old way...
14545     # run {xml2,xml}-config based tests.
14546     #
14547
14548     for ac_prog in xml2-config xml-config
14549 do
14550   # Extract the first word of "$ac_prog", so it can be a program name with args.
14551 set dummy $ac_prog; ac_word=$2
14552 echo "$as_me:$LINENO: checking for $ac_word" >&5
14553 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14554 if test "${ac_cv_path_xml_config+set}" = set; then
14555   echo $ECHO_N "(cached) $ECHO_C" >&6
14556 else
14557   case $xml_config in
14558   [\\/]* | ?:[\\/]*)
14559   ac_cv_path_xml_config="$xml_config" # Let the user override the test with a path.
14560   ;;
14561   *)
14562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14563 for as_dir in $xml_path
14564 do
14565   IFS=$as_save_IFS
14566   test -z "$as_dir" && as_dir=.
14567   for ac_exec_ext in '' $ac_executable_extensions; do
14568   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14569     ac_cv_path_xml_config="$as_dir/$ac_word$ac_exec_ext"
14570     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14571     break 2
14572   fi
14573 done
14574 done
14575
14576   ;;
14577 esac
14578 fi
14579 xml_config=$ac_cv_path_xml_config
14580
14581 if test -n "$xml_config"; then
14582   echo "$as_me:$LINENO: result: $xml_config" >&5
14583 echo "${ECHO_T}$xml_config" >&6
14584 else
14585   echo "$as_me:$LINENO: result: no" >&5
14586 echo "${ECHO_T}no" >&6
14587 fi
14588
14589   test -n "$xml_config" && break
14590 done
14591
14592
14593     # If we found the xml-config program, run it to get flags.
14594     #
14595     if test -n "$xml_config" ; then
14596       echo "$as_me:$LINENO: checking for XML includes" >&5
14597 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
14598 if test "${ac_cv_xml_config_cflags+set}" = set; then
14599   echo $ECHO_N "(cached) $ECHO_C" >&6
14600 else
14601   ac_cv_xml_config_cflags=`$xml_config --cflags`
14602 fi
14603 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
14604 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
14605       echo "$as_me:$LINENO: checking for XML libs" >&5
14606 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
14607 if test "${ac_cv_xml_config_libs+set}" = set; then
14608   echo $ECHO_N "(cached) $ECHO_C" >&6
14609 else
14610   ac_cv_xml_config_libs=`$xml_config --libs`
14611 fi
14612 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
14613 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
14614       ac_xml_config_cflags=$ac_cv_xml_config_cflags
14615       ac_xml_config_libs=$ac_cv_xml_config_libs
14616     fi
14617
14618     ac_save_xml_CPPFLAGS="$CPPFLAGS"
14619     CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags"
14620
14621     # first try <libxml/parser.h> which is the new way...
14622     #
14623
14624   ac_save_CPPFLAGS="$CPPFLAGS"
14625   if test \! -z "$includedir" ; then
14626     CPPFLAGS="$CPPFLAGS -I$includedir"
14627   fi
14628   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14629   echo "$as_me:$LINENO: checking for libxml/xmlIO.h" >&5
14630 echo $ECHO_N "checking for libxml/xmlIO.h... $ECHO_C" >&6
14631 if test "${ac_cv_header_libxml_xmlIO_h+set}" = set; then
14632   echo $ECHO_N "(cached) $ECHO_C" >&6
14633 else
14634   cat >conftest.$ac_ext <<_ACEOF
14635 #line $LINENO "configure"
14636 /* confdefs.h.  */
14637 _ACEOF
14638 cat confdefs.h >>conftest.$ac_ext
14639 cat >>conftest.$ac_ext <<_ACEOF
14640 /* end confdefs.h.  */
14641 #include <libxml/parser.h>
14642
14643 #include <libxml/xmlIO.h>
14644 _ACEOF
14645 rm -f conftest.$ac_objext
14646 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14647   (eval $ac_compile) 2>&5
14648   ac_status=$?
14649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14650   (exit $ac_status); } &&
14651          { ac_try='test -s conftest.$ac_objext'
14652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14653   (eval $ac_try) 2>&5
14654   ac_status=$?
14655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14656   (exit $ac_status); }; }; then
14657   ac_cv_header_libxml_xmlIO_h=yes
14658 else
14659   echo "$as_me: failed program was:" >&5
14660 sed 's/^/| /' conftest.$ac_ext >&5
14661
14662 ac_cv_header_libxml_xmlIO_h=no
14663 fi
14664 rm -f conftest.$ac_objext conftest.$ac_ext
14665 fi
14666 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlIO_h" >&5
14667 echo "${ECHO_T}$ac_cv_header_libxml_xmlIO_h" >&6
14668 if test $ac_cv_header_libxml_xmlIO_h = yes; then
14669   have_xml=yes
14670 fi
14671
14672
14673   CPPFLAGS="$ac_save_CPPFLAGS"
14674
14675     # if that didn't work, then try just <parser.h> which is the old way...
14676     #
14677     if test "$have_xml" = no; then
14678
14679   ac_save_CPPFLAGS="$CPPFLAGS"
14680   if test \! -z "$includedir" ; then
14681     CPPFLAGS="$CPPFLAGS -I$includedir"
14682   fi
14683   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14684   echo "$as_me:$LINENO: checking for xmlIO.h" >&5
14685 echo $ECHO_N "checking for xmlIO.h... $ECHO_C" >&6
14686 if test "${ac_cv_header_xmlIO_h+set}" = set; then
14687   echo $ECHO_N "(cached) $ECHO_C" >&6
14688 else
14689   cat >conftest.$ac_ext <<_ACEOF
14690 #line $LINENO "configure"
14691 /* confdefs.h.  */
14692 _ACEOF
14693 cat confdefs.h >>conftest.$ac_ext
14694 cat >>conftest.$ac_ext <<_ACEOF
14695 /* end confdefs.h.  */
14696 #include <parser.h>
14697
14698 #include <xmlIO.h>
14699 _ACEOF
14700 rm -f conftest.$ac_objext
14701 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14702   (eval $ac_compile) 2>&5
14703   ac_status=$?
14704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14705   (exit $ac_status); } &&
14706          { ac_try='test -s conftest.$ac_objext'
14707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14708   (eval $ac_try) 2>&5
14709   ac_status=$?
14710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14711   (exit $ac_status); }; }; then
14712   ac_cv_header_xmlIO_h=yes
14713 else
14714   echo "$as_me: failed program was:" >&5
14715 sed 's/^/| /' conftest.$ac_ext >&5
14716
14717 ac_cv_header_xmlIO_h=no
14718 fi
14719 rm -f conftest.$ac_objext conftest.$ac_ext
14720 fi
14721 echo "$as_me:$LINENO: result: $ac_cv_header_xmlIO_h" >&5
14722 echo "${ECHO_T}$ac_cv_header_xmlIO_h" >&6
14723 if test $ac_cv_header_xmlIO_h = yes; then
14724   have_xml=yes; have_old_xml=yes
14725 fi
14726
14727
14728   CPPFLAGS="$ac_save_CPPFLAGS"
14729     fi
14730
14731     CPPFLAGS="$ac_save_xml_CPPFLAGS"
14732   fi
14733
14734
14735   have_zlib=no
14736   if test "$have_xml" = yes; then
14737     # we have the XML headers; now make sure zlib is around.
14738     # yes, it's stupid we have to do this too, but there is
14739     # dependency screwage in Gnome.
14740
14741   ac_save_CPPFLAGS="$CPPFLAGS"
14742   ac_save_LDFLAGS="$LDFLAGS"
14743 #  ac_save_LIBS="$LIBS"
14744
14745   if test \! -z "$includedir" ; then
14746     CPPFLAGS="$CPPFLAGS -I$includedir"
14747   fi
14748   # note: $X_CFLAGS includes $x_includes
14749   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14750
14751   if test \! -z "$libdir" ; then
14752     LDFLAGS="$LDFLAGS -L$libdir"
14753   fi
14754   # note: $X_LIBS includes $x_libraries
14755   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14756
14757   echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5
14758 echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
14759 if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
14760   echo $ECHO_N "(cached) $ECHO_C" >&6
14761 else
14762   ac_check_lib_save_LIBS=$LIBS
14763 LIBS="-lz  $LIBS"
14764 cat >conftest.$ac_ext <<_ACEOF
14765 #line $LINENO "configure"
14766 /* confdefs.h.  */
14767 _ACEOF
14768 cat confdefs.h >>conftest.$ac_ext
14769 cat >>conftest.$ac_ext <<_ACEOF
14770 /* end confdefs.h.  */
14771
14772 /* Override any gcc2 internal prototype to avoid an error.  */
14773 #ifdef __cplusplus
14774 extern "C"
14775 #endif
14776 /* We use char because int might match the return type of a gcc2
14777    builtin and then its argument prototype would still apply.  */
14778 char zlibVersion ();
14779 int
14780 main ()
14781 {
14782 zlibVersion ();
14783   ;
14784   return 0;
14785 }
14786 _ACEOF
14787 rm -f conftest.$ac_objext conftest$ac_exeext
14788 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14789   (eval $ac_link) 2>&5
14790   ac_status=$?
14791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14792   (exit $ac_status); } &&
14793          { ac_try='test -s conftest$ac_exeext'
14794   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14795   (eval $ac_try) 2>&5
14796   ac_status=$?
14797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14798   (exit $ac_status); }; }; then
14799   ac_cv_lib_z_zlibVersion=yes
14800 else
14801   echo "$as_me: failed program was:" >&5
14802 sed 's/^/| /' conftest.$ac_ext >&5
14803
14804 ac_cv_lib_z_zlibVersion=no
14805 fi
14806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14807 LIBS=$ac_check_lib_save_LIBS
14808 fi
14809 echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5
14810 echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
14811 if test $ac_cv_lib_z_zlibVersion = yes; then
14812   have_zlib=yes
14813 fi
14814
14815   CPPFLAGS="$ac_save_CPPFLAGS"
14816   LDFLAGS="$ac_save_LDFLAGS"
14817 #  LIBS="$ac_save_LIBS"
14818
14819     if test "$have_zlib" = no; then
14820       xml_halfassed=yes
14821       have_xml=no
14822     fi
14823   fi
14824
14825   if test "$have_xml" = yes; then
14826     # we have the header, now check for the library
14827     have_xml=no
14828     xml_halfassed=yes
14829
14830   ac_save_CPPFLAGS="$CPPFLAGS"
14831   ac_save_LDFLAGS="$LDFLAGS"
14832 #  ac_save_LIBS="$LIBS"
14833
14834   if test \! -z "$includedir" ; then
14835     CPPFLAGS="$CPPFLAGS -I$includedir"
14836   fi
14837   # note: $X_CFLAGS includes $x_includes
14838   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14839
14840   if test \! -z "$libdir" ; then
14841     LDFLAGS="$LDFLAGS -L$libdir"
14842   fi
14843   # note: $X_LIBS includes $x_libraries
14844   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14845
14846   echo "$as_me:$LINENO: checking for xmlParseChunk in -lc" >&5
14847 echo $ECHO_N "checking for xmlParseChunk in -lc... $ECHO_C" >&6
14848 if test "${ac_cv_lib_c_xmlParseChunk+set}" = set; then
14849   echo $ECHO_N "(cached) $ECHO_C" >&6
14850 else
14851   ac_check_lib_save_LIBS=$LIBS
14852 LIBS="-lc $ac_xml_config_libs $LIBS"
14853 cat >conftest.$ac_ext <<_ACEOF
14854 #line $LINENO "configure"
14855 /* confdefs.h.  */
14856 _ACEOF
14857 cat confdefs.h >>conftest.$ac_ext
14858 cat >>conftest.$ac_ext <<_ACEOF
14859 /* end confdefs.h.  */
14860
14861 /* Override any gcc2 internal prototype to avoid an error.  */
14862 #ifdef __cplusplus
14863 extern "C"
14864 #endif
14865 /* We use char because int might match the return type of a gcc2
14866    builtin and then its argument prototype would still apply.  */
14867 char xmlParseChunk ();
14868 int
14869 main ()
14870 {
14871 xmlParseChunk ();
14872   ;
14873   return 0;
14874 }
14875 _ACEOF
14876 rm -f conftest.$ac_objext conftest$ac_exeext
14877 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14878   (eval $ac_link) 2>&5
14879   ac_status=$?
14880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14881   (exit $ac_status); } &&
14882          { ac_try='test -s conftest$ac_exeext'
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_cv_lib_c_xmlParseChunk=yes
14889 else
14890   echo "$as_me: failed program was:" >&5
14891 sed 's/^/| /' conftest.$ac_ext >&5
14892
14893 ac_cv_lib_c_xmlParseChunk=no
14894 fi
14895 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14896 LIBS=$ac_check_lib_save_LIBS
14897 fi
14898 echo "$as_me:$LINENO: result: $ac_cv_lib_c_xmlParseChunk" >&5
14899 echo "${ECHO_T}$ac_cv_lib_c_xmlParseChunk" >&6
14900 if test $ac_cv_lib_c_xmlParseChunk = yes; then
14901   have_xml=yes
14902                     xml_halfassed=no
14903                     XML_LIBS="$ac_xml_config_libs"
14904                     cat >>confdefs.h <<\_ACEOF
14905 #define HAVE_XML 1
14906 _ACEOF
14907
14908 else
14909   true
14910 fi
14911
14912   CPPFLAGS="$ac_save_CPPFLAGS"
14913   LDFLAGS="$ac_save_LDFLAGS"
14914 #  LIBS="$ac_save_LIBS"
14915
14916   fi
14917
14918   if test "$have_xml" = yes; then
14919     INCLUDES="$INCLUDES $ac_xml_config_cflags"
14920     GTK_LIBS="$GTK_LIBS $ac_xml_config_libs"
14921     cat >>confdefs.h <<\_ACEOF
14922 #define HAVE_XML 1
14923 _ACEOF
14924
14925     if test "$have_old_xml" = yes; then
14926       cat >>confdefs.h <<\_ACEOF
14927 #define HAVE_OLD_XML_HEADERS 1
14928 _ACEOF
14929
14930     fi
14931   fi
14932
14933 fi
14934
14935
14936 ###############################################################################
14937 #
14938 #       Checking whether Motif is really Lesstif.
14939 #
14940 ###############################################################################
14941
14942 have_lesstif=no
14943 if test "$have_motif" = yes ; then
14944   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
14945 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
14946 if test "${ac_cv_have_lesstif+set}" = set; then
14947   echo $ECHO_N "(cached) $ECHO_C" >&6
14948 else
14949
14950   ac_save_CPPFLAGS="$CPPFLAGS"
14951   if test \! -z "$includedir" ; then
14952     CPPFLAGS="$CPPFLAGS -I$includedir"
14953   fi
14954   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14955   cat >conftest.$ac_ext <<_ACEOF
14956 #line $LINENO "configure"
14957 /* confdefs.h.  */
14958 _ACEOF
14959 cat confdefs.h >>conftest.$ac_ext
14960 cat >>conftest.$ac_ext <<_ACEOF
14961 /* end confdefs.h.  */
14962 #include <Xm/Xm.h>
14963 int
14964 main ()
14965 {
14966 long vers = LesstifVersion;
14967   ;
14968   return 0;
14969 }
14970 _ACEOF
14971 rm -f conftest.$ac_objext
14972 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14973   (eval $ac_compile) 2>&5
14974   ac_status=$?
14975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14976   (exit $ac_status); } &&
14977          { ac_try='test -s conftest.$ac_objext'
14978   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14979   (eval $ac_try) 2>&5
14980   ac_status=$?
14981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14982   (exit $ac_status); }; }; then
14983   ac_cv_have_lesstif=yes
14984 else
14985   echo "$as_me: failed program was:" >&5
14986 sed 's/^/| /' conftest.$ac_ext >&5
14987
14988 ac_cv_have_lesstif=no
14989 fi
14990 rm -f conftest.$ac_objext conftest.$ac_ext
14991   CPPFLAGS="$ac_save_CPPFLAGS"
14992 fi
14993 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
14994 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
14995   have_lesstif=$ac_cv_have_lesstif
14996 fi
14997
14998
14999 lesstif_version=unknown
15000 lesstif_version_string=unknown
15001
15002 if test "$have_lesstif" = yes ; then
15003   ltv=unknown
15004   echo unknown > conftest-lt
15005   echo "$as_me:$LINENO: checking LessTif version number" >&5
15006 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
15007 if test "${ac_cv_lesstif_version_string+set}" = set; then
15008   echo $ECHO_N "(cached) $ECHO_C" >&6
15009 else
15010
15011   ac_save_CPPFLAGS="$CPPFLAGS"
15012   if test \! -z "$includedir" ; then
15013     CPPFLAGS="$CPPFLAGS -I$includedir"
15014   fi
15015   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15016   if test "$cross_compiling" = yes; then
15017   ac_cv_lesstif_version=unknown
15018                      ac_cv_lesstif_version_string=unknown
15019 else
15020   cat >conftest.$ac_ext <<_ACEOF
15021 #line $LINENO "configure"
15022 /* confdefs.h.  */
15023 _ACEOF
15024 cat confdefs.h >>conftest.$ac_ext
15025 cat >>conftest.$ac_ext <<_ACEOF
15026 /* end confdefs.h.  */
15027 #include <stdio.h>
15028                      #include <Xm/Xm.h>
15029                      int main() {
15030                        FILE *f = fopen("conftest-lt", "w");
15031                        if (!f) exit(1);
15032                        fprintf(f, "%d %d.%d\n", LesstifVersion,
15033                           LESSTIF_VERSION, LESSTIF_REVISION);
15034                        fclose(f);
15035                        exit(0);
15036                      }
15037 _ACEOF
15038 rm -f conftest$ac_exeext
15039 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15040   (eval $ac_link) 2>&5
15041   ac_status=$?
15042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15043   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15045   (eval $ac_try) 2>&5
15046   ac_status=$?
15047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15048   (exit $ac_status); }; }; then
15049   ltv=`cat conftest-lt`
15050                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
15051                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
15052 else
15053   echo "$as_me: program exited with status $ac_status" >&5
15054 echo "$as_me: failed program was:" >&5
15055 sed 's/^/| /' conftest.$ac_ext >&5
15056
15057 ( exit $ac_status )
15058 ac_cv_lesstif_version=unknown
15059                      ac_cv_lesstif_version_string=unknown
15060 fi
15061 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15062 fi
15063   CPPFLAGS="$ac_save_CPPFLAGS"
15064 fi
15065 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
15066 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
15067   rm -f conftest-lt
15068   lesstif_version=$ac_cv_lesstif_version
15069   lesstif_version_string=$ac_cv_lesstif_version_string
15070
15071 fi
15072
15073
15074 if test "$have_motif" = yes ; then
15075   mtv=unknown
15076   echo unknown > conftest-mt
15077   echo "$as_me:$LINENO: checking Motif version number" >&5
15078 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
15079 if test "${ac_cv_motif_version_string+set}" = set; then
15080   echo $ECHO_N "(cached) $ECHO_C" >&6
15081 else
15082
15083   ac_save_CPPFLAGS="$CPPFLAGS"
15084   if test \! -z "$includedir" ; then
15085     CPPFLAGS="$CPPFLAGS -I$includedir"
15086   fi
15087   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15088   if test "$cross_compiling" = yes; then
15089   ac_cv_motif_version=unknown
15090                      ac_cv_motif_version_string=unknown
15091 else
15092   cat >conftest.$ac_ext <<_ACEOF
15093 #line $LINENO "configure"
15094 /* confdefs.h.  */
15095 _ACEOF
15096 cat confdefs.h >>conftest.$ac_ext
15097 cat >>conftest.$ac_ext <<_ACEOF
15098 /* end confdefs.h.  */
15099 #include <stdio.h>
15100                      #include <Xm/Xm.h>
15101                      int main() {
15102                        FILE *f = fopen("conftest-mt", "w");
15103                        if (!f) exit(1);
15104                        fprintf(f, "%d %d.%d\n", XmVersion,
15105                           XmVERSION, XmREVISION);
15106                        fclose(f);
15107                        exit(0);
15108                      }
15109 _ACEOF
15110 rm -f conftest$ac_exeext
15111 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15112   (eval $ac_link) 2>&5
15113   ac_status=$?
15114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15115   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15117   (eval $ac_try) 2>&5
15118   ac_status=$?
15119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15120   (exit $ac_status); }; }; then
15121   mtv=`cat conftest-mt`
15122                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
15123                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
15124 else
15125   echo "$as_me: program exited with status $ac_status" >&5
15126 echo "$as_me: failed program was:" >&5
15127 sed 's/^/| /' conftest.$ac_ext >&5
15128
15129 ( exit $ac_status )
15130 ac_cv_motif_version=unknown
15131                      ac_cv_motif_version_string=unknown
15132 fi
15133 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15134 fi
15135   CPPFLAGS="$ac_save_CPPFLAGS"
15136 fi
15137 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
15138 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
15139   rm -f conftest-mt
15140   motif_version=$ac_cv_motif_version
15141   motif_version_string=$ac_cv_motif_version_string
15142
15143 fi
15144
15145
15146 ###############################################################################
15147 #
15148 #       Checking whether Motif requires -lXpm.
15149 #
15150 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
15151 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
15152 #       of the library whether to build the XPM code into libXm, or whether
15153 #       to rely on an external libXm.  So the only way to tell whether XPM is
15154 #       a link-time requirement is to examine libXm.a, which is very
15155 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
15156 #       always link against XPM if the XPM lib exists (and this will be a
15157 #       no-op if libXm happens to already have the XPM code in it.)
15158 #
15159 ###############################################################################
15160
15161 motif_requires_xpm=no
15162 if test "$have_motif" = yes ; then
15163    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
15164 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
15165    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
15166    then
15167      motif_requires_xpm=yes
15168      echo "$as_me:$LINENO: result: maybe" >&5
15169 echo "${ECHO_T}maybe" >&6
15170    else
15171      echo "$as_me:$LINENO: result: no" >&5
15172 echo "${ECHO_T}no" >&6
15173    fi
15174 fi
15175
15176
15177 ###############################################################################
15178 #
15179 #       Checking whether Motif requires -lXp.
15180 #
15181 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
15182 #       Extension".   Why this extension isn't in -lXext with all the others,
15183 #       I have no idea.
15184 #
15185 ###############################################################################
15186
15187 have_xp_ext=no
15188 if test "$have_motif" = yes ; then
15189    have_xp_ext=no
15190
15191   ac_save_CPPFLAGS="$CPPFLAGS"
15192   ac_save_LDFLAGS="$LDFLAGS"
15193 #  ac_save_LIBS="$LIBS"
15194
15195   if test \! -z "$includedir" ; then
15196     CPPFLAGS="$CPPFLAGS -I$includedir"
15197   fi
15198   # note: $X_CFLAGS includes $x_includes
15199   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15200
15201   if test \! -z "$libdir" ; then
15202     LDFLAGS="$LDFLAGS -L$libdir"
15203   fi
15204   # note: $X_LIBS includes $x_libraries
15205   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15206
15207   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
15208 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
15209 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
15210   echo $ECHO_N "(cached) $ECHO_C" >&6
15211 else
15212   ac_check_lib_save_LIBS=$LIBS
15213 LIBS="-lXp -lX11 -lXext -lm $LIBS"
15214 cat >conftest.$ac_ext <<_ACEOF
15215 #line $LINENO "configure"
15216 /* confdefs.h.  */
15217 _ACEOF
15218 cat confdefs.h >>conftest.$ac_ext
15219 cat >>conftest.$ac_ext <<_ACEOF
15220 /* end confdefs.h.  */
15221
15222 /* Override any gcc2 internal prototype to avoid an error.  */
15223 #ifdef __cplusplus
15224 extern "C"
15225 #endif
15226 /* We use char because int might match the return type of a gcc2
15227    builtin and then its argument prototype would still apply.  */
15228 char XpQueryExtension ();
15229 int
15230 main ()
15231 {
15232 XpQueryExtension ();
15233   ;
15234   return 0;
15235 }
15236 _ACEOF
15237 rm -f conftest.$ac_objext conftest$ac_exeext
15238 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15239   (eval $ac_link) 2>&5
15240   ac_status=$?
15241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15242   (exit $ac_status); } &&
15243          { ac_try='test -s conftest$ac_exeext'
15244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15245   (eval $ac_try) 2>&5
15246   ac_status=$?
15247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15248   (exit $ac_status); }; }; then
15249   ac_cv_lib_Xp_XpQueryExtension=yes
15250 else
15251   echo "$as_me: failed program was:" >&5
15252 sed 's/^/| /' conftest.$ac_ext >&5
15253
15254 ac_cv_lib_Xp_XpQueryExtension=no
15255 fi
15256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15257 LIBS=$ac_check_lib_save_LIBS
15258 fi
15259 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
15260 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
15261 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
15262   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
15263 else
15264   true
15265 fi
15266
15267   CPPFLAGS="$ac_save_CPPFLAGS"
15268   LDFLAGS="$ac_save_LDFLAGS"
15269 #  LIBS="$ac_save_LIBS"
15270
15271 fi
15272
15273
15274 ###############################################################################
15275 #
15276 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
15277 #
15278 ###############################################################################
15279
15280 have_xintl=no
15281 if test "$have_motif" = yes ; then
15282
15283   ac_save_CPPFLAGS="$CPPFLAGS"
15284   ac_save_LDFLAGS="$LDFLAGS"
15285 #  ac_save_LIBS="$LIBS"
15286
15287   if test \! -z "$includedir" ; then
15288     CPPFLAGS="$CPPFLAGS -I$includedir"
15289   fi
15290   # note: $X_CFLAGS includes $x_includes
15291   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15292
15293   if test \! -z "$libdir" ; then
15294     LDFLAGS="$LDFLAGS -L$libdir"
15295   fi
15296   # note: $X_LIBS includes $x_libraries
15297   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15298
15299   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
15300 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
15301 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
15302   echo $ECHO_N "(cached) $ECHO_C" >&6
15303 else
15304   ac_check_lib_save_LIBS=$LIBS
15305 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
15306 cat >conftest.$ac_ext <<_ACEOF
15307 #line $LINENO "configure"
15308 /* confdefs.h.  */
15309 _ACEOF
15310 cat confdefs.h >>conftest.$ac_ext
15311 cat >>conftest.$ac_ext <<_ACEOF
15312 /* end confdefs.h.  */
15313
15314 /* Override any gcc2 internal prototype to avoid an error.  */
15315 #ifdef __cplusplus
15316 extern "C"
15317 #endif
15318 /* We use char because int might match the return type of a gcc2
15319    builtin and then its argument prototype would still apply.  */
15320 char _Xsetlocale ();
15321 int
15322 main ()
15323 {
15324 _Xsetlocale ();
15325   ;
15326   return 0;
15327 }
15328 _ACEOF
15329 rm -f conftest.$ac_objext conftest$ac_exeext
15330 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15331   (eval $ac_link) 2>&5
15332   ac_status=$?
15333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15334   (exit $ac_status); } &&
15335          { ac_try='test -s conftest$ac_exeext'
15336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15337   (eval $ac_try) 2>&5
15338   ac_status=$?
15339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15340   (exit $ac_status); }; }; then
15341   ac_cv_lib_Xintl__Xsetlocale=yes
15342 else
15343   echo "$as_me: failed program was:" >&5
15344 sed 's/^/| /' conftest.$ac_ext >&5
15345
15346 ac_cv_lib_Xintl__Xsetlocale=no
15347 fi
15348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15349 LIBS=$ac_check_lib_save_LIBS
15350 fi
15351 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
15352 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
15353 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
15354   have_xintl=yes
15355 else
15356   have_xintl=no
15357 fi
15358
15359   CPPFLAGS="$ac_save_CPPFLAGS"
15360   LDFLAGS="$ac_save_LDFLAGS"
15361 #  LIBS="$ac_save_LIBS"
15362
15363   if test "$have_xintl" = yes; then
15364     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
15365   fi
15366 fi
15367
15368
15369 ###############################################################################
15370 #
15371 #       Check for -lGL or -lMesaGL.
15372 #
15373 ###############################################################################
15374
15375 have_gl=no
15376 ac_have_mesa_gl=no
15377 with_gl_req=unspecified
15378 gl_halfassed=no
15379
15380 # Check whether --with-gl or --without-gl was given.
15381 if test "${with_gl+set}" = set; then
15382   withval="$with_gl"
15383   with_gl="$withval"; with_gl_req="$withval"
15384 else
15385   with_gl=yes
15386 fi;
15387
15388
15389    case "$with_gl" in
15390     yes) ;;
15391     no)  ;;
15392
15393     /*)
15394      echo "$as_me:$LINENO: checking for GL headers" >&5
15395 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
15396      d=$with_gl/include
15397      if test -d $d; then
15398        X_CFLAGS="-I$d $X_CFLAGS"
15399        echo "$as_me:$LINENO: result: $d" >&5
15400 echo "${ECHO_T}$d" >&6
15401      else
15402        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15403 echo "${ECHO_T}not found ($d: no such directory)" >&6
15404      fi
15405
15406      echo "$as_me:$LINENO: checking for GL libs" >&5
15407 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
15408      d=$with_gl/lib
15409      if test -d $d; then
15410        X_LIBS="-L$d $X_LIBS"
15411        echo "$as_me:$LINENO: result: $d" >&5
15412 echo "${ECHO_T}$d" >&6
15413      else
15414        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15415 echo "${ECHO_T}not found ($d: no such directory)" >&6
15416      fi
15417
15418      # replace the directory string with "yes".
15419      with_gl_req="yes"
15420      with_gl=$with_gl_req
15421      ;;
15422
15423     *)
15424      echo ""
15425      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
15426      echo "       If it is a directory, then \`DIR/include' will be added to"
15427      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15428      exit 1
15429      ;;
15430    esac
15431
15432
15433 ac_mesagl_version=unknown
15434 ac_mesagl_version_string=unknown
15435
15436 if test "$with_gl" = yes; then
15437
15438   ac_save_CPPFLAGS="$CPPFLAGS"
15439   if test \! -z "$includedir" ; then
15440     CPPFLAGS="$CPPFLAGS -I$includedir"
15441   fi
15442   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15443   if test "${ac_cv_header_GL_gl_h+set}" = set; then
15444   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15445 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15446 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15447   echo $ECHO_N "(cached) $ECHO_C" >&6
15448 fi
15449 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15450 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15451 else
15452   # Is the header compilable?
15453 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
15454 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
15455 cat >conftest.$ac_ext <<_ACEOF
15456 #line $LINENO "configure"
15457 /* confdefs.h.  */
15458 _ACEOF
15459 cat confdefs.h >>conftest.$ac_ext
15460 cat >>conftest.$ac_ext <<_ACEOF
15461 /* end confdefs.h.  */
15462 $ac_includes_default
15463 #include <GL/gl.h>
15464 _ACEOF
15465 rm -f conftest.$ac_objext
15466 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15467   (eval $ac_compile) 2>&5
15468   ac_status=$?
15469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15470   (exit $ac_status); } &&
15471          { ac_try='test -s conftest.$ac_objext'
15472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15473   (eval $ac_try) 2>&5
15474   ac_status=$?
15475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15476   (exit $ac_status); }; }; then
15477   ac_header_compiler=yes
15478 else
15479   echo "$as_me: failed program was:" >&5
15480 sed 's/^/| /' conftest.$ac_ext >&5
15481
15482 ac_header_compiler=no
15483 fi
15484 rm -f conftest.$ac_objext conftest.$ac_ext
15485 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15486 echo "${ECHO_T}$ac_header_compiler" >&6
15487
15488 # Is the header present?
15489 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
15490 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
15491 cat >conftest.$ac_ext <<_ACEOF
15492 #line $LINENO "configure"
15493 /* confdefs.h.  */
15494 _ACEOF
15495 cat confdefs.h >>conftest.$ac_ext
15496 cat >>conftest.$ac_ext <<_ACEOF
15497 /* end confdefs.h.  */
15498 #include <GL/gl.h>
15499 _ACEOF
15500 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15501   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15502   ac_status=$?
15503   grep -v '^ *+' conftest.er1 >conftest.err
15504   rm -f conftest.er1
15505   cat conftest.err >&5
15506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15507   (exit $ac_status); } >/dev/null; then
15508   if test -s conftest.err; then
15509     ac_cpp_err=$ac_c_preproc_warn_flag
15510   else
15511     ac_cpp_err=
15512   fi
15513 else
15514   ac_cpp_err=yes
15515 fi
15516 if test -z "$ac_cpp_err"; then
15517   ac_header_preproc=yes
15518 else
15519   echo "$as_me: failed program was:" >&5
15520 sed 's/^/| /' conftest.$ac_ext >&5
15521
15522   ac_header_preproc=no
15523 fi
15524 rm -f conftest.err conftest.$ac_ext
15525 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15526 echo "${ECHO_T}$ac_header_preproc" >&6
15527
15528 # So?  What about this header?
15529 case $ac_header_compiler:$ac_header_preproc in
15530   yes:no )
15531     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
15532 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15533     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
15534 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
15535     (
15536       cat <<\_ASBOX
15537 ## ------------------------------------ ##
15538 ## Report this to bug-autoconf@gnu.org. ##
15539 ## ------------------------------------ ##
15540 _ASBOX
15541     ) |
15542       sed "s/^/$as_me: WARNING:     /" >&2
15543     ;;
15544   no:yes )
15545     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
15546 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
15547     { echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5
15548 echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;}
15549     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
15550 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
15551     (
15552       cat <<\_ASBOX
15553 ## ------------------------------------ ##
15554 ## Report this to bug-autoconf@gnu.org. ##
15555 ## ------------------------------------ ##
15556 _ASBOX
15557     ) |
15558       sed "s/^/$as_me: WARNING:     /" >&2
15559     ;;
15560 esac
15561 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15562 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15563 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15564   echo $ECHO_N "(cached) $ECHO_C" >&6
15565 else
15566   ac_cv_header_GL_gl_h=$ac_header_preproc
15567 fi
15568 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15569 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15570
15571 fi
15572 if test $ac_cv_header_GL_gl_h = yes; then
15573   have_gl=yes
15574 else
15575   have_gl=no
15576 fi
15577
15578
15579   CPPFLAGS="$ac_save_CPPFLAGS"
15580   if test "$have_gl" = yes ; then
15581
15582   ac_save_CPPFLAGS="$CPPFLAGS"
15583   if test \! -z "$includedir" ; then
15584     CPPFLAGS="$CPPFLAGS -I$includedir"
15585   fi
15586   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15587   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
15588 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
15589 if test "${ac_cv_header_GL_glx_h+set}" = set; then
15590   echo $ECHO_N "(cached) $ECHO_C" >&6
15591 else
15592   cat >conftest.$ac_ext <<_ACEOF
15593 #line $LINENO "configure"
15594 /* confdefs.h.  */
15595 _ACEOF
15596 cat confdefs.h >>conftest.$ac_ext
15597 cat >>conftest.$ac_ext <<_ACEOF
15598 /* end confdefs.h.  */
15599 #include <GL/gl.h>
15600
15601 #include <GL/glx.h>
15602 _ACEOF
15603 rm -f conftest.$ac_objext
15604 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15605   (eval $ac_compile) 2>&5
15606   ac_status=$?
15607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15608   (exit $ac_status); } &&
15609          { ac_try='test -s conftest.$ac_objext'
15610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15611   (eval $ac_try) 2>&5
15612   ac_status=$?
15613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15614   (exit $ac_status); }; }; then
15615   ac_cv_header_GL_glx_h=yes
15616 else
15617   echo "$as_me: failed program was:" >&5
15618 sed 's/^/| /' conftest.$ac_ext >&5
15619
15620 ac_cv_header_GL_glx_h=no
15621 fi
15622 rm -f conftest.$ac_objext conftest.$ac_ext
15623 fi
15624 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
15625 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
15626 if test $ac_cv_header_GL_glx_h = yes; then
15627   have_gl=yes
15628 else
15629   have_gl=no
15630 fi
15631
15632
15633   CPPFLAGS="$ac_save_CPPFLAGS"
15634   fi
15635
15636   # If we have the headers, try and figure out which vendor it's from.
15637   #
15638   if test "$have_gl" = yes ; then
15639
15640     # We need to know whether it's MesaGL so that we know which libraries
15641     # to link against.
15642     #
15643     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
15644 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
15645 if test "${ac_cv_have_mesa_gl+set}" = set; then
15646   echo $ECHO_N "(cached) $ECHO_C" >&6
15647 else
15648   ac_cv_have_mesa_gl=no
15649
15650   ac_save_CPPFLAGS="$CPPFLAGS"
15651   if test \! -z "$includedir" ; then
15652     CPPFLAGS="$CPPFLAGS -I$includedir"
15653   fi
15654   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15655   cat >conftest.$ac_ext <<_ACEOF
15656 #line $LINENO "configure"
15657 /* confdefs.h.  */
15658 _ACEOF
15659 cat confdefs.h >>conftest.$ac_ext
15660 cat >>conftest.$ac_ext <<_ACEOF
15661 /* end confdefs.h.  */
15662 #include <GL/glx.h>
15663
15664 _ACEOF
15665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15666   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
15667   ac_cv_have_mesa_gl=yes
15668 fi
15669 rm -f conftest*
15670
15671   CPPFLAGS="$ac_save_CPPFLAGS"
15672
15673 fi
15674 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
15675 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
15676     ac_have_mesa_gl=$ac_cv_have_mesa_gl
15677
15678
15679     gl_lib_1=""
15680     GL_LIBS=""
15681
15682
15683     # Some versions of MesaGL are compiled to require -lpthread.
15684     # So if the Mesa headers exist, and -lpthread exists, then always
15685     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
15686     #
15687     if test "$ac_have_mesa_gl" = yes; then
15688       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15689 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
15690 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
15691   echo $ECHO_N "(cached) $ECHO_C" >&6
15692 else
15693   ac_check_lib_save_LIBS=$LIBS
15694 LIBS="-lpthread  $LIBS"
15695 cat >conftest.$ac_ext <<_ACEOF
15696 #line $LINENO "configure"
15697 /* confdefs.h.  */
15698 _ACEOF
15699 cat confdefs.h >>conftest.$ac_ext
15700 cat >>conftest.$ac_ext <<_ACEOF
15701 /* end confdefs.h.  */
15702
15703 /* Override any gcc2 internal prototype to avoid an error.  */
15704 #ifdef __cplusplus
15705 extern "C"
15706 #endif
15707 /* We use char because int might match the return type of a gcc2
15708    builtin and then its argument prototype would still apply.  */
15709 char pthread_create ();
15710 int
15711 main ()
15712 {
15713 pthread_create ();
15714   ;
15715   return 0;
15716 }
15717 _ACEOF
15718 rm -f conftest.$ac_objext conftest$ac_exeext
15719 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15720   (eval $ac_link) 2>&5
15721   ac_status=$?
15722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15723   (exit $ac_status); } &&
15724          { ac_try='test -s conftest$ac_exeext'
15725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15726   (eval $ac_try) 2>&5
15727   ac_status=$?
15728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15729   (exit $ac_status); }; }; then
15730   ac_cv_lib_pthread_pthread_create=yes
15731 else
15732   echo "$as_me: failed program was:" >&5
15733 sed 's/^/| /' conftest.$ac_ext >&5
15734
15735 ac_cv_lib_pthread_pthread_create=no
15736 fi
15737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15738 LIBS=$ac_check_lib_save_LIBS
15739 fi
15740 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
15741 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
15742 if test $ac_cv_lib_pthread_pthread_create = yes; then
15743   GL_LIBS="-lpthread"
15744 fi
15745
15746     fi
15747
15748
15749     # If we have Mesa headers, check to see if we can link against -lMesaGL.
15750     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
15751     # Else, warn that GL is busted.  (We have the headers, but no libs.)
15752     #
15753
15754     if test "$ac_have_mesa_gl" = yes ; then
15755
15756   ac_save_CPPFLAGS="$CPPFLAGS"
15757   ac_save_LDFLAGS="$LDFLAGS"
15758 #  ac_save_LIBS="$LIBS"
15759
15760   if test \! -z "$includedir" ; then
15761     CPPFLAGS="$CPPFLAGS -I$includedir"
15762   fi
15763   # note: $X_CFLAGS includes $x_includes
15764   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15765
15766   if test \! -z "$libdir" ; then
15767     LDFLAGS="$LDFLAGS -L$libdir"
15768   fi
15769   # note: $X_LIBS includes $x_libraries
15770   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15771
15772   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
15773 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
15774 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
15775   echo $ECHO_N "(cached) $ECHO_C" >&6
15776 else
15777   ac_check_lib_save_LIBS=$LIBS
15778 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
15779 cat >conftest.$ac_ext <<_ACEOF
15780 #line $LINENO "configure"
15781 /* confdefs.h.  */
15782 _ACEOF
15783 cat confdefs.h >>conftest.$ac_ext
15784 cat >>conftest.$ac_ext <<_ACEOF
15785 /* end confdefs.h.  */
15786
15787 /* Override any gcc2 internal prototype to avoid an error.  */
15788 #ifdef __cplusplus
15789 extern "C"
15790 #endif
15791 /* We use char because int might match the return type of a gcc2
15792    builtin and then its argument prototype would still apply.  */
15793 char glXCreateContext ();
15794 int
15795 main ()
15796 {
15797 glXCreateContext ();
15798   ;
15799   return 0;
15800 }
15801 _ACEOF
15802 rm -f conftest.$ac_objext conftest$ac_exeext
15803 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15804   (eval $ac_link) 2>&5
15805   ac_status=$?
15806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15807   (exit $ac_status); } &&
15808          { ac_try='test -s conftest$ac_exeext'
15809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15810   (eval $ac_try) 2>&5
15811   ac_status=$?
15812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15813   (exit $ac_status); }; }; then
15814   ac_cv_lib_MesaGL_glXCreateContext=yes
15815 else
15816   echo "$as_me: failed program was:" >&5
15817 sed 's/^/| /' conftest.$ac_ext >&5
15818
15819 ac_cv_lib_MesaGL_glXCreateContext=no
15820 fi
15821 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15822 LIBS=$ac_check_lib_save_LIBS
15823 fi
15824 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
15825 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
15826 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
15827   gl_lib_1="MesaGL"
15828                       GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
15829 fi
15830
15831   CPPFLAGS="$ac_save_CPPFLAGS"
15832   LDFLAGS="$ac_save_LDFLAGS"
15833 #  LIBS="$ac_save_LIBS"
15834
15835     fi
15836
15837     if test "$gl_lib_1" = "" ; then
15838
15839   ac_save_CPPFLAGS="$CPPFLAGS"
15840   ac_save_LDFLAGS="$LDFLAGS"
15841 #  ac_save_LIBS="$LIBS"
15842
15843   if test \! -z "$includedir" ; then
15844     CPPFLAGS="$CPPFLAGS -I$includedir"
15845   fi
15846   # note: $X_CFLAGS includes $x_includes
15847   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15848
15849   if test \! -z "$libdir" ; then
15850     LDFLAGS="$LDFLAGS -L$libdir"
15851   fi
15852   # note: $X_LIBS includes $x_libraries
15853   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15854
15855   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
15856 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
15857 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
15858   echo $ECHO_N "(cached) $ECHO_C" >&6
15859 else
15860   ac_check_lib_save_LIBS=$LIBS
15861 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
15862 cat >conftest.$ac_ext <<_ACEOF
15863 #line $LINENO "configure"
15864 /* confdefs.h.  */
15865 _ACEOF
15866 cat confdefs.h >>conftest.$ac_ext
15867 cat >>conftest.$ac_ext <<_ACEOF
15868 /* end confdefs.h.  */
15869
15870 /* Override any gcc2 internal prototype to avoid an error.  */
15871 #ifdef __cplusplus
15872 extern "C"
15873 #endif
15874 /* We use char because int might match the return type of a gcc2
15875    builtin and then its argument prototype would still apply.  */
15876 char glXCreateContext ();
15877 int
15878 main ()
15879 {
15880 glXCreateContext ();
15881   ;
15882   return 0;
15883 }
15884 _ACEOF
15885 rm -f conftest.$ac_objext conftest$ac_exeext
15886 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15887   (eval $ac_link) 2>&5
15888   ac_status=$?
15889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15890   (exit $ac_status); } &&
15891          { ac_try='test -s conftest$ac_exeext'
15892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15893   (eval $ac_try) 2>&5
15894   ac_status=$?
15895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15896   (exit $ac_status); }; }; then
15897   ac_cv_lib_GL_glXCreateContext=yes
15898 else
15899   echo "$as_me: failed program was:" >&5
15900 sed 's/^/| /' conftest.$ac_ext >&5
15901
15902 ac_cv_lib_GL_glXCreateContext=no
15903 fi
15904 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15905 LIBS=$ac_check_lib_save_LIBS
15906 fi
15907 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
15908 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
15909 if test $ac_cv_lib_GL_glXCreateContext = yes; then
15910   gl_lib_1="GL"
15911                       GL_LIBS="-lGL -lGLU $GL_LIBS"
15912 fi
15913
15914   CPPFLAGS="$ac_save_CPPFLAGS"
15915   LDFLAGS="$ac_save_LDFLAGS"
15916 #  LIBS="$ac_save_LIBS"
15917
15918     fi
15919
15920     if test "$gl_lib_1" = "" ; then
15921       # we have headers, but no libs -- bail.
15922       have_gl=no
15923       ac_have_mesa_gl=no
15924       gl_halfassed=yes
15925     else
15926       # linking works -- we can build the GL hacks.
15927       cat >>confdefs.h <<\_ACEOF
15928 #define HAVE_GL 1
15929 _ACEOF
15930
15931       if test "$ac_have_mesa_gl" = yes ; then
15932         cat >>confdefs.h <<\_ACEOF
15933 #define HAVE_MESA_GL 1
15934 _ACEOF
15935
15936       fi
15937     fi
15938   fi
15939
15940
15941   # Now that we know we have GL headers and libs, do some more GL testing.
15942   #
15943
15944   if test "$have_gl" = yes ; then
15945     # If it's MesaGL, we'd like to issue a warning if the version number
15946     # is less than or equal to 2.6, because that version had a security bug.
15947     #
15948     if test "$ac_have_mesa_gl" = yes; then
15949
15950       echo "$as_me:$LINENO: checking MesaGL version number" >&5
15951 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
15952 if test "${ac_cv_mesagl_version_string+set}" = set; then
15953   echo $ECHO_N "(cached) $ECHO_C" >&6
15954 else
15955   cat > conftest.$ac_ext <<EOF
15956 #line 15962 "configure"
15957 #include "confdefs.h"
15958 #include <GL/gl.h>
15959 #ifndef MESA_MAJOR_VERSION
15960 # include <GL/xmesa.h>
15961 # ifdef XMESA_MAJOR_VERSION
15962    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
15963       we have to check the XMesa version number (the number of the X protocol
15964       support, which seems to be the same as the Mesa version number.)
15965     */
15966 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
15967 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
15968 # else
15969    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
15970       so we have no way of telling what version of Mesa this is at all.
15971       So, we'll guess that the osmesa version (the "offscreen protocol")
15972       is less than or equal to the real mesa version number.  Except that
15973       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
15974       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
15975     */
15976 # include <GL/osmesa.h>
15977 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
15978 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
15979 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
15980 #   undef MESA_MINOR_VERSION
15981 #   define MESA_MINOR_VERSION 4 or newer, probably?
15982 #  endif
15983 # endif
15984 #endif
15985 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
15986 EOF
15987
15988          ac_save_CPPFLAGS="$CPPFLAGS"
15989          if test \! -z "$includedir" ; then
15990            CPPFLAGS="$CPPFLAGS -I$includedir"
15991          fi
15992          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15993
15994          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
15995
15996          # M4 sucks!!
15997
15998           mglv=`echo "$mglv" | sed -n \
15999              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
16000
16001
16002          rm -f conftest.$ac_ext
16003
16004          CPPFLAGS="$ac_save_CPPFLAGS"
16005
16006          if test "$mglv" = ""; then
16007            ac_mesagl_version=unknown
16008            ac_mesagl_version_string=unknown
16009          else
16010            ac_mesagl_version_string="$mglv"
16011            # M4 sucks!!
16012
16013            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
16014            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
16015
16016            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
16017            if test -z "$ac_mesagl_version"; then
16018              ac_mesagl_version=unknown
16019              ac_mesagl_version_string=unknown
16020            fi
16021          fi
16022          ac_cv_mesagl_version=$ac_mesagl_version
16023          ac_cv_mesagl_version_string=$ac_mesagl_version_string
16024
16025 fi
16026 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
16027 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
16028       ac_mesagl_version=$ac_cv_mesagl_version
16029       ac_mesagl_version_string=$ac_cv_mesagl_version_string
16030     fi
16031
16032
16033     # Check for OpenGL 1.1 features.
16034     #
16035
16036   ac_save_CPPFLAGS="$CPPFLAGS"
16037   ac_save_LDFLAGS="$LDFLAGS"
16038 #  ac_save_LIBS="$LIBS"
16039
16040   if test \! -z "$includedir" ; then
16041     CPPFLAGS="$CPPFLAGS -I$includedir"
16042   fi
16043   # note: $X_CFLAGS includes $x_includes
16044   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16045
16046   if test \! -z "$libdir" ; then
16047     LDFLAGS="$LDFLAGS -L$libdir"
16048   fi
16049   # note: $X_LIBS includes $x_libraries
16050   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16051
16052   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
16053 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
16054 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
16055 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16056   echo $ECHO_N "(cached) $ECHO_C" >&6
16057 else
16058   ac_check_lib_save_LIBS=$LIBS
16059 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
16060 cat >conftest.$ac_ext <<_ACEOF
16061 #line $LINENO "configure"
16062 /* confdefs.h.  */
16063 _ACEOF
16064 cat confdefs.h >>conftest.$ac_ext
16065 cat >>conftest.$ac_ext <<_ACEOF
16066 /* end confdefs.h.  */
16067
16068 /* Override any gcc2 internal prototype to avoid an error.  */
16069 #ifdef __cplusplus
16070 extern "C"
16071 #endif
16072 /* We use char because int might match the return type of a gcc2
16073    builtin and then its argument prototype would still apply.  */
16074 char glBindTexture ();
16075 int
16076 main ()
16077 {
16078 glBindTexture ();
16079   ;
16080   return 0;
16081 }
16082 _ACEOF
16083 rm -f conftest.$ac_objext conftest$ac_exeext
16084 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16085   (eval $ac_link) 2>&5
16086   ac_status=$?
16087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16088   (exit $ac_status); } &&
16089          { ac_try='test -s conftest$ac_exeext'
16090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16091   (eval $ac_try) 2>&5
16092   ac_status=$?
16093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16094   (exit $ac_status); }; }; then
16095   eval "$as_ac_Lib=yes"
16096 else
16097   echo "$as_me: failed program was:" >&5
16098 sed 's/^/| /' conftest.$ac_ext >&5
16099
16100 eval "$as_ac_Lib=no"
16101 fi
16102 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16103 LIBS=$ac_check_lib_save_LIBS
16104 fi
16105 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16106 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16107 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16108   cat >>confdefs.h <<\_ACEOF
16109 #define HAVE_GLBINDTEXTURE 1
16110 _ACEOF
16111
16112 else
16113   true
16114 fi
16115
16116   CPPFLAGS="$ac_save_CPPFLAGS"
16117   LDFLAGS="$ac_save_LDFLAGS"
16118 #  LIBS="$ac_save_LIBS"
16119
16120   fi
16121
16122 elif test "$with_gl" != no; then
16123   echo "error: must be yes or no: --with-gl=$with_gl"
16124   exit 1
16125 fi
16126
16127
16128 ###############################################################################
16129 #
16130 #       Check for -lgle.
16131 #
16132 ###############################################################################
16133
16134 have_gle=no
16135 with_gle_req=unspecified
16136 gle_halfassed=no
16137
16138 # Check whether --with-gle or --without-gle was given.
16139 if test "${with_gle+set}" = set; then
16140   withval="$with_gle"
16141   with_gle="$withval"; with_gle_req="$withval"
16142 else
16143   with_gle=yes
16144 fi;
16145
16146
16147    case "$with_gle" in
16148     yes) ;;
16149     no)  ;;
16150
16151     /*)
16152      echo "$as_me:$LINENO: checking for GLE headers" >&5
16153 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
16154      d=$with_gle/include
16155      if test -d $d; then
16156        X_CFLAGS="-I$d $X_CFLAGS"
16157        echo "$as_me:$LINENO: result: $d" >&5
16158 echo "${ECHO_T}$d" >&6
16159      else
16160        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16161 echo "${ECHO_T}not found ($d: no such directory)" >&6
16162      fi
16163
16164      echo "$as_me:$LINENO: checking for GLE libs" >&5
16165 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
16166      d=$with_gle/lib
16167      if test -d $d; then
16168        X_LIBS="-L$d $X_LIBS"
16169        echo "$as_me:$LINENO: result: $d" >&5
16170 echo "${ECHO_T}$d" >&6
16171      else
16172        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16173 echo "${ECHO_T}not found ($d: no such directory)" >&6
16174      fi
16175
16176      # replace the directory string with "yes".
16177      with_gle_req="yes"
16178      with_gle=$with_gle_req
16179      ;;
16180
16181     *)
16182      echo ""
16183      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
16184      echo "       If it is a directory, then \`DIR/include' will be added to"
16185      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16186      exit 1
16187      ;;
16188    esac
16189
16190
16191 GLE_LIBS=""
16192
16193 if test "$have_gl" = no ; then
16194  true
16195 elif test "$with_gle" = yes; then
16196
16197
16198   ac_save_CPPFLAGS="$CPPFLAGS"
16199   if test \! -z "$includedir" ; then
16200     CPPFLAGS="$CPPFLAGS -I$includedir"
16201   fi
16202   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16203   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
16204 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
16205 if test "${ac_cv_header_GL_gle_h+set}" = set; then
16206   echo $ECHO_N "(cached) $ECHO_C" >&6
16207 else
16208   cat >conftest.$ac_ext <<_ACEOF
16209 #line $LINENO "configure"
16210 /* confdefs.h.  */
16211 _ACEOF
16212 cat confdefs.h >>conftest.$ac_ext
16213 cat >>conftest.$ac_ext <<_ACEOF
16214 /* end confdefs.h.  */
16215 #include <GL/gl.h>
16216
16217 #include <GL/gle.h>
16218 _ACEOF
16219 rm -f conftest.$ac_objext
16220 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16221   (eval $ac_compile) 2>&5
16222   ac_status=$?
16223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16224   (exit $ac_status); } &&
16225          { ac_try='test -s conftest.$ac_objext'
16226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16227   (eval $ac_try) 2>&5
16228   ac_status=$?
16229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16230   (exit $ac_status); }; }; then
16231   ac_cv_header_GL_gle_h=yes
16232 else
16233   echo "$as_me: failed program was:" >&5
16234 sed 's/^/| /' conftest.$ac_ext >&5
16235
16236 ac_cv_header_GL_gle_h=no
16237 fi
16238 rm -f conftest.$ac_objext conftest.$ac_ext
16239 fi
16240 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
16241 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
16242 if test $ac_cv_header_GL_gle_h = yes; then
16243   have_gle3=yes
16244 else
16245   have_gle3=no
16246 fi
16247
16248
16249   CPPFLAGS="$ac_save_CPPFLAGS"
16250   if test "$have_gle3" = yes ; then
16251     have_gle=yes;
16252   else
16253
16254   ac_save_CPPFLAGS="$CPPFLAGS"
16255   if test \! -z "$includedir" ; then
16256     CPPFLAGS="$CPPFLAGS -I$includedir"
16257   fi
16258   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16259   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
16260 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
16261 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
16262   echo $ECHO_N "(cached) $ECHO_C" >&6
16263 else
16264   cat >conftest.$ac_ext <<_ACEOF
16265 #line $LINENO "configure"
16266 /* confdefs.h.  */
16267 _ACEOF
16268 cat confdefs.h >>conftest.$ac_ext
16269 cat >>conftest.$ac_ext <<_ACEOF
16270 /* end confdefs.h.  */
16271 #include <GL/gl.h>
16272
16273 #include <GL/gutil.h>
16274 _ACEOF
16275 rm -f conftest.$ac_objext
16276 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16277   (eval $ac_compile) 2>&5
16278   ac_status=$?
16279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16280   (exit $ac_status); } &&
16281          { ac_try='test -s conftest.$ac_objext'
16282   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16283   (eval $ac_try) 2>&5
16284   ac_status=$?
16285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16286   (exit $ac_status); }; }; then
16287   ac_cv_header_GL_gutil_h=yes
16288 else
16289   echo "$as_me: failed program was:" >&5
16290 sed 's/^/| /' conftest.$ac_ext >&5
16291
16292 ac_cv_header_GL_gutil_h=no
16293 fi
16294 rm -f conftest.$ac_objext conftest.$ac_ext
16295 fi
16296 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
16297 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
16298 if test $ac_cv_header_GL_gutil_h = yes; then
16299   have_gle=yes
16300 else
16301   have_gle=no
16302 fi
16303
16304
16305   CPPFLAGS="$ac_save_CPPFLAGS"
16306     if test "$have_gle" = yes ; then
16307
16308   ac_save_CPPFLAGS="$CPPFLAGS"
16309   if test \! -z "$includedir" ; then
16310     CPPFLAGS="$CPPFLAGS -I$includedir"
16311   fi
16312   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16313   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
16314 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
16315 if test "${ac_cv_header_GL_tube_h+set}" = set; then
16316   echo $ECHO_N "(cached) $ECHO_C" >&6
16317 else
16318   cat >conftest.$ac_ext <<_ACEOF
16319 #line $LINENO "configure"
16320 /* confdefs.h.  */
16321 _ACEOF
16322 cat confdefs.h >>conftest.$ac_ext
16323 cat >>conftest.$ac_ext <<_ACEOF
16324 /* end confdefs.h.  */
16325 #include <GL/gl.h>
16326
16327 #include <GL/tube.h>
16328 _ACEOF
16329 rm -f conftest.$ac_objext
16330 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16331   (eval $ac_compile) 2>&5
16332   ac_status=$?
16333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16334   (exit $ac_status); } &&
16335          { ac_try='test -s conftest.$ac_objext'
16336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16337   (eval $ac_try) 2>&5
16338   ac_status=$?
16339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16340   (exit $ac_status); }; }; then
16341   ac_cv_header_GL_tube_h=yes
16342 else
16343   echo "$as_me: failed program was:" >&5
16344 sed 's/^/| /' conftest.$ac_ext >&5
16345
16346 ac_cv_header_GL_tube_h=no
16347 fi
16348 rm -f conftest.$ac_objext conftest.$ac_ext
16349 fi
16350 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
16351 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
16352 if test $ac_cv_header_GL_tube_h = yes; then
16353   have_gle=yes
16354 else
16355   have_gle=no
16356 fi
16357
16358
16359   CPPFLAGS="$ac_save_CPPFLAGS"
16360     fi
16361   fi
16362
16363   if test "$have_gle" = yes ; then
16364     have_gle=no
16365     gle_halfassed=yes
16366
16367   ac_save_CPPFLAGS="$CPPFLAGS"
16368   ac_save_LDFLAGS="$LDFLAGS"
16369 #  ac_save_LIBS="$LIBS"
16370
16371   if test \! -z "$includedir" ; then
16372     CPPFLAGS="$CPPFLAGS -I$includedir"
16373   fi
16374   # note: $X_CFLAGS includes $x_includes
16375   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16376
16377   if test \! -z "$libdir" ; then
16378     LDFLAGS="$LDFLAGS -L$libdir"
16379   fi
16380   # note: $X_LIBS includes $x_libraries
16381   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16382
16383   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
16384 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
16385 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
16386   echo $ECHO_N "(cached) $ECHO_C" >&6
16387 else
16388   ac_check_lib_save_LIBS=$LIBS
16389 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16390 cat >conftest.$ac_ext <<_ACEOF
16391 #line $LINENO "configure"
16392 /* confdefs.h.  */
16393 _ACEOF
16394 cat confdefs.h >>conftest.$ac_ext
16395 cat >>conftest.$ac_ext <<_ACEOF
16396 /* end confdefs.h.  */
16397
16398 /* Override any gcc2 internal prototype to avoid an error.  */
16399 #ifdef __cplusplus
16400 extern "C"
16401 #endif
16402 /* We use char because int might match the return type of a gcc2
16403    builtin and then its argument prototype would still apply.  */
16404 char gleCreateGC ();
16405 int
16406 main ()
16407 {
16408 gleCreateGC ();
16409   ;
16410   return 0;
16411 }
16412 _ACEOF
16413 rm -f conftest.$ac_objext conftest$ac_exeext
16414 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16415   (eval $ac_link) 2>&5
16416   ac_status=$?
16417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16418   (exit $ac_status); } &&
16419          { ac_try='test -s conftest$ac_exeext'
16420   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16421   (eval $ac_try) 2>&5
16422   ac_status=$?
16423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16424   (exit $ac_status); }; }; then
16425   ac_cv_lib_gle_gleCreateGC=yes
16426 else
16427   echo "$as_me: failed program was:" >&5
16428 sed 's/^/| /' conftest.$ac_ext >&5
16429
16430 ac_cv_lib_gle_gleCreateGC=no
16431 fi
16432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16433 LIBS=$ac_check_lib_save_LIBS
16434 fi
16435 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
16436 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
16437 if test $ac_cv_lib_gle_gleCreateGC = yes; then
16438   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
16439 fi
16440
16441   CPPFLAGS="$ac_save_CPPFLAGS"
16442   LDFLAGS="$ac_save_LDFLAGS"
16443 #  LIBS="$ac_save_LIBS"
16444
16445   fi
16446   if test "$have_gle" = yes ; then
16447     have_gle=no
16448     gle_halfassed=yes
16449
16450     # sometimes the libmatrix stuff is included in libgle.  look there first.
16451 #
16452 # I don't get it.  For some reason, this test passes on SGI, as if
16453 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
16454 # Yet the link is succeeding.  Why???
16455 #
16456 #    AC_CHECK_X_LIB(gle, uview_direction_d,
16457 #                   [have_gle=yes; gle_halfassed=no],
16458 #                   [], $GL_LIBS -lX11 -lXext -lm)
16459
16460     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
16461     # *sigh*
16462     if test "$have_gle3" = yes ; then
16463
16464   ac_save_CPPFLAGS="$CPPFLAGS"
16465   ac_save_LDFLAGS="$LDFLAGS"
16466 #  ac_save_LIBS="$LIBS"
16467
16468   if test \! -z "$includedir" ; then
16469     CPPFLAGS="$CPPFLAGS -I$includedir"
16470   fi
16471   # note: $X_CFLAGS includes $x_includes
16472   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16473
16474   if test \! -z "$libdir" ; then
16475     LDFLAGS="$LDFLAGS -L$libdir"
16476   fi
16477   # note: $X_LIBS includes $x_libraries
16478   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16479
16480   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
16481 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
16482 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
16483   echo $ECHO_N "(cached) $ECHO_C" >&6
16484 else
16485   ac_check_lib_save_LIBS=$LIBS
16486 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16487 cat >conftest.$ac_ext <<_ACEOF
16488 #line $LINENO "configure"
16489 /* confdefs.h.  */
16490 _ACEOF
16491 cat confdefs.h >>conftest.$ac_ext
16492 cat >>conftest.$ac_ext <<_ACEOF
16493 /* end confdefs.h.  */
16494
16495 /* Override any gcc2 internal prototype to avoid an error.  */
16496 #ifdef __cplusplus
16497 extern "C"
16498 #endif
16499 /* We use char because int might match the return type of a gcc2
16500    builtin and then its argument prototype would still apply.  */
16501 char uview_direction ();
16502 int
16503 main ()
16504 {
16505 uview_direction ();
16506   ;
16507   return 0;
16508 }
16509 _ACEOF
16510 rm -f conftest.$ac_objext conftest$ac_exeext
16511 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16512   (eval $ac_link) 2>&5
16513   ac_status=$?
16514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16515   (exit $ac_status); } &&
16516          { ac_try='test -s conftest$ac_exeext'
16517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16518   (eval $ac_try) 2>&5
16519   ac_status=$?
16520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16521   (exit $ac_status); }; }; then
16522   ac_cv_lib_gle_uview_direction=yes
16523 else
16524   echo "$as_me: failed program was:" >&5
16525 sed 's/^/| /' conftest.$ac_ext >&5
16526
16527 ac_cv_lib_gle_uview_direction=no
16528 fi
16529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16530 LIBS=$ac_check_lib_save_LIBS
16531 fi
16532 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
16533 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
16534 if test $ac_cv_lib_gle_uview_direction = yes; then
16535   have_gle=yes; gle_halfassed=no
16536 fi
16537
16538   CPPFLAGS="$ac_save_CPPFLAGS"
16539   LDFLAGS="$ac_save_LDFLAGS"
16540 #  LIBS="$ac_save_LIBS"
16541
16542     fi
16543     # if it wasn't in libgle, then look in libmatrix.
16544     if test "$have_gle" = no ; then
16545
16546   ac_save_CPPFLAGS="$CPPFLAGS"
16547   ac_save_LDFLAGS="$LDFLAGS"
16548 #  ac_save_LIBS="$LIBS"
16549
16550   if test \! -z "$includedir" ; then
16551     CPPFLAGS="$CPPFLAGS -I$includedir"
16552   fi
16553   # note: $X_CFLAGS includes $x_includes
16554   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16555
16556   if test \! -z "$libdir" ; then
16557     LDFLAGS="$LDFLAGS -L$libdir"
16558   fi
16559   # note: $X_LIBS includes $x_libraries
16560   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16561
16562   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
16563 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
16564 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
16565   echo $ECHO_N "(cached) $ECHO_C" >&6
16566 else
16567   ac_check_lib_save_LIBS=$LIBS
16568 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
16569 cat >conftest.$ac_ext <<_ACEOF
16570 #line $LINENO "configure"
16571 /* confdefs.h.  */
16572 _ACEOF
16573 cat confdefs.h >>conftest.$ac_ext
16574 cat >>conftest.$ac_ext <<_ACEOF
16575 /* end confdefs.h.  */
16576
16577 /* Override any gcc2 internal prototype to avoid an error.  */
16578 #ifdef __cplusplus
16579 extern "C"
16580 #endif
16581 /* We use char because int might match the return type of a gcc2
16582    builtin and then its argument prototype would still apply.  */
16583 char uview_direction_d ();
16584 int
16585 main ()
16586 {
16587 uview_direction_d ();
16588   ;
16589   return 0;
16590 }
16591 _ACEOF
16592 rm -f conftest.$ac_objext conftest$ac_exeext
16593 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16594   (eval $ac_link) 2>&5
16595   ac_status=$?
16596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16597   (exit $ac_status); } &&
16598          { ac_try='test -s conftest$ac_exeext'
16599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16600   (eval $ac_try) 2>&5
16601   ac_status=$?
16602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16603   (exit $ac_status); }; }; then
16604   ac_cv_lib_matrix_uview_direction_d=yes
16605 else
16606   echo "$as_me: failed program was:" >&5
16607 sed 's/^/| /' conftest.$ac_ext >&5
16608
16609 ac_cv_lib_matrix_uview_direction_d=no
16610 fi
16611 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16612 LIBS=$ac_check_lib_save_LIBS
16613 fi
16614 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
16615 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
16616 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
16617   have_gle=yes; gle_halfassed=no;
16618                       GLE_LIBS="$GLE_LIBS -lmatrix"
16619 fi
16620
16621   CPPFLAGS="$ac_save_CPPFLAGS"
16622   LDFLAGS="$ac_save_LDFLAGS"
16623 #  LIBS="$ac_save_LIBS"
16624
16625     fi
16626   fi
16627
16628   if test "$have_gle" = yes ; then
16629     cat >>confdefs.h <<\_ACEOF
16630 #define HAVE_GLE 1
16631 _ACEOF
16632
16633     if test "$have_gle3" = yes ; then
16634       cat >>confdefs.h <<\_ACEOF
16635 #define HAVE_GLE3 1
16636 _ACEOF
16637
16638     fi
16639   fi
16640
16641 elif test "$with_gle" != no; then
16642   echo "error: must be yes or no: --with-gle=$with_gle"
16643   exit 1
16644
16645 fi
16646
16647
16648
16649 ###############################################################################
16650 #
16651 #       Check for -lXpm.
16652 #
16653 ###############################################################################
16654
16655 have_xpm=no
16656 with_xpm_req=unspecified
16657
16658 # Check whether --with-xpm or --without-xpm was given.
16659 if test "${with_xpm+set}" = set; then
16660   withval="$with_xpm"
16661   with_xpm="$withval"; with_xpm_req="$withval"
16662 else
16663   with_xpm=yes
16664 fi;
16665
16666
16667    case "$with_xpm" in
16668     yes) ;;
16669     no)  ;;
16670
16671     /*)
16672      echo "$as_me:$LINENO: checking for XPM headers" >&5
16673 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
16674      d=$with_xpm/include
16675      if test -d $d; then
16676        X_CFLAGS="-I$d $X_CFLAGS"
16677        echo "$as_me:$LINENO: result: $d" >&5
16678 echo "${ECHO_T}$d" >&6
16679      else
16680        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16681 echo "${ECHO_T}not found ($d: no such directory)" >&6
16682      fi
16683
16684      echo "$as_me:$LINENO: checking for XPM libs" >&5
16685 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
16686      d=$with_xpm/lib
16687      if test -d $d; then
16688        X_LIBS="-L$d $X_LIBS"
16689        echo "$as_me:$LINENO: result: $d" >&5
16690 echo "${ECHO_T}$d" >&6
16691      else
16692        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16693 echo "${ECHO_T}not found ($d: no such directory)" >&6
16694      fi
16695
16696      # replace the directory string with "yes".
16697      with_xpm_req="yes"
16698      with_xpm=$with_xpm_req
16699      ;;
16700
16701     *)
16702      echo ""
16703      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
16704      echo "       If it is a directory, then \`DIR/include' will be added to"
16705      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16706      exit 1
16707      ;;
16708    esac
16709
16710
16711 if test "$with_xpm" = yes; then
16712
16713   ac_save_CPPFLAGS="$CPPFLAGS"
16714   if test \! -z "$includedir" ; then
16715     CPPFLAGS="$CPPFLAGS -I$includedir"
16716   fi
16717   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16718   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
16719 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
16720 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
16721   echo $ECHO_N "(cached) $ECHO_C" >&6
16722 else
16723   cat >conftest.$ac_ext <<_ACEOF
16724 #line $LINENO "configure"
16725 /* confdefs.h.  */
16726 _ACEOF
16727 cat confdefs.h >>conftest.$ac_ext
16728 cat >>conftest.$ac_ext <<_ACEOF
16729 /* end confdefs.h.  */
16730 #include <X11/Xlib.h>
16731
16732 #include <X11/xpm.h>
16733 _ACEOF
16734 rm -f conftest.$ac_objext
16735 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16736   (eval $ac_compile) 2>&5
16737   ac_status=$?
16738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16739   (exit $ac_status); } &&
16740          { ac_try='test -s conftest.$ac_objext'
16741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16742   (eval $ac_try) 2>&5
16743   ac_status=$?
16744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16745   (exit $ac_status); }; }; then
16746   ac_cv_header_X11_xpm_h=yes
16747 else
16748   echo "$as_me: failed program was:" >&5
16749 sed 's/^/| /' conftest.$ac_ext >&5
16750
16751 ac_cv_header_X11_xpm_h=no
16752 fi
16753 rm -f conftest.$ac_objext conftest.$ac_ext
16754 fi
16755 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
16756 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
16757 if test $ac_cv_header_X11_xpm_h = yes; then
16758   have_xpm=yes
16759                     cat >>confdefs.h <<\_ACEOF
16760 #define HAVE_XPM 1
16761 _ACEOF
16762
16763                     XPM_LIBS="-lXpm"
16764 fi
16765
16766
16767   CPPFLAGS="$ac_save_CPPFLAGS"
16768 elif test "$with_xpm" != no; then
16769   echo "error: must be yes or no: --with-xpm=$with_xpm"
16770   exit 1
16771 fi
16772
16773 # See comment near $motif_requires_xpm, above.
16774 # Need to do this here, after both Motif and XPM have been checked for.
16775 #
16776 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
16777   if test "$motif_requires_xpm" = yes ; then
16778     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
16779   fi
16780 fi
16781
16782 ###############################################################################
16783 #
16784 #       Check for -lgdk_pixbuf.
16785 #
16786 ###############################################################################
16787
16788 have_gdk_pixbuf=no
16789 with_gdk_pixbuf_req=unspecified
16790
16791 # Check whether --with-pixbuf or --without-pixbuf was given.
16792 if test "${with_pixbuf+set}" = set; then
16793   withval="$with_pixbuf"
16794   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
16795 else
16796   with_gdk_pixbuf=yes
16797 fi;
16798
16799 # if --with-pixbuf=/directory/ was specified, remember that directory so that
16800 # we can also look for the `gdk-pixbuf-config' program in that directory.
16801 case "$with_gdk_pixbuf" in
16802   /*)
16803     gdk_pixbuf_dir="$with_gdk_pixbuf"
16804     ;;
16805   *)
16806     gdk_pixbuf_dir=""
16807     ;;
16808 esac
16809
16810
16811    case "$with_gdk_pixbuf" in
16812     yes) ;;
16813     no)  ;;
16814
16815     /*)
16816      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
16817 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
16818      d=$with_gdk_pixbuf/include
16819      if test -d $d; then
16820        X_CFLAGS="-I$d $X_CFLAGS"
16821        echo "$as_me:$LINENO: result: $d" >&5
16822 echo "${ECHO_T}$d" >&6
16823      else
16824        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16825 echo "${ECHO_T}not found ($d: no such directory)" >&6
16826      fi
16827
16828      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
16829 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
16830      d=$with_gdk_pixbuf/lib
16831      if test -d $d; then
16832        X_LIBS="-L$d $X_LIBS"
16833        echo "$as_me:$LINENO: result: $d" >&5
16834 echo "${ECHO_T}$d" >&6
16835      else
16836        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16837 echo "${ECHO_T}not found ($d: no such directory)" >&6
16838      fi
16839
16840      # replace the directory string with "yes".
16841      with_gdk_pixbuf_req="yes"
16842      with_gdk_pixbuf=$with_gdk_pixbuf_req
16843      ;;
16844
16845     *)
16846      echo ""
16847      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
16848      echo "       If it is a directory, then \`DIR/include' will be added to"
16849      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16850      exit 1
16851      ;;
16852    esac
16853
16854
16855 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
16856   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
16857   exit 1
16858 fi
16859
16860 if test "$with_gdk_pixbuf" = yes; then
16861   have_gdk_pixbuf=no
16862   have_gdk_pixbuf2=no
16863
16864   if test -n "$pkg_config" ; then
16865     #
16866     # the new way...
16867     # run pkg-config based tests.
16868     #
16869     pkgs=''
16870     ok="yes"
16871
16872     # If we have Gtk 2.x, then *only* gdk-pixbuf 2.x will work.
16873     # If we have Gtk 1.x, then *only* gdk-pixbuf 1.x will work.
16874     # If we don't have Gtk at all, then either will work.
16875
16876     if test "$have_gtk" = no -o "$have_gtk2" = yes; then
16877       #
16878       # we don't have Gtk; or we have Gtk 2.x.  Check for pixbuf 2.x.
16879       #
16880       echo "$as_me:$LINENO: result: checking for gdk_pixbuf 2.x with gtk-config based tests..." >&5
16881 echo "${ECHO_T}checking for gdk_pixbuf 2.x with gtk-config based tests..." >&6
16882       pkg_check_version gdk-pixbuf-2.0      2.0.0
16883       pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
16884       have_gdk_pixbuf="$ok"
16885       have_gdk_pixbuf2="$ok"
16886     fi
16887
16888     if test "$have_gtk" = no -o "$have_gtk2" = no; then
16889       #
16890       # we don't have Gtk; or we have Gtk 1.x.
16891       # If we don't have pixbuf 2.x, then check for pixbuf 1.x.
16892       #
16893       if test "$have_gdk_pixbuf2" = no; then
16894         pkgs=''
16895         ok="yes"
16896       echo "$as_me:$LINENO: result: checking for gdk_pixbuf 1.x with gtk-config based tests..." >&5
16897 echo "${ECHO_T}checking for gdk_pixbuf 1.x with gtk-config based tests..." >&6
16898         pkg_check_version gdk_pixbuf      0.0
16899         pkg_check_version gdk_pixbuf_xlib 0.0
16900         have_gdk_pixbuf="$ok"
16901       fi
16902     fi
16903
16904     if test "$have_gdk_pixbuf" = yes; then
16905       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
16906 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
16907 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
16908   echo $ECHO_N "(cached) $ECHO_C" >&6
16909 else
16910   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
16911 fi
16912 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
16913 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
16914       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
16915 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
16916 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
16917   echo $ECHO_N "(cached) $ECHO_C" >&6
16918 else
16919   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
16920 fi
16921 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
16922 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
16923     fi
16924     ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
16925     ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
16926   fi
16927
16928
16929   if test "$have_gdk_pixbuf" = no; then
16930     #
16931     # the old way...
16932     # run gdk-pixbuf-config based tests.
16933     # note that we can't assume that the existence of "pkg-config" means
16934     # that we don't have to look for gdk-pixbuf-config -- in Gnome 1.4,
16935     # pkg-config exists, but doesn't know about pixbuf.
16936     #
16937
16938    echo "$as_me:$LINENO: result: checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&5
16939 echo "${ECHO_T}checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&6
16940
16941     # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
16942     # look in /foo/bin/ for for gdk-pixbuf-config.
16943     #
16944     gdk_pixbuf_path="$PATH"
16945
16946     if test ! -z "$gtk_dir"; then
16947       # canonicalize slashes.
16948       foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
16949       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
16950     fi
16951
16952     if test ! -z "$gnome_dir"; then
16953       # canonicalize slashes.
16954       foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
16955       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
16956     fi
16957
16958     for ac_prog in gdk-pixbuf-config
16959 do
16960   # Extract the first word of "$ac_prog", so it can be a program name with args.
16961 set dummy $ac_prog; ac_word=$2
16962 echo "$as_me:$LINENO: checking for $ac_word" >&5
16963 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16964 if test "${ac_cv_path_gdk_pixbuf_config+set}" = set; then
16965   echo $ECHO_N "(cached) $ECHO_C" >&6
16966 else
16967   case $gdk_pixbuf_config in
16968   [\\/]* | ?:[\\/]*)
16969   ac_cv_path_gdk_pixbuf_config="$gdk_pixbuf_config" # Let the user override the test with a path.
16970   ;;
16971   *)
16972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16973 for as_dir in $gdk_pixbuf_path
16974 do
16975   IFS=$as_save_IFS
16976   test -z "$as_dir" && as_dir=.
16977   for ac_exec_ext in '' $ac_executable_extensions; do
16978   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16979     ac_cv_path_gdk_pixbuf_config="$as_dir/$ac_word$ac_exec_ext"
16980     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16981     break 2
16982   fi
16983 done
16984 done
16985
16986   ;;
16987 esac
16988 fi
16989 gdk_pixbuf_config=$ac_cv_path_gdk_pixbuf_config
16990
16991 if test -n "$gdk_pixbuf_config"; then
16992   echo "$as_me:$LINENO: result: $gdk_pixbuf_config" >&5
16993 echo "${ECHO_T}$gdk_pixbuf_config" >&6
16994 else
16995   echo "$as_me:$LINENO: result: no" >&5
16996 echo "${ECHO_T}no" >&6
16997 fi
16998
16999   test -n "$gdk_pixbuf_config" && break
17000 done
17001
17002
17003     # If we found the gdk-pixbuf-config program, run it to get flags.
17004     #
17005     if test -n "$gdk_pixbuf_config" ; then
17006       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
17007 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
17008 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
17009   echo $ECHO_N "(cached) $ECHO_C" >&6
17010 else
17011   ac_cv_gdk_pixbuf_config_cflags=`$gdk_pixbuf_config --cflags`
17012 fi
17013 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
17014 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
17015       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
17016 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
17017 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
17018   echo $ECHO_N "(cached) $ECHO_C" >&6
17019 else
17020   ac_cv_gdk_pixbuf_config_libs=`$gdk_pixbuf_config --libs`
17021 fi
17022 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
17023 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
17024
17025       # note that "gdk-pixbuf-config --libs" produces a link line including
17026       # -lgdk_pixbuf, but there's no way to get it to produce one that also
17027       # includes -lgdk_pixbuf_xlib.  Since we don't know *exactly* what the
17028       # name of the library will be, construct it with sed...
17029       # M4 sucks!!
17030
17031       ac_cv_gdk_pixbuf_config_libs=`echo $ac_cv_gdk_pixbuf_config_libs | \
17032        sed 's@ \(-lgdk_pixbuf\([-_a-zA-Z0-9.]*\)\) @ \1 -lgdk_pixbuf_xlib\2 @'`
17033
17034
17035       ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
17036       ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
17037     fi
17038   fi
17039
17040   ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
17041   CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
17042
17043   if test "$have_gdk_pixbuf" = no; then
17044     #
17045     # we appear to have pixbuf; check for headers/libs to be sure.
17046     #
17047
17048     have_gdk_pixbuf=no
17049
17050     # check for header A...
17051
17052   ac_save_CPPFLAGS="$CPPFLAGS"
17053   if test \! -z "$includedir" ; then
17054     CPPFLAGS="$CPPFLAGS -I$includedir"
17055   fi
17056   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17057   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17058   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17059 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
17060 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17061   echo $ECHO_N "(cached) $ECHO_C" >&6
17062 fi
17063 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17064 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
17065 else
17066   # Is the header compilable?
17067 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
17068 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
17069 cat >conftest.$ac_ext <<_ACEOF
17070 #line $LINENO "configure"
17071 /* confdefs.h.  */
17072 _ACEOF
17073 cat confdefs.h >>conftest.$ac_ext
17074 cat >>conftest.$ac_ext <<_ACEOF
17075 /* end confdefs.h.  */
17076 $ac_includes_default
17077 #include <gdk-pixbuf/gdk-pixbuf.h>
17078 _ACEOF
17079 rm -f conftest.$ac_objext
17080 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17081   (eval $ac_compile) 2>&5
17082   ac_status=$?
17083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17084   (exit $ac_status); } &&
17085          { ac_try='test -s conftest.$ac_objext'
17086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17087   (eval $ac_try) 2>&5
17088   ac_status=$?
17089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17090   (exit $ac_status); }; }; then
17091   ac_header_compiler=yes
17092 else
17093   echo "$as_me: failed program was:" >&5
17094 sed 's/^/| /' conftest.$ac_ext >&5
17095
17096 ac_header_compiler=no
17097 fi
17098 rm -f conftest.$ac_objext conftest.$ac_ext
17099 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17100 echo "${ECHO_T}$ac_header_compiler" >&6
17101
17102 # Is the header present?
17103 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
17104 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
17105 cat >conftest.$ac_ext <<_ACEOF
17106 #line $LINENO "configure"
17107 /* confdefs.h.  */
17108 _ACEOF
17109 cat confdefs.h >>conftest.$ac_ext
17110 cat >>conftest.$ac_ext <<_ACEOF
17111 /* end confdefs.h.  */
17112 #include <gdk-pixbuf/gdk-pixbuf.h>
17113 _ACEOF
17114 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17115   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17116   ac_status=$?
17117   grep -v '^ *+' conftest.er1 >conftest.err
17118   rm -f conftest.er1
17119   cat conftest.err >&5
17120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17121   (exit $ac_status); } >/dev/null; then
17122   if test -s conftest.err; then
17123     ac_cpp_err=$ac_c_preproc_warn_flag
17124   else
17125     ac_cpp_err=
17126   fi
17127 else
17128   ac_cpp_err=yes
17129 fi
17130 if test -z "$ac_cpp_err"; then
17131   ac_header_preproc=yes
17132 else
17133   echo "$as_me: failed program was:" >&5
17134 sed 's/^/| /' conftest.$ac_ext >&5
17135
17136   ac_header_preproc=no
17137 fi
17138 rm -f conftest.err conftest.$ac_ext
17139 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17140 echo "${ECHO_T}$ac_header_preproc" >&6
17141
17142 # So?  What about this header?
17143 case $ac_header_compiler:$ac_header_preproc in
17144   yes:no )
17145     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
17146 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17147     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
17148 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
17149     (
17150       cat <<\_ASBOX
17151 ## ------------------------------------ ##
17152 ## Report this to bug-autoconf@gnu.org. ##
17153 ## ------------------------------------ ##
17154 _ASBOX
17155     ) |
17156       sed "s/^/$as_me: WARNING:     /" >&2
17157     ;;
17158   no:yes )
17159     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
17160 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
17161     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&5
17162 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&2;}
17163     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
17164 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
17165     (
17166       cat <<\_ASBOX
17167 ## ------------------------------------ ##
17168 ## Report this to bug-autoconf@gnu.org. ##
17169 ## ------------------------------------ ##
17170 _ASBOX
17171     ) |
17172       sed "s/^/$as_me: WARNING:     /" >&2
17173     ;;
17174 esac
17175 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17176 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
17177 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17178   echo $ECHO_N "(cached) $ECHO_C" >&6
17179 else
17180   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
17181 fi
17182 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17183 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
17184
17185 fi
17186 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
17187   have_gdk_pixbuf=yes
17188 fi
17189
17190
17191   CPPFLAGS="$ac_save_CPPFLAGS"
17192
17193     # if that worked, check for header B...
17194     if test "$have_gdk_pixbuf" = yes; then
17195       have_gdk_pixbuf=no
17196       gdk_pixbuf_halfassed=yes
17197
17198   ac_save_CPPFLAGS="$CPPFLAGS"
17199   if test \! -z "$includedir" ; then
17200     CPPFLAGS="$CPPFLAGS -I$includedir"
17201   fi
17202   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17203   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17204   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17205 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17206 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17207   echo $ECHO_N "(cached) $ECHO_C" >&6
17208 fi
17209 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17210 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
17211 else
17212   # Is the header compilable?
17213 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
17214 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
17215 cat >conftest.$ac_ext <<_ACEOF
17216 #line $LINENO "configure"
17217 /* confdefs.h.  */
17218 _ACEOF
17219 cat confdefs.h >>conftest.$ac_ext
17220 cat >>conftest.$ac_ext <<_ACEOF
17221 /* end confdefs.h.  */
17222 $ac_includes_default
17223 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17224 _ACEOF
17225 rm -f conftest.$ac_objext
17226 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17227   (eval $ac_compile) 2>&5
17228   ac_status=$?
17229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17230   (exit $ac_status); } &&
17231          { ac_try='test -s conftest.$ac_objext'
17232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17233   (eval $ac_try) 2>&5
17234   ac_status=$?
17235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17236   (exit $ac_status); }; }; then
17237   ac_header_compiler=yes
17238 else
17239   echo "$as_me: failed program was:" >&5
17240 sed 's/^/| /' conftest.$ac_ext >&5
17241
17242 ac_header_compiler=no
17243 fi
17244 rm -f conftest.$ac_objext conftest.$ac_ext
17245 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17246 echo "${ECHO_T}$ac_header_compiler" >&6
17247
17248 # Is the header present?
17249 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
17250 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
17251 cat >conftest.$ac_ext <<_ACEOF
17252 #line $LINENO "configure"
17253 /* confdefs.h.  */
17254 _ACEOF
17255 cat confdefs.h >>conftest.$ac_ext
17256 cat >>conftest.$ac_ext <<_ACEOF
17257 /* end confdefs.h.  */
17258 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17259 _ACEOF
17260 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17261   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17262   ac_status=$?
17263   grep -v '^ *+' conftest.er1 >conftest.err
17264   rm -f conftest.er1
17265   cat conftest.err >&5
17266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17267   (exit $ac_status); } >/dev/null; then
17268   if test -s conftest.err; then
17269     ac_cpp_err=$ac_c_preproc_warn_flag
17270   else
17271     ac_cpp_err=
17272   fi
17273 else
17274   ac_cpp_err=yes
17275 fi
17276 if test -z "$ac_cpp_err"; then
17277   ac_header_preproc=yes
17278 else
17279   echo "$as_me: failed program was:" >&5
17280 sed 's/^/| /' conftest.$ac_ext >&5
17281
17282   ac_header_preproc=no
17283 fi
17284 rm -f conftest.err conftest.$ac_ext
17285 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17286 echo "${ECHO_T}$ac_header_preproc" >&6
17287
17288 # So?  What about this header?
17289 case $ac_header_compiler:$ac_header_preproc in
17290   yes:no )
17291     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17292 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17293     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17294 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17295     (
17296       cat <<\_ASBOX
17297 ## ------------------------------------ ##
17298 ## Report this to bug-autoconf@gnu.org. ##
17299 ## ------------------------------------ ##
17300 _ASBOX
17301     ) |
17302       sed "s/^/$as_me: WARNING:     /" >&2
17303     ;;
17304   no:yes )
17305     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17306 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17307     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
17308 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
17309     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17310 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17311     (
17312       cat <<\_ASBOX
17313 ## ------------------------------------ ##
17314 ## Report this to bug-autoconf@gnu.org. ##
17315 ## ------------------------------------ ##
17316 _ASBOX
17317     ) |
17318       sed "s/^/$as_me: WARNING:     /" >&2
17319     ;;
17320 esac
17321 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17322 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17323 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17324   echo $ECHO_N "(cached) $ECHO_C" >&6
17325 else
17326   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
17327 fi
17328 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17329 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
17330
17331 fi
17332 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
17333   have_gdk_pixbuf=yes
17334                          gdk_pixbuf_halfassed=no
17335 fi
17336
17337
17338   CPPFLAGS="$ac_save_CPPFLAGS"
17339
17340       # yay, it has a new name in Gtk 2.x...
17341       if test "$have_gdk_pixbuf" = no; then
17342         have_gdk_pixbuf=no
17343         gdk_pixbuf_halfassed=yes
17344
17345   ac_save_CPPFLAGS="$CPPFLAGS"
17346   if test \! -z "$includedir" ; then
17347     CPPFLAGS="$CPPFLAGS -I$includedir"
17348   fi
17349   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17350   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17351   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17352 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17353 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17354   echo $ECHO_N "(cached) $ECHO_C" >&6
17355 fi
17356 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17357 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
17358 else
17359   # Is the header compilable?
17360 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
17361 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
17362 cat >conftest.$ac_ext <<_ACEOF
17363 #line $LINENO "configure"
17364 /* confdefs.h.  */
17365 _ACEOF
17366 cat confdefs.h >>conftest.$ac_ext
17367 cat >>conftest.$ac_ext <<_ACEOF
17368 /* end confdefs.h.  */
17369 $ac_includes_default
17370 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17371 _ACEOF
17372 rm -f conftest.$ac_objext
17373 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17374   (eval $ac_compile) 2>&5
17375   ac_status=$?
17376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17377   (exit $ac_status); } &&
17378          { ac_try='test -s conftest.$ac_objext'
17379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17380   (eval $ac_try) 2>&5
17381   ac_status=$?
17382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17383   (exit $ac_status); }; }; then
17384   ac_header_compiler=yes
17385 else
17386   echo "$as_me: failed program was:" >&5
17387 sed 's/^/| /' conftest.$ac_ext >&5
17388
17389 ac_header_compiler=no
17390 fi
17391 rm -f conftest.$ac_objext conftest.$ac_ext
17392 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17393 echo "${ECHO_T}$ac_header_compiler" >&6
17394
17395 # Is the header present?
17396 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
17397 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
17398 cat >conftest.$ac_ext <<_ACEOF
17399 #line $LINENO "configure"
17400 /* confdefs.h.  */
17401 _ACEOF
17402 cat confdefs.h >>conftest.$ac_ext
17403 cat >>conftest.$ac_ext <<_ACEOF
17404 /* end confdefs.h.  */
17405 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17406 _ACEOF
17407 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17408   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17409   ac_status=$?
17410   grep -v '^ *+' conftest.er1 >conftest.err
17411   rm -f conftest.er1
17412   cat conftest.err >&5
17413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17414   (exit $ac_status); } >/dev/null; then
17415   if test -s conftest.err; then
17416     ac_cpp_err=$ac_c_preproc_warn_flag
17417   else
17418     ac_cpp_err=
17419   fi
17420 else
17421   ac_cpp_err=yes
17422 fi
17423 if test -z "$ac_cpp_err"; then
17424   ac_header_preproc=yes
17425 else
17426   echo "$as_me: failed program was:" >&5
17427 sed 's/^/| /' conftest.$ac_ext >&5
17428
17429   ac_header_preproc=no
17430 fi
17431 rm -f conftest.err conftest.$ac_ext
17432 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17433 echo "${ECHO_T}$ac_header_preproc" >&6
17434
17435 # So?  What about this header?
17436 case $ac_header_compiler:$ac_header_preproc in
17437   yes:no )
17438     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17439 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17440     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17441 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17442     (
17443       cat <<\_ASBOX
17444 ## ------------------------------------ ##
17445 ## Report this to bug-autoconf@gnu.org. ##
17446 ## ------------------------------------ ##
17447 _ASBOX
17448     ) |
17449       sed "s/^/$as_me: WARNING:     /" >&2
17450     ;;
17451   no:yes )
17452     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17453 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17454     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
17455 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
17456     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17457 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17458     (
17459       cat <<\_ASBOX
17460 ## ------------------------------------ ##
17461 ## Report this to bug-autoconf@gnu.org. ##
17462 ## ------------------------------------ ##
17463 _ASBOX
17464     ) |
17465       sed "s/^/$as_me: WARNING:     /" >&2
17466     ;;
17467 esac
17468 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17469 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17470 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17471   echo $ECHO_N "(cached) $ECHO_C" >&6
17472 else
17473   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
17474 fi
17475 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17476 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
17477
17478 fi
17479 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
17480   have_gdk_pixbuf=yes
17481                            gdk_pixbuf_halfassed=no
17482 fi
17483
17484
17485   CPPFLAGS="$ac_save_CPPFLAGS"
17486       fi
17487     fi
17488   fi
17489
17490   CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
17491
17492   if test "$have_gdk_pixbuf" = yes; then
17493     # we have the headers, now check for the libraries
17494     have_gdk_pixbuf=no
17495     gdk_pixbuf_halfassed=yes
17496
17497     # library A...
17498
17499   ac_save_CPPFLAGS="$CPPFLAGS"
17500   ac_save_LDFLAGS="$LDFLAGS"
17501 #  ac_save_LIBS="$LIBS"
17502
17503   if test \! -z "$includedir" ; then
17504     CPPFLAGS="$CPPFLAGS -I$includedir"
17505   fi
17506   # note: $X_CFLAGS includes $x_includes
17507   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17508
17509   if test \! -z "$libdir" ; then
17510     LDFLAGS="$LDFLAGS -L$libdir"
17511   fi
17512   # note: $X_LIBS includes $x_libraries
17513   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17514
17515   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
17516 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
17517 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
17518   echo $ECHO_N "(cached) $ECHO_C" >&6
17519 else
17520   ac_check_lib_save_LIBS=$LIBS
17521 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17522 cat >conftest.$ac_ext <<_ACEOF
17523 #line $LINENO "configure"
17524 /* confdefs.h.  */
17525 _ACEOF
17526 cat confdefs.h >>conftest.$ac_ext
17527 cat >>conftest.$ac_ext <<_ACEOF
17528 /* end confdefs.h.  */
17529
17530 /* Override any gcc2 internal prototype to avoid an error.  */
17531 #ifdef __cplusplus
17532 extern "C"
17533 #endif
17534 /* We use char because int might match the return type of a gcc2
17535    builtin and then its argument prototype would still apply.  */
17536 char gdk_pixbuf_new_from_file ();
17537 int
17538 main ()
17539 {
17540 gdk_pixbuf_new_from_file ();
17541   ;
17542   return 0;
17543 }
17544 _ACEOF
17545 rm -f conftest.$ac_objext conftest$ac_exeext
17546 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17547   (eval $ac_link) 2>&5
17548   ac_status=$?
17549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17550   (exit $ac_status); } &&
17551          { ac_try='test -s conftest$ac_exeext'
17552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17553   (eval $ac_try) 2>&5
17554   ac_status=$?
17555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17556   (exit $ac_status); }; }; then
17557   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
17558 else
17559   echo "$as_me: failed program was:" >&5
17560 sed 's/^/| /' conftest.$ac_ext >&5
17561
17562 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
17563 fi
17564 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17565 LIBS=$ac_check_lib_save_LIBS
17566 fi
17567 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
17568 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
17569 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
17570   have_gdk_pixbuf=yes
17571 fi
17572
17573   CPPFLAGS="$ac_save_CPPFLAGS"
17574   LDFLAGS="$ac_save_LDFLAGS"
17575 #  LIBS="$ac_save_LIBS"
17576
17577     # library B...
17578     if test "$have_gdk_pixbuf" = yes; then
17579       have_gdk_pixbuf=no
17580
17581   ac_save_CPPFLAGS="$CPPFLAGS"
17582   ac_save_LDFLAGS="$LDFLAGS"
17583 #  ac_save_LIBS="$LIBS"
17584
17585   if test \! -z "$includedir" ; then
17586     CPPFLAGS="$CPPFLAGS -I$includedir"
17587   fi
17588   # note: $X_CFLAGS includes $x_includes
17589   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17590
17591   if test \! -z "$libdir" ; then
17592     LDFLAGS="$LDFLAGS -L$libdir"
17593   fi
17594   # note: $X_LIBS includes $x_libraries
17595   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17596
17597   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
17598 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
17599 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
17600   echo $ECHO_N "(cached) $ECHO_C" >&6
17601 else
17602   ac_check_lib_save_LIBS=$LIBS
17603 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17604 cat >conftest.$ac_ext <<_ACEOF
17605 #line $LINENO "configure"
17606 /* confdefs.h.  */
17607 _ACEOF
17608 cat confdefs.h >>conftest.$ac_ext
17609 cat >>conftest.$ac_ext <<_ACEOF
17610 /* end confdefs.h.  */
17611
17612 /* Override any gcc2 internal prototype to avoid an error.  */
17613 #ifdef __cplusplus
17614 extern "C"
17615 #endif
17616 /* We use char because int might match the return type of a gcc2
17617    builtin and then its argument prototype would still apply.  */
17618 char gdk_pixbuf_xlib_init ();
17619 int
17620 main ()
17621 {
17622 gdk_pixbuf_xlib_init ();
17623   ;
17624   return 0;
17625 }
17626 _ACEOF
17627 rm -f conftest.$ac_objext conftest$ac_exeext
17628 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17629   (eval $ac_link) 2>&5
17630   ac_status=$?
17631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17632   (exit $ac_status); } &&
17633          { ac_try='test -s conftest$ac_exeext'
17634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17635   (eval $ac_try) 2>&5
17636   ac_status=$?
17637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17638   (exit $ac_status); }; }; then
17639   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
17640 else
17641   echo "$as_me: failed program was:" >&5
17642 sed 's/^/| /' conftest.$ac_ext >&5
17643
17644 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
17645 fi
17646 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17647 LIBS=$ac_check_lib_save_LIBS
17648 fi
17649 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
17650 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
17651 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
17652   have_gdk_pixbuf=yes
17653                       gdk_pixbuf_halfassed=no
17654 fi
17655
17656   CPPFLAGS="$ac_save_CPPFLAGS"
17657   LDFLAGS="$ac_save_LDFLAGS"
17658 #  LIBS="$ac_save_LIBS"
17659
17660     fi
17661   fi
17662
17663   if test "$have_gdk_pixbuf" = yes; then
17664     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
17665     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
17666     cat >>confdefs.h <<\_ACEOF
17667 #define HAVE_GDK_PIXBUF 1
17668 _ACEOF
17669
17670   else
17671     have_gdk_pixbuf2=no
17672   fi
17673 fi
17674
17675
17676 ###############################################################################
17677 #
17678 #       Check for -ljpeg
17679 #
17680 ###############################################################################
17681
17682 have_jpeg=no
17683 with_jpeg_req=unspecified
17684 jpeg_halfassed=no
17685
17686 # Check whether --with-jpeg or --without-jpeg was given.
17687 if test "${with_jpeg+set}" = set; then
17688   withval="$with_jpeg"
17689   with_jpeg="$withval"; with_jpeg_req="$withval"
17690 else
17691   with_jpeg=yes
17692 fi;
17693
17694
17695    case "$with_jpeg" in
17696     yes) ;;
17697     no)  ;;
17698
17699     /*)
17700      echo "$as_me:$LINENO: checking for JPEG headers" >&5
17701 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
17702      d=$with_jpeg/include
17703      if test -d $d; then
17704        X_CFLAGS="-I$d $X_CFLAGS"
17705        echo "$as_me:$LINENO: result: $d" >&5
17706 echo "${ECHO_T}$d" >&6
17707      else
17708        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17709 echo "${ECHO_T}not found ($d: no such directory)" >&6
17710      fi
17711
17712      echo "$as_me:$LINENO: checking for JPEG libs" >&5
17713 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
17714      d=$with_jpeg/lib
17715      if test -d $d; then
17716        X_LIBS="-L$d $X_LIBS"
17717        echo "$as_me:$LINENO: result: $d" >&5
17718 echo "${ECHO_T}$d" >&6
17719      else
17720        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17721 echo "${ECHO_T}not found ($d: no such directory)" >&6
17722      fi
17723
17724      # replace the directory string with "yes".
17725      with_jpeg_req="yes"
17726      with_jpeg=$with_jpeg_req
17727      ;;
17728
17729     *)
17730      echo ""
17731      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
17732      echo "       If it is a directory, then \`DIR/include' will be added to"
17733      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17734      exit 1
17735      ;;
17736    esac
17737
17738
17739 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
17740   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
17741   exit 1
17742 fi
17743
17744 if test "$with_jpeg" = yes; then
17745
17746   have_jpeg=no
17747
17748   ac_save_CPPFLAGS="$CPPFLAGS"
17749   if test \! -z "$includedir" ; then
17750     CPPFLAGS="$CPPFLAGS -I$includedir"
17751   fi
17752   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17753   if test "${ac_cv_header_jpeglib_h+set}" = set; then
17754   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
17755 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
17756 if test "${ac_cv_header_jpeglib_h+set}" = set; then
17757   echo $ECHO_N "(cached) $ECHO_C" >&6
17758 fi
17759 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
17760 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
17761 else
17762   # Is the header compilable?
17763 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
17764 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
17765 cat >conftest.$ac_ext <<_ACEOF
17766 #line $LINENO "configure"
17767 /* confdefs.h.  */
17768 _ACEOF
17769 cat confdefs.h >>conftest.$ac_ext
17770 cat >>conftest.$ac_ext <<_ACEOF
17771 /* end confdefs.h.  */
17772 $ac_includes_default
17773 #include <jpeglib.h>
17774 _ACEOF
17775 rm -f conftest.$ac_objext
17776 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17777   (eval $ac_compile) 2>&5
17778   ac_status=$?
17779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17780   (exit $ac_status); } &&
17781          { ac_try='test -s conftest.$ac_objext'
17782   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17783   (eval $ac_try) 2>&5
17784   ac_status=$?
17785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17786   (exit $ac_status); }; }; then
17787   ac_header_compiler=yes
17788 else
17789   echo "$as_me: failed program was:" >&5
17790 sed 's/^/| /' conftest.$ac_ext >&5
17791
17792 ac_header_compiler=no
17793 fi
17794 rm -f conftest.$ac_objext conftest.$ac_ext
17795 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17796 echo "${ECHO_T}$ac_header_compiler" >&6
17797
17798 # Is the header present?
17799 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
17800 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
17801 cat >conftest.$ac_ext <<_ACEOF
17802 #line $LINENO "configure"
17803 /* confdefs.h.  */
17804 _ACEOF
17805 cat confdefs.h >>conftest.$ac_ext
17806 cat >>conftest.$ac_ext <<_ACEOF
17807 /* end confdefs.h.  */
17808 #include <jpeglib.h>
17809 _ACEOF
17810 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17811   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17812   ac_status=$?
17813   grep -v '^ *+' conftest.er1 >conftest.err
17814   rm -f conftest.er1
17815   cat conftest.err >&5
17816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17817   (exit $ac_status); } >/dev/null; then
17818   if test -s conftest.err; then
17819     ac_cpp_err=$ac_c_preproc_warn_flag
17820   else
17821     ac_cpp_err=
17822   fi
17823 else
17824   ac_cpp_err=yes
17825 fi
17826 if test -z "$ac_cpp_err"; then
17827   ac_header_preproc=yes
17828 else
17829   echo "$as_me: failed program was:" >&5
17830 sed 's/^/| /' conftest.$ac_ext >&5
17831
17832   ac_header_preproc=no
17833 fi
17834 rm -f conftest.err conftest.$ac_ext
17835 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17836 echo "${ECHO_T}$ac_header_preproc" >&6
17837
17838 # So?  What about this header?
17839 case $ac_header_compiler:$ac_header_preproc in
17840   yes:no )
17841     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17842 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17843     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
17844 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
17845     (
17846       cat <<\_ASBOX
17847 ## ------------------------------------ ##
17848 ## Report this to bug-autoconf@gnu.org. ##
17849 ## ------------------------------------ ##
17850 _ASBOX
17851     ) |
17852       sed "s/^/$as_me: WARNING:     /" >&2
17853     ;;
17854   no:yes )
17855     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
17856 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
17857     { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5
17858 echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;}
17859     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
17860 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
17861     (
17862       cat <<\_ASBOX
17863 ## ------------------------------------ ##
17864 ## Report this to bug-autoconf@gnu.org. ##
17865 ## ------------------------------------ ##
17866 _ASBOX
17867     ) |
17868       sed "s/^/$as_me: WARNING:     /" >&2
17869     ;;
17870 esac
17871 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
17872 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
17873 if test "${ac_cv_header_jpeglib_h+set}" = set; then
17874   echo $ECHO_N "(cached) $ECHO_C" >&6
17875 else
17876   ac_cv_header_jpeglib_h=$ac_header_preproc
17877 fi
17878 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
17879 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
17880
17881 fi
17882 if test $ac_cv_header_jpeglib_h = yes; then
17883   have_jpeg=yes
17884 fi
17885
17886
17887   CPPFLAGS="$ac_save_CPPFLAGS"
17888
17889   if test "$have_jpeg" = yes; then
17890     # we have the header, now check for the library
17891     have_jpeg=no
17892     jpeg_halfassed=yes
17893
17894   ac_save_CPPFLAGS="$CPPFLAGS"
17895   ac_save_LDFLAGS="$LDFLAGS"
17896 #  ac_save_LIBS="$LIBS"
17897
17898   if test \! -z "$includedir" ; then
17899     CPPFLAGS="$CPPFLAGS -I$includedir"
17900   fi
17901   # note: $X_CFLAGS includes $x_includes
17902   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17903
17904   if test \! -z "$libdir" ; then
17905     LDFLAGS="$LDFLAGS -L$libdir"
17906   fi
17907   # note: $X_LIBS includes $x_libraries
17908   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17909
17910   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
17911 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
17912 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
17913   echo $ECHO_N "(cached) $ECHO_C" >&6
17914 else
17915   ac_check_lib_save_LIBS=$LIBS
17916 LIBS="-ljpeg  $LIBS"
17917 cat >conftest.$ac_ext <<_ACEOF
17918 #line $LINENO "configure"
17919 /* confdefs.h.  */
17920 _ACEOF
17921 cat confdefs.h >>conftest.$ac_ext
17922 cat >>conftest.$ac_ext <<_ACEOF
17923 /* end confdefs.h.  */
17924
17925 /* Override any gcc2 internal prototype to avoid an error.  */
17926 #ifdef __cplusplus
17927 extern "C"
17928 #endif
17929 /* We use char because int might match the return type of a gcc2
17930    builtin and then its argument prototype would still apply.  */
17931 char jpeg_start_compress ();
17932 int
17933 main ()
17934 {
17935 jpeg_start_compress ();
17936   ;
17937   return 0;
17938 }
17939 _ACEOF
17940 rm -f conftest.$ac_objext conftest$ac_exeext
17941 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17942   (eval $ac_link) 2>&5
17943   ac_status=$?
17944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17945   (exit $ac_status); } &&
17946          { ac_try='test -s conftest$ac_exeext'
17947   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17948   (eval $ac_try) 2>&5
17949   ac_status=$?
17950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17951   (exit $ac_status); }; }; then
17952   ac_cv_lib_jpeg_jpeg_start_compress=yes
17953 else
17954   echo "$as_me: failed program was:" >&5
17955 sed 's/^/| /' conftest.$ac_ext >&5
17956
17957 ac_cv_lib_jpeg_jpeg_start_compress=no
17958 fi
17959 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17960 LIBS=$ac_check_lib_save_LIBS
17961 fi
17962 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
17963 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
17964 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
17965   have_jpeg=yes
17966                     jpeg_halfassed=no
17967                     JPEG_LIBS="-ljpeg"
17968                     cat >>confdefs.h <<\_ACEOF
17969 #define HAVE_JPEGLIB 1
17970 _ACEOF
17971
17972 fi
17973
17974   CPPFLAGS="$ac_save_CPPFLAGS"
17975   LDFLAGS="$ac_save_LDFLAGS"
17976 #  LIBS="$ac_save_LIBS"
17977
17978   fi
17979 fi
17980
17981
17982 ###############################################################################
17983 #
17984 #       Check for pty support for 'phosphor'
17985 #
17986 ###############################################################################
17987
17988 PTY_LIBS=
17989
17990
17991 for ac_header in pty.h util.h
17992 do
17993 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17994 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17995   echo "$as_me:$LINENO: checking for $ac_header" >&5
17996 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17997 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17998   echo $ECHO_N "(cached) $ECHO_C" >&6
17999 fi
18000 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18001 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18002 else
18003   # Is the header compilable?
18004 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18005 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18006 cat >conftest.$ac_ext <<_ACEOF
18007 #line $LINENO "configure"
18008 /* confdefs.h.  */
18009 _ACEOF
18010 cat confdefs.h >>conftest.$ac_ext
18011 cat >>conftest.$ac_ext <<_ACEOF
18012 /* end confdefs.h.  */
18013 $ac_includes_default
18014 #include <$ac_header>
18015 _ACEOF
18016 rm -f conftest.$ac_objext
18017 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18018   (eval $ac_compile) 2>&5
18019   ac_status=$?
18020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18021   (exit $ac_status); } &&
18022          { ac_try='test -s conftest.$ac_objext'
18023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18024   (eval $ac_try) 2>&5
18025   ac_status=$?
18026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18027   (exit $ac_status); }; }; then
18028   ac_header_compiler=yes
18029 else
18030   echo "$as_me: failed program was:" >&5
18031 sed 's/^/| /' conftest.$ac_ext >&5
18032
18033 ac_header_compiler=no
18034 fi
18035 rm -f conftest.$ac_objext conftest.$ac_ext
18036 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18037 echo "${ECHO_T}$ac_header_compiler" >&6
18038
18039 # Is the header present?
18040 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18041 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18042 cat >conftest.$ac_ext <<_ACEOF
18043 #line $LINENO "configure"
18044 /* confdefs.h.  */
18045 _ACEOF
18046 cat confdefs.h >>conftest.$ac_ext
18047 cat >>conftest.$ac_ext <<_ACEOF
18048 /* end confdefs.h.  */
18049 #include <$ac_header>
18050 _ACEOF
18051 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18052   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18053   ac_status=$?
18054   grep -v '^ *+' conftest.er1 >conftest.err
18055   rm -f conftest.er1
18056   cat conftest.err >&5
18057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18058   (exit $ac_status); } >/dev/null; then
18059   if test -s conftest.err; then
18060     ac_cpp_err=$ac_c_preproc_warn_flag
18061   else
18062     ac_cpp_err=
18063   fi
18064 else
18065   ac_cpp_err=yes
18066 fi
18067 if test -z "$ac_cpp_err"; then
18068   ac_header_preproc=yes
18069 else
18070   echo "$as_me: failed program was:" >&5
18071 sed 's/^/| /' conftest.$ac_ext >&5
18072
18073   ac_header_preproc=no
18074 fi
18075 rm -f conftest.err conftest.$ac_ext
18076 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18077 echo "${ECHO_T}$ac_header_preproc" >&6
18078
18079 # So?  What about this header?
18080 case $ac_header_compiler:$ac_header_preproc in
18081   yes:no )
18082     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18083 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18084     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18085 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18086     (
18087       cat <<\_ASBOX
18088 ## ------------------------------------ ##
18089 ## Report this to bug-autoconf@gnu.org. ##
18090 ## ------------------------------------ ##
18091 _ASBOX
18092     ) |
18093       sed "s/^/$as_me: WARNING:     /" >&2
18094     ;;
18095   no:yes )
18096     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18097 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18098     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18099 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18100     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18101 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18102     (
18103       cat <<\_ASBOX
18104 ## ------------------------------------ ##
18105 ## Report this to bug-autoconf@gnu.org. ##
18106 ## ------------------------------------ ##
18107 _ASBOX
18108     ) |
18109       sed "s/^/$as_me: WARNING:     /" >&2
18110     ;;
18111 esac
18112 echo "$as_me:$LINENO: checking for $ac_header" >&5
18113 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18114 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18115   echo $ECHO_N "(cached) $ECHO_C" >&6
18116 else
18117   eval "$as_ac_Header=$ac_header_preproc"
18118 fi
18119 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18120 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18121
18122 fi
18123 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18124   cat >>confdefs.h <<_ACEOF
18125 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18126 _ACEOF
18127
18128 fi
18129
18130 done
18131
18132
18133   ac_save_CPPFLAGS="$CPPFLAGS"
18134   ac_save_LDFLAGS="$LDFLAGS"
18135 #  ac_save_LIBS="$LIBS"
18136
18137   if test \! -z "$includedir" ; then
18138     CPPFLAGS="$CPPFLAGS -I$includedir"
18139   fi
18140   # note: $X_CFLAGS includes $x_includes
18141   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18142
18143   if test \! -z "$libdir" ; then
18144     LDFLAGS="$LDFLAGS -L$libdir"
18145   fi
18146   # note: $X_LIBS includes $x_libraries
18147   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18148
18149   echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18150 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
18151 if test "${ac_cv_lib_util_forkpty+set}" = set; then
18152   echo $ECHO_N "(cached) $ECHO_C" >&6
18153 else
18154   ac_check_lib_save_LIBS=$LIBS
18155 LIBS="-lutil  $LIBS"
18156 cat >conftest.$ac_ext <<_ACEOF
18157 #line $LINENO "configure"
18158 /* confdefs.h.  */
18159 _ACEOF
18160 cat confdefs.h >>conftest.$ac_ext
18161 cat >>conftest.$ac_ext <<_ACEOF
18162 /* end confdefs.h.  */
18163
18164 /* Override any gcc2 internal prototype to avoid an error.  */
18165 #ifdef __cplusplus
18166 extern "C"
18167 #endif
18168 /* We use char because int might match the return type of a gcc2
18169    builtin and then its argument prototype would still apply.  */
18170 char forkpty ();
18171 int
18172 main ()
18173 {
18174 forkpty ();
18175   ;
18176   return 0;
18177 }
18178 _ACEOF
18179 rm -f conftest.$ac_objext conftest$ac_exeext
18180 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18181   (eval $ac_link) 2>&5
18182   ac_status=$?
18183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18184   (exit $ac_status); } &&
18185          { ac_try='test -s conftest$ac_exeext'
18186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18187   (eval $ac_try) 2>&5
18188   ac_status=$?
18189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18190   (exit $ac_status); }; }; then
18191   ac_cv_lib_util_forkpty=yes
18192 else
18193   echo "$as_me: failed program was:" >&5
18194 sed 's/^/| /' conftest.$ac_ext >&5
18195
18196 ac_cv_lib_util_forkpty=no
18197 fi
18198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18199 LIBS=$ac_check_lib_save_LIBS
18200 fi
18201 echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18202 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
18203 if test $ac_cv_lib_util_forkpty = yes; then
18204   PTY_LIBS="-lutil"
18205                 cat >>confdefs.h <<\_ACEOF
18206 #define HAVE_FORKPTY 1
18207 _ACEOF
18208
18209 fi
18210
18211   CPPFLAGS="$ac_save_CPPFLAGS"
18212   LDFLAGS="$ac_save_LDFLAGS"
18213 #  LIBS="$ac_save_LIBS"
18214
18215
18216
18217 ###############################################################################
18218 #
18219 #       Check for the XSHM server extension.
18220 #
18221 ###############################################################################
18222
18223 have_xshm=no
18224 with_xshm_req=unspecified
18225
18226 # Check whether --with-xshm-ext or --without-xshm-ext was given.
18227 if test "${with_xshm_ext+set}" = set; then
18228   withval="$with_xshm_ext"
18229   with_xshm="$withval"; with_xshm_req="$withval"
18230 else
18231   with_xshm=yes
18232 fi;
18233
18234
18235    case "$with_xshm" in
18236     yes) ;;
18237     no)  ;;
18238
18239     /*)
18240      echo "$as_me:$LINENO: checking for XSHM headers" >&5
18241 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
18242      d=$with_xshm/include
18243      if test -d $d; then
18244        X_CFLAGS="-I$d $X_CFLAGS"
18245        echo "$as_me:$LINENO: result: $d" >&5
18246 echo "${ECHO_T}$d" >&6
18247      else
18248        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18249 echo "${ECHO_T}not found ($d: no such directory)" >&6
18250      fi
18251
18252      echo "$as_me:$LINENO: checking for XSHM libs" >&5
18253 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
18254      d=$with_xshm/lib
18255      if test -d $d; then
18256        X_LIBS="-L$d $X_LIBS"
18257        echo "$as_me:$LINENO: result: $d" >&5
18258 echo "${ECHO_T}$d" >&6
18259      else
18260        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18261 echo "${ECHO_T}not found ($d: no such directory)" >&6
18262      fi
18263
18264      # replace the directory string with "yes".
18265      with_xshm_req="yes"
18266      with_xshm=$with_xshm_req
18267      ;;
18268
18269     *)
18270      echo ""
18271      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
18272      echo "       If it is a directory, then \`DIR/include' will be added to"
18273      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18274      exit 1
18275      ;;
18276    esac
18277
18278
18279 if test "$with_xshm" = yes; then
18280
18281   # first check for Xshm.h.
18282
18283   ac_save_CPPFLAGS="$CPPFLAGS"
18284   if test \! -z "$includedir" ; then
18285     CPPFLAGS="$CPPFLAGS -I$includedir"
18286   fi
18287   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18288   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
18289 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
18290 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
18291   echo $ECHO_N "(cached) $ECHO_C" >&6
18292 else
18293   cat >conftest.$ac_ext <<_ACEOF
18294 #line $LINENO "configure"
18295 /* confdefs.h.  */
18296 _ACEOF
18297 cat confdefs.h >>conftest.$ac_ext
18298 cat >>conftest.$ac_ext <<_ACEOF
18299 /* end confdefs.h.  */
18300 #include <X11/Xlib.h>
18301
18302 #include <X11/extensions/XShm.h>
18303 _ACEOF
18304 rm -f conftest.$ac_objext
18305 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18306   (eval $ac_compile) 2>&5
18307   ac_status=$?
18308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18309   (exit $ac_status); } &&
18310          { ac_try='test -s conftest.$ac_objext'
18311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18312   (eval $ac_try) 2>&5
18313   ac_status=$?
18314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18315   (exit $ac_status); }; }; then
18316   ac_cv_header_X11_extensions_XShm_h=yes
18317 else
18318   echo "$as_me: failed program was:" >&5
18319 sed 's/^/| /' conftest.$ac_ext >&5
18320
18321 ac_cv_header_X11_extensions_XShm_h=no
18322 fi
18323 rm -f conftest.$ac_objext conftest.$ac_ext
18324 fi
18325 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
18326 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
18327 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
18328   have_xshm=yes
18329 fi
18330
18331
18332   CPPFLAGS="$ac_save_CPPFLAGS"
18333
18334   # if that succeeded, then check for sys/ipc.h.
18335   if test "$have_xshm" = yes; then
18336     have_xshm=no
18337
18338   ac_save_CPPFLAGS="$CPPFLAGS"
18339   if test \! -z "$includedir" ; then
18340     CPPFLAGS="$CPPFLAGS -I$includedir"
18341   fi
18342   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18343   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18344   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
18345 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
18346 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18347   echo $ECHO_N "(cached) $ECHO_C" >&6
18348 fi
18349 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
18350 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
18351 else
18352   # Is the header compilable?
18353 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
18354 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
18355 cat >conftest.$ac_ext <<_ACEOF
18356 #line $LINENO "configure"
18357 /* confdefs.h.  */
18358 _ACEOF
18359 cat confdefs.h >>conftest.$ac_ext
18360 cat >>conftest.$ac_ext <<_ACEOF
18361 /* end confdefs.h.  */
18362 $ac_includes_default
18363 #include <sys/ipc.h>
18364 _ACEOF
18365 rm -f conftest.$ac_objext
18366 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18367   (eval $ac_compile) 2>&5
18368   ac_status=$?
18369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18370   (exit $ac_status); } &&
18371          { ac_try='test -s conftest.$ac_objext'
18372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18373   (eval $ac_try) 2>&5
18374   ac_status=$?
18375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18376   (exit $ac_status); }; }; then
18377   ac_header_compiler=yes
18378 else
18379   echo "$as_me: failed program was:" >&5
18380 sed 's/^/| /' conftest.$ac_ext >&5
18381
18382 ac_header_compiler=no
18383 fi
18384 rm -f conftest.$ac_objext conftest.$ac_ext
18385 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18386 echo "${ECHO_T}$ac_header_compiler" >&6
18387
18388 # Is the header present?
18389 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
18390 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
18391 cat >conftest.$ac_ext <<_ACEOF
18392 #line $LINENO "configure"
18393 /* confdefs.h.  */
18394 _ACEOF
18395 cat confdefs.h >>conftest.$ac_ext
18396 cat >>conftest.$ac_ext <<_ACEOF
18397 /* end confdefs.h.  */
18398 #include <sys/ipc.h>
18399 _ACEOF
18400 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18401   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18402   ac_status=$?
18403   grep -v '^ *+' conftest.er1 >conftest.err
18404   rm -f conftest.er1
18405   cat conftest.err >&5
18406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18407   (exit $ac_status); } >/dev/null; then
18408   if test -s conftest.err; then
18409     ac_cpp_err=$ac_c_preproc_warn_flag
18410   else
18411     ac_cpp_err=
18412   fi
18413 else
18414   ac_cpp_err=yes
18415 fi
18416 if test -z "$ac_cpp_err"; then
18417   ac_header_preproc=yes
18418 else
18419   echo "$as_me: failed program was:" >&5
18420 sed 's/^/| /' conftest.$ac_ext >&5
18421
18422   ac_header_preproc=no
18423 fi
18424 rm -f conftest.err conftest.$ac_ext
18425 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18426 echo "${ECHO_T}$ac_header_preproc" >&6
18427
18428 # So?  What about this header?
18429 case $ac_header_compiler:$ac_header_preproc in
18430   yes:no )
18431     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
18432 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18433     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
18434 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
18435     (
18436       cat <<\_ASBOX
18437 ## ------------------------------------ ##
18438 ## Report this to bug-autoconf@gnu.org. ##
18439 ## ------------------------------------ ##
18440 _ASBOX
18441     ) |
18442       sed "s/^/$as_me: WARNING:     /" >&2
18443     ;;
18444   no:yes )
18445     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
18446 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
18447     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&5
18448 echo "$as_me: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&2;}
18449     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
18450 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
18451     (
18452       cat <<\_ASBOX
18453 ## ------------------------------------ ##
18454 ## Report this to bug-autoconf@gnu.org. ##
18455 ## ------------------------------------ ##
18456 _ASBOX
18457     ) |
18458       sed "s/^/$as_me: WARNING:     /" >&2
18459     ;;
18460 esac
18461 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
18462 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
18463 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18464   echo $ECHO_N "(cached) $ECHO_C" >&6
18465 else
18466   ac_cv_header_sys_ipc_h=$ac_header_preproc
18467 fi
18468 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
18469 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
18470
18471 fi
18472 if test $ac_cv_header_sys_ipc_h = yes; then
18473   have_xshm=yes
18474 fi
18475
18476
18477   CPPFLAGS="$ac_save_CPPFLAGS"
18478   fi
18479
18480   # if that succeeded, then check for sys/shm.h.
18481   if test "$have_xshm" = yes; then
18482     have_xshm=no
18483
18484   ac_save_CPPFLAGS="$CPPFLAGS"
18485   if test \! -z "$includedir" ; then
18486     CPPFLAGS="$CPPFLAGS -I$includedir"
18487   fi
18488   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18489   if test "${ac_cv_header_sys_shm_h+set}" = set; then
18490   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
18491 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
18492 if test "${ac_cv_header_sys_shm_h+set}" = set; then
18493   echo $ECHO_N "(cached) $ECHO_C" >&6
18494 fi
18495 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
18496 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
18497 else
18498   # Is the header compilable?
18499 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
18500 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
18501 cat >conftest.$ac_ext <<_ACEOF
18502 #line $LINENO "configure"
18503 /* confdefs.h.  */
18504 _ACEOF
18505 cat confdefs.h >>conftest.$ac_ext
18506 cat >>conftest.$ac_ext <<_ACEOF
18507 /* end confdefs.h.  */
18508 $ac_includes_default
18509 #include <sys/shm.h>
18510 _ACEOF
18511 rm -f conftest.$ac_objext
18512 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18513   (eval $ac_compile) 2>&5
18514   ac_status=$?
18515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18516   (exit $ac_status); } &&
18517          { ac_try='test -s conftest.$ac_objext'
18518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18519   (eval $ac_try) 2>&5
18520   ac_status=$?
18521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18522   (exit $ac_status); }; }; then
18523   ac_header_compiler=yes
18524 else
18525   echo "$as_me: failed program was:" >&5
18526 sed 's/^/| /' conftest.$ac_ext >&5
18527
18528 ac_header_compiler=no
18529 fi
18530 rm -f conftest.$ac_objext conftest.$ac_ext
18531 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18532 echo "${ECHO_T}$ac_header_compiler" >&6
18533
18534 # Is the header present?
18535 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
18536 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
18537 cat >conftest.$ac_ext <<_ACEOF
18538 #line $LINENO "configure"
18539 /* confdefs.h.  */
18540 _ACEOF
18541 cat confdefs.h >>conftest.$ac_ext
18542 cat >>conftest.$ac_ext <<_ACEOF
18543 /* end confdefs.h.  */
18544 #include <sys/shm.h>
18545 _ACEOF
18546 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18547   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18548   ac_status=$?
18549   grep -v '^ *+' conftest.er1 >conftest.err
18550   rm -f conftest.er1
18551   cat conftest.err >&5
18552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18553   (exit $ac_status); } >/dev/null; then
18554   if test -s conftest.err; then
18555     ac_cpp_err=$ac_c_preproc_warn_flag
18556   else
18557     ac_cpp_err=
18558   fi
18559 else
18560   ac_cpp_err=yes
18561 fi
18562 if test -z "$ac_cpp_err"; then
18563   ac_header_preproc=yes
18564 else
18565   echo "$as_me: failed program was:" >&5
18566 sed 's/^/| /' conftest.$ac_ext >&5
18567
18568   ac_header_preproc=no
18569 fi
18570 rm -f conftest.err conftest.$ac_ext
18571 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18572 echo "${ECHO_T}$ac_header_preproc" >&6
18573
18574 # So?  What about this header?
18575 case $ac_header_compiler:$ac_header_preproc in
18576   yes:no )
18577     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
18578 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18579     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
18580 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
18581     (
18582       cat <<\_ASBOX
18583 ## ------------------------------------ ##
18584 ## Report this to bug-autoconf@gnu.org. ##
18585 ## ------------------------------------ ##
18586 _ASBOX
18587     ) |
18588       sed "s/^/$as_me: WARNING:     /" >&2
18589     ;;
18590   no:yes )
18591     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
18592 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
18593     { echo "$as_me:$LINENO: WARNING: sys/shm.h: check for missing prerequisite headers?" >&5
18594 echo "$as_me: WARNING: sys/shm.h: check for missing prerequisite headers?" >&2;}
18595     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
18596 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
18597     (
18598       cat <<\_ASBOX
18599 ## ------------------------------------ ##
18600 ## Report this to bug-autoconf@gnu.org. ##
18601 ## ------------------------------------ ##
18602 _ASBOX
18603     ) |
18604       sed "s/^/$as_me: WARNING:     /" >&2
18605     ;;
18606 esac
18607 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
18608 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
18609 if test "${ac_cv_header_sys_shm_h+set}" = set; then
18610   echo $ECHO_N "(cached) $ECHO_C" >&6
18611 else
18612   ac_cv_header_sys_shm_h=$ac_header_preproc
18613 fi
18614 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
18615 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
18616
18617 fi
18618 if test $ac_cv_header_sys_shm_h = yes; then
18619   have_xshm=yes
18620 fi
18621
18622
18623   CPPFLAGS="$ac_save_CPPFLAGS"
18624   fi
18625
18626   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
18627   # to exist, but the library code to not exist.  And even better, the library
18628   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
18629   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
18630   # that's not quite right, but close enough.)
18631   #
18632   case "$host" in
18633     *-aix*)
18634       if  `uname -v` -eq 3 ; then
18635         have_xshm=no
18636
18637   ac_save_CPPFLAGS="$CPPFLAGS"
18638   ac_save_LDFLAGS="$LDFLAGS"
18639 #  ac_save_LIBS="$LIBS"
18640
18641   if test \! -z "$includedir" ; then
18642     CPPFLAGS="$CPPFLAGS -I$includedir"
18643   fi
18644   # note: $X_CFLAGS includes $x_includes
18645   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18646
18647   if test \! -z "$libdir" ; then
18648     LDFLAGS="$LDFLAGS -L$libdir"
18649   fi
18650   # note: $X_LIBS includes $x_libraries
18651   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18652
18653   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
18654 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
18655 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
18656   echo $ECHO_N "(cached) $ECHO_C" >&6
18657 else
18658   ac_check_lib_save_LIBS=$LIBS
18659 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
18660 cat >conftest.$ac_ext <<_ACEOF
18661 #line $LINENO "configure"
18662 /* confdefs.h.  */
18663 _ACEOF
18664 cat confdefs.h >>conftest.$ac_ext
18665 cat >>conftest.$ac_ext <<_ACEOF
18666 /* end confdefs.h.  */
18667
18668 /* Override any gcc2 internal prototype to avoid an error.  */
18669 #ifdef __cplusplus
18670 extern "C"
18671 #endif
18672 /* We use char because int might match the return type of a gcc2
18673    builtin and then its argument prototype would still apply.  */
18674 char XShmQueryExtension ();
18675 int
18676 main ()
18677 {
18678 XShmQueryExtension ();
18679   ;
18680   return 0;
18681 }
18682 _ACEOF
18683 rm -f conftest.$ac_objext conftest$ac_exeext
18684 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18685   (eval $ac_link) 2>&5
18686   ac_status=$?
18687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18688   (exit $ac_status); } &&
18689          { ac_try='test -s conftest$ac_exeext'
18690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18691   (eval $ac_try) 2>&5
18692   ac_status=$?
18693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18694   (exit $ac_status); }; }; then
18695   ac_cv_lib_XextSam_XShmQueryExtension=yes
18696 else
18697   echo "$as_me: failed program was:" >&5
18698 sed 's/^/| /' conftest.$ac_ext >&5
18699
18700 ac_cv_lib_XextSam_XShmQueryExtension=no
18701 fi
18702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18703 LIBS=$ac_check_lib_save_LIBS
18704 fi
18705 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
18706 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
18707 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
18708   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
18709 else
18710   true
18711 fi
18712
18713   CPPFLAGS="$ac_save_CPPFLAGS"
18714   LDFLAGS="$ac_save_LDFLAGS"
18715 #  LIBS="$ac_save_LIBS"
18716
18717       fi
18718     ;;
18719   esac
18720
18721   # if that succeeded, then we've really got it.
18722   if test "$have_xshm" = yes; then
18723     cat >>confdefs.h <<\_ACEOF
18724 #define HAVE_XSHM_EXTENSION 1
18725 _ACEOF
18726
18727   fi
18728
18729 elif test "$with_xshm" != no; then
18730   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
18731   exit 1
18732 fi
18733
18734
18735 ###############################################################################
18736 #
18737 #       Check for the DOUBLE-BUFFER server extension.
18738 #
18739 ###############################################################################
18740
18741 have_xdbe=no
18742 with_xdbe_req=unspecified
18743
18744 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
18745 if test "${with_xdbe_ext+set}" = set; then
18746   withval="$with_xdbe_ext"
18747   with_xdbe="$withval"; with_xdbe_req="$withval"
18748 else
18749   with_xdbe=yes
18750 fi;
18751
18752
18753    case "$with_xdbe" in
18754     yes) ;;
18755     no)  ;;
18756
18757     /*)
18758      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
18759 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
18760      d=$with_xdbe/include
18761      if test -d $d; then
18762        X_CFLAGS="-I$d $X_CFLAGS"
18763        echo "$as_me:$LINENO: result: $d" >&5
18764 echo "${ECHO_T}$d" >&6
18765      else
18766        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18767 echo "${ECHO_T}not found ($d: no such directory)" >&6
18768      fi
18769
18770      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
18771 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
18772      d=$with_xdbe/lib
18773      if test -d $d; then
18774        X_LIBS="-L$d $X_LIBS"
18775        echo "$as_me:$LINENO: result: $d" >&5
18776 echo "${ECHO_T}$d" >&6
18777      else
18778        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18779 echo "${ECHO_T}not found ($d: no such directory)" >&6
18780      fi
18781
18782      # replace the directory string with "yes".
18783      with_xdbe_req="yes"
18784      with_xdbe=$with_xdbe_req
18785      ;;
18786
18787     *)
18788      echo ""
18789      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
18790      echo "       If it is a directory, then \`DIR/include' will be added to"
18791      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18792      exit 1
18793      ;;
18794    esac
18795
18796
18797 if test "$with_xdbe" = yes; then
18798
18799
18800   ac_save_CPPFLAGS="$CPPFLAGS"
18801   if test \! -z "$includedir" ; then
18802     CPPFLAGS="$CPPFLAGS -I$includedir"
18803   fi
18804   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18805   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
18806 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
18807 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
18808   echo $ECHO_N "(cached) $ECHO_C" >&6
18809 else
18810   cat >conftest.$ac_ext <<_ACEOF
18811 #line $LINENO "configure"
18812 /* confdefs.h.  */
18813 _ACEOF
18814 cat confdefs.h >>conftest.$ac_ext
18815 cat >>conftest.$ac_ext <<_ACEOF
18816 /* end confdefs.h.  */
18817 #include <X11/Xlib.h>
18818
18819 #include <X11/extensions/Xdbe.h>
18820 _ACEOF
18821 rm -f conftest.$ac_objext
18822 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18823   (eval $ac_compile) 2>&5
18824   ac_status=$?
18825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18826   (exit $ac_status); } &&
18827          { ac_try='test -s conftest.$ac_objext'
18828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18829   (eval $ac_try) 2>&5
18830   ac_status=$?
18831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18832   (exit $ac_status); }; }; then
18833   ac_cv_header_X11_extensions_Xdbe_h=yes
18834 else
18835   echo "$as_me: failed program was:" >&5
18836 sed 's/^/| /' conftest.$ac_ext >&5
18837
18838 ac_cv_header_X11_extensions_Xdbe_h=no
18839 fi
18840 rm -f conftest.$ac_objext conftest.$ac_ext
18841 fi
18842 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
18843 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
18844 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
18845   have_xdbe=yes
18846 fi
18847
18848
18849   CPPFLAGS="$ac_save_CPPFLAGS"
18850   if test "$have_xdbe" = yes; then
18851     cat >>confdefs.h <<\_ACEOF
18852 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
18853 _ACEOF
18854
18855   fi
18856
18857 elif test "$with_xdbe" != no; then
18858   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
18859   exit 1
18860 fi
18861
18862
18863 ###############################################################################
18864 #
18865 #       Check for the SGI XReadDisplay server extension.
18866 #
18867 #       Note: this has to be down here, rather than up with the other server
18868 #       extension tests, so that the output of `configure --help' is in the
18869 #       right order.  Arrgh!
18870 #
18871 ###############################################################################
18872
18873 have_readdisplay=no
18874 with_readdisplay_req=unspecified
18875
18876 # Check whether --with-readdisplay or --without-readdisplay was given.
18877 if test "${with_readdisplay+set}" = set; then
18878   withval="$with_readdisplay"
18879   with_readdisplay="$withval"; with_readdisplay_req="$withval"
18880 else
18881   with_readdisplay=yes
18882 fi;
18883
18884
18885    case "$with_readdisplay" in
18886     yes) ;;
18887     no)  ;;
18888
18889     /*)
18890      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
18891 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
18892      d=$with_readdisplay/include
18893      if test -d $d; then
18894        X_CFLAGS="-I$d $X_CFLAGS"
18895        echo "$as_me:$LINENO: result: $d" >&5
18896 echo "${ECHO_T}$d" >&6
18897      else
18898        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18899 echo "${ECHO_T}not found ($d: no such directory)" >&6
18900      fi
18901
18902      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
18903 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
18904      d=$with_readdisplay/lib
18905      if test -d $d; then
18906        X_LIBS="-L$d $X_LIBS"
18907        echo "$as_me:$LINENO: result: $d" >&5
18908 echo "${ECHO_T}$d" >&6
18909      else
18910        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18911 echo "${ECHO_T}not found ($d: no such directory)" >&6
18912      fi
18913
18914      # replace the directory string with "yes".
18915      with_readdisplay_req="yes"
18916      with_readdisplay=$with_readdisplay_req
18917      ;;
18918
18919     *)
18920      echo ""
18921      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
18922      echo "       If it is a directory, then \`DIR/include' will be added to"
18923      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18924      exit 1
18925      ;;
18926    esac
18927
18928
18929 if test "$with_readdisplay" = yes; then
18930
18931   ac_save_CPPFLAGS="$CPPFLAGS"
18932   if test \! -z "$includedir" ; then
18933     CPPFLAGS="$CPPFLAGS -I$includedir"
18934   fi
18935   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18936   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
18937 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
18938 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
18939   echo $ECHO_N "(cached) $ECHO_C" >&6
18940 else
18941   cat >conftest.$ac_ext <<_ACEOF
18942 #line $LINENO "configure"
18943 /* confdefs.h.  */
18944 _ACEOF
18945 cat confdefs.h >>conftest.$ac_ext
18946 cat >>conftest.$ac_ext <<_ACEOF
18947 /* end confdefs.h.  */
18948 #include <X11/Xlib.h>
18949
18950 #include <X11/extensions/readdisplay.h>
18951 _ACEOF
18952 rm -f conftest.$ac_objext
18953 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18954   (eval $ac_compile) 2>&5
18955   ac_status=$?
18956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18957   (exit $ac_status); } &&
18958          { ac_try='test -s conftest.$ac_objext'
18959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18960   (eval $ac_try) 2>&5
18961   ac_status=$?
18962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18963   (exit $ac_status); }; }; then
18964   ac_cv_header_X11_extensions_readdisplay_h=yes
18965 else
18966   echo "$as_me: failed program was:" >&5
18967 sed 's/^/| /' conftest.$ac_ext >&5
18968
18969 ac_cv_header_X11_extensions_readdisplay_h=no
18970 fi
18971 rm -f conftest.$ac_objext conftest.$ac_ext
18972 fi
18973 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
18974 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
18975 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
18976   cat >>confdefs.h <<\_ACEOF
18977 #define HAVE_READ_DISPLAY_EXTENSION 1
18978 _ACEOF
18979
18980 fi
18981
18982
18983   CPPFLAGS="$ac_save_CPPFLAGS"
18984 elif test "$with_readdisplay" != no; then
18985   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
18986   exit 1
18987 fi
18988
18989
18990 ###############################################################################
18991 #
18992 #       Check for a program to generate random text.
18993 #
18994 #       Zippy is funnier than the idiocy generally spat out by `fortune',
18995 #       so first see if "fortune zippy" works.  Else, use plain "fortune".
18996 #
18997 #       We used to dig around in Emacs to look for the "yow" program, but
18998 #       most people who have Emacs also have "fortune zippy", so nevermind.
18999 #
19000 ###############################################################################
19001
19002 with_fortune_req=""
19003
19004 # Check whether --with-fortune or --without-fortune was given.
19005 if test "${with_fortune+set}" = set; then
19006   withval="$with_fortune"
19007   with_fortune_req="$withval"; with_fortune="$withval"
19008 else
19009   with_fortune=yes
19010 fi;
19011
19012 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
19013   with_fortune=""
19014   with_fortune_req=""
19015 fi
19016
19017 if test -n "$with_fortune_req" ; then
19018   ac_cv_fortune_program=""
19019   case "$with_fortune_req" in
19020     /*)
19021
19022       set dummy $with_fortune_req ; fortune_tmp=$2
19023       echo "$as_me:$LINENO: checking for $fortune_tmp" >&5
19024 echo $ECHO_N "checking for $fortune_tmp... $ECHO_C" >&6
19025       if test -x "$fortune_tmp" ; then
19026         echo "$as_me:$LINENO: result: yes" >&5
19027 echo "${ECHO_T}yes" >&6
19028       else
19029         echo "$as_me:$LINENO: result: no" >&5
19030 echo "${ECHO_T}no" >&6
19031         with_fortune=""
19032       fi
19033     ;;
19034     *)
19035       set dummy $with_fortune_req ; fortune_tmp=$2
19036       # don't cache
19037       unset ac_cv_path_fortune_tmp
19038       # Extract the first word of "$fortune_tmp", so it can be a program name with args.
19039 set dummy $fortune_tmp; ac_word=$2
19040 echo "$as_me:$LINENO: checking for $ac_word" >&5
19041 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19042 if test "${ac_cv_path_fortune_tmp+set}" = set; then
19043   echo $ECHO_N "(cached) $ECHO_C" >&6
19044 else
19045   case $fortune_tmp in
19046   [\\/]* | ?:[\\/]*)
19047   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
19048   ;;
19049   *)
19050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19051 for as_dir in $PATH
19052 do
19053   IFS=$as_save_IFS
19054   test -z "$as_dir" && as_dir=.
19055   for ac_exec_ext in '' $ac_executable_extensions; do
19056   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19057     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
19058     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19059     break 2
19060   fi
19061 done
19062 done
19063
19064   ;;
19065 esac
19066 fi
19067 fortune_tmp=$ac_cv_path_fortune_tmp
19068
19069 if test -n "$fortune_tmp"; then
19070   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
19071 echo "${ECHO_T}$fortune_tmp" >&6
19072 else
19073   echo "$as_me:$LINENO: result: no" >&5
19074 echo "${ECHO_T}no" >&6
19075 fi
19076
19077       if test -z "$fortune_tmp" ; then
19078         with_fortune=""
19079       fi
19080     ;;
19081   esac
19082   ac_cv_fortune_program="$with_fortune"
19083
19084 elif test -n "$ac_cv_fortune_program"; then
19085   echo "$as_me:$LINENO: result: checking for fortune... (cached) $ac_cv_fortune_program" >&5
19086 echo "${ECHO_T}checking for fortune... (cached) $ac_cv_fortune_program" >&6
19087 fi
19088
19089 unset ac_cv_path_fortune_tmp
19090 unset fortune_tmp
19091
19092 if test -z "$ac_cv_fortune_program" ; then
19093
19094   # first look for fortune in /usr/games/ (and use absolute path)
19095   for ac_prog in fortune
19096 do
19097   # Extract the first word of "$ac_prog", so it can be a program name with args.
19098 set dummy $ac_prog; ac_word=$2
19099 echo "$as_me:$LINENO: checking for $ac_word" >&5
19100 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19101 if test "${ac_cv_path_fortune_tmp+set}" = set; then
19102   echo $ECHO_N "(cached) $ECHO_C" >&6
19103 else
19104   case $fortune_tmp in
19105   [\\/]* | ?:[\\/]*)
19106   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
19107   ;;
19108   *)
19109   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19110 for as_dir in "/usr/games"
19111 do
19112   IFS=$as_save_IFS
19113   test -z "$as_dir" && as_dir=.
19114   for ac_exec_ext in '' $ac_executable_extensions; do
19115   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19116     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
19117     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19118     break 2
19119   fi
19120 done
19121 done
19122
19123   ;;
19124 esac
19125 fi
19126 fortune_tmp=$ac_cv_path_fortune_tmp
19127
19128 if test -n "$fortune_tmp"; then
19129   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
19130 echo "${ECHO_T}$fortune_tmp" >&6
19131 else
19132   echo "$as_me:$LINENO: result: no" >&5
19133 echo "${ECHO_T}no" >&6
19134 fi
19135
19136   test -n "$fortune_tmp" && break
19137 done
19138
19139
19140   # if it's not there, look on $PATH (and don't use absolute path)
19141   if test -z "$fortune_tmp" ; then
19142      for ac_prog in fortune
19143 do
19144   # Extract the first word of "$ac_prog", so it can be a program name with args.
19145 set dummy $ac_prog; ac_word=$2
19146 echo "$as_me:$LINENO: checking for $ac_word" >&5
19147 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19148 if test "${ac_cv_prog_fortune_tmp+set}" = set; then
19149   echo $ECHO_N "(cached) $ECHO_C" >&6
19150 else
19151   if test -n "$fortune_tmp"; then
19152   ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
19153 else
19154 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19155 for as_dir in $PATH
19156 do
19157   IFS=$as_save_IFS
19158   test -z "$as_dir" && as_dir=.
19159   for ac_exec_ext in '' $ac_executable_extensions; do
19160   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19161     ac_cv_prog_fortune_tmp="$ac_prog"
19162     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19163     break 2
19164   fi
19165 done
19166 done
19167
19168 fi
19169 fi
19170 fortune_tmp=$ac_cv_prog_fortune_tmp
19171 if test -n "$fortune_tmp"; then
19172   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
19173 echo "${ECHO_T}$fortune_tmp" >&6
19174 else
19175   echo "$as_me:$LINENO: result: no" >&5
19176 echo "${ECHO_T}no" >&6
19177 fi
19178
19179   test -n "$fortune_tmp" && break
19180 done
19181
19182   fi
19183
19184   # if we didn't find anything, then just assume /usr/games/
19185   if test -z "$fortune_tmp" ; then
19186      fortune_tmp="/usr/games/fortune"
19187   fi
19188
19189   ac_cv_fortune_program="$fortune_tmp"
19190
19191   # now check to see whether "fortune zippy" works.
19192   #
19193   fortune_tmp="$fortune_tmp zippy"
19194   echo "$as_me:$LINENO: checking for zippy quotes" >&5
19195 echo $ECHO_N "checking for zippy quotes... $ECHO_C" >&6
19196   if ( $fortune_tmp >/dev/null 2>&1 ); then
19197     ac_cv_fortune_program="$fortune_tmp"
19198     echo "$as_me:$LINENO: result: $fortune_tmp" >&5
19199 echo "${ECHO_T}$fortune_tmp" >&6
19200   else
19201     echo "$as_me:$LINENO: result: no" >&5
19202 echo "${ECHO_T}no" >&6
19203   fi
19204
19205 fi
19206
19207 unset ac_cv_path_fortune_tmp
19208 unset fortune_tmp
19209
19210 cat >>confdefs.h <<_ACEOF
19211 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
19212 _ACEOF
19213
19214
19215
19216 ###############################################################################
19217 #
19218 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
19219 #       This should be safe, but let's give people the option.
19220 #
19221 ###############################################################################
19222
19223 setuid_hacks_default=no
19224 setuid_hacks="$setuid_hacks_default"
19225
19226 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
19227 if test "${with_setuid_hacks+set}" = set; then
19228   withval="$with_setuid_hacks"
19229   setuid_hacks="$withval"
19230 else
19231   setuid_hacks="$setuid_hacks_default"
19232 fi;
19233
19234
19235    case "$setuid_hacks" in
19236     yes) ;;
19237     no)  ;;
19238
19239     /*)
19240      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
19241 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
19242      d=$setuid_hacks/include
19243      if test -d $d; then
19244        X_CFLAGS="-I$d $X_CFLAGS"
19245        echo "$as_me:$LINENO: result: $d" >&5
19246 echo "${ECHO_T}$d" >&6
19247      else
19248        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19249 echo "${ECHO_T}not found ($d: no such directory)" >&6
19250      fi
19251
19252      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
19253 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
19254      d=$setuid_hacks/lib
19255      if test -d $d; then
19256        X_LIBS="-L$d $X_LIBS"
19257        echo "$as_me:$LINENO: result: $d" >&5
19258 echo "${ECHO_T}$d" >&6
19259      else
19260        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19261 echo "${ECHO_T}not found ($d: no such directory)" >&6
19262      fi
19263
19264      # replace the directory string with "yes".
19265      setuid_hacks_req="yes"
19266      setuid_hacks=$setuid_hacks_req
19267      ;;
19268
19269     *)
19270      echo ""
19271      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
19272      echo "       If it is a directory, then \`DIR/include' will be added to"
19273      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19274      exit 1
19275      ;;
19276    esac
19277
19278
19279 if test "$setuid_hacks" = yes; then
19280   true
19281 elif test "$setuid_hacks" != no; then
19282   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
19283   exit 1
19284 fi
19285
19286
19287 ###############################################################################
19288 #
19289 #       Done testing.  Now, set up the various -I and -L variables,
19290 #       and decide which GUI program to build by default.
19291 #
19292 ###############################################################################
19293
19294 DEPEND=makedepend
19295 DEPEND_FLAGS=
19296 DEPEND_DEFINES=
19297
19298
19299 if test \! -z "$includedir" ; then
19300   INCLUDES="$INCLUDES -I$includedir"
19301 fi
19302
19303 if test \! -z "$libdir" ; then
19304   LDFLAGS="$LDFLAGS -L$libdir"
19305 fi
19306
19307
19308 PREFERRED_DEMO_PROGRAM=''
19309 ALL_DEMO_PROGRAMS=
19310 if test "$have_motif" = yes; then
19311   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
19312   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
19313 fi
19314 if test "$have_gtk" = yes; then
19315   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
19316   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
19317 fi
19318
19319
19320 if test "$have_kerberos" = yes; then
19321   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
19322   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
19323 fi
19324 if test "$have_pam" = yes; then
19325   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
19326   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
19327   INSTALL_PAM="install-pam"
19328 fi
19329 if test "$have_passwd_helper" = yes; then
19330   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
19331   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
19332 fi
19333   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
19334   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
19335
19336
19337 if test "$enable_locking" = yes; then
19338   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
19339   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
19340 else
19341   LOCK_SRCS='$(NOLOCK_SRCS_1)'
19342   LOCK_OBJS='$(NOLOCK_OBJS_1)'
19343 fi
19344
19345 if test "$ac_macosx" = yes; then
19346   EXES_OSX='$(EXES_OSX)'
19347   SCRIPTS_OSX='$(SCRIPTS_OSX)'
19348   MEN_OSX='$(MEN_OSX)'
19349 else
19350   EXES_OSX=
19351   SCRIPTS_OSX=
19352   MEN_OSX=
19353 fi
19354
19355
19356 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
19357
19358 if test "$need_setuid" = yes; then
19359   NEED_SETUID=yes
19360 else
19361   NEED_SETUID=no
19362 fi
19363
19364 if test "$setuid_hacks" = yes; then
19365   SETUID_HACKS=yes
19366 else
19367   SETUID_HACKS=no
19368 fi
19369
19370 tab='   '
19371 if test "$have_gl" = yes; then
19372   GL_EXES='$(GL_EXES)'
19373   GL_UTIL_EXES='$(GL_UTIL_EXES)'
19374   GL_MEN='$(GL_MEN)'
19375   GL_KLUDGE="${tab}  "
19376 else
19377   GL_KLUDGE="-${tab}  "
19378 fi
19379
19380 if test "$have_gle" = yes; then
19381   GLE_EXES='$(GLE_EXES)'
19382   GLE_KLUDGE="${tab}   "
19383 else
19384   GLE_KLUDGE="-${tab}   "
19385 fi
19386
19387 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
19388  JPEG_EXES='$(JPEG_EXES)'
19389 fi
19390
19391
19392 # Another substitution in the XScreenSaver.ad.in file:
19393 #
19394 if test "$have_gnome_help" = yes; then
19395   GNOMEHELP_Y=''
19396   GNOMEHELP_N='!    '
19397 else
19398   GNOMEHELP_Y='!    '
19399   GNOMEHELP_N=''
19400 fi
19401
19402
19403 # Now that we know whether we have Gnome, we can decide where the XML
19404 # config files get installed.
19405 #
19406 if test -z "$HACK_CONF_DIR" ; then
19407   if test -n "$GNOME_DATADIR" ; then
19408     HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
19409   else
19410     HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
19411   fi
19412 fi
19413
19414
19415
19416 # After computing $HACK_CONF_DIR, make sure $GLADE_DATADIR has a value
19417 # so that we know where to install the Gtk pixmaps.
19418 #
19419 # It should usually be "/usr/share/pixmaps/", but we can't just use
19420 # "$(prefix)/share/pixmaps" because that would usually result in
19421 # "/usr/X11R6/share/pixmaps/", which is wrong.  It needs to be the
19422 # Gnome/Gtk prefix, not the overall prefix.
19423 #
19424 if test -n "$GNOME_DATADIR" ; then
19425   GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver'
19426 elif test "$have_gtk" = yes; then
19427   if test -n "$pkg_config"; then
19428     if test "$have_gtk2" = yes; then
19429       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
19430     else
19431       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+`
19432     fi
19433   else
19434     GLADE_DATADIR=`$gtk_config --prefix`
19435   fi
19436   GLADE_DATADIR="$GLADE_DATADIR/share/xscreensaver"
19437 else
19438   GLADE_DATADIR=''
19439 fi
19440
19441
19442 # Set PO_DATADIR to something sensible.
19443 #
19444 echo "$as_me:$LINENO: checking for locale directory" >&5
19445 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
19446 if test -n "$GNOME_DATADIR" ; then
19447   PO_DATADIR="$GNOME_DATADIR"
19448 elif test "$have_gtk" = yes; then
19449   if test -n "$pkg_config"; then
19450     if test "$have_gtk2" = yes; then
19451       PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
19452     else
19453       PO_DATADIR=`$pkg_config --variable=prefix gtk+`
19454     fi
19455   else
19456     PO_DATADIR=`$gtk_config --prefix`
19457   fi
19458   PO_DATADIR="$PO_DATADIR/share"
19459 fi
19460
19461 if test -z "$PO_DATADIR" ; then
19462   #
19463   # #### Total fucking kludge --
19464   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
19465   # but of course we need to expand all the nested variables to do that...
19466   #
19467   dd=$datadir
19468   eval dd=${dd}
19469   eval dd=${dd}
19470   eval dd=${dd}
19471   eval dd=${dd}
19472   eval dd=${dd}
19473   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
19474 fi
19475
19476 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
19477 echo "${ECHO_T}$PO_DATADIR/locale" >&6
19478
19479
19480 # canonicalize slashes.
19481 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
19482
19483 # gcc 3.0 likes to issue this warning for every file:
19484 #
19485 # cc1: warning: changing search order for system directory "/usr/local/include"
19486 # cc1: warning:   as it has already been specified as a non-system directory
19487 #
19488 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
19489 # Which *should* be totally redundant, and thus an ok thing to delete?
19490 #
19491 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
19492
19493
19494 ###############################################################################
19495 #
19496 #       Perform substitutions and write Makefiles.
19497 #
19498 ###############################################################################
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554 APPDEFAULTS=$ac_x_app_defaults
19555
19556
19557
19558
19559
19560
19561
19562                                                                                 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"
19563 cat >confcache <<\_ACEOF
19564 # This file is a shell script that caches the results of configure
19565 # tests run on this system so they can be shared between configure
19566 # scripts and configure runs, see configure's option --config-cache.
19567 # It is not useful on other systems.  If it contains results you don't
19568 # want to keep, you may remove or edit it.
19569 #
19570 # config.status only pays attention to the cache file if you give it
19571 # the --recheck option to rerun configure.
19572 #
19573 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19574 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19575 # following values.
19576
19577 _ACEOF
19578
19579 # The following way of writing the cache mishandles newlines in values,
19580 # but we know of no workaround that is simple, portable, and efficient.
19581 # So, don't put newlines in cache variables' values.
19582 # Ultrix sh set writes to stderr and can't be redirected directly,
19583 # and sets the high bit in the cache file unless we assign to the vars.
19584 {
19585   (set) 2>&1 |
19586     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19587     *ac_space=\ *)
19588       # `set' does not quote correctly, so add quotes (double-quote
19589       # substitution turns \\\\ into \\, and sed turns \\ into \).
19590       sed -n \
19591         "s/'/'\\\\''/g;
19592           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19593       ;;
19594     *)
19595       # `set' quotes correctly as required by POSIX, so do not add quotes.
19596       sed -n \
19597         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19598       ;;
19599     esac;
19600 } |
19601   sed '
19602      t clear
19603      : clear
19604      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19605      t end
19606      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19607      : end' >>confcache
19608 if diff $cache_file confcache >/dev/null 2>&1; then :; else
19609   if test -w $cache_file; then
19610     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19611     cat confcache >$cache_file
19612   else
19613     echo "not updating unwritable cache $cache_file"
19614   fi
19615 fi
19616 rm -f confcache
19617
19618 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19619 # Let make expand exec_prefix.
19620 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19621
19622 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19623 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19624 # trailing colons and then remove the whole line if VPATH becomes empty
19625 # (actually we leave an empty line to preserve line numbers).
19626 if test "x$srcdir" = x.; then
19627   ac_vpsub='/^[         ]*VPATH[        ]*=/{
19628 s/:*\$(srcdir):*/:/;
19629 s/:*\${srcdir}:*/:/;
19630 s/:*@srcdir@:*/:/;
19631 s/^\([^=]*=[    ]*\):*/\1/;
19632 s/:*$//;
19633 s/^[^=]*=[      ]*$//;
19634 }'
19635 fi
19636
19637 DEFS=-DHAVE_CONFIG_H
19638
19639 ac_libobjs=
19640 ac_ltlibobjs=
19641 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19642   # 1. Remove the extension, and $U if already installed.
19643   ac_i=`echo "$ac_i" |
19644          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
19645   # 2. Add them.
19646   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
19647   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
19648 done
19649 LIBOBJS=$ac_libobjs
19650
19651 LTLIBOBJS=$ac_ltlibobjs
19652
19653
19654
19655
19656         mv -f po/POTFILES po/POTFILES.tmp
19657         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
19658         rm -f po/POTFILES.tmp
19659
19660
19661
19662 : ${CONFIG_STATUS=./config.status}
19663 ac_clean_files_save=$ac_clean_files
19664 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19665 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
19666 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19667 cat >$CONFIG_STATUS <<_ACEOF
19668 #! $SHELL
19669 # Generated by $as_me.
19670 # Run this file to recreate the current configuration.
19671 # Compiler output produced by configure, useful for debugging
19672 # configure, is in config.log if it exists.
19673
19674 debug=false
19675 ac_cs_recheck=false
19676 ac_cs_silent=false
19677 SHELL=\${CONFIG_SHELL-$SHELL}
19678 _ACEOF
19679
19680 cat >>$CONFIG_STATUS <<\_ACEOF
19681 ## --------------------- ##
19682 ## M4sh Initialization.  ##
19683 ## --------------------- ##
19684
19685 # Be Bourne compatible
19686 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19687   emulate sh
19688   NULLCMD=:
19689   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19690   # is contrary to our usage.  Disable this feature.
19691   alias -g '${1+"$@"}'='"$@"'
19692 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19693   set -o posix
19694 fi
19695
19696 # Support unset when possible.
19697 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19698   as_unset=unset
19699 else
19700   as_unset=false
19701 fi
19702
19703
19704 # Work around bugs in pre-3.0 UWIN ksh.
19705 $as_unset ENV MAIL MAILPATH
19706 PS1='$ '
19707 PS2='> '
19708 PS4='+ '
19709
19710 # NLS nuisances.
19711 for as_var in \
19712   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
19713   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
19714   LC_TELEPHONE LC_TIME
19715 do
19716   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
19717     eval $as_var=C; export $as_var
19718   else
19719     $as_unset $as_var
19720   fi
19721 done
19722
19723 # Required to use basename.
19724 if expr a : '\(a\)' >/dev/null 2>&1; then
19725   as_expr=expr
19726 else
19727   as_expr=false
19728 fi
19729
19730 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
19731   as_basename=basename
19732 else
19733   as_basename=false
19734 fi
19735
19736
19737 # Name of the executable.
19738 as_me=`$as_basename "$0" ||
19739 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19740          X"$0" : 'X\(//\)$' \| \
19741          X"$0" : 'X\(/\)$' \| \
19742          .     : '\(.\)' 2>/dev/null ||
19743 echo X/"$0" |
19744     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
19745           /^X\/\(\/\/\)$/{ s//\1/; q; }
19746           /^X\/\(\/\).*/{ s//\1/; q; }
19747           s/.*/./; q'`
19748
19749
19750 # PATH needs CR, and LINENO needs CR and PATH.
19751 # Avoid depending upon Character Ranges.
19752 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19753 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19754 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19755 as_cr_digits='0123456789'
19756 as_cr_alnum=$as_cr_Letters$as_cr_digits
19757
19758 # The user is always right.
19759 if test "${PATH_SEPARATOR+set}" != set; then
19760   echo "#! /bin/sh" >conf$$.sh
19761   echo  "exit 0"   >>conf$$.sh
19762   chmod +x conf$$.sh
19763   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
19764     PATH_SEPARATOR=';'
19765   else
19766     PATH_SEPARATOR=:
19767   fi
19768   rm -f conf$$.sh
19769 fi
19770
19771
19772   as_lineno_1=$LINENO
19773   as_lineno_2=$LINENO
19774   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19775   test "x$as_lineno_1" != "x$as_lineno_2" &&
19776   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
19777   # Find who we are.  Look in the path if we contain no path at all
19778   # relative or not.
19779   case $0 in
19780     *[\\/]* ) as_myself=$0 ;;
19781     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19782 for as_dir in $PATH
19783 do
19784   IFS=$as_save_IFS
19785   test -z "$as_dir" && as_dir=.
19786   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19787 done
19788
19789        ;;
19790   esac
19791   # We did not find ourselves, most probably we were run as `sh COMMAND'
19792   # in which case we are not to be found in the path.
19793   if test "x$as_myself" = x; then
19794     as_myself=$0
19795   fi
19796   if test ! -f "$as_myself"; then
19797     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
19798 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
19799    { (exit 1); exit 1; }; }
19800   fi
19801   case $CONFIG_SHELL in
19802   '')
19803     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19804 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
19805 do
19806   IFS=$as_save_IFS
19807   test -z "$as_dir" && as_dir=.
19808   for as_base in sh bash ksh sh5; do
19809          case $as_dir in
19810          /*)
19811            if ("$as_dir/$as_base" -c '
19812   as_lineno_1=$LINENO
19813   as_lineno_2=$LINENO
19814   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19815   test "x$as_lineno_1" != "x$as_lineno_2" &&
19816   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
19817              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
19818              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
19819              CONFIG_SHELL=$as_dir/$as_base
19820              export CONFIG_SHELL
19821              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
19822            fi;;
19823          esac
19824        done
19825 done
19826 ;;
19827   esac
19828
19829   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
19830   # uniformly replaced by the line number.  The first 'sed' inserts a
19831   # line-number line before each line; the second 'sed' does the real
19832   # work.  The second script uses 'N' to pair each line-number line
19833   # with the numbered line, and appends trailing '-' during
19834   # substitution so that $LINENO is not a special case at line end.
19835   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
19836   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
19837   sed '=' <$as_myself |
19838     sed '
19839       N
19840       s,$,-,
19841       : loop
19842       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
19843       t loop
19844       s,-$,,
19845       s,^['$as_cr_digits']*\n,,
19846     ' >$as_me.lineno &&
19847   chmod +x $as_me.lineno ||
19848     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
19849 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
19850    { (exit 1); exit 1; }; }
19851
19852   # Don't try to exec as it changes $[0], causing all sort of problems
19853   # (the dirname of $[0] is not the place where we might find the
19854   # original and so on.  Autoconf is especially sensible to this).
19855   . ./$as_me.lineno
19856   # Exit status is that of the last command.
19857   exit
19858 }
19859
19860
19861 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
19862   *c*,-n*) ECHO_N= ECHO_C='
19863 ' ECHO_T='      ' ;;
19864   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
19865   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
19866 esac
19867
19868 if expr a : '\(a\)' >/dev/null 2>&1; then
19869   as_expr=expr
19870 else
19871   as_expr=false
19872 fi
19873
19874 rm -f conf$$ conf$$.exe conf$$.file
19875 echo >conf$$.file
19876 if ln -s conf$$.file conf$$ 2>/dev/null; then
19877   # We could just check for DJGPP; but this test a) works b) is more generic
19878   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19879   if test -f conf$$.exe; then
19880     # Don't use ln at all; we don't have any links
19881     as_ln_s='cp -p'
19882   else
19883     as_ln_s='ln -s'
19884   fi
19885 elif ln conf$$.file conf$$ 2>/dev/null; then
19886   as_ln_s=ln
19887 else
19888   as_ln_s='cp -p'
19889 fi
19890 rm -f conf$$ conf$$.exe conf$$.file
19891
19892 if mkdir -p . 2>/dev/null; then
19893   as_mkdir_p=:
19894 else
19895   as_mkdir_p=false
19896 fi
19897
19898 as_executable_p="test -f"
19899
19900 # Sed expression to map a string onto a valid CPP name.
19901 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
19902
19903 # Sed expression to map a string onto a valid variable name.
19904 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19905
19906
19907 # IFS
19908 # We need space, tab and new line, in precisely that order.
19909 as_nl='
19910 '
19911 IFS="   $as_nl"
19912
19913 # CDPATH.
19914 $as_unset CDPATH
19915
19916 exec 6>&1
19917
19918 # Open the log real soon, to keep \$[0] and so on meaningful, and to
19919 # report actual input values of CONFIG_FILES etc. instead of their
19920 # values after options handling.  Logging --version etc. is OK.
19921 exec 5>>config.log
19922 {
19923   echo
19924   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19925 ## Running $as_me. ##
19926 _ASBOX
19927 } >&5
19928 cat >&5 <<_CSEOF
19929
19930 This file was extended by $as_me, which was
19931 generated by GNU Autoconf 2.57.  Invocation command line was
19932
19933   CONFIG_FILES    = $CONFIG_FILES
19934   CONFIG_HEADERS  = $CONFIG_HEADERS
19935   CONFIG_LINKS    = $CONFIG_LINKS
19936   CONFIG_COMMANDS = $CONFIG_COMMANDS
19937   $ $0 $@
19938
19939 _CSEOF
19940 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19941 echo >&5
19942 _ACEOF
19943
19944 # Files that config.status was made for.
19945 if test -n "$ac_config_files"; then
19946   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19947 fi
19948
19949 if test -n "$ac_config_headers"; then
19950   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19951 fi
19952
19953 if test -n "$ac_config_links"; then
19954   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19955 fi
19956
19957 if test -n "$ac_config_commands"; then
19958   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19959 fi
19960
19961 cat >>$CONFIG_STATUS <<\_ACEOF
19962
19963 ac_cs_usage="\
19964 \`$as_me' instantiates files from templates according to the
19965 current configuration.
19966
19967 Usage: $0 [OPTIONS] [FILE]...
19968
19969   -h, --help       print this help, then exit
19970   -V, --version    print version number, then exit
19971   -q, --quiet      do not print progress messages
19972   -d, --debug      don't remove temporary files
19973       --recheck    update $as_me by reconfiguring in the same conditions
19974   --file=FILE[:TEMPLATE]
19975                    instantiate the configuration file FILE
19976   --header=FILE[:TEMPLATE]
19977                    instantiate the configuration header FILE
19978
19979 Configuration files:
19980 $config_files
19981
19982 Configuration headers:
19983 $config_headers
19984
19985 Configuration commands:
19986 $config_commands
19987
19988 Report bugs to <bug-autoconf@gnu.org>."
19989 _ACEOF
19990
19991 cat >>$CONFIG_STATUS <<_ACEOF
19992 ac_cs_version="\\
19993 config.status
19994 configured by $0, generated by GNU Autoconf 2.57,
19995   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19996
19997 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19998 Free Software Foundation, Inc.
19999 This config.status script is free software; the Free Software Foundation
20000 gives unlimited permission to copy, distribute and modify it."
20001 srcdir=$srcdir
20002 INSTALL="$INSTALL"
20003 _ACEOF
20004
20005 cat >>$CONFIG_STATUS <<\_ACEOF
20006 # If no file are specified by the user, then we need to provide default
20007 # value.  By we need to know if files were specified by the user.
20008 ac_need_defaults=:
20009 while test $# != 0
20010 do
20011   case $1 in
20012   --*=*)
20013     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20014     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20015     ac_shift=:
20016     ;;
20017   -*)
20018     ac_option=$1
20019     ac_optarg=$2
20020     ac_shift=shift
20021     ;;
20022   *) # This is not an option, so the user has probably given explicit
20023      # arguments.
20024      ac_option=$1
20025      ac_need_defaults=false;;
20026   esac
20027
20028   case $ac_option in
20029   # Handling of the options.
20030 _ACEOF
20031 cat >>$CONFIG_STATUS <<\_ACEOF
20032   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20033     ac_cs_recheck=: ;;
20034   --version | --vers* | -V )
20035     echo "$ac_cs_version"; exit 0 ;;
20036   --he | --h)
20037     # Conflict between --help and --header
20038     { { echo "$as_me:$LINENO: error: ambiguous option: $1
20039 Try \`$0 --help' for more information." >&5
20040 echo "$as_me: error: ambiguous option: $1
20041 Try \`$0 --help' for more information." >&2;}
20042    { (exit 1); exit 1; }; };;
20043   --help | --hel | -h )
20044     echo "$ac_cs_usage"; exit 0 ;;
20045   --debug | --d* | -d )
20046     debug=: ;;
20047   --file | --fil | --fi | --f )
20048     $ac_shift
20049     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
20050     ac_need_defaults=false;;
20051   --header | --heade | --head | --hea )
20052     $ac_shift
20053     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
20054     ac_need_defaults=false;;
20055   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20056   | -silent | --silent | --silen | --sile | --sil | --si | --s)
20057     ac_cs_silent=: ;;
20058
20059   # This is an error.
20060   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
20061 Try \`$0 --help' for more information." >&5
20062 echo "$as_me: error: unrecognized option: $1
20063 Try \`$0 --help' for more information." >&2;}
20064    { (exit 1); exit 1; }; } ;;
20065
20066   *) ac_config_targets="$ac_config_targets $1" ;;
20067
20068   esac
20069   shift
20070 done
20071
20072 ac_configure_extra_args=
20073
20074 if $ac_cs_silent; then
20075   exec 6>/dev/null
20076   ac_configure_extra_args="$ac_configure_extra_args --silent"
20077 fi
20078
20079 _ACEOF
20080 cat >>$CONFIG_STATUS <<_ACEOF
20081 if \$ac_cs_recheck; then
20082   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
20083   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20084 fi
20085
20086 _ACEOF
20087
20088 cat >>$CONFIG_STATUS <<_ACEOF
20089 #
20090 # INIT-COMMANDS section.
20091 #
20092
20093 INTLTOOL_PERL=${INTLTOOL_PERL}
20094
20095
20096 _ACEOF
20097
20098
20099
20100 cat >>$CONFIG_STATUS <<\_ACEOF
20101 for ac_config_target in $ac_config_targets
20102 do
20103   case "$ac_config_target" in
20104   # Handling of arguments.
20105   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20106   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
20107   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
20108   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
20109   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
20110   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
20111   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
20112   "driver/xscreensaver.kss" ) CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.kss" ;;
20113   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
20114   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
20115   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
20116   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
20117 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20118    { (exit 1); exit 1; }; };;
20119   esac
20120 done
20121
20122 # If the user did not use the arguments to specify the items to instantiate,
20123 # then the envvar interface is used.  Set only those that are not.
20124 # We use the long form for the default assignment because of an extremely
20125 # bizarre bug on SunOS 4.1.3.
20126 if $ac_need_defaults; then
20127   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20128   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20129   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20130 fi
20131
20132 # Have a temporary directory for convenience.  Make it in the build tree
20133 # simply because there is no reason to put it here, and in addition,
20134 # creating and moving files from /tmp can sometimes cause problems.
20135 # Create a temporary directory, and hook for its removal unless debugging.
20136 $debug ||
20137 {
20138   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20139   trap '{ (exit 1); exit 1; }' 1 2 13 15
20140 }
20141
20142 # Create a (secure) tmp directory for tmp files.
20143
20144 {
20145   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
20146   test -n "$tmp" && test -d "$tmp"
20147 }  ||
20148 {
20149   tmp=./confstat$$-$RANDOM
20150   (umask 077 && mkdir $tmp)
20151 } ||
20152 {
20153    echo "$me: cannot create a temporary directory in ." >&2
20154    { (exit 1); exit 1; }
20155 }
20156
20157 _ACEOF
20158
20159 cat >>$CONFIG_STATUS <<_ACEOF
20160
20161 #
20162 # CONFIG_FILES section.
20163 #
20164
20165 # No need to generate the scripts if there are no CONFIG_FILES.
20166 # This happens for instance when ./config.status config.h
20167 if test -n "\$CONFIG_FILES"; then
20168   # Protect against being on the right side of a sed subst in config.status.
20169   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20170    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20171 s,@SHELL@,$SHELL,;t t
20172 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20173 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20174 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20175 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20176 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20177 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20178 s,@exec_prefix@,$exec_prefix,;t t
20179 s,@prefix@,$prefix,;t t
20180 s,@program_transform_name@,$program_transform_name,;t t
20181 s,@bindir@,$bindir,;t t
20182 s,@sbindir@,$sbindir,;t t
20183 s,@libexecdir@,$libexecdir,;t t
20184 s,@datadir@,$datadir,;t t
20185 s,@sysconfdir@,$sysconfdir,;t t
20186 s,@sharedstatedir@,$sharedstatedir,;t t
20187 s,@localstatedir@,$localstatedir,;t t
20188 s,@libdir@,$libdir,;t t
20189 s,@includedir@,$includedir,;t t
20190 s,@oldincludedir@,$oldincludedir,;t t
20191 s,@infodir@,$infodir,;t t
20192 s,@mandir@,$mandir,;t t
20193 s,@build_alias@,$build_alias,;t t
20194 s,@host_alias@,$host_alias,;t t
20195 s,@target_alias@,$target_alias,;t t
20196 s,@DEFS@,$DEFS,;t t
20197 s,@ECHO_C@,$ECHO_C,;t t
20198 s,@ECHO_N@,$ECHO_N,;t t
20199 s,@ECHO_T@,$ECHO_T,;t t
20200 s,@LIBS@,$LIBS,;t t
20201 s,@build@,$build,;t t
20202 s,@build_cpu@,$build_cpu,;t t
20203 s,@build_vendor@,$build_vendor,;t t
20204 s,@build_os@,$build_os,;t t
20205 s,@host@,$host,;t t
20206 s,@host_cpu@,$host_cpu,;t t
20207 s,@host_vendor@,$host_vendor,;t t
20208 s,@host_os@,$host_os,;t t
20209 s,@CC@,$CC,;t t
20210 s,@CFLAGS@,$CFLAGS,;t t
20211 s,@LDFLAGS@,$LDFLAGS,;t t
20212 s,@CPPFLAGS@,$CPPFLAGS,;t t
20213 s,@ac_ct_CC@,$ac_ct_CC,;t t
20214 s,@EXEEXT@,$EXEEXT,;t t
20215 s,@OBJEXT@,$OBJEXT,;t t
20216 s,@CPP@,$CPP,;t t
20217 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20218 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20219 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20220 s,@SET_MAKE@,$SET_MAKE,;t t
20221 s,@EGREP@,$EGREP,;t t
20222 s,@PERL@,$PERL,;t t
20223 s,@X_CFLAGS@,$X_CFLAGS,;t t
20224 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
20225 s,@X_LIBS@,$X_LIBS,;t t
20226 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
20227 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
20228 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
20229 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
20230 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
20231 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
20232 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
20233 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
20234 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
20235 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
20236 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
20237 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
20238 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
20239 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
20240 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
20241 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
20242 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
20243 s,@RANLIB@,$RANLIB,;t t
20244 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20245 s,@ALLOCA@,$ALLOCA,;t t
20246 s,@USE_NLS@,$USE_NLS,;t t
20247 s,@MSGFMT@,$MSGFMT,;t t
20248 s,@GMSGFMT@,$GMSGFMT,;t t
20249 s,@XGETTEXT@,$XGETTEXT,;t t
20250 s,@CATALOGS@,$CATALOGS,;t t
20251 s,@CATOBJEXT@,$CATOBJEXT,;t t
20252 s,@DATADIRNAME@,$DATADIRNAME,;t t
20253 s,@GMOFILES@,$GMOFILES,;t t
20254 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
20255 s,@INTLDEPS@,$INTLDEPS,;t t
20256 s,@INTLLIBS@,$INTLLIBS,;t t
20257 s,@INTLOBJS@,$INTLOBJS,;t t
20258 s,@POFILES@,$POFILES,;t t
20259 s,@POSUB@,$POSUB,;t t
20260 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
20261 s,@pkg_config@,$pkg_config,;t t
20262 s,@glib_config@,$glib_config,;t t
20263 s,@gtk_config@,$gtk_config,;t t
20264 s,@gnome_config@,$gnome_config,;t t
20265 s,@have_gnome_help@,$have_gnome_help,;t t
20266 s,@xml_config@,$xml_config,;t t
20267 s,@gdk_pixbuf_config@,$gdk_pixbuf_config,;t t
20268 s,@fortune_tmp@,$fortune_tmp,;t t
20269 s,@INCLUDES@,$INCLUDES,;t t
20270 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
20271 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
20272 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
20273 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
20274 s,@GTK_LIBS@,$GTK_LIBS,;t t
20275 s,@XML_LIBS@,$XML_LIBS,;t t
20276 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
20277 s,@HACK_LIBS@,$HACK_LIBS,;t t
20278 s,@XPM_LIBS@,$XPM_LIBS,;t t
20279 s,@PTY_LIBS@,$PTY_LIBS,;t t
20280 s,@GL_LIBS@,$GL_LIBS,;t t
20281 s,@GLE_LIBS@,$GLE_LIBS,;t t
20282 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
20283 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
20284 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
20285 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
20286 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
20287 s,@NEED_SETUID@,$NEED_SETUID,;t t
20288 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
20289 s,@OBJCC@,$OBJCC,;t t
20290 s,@EXES_OSX@,$EXES_OSX,;t t
20291 s,@SCRIPTS_OSX@,$SCRIPTS_OSX,;t t
20292 s,@MEN_OSX@,$MEN_OSX,;t t
20293 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
20294 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
20295 s,@XMU_SRCS@,$XMU_SRCS,;t t
20296 s,@XMU_OBJS@,$XMU_OBJS,;t t
20297 s,@XMU_LIBS@,$XMU_LIBS,;t t
20298 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
20299 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
20300 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
20301 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
20302 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
20303 s,@JPEG_EXES@,$JPEG_EXES,;t t
20304 s,@GL_EXES@,$GL_EXES,;t t
20305 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
20306 s,@GL_MEN@,$GL_MEN,;t t
20307 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
20308 s,@GLE_EXES@,$GLE_EXES,;t t
20309 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
20310 s,@GNOMEHELP_Y@,$GNOMEHELP_Y,;t t
20311 s,@GNOMEHELP_N@,$GNOMEHELP_N,;t t
20312 s,@HACKDIR@,$HACKDIR,;t t
20313 s,@GNOME_DATADIR@,$GNOME_DATADIR,;t t
20314 s,@GLADE_DATADIR@,$GLADE_DATADIR,;t t
20315 s,@PO_DATADIR@,$PO_DATADIR,;t t
20316 s,@GNOME_PANELDIR@,$GNOME_PANELDIR,;t t
20317 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
20318 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
20319 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
20320 s,@DEPEND@,$DEPEND,;t t
20321 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
20322 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
20323 s,@LIBOBJS@,$LIBOBJS,;t t
20324 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
20325 CEOF
20326
20327 _ACEOF
20328
20329   cat >>$CONFIG_STATUS <<\_ACEOF
20330   # Split the substitutions into bite-sized pieces for seds with
20331   # small command number limits, like on Digital OSF/1 and HP-UX.
20332   ac_max_sed_lines=48
20333   ac_sed_frag=1 # Number of current file.
20334   ac_beg=1 # First line for current file.
20335   ac_end=$ac_max_sed_lines # Line after last line for current file.
20336   ac_more_lines=:
20337   ac_sed_cmds=
20338   while $ac_more_lines; do
20339     if test $ac_beg -gt 1; then
20340       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20341     else
20342       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20343     fi
20344     if test ! -s $tmp/subs.frag; then
20345       ac_more_lines=false
20346     else
20347       # The purpose of the label and of the branching condition is to
20348       # speed up the sed processing (if there are no `@' at all, there
20349       # is no need to browse any of the substitutions).
20350       # These are the two extra sed commands mentioned above.
20351       (echo ':t
20352   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20353       if test -z "$ac_sed_cmds"; then
20354         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20355       else
20356         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20357       fi
20358       ac_sed_frag=`expr $ac_sed_frag + 1`
20359       ac_beg=$ac_end
20360       ac_end=`expr $ac_end + $ac_max_sed_lines`
20361     fi
20362   done
20363   if test -z "$ac_sed_cmds"; then
20364     ac_sed_cmds=cat
20365   fi
20366 fi # test -n "$CONFIG_FILES"
20367
20368 _ACEOF
20369 cat >>$CONFIG_STATUS <<\_ACEOF
20370 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20371   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20372   case $ac_file in
20373   - | *:- | *:-:* ) # input from stdin
20374         cat >$tmp/stdin
20375         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20376         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20377   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20378         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20379   * )   ac_file_in=$ac_file.in ;;
20380   esac
20381
20382   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20383   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
20384 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20385          X"$ac_file" : 'X\(//\)[^/]' \| \
20386          X"$ac_file" : 'X\(//\)$' \| \
20387          X"$ac_file" : 'X\(/\)' \| \
20388          .     : '\(.\)' 2>/dev/null ||
20389 echo X"$ac_file" |
20390     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20391           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20392           /^X\(\/\/\)$/{ s//\1/; q; }
20393           /^X\(\/\).*/{ s//\1/; q; }
20394           s/.*/./; q'`
20395   { if $as_mkdir_p; then
20396     mkdir -p "$ac_dir"
20397   else
20398     as_dir="$ac_dir"
20399     as_dirs=
20400     while test ! -d "$as_dir"; do
20401       as_dirs="$as_dir $as_dirs"
20402       as_dir=`(dirname "$as_dir") 2>/dev/null ||
20403 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20404          X"$as_dir" : 'X\(//\)[^/]' \| \
20405          X"$as_dir" : 'X\(//\)$' \| \
20406          X"$as_dir" : 'X\(/\)' \| \
20407          .     : '\(.\)' 2>/dev/null ||
20408 echo X"$as_dir" |
20409     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20410           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20411           /^X\(\/\/\)$/{ s//\1/; q; }
20412           /^X\(\/\).*/{ s//\1/; q; }
20413           s/.*/./; q'`
20414     done
20415     test ! -n "$as_dirs" || mkdir $as_dirs
20416   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20417 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20418    { (exit 1); exit 1; }; }; }
20419
20420   ac_builddir=.
20421
20422 if test "$ac_dir" != .; then
20423   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
20424   # A "../" for each directory in $ac_dir_suffix.
20425   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
20426 else
20427   ac_dir_suffix= ac_top_builddir=
20428 fi
20429
20430 case $srcdir in
20431   .)  # No --srcdir option.  We are building in place.
20432     ac_srcdir=.
20433     if test -z "$ac_top_builddir"; then
20434        ac_top_srcdir=.
20435     else
20436        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
20437     fi ;;
20438   [\\/]* | ?:[\\/]* )  # Absolute path.
20439     ac_srcdir=$srcdir$ac_dir_suffix;
20440     ac_top_srcdir=$srcdir ;;
20441   *) # Relative path.
20442     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
20443     ac_top_srcdir=$ac_top_builddir$srcdir ;;
20444 esac
20445 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
20446 # absolute.
20447 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
20448 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
20449 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
20450 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
20451
20452
20453   case $INSTALL in
20454   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20455   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
20456   esac
20457
20458   if test x"$ac_file" != x-; then
20459     { echo "$as_me:$LINENO: creating $ac_file" >&5
20460 echo "$as_me: creating $ac_file" >&6;}
20461     rm -f "$ac_file"
20462   fi
20463   # Let's still pretend it is `configure' which instantiates (i.e., don't
20464   # use $as_me), people would be surprised to read:
20465   #    /* config.h.  Generated by config.status.  */
20466   if test x"$ac_file" = x-; then
20467     configure_input=
20468   else
20469     configure_input="$ac_file.  "
20470   fi
20471   configure_input=$configure_input"Generated from `echo $ac_file_in |
20472                                      sed 's,.*/,,'` by configure."
20473
20474   # First look for the input files in the build tree, otherwise in the
20475   # src tree.
20476   ac_file_inputs=`IFS=:
20477     for f in $ac_file_in; do
20478       case $f in
20479       -) echo $tmp/stdin ;;
20480       [\\/$]*)
20481          # Absolute (can't be DOS-style, as IFS=:)
20482          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20483 echo "$as_me: error: cannot find input file: $f" >&2;}
20484    { (exit 1); exit 1; }; }
20485          echo $f;;
20486       *) # Relative
20487          if test -f "$f"; then
20488            # Build tree
20489            echo $f
20490          elif test -f "$srcdir/$f"; then
20491            # Source tree
20492            echo $srcdir/$f
20493          else
20494            # /dev/null tree
20495            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20496 echo "$as_me: error: cannot find input file: $f" >&2;}
20497    { (exit 1); exit 1; }; }
20498          fi;;
20499       esac
20500     done` || { (exit 1); exit 1; }
20501 _ACEOF
20502 cat >>$CONFIG_STATUS <<_ACEOF
20503   sed "$ac_vpsub
20504 $extrasub
20505 _ACEOF
20506 cat >>$CONFIG_STATUS <<\_ACEOF
20507 :t
20508 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20509 s,@configure_input@,$configure_input,;t t
20510 s,@srcdir@,$ac_srcdir,;t t
20511 s,@abs_srcdir@,$ac_abs_srcdir,;t t
20512 s,@top_srcdir@,$ac_top_srcdir,;t t
20513 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
20514 s,@builddir@,$ac_builddir,;t t
20515 s,@abs_builddir@,$ac_abs_builddir,;t t
20516 s,@top_builddir@,$ac_top_builddir,;t t
20517 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
20518 s,@INSTALL@,$ac_INSTALL,;t t
20519 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20520   rm -f $tmp/stdin
20521   if test x"$ac_file" != x-; then
20522     mv $tmp/out $ac_file
20523   else
20524     cat $tmp/out
20525     rm -f $tmp/out
20526   fi
20527
20528 done
20529 _ACEOF
20530 cat >>$CONFIG_STATUS <<\_ACEOF
20531
20532 #
20533 # CONFIG_HEADER section.
20534 #
20535
20536 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20537 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20538 #
20539 # ac_d sets the value in "#define NAME VALUE" lines.
20540 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
20541 ac_dB='[        ].*$,\1#\2'
20542 ac_dC=' '
20543 ac_dD=',;t'
20544 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20545 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20546 ac_uB='$,\1#\2define\3'
20547 ac_uC=' '
20548 ac_uD=',;t'
20549
20550 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20551   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20552   case $ac_file in
20553   - | *:- | *:-:* ) # input from stdin
20554         cat >$tmp/stdin
20555         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20556         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20557   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20558         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20559   * )   ac_file_in=$ac_file.in ;;
20560   esac
20561
20562   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
20563 echo "$as_me: creating $ac_file" >&6;}
20564
20565   # First look for the input files in the build tree, otherwise in the
20566   # src tree.
20567   ac_file_inputs=`IFS=:
20568     for f in $ac_file_in; do
20569       case $f in
20570       -) echo $tmp/stdin ;;
20571       [\\/$]*)
20572          # Absolute (can't be DOS-style, as IFS=:)
20573          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20574 echo "$as_me: error: cannot find input file: $f" >&2;}
20575    { (exit 1); exit 1; }; }
20576          echo $f;;
20577       *) # Relative
20578          if test -f "$f"; then
20579            # Build tree
20580            echo $f
20581          elif test -f "$srcdir/$f"; then
20582            # Source tree
20583            echo $srcdir/$f
20584          else
20585            # /dev/null tree
20586            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20587 echo "$as_me: error: cannot find input file: $f" >&2;}
20588    { (exit 1); exit 1; }; }
20589          fi;;
20590       esac
20591     done` || { (exit 1); exit 1; }
20592   # Remove the trailing spaces.
20593   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
20594
20595 _ACEOF
20596
20597 # Transform confdefs.h into two sed scripts, `conftest.defines' and
20598 # `conftest.undefs', that substitutes the proper values into
20599 # config.h.in to produce config.h.  The first handles `#define'
20600 # templates, and the second `#undef' templates.
20601 # And first: Protect against being on the right side of a sed subst in
20602 # config.status.  Protect against being in an unquoted here document
20603 # in config.status.
20604 rm -f conftest.defines conftest.undefs
20605 # Using a here document instead of a string reduces the quoting nightmare.
20606 # Putting comments in sed scripts is not portable.
20607 #
20608 # `end' is used to avoid that the second main sed command (meant for
20609 # 0-ary CPP macros) applies to n-ary macro definitions.
20610 # See the Autoconf documentation for `clear'.
20611 cat >confdef2sed.sed <<\_ACEOF
20612 s/[\\&,]/\\&/g
20613 s,[\\$`],\\&,g
20614 t clear
20615 : clear
20616 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
20617 t end
20618 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
20619 : end
20620 _ACEOF
20621 # If some macros were called several times there might be several times
20622 # the same #defines, which is useless.  Nevertheless, we may not want to
20623 # sort them, since we want the *last* AC-DEFINE to be honored.
20624 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
20625 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
20626 rm -f confdef2sed.sed
20627
20628 # This sed command replaces #undef with comments.  This is necessary, for
20629 # example, in the case of _POSIX_SOURCE, which is predefined and required
20630 # on some systems where configure will not decide to define it.
20631 cat >>conftest.undefs <<\_ACEOF
20632 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
20633 _ACEOF
20634
20635 # Break up conftest.defines because some shells have a limit on the size
20636 # of here documents, and old seds have small limits too (100 cmds).
20637 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
20638 echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
20639 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
20640 echo '  :' >>$CONFIG_STATUS
20641 rm -f conftest.tail
20642 while grep . conftest.defines >/dev/null
20643 do
20644   # Write a limited-size here document to $tmp/defines.sed.
20645   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
20646   # Speed up: don't consider the non `#define' lines.
20647   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
20648   # Work around the forget-to-reset-the-flag bug.
20649   echo 't clr' >>$CONFIG_STATUS
20650   echo ': clr' >>$CONFIG_STATUS
20651   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
20652   echo 'CEOF
20653   sed -f $tmp/defines.sed $tmp/in >$tmp/out
20654   rm -f $tmp/in
20655   mv $tmp/out $tmp/in
20656 ' >>$CONFIG_STATUS
20657   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
20658   rm -f conftest.defines
20659   mv conftest.tail conftest.defines
20660 done
20661 rm -f conftest.defines
20662 echo '  fi # grep' >>$CONFIG_STATUS
20663 echo >>$CONFIG_STATUS
20664
20665 # Break up conftest.undefs because some shells have a limit on the size
20666 # of here documents, and old seds have small limits too (100 cmds).
20667 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
20668 rm -f conftest.tail
20669 while grep . conftest.undefs >/dev/null
20670 do
20671   # Write a limited-size here document to $tmp/undefs.sed.
20672   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
20673   # Speed up: don't consider the non `#undef'
20674   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
20675   # Work around the forget-to-reset-the-flag bug.
20676   echo 't clr' >>$CONFIG_STATUS
20677   echo ': clr' >>$CONFIG_STATUS
20678   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
20679   echo 'CEOF
20680   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
20681   rm -f $tmp/in
20682   mv $tmp/out $tmp/in
20683 ' >>$CONFIG_STATUS
20684   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
20685   rm -f conftest.undefs
20686   mv conftest.tail conftest.undefs
20687 done
20688 rm -f conftest.undefs
20689
20690 cat >>$CONFIG_STATUS <<\_ACEOF
20691   # Let's still pretend it is `configure' which instantiates (i.e., don't
20692   # use $as_me), people would be surprised to read:
20693   #    /* config.h.  Generated by config.status.  */
20694   if test x"$ac_file" = x-; then
20695     echo "/* Generated by configure.  */" >$tmp/config.h
20696   else
20697     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
20698   fi
20699   cat $tmp/in >>$tmp/config.h
20700   rm -f $tmp/in
20701   if test x"$ac_file" != x-; then
20702     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
20703       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
20704 echo "$as_me: $ac_file is unchanged" >&6;}
20705     else
20706       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
20707 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20708          X"$ac_file" : 'X\(//\)[^/]' \| \
20709          X"$ac_file" : 'X\(//\)$' \| \
20710          X"$ac_file" : 'X\(/\)' \| \
20711          .     : '\(.\)' 2>/dev/null ||
20712 echo X"$ac_file" |
20713     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20714           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20715           /^X\(\/\/\)$/{ s//\1/; q; }
20716           /^X\(\/\).*/{ s//\1/; q; }
20717           s/.*/./; q'`
20718       { if $as_mkdir_p; then
20719     mkdir -p "$ac_dir"
20720   else
20721     as_dir="$ac_dir"
20722     as_dirs=
20723     while test ! -d "$as_dir"; do
20724       as_dirs="$as_dir $as_dirs"
20725       as_dir=`(dirname "$as_dir") 2>/dev/null ||
20726 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20727          X"$as_dir" : 'X\(//\)[^/]' \| \
20728          X"$as_dir" : 'X\(//\)$' \| \
20729          X"$as_dir" : 'X\(/\)' \| \
20730          .     : '\(.\)' 2>/dev/null ||
20731 echo X"$as_dir" |
20732     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20733           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20734           /^X\(\/\/\)$/{ s//\1/; q; }
20735           /^X\(\/\).*/{ s//\1/; q; }
20736           s/.*/./; q'`
20737     done
20738     test ! -n "$as_dirs" || mkdir $as_dirs
20739   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20740 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20741    { (exit 1); exit 1; }; }; }
20742
20743       rm -f $ac_file
20744       mv $tmp/config.h $ac_file
20745     fi
20746   else
20747     cat $tmp/config.h
20748     rm -f $tmp/config.h
20749   fi
20750 done
20751 _ACEOF
20752 cat >>$CONFIG_STATUS <<\_ACEOF
20753
20754 #
20755 # CONFIG_COMMANDS section.
20756 #
20757 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20758   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20759   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20760   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
20761 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20762          X"$ac_dest" : 'X\(//\)[^/]' \| \
20763          X"$ac_dest" : 'X\(//\)$' \| \
20764          X"$ac_dest" : 'X\(/\)' \| \
20765          .     : '\(.\)' 2>/dev/null ||
20766 echo X"$ac_dest" |
20767     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20768           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20769           /^X\(\/\/\)$/{ s//\1/; q; }
20770           /^X\(\/\).*/{ s//\1/; q; }
20771           s/.*/./; q'`
20772   ac_builddir=.
20773
20774 if test "$ac_dir" != .; then
20775   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
20776   # A "../" for each directory in $ac_dir_suffix.
20777   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
20778 else
20779   ac_dir_suffix= ac_top_builddir=
20780 fi
20781
20782 case $srcdir in
20783   .)  # No --srcdir option.  We are building in place.
20784     ac_srcdir=.
20785     if test -z "$ac_top_builddir"; then
20786        ac_top_srcdir=.
20787     else
20788        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
20789     fi ;;
20790   [\\/]* | ?:[\\/]* )  # Absolute path.
20791     ac_srcdir=$srcdir$ac_dir_suffix;
20792     ac_top_srcdir=$srcdir ;;
20793   *) # Relative path.
20794     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
20795     ac_top_srcdir=$ac_top_builddir$srcdir ;;
20796 esac
20797 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
20798 # absolute.
20799 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
20800 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
20801 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
20802 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
20803
20804
20805   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
20806 echo "$as_me: executing $ac_dest commands" >&6;}
20807   case $ac_dest in
20808     default-1 )
20809
20810 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
20811 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
20812   rm -f intltool-extract.out
20813 else
20814   mv -f intltool-extract.out intltool-extract
20815 fi
20816 chmod ugo+x intltool-extract
20817 chmod u+w intltool-extract
20818
20819 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
20820 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
20821   rm -f intltool-merge.out
20822 else
20823   mv -f intltool-merge.out intltool-merge
20824 fi
20825 chmod ugo+x intltool-merge
20826 chmod u+w intltool-merge
20827
20828 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
20829 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
20830   rm -f intltool-update.out
20831 else
20832   mv -f intltool-update.out intltool-update
20833 fi
20834 chmod ugo+x intltool-update
20835 chmod u+w intltool-update
20836
20837  ;;
20838     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
20839         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
20840       esac ;;
20841   esac
20842 done
20843 _ACEOF
20844
20845 cat >>$CONFIG_STATUS <<\_ACEOF
20846
20847 { (exit 0); exit 0; }
20848 _ACEOF
20849 chmod +x $CONFIG_STATUS
20850 ac_clean_files=$ac_clean_files_save
20851
20852
20853 # configure is writing to config.log, and then calls config.status.
20854 # config.status does its own redirection, appending to config.log.
20855 # Unfortunately, on DOS this fails, as config.log is still kept open
20856 # by configure, so config.status won't be able to write to it; its
20857 # output is simply discarded.  So we exec the FD to /dev/null,
20858 # effectively closing config.log, so it can be properly (re)opened and
20859 # appended to by config.status.  When coming back to configure, we
20860 # need to make the FD available again.
20861 if test "$no_create" != yes; then
20862   ac_cs_success=:
20863   ac_config_status_args=
20864   test "$silent" = yes &&
20865     ac_config_status_args="$ac_config_status_args --quiet"
20866   exec 5>/dev/null
20867   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20868   exec 5>>config.log
20869   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20870   # would make configure fail if this is the last instruction.
20871   $ac_cs_success || { (exit 1); exit 1; }
20872 fi
20873
20874
20875 ###############################################################################
20876 #
20877 #       Print some warnings at the end.
20878 #
20879 ###############################################################################
20880
20881 warn_prefix_1="    Warning:"
20882 warn_prefix_2="       Note:"
20883 warn_prefix="$warn_prefix_1"
20884
20885 warning=no
20886 warnsep='    #################################################################'
20887
20888 warnpre() {
20889   if test "$warning" = no ; then
20890     echo '' ; echo "$warnsep" ; echo ''
20891     warning=yes
20892   fi
20893 }
20894
20895 warn() {
20896   warnpre
20897   if test "$warning" = long ; then echo '' ; fi
20898   warning=yes
20899   rest="$@"
20900   echo "$warn_prefix $rest"
20901 }
20902
20903 warnL() {
20904   was=$warning
20905   warnpre
20906   warning=yes
20907   if test "$was" != no ; then echo '' ; fi
20908   rest="$@"
20909   echo "$warn_prefix $rest"
20910 }
20911
20912 warn2() {
20913   rest="$@"
20914   echo "             $rest"
20915   warning=long
20916 }
20917
20918 note() {
20919   warn_prefix="$warn_prefix_2"
20920   warn $@
20921   warn_prefix="$warn_prefix_1"
20922 }
20923
20924 noteL() {
20925   warn_prefix="$warn_prefix_2"
20926   warnL $@
20927   warn_prefix="$warn_prefix_1"
20928 }
20929
20930
20931 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
20932   warn 'The SGI saver extension was requested, but was not found.'
20933 fi
20934
20935 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
20936   warn 'The MIT saver extension was requested, but was not found.'
20937 fi
20938
20939 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
20940   warn 'The XIdle extension was requested, but was not found.'
20941 fi
20942
20943 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
20944   warn 'The XSHM extension was requested, but was not found.'
20945 fi
20946
20947 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
20948   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
20949 fi
20950
20951 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
20952   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
20953 fi
20954
20955 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
20956   warn 'The DPMS extension was requested, but was not found.'
20957 fi
20958
20959 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
20960   warn 'The Xinerama extension was requested, but was not found.'
20961 fi
20962
20963 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
20964   warn 'The XF86VMODE extension was requested, but was not found.'
20965 fi
20966
20967 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
20968   warn 'The RANDR extension was requested, but was not found.'
20969 fi
20970
20971 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
20972   warn "Checking of /proc/interrupts was requested, but it's bogus."
20973 fi
20974
20975 motif_warn2() {
20976   warn2 'Though the Motif front-end to xscreensaver is still'
20977   warn2 'maintained, it is no longer being updated with new'
20978   warn2 'features: all new development on the xscreensaver-demo'
20979   warn2 'program is happening in the GTK version, and not in the'
20980   warn2 'Motif version.  It is recommended that you build against'
20981   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
20982 }
20983
20984 if test "$have_motif" = no -a "$have_gtk" = no; then
20985
20986   if test "$with_motif" = yes; then
20987     warnL "Neither the GTK nor Motif libraries were found; the"
20988     warn2 "\`xscreensaver-demo' program requires one of these."
20989     echo ''
20990     motif_warn2
20991   else
20992     warnL "The GTK libraries do not seem to be available; the"
20993     warn2 "\`xscreensaver-demo' program requires them."
20994     echo ''
20995     warn2 'You can use Motif or Lesstif instead of GTK (use the'
20996     warn2 "\`--with-motif' option) but that is NOT recommended."
20997     motif_warn2
20998   fi
20999
21000 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
21001   warnL "Use of Motif was requested, but it wasn't found;"
21002   warn2 "Gtk will be used instead."
21003
21004 elif test "$jurassic_gtk" = yes ; then
21005
21006   pref_gtk=1.2
21007
21008   v="$ac_gtk_version_string"
21009   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
21010     warnL "Use of Gtk was requested, but its version number is unknown;"
21011   elif test "$with_gtk_req" = yes ; then
21012     warnL "Use of Gtk was requested, but it is version $v;"
21013   else
21014     warnL "Gtk was found on this system, but it is version $v;"
21015   fi
21016
21017   warn2 "Gtk $pref_gtk or newer is required."
21018
21019 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
21020   warnL "Use of Gtk was requested, but it wasn't found."
21021 fi
21022
21023 if test "$gtk2_halfassed" != no ; then
21024   warnL "GTK version $gtk2_halfassed was found, but at least one supporting"
21025   warn2 "library ($gtk2_halfassed_lib) was not, so GTK 2.x can't be used."
21026   if test "$have_gtk" = yes ; then
21027     v="$ac_gtk_version_string"
21028     warn2 "GTK $v is also installed, so it will be used instead."
21029     warn2 "Please read the above output and the \`config.log' file"
21030     warn2 "for more details."
21031   fi
21032 fi
21033
21034
21035 if test "$with_gnome_req" = yes -a "$have_gnome" = no \
21036         -a "$have_gtk2" = no; then
21037   # don't issue this warning if we have GTK2 -- in that case, the
21038   # Gnome-specific code isn't needed.
21039   warn  'Use of the Gnome Control Panel was requested, but the necessary'
21040   warn2 'headers and/or libraries were not found.'
21041 fi
21042
21043 if test "$have_gtk" = yes ; then
21044   if test "$have_xml" = no ; then
21045     if test "$with_xml_req" = yes ; then
21046       warn  'Use of the XML library was requested, but the necessary'
21047       warn2 'headers and/or libraries were not found.'
21048     else
21049       warn  'GTK is being used, but the XML library was not found.'
21050     fi
21051
21052     if test "$xml_halfassed" = yes ; then
21053
21054       if test "$have_zlib" = yes ; then
21055         which="XML libraries"
21056       else
21057         which="\`zlib' library"
21058       fi
21059
21060       echo ''
21061       warn2 'More specifically, we found the headers, but not the'
21062       warn2 "$which; so either XML is half-installed on this"
21063       warn2 "system, or something else went wrong.  The \`config.log'"
21064       warn2 'file might contain some clues.'
21065     fi
21066
21067     echo ''
21068     warn2 "Without XML, the per-display-mode \`Settings' dialogs"
21069     warn2 'will not be available.  Specify the location of the XML'
21070     warn2 'library through the --with-xml option to configure.'
21071   fi
21072 fi
21073
21074 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
21075   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
21076   warn2 "headers were not found.  That can't be good.  Please"
21077   warn2 "install the GDK-Pixbuf development kit and re-configure."
21078 fi
21079
21080 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
21081
21082   preferred_lesstif=0.92
21083
21084   if test "$lesstif_version" = unknown; then
21085     warnL "Unable to determine the LessTif version number!"
21086     warn2 "Make sure you are using version $preferred_lesstif or newer."
21087     warn2 "See <http://www.lesstif.org/>."
21088
21089   elif test \! $lesstif_version -gt 82; then
21090     warnL "LessTif version $lesstif_version_string is being used."
21091     warn2 "LessTif versions 0.82 and earlier are too buggy to"
21092     warn2 "use with XScreenSaver; it is strongly recommended"
21093     warn2 "that you upgrade to at least version $preferred_lesstif!"
21094     warn2 "See <http://www.lesstif.org/>."
21095   fi
21096 fi
21097
21098
21099 if test "$have_motif" = yes -a "$have_gtk" = no ; then
21100   warn  'Motif is being used, and GTK is not.'
21101   echo  ''
21102   motif_warn2
21103 fi
21104
21105
21106 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
21107   warnL 'Use of XPM was requested, but it was not found.'
21108 fi
21109
21110 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
21111   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
21112 fi
21113
21114 if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \
21115    test "$gdk_pixbuf_halfassed" = yes; then
21116
21117   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
21118     true
21119   elif test "$with_xpm_req" = no ; then
21120     warnL 'The XPM library is not being used.'
21121   else
21122     warnL 'The XPM library was not found.'
21123   fi
21124
21125   if test "$with_gdk_pixbuf_req" = yes ; then
21126     true
21127   elif test "$with_gdk_pixbuf_req" = no ; then
21128     warnL 'The GDK-Pixbuf library is not being used.'
21129   else
21130     warnL 'The GDK-Pixbuf library was not found.'
21131   fi
21132
21133   if test "$gdk_pixbuf_halfassed" = yes ; then
21134     echo ''
21135     warn2 'More specifically, we found the headers, but not the'
21136     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
21137     warn2 "system, or something else went wrong.  The \`config.log'"
21138     warn2 'file might contain some clues.'
21139   fi
21140
21141   echo ''
21142   warn2 'Some of the demos will not be as colorful as they'
21143   warn2 'could be.  You should consider installing Pixbuf or'
21144   warn2 'XPM and re-running configure.  The Pixbuf library is'
21145   warn2 'a part of GNOME.  The XPM library comes with most'
21146   warn2 'X11 installations; you can also find it at the X11'
21147   warn2 'archive sites, such as <http://sunsite.unc.edu/>.'
21148   echo  ''
21149   warn2 'GDK-Pixbuf is recommended over XPM, as it provides'
21150   warn2 'support for more image formats.'
21151 fi
21152
21153
21154 if test "$have_jpeg" = no ; then
21155   if test "$with_jpeg_req" = yes ; then
21156     warnL 'Use of libjpeg was requested, but it was not found.'
21157   elif test "$with_jpeg_req" = no ; then
21158     noteL 'The JPEG library is not being used.'
21159   else
21160     noteL 'The JPEG library was not found.'
21161   fi
21162
21163   if test "$jpeg_halfassed" = yes ; then
21164     echo ''
21165     warn2 'More specifically, we found the headers, but not the'
21166     warn2 'library; so either JPEG is half-installed on this'
21167     warn2 "system, or something else went wrong.  The \`config.log'"
21168     warn2 'file might contain some clues.'
21169     echo ''
21170   fi
21171
21172   if test "$have_gdk_pixbuf" = no ; then
21173     warn2 "This means that it won't be possible for the image-manipulating"
21174     warn2 "display modes to load files from disk; and it also means that"
21175     warn2 "the \`webcollage' program will be much slower."
21176   else
21177     warn2 "This means the \`webcollage' program will be much slower."
21178   fi
21179 fi
21180
21181
21182 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
21183   preferred_mesagl=3.4
21184   mgv="$ac_mesagl_version_string"
21185   pgl="$preferred_mesagl"
21186
21187   if test "$ac_mesagl_version" = unknown; then
21188     warnL "Unable to determine the MesaGL version number!"
21189     warn2 "Make sure you are using version $preferred_mesagl or newer."
21190
21191   elif test \! "$ac_mesagl_version" -gt 2006; then
21192     warnL "MesaGL version number is $mgv --"
21193     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
21194     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
21195
21196   elif test \! "$ac_mesagl_version" -gt 3003; then
21197     warnL "MesaGL version number is $mgv --"
21198     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
21199     warn2 "that you upgrade to $pgl or newer."
21200   fi
21201 fi
21202
21203 if test "$have_gl" = no ; then
21204   if test "$with_gl_req" = yes ; then
21205     warnL 'Use of GL was requested, but it was not found.'
21206   elif test "$with_gl_req" = no ; then
21207     noteL 'The OpenGL 3D library is not being used.'
21208   else
21209     noteL 'The OpenGL 3D library was not found.'
21210   fi
21211
21212   if test "$gl_halfassed" = yes ; then
21213     echo ''
21214     warn2 'More specifically, we found the headers, but not the'
21215     warn2 'libraries; so either GL is half-installed on this'
21216     warn2 "system, or something else went wrong.  The \`config.log'"
21217     warn2 'file might contain some clues.'
21218   fi
21219
21220   echo ''
21221   warn2 'Those demos which use 3D will not be built or installed.'
21222   warn2 'You might want to consider installing OpenGL and'
21223   warn2 "re-running configure.  If your vendor doesn't ship"
21224   warn2 'their own implementation of OpenGL, you can get a free'
21225   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
21226   warn2 'info, see <http://www.opengl.org/>.'
21227
21228 fi
21229
21230
21231 if test "$have_gl" = yes -a "$have_gle" = no ; then
21232
21233  # nobody cares about this; don't print the warning unless it was
21234  # requested and not found, or halfway-found.
21235  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
21236
21237   if test "$with_gle_req" = yes ; then
21238     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
21239     warn2 'it was not found (though the OpenGL library was found, and'
21240     warn2 'is being used.)'
21241   elif test "$with_gle_req" = no ; then
21242     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
21243     warn2 'library is not.'
21244   else
21245     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
21246     warn2 'was not.'
21247   fi
21248
21249   if test "$gle_halfassed" = yes ; then
21250     echo ''
21251     warn2 'More specifically, we found the headers, but not the'
21252     warn2 'libraries; so either GLE is half-installed on this'
21253     warn2 "system, or something else went wrong.  The \`config.log'"
21254     warn2 'file might contain some clues.'
21255   fi
21256
21257   echo ''
21258   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
21259   warn2 'will not be built or installed.  You might want to consider'
21260   warn2 'installing GLE and re-running configure.  You can find the'
21261   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
21262   warn2 'OpenGL info, see <http://www.opengl.org/>.'
21263
21264  fi
21265 fi
21266
21267
21268 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
21269   warn 'Use of XReadDisplay was requested, but it was not found.'
21270 fi
21271
21272 if test -n "$with_fortune_req"; then
21273   if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
21274     warnL "$with_fortune_req was requested as the Fortune program,"
21275     warn2 "but was not found.  The default will be used instead."
21276   fi
21277 fi
21278
21279 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
21280   warn 'Use of Kerberos was requested, but it was not found.'
21281 fi
21282
21283 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
21284   warn 'Use of PAM was requested, but it was not found.'
21285 fi
21286
21287 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
21288   warn 'Use of shadow passwords was requested, but they were not found.'
21289 fi
21290
21291
21292 # You are in a twisty maze of namespaces and syntaxes, all alike.
21293 # Fuck the skull of Unix.
21294 #
21295 eval bindir=${bindir}
21296 eval bindir=${bindir}
21297 eval bindir=${bindir}
21298 eval bindir=${bindir}
21299 eval bindir=${bindir}
21300 eval bindir=${bindir}
21301 eval HACKDIR=${HACKDIR}
21302 eval HACKDIR=${HACKDIR}
21303 eval HACKDIR=${HACKDIR}
21304 eval HACKDIR=${HACKDIR}
21305 eval HACKDIR=${HACKDIR}
21306 eval HACKDIR=${HACKDIR}
21307 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21308 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21309 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21310 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21311 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21312 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21313
21314 # canonicalize slashes.
21315 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
21316 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
21317 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
21318
21319
21320 # Sanity check the hackdir
21321 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
21322   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
21323     echo ""
21324     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
21325                    There will be an executable installed with that name, so
21326                    that can't be the name of a directory as well.  Please
21327                    re-configure with a different directory name." >&5
21328 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
21329                    There will be an executable installed with that name, so
21330                    that can't be the name of a directory as well.  Please
21331                    re-configure with a different directory name." >&2;}
21332    { (exit 1); exit 1; }; }
21333   fi
21334 done
21335
21336
21337 do_dir_warning=no
21338
21339 # Now let's see if there's a previous RPM version already installed.  Blargh!
21340
21341 # M4 sucks!!
21342
21343 rpmv=`(rpm -qv xscreensaver) 2>/dev/null | \
21344       sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
21345
21346
21347 if test \! -z "$rpmv" ; then
21348   rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
21349   rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
21350
21351   warning=no
21352   warnL "There is already an installed RPM of xscreensaver $rpmv"
21353   warn2 "on this system.  You might want to remove it (with"
21354   warn2 '"rpm -ve xscreensaver") before running "make install"'
21355   warn2 "from this directory."
21356   echo ""
21357   warn2 "Alternately, you could build this version of xscreensaver"
21358   warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
21359   warn2 "file is included.  See the RPM documentation for more info."
21360   echo ""
21361
21362   if test "$rpmbdir" = "$rpmhdir" ; then
21363     warn2 "The RPM version was installed in $rpmbdir/."
21364   else
21365     warn2 "The RPM version was installed in $rpmbdir/,"
21366     warn2 "with demos in $rpmhdir/."
21367   fi
21368
21369   do_dir_warning=yes
21370 fi
21371
21372
21373 if test "${bindir}" = "${HACKDIR}" ; then
21374   do_dir_warning=yes
21375 fi
21376
21377 if test "$do_dir_warning" = yes; then
21378   echo ""
21379   echo "$warnsep"
21380   echo ""
21381   echo '      When you run "make install", the "xscreensaver",'
21382   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
21383   echo "      will be installed in ${bindir}/."
21384   echo ""
21385   echo "      The various graphics demos (180+ different executables) will"
21386   echo "      be installed in ${HACKDIR}/."
21387   echo ""
21388   echo "      If you would prefer the demos to be installed elsewhere,"
21389   echo "      you should re-run configure with the --with-hackdir=DIR"
21390   echo "      option.  For more information, run \`./configure --help'."
21391   warning=yes
21392 fi
21393
21394 if test "$warning" != no; then
21395   echo '' ; echo "$warnsep" ; echo ''
21396 fi
21397
21398 if test "$do_dir_warning" = no; then
21399   if test "$warning" = no; then
21400     echo ''
21401   fi
21402   echo "User programs will be installed in ${bindir}/"
21403   echo "Screen savers will be installed in ${HACKDIR}/"
21404   echo "Configuration will be installed in ${HACK_CONF_DIR}/"
21405   echo ''
21406 fi