ftp://ftp.jp.xemacs.org/pub/NetBSD/packages/distfiles/xscreensaver-4.15.tar.gz
[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-proc-interrupts  Include support for consulting the /proc/interrupts
888                           file to notice keyboard activity.
889   --with-pam              Include support for PAM (Pluggable Auth Modules.)
890   --with-kerberos         Include support for Kerberos authentication.
891   --with-shadow           Include support for shadow password authentication.
892   --with-passwd-helper    Include support for an external password
893                           verification helper program.
894
895 User interface options:
896
897   --with-motif            Use the Motif toolkit for the user interface
898                           (not recommended.)
899   --with-gtk              Use the Gtk toolkit for the user interface.
900   --with-gnome            Include support for the Gnome 1.x Control Center.
901                           (This option is not needed with GTK 2.x / Gnome 2.x.)
902
903   --with-xml              The XML toolkit is needed for some parts of
904                           the Gtk interface.  Without it, the configuration
905                           interface will be much less featureful.
906
907 Graphics options:
908
909   --with-gl               Build those demos which depend on OpenGL.
910   --with-gle              Build those demos which depend on GLE
911                           (the OpenGL "extrusion" library.)
912   --with-xpm              Include support for XPM files in some demos.
913                           (Not needed if Pixbuf is used.)
914   --with-pixbuf           Include support for the GDK-Pixbuf library in some
915                           demos, which will make it possible for them to read
916                           GIF, JPEG, and PNG files as well.  (The path here is
917                           ignored if GTK 2.x is being used.)
918   --with-jpeg             Include support for the JPEG library.
919   --with-xshm-ext         Include support for the Shared Memory extension.
920   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
921   --with-readdisplay      Include support for the XReadDisplay extension.
922
923   --with-fortune=PROGRAM  Some demos are able to run an external program and
924                           display its text; this names the program to use by
925                           default (though it can be overridden with X
926                           resources.)  Default is \"/usr/games/fortune\".
927   --with-setuid-hacks     Allow some demos to be installed \`setuid root'
928                           (which is needed in order to ping other hosts.)
929
930
931 Some influential environment variables:
932   CC          C compiler command
933   CFLAGS      C compiler flags
934   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
935               nonstandard directory <lib dir>
936   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
937               headers in a nonstandard directory <include dir>
938   CPP         C preprocessor
939
940 Use these variables to override the choices made by `configure' or to help
941 it to find libraries and programs with nonstandard names/locations.
942
943 _ACEOF
944 fi
945
946 if test "$ac_init_help" = "recursive"; then
947   # If there are subdirs, report their specific --help.
948   ac_popdir=`pwd`
949   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
950     test -d $ac_dir || continue
951     ac_builddir=.
952
953 if test "$ac_dir" != .; then
954   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
955   # A "../" for each directory in $ac_dir_suffix.
956   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
957 else
958   ac_dir_suffix= ac_top_builddir=
959 fi
960
961 case $srcdir in
962   .)  # No --srcdir option.  We are building in place.
963     ac_srcdir=.
964     if test -z "$ac_top_builddir"; then
965        ac_top_srcdir=.
966     else
967        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
968     fi ;;
969   [\\/]* | ?:[\\/]* )  # Absolute path.
970     ac_srcdir=$srcdir$ac_dir_suffix;
971     ac_top_srcdir=$srcdir ;;
972   *) # Relative path.
973     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
974     ac_top_srcdir=$ac_top_builddir$srcdir ;;
975 esac
976 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
977 # absolute.
978 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
979 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
980 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
981 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
982
983     cd $ac_dir
984     # Check for guested configure; otherwise get Cygnus style configure.
985     if test -f $ac_srcdir/configure.gnu; then
986       echo
987       $SHELL $ac_srcdir/configure.gnu  --help=recursive
988     elif test -f $ac_srcdir/configure; then
989       echo
990       $SHELL $ac_srcdir/configure  --help=recursive
991     elif test -f $ac_srcdir/configure.ac ||
992            test -f $ac_srcdir/configure.in; then
993       echo
994       $ac_configure --help
995     else
996       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
997     fi
998     cd $ac_popdir
999   done
1000 fi
1001
1002 test -n "$ac_init_help" && exit 0
1003 if $ac_init_version; then
1004   cat <<\_ACEOF
1005
1006 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
1007 Free Software Foundation, Inc.
1008 This configure script is free software; the Free Software Foundation
1009 gives unlimited permission to copy, distribute and modify it.
1010 _ACEOF
1011   exit 0
1012 fi
1013 exec 5>config.log
1014 cat >&5 <<_ACEOF
1015 This file contains any messages produced by compilers while
1016 running configure, to aid debugging if configure makes a mistake.
1017
1018 It was created by $as_me, which was
1019 generated by GNU Autoconf 2.57.  Invocation command line was
1020
1021   $ $0 $@
1022
1023 _ACEOF
1024 {
1025 cat <<_ASUNAME
1026 ## --------- ##
1027 ## Platform. ##
1028 ## --------- ##
1029
1030 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1031 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1032 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1033 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1034 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1035
1036 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1037 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1038
1039 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1040 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1041 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1042 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1043 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1044 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1045 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1046
1047 _ASUNAME
1048
1049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1050 for as_dir in $PATH
1051 do
1052   IFS=$as_save_IFS
1053   test -z "$as_dir" && as_dir=.
1054   echo "PATH: $as_dir"
1055 done
1056
1057 } >&5
1058
1059 cat >&5 <<_ACEOF
1060
1061
1062 ## ----------- ##
1063 ## Core tests. ##
1064 ## ----------- ##
1065
1066 _ACEOF
1067
1068
1069 # Keep a trace of the command line.
1070 # Strip out --no-create and --no-recursion so they do not pile up.
1071 # Strip out --silent because we don't want to record it for future runs.
1072 # Also quote any args containing shell meta-characters.
1073 # Make two passes to allow for proper duplicate-argument suppression.
1074 ac_configure_args=
1075 ac_configure_args0=
1076 ac_configure_args1=
1077 ac_sep=
1078 ac_must_keep_next=false
1079 for ac_pass in 1 2
1080 do
1081   for ac_arg
1082   do
1083     case $ac_arg in
1084     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1085     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1086     | -silent | --silent | --silen | --sile | --sil)
1087       continue ;;
1088     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1089       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1090     esac
1091     case $ac_pass in
1092     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1093     2)
1094       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1095       if test $ac_must_keep_next = true; then
1096         ac_must_keep_next=false # Got value, back to normal.
1097       else
1098         case $ac_arg in
1099           *=* | --config-cache | -C | -disable-* | --disable-* \
1100           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1101           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1102           | -with-* | --with-* | -without-* | --without-* | --x)
1103             case "$ac_configure_args0 " in
1104               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1105             esac
1106             ;;
1107           -* ) ac_must_keep_next=true ;;
1108         esac
1109       fi
1110       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1111       # Get rid of the leading space.
1112       ac_sep=" "
1113       ;;
1114     esac
1115   done
1116 done
1117 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1118 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1119
1120 # When interrupted or exit'd, cleanup temporary files, and complete
1121 # config.log.  We remove comments because anyway the quotes in there
1122 # would cause problems or look ugly.
1123 # WARNING: Be sure not to use single quotes in there, as some shells,
1124 # such as our DU 5.0 friend, will then `close' the trap.
1125 trap 'exit_status=$?
1126   # Save into config.log some information that might help in debugging.
1127   {
1128     echo
1129
1130     cat <<\_ASBOX
1131 ## ---------------- ##
1132 ## Cache variables. ##
1133 ## ---------------- ##
1134 _ASBOX
1135     echo
1136     # The following way of writing the cache mishandles newlines in values,
1137 {
1138   (set) 2>&1 |
1139     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1140     *ac_space=\ *)
1141       sed -n \
1142         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1143           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1144       ;;
1145     *)
1146       sed -n \
1147         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1148       ;;
1149     esac;
1150 }
1151     echo
1152
1153     cat <<\_ASBOX
1154 ## ----------------- ##
1155 ## Output variables. ##
1156 ## ----------------- ##
1157 _ASBOX
1158     echo
1159     for ac_var in $ac_subst_vars
1160     do
1161       eval ac_val=$`echo $ac_var`
1162       echo "$ac_var='"'"'$ac_val'"'"'"
1163     done | sort
1164     echo
1165
1166     if test -n "$ac_subst_files"; then
1167       cat <<\_ASBOX
1168 ## ------------- ##
1169 ## Output files. ##
1170 ## ------------- ##
1171 _ASBOX
1172       echo
1173       for ac_var in $ac_subst_files
1174       do
1175         eval ac_val=$`echo $ac_var`
1176         echo "$ac_var='"'"'$ac_val'"'"'"
1177       done | sort
1178       echo
1179     fi
1180
1181     if test -s confdefs.h; then
1182       cat <<\_ASBOX
1183 ## ----------- ##
1184 ## confdefs.h. ##
1185 ## ----------- ##
1186 _ASBOX
1187       echo
1188       sed "/^$/d" confdefs.h | sort
1189       echo
1190     fi
1191     test "$ac_signal" != 0 &&
1192       echo "$as_me: caught signal $ac_signal"
1193     echo "$as_me: exit $exit_status"
1194   } >&5
1195   rm -f core core.* *.core &&
1196   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1197     exit $exit_status
1198      ' 0
1199 for ac_signal in 1 2 13 15; do
1200   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1201 done
1202 ac_signal=0
1203
1204 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1205 rm -rf conftest* confdefs.h
1206 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1207 echo >confdefs.h
1208
1209 # Predefined preprocessor variables.
1210
1211 cat >>confdefs.h <<_ACEOF
1212 #define PACKAGE_NAME "$PACKAGE_NAME"
1213 _ACEOF
1214
1215
1216 cat >>confdefs.h <<_ACEOF
1217 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1218 _ACEOF
1219
1220
1221 cat >>confdefs.h <<_ACEOF
1222 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1223 _ACEOF
1224
1225
1226 cat >>confdefs.h <<_ACEOF
1227 #define PACKAGE_STRING "$PACKAGE_STRING"
1228 _ACEOF
1229
1230
1231 cat >>confdefs.h <<_ACEOF
1232 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1233 _ACEOF
1234
1235
1236 # Let the site file select an alternate cache file if it wants to.
1237 # Prefer explicitly selected file to automatically selected ones.
1238 if test -z "$CONFIG_SITE"; then
1239   if test "x$prefix" != xNONE; then
1240     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1241   else
1242     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1243   fi
1244 fi
1245 for ac_site_file in $CONFIG_SITE; do
1246   if test -r "$ac_site_file"; then
1247     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1248 echo "$as_me: loading site script $ac_site_file" >&6;}
1249     sed 's/^/| /' "$ac_site_file" >&5
1250     . "$ac_site_file"
1251   fi
1252 done
1253
1254 if test -r "$cache_file"; then
1255   # Some versions of bash will fail to source /dev/null (special
1256   # files actually), so we avoid doing that.
1257   if test -f "$cache_file"; then
1258     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1259 echo "$as_me: loading cache $cache_file" >&6;}
1260     case $cache_file in
1261       [\\/]* | ?:[\\/]* ) . $cache_file;;
1262       *)                      . ./$cache_file;;
1263     esac
1264   fi
1265 else
1266   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1267 echo "$as_me: creating cache $cache_file" >&6;}
1268   >$cache_file
1269 fi
1270
1271 # Check that the precious variables saved in the cache have kept the same
1272 # value.
1273 ac_cache_corrupted=false
1274 for ac_var in `(set) 2>&1 |
1275                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1276   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1277   eval ac_new_set=\$ac_env_${ac_var}_set
1278   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1279   eval ac_new_val="\$ac_env_${ac_var}_value"
1280   case $ac_old_set,$ac_new_set in
1281     set,)
1282       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1283 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1284       ac_cache_corrupted=: ;;
1285     ,set)
1286       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1287 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1288       ac_cache_corrupted=: ;;
1289     ,);;
1290     *)
1291       if test "x$ac_old_val" != "x$ac_new_val"; then
1292         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1293 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1294         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1295 echo "$as_me:   former value:  $ac_old_val" >&2;}
1296         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1297 echo "$as_me:   current value: $ac_new_val" >&2;}
1298         ac_cache_corrupted=:
1299       fi;;
1300   esac
1301   # Pass precious variables to config.status.
1302   if test "$ac_new_set" = set; then
1303     case $ac_new_val in
1304     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1305       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1306     *) ac_arg=$ac_var=$ac_new_val ;;
1307     esac
1308     case " $ac_configure_args " in
1309       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1310       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1311     esac
1312   fi
1313 done
1314 if $ac_cache_corrupted; then
1315   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1316 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1317   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1318 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1319    { (exit 1); exit 1; }; }
1320 fi
1321
1322 ac_ext=c
1323 ac_cpp='$CPP $CPPFLAGS'
1324 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1325 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1326 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346           ac_config_headers="$ac_config_headers config.h"
1347
1348
1349 echo "current directory: `pwd`"
1350 echo "command line was: $0 $@"
1351
1352
1353 # After checking to see that --srcdir is correct (which AC_INIT does)
1354 # check for some random other files that come later in the tar file,
1355 # to make sure everything is here.
1356 #
1357 for d in driver utils hacks hacks/glx ; do
1358   f=$srcdir/$d/Makefile.in
1359   if test \! -r $f ; then
1360     echo ""
1361     echo "ERROR: The package is incomplete: $f does not exist."
1362     echo "       This probably means that your download was truncated."
1363     echo ""
1364     exit 1
1365   fi
1366 done
1367
1368 ###############################################################################
1369 #
1370 #       Function to figure out how to run the compiler.
1371 #
1372 ###############################################################################
1373
1374
1375
1376
1377 ###############################################################################
1378 #
1379 #       Functions to figure out how to disable // comments in ANSI C code.
1380 #
1381 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
1382 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
1383 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
1384 #       so much for compatibility!)
1385 #
1386 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
1387 #       declarations preceed statements, without resorting to "-pedantic".
1388 #       This means that there is no way to get gcc3 to issue warnings that
1389 #       ensure that your code complies with the ANSI/ISO C89 standard, without
1390 #       also drowning in totally useless warnings.  Thank you master may I
1391 #       have another.
1392 #
1393 #       So, I give up, let's just use -pedantic.
1394 #
1395 ###############################################################################
1396
1397
1398
1399
1400
1401
1402 ###############################################################################
1403 #
1404 #       Function to figure out how to turn off Objective C on MacOS X.
1405 #       (We have to do this to work around an Apple-specific gcc bug.)
1406 #
1407 ###############################################################################
1408
1409
1410
1411
1412
1413
1414 ###############################################################################
1415 #
1416 #       Function to figure out how to create directory trees.
1417 #
1418 ###############################################################################
1419
1420
1421
1422
1423 ###############################################################################
1424 #
1425 #       Function to check whether gettimeofday() exists, and how to call it.
1426 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1427 #
1428 ###############################################################################
1429
1430
1431
1432
1433 ###############################################################################
1434 #
1435 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1436 #
1437 ###############################################################################
1438
1439 # M4 sucks!!  perl sucks too!!
1440
1441 perl_version_cmd='print $]'
1442
1443
1444
1445
1446
1447 ###############################################################################
1448 #
1449 #       Function to demand "bc".  Losers.
1450 #
1451 ###############################################################################
1452
1453
1454
1455 ###############################################################################
1456 #
1457 #       Functions to check how to do ICMP PING requests.
1458 #
1459 ###############################################################################
1460
1461
1462
1463
1464
1465
1466 ###############################################################################
1467 #
1468 #       Functions to check for various X11 crap.
1469 #
1470 ###############################################################################
1471
1472 # Try and find the app-defaults directory.
1473 # It sucks that autoconf doesn't do this already...
1474 #
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485 # Random special-cases for X on certain pathological OSes.
1486 # You know who you are.
1487 #
1488
1489
1490
1491
1492 ###############################################################################
1493 #
1494 #       Some utility functions to make checking for X things easier.
1495 #
1496 ###############################################################################
1497
1498 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1499 #
1500
1501
1502 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1503 #
1504
1505
1506 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1507 #
1508
1509
1510
1511 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1512 # Use this sparingly; it probably doesn't work very well on X programs.
1513 #
1514
1515
1516 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1517 # (But not the -L directories!)
1518 #
1519
1520
1521
1522
1523 # Usage: HANDLE_X_PATH_ARG([variable_name],
1524 #                          [--command-line-option],
1525 #                          [descriptive string])
1526 #
1527 # All of the --with options take three forms:
1528 #
1529 #   --with-foo (or --with-foo=yes)
1530 #   --without-foo (or --with-foo=no)
1531 #   --with-foo=/DIR
1532 #
1533 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1534 # a directory (string beginning with a slash) it checks to see whether
1535 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1536 # as appropriate.
1537 #
1538
1539
1540
1541
1542 ###############################################################################
1543 ###############################################################################
1544 #
1545 #       End of function definitions.  Now start actually executing stuff.
1546 #
1547 ###############################################################################
1548 ###############################################################################
1549
1550 # random compiler setup
1551 ac_aux_dir=
1552 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1553   if test -f $ac_dir/install-sh; then
1554     ac_aux_dir=$ac_dir
1555     ac_install_sh="$ac_aux_dir/install-sh -c"
1556     break
1557   elif test -f $ac_dir/install.sh; then
1558     ac_aux_dir=$ac_dir
1559     ac_install_sh="$ac_aux_dir/install.sh -c"
1560     break
1561   elif test -f $ac_dir/shtool; then
1562     ac_aux_dir=$ac_dir
1563     ac_install_sh="$ac_aux_dir/shtool install -c"
1564     break
1565   fi
1566 done
1567 if test -z "$ac_aux_dir"; then
1568   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1569 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1570    { (exit 1); exit 1; }; }
1571 fi
1572 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1573 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1574 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1575
1576 # Make sure we can run config.sub.
1577 $ac_config_sub sun4 >/dev/null 2>&1 ||
1578   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1579 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1580    { (exit 1); exit 1; }; }
1581
1582 echo "$as_me:$LINENO: checking build system type" >&5
1583 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1584 if test "${ac_cv_build+set}" = set; then
1585   echo $ECHO_N "(cached) $ECHO_C" >&6
1586 else
1587   ac_cv_build_alias=$build_alias
1588 test -z "$ac_cv_build_alias" &&
1589   ac_cv_build_alias=`$ac_config_guess`
1590 test -z "$ac_cv_build_alias" &&
1591   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1592 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1593    { (exit 1); exit 1; }; }
1594 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1595   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1596 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1597    { (exit 1); exit 1; }; }
1598
1599 fi
1600 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1601 echo "${ECHO_T}$ac_cv_build" >&6
1602 build=$ac_cv_build
1603 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1604 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1605 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1606
1607
1608 echo "$as_me:$LINENO: checking host system type" >&5
1609 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1610 if test "${ac_cv_host+set}" = set; then
1611   echo $ECHO_N "(cached) $ECHO_C" >&6
1612 else
1613   ac_cv_host_alias=$host_alias
1614 test -z "$ac_cv_host_alias" &&
1615   ac_cv_host_alias=$ac_cv_build_alias
1616 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1617   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1618 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1619    { (exit 1); exit 1; }; }
1620
1621 fi
1622 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1623 echo "${ECHO_T}$ac_cv_host" >&6
1624 host=$ac_cv_host
1625 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1626 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1627 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1628
1629
1630
1631 ac_ext=c
1632 ac_cpp='$CPP $CPPFLAGS'
1633 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1634 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1635 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1636 if test -n "$ac_tool_prefix"; then
1637   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1638 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1639 echo "$as_me:$LINENO: checking for $ac_word" >&5
1640 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1641 if test "${ac_cv_prog_CC+set}" = set; then
1642   echo $ECHO_N "(cached) $ECHO_C" >&6
1643 else
1644   if test -n "$CC"; then
1645   ac_cv_prog_CC="$CC" # Let the user override the test.
1646 else
1647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1648 for as_dir in $PATH
1649 do
1650   IFS=$as_save_IFS
1651   test -z "$as_dir" && as_dir=.
1652   for ac_exec_ext in '' $ac_executable_extensions; do
1653   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1654     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1655     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1656     break 2
1657   fi
1658 done
1659 done
1660
1661 fi
1662 fi
1663 CC=$ac_cv_prog_CC
1664 if test -n "$CC"; then
1665   echo "$as_me:$LINENO: result: $CC" >&5
1666 echo "${ECHO_T}$CC" >&6
1667 else
1668   echo "$as_me:$LINENO: result: no" >&5
1669 echo "${ECHO_T}no" >&6
1670 fi
1671
1672 fi
1673 if test -z "$ac_cv_prog_CC"; then
1674   ac_ct_CC=$CC
1675   # Extract the first word of "gcc", so it can be a program name with args.
1676 set dummy gcc; ac_word=$2
1677 echo "$as_me:$LINENO: checking for $ac_word" >&5
1678 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1679 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1680   echo $ECHO_N "(cached) $ECHO_C" >&6
1681 else
1682   if test -n "$ac_ct_CC"; then
1683   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1684 else
1685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1686 for as_dir in $PATH
1687 do
1688   IFS=$as_save_IFS
1689   test -z "$as_dir" && as_dir=.
1690   for ac_exec_ext in '' $ac_executable_extensions; do
1691   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1692     ac_cv_prog_ac_ct_CC="gcc"
1693     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1694     break 2
1695   fi
1696 done
1697 done
1698
1699 fi
1700 fi
1701 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1702 if test -n "$ac_ct_CC"; then
1703   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1704 echo "${ECHO_T}$ac_ct_CC" >&6
1705 else
1706   echo "$as_me:$LINENO: result: no" >&5
1707 echo "${ECHO_T}no" >&6
1708 fi
1709
1710   CC=$ac_ct_CC
1711 else
1712   CC="$ac_cv_prog_CC"
1713 fi
1714
1715 if test -z "$CC"; then
1716   if test -n "$ac_tool_prefix"; then
1717   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1718 set dummy ${ac_tool_prefix}cc; ac_word=$2
1719 echo "$as_me:$LINENO: checking for $ac_word" >&5
1720 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1721 if test "${ac_cv_prog_CC+set}" = set; then
1722   echo $ECHO_N "(cached) $ECHO_C" >&6
1723 else
1724   if test -n "$CC"; then
1725   ac_cv_prog_CC="$CC" # Let the user override the test.
1726 else
1727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1728 for as_dir in $PATH
1729 do
1730   IFS=$as_save_IFS
1731   test -z "$as_dir" && as_dir=.
1732   for ac_exec_ext in '' $ac_executable_extensions; do
1733   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1734     ac_cv_prog_CC="${ac_tool_prefix}cc"
1735     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1736     break 2
1737   fi
1738 done
1739 done
1740
1741 fi
1742 fi
1743 CC=$ac_cv_prog_CC
1744 if test -n "$CC"; then
1745   echo "$as_me:$LINENO: result: $CC" >&5
1746 echo "${ECHO_T}$CC" >&6
1747 else
1748   echo "$as_me:$LINENO: result: no" >&5
1749 echo "${ECHO_T}no" >&6
1750 fi
1751
1752 fi
1753 if test -z "$ac_cv_prog_CC"; then
1754   ac_ct_CC=$CC
1755   # Extract the first word of "cc", so it can be a program name with args.
1756 set dummy cc; ac_word=$2
1757 echo "$as_me:$LINENO: checking for $ac_word" >&5
1758 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1759 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1760   echo $ECHO_N "(cached) $ECHO_C" >&6
1761 else
1762   if test -n "$ac_ct_CC"; then
1763   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1764 else
1765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1766 for as_dir in $PATH
1767 do
1768   IFS=$as_save_IFS
1769   test -z "$as_dir" && as_dir=.
1770   for ac_exec_ext in '' $ac_executable_extensions; do
1771   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1772     ac_cv_prog_ac_ct_CC="cc"
1773     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1774     break 2
1775   fi
1776 done
1777 done
1778
1779 fi
1780 fi
1781 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1782 if test -n "$ac_ct_CC"; then
1783   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1784 echo "${ECHO_T}$ac_ct_CC" >&6
1785 else
1786   echo "$as_me:$LINENO: result: no" >&5
1787 echo "${ECHO_T}no" >&6
1788 fi
1789
1790   CC=$ac_ct_CC
1791 else
1792   CC="$ac_cv_prog_CC"
1793 fi
1794
1795 fi
1796 if test -z "$CC"; then
1797   # Extract the first word of "cc", so it can be a program name with args.
1798 set dummy cc; ac_word=$2
1799 echo "$as_me:$LINENO: checking for $ac_word" >&5
1800 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1801 if test "${ac_cv_prog_CC+set}" = set; then
1802   echo $ECHO_N "(cached) $ECHO_C" >&6
1803 else
1804   if test -n "$CC"; then
1805   ac_cv_prog_CC="$CC" # Let the user override the test.
1806 else
1807   ac_prog_rejected=no
1808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1809 for as_dir in $PATH
1810 do
1811   IFS=$as_save_IFS
1812   test -z "$as_dir" && as_dir=.
1813   for ac_exec_ext in '' $ac_executable_extensions; do
1814   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1815     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1816        ac_prog_rejected=yes
1817        continue
1818      fi
1819     ac_cv_prog_CC="cc"
1820     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1821     break 2
1822   fi
1823 done
1824 done
1825
1826 if test $ac_prog_rejected = yes; then
1827   # We found a bogon in the path, so make sure we never use it.
1828   set dummy $ac_cv_prog_CC
1829   shift
1830   if test $# != 0; then
1831     # We chose a different compiler from the bogus one.
1832     # However, it has the same basename, so the bogon will be chosen
1833     # first if we set CC to just the basename; use the full file name.
1834     shift
1835     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1836   fi
1837 fi
1838 fi
1839 fi
1840 CC=$ac_cv_prog_CC
1841 if test -n "$CC"; then
1842   echo "$as_me:$LINENO: result: $CC" >&5
1843 echo "${ECHO_T}$CC" >&6
1844 else
1845   echo "$as_me:$LINENO: result: no" >&5
1846 echo "${ECHO_T}no" >&6
1847 fi
1848
1849 fi
1850 if test -z "$CC"; then
1851   if test -n "$ac_tool_prefix"; then
1852   for ac_prog in cl
1853   do
1854     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1855 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1856 echo "$as_me:$LINENO: checking for $ac_word" >&5
1857 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1858 if test "${ac_cv_prog_CC+set}" = set; then
1859   echo $ECHO_N "(cached) $ECHO_C" >&6
1860 else
1861   if test -n "$CC"; then
1862   ac_cv_prog_CC="$CC" # Let the user override the test.
1863 else
1864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1865 for as_dir in $PATH
1866 do
1867   IFS=$as_save_IFS
1868   test -z "$as_dir" && as_dir=.
1869   for ac_exec_ext in '' $ac_executable_extensions; do
1870   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1871     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1872     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1873     break 2
1874   fi
1875 done
1876 done
1877
1878 fi
1879 fi
1880 CC=$ac_cv_prog_CC
1881 if test -n "$CC"; then
1882   echo "$as_me:$LINENO: result: $CC" >&5
1883 echo "${ECHO_T}$CC" >&6
1884 else
1885   echo "$as_me:$LINENO: result: no" >&5
1886 echo "${ECHO_T}no" >&6
1887 fi
1888
1889     test -n "$CC" && break
1890   done
1891 fi
1892 if test -z "$CC"; then
1893   ac_ct_CC=$CC
1894   for ac_prog in cl
1895 do
1896   # Extract the first word of "$ac_prog", so it can be a program name with args.
1897 set dummy $ac_prog; ac_word=$2
1898 echo "$as_me:$LINENO: checking for $ac_word" >&5
1899 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1900 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1901   echo $ECHO_N "(cached) $ECHO_C" >&6
1902 else
1903   if test -n "$ac_ct_CC"; then
1904   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1905 else
1906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1907 for as_dir in $PATH
1908 do
1909   IFS=$as_save_IFS
1910   test -z "$as_dir" && as_dir=.
1911   for ac_exec_ext in '' $ac_executable_extensions; do
1912   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1913     ac_cv_prog_ac_ct_CC="$ac_prog"
1914     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1915     break 2
1916   fi
1917 done
1918 done
1919
1920 fi
1921 fi
1922 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1923 if test -n "$ac_ct_CC"; then
1924   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1925 echo "${ECHO_T}$ac_ct_CC" >&6
1926 else
1927   echo "$as_me:$LINENO: result: no" >&5
1928 echo "${ECHO_T}no" >&6
1929 fi
1930
1931   test -n "$ac_ct_CC" && break
1932 done
1933
1934   CC=$ac_ct_CC
1935 fi
1936
1937 fi
1938
1939
1940 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1941 See \`config.log' for more details." >&5
1942 echo "$as_me: error: no acceptable C compiler found in \$PATH
1943 See \`config.log' for more details." >&2;}
1944    { (exit 1); exit 1; }; }
1945
1946 # Provide some information about the compiler.
1947 echo "$as_me:$LINENO:" \
1948      "checking for C compiler version" >&5
1949 ac_compiler=`set X $ac_compile; echo $2`
1950 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1951   (eval $ac_compiler --version </dev/null >&5) 2>&5
1952   ac_status=$?
1953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1954   (exit $ac_status); }
1955 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1956   (eval $ac_compiler -v </dev/null >&5) 2>&5
1957   ac_status=$?
1958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1959   (exit $ac_status); }
1960 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1961   (eval $ac_compiler -V </dev/null >&5) 2>&5
1962   ac_status=$?
1963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1964   (exit $ac_status); }
1965
1966 cat >conftest.$ac_ext <<_ACEOF
1967 #line $LINENO "configure"
1968 /* confdefs.h.  */
1969 _ACEOF
1970 cat confdefs.h >>conftest.$ac_ext
1971 cat >>conftest.$ac_ext <<_ACEOF
1972 /* end confdefs.h.  */
1973
1974 int
1975 main ()
1976 {
1977
1978   ;
1979   return 0;
1980 }
1981 _ACEOF
1982 ac_clean_files_save=$ac_clean_files
1983 ac_clean_files="$ac_clean_files a.out a.exe b.out"
1984 # Try to create an executable without -o first, disregard a.out.
1985 # It will help us diagnose broken compilers, and finding out an intuition
1986 # of exeext.
1987 echo "$as_me:$LINENO: checking for C compiler default output" >&5
1988 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1989 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1990 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1991   (eval $ac_link_default) 2>&5
1992   ac_status=$?
1993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1994   (exit $ac_status); }; then
1995   # Find the output, starting from the most likely.  This scheme is
1996 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1997 # resort.
1998
1999 # Be careful to initialize this variable, since it used to be cached.
2000 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2001 ac_cv_exeext=
2002 # b.out is created by i960 compilers.
2003 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2004 do
2005   test -f "$ac_file" || continue
2006   case $ac_file in
2007     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2008         ;;
2009     conftest.$ac_ext )
2010         # This is the source file.
2011         ;;
2012     [ab].out )
2013         # We found the default executable, but exeext='' is most
2014         # certainly right.
2015         break;;
2016     *.* )
2017         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2018         # FIXME: I believe we export ac_cv_exeext for Libtool,
2019         # but it would be cool to find out if it's true.  Does anybody
2020         # maintain Libtool? --akim.
2021         export ac_cv_exeext
2022         break;;
2023     * )
2024         break;;
2025   esac
2026 done
2027 else
2028   echo "$as_me: failed program was:" >&5
2029 sed 's/^/| /' conftest.$ac_ext >&5
2030
2031 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2032 See \`config.log' for more details." >&5
2033 echo "$as_me: error: C compiler cannot create executables
2034 See \`config.log' for more details." >&2;}
2035    { (exit 77); exit 77; }; }
2036 fi
2037
2038 ac_exeext=$ac_cv_exeext
2039 echo "$as_me:$LINENO: result: $ac_file" >&5
2040 echo "${ECHO_T}$ac_file" >&6
2041
2042 # Check the compiler produces executables we can run.  If not, either
2043 # the compiler is broken, or we cross compile.
2044 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2045 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2046 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2047 # If not cross compiling, check that we can run a simple program.
2048 if test "$cross_compiling" != yes; then
2049   if { ac_try='./$ac_file'
2050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2051   (eval $ac_try) 2>&5
2052   ac_status=$?
2053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2054   (exit $ac_status); }; }; then
2055     cross_compiling=no
2056   else
2057     if test "$cross_compiling" = maybe; then
2058         cross_compiling=yes
2059     else
2060         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2061 If you meant to cross compile, use \`--host'.
2062 See \`config.log' for more details." >&5
2063 echo "$as_me: error: cannot run C compiled programs.
2064 If you meant to cross compile, use \`--host'.
2065 See \`config.log' for more details." >&2;}
2066    { (exit 1); exit 1; }; }
2067     fi
2068   fi
2069 fi
2070 echo "$as_me:$LINENO: result: yes" >&5
2071 echo "${ECHO_T}yes" >&6
2072
2073 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2074 ac_clean_files=$ac_clean_files_save
2075 # Check the compiler produces executables we can run.  If not, either
2076 # the compiler is broken, or we cross compile.
2077 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2078 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2079 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2080 echo "${ECHO_T}$cross_compiling" >&6
2081
2082 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2083 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2084 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2085   (eval $ac_link) 2>&5
2086   ac_status=$?
2087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2088   (exit $ac_status); }; then
2089   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2090 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2091 # work properly (i.e., refer to `conftest.exe'), while it won't with
2092 # `rm'.
2093 for ac_file in conftest.exe conftest conftest.*; do
2094   test -f "$ac_file" || continue
2095   case $ac_file in
2096     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2097     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2098           export ac_cv_exeext
2099           break;;
2100     * ) break;;
2101   esac
2102 done
2103 else
2104   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2105 See \`config.log' for more details." >&5
2106 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2107 See \`config.log' for more details." >&2;}
2108    { (exit 1); exit 1; }; }
2109 fi
2110
2111 rm -f conftest$ac_cv_exeext
2112 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2113 echo "${ECHO_T}$ac_cv_exeext" >&6
2114
2115 rm -f conftest.$ac_ext
2116 EXEEXT=$ac_cv_exeext
2117 ac_exeext=$EXEEXT
2118 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2119 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2120 if test "${ac_cv_objext+set}" = set; then
2121   echo $ECHO_N "(cached) $ECHO_C" >&6
2122 else
2123   cat >conftest.$ac_ext <<_ACEOF
2124 #line $LINENO "configure"
2125 /* confdefs.h.  */
2126 _ACEOF
2127 cat confdefs.h >>conftest.$ac_ext
2128 cat >>conftest.$ac_ext <<_ACEOF
2129 /* end confdefs.h.  */
2130
2131 int
2132 main ()
2133 {
2134
2135   ;
2136   return 0;
2137 }
2138 _ACEOF
2139 rm -f conftest.o conftest.obj
2140 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2141   (eval $ac_compile) 2>&5
2142   ac_status=$?
2143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2144   (exit $ac_status); }; then
2145   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2146   case $ac_file in
2147     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2148     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2149        break;;
2150   esac
2151 done
2152 else
2153   echo "$as_me: failed program was:" >&5
2154 sed 's/^/| /' conftest.$ac_ext >&5
2155
2156 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2157 See \`config.log' for more details." >&5
2158 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2159 See \`config.log' for more details." >&2;}
2160    { (exit 1); exit 1; }; }
2161 fi
2162
2163 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2164 fi
2165 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2166 echo "${ECHO_T}$ac_cv_objext" >&6
2167 OBJEXT=$ac_cv_objext
2168 ac_objext=$OBJEXT
2169 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2170 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2171 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2172   echo $ECHO_N "(cached) $ECHO_C" >&6
2173 else
2174   cat >conftest.$ac_ext <<_ACEOF
2175 #line $LINENO "configure"
2176 /* confdefs.h.  */
2177 _ACEOF
2178 cat confdefs.h >>conftest.$ac_ext
2179 cat >>conftest.$ac_ext <<_ACEOF
2180 /* end confdefs.h.  */
2181
2182 int
2183 main ()
2184 {
2185 #ifndef __GNUC__
2186        choke me
2187 #endif
2188
2189   ;
2190   return 0;
2191 }
2192 _ACEOF
2193 rm -f conftest.$ac_objext
2194 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2195   (eval $ac_compile) 2>&5
2196   ac_status=$?
2197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2198   (exit $ac_status); } &&
2199          { ac_try='test -s conftest.$ac_objext'
2200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2201   (eval $ac_try) 2>&5
2202   ac_status=$?
2203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2204   (exit $ac_status); }; }; then
2205   ac_compiler_gnu=yes
2206 else
2207   echo "$as_me: failed program was:" >&5
2208 sed 's/^/| /' conftest.$ac_ext >&5
2209
2210 ac_compiler_gnu=no
2211 fi
2212 rm -f conftest.$ac_objext conftest.$ac_ext
2213 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2214
2215 fi
2216 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2217 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2218 GCC=`test $ac_compiler_gnu = yes && echo yes`
2219 ac_test_CFLAGS=${CFLAGS+set}
2220 ac_save_CFLAGS=$CFLAGS
2221 CFLAGS="-g"
2222 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2223 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2224 if test "${ac_cv_prog_cc_g+set}" = set; then
2225   echo $ECHO_N "(cached) $ECHO_C" >&6
2226 else
2227   cat >conftest.$ac_ext <<_ACEOF
2228 #line $LINENO "configure"
2229 /* confdefs.h.  */
2230 _ACEOF
2231 cat confdefs.h >>conftest.$ac_ext
2232 cat >>conftest.$ac_ext <<_ACEOF
2233 /* end confdefs.h.  */
2234
2235 int
2236 main ()
2237 {
2238
2239   ;
2240   return 0;
2241 }
2242 _ACEOF
2243 rm -f conftest.$ac_objext
2244 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2245   (eval $ac_compile) 2>&5
2246   ac_status=$?
2247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2248   (exit $ac_status); } &&
2249          { ac_try='test -s conftest.$ac_objext'
2250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2251   (eval $ac_try) 2>&5
2252   ac_status=$?
2253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2254   (exit $ac_status); }; }; then
2255   ac_cv_prog_cc_g=yes
2256 else
2257   echo "$as_me: failed program was:" >&5
2258 sed 's/^/| /' conftest.$ac_ext >&5
2259
2260 ac_cv_prog_cc_g=no
2261 fi
2262 rm -f conftest.$ac_objext conftest.$ac_ext
2263 fi
2264 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2265 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2266 if test "$ac_test_CFLAGS" = set; then
2267   CFLAGS=$ac_save_CFLAGS
2268 elif test $ac_cv_prog_cc_g = yes; then
2269   if test "$GCC" = yes; then
2270     CFLAGS="-g -O2"
2271   else
2272     CFLAGS="-g"
2273   fi
2274 else
2275   if test "$GCC" = yes; then
2276     CFLAGS="-O2"
2277   else
2278     CFLAGS=
2279   fi
2280 fi
2281 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2282 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2283 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2284   echo $ECHO_N "(cached) $ECHO_C" >&6
2285 else
2286   ac_cv_prog_cc_stdc=no
2287 ac_save_CC=$CC
2288 cat >conftest.$ac_ext <<_ACEOF
2289 #line $LINENO "configure"
2290 /* confdefs.h.  */
2291 _ACEOF
2292 cat confdefs.h >>conftest.$ac_ext
2293 cat >>conftest.$ac_ext <<_ACEOF
2294 /* end confdefs.h.  */
2295 #include <stdarg.h>
2296 #include <stdio.h>
2297 #include <sys/types.h>
2298 #include <sys/stat.h>
2299 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2300 struct buf { int x; };
2301 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2302 static char *e (p, i)
2303      char **p;
2304      int i;
2305 {
2306   return p[i];
2307 }
2308 static char *f (char * (*g) (char **, int), char **p, ...)
2309 {
2310   char *s;
2311   va_list v;
2312   va_start (v,p);
2313   s = g (p, va_arg (v,int));
2314   va_end (v);
2315   return s;
2316 }
2317 int test (int i, double x);
2318 struct s1 {int (*f) (int a);};
2319 struct s2 {int (*f) (double a);};
2320 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2321 int argc;
2322 char **argv;
2323 int
2324 main ()
2325 {
2326 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2327   ;
2328   return 0;
2329 }
2330 _ACEOF
2331 # Don't try gcc -ansi; that turns off useful extensions and
2332 # breaks some systems' header files.
2333 # AIX                   -qlanglvl=ansi
2334 # Ultrix and OSF/1      -std1
2335 # HP-UX 10.20 and later -Ae
2336 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2337 # SVR4                  -Xc -D__EXTENSIONS__
2338 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2339 do
2340   CC="$ac_save_CC $ac_arg"
2341   rm -f conftest.$ac_objext
2342 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2343   (eval $ac_compile) 2>&5
2344   ac_status=$?
2345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2346   (exit $ac_status); } &&
2347          { ac_try='test -s conftest.$ac_objext'
2348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2349   (eval $ac_try) 2>&5
2350   ac_status=$?
2351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2352   (exit $ac_status); }; }; then
2353   ac_cv_prog_cc_stdc=$ac_arg
2354 break
2355 else
2356   echo "$as_me: failed program was:" >&5
2357 sed 's/^/| /' conftest.$ac_ext >&5
2358
2359 fi
2360 rm -f conftest.$ac_objext
2361 done
2362 rm -f conftest.$ac_ext conftest.$ac_objext
2363 CC=$ac_save_CC
2364
2365 fi
2366
2367 case "x$ac_cv_prog_cc_stdc" in
2368   x|xno)
2369     echo "$as_me:$LINENO: result: none needed" >&5
2370 echo "${ECHO_T}none needed" >&6 ;;
2371   *)
2372     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2373 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2374     CC="$CC $ac_cv_prog_cc_stdc" ;;
2375 esac
2376
2377 # Some people use a C++ compiler to compile C.  Since we use `exit',
2378 # in C++ we need to declare it.  In case someone uses the same compiler
2379 # for both compiling C and C++ we need to have the C++ compiler decide
2380 # the declaration of exit, since it's the most demanding environment.
2381 cat >conftest.$ac_ext <<_ACEOF
2382 #ifndef __cplusplus
2383   choke me
2384 #endif
2385 _ACEOF
2386 rm -f conftest.$ac_objext
2387 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2388   (eval $ac_compile) 2>&5
2389   ac_status=$?
2390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2391   (exit $ac_status); } &&
2392          { ac_try='test -s conftest.$ac_objext'
2393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2394   (eval $ac_try) 2>&5
2395   ac_status=$?
2396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397   (exit $ac_status); }; }; then
2398   for ac_declaration in \
2399    ''\
2400    '#include <stdlib.h>' \
2401    'extern "C" void std::exit (int) throw (); using std::exit;' \
2402    'extern "C" void std::exit (int); using std::exit;' \
2403    'extern "C" void exit (int) throw ();' \
2404    'extern "C" void exit (int);' \
2405    'void exit (int);'
2406 do
2407   cat >conftest.$ac_ext <<_ACEOF
2408 #line $LINENO "configure"
2409 /* confdefs.h.  */
2410 _ACEOF
2411 cat confdefs.h >>conftest.$ac_ext
2412 cat >>conftest.$ac_ext <<_ACEOF
2413 /* end confdefs.h.  */
2414 #include <stdlib.h>
2415 $ac_declaration
2416 int
2417 main ()
2418 {
2419 exit (42);
2420   ;
2421   return 0;
2422 }
2423 _ACEOF
2424 rm -f conftest.$ac_objext
2425 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2426   (eval $ac_compile) 2>&5
2427   ac_status=$?
2428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2429   (exit $ac_status); } &&
2430          { ac_try='test -s conftest.$ac_objext'
2431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2432   (eval $ac_try) 2>&5
2433   ac_status=$?
2434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2435   (exit $ac_status); }; }; then
2436   :
2437 else
2438   echo "$as_me: failed program was:" >&5
2439 sed 's/^/| /' conftest.$ac_ext >&5
2440
2441 continue
2442 fi
2443 rm -f conftest.$ac_objext conftest.$ac_ext
2444   cat >conftest.$ac_ext <<_ACEOF
2445 #line $LINENO "configure"
2446 /* confdefs.h.  */
2447 _ACEOF
2448 cat confdefs.h >>conftest.$ac_ext
2449 cat >>conftest.$ac_ext <<_ACEOF
2450 /* end confdefs.h.  */
2451 $ac_declaration
2452 int
2453 main ()
2454 {
2455 exit (42);
2456   ;
2457   return 0;
2458 }
2459 _ACEOF
2460 rm -f conftest.$ac_objext
2461 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2462   (eval $ac_compile) 2>&5
2463   ac_status=$?
2464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2465   (exit $ac_status); } &&
2466          { ac_try='test -s conftest.$ac_objext'
2467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2468   (eval $ac_try) 2>&5
2469   ac_status=$?
2470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2471   (exit $ac_status); }; }; then
2472   break
2473 else
2474   echo "$as_me: failed program was:" >&5
2475 sed 's/^/| /' conftest.$ac_ext >&5
2476
2477 fi
2478 rm -f conftest.$ac_objext conftest.$ac_ext
2479 done
2480 rm -f conftest*
2481 if test -n "$ac_declaration"; then
2482   echo '#ifdef __cplusplus' >>confdefs.h
2483   echo $ac_declaration      >>confdefs.h
2484   echo '#endif'             >>confdefs.h
2485 fi
2486
2487 else
2488   echo "$as_me: failed program was:" >&5
2489 sed 's/^/| /' conftest.$ac_ext >&5
2490
2491 fi
2492 rm -f conftest.$ac_objext conftest.$ac_ext
2493 ac_ext=c
2494 ac_cpp='$CPP $CPPFLAGS'
2495 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2496 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2497 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2498
2499
2500   if test -z "$GCC"; then
2501     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2502 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2503     case "$host" in
2504       *-hpux* )
2505         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2506 echo "${ECHO_T}HPUX: adding -Ae" >&6
2507         CC="$CC -Ae"
2508       ;;
2509       *-aix* )
2510         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2511 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2512         CC="$CC -qlanglvl=ansi -qhalt=e"
2513       ;;
2514
2515       *-dec-* )
2516         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2517 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2518         CC="$CC -std1"
2519       ;;
2520
2521       *)
2522         echo "$as_me:$LINENO: result: no idea" >&5
2523 echo "${ECHO_T}no idea" >&6
2524       ;;
2525     esac
2526   fi
2527
2528   OBJCC="$CC"
2529
2530   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2531 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2532   if test "$cross_compiling" = yes; then
2533   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2534 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2535    { (exit 1); exit 1; }; }
2536 else
2537   cat >conftest.$ac_ext <<_ACEOF
2538 #line $LINENO "configure"
2539 /* confdefs.h.  */
2540 _ACEOF
2541 cat confdefs.h >>conftest.$ac_ext
2542 cat >>conftest.$ac_ext <<_ACEOF
2543 /* end confdefs.h.  */
2544  main(int ac, char **av) { return 0; }
2545 _ACEOF
2546 rm -f conftest$ac_exeext
2547 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2548   (eval $ac_link) 2>&5
2549   ac_status=$?
2550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2551   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2553   (eval $ac_try) 2>&5
2554   ac_status=$?
2555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2556   (exit $ac_status); }; }; then
2557   echo "$as_me:$LINENO: result: yes" >&5
2558 echo "${ECHO_T}yes" >&6
2559 else
2560   echo "$as_me: program exited with status $ac_status" >&5
2561 echo "$as_me: failed program was:" >&5
2562 sed 's/^/| /' conftest.$ac_ext >&5
2563
2564 ( exit $ac_status )
2565 echo "$as_me:$LINENO: result: no" >&5
2566 echo "${ECHO_T}no" >&6
2567      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2568 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2569    { (exit 1); exit 1; }; }
2570 fi
2571 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2572 fi
2573
2574   if test -n "$GCC"; then
2575     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2576 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2577     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs"
2578     OBJCC="$OBJCC -Wall"
2579     # supposedly gcc 3.4 will have "-Wdeclaration-after-statement"
2580     # and then perhaps we can do without -pedantic?
2581   else
2582     case "$host" in
2583       *-irix5* |*-irix6.0-3* )
2584         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2585 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2586         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2587       ;;
2588 #     *-dec-osf* )
2589 #       if test -z "$GCC"; then
2590 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2591 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2592 #       fi
2593 #     ;;
2594     esac
2595   fi
2596
2597 if test -n "$GCC"; then
2598    if test -n "$GCC"; then
2599    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2600 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2601 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2602   echo $ECHO_N "(cached) $ECHO_C" >&6
2603 else
2604   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
2605           grep unrecognized >/dev/null ); then
2606        ac_cv_gcc_accepts_std=no
2607      else
2608        ac_cv_gcc_accepts_std=yes
2609      fi
2610 fi
2611 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2612 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2613    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2614   fi
2615
2616    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2617 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2618    #
2619    # The reason that // comments are banned from xscreensaver is that gcc is
2620    # basically the only compiler in the world that supports them in C code.
2621    # All other vendors support them only in their C++ compilers, not in their
2622    # ANSI C compilers.  This means that it's a portability problem: every time
2623    # these comments have snuck into the xscreensaver source code, I've gotten
2624    # complaints about it the next day.  So we turn off support for them in gcc
2625    # as well to prevent them from accidentially slipping in.
2626    #
2627    if test "$ac_gcc_accepts_std" = yes ; then
2628      #
2629      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2630      # (That appears to be the only additional preprocessor symbol
2631      # it defines, in addition to the syntax changes it makes.)
2632      #
2633      # -std=gnu89 is no good, because // comments were a GNU extension
2634      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2635      # with -std=gnu89 but not with -std=c89.)
2636      #
2637      CC="$CC -std=c89 -U__STRICT_ANSI__"
2638    else
2639      # The old way:
2640      CC="$CC -Wp,-lang-c89"
2641    fi
2642   fi
2643
2644 if test -n "$GCC"; then
2645    if test -n "$GCC"; then
2646    echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
2647 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6
2648 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
2649   echo $ECHO_N "(cached) $ECHO_C" >&6
2650 else
2651   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
2652           grep unrecognized >/dev/null ); then
2653        ac_cv_gcc_accepts_no_cpp_precomp=no
2654      else
2655        ac_cv_gcc_accepts_no_cpp_precomp=yes
2656      fi
2657 fi
2658 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
2659 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6
2660    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
2661   fi
2662
2663    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
2664      echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
2665 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6
2666      CC="$CC -no-cpp-precomp"
2667    fi
2668   fi
2669
2670 ac_ext=c
2671 ac_cpp='$CPP $CPPFLAGS'
2672 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2673 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2674 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2675 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2676 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2677 # On Suns, sometimes $CPP names a directory.
2678 if test -n "$CPP" && test -d "$CPP"; then
2679   CPP=
2680 fi
2681 if test -z "$CPP"; then
2682   if test "${ac_cv_prog_CPP+set}" = set; then
2683   echo $ECHO_N "(cached) $ECHO_C" >&6
2684 else
2685       # Double quotes because CPP needs to be expanded
2686     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2687     do
2688       ac_preproc_ok=false
2689 for ac_c_preproc_warn_flag in '' yes
2690 do
2691   # Use a header file that comes with gcc, so configuring glibc
2692   # with a fresh cross-compiler works.
2693   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2694   # <limits.h> exists even on freestanding compilers.
2695   # On the NeXT, cc -E runs the code through the compiler's parser,
2696   # not just through cpp. "Syntax error" is here to catch this case.
2697   cat >conftest.$ac_ext <<_ACEOF
2698 #line $LINENO "configure"
2699 /* confdefs.h.  */
2700 _ACEOF
2701 cat confdefs.h >>conftest.$ac_ext
2702 cat >>conftest.$ac_ext <<_ACEOF
2703 /* end confdefs.h.  */
2704 #ifdef __STDC__
2705 # include <limits.h>
2706 #else
2707 # include <assert.h>
2708 #endif
2709                      Syntax error
2710 _ACEOF
2711 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2712   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2713   ac_status=$?
2714   grep -v '^ *+' conftest.er1 >conftest.err
2715   rm -f conftest.er1
2716   cat conftest.err >&5
2717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2718   (exit $ac_status); } >/dev/null; then
2719   if test -s conftest.err; then
2720     ac_cpp_err=$ac_c_preproc_warn_flag
2721   else
2722     ac_cpp_err=
2723   fi
2724 else
2725   ac_cpp_err=yes
2726 fi
2727 if test -z "$ac_cpp_err"; then
2728   :
2729 else
2730   echo "$as_me: failed program was:" >&5
2731 sed 's/^/| /' conftest.$ac_ext >&5
2732
2733   # Broken: fails on valid input.
2734 continue
2735 fi
2736 rm -f conftest.err conftest.$ac_ext
2737
2738   # OK, works on sane cases.  Now check whether non-existent headers
2739   # can be detected and how.
2740   cat >conftest.$ac_ext <<_ACEOF
2741 #line $LINENO "configure"
2742 /* confdefs.h.  */
2743 _ACEOF
2744 cat confdefs.h >>conftest.$ac_ext
2745 cat >>conftest.$ac_ext <<_ACEOF
2746 /* end confdefs.h.  */
2747 #include <ac_nonexistent.h>
2748 _ACEOF
2749 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2750   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2751   ac_status=$?
2752   grep -v '^ *+' conftest.er1 >conftest.err
2753   rm -f conftest.er1
2754   cat conftest.err >&5
2755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2756   (exit $ac_status); } >/dev/null; then
2757   if test -s conftest.err; then
2758     ac_cpp_err=$ac_c_preproc_warn_flag
2759   else
2760     ac_cpp_err=
2761   fi
2762 else
2763   ac_cpp_err=yes
2764 fi
2765 if test -z "$ac_cpp_err"; then
2766   # Broken: success on invalid input.
2767 continue
2768 else
2769   echo "$as_me: failed program was:" >&5
2770 sed 's/^/| /' conftest.$ac_ext >&5
2771
2772   # Passes both tests.
2773 ac_preproc_ok=:
2774 break
2775 fi
2776 rm -f conftest.err conftest.$ac_ext
2777
2778 done
2779 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2780 rm -f conftest.err conftest.$ac_ext
2781 if $ac_preproc_ok; then
2782   break
2783 fi
2784
2785     done
2786     ac_cv_prog_CPP=$CPP
2787
2788 fi
2789   CPP=$ac_cv_prog_CPP
2790 else
2791   ac_cv_prog_CPP=$CPP
2792 fi
2793 echo "$as_me:$LINENO: result: $CPP" >&5
2794 echo "${ECHO_T}$CPP" >&6
2795 ac_preproc_ok=false
2796 for ac_c_preproc_warn_flag in '' yes
2797 do
2798   # Use a header file that comes with gcc, so configuring glibc
2799   # with a fresh cross-compiler works.
2800   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2801   # <limits.h> exists even on freestanding compilers.
2802   # On the NeXT, cc -E runs the code through the compiler's parser,
2803   # not just through cpp. "Syntax error" is here to catch this case.
2804   cat >conftest.$ac_ext <<_ACEOF
2805 #line $LINENO "configure"
2806 /* confdefs.h.  */
2807 _ACEOF
2808 cat confdefs.h >>conftest.$ac_ext
2809 cat >>conftest.$ac_ext <<_ACEOF
2810 /* end confdefs.h.  */
2811 #ifdef __STDC__
2812 # include <limits.h>
2813 #else
2814 # include <assert.h>
2815 #endif
2816                      Syntax error
2817 _ACEOF
2818 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2819   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2820   ac_status=$?
2821   grep -v '^ *+' conftest.er1 >conftest.err
2822   rm -f conftest.er1
2823   cat conftest.err >&5
2824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2825   (exit $ac_status); } >/dev/null; then
2826   if test -s conftest.err; then
2827     ac_cpp_err=$ac_c_preproc_warn_flag
2828   else
2829     ac_cpp_err=
2830   fi
2831 else
2832   ac_cpp_err=yes
2833 fi
2834 if test -z "$ac_cpp_err"; then
2835   :
2836 else
2837   echo "$as_me: failed program was:" >&5
2838 sed 's/^/| /' conftest.$ac_ext >&5
2839
2840   # Broken: fails on valid input.
2841 continue
2842 fi
2843 rm -f conftest.err conftest.$ac_ext
2844
2845   # OK, works on sane cases.  Now check whether non-existent headers
2846   # can be detected and how.
2847   cat >conftest.$ac_ext <<_ACEOF
2848 #line $LINENO "configure"
2849 /* confdefs.h.  */
2850 _ACEOF
2851 cat confdefs.h >>conftest.$ac_ext
2852 cat >>conftest.$ac_ext <<_ACEOF
2853 /* end confdefs.h.  */
2854 #include <ac_nonexistent.h>
2855 _ACEOF
2856 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2857   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2858   ac_status=$?
2859   grep -v '^ *+' conftest.er1 >conftest.err
2860   rm -f conftest.er1
2861   cat conftest.err >&5
2862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2863   (exit $ac_status); } >/dev/null; then
2864   if test -s conftest.err; then
2865     ac_cpp_err=$ac_c_preproc_warn_flag
2866   else
2867     ac_cpp_err=
2868   fi
2869 else
2870   ac_cpp_err=yes
2871 fi
2872 if test -z "$ac_cpp_err"; then
2873   # Broken: success on invalid input.
2874 continue
2875 else
2876   echo "$as_me: failed program was:" >&5
2877 sed 's/^/| /' conftest.$ac_ext >&5
2878
2879   # Passes both tests.
2880 ac_preproc_ok=:
2881 break
2882 fi
2883 rm -f conftest.err conftest.$ac_ext
2884
2885 done
2886 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2887 rm -f conftest.err conftest.$ac_ext
2888 if $ac_preproc_ok; then
2889   :
2890 else
2891   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2892 See \`config.log' for more details." >&5
2893 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2894 See \`config.log' for more details." >&2;}
2895    { (exit 1); exit 1; }; }
2896 fi
2897
2898 ac_ext=c
2899 ac_cpp='$CPP $CPPFLAGS'
2900 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2901 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2902 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2903
2904 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
2905 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2906 if test "${ac_cv_c_const+set}" = set; then
2907   echo $ECHO_N "(cached) $ECHO_C" >&6
2908 else
2909   cat >conftest.$ac_ext <<_ACEOF
2910 #line $LINENO "configure"
2911 /* confdefs.h.  */
2912 _ACEOF
2913 cat confdefs.h >>conftest.$ac_ext
2914 cat >>conftest.$ac_ext <<_ACEOF
2915 /* end confdefs.h.  */
2916
2917 int
2918 main ()
2919 {
2920 /* FIXME: Include the comments suggested by Paul. */
2921 #ifndef __cplusplus
2922   /* Ultrix mips cc rejects this.  */
2923   typedef int charset[2];
2924   const charset x;
2925   /* SunOS 4.1.1 cc rejects this.  */
2926   char const *const *ccp;
2927   char **p;
2928   /* NEC SVR4.0.2 mips cc rejects this.  */
2929   struct point {int x, y;};
2930   static struct point const zero = {0,0};
2931   /* AIX XL C 1.02.0.0 rejects this.
2932      It does not let you subtract one const X* pointer from another in
2933      an arm of an if-expression whose if-part is not a constant
2934      expression */
2935   const char *g = "string";
2936   ccp = &g + (g ? g-g : 0);
2937   /* HPUX 7.0 cc rejects these. */
2938   ++ccp;
2939   p = (char**) ccp;
2940   ccp = (char const *const *) p;
2941   { /* SCO 3.2v4 cc rejects this.  */
2942     char *t;
2943     char const *s = 0 ? (char *) 0 : (char const *) 0;
2944
2945     *t++ = 0;
2946   }
2947   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2948     int x[] = {25, 17};
2949     const int *foo = &x[0];
2950     ++foo;
2951   }
2952   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2953     typedef const int *iptr;
2954     iptr p = 0;
2955     ++p;
2956   }
2957   { /* AIX XL C 1.02.0.0 rejects this saying
2958        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2959     struct s { int j; const int *ap[3]; };
2960     struct s *b; b->j = 5;
2961   }
2962   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2963     const int foo = 10;
2964   }
2965 #endif
2966
2967   ;
2968   return 0;
2969 }
2970 _ACEOF
2971 rm -f conftest.$ac_objext
2972 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2973   (eval $ac_compile) 2>&5
2974   ac_status=$?
2975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2976   (exit $ac_status); } &&
2977          { ac_try='test -s conftest.$ac_objext'
2978   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2979   (eval $ac_try) 2>&5
2980   ac_status=$?
2981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2982   (exit $ac_status); }; }; then
2983   ac_cv_c_const=yes
2984 else
2985   echo "$as_me: failed program was:" >&5
2986 sed 's/^/| /' conftest.$ac_ext >&5
2987
2988 ac_cv_c_const=no
2989 fi
2990 rm -f conftest.$ac_objext conftest.$ac_ext
2991 fi
2992 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
2993 echo "${ECHO_T}$ac_cv_c_const" >&6
2994 if test $ac_cv_c_const = no; then
2995
2996 cat >>confdefs.h <<\_ACEOF
2997 #define const
2998 _ACEOF
2999
3000 fi
3001
3002 echo "$as_me:$LINENO: checking for inline" >&5
3003 echo $ECHO_N "checking for inline... $ECHO_C" >&6
3004 if test "${ac_cv_c_inline+set}" = set; then
3005   echo $ECHO_N "(cached) $ECHO_C" >&6
3006 else
3007   ac_cv_c_inline=no
3008 for ac_kw in inline __inline__ __inline; do
3009   cat >conftest.$ac_ext <<_ACEOF
3010 #line $LINENO "configure"
3011 /* confdefs.h.  */
3012 _ACEOF
3013 cat confdefs.h >>conftest.$ac_ext
3014 cat >>conftest.$ac_ext <<_ACEOF
3015 /* end confdefs.h.  */
3016 #ifndef __cplusplus
3017 typedef int foo_t;
3018 static $ac_kw foo_t static_foo () {return 0; }
3019 $ac_kw foo_t foo () {return 0; }
3020 #endif
3021
3022 _ACEOF
3023 rm -f conftest.$ac_objext
3024 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3025   (eval $ac_compile) 2>&5
3026   ac_status=$?
3027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3028   (exit $ac_status); } &&
3029          { ac_try='test -s conftest.$ac_objext'
3030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3031   (eval $ac_try) 2>&5
3032   ac_status=$?
3033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3034   (exit $ac_status); }; }; then
3035   ac_cv_c_inline=$ac_kw; break
3036 else
3037   echo "$as_me: failed program was:" >&5
3038 sed 's/^/| /' conftest.$ac_ext >&5
3039
3040 fi
3041 rm -f conftest.$ac_objext conftest.$ac_ext
3042 done
3043
3044 fi
3045 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3046 echo "${ECHO_T}$ac_cv_c_inline" >&6
3047 case $ac_cv_c_inline in
3048   inline | yes) ;;
3049   no)
3050 cat >>confdefs.h <<\_ACEOF
3051 #define inline
3052 _ACEOF
3053  ;;
3054   *)  cat >>confdefs.h <<_ACEOF
3055 #define inline $ac_cv_c_inline
3056 _ACEOF
3057  ;;
3058 esac
3059
3060
3061 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3062   echo "$as_me:$LINENO: checking for bc" >&5
3063 echo $ECHO_N "checking for bc... $ECHO_C" >&6
3064   if test "$ac_bc_result" = "15" ; then
3065     echo "$as_me:$LINENO: result: yes" >&5
3066 echo "${ECHO_T}yes" >&6
3067   else
3068     echo "$as_me:$LINENO: result: no" >&5
3069 echo "${ECHO_T}no" >&6
3070     echo ''
3071     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3072                   part of Unix since the 1970s.  Come back when your vendor
3073                   has grown a clue." >&5
3074 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3075                   part of Unix since the 1970s.  Come back when your vendor
3076                   has grown a clue." >&2;}
3077    { (exit 1); exit 1; }; }
3078   fi
3079
3080
3081 # stuff for Makefiles
3082 # Find a good install program.  We prefer a C program (faster),
3083 # so one script is as good as another.  But avoid the broken or
3084 # incompatible versions:
3085 # SysV /etc/install, /usr/sbin/install
3086 # SunOS /usr/etc/install
3087 # IRIX /sbin/install
3088 # AIX /bin/install
3089 # AmigaOS /C/install, which installs bootblocks on floppy discs
3090 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3091 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3092 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3093 # ./install, which can be erroneously created by make from ./install.sh.
3094 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3095 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3096 if test -z "$INSTALL"; then
3097 if test "${ac_cv_path_install+set}" = set; then
3098   echo $ECHO_N "(cached) $ECHO_C" >&6
3099 else
3100   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3101 for as_dir in $PATH
3102 do
3103   IFS=$as_save_IFS
3104   test -z "$as_dir" && as_dir=.
3105   # Account for people who put trailing slashes in PATH elements.
3106 case $as_dir/ in
3107   ./ | .// | /cC/* | \
3108   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3109   /usr/ucb/* ) ;;
3110   *)
3111     # OSF1 and SCO ODT 3.0 have their own names for install.
3112     # Don't use installbsd from OSF since it installs stuff as root
3113     # by default.
3114     for ac_prog in ginstall scoinst install; do
3115       for ac_exec_ext in '' $ac_executable_extensions; do
3116         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3117           if test $ac_prog = install &&
3118             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3119             # AIX install.  It has an incompatible calling convention.
3120             :
3121           elif test $ac_prog = install &&
3122             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3123             # program-specific install script used by HP pwplus--don't use.
3124             :
3125           else
3126             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3127             break 3
3128           fi
3129         fi
3130       done
3131     done
3132     ;;
3133 esac
3134 done
3135
3136
3137 fi
3138   if test "${ac_cv_path_install+set}" = set; then
3139     INSTALL=$ac_cv_path_install
3140   else
3141     # As a last resort, use the slow shell script.  We don't cache a
3142     # path for INSTALL within a source directory, because that will
3143     # break other packages using the cache if that directory is
3144     # removed, or if the path is relative.
3145     INSTALL=$ac_install_sh
3146   fi
3147 fi
3148 echo "$as_me:$LINENO: result: $INSTALL" >&5
3149 echo "${ECHO_T}$INSTALL" >&6
3150
3151 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3152 # It thinks the first close brace ends the variable substitution.
3153 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3154
3155 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3156
3157 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3158
3159 echo "$as_me:$LINENO: checking whether \\"\${INSTALL} -d\\" creates intermediate directories" >&5
3160 echo $ECHO_N "checking whether \\"\${INSTALL} -d\\" creates intermediate directories... $ECHO_C" >&6
3161 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
3162   echo $ECHO_N "(cached) $ECHO_C" >&6
3163 else
3164   ac_cv_install_d_creates_dirs=no
3165      rm -rf conftestdir
3166      if mkdir conftestdir; then
3167        cd conftestdir 2>/dev/null
3168        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
3169        if test -d dir1/dir2/. ; then
3170          ac_cv_install_d_creates_dirs=yes
3171        fi
3172        cd .. 2>/dev/null
3173        rm -rf conftestdir
3174      fi
3175
3176 fi
3177 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
3178 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
3179
3180   if test "$ac_cv_install_d_creates_dirs" = no ; then
3181     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
3182 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
3183 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
3184   echo $ECHO_N "(cached) $ECHO_C" >&6
3185 else
3186   ac_cv_mkdir_p_creates_dirs=no
3187        rm -rf conftestdir
3188        if mkdir conftestdir; then
3189          cd conftestdir 2>/dev/null
3190          mkdir -p dir1/dir2 >/dev/null 2>&1
3191          if test -d dir1/dir2/. ; then
3192            ac_cv_mkdir_p_creates_dirs=yes
3193          fi
3194          cd .. 2>/dev/null
3195          rm -rf conftestdir
3196        fi
3197
3198 fi
3199 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3200 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3201   fi
3202
3203   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3204     INSTALL_DIRS='${INSTALL} -d'
3205   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3206     INSTALL_DIRS='mkdir -p'
3207   else
3208     # any other ideas?
3209     INSTALL_DIRS='${INSTALL} -d'
3210   fi
3211
3212 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3213 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3214 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3215 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3216   echo $ECHO_N "(cached) $ECHO_C" >&6
3217 else
3218   cat >conftest.make <<\_ACEOF
3219 all:
3220         @echo 'ac_maketemp="$(MAKE)"'
3221 _ACEOF
3222 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3223 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3224 if test -n "$ac_maketemp"; then
3225   eval ac_cv_prog_make_${ac_make}_set=yes
3226 else
3227   eval ac_cv_prog_make_${ac_make}_set=no
3228 fi
3229 rm -f conftest.make
3230 fi
3231 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3232   echo "$as_me:$LINENO: result: yes" >&5
3233 echo "${ECHO_T}yes" >&6
3234   SET_MAKE=
3235 else
3236   echo "$as_me:$LINENO: result: no" >&5
3237 echo "${ECHO_T}no" >&6
3238   SET_MAKE="MAKE=${MAKE-make}"
3239 fi
3240
3241
3242 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3243 # That's wrong: it should be set to '${INSTALL}', so that one can
3244 # implement the "install-strip" target properly (strip executables,
3245 # but do not try to strip scripts.)
3246 #
3247 INSTALL_SCRIPT='${INSTALL}'
3248
3249 # random libc stuff
3250
3251 echo "$as_me:$LINENO: checking for egrep" >&5
3252 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3253 if test "${ac_cv_prog_egrep+set}" = set; then
3254   echo $ECHO_N "(cached) $ECHO_C" >&6
3255 else
3256   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3257     then ac_cv_prog_egrep='grep -E'
3258     else ac_cv_prog_egrep='egrep'
3259     fi
3260 fi
3261 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3262 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3263  EGREP=$ac_cv_prog_egrep
3264
3265
3266 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3267 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3268 if test "${ac_cv_header_stdc+set}" = set; then
3269   echo $ECHO_N "(cached) $ECHO_C" >&6
3270 else
3271   cat >conftest.$ac_ext <<_ACEOF
3272 #line $LINENO "configure"
3273 /* confdefs.h.  */
3274 _ACEOF
3275 cat confdefs.h >>conftest.$ac_ext
3276 cat >>conftest.$ac_ext <<_ACEOF
3277 /* end confdefs.h.  */
3278 #include <stdlib.h>
3279 #include <stdarg.h>
3280 #include <string.h>
3281 #include <float.h>
3282
3283 int
3284 main ()
3285 {
3286
3287   ;
3288   return 0;
3289 }
3290 _ACEOF
3291 rm -f conftest.$ac_objext
3292 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3293   (eval $ac_compile) 2>&5
3294   ac_status=$?
3295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3296   (exit $ac_status); } &&
3297          { ac_try='test -s conftest.$ac_objext'
3298   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3299   (eval $ac_try) 2>&5
3300   ac_status=$?
3301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3302   (exit $ac_status); }; }; then
3303   ac_cv_header_stdc=yes
3304 else
3305   echo "$as_me: failed program was:" >&5
3306 sed 's/^/| /' conftest.$ac_ext >&5
3307
3308 ac_cv_header_stdc=no
3309 fi
3310 rm -f conftest.$ac_objext conftest.$ac_ext
3311
3312 if test $ac_cv_header_stdc = yes; then
3313   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3314   cat >conftest.$ac_ext <<_ACEOF
3315 #line $LINENO "configure"
3316 /* confdefs.h.  */
3317 _ACEOF
3318 cat confdefs.h >>conftest.$ac_ext
3319 cat >>conftest.$ac_ext <<_ACEOF
3320 /* end confdefs.h.  */
3321 #include <string.h>
3322
3323 _ACEOF
3324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3325   $EGREP "memchr" >/dev/null 2>&1; then
3326   :
3327 else
3328   ac_cv_header_stdc=no
3329 fi
3330 rm -f conftest*
3331
3332 fi
3333
3334 if test $ac_cv_header_stdc = yes; then
3335   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3336   cat >conftest.$ac_ext <<_ACEOF
3337 #line $LINENO "configure"
3338 /* confdefs.h.  */
3339 _ACEOF
3340 cat confdefs.h >>conftest.$ac_ext
3341 cat >>conftest.$ac_ext <<_ACEOF
3342 /* end confdefs.h.  */
3343 #include <stdlib.h>
3344
3345 _ACEOF
3346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3347   $EGREP "free" >/dev/null 2>&1; then
3348   :
3349 else
3350   ac_cv_header_stdc=no
3351 fi
3352 rm -f conftest*
3353
3354 fi
3355
3356 if test $ac_cv_header_stdc = yes; then
3357   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3358   if test "$cross_compiling" = yes; then
3359   :
3360 else
3361   cat >conftest.$ac_ext <<_ACEOF
3362 #line $LINENO "configure"
3363 /* confdefs.h.  */
3364 _ACEOF
3365 cat confdefs.h >>conftest.$ac_ext
3366 cat >>conftest.$ac_ext <<_ACEOF
3367 /* end confdefs.h.  */
3368 #include <ctype.h>
3369 #if ((' ' & 0x0FF) == 0x020)
3370 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3371 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3372 #else
3373 # define ISLOWER(c) \
3374                    (('a' <= (c) && (c) <= 'i') \
3375                      || ('j' <= (c) && (c) <= 'r') \
3376                      || ('s' <= (c) && (c) <= 'z'))
3377 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3378 #endif
3379
3380 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3381 int
3382 main ()
3383 {
3384   int i;
3385   for (i = 0; i < 256; i++)
3386     if (XOR (islower (i), ISLOWER (i))
3387         || toupper (i) != TOUPPER (i))
3388       exit(2);
3389   exit (0);
3390 }
3391 _ACEOF
3392 rm -f conftest$ac_exeext
3393 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3394   (eval $ac_link) 2>&5
3395   ac_status=$?
3396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3397   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3399   (eval $ac_try) 2>&5
3400   ac_status=$?
3401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3402   (exit $ac_status); }; }; then
3403   :
3404 else
3405   echo "$as_me: program exited with status $ac_status" >&5
3406 echo "$as_me: failed program was:" >&5
3407 sed 's/^/| /' conftest.$ac_ext >&5
3408
3409 ( exit $ac_status )
3410 ac_cv_header_stdc=no
3411 fi
3412 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3413 fi
3414 fi
3415 fi
3416 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3417 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3418 if test $ac_cv_header_stdc = yes; then
3419
3420 cat >>confdefs.h <<\_ACEOF
3421 #define STDC_HEADERS 1
3422 _ACEOF
3423
3424 fi
3425
3426 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3437                   inttypes.h stdint.h unistd.h
3438 do
3439 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3440 echo "$as_me:$LINENO: checking for $ac_header" >&5
3441 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3442 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3443   echo $ECHO_N "(cached) $ECHO_C" >&6
3444 else
3445   cat >conftest.$ac_ext <<_ACEOF
3446 #line $LINENO "configure"
3447 /* confdefs.h.  */
3448 _ACEOF
3449 cat confdefs.h >>conftest.$ac_ext
3450 cat >>conftest.$ac_ext <<_ACEOF
3451 /* end confdefs.h.  */
3452 $ac_includes_default
3453
3454 #include <$ac_header>
3455 _ACEOF
3456 rm -f conftest.$ac_objext
3457 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3458   (eval $ac_compile) 2>&5
3459   ac_status=$?
3460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3461   (exit $ac_status); } &&
3462          { ac_try='test -s conftest.$ac_objext'
3463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3464   (eval $ac_try) 2>&5
3465   ac_status=$?
3466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3467   (exit $ac_status); }; }; then
3468   eval "$as_ac_Header=yes"
3469 else
3470   echo "$as_me: failed program was:" >&5
3471 sed 's/^/| /' conftest.$ac_ext >&5
3472
3473 eval "$as_ac_Header=no"
3474 fi
3475 rm -f conftest.$ac_objext conftest.$ac_ext
3476 fi
3477 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3478 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3479 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3480   cat >>confdefs.h <<_ACEOF
3481 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3482 _ACEOF
3483
3484 fi
3485
3486 done
3487
3488
3489
3490 for ac_header in unistd.h
3491 do
3492 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3493 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3494   echo "$as_me:$LINENO: checking for $ac_header" >&5
3495 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3496 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3497   echo $ECHO_N "(cached) $ECHO_C" >&6
3498 fi
3499 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3500 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3501 else
3502   # Is the header compilable?
3503 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3504 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3505 cat >conftest.$ac_ext <<_ACEOF
3506 #line $LINENO "configure"
3507 /* confdefs.h.  */
3508 _ACEOF
3509 cat confdefs.h >>conftest.$ac_ext
3510 cat >>conftest.$ac_ext <<_ACEOF
3511 /* end confdefs.h.  */
3512 $ac_includes_default
3513 #include <$ac_header>
3514 _ACEOF
3515 rm -f conftest.$ac_objext
3516 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3517   (eval $ac_compile) 2>&5
3518   ac_status=$?
3519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3520   (exit $ac_status); } &&
3521          { ac_try='test -s conftest.$ac_objext'
3522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3523   (eval $ac_try) 2>&5
3524   ac_status=$?
3525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3526   (exit $ac_status); }; }; then
3527   ac_header_compiler=yes
3528 else
3529   echo "$as_me: failed program was:" >&5
3530 sed 's/^/| /' conftest.$ac_ext >&5
3531
3532 ac_header_compiler=no
3533 fi
3534 rm -f conftest.$ac_objext conftest.$ac_ext
3535 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3536 echo "${ECHO_T}$ac_header_compiler" >&6
3537
3538 # Is the header present?
3539 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3540 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3541 cat >conftest.$ac_ext <<_ACEOF
3542 #line $LINENO "configure"
3543 /* confdefs.h.  */
3544 _ACEOF
3545 cat confdefs.h >>conftest.$ac_ext
3546 cat >>conftest.$ac_ext <<_ACEOF
3547 /* end confdefs.h.  */
3548 #include <$ac_header>
3549 _ACEOF
3550 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3551   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3552   ac_status=$?
3553   grep -v '^ *+' conftest.er1 >conftest.err
3554   rm -f conftest.er1
3555   cat conftest.err >&5
3556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3557   (exit $ac_status); } >/dev/null; then
3558   if test -s conftest.err; then
3559     ac_cpp_err=$ac_c_preproc_warn_flag
3560   else
3561     ac_cpp_err=
3562   fi
3563 else
3564   ac_cpp_err=yes
3565 fi
3566 if test -z "$ac_cpp_err"; then
3567   ac_header_preproc=yes
3568 else
3569   echo "$as_me: failed program was:" >&5
3570 sed 's/^/| /' conftest.$ac_ext >&5
3571
3572   ac_header_preproc=no
3573 fi
3574 rm -f conftest.err conftest.$ac_ext
3575 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3576 echo "${ECHO_T}$ac_header_preproc" >&6
3577
3578 # So?  What about this header?
3579 case $ac_header_compiler:$ac_header_preproc in
3580   yes:no )
3581     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3582 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3583     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3584 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3585     (
3586       cat <<\_ASBOX
3587 ## ------------------------------------ ##
3588 ## Report this to bug-autoconf@gnu.org. ##
3589 ## ------------------------------------ ##
3590 _ASBOX
3591     ) |
3592       sed "s/^/$as_me: WARNING:     /" >&2
3593     ;;
3594   no:yes )
3595     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3596 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3597     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3598 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3599     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3600 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3601     (
3602       cat <<\_ASBOX
3603 ## ------------------------------------ ##
3604 ## Report this to bug-autoconf@gnu.org. ##
3605 ## ------------------------------------ ##
3606 _ASBOX
3607     ) |
3608       sed "s/^/$as_me: WARNING:     /" >&2
3609     ;;
3610 esac
3611 echo "$as_me:$LINENO: checking for $ac_header" >&5
3612 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3613 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3614   echo $ECHO_N "(cached) $ECHO_C" >&6
3615 else
3616   eval "$as_ac_Header=$ac_header_preproc"
3617 fi
3618 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3619 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3620
3621 fi
3622 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3623   cat >>confdefs.h <<_ACEOF
3624 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3625 _ACEOF
3626
3627 fi
3628
3629 done
3630
3631 echo "$as_me:$LINENO: checking for mode_t" >&5
3632 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3633 if test "${ac_cv_type_mode_t+set}" = set; then
3634   echo $ECHO_N "(cached) $ECHO_C" >&6
3635 else
3636   cat >conftest.$ac_ext <<_ACEOF
3637 #line $LINENO "configure"
3638 /* confdefs.h.  */
3639 _ACEOF
3640 cat confdefs.h >>conftest.$ac_ext
3641 cat >>conftest.$ac_ext <<_ACEOF
3642 /* end confdefs.h.  */
3643 $ac_includes_default
3644 int
3645 main ()
3646 {
3647 if ((mode_t *) 0)
3648   return 0;
3649 if (sizeof (mode_t))
3650   return 0;
3651   ;
3652   return 0;
3653 }
3654 _ACEOF
3655 rm -f conftest.$ac_objext
3656 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3657   (eval $ac_compile) 2>&5
3658   ac_status=$?
3659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3660   (exit $ac_status); } &&
3661          { ac_try='test -s conftest.$ac_objext'
3662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3663   (eval $ac_try) 2>&5
3664   ac_status=$?
3665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3666   (exit $ac_status); }; }; then
3667   ac_cv_type_mode_t=yes
3668 else
3669   echo "$as_me: failed program was:" >&5
3670 sed 's/^/| /' conftest.$ac_ext >&5
3671
3672 ac_cv_type_mode_t=no
3673 fi
3674 rm -f conftest.$ac_objext conftest.$ac_ext
3675 fi
3676 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
3677 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3678 if test $ac_cv_type_mode_t = yes; then
3679   :
3680 else
3681
3682 cat >>confdefs.h <<_ACEOF
3683 #define mode_t int
3684 _ACEOF
3685
3686 fi
3687
3688 echo "$as_me:$LINENO: checking for pid_t" >&5
3689 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
3690 if test "${ac_cv_type_pid_t+set}" = set; then
3691   echo $ECHO_N "(cached) $ECHO_C" >&6
3692 else
3693   cat >conftest.$ac_ext <<_ACEOF
3694 #line $LINENO "configure"
3695 /* confdefs.h.  */
3696 _ACEOF
3697 cat confdefs.h >>conftest.$ac_ext
3698 cat >>conftest.$ac_ext <<_ACEOF
3699 /* end confdefs.h.  */
3700 $ac_includes_default
3701 int
3702 main ()
3703 {
3704 if ((pid_t *) 0)
3705   return 0;
3706 if (sizeof (pid_t))
3707   return 0;
3708   ;
3709   return 0;
3710 }
3711 _ACEOF
3712 rm -f conftest.$ac_objext
3713 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3714   (eval $ac_compile) 2>&5
3715   ac_status=$?
3716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3717   (exit $ac_status); } &&
3718          { ac_try='test -s conftest.$ac_objext'
3719   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3720   (eval $ac_try) 2>&5
3721   ac_status=$?
3722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3723   (exit $ac_status); }; }; then
3724   ac_cv_type_pid_t=yes
3725 else
3726   echo "$as_me: failed program was:" >&5
3727 sed 's/^/| /' conftest.$ac_ext >&5
3728
3729 ac_cv_type_pid_t=no
3730 fi
3731 rm -f conftest.$ac_objext conftest.$ac_ext
3732 fi
3733 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
3734 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3735 if test $ac_cv_type_pid_t = yes; then
3736   :
3737 else
3738
3739 cat >>confdefs.h <<_ACEOF
3740 #define pid_t int
3741 _ACEOF
3742
3743 fi
3744
3745 echo "$as_me:$LINENO: checking for size_t" >&5
3746 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
3747 if test "${ac_cv_type_size_t+set}" = set; then
3748   echo $ECHO_N "(cached) $ECHO_C" >&6
3749 else
3750   cat >conftest.$ac_ext <<_ACEOF
3751 #line $LINENO "configure"
3752 /* confdefs.h.  */
3753 _ACEOF
3754 cat confdefs.h >>conftest.$ac_ext
3755 cat >>conftest.$ac_ext <<_ACEOF
3756 /* end confdefs.h.  */
3757 $ac_includes_default
3758 int
3759 main ()
3760 {
3761 if ((size_t *) 0)
3762   return 0;
3763 if (sizeof (size_t))
3764   return 0;
3765   ;
3766   return 0;
3767 }
3768 _ACEOF
3769 rm -f conftest.$ac_objext
3770 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3771   (eval $ac_compile) 2>&5
3772   ac_status=$?
3773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3774   (exit $ac_status); } &&
3775          { ac_try='test -s conftest.$ac_objext'
3776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3777   (eval $ac_try) 2>&5
3778   ac_status=$?
3779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3780   (exit $ac_status); }; }; then
3781   ac_cv_type_size_t=yes
3782 else
3783   echo "$as_me: failed program was:" >&5
3784 sed 's/^/| /' conftest.$ac_ext >&5
3785
3786 ac_cv_type_size_t=no
3787 fi
3788 rm -f conftest.$ac_objext conftest.$ac_ext
3789 fi
3790 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
3791 echo "${ECHO_T}$ac_cv_type_size_t" >&6
3792 if test $ac_cv_type_size_t = yes; then
3793   :
3794 else
3795
3796 cat >>confdefs.h <<_ACEOF
3797 #define size_t unsigned
3798 _ACEOF
3799
3800 fi
3801
3802 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
3803 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
3804 if test "${ac_cv_type_signal+set}" = set; then
3805   echo $ECHO_N "(cached) $ECHO_C" >&6
3806 else
3807   cat >conftest.$ac_ext <<_ACEOF
3808 #line $LINENO "configure"
3809 /* confdefs.h.  */
3810 _ACEOF
3811 cat confdefs.h >>conftest.$ac_ext
3812 cat >>conftest.$ac_ext <<_ACEOF
3813 /* end confdefs.h.  */
3814 #include <sys/types.h>
3815 #include <signal.h>
3816 #ifdef signal
3817 # undef signal
3818 #endif
3819 #ifdef __cplusplus
3820 extern "C" void (*signal (int, void (*)(int)))(int);
3821 #else
3822 void (*signal ()) ();
3823 #endif
3824
3825 int
3826 main ()
3827 {
3828 int i;
3829   ;
3830   return 0;
3831 }
3832 _ACEOF
3833 rm -f conftest.$ac_objext
3834 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3835   (eval $ac_compile) 2>&5
3836   ac_status=$?
3837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3838   (exit $ac_status); } &&
3839          { ac_try='test -s conftest.$ac_objext'
3840   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3841   (eval $ac_try) 2>&5
3842   ac_status=$?
3843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3844   (exit $ac_status); }; }; then
3845   ac_cv_type_signal=void
3846 else
3847   echo "$as_me: failed program was:" >&5
3848 sed 's/^/| /' conftest.$ac_ext >&5
3849
3850 ac_cv_type_signal=int
3851 fi
3852 rm -f conftest.$ac_objext conftest.$ac_ext
3853 fi
3854 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
3855 echo "${ECHO_T}$ac_cv_type_signal" >&6
3856
3857 cat >>confdefs.h <<_ACEOF
3858 #define RETSIGTYPE $ac_cv_type_signal
3859 _ACEOF
3860
3861
3862 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
3863 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3864 if test "${ac_cv_header_time+set}" = set; then
3865   echo $ECHO_N "(cached) $ECHO_C" >&6
3866 else
3867   cat >conftest.$ac_ext <<_ACEOF
3868 #line $LINENO "configure"
3869 /* confdefs.h.  */
3870 _ACEOF
3871 cat confdefs.h >>conftest.$ac_ext
3872 cat >>conftest.$ac_ext <<_ACEOF
3873 /* end confdefs.h.  */
3874 #include <sys/types.h>
3875 #include <sys/time.h>
3876 #include <time.h>
3877
3878 int
3879 main ()
3880 {
3881 if ((struct tm *) 0)
3882 return 0;
3883   ;
3884   return 0;
3885 }
3886 _ACEOF
3887 rm -f conftest.$ac_objext
3888 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3889   (eval $ac_compile) 2>&5
3890   ac_status=$?
3891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3892   (exit $ac_status); } &&
3893          { ac_try='test -s conftest.$ac_objext'
3894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3895   (eval $ac_try) 2>&5
3896   ac_status=$?
3897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3898   (exit $ac_status); }; }; then
3899   ac_cv_header_time=yes
3900 else
3901   echo "$as_me: failed program was:" >&5
3902 sed 's/^/| /' conftest.$ac_ext >&5
3903
3904 ac_cv_header_time=no
3905 fi
3906 rm -f conftest.$ac_objext conftest.$ac_ext
3907 fi
3908 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
3909 echo "${ECHO_T}$ac_cv_header_time" >&6
3910 if test $ac_cv_header_time = yes; then
3911
3912 cat >>confdefs.h <<\_ACEOF
3913 #define TIME_WITH_SYS_TIME 1
3914 _ACEOF
3915
3916 fi
3917
3918 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
3919 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
3920 if test "${ac_cv_header_sys_wait_h+set}" = set; then
3921   echo $ECHO_N "(cached) $ECHO_C" >&6
3922 else
3923   cat >conftest.$ac_ext <<_ACEOF
3924 #line $LINENO "configure"
3925 /* confdefs.h.  */
3926 _ACEOF
3927 cat confdefs.h >>conftest.$ac_ext
3928 cat >>conftest.$ac_ext <<_ACEOF
3929 /* end confdefs.h.  */
3930 #include <sys/types.h>
3931 #include <sys/wait.h>
3932 #ifndef WEXITSTATUS
3933 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3934 #endif
3935 #ifndef WIFEXITED
3936 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3937 #endif
3938
3939 int
3940 main ()
3941 {
3942   int s;
3943   wait (&s);
3944   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3945   ;
3946   return 0;
3947 }
3948 _ACEOF
3949 rm -f conftest.$ac_objext
3950 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3951   (eval $ac_compile) 2>&5
3952   ac_status=$?
3953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3954   (exit $ac_status); } &&
3955          { ac_try='test -s conftest.$ac_objext'
3956   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3957   (eval $ac_try) 2>&5
3958   ac_status=$?
3959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3960   (exit $ac_status); }; }; then
3961   ac_cv_header_sys_wait_h=yes
3962 else
3963   echo "$as_me: failed program was:" >&5
3964 sed 's/^/| /' conftest.$ac_ext >&5
3965
3966 ac_cv_header_sys_wait_h=no
3967 fi
3968 rm -f conftest.$ac_objext conftest.$ac_ext
3969 fi
3970 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3971 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3972 if test $ac_cv_header_sys_wait_h = yes; then
3973
3974 cat >>confdefs.h <<\_ACEOF
3975 #define HAVE_SYS_WAIT_H 1
3976 _ACEOF
3977
3978 fi
3979
3980
3981
3982
3983
3984
3985 ac_header_dirent=no
3986 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3987   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3988 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3989 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3990 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3991   echo $ECHO_N "(cached) $ECHO_C" >&6
3992 else
3993   cat >conftest.$ac_ext <<_ACEOF
3994 #line $LINENO "configure"
3995 /* confdefs.h.  */
3996 _ACEOF
3997 cat confdefs.h >>conftest.$ac_ext
3998 cat >>conftest.$ac_ext <<_ACEOF
3999 /* end confdefs.h.  */
4000 #include <sys/types.h>
4001 #include <$ac_hdr>
4002
4003 int
4004 main ()
4005 {
4006 if ((DIR *) 0)
4007 return 0;
4008   ;
4009   return 0;
4010 }
4011 _ACEOF
4012 rm -f conftest.$ac_objext
4013 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4014   (eval $ac_compile) 2>&5
4015   ac_status=$?
4016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4017   (exit $ac_status); } &&
4018          { ac_try='test -s conftest.$ac_objext'
4019   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4020   (eval $ac_try) 2>&5
4021   ac_status=$?
4022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4023   (exit $ac_status); }; }; then
4024   eval "$as_ac_Header=yes"
4025 else
4026   echo "$as_me: failed program was:" >&5
4027 sed 's/^/| /' conftest.$ac_ext >&5
4028
4029 eval "$as_ac_Header=no"
4030 fi
4031 rm -f conftest.$ac_objext conftest.$ac_ext
4032 fi
4033 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4034 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4035 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4036   cat >>confdefs.h <<_ACEOF
4037 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4038 _ACEOF
4039
4040 ac_header_dirent=$ac_hdr; break
4041 fi
4042
4043 done
4044 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4045 if test $ac_header_dirent = dirent.h; then
4046   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4047 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4048 if test "${ac_cv_search_opendir+set}" = set; then
4049   echo $ECHO_N "(cached) $ECHO_C" >&6
4050 else
4051   ac_func_search_save_LIBS=$LIBS
4052 ac_cv_search_opendir=no
4053 cat >conftest.$ac_ext <<_ACEOF
4054 #line $LINENO "configure"
4055 /* confdefs.h.  */
4056 _ACEOF
4057 cat confdefs.h >>conftest.$ac_ext
4058 cat >>conftest.$ac_ext <<_ACEOF
4059 /* end confdefs.h.  */
4060
4061 /* Override any gcc2 internal prototype to avoid an error.  */
4062 #ifdef __cplusplus
4063 extern "C"
4064 #endif
4065 /* We use char because int might match the return type of a gcc2
4066    builtin and then its argument prototype would still apply.  */
4067 char opendir ();
4068 int
4069 main ()
4070 {
4071 opendir ();
4072   ;
4073   return 0;
4074 }
4075 _ACEOF
4076 rm -f conftest.$ac_objext conftest$ac_exeext
4077 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4078   (eval $ac_link) 2>&5
4079   ac_status=$?
4080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4081   (exit $ac_status); } &&
4082          { ac_try='test -s conftest$ac_exeext'
4083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4084   (eval $ac_try) 2>&5
4085   ac_status=$?
4086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4087   (exit $ac_status); }; }; then
4088   ac_cv_search_opendir="none required"
4089 else
4090   echo "$as_me: failed program was:" >&5
4091 sed 's/^/| /' conftest.$ac_ext >&5
4092
4093 fi
4094 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4095 if test "$ac_cv_search_opendir" = no; then
4096   for ac_lib in dir; do
4097     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4098     cat >conftest.$ac_ext <<_ACEOF
4099 #line $LINENO "configure"
4100 /* confdefs.h.  */
4101 _ACEOF
4102 cat confdefs.h >>conftest.$ac_ext
4103 cat >>conftest.$ac_ext <<_ACEOF
4104 /* end confdefs.h.  */
4105
4106 /* Override any gcc2 internal prototype to avoid an error.  */
4107 #ifdef __cplusplus
4108 extern "C"
4109 #endif
4110 /* We use char because int might match the return type of a gcc2
4111    builtin and then its argument prototype would still apply.  */
4112 char opendir ();
4113 int
4114 main ()
4115 {
4116 opendir ();
4117   ;
4118   return 0;
4119 }
4120 _ACEOF
4121 rm -f conftest.$ac_objext conftest$ac_exeext
4122 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4123   (eval $ac_link) 2>&5
4124   ac_status=$?
4125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126   (exit $ac_status); } &&
4127          { ac_try='test -s conftest$ac_exeext'
4128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4129   (eval $ac_try) 2>&5
4130   ac_status=$?
4131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4132   (exit $ac_status); }; }; then
4133   ac_cv_search_opendir="-l$ac_lib"
4134 break
4135 else
4136   echo "$as_me: failed program was:" >&5
4137 sed 's/^/| /' conftest.$ac_ext >&5
4138
4139 fi
4140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4141   done
4142 fi
4143 LIBS=$ac_func_search_save_LIBS
4144 fi
4145 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4146 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4147 if test "$ac_cv_search_opendir" != no; then
4148   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4149
4150 fi
4151
4152 else
4153   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4154 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4155 if test "${ac_cv_search_opendir+set}" = set; then
4156   echo $ECHO_N "(cached) $ECHO_C" >&6
4157 else
4158   ac_func_search_save_LIBS=$LIBS
4159 ac_cv_search_opendir=no
4160 cat >conftest.$ac_ext <<_ACEOF
4161 #line $LINENO "configure"
4162 /* confdefs.h.  */
4163 _ACEOF
4164 cat confdefs.h >>conftest.$ac_ext
4165 cat >>conftest.$ac_ext <<_ACEOF
4166 /* end confdefs.h.  */
4167
4168 /* Override any gcc2 internal prototype to avoid an error.  */
4169 #ifdef __cplusplus
4170 extern "C"
4171 #endif
4172 /* We use char because int might match the return type of a gcc2
4173    builtin and then its argument prototype would still apply.  */
4174 char opendir ();
4175 int
4176 main ()
4177 {
4178 opendir ();
4179   ;
4180   return 0;
4181 }
4182 _ACEOF
4183 rm -f conftest.$ac_objext conftest$ac_exeext
4184 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4185   (eval $ac_link) 2>&5
4186   ac_status=$?
4187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4188   (exit $ac_status); } &&
4189          { ac_try='test -s conftest$ac_exeext'
4190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4191   (eval $ac_try) 2>&5
4192   ac_status=$?
4193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4194   (exit $ac_status); }; }; then
4195   ac_cv_search_opendir="none required"
4196 else
4197   echo "$as_me: failed program was:" >&5
4198 sed 's/^/| /' conftest.$ac_ext >&5
4199
4200 fi
4201 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4202 if test "$ac_cv_search_opendir" = no; then
4203   for ac_lib in x; do
4204     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4205     cat >conftest.$ac_ext <<_ACEOF
4206 #line $LINENO "configure"
4207 /* confdefs.h.  */
4208 _ACEOF
4209 cat confdefs.h >>conftest.$ac_ext
4210 cat >>conftest.$ac_ext <<_ACEOF
4211 /* end confdefs.h.  */
4212
4213 /* Override any gcc2 internal prototype to avoid an error.  */
4214 #ifdef __cplusplus
4215 extern "C"
4216 #endif
4217 /* We use char because int might match the return type of a gcc2
4218    builtin and then its argument prototype would still apply.  */
4219 char opendir ();
4220 int
4221 main ()
4222 {
4223 opendir ();
4224   ;
4225   return 0;
4226 }
4227 _ACEOF
4228 rm -f conftest.$ac_objext conftest$ac_exeext
4229 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4230   (eval $ac_link) 2>&5
4231   ac_status=$?
4232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4233   (exit $ac_status); } &&
4234          { ac_try='test -s conftest$ac_exeext'
4235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4236   (eval $ac_try) 2>&5
4237   ac_status=$?
4238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4239   (exit $ac_status); }; }; then
4240   ac_cv_search_opendir="-l$ac_lib"
4241 break
4242 else
4243   echo "$as_me: failed program was:" >&5
4244 sed 's/^/| /' conftest.$ac_ext >&5
4245
4246 fi
4247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4248   done
4249 fi
4250 LIBS=$ac_func_search_save_LIBS
4251 fi
4252 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4253 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4254 if test "$ac_cv_search_opendir" != no; then
4255   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4256
4257 fi
4258
4259 fi
4260
4261 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4262 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4263   if test "${ac_cv_gettimeofday_args+set}" = set; then
4264   echo $ECHO_N "(cached) $ECHO_C" >&6
4265 else
4266   cat >conftest.$ac_ext <<_ACEOF
4267 #line $LINENO "configure"
4268 /* confdefs.h.  */
4269 _ACEOF
4270 cat confdefs.h >>conftest.$ac_ext
4271 cat >>conftest.$ac_ext <<_ACEOF
4272 /* end confdefs.h.  */
4273 #include <stdlib.h>
4274                     #include <sys/time.h>
4275 int
4276 main ()
4277 {
4278 struct timeval tv; struct timezone tzp;
4279                     gettimeofday(&tv, &tzp);
4280   ;
4281   return 0;
4282 }
4283 _ACEOF
4284 rm -f conftest.$ac_objext
4285 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4286   (eval $ac_compile) 2>&5
4287   ac_status=$?
4288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4289   (exit $ac_status); } &&
4290          { ac_try='test -s conftest.$ac_objext'
4291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4292   (eval $ac_try) 2>&5
4293   ac_status=$?
4294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4295   (exit $ac_status); }; }; then
4296   ac_gettimeofday_args=2
4297 else
4298   echo "$as_me: failed program was:" >&5
4299 sed 's/^/| /' conftest.$ac_ext >&5
4300
4301 cat >conftest.$ac_ext <<_ACEOF
4302 #line $LINENO "configure"
4303 /* confdefs.h.  */
4304 _ACEOF
4305 cat confdefs.h >>conftest.$ac_ext
4306 cat >>conftest.$ac_ext <<_ACEOF
4307 /* end confdefs.h.  */
4308 #include <stdlib.h>
4309                                     #include <sys/time.h>
4310 int
4311 main ()
4312 {
4313 struct timeval tv; gettimeofday(&tv);
4314   ;
4315   return 0;
4316 }
4317 _ACEOF
4318 rm -f conftest.$ac_objext
4319 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4320   (eval $ac_compile) 2>&5
4321   ac_status=$?
4322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4323   (exit $ac_status); } &&
4324          { ac_try='test -s conftest.$ac_objext'
4325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4326   (eval $ac_try) 2>&5
4327   ac_status=$?
4328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4329   (exit $ac_status); }; }; then
4330   ac_gettimeofday_args=1
4331 else
4332   echo "$as_me: failed program was:" >&5
4333 sed 's/^/| /' conftest.$ac_ext >&5
4334
4335 ac_gettimeofday_args=0
4336 fi
4337 rm -f conftest.$ac_objext conftest.$ac_ext
4338 fi
4339 rm -f conftest.$ac_objext conftest.$ac_ext
4340     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4341 fi
4342
4343   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4344   if test "$ac_gettimeofday_args" = 1 ; then
4345     cat >>confdefs.h <<\_ACEOF
4346 #define HAVE_GETTIMEOFDAY 1
4347 _ACEOF
4348
4349     echo "$as_me:$LINENO: result: one argument" >&5
4350 echo "${ECHO_T}one argument" >&6
4351   elif test "$ac_gettimeofday_args" = 2 ; then
4352     cat >>confdefs.h <<\_ACEOF
4353 #define HAVE_GETTIMEOFDAY 1
4354 _ACEOF
4355
4356     cat >>confdefs.h <<\_ACEOF
4357 #define GETTIMEOFDAY_TWO_ARGS 1
4358 _ACEOF
4359
4360     echo "$as_me:$LINENO: result: two arguments" >&5
4361 echo "${ECHO_T}two arguments" >&6
4362   else
4363     echo "$as_me:$LINENO: result: unknown" >&5
4364 echo "${ECHO_T}unknown" >&6
4365   fi
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4377 do
4378 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4379 echo "$as_me:$LINENO: checking for $ac_func" >&5
4380 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4381 if eval "test \"\${$as_ac_var+set}\" = set"; then
4382   echo $ECHO_N "(cached) $ECHO_C" >&6
4383 else
4384   cat >conftest.$ac_ext <<_ACEOF
4385 #line $LINENO "configure"
4386 /* confdefs.h.  */
4387 _ACEOF
4388 cat confdefs.h >>conftest.$ac_ext
4389 cat >>conftest.$ac_ext <<_ACEOF
4390 /* end confdefs.h.  */
4391 /* System header to define __stub macros and hopefully few prototypes,
4392     which can conflict with char $ac_func (); below.
4393     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4394     <limits.h> exists even on freestanding compilers.  */
4395 #ifdef __STDC__
4396 # include <limits.h>
4397 #else
4398 # include <assert.h>
4399 #endif
4400 /* Override any gcc2 internal prototype to avoid an error.  */
4401 #ifdef __cplusplus
4402 extern "C"
4403 {
4404 #endif
4405 /* We use char because int might match the return type of a gcc2
4406    builtin and then its argument prototype would still apply.  */
4407 char $ac_func ();
4408 /* The GNU C library defines this for functions which it implements
4409     to always fail with ENOSYS.  Some functions are actually named
4410     something starting with __ and the normal name is an alias.  */
4411 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4412 choke me
4413 #else
4414 char (*f) () = $ac_func;
4415 #endif
4416 #ifdef __cplusplus
4417 }
4418 #endif
4419
4420 int
4421 main ()
4422 {
4423 return f != $ac_func;
4424   ;
4425   return 0;
4426 }
4427 _ACEOF
4428 rm -f conftest.$ac_objext conftest$ac_exeext
4429 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4430   (eval $ac_link) 2>&5
4431   ac_status=$?
4432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4433   (exit $ac_status); } &&
4434          { ac_try='test -s conftest$ac_exeext'
4435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4436   (eval $ac_try) 2>&5
4437   ac_status=$?
4438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4439   (exit $ac_status); }; }; then
4440   eval "$as_ac_var=yes"
4441 else
4442   echo "$as_me: failed program was:" >&5
4443 sed 's/^/| /' conftest.$ac_ext >&5
4444
4445 eval "$as_ac_var=no"
4446 fi
4447 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4448 fi
4449 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4450 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4451 if test `eval echo '${'$as_ac_var'}'` = yes; then
4452   cat >>confdefs.h <<_ACEOF
4453 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4454 _ACEOF
4455
4456 fi
4457 done
4458
4459
4460
4461
4462
4463 for ac_func in sigaction syslog realpath setrlimit
4464 do
4465 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4466 echo "$as_me:$LINENO: checking for $ac_func" >&5
4467 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4468 if eval "test \"\${$as_ac_var+set}\" = set"; then
4469   echo $ECHO_N "(cached) $ECHO_C" >&6
4470 else
4471   cat >conftest.$ac_ext <<_ACEOF
4472 #line $LINENO "configure"
4473 /* confdefs.h.  */
4474 _ACEOF
4475 cat confdefs.h >>conftest.$ac_ext
4476 cat >>conftest.$ac_ext <<_ACEOF
4477 /* end confdefs.h.  */
4478 /* System header to define __stub macros and hopefully few prototypes,
4479     which can conflict with char $ac_func (); below.
4480     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4481     <limits.h> exists even on freestanding compilers.  */
4482 #ifdef __STDC__
4483 # include <limits.h>
4484 #else
4485 # include <assert.h>
4486 #endif
4487 /* Override any gcc2 internal prototype to avoid an error.  */
4488 #ifdef __cplusplus
4489 extern "C"
4490 {
4491 #endif
4492 /* We use char because int might match the return type of a gcc2
4493    builtin and then its argument prototype would still apply.  */
4494 char $ac_func ();
4495 /* The GNU C library defines this for functions which it implements
4496     to always fail with ENOSYS.  Some functions are actually named
4497     something starting with __ and the normal name is an alias.  */
4498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4499 choke me
4500 #else
4501 char (*f) () = $ac_func;
4502 #endif
4503 #ifdef __cplusplus
4504 }
4505 #endif
4506
4507 int
4508 main ()
4509 {
4510 return f != $ac_func;
4511   ;
4512   return 0;
4513 }
4514 _ACEOF
4515 rm -f conftest.$ac_objext conftest$ac_exeext
4516 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4517   (eval $ac_link) 2>&5
4518   ac_status=$?
4519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4520   (exit $ac_status); } &&
4521          { ac_try='test -s conftest$ac_exeext'
4522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4523   (eval $ac_try) 2>&5
4524   ac_status=$?
4525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4526   (exit $ac_status); }; }; then
4527   eval "$as_ac_var=yes"
4528 else
4529   echo "$as_me: failed program was:" >&5
4530 sed 's/^/| /' conftest.$ac_ext >&5
4531
4532 eval "$as_ac_var=no"
4533 fi
4534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4535 fi
4536 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4537 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4538 if test `eval echo '${'$as_ac_var'}'` = yes; then
4539   cat >>confdefs.h <<_ACEOF
4540 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4541 _ACEOF
4542
4543 fi
4544 done
4545
4546 echo "$as_me:$LINENO: checking for struct icmp" >&5
4547 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
4548 if test "${ac_cv_have_icmp+set}" = set; then
4549   echo $ECHO_N "(cached) $ECHO_C" >&6
4550 else
4551   cat >conftest.$ac_ext <<_ACEOF
4552 #line $LINENO "configure"
4553 /* confdefs.h.  */
4554 _ACEOF
4555 cat confdefs.h >>conftest.$ac_ext
4556 cat >>conftest.$ac_ext <<_ACEOF
4557 /* end confdefs.h.  */
4558 #include <stdlib.h>
4559                    #include <stdio.h>
4560                    #include <math.h>
4561                    #include <unistd.h>
4562                    #include <limits.h>
4563                    #include <signal.h>
4564                    #include <fcntl.h>
4565                    #include <sys/types.h>
4566                    #include <sys/time.h>
4567                    #include <sys/ipc.h>
4568                    #include <sys/shm.h>
4569                    #include <sys/socket.h>
4570                    #include <netinet/in_systm.h>
4571                    #include <netinet/in.h>
4572                    #include <netinet/ip.h>
4573                    #include <netinet/ip_icmp.h>
4574                    #include <netinet/udp.h>
4575                    #include <arpa/inet.h>
4576                    #include <netdb.h>
4577 int
4578 main ()
4579 {
4580 struct icmp i;
4581                    struct sockaddr s;
4582                    struct sockaddr_in si;
4583                    struct ip ip;
4584                    i.icmp_type = ICMP_ECHO;
4585                    i.icmp_code = 0;
4586                    i.icmp_cksum = 0;
4587                    i.icmp_id = 0;
4588                    i.icmp_seq = 0;
4589                    si.sin_family = AF_INET;
4590                    #if defined(__DECC) || defined(_IP_VHL)
4591                    ip.ip_vhl = 0;
4592                    #else
4593                    ip.ip_hl = 0;
4594                    #endif
4595
4596   ;
4597   return 0;
4598 }
4599 _ACEOF
4600 rm -f conftest.$ac_objext
4601 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4602   (eval $ac_compile) 2>&5
4603   ac_status=$?
4604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4605   (exit $ac_status); } &&
4606          { ac_try='test -s conftest.$ac_objext'
4607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4608   (eval $ac_try) 2>&5
4609   ac_status=$?
4610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4611   (exit $ac_status); }; }; then
4612   ac_cv_have_icmp=yes
4613 else
4614   echo "$as_me: failed program was:" >&5
4615 sed 's/^/| /' conftest.$ac_ext >&5
4616
4617 ac_cv_have_icmp=no
4618 fi
4619 rm -f conftest.$ac_objext conftest.$ac_ext
4620 fi
4621 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
4622 echo "${ECHO_T}$ac_cv_have_icmp" >&6
4623  if test "$ac_cv_have_icmp" = yes ; then
4624    cat >>confdefs.h <<\_ACEOF
4625 #define HAVE_ICMP 1
4626 _ACEOF
4627
4628  fi
4629 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
4630 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
4631 if test "${ac_cv_have_icmphdr+set}" = set; then
4632   echo $ECHO_N "(cached) $ECHO_C" >&6
4633 else
4634   cat >conftest.$ac_ext <<_ACEOF
4635 #line $LINENO "configure"
4636 /* confdefs.h.  */
4637 _ACEOF
4638 cat confdefs.h >>conftest.$ac_ext
4639 cat >>conftest.$ac_ext <<_ACEOF
4640 /* end confdefs.h.  */
4641 #include <stdlib.h>
4642                    #include <stdio.h>
4643                    #include <math.h>
4644                    #include <unistd.h>
4645                    #include <limits.h>
4646                    #include <signal.h>
4647                    #include <fcntl.h>
4648                    #include <sys/types.h>
4649                    #include <sys/time.h>
4650                    #include <sys/ipc.h>
4651                    #include <sys/shm.h>
4652                    #include <sys/socket.h>
4653                    #include <netinet/in_systm.h>
4654                    #include <netinet/in.h>
4655                    #include <netinet/ip.h>
4656                    #include <netinet/ip_icmp.h>
4657                    #include <netinet/udp.h>
4658                    #include <arpa/inet.h>
4659                    #include <netdb.h>
4660 int
4661 main ()
4662 {
4663 struct icmphdr i;
4664                    struct sockaddr s;
4665                    struct sockaddr_in si;
4666                    struct ip ip;
4667                    i.type = ICMP_ECHO;
4668                    i.code = 0;
4669                    i.checksum = 0;
4670                    i.un.echo.id = 0;
4671                    i.un.echo.sequence = 0;
4672                    si.sin_family = AF_INET;
4673                    ip.ip_hl = 0;
4674   ;
4675   return 0;
4676 }
4677 _ACEOF
4678 rm -f conftest.$ac_objext
4679 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4680   (eval $ac_compile) 2>&5
4681   ac_status=$?
4682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4683   (exit $ac_status); } &&
4684          { ac_try='test -s conftest.$ac_objext'
4685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4686   (eval $ac_try) 2>&5
4687   ac_status=$?
4688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4689   (exit $ac_status); }; }; then
4690   ac_cv_have_icmphdr=yes
4691 else
4692   echo "$as_me: failed program was:" >&5
4693 sed 's/^/| /' conftest.$ac_ext >&5
4694
4695 ac_cv_have_icmphdr=no
4696 fi
4697 rm -f conftest.$ac_objext conftest.$ac_ext
4698 fi
4699 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
4700 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
4701  if test "$ac_cv_have_icmphdr" = yes ; then
4702    cat >>confdefs.h <<\_ACEOF
4703 #define HAVE_ICMPHDR 1
4704 _ACEOF
4705
4706  fi
4707
4708
4709 for ac_header in crypt.h sys/select.h
4710 do
4711 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4712 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4713   echo "$as_me:$LINENO: checking for $ac_header" >&5
4714 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4715 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4716   echo $ECHO_N "(cached) $ECHO_C" >&6
4717 fi
4718 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4719 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4720 else
4721   # Is the header compilable?
4722 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4723 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4724 cat >conftest.$ac_ext <<_ACEOF
4725 #line $LINENO "configure"
4726 /* confdefs.h.  */
4727 _ACEOF
4728 cat confdefs.h >>conftest.$ac_ext
4729 cat >>conftest.$ac_ext <<_ACEOF
4730 /* end confdefs.h.  */
4731 $ac_includes_default
4732 #include <$ac_header>
4733 _ACEOF
4734 rm -f conftest.$ac_objext
4735 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4736   (eval $ac_compile) 2>&5
4737   ac_status=$?
4738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4739   (exit $ac_status); } &&
4740          { ac_try='test -s conftest.$ac_objext'
4741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4742   (eval $ac_try) 2>&5
4743   ac_status=$?
4744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4745   (exit $ac_status); }; }; then
4746   ac_header_compiler=yes
4747 else
4748   echo "$as_me: failed program was:" >&5
4749 sed 's/^/| /' conftest.$ac_ext >&5
4750
4751 ac_header_compiler=no
4752 fi
4753 rm -f conftest.$ac_objext conftest.$ac_ext
4754 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4755 echo "${ECHO_T}$ac_header_compiler" >&6
4756
4757 # Is the header present?
4758 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4759 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4760 cat >conftest.$ac_ext <<_ACEOF
4761 #line $LINENO "configure"
4762 /* confdefs.h.  */
4763 _ACEOF
4764 cat confdefs.h >>conftest.$ac_ext
4765 cat >>conftest.$ac_ext <<_ACEOF
4766 /* end confdefs.h.  */
4767 #include <$ac_header>
4768 _ACEOF
4769 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4770   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4771   ac_status=$?
4772   grep -v '^ *+' conftest.er1 >conftest.err
4773   rm -f conftest.er1
4774   cat conftest.err >&5
4775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4776   (exit $ac_status); } >/dev/null; then
4777   if test -s conftest.err; then
4778     ac_cpp_err=$ac_c_preproc_warn_flag
4779   else
4780     ac_cpp_err=
4781   fi
4782 else
4783   ac_cpp_err=yes
4784 fi
4785 if test -z "$ac_cpp_err"; then
4786   ac_header_preproc=yes
4787 else
4788   echo "$as_me: failed program was:" >&5
4789 sed 's/^/| /' conftest.$ac_ext >&5
4790
4791   ac_header_preproc=no
4792 fi
4793 rm -f conftest.err conftest.$ac_ext
4794 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4795 echo "${ECHO_T}$ac_header_preproc" >&6
4796
4797 # So?  What about this header?
4798 case $ac_header_compiler:$ac_header_preproc in
4799   yes:no )
4800     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4801 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4802     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4803 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4804     (
4805       cat <<\_ASBOX
4806 ## ------------------------------------ ##
4807 ## Report this to bug-autoconf@gnu.org. ##
4808 ## ------------------------------------ ##
4809 _ASBOX
4810     ) |
4811       sed "s/^/$as_me: WARNING:     /" >&2
4812     ;;
4813   no:yes )
4814     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4815 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4816     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4817 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4818     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4819 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4820     (
4821       cat <<\_ASBOX
4822 ## ------------------------------------ ##
4823 ## Report this to bug-autoconf@gnu.org. ##
4824 ## ------------------------------------ ##
4825 _ASBOX
4826     ) |
4827       sed "s/^/$as_me: WARNING:     /" >&2
4828     ;;
4829 esac
4830 echo "$as_me:$LINENO: checking for $ac_header" >&5
4831 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4832 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4833   echo $ECHO_N "(cached) $ECHO_C" >&6
4834 else
4835   eval "$as_ac_Header=$ac_header_preproc"
4836 fi
4837 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4838 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4839
4840 fi
4841 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4842   cat >>confdefs.h <<_ACEOF
4843 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4844 _ACEOF
4845
4846 fi
4847
4848 done
4849
4850 for ac_prog in perl5 perl
4851 do
4852   # Extract the first word of "$ac_prog", so it can be a program name with args.
4853 set dummy $ac_prog; ac_word=$2
4854 echo "$as_me:$LINENO: checking for $ac_word" >&5
4855 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4856 if test "${ac_cv_path_PERL+set}" = set; then
4857   echo $ECHO_N "(cached) $ECHO_C" >&6
4858 else
4859   case $PERL in
4860   [\\/]* | ?:[\\/]*)
4861   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4862   ;;
4863   *)
4864   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4865 for as_dir in $PATH
4866 do
4867   IFS=$as_save_IFS
4868   test -z "$as_dir" && as_dir=.
4869   for ac_exec_ext in '' $ac_executable_extensions; do
4870   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4871     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4872     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4873     break 2
4874   fi
4875 done
4876 done
4877
4878   ;;
4879 esac
4880 fi
4881 PERL=$ac_cv_path_PERL
4882
4883 if test -n "$PERL"; then
4884   echo "$as_me:$LINENO: result: $PERL" >&5
4885 echo "${ECHO_T}$PERL" >&6
4886 else
4887   echo "$as_me:$LINENO: result: no" >&5
4888 echo "${ECHO_T}no" >&6
4889 fi
4890
4891   test -n "$PERL" && break
4892 done
4893
4894   if test -z "$PERL" ; then
4895     PERL_VERSION=0
4896   else
4897     echo "$as_me:$LINENO: checking perl version" >&5
4898 echo $ECHO_N "checking perl version... $ECHO_C" >&6
4899 if test "${ac_cv_perl_version+set}" = set; then
4900   echo $ECHO_N "(cached) $ECHO_C" >&6
4901 else
4902   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
4903 fi
4904 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
4905 echo "${ECHO_T}$ac_cv_perl_version" >&6
4906     PERL_VERSION=$ac_cv_perl_version
4907   fi
4908
4909
4910 if test -z "$PERL" ; then
4911   # don't let it be blank...
4912   PERL=/usr/bin/perl
4913 fi
4914
4915 echo "$as_me:$LINENO: checking for X" >&5
4916 echo $ECHO_N "checking for X... $ECHO_C" >&6
4917
4918
4919 # Check whether --with-x or --without-x was given.
4920 if test "${with_x+set}" = set; then
4921   withval="$with_x"
4922
4923 fi;
4924 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4925 if test "x$with_x" = xno; then
4926   # The user explicitly disabled X.
4927   have_x=disabled
4928 else
4929   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4930     # Both variables are already set.
4931     have_x=yes
4932   else
4933     if test "${ac_cv_have_x+set}" = set; then
4934   echo $ECHO_N "(cached) $ECHO_C" >&6
4935 else
4936   # One or both of the vars are not set, and there is no cached value.
4937 ac_x_includes=no ac_x_libraries=no
4938 rm -fr conftest.dir
4939 if mkdir conftest.dir; then
4940   cd conftest.dir
4941   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4942   cat >Imakefile <<'_ACEOF'
4943 acfindx:
4944         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4945 _ACEOF
4946   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4947     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4948     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4949     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4950     for ac_extension in a so sl; do
4951       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4952          test -f $ac_im_libdir/libX11.$ac_extension; then
4953         ac_im_usrlibdir=$ac_im_libdir; break
4954       fi
4955     done
4956     # Screen out bogus values from the imake configuration.  They are
4957     # bogus both because they are the default anyway, and because
4958     # using them would break gcc on systems where it needs fixed includes.
4959     case $ac_im_incroot in
4960         /usr/include) ;;
4961         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4962     esac
4963     case $ac_im_usrlibdir in
4964         /usr/lib | /lib) ;;
4965         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4966     esac
4967   fi
4968   cd ..
4969   rm -fr conftest.dir
4970 fi
4971
4972 # Standard set of common directories for X headers.
4973 # Check X11 before X11Rn because it is often a symlink to the current release.
4974 ac_x_header_dirs='
4975 /usr/X11/include
4976 /usr/X11R6/include
4977 /usr/X11R5/include
4978 /usr/X11R4/include
4979
4980 /usr/include/X11
4981 /usr/include/X11R6
4982 /usr/include/X11R5
4983 /usr/include/X11R4
4984
4985 /usr/local/X11/include
4986 /usr/local/X11R6/include
4987 /usr/local/X11R5/include
4988 /usr/local/X11R4/include
4989
4990 /usr/local/include/X11
4991 /usr/local/include/X11R6
4992 /usr/local/include/X11R5
4993 /usr/local/include/X11R4
4994
4995 /usr/X386/include
4996 /usr/x386/include
4997 /usr/XFree86/include/X11
4998
4999 /usr/include
5000 /usr/local/include
5001 /usr/unsupported/include
5002 /usr/athena/include
5003 /usr/local/x11r5/include
5004 /usr/lpp/Xamples/include
5005
5006 /usr/openwin/include
5007 /usr/openwin/share/include'
5008
5009 if test "$ac_x_includes" = no; then
5010   # Guess where to find include files, by looking for Intrinsic.h.
5011   # First, try using that file with no special directory specified.
5012   cat >conftest.$ac_ext <<_ACEOF
5013 #line $LINENO "configure"
5014 /* confdefs.h.  */
5015 _ACEOF
5016 cat confdefs.h >>conftest.$ac_ext
5017 cat >>conftest.$ac_ext <<_ACEOF
5018 /* end confdefs.h.  */
5019 #include <X11/Intrinsic.h>
5020 _ACEOF
5021 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5022   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5023   ac_status=$?
5024   grep -v '^ *+' conftest.er1 >conftest.err
5025   rm -f conftest.er1
5026   cat conftest.err >&5
5027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5028   (exit $ac_status); } >/dev/null; then
5029   if test -s conftest.err; then
5030     ac_cpp_err=$ac_c_preproc_warn_flag
5031   else
5032     ac_cpp_err=
5033   fi
5034 else
5035   ac_cpp_err=yes
5036 fi
5037 if test -z "$ac_cpp_err"; then
5038   # We can compile using X headers with no special include directory.
5039 ac_x_includes=
5040 else
5041   echo "$as_me: failed program was:" >&5
5042 sed 's/^/| /' conftest.$ac_ext >&5
5043
5044   for ac_dir in $ac_x_header_dirs; do
5045   if test -r "$ac_dir/X11/Intrinsic.h"; then
5046     ac_x_includes=$ac_dir
5047     break
5048   fi
5049 done
5050 fi
5051 rm -f conftest.err conftest.$ac_ext
5052 fi # $ac_x_includes = no
5053
5054 if test "$ac_x_libraries" = no; then
5055   # Check for the libraries.
5056   # See if we find them without any special options.
5057   # Don't add to $LIBS permanently.
5058   ac_save_LIBS=$LIBS
5059   LIBS="-lXt $LIBS"
5060   cat >conftest.$ac_ext <<_ACEOF
5061 #line $LINENO "configure"
5062 /* confdefs.h.  */
5063 _ACEOF
5064 cat confdefs.h >>conftest.$ac_ext
5065 cat >>conftest.$ac_ext <<_ACEOF
5066 /* end confdefs.h.  */
5067 #include <X11/Intrinsic.h>
5068 int
5069 main ()
5070 {
5071 XtMalloc (0)
5072   ;
5073   return 0;
5074 }
5075 _ACEOF
5076 rm -f conftest.$ac_objext conftest$ac_exeext
5077 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5078   (eval $ac_link) 2>&5
5079   ac_status=$?
5080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5081   (exit $ac_status); } &&
5082          { ac_try='test -s conftest$ac_exeext'
5083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5084   (eval $ac_try) 2>&5
5085   ac_status=$?
5086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5087   (exit $ac_status); }; }; then
5088   LIBS=$ac_save_LIBS
5089 # We can link X programs with no special library path.
5090 ac_x_libraries=
5091 else
5092   echo "$as_me: failed program was:" >&5
5093 sed 's/^/| /' conftest.$ac_ext >&5
5094
5095 LIBS=$ac_save_LIBS
5096 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5097 do
5098   # Don't even attempt the hair of trying to link an X program!
5099   for ac_extension in a so sl; do
5100     if test -r $ac_dir/libXt.$ac_extension; then
5101       ac_x_libraries=$ac_dir
5102       break 2
5103     fi
5104   done
5105 done
5106 fi
5107 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5108 fi # $ac_x_libraries = no
5109
5110 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
5111   # Didn't find X anywhere.  Cache the known absence of X.
5112   ac_cv_have_x="have_x=no"
5113 else
5114   # Record where we found X for the cache.
5115   ac_cv_have_x="have_x=yes \
5116                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5117 fi
5118 fi
5119
5120   fi
5121   eval "$ac_cv_have_x"
5122 fi # $with_x != no
5123
5124 if test "$have_x" != yes; then
5125   echo "$as_me:$LINENO: result: $have_x" >&5
5126 echo "${ECHO_T}$have_x" >&6
5127   no_x=yes
5128 else
5129   # If each of the values was on the command line, it overrides each guess.
5130   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5131   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5132   # Update the cache value to reflect the command line values.
5133   ac_cv_have_x="have_x=yes \
5134                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5135   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
5136 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5137 fi
5138
5139 if test "$no_x" = yes; then
5140   # Not all programs may use this symbol, but it does not hurt to define it.
5141
5142 cat >>confdefs.h <<\_ACEOF
5143 #define X_DISPLAY_MISSING 1
5144 _ACEOF
5145
5146   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5147 else
5148   if test -n "$x_includes"; then
5149     X_CFLAGS="$X_CFLAGS -I$x_includes"
5150   fi
5151
5152   # It would also be nice to do this for all -L options, not just this one.
5153   if test -n "$x_libraries"; then
5154     X_LIBS="$X_LIBS -L$x_libraries"
5155     # For Solaris; some versions of Sun CC require a space after -R and
5156     # others require no space.  Words are not sufficient . . . .
5157     case `(uname -sr) 2>/dev/null` in
5158     "SunOS 5"*)
5159       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
5160 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
5161       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
5162       cat >conftest.$ac_ext <<_ACEOF
5163 #line $LINENO "configure"
5164 /* confdefs.h.  */
5165 _ACEOF
5166 cat confdefs.h >>conftest.$ac_ext
5167 cat >>conftest.$ac_ext <<_ACEOF
5168 /* end confdefs.h.  */
5169
5170 int
5171 main ()
5172 {
5173
5174   ;
5175   return 0;
5176 }
5177 _ACEOF
5178 rm -f conftest.$ac_objext conftest$ac_exeext
5179 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5180   (eval $ac_link) 2>&5
5181   ac_status=$?
5182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5183   (exit $ac_status); } &&
5184          { ac_try='test -s conftest$ac_exeext'
5185   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5186   (eval $ac_try) 2>&5
5187   ac_status=$?
5188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5189   (exit $ac_status); }; }; then
5190   ac_R_nospace=yes
5191 else
5192   echo "$as_me: failed program was:" >&5
5193 sed 's/^/| /' conftest.$ac_ext >&5
5194
5195 ac_R_nospace=no
5196 fi
5197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5198       if test $ac_R_nospace = yes; then
5199         echo "$as_me:$LINENO: result: no" >&5
5200 echo "${ECHO_T}no" >&6
5201         X_LIBS="$X_LIBS -R$x_libraries"
5202       else
5203         LIBS="$ac_xsave_LIBS -R $x_libraries"
5204         cat >conftest.$ac_ext <<_ACEOF
5205 #line $LINENO "configure"
5206 /* confdefs.h.  */
5207 _ACEOF
5208 cat confdefs.h >>conftest.$ac_ext
5209 cat >>conftest.$ac_ext <<_ACEOF
5210 /* end confdefs.h.  */
5211
5212 int
5213 main ()
5214 {
5215
5216   ;
5217   return 0;
5218 }
5219 _ACEOF
5220 rm -f conftest.$ac_objext conftest$ac_exeext
5221 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5222   (eval $ac_link) 2>&5
5223   ac_status=$?
5224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5225   (exit $ac_status); } &&
5226          { ac_try='test -s conftest$ac_exeext'
5227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5228   (eval $ac_try) 2>&5
5229   ac_status=$?
5230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5231   (exit $ac_status); }; }; then
5232   ac_R_space=yes
5233 else
5234   echo "$as_me: failed program was:" >&5
5235 sed 's/^/| /' conftest.$ac_ext >&5
5236
5237 ac_R_space=no
5238 fi
5239 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5240         if test $ac_R_space = yes; then
5241           echo "$as_me:$LINENO: result: yes" >&5
5242 echo "${ECHO_T}yes" >&6
5243           X_LIBS="$X_LIBS -R $x_libraries"
5244         else
5245           echo "$as_me:$LINENO: result: neither works" >&5
5246 echo "${ECHO_T}neither works" >&6
5247         fi
5248       fi
5249       LIBS=$ac_xsave_LIBS
5250     esac
5251   fi
5252
5253   # Check for system-dependent libraries X programs must link with.
5254   # Do this before checking for the system-independent R6 libraries
5255   # (-lICE), since we may need -lsocket or whatever for X linking.
5256
5257   if test "$ISC" = yes; then
5258     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5259   else
5260     # Martyn Johnson says this is needed for Ultrix, if the X
5261     # libraries were built with DECnet support.  And Karl Berry says
5262     # the Alpha needs dnet_stub (dnet does not exist).
5263     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5264     cat >conftest.$ac_ext <<_ACEOF
5265 #line $LINENO "configure"
5266 /* confdefs.h.  */
5267 _ACEOF
5268 cat confdefs.h >>conftest.$ac_ext
5269 cat >>conftest.$ac_ext <<_ACEOF
5270 /* end confdefs.h.  */
5271
5272 /* Override any gcc2 internal prototype to avoid an error.  */
5273 #ifdef __cplusplus
5274 extern "C"
5275 #endif
5276 /* We use char because int might match the return type of a gcc2
5277    builtin and then its argument prototype would still apply.  */
5278 char XOpenDisplay ();
5279 int
5280 main ()
5281 {
5282 XOpenDisplay ();
5283   ;
5284   return 0;
5285 }
5286 _ACEOF
5287 rm -f conftest.$ac_objext conftest$ac_exeext
5288 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5289   (eval $ac_link) 2>&5
5290   ac_status=$?
5291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5292   (exit $ac_status); } &&
5293          { ac_try='test -s conftest$ac_exeext'
5294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5295   (eval $ac_try) 2>&5
5296   ac_status=$?
5297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5298   (exit $ac_status); }; }; then
5299   :
5300 else
5301   echo "$as_me: failed program was:" >&5
5302 sed 's/^/| /' conftest.$ac_ext >&5
5303
5304 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5305 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5306 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5307   echo $ECHO_N "(cached) $ECHO_C" >&6
5308 else
5309   ac_check_lib_save_LIBS=$LIBS
5310 LIBS="-ldnet  $LIBS"
5311 cat >conftest.$ac_ext <<_ACEOF
5312 #line $LINENO "configure"
5313 /* confdefs.h.  */
5314 _ACEOF
5315 cat confdefs.h >>conftest.$ac_ext
5316 cat >>conftest.$ac_ext <<_ACEOF
5317 /* end confdefs.h.  */
5318
5319 /* Override any gcc2 internal prototype to avoid an error.  */
5320 #ifdef __cplusplus
5321 extern "C"
5322 #endif
5323 /* We use char because int might match the return type of a gcc2
5324    builtin and then its argument prototype would still apply.  */
5325 char dnet_ntoa ();
5326 int
5327 main ()
5328 {
5329 dnet_ntoa ();
5330   ;
5331   return 0;
5332 }
5333 _ACEOF
5334 rm -f conftest.$ac_objext conftest$ac_exeext
5335 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5336   (eval $ac_link) 2>&5
5337   ac_status=$?
5338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5339   (exit $ac_status); } &&
5340          { ac_try='test -s conftest$ac_exeext'
5341   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5342   (eval $ac_try) 2>&5
5343   ac_status=$?
5344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5345   (exit $ac_status); }; }; then
5346   ac_cv_lib_dnet_dnet_ntoa=yes
5347 else
5348   echo "$as_me: failed program was:" >&5
5349 sed 's/^/| /' conftest.$ac_ext >&5
5350
5351 ac_cv_lib_dnet_dnet_ntoa=no
5352 fi
5353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5354 LIBS=$ac_check_lib_save_LIBS
5355 fi
5356 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5357 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5358 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5359   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5360 fi
5361
5362     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5363       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5364 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5365 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5366   echo $ECHO_N "(cached) $ECHO_C" >&6
5367 else
5368   ac_check_lib_save_LIBS=$LIBS
5369 LIBS="-ldnet_stub  $LIBS"
5370 cat >conftest.$ac_ext <<_ACEOF
5371 #line $LINENO "configure"
5372 /* confdefs.h.  */
5373 _ACEOF
5374 cat confdefs.h >>conftest.$ac_ext
5375 cat >>conftest.$ac_ext <<_ACEOF
5376 /* end confdefs.h.  */
5377
5378 /* Override any gcc2 internal prototype to avoid an error.  */
5379 #ifdef __cplusplus
5380 extern "C"
5381 #endif
5382 /* We use char because int might match the return type of a gcc2
5383    builtin and then its argument prototype would still apply.  */
5384 char dnet_ntoa ();
5385 int
5386 main ()
5387 {
5388 dnet_ntoa ();
5389   ;
5390   return 0;
5391 }
5392 _ACEOF
5393 rm -f conftest.$ac_objext conftest$ac_exeext
5394 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5395   (eval $ac_link) 2>&5
5396   ac_status=$?
5397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5398   (exit $ac_status); } &&
5399          { ac_try='test -s conftest$ac_exeext'
5400   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5401   (eval $ac_try) 2>&5
5402   ac_status=$?
5403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5404   (exit $ac_status); }; }; then
5405   ac_cv_lib_dnet_stub_dnet_ntoa=yes
5406 else
5407   echo "$as_me: failed program was:" >&5
5408 sed 's/^/| /' conftest.$ac_ext >&5
5409
5410 ac_cv_lib_dnet_stub_dnet_ntoa=no
5411 fi
5412 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5413 LIBS=$ac_check_lib_save_LIBS
5414 fi
5415 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5416 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5417 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5418   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5419 fi
5420
5421     fi
5422 fi
5423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5424     LIBS="$ac_xsave_LIBS"
5425
5426     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5427     # to get the SysV transport functions.
5428     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5429     # needs -lnsl.
5430     # The nsl library prevents programs from opening the X display
5431     # on Irix 5.2, according to T.E. Dickey.
5432     # The functions gethostbyname, getservbyname, and inet_addr are
5433     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5434     echo "$as_me:$LINENO: checking for gethostbyname" >&5
5435 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5436 if test "${ac_cv_func_gethostbyname+set}" = set; then
5437   echo $ECHO_N "(cached) $ECHO_C" >&6
5438 else
5439   cat >conftest.$ac_ext <<_ACEOF
5440 #line $LINENO "configure"
5441 /* confdefs.h.  */
5442 _ACEOF
5443 cat confdefs.h >>conftest.$ac_ext
5444 cat >>conftest.$ac_ext <<_ACEOF
5445 /* end confdefs.h.  */
5446 /* System header to define __stub macros and hopefully few prototypes,
5447     which can conflict with char gethostbyname (); below.
5448     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5449     <limits.h> exists even on freestanding compilers.  */
5450 #ifdef __STDC__
5451 # include <limits.h>
5452 #else
5453 # include <assert.h>
5454 #endif
5455 /* Override any gcc2 internal prototype to avoid an error.  */
5456 #ifdef __cplusplus
5457 extern "C"
5458 {
5459 #endif
5460 /* We use char because int might match the return type of a gcc2
5461    builtin and then its argument prototype would still apply.  */
5462 char gethostbyname ();
5463 /* The GNU C library defines this for functions which it implements
5464     to always fail with ENOSYS.  Some functions are actually named
5465     something starting with __ and the normal name is an alias.  */
5466 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5467 choke me
5468 #else
5469 char (*f) () = gethostbyname;
5470 #endif
5471 #ifdef __cplusplus
5472 }
5473 #endif
5474
5475 int
5476 main ()
5477 {
5478 return f != gethostbyname;
5479   ;
5480   return 0;
5481 }
5482 _ACEOF
5483 rm -f conftest.$ac_objext conftest$ac_exeext
5484 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5485   (eval $ac_link) 2>&5
5486   ac_status=$?
5487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5488   (exit $ac_status); } &&
5489          { ac_try='test -s conftest$ac_exeext'
5490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5491   (eval $ac_try) 2>&5
5492   ac_status=$?
5493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5494   (exit $ac_status); }; }; then
5495   ac_cv_func_gethostbyname=yes
5496 else
5497   echo "$as_me: failed program was:" >&5
5498 sed 's/^/| /' conftest.$ac_ext >&5
5499
5500 ac_cv_func_gethostbyname=no
5501 fi
5502 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5503 fi
5504 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5505 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5506
5507     if test $ac_cv_func_gethostbyname = no; then
5508       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5509 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5510 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5511   echo $ECHO_N "(cached) $ECHO_C" >&6
5512 else
5513   ac_check_lib_save_LIBS=$LIBS
5514 LIBS="-lnsl  $LIBS"
5515 cat >conftest.$ac_ext <<_ACEOF
5516 #line $LINENO "configure"
5517 /* confdefs.h.  */
5518 _ACEOF
5519 cat confdefs.h >>conftest.$ac_ext
5520 cat >>conftest.$ac_ext <<_ACEOF
5521 /* end confdefs.h.  */
5522
5523 /* Override any gcc2 internal prototype to avoid an error.  */
5524 #ifdef __cplusplus
5525 extern "C"
5526 #endif
5527 /* We use char because int might match the return type of a gcc2
5528    builtin and then its argument prototype would still apply.  */
5529 char gethostbyname ();
5530 int
5531 main ()
5532 {
5533 gethostbyname ();
5534   ;
5535   return 0;
5536 }
5537 _ACEOF
5538 rm -f conftest.$ac_objext conftest$ac_exeext
5539 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5540   (eval $ac_link) 2>&5
5541   ac_status=$?
5542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5543   (exit $ac_status); } &&
5544          { ac_try='test -s conftest$ac_exeext'
5545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5546   (eval $ac_try) 2>&5
5547   ac_status=$?
5548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5549   (exit $ac_status); }; }; then
5550   ac_cv_lib_nsl_gethostbyname=yes
5551 else
5552   echo "$as_me: failed program was:" >&5
5553 sed 's/^/| /' conftest.$ac_ext >&5
5554
5555 ac_cv_lib_nsl_gethostbyname=no
5556 fi
5557 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5558 LIBS=$ac_check_lib_save_LIBS
5559 fi
5560 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5561 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5562 if test $ac_cv_lib_nsl_gethostbyname = yes; then
5563   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5564 fi
5565
5566       if test $ac_cv_lib_nsl_gethostbyname = no; then
5567         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5568 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5569 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5570   echo $ECHO_N "(cached) $ECHO_C" >&6
5571 else
5572   ac_check_lib_save_LIBS=$LIBS
5573 LIBS="-lbsd  $LIBS"
5574 cat >conftest.$ac_ext <<_ACEOF
5575 #line $LINENO "configure"
5576 /* confdefs.h.  */
5577 _ACEOF
5578 cat confdefs.h >>conftest.$ac_ext
5579 cat >>conftest.$ac_ext <<_ACEOF
5580 /* end confdefs.h.  */
5581
5582 /* Override any gcc2 internal prototype to avoid an error.  */
5583 #ifdef __cplusplus
5584 extern "C"
5585 #endif
5586 /* We use char because int might match the return type of a gcc2
5587    builtin and then its argument prototype would still apply.  */
5588 char gethostbyname ();
5589 int
5590 main ()
5591 {
5592 gethostbyname ();
5593   ;
5594   return 0;
5595 }
5596 _ACEOF
5597 rm -f conftest.$ac_objext conftest$ac_exeext
5598 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5599   (eval $ac_link) 2>&5
5600   ac_status=$?
5601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5602   (exit $ac_status); } &&
5603          { ac_try='test -s conftest$ac_exeext'
5604   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5605   (eval $ac_try) 2>&5
5606   ac_status=$?
5607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5608   (exit $ac_status); }; }; then
5609   ac_cv_lib_bsd_gethostbyname=yes
5610 else
5611   echo "$as_me: failed program was:" >&5
5612 sed 's/^/| /' conftest.$ac_ext >&5
5613
5614 ac_cv_lib_bsd_gethostbyname=no
5615 fi
5616 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5617 LIBS=$ac_check_lib_save_LIBS
5618 fi
5619 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
5620 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
5621 if test $ac_cv_lib_bsd_gethostbyname = yes; then
5622   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5623 fi
5624
5625       fi
5626     fi
5627
5628     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5629     # socket/setsockopt and other routines are undefined under SCO ODT
5630     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5631     # on later versions), says Simon Leinen: it contains gethostby*
5632     # variants that don't use the name server (or something).  -lsocket
5633     # must be given before -lnsl if both are needed.  We assume that
5634     # if connect needs -lnsl, so does gethostbyname.
5635     echo "$as_me:$LINENO: checking for connect" >&5
5636 echo $ECHO_N "checking for connect... $ECHO_C" >&6
5637 if test "${ac_cv_func_connect+set}" = set; then
5638   echo $ECHO_N "(cached) $ECHO_C" >&6
5639 else
5640   cat >conftest.$ac_ext <<_ACEOF
5641 #line $LINENO "configure"
5642 /* confdefs.h.  */
5643 _ACEOF
5644 cat confdefs.h >>conftest.$ac_ext
5645 cat >>conftest.$ac_ext <<_ACEOF
5646 /* end confdefs.h.  */
5647 /* System header to define __stub macros and hopefully few prototypes,
5648     which can conflict with char connect (); below.
5649     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5650     <limits.h> exists even on freestanding compilers.  */
5651 #ifdef __STDC__
5652 # include <limits.h>
5653 #else
5654 # include <assert.h>
5655 #endif
5656 /* Override any gcc2 internal prototype to avoid an error.  */
5657 #ifdef __cplusplus
5658 extern "C"
5659 {
5660 #endif
5661 /* We use char because int might match the return type of a gcc2
5662    builtin and then its argument prototype would still apply.  */
5663 char connect ();
5664 /* The GNU C library defines this for functions which it implements
5665     to always fail with ENOSYS.  Some functions are actually named
5666     something starting with __ and the normal name is an alias.  */
5667 #if defined (__stub_connect) || defined (__stub___connect)
5668 choke me
5669 #else
5670 char (*f) () = connect;
5671 #endif
5672 #ifdef __cplusplus
5673 }
5674 #endif
5675
5676 int
5677 main ()
5678 {
5679 return f != connect;
5680   ;
5681   return 0;
5682 }
5683 _ACEOF
5684 rm -f conftest.$ac_objext conftest$ac_exeext
5685 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5686   (eval $ac_link) 2>&5
5687   ac_status=$?
5688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5689   (exit $ac_status); } &&
5690          { ac_try='test -s conftest$ac_exeext'
5691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5692   (eval $ac_try) 2>&5
5693   ac_status=$?
5694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5695   (exit $ac_status); }; }; then
5696   ac_cv_func_connect=yes
5697 else
5698   echo "$as_me: failed program was:" >&5
5699 sed 's/^/| /' conftest.$ac_ext >&5
5700
5701 ac_cv_func_connect=no
5702 fi
5703 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5704 fi
5705 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5706 echo "${ECHO_T}$ac_cv_func_connect" >&6
5707
5708     if test $ac_cv_func_connect = no; then
5709       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
5710 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
5711 if test "${ac_cv_lib_socket_connect+set}" = set; then
5712   echo $ECHO_N "(cached) $ECHO_C" >&6
5713 else
5714   ac_check_lib_save_LIBS=$LIBS
5715 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5716 cat >conftest.$ac_ext <<_ACEOF
5717 #line $LINENO "configure"
5718 /* confdefs.h.  */
5719 _ACEOF
5720 cat confdefs.h >>conftest.$ac_ext
5721 cat >>conftest.$ac_ext <<_ACEOF
5722 /* end confdefs.h.  */
5723
5724 /* Override any gcc2 internal prototype to avoid an error.  */
5725 #ifdef __cplusplus
5726 extern "C"
5727 #endif
5728 /* We use char because int might match the return type of a gcc2
5729    builtin and then its argument prototype would still apply.  */
5730 char connect ();
5731 int
5732 main ()
5733 {
5734 connect ();
5735   ;
5736   return 0;
5737 }
5738 _ACEOF
5739 rm -f conftest.$ac_objext conftest$ac_exeext
5740 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5741   (eval $ac_link) 2>&5
5742   ac_status=$?
5743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5744   (exit $ac_status); } &&
5745          { ac_try='test -s conftest$ac_exeext'
5746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5747   (eval $ac_try) 2>&5
5748   ac_status=$?
5749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5750   (exit $ac_status); }; }; then
5751   ac_cv_lib_socket_connect=yes
5752 else
5753   echo "$as_me: failed program was:" >&5
5754 sed 's/^/| /' conftest.$ac_ext >&5
5755
5756 ac_cv_lib_socket_connect=no
5757 fi
5758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5759 LIBS=$ac_check_lib_save_LIBS
5760 fi
5761 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
5762 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
5763 if test $ac_cv_lib_socket_connect = yes; then
5764   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5765 fi
5766
5767     fi
5768
5769     # Guillermo Gomez says -lposix is necessary on A/UX.
5770     echo "$as_me:$LINENO: checking for remove" >&5
5771 echo $ECHO_N "checking for remove... $ECHO_C" >&6
5772 if test "${ac_cv_func_remove+set}" = set; then
5773   echo $ECHO_N "(cached) $ECHO_C" >&6
5774 else
5775   cat >conftest.$ac_ext <<_ACEOF
5776 #line $LINENO "configure"
5777 /* confdefs.h.  */
5778 _ACEOF
5779 cat confdefs.h >>conftest.$ac_ext
5780 cat >>conftest.$ac_ext <<_ACEOF
5781 /* end confdefs.h.  */
5782 /* System header to define __stub macros and hopefully few prototypes,
5783     which can conflict with char remove (); below.
5784     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5785     <limits.h> exists even on freestanding compilers.  */
5786 #ifdef __STDC__
5787 # include <limits.h>
5788 #else
5789 # include <assert.h>
5790 #endif
5791 /* Override any gcc2 internal prototype to avoid an error.  */
5792 #ifdef __cplusplus
5793 extern "C"
5794 {
5795 #endif
5796 /* We use char because int might match the return type of a gcc2
5797    builtin and then its argument prototype would still apply.  */
5798 char remove ();
5799 /* The GNU C library defines this for functions which it implements
5800     to always fail with ENOSYS.  Some functions are actually named
5801     something starting with __ and the normal name is an alias.  */
5802 #if defined (__stub_remove) || defined (__stub___remove)
5803 choke me
5804 #else
5805 char (*f) () = remove;
5806 #endif
5807 #ifdef __cplusplus
5808 }
5809 #endif
5810
5811 int
5812 main ()
5813 {
5814 return f != remove;
5815   ;
5816   return 0;
5817 }
5818 _ACEOF
5819 rm -f conftest.$ac_objext conftest$ac_exeext
5820 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5821   (eval $ac_link) 2>&5
5822   ac_status=$?
5823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5824   (exit $ac_status); } &&
5825          { ac_try='test -s conftest$ac_exeext'
5826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5827   (eval $ac_try) 2>&5
5828   ac_status=$?
5829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5830   (exit $ac_status); }; }; then
5831   ac_cv_func_remove=yes
5832 else
5833   echo "$as_me: failed program was:" >&5
5834 sed 's/^/| /' conftest.$ac_ext >&5
5835
5836 ac_cv_func_remove=no
5837 fi
5838 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5839 fi
5840 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
5841 echo "${ECHO_T}$ac_cv_func_remove" >&6
5842
5843     if test $ac_cv_func_remove = no; then
5844       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
5845 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
5846 if test "${ac_cv_lib_posix_remove+set}" = set; then
5847   echo $ECHO_N "(cached) $ECHO_C" >&6
5848 else
5849   ac_check_lib_save_LIBS=$LIBS
5850 LIBS="-lposix  $LIBS"
5851 cat >conftest.$ac_ext <<_ACEOF
5852 #line $LINENO "configure"
5853 /* confdefs.h.  */
5854 _ACEOF
5855 cat confdefs.h >>conftest.$ac_ext
5856 cat >>conftest.$ac_ext <<_ACEOF
5857 /* end confdefs.h.  */
5858
5859 /* Override any gcc2 internal prototype to avoid an error.  */
5860 #ifdef __cplusplus
5861 extern "C"
5862 #endif
5863 /* We use char because int might match the return type of a gcc2
5864    builtin and then its argument prototype would still apply.  */
5865 char remove ();
5866 int
5867 main ()
5868 {
5869 remove ();
5870   ;
5871   return 0;
5872 }
5873 _ACEOF
5874 rm -f conftest.$ac_objext conftest$ac_exeext
5875 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5876   (eval $ac_link) 2>&5
5877   ac_status=$?
5878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5879   (exit $ac_status); } &&
5880          { ac_try='test -s conftest$ac_exeext'
5881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5882   (eval $ac_try) 2>&5
5883   ac_status=$?
5884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5885   (exit $ac_status); }; }; then
5886   ac_cv_lib_posix_remove=yes
5887 else
5888   echo "$as_me: failed program was:" >&5
5889 sed 's/^/| /' conftest.$ac_ext >&5
5890
5891 ac_cv_lib_posix_remove=no
5892 fi
5893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5894 LIBS=$ac_check_lib_save_LIBS
5895 fi
5896 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
5897 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
5898 if test $ac_cv_lib_posix_remove = yes; then
5899   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5900 fi
5901
5902     fi
5903
5904     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5905     echo "$as_me:$LINENO: checking for shmat" >&5
5906 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
5907 if test "${ac_cv_func_shmat+set}" = set; then
5908   echo $ECHO_N "(cached) $ECHO_C" >&6
5909 else
5910   cat >conftest.$ac_ext <<_ACEOF
5911 #line $LINENO "configure"
5912 /* confdefs.h.  */
5913 _ACEOF
5914 cat confdefs.h >>conftest.$ac_ext
5915 cat >>conftest.$ac_ext <<_ACEOF
5916 /* end confdefs.h.  */
5917 /* System header to define __stub macros and hopefully few prototypes,
5918     which can conflict with char shmat (); below.
5919     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5920     <limits.h> exists even on freestanding compilers.  */
5921 #ifdef __STDC__
5922 # include <limits.h>
5923 #else
5924 # include <assert.h>
5925 #endif
5926 /* Override any gcc2 internal prototype to avoid an error.  */
5927 #ifdef __cplusplus
5928 extern "C"
5929 {
5930 #endif
5931 /* We use char because int might match the return type of a gcc2
5932    builtin and then its argument prototype would still apply.  */
5933 char shmat ();
5934 /* The GNU C library defines this for functions which it implements
5935     to always fail with ENOSYS.  Some functions are actually named
5936     something starting with __ and the normal name is an alias.  */
5937 #if defined (__stub_shmat) || defined (__stub___shmat)
5938 choke me
5939 #else
5940 char (*f) () = shmat;
5941 #endif
5942 #ifdef __cplusplus
5943 }
5944 #endif
5945
5946 int
5947 main ()
5948 {
5949 return f != shmat;
5950   ;
5951   return 0;
5952 }
5953 _ACEOF
5954 rm -f conftest.$ac_objext conftest$ac_exeext
5955 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5956   (eval $ac_link) 2>&5
5957   ac_status=$?
5958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5959   (exit $ac_status); } &&
5960          { ac_try='test -s conftest$ac_exeext'
5961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5962   (eval $ac_try) 2>&5
5963   ac_status=$?
5964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5965   (exit $ac_status); }; }; then
5966   ac_cv_func_shmat=yes
5967 else
5968   echo "$as_me: failed program was:" >&5
5969 sed 's/^/| /' conftest.$ac_ext >&5
5970
5971 ac_cv_func_shmat=no
5972 fi
5973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5974 fi
5975 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
5976 echo "${ECHO_T}$ac_cv_func_shmat" >&6
5977
5978     if test $ac_cv_func_shmat = no; then
5979       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
5980 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
5981 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
5982   echo $ECHO_N "(cached) $ECHO_C" >&6
5983 else
5984   ac_check_lib_save_LIBS=$LIBS
5985 LIBS="-lipc  $LIBS"
5986 cat >conftest.$ac_ext <<_ACEOF
5987 #line $LINENO "configure"
5988 /* confdefs.h.  */
5989 _ACEOF
5990 cat confdefs.h >>conftest.$ac_ext
5991 cat >>conftest.$ac_ext <<_ACEOF
5992 /* end confdefs.h.  */
5993
5994 /* Override any gcc2 internal prototype to avoid an error.  */
5995 #ifdef __cplusplus
5996 extern "C"
5997 #endif
5998 /* We use char because int might match the return type of a gcc2
5999    builtin and then its argument prototype would still apply.  */
6000 char shmat ();
6001 int
6002 main ()
6003 {
6004 shmat ();
6005   ;
6006   return 0;
6007 }
6008 _ACEOF
6009 rm -f conftest.$ac_objext conftest$ac_exeext
6010 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6011   (eval $ac_link) 2>&5
6012   ac_status=$?
6013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6014   (exit $ac_status); } &&
6015          { ac_try='test -s conftest$ac_exeext'
6016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6017   (eval $ac_try) 2>&5
6018   ac_status=$?
6019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6020   (exit $ac_status); }; }; then
6021   ac_cv_lib_ipc_shmat=yes
6022 else
6023   echo "$as_me: failed program was:" >&5
6024 sed 's/^/| /' conftest.$ac_ext >&5
6025
6026 ac_cv_lib_ipc_shmat=no
6027 fi
6028 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6029 LIBS=$ac_check_lib_save_LIBS
6030 fi
6031 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
6032 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
6033 if test $ac_cv_lib_ipc_shmat = yes; then
6034   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6035 fi
6036
6037     fi
6038   fi
6039
6040   # Check for libraries that X11R6 Xt/Xaw programs need.
6041   ac_save_LDFLAGS=$LDFLAGS
6042   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6043   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6044   # check for ICE first), but we must link in the order -lSM -lICE or
6045   # we get undefined symbols.  So assume we have SM if we have ICE.
6046   # These have to be linked with before -lX11, unlike the other
6047   # libraries we check for below, so use a different variable.
6048   # John Interrante, Karl Berry
6049   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
6050 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
6051 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
6052   echo $ECHO_N "(cached) $ECHO_C" >&6
6053 else
6054   ac_check_lib_save_LIBS=$LIBS
6055 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6056 cat >conftest.$ac_ext <<_ACEOF
6057 #line $LINENO "configure"
6058 /* confdefs.h.  */
6059 _ACEOF
6060 cat confdefs.h >>conftest.$ac_ext
6061 cat >>conftest.$ac_ext <<_ACEOF
6062 /* end confdefs.h.  */
6063
6064 /* Override any gcc2 internal prototype to avoid an error.  */
6065 #ifdef __cplusplus
6066 extern "C"
6067 #endif
6068 /* We use char because int might match the return type of a gcc2
6069    builtin and then its argument prototype would still apply.  */
6070 char IceConnectionNumber ();
6071 int
6072 main ()
6073 {
6074 IceConnectionNumber ();
6075   ;
6076   return 0;
6077 }
6078 _ACEOF
6079 rm -f conftest.$ac_objext conftest$ac_exeext
6080 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6081   (eval $ac_link) 2>&5
6082   ac_status=$?
6083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6084   (exit $ac_status); } &&
6085          { ac_try='test -s conftest$ac_exeext'
6086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6087   (eval $ac_try) 2>&5
6088   ac_status=$?
6089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6090   (exit $ac_status); }; }; then
6091   ac_cv_lib_ICE_IceConnectionNumber=yes
6092 else
6093   echo "$as_me: failed program was:" >&5
6094 sed 's/^/| /' conftest.$ac_ext >&5
6095
6096 ac_cv_lib_ICE_IceConnectionNumber=no
6097 fi
6098 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6099 LIBS=$ac_check_lib_save_LIBS
6100 fi
6101 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6102 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
6103 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
6104   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6105 fi
6106
6107   LDFLAGS=$ac_save_LDFLAGS
6108
6109 fi
6110
6111
6112 if test "$have_x" != yes; then
6113   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
6114 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
6115    { (exit 1); exit 1; }; }
6116 fi
6117
6118
6119     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
6120 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
6121 if test "${ac_cv_x_app_defaults+set}" = set; then
6122   echo $ECHO_N "(cached) $ECHO_C" >&6
6123 else
6124
6125   rm -fr conftestdir
6126   if mkdir conftestdir; then
6127     cd conftestdir 2>/dev/null
6128     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6129     cat > Imakefile <<'EOF'
6130 acfindx:
6131         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
6132 EOF
6133     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
6134       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
6135       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6136     fi
6137     cd .. 2>/dev/null
6138     rm -fr conftestdir
6139   fi
6140       if test x"$ac_x_app_defaults" = x; then
6141
6142   # Look for the directory under a standard set of common directories.
6143   # Check X11 before X11Rn because it's often a symlink to the current release.
6144   for ac_dir in                                 \
6145     /usr/X11/lib/app-defaults                   \
6146     /usr/X11R6/lib/app-defaults                 \
6147     /usr/X11R6/lib/X11/app-defaults             \
6148     /usr/X11R5/lib/app-defaults                 \
6149     /usr/X11R5/lib/X11/app-defaults             \
6150     /usr/X11R4/lib/app-defaults                 \
6151     /usr/X11R4/lib/X11/app-defaults             \
6152                                                 \
6153     /usr/lib/X11/app-defaults                   \
6154     /usr/lib/X11R6/app-defaults                 \
6155     /usr/lib/X11R5/app-defaults                 \
6156     /usr/lib/X11R4/app-defaults                 \
6157                                                 \
6158     /usr/local/X11/lib/app-defaults             \
6159     /usr/local/X11R6/lib/app-defaults           \
6160     /usr/local/X11R5/lib/app-defaults           \
6161     /usr/local/X11R4/lib/app-defaults           \
6162                                                 \
6163     /usr/local/lib/X11/app-defaults             \
6164     /usr/local/lib/X11R6/app-defaults           \
6165     /usr/local/lib/X11R6/X11/app-defaults       \
6166     /usr/local/lib/X11R5/app-defaults           \
6167     /usr/local/lib/X11R5/X11/app-defaults       \
6168     /usr/local/lib/X11R4/app-defaults           \
6169     /usr/local/lib/X11R4/X11/app-defaults       \
6170                                                 \
6171     /usr/X386/lib/X11/app-defaults              \
6172     /usr/x386/lib/X11/app-defaults              \
6173     /usr/XFree86/lib/X11/app-defaults           \
6174                                                 \
6175     /usr/lib/X11/app-defaults                   \
6176     /usr/local/lib/X11/app-defaults             \
6177     /usr/unsupported/lib/X11/app-defaults       \
6178     /usr/athena/lib/X11/app-defaults            \
6179     /usr/local/x11r5/lib/X11/app-defaults       \
6180     /usr/lpp/Xamples/lib/X11/app-defaults       \
6181     /lib/usr/lib/X11/app-defaults               \
6182                                                 \
6183     /usr/openwin/lib/app-defaults               \
6184     /usr/openwin/lib/X11/app-defaults           \
6185     /usr/openwin/share/lib/app-defaults         \
6186     /usr/openwin/share/lib/X11/app-defaults     \
6187                                                 \
6188     /X11R6/lib/app-defaults                     \
6189     /X11R5/lib/app-defaults                     \
6190     /X11R4/lib/app-defaults                     \
6191     ; \
6192   do
6193     if test -d "$ac_dir"; then
6194       ac_x_app_defaults=$ac_dir
6195       break
6196     fi
6197   done
6198
6199       fi
6200       if test x"$ac_x_app_defaults" = x; then
6201         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
6202       else
6203         # Record where we found app-defaults for the cache.
6204         ac_cv_x_app_defaults="$ac_x_app_defaults"
6205       fi
6206 fi
6207 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
6208 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
6209     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
6210 case "$host" in
6211     *-hpux*)
6212
6213       # The following arcana was gleaned from conversations with
6214       # Eric Schwartz <erics@col.hp.com>:
6215       #
6216       # On HPUX 10.x, the parts of X that HP considers "standard" live in
6217       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6218       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6219       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6220       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6221       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6222       # you don't need any -I or -L arguments.
6223       #
6224       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6225       # are the same division as 10.x.  However, there are no symlinks to
6226       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6227       # arguments are always necessary.
6228       #
6229       # However, X11R6 was available on HPUX 9.x as a patch: if that
6230       # patch was installed, then all of X11R6 went in to
6231       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6232       #
6233       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6234       # whether R5 was available as a patch; R6 undoubtedly was not.)
6235       #
6236       # So.  We try and use the highest numbered pair of
6237       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6238       # that are available.  We do not mix and match different versions
6239       # of X.
6240       #
6241       # Question I still don't know the answer to: (do you?)
6242       #
6243       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6244       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6245       #     that contrib directory?  Did it contain so-called "standard"
6246       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6247       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6248       #     be a situation where one had to reach into the R5 headers and
6249       #     libs to find Xmu?  That is, must both R6 and R5 directories
6250       #     be on the -I and -L lists in that case?
6251       #
6252       for version in X11R6 X11R5 X11R4 ; do
6253         # if either pair of directories exists...
6254         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6255         then
6256            # if contrib exists, use it...
6257            if test -d /usr/contrib/$version/include ; then
6258              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6259              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6260            fi
6261            # if the "standard" one exists, use it.
6262            if test -d /usr/include/$version ; then
6263              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6264              X_LIBS="$X_LIBS -L/usr/lib/$version"
6265            fi
6266            # since at least one of the pair exists, go no farther.
6267            break
6268         fi
6269       done
6270
6271       # Now find Motif.  Thanks for not making xmkmf find this by
6272       # default, you losers.
6273       #
6274       if test -d /usr/include/Motif2.1 ; then
6275         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6276         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6277       elif test -d /usr/include/Motif1.2 ; then
6278         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6279         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6280       elif test -d /usr/include/Motif1.1 ; then
6281         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6282         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6283       fi
6284
6285       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6286       #
6287       if test -d /opt/graphics/OpenGL/include ; then
6288         # HP-UX 10.20 puts it here
6289         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6290         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6291       elif test -d /opt/Mesa/lib ; then
6292         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6293         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6294       fi
6295
6296
6297       if test -d /opt/xpm/lib/X11 ; then
6298         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6299         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6300       fi
6301
6302       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6303       # in /usr/local/, unless there is already an xscreensaver in
6304       # /usr/local/bin/.  This can be overridden with the --prefix arg
6305       # to configure.  I'm not sure this is the right thing to do, but
6306       # Richard Lloyd says so...
6307       #
6308       if test \! -x /usr/local/bin/xscreensaver ; then
6309         ac_default_prefix=/opt/xscreensaver
6310       fi
6311
6312     ;;
6313     *-solaris*)
6314
6315       # Thanks for not making xmkmf find this by default, pinheads.
6316       # And thanks for moving things around again, too.  Is this
6317       # really the standard location now?  What happened to the
6318       # joke that this kind of thing went in /opt?
6319       # cthomp says "answer: CDE (Common Disorganized Environment)"
6320       #
6321       if test -f /usr/dt/include/Xm/Xm.h ; then
6322         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6323         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
6324
6325         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6326         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
6327 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
6328 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
6329   echo $ECHO_N "(cached) $ECHO_C" >&6
6330 else
6331   ac_check_lib_save_LIBS=$LIBS
6332 LIBS="-lgen  $LIBS"
6333 cat >conftest.$ac_ext <<_ACEOF
6334 #line $LINENO "configure"
6335 /* confdefs.h.  */
6336 _ACEOF
6337 cat confdefs.h >>conftest.$ac_ext
6338 cat >>conftest.$ac_ext <<_ACEOF
6339 /* end confdefs.h.  */
6340
6341 /* Override any gcc2 internal prototype to avoid an error.  */
6342 #ifdef __cplusplus
6343 extern "C"
6344 #endif
6345 /* We use char because int might match the return type of a gcc2
6346    builtin and then its argument prototype would still apply.  */
6347 char regcmp ();
6348 int
6349 main ()
6350 {
6351 regcmp ();
6352   ;
6353   return 0;
6354 }
6355 _ACEOF
6356 rm -f conftest.$ac_objext conftest$ac_exeext
6357 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6358   (eval $ac_link) 2>&5
6359   ac_status=$?
6360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6361   (exit $ac_status); } &&
6362          { ac_try='test -s conftest$ac_exeext'
6363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6364   (eval $ac_try) 2>&5
6365   ac_status=$?
6366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6367   (exit $ac_status); }; }; then
6368   ac_cv_lib_gen_regcmp=yes
6369 else
6370   echo "$as_me: failed program was:" >&5
6371 sed 's/^/| /' conftest.$ac_ext >&5
6372
6373 ac_cv_lib_gen_regcmp=no
6374 fi
6375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6376 LIBS=$ac_check_lib_save_LIBS
6377 fi
6378 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
6379 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
6380 if test $ac_cv_lib_gen_regcmp = yes; then
6381   MOTIF_LIBS="$MOTIF_LIBS -lgen"
6382 fi
6383
6384       fi
6385
6386     ;;
6387     *-darwin*)
6388
6389       # On MacOS X (10.x with "fink"), many things are under /sw/.
6390       #
6391       if test -d /sw/include ; then
6392         X_CFLAGS="-I/sw/include $X_CFLAGS"
6393         X_LIBS="-L/sw/lib $X_LIBS"
6394       fi
6395     ;;
6396   esac
6397 echo "$as_me:$LINENO: checking for XPointer" >&5
6398 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
6399 if test "${ac_cv_xpointer+set}" = set; then
6400   echo $ECHO_N "(cached) $ECHO_C" >&6
6401 else
6402
6403   ac_save_CPPFLAGS="$CPPFLAGS"
6404   if test \! -z "$includedir" ; then
6405     CPPFLAGS="$CPPFLAGS -I$includedir"
6406   fi
6407   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6408   cat >conftest.$ac_ext <<_ACEOF
6409 #line $LINENO "configure"
6410 /* confdefs.h.  */
6411 _ACEOF
6412 cat confdefs.h >>conftest.$ac_ext
6413 cat >>conftest.$ac_ext <<_ACEOF
6414 /* end confdefs.h.  */
6415 #include <X11/Xlib.h>
6416 int
6417 main ()
6418 {
6419 XPointer foo = (XPointer) 0;
6420   ;
6421   return 0;
6422 }
6423 _ACEOF
6424 rm -f conftest.$ac_objext
6425 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6426   (eval $ac_compile) 2>&5
6427   ac_status=$?
6428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6429   (exit $ac_status); } &&
6430          { ac_try='test -s conftest.$ac_objext'
6431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6432   (eval $ac_try) 2>&5
6433   ac_status=$?
6434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6435   (exit $ac_status); }; }; then
6436   ac_cv_xpointer=yes
6437 else
6438   echo "$as_me: failed program was:" >&5
6439 sed 's/^/| /' conftest.$ac_ext >&5
6440
6441 ac_cv_xpointer=no
6442 fi
6443 rm -f conftest.$ac_objext conftest.$ac_ext
6444   CPPFLAGS="$ac_save_CPPFLAGS"
6445 fi
6446 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
6447 echo "${ECHO_T}$ac_cv_xpointer" >&6
6448   if test "$ac_cv_xpointer" != yes; then
6449    cat >>confdefs.h <<\_ACEOF
6450 #define XPointer char*
6451 _ACEOF
6452
6453   fi
6454
6455 echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
6456 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6
6457   ac_macosx=no
6458   case "$host" in
6459     *-apple-darwin* )
6460       ac_macosx=yes
6461     ;;
6462   esac
6463 echo "$as_me:$LINENO: result: $ac_macosx" >&5
6464 echo "${ECHO_T}$ac_macosx" >&6
6465
6466
6467
6468 ###############################################################################
6469 #
6470 #       Gettext support
6471 #
6472 ###############################################################################
6473
6474
6475
6476 if test -n ""; then
6477     echo "$as_me:$LINENO: checking for intltool >= " >&5
6478 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
6479
6480     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
6481     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
6482
6483     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
6484
6485
6486     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
6487         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
6488 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
6489     else
6490         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
6491 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
6492         exit 1
6493     fi
6494 fi
6495
6496   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'
6497 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'
6498      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'
6499       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
6500      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'
6501    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'
6502     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'
6503 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'
6504        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'
6505       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'
6506     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'
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520 # Use the tools built into the package, not the ones that are installed.
6521
6522 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
6523 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
6524 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
6525
6526
6527
6528
6529
6530 # Extract the first word of "perl", so it can be a program name with args.
6531 set dummy perl; ac_word=$2
6532 echo "$as_me:$LINENO: checking for $ac_word" >&5
6533 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6534 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
6535   echo $ECHO_N "(cached) $ECHO_C" >&6
6536 else
6537   case $INTLTOOL_PERL in
6538   [\\/]* | ?:[\\/]*)
6539   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
6540   ;;
6541   *)
6542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6543 for as_dir in $PATH
6544 do
6545   IFS=$as_save_IFS
6546   test -z "$as_dir" && as_dir=.
6547   for ac_exec_ext in '' $ac_executable_extensions; do
6548   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6549     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
6550     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6551     break 2
6552   fi
6553 done
6554 done
6555
6556   ;;
6557 esac
6558 fi
6559 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
6560
6561 if test -n "$INTLTOOL_PERL"; then
6562   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
6563 echo "${ECHO_T}$INTLTOOL_PERL" >&6
6564 else
6565   echo "$as_me:$LINENO: result: no" >&5
6566 echo "${ECHO_T}no" >&6
6567 fi
6568
6569 if test -z "$INTLTOOL_PERL"; then
6570    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
6571 echo "$as_me: error: perl not found; required for intltool" >&2;}
6572    { (exit 1); exit 1; }; }
6573 fi
6574 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
6575    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
6576 echo "$as_me: error: perl 5.x required for intltool" >&2;}
6577    { (exit 1); exit 1; }; }
6578 fi
6579
6580 # Remove file type tags (using []) from po/POTFILES.
6581
6582
6583
6584
6585
6586
6587
6588 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
6589
6590           ac_config_commands="$ac_config_commands default-1"
6591
6592
6593
6594 GETTEXT_PACKAGE=xscreensaver
6595 cat >>confdefs.h <<_ACEOF
6596 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
6597 _ACEOF
6598
6599 cat >>confdefs.h <<_ACEOF
6600 #define PACKAGE "$GETTEXT_PACKAGE"
6601 _ACEOF
6602
6603
6604
6605 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"
6606 if test -n "$ac_tool_prefix"; then
6607   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6608 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6609 echo "$as_me:$LINENO: checking for $ac_word" >&5
6610 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6611 if test "${ac_cv_prog_RANLIB+set}" = set; then
6612   echo $ECHO_N "(cached) $ECHO_C" >&6
6613 else
6614   if test -n "$RANLIB"; then
6615   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6616 else
6617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6618 for as_dir in $PATH
6619 do
6620   IFS=$as_save_IFS
6621   test -z "$as_dir" && as_dir=.
6622   for ac_exec_ext in '' $ac_executable_extensions; do
6623   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6624     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6625     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6626     break 2
6627   fi
6628 done
6629 done
6630
6631 fi
6632 fi
6633 RANLIB=$ac_cv_prog_RANLIB
6634 if test -n "$RANLIB"; then
6635   echo "$as_me:$LINENO: result: $RANLIB" >&5
6636 echo "${ECHO_T}$RANLIB" >&6
6637 else
6638   echo "$as_me:$LINENO: result: no" >&5
6639 echo "${ECHO_T}no" >&6
6640 fi
6641
6642 fi
6643 if test -z "$ac_cv_prog_RANLIB"; then
6644   ac_ct_RANLIB=$RANLIB
6645   # Extract the first word of "ranlib", so it can be a program name with args.
6646 set dummy ranlib; ac_word=$2
6647 echo "$as_me:$LINENO: checking for $ac_word" >&5
6648 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6649 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6650   echo $ECHO_N "(cached) $ECHO_C" >&6
6651 else
6652   if test -n "$ac_ct_RANLIB"; then
6653   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6654 else
6655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6656 for as_dir in $PATH
6657 do
6658   IFS=$as_save_IFS
6659   test -z "$as_dir" && as_dir=.
6660   for ac_exec_ext in '' $ac_executable_extensions; do
6661   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6662     ac_cv_prog_ac_ct_RANLIB="ranlib"
6663     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6664     break 2
6665   fi
6666 done
6667 done
6668
6669   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6670 fi
6671 fi
6672 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6673 if test -n "$ac_ct_RANLIB"; then
6674   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6675 echo "${ECHO_T}$ac_ct_RANLIB" >&6
6676 else
6677   echo "$as_me:$LINENO: result: no" >&5
6678 echo "${ECHO_T}no" >&6
6679 fi
6680
6681   RANLIB=$ac_ct_RANLIB
6682 else
6683   RANLIB="$ac_cv_prog_RANLIB"
6684 fi
6685
6686 echo "$as_me:$LINENO: checking for off_t" >&5
6687 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
6688 if test "${ac_cv_type_off_t+set}" = set; then
6689   echo $ECHO_N "(cached) $ECHO_C" >&6
6690 else
6691   cat >conftest.$ac_ext <<_ACEOF
6692 #line $LINENO "configure"
6693 /* confdefs.h.  */
6694 _ACEOF
6695 cat confdefs.h >>conftest.$ac_ext
6696 cat >>conftest.$ac_ext <<_ACEOF
6697 /* end confdefs.h.  */
6698 $ac_includes_default
6699 int
6700 main ()
6701 {
6702 if ((off_t *) 0)
6703   return 0;
6704 if (sizeof (off_t))
6705   return 0;
6706   ;
6707   return 0;
6708 }
6709 _ACEOF
6710 rm -f conftest.$ac_objext
6711 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6712   (eval $ac_compile) 2>&5
6713   ac_status=$?
6714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715   (exit $ac_status); } &&
6716          { ac_try='test -s conftest.$ac_objext'
6717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6718   (eval $ac_try) 2>&5
6719   ac_status=$?
6720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6721   (exit $ac_status); }; }; then
6722   ac_cv_type_off_t=yes
6723 else
6724   echo "$as_me: failed program was:" >&5
6725 sed 's/^/| /' conftest.$ac_ext >&5
6726
6727 ac_cv_type_off_t=no
6728 fi
6729 rm -f conftest.$ac_objext conftest.$ac_ext
6730 fi
6731 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6732 echo "${ECHO_T}$ac_cv_type_off_t" >&6
6733 if test $ac_cv_type_off_t = yes; then
6734   :
6735 else
6736
6737 cat >>confdefs.h <<_ACEOF
6738 #define off_t long
6739 _ACEOF
6740
6741 fi
6742
6743 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6744 # for constant arguments.  Useless!
6745 echo "$as_me:$LINENO: checking for working alloca.h" >&5
6746 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
6747 if test "${ac_cv_working_alloca_h+set}" = set; then
6748   echo $ECHO_N "(cached) $ECHO_C" >&6
6749 else
6750   cat >conftest.$ac_ext <<_ACEOF
6751 #line $LINENO "configure"
6752 /* confdefs.h.  */
6753 _ACEOF
6754 cat confdefs.h >>conftest.$ac_ext
6755 cat >>conftest.$ac_ext <<_ACEOF
6756 /* end confdefs.h.  */
6757 #include <alloca.h>
6758 int
6759 main ()
6760 {
6761 char *p = (char *) alloca (2 * sizeof (int));
6762   ;
6763   return 0;
6764 }
6765 _ACEOF
6766 rm -f conftest.$ac_objext conftest$ac_exeext
6767 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6768   (eval $ac_link) 2>&5
6769   ac_status=$?
6770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6771   (exit $ac_status); } &&
6772          { ac_try='test -s conftest$ac_exeext'
6773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6774   (eval $ac_try) 2>&5
6775   ac_status=$?
6776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6777   (exit $ac_status); }; }; then
6778   ac_cv_working_alloca_h=yes
6779 else
6780   echo "$as_me: failed program was:" >&5
6781 sed 's/^/| /' conftest.$ac_ext >&5
6782
6783 ac_cv_working_alloca_h=no
6784 fi
6785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6786 fi
6787 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
6788 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
6789 if test $ac_cv_working_alloca_h = yes; then
6790
6791 cat >>confdefs.h <<\_ACEOF
6792 #define HAVE_ALLOCA_H 1
6793 _ACEOF
6794
6795 fi
6796
6797 echo "$as_me:$LINENO: checking for alloca" >&5
6798 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
6799 if test "${ac_cv_func_alloca_works+set}" = set; then
6800   echo $ECHO_N "(cached) $ECHO_C" >&6
6801 else
6802   cat >conftest.$ac_ext <<_ACEOF
6803 #line $LINENO "configure"
6804 /* confdefs.h.  */
6805 _ACEOF
6806 cat confdefs.h >>conftest.$ac_ext
6807 cat >>conftest.$ac_ext <<_ACEOF
6808 /* end confdefs.h.  */
6809 #ifdef __GNUC__
6810 # define alloca __builtin_alloca
6811 #else
6812 # ifdef _MSC_VER
6813 #  include <malloc.h>
6814 #  define alloca _alloca
6815 # else
6816 #  if HAVE_ALLOCA_H
6817 #   include <alloca.h>
6818 #  else
6819 #   ifdef _AIX
6820  #pragma alloca
6821 #   else
6822 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6823 char *alloca ();
6824 #    endif
6825 #   endif
6826 #  endif
6827 # endif
6828 #endif
6829
6830 int
6831 main ()
6832 {
6833 char *p = (char *) alloca (1);
6834   ;
6835   return 0;
6836 }
6837 _ACEOF
6838 rm -f conftest.$ac_objext conftest$ac_exeext
6839 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6840   (eval $ac_link) 2>&5
6841   ac_status=$?
6842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6843   (exit $ac_status); } &&
6844          { ac_try='test -s conftest$ac_exeext'
6845   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6846   (eval $ac_try) 2>&5
6847   ac_status=$?
6848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6849   (exit $ac_status); }; }; then
6850   ac_cv_func_alloca_works=yes
6851 else
6852   echo "$as_me: failed program was:" >&5
6853 sed 's/^/| /' conftest.$ac_ext >&5
6854
6855 ac_cv_func_alloca_works=no
6856 fi
6857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6858 fi
6859 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
6860 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
6861
6862 if test $ac_cv_func_alloca_works = yes; then
6863
6864 cat >>confdefs.h <<\_ACEOF
6865 #define HAVE_ALLOCA 1
6866 _ACEOF
6867
6868 else
6869   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6870 # that cause trouble.  Some versions do not even contain alloca or
6871 # contain a buggy version.  If you still want to use their alloca,
6872 # use ar to extract alloca.o from them instead of compiling alloca.c.
6873
6874 ALLOCA=alloca.$ac_objext
6875
6876 cat >>confdefs.h <<\_ACEOF
6877 #define C_ALLOCA 1
6878 _ACEOF
6879
6880
6881 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
6882 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
6883 if test "${ac_cv_os_cray+set}" = set; then
6884   echo $ECHO_N "(cached) $ECHO_C" >&6
6885 else
6886   cat >conftest.$ac_ext <<_ACEOF
6887 #line $LINENO "configure"
6888 /* confdefs.h.  */
6889 _ACEOF
6890 cat confdefs.h >>conftest.$ac_ext
6891 cat >>conftest.$ac_ext <<_ACEOF
6892 /* end confdefs.h.  */
6893 #if defined(CRAY) && ! defined(CRAY2)
6894 webecray
6895 #else
6896 wenotbecray
6897 #endif
6898
6899 _ACEOF
6900 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6901   $EGREP "webecray" >/dev/null 2>&1; then
6902   ac_cv_os_cray=yes
6903 else
6904   ac_cv_os_cray=no
6905 fi
6906 rm -f conftest*
6907
6908 fi
6909 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
6910 echo "${ECHO_T}$ac_cv_os_cray" >&6
6911 if test $ac_cv_os_cray = yes; then
6912   for ac_func in _getb67 GETB67 getb67; do
6913     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6914 echo "$as_me:$LINENO: checking for $ac_func" >&5
6915 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6916 if eval "test \"\${$as_ac_var+set}\" = set"; then
6917   echo $ECHO_N "(cached) $ECHO_C" >&6
6918 else
6919   cat >conftest.$ac_ext <<_ACEOF
6920 #line $LINENO "configure"
6921 /* confdefs.h.  */
6922 _ACEOF
6923 cat confdefs.h >>conftest.$ac_ext
6924 cat >>conftest.$ac_ext <<_ACEOF
6925 /* end confdefs.h.  */
6926 /* System header to define __stub macros and hopefully few prototypes,
6927     which can conflict with char $ac_func (); below.
6928     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6929     <limits.h> exists even on freestanding compilers.  */
6930 #ifdef __STDC__
6931 # include <limits.h>
6932 #else
6933 # include <assert.h>
6934 #endif
6935 /* Override any gcc2 internal prototype to avoid an error.  */
6936 #ifdef __cplusplus
6937 extern "C"
6938 {
6939 #endif
6940 /* We use char because int might match the return type of a gcc2
6941    builtin and then its argument prototype would still apply.  */
6942 char $ac_func ();
6943 /* The GNU C library defines this for functions which it implements
6944     to always fail with ENOSYS.  Some functions are actually named
6945     something starting with __ and the normal name is an alias.  */
6946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6947 choke me
6948 #else
6949 char (*f) () = $ac_func;
6950 #endif
6951 #ifdef __cplusplus
6952 }
6953 #endif
6954
6955 int
6956 main ()
6957 {
6958 return f != $ac_func;
6959   ;
6960   return 0;
6961 }
6962 _ACEOF
6963 rm -f conftest.$ac_objext conftest$ac_exeext
6964 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6965   (eval $ac_link) 2>&5
6966   ac_status=$?
6967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6968   (exit $ac_status); } &&
6969          { ac_try='test -s conftest$ac_exeext'
6970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6971   (eval $ac_try) 2>&5
6972   ac_status=$?
6973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6974   (exit $ac_status); }; }; then
6975   eval "$as_ac_var=yes"
6976 else
6977   echo "$as_me: failed program was:" >&5
6978 sed 's/^/| /' conftest.$ac_ext >&5
6979
6980 eval "$as_ac_var=no"
6981 fi
6982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6983 fi
6984 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6985 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6986 if test `eval echo '${'$as_ac_var'}'` = yes; then
6987
6988 cat >>confdefs.h <<_ACEOF
6989 #define CRAY_STACKSEG_END $ac_func
6990 _ACEOF
6991
6992     break
6993 fi
6994
6995   done
6996 fi
6997
6998 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
6999 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7000 if test "${ac_cv_c_stack_direction+set}" = set; then
7001   echo $ECHO_N "(cached) $ECHO_C" >&6
7002 else
7003   if test "$cross_compiling" = yes; then
7004   ac_cv_c_stack_direction=0
7005 else
7006   cat >conftest.$ac_ext <<_ACEOF
7007 #line $LINENO "configure"
7008 /* confdefs.h.  */
7009 _ACEOF
7010 cat confdefs.h >>conftest.$ac_ext
7011 cat >>conftest.$ac_ext <<_ACEOF
7012 /* end confdefs.h.  */
7013 int
7014 find_stack_direction ()
7015 {
7016   static char *addr = 0;
7017   auto char dummy;
7018   if (addr == 0)
7019     {
7020       addr = &dummy;
7021       return find_stack_direction ();
7022     }
7023   else
7024     return (&dummy > addr) ? 1 : -1;
7025 }
7026
7027 int
7028 main ()
7029 {
7030   exit (find_stack_direction () < 0);
7031 }
7032 _ACEOF
7033 rm -f conftest$ac_exeext
7034 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7035   (eval $ac_link) 2>&5
7036   ac_status=$?
7037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7038   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7040   (eval $ac_try) 2>&5
7041   ac_status=$?
7042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7043   (exit $ac_status); }; }; then
7044   ac_cv_c_stack_direction=1
7045 else
7046   echo "$as_me: program exited with status $ac_status" >&5
7047 echo "$as_me: failed program was:" >&5
7048 sed 's/^/| /' conftest.$ac_ext >&5
7049
7050 ( exit $ac_status )
7051 ac_cv_c_stack_direction=-1
7052 fi
7053 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7054 fi
7055 fi
7056 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
7057 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
7058
7059 cat >>confdefs.h <<_ACEOF
7060 #define STACK_DIRECTION $ac_cv_c_stack_direction
7061 _ACEOF
7062
7063
7064 fi
7065
7066
7067
7068 for ac_header in stdlib.h unistd.h
7069 do
7070 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7071 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7072   echo "$as_me:$LINENO: checking for $ac_header" >&5
7073 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7074 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7075   echo $ECHO_N "(cached) $ECHO_C" >&6
7076 fi
7077 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7078 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7079 else
7080   # Is the header compilable?
7081 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7082 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7083 cat >conftest.$ac_ext <<_ACEOF
7084 #line $LINENO "configure"
7085 /* confdefs.h.  */
7086 _ACEOF
7087 cat confdefs.h >>conftest.$ac_ext
7088 cat >>conftest.$ac_ext <<_ACEOF
7089 /* end confdefs.h.  */
7090 $ac_includes_default
7091 #include <$ac_header>
7092 _ACEOF
7093 rm -f conftest.$ac_objext
7094 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7095   (eval $ac_compile) 2>&5
7096   ac_status=$?
7097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7098   (exit $ac_status); } &&
7099          { ac_try='test -s conftest.$ac_objext'
7100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7101   (eval $ac_try) 2>&5
7102   ac_status=$?
7103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7104   (exit $ac_status); }; }; then
7105   ac_header_compiler=yes
7106 else
7107   echo "$as_me: failed program was:" >&5
7108 sed 's/^/| /' conftest.$ac_ext >&5
7109
7110 ac_header_compiler=no
7111 fi
7112 rm -f conftest.$ac_objext conftest.$ac_ext
7113 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7114 echo "${ECHO_T}$ac_header_compiler" >&6
7115
7116 # Is the header present?
7117 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7118 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7119 cat >conftest.$ac_ext <<_ACEOF
7120 #line $LINENO "configure"
7121 /* confdefs.h.  */
7122 _ACEOF
7123 cat confdefs.h >>conftest.$ac_ext
7124 cat >>conftest.$ac_ext <<_ACEOF
7125 /* end confdefs.h.  */
7126 #include <$ac_header>
7127 _ACEOF
7128 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7129   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7130   ac_status=$?
7131   grep -v '^ *+' conftest.er1 >conftest.err
7132   rm -f conftest.er1
7133   cat conftest.err >&5
7134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7135   (exit $ac_status); } >/dev/null; then
7136   if test -s conftest.err; then
7137     ac_cpp_err=$ac_c_preproc_warn_flag
7138   else
7139     ac_cpp_err=
7140   fi
7141 else
7142   ac_cpp_err=yes
7143 fi
7144 if test -z "$ac_cpp_err"; then
7145   ac_header_preproc=yes
7146 else
7147   echo "$as_me: failed program was:" >&5
7148 sed 's/^/| /' conftest.$ac_ext >&5
7149
7150   ac_header_preproc=no
7151 fi
7152 rm -f conftest.err conftest.$ac_ext
7153 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7154 echo "${ECHO_T}$ac_header_preproc" >&6
7155
7156 # So?  What about this header?
7157 case $ac_header_compiler:$ac_header_preproc in
7158   yes:no )
7159     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7160 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7161     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7162 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7163     (
7164       cat <<\_ASBOX
7165 ## ------------------------------------ ##
7166 ## Report this to bug-autoconf@gnu.org. ##
7167 ## ------------------------------------ ##
7168 _ASBOX
7169     ) |
7170       sed "s/^/$as_me: WARNING:     /" >&2
7171     ;;
7172   no:yes )
7173     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7174 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7175     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7176 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7177     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7178 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7179     (
7180       cat <<\_ASBOX
7181 ## ------------------------------------ ##
7182 ## Report this to bug-autoconf@gnu.org. ##
7183 ## ------------------------------------ ##
7184 _ASBOX
7185     ) |
7186       sed "s/^/$as_me: WARNING:     /" >&2
7187     ;;
7188 esac
7189 echo "$as_me:$LINENO: checking for $ac_header" >&5
7190 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7191 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7192   echo $ECHO_N "(cached) $ECHO_C" >&6
7193 else
7194   eval "$as_ac_Header=$ac_header_preproc"
7195 fi
7196 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7197 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7198
7199 fi
7200 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7201   cat >>confdefs.h <<_ACEOF
7202 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7203 _ACEOF
7204
7205 fi
7206
7207 done
7208
7209
7210 for ac_func in getpagesize
7211 do
7212 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7213 echo "$as_me:$LINENO: checking for $ac_func" >&5
7214 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7215 if eval "test \"\${$as_ac_var+set}\" = set"; then
7216   echo $ECHO_N "(cached) $ECHO_C" >&6
7217 else
7218   cat >conftest.$ac_ext <<_ACEOF
7219 #line $LINENO "configure"
7220 /* confdefs.h.  */
7221 _ACEOF
7222 cat confdefs.h >>conftest.$ac_ext
7223 cat >>conftest.$ac_ext <<_ACEOF
7224 /* end confdefs.h.  */
7225 /* System header to define __stub macros and hopefully few prototypes,
7226     which can conflict with char $ac_func (); below.
7227     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7228     <limits.h> exists even on freestanding compilers.  */
7229 #ifdef __STDC__
7230 # include <limits.h>
7231 #else
7232 # include <assert.h>
7233 #endif
7234 /* Override any gcc2 internal prototype to avoid an error.  */
7235 #ifdef __cplusplus
7236 extern "C"
7237 {
7238 #endif
7239 /* We use char because int might match the return type of a gcc2
7240    builtin and then its argument prototype would still apply.  */
7241 char $ac_func ();
7242 /* The GNU C library defines this for functions which it implements
7243     to always fail with ENOSYS.  Some functions are actually named
7244     something starting with __ and the normal name is an alias.  */
7245 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7246 choke me
7247 #else
7248 char (*f) () = $ac_func;
7249 #endif
7250 #ifdef __cplusplus
7251 }
7252 #endif
7253
7254 int
7255 main ()
7256 {
7257 return f != $ac_func;
7258   ;
7259   return 0;
7260 }
7261 _ACEOF
7262 rm -f conftest.$ac_objext conftest$ac_exeext
7263 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7264   (eval $ac_link) 2>&5
7265   ac_status=$?
7266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7267   (exit $ac_status); } &&
7268          { ac_try='test -s conftest$ac_exeext'
7269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7270   (eval $ac_try) 2>&5
7271   ac_status=$?
7272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7273   (exit $ac_status); }; }; then
7274   eval "$as_ac_var=yes"
7275 else
7276   echo "$as_me: failed program was:" >&5
7277 sed 's/^/| /' conftest.$ac_ext >&5
7278
7279 eval "$as_ac_var=no"
7280 fi
7281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7282 fi
7283 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7284 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7285 if test `eval echo '${'$as_ac_var'}'` = yes; then
7286   cat >>confdefs.h <<_ACEOF
7287 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7288 _ACEOF
7289
7290 fi
7291 done
7292
7293 echo "$as_me:$LINENO: checking for working mmap" >&5
7294 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7295 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7296   echo $ECHO_N "(cached) $ECHO_C" >&6
7297 else
7298   if test "$cross_compiling" = yes; then
7299   ac_cv_func_mmap_fixed_mapped=no
7300 else
7301   cat >conftest.$ac_ext <<_ACEOF
7302 #line $LINENO "configure"
7303 /* confdefs.h.  */
7304 _ACEOF
7305 cat confdefs.h >>conftest.$ac_ext
7306 cat >>conftest.$ac_ext <<_ACEOF
7307 /* end confdefs.h.  */
7308 $ac_includes_default
7309 /* malloc might have been renamed as rpl_malloc. */
7310 #undef malloc
7311
7312 /* Thanks to Mike Haertel and Jim Avera for this test.
7313    Here is a matrix of mmap possibilities:
7314         mmap private not fixed
7315         mmap private fixed at somewhere currently unmapped
7316         mmap private fixed at somewhere already mapped
7317         mmap shared not fixed
7318         mmap shared fixed at somewhere currently unmapped
7319         mmap shared fixed at somewhere already mapped
7320    For private mappings, we should verify that changes cannot be read()
7321    back from the file, nor mmap's back from the file at a different
7322    address.  (There have been systems where private was not correctly
7323    implemented like the infamous i386 svr4.0, and systems where the
7324    VM page cache was not coherent with the file system buffer cache
7325    like early versions of FreeBSD and possibly contemporary NetBSD.)
7326    For shared mappings, we should conversely verify that changes get
7327    propagated back to all the places they're supposed to be.
7328
7329    Grep wants private fixed already mapped.
7330    The main things grep needs to know about mmap are:
7331    * does it exist and is it safe to write into the mmap'd area
7332    * how to use it (BSD variants)  */
7333
7334 #include <fcntl.h>
7335 #include <sys/mman.h>
7336
7337 #if !STDC_HEADERS && !HAVE_STDLIB_H
7338 char *malloc ();
7339 #endif
7340
7341 /* This mess was copied from the GNU getpagesize.h.  */
7342 #if !HAVE_GETPAGESIZE
7343 /* Assume that all systems that can run configure have sys/param.h.  */
7344 # if !HAVE_SYS_PARAM_H
7345 #  define HAVE_SYS_PARAM_H 1
7346 # endif
7347
7348 # ifdef _SC_PAGESIZE
7349 #  define getpagesize() sysconf(_SC_PAGESIZE)
7350 # else /* no _SC_PAGESIZE */
7351 #  if HAVE_SYS_PARAM_H
7352 #   include <sys/param.h>
7353 #   ifdef EXEC_PAGESIZE
7354 #    define getpagesize() EXEC_PAGESIZE
7355 #   else /* no EXEC_PAGESIZE */
7356 #    ifdef NBPG
7357 #     define getpagesize() NBPG * CLSIZE
7358 #     ifndef CLSIZE
7359 #      define CLSIZE 1
7360 #     endif /* no CLSIZE */
7361 #    else /* no NBPG */
7362 #     ifdef NBPC
7363 #      define getpagesize() NBPC
7364 #     else /* no NBPC */
7365 #      ifdef PAGESIZE
7366 #       define getpagesize() PAGESIZE
7367 #      endif /* PAGESIZE */
7368 #     endif /* no NBPC */
7369 #    endif /* no NBPG */
7370 #   endif /* no EXEC_PAGESIZE */
7371 #  else /* no HAVE_SYS_PARAM_H */
7372 #   define getpagesize() 8192   /* punt totally */
7373 #  endif /* no HAVE_SYS_PARAM_H */
7374 # endif /* no _SC_PAGESIZE */
7375
7376 #endif /* no HAVE_GETPAGESIZE */
7377
7378 int
7379 main ()
7380 {
7381   char *data, *data2, *data3;
7382   int i, pagesize;
7383   int fd;
7384
7385   pagesize = getpagesize ();
7386
7387   /* First, make a file with some known garbage in it. */
7388   data = (char *) malloc (pagesize);
7389   if (!data)
7390     exit (1);
7391   for (i = 0; i < pagesize; ++i)
7392     *(data + i) = rand ();
7393   umask (0);
7394   fd = creat ("conftest.mmap", 0600);
7395   if (fd < 0)
7396     exit (1);
7397   if (write (fd, data, pagesize) != pagesize)
7398     exit (1);
7399   close (fd);
7400
7401   /* Next, try to mmap the file at a fixed address which already has
7402      something else allocated at it.  If we can, also make sure that
7403      we see the same garbage.  */
7404   fd = open ("conftest.mmap", O_RDWR);
7405   if (fd < 0)
7406     exit (1);
7407   data2 = (char *) malloc (2 * pagesize);
7408   if (!data2)
7409     exit (1);
7410   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7411   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7412                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
7413     exit (1);
7414   for (i = 0; i < pagesize; ++i)
7415     if (*(data + i) != *(data2 + i))
7416       exit (1);
7417
7418   /* Finally, make sure that changes to the mapped area do not
7419      percolate back to the file as seen by read().  (This is a bug on
7420      some variants of i386 svr4.0.)  */
7421   for (i = 0; i < pagesize; ++i)
7422     *(data2 + i) = *(data2 + i) + 1;
7423   data3 = (char *) malloc (pagesize);
7424   if (!data3)
7425     exit (1);
7426   if (read (fd, data3, pagesize) != pagesize)
7427     exit (1);
7428   for (i = 0; i < pagesize; ++i)
7429     if (*(data + i) != *(data3 + i))
7430       exit (1);
7431   close (fd);
7432   exit (0);
7433 }
7434 _ACEOF
7435 rm -f conftest$ac_exeext
7436 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7437   (eval $ac_link) 2>&5
7438   ac_status=$?
7439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7440   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7442   (eval $ac_try) 2>&5
7443   ac_status=$?
7444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7445   (exit $ac_status); }; }; then
7446   ac_cv_func_mmap_fixed_mapped=yes
7447 else
7448   echo "$as_me: program exited with status $ac_status" >&5
7449 echo "$as_me: failed program was:" >&5
7450 sed 's/^/| /' conftest.$ac_ext >&5
7451
7452 ( exit $ac_status )
7453 ac_cv_func_mmap_fixed_mapped=no
7454 fi
7455 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7456 fi
7457 fi
7458 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
7459 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7460 if test $ac_cv_func_mmap_fixed_mapped = yes; then
7461
7462 cat >>confdefs.h <<\_ACEOF
7463 #define HAVE_MMAP 1
7464 _ACEOF
7465
7466 fi
7467 rm -f conftest.mmap
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
7479 unistd.h sys/param.h
7480 do
7481 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7482 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7483   echo "$as_me:$LINENO: checking for $ac_header" >&5
7484 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7485 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7486   echo $ECHO_N "(cached) $ECHO_C" >&6
7487 fi
7488 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7489 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7490 else
7491   # Is the header compilable?
7492 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7493 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7494 cat >conftest.$ac_ext <<_ACEOF
7495 #line $LINENO "configure"
7496 /* confdefs.h.  */
7497 _ACEOF
7498 cat confdefs.h >>conftest.$ac_ext
7499 cat >>conftest.$ac_ext <<_ACEOF
7500 /* end confdefs.h.  */
7501 $ac_includes_default
7502 #include <$ac_header>
7503 _ACEOF
7504 rm -f conftest.$ac_objext
7505 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7506   (eval $ac_compile) 2>&5
7507   ac_status=$?
7508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7509   (exit $ac_status); } &&
7510          { ac_try='test -s conftest.$ac_objext'
7511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7512   (eval $ac_try) 2>&5
7513   ac_status=$?
7514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7515   (exit $ac_status); }; }; then
7516   ac_header_compiler=yes
7517 else
7518   echo "$as_me: failed program was:" >&5
7519 sed 's/^/| /' conftest.$ac_ext >&5
7520
7521 ac_header_compiler=no
7522 fi
7523 rm -f conftest.$ac_objext conftest.$ac_ext
7524 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7525 echo "${ECHO_T}$ac_header_compiler" >&6
7526
7527 # Is the header present?
7528 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7529 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7530 cat >conftest.$ac_ext <<_ACEOF
7531 #line $LINENO "configure"
7532 /* confdefs.h.  */
7533 _ACEOF
7534 cat confdefs.h >>conftest.$ac_ext
7535 cat >>conftest.$ac_ext <<_ACEOF
7536 /* end confdefs.h.  */
7537 #include <$ac_header>
7538 _ACEOF
7539 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7540   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7541   ac_status=$?
7542   grep -v '^ *+' conftest.er1 >conftest.err
7543   rm -f conftest.er1
7544   cat conftest.err >&5
7545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7546   (exit $ac_status); } >/dev/null; then
7547   if test -s conftest.err; then
7548     ac_cpp_err=$ac_c_preproc_warn_flag
7549   else
7550     ac_cpp_err=
7551   fi
7552 else
7553   ac_cpp_err=yes
7554 fi
7555 if test -z "$ac_cpp_err"; then
7556   ac_header_preproc=yes
7557 else
7558   echo "$as_me: failed program was:" >&5
7559 sed 's/^/| /' conftest.$ac_ext >&5
7560
7561   ac_header_preproc=no
7562 fi
7563 rm -f conftest.err conftest.$ac_ext
7564 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7565 echo "${ECHO_T}$ac_header_preproc" >&6
7566
7567 # So?  What about this header?
7568 case $ac_header_compiler:$ac_header_preproc in
7569   yes:no )
7570     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7571 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7572     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7573 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7574     (
7575       cat <<\_ASBOX
7576 ## ------------------------------------ ##
7577 ## Report this to bug-autoconf@gnu.org. ##
7578 ## ------------------------------------ ##
7579 _ASBOX
7580     ) |
7581       sed "s/^/$as_me: WARNING:     /" >&2
7582     ;;
7583   no:yes )
7584     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7585 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7586     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7587 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7588     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7589 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7590     (
7591       cat <<\_ASBOX
7592 ## ------------------------------------ ##
7593 ## Report this to bug-autoconf@gnu.org. ##
7594 ## ------------------------------------ ##
7595 _ASBOX
7596     ) |
7597       sed "s/^/$as_me: WARNING:     /" >&2
7598     ;;
7599 esac
7600 echo "$as_me:$LINENO: checking for $ac_header" >&5
7601 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7602 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7603   echo $ECHO_N "(cached) $ECHO_C" >&6
7604 else
7605   eval "$as_ac_Header=$ac_header_preproc"
7606 fi
7607 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7608 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7609
7610 fi
7611 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7612   cat >>confdefs.h <<_ACEOF
7613 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7614 _ACEOF
7615
7616 fi
7617
7618 done
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
7632 strdup __argz_count __argz_stringify __argz_next
7633 do
7634 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7635 echo "$as_me:$LINENO: checking for $ac_func" >&5
7636 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7637 if eval "test \"\${$as_ac_var+set}\" = set"; then
7638   echo $ECHO_N "(cached) $ECHO_C" >&6
7639 else
7640   cat >conftest.$ac_ext <<_ACEOF
7641 #line $LINENO "configure"
7642 /* confdefs.h.  */
7643 _ACEOF
7644 cat confdefs.h >>conftest.$ac_ext
7645 cat >>conftest.$ac_ext <<_ACEOF
7646 /* end confdefs.h.  */
7647 /* System header to define __stub macros and hopefully few prototypes,
7648     which can conflict with char $ac_func (); below.
7649     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7650     <limits.h> exists even on freestanding compilers.  */
7651 #ifdef __STDC__
7652 # include <limits.h>
7653 #else
7654 # include <assert.h>
7655 #endif
7656 /* Override any gcc2 internal prototype to avoid an error.  */
7657 #ifdef __cplusplus
7658 extern "C"
7659 {
7660 #endif
7661 /* We use char because int might match the return type of a gcc2
7662    builtin and then its argument prototype would still apply.  */
7663 char $ac_func ();
7664 /* The GNU C library defines this for functions which it implements
7665     to always fail with ENOSYS.  Some functions are actually named
7666     something starting with __ and the normal name is an alias.  */
7667 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7668 choke me
7669 #else
7670 char (*f) () = $ac_func;
7671 #endif
7672 #ifdef __cplusplus
7673 }
7674 #endif
7675
7676 int
7677 main ()
7678 {
7679 return f != $ac_func;
7680   ;
7681   return 0;
7682 }
7683 _ACEOF
7684 rm -f conftest.$ac_objext conftest$ac_exeext
7685 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7686   (eval $ac_link) 2>&5
7687   ac_status=$?
7688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7689   (exit $ac_status); } &&
7690          { ac_try='test -s conftest$ac_exeext'
7691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7692   (eval $ac_try) 2>&5
7693   ac_status=$?
7694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7695   (exit $ac_status); }; }; then
7696   eval "$as_ac_var=yes"
7697 else
7698   echo "$as_me: failed program was:" >&5
7699 sed 's/^/| /' conftest.$ac_ext >&5
7700
7701 eval "$as_ac_var=no"
7702 fi
7703 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7704 fi
7705 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7706 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7707 if test `eval echo '${'$as_ac_var'}'` = yes; then
7708   cat >>confdefs.h <<_ACEOF
7709 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7710 _ACEOF
7711
7712 fi
7713 done
7714
7715
7716    if test $ac_cv_header_locale_h = yes; then
7717     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
7718 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7719 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7720   echo $ECHO_N "(cached) $ECHO_C" >&6
7721 else
7722   cat >conftest.$ac_ext <<_ACEOF
7723 #line $LINENO "configure"
7724 /* confdefs.h.  */
7725 _ACEOF
7726 cat confdefs.h >>conftest.$ac_ext
7727 cat >>conftest.$ac_ext <<_ACEOF
7728 /* end confdefs.h.  */
7729 #include <locale.h>
7730 int
7731 main ()
7732 {
7733 return LC_MESSAGES
7734   ;
7735   return 0;
7736 }
7737 _ACEOF
7738 rm -f conftest.$ac_objext conftest$ac_exeext
7739 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7740   (eval $ac_link) 2>&5
7741   ac_status=$?
7742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7743   (exit $ac_status); } &&
7744          { ac_try='test -s conftest$ac_exeext'
7745   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7746   (eval $ac_try) 2>&5
7747   ac_status=$?
7748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7749   (exit $ac_status); }; }; then
7750   am_cv_val_LC_MESSAGES=yes
7751 else
7752   echo "$as_me: failed program was:" >&5
7753 sed 's/^/| /' conftest.$ac_ext >&5
7754
7755 am_cv_val_LC_MESSAGES=no
7756 fi
7757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7758 fi
7759 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
7760 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
7761     if test $am_cv_val_LC_MESSAGES = yes; then
7762
7763 cat >>confdefs.h <<\_ACEOF
7764 #define HAVE_LC_MESSAGES 1
7765 _ACEOF
7766
7767     fi
7768   fi
7769      USE_NLS=yes
7770
7771
7772         nls_cv_force_use_gnu_gettext="no"
7773
7774     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7775     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7776                               nls_cv_header_intl=
7777       nls_cv_header_libgt=
7778       CATOBJEXT=NONE
7779
7780       if test "${ac_cv_header_libintl_h+set}" = set; then
7781   echo "$as_me:$LINENO: checking for libintl.h" >&5
7782 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7783 if test "${ac_cv_header_libintl_h+set}" = set; then
7784   echo $ECHO_N "(cached) $ECHO_C" >&6
7785 fi
7786 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7787 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7788 else
7789   # Is the header compilable?
7790 echo "$as_me:$LINENO: checking libintl.h usability" >&5
7791 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
7792 cat >conftest.$ac_ext <<_ACEOF
7793 #line $LINENO "configure"
7794 /* confdefs.h.  */
7795 _ACEOF
7796 cat confdefs.h >>conftest.$ac_ext
7797 cat >>conftest.$ac_ext <<_ACEOF
7798 /* end confdefs.h.  */
7799 $ac_includes_default
7800 #include <libintl.h>
7801 _ACEOF
7802 rm -f conftest.$ac_objext
7803 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7804   (eval $ac_compile) 2>&5
7805   ac_status=$?
7806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7807   (exit $ac_status); } &&
7808          { ac_try='test -s conftest.$ac_objext'
7809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7810   (eval $ac_try) 2>&5
7811   ac_status=$?
7812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7813   (exit $ac_status); }; }; then
7814   ac_header_compiler=yes
7815 else
7816   echo "$as_me: failed program was:" >&5
7817 sed 's/^/| /' conftest.$ac_ext >&5
7818
7819 ac_header_compiler=no
7820 fi
7821 rm -f conftest.$ac_objext conftest.$ac_ext
7822 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7823 echo "${ECHO_T}$ac_header_compiler" >&6
7824
7825 # Is the header present?
7826 echo "$as_me:$LINENO: checking libintl.h presence" >&5
7827 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
7828 cat >conftest.$ac_ext <<_ACEOF
7829 #line $LINENO "configure"
7830 /* confdefs.h.  */
7831 _ACEOF
7832 cat confdefs.h >>conftest.$ac_ext
7833 cat >>conftest.$ac_ext <<_ACEOF
7834 /* end confdefs.h.  */
7835 #include <libintl.h>
7836 _ACEOF
7837 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7838   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7839   ac_status=$?
7840   grep -v '^ *+' conftest.er1 >conftest.err
7841   rm -f conftest.er1
7842   cat conftest.err >&5
7843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7844   (exit $ac_status); } >/dev/null; then
7845   if test -s conftest.err; then
7846     ac_cpp_err=$ac_c_preproc_warn_flag
7847   else
7848     ac_cpp_err=
7849   fi
7850 else
7851   ac_cpp_err=yes
7852 fi
7853 if test -z "$ac_cpp_err"; then
7854   ac_header_preproc=yes
7855 else
7856   echo "$as_me: failed program was:" >&5
7857 sed 's/^/| /' conftest.$ac_ext >&5
7858
7859   ac_header_preproc=no
7860 fi
7861 rm -f conftest.err conftest.$ac_ext
7862 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7863 echo "${ECHO_T}$ac_header_preproc" >&6
7864
7865 # So?  What about this header?
7866 case $ac_header_compiler:$ac_header_preproc in
7867   yes:no )
7868     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
7869 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7870     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7871 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
7872     (
7873       cat <<\_ASBOX
7874 ## ------------------------------------ ##
7875 ## Report this to bug-autoconf@gnu.org. ##
7876 ## ------------------------------------ ##
7877 _ASBOX
7878     ) |
7879       sed "s/^/$as_me: WARNING:     /" >&2
7880     ;;
7881   no:yes )
7882     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
7883 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
7884     { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
7885 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
7886     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7887 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
7888     (
7889       cat <<\_ASBOX
7890 ## ------------------------------------ ##
7891 ## Report this to bug-autoconf@gnu.org. ##
7892 ## ------------------------------------ ##
7893 _ASBOX
7894     ) |
7895       sed "s/^/$as_me: WARNING:     /" >&2
7896     ;;
7897 esac
7898 echo "$as_me:$LINENO: checking for libintl.h" >&5
7899 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7900 if test "${ac_cv_header_libintl_h+set}" = set; then
7901   echo $ECHO_N "(cached) $ECHO_C" >&6
7902 else
7903   ac_cv_header_libintl_h=$ac_header_preproc
7904 fi
7905 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7906 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7907
7908 fi
7909 if test $ac_cv_header_libintl_h = yes; then
7910   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
7911 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
7912 if test "${gt_cv_func_dgettext_libc+set}" = set; then
7913   echo $ECHO_N "(cached) $ECHO_C" >&6
7914 else
7915   cat >conftest.$ac_ext <<_ACEOF
7916 #line $LINENO "configure"
7917 /* confdefs.h.  */
7918 _ACEOF
7919 cat confdefs.h >>conftest.$ac_ext
7920 cat >>conftest.$ac_ext <<_ACEOF
7921 /* end confdefs.h.  */
7922 #include <libintl.h>
7923 int
7924 main ()
7925 {
7926 return (int) dgettext ("","")
7927   ;
7928   return 0;
7929 }
7930 _ACEOF
7931 rm -f conftest.$ac_objext conftest$ac_exeext
7932 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7933   (eval $ac_link) 2>&5
7934   ac_status=$?
7935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7936   (exit $ac_status); } &&
7937          { ac_try='test -s conftest$ac_exeext'
7938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7939   (eval $ac_try) 2>&5
7940   ac_status=$?
7941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7942   (exit $ac_status); }; }; then
7943   gt_cv_func_dgettext_libc=yes
7944 else
7945   echo "$as_me: failed program was:" >&5
7946 sed 's/^/| /' conftest.$ac_ext >&5
7947
7948 gt_cv_func_dgettext_libc=no
7949 fi
7950 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7951 fi
7952 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
7953 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
7954
7955           if test "$gt_cv_func_dgettext_libc" != "yes"; then
7956             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
7957 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
7958 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
7959   echo $ECHO_N "(cached) $ECHO_C" >&6
7960 else
7961   ac_check_lib_save_LIBS=$LIBS
7962 LIBS="-lintl  $LIBS"
7963 cat >conftest.$ac_ext <<_ACEOF
7964 #line $LINENO "configure"
7965 /* confdefs.h.  */
7966 _ACEOF
7967 cat confdefs.h >>conftest.$ac_ext
7968 cat >>conftest.$ac_ext <<_ACEOF
7969 /* end confdefs.h.  */
7970
7971 /* Override any gcc2 internal prototype to avoid an error.  */
7972 #ifdef __cplusplus
7973 extern "C"
7974 #endif
7975 /* We use char because int might match the return type of a gcc2
7976    builtin and then its argument prototype would still apply.  */
7977 char bindtextdomain ();
7978 int
7979 main ()
7980 {
7981 bindtextdomain ();
7982   ;
7983   return 0;
7984 }
7985 _ACEOF
7986 rm -f conftest.$ac_objext conftest$ac_exeext
7987 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7988   (eval $ac_link) 2>&5
7989   ac_status=$?
7990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7991   (exit $ac_status); } &&
7992          { ac_try='test -s conftest$ac_exeext'
7993   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7994   (eval $ac_try) 2>&5
7995   ac_status=$?
7996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7997   (exit $ac_status); }; }; then
7998   ac_cv_lib_intl_bindtextdomain=yes
7999 else
8000   echo "$as_me: failed program was:" >&5
8001 sed 's/^/| /' conftest.$ac_ext >&5
8002
8003 ac_cv_lib_intl_bindtextdomain=no
8004 fi
8005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8006 LIBS=$ac_check_lib_save_LIBS
8007 fi
8008 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
8009 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
8010 if test $ac_cv_lib_intl_bindtextdomain = yes; then
8011   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
8012 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
8013 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
8014   echo $ECHO_N "(cached) $ECHO_C" >&6
8015 else
8016   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
8017 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
8018 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
8019   echo $ECHO_N "(cached) $ECHO_C" >&6
8020 else
8021   ac_check_lib_save_LIBS=$LIBS
8022 LIBS="-lintl  $LIBS"
8023 cat >conftest.$ac_ext <<_ACEOF
8024 #line $LINENO "configure"
8025 /* confdefs.h.  */
8026 _ACEOF
8027 cat confdefs.h >>conftest.$ac_ext
8028 cat >>conftest.$ac_ext <<_ACEOF
8029 /* end confdefs.h.  */
8030
8031 /* Override any gcc2 internal prototype to avoid an error.  */
8032 #ifdef __cplusplus
8033 extern "C"
8034 #endif
8035 /* We use char because int might match the return type of a gcc2
8036    builtin and then its argument prototype would still apply.  */
8037 char dgettext ();
8038 int
8039 main ()
8040 {
8041 dgettext ();
8042   ;
8043   return 0;
8044 }
8045 _ACEOF
8046 rm -f conftest.$ac_objext conftest$ac_exeext
8047 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8048   (eval $ac_link) 2>&5
8049   ac_status=$?
8050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8051   (exit $ac_status); } &&
8052          { ac_try='test -s conftest$ac_exeext'
8053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8054   (eval $ac_try) 2>&5
8055   ac_status=$?
8056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8057   (exit $ac_status); }; }; then
8058   ac_cv_lib_intl_dgettext=yes
8059 else
8060   echo "$as_me: failed program was:" >&5
8061 sed 's/^/| /' conftest.$ac_ext >&5
8062
8063 ac_cv_lib_intl_dgettext=no
8064 fi
8065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8066 LIBS=$ac_check_lib_save_LIBS
8067 fi
8068 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
8069 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
8070 if test $ac_cv_lib_intl_dgettext = yes; then
8071   gt_cv_func_dgettext_libintl=yes
8072 else
8073   gt_cv_func_dgettext_libintl=no
8074 fi
8075
8076 fi
8077 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
8078 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
8079 fi
8080
8081           fi
8082
8083           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
8084             LIBS="$LIBS -lintl";
8085           fi
8086
8087           if test "$gt_cv_func_dgettext_libc" = "yes" \
8088             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
8089
8090 cat >>confdefs.h <<\_ACEOF
8091 #define HAVE_GETTEXT 1
8092 _ACEOF
8093
8094             # Extract the first word of "msgfmt", so it can be a program name with args.
8095 set dummy msgfmt; ac_word=$2
8096 echo "$as_me:$LINENO: checking for $ac_word" >&5
8097 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8098 if test "${ac_cv_path_MSGFMT+set}" = set; then
8099   echo $ECHO_N "(cached) $ECHO_C" >&6
8100 else
8101   case "$MSGFMT" in
8102   /*)
8103   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8104   ;;
8105   *)
8106   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8107   for ac_dir in $PATH; do
8108     test -z "$ac_dir" && ac_dir=.
8109     if test -f $ac_dir/$ac_word; then
8110       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
8111         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
8112         break
8113       fi
8114     fi
8115   done
8116   IFS="$ac_save_ifs"
8117   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
8118   ;;
8119 esac
8120 fi
8121 MSGFMT="$ac_cv_path_MSGFMT"
8122 if test -n "$MSGFMT"; then
8123   echo "$as_me:$LINENO: result: $MSGFMT" >&5
8124 echo "${ECHO_T}$MSGFMT" >&6
8125 else
8126   echo "$as_me:$LINENO: result: no" >&5
8127 echo "${ECHO_T}no" >&6
8128 fi
8129             if test "$MSGFMT" != "no"; then
8130
8131 for ac_func in dcgettext
8132 do
8133 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8134 echo "$as_me:$LINENO: checking for $ac_func" >&5
8135 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8136 if eval "test \"\${$as_ac_var+set}\" = set"; then
8137   echo $ECHO_N "(cached) $ECHO_C" >&6
8138 else
8139   cat >conftest.$ac_ext <<_ACEOF
8140 #line $LINENO "configure"
8141 /* confdefs.h.  */
8142 _ACEOF
8143 cat confdefs.h >>conftest.$ac_ext
8144 cat >>conftest.$ac_ext <<_ACEOF
8145 /* end confdefs.h.  */
8146 /* System header to define __stub macros and hopefully few prototypes,
8147     which can conflict with char $ac_func (); below.
8148     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8149     <limits.h> exists even on freestanding compilers.  */
8150 #ifdef __STDC__
8151 # include <limits.h>
8152 #else
8153 # include <assert.h>
8154 #endif
8155 /* Override any gcc2 internal prototype to avoid an error.  */
8156 #ifdef __cplusplus
8157 extern "C"
8158 {
8159 #endif
8160 /* We use char because int might match the return type of a gcc2
8161    builtin and then its argument prototype would still apply.  */
8162 char $ac_func ();
8163 /* The GNU C library defines this for functions which it implements
8164     to always fail with ENOSYS.  Some functions are actually named
8165     something starting with __ and the normal name is an alias.  */
8166 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8167 choke me
8168 #else
8169 char (*f) () = $ac_func;
8170 #endif
8171 #ifdef __cplusplus
8172 }
8173 #endif
8174
8175 int
8176 main ()
8177 {
8178 return f != $ac_func;
8179   ;
8180   return 0;
8181 }
8182 _ACEOF
8183 rm -f conftest.$ac_objext conftest$ac_exeext
8184 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8185   (eval $ac_link) 2>&5
8186   ac_status=$?
8187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8188   (exit $ac_status); } &&
8189          { ac_try='test -s conftest$ac_exeext'
8190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8191   (eval $ac_try) 2>&5
8192   ac_status=$?
8193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8194   (exit $ac_status); }; }; then
8195   eval "$as_ac_var=yes"
8196 else
8197   echo "$as_me: failed program was:" >&5
8198 sed 's/^/| /' conftest.$ac_ext >&5
8199
8200 eval "$as_ac_var=no"
8201 fi
8202 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8203 fi
8204 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8205 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8206 if test `eval echo '${'$as_ac_var'}'` = yes; then
8207   cat >>confdefs.h <<_ACEOF
8208 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8209 _ACEOF
8210
8211 fi
8212 done
8213
8214               # Extract the first word of "gmsgfmt", so it can be a program name with args.
8215 set dummy gmsgfmt; ac_word=$2
8216 echo "$as_me:$LINENO: checking for $ac_word" >&5
8217 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8218 if test "${ac_cv_path_GMSGFMT+set}" = set; then
8219   echo $ECHO_N "(cached) $ECHO_C" >&6
8220 else
8221   case $GMSGFMT in
8222   [\\/]* | ?:[\\/]*)
8223   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8224   ;;
8225   *)
8226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8227 for as_dir in $PATH
8228 do
8229   IFS=$as_save_IFS
8230   test -z "$as_dir" && as_dir=.
8231   for ac_exec_ext in '' $ac_executable_extensions; do
8232   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8233     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
8234     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8235     break 2
8236   fi
8237 done
8238 done
8239
8240   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8241   ;;
8242 esac
8243 fi
8244 GMSGFMT=$ac_cv_path_GMSGFMT
8245
8246 if test -n "$GMSGFMT"; then
8247   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
8248 echo "${ECHO_T}$GMSGFMT" >&6
8249 else
8250   echo "$as_me:$LINENO: result: no" >&5
8251 echo "${ECHO_T}no" >&6
8252 fi
8253
8254               # Extract the first word of "xgettext", so it can be a program name with args.
8255 set dummy xgettext; ac_word=$2
8256 echo "$as_me:$LINENO: checking for $ac_word" >&5
8257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8258 if test "${ac_cv_path_XGETTEXT+set}" = set; then
8259   echo $ECHO_N "(cached) $ECHO_C" >&6
8260 else
8261   case "$XGETTEXT" in
8262   /*)
8263   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8264   ;;
8265   *)
8266   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8267   for ac_dir in $PATH; do
8268     test -z "$ac_dir" && ac_dir=.
8269     if test -f $ac_dir/$ac_word; then
8270       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8271         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8272         break
8273       fi
8274     fi
8275   done
8276   IFS="$ac_save_ifs"
8277   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8278   ;;
8279 esac
8280 fi
8281 XGETTEXT="$ac_cv_path_XGETTEXT"
8282 if test -n "$XGETTEXT"; then
8283   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
8284 echo "${ECHO_T}$XGETTEXT" >&6
8285 else
8286   echo "$as_me:$LINENO: result: no" >&5
8287 echo "${ECHO_T}no" >&6
8288 fi
8289
8290               cat >conftest.$ac_ext <<_ACEOF
8291 #line $LINENO "configure"
8292 /* confdefs.h.  */
8293 _ACEOF
8294 cat confdefs.h >>conftest.$ac_ext
8295 cat >>conftest.$ac_ext <<_ACEOF
8296 /* end confdefs.h.  */
8297
8298 int
8299 main ()
8300 {
8301 extern int _nl_msg_cat_cntr;
8302                              return _nl_msg_cat_cntr
8303   ;
8304   return 0;
8305 }
8306 _ACEOF
8307 rm -f conftest.$ac_objext conftest$ac_exeext
8308 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8309   (eval $ac_link) 2>&5
8310   ac_status=$?
8311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8312   (exit $ac_status); } &&
8313          { ac_try='test -s conftest$ac_exeext'
8314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8315   (eval $ac_try) 2>&5
8316   ac_status=$?
8317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8318   (exit $ac_status); }; }; then
8319   CATOBJEXT=.gmo
8320                  DATADIRNAME=share
8321 else
8322   echo "$as_me: failed program was:" >&5
8323 sed 's/^/| /' conftest.$ac_ext >&5
8324
8325 CATOBJEXT=.mo
8326                  DATADIRNAME=lib
8327 fi
8328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8329               INSTOBJEXT=.mo
8330             fi
8331           fi
8332
8333           # Added by Martin Baulig 12/15/98 for libc5 systems
8334           if test "$gt_cv_func_dgettext_libc" != "yes" \
8335             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
8336             INTLLIBS=-lintl
8337             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
8338           fi
8339
8340 fi
8341
8342
8343
8344       if test "$CATOBJEXT" = "NONE"; then
8345                         nls_cv_use_gnu_gettext=yes
8346       fi
8347     fi
8348
8349     if test "$nls_cv_use_gnu_gettext" != "yes"; then
8350
8351 cat >>confdefs.h <<\_ACEOF
8352 #define ENABLE_NLS 1
8353 _ACEOF
8354
8355     else
8356             CATOBJEXT=
8357     fi
8358
8359         if test "$XGETTEXT" != ":"; then
8360                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
8361         : ;
8362       else
8363         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
8364 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
8365         XGETTEXT=":"
8366       fi
8367     fi
8368
8369     # We need to process the po/ directory.
8370     POSUB=po
8371
8372               ac_config_commands="$ac_config_commands default-2"
8373
8374
8375                 for lang in $ALL_LINGUAS; do
8376       GMOFILES="$GMOFILES $lang.gmo"
8377       POFILES="$POFILES $lang.po"
8378     done
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392    if test "x$CATOBJEXT" != "x"; then
8393      if test "x$ALL_LINGUAS" = "x"; then
8394        LINGUAS=
8395      else
8396        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
8397 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
8398        NEW_LINGUAS=
8399        for lang in ${LINGUAS=$ALL_LINGUAS}; do
8400          case "$ALL_LINGUAS" in
8401           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
8402          esac
8403        done
8404        LINGUAS=$NEW_LINGUAS
8405        echo "$as_me:$LINENO: result: $LINGUAS" >&5
8406 echo "${ECHO_T}$LINGUAS" >&6
8407      fi
8408
8409           if test -n "$LINGUAS"; then
8410        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8411      fi
8412    fi
8413
8414             test -d po || mkdir po
8415    if test "$CATOBJEXT" = ".cat"; then
8416      if test "${ac_cv_header_linux_version_h+set}" = set; then
8417   echo "$as_me:$LINENO: checking for linux/version.h" >&5
8418 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8419 if test "${ac_cv_header_linux_version_h+set}" = set; then
8420   echo $ECHO_N "(cached) $ECHO_C" >&6
8421 fi
8422 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8423 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8424 else
8425   # Is the header compilable?
8426 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
8427 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
8428 cat >conftest.$ac_ext <<_ACEOF
8429 #line $LINENO "configure"
8430 /* confdefs.h.  */
8431 _ACEOF
8432 cat confdefs.h >>conftest.$ac_ext
8433 cat >>conftest.$ac_ext <<_ACEOF
8434 /* end confdefs.h.  */
8435 $ac_includes_default
8436 #include <linux/version.h>
8437 _ACEOF
8438 rm -f conftest.$ac_objext
8439 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8440   (eval $ac_compile) 2>&5
8441   ac_status=$?
8442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8443   (exit $ac_status); } &&
8444          { ac_try='test -s conftest.$ac_objext'
8445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8446   (eval $ac_try) 2>&5
8447   ac_status=$?
8448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8449   (exit $ac_status); }; }; then
8450   ac_header_compiler=yes
8451 else
8452   echo "$as_me: failed program was:" >&5
8453 sed 's/^/| /' conftest.$ac_ext >&5
8454
8455 ac_header_compiler=no
8456 fi
8457 rm -f conftest.$ac_objext conftest.$ac_ext
8458 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8459 echo "${ECHO_T}$ac_header_compiler" >&6
8460
8461 # Is the header present?
8462 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
8463 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
8464 cat >conftest.$ac_ext <<_ACEOF
8465 #line $LINENO "configure"
8466 /* confdefs.h.  */
8467 _ACEOF
8468 cat confdefs.h >>conftest.$ac_ext
8469 cat >>conftest.$ac_ext <<_ACEOF
8470 /* end confdefs.h.  */
8471 #include <linux/version.h>
8472 _ACEOF
8473 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8474   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8475   ac_status=$?
8476   grep -v '^ *+' conftest.er1 >conftest.err
8477   rm -f conftest.er1
8478   cat conftest.err >&5
8479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8480   (exit $ac_status); } >/dev/null; then
8481   if test -s conftest.err; then
8482     ac_cpp_err=$ac_c_preproc_warn_flag
8483   else
8484     ac_cpp_err=
8485   fi
8486 else
8487   ac_cpp_err=yes
8488 fi
8489 if test -z "$ac_cpp_err"; then
8490   ac_header_preproc=yes
8491 else
8492   echo "$as_me: failed program was:" >&5
8493 sed 's/^/| /' conftest.$ac_ext >&5
8494
8495   ac_header_preproc=no
8496 fi
8497 rm -f conftest.err conftest.$ac_ext
8498 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8499 echo "${ECHO_T}$ac_header_preproc" >&6
8500
8501 # So?  What about this header?
8502 case $ac_header_compiler:$ac_header_preproc in
8503   yes:no )
8504     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
8505 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8506     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8507 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
8508     (
8509       cat <<\_ASBOX
8510 ## ------------------------------------ ##
8511 ## Report this to bug-autoconf@gnu.org. ##
8512 ## ------------------------------------ ##
8513 _ASBOX
8514     ) |
8515       sed "s/^/$as_me: WARNING:     /" >&2
8516     ;;
8517   no:yes )
8518     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
8519 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
8520     { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
8521 echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
8522     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8523 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
8524     (
8525       cat <<\_ASBOX
8526 ## ------------------------------------ ##
8527 ## Report this to bug-autoconf@gnu.org. ##
8528 ## ------------------------------------ ##
8529 _ASBOX
8530     ) |
8531       sed "s/^/$as_me: WARNING:     /" >&2
8532     ;;
8533 esac
8534 echo "$as_me:$LINENO: checking for linux/version.h" >&5
8535 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8536 if test "${ac_cv_header_linux_version_h+set}" = set; then
8537   echo $ECHO_N "(cached) $ECHO_C" >&6
8538 else
8539   ac_cv_header_linux_version_h=$ac_header_preproc
8540 fi
8541 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8542 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8543
8544 fi
8545 if test $ac_cv_header_linux_version_h = yes; then
8546   msgformat=linux
8547 else
8548   msgformat=xopen
8549 fi
8550
8551
8552
8553                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
8554    fi
8555
8556             MKINSTALLDIRS=
8557 #
8558 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
8559 #
8560 #   if test -n "$ac_aux_dir"; then
8561 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8562 #   fi
8563    if test -z "$MKINSTALLDIRS"; then
8564      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8565    fi
8566
8567    # jwz: you know what, screw it.  Let's just use the version that I
8568    # already computed in configure.in, instead of this version that came
8569    # with the i18n crud, ok?
8570    MKINSTALLDIRS="$INSTALL_DIRS"
8571
8572
8573
8574
8575          test -d po || mkdir po
8576    if test "x$srcdir" != "x."; then
8577      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8578        posrcprefix="$srcdir/"
8579      else
8580        posrcprefix="../$srcdir/"
8581      fi
8582    else
8583      posrcprefix="../"
8584    fi
8585    rm -f po/POTFILES
8586    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8587         < $srcdir/po/POTFILES.in > po/POTFILES
8588
8589 MKINSTALLDIRS="$INSTALL_DIRS"
8590
8591
8592 ###############################################################################
8593 #
8594 #       Check for -lXmu (some fucked up vendors don't ship it...)
8595 #
8596 ###############################################################################
8597
8598 have_xmu=no
8599
8600   ac_save_CPPFLAGS="$CPPFLAGS"
8601   if test \! -z "$includedir" ; then
8602     CPPFLAGS="$CPPFLAGS -I$includedir"
8603   fi
8604   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8605   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
8606 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
8607 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
8608   echo $ECHO_N "(cached) $ECHO_C" >&6
8609 else
8610   cat >conftest.$ac_ext <<_ACEOF
8611 #line $LINENO "configure"
8612 /* confdefs.h.  */
8613 _ACEOF
8614 cat confdefs.h >>conftest.$ac_ext
8615 cat >>conftest.$ac_ext <<_ACEOF
8616 /* end confdefs.h.  */
8617 #include <stdlib.h>
8618                    #include <stdio.h>
8619                    #include <X11/Intrinsic.h>
8620
8621 #include <X11/Xmu/Error.h>
8622 _ACEOF
8623 rm -f conftest.$ac_objext
8624 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8625   (eval $ac_compile) 2>&5
8626   ac_status=$?
8627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8628   (exit $ac_status); } &&
8629          { ac_try='test -s conftest.$ac_objext'
8630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8631   (eval $ac_try) 2>&5
8632   ac_status=$?
8633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8634   (exit $ac_status); }; }; then
8635   ac_cv_header_X11_Xmu_Error_h=yes
8636 else
8637   echo "$as_me: failed program was:" >&5
8638 sed 's/^/| /' conftest.$ac_ext >&5
8639
8640 ac_cv_header_X11_Xmu_Error_h=no
8641 fi
8642 rm -f conftest.$ac_objext conftest.$ac_ext
8643 fi
8644 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
8645 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
8646 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
8647   have_xmu=yes
8648 fi
8649
8650
8651   CPPFLAGS="$ac_save_CPPFLAGS"
8652 if test "$have_xmu" = no ; then
8653   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8654   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8655   XMU_LIBS=''
8656 else
8657   XMU_SRCS=''
8658   XMU_OBJS=''
8659   XMU_LIBS='-lXmu'
8660   cat >>confdefs.h <<\_ACEOF
8661 #define HAVE_XMU 1
8662 _ACEOF
8663
8664 fi
8665
8666
8667 ###############################################################################
8668 #
8669 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8670 #       See comp.windows.x FAQ question 124.  The right fix is to
8671 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8672 #
8673 ###############################################################################
8674
8675 if test "$have_xmu" = yes ; then
8676   case "$host" in
8677     *-sunos4*)
8678     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8679 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
8680 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
8681   echo $ECHO_N "(cached) $ECHO_C" >&6
8682 else
8683   ac_save_LDFLAGS="$LDFLAGS"
8684                     if test \! -z "$x_libraries" ; then
8685                       LDFLAGS="$LDFLAGS -L$x_libraries"
8686                     fi
8687                     # Note: this trick never works!  (Generally.)
8688                     # We're only getting away with using AC_TRY_LINK
8689                     # with X libraries because we know it's SunOS.
8690                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8691                     cat >conftest.$ac_ext <<_ACEOF
8692 #line $LINENO "configure"
8693 /* confdefs.h.  */
8694 _ACEOF
8695 cat confdefs.h >>conftest.$ac_ext
8696 cat >>conftest.$ac_ext <<_ACEOF
8697 /* end confdefs.h.  */
8698
8699 int
8700 main ()
8701 {
8702
8703   ;
8704   return 0;
8705 }
8706 _ACEOF
8707 rm -f conftest.$ac_objext conftest$ac_exeext
8708 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8709   (eval $ac_link) 2>&5
8710   ac_status=$?
8711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8712   (exit $ac_status); } &&
8713          { ac_try='test -s conftest$ac_exeext'
8714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8715   (eval $ac_try) 2>&5
8716   ac_status=$?
8717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8718   (exit $ac_status); }; }; then
8719   ac_cv_sunos_xmu_bug=no
8720 else
8721   echo "$as_me: failed program was:" >&5
8722 sed 's/^/| /' conftest.$ac_ext >&5
8723
8724 ac_cv_sunos_xmu_bug=yes
8725 fi
8726 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8727                     LDFLAGS="$ac_save_LDFLAGS"
8728 fi
8729 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
8730 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
8731     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8732       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
8733 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
8734 if test "${ac_cv_ld_static+set}" = set; then
8735   echo $ECHO_N "(cached) $ECHO_C" >&6
8736 else
8737   ac_save_LDFLAGS="$LDFLAGS"
8738                       LDFLAGS="$LDFLAGS -static"
8739                       cat >conftest.$ac_ext <<_ACEOF
8740 #line $LINENO "configure"
8741 /* confdefs.h.  */
8742 _ACEOF
8743 cat confdefs.h >>conftest.$ac_ext
8744 cat >>conftest.$ac_ext <<_ACEOF
8745 /* end confdefs.h.  */
8746
8747 int
8748 main ()
8749 {
8750
8751   ;
8752   return 0;
8753 }
8754 _ACEOF
8755 rm -f conftest.$ac_objext conftest$ac_exeext
8756 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8757   (eval $ac_link) 2>&5
8758   ac_status=$?
8759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8760   (exit $ac_status); } &&
8761          { ac_try='test -s conftest$ac_exeext'
8762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8763   (eval $ac_try) 2>&5
8764   ac_status=$?
8765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8766   (exit $ac_status); }; }; then
8767   ac_cv_ld_static=yes
8768 else
8769   echo "$as_me: failed program was:" >&5
8770 sed 's/^/| /' conftest.$ac_ext >&5
8771
8772 ac_cv_ld_static=no
8773 fi
8774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8775                     LDFLAGS="$ac_save_LDFLAGS"
8776 fi
8777 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
8778 echo "${ECHO_T}$ac_cv_ld_static" >&6
8779       if test "$ac_cv_ld_static" = yes ; then
8780         LDFLAGS="$LDFLAGS -static"
8781       else
8782         LDFLAGS="$LDFLAGS -Bstatic"
8783       fi
8784     fi
8785     ;;
8786   esac
8787 fi
8788
8789
8790 ###############################################################################
8791 #
8792 #       Handle the --with-hackdir option
8793 #
8794 ###############################################################################
8795
8796 have_hackdir=yes
8797 with_hackdir_req=unspecified
8798
8799 # Check whether --with-hackdir or --without-hackdir was given.
8800 if test "${with_hackdir+set}" = set; then
8801   withval="$with_hackdir"
8802   with_hackdir="$withval"; with_hackdir_req="$withval"
8803 else
8804   with_hackdir=yes
8805 fi;
8806
8807 if test x"$with_hackdir" = xyes; then
8808   HACKDIR='${exec_prefix}/lib/xscreensaver'
8809 elif test x"$with_hackdir" = xno; then
8810   HACKDIR='${bindir}'
8811 else
8812   # there must be a better way than this...
8813   if test -z "`echo $with_hackdir | sed 's@^/.*@@'`" ; then
8814     # absolute path
8815     HACKDIR=$with_hackdir
8816   else
8817     # relative path
8818     HACKDIR="\${exec_prefix}$with_hackdir"
8819   fi
8820 fi
8821
8822 # canonicalize slashes.
8823 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8824
8825 # This option used to be called --enable-subdir; make sure that is no longer
8826 # used, since configure brain-damagedly ignores unknown --enable options.
8827
8828 obsolete_enable=
8829 # Check whether --enable-subdir or --disable-subdir was given.
8830 if test "${enable_subdir+set}" = set; then
8831   enableval="$enable_subdir"
8832   obsolete_enable=yes
8833 fi;
8834 if test -n "$obsolete_enable"; then
8835   echo "error: the --enable-subdir option has been replaced with"
8836   echo "       the new --with-hackdir option; see \`configure --help'"
8837   echo "       for more information."
8838   exit 1
8839 fi
8840
8841
8842 ###############################################################################
8843 #
8844 #       Handle the --with-configdir option
8845 #
8846 ###############################################################################
8847
8848 have_configdir=yes
8849 with_configdir_req=unspecified
8850
8851 # Check whether --with-configdir or --without-configdir was given.
8852 if test "${with_configdir+set}" = set; then
8853   withval="$with_configdir"
8854   with_configdir="$withval"; with_configdir_req="$withval"
8855 else
8856   with_configdir=yes
8857 fi;
8858
8859 if test x"$with_configdir" = xyes; then
8860   # filled in later...
8861   HACK_CONF_DIR=''
8862 elif test x"$with_configdir" = xno; then
8863   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8864   exit 1
8865 else
8866   # there must be a better way than this...
8867   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8868     # absolute path
8869     HACK_CONF_DIR=$with_configdir
8870   else
8871     # relative path
8872     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8873   fi
8874 fi
8875
8876
8877
8878
8879 ###############################################################################
8880 #
8881 #       Check for the SGI SCREEN_SAVER server extension.
8882 #
8883 ###############################################################################
8884
8885 have_sgi=no
8886 with_sgi_req=unspecified
8887
8888 # Check whether --with-sgi-ext or --without-sgi-ext was given.
8889 if test "${with_sgi_ext+set}" = set; then
8890   withval="$with_sgi_ext"
8891   with_sgi="$withval"; with_sgi_req="$withval"
8892 else
8893   with_sgi=yes
8894 fi;
8895
8896
8897    case "$with_sgi" in
8898     yes) ;;
8899     no)  ;;
8900
8901     /*)
8902      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
8903 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
8904      d=$with_sgi/include
8905      if test -d $d; then
8906        X_CFLAGS="-I$d $X_CFLAGS"
8907        echo "$as_me:$LINENO: result: $d" >&5
8908 echo "${ECHO_T}$d" >&6
8909      else
8910        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8911 echo "${ECHO_T}not found ($d: no such directory)" >&6
8912      fi
8913
8914      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
8915 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
8916      d=$with_sgi/lib
8917      if test -d $d; then
8918        X_LIBS="-L$d $X_LIBS"
8919        echo "$as_me:$LINENO: result: $d" >&5
8920 echo "${ECHO_T}$d" >&6
8921      else
8922        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8923 echo "${ECHO_T}not found ($d: no such directory)" >&6
8924      fi
8925
8926      # replace the directory string with "yes".
8927      with_sgi_req="yes"
8928      with_sgi=$with_sgi_req
8929      ;;
8930
8931     *)
8932      echo ""
8933      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
8934      echo "       If it is a directory, then \`DIR/include' will be added to"
8935      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8936      exit 1
8937      ;;
8938    esac
8939
8940
8941 if test "$with_sgi" = yes; then
8942
8943   ac_save_CPPFLAGS="$CPPFLAGS"
8944   if test \! -z "$includedir" ; then
8945     CPPFLAGS="$CPPFLAGS -I$includedir"
8946   fi
8947   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8948   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
8949 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
8950 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
8951   echo $ECHO_N "(cached) $ECHO_C" >&6
8952 else
8953   cat >conftest.$ac_ext <<_ACEOF
8954 #line $LINENO "configure"
8955 /* confdefs.h.  */
8956 _ACEOF
8957 cat confdefs.h >>conftest.$ac_ext
8958 cat >>conftest.$ac_ext <<_ACEOF
8959 /* end confdefs.h.  */
8960 #include <X11/Xlib.h>
8961
8962 #include <X11/extensions/XScreenSaver.h>
8963 _ACEOF
8964 rm -f conftest.$ac_objext
8965 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8966   (eval $ac_compile) 2>&5
8967   ac_status=$?
8968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8969   (exit $ac_status); } &&
8970          { ac_try='test -s conftest.$ac_objext'
8971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8972   (eval $ac_try) 2>&5
8973   ac_status=$?
8974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8975   (exit $ac_status); }; }; then
8976   ac_cv_header_X11_extensions_XScreenSaver_h=yes
8977 else
8978   echo "$as_me: failed program was:" >&5
8979 sed 's/^/| /' conftest.$ac_ext >&5
8980
8981 ac_cv_header_X11_extensions_XScreenSaver_h=no
8982 fi
8983 rm -f conftest.$ac_objext conftest.$ac_ext
8984 fi
8985 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
8986 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
8987 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
8988   have_sgi=yes
8989                      cat >>confdefs.h <<\_ACEOF
8990 #define HAVE_SGI_SAVER_EXTENSION 1
8991 _ACEOF
8992
8993 fi
8994
8995
8996   CPPFLAGS="$ac_save_CPPFLAGS"
8997
8998 elif test "$with_sgi" != no; then
8999   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
9000   exit 1
9001 fi
9002
9003
9004 ###############################################################################
9005 #
9006 #       Check for the MIT-SCREEN-SAVER server extension.
9007 #
9008 ###############################################################################
9009
9010 have_mit=no
9011 with_mit_req=unspecified
9012
9013 # Check whether --with-mit-ext or --without-mit-ext was given.
9014 if test "${with_mit_ext+set}" = set; then
9015   withval="$with_mit_ext"
9016   with_mit="$withval"; with_mit_req="$withval"
9017 else
9018   with_mit=yes
9019 fi;
9020
9021
9022    case "$with_mit" in
9023     yes) ;;
9024     no)  ;;
9025
9026     /*)
9027      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER headers" >&5
9028 echo $ECHO_N "checking for MIT-SCREEN-SAVER headers... $ECHO_C" >&6
9029      d=$with_mit/include
9030      if test -d $d; then
9031        X_CFLAGS="-I$d $X_CFLAGS"
9032        echo "$as_me:$LINENO: result: $d" >&5
9033 echo "${ECHO_T}$d" >&6
9034      else
9035        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9036 echo "${ECHO_T}not found ($d: no such directory)" >&6
9037      fi
9038
9039      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER libs" >&5
9040 echo $ECHO_N "checking for MIT-SCREEN-SAVER libs... $ECHO_C" >&6
9041      d=$with_mit/lib
9042      if test -d $d; then
9043        X_LIBS="-L$d $X_LIBS"
9044        echo "$as_me:$LINENO: result: $d" >&5
9045 echo "${ECHO_T}$d" >&6
9046      else
9047        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9048 echo "${ECHO_T}not found ($d: no such directory)" >&6
9049      fi
9050
9051      # replace the directory string with "yes".
9052      with_mit_req="yes"
9053      with_mit=$with_mit_req
9054      ;;
9055
9056     *)
9057      echo ""
9058      echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
9059      echo "       If it is a directory, then \`DIR/include' will be added to"
9060      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9061      exit 1
9062      ;;
9063    esac
9064
9065
9066 if test "$with_mit" = yes; then
9067
9068   ac_save_CPPFLAGS="$CPPFLAGS"
9069   if test \! -z "$includedir" ; then
9070     CPPFLAGS="$CPPFLAGS -I$includedir"
9071   fi
9072   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9073   echo "$as_me:$LINENO: checking for X11/extensions/scrnsaver.h" >&5
9074 echo $ECHO_N "checking for X11/extensions/scrnsaver.h... $ECHO_C" >&6
9075 if test "${ac_cv_header_X11_extensions_scrnsaver_h+set}" = set; then
9076   echo $ECHO_N "(cached) $ECHO_C" >&6
9077 else
9078   cat >conftest.$ac_ext <<_ACEOF
9079 #line $LINENO "configure"
9080 /* confdefs.h.  */
9081 _ACEOF
9082 cat confdefs.h >>conftest.$ac_ext
9083 cat >>conftest.$ac_ext <<_ACEOF
9084 /* end confdefs.h.  */
9085 #include <X11/Xlib.h>
9086
9087 #include <X11/extensions/scrnsaver.h>
9088 _ACEOF
9089 rm -f conftest.$ac_objext
9090 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9091   (eval $ac_compile) 2>&5
9092   ac_status=$?
9093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9094   (exit $ac_status); } &&
9095          { ac_try='test -s conftest.$ac_objext'
9096   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9097   (eval $ac_try) 2>&5
9098   ac_status=$?
9099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9100   (exit $ac_status); }; }; then
9101   ac_cv_header_X11_extensions_scrnsaver_h=yes
9102 else
9103   echo "$as_me: failed program was:" >&5
9104 sed 's/^/| /' conftest.$ac_ext >&5
9105
9106 ac_cv_header_X11_extensions_scrnsaver_h=no
9107 fi
9108 rm -f conftest.$ac_objext conftest.$ac_ext
9109 fi
9110 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_scrnsaver_h" >&5
9111 echo "${ECHO_T}$ac_cv_header_X11_extensions_scrnsaver_h" >&6
9112 if test $ac_cv_header_X11_extensions_scrnsaver_h = yes; then
9113   have_mit=yes
9114 fi
9115
9116
9117   CPPFLAGS="$ac_save_CPPFLAGS"
9118
9119   # Now check to see if it's really in the library; XF86Free-3.3 ships
9120   # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
9121   #
9122   if test "$have_mit" = yes; then
9123
9124   ac_save_CPPFLAGS="$CPPFLAGS"
9125   ac_save_LDFLAGS="$LDFLAGS"
9126 #  ac_save_LIBS="$LIBS"
9127
9128   if test \! -z "$includedir" ; then
9129     CPPFLAGS="$CPPFLAGS -I$includedir"
9130   fi
9131   # note: $X_CFLAGS includes $x_includes
9132   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9133
9134   if test \! -z "$libdir" ; then
9135     LDFLAGS="$LDFLAGS -L$libdir"
9136   fi
9137   # note: $X_LIBS includes $x_libraries
9138   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9139
9140   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXext" >&5
9141 echo $ECHO_N "checking for XScreenSaverRegister in -lXext... $ECHO_C" >&6
9142 if test "${ac_cv_lib_Xext_XScreenSaverRegister+set}" = set; then
9143   echo $ECHO_N "(cached) $ECHO_C" >&6
9144 else
9145   ac_check_lib_save_LIBS=$LIBS
9146 LIBS="-lXext -lm $LIBS"
9147 cat >conftest.$ac_ext <<_ACEOF
9148 #line $LINENO "configure"
9149 /* confdefs.h.  */
9150 _ACEOF
9151 cat confdefs.h >>conftest.$ac_ext
9152 cat >>conftest.$ac_ext <<_ACEOF
9153 /* end confdefs.h.  */
9154
9155 /* Override any gcc2 internal prototype to avoid an error.  */
9156 #ifdef __cplusplus
9157 extern "C"
9158 #endif
9159 /* We use char because int might match the return type of a gcc2
9160    builtin and then its argument prototype would still apply.  */
9161 char XScreenSaverRegister ();
9162 int
9163 main ()
9164 {
9165 XScreenSaverRegister ();
9166   ;
9167   return 0;
9168 }
9169 _ACEOF
9170 rm -f conftest.$ac_objext conftest$ac_exeext
9171 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9172   (eval $ac_link) 2>&5
9173   ac_status=$?
9174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9175   (exit $ac_status); } &&
9176          { ac_try='test -s conftest$ac_exeext'
9177   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9178   (eval $ac_try) 2>&5
9179   ac_status=$?
9180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9181   (exit $ac_status); }; }; then
9182   ac_cv_lib_Xext_XScreenSaverRegister=yes
9183 else
9184   echo "$as_me: failed program was:" >&5
9185 sed 's/^/| /' conftest.$ac_ext >&5
9186
9187 ac_cv_lib_Xext_XScreenSaverRegister=no
9188 fi
9189 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9190 LIBS=$ac_check_lib_save_LIBS
9191 fi
9192 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XScreenSaverRegister" >&5
9193 echo "${ECHO_T}$ac_cv_lib_Xext_XScreenSaverRegister" >&6
9194 if test $ac_cv_lib_Xext_XScreenSaverRegister = yes; then
9195   true
9196 else
9197   have_mit=no
9198 fi
9199
9200   CPPFLAGS="$ac_save_CPPFLAGS"
9201   LDFLAGS="$ac_save_LDFLAGS"
9202 #  LIBS="$ac_save_LIBS"
9203
9204
9205     if test "$have_mit" = no; then
9206       # Fuck!  Looks like XF86Free-3.3 actually puts it in XExExt instead
9207       # of in Xext.  Thank you master, may I have another.
9208
9209   ac_save_CPPFLAGS="$CPPFLAGS"
9210   ac_save_LDFLAGS="$LDFLAGS"
9211 #  ac_save_LIBS="$LIBS"
9212
9213   if test \! -z "$includedir" ; then
9214     CPPFLAGS="$CPPFLAGS -I$includedir"
9215   fi
9216   # note: $X_CFLAGS includes $x_includes
9217   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9218
9219   if test \! -z "$libdir" ; then
9220     LDFLAGS="$LDFLAGS -L$libdir"
9221   fi
9222   # note: $X_LIBS includes $x_libraries
9223   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9224
9225   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXExExt" >&5
9226 echo $ECHO_N "checking for XScreenSaverRegister in -lXExExt... $ECHO_C" >&6
9227 if test "${ac_cv_lib_XExExt_XScreenSaverRegister+set}" = set; then
9228   echo $ECHO_N "(cached) $ECHO_C" >&6
9229 else
9230   ac_check_lib_save_LIBS=$LIBS
9231 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
9232 cat >conftest.$ac_ext <<_ACEOF
9233 #line $LINENO "configure"
9234 /* confdefs.h.  */
9235 _ACEOF
9236 cat confdefs.h >>conftest.$ac_ext
9237 cat >>conftest.$ac_ext <<_ACEOF
9238 /* end confdefs.h.  */
9239
9240 /* Override any gcc2 internal prototype to avoid an error.  */
9241 #ifdef __cplusplus
9242 extern "C"
9243 #endif
9244 /* We use char because int might match the return type of a gcc2
9245    builtin and then its argument prototype would still apply.  */
9246 char XScreenSaverRegister ();
9247 int
9248 main ()
9249 {
9250 XScreenSaverRegister ();
9251   ;
9252   return 0;
9253 }
9254 _ACEOF
9255 rm -f conftest.$ac_objext conftest$ac_exeext
9256 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9257   (eval $ac_link) 2>&5
9258   ac_status=$?
9259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9260   (exit $ac_status); } &&
9261          { ac_try='test -s conftest$ac_exeext'
9262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9263   (eval $ac_try) 2>&5
9264   ac_status=$?
9265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9266   (exit $ac_status); }; }; then
9267   ac_cv_lib_XExExt_XScreenSaverRegister=yes
9268 else
9269   echo "$as_me: failed program was:" >&5
9270 sed 's/^/| /' conftest.$ac_ext >&5
9271
9272 ac_cv_lib_XExExt_XScreenSaverRegister=no
9273 fi
9274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9275 LIBS=$ac_check_lib_save_LIBS
9276 fi
9277 echo "$as_me:$LINENO: result: $ac_cv_lib_XExExt_XScreenSaverRegister" >&5
9278 echo "${ECHO_T}$ac_cv_lib_XExExt_XScreenSaverRegister" >&6
9279 if test $ac_cv_lib_XExExt_XScreenSaverRegister = yes; then
9280   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
9281 else
9282   true
9283 fi
9284
9285   CPPFLAGS="$ac_save_CPPFLAGS"
9286   LDFLAGS="$ac_save_LDFLAGS"
9287 #  LIBS="$ac_save_LIBS"
9288
9289     fi
9290
9291     if test "$have_mit" = no; then
9292       # Double fuck!  Looks like some versions of XFree86 (whichever version
9293       # it is that comes with RedHat Linux 2.0 -- I can't find a version
9294       # number) put this garbage in Xss instead of Xext.  Thank you master,
9295       #  may I have another.
9296
9297   ac_save_CPPFLAGS="$CPPFLAGS"
9298   ac_save_LDFLAGS="$LDFLAGS"
9299 #  ac_save_LIBS="$LIBS"
9300
9301   if test \! -z "$includedir" ; then
9302     CPPFLAGS="$CPPFLAGS -I$includedir"
9303   fi
9304   # note: $X_CFLAGS includes $x_includes
9305   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9306
9307   if test \! -z "$libdir" ; then
9308     LDFLAGS="$LDFLAGS -L$libdir"
9309   fi
9310   # note: $X_LIBS includes $x_libraries
9311   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9312
9313   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXss" >&5
9314 echo $ECHO_N "checking for XScreenSaverRegister in -lXss... $ECHO_C" >&6
9315 if test "${ac_cv_lib_Xss_XScreenSaverRegister+set}" = set; then
9316   echo $ECHO_N "(cached) $ECHO_C" >&6
9317 else
9318   ac_check_lib_save_LIBS=$LIBS
9319 LIBS="-lXss -lX11 -lXext -lm $LIBS"
9320 cat >conftest.$ac_ext <<_ACEOF
9321 #line $LINENO "configure"
9322 /* confdefs.h.  */
9323 _ACEOF
9324 cat confdefs.h >>conftest.$ac_ext
9325 cat >>conftest.$ac_ext <<_ACEOF
9326 /* end confdefs.h.  */
9327
9328 /* Override any gcc2 internal prototype to avoid an error.  */
9329 #ifdef __cplusplus
9330 extern "C"
9331 #endif
9332 /* We use char because int might match the return type of a gcc2
9333    builtin and then its argument prototype would still apply.  */
9334 char XScreenSaverRegister ();
9335 int
9336 main ()
9337 {
9338 XScreenSaverRegister ();
9339   ;
9340   return 0;
9341 }
9342 _ACEOF
9343 rm -f conftest.$ac_objext conftest$ac_exeext
9344 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9345   (eval $ac_link) 2>&5
9346   ac_status=$?
9347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9348   (exit $ac_status); } &&
9349          { ac_try='test -s conftest$ac_exeext'
9350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9351   (eval $ac_try) 2>&5
9352   ac_status=$?
9353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9354   (exit $ac_status); }; }; then
9355   ac_cv_lib_Xss_XScreenSaverRegister=yes
9356 else
9357   echo "$as_me: failed program was:" >&5
9358 sed 's/^/| /' conftest.$ac_ext >&5
9359
9360 ac_cv_lib_Xss_XScreenSaverRegister=no
9361 fi
9362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9363 LIBS=$ac_check_lib_save_LIBS
9364 fi
9365 echo "$as_me:$LINENO: result: $ac_cv_lib_Xss_XScreenSaverRegister" >&5
9366 echo "${ECHO_T}$ac_cv_lib_Xss_XScreenSaverRegister" >&6
9367 if test $ac_cv_lib_Xss_XScreenSaverRegister = yes; then
9368   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
9369 else
9370   true
9371 fi
9372
9373   CPPFLAGS="$ac_save_CPPFLAGS"
9374   LDFLAGS="$ac_save_LDFLAGS"
9375 #  LIBS="$ac_save_LIBS"
9376
9377     fi
9378
9379   if test "$have_mit" = yes; then
9380     cat >>confdefs.h <<\_ACEOF
9381 #define HAVE_MIT_SAVER_EXTENSION 1
9382 _ACEOF
9383
9384   fi
9385
9386   fi
9387
9388 elif test "$with_mit" != no; then
9389   echo "error: must be yes or no: --with-mit-ext=$with_mit"
9390   exit 1
9391 fi
9392
9393
9394 ###############################################################################
9395 #
9396 #       Check for the XIDLE server extension.
9397 #
9398 ###############################################################################
9399
9400 have_xidle=no
9401 with_xidle_req=unspecified
9402
9403 # Check whether --with-xidle-ext or --without-xidle-ext was given.
9404 if test "${with_xidle_ext+set}" = set; then
9405   withval="$with_xidle_ext"
9406   with_xidle="$withval"; with_xidle_req="$withval"
9407 else
9408   with_xidle=yes
9409 fi;
9410
9411
9412    case "$with_xidle" in
9413     yes) ;;
9414     no)  ;;
9415
9416     /*)
9417      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
9418 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
9419      d=$with_xidle/include
9420      if test -d $d; then
9421        X_CFLAGS="-I$d $X_CFLAGS"
9422        echo "$as_me:$LINENO: result: $d" >&5
9423 echo "${ECHO_T}$d" >&6
9424      else
9425        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9426 echo "${ECHO_T}not found ($d: no such directory)" >&6
9427      fi
9428
9429      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
9430 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
9431      d=$with_xidle/lib
9432      if test -d $d; then
9433        X_LIBS="-L$d $X_LIBS"
9434        echo "$as_me:$LINENO: result: $d" >&5
9435 echo "${ECHO_T}$d" >&6
9436      else
9437        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9438 echo "${ECHO_T}not found ($d: no such directory)" >&6
9439      fi
9440
9441      # replace the directory string with "yes".
9442      with_xidle_req="yes"
9443      with_xidle=$with_xidle_req
9444      ;;
9445
9446     *)
9447      echo ""
9448      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
9449      echo "       If it is a directory, then \`DIR/include' will be added to"
9450      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9451      exit 1
9452      ;;
9453    esac
9454
9455
9456 if test "$with_xidle" = yes; then
9457
9458   ac_save_CPPFLAGS="$CPPFLAGS"
9459   if test \! -z "$includedir" ; then
9460     CPPFLAGS="$CPPFLAGS -I$includedir"
9461   fi
9462   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9463   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
9464 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
9465 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
9466   echo $ECHO_N "(cached) $ECHO_C" >&6
9467 else
9468   cat >conftest.$ac_ext <<_ACEOF
9469 #line $LINENO "configure"
9470 /* confdefs.h.  */
9471 _ACEOF
9472 cat confdefs.h >>conftest.$ac_ext
9473 cat >>conftest.$ac_ext <<_ACEOF
9474 /* end confdefs.h.  */
9475 #include <X11/Xlib.h>
9476
9477 #include <X11/extensions/xidle.h>
9478 _ACEOF
9479 rm -f conftest.$ac_objext
9480 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9481   (eval $ac_compile) 2>&5
9482   ac_status=$?
9483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9484   (exit $ac_status); } &&
9485          { ac_try='test -s conftest.$ac_objext'
9486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9487   (eval $ac_try) 2>&5
9488   ac_status=$?
9489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9490   (exit $ac_status); }; }; then
9491   ac_cv_header_X11_extensions_xidle_h=yes
9492 else
9493   echo "$as_me: failed program was:" >&5
9494 sed 's/^/| /' conftest.$ac_ext >&5
9495
9496 ac_cv_header_X11_extensions_xidle_h=no
9497 fi
9498 rm -f conftest.$ac_objext conftest.$ac_ext
9499 fi
9500 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
9501 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
9502 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
9503   have_xidle=yes
9504                      cat >>confdefs.h <<\_ACEOF
9505 #define HAVE_XIDLE_EXTENSION 1
9506 _ACEOF
9507
9508 fi
9509
9510
9511   CPPFLAGS="$ac_save_CPPFLAGS"
9512 elif test "$with_xidle" != no; then
9513   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
9514   exit 1
9515 fi
9516
9517
9518 ###############################################################################
9519 #
9520 #       Check for the SGI-VIDEO-CONTROL server extension.
9521 #
9522 ###############################################################################
9523
9524 have_sgivc=no
9525 with_sgivc_req=unspecified
9526
9527 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
9528 if test "${with_sgivc_ext+set}" = set; then
9529   withval="$with_sgivc_ext"
9530   with_sgivc="$withval"; with_sgivc_req="$withval"
9531 else
9532   with_sgivc=yes
9533 fi;
9534
9535
9536    case "$with_sgivc" in
9537     yes) ;;
9538     no)  ;;
9539
9540     /*)
9541      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
9542 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
9543      d=$with_sgivc/include
9544      if test -d $d; then
9545        X_CFLAGS="-I$d $X_CFLAGS"
9546        echo "$as_me:$LINENO: result: $d" >&5
9547 echo "${ECHO_T}$d" >&6
9548      else
9549        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9550 echo "${ECHO_T}not found ($d: no such directory)" >&6
9551      fi
9552
9553      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
9554 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
9555      d=$with_sgivc/lib
9556      if test -d $d; then
9557        X_LIBS="-L$d $X_LIBS"
9558        echo "$as_me:$LINENO: result: $d" >&5
9559 echo "${ECHO_T}$d" >&6
9560      else
9561        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9562 echo "${ECHO_T}not found ($d: no such directory)" >&6
9563      fi
9564
9565      # replace the directory string with "yes".
9566      with_sgivc_req="yes"
9567      with_sgivc=$with_sgivc_req
9568      ;;
9569
9570     *)
9571      echo ""
9572      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
9573      echo "       If it is a directory, then \`DIR/include' will be added to"
9574      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9575      exit 1
9576      ;;
9577    esac
9578
9579
9580 if test "$with_sgivc" = yes; then
9581
9582   # first check for XSGIvc.h
9583
9584   ac_save_CPPFLAGS="$CPPFLAGS"
9585   if test \! -z "$includedir" ; then
9586     CPPFLAGS="$CPPFLAGS -I$includedir"
9587   fi
9588   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9589   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
9590 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
9591 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
9592   echo $ECHO_N "(cached) $ECHO_C" >&6
9593 else
9594   cat >conftest.$ac_ext <<_ACEOF
9595 #line $LINENO "configure"
9596 /* confdefs.h.  */
9597 _ACEOF
9598 cat confdefs.h >>conftest.$ac_ext
9599 cat >>conftest.$ac_ext <<_ACEOF
9600 /* end confdefs.h.  */
9601 #include <X11/Xlib.h>
9602
9603 #include <X11/extensions/XSGIvc.h>
9604 _ACEOF
9605 rm -f conftest.$ac_objext
9606 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9607   (eval $ac_compile) 2>&5
9608   ac_status=$?
9609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9610   (exit $ac_status); } &&
9611          { ac_try='test -s conftest.$ac_objext'
9612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9613   (eval $ac_try) 2>&5
9614   ac_status=$?
9615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9616   (exit $ac_status); }; }; then
9617   ac_cv_header_X11_extensions_XSGIvc_h=yes
9618 else
9619   echo "$as_me: failed program was:" >&5
9620 sed 's/^/| /' conftest.$ac_ext >&5
9621
9622 ac_cv_header_X11_extensions_XSGIvc_h=no
9623 fi
9624 rm -f conftest.$ac_objext conftest.$ac_ext
9625 fi
9626 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
9627 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
9628 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
9629   have_sgivc=yes
9630 fi
9631
9632
9633   CPPFLAGS="$ac_save_CPPFLAGS"
9634
9635   # if that succeeded, then check for the -lXsgivc
9636   if test "$have_sgivc" = yes; then
9637     have_sgivc=no
9638
9639   ac_save_CPPFLAGS="$CPPFLAGS"
9640   ac_save_LDFLAGS="$LDFLAGS"
9641 #  ac_save_LIBS="$LIBS"
9642
9643   if test \! -z "$includedir" ; then
9644     CPPFLAGS="$CPPFLAGS -I$includedir"
9645   fi
9646   # note: $X_CFLAGS includes $x_includes
9647   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9648
9649   if test \! -z "$libdir" ; then
9650     LDFLAGS="$LDFLAGS -L$libdir"
9651   fi
9652   # note: $X_LIBS includes $x_libraries
9653   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9654
9655   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
9656 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
9657 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
9658   echo $ECHO_N "(cached) $ECHO_C" >&6
9659 else
9660   ac_check_lib_save_LIBS=$LIBS
9661 LIBS="-lXsgivc -lXext -lX11 $LIBS"
9662 cat >conftest.$ac_ext <<_ACEOF
9663 #line $LINENO "configure"
9664 /* confdefs.h.  */
9665 _ACEOF
9666 cat confdefs.h >>conftest.$ac_ext
9667 cat >>conftest.$ac_ext <<_ACEOF
9668 /* end confdefs.h.  */
9669
9670 /* Override any gcc2 internal prototype to avoid an error.  */
9671 #ifdef __cplusplus
9672 extern "C"
9673 #endif
9674 /* We use char because int might match the return type of a gcc2
9675    builtin and then its argument prototype would still apply.  */
9676 char XSGIvcQueryGammaMap ();
9677 int
9678 main ()
9679 {
9680 XSGIvcQueryGammaMap ();
9681   ;
9682   return 0;
9683 }
9684 _ACEOF
9685 rm -f conftest.$ac_objext conftest$ac_exeext
9686 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9687   (eval $ac_link) 2>&5
9688   ac_status=$?
9689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9690   (exit $ac_status); } &&
9691          { ac_try='test -s conftest$ac_exeext'
9692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9693   (eval $ac_try) 2>&5
9694   ac_status=$?
9695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9696   (exit $ac_status); }; }; then
9697   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
9698 else
9699   echo "$as_me: failed program was:" >&5
9700 sed 's/^/| /' conftest.$ac_ext >&5
9701
9702 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
9703 fi
9704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9705 LIBS=$ac_check_lib_save_LIBS
9706 fi
9707 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
9708 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
9709 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
9710   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
9711 else
9712   true
9713 fi
9714
9715   CPPFLAGS="$ac_save_CPPFLAGS"
9716   LDFLAGS="$ac_save_LDFLAGS"
9717 #  LIBS="$ac_save_LIBS"
9718
9719   fi
9720
9721   # if that succeeded, then we've really got it.
9722   if test "$have_sgivc" = yes; then
9723     cat >>confdefs.h <<\_ACEOF
9724 #define HAVE_SGI_VC_EXTENSION 1
9725 _ACEOF
9726
9727   fi
9728
9729 elif test "$with_sgivc" != no; then
9730   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
9731   exit 1
9732 fi
9733
9734
9735 ###############################################################################
9736 #
9737 #       Check for the DPMS server extension.
9738 #
9739 ###############################################################################
9740
9741 have_dpms=no
9742 with_dpms_req=unspecified
9743
9744 # Check whether --with-dpms-ext or --without-dpms-ext was given.
9745 if test "${with_dpms_ext+set}" = set; then
9746   withval="$with_dpms_ext"
9747   with_dpms="$withval"; with_dpms_req="$withval"
9748 else
9749   with_dpms=yes
9750 fi;
9751
9752
9753    case "$with_dpms" in
9754     yes) ;;
9755     no)  ;;
9756
9757     /*)
9758      echo "$as_me:$LINENO: checking for DPMS headers" >&5
9759 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
9760      d=$with_dpms/include
9761      if test -d $d; then
9762        X_CFLAGS="-I$d $X_CFLAGS"
9763        echo "$as_me:$LINENO: result: $d" >&5
9764 echo "${ECHO_T}$d" >&6
9765      else
9766        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9767 echo "${ECHO_T}not found ($d: no such directory)" >&6
9768      fi
9769
9770      echo "$as_me:$LINENO: checking for DPMS libs" >&5
9771 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
9772      d=$with_dpms/lib
9773      if test -d $d; then
9774        X_LIBS="-L$d $X_LIBS"
9775        echo "$as_me:$LINENO: result: $d" >&5
9776 echo "${ECHO_T}$d" >&6
9777      else
9778        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9779 echo "${ECHO_T}not found ($d: no such directory)" >&6
9780      fi
9781
9782      # replace the directory string with "yes".
9783      with_dpms_req="yes"
9784      with_dpms=$with_dpms_req
9785      ;;
9786
9787     *)
9788      echo ""
9789      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
9790      echo "       If it is a directory, then \`DIR/include' will be added to"
9791      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9792      exit 1
9793      ;;
9794    esac
9795
9796
9797 if test "$with_dpms" = yes; then
9798
9799   # first check for dpms.h
9800
9801   ac_save_CPPFLAGS="$CPPFLAGS"
9802   if test \! -z "$includedir" ; then
9803     CPPFLAGS="$CPPFLAGS -I$includedir"
9804   fi
9805   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9806   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
9807 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
9808 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
9809   echo $ECHO_N "(cached) $ECHO_C" >&6
9810 else
9811   cat >conftest.$ac_ext <<_ACEOF
9812 #line $LINENO "configure"
9813 /* confdefs.h.  */
9814 _ACEOF
9815 cat confdefs.h >>conftest.$ac_ext
9816 cat >>conftest.$ac_ext <<_ACEOF
9817 /* end confdefs.h.  */
9818 #include <X11/Xlib.h>
9819                      #include <X11/Xmd.h>
9820
9821 #include <X11/extensions/dpms.h>
9822 _ACEOF
9823 rm -f conftest.$ac_objext
9824 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9825   (eval $ac_compile) 2>&5
9826   ac_status=$?
9827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9828   (exit $ac_status); } &&
9829          { ac_try='test -s conftest.$ac_objext'
9830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9831   (eval $ac_try) 2>&5
9832   ac_status=$?
9833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9834   (exit $ac_status); }; }; then
9835   ac_cv_header_X11_extensions_dpms_h=yes
9836 else
9837   echo "$as_me: failed program was:" >&5
9838 sed 's/^/| /' conftest.$ac_ext >&5
9839
9840 ac_cv_header_X11_extensions_dpms_h=no
9841 fi
9842 rm -f conftest.$ac_objext conftest.$ac_ext
9843 fi
9844 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
9845 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
9846 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
9847   have_dpms=yes
9848 fi
9849
9850
9851   CPPFLAGS="$ac_save_CPPFLAGS"
9852
9853   # if that succeeded, then check for the DPMS code in the libraries
9854   if test "$have_dpms" = yes; then
9855
9856     # first look in -lXext (this is where it is with XFree86 4.0)
9857     have_dpms=no
9858
9859   ac_save_CPPFLAGS="$CPPFLAGS"
9860   ac_save_LDFLAGS="$LDFLAGS"
9861 #  ac_save_LIBS="$LIBS"
9862
9863   if test \! -z "$includedir" ; then
9864     CPPFLAGS="$CPPFLAGS -I$includedir"
9865   fi
9866   # note: $X_CFLAGS includes $x_includes
9867   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9868
9869   if test \! -z "$libdir" ; then
9870     LDFLAGS="$LDFLAGS -L$libdir"
9871   fi
9872   # note: $X_LIBS includes $x_libraries
9873   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9874
9875   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
9876 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
9877 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
9878   echo $ECHO_N "(cached) $ECHO_C" >&6
9879 else
9880   ac_check_lib_save_LIBS=$LIBS
9881 LIBS="-lXext -lXext -lX11 $LIBS"
9882 cat >conftest.$ac_ext <<_ACEOF
9883 #line $LINENO "configure"
9884 /* confdefs.h.  */
9885 _ACEOF
9886 cat confdefs.h >>conftest.$ac_ext
9887 cat >>conftest.$ac_ext <<_ACEOF
9888 /* end confdefs.h.  */
9889
9890 /* Override any gcc2 internal prototype to avoid an error.  */
9891 #ifdef __cplusplus
9892 extern "C"
9893 #endif
9894 /* We use char because int might match the return type of a gcc2
9895    builtin and then its argument prototype would still apply.  */
9896 char DPMSInfo ();
9897 int
9898 main ()
9899 {
9900 DPMSInfo ();
9901   ;
9902   return 0;
9903 }
9904 _ACEOF
9905 rm -f conftest.$ac_objext conftest$ac_exeext
9906 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9907   (eval $ac_link) 2>&5
9908   ac_status=$?
9909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9910   (exit $ac_status); } &&
9911          { ac_try='test -s conftest$ac_exeext'
9912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9913   (eval $ac_try) 2>&5
9914   ac_status=$?
9915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9916   (exit $ac_status); }; }; then
9917   ac_cv_lib_Xext_DPMSInfo=yes
9918 else
9919   echo "$as_me: failed program was:" >&5
9920 sed 's/^/| /' conftest.$ac_ext >&5
9921
9922 ac_cv_lib_Xext_DPMSInfo=no
9923 fi
9924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9925 LIBS=$ac_check_lib_save_LIBS
9926 fi
9927 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
9928 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
9929 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
9930   have_dpms=yes
9931 else
9932   true
9933 fi
9934
9935   CPPFLAGS="$ac_save_CPPFLAGS"
9936   LDFLAGS="$ac_save_LDFLAGS"
9937 #  LIBS="$ac_save_LIBS"
9938
9939
9940     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
9941     if test "$have_dpms" = no; then
9942
9943   ac_save_CPPFLAGS="$CPPFLAGS"
9944   ac_save_LDFLAGS="$LDFLAGS"
9945 #  ac_save_LIBS="$LIBS"
9946
9947   if test \! -z "$includedir" ; then
9948     CPPFLAGS="$CPPFLAGS -I$includedir"
9949   fi
9950   # note: $X_CFLAGS includes $x_includes
9951   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9952
9953   if test \! -z "$libdir" ; then
9954     LDFLAGS="$LDFLAGS -L$libdir"
9955   fi
9956   # note: $X_LIBS includes $x_libraries
9957   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9958
9959   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
9960 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
9961 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
9962   echo $ECHO_N "(cached) $ECHO_C" >&6
9963 else
9964   ac_check_lib_save_LIBS=$LIBS
9965 LIBS="-lXdpms -lXext -lX11 $LIBS"
9966 cat >conftest.$ac_ext <<_ACEOF
9967 #line $LINENO "configure"
9968 /* confdefs.h.  */
9969 _ACEOF
9970 cat confdefs.h >>conftest.$ac_ext
9971 cat >>conftest.$ac_ext <<_ACEOF
9972 /* end confdefs.h.  */
9973
9974 /* Override any gcc2 internal prototype to avoid an error.  */
9975 #ifdef __cplusplus
9976 extern "C"
9977 #endif
9978 /* We use char because int might match the return type of a gcc2
9979    builtin and then its argument prototype would still apply.  */
9980 char DPMSInfo ();
9981 int
9982 main ()
9983 {
9984 DPMSInfo ();
9985   ;
9986   return 0;
9987 }
9988 _ACEOF
9989 rm -f conftest.$ac_objext conftest$ac_exeext
9990 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9991   (eval $ac_link) 2>&5
9992   ac_status=$?
9993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9994   (exit $ac_status); } &&
9995          { ac_try='test -s conftest$ac_exeext'
9996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9997   (eval $ac_try) 2>&5
9998   ac_status=$?
9999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10000   (exit $ac_status); }; }; then
10001   ac_cv_lib_Xdpms_DPMSInfo=yes
10002 else
10003   echo "$as_me: failed program was:" >&5
10004 sed 's/^/| /' conftest.$ac_ext >&5
10005
10006 ac_cv_lib_Xdpms_DPMSInfo=no
10007 fi
10008 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10009 LIBS=$ac_check_lib_save_LIBS
10010 fi
10011 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
10012 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
10013 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
10014   have_dpms=yes; XDPMS_LIBS="-lXdpms"
10015 else
10016   true
10017 fi
10018
10019   CPPFLAGS="$ac_save_CPPFLAGS"
10020   LDFLAGS="$ac_save_LDFLAGS"
10021 #  LIBS="$ac_save_LIBS"
10022
10023     fi
10024   fi
10025
10026
10027   # if that succeeded, then we've really got it.
10028   if test "$have_dpms" = yes; then
10029     cat >>confdefs.h <<\_ACEOF
10030 #define HAVE_DPMS_EXTENSION 1
10031 _ACEOF
10032
10033   fi
10034
10035 elif test "$with_dpms" != no; then
10036   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
10037   exit 1
10038 fi
10039
10040
10041 ###############################################################################
10042 #
10043 #       Check for the XINERAMA server extension.
10044 #
10045 ###############################################################################
10046
10047 have_xinerama=no
10048 with_xinerama_req=unspecified
10049
10050 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
10051 if test "${with_xinerama_ext+set}" = set; then
10052   withval="$with_xinerama_ext"
10053   with_xinerama="$withval"; with_xinerama_req="$withval"
10054 else
10055   with_xinerama=yes
10056 fi;
10057
10058
10059    case "$with_xinerama" in
10060     yes) ;;
10061     no)  ;;
10062
10063     /*)
10064      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
10065 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
10066      d=$with_xinerama/include
10067      if test -d $d; then
10068        X_CFLAGS="-I$d $X_CFLAGS"
10069        echo "$as_me:$LINENO: result: $d" >&5
10070 echo "${ECHO_T}$d" >&6
10071      else
10072        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10073 echo "${ECHO_T}not found ($d: no such directory)" >&6
10074      fi
10075
10076      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
10077 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
10078      d=$with_xinerama/lib
10079      if test -d $d; then
10080        X_LIBS="-L$d $X_LIBS"
10081        echo "$as_me:$LINENO: result: $d" >&5
10082 echo "${ECHO_T}$d" >&6
10083      else
10084        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10085 echo "${ECHO_T}not found ($d: no such directory)" >&6
10086      fi
10087
10088      # replace the directory string with "yes".
10089      with_xinerama_req="yes"
10090      with_xinerama=$with_xinerama_req
10091      ;;
10092
10093     *)
10094      echo ""
10095      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
10096      echo "       If it is a directory, then \`DIR/include' will be added to"
10097      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10098      exit 1
10099      ;;
10100    esac
10101
10102
10103 if test "$with_xinerama" = yes; then
10104
10105   # first check for Xinerama.h
10106
10107   ac_save_CPPFLAGS="$CPPFLAGS"
10108   if test \! -z "$includedir" ; then
10109     CPPFLAGS="$CPPFLAGS -I$includedir"
10110   fi
10111   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10112   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
10113 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
10114 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
10115   echo $ECHO_N "(cached) $ECHO_C" >&6
10116 else
10117   cat >conftest.$ac_ext <<_ACEOF
10118 #line $LINENO "configure"
10119 /* confdefs.h.  */
10120 _ACEOF
10121 cat confdefs.h >>conftest.$ac_ext
10122 cat >>conftest.$ac_ext <<_ACEOF
10123 /* end confdefs.h.  */
10124 #include <X11/Xlib.h>
10125
10126 #include <X11/extensions/Xinerama.h>
10127 _ACEOF
10128 rm -f conftest.$ac_objext
10129 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10130   (eval $ac_compile) 2>&5
10131   ac_status=$?
10132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10133   (exit $ac_status); } &&
10134          { ac_try='test -s conftest.$ac_objext'
10135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10136   (eval $ac_try) 2>&5
10137   ac_status=$?
10138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10139   (exit $ac_status); }; }; then
10140   ac_cv_header_X11_extensions_Xinerama_h=yes
10141 else
10142   echo "$as_me: failed program was:" >&5
10143 sed 's/^/| /' conftest.$ac_ext >&5
10144
10145 ac_cv_header_X11_extensions_Xinerama_h=no
10146 fi
10147 rm -f conftest.$ac_objext conftest.$ac_ext
10148 fi
10149 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
10150 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
10151 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
10152   have_xinerama=yes
10153 fi
10154
10155
10156   CPPFLAGS="$ac_save_CPPFLAGS"
10157
10158   # if that succeeded, then check for the XINERAMA code in the libraries
10159   if test "$have_xinerama" = yes; then
10160
10161     # first look in -lXext
10162     have_xinerama=no
10163
10164   ac_save_CPPFLAGS="$CPPFLAGS"
10165   ac_save_LDFLAGS="$LDFLAGS"
10166 #  ac_save_LIBS="$LIBS"
10167
10168   if test \! -z "$includedir" ; then
10169     CPPFLAGS="$CPPFLAGS -I$includedir"
10170   fi
10171   # note: $X_CFLAGS includes $x_includes
10172   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10173
10174   if test \! -z "$libdir" ; then
10175     LDFLAGS="$LDFLAGS -L$libdir"
10176   fi
10177   # note: $X_LIBS includes $x_libraries
10178   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10179
10180   echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
10181 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6
10182 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
10183   echo $ECHO_N "(cached) $ECHO_C" >&6
10184 else
10185   ac_check_lib_save_LIBS=$LIBS
10186 LIBS="-lXext -lXext -lX11 $LIBS"
10187 cat >conftest.$ac_ext <<_ACEOF
10188 #line $LINENO "configure"
10189 /* confdefs.h.  */
10190 _ACEOF
10191 cat confdefs.h >>conftest.$ac_ext
10192 cat >>conftest.$ac_ext <<_ACEOF
10193 /* end confdefs.h.  */
10194
10195 /* Override any gcc2 internal prototype to avoid an error.  */
10196 #ifdef __cplusplus
10197 extern "C"
10198 #endif
10199 /* We use char because int might match the return type of a gcc2
10200    builtin and then its argument prototype would still apply.  */
10201 char XineramaQueryScreens ();
10202 int
10203 main ()
10204 {
10205 XineramaQueryScreens ();
10206   ;
10207   return 0;
10208 }
10209 _ACEOF
10210 rm -f conftest.$ac_objext conftest$ac_exeext
10211 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10212   (eval $ac_link) 2>&5
10213   ac_status=$?
10214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10215   (exit $ac_status); } &&
10216          { ac_try='test -s conftest$ac_exeext'
10217   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10218   (eval $ac_try) 2>&5
10219   ac_status=$?
10220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10221   (exit $ac_status); }; }; then
10222   ac_cv_lib_Xext_XineramaQueryScreens=yes
10223 else
10224   echo "$as_me: failed program was:" >&5
10225 sed 's/^/| /' conftest.$ac_ext >&5
10226
10227 ac_cv_lib_Xext_XineramaQueryScreens=no
10228 fi
10229 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10230 LIBS=$ac_check_lib_save_LIBS
10231 fi
10232 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
10233 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6
10234 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
10235   have_xinerama=yes
10236 else
10237   true
10238 fi
10239
10240   CPPFLAGS="$ac_save_CPPFLAGS"
10241   LDFLAGS="$ac_save_LDFLAGS"
10242 #  LIBS="$ac_save_LIBS"
10243
10244
10245     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
10246     if test "$have_xinerama" = no; then
10247
10248   ac_save_CPPFLAGS="$CPPFLAGS"
10249   ac_save_LDFLAGS="$LDFLAGS"
10250 #  ac_save_LIBS="$LIBS"
10251
10252   if test \! -z "$includedir" ; then
10253     CPPFLAGS="$CPPFLAGS -I$includedir"
10254   fi
10255   # note: $X_CFLAGS includes $x_includes
10256   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10257
10258   if test \! -z "$libdir" ; then
10259     LDFLAGS="$LDFLAGS -L$libdir"
10260   fi
10261   # note: $X_LIBS includes $x_libraries
10262   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10263
10264   echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
10265 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
10266 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
10267   echo $ECHO_N "(cached) $ECHO_C" >&6
10268 else
10269   ac_check_lib_save_LIBS=$LIBS
10270 LIBS="-lXinerama -lXext -lX11 $LIBS"
10271 cat >conftest.$ac_ext <<_ACEOF
10272 #line $LINENO "configure"
10273 /* confdefs.h.  */
10274 _ACEOF
10275 cat confdefs.h >>conftest.$ac_ext
10276 cat >>conftest.$ac_ext <<_ACEOF
10277 /* end confdefs.h.  */
10278
10279 /* Override any gcc2 internal prototype to avoid an error.  */
10280 #ifdef __cplusplus
10281 extern "C"
10282 #endif
10283 /* We use char because int might match the return type of a gcc2
10284    builtin and then its argument prototype would still apply.  */
10285 char XineramaQueryScreens ();
10286 int
10287 main ()
10288 {
10289 XineramaQueryScreens ();
10290   ;
10291   return 0;
10292 }
10293 _ACEOF
10294 rm -f conftest.$ac_objext conftest$ac_exeext
10295 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10296   (eval $ac_link) 2>&5
10297   ac_status=$?
10298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10299   (exit $ac_status); } &&
10300          { ac_try='test -s conftest$ac_exeext'
10301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10302   (eval $ac_try) 2>&5
10303   ac_status=$?
10304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10305   (exit $ac_status); }; }; then
10306   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
10307 else
10308   echo "$as_me: failed program was:" >&5
10309 sed 's/^/| /' conftest.$ac_ext >&5
10310
10311 ac_cv_lib_Xinerama_XineramaQueryScreens=no
10312 fi
10313 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10314 LIBS=$ac_check_lib_save_LIBS
10315 fi
10316 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
10317 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
10318 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
10319   have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"
10320 else
10321   true
10322 fi
10323
10324   CPPFLAGS="$ac_save_CPPFLAGS"
10325   LDFLAGS="$ac_save_LDFLAGS"
10326 #  LIBS="$ac_save_LIBS"
10327
10328     fi
10329   fi
10330
10331   # if that succeeded, then we've really got it.
10332   if test "$have_xinerama" = yes; then
10333     cat >>confdefs.h <<\_ACEOF
10334 #define HAVE_XINERAMA 1
10335 _ACEOF
10336
10337   fi
10338
10339 elif test "$with_xinerama" != no; then
10340   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
10341   exit 1
10342 fi
10343
10344
10345 ###############################################################################
10346 #
10347 #       Check for the XF86VMODE server extension (for virtual screens.)
10348 #
10349 ###############################################################################
10350
10351 have_xf86vmode=no
10352 with_xf86vmode_req=unspecified
10353
10354 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
10355 if test "${with_xf86vmode_ext+set}" = set; then
10356   withval="$with_xf86vmode_ext"
10357   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
10358 else
10359   with_xf86vmode=yes
10360 fi;
10361
10362
10363    case "$with_xf86vmode" in
10364     yes) ;;
10365     no)  ;;
10366
10367     /*)
10368      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
10369 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
10370      d=$with_xf86vmode/include
10371      if test -d $d; then
10372        X_CFLAGS="-I$d $X_CFLAGS"
10373        echo "$as_me:$LINENO: result: $d" >&5
10374 echo "${ECHO_T}$d" >&6
10375      else
10376        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10377 echo "${ECHO_T}not found ($d: no such directory)" >&6
10378      fi
10379
10380      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
10381 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
10382      d=$with_xf86vmode/lib
10383      if test -d $d; then
10384        X_LIBS="-L$d $X_LIBS"
10385        echo "$as_me:$LINENO: result: $d" >&5
10386 echo "${ECHO_T}$d" >&6
10387      else
10388        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10389 echo "${ECHO_T}not found ($d: no such directory)" >&6
10390      fi
10391
10392      # replace the directory string with "yes".
10393      with_xf86vmode_req="yes"
10394      with_xf86vmode=$with_xf86vmode_req
10395      ;;
10396
10397     *)
10398      echo ""
10399      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
10400      echo "       If it is a directory, then \`DIR/include' will be added to"
10401      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10402      exit 1
10403      ;;
10404    esac
10405
10406
10407 if test "$with_xf86vmode" = yes; then
10408
10409   # first check for xf86vmode.h
10410
10411   ac_save_CPPFLAGS="$CPPFLAGS"
10412   if test \! -z "$includedir" ; then
10413     CPPFLAGS="$CPPFLAGS -I$includedir"
10414   fi
10415   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10416   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10417 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10418 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10419   echo $ECHO_N "(cached) $ECHO_C" >&6
10420 else
10421   cat >conftest.$ac_ext <<_ACEOF
10422 #line $LINENO "configure"
10423 /* confdefs.h.  */
10424 _ACEOF
10425 cat confdefs.h >>conftest.$ac_ext
10426 cat >>conftest.$ac_ext <<_ACEOF
10427 /* end confdefs.h.  */
10428 #include <X11/Xlib.h>
10429
10430 #include <X11/extensions/xf86vmode.h>
10431 _ACEOF
10432 rm -f conftest.$ac_objext
10433 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10434   (eval $ac_compile) 2>&5
10435   ac_status=$?
10436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10437   (exit $ac_status); } &&
10438          { ac_try='test -s conftest.$ac_objext'
10439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10440   (eval $ac_try) 2>&5
10441   ac_status=$?
10442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10443   (exit $ac_status); }; }; then
10444   ac_cv_header_X11_extensions_xf86vmode_h=yes
10445 else
10446   echo "$as_me: failed program was:" >&5
10447 sed 's/^/| /' conftest.$ac_ext >&5
10448
10449 ac_cv_header_X11_extensions_xf86vmode_h=no
10450 fi
10451 rm -f conftest.$ac_objext conftest.$ac_ext
10452 fi
10453 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10454 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10455 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10456   have_xf86vmode=yes
10457 fi
10458
10459
10460   CPPFLAGS="$ac_save_CPPFLAGS"
10461
10462   # if that succeeded, then check for the -lXxf86vm
10463   if test "$have_xf86vmode" = yes; then
10464     have_xf86vmode=no
10465
10466   ac_save_CPPFLAGS="$CPPFLAGS"
10467   ac_save_LDFLAGS="$LDFLAGS"
10468 #  ac_save_LIBS="$LIBS"
10469
10470   if test \! -z "$includedir" ; then
10471     CPPFLAGS="$CPPFLAGS -I$includedir"
10472   fi
10473   # note: $X_CFLAGS includes $x_includes
10474   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10475
10476   if test \! -z "$libdir" ; then
10477     LDFLAGS="$LDFLAGS -L$libdir"
10478   fi
10479   # note: $X_LIBS includes $x_libraries
10480   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10481
10482   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
10483 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
10484 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
10485   echo $ECHO_N "(cached) $ECHO_C" >&6
10486 else
10487   ac_check_lib_save_LIBS=$LIBS
10488 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10489 cat >conftest.$ac_ext <<_ACEOF
10490 #line $LINENO "configure"
10491 /* confdefs.h.  */
10492 _ACEOF
10493 cat confdefs.h >>conftest.$ac_ext
10494 cat >>conftest.$ac_ext <<_ACEOF
10495 /* end confdefs.h.  */
10496
10497 /* Override any gcc2 internal prototype to avoid an error.  */
10498 #ifdef __cplusplus
10499 extern "C"
10500 #endif
10501 /* We use char because int might match the return type of a gcc2
10502    builtin and then its argument prototype would still apply.  */
10503 char XF86VidModeGetViewPort ();
10504 int
10505 main ()
10506 {
10507 XF86VidModeGetViewPort ();
10508   ;
10509   return 0;
10510 }
10511 _ACEOF
10512 rm -f conftest.$ac_objext conftest$ac_exeext
10513 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10514   (eval $ac_link) 2>&5
10515   ac_status=$?
10516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10517   (exit $ac_status); } &&
10518          { ac_try='test -s conftest$ac_exeext'
10519   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10520   (eval $ac_try) 2>&5
10521   ac_status=$?
10522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10523   (exit $ac_status); }; }; then
10524   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
10525 else
10526   echo "$as_me: failed program was:" >&5
10527 sed 's/^/| /' conftest.$ac_ext >&5
10528
10529 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
10530 fi
10531 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10532 LIBS=$ac_check_lib_save_LIBS
10533 fi
10534 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
10535 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
10536 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
10537   have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10538 else
10539   true
10540 fi
10541
10542   CPPFLAGS="$ac_save_CPPFLAGS"
10543   LDFLAGS="$ac_save_LDFLAGS"
10544 #  LIBS="$ac_save_LIBS"
10545
10546   fi
10547
10548   # if that succeeded, then we've really got it.
10549   if test "$have_xf86vmode" = yes; then
10550     cat >>confdefs.h <<\_ACEOF
10551 #define HAVE_XF86VMODE 1
10552 _ACEOF
10553
10554   fi
10555
10556 elif test "$with_xf86vmode" != no; then
10557   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
10558   exit 1
10559 fi
10560
10561
10562 ###############################################################################
10563 #
10564 #       Check for the XF86VMODE server extension (for gamma fading.)
10565 #
10566 ###############################################################################
10567
10568 have_xf86gamma=no
10569 have_xf86gamma_ramp=no
10570 with_xf86gamma_req=unspecified
10571
10572 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
10573 if test "${with_xf86gamma_ext+set}" = set; then
10574   withval="$with_xf86gamma_ext"
10575   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
10576 else
10577   with_xf86gamma=yes
10578 fi;
10579
10580
10581    case "$with_xf86gamma" in
10582     yes) ;;
10583     no)  ;;
10584
10585     /*)
10586      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
10587 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
10588      d=$with_xf86gamma/include
10589      if test -d $d; then
10590        X_CFLAGS="-I$d $X_CFLAGS"
10591        echo "$as_me:$LINENO: result: $d" >&5
10592 echo "${ECHO_T}$d" >&6
10593      else
10594        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10595 echo "${ECHO_T}not found ($d: no such directory)" >&6
10596      fi
10597
10598      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
10599 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
10600      d=$with_xf86gamma/lib
10601      if test -d $d; then
10602        X_LIBS="-L$d $X_LIBS"
10603        echo "$as_me:$LINENO: result: $d" >&5
10604 echo "${ECHO_T}$d" >&6
10605      else
10606        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10607 echo "${ECHO_T}not found ($d: no such directory)" >&6
10608      fi
10609
10610      # replace the directory string with "yes".
10611      with_xf86gamma_req="yes"
10612      with_xf86gamma=$with_xf86gamma_req
10613      ;;
10614
10615     *)
10616      echo ""
10617      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
10618      echo "       If it is a directory, then \`DIR/include' will be added to"
10619      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10620      exit 1
10621      ;;
10622    esac
10623
10624
10625 if test "$with_xf86gamma" = yes; then
10626
10627   # first check for xf86vmode.h, if we haven't already
10628   if test "$have_xf86vmode" = yes; then
10629     have_xf86gamma=yes
10630   else
10631
10632   ac_save_CPPFLAGS="$CPPFLAGS"
10633   if test \! -z "$includedir" ; then
10634     CPPFLAGS="$CPPFLAGS -I$includedir"
10635   fi
10636   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10637   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10638 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10639 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10640   echo $ECHO_N "(cached) $ECHO_C" >&6
10641 else
10642   cat >conftest.$ac_ext <<_ACEOF
10643 #line $LINENO "configure"
10644 /* confdefs.h.  */
10645 _ACEOF
10646 cat confdefs.h >>conftest.$ac_ext
10647 cat >>conftest.$ac_ext <<_ACEOF
10648 /* end confdefs.h.  */
10649 #include <X11/Xlib.h>
10650
10651 #include <X11/extensions/xf86vmode.h>
10652 _ACEOF
10653 rm -f conftest.$ac_objext
10654 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10655   (eval $ac_compile) 2>&5
10656   ac_status=$?
10657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10658   (exit $ac_status); } &&
10659          { ac_try='test -s conftest.$ac_objext'
10660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10661   (eval $ac_try) 2>&5
10662   ac_status=$?
10663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10664   (exit $ac_status); }; }; then
10665   ac_cv_header_X11_extensions_xf86vmode_h=yes
10666 else
10667   echo "$as_me: failed program was:" >&5
10668 sed 's/^/| /' conftest.$ac_ext >&5
10669
10670 ac_cv_header_X11_extensions_xf86vmode_h=no
10671 fi
10672 rm -f conftest.$ac_objext conftest.$ac_ext
10673 fi
10674 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10675 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10676 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10677   have_xf86gamma=yes
10678 fi
10679
10680
10681   CPPFLAGS="$ac_save_CPPFLAGS"
10682   fi
10683
10684   # if that succeeded, then check for the -lXxf86vm
10685   if test "$have_xf86gamma" = yes; then
10686     have_xf86gamma=no
10687
10688   ac_save_CPPFLAGS="$CPPFLAGS"
10689   ac_save_LDFLAGS="$LDFLAGS"
10690 #  ac_save_LIBS="$LIBS"
10691
10692   if test \! -z "$includedir" ; then
10693     CPPFLAGS="$CPPFLAGS -I$includedir"
10694   fi
10695   # note: $X_CFLAGS includes $x_includes
10696   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10697
10698   if test \! -z "$libdir" ; then
10699     LDFLAGS="$LDFLAGS -L$libdir"
10700   fi
10701   # note: $X_LIBS includes $x_libraries
10702   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10703
10704   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
10705 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
10706 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
10707   echo $ECHO_N "(cached) $ECHO_C" >&6
10708 else
10709   ac_check_lib_save_LIBS=$LIBS
10710 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10711 cat >conftest.$ac_ext <<_ACEOF
10712 #line $LINENO "configure"
10713 /* confdefs.h.  */
10714 _ACEOF
10715 cat confdefs.h >>conftest.$ac_ext
10716 cat >>conftest.$ac_ext <<_ACEOF
10717 /* end confdefs.h.  */
10718
10719 /* Override any gcc2 internal prototype to avoid an error.  */
10720 #ifdef __cplusplus
10721 extern "C"
10722 #endif
10723 /* We use char because int might match the return type of a gcc2
10724    builtin and then its argument prototype would still apply.  */
10725 char XF86VidModeSetGamma ();
10726 int
10727 main ()
10728 {
10729 XF86VidModeSetGamma ();
10730   ;
10731   return 0;
10732 }
10733 _ACEOF
10734 rm -f conftest.$ac_objext conftest$ac_exeext
10735 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10736   (eval $ac_link) 2>&5
10737   ac_status=$?
10738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10739   (exit $ac_status); } &&
10740          { ac_try='test -s conftest$ac_exeext'
10741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10742   (eval $ac_try) 2>&5
10743   ac_status=$?
10744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10745   (exit $ac_status); }; }; then
10746   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
10747 else
10748   echo "$as_me: failed program was:" >&5
10749 sed 's/^/| /' conftest.$ac_ext >&5
10750
10751 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
10752 fi
10753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10754 LIBS=$ac_check_lib_save_LIBS
10755 fi
10756 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
10757 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
10758 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
10759   have_xf86gamma=yes
10760 else
10761   true
10762 fi
10763
10764   CPPFLAGS="$ac_save_CPPFLAGS"
10765   LDFLAGS="$ac_save_LDFLAGS"
10766 #  LIBS="$ac_save_LIBS"
10767
10768   fi
10769
10770   # check for the Ramp versions of the functions too.
10771   if test "$have_xf86gamma" = yes; then
10772     have_xf86gamma_ramp=no
10773
10774   ac_save_CPPFLAGS="$CPPFLAGS"
10775   ac_save_LDFLAGS="$LDFLAGS"
10776 #  ac_save_LIBS="$LIBS"
10777
10778   if test \! -z "$includedir" ; then
10779     CPPFLAGS="$CPPFLAGS -I$includedir"
10780   fi
10781   # note: $X_CFLAGS includes $x_includes
10782   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10783
10784   if test \! -z "$libdir" ; then
10785     LDFLAGS="$LDFLAGS -L$libdir"
10786   fi
10787   # note: $X_LIBS includes $x_libraries
10788   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10789
10790   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
10791 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
10792 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
10793   echo $ECHO_N "(cached) $ECHO_C" >&6
10794 else
10795   ac_check_lib_save_LIBS=$LIBS
10796 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10797 cat >conftest.$ac_ext <<_ACEOF
10798 #line $LINENO "configure"
10799 /* confdefs.h.  */
10800 _ACEOF
10801 cat confdefs.h >>conftest.$ac_ext
10802 cat >>conftest.$ac_ext <<_ACEOF
10803 /* end confdefs.h.  */
10804
10805 /* Override any gcc2 internal prototype to avoid an error.  */
10806 #ifdef __cplusplus
10807 extern "C"
10808 #endif
10809 /* We use char because int might match the return type of a gcc2
10810    builtin and then its argument prototype would still apply.  */
10811 char XF86VidModeSetGammaRamp ();
10812 int
10813 main ()
10814 {
10815 XF86VidModeSetGammaRamp ();
10816   ;
10817   return 0;
10818 }
10819 _ACEOF
10820 rm -f conftest.$ac_objext conftest$ac_exeext
10821 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10822   (eval $ac_link) 2>&5
10823   ac_status=$?
10824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10825   (exit $ac_status); } &&
10826          { ac_try='test -s conftest$ac_exeext'
10827   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10828   (eval $ac_try) 2>&5
10829   ac_status=$?
10830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10831   (exit $ac_status); }; }; then
10832   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
10833 else
10834   echo "$as_me: failed program was:" >&5
10835 sed 's/^/| /' conftest.$ac_ext >&5
10836
10837 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
10838 fi
10839 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10840 LIBS=$ac_check_lib_save_LIBS
10841 fi
10842 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
10843 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
10844 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
10845   have_xf86gamma_ramp=yes
10846 else
10847   true
10848 fi
10849
10850   CPPFLAGS="$ac_save_CPPFLAGS"
10851   LDFLAGS="$ac_save_LDFLAGS"
10852 #  LIBS="$ac_save_LIBS"
10853
10854   fi
10855
10856   # if those tests succeeded, then we've really got the functions.
10857   if test "$have_xf86gamma" = yes; then
10858     cat >>confdefs.h <<\_ACEOF
10859 #define HAVE_XF86VMODE_GAMMA 1
10860 _ACEOF
10861
10862   fi
10863
10864   if test "$have_xf86gamma_ramp" = yes; then
10865     cat >>confdefs.h <<\_ACEOF
10866 #define HAVE_XF86VMODE_GAMMA_RAMP 1
10867 _ACEOF
10868
10869   fi
10870
10871   # pull in the lib, if we haven't already
10872   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
10873     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10874   fi
10875
10876 elif test "$with_xf86gamma" != no; then
10877   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
10878   exit 1
10879 fi
10880
10881
10882 ###############################################################################
10883 #
10884 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
10885 #       using other XF86 stuff.)
10886 #
10887 ###############################################################################
10888
10889 have_xf86miscsetgrabkeysstate=no
10890 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
10891
10892   ac_save_CPPFLAGS="$CPPFLAGS"
10893   ac_save_LDFLAGS="$LDFLAGS"
10894 #  ac_save_LIBS="$LIBS"
10895
10896   if test \! -z "$includedir" ; then
10897     CPPFLAGS="$CPPFLAGS -I$includedir"
10898   fi
10899   # note: $X_CFLAGS includes $x_includes
10900   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10901
10902   if test \! -z "$libdir" ; then
10903     LDFLAGS="$LDFLAGS -L$libdir"
10904   fi
10905   # note: $X_LIBS includes $x_libraries
10906   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10907
10908   echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
10909 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6
10910 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
10911   echo $ECHO_N "(cached) $ECHO_C" >&6
10912 else
10913   ac_check_lib_save_LIBS=$LIBS
10914 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
10915 cat >conftest.$ac_ext <<_ACEOF
10916 #line $LINENO "configure"
10917 /* confdefs.h.  */
10918 _ACEOF
10919 cat confdefs.h >>conftest.$ac_ext
10920 cat >>conftest.$ac_ext <<_ACEOF
10921 /* end confdefs.h.  */
10922
10923 /* Override any gcc2 internal prototype to avoid an error.  */
10924 #ifdef __cplusplus
10925 extern "C"
10926 #endif
10927 /* We use char because int might match the return type of a gcc2
10928    builtin and then its argument prototype would still apply.  */
10929 char XF86MiscSetGrabKeysState ();
10930 int
10931 main ()
10932 {
10933 XF86MiscSetGrabKeysState ();
10934   ;
10935   return 0;
10936 }
10937 _ACEOF
10938 rm -f conftest.$ac_objext conftest$ac_exeext
10939 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10940   (eval $ac_link) 2>&5
10941   ac_status=$?
10942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10943   (exit $ac_status); } &&
10944          { ac_try='test -s conftest$ac_exeext'
10945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10946   (eval $ac_try) 2>&5
10947   ac_status=$?
10948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10949   (exit $ac_status); }; }; then
10950   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
10951 else
10952   echo "$as_me: failed program was:" >&5
10953 sed 's/^/| /' conftest.$ac_ext >&5
10954
10955 ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
10956 fi
10957 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10958 LIBS=$ac_check_lib_save_LIBS
10959 fi
10960 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
10961 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6
10962 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
10963   have_xf86miscsetgrabkeysstate=yes
10964 else
10965   true
10966 fi
10967
10968   CPPFLAGS="$ac_save_CPPFLAGS"
10969   LDFLAGS="$ac_save_LDFLAGS"
10970 #  LIBS="$ac_save_LIBS"
10971
10972   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
10973     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
10974     cat >>confdefs.h <<\_ACEOF
10975 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
10976 _ACEOF
10977
10978   fi
10979 fi
10980
10981
10982 ###############################################################################
10983 #
10984 #       Check for HP XHPDisableReset and XHPEnableReset.
10985 #
10986 ###############################################################################
10987
10988 echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
10989 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6
10990
10991   ac_save_CPPFLAGS="$CPPFLAGS"
10992   if test \! -z "$includedir" ; then
10993     CPPFLAGS="$CPPFLAGS -I$includedir"
10994   fi
10995   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10996   cat >conftest.$ac_ext <<_ACEOF
10997 #line $LINENO "configure"
10998 /* confdefs.h.  */
10999 _ACEOF
11000 cat confdefs.h >>conftest.$ac_ext
11001 cat >>conftest.$ac_ext <<_ACEOF
11002 /* end confdefs.h.  */
11003 #include <X11/XHPlib.h>
11004
11005 _ACEOF
11006 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11007   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
11008   cat >>confdefs.h <<\_ACEOF
11009 #define HAVE_XHPDISABLERESET 1
11010 _ACEOF
11011
11012                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
11013                    echo "$as_me:$LINENO: result: yes" >&5
11014 echo "${ECHO_T}yes" >&6
11015 else
11016   echo "$as_me:$LINENO: result: no" >&5
11017 echo "${ECHO_T}no" >&6
11018 fi
11019 rm -f conftest*
11020
11021   CPPFLAGS="$ac_save_CPPFLAGS"
11022
11023
11024 ###############################################################################
11025 #
11026 #       Check for /proc/interrupts.
11027 #
11028 ###############################################################################
11029
11030 have_proc_interrupts=no
11031 with_proc_interrupts_req=unspecified
11032
11033 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
11034 if test "${with_proc_interrupts+set}" = set; then
11035   withval="$with_proc_interrupts"
11036   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
11037 else
11038   with_proc_interrupts=yes
11039 fi;
11040
11041 if test "$with_proc_interrupts" = yes; then
11042
11043    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
11044 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
11045 if test "${ac_cv_have_proc_interrupts+set}" = set; then
11046   echo $ECHO_N "(cached) $ECHO_C" >&6
11047 else
11048   ac_cv_have_proc_interrupts=no
11049      if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
11050        ac_cv_have_proc_interrupts=yes
11051      fi
11052
11053 fi
11054 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
11055 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
11056    have_proc_interrupts=$ac_cv_have_proc_interrupts
11057
11058   if test "$have_proc_interrupts" = yes; then
11059     cat >>confdefs.h <<\_ACEOF
11060 #define HAVE_PROC_INTERRUPTS 1
11061 _ACEOF
11062
11063   fi
11064
11065 elif test "$with_proc_interrupts" != no; then
11066   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
11067   exit 1
11068 fi
11069
11070
11071 ###############################################################################
11072 #
11073 #       The --enable-locking option
11074 #
11075 ###############################################################################
11076
11077 # Check whether --enable-locking or --disable-locking was given.
11078 if test "${enable_locking+set}" = set; then
11079   enableval="$enable_locking"
11080   enable_locking="$enableval"
11081 else
11082   enable_locking=yes
11083 fi;
11084 if test "$enable_locking" = yes; then
11085   true
11086 elif test "$enable_locking" = no; then
11087   cat >>confdefs.h <<\_ACEOF
11088 #define NO_LOCKING 1
11089 _ACEOF
11090
11091 else
11092   echo "error: must be yes or no: --enable-locking=$enable_locking"
11093   exit 1
11094 fi
11095
11096 # We can't lock on MacOS X, so don't even bother compiling in support for it.
11097 #
11098 if test "$ac_macosx" = yes; then
11099   if test "$enable_locking" = yes; then
11100     echo "$as_me:$LINENO: result: locking disabled: it doesn't work on MacOS X" >&5
11101 echo "${ECHO_T}locking disabled: it doesn't work on MacOS X" >&6
11102     enable_locking=no
11103     cat >>confdefs.h <<\_ACEOF
11104 #define NO_LOCKING 1
11105 _ACEOF
11106
11107   fi
11108 fi
11109
11110
11111 ###############################################################################
11112 #
11113 #       The --enable-vt-locking option
11114 #
11115 ###############################################################################
11116
11117 #ac_vt_lockswitch=no
11118 #AC_ARG_ENABLE(vt-locking,[
11119 #  --enable-vt-locking     Compile in support for locking Virtual Terminals.
11120 #                          This is the default if the system supports it, and
11121 #                          if locking support is included (--enable-locking.)
11122 #  --disable-vt-locking    Do not allow locking of VTs, even if locking is
11123 #                          enabled.],
11124 #  [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
11125 #if test "$enable_vt_locking" = yes; then
11126 #
11127 #  AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
11128 #   [AC_TRY_COMPILE([#include <fcntl.h>
11129 #                   #include <sys/ioctl.h>
11130 #                   #include <sys/vt.h>],
11131 #                  [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
11132 #                  [ac_cv_vt_lockswitch=yes],
11133 #                  [ac_cv_vt_lockswitch=no])])
11134 #  ac_vt_lockswitch=$ac_cv_vt_lockswitch
11135 #
11136 #elif test "$enable_vt_locking" = no; then
11137 #  true
11138 #else
11139 #  echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
11140 #  exit 1
11141 #fi
11142 #
11143 #if test "$ac_vt_lockswitch" = yes; then
11144 #  AC_DEFINE(HAVE_VT_LOCKSWITCH)
11145 #  # the VT_LOCKSWITCH ioctl can only be used when running as root.
11146 #  # #### but it doesn't work yet, so don't worry about that for now.
11147 ##  need_setuid=yes
11148 #fi
11149
11150
11151 ###############################################################################
11152 #
11153 #       Check for PAM.
11154 #
11155 ###############################################################################
11156
11157 case "$host" in
11158   *-solaris*)
11159    # Solaris systems tend to come with PAM misconfigured.
11160    #  Don't build it by default, even if the headers exist.
11161    with_pam_default=no
11162    ;;
11163   *)
11164    # Default to building PAM support on all other systems, if it exists.
11165    with_pam_default=yes
11166   ;;
11167 esac
11168
11169 have_pam=no
11170 with_pam_req=unspecified
11171
11172
11173 # Check whether --with-pam or --without-pam was given.
11174 if test "${with_pam+set}" = set; then
11175   withval="$with_pam"
11176   with_pam="$withval"; with_pam_req="$withval"
11177 else
11178   with_pam=$with_pam_default
11179 fi;
11180
11181
11182    case "$with_pam" in
11183     yes) ;;
11184     no)  ;;
11185
11186     /*)
11187      echo "$as_me:$LINENO: checking for PAM headers" >&5
11188 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
11189      d=$with_pam/include
11190      if test -d $d; then
11191        X_CFLAGS="-I$d $X_CFLAGS"
11192        echo "$as_me:$LINENO: result: $d" >&5
11193 echo "${ECHO_T}$d" >&6
11194      else
11195        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11196 echo "${ECHO_T}not found ($d: no such directory)" >&6
11197      fi
11198
11199      echo "$as_me:$LINENO: checking for PAM libs" >&5
11200 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
11201      d=$with_pam/lib
11202      if test -d $d; then
11203        X_LIBS="-L$d $X_LIBS"
11204        echo "$as_me:$LINENO: result: $d" >&5
11205 echo "${ECHO_T}$d" >&6
11206      else
11207        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11208 echo "${ECHO_T}not found ($d: no such directory)" >&6
11209      fi
11210
11211      # replace the directory string with "yes".
11212      with_pam_req="yes"
11213      with_pam=$with_pam_req
11214      ;;
11215
11216     *)
11217      echo ""
11218      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
11219      echo "       If it is a directory, then \`DIR/include' will be added to"
11220      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11221      exit 1
11222      ;;
11223    esac
11224
11225
11226 if test "$enable_locking" = yes -a "$with_pam" = yes; then
11227   echo "$as_me:$LINENO: checking for PAM" >&5
11228 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
11229 if test "${ac_cv_pam+set}" = set; then
11230   echo $ECHO_N "(cached) $ECHO_C" >&6
11231 else
11232
11233   ac_save_CPPFLAGS="$CPPFLAGS"
11234   if test \! -z "$includedir" ; then
11235     CPPFLAGS="$CPPFLAGS -I$includedir"
11236   fi
11237   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11238   cat >conftest.$ac_ext <<_ACEOF
11239 #line $LINENO "configure"
11240 /* confdefs.h.  */
11241 _ACEOF
11242 cat confdefs.h >>conftest.$ac_ext
11243 cat >>conftest.$ac_ext <<_ACEOF
11244 /* end confdefs.h.  */
11245 #include <security/pam_appl.h>
11246 int
11247 main ()
11248 {
11249
11250   ;
11251   return 0;
11252 }
11253 _ACEOF
11254 rm -f conftest.$ac_objext
11255 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11256   (eval $ac_compile) 2>&5
11257   ac_status=$?
11258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11259   (exit $ac_status); } &&
11260          { ac_try='test -s conftest.$ac_objext'
11261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11262   (eval $ac_try) 2>&5
11263   ac_status=$?
11264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11265   (exit $ac_status); }; }; then
11266   ac_cv_pam=yes
11267 else
11268   echo "$as_me: failed program was:" >&5
11269 sed 's/^/| /' conftest.$ac_ext >&5
11270
11271 ac_cv_pam=no
11272 fi
11273 rm -f conftest.$ac_objext conftest.$ac_ext
11274   CPPFLAGS="$ac_save_CPPFLAGS"
11275 fi
11276 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
11277 echo "${ECHO_T}$ac_cv_pam" >&6
11278   if test "$ac_cv_pam" = yes ; then
11279     have_pam=yes
11280     cat >>confdefs.h <<\_ACEOF
11281 #define HAVE_PAM 1
11282 _ACEOF
11283
11284     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
11285
11286     # libpam typically requires dlopen and dlsym.  On FreeBSD,
11287     # those are in libc.  On Linux and Solaris, they're in libdl.
11288     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
11289 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
11290 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
11291   echo $ECHO_N "(cached) $ECHO_C" >&6
11292 else
11293   ac_check_lib_save_LIBS=$LIBS
11294 LIBS="-ldl  $LIBS"
11295 cat >conftest.$ac_ext <<_ACEOF
11296 #line $LINENO "configure"
11297 /* confdefs.h.  */
11298 _ACEOF
11299 cat confdefs.h >>conftest.$ac_ext
11300 cat >>conftest.$ac_ext <<_ACEOF
11301 /* end confdefs.h.  */
11302
11303 /* Override any gcc2 internal prototype to avoid an error.  */
11304 #ifdef __cplusplus
11305 extern "C"
11306 #endif
11307 /* We use char because int might match the return type of a gcc2
11308    builtin and then its argument prototype would still apply.  */
11309 char dlopen ();
11310 int
11311 main ()
11312 {
11313 dlopen ();
11314   ;
11315   return 0;
11316 }
11317 _ACEOF
11318 rm -f conftest.$ac_objext conftest$ac_exeext
11319 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11320   (eval $ac_link) 2>&5
11321   ac_status=$?
11322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11323   (exit $ac_status); } &&
11324          { ac_try='test -s conftest$ac_exeext'
11325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11326   (eval $ac_try) 2>&5
11327   ac_status=$?
11328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11329   (exit $ac_status); }; }; then
11330   ac_cv_lib_dl_dlopen=yes
11331 else
11332   echo "$as_me: failed program was:" >&5
11333 sed 's/^/| /' conftest.$ac_ext >&5
11334
11335 ac_cv_lib_dl_dlopen=no
11336 fi
11337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11338 LIBS=$ac_check_lib_save_LIBS
11339 fi
11340 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
11341 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
11342 if test $ac_cv_lib_dl_dlopen = yes; then
11343   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
11344 fi
11345
11346
11347     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
11348     have_timedwait=no
11349     echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
11350 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6
11351 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
11352   echo $ECHO_N "(cached) $ECHO_C" >&6
11353 else
11354   ac_check_lib_save_LIBS=$LIBS
11355 LIBS="-lc  $LIBS"
11356 cat >conftest.$ac_ext <<_ACEOF
11357 #line $LINENO "configure"
11358 /* confdefs.h.  */
11359 _ACEOF
11360 cat confdefs.h >>conftest.$ac_ext
11361 cat >>conftest.$ac_ext <<_ACEOF
11362 /* end confdefs.h.  */
11363
11364 /* Override any gcc2 internal prototype to avoid an error.  */
11365 #ifdef __cplusplus
11366 extern "C"
11367 #endif
11368 /* We use char because int might match the return type of a gcc2
11369    builtin and then its argument prototype would still apply.  */
11370 char sigtimedwait ();
11371 int
11372 main ()
11373 {
11374 sigtimedwait ();
11375   ;
11376   return 0;
11377 }
11378 _ACEOF
11379 rm -f conftest.$ac_objext conftest$ac_exeext
11380 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11381   (eval $ac_link) 2>&5
11382   ac_status=$?
11383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11384   (exit $ac_status); } &&
11385          { ac_try='test -s conftest$ac_exeext'
11386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11387   (eval $ac_try) 2>&5
11388   ac_status=$?
11389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11390   (exit $ac_status); }; }; then
11391   ac_cv_lib_c_sigtimedwait=yes
11392 else
11393   echo "$as_me: failed program was:" >&5
11394 sed 's/^/| /' conftest.$ac_ext >&5
11395
11396 ac_cv_lib_c_sigtimedwait=no
11397 fi
11398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11399 LIBS=$ac_check_lib_save_LIBS
11400 fi
11401 echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
11402 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6
11403 if test $ac_cv_lib_c_sigtimedwait = yes; then
11404   have_timedwait=yes
11405 fi
11406
11407     if test "$have_timedwait" = no ; then
11408       echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
11409 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6
11410 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
11411   echo $ECHO_N "(cached) $ECHO_C" >&6
11412 else
11413   ac_check_lib_save_LIBS=$LIBS
11414 LIBS="-lrt  $LIBS"
11415 cat >conftest.$ac_ext <<_ACEOF
11416 #line $LINENO "configure"
11417 /* confdefs.h.  */
11418 _ACEOF
11419 cat confdefs.h >>conftest.$ac_ext
11420 cat >>conftest.$ac_ext <<_ACEOF
11421 /* end confdefs.h.  */
11422
11423 /* Override any gcc2 internal prototype to avoid an error.  */
11424 #ifdef __cplusplus
11425 extern "C"
11426 #endif
11427 /* We use char because int might match the return type of a gcc2
11428    builtin and then its argument prototype would still apply.  */
11429 char sigtimedwait ();
11430 int
11431 main ()
11432 {
11433 sigtimedwait ();
11434   ;
11435   return 0;
11436 }
11437 _ACEOF
11438 rm -f conftest.$ac_objext conftest$ac_exeext
11439 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11440   (eval $ac_link) 2>&5
11441   ac_status=$?
11442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11443   (exit $ac_status); } &&
11444          { ac_try='test -s conftest$ac_exeext'
11445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11446   (eval $ac_try) 2>&5
11447   ac_status=$?
11448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11449   (exit $ac_status); }; }; then
11450   ac_cv_lib_rt_sigtimedwait=yes
11451 else
11452   echo "$as_me: failed program was:" >&5
11453 sed 's/^/| /' conftest.$ac_ext >&5
11454
11455 ac_cv_lib_rt_sigtimedwait=no
11456 fi
11457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11458 LIBS=$ac_check_lib_save_LIBS
11459 fi
11460 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
11461 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6
11462 if test $ac_cv_lib_rt_sigtimedwait = yes; then
11463   PASSWD_LIBS="${PASSWD_LIBS} -lrt"
11464 fi
11465
11466     fi
11467
11468     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
11469 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
11470     if test "${ac_cv_pam_strerror_args+set}" = set; then
11471   echo $ECHO_N "(cached) $ECHO_C" >&6
11472 else
11473   cat >conftest.$ac_ext <<_ACEOF
11474 #line $LINENO "configure"
11475 /* confdefs.h.  */
11476 _ACEOF
11477 cat confdefs.h >>conftest.$ac_ext
11478 cat >>conftest.$ac_ext <<_ACEOF
11479 /* end confdefs.h.  */
11480 #include <stdio.h>
11481                       #include <stdlib.h>
11482                       #include <security/pam_appl.h>
11483 int
11484 main ()
11485 {
11486 pam_handle_t *pamh = 0;
11487                       char *s = pam_strerror(pamh, PAM_SUCCESS);
11488   ;
11489   return 0;
11490 }
11491 _ACEOF
11492 rm -f conftest.$ac_objext
11493 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11494   (eval $ac_compile) 2>&5
11495   ac_status=$?
11496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11497   (exit $ac_status); } &&
11498          { ac_try='test -s conftest.$ac_objext'
11499   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11500   (eval $ac_try) 2>&5
11501   ac_status=$?
11502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11503   (exit $ac_status); }; }; then
11504   ac_pam_strerror_args=2
11505 else
11506   echo "$as_me: failed program was:" >&5
11507 sed 's/^/| /' conftest.$ac_ext >&5
11508
11509 cat >conftest.$ac_ext <<_ACEOF
11510 #line $LINENO "configure"
11511 /* confdefs.h.  */
11512 _ACEOF
11513 cat confdefs.h >>conftest.$ac_ext
11514 cat >>conftest.$ac_ext <<_ACEOF
11515 /* end confdefs.h.  */
11516 #include <stdio.h>
11517                                       #include <stdlib.h>
11518                                       #include <security/pam_appl.h>
11519 int
11520 main ()
11521 {
11522 char *s =
11523                                        pam_strerror(PAM_SUCCESS);
11524   ;
11525   return 0;
11526 }
11527 _ACEOF
11528 rm -f conftest.$ac_objext
11529 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11530   (eval $ac_compile) 2>&5
11531   ac_status=$?
11532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11533   (exit $ac_status); } &&
11534          { ac_try='test -s conftest.$ac_objext'
11535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11536   (eval $ac_try) 2>&5
11537   ac_status=$?
11538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11539   (exit $ac_status); }; }; then
11540   ac_pam_strerror_args=1
11541 else
11542   echo "$as_me: failed program was:" >&5
11543 sed 's/^/| /' conftest.$ac_ext >&5
11544
11545 ac_pam_strerror_args=0
11546 fi
11547 rm -f conftest.$ac_objext conftest.$ac_ext
11548 fi
11549 rm -f conftest.$ac_objext conftest.$ac_ext
11550       ac_cv_pam_strerror_args=$ac_pam_strerror_args
11551 fi
11552
11553     ac_pam_strerror_args=$ac_cv_pam_strerror_args
11554     if test "$ac_pam_strerror_args" = 1 ; then
11555       echo "$as_me:$LINENO: result: one argument" >&5
11556 echo "${ECHO_T}one argument" >&6
11557     elif test "$ac_pam_strerror_args" = 2 ; then
11558       cat >>confdefs.h <<\_ACEOF
11559 #define PAM_STRERROR_TWO_ARGS 1
11560 _ACEOF
11561
11562       echo "$as_me:$LINENO: result: two arguments" >&5
11563 echo "${ECHO_T}two arguments" >&6
11564     else
11565       echo "$as_me:$LINENO: result: unknown" >&5
11566 echo "${ECHO_T}unknown" >&6
11567     fi
11568   fi
11569 fi
11570
11571
11572 ###############################################################################
11573 #
11574 #       Check for Kerberos.
11575 #
11576 ###############################################################################
11577
11578 have_kerberos=no
11579 have_kerberos5=no
11580 with_kerberos_req=unspecified
11581
11582
11583 # Check whether --with-kerberos or --without-kerberos was given.
11584 if test "${with_kerberos+set}" = set; then
11585   withval="$with_kerberos"
11586   with_kerberos="$withval"; with_kerberos_req="$withval"
11587 else
11588   with_kerberos=yes
11589 fi;
11590
11591
11592    case "$with_kerberos" in
11593     yes) ;;
11594     no)  ;;
11595
11596     /*)
11597      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
11598 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
11599      d=$with_kerberos/include
11600      if test -d $d; then
11601        X_CFLAGS="-I$d $X_CFLAGS"
11602        echo "$as_me:$LINENO: result: $d" >&5
11603 echo "${ECHO_T}$d" >&6
11604      else
11605        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11606 echo "${ECHO_T}not found ($d: no such directory)" >&6
11607      fi
11608
11609      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
11610 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
11611      d=$with_kerberos/lib
11612      if test -d $d; then
11613        X_LIBS="-L$d $X_LIBS"
11614        echo "$as_me:$LINENO: result: $d" >&5
11615 echo "${ECHO_T}$d" >&6
11616      else
11617        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11618 echo "${ECHO_T}not found ($d: no such directory)" >&6
11619      fi
11620
11621      # replace the directory string with "yes".
11622      with_kerberos_req="yes"
11623      with_kerberos=$with_kerberos_req
11624      ;;
11625
11626     *)
11627      echo ""
11628      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
11629      echo "       If it is a directory, then \`DIR/include' will be added to"
11630      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11631      exit 1
11632      ;;
11633    esac
11634
11635
11636 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
11637   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
11638 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
11639 if test "${ac_cv_kerberos+set}" = set; then
11640   echo $ECHO_N "(cached) $ECHO_C" >&6
11641 else
11642
11643   ac_save_CPPFLAGS="$CPPFLAGS"
11644   if test \! -z "$includedir" ; then
11645     CPPFLAGS="$CPPFLAGS -I$includedir"
11646   fi
11647   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11648   cat >conftest.$ac_ext <<_ACEOF
11649 #line $LINENO "configure"
11650 /* confdefs.h.  */
11651 _ACEOF
11652 cat confdefs.h >>conftest.$ac_ext
11653 cat >>conftest.$ac_ext <<_ACEOF
11654 /* end confdefs.h.  */
11655 #include <krb.h>
11656 int
11657 main ()
11658 {
11659
11660   ;
11661   return 0;
11662 }
11663 _ACEOF
11664 rm -f conftest.$ac_objext
11665 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11666   (eval $ac_compile) 2>&5
11667   ac_status=$?
11668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11669   (exit $ac_status); } &&
11670          { ac_try='test -s conftest.$ac_objext'
11671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11672   (eval $ac_try) 2>&5
11673   ac_status=$?
11674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11675   (exit $ac_status); }; }; then
11676   ac_cv_kerberos=yes
11677 else
11678   echo "$as_me: failed program was:" >&5
11679 sed 's/^/| /' conftest.$ac_ext >&5
11680
11681 ac_cv_kerberos=no
11682 fi
11683 rm -f conftest.$ac_objext conftest.$ac_ext
11684   CPPFLAGS="$ac_save_CPPFLAGS"
11685 fi
11686 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
11687 echo "${ECHO_T}$ac_cv_kerberos" >&6
11688   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
11689 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
11690 if test "${ac_cv_kerberos5+set}" = set; then
11691   echo $ECHO_N "(cached) $ECHO_C" >&6
11692 else
11693
11694   ac_save_CPPFLAGS="$CPPFLAGS"
11695   if test \! -z "$includedir" ; then
11696     CPPFLAGS="$CPPFLAGS -I$includedir"
11697   fi
11698   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11699   cat >conftest.$ac_ext <<_ACEOF
11700 #line $LINENO "configure"
11701 /* confdefs.h.  */
11702 _ACEOF
11703 cat confdefs.h >>conftest.$ac_ext
11704 cat >>conftest.$ac_ext <<_ACEOF
11705 /* end confdefs.h.  */
11706 #include <kerberosIV/krb.h>
11707 int
11708 main ()
11709 {
11710
11711   ;
11712   return 0;
11713 }
11714 _ACEOF
11715 rm -f conftest.$ac_objext
11716 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11717   (eval $ac_compile) 2>&5
11718   ac_status=$?
11719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11720   (exit $ac_status); } &&
11721          { ac_try='test -s conftest.$ac_objext'
11722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11723   (eval $ac_try) 2>&5
11724   ac_status=$?
11725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11726   (exit $ac_status); }; }; then
11727   ac_cv_kerberos5=yes
11728 else
11729   echo "$as_me: failed program was:" >&5
11730 sed 's/^/| /' conftest.$ac_ext >&5
11731
11732 ac_cv_kerberos5=no
11733 fi
11734 rm -f conftest.$ac_objext conftest.$ac_ext
11735   CPPFLAGS="$ac_save_CPPFLAGS"
11736 fi
11737 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
11738 echo "${ECHO_T}$ac_cv_kerberos5" >&6
11739
11740   if test "$ac_cv_kerberos" = yes ; then
11741     have_kerberos=yes
11742     cat >>confdefs.h <<\_ACEOF
11743 #define HAVE_KERBEROS 1
11744 _ACEOF
11745
11746   fi
11747
11748   if test "$ac_cv_kerberos5" = yes ; then
11749
11750     # Andrew Snare <ajs@pigpond.com> wrote:
11751     #
11752     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
11753     # (krb4) was also available.  This turns out not to be the case with
11754     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
11755     # is optional.
11756     #
11757     # So, disable kerberosV support if libkrb4 can't be found.
11758     # This is not the best solution, but it makes the compile not fail.
11759     #
11760
11761   ac_save_CPPFLAGS="$CPPFLAGS"
11762   ac_save_LDFLAGS="$LDFLAGS"
11763 #  ac_save_LIBS="$LIBS"
11764
11765   if test \! -z "$includedir" ; then
11766     CPPFLAGS="$CPPFLAGS -I$includedir"
11767   fi
11768   # note: $X_CFLAGS includes $x_includes
11769   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11770
11771   if test \! -z "$libdir" ; then
11772     LDFLAGS="$LDFLAGS -L$libdir"
11773   fi
11774   # note: $X_LIBS includes $x_libraries
11775   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11776
11777   echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
11778 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6
11779 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
11780   echo $ECHO_N "(cached) $ECHO_C" >&6
11781 else
11782   ac_check_lib_save_LIBS=$LIBS
11783 LIBS="-lkrb4  $LIBS"
11784 cat >conftest.$ac_ext <<_ACEOF
11785 #line $LINENO "configure"
11786 /* confdefs.h.  */
11787 _ACEOF
11788 cat confdefs.h >>conftest.$ac_ext
11789 cat >>conftest.$ac_ext <<_ACEOF
11790 /* end confdefs.h.  */
11791
11792 /* Override any gcc2 internal prototype to avoid an error.  */
11793 #ifdef __cplusplus
11794 extern "C"
11795 #endif
11796 /* We use char because int might match the return type of a gcc2
11797    builtin and then its argument prototype would still apply.  */
11798 char krb_get_tf_realm ();
11799 int
11800 main ()
11801 {
11802 krb_get_tf_realm ();
11803   ;
11804   return 0;
11805 }
11806 _ACEOF
11807 rm -f conftest.$ac_objext conftest$ac_exeext
11808 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11809   (eval $ac_link) 2>&5
11810   ac_status=$?
11811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11812   (exit $ac_status); } &&
11813          { ac_try='test -s conftest$ac_exeext'
11814   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11815   (eval $ac_try) 2>&5
11816   ac_status=$?
11817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11818   (exit $ac_status); }; }; then
11819   ac_cv_lib_krb4_krb_get_tf_realm=yes
11820 else
11821   echo "$as_me: failed program was:" >&5
11822 sed 's/^/| /' conftest.$ac_ext >&5
11823
11824 ac_cv_lib_krb4_krb_get_tf_realm=no
11825 fi
11826 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11827 LIBS=$ac_check_lib_save_LIBS
11828 fi
11829 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
11830 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6
11831 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
11832   have_kerberos=yes
11833 else
11834   have_kerberos=no
11835 fi
11836
11837   CPPFLAGS="$ac_save_CPPFLAGS"
11838   LDFLAGS="$ac_save_LDFLAGS"
11839 #  LIBS="$ac_save_LIBS"
11840
11841     if test "$have_kerberos" = yes ; then
11842       have_kerberos5=yes
11843       cat >>confdefs.h <<\_ACEOF
11844 #define HAVE_KERBEROS 1
11845 _ACEOF
11846
11847       cat >>confdefs.h <<\_ACEOF
11848 #define HAVE_KERBEROS5 1
11849 _ACEOF
11850
11851     else
11852       have_kerberos5=no
11853       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
11854 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
11855     fi
11856
11857   fi
11858
11859   if test "$have_kerberos5" = yes ; then
11860     # from Matt Knopp <mhat@infocalypse.netlag.com>
11861     # (who got it from amu@mit.edu)
11862
11863     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
11864
11865     # jwz: MacOS X uses -lkrb5, but not -lcrypt
11866
11867   ac_save_CPPFLAGS="$CPPFLAGS"
11868   ac_save_LDFLAGS="$LDFLAGS"
11869 #  ac_save_LIBS="$LIBS"
11870
11871   if test \! -z "$includedir" ; then
11872     CPPFLAGS="$CPPFLAGS -I$includedir"
11873   fi
11874   # note: $X_CFLAGS includes $x_includes
11875   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11876
11877   if test \! -z "$libdir" ; then
11878     LDFLAGS="$LDFLAGS -L$libdir"
11879   fi
11880   # note: $X_LIBS includes $x_libraries
11881   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11882
11883   echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
11884 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
11885 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
11886   echo $ECHO_N "(cached) $ECHO_C" >&6
11887 else
11888   ac_check_lib_save_LIBS=$LIBS
11889 LIBS="-lcrypt  $LIBS"
11890 cat >conftest.$ac_ext <<_ACEOF
11891 #line $LINENO "configure"
11892 /* confdefs.h.  */
11893 _ACEOF
11894 cat confdefs.h >>conftest.$ac_ext
11895 cat >>conftest.$ac_ext <<_ACEOF
11896 /* end confdefs.h.  */
11897
11898 /* Override any gcc2 internal prototype to avoid an error.  */
11899 #ifdef __cplusplus
11900 extern "C"
11901 #endif
11902 /* We use char because int might match the return type of a gcc2
11903    builtin and then its argument prototype would still apply.  */
11904 char crypt ();
11905 int
11906 main ()
11907 {
11908 crypt ();
11909   ;
11910   return 0;
11911 }
11912 _ACEOF
11913 rm -f conftest.$ac_objext conftest$ac_exeext
11914 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11915   (eval $ac_link) 2>&5
11916   ac_status=$?
11917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11918   (exit $ac_status); } &&
11919          { ac_try='test -s conftest$ac_exeext'
11920   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11921   (eval $ac_try) 2>&5
11922   ac_status=$?
11923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11924   (exit $ac_status); }; }; then
11925   ac_cv_lib_crypt_crypt=yes
11926 else
11927   echo "$as_me: failed program was:" >&5
11928 sed 's/^/| /' conftest.$ac_ext >&5
11929
11930 ac_cv_lib_crypt_crypt=no
11931 fi
11932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11933 LIBS=$ac_check_lib_save_LIBS
11934 fi
11935 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
11936 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
11937 if test $ac_cv_lib_crypt_crypt = yes; then
11938   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11939 fi
11940
11941   CPPFLAGS="$ac_save_CPPFLAGS"
11942   LDFLAGS="$ac_save_LDFLAGS"
11943 #  LIBS="$ac_save_LIBS"
11944
11945
11946   elif test "$have_kerberos" = yes ; then
11947     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
11948     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
11949   fi
11950
11951   if test "$have_kerberos" = yes ; then
11952     echo "$as_me:$LINENO: checking for res_search" >&5
11953 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
11954 if test "${ac_cv_func_res_search+set}" = set; then
11955   echo $ECHO_N "(cached) $ECHO_C" >&6
11956 else
11957   cat >conftest.$ac_ext <<_ACEOF
11958 #line $LINENO "configure"
11959 /* confdefs.h.  */
11960 _ACEOF
11961 cat confdefs.h >>conftest.$ac_ext
11962 cat >>conftest.$ac_ext <<_ACEOF
11963 /* end confdefs.h.  */
11964 /* System header to define __stub macros and hopefully few prototypes,
11965     which can conflict with char res_search (); below.
11966     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11967     <limits.h> exists even on freestanding compilers.  */
11968 #ifdef __STDC__
11969 # include <limits.h>
11970 #else
11971 # include <assert.h>
11972 #endif
11973 /* Override any gcc2 internal prototype to avoid an error.  */
11974 #ifdef __cplusplus
11975 extern "C"
11976 {
11977 #endif
11978 /* We use char because int might match the return type of a gcc2
11979    builtin and then its argument prototype would still apply.  */
11980 char res_search ();
11981 /* The GNU C library defines this for functions which it implements
11982     to always fail with ENOSYS.  Some functions are actually named
11983     something starting with __ and the normal name is an alias.  */
11984 #if defined (__stub_res_search) || defined (__stub___res_search)
11985 choke me
11986 #else
11987 char (*f) () = res_search;
11988 #endif
11989 #ifdef __cplusplus
11990 }
11991 #endif
11992
11993 int
11994 main ()
11995 {
11996 return f != res_search;
11997   ;
11998   return 0;
11999 }
12000 _ACEOF
12001 rm -f conftest.$ac_objext conftest$ac_exeext
12002 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12003   (eval $ac_link) 2>&5
12004   ac_status=$?
12005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12006   (exit $ac_status); } &&
12007          { ac_try='test -s conftest$ac_exeext'
12008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12009   (eval $ac_try) 2>&5
12010   ac_status=$?
12011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12012   (exit $ac_status); }; }; then
12013   ac_cv_func_res_search=yes
12014 else
12015   echo "$as_me: failed program was:" >&5
12016 sed 's/^/| /' conftest.$ac_ext >&5
12017
12018 ac_cv_func_res_search=no
12019 fi
12020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12021 fi
12022 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
12023 echo "${ECHO_T}$ac_cv_func_res_search" >&6
12024 if test $ac_cv_func_res_search = yes; then
12025   :
12026 else
12027   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
12028 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
12029 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
12030   echo $ECHO_N "(cached) $ECHO_C" >&6
12031 else
12032   ac_check_lib_save_LIBS=$LIBS
12033 LIBS="-lresolv  $LIBS"
12034 cat >conftest.$ac_ext <<_ACEOF
12035 #line $LINENO "configure"
12036 /* confdefs.h.  */
12037 _ACEOF
12038 cat confdefs.h >>conftest.$ac_ext
12039 cat >>conftest.$ac_ext <<_ACEOF
12040 /* end confdefs.h.  */
12041
12042 /* Override any gcc2 internal prototype to avoid an error.  */
12043 #ifdef __cplusplus
12044 extern "C"
12045 #endif
12046 /* We use char because int might match the return type of a gcc2
12047    builtin and then its argument prototype would still apply.  */
12048 char res_search ();
12049 int
12050 main ()
12051 {
12052 res_search ();
12053   ;
12054   return 0;
12055 }
12056 _ACEOF
12057 rm -f conftest.$ac_objext conftest$ac_exeext
12058 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12059   (eval $ac_link) 2>&5
12060   ac_status=$?
12061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12062   (exit $ac_status); } &&
12063          { ac_try='test -s conftest$ac_exeext'
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_lib_resolv_res_search=yes
12070 else
12071   echo "$as_me: failed program was:" >&5
12072 sed 's/^/| /' conftest.$ac_ext >&5
12073
12074 ac_cv_lib_resolv_res_search=no
12075 fi
12076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12077 LIBS=$ac_check_lib_save_LIBS
12078 fi
12079 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
12080 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
12081 if test $ac_cv_lib_resolv_res_search = yes; then
12082   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
12083 else
12084   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
12085 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
12086
12087 fi
12088
12089 fi
12090
12091   fi
12092 fi
12093
12094
12095 ###############################################################################
12096 #
12097 #       Check for the nine billion variants of shadow passwords...
12098 #
12099 ###############################################################################
12100
12101 need_setuid=no
12102
12103 have_shadow=no
12104 with_shadow_req=unspecified
12105
12106
12107 # Check whether --with-shadow or --without-shadow was given.
12108 if test "${with_shadow+set}" = set; then
12109   withval="$with_shadow"
12110   with_shadow="$withval"; with_shadow_req="$withval"
12111 else
12112   with_shadow=yes
12113 fi;
12114
12115
12116    case "$with_shadow" in
12117     yes) ;;
12118     no)  ;;
12119
12120     /*)
12121      echo "$as_me:$LINENO: checking for shadow password headers" >&5
12122 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
12123      d=$with_shadow/include
12124      if test -d $d; then
12125        X_CFLAGS="-I$d $X_CFLAGS"
12126        echo "$as_me:$LINENO: result: $d" >&5
12127 echo "${ECHO_T}$d" >&6
12128      else
12129        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12130 echo "${ECHO_T}not found ($d: no such directory)" >&6
12131      fi
12132
12133      echo "$as_me:$LINENO: checking for shadow password libs" >&5
12134 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
12135      d=$with_shadow/lib
12136      if test -d $d; then
12137        X_LIBS="-L$d $X_LIBS"
12138        echo "$as_me:$LINENO: result: $d" >&5
12139 echo "${ECHO_T}$d" >&6
12140      else
12141        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12142 echo "${ECHO_T}not found ($d: no such directory)" >&6
12143      fi
12144
12145      # replace the directory string with "yes".
12146      with_shadow_req="yes"
12147      with_shadow=$with_shadow_req
12148      ;;
12149
12150     *)
12151      echo ""
12152      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
12153      echo "       If it is a directory, then \`DIR/include' will be added to"
12154      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12155      exit 1
12156      ;;
12157    esac
12158
12159
12160 if test "$enable_locking" = no ; then
12161   with_shadow_req=no
12162   with_shadow=no
12163 fi
12164
12165
12166 ###############################################################################
12167 #
12168 #       Check for Sun "adjunct" passwords.
12169 #
12170 ###############################################################################
12171
12172 if test "$with_shadow" = yes ; then
12173   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
12174 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
12175 if test "${ac_cv_sun_adjunct+set}" = set; then
12176   echo $ECHO_N "(cached) $ECHO_C" >&6
12177 else
12178
12179   ac_save_CPPFLAGS="$CPPFLAGS"
12180   if test \! -z "$includedir" ; then
12181     CPPFLAGS="$CPPFLAGS -I$includedir"
12182   fi
12183   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12184   cat >conftest.$ac_ext <<_ACEOF
12185 #line $LINENO "configure"
12186 /* confdefs.h.  */
12187 _ACEOF
12188 cat confdefs.h >>conftest.$ac_ext
12189 cat >>conftest.$ac_ext <<_ACEOF
12190 /* end confdefs.h.  */
12191 #include <stdlib.h>
12192                                     #include <unistd.h>
12193                                     #include <sys/types.h>
12194                                     #include <sys/label.h>
12195                                     #include <sys/audit.h>
12196                                     #include <pwdadj.h>
12197 int
12198 main ()
12199 {
12200 struct passwd_adjunct *p = getpwanam("nobody");
12201                        const char *pw = p->pwa_passwd;
12202   ;
12203   return 0;
12204 }
12205 _ACEOF
12206 rm -f conftest.$ac_objext
12207 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12208   (eval $ac_compile) 2>&5
12209   ac_status=$?
12210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12211   (exit $ac_status); } &&
12212          { ac_try='test -s conftest.$ac_objext'
12213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12214   (eval $ac_try) 2>&5
12215   ac_status=$?
12216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12217   (exit $ac_status); }; }; then
12218   ac_cv_sun_adjunct=yes
12219 else
12220   echo "$as_me: failed program was:" >&5
12221 sed 's/^/| /' conftest.$ac_ext >&5
12222
12223 ac_cv_sun_adjunct=no
12224 fi
12225 rm -f conftest.$ac_objext conftest.$ac_ext
12226   CPPFLAGS="$ac_save_CPPFLAGS"
12227 fi
12228 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
12229 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
12230   if test "$ac_cv_sun_adjunct" = yes; then
12231     have_shadow_adjunct=yes
12232     have_shadow=yes
12233     need_setuid=yes
12234   fi
12235 fi
12236
12237
12238 ###############################################################################
12239 #
12240 #       Check for DEC and SCO so-called "enhanced" security.
12241 #
12242 ###############################################################################
12243
12244 if test "$with_shadow" = yes ; then
12245   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
12246 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
12247 if test "${ac_cv_enhanced_passwd+set}" = set; then
12248   echo $ECHO_N "(cached) $ECHO_C" >&6
12249 else
12250
12251   ac_save_CPPFLAGS="$CPPFLAGS"
12252   if test \! -z "$includedir" ; then
12253     CPPFLAGS="$CPPFLAGS -I$includedir"
12254   fi
12255   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12256   cat >conftest.$ac_ext <<_ACEOF
12257 #line $LINENO "configure"
12258 /* confdefs.h.  */
12259 _ACEOF
12260 cat confdefs.h >>conftest.$ac_ext
12261 cat >>conftest.$ac_ext <<_ACEOF
12262 /* end confdefs.h.  */
12263 #include <stdlib.h>
12264                                     #include <unistd.h>
12265                                     #include <sys/types.h>
12266                                     #include <pwd.h>
12267                                     #include <sys/security.h>
12268                                     #include <prot.h>
12269 int
12270 main ()
12271 {
12272 struct pr_passwd *p;
12273                        const char *pw;
12274                        set_auth_parameters(0, 0);
12275                        check_auth_parameters();
12276                        p = getprpwnam("nobody");
12277                        pw = p->ufld.fd_encrypt;
12278   ;
12279   return 0;
12280 }
12281 _ACEOF
12282 rm -f conftest.$ac_objext
12283 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12284   (eval $ac_compile) 2>&5
12285   ac_status=$?
12286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12287   (exit $ac_status); } &&
12288          { ac_try='test -s conftest.$ac_objext'
12289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12290   (eval $ac_try) 2>&5
12291   ac_status=$?
12292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12293   (exit $ac_status); }; }; then
12294   ac_cv_enhanced_passwd=yes
12295 else
12296   echo "$as_me: failed program was:" >&5
12297 sed 's/^/| /' conftest.$ac_ext >&5
12298
12299 ac_cv_enhanced_passwd=no
12300 fi
12301 rm -f conftest.$ac_objext conftest.$ac_ext
12302   CPPFLAGS="$ac_save_CPPFLAGS"
12303 fi
12304 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
12305 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
12306   if test $ac_cv_enhanced_passwd = yes; then
12307     have_shadow_enhanced=yes
12308     have_shadow=yes
12309     need_setuid=yes
12310
12311     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
12312     # (I'm told it needs -lcurses too, but I don't understand why.)
12313     # But on DEC, it's in -lsecurity.
12314     #
12315     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
12316 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
12317 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
12318   echo $ECHO_N "(cached) $ECHO_C" >&6
12319 else
12320   ac_check_lib_save_LIBS=$LIBS
12321 LIBS="-lprot -lx $LIBS"
12322 cat >conftest.$ac_ext <<_ACEOF
12323 #line $LINENO "configure"
12324 /* confdefs.h.  */
12325 _ACEOF
12326 cat confdefs.h >>conftest.$ac_ext
12327 cat >>conftest.$ac_ext <<_ACEOF
12328 /* end confdefs.h.  */
12329
12330 /* Override any gcc2 internal prototype to avoid an error.  */
12331 #ifdef __cplusplus
12332 extern "C"
12333 #endif
12334 /* We use char because int might match the return type of a gcc2
12335    builtin and then its argument prototype would still apply.  */
12336 char getprpwnam ();
12337 int
12338 main ()
12339 {
12340 getprpwnam ();
12341   ;
12342   return 0;
12343 }
12344 _ACEOF
12345 rm -f conftest.$ac_objext conftest$ac_exeext
12346 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12347   (eval $ac_link) 2>&5
12348   ac_status=$?
12349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12350   (exit $ac_status); } &&
12351          { ac_try='test -s conftest$ac_exeext'
12352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12353   (eval $ac_try) 2>&5
12354   ac_status=$?
12355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12356   (exit $ac_status); }; }; then
12357   ac_cv_lib_prot_getprpwnam=yes
12358 else
12359   echo "$as_me: failed program was:" >&5
12360 sed 's/^/| /' conftest.$ac_ext >&5
12361
12362 ac_cv_lib_prot_getprpwnam=no
12363 fi
12364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12365 LIBS=$ac_check_lib_save_LIBS
12366 fi
12367 echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
12368 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
12369 if test $ac_cv_lib_prot_getprpwnam = yes; then
12370   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
12371 else
12372   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
12373 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
12374 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
12375   echo $ECHO_N "(cached) $ECHO_C" >&6
12376 else
12377   ac_check_lib_save_LIBS=$LIBS
12378 LIBS="-lsecurity  $LIBS"
12379 cat >conftest.$ac_ext <<_ACEOF
12380 #line $LINENO "configure"
12381 /* confdefs.h.  */
12382 _ACEOF
12383 cat confdefs.h >>conftest.$ac_ext
12384 cat >>conftest.$ac_ext <<_ACEOF
12385 /* end confdefs.h.  */
12386
12387 /* Override any gcc2 internal prototype to avoid an error.  */
12388 #ifdef __cplusplus
12389 extern "C"
12390 #endif
12391 /* We use char because int might match the return type of a gcc2
12392    builtin and then its argument prototype would still apply.  */
12393 char getprpwnam ();
12394 int
12395 main ()
12396 {
12397 getprpwnam ();
12398   ;
12399   return 0;
12400 }
12401 _ACEOF
12402 rm -f conftest.$ac_objext conftest$ac_exeext
12403 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12404   (eval $ac_link) 2>&5
12405   ac_status=$?
12406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12407   (exit $ac_status); } &&
12408          { ac_try='test -s conftest$ac_exeext'
12409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12410   (eval $ac_try) 2>&5
12411   ac_status=$?
12412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12413   (exit $ac_status); }; }; then
12414   ac_cv_lib_security_getprpwnam=yes
12415 else
12416   echo "$as_me: failed program was:" >&5
12417 sed 's/^/| /' conftest.$ac_ext >&5
12418
12419 ac_cv_lib_security_getprpwnam=no
12420 fi
12421 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12422 LIBS=$ac_check_lib_save_LIBS
12423 fi
12424 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
12425 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
12426 if test $ac_cv_lib_security_getprpwnam = yes; then
12427   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
12428 fi
12429
12430 fi
12431
12432   fi
12433 fi
12434
12435 ###############################################################################
12436 #
12437 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
12438 #
12439 ###############################################################################
12440
12441 if test "$with_shadow" = yes ; then
12442   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
12443 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
12444 if test "${ac_cv_hpux_passwd+set}" = set; then
12445   echo $ECHO_N "(cached) $ECHO_C" >&6
12446 else
12447
12448   ac_save_CPPFLAGS="$CPPFLAGS"
12449   if test \! -z "$includedir" ; then
12450     CPPFLAGS="$CPPFLAGS -I$includedir"
12451   fi
12452   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12453   cat >conftest.$ac_ext <<_ACEOF
12454 #line $LINENO "configure"
12455 /* confdefs.h.  */
12456 _ACEOF
12457 cat confdefs.h >>conftest.$ac_ext
12458 cat >>conftest.$ac_ext <<_ACEOF
12459 /* end confdefs.h.  */
12460 #include <stdlib.h>
12461                                     #include <unistd.h>
12462                                     #include <sys/types.h>
12463                                     #include <pwd.h>
12464                                     #include <hpsecurity.h>
12465                                     #include <prot.h>
12466 int
12467 main ()
12468 {
12469 struct s_passwd *p = getspwnam("nobody");
12470                        const char *pw = p->pw_passwd;
12471   ;
12472   return 0;
12473 }
12474 _ACEOF
12475 rm -f conftest.$ac_objext
12476 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12477   (eval $ac_compile) 2>&5
12478   ac_status=$?
12479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12480   (exit $ac_status); } &&
12481          { ac_try='test -s conftest.$ac_objext'
12482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12483   (eval $ac_try) 2>&5
12484   ac_status=$?
12485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12486   (exit $ac_status); }; }; then
12487   ac_cv_hpux_passwd=yes
12488 else
12489   echo "$as_me: failed program was:" >&5
12490 sed 's/^/| /' conftest.$ac_ext >&5
12491
12492 ac_cv_hpux_passwd=no
12493 fi
12494 rm -f conftest.$ac_objext conftest.$ac_ext
12495   CPPFLAGS="$ac_save_CPPFLAGS"
12496 fi
12497 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
12498 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
12499   if test "$ac_cv_hpux_passwd" = yes; then
12500     have_shadow_hpux=yes
12501     have_shadow=yes
12502     need_setuid=yes
12503
12504     # on HPUX, bigcrypt is in -lsec
12505     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
12506 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
12507 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
12508   echo $ECHO_N "(cached) $ECHO_C" >&6
12509 else
12510   ac_check_lib_save_LIBS=$LIBS
12511 LIBS="-lsec  $LIBS"
12512 cat >conftest.$ac_ext <<_ACEOF
12513 #line $LINENO "configure"
12514 /* confdefs.h.  */
12515 _ACEOF
12516 cat confdefs.h >>conftest.$ac_ext
12517 cat >>conftest.$ac_ext <<_ACEOF
12518 /* end confdefs.h.  */
12519
12520 /* Override any gcc2 internal prototype to avoid an error.  */
12521 #ifdef __cplusplus
12522 extern "C"
12523 #endif
12524 /* We use char because int might match the return type of a gcc2
12525    builtin and then its argument prototype would still apply.  */
12526 char bigcrypt ();
12527 int
12528 main ()
12529 {
12530 bigcrypt ();
12531   ;
12532   return 0;
12533 }
12534 _ACEOF
12535 rm -f conftest.$ac_objext conftest$ac_exeext
12536 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12537   (eval $ac_link) 2>&5
12538   ac_status=$?
12539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12540   (exit $ac_status); } &&
12541          { ac_try='test -s conftest$ac_exeext'
12542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12543   (eval $ac_try) 2>&5
12544   ac_status=$?
12545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12546   (exit $ac_status); }; }; then
12547   ac_cv_lib_sec_bigcrypt=yes
12548 else
12549   echo "$as_me: failed program was:" >&5
12550 sed 's/^/| /' conftest.$ac_ext >&5
12551
12552 ac_cv_lib_sec_bigcrypt=no
12553 fi
12554 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12555 LIBS=$ac_check_lib_save_LIBS
12556 fi
12557 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
12558 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
12559 if test $ac_cv_lib_sec_bigcrypt = yes; then
12560   PASSWD_LIBS="$PASSWD_LIBS -lsec"
12561 fi
12562
12563   fi
12564 fi
12565
12566
12567 ###############################################################################
12568 #
12569 #       Check for FreeBSD-style shadow passwords.
12570 #
12571 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
12572 #       password systems -- except you only get stuff in the pw_passwd field
12573 #       if the running program is setuid.  So, guess that we've got this
12574 #       lossage to contend with if /etc/master.passwd exists, and default to
12575 #       a setuid installation.
12576 #
12577 ###############################################################################
12578
12579 if test "$with_shadow" = yes ; then
12580   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
12581 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
12582 if test "${ac_cv_master_passwd+set}" = set; then
12583   echo $ECHO_N "(cached) $ECHO_C" >&6
12584 else
12585   if test -f /etc/master.passwd ; then
12586                     ac_cv_master_passwd=yes
12587                   else
12588                     ac_cv_master_passwd=no
12589                   fi
12590 fi
12591 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
12592 echo "${ECHO_T}$ac_cv_master_passwd" >&6
12593   if test "$ac_cv_master_passwd" = yes; then
12594     need_setuid=yes
12595   fi
12596 fi
12597
12598
12599 ###############################################################################
12600 #
12601 #       Check for traditional (ha!) shadow passwords.
12602 #
12603 ###############################################################################
12604
12605 if test "$with_shadow" = yes ; then
12606   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
12607 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
12608 if test "${ac_cv_shadow+set}" = set; then
12609   echo $ECHO_N "(cached) $ECHO_C" >&6
12610 else
12611
12612   ac_save_CPPFLAGS="$CPPFLAGS"
12613   if test \! -z "$includedir" ; then
12614     CPPFLAGS="$CPPFLAGS -I$includedir"
12615   fi
12616   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12617   cat >conftest.$ac_ext <<_ACEOF
12618 #line $LINENO "configure"
12619 /* confdefs.h.  */
12620 _ACEOF
12621 cat confdefs.h >>conftest.$ac_ext
12622 cat >>conftest.$ac_ext <<_ACEOF
12623 /* end confdefs.h.  */
12624 #include <stdlib.h>
12625                                     #include <unistd.h>
12626                                     #include <sys/types.h>
12627                                     #include <pwd.h>
12628                                     #include <shadow.h>
12629 int
12630 main ()
12631 {
12632 struct spwd *p = getspnam("nobody");
12633                        const char *pw = p->sp_pwdp;
12634   ;
12635   return 0;
12636 }
12637 _ACEOF
12638 rm -f conftest.$ac_objext
12639 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12640   (eval $ac_compile) 2>&5
12641   ac_status=$?
12642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12643   (exit $ac_status); } &&
12644          { ac_try='test -s conftest.$ac_objext'
12645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12646   (eval $ac_try) 2>&5
12647   ac_status=$?
12648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12649   (exit $ac_status); }; }; then
12650   ac_cv_shadow=yes
12651 else
12652   echo "$as_me: failed program was:" >&5
12653 sed 's/^/| /' conftest.$ac_ext >&5
12654
12655 ac_cv_shadow=no
12656 fi
12657 rm -f conftest.$ac_objext conftest.$ac_ext
12658   CPPFLAGS="$ac_save_CPPFLAGS"
12659 fi
12660 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
12661 echo "${ECHO_T}$ac_cv_shadow" >&6
12662   if test "$ac_cv_shadow" = yes; then
12663     have_shadow=yes
12664     need_setuid=yes
12665
12666     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
12667     have_getspnam=no
12668     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
12669 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
12670 if test "${ac_cv_lib_c_getspnam+set}" = set; then
12671   echo $ECHO_N "(cached) $ECHO_C" >&6
12672 else
12673   ac_check_lib_save_LIBS=$LIBS
12674 LIBS="-lc  $LIBS"
12675 cat >conftest.$ac_ext <<_ACEOF
12676 #line $LINENO "configure"
12677 /* confdefs.h.  */
12678 _ACEOF
12679 cat confdefs.h >>conftest.$ac_ext
12680 cat >>conftest.$ac_ext <<_ACEOF
12681 /* end confdefs.h.  */
12682
12683 /* Override any gcc2 internal prototype to avoid an error.  */
12684 #ifdef __cplusplus
12685 extern "C"
12686 #endif
12687 /* We use char because int might match the return type of a gcc2
12688    builtin and then its argument prototype would still apply.  */
12689 char getspnam ();
12690 int
12691 main ()
12692 {
12693 getspnam ();
12694   ;
12695   return 0;
12696 }
12697 _ACEOF
12698 rm -f conftest.$ac_objext conftest$ac_exeext
12699 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12700   (eval $ac_link) 2>&5
12701   ac_status=$?
12702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12703   (exit $ac_status); } &&
12704          { ac_try='test -s conftest$ac_exeext'
12705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12706   (eval $ac_try) 2>&5
12707   ac_status=$?
12708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12709   (exit $ac_status); }; }; then
12710   ac_cv_lib_c_getspnam=yes
12711 else
12712   echo "$as_me: failed program was:" >&5
12713 sed 's/^/| /' conftest.$ac_ext >&5
12714
12715 ac_cv_lib_c_getspnam=no
12716 fi
12717 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12718 LIBS=$ac_check_lib_save_LIBS
12719 fi
12720 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
12721 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
12722 if test $ac_cv_lib_c_getspnam = yes; then
12723   have_getspnam=yes
12724 fi
12725
12726     if test "$have_getspnam" = no ; then
12727       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
12728 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
12729 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
12730   echo $ECHO_N "(cached) $ECHO_C" >&6
12731 else
12732   ac_check_lib_save_LIBS=$LIBS
12733 LIBS="-lgen  $LIBS"
12734 cat >conftest.$ac_ext <<_ACEOF
12735 #line $LINENO "configure"
12736 /* confdefs.h.  */
12737 _ACEOF
12738 cat confdefs.h >>conftest.$ac_ext
12739 cat >>conftest.$ac_ext <<_ACEOF
12740 /* end confdefs.h.  */
12741
12742 /* Override any gcc2 internal prototype to avoid an error.  */
12743 #ifdef __cplusplus
12744 extern "C"
12745 #endif
12746 /* We use char because int might match the return type of a gcc2
12747    builtin and then its argument prototype would still apply.  */
12748 char getspnam ();
12749 int
12750 main ()
12751 {
12752 getspnam ();
12753   ;
12754   return 0;
12755 }
12756 _ACEOF
12757 rm -f conftest.$ac_objext conftest$ac_exeext
12758 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12759   (eval $ac_link) 2>&5
12760   ac_status=$?
12761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12762   (exit $ac_status); } &&
12763          { ac_try='test -s conftest$ac_exeext'
12764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12765   (eval $ac_try) 2>&5
12766   ac_status=$?
12767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12768   (exit $ac_status); }; }; then
12769   ac_cv_lib_gen_getspnam=yes
12770 else
12771   echo "$as_me: failed program was:" >&5
12772 sed 's/^/| /' conftest.$ac_ext >&5
12773
12774 ac_cv_lib_gen_getspnam=no
12775 fi
12776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12777 LIBS=$ac_check_lib_save_LIBS
12778 fi
12779 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
12780 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
12781 if test $ac_cv_lib_gen_getspnam = yes; then
12782   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
12783 fi
12784
12785     fi
12786   fi
12787 fi
12788
12789
12790 ###############################################################################
12791 #
12792 #       Check for other libraries needed for non-shadow passwords.
12793 #
12794 ###############################################################################
12795
12796 if test "$enable_locking" = yes ; then
12797
12798   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
12799   have_crypt=no
12800   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
12801 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
12802 if test "${ac_cv_lib_c_crypt+set}" = set; then
12803   echo $ECHO_N "(cached) $ECHO_C" >&6
12804 else
12805   ac_check_lib_save_LIBS=$LIBS
12806 LIBS="-lc  $LIBS"
12807 cat >conftest.$ac_ext <<_ACEOF
12808 #line $LINENO "configure"
12809 /* confdefs.h.  */
12810 _ACEOF
12811 cat confdefs.h >>conftest.$ac_ext
12812 cat >>conftest.$ac_ext <<_ACEOF
12813 /* end confdefs.h.  */
12814
12815 /* Override any gcc2 internal prototype to avoid an error.  */
12816 #ifdef __cplusplus
12817 extern "C"
12818 #endif
12819 /* We use char because int might match the return type of a gcc2
12820    builtin and then its argument prototype would still apply.  */
12821 char crypt ();
12822 int
12823 main ()
12824 {
12825 crypt ();
12826   ;
12827   return 0;
12828 }
12829 _ACEOF
12830 rm -f conftest.$ac_objext conftest$ac_exeext
12831 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12832   (eval $ac_link) 2>&5
12833   ac_status=$?
12834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12835   (exit $ac_status); } &&
12836          { ac_try='test -s conftest$ac_exeext'
12837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12838   (eval $ac_try) 2>&5
12839   ac_status=$?
12840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12841   (exit $ac_status); }; }; then
12842   ac_cv_lib_c_crypt=yes
12843 else
12844   echo "$as_me: failed program was:" >&5
12845 sed 's/^/| /' conftest.$ac_ext >&5
12846
12847 ac_cv_lib_c_crypt=no
12848 fi
12849 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12850 LIBS=$ac_check_lib_save_LIBS
12851 fi
12852 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
12853 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
12854 if test $ac_cv_lib_c_crypt = yes; then
12855   have_crypt=yes
12856 fi
12857
12858   if test "$have_crypt" = no ; then
12859     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
12860 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
12861 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
12862   echo $ECHO_N "(cached) $ECHO_C" >&6
12863 else
12864   ac_check_lib_save_LIBS=$LIBS
12865 LIBS="-lcrypt  $LIBS"
12866 cat >conftest.$ac_ext <<_ACEOF
12867 #line $LINENO "configure"
12868 /* confdefs.h.  */
12869 _ACEOF
12870 cat confdefs.h >>conftest.$ac_ext
12871 cat >>conftest.$ac_ext <<_ACEOF
12872 /* end confdefs.h.  */
12873
12874 /* Override any gcc2 internal prototype to avoid an error.  */
12875 #ifdef __cplusplus
12876 extern "C"
12877 #endif
12878 /* We use char because int might match the return type of a gcc2
12879    builtin and then its argument prototype would still apply.  */
12880 char crypt ();
12881 int
12882 main ()
12883 {
12884 crypt ();
12885   ;
12886   return 0;
12887 }
12888 _ACEOF
12889 rm -f conftest.$ac_objext conftest$ac_exeext
12890 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12891   (eval $ac_link) 2>&5
12892   ac_status=$?
12893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12894   (exit $ac_status); } &&
12895          { ac_try='test -s conftest$ac_exeext'
12896   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12897   (eval $ac_try) 2>&5
12898   ac_status=$?
12899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12900   (exit $ac_status); }; }; then
12901   ac_cv_lib_crypt_crypt=yes
12902 else
12903   echo "$as_me: failed program was:" >&5
12904 sed 's/^/| /' conftest.$ac_ext >&5
12905
12906 ac_cv_lib_crypt_crypt=no
12907 fi
12908 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12909 LIBS=$ac_check_lib_save_LIBS
12910 fi
12911 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
12912 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
12913 if test $ac_cv_lib_crypt_crypt = yes; then
12914   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
12915 fi
12916
12917   fi
12918 fi
12919
12920
12921 # Most of the above shadow mechanisms will have set need_setuid to yes,
12922 # if they were found.  But, on some systems, we need setuid even when
12923 # using plain old vanilla passwords.
12924 #
12925 if test "$enable_locking" = yes ; then
12926   case "$host" in
12927     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
12928       need_setuid=yes
12929     ;;
12930   esac
12931 fi
12932
12933
12934 if test "$have_shadow_adjunct" = yes ; then
12935   cat >>confdefs.h <<\_ACEOF
12936 #define HAVE_ADJUNCT_PASSWD 1
12937 _ACEOF
12938
12939 elif test "$have_shadow_enhanced" = yes ; then
12940   cat >>confdefs.h <<\_ACEOF
12941 #define HAVE_ENHANCED_PASSWD 1
12942 _ACEOF
12943
12944 elif test "$have_shadow_hpux" = yes ; then
12945   cat >>confdefs.h <<\_ACEOF
12946 #define HAVE_HPUX_PASSWD 1
12947 _ACEOF
12948
12949 elif test "$have_shadow" = yes ; then
12950   cat >>confdefs.h <<\_ACEOF
12951 #define HAVE_SHADOW_PASSWD 1
12952 _ACEOF
12953
12954 fi
12955
12956
12957 ###############################################################################
12958 #
12959 #       Check for external password helper
12960 #       On SuSE, instead of having xscreensaver be a setuid program, they
12961 #       fork an external program that takes the password on stdin, and
12962 #       returns true if that password is a valid one.  Then only that
12963 #       smaller program needs to be setuid.
12964 #
12965 #       (Note that this external program is not a GUI: the GUI is still
12966 #       all in xscreensaver itself; the external program just does auth.)
12967 #
12968 ###############################################################################
12969
12970 have_passwd_helper=no
12971 with_passwd_helper_req=unspecified
12972
12973
12974 # Check whether --with-passwd-helper or --without-passwd-helper was given.
12975 if test "${with_passwd_helper+set}" = set; then
12976   withval="$with_passwd_helper"
12977   with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
12978 else
12979   with_passwd_helper=no
12980 fi;
12981 # no HANDLE_X_PATH_ARG for this one
12982
12983 if test "$enable_locking" = no ; then
12984   with_passwd_helper_req=no
12985   with_passwd_helper=no
12986 fi
12987
12988 case "$with_passwd_helper" in
12989   ""|no) : ;;
12990   /*)
12991     cat >>confdefs.h <<_ACEOF
12992 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
12993 _ACEOF
12994
12995     have_passwd_helper=yes;;
12996   *)
12997     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
12998     exit 1
12999 esac
13000
13001
13002 ###############################################################################
13003 #
13004 #       Check for -lXm.
13005 #
13006 ###############################################################################
13007
13008 have_motif=no
13009 with_motif_req=unspecified
13010
13011 # Check whether --with-motif or --without-motif was given.
13012 if test "${with_motif+set}" = set; then
13013   withval="$with_motif"
13014   with_motif="$withval"; with_motif_req="$withval"
13015 else
13016   with_motif=no
13017 fi;
13018
13019
13020    case "$with_motif" in
13021     yes) ;;
13022     no)  ;;
13023
13024     /*)
13025      echo "$as_me:$LINENO: checking for Motif headers" >&5
13026 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
13027      d=$with_motif/include
13028      if test -d $d; then
13029        X_CFLAGS="-I$d $X_CFLAGS"
13030        echo "$as_me:$LINENO: result: $d" >&5
13031 echo "${ECHO_T}$d" >&6
13032      else
13033        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13034 echo "${ECHO_T}not found ($d: no such directory)" >&6
13035      fi
13036
13037      echo "$as_me:$LINENO: checking for Motif libs" >&5
13038 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
13039      d=$with_motif/lib
13040      if test -d $d; then
13041        X_LIBS="-L$d $X_LIBS"
13042        echo "$as_me:$LINENO: result: $d" >&5
13043 echo "${ECHO_T}$d" >&6
13044      else
13045        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13046 echo "${ECHO_T}not found ($d: no such directory)" >&6
13047      fi
13048
13049      # replace the directory string with "yes".
13050      with_motif_req="yes"
13051      with_motif=$with_motif_req
13052      ;;
13053
13054     *)
13055      echo ""
13056      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
13057      echo "       If it is a directory, then \`DIR/include' will be added to"
13058      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13059      exit 1
13060      ;;
13061    esac
13062
13063
13064 if test "$with_motif" != yes -a "$with_motif" != no ; then
13065   echo "error: must be yes or no: --with-motif=$with_motif"
13066   exit 1
13067 fi
13068
13069 if test "$with_motif" = yes; then
13070   have_motif=no
13071
13072   ac_save_CPPFLAGS="$CPPFLAGS"
13073   if test \! -z "$includedir" ; then
13074     CPPFLAGS="$CPPFLAGS -I$includedir"
13075   fi
13076   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13077   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
13078 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
13079 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
13080   echo $ECHO_N "(cached) $ECHO_C" >&6
13081 else
13082   cat >conftest.$ac_ext <<_ACEOF
13083 #line $LINENO "configure"
13084 /* confdefs.h.  */
13085 _ACEOF
13086 cat confdefs.h >>conftest.$ac_ext
13087 cat >>conftest.$ac_ext <<_ACEOF
13088 /* end confdefs.h.  */
13089 #include <stdlib.h>
13090                      #include <stdio.h>
13091                      #include <X11/Intrinsic.h>
13092
13093 #include <Xm/Xm.h>
13094 _ACEOF
13095 rm -f conftest.$ac_objext
13096 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13097   (eval $ac_compile) 2>&5
13098   ac_status=$?
13099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13100   (exit $ac_status); } &&
13101          { ac_try='test -s conftest.$ac_objext'
13102   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13103   (eval $ac_try) 2>&5
13104   ac_status=$?
13105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13106   (exit $ac_status); }; }; then
13107   ac_cv_header_Xm_Xm_h=yes
13108 else
13109   echo "$as_me: failed program was:" >&5
13110 sed 's/^/| /' conftest.$ac_ext >&5
13111
13112 ac_cv_header_Xm_Xm_h=no
13113 fi
13114 rm -f conftest.$ac_objext conftest.$ac_ext
13115 fi
13116 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
13117 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
13118 if test $ac_cv_header_Xm_Xm_h = yes; then
13119   have_motif=yes
13120                      cat >>confdefs.h <<\_ACEOF
13121 #define HAVE_MOTIF 1
13122 _ACEOF
13123
13124                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
13125 fi
13126
13127
13128   CPPFLAGS="$ac_save_CPPFLAGS"
13129 fi
13130
13131
13132 if test "$have_motif" = yes; then
13133
13134   ac_save_CPPFLAGS="$CPPFLAGS"
13135   if test \! -z "$includedir" ; then
13136     CPPFLAGS="$CPPFLAGS -I$includedir"
13137   fi
13138   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13139   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
13140 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
13141 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
13142   echo $ECHO_N "(cached) $ECHO_C" >&6
13143 else
13144   cat >conftest.$ac_ext <<_ACEOF
13145 #line $LINENO "configure"
13146 /* confdefs.h.  */
13147 _ACEOF
13148 cat confdefs.h >>conftest.$ac_ext
13149 cat >>conftest.$ac_ext <<_ACEOF
13150 /* end confdefs.h.  */
13151 #include <stdlib.h>
13152                      #include <stdio.h>
13153                      #include <X11/Intrinsic.h>
13154
13155 #include <Xm/ComboBox.h>
13156 _ACEOF
13157 rm -f conftest.$ac_objext
13158 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13159   (eval $ac_compile) 2>&5
13160   ac_status=$?
13161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13162   (exit $ac_status); } &&
13163          { ac_try='test -s conftest.$ac_objext'
13164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13165   (eval $ac_try) 2>&5
13166   ac_status=$?
13167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13168   (exit $ac_status); }; }; then
13169   ac_cv_header_Xm_ComboBox_h=yes
13170 else
13171   echo "$as_me: failed program was:" >&5
13172 sed 's/^/| /' conftest.$ac_ext >&5
13173
13174 ac_cv_header_Xm_ComboBox_h=no
13175 fi
13176 rm -f conftest.$ac_objext conftest.$ac_ext
13177 fi
13178 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
13179 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
13180 if test $ac_cv_header_Xm_ComboBox_h = yes; then
13181   cat >>confdefs.h <<\_ACEOF
13182 #define HAVE_XMCOMBOBOX 1
13183 _ACEOF
13184
13185 fi
13186
13187
13188   CPPFLAGS="$ac_save_CPPFLAGS"
13189 fi
13190
13191
13192 ###############################################################################
13193 #
13194 #       Check for -lgtk (and Gnome stuff)
13195 #
13196 ###############################################################################
13197
13198 have_gtk=no
13199 have_gtk2=no
13200 with_gtk_req=unspecified
13201
13202 # Check whether --with-gtk or --without-gtk was given.
13203 if test "${with_gtk+set}" = set; then
13204   withval="$with_gtk"
13205   with_gtk="$withval"; with_gtk_req="$withval"
13206 else
13207   with_gtk=yes
13208 fi;
13209
13210 # if --with-gtk=/directory/ was specified, remember that directory so that
13211 # we can also look for the `gtk-config' program in that directory.
13212 case "$with_gtk" in
13213   /*)
13214     gtk_dir="$with_gtk"
13215     ;;
13216   *)
13217     gtk_dir=""
13218     ;;
13219 esac
13220
13221
13222    case "$with_gtk" in
13223     yes) ;;
13224     no)  ;;
13225
13226     /*)
13227      echo "$as_me:$LINENO: checking for Gtk headers" >&5
13228 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
13229      d=$with_gtk/include
13230      if test -d $d; then
13231        X_CFLAGS="-I$d $X_CFLAGS"
13232        echo "$as_me:$LINENO: result: $d" >&5
13233 echo "${ECHO_T}$d" >&6
13234      else
13235        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13236 echo "${ECHO_T}not found ($d: no such directory)" >&6
13237      fi
13238
13239      echo "$as_me:$LINENO: checking for Gtk libs" >&5
13240 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
13241      d=$with_gtk/lib
13242      if test -d $d; then
13243        X_LIBS="-L$d $X_LIBS"
13244        echo "$as_me:$LINENO: result: $d" >&5
13245 echo "${ECHO_T}$d" >&6
13246      else
13247        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13248 echo "${ECHO_T}not found ($d: no such directory)" >&6
13249      fi
13250
13251      # replace the directory string with "yes".
13252      with_gtk_req="yes"
13253      with_gtk=$with_gtk_req
13254      ;;
13255
13256     *)
13257      echo ""
13258      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
13259      echo "       If it is a directory, then \`DIR/include' will be added to"
13260      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13261      exit 1
13262      ;;
13263    esac
13264
13265
13266 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
13267   echo "error: must be yes or no: --with-gtk=$with_gtk"
13268   exit 1
13269 fi
13270
13271 have_gnome=no
13272 with_gnome_req=unspecified
13273
13274 # Check whether --with-gnome or --without-gnome was given.
13275 if test "${with_gnome+set}" = set; then
13276   withval="$with_gnome"
13277   with_gnome="$withval"; with_gnome_req="$withval"
13278 else
13279   with_gnome=yes
13280 fi;
13281
13282 # if --with-gnome=/directory/ was specified, remember that directory so that
13283 # we can also look for the `gnome-config' program in that directory.
13284 case "$with_gnome" in
13285   /*)
13286     gnome_dir="$with_gnome"
13287     ;;
13288   *)
13289     gnome_dir=""
13290     ;;
13291 esac
13292
13293
13294    case "$with_gnome" in
13295     yes) ;;
13296     no)  ;;
13297
13298     /*)
13299      echo "$as_me:$LINENO: checking for Gnome headers" >&5
13300 echo $ECHO_N "checking for Gnome headers... $ECHO_C" >&6
13301      d=$with_gnome/include
13302      if test -d $d; then
13303        X_CFLAGS="-I$d $X_CFLAGS"
13304        echo "$as_me:$LINENO: result: $d" >&5
13305 echo "${ECHO_T}$d" >&6
13306      else
13307        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13308 echo "${ECHO_T}not found ($d: no such directory)" >&6
13309      fi
13310
13311      echo "$as_me:$LINENO: checking for Gnome libs" >&5
13312 echo $ECHO_N "checking for Gnome libs... $ECHO_C" >&6
13313      d=$with_gnome/lib
13314      if test -d $d; then
13315        X_LIBS="-L$d $X_LIBS"
13316        echo "$as_me:$LINENO: result: $d" >&5
13317 echo "${ECHO_T}$d" >&6
13318      else
13319        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13320 echo "${ECHO_T}not found ($d: no such directory)" >&6
13321      fi
13322
13323      # replace the directory string with "yes".
13324      with_gnome_req="yes"
13325      with_gnome=$with_gnome_req
13326      ;;
13327
13328     *)
13329      echo ""
13330      echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
13331      echo "       If it is a directory, then \`DIR/include' will be added to"
13332      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13333      exit 1
13334      ;;
13335    esac
13336
13337
13338 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
13339   echo "error: must be yes or no: --with-gnome=$with_gnome"
13340   exit 1
13341 fi
13342
13343 parse_gtk_version_string() {
13344   # M4 sucks!!
13345
13346   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
13347   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
13348
13349   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
13350   if test -z "$ac_gtk_version"; then
13351     ac_gtk_version=unknown
13352     ac_gtk_version_string=unknown
13353   fi
13354 }
13355
13356
13357 jurassic_gtk=no
13358 gtk2_halfassed=no
13359
13360 if test "$with_gtk" = yes; then
13361   have_gtk=no
13362
13363   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
13364   # look in /foo/bin/ for glib-config, gtk-config, and gnome-config.
13365   #
13366   gtk_path="$PATH"
13367
13368   if test ! -z "$gtk_dir"; then
13369     # canonicalize slashes.
13370     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
13371     gtk_path="$foo:$gtk_path"
13372   fi
13373
13374   if test ! -z "$gnome_dir"; then
13375     # canonicalize slashes.
13376     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
13377     gtk_path="$foo:$gtk_path"
13378   fi
13379
13380   for ac_prog in pkg-config
13381 do
13382   # Extract the first word of "$ac_prog", so it can be a program name with args.
13383 set dummy $ac_prog; ac_word=$2
13384 echo "$as_me:$LINENO: checking for $ac_word" >&5
13385 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13386 if test "${ac_cv_path_pkg_config+set}" = set; then
13387   echo $ECHO_N "(cached) $ECHO_C" >&6
13388 else
13389   case $pkg_config in
13390   [\\/]* | ?:[\\/]*)
13391   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
13392   ;;
13393   *)
13394   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13395 for as_dir in $gtk_path
13396 do
13397   IFS=$as_save_IFS
13398   test -z "$as_dir" && as_dir=.
13399   for ac_exec_ext in '' $ac_executable_extensions; do
13400   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13401     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
13402     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13403     break 2
13404   fi
13405 done
13406 done
13407
13408   ;;
13409 esac
13410 fi
13411 pkg_config=$ac_cv_path_pkg_config
13412
13413 if test -n "$pkg_config"; then
13414   echo "$as_me:$LINENO: result: $pkg_config" >&5
13415 echo "${ECHO_T}$pkg_config" >&6
13416 else
13417   echo "$as_me:$LINENO: result: no" >&5
13418 echo "${ECHO_T}no" >&6
13419 fi
13420
13421   test -n "$pkg_config" && break
13422 done
13423
13424
13425   if test -n "$pkg_config" ; then
13426     #
13427     # the new way...
13428     # run pkg-config based tests.
13429     #
13430     pkgs=''
13431     pkg_check_version() {
13432       if test "$ok" = yes ; then
13433         req="$1"
13434         min="$2"
13435         echo "$as_me:$LINENO: checking for $req" >&5
13436 echo $ECHO_N "checking for $req... $ECHO_C" >&6
13437         if $pkg_config --exists "$req" ; then
13438           vers=`$pkg_config --modversion "$req"`
13439           if $pkg_config --exists "$req >= $min" ; then
13440             echo "$as_me:$LINENO: result: $vers" >&5
13441 echo "${ECHO_T}$vers" >&6
13442             pkgs="$pkgs $req"
13443             return 1
13444           else
13445             echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
13446 echo "${ECHO_T}$vers (wanted >= $min)" >&6
13447             ok=no
13448             return 0
13449           fi
13450         else
13451           echo "$as_me:$LINENO: result: no" >&5
13452 echo "${ECHO_T}no" >&6
13453           ok=no
13454           return 0
13455         fi
13456       fi
13457     }
13458
13459     echo "$as_me:$LINENO: result: checking for GTK 2.x with pkg-config based tests..." >&5
13460 echo "${ECHO_T}checking for GTK 2.x with pkg-config based tests..." >&6
13461
13462     ok="yes"
13463     pkg_check_version       gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
13464     pkg_check_version    gmodule-2.0  2.0.0
13465     pkg_check_version     libxml-2.0  2.4.6
13466     pkg_check_version   libglade-2.0  1.99.0
13467 #   pkg_check_version gdk_pixbuf      0.1
13468     have_gtk="$ok"
13469
13470     if test "$have_gtk" = yes; then
13471       have_gtk2=yes
13472       cat >>confdefs.h <<\_ACEOF
13473 #define HAVE_GTK2 1
13474 _ACEOF
13475
13476     else
13477       if test -n "$ac_gtk_version_string" ; then
13478         gtk2_halfassed="$ac_gtk_version_string"
13479         gtk2_halfassed_lib="$req"
13480       fi
13481     fi
13482
13483     if test "$have_gtk" = no; then
13484       #
13485       # we don't have GTK 2.  Let's look for GTK 1.
13486       #
13487       echo "$as_me:$LINENO: result: checking for GTK 1.x with pkg-config based tests..." >&5
13488 echo "${ECHO_T}checking for GTK 1.x with pkg-config based tests..." >&6
13489
13490       pkgs=''
13491       ok="yes"
13492       pkg_check_version gtk+       1.2     ; ac_gtk_version_string="$vers"
13493       pkg_check_version glib       1.0
13494       pkg_check_version gdk_pixbuf 0.1
13495       have_gtk="$ok"
13496
13497       # Now check for Gnome...
13498       #
13499       if test "$have_gtk" = yes -a "$with_gnome" = yes; then
13500         old_pkgs="$pkgs"
13501         ok=yes
13502         pkg_check_version capplet    1.0
13503         pkg_check_version gnomeui    1.0
13504         pkg_check_version gdk_pixbuf 0.1
13505         have_gnome="$ok"
13506
13507         if test "$have_gnome" = no; then
13508           pkgs="$old_pkgs"
13509         else
13510           cat >>confdefs.h <<\_ACEOF
13511 #define HAVE_CRAPPLET 1
13512 _ACEOF
13513
13514         fi
13515       fi
13516     fi
13517
13518     if test "$have_gtk" = yes; then
13519       parse_gtk_version_string
13520       jurassic_gtk=no
13521     else
13522       have_gnome=no
13523     fi
13524
13525     if test "$have_gtk" = yes; then
13526       echo "$as_me:$LINENO: checking for Gtk includes" >&5
13527 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
13528 if test "${ac_cv_gtk_config_cflags+set}" = set; then
13529   echo $ECHO_N "(cached) $ECHO_C" >&6
13530 else
13531   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
13532 fi
13533 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
13534 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
13535       echo "$as_me:$LINENO: checking for Gtk libs" >&5
13536 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
13537 if test "${ac_cv_gtk_config_libs+set}" = set; then
13538   echo $ECHO_N "(cached) $ECHO_C" >&6
13539 else
13540   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
13541 fi
13542 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
13543 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
13544     fi
13545     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
13546     ac_gtk_config_libs=$ac_cv_gtk_config_libs
13547
13548     ac_gnome_config_cflags=$ac_gtk_config_cflags
13549     ac_gnome_config_libs=$ac_gtk_config_libs
13550
13551   else
13552     #
13553     # the old way...
13554     # run {gnome,gtk}-config based tests.
13555     #
13556     echo "$as_me:$LINENO: result: checking for GTK 1.x with gtk-config based tests..." >&5
13557 echo "${ECHO_T}checking for GTK 1.x with gtk-config based tests..." >&6
13558
13559     for ac_prog in glib12-config glib-config
13560 do
13561   # Extract the first word of "$ac_prog", so it can be a program name with args.
13562 set dummy $ac_prog; ac_word=$2
13563 echo "$as_me:$LINENO: checking for $ac_word" >&5
13564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13565 if test "${ac_cv_path_glib_config+set}" = set; then
13566   echo $ECHO_N "(cached) $ECHO_C" >&6
13567 else
13568   case $glib_config in
13569   [\\/]* | ?:[\\/]*)
13570   ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
13571   ;;
13572   *)
13573   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13574 for as_dir in $gtk_path
13575 do
13576   IFS=$as_save_IFS
13577   test -z "$as_dir" && as_dir=.
13578   for ac_exec_ext in '' $ac_executable_extensions; do
13579   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13580     ac_cv_path_glib_config="$as_dir/$ac_word$ac_exec_ext"
13581     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13582     break 2
13583   fi
13584 done
13585 done
13586
13587   ;;
13588 esac
13589 fi
13590 glib_config=$ac_cv_path_glib_config
13591
13592 if test -n "$glib_config"; then
13593   echo "$as_me:$LINENO: result: $glib_config" >&5
13594 echo "${ECHO_T}$glib_config" >&6
13595 else
13596   echo "$as_me:$LINENO: result: no" >&5
13597 echo "${ECHO_T}no" >&6
13598 fi
13599
13600   test -n "$glib_config" && break
13601 done
13602
13603     for ac_prog in gtk12-config  gtk-config
13604 do
13605   # Extract the first word of "$ac_prog", so it can be a program name with args.
13606 set dummy $ac_prog; ac_word=$2
13607 echo "$as_me:$LINENO: checking for $ac_word" >&5
13608 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13609 if test "${ac_cv_path_gtk_config+set}" = set; then
13610   echo $ECHO_N "(cached) $ECHO_C" >&6
13611 else
13612   case $gtk_config in
13613   [\\/]* | ?:[\\/]*)
13614   ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
13615   ;;
13616   *)
13617   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13618 for as_dir in $gtk_path
13619 do
13620   IFS=$as_save_IFS
13621   test -z "$as_dir" && as_dir=.
13622   for ac_exec_ext in '' $ac_executable_extensions; do
13623   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13624     ac_cv_path_gtk_config="$as_dir/$ac_word$ac_exec_ext"
13625     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13626     break 2
13627   fi
13628 done
13629 done
13630
13631   ;;
13632 esac
13633 fi
13634 gtk_config=$ac_cv_path_gtk_config
13635
13636 if test -n "$gtk_config"; then
13637   echo "$as_me:$LINENO: result: $gtk_config" >&5
13638 echo "${ECHO_T}$gtk_config" >&6
13639 else
13640   echo "$as_me:$LINENO: result: no" >&5
13641 echo "${ECHO_T}no" >&6
13642 fi
13643
13644   test -n "$gtk_config" && break
13645 done
13646
13647
13648     if test "$with_gnome" = yes; then
13649       for ac_prog in gnome-config
13650 do
13651   # Extract the first word of "$ac_prog", so it can be a program name with args.
13652 set dummy $ac_prog; ac_word=$2
13653 echo "$as_me:$LINENO: checking for $ac_word" >&5
13654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13655 if test "${ac_cv_path_gnome_config+set}" = set; then
13656   echo $ECHO_N "(cached) $ECHO_C" >&6
13657 else
13658   case $gnome_config in
13659   [\\/]* | ?:[\\/]*)
13660   ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
13661   ;;
13662   *)
13663   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13664 for as_dir in $gtk_path
13665 do
13666   IFS=$as_save_IFS
13667   test -z "$as_dir" && as_dir=.
13668   for ac_exec_ext in '' $ac_executable_extensions; do
13669   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13670     ac_cv_path_gnome_config="$as_dir/$ac_word$ac_exec_ext"
13671     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13672     break 2
13673   fi
13674 done
13675 done
13676
13677   ;;
13678 esac
13679 fi
13680 gnome_config=$ac_cv_path_gnome_config
13681
13682 if test -n "$gnome_config"; then
13683   echo "$as_me:$LINENO: result: $gnome_config" >&5
13684 echo "${ECHO_T}$gnome_config" >&6
13685 else
13686   echo "$as_me:$LINENO: result: no" >&5
13687 echo "${ECHO_T}no" >&6
13688 fi
13689
13690   test -n "$gnome_config" && break
13691 done
13692
13693     fi
13694
13695     if test -n "$glib_config" -a  -n "$gtk_config" ; then
13696       have_gtk=yes
13697       if test "$with_gnome" = yes -a -n "$gnome_config" ; then
13698         have_gnome=yes
13699       fi
13700     fi
13701
13702     if test "$have_gtk" = yes; then
13703       echo "$as_me:$LINENO: checking Gtk version number" >&5
13704 echo $ECHO_N "checking Gtk version number... $ECHO_C" >&6
13705 if test "${ac_cv_gtk_version_string+set}" = set; then
13706   echo $ECHO_N "(cached) $ECHO_C" >&6
13707 else
13708   ac_cv_gtk_version_string=`$gtk_config --version`
13709 fi
13710 echo "$as_me:$LINENO: result: $ac_cv_gtk_version_string" >&5
13711 echo "${ECHO_T}$ac_cv_gtk_version_string" >&6
13712       ac_gtk_version_string=$ac_cv_gtk_version_string
13713       parse_gtk_version_string
13714     fi
13715
13716     if test "$have_gtk" = yes; then
13717       if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
13718       then
13719         have_gtk=no
13720         have_gnome=no
13721         jurassic_gtk=yes
13722       fi
13723     fi
13724
13725     if test "$have_gtk" = yes; then
13726       echo "$as_me:$LINENO: checking for Gtk includes" >&5
13727 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
13728 if test "${ac_cv_gtk_config_cflags+set}" = set; then
13729   echo $ECHO_N "(cached) $ECHO_C" >&6
13730 else
13731   ac_cv_gtk_config_cflags=`$gtk_config --cflags`
13732 fi
13733 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
13734 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
13735       echo "$as_me:$LINENO: checking for Gtk libs" >&5
13736 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
13737 if test "${ac_cv_gtk_config_libs+set}" = set; then
13738   echo $ECHO_N "(cached) $ECHO_C" >&6
13739 else
13740   ac_cv_gtk_config_libs=`$gtk_config --libs`
13741 fi
13742 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
13743 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
13744     fi
13745     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
13746     ac_gtk_config_libs=$ac_cv_gtk_config_libs
13747
13748     # Check for Gnome Capplet support.
13749     # Note that this is only needed with Gnome 1.x, not Gnome 2.x.
13750     # In a Gnome 2.x world, libcapplet will not exist.
13751     # (In fact, this likely won't even be checked, since in a Gnome 2.x
13752     # world, we will probably be up in the "$pkg_config" branch instead
13753     # of here in the "$gnome_config" branch.)
13754     #
13755     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13756       gnome_config_libs="gtk capplet gnomeui gdk_pixbuf"
13757       echo "$as_me:$LINENO: checking for Gnome capplet includes" >&5
13758 echo $ECHO_N "checking for Gnome capplet includes... $ECHO_C" >&6
13759       if test "${ac_cv_gnome_config_cflags+set}" = set; then
13760   echo $ECHO_N "(cached) $ECHO_C" >&6
13761 else
13762   if ( $gnome_config --cflags $gnome_config_libs 2>&1 | \
13763               grep Unknown >/dev/null ) ; then
13764            ac_cv_gnome_config_cflags=''
13765          else
13766           ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
13767          fi
13768 fi
13769
13770       ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
13771       if test "$ac_gnome_config_cflags" = "" ; then
13772         have_gnome=no
13773         echo "$as_me:$LINENO: result: no" >&5
13774 echo "${ECHO_T}no" >&6
13775       else
13776         echo "$as_me:$LINENO: result: $ac_gnome_config_cflags" >&5
13777 echo "${ECHO_T}$ac_gnome_config_cflags" >&6
13778       fi
13779     fi
13780
13781     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13782       echo "$as_me:$LINENO: checking for Gnome capplet libs" >&5
13783 echo $ECHO_N "checking for Gnome capplet libs... $ECHO_C" >&6
13784       if test "${ac_cv_gnome_config_libs+set}" = set; then
13785   echo $ECHO_N "(cached) $ECHO_C" >&6
13786 else
13787   if ( $gnome_config --libs $gnome_config_libs 2>&1 |
13788               grep Unknown >/dev/null ) ; then
13789            ac_cv_gnome_config_libs=''
13790          else
13791            ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
13792          fi
13793 fi
13794
13795       ac_gnome_config_libs=$ac_cv_gnome_config_libs
13796       if test "$ac_gnome_config_libs" = "" ; then
13797         have_gnome=no
13798         echo "$as_me:$LINENO: result: no" >&5
13799 echo "${ECHO_T}no" >&6
13800       else
13801         echo "$as_me:$LINENO: result: $ac_gnome_config_libs" >&5
13802 echo "${ECHO_T}$ac_gnome_config_libs" >&6
13803       fi
13804     fi
13805
13806     # If we have Gnome, then override the gtk-config values with
13807     # the gnome-config values.
13808     #
13809     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13810       ac_gtk_config_cflags=$ac_gnome_config_cflags
13811       ac_gtk_config_libs=$ac_gnome_config_libs
13812       cat >>confdefs.h <<\_ACEOF
13813 #define HAVE_CRAPPLET 1
13814 _ACEOF
13815
13816     fi
13817
13818   fi   # end of {gnome,gtk}-config based tests
13819
13820   if test "$have_gtk" = yes -a "$have_gtk2" = no; then
13821     # check for this function that was not in libcapplet 1.2.
13822     # (only needed in Gnome/Gtk 1.x, not Gnome/Gtk 2.x)
13823
13824   ac_save_CPPFLAGS="$CPPFLAGS"
13825   ac_save_LDFLAGS="$LDFLAGS"
13826 #  ac_save_LIBS="$LIBS"
13827
13828   if test \! -z "$includedir" ; then
13829     CPPFLAGS="$CPPFLAGS -I$includedir"
13830   fi
13831   # note: $X_CFLAGS includes $x_includes
13832   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13833
13834   if test \! -z "$libdir" ; then
13835     LDFLAGS="$LDFLAGS -L$libdir"
13836   fi
13837   # note: $X_LIBS includes $x_libraries
13838   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13839
13840   echo "$as_me:$LINENO: checking for capplet_widget_changes_are_immediate in -lcapplet" >&5
13841 echo $ECHO_N "checking for capplet_widget_changes_are_immediate in -lcapplet... $ECHO_C" >&6
13842 if test "${ac_cv_lib_capplet_capplet_widget_changes_are_immediate+set}" = set; then
13843   echo $ECHO_N "(cached) $ECHO_C" >&6
13844 else
13845   ac_check_lib_save_LIBS=$LIBS
13846 LIBS="-lcapplet $ac_gnome_config_libs $LIBS"
13847 cat >conftest.$ac_ext <<_ACEOF
13848 #line $LINENO "configure"
13849 /* confdefs.h.  */
13850 _ACEOF
13851 cat confdefs.h >>conftest.$ac_ext
13852 cat >>conftest.$ac_ext <<_ACEOF
13853 /* end confdefs.h.  */
13854
13855 /* Override any gcc2 internal prototype to avoid an error.  */
13856 #ifdef __cplusplus
13857 extern "C"
13858 #endif
13859 /* We use char because int might match the return type of a gcc2
13860    builtin and then its argument prototype would still apply.  */
13861 char capplet_widget_changes_are_immediate ();
13862 int
13863 main ()
13864 {
13865 capplet_widget_changes_are_immediate ();
13866   ;
13867   return 0;
13868 }
13869 _ACEOF
13870 rm -f conftest.$ac_objext conftest$ac_exeext
13871 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13872   (eval $ac_link) 2>&5
13873   ac_status=$?
13874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13875   (exit $ac_status); } &&
13876          { ac_try='test -s conftest$ac_exeext'
13877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13878   (eval $ac_try) 2>&5
13879   ac_status=$?
13880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13881   (exit $ac_status); }; }; then
13882   ac_cv_lib_capplet_capplet_widget_changes_are_immediate=yes
13883 else
13884   echo "$as_me: failed program was:" >&5
13885 sed 's/^/| /' conftest.$ac_ext >&5
13886
13887 ac_cv_lib_capplet_capplet_widget_changes_are_immediate=no
13888 fi
13889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13890 LIBS=$ac_check_lib_save_LIBS
13891 fi
13892 echo "$as_me:$LINENO: result: $ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&5
13893 echo "${ECHO_T}$ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&6
13894 if test $ac_cv_lib_capplet_capplet_widget_changes_are_immediate = yes; then
13895   cat >>confdefs.h <<\_ACEOF
13896 #define HAVE_CRAPPLET_IMMEDIATE 1
13897 _ACEOF
13898
13899 else
13900   true
13901 fi
13902
13903   CPPFLAGS="$ac_save_CPPFLAGS"
13904   LDFLAGS="$ac_save_LDFLAGS"
13905 #  LIBS="$ac_save_LIBS"
13906
13907   fi
13908
13909
13910   GNOME_DATADIR=""
13911   if test "$have_gtk" = yes; then
13912     if test -n "$pkg_config"; then
13913       if test "$have_gtk2" = yes; then
13914         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
13915       else
13916         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+`
13917       fi
13918     else
13919       GNOME_DATADIR=`$gtk_config --prefix`
13920     fi
13921     GNOME_DATADIR="$GNOME_DATADIR/share"
13922   fi
13923
13924   # .desktop files go in different places in Gnome 1.x and Gnome 2.x...
13925   if test "$have_gtk2" = yes; then
13926     GNOME_PANELDIR='$(GNOME_PANELDIR2)'
13927   else
13928     GNOME_PANELDIR='$(GNOME_PANELDIR1)'
13929   fi
13930
13931
13932   if test "$have_gtk" = yes; then
13933     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
13934     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
13935     cat >>confdefs.h <<\_ACEOF
13936 #define HAVE_GTK 1
13937 _ACEOF
13938
13939
13940     if test "$have_gtk2" = yes; then
13941       GTK_EXTRA_OBJS=""
13942     else
13943       GTK_EXTRA_OBJS="\$(GTK_EXTRA_OBJS)"
13944     fi
13945   fi
13946
13947 fi
13948
13949
13950 # Check for the Gnome Help Browser.
13951 #
13952 if test "$have_gtk" = yes; then
13953   for ac_prog in yelp gnome-help-browser
13954 do
13955   # Extract the first word of "$ac_prog", so it can be a program name with args.
13956 set dummy $ac_prog; ac_word=$2
13957 echo "$as_me:$LINENO: checking for $ac_word" >&5
13958 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13959 if test "${ac_cv_prog_have_gnome_help+set}" = set; then
13960   echo $ECHO_N "(cached) $ECHO_C" >&6
13961 else
13962   if test -n "$have_gnome_help"; then
13963   ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
13964 else
13965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13966 for as_dir in $PATH
13967 do
13968   IFS=$as_save_IFS
13969   test -z "$as_dir" && as_dir=.
13970   for ac_exec_ext in '' $ac_executable_extensions; do
13971   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13972     ac_cv_prog_have_gnome_help="$ac_prog"
13973     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13974     break 2
13975   fi
13976 done
13977 done
13978
13979 fi
13980 fi
13981 have_gnome_help=$ac_cv_prog_have_gnome_help
13982 if test -n "$have_gnome_help"; then
13983   echo "$as_me:$LINENO: result: $have_gnome_help" >&5
13984 echo "${ECHO_T}$have_gnome_help" >&6
13985 else
13986   echo "$as_me:$LINENO: result: no" >&5
13987 echo "${ECHO_T}no" >&6
13988 fi
13989
13990   test -n "$have_gnome_help" && break
13991 done
13992 test -n "$have_gnome_help" || have_gnome_help="no"
13993
13994   if test "$have_gnome_help" != no; then
13995     have_gnome_help=yes
13996   fi
13997 fi
13998
13999
14000 ###############################################################################
14001 #
14002 #       Check for -lxml
14003 #
14004 ###############################################################################
14005
14006 have_xml=no
14007 with_xml_req=unspecified
14008 xml_halfassed=no
14009
14010 # Check whether --with-xml or --without-xml was given.
14011 if test "${with_xml+set}" = set; then
14012   withval="$with_xml"
14013   with_xml="$withval"; with_xml_req="$withval"
14014 else
14015   with_xml=yes
14016 fi;
14017
14018 # if --with-xml=/directory/ was specified, remember that directory so that
14019 # we can also look for the `xml-config' program in that directory.
14020 case "$with_xml" in
14021   /*)
14022     xml_dir="$with_xml"
14023     ;;
14024   *)
14025     xml_dir=""
14026     ;;
14027 esac
14028
14029
14030    case "$with_xml" in
14031     yes) ;;
14032     no)  ;;
14033
14034     /*)
14035      echo "$as_me:$LINENO: checking for XML headers" >&5
14036 echo $ECHO_N "checking for XML headers... $ECHO_C" >&6
14037      d=$with_xml/include
14038      if test -d $d; then
14039        X_CFLAGS="-I$d $X_CFLAGS"
14040        echo "$as_me:$LINENO: result: $d" >&5
14041 echo "${ECHO_T}$d" >&6
14042      else
14043        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14044 echo "${ECHO_T}not found ($d: no such directory)" >&6
14045      fi
14046
14047      echo "$as_me:$LINENO: checking for XML libs" >&5
14048 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
14049      d=$with_xml/lib
14050      if test -d $d; then
14051        X_LIBS="-L$d $X_LIBS"
14052        echo "$as_me:$LINENO: result: $d" >&5
14053 echo "${ECHO_T}$d" >&6
14054      else
14055        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14056 echo "${ECHO_T}not found ($d: no such directory)" >&6
14057      fi
14058
14059      # replace the directory string with "yes".
14060      with_xml_req="yes"
14061      with_xml=$with_xml_req
14062      ;;
14063
14064     *)
14065      echo ""
14066      echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory."
14067      echo "       If it is a directory, then \`DIR/include' will be added to"
14068      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14069      exit 1
14070      ;;
14071    esac
14072
14073
14074 if test "$with_xml" != yes -a "$with_xml" != no ; then
14075   echo "error: must be yes or no: --with-xml=$with_xml"
14076   exit 1
14077 fi
14078
14079 if test "$with_xml" = yes; then
14080   have_xml=no
14081   have_old_xml=no
14082
14083   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
14084   # look in /foo/bin/ for for xml-config.
14085   #
14086   xml_path="$PATH"
14087
14088   if test ! -z "$gtk_dir"; then
14089     # canonicalize slashes.
14090     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
14091     xml_path="$foo:$xml_path"
14092   fi
14093
14094   if test ! -z "$gnome_dir"; then
14095     # canonicalize slashes.
14096     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
14097     xml_path="$foo:$xml_path"
14098   fi
14099
14100   if test -n "$pkg_config" ; then
14101     #
14102     # the new way...
14103     # run pkg-config based tests.
14104     #
14105     pkgs=""
14106     ok="yes"
14107
14108     # If we have Gtk 2.x, then *only* XML 2.x will work.
14109     # If we have Gtk 1.x, or don't have Gtk at all, then
14110     # either XML 1.x or 2.x will work.
14111
14112     # First check for XML 2.x.
14113     #
14114     pkg_check_version libxml-2.0 2.4.6
14115
14116     # If that didn't work (we don't have XML 2.x) and we *don't* have
14117     # Gtk 2.x, then check to see if we have XML 1.x
14118     #
14119     if test "$ok" = no -a "$have_gtk2" = no; then
14120       ok=yes
14121       pkg_check_version libxml 1.0
14122     fi
14123
14124     have_xml="$ok"
14125
14126     if test "$have_xml" = yes; then
14127       echo "$as_me:$LINENO: checking for XML includes" >&5
14128 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
14129 if test "${ac_cv_xml_config_cflags+set}" = set; then
14130   echo $ECHO_N "(cached) $ECHO_C" >&6
14131 else
14132   ac_cv_xml_config_cflags=`$pkg_config --cflags $pkgs`
14133 fi
14134 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
14135 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
14136       echo "$as_me:$LINENO: checking for XML libs" >&5
14137 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
14138 if test "${ac_cv_xml_config_libs+set}" = set; then
14139   echo $ECHO_N "(cached) $ECHO_C" >&6
14140 else
14141   ac_cv_xml_config_libs=`$pkg_config --libs $pkgs`
14142 fi
14143 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
14144 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
14145       ac_xml_config_cflags=$ac_cv_xml_config_cflags
14146       ac_xml_config_libs=$ac_cv_xml_config_libs
14147     fi
14148
14149   else
14150     #
14151     # the old way...
14152     # run {xml2,xml}-config based tests.
14153     #
14154
14155     for ac_prog in xml2-config xml-config
14156 do
14157   # Extract the first word of "$ac_prog", so it can be a program name with args.
14158 set dummy $ac_prog; ac_word=$2
14159 echo "$as_me:$LINENO: checking for $ac_word" >&5
14160 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14161 if test "${ac_cv_path_xml_config+set}" = set; then
14162   echo $ECHO_N "(cached) $ECHO_C" >&6
14163 else
14164   case $xml_config in
14165   [\\/]* | ?:[\\/]*)
14166   ac_cv_path_xml_config="$xml_config" # Let the user override the test with a path.
14167   ;;
14168   *)
14169   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14170 for as_dir in $xml_path
14171 do
14172   IFS=$as_save_IFS
14173   test -z "$as_dir" && as_dir=.
14174   for ac_exec_ext in '' $ac_executable_extensions; do
14175   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14176     ac_cv_path_xml_config="$as_dir/$ac_word$ac_exec_ext"
14177     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14178     break 2
14179   fi
14180 done
14181 done
14182
14183   ;;
14184 esac
14185 fi
14186 xml_config=$ac_cv_path_xml_config
14187
14188 if test -n "$xml_config"; then
14189   echo "$as_me:$LINENO: result: $xml_config" >&5
14190 echo "${ECHO_T}$xml_config" >&6
14191 else
14192   echo "$as_me:$LINENO: result: no" >&5
14193 echo "${ECHO_T}no" >&6
14194 fi
14195
14196   test -n "$xml_config" && break
14197 done
14198
14199
14200     # If we found the xml-config program, run it to get flags.
14201     #
14202     if test -n "$xml_config" ; then
14203       echo "$as_me:$LINENO: checking for XML includes" >&5
14204 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
14205 if test "${ac_cv_xml_config_cflags+set}" = set; then
14206   echo $ECHO_N "(cached) $ECHO_C" >&6
14207 else
14208   ac_cv_xml_config_cflags=`$xml_config --cflags`
14209 fi
14210 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
14211 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
14212       echo "$as_me:$LINENO: checking for XML libs" >&5
14213 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
14214 if test "${ac_cv_xml_config_libs+set}" = set; then
14215   echo $ECHO_N "(cached) $ECHO_C" >&6
14216 else
14217   ac_cv_xml_config_libs=`$xml_config --libs`
14218 fi
14219 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
14220 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
14221       ac_xml_config_cflags=$ac_cv_xml_config_cflags
14222       ac_xml_config_libs=$ac_cv_xml_config_libs
14223     fi
14224
14225     ac_save_xml_CPPFLAGS="$CPPFLAGS"
14226     CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags"
14227
14228     # first try <libxml/parser.h> which is the new way...
14229     #
14230
14231   ac_save_CPPFLAGS="$CPPFLAGS"
14232   if test \! -z "$includedir" ; then
14233     CPPFLAGS="$CPPFLAGS -I$includedir"
14234   fi
14235   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14236   echo "$as_me:$LINENO: checking for libxml/xmlIO.h" >&5
14237 echo $ECHO_N "checking for libxml/xmlIO.h... $ECHO_C" >&6
14238 if test "${ac_cv_header_libxml_xmlIO_h+set}" = set; then
14239   echo $ECHO_N "(cached) $ECHO_C" >&6
14240 else
14241   cat >conftest.$ac_ext <<_ACEOF
14242 #line $LINENO "configure"
14243 /* confdefs.h.  */
14244 _ACEOF
14245 cat confdefs.h >>conftest.$ac_ext
14246 cat >>conftest.$ac_ext <<_ACEOF
14247 /* end confdefs.h.  */
14248 #include <libxml/parser.h>
14249
14250 #include <libxml/xmlIO.h>
14251 _ACEOF
14252 rm -f conftest.$ac_objext
14253 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14254   (eval $ac_compile) 2>&5
14255   ac_status=$?
14256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14257   (exit $ac_status); } &&
14258          { ac_try='test -s conftest.$ac_objext'
14259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14260   (eval $ac_try) 2>&5
14261   ac_status=$?
14262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14263   (exit $ac_status); }; }; then
14264   ac_cv_header_libxml_xmlIO_h=yes
14265 else
14266   echo "$as_me: failed program was:" >&5
14267 sed 's/^/| /' conftest.$ac_ext >&5
14268
14269 ac_cv_header_libxml_xmlIO_h=no
14270 fi
14271 rm -f conftest.$ac_objext conftest.$ac_ext
14272 fi
14273 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlIO_h" >&5
14274 echo "${ECHO_T}$ac_cv_header_libxml_xmlIO_h" >&6
14275 if test $ac_cv_header_libxml_xmlIO_h = yes; then
14276   have_xml=yes
14277 fi
14278
14279
14280   CPPFLAGS="$ac_save_CPPFLAGS"
14281
14282     # if that didn't work, then try just <parser.h> which is the old way...
14283     #
14284     if test "$have_xml" = no; then
14285
14286   ac_save_CPPFLAGS="$CPPFLAGS"
14287   if test \! -z "$includedir" ; then
14288     CPPFLAGS="$CPPFLAGS -I$includedir"
14289   fi
14290   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14291   echo "$as_me:$LINENO: checking for xmlIO.h" >&5
14292 echo $ECHO_N "checking for xmlIO.h... $ECHO_C" >&6
14293 if test "${ac_cv_header_xmlIO_h+set}" = set; then
14294   echo $ECHO_N "(cached) $ECHO_C" >&6
14295 else
14296   cat >conftest.$ac_ext <<_ACEOF
14297 #line $LINENO "configure"
14298 /* confdefs.h.  */
14299 _ACEOF
14300 cat confdefs.h >>conftest.$ac_ext
14301 cat >>conftest.$ac_ext <<_ACEOF
14302 /* end confdefs.h.  */
14303 #include <parser.h>
14304
14305 #include <xmlIO.h>
14306 _ACEOF
14307 rm -f conftest.$ac_objext
14308 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14309   (eval $ac_compile) 2>&5
14310   ac_status=$?
14311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14312   (exit $ac_status); } &&
14313          { ac_try='test -s conftest.$ac_objext'
14314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14315   (eval $ac_try) 2>&5
14316   ac_status=$?
14317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14318   (exit $ac_status); }; }; then
14319   ac_cv_header_xmlIO_h=yes
14320 else
14321   echo "$as_me: failed program was:" >&5
14322 sed 's/^/| /' conftest.$ac_ext >&5
14323
14324 ac_cv_header_xmlIO_h=no
14325 fi
14326 rm -f conftest.$ac_objext conftest.$ac_ext
14327 fi
14328 echo "$as_me:$LINENO: result: $ac_cv_header_xmlIO_h" >&5
14329 echo "${ECHO_T}$ac_cv_header_xmlIO_h" >&6
14330 if test $ac_cv_header_xmlIO_h = yes; then
14331   have_xml=yes; have_old_xml=yes
14332 fi
14333
14334
14335   CPPFLAGS="$ac_save_CPPFLAGS"
14336     fi
14337
14338     CPPFLAGS="$ac_save_xml_CPPFLAGS"
14339   fi
14340
14341
14342   have_zlib=no
14343   if test "$have_xml" = yes; then
14344     # we have the XML headers; now make sure zlib is around.
14345     # yes, it's stupid we have to do this too, but there is
14346     # dependency screwage in Gnome.
14347
14348   ac_save_CPPFLAGS="$CPPFLAGS"
14349   ac_save_LDFLAGS="$LDFLAGS"
14350 #  ac_save_LIBS="$LIBS"
14351
14352   if test \! -z "$includedir" ; then
14353     CPPFLAGS="$CPPFLAGS -I$includedir"
14354   fi
14355   # note: $X_CFLAGS includes $x_includes
14356   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14357
14358   if test \! -z "$libdir" ; then
14359     LDFLAGS="$LDFLAGS -L$libdir"
14360   fi
14361   # note: $X_LIBS includes $x_libraries
14362   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14363
14364   echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5
14365 echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
14366 if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
14367   echo $ECHO_N "(cached) $ECHO_C" >&6
14368 else
14369   ac_check_lib_save_LIBS=$LIBS
14370 LIBS="-lz  $LIBS"
14371 cat >conftest.$ac_ext <<_ACEOF
14372 #line $LINENO "configure"
14373 /* confdefs.h.  */
14374 _ACEOF
14375 cat confdefs.h >>conftest.$ac_ext
14376 cat >>conftest.$ac_ext <<_ACEOF
14377 /* end confdefs.h.  */
14378
14379 /* Override any gcc2 internal prototype to avoid an error.  */
14380 #ifdef __cplusplus
14381 extern "C"
14382 #endif
14383 /* We use char because int might match the return type of a gcc2
14384    builtin and then its argument prototype would still apply.  */
14385 char zlibVersion ();
14386 int
14387 main ()
14388 {
14389 zlibVersion ();
14390   ;
14391   return 0;
14392 }
14393 _ACEOF
14394 rm -f conftest.$ac_objext conftest$ac_exeext
14395 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14396   (eval $ac_link) 2>&5
14397   ac_status=$?
14398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14399   (exit $ac_status); } &&
14400          { ac_try='test -s conftest$ac_exeext'
14401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14402   (eval $ac_try) 2>&5
14403   ac_status=$?
14404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14405   (exit $ac_status); }; }; then
14406   ac_cv_lib_z_zlibVersion=yes
14407 else
14408   echo "$as_me: failed program was:" >&5
14409 sed 's/^/| /' conftest.$ac_ext >&5
14410
14411 ac_cv_lib_z_zlibVersion=no
14412 fi
14413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14414 LIBS=$ac_check_lib_save_LIBS
14415 fi
14416 echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5
14417 echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
14418 if test $ac_cv_lib_z_zlibVersion = yes; then
14419   have_zlib=yes
14420 fi
14421
14422   CPPFLAGS="$ac_save_CPPFLAGS"
14423   LDFLAGS="$ac_save_LDFLAGS"
14424 #  LIBS="$ac_save_LIBS"
14425
14426     if test "$have_zlib" = no; then
14427       xml_halfassed=yes
14428       have_xml=no
14429     fi
14430   fi
14431
14432   if test "$have_xml" = yes; then
14433     # we have the header, now check for the library
14434     have_xml=no
14435     xml_halfassed=yes
14436
14437   ac_save_CPPFLAGS="$CPPFLAGS"
14438   ac_save_LDFLAGS="$LDFLAGS"
14439 #  ac_save_LIBS="$LIBS"
14440
14441   if test \! -z "$includedir" ; then
14442     CPPFLAGS="$CPPFLAGS -I$includedir"
14443   fi
14444   # note: $X_CFLAGS includes $x_includes
14445   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14446
14447   if test \! -z "$libdir" ; then
14448     LDFLAGS="$LDFLAGS -L$libdir"
14449   fi
14450   # note: $X_LIBS includes $x_libraries
14451   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14452
14453   echo "$as_me:$LINENO: checking for xmlParseChunk in -lc" >&5
14454 echo $ECHO_N "checking for xmlParseChunk in -lc... $ECHO_C" >&6
14455 if test "${ac_cv_lib_c_xmlParseChunk+set}" = set; then
14456   echo $ECHO_N "(cached) $ECHO_C" >&6
14457 else
14458   ac_check_lib_save_LIBS=$LIBS
14459 LIBS="-lc $ac_xml_config_libs $LIBS"
14460 cat >conftest.$ac_ext <<_ACEOF
14461 #line $LINENO "configure"
14462 /* confdefs.h.  */
14463 _ACEOF
14464 cat confdefs.h >>conftest.$ac_ext
14465 cat >>conftest.$ac_ext <<_ACEOF
14466 /* end confdefs.h.  */
14467
14468 /* Override any gcc2 internal prototype to avoid an error.  */
14469 #ifdef __cplusplus
14470 extern "C"
14471 #endif
14472 /* We use char because int might match the return type of a gcc2
14473    builtin and then its argument prototype would still apply.  */
14474 char xmlParseChunk ();
14475 int
14476 main ()
14477 {
14478 xmlParseChunk ();
14479   ;
14480   return 0;
14481 }
14482 _ACEOF
14483 rm -f conftest.$ac_objext conftest$ac_exeext
14484 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14485   (eval $ac_link) 2>&5
14486   ac_status=$?
14487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14488   (exit $ac_status); } &&
14489          { ac_try='test -s conftest$ac_exeext'
14490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14491   (eval $ac_try) 2>&5
14492   ac_status=$?
14493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14494   (exit $ac_status); }; }; then
14495   ac_cv_lib_c_xmlParseChunk=yes
14496 else
14497   echo "$as_me: failed program was:" >&5
14498 sed 's/^/| /' conftest.$ac_ext >&5
14499
14500 ac_cv_lib_c_xmlParseChunk=no
14501 fi
14502 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14503 LIBS=$ac_check_lib_save_LIBS
14504 fi
14505 echo "$as_me:$LINENO: result: $ac_cv_lib_c_xmlParseChunk" >&5
14506 echo "${ECHO_T}$ac_cv_lib_c_xmlParseChunk" >&6
14507 if test $ac_cv_lib_c_xmlParseChunk = yes; then
14508   have_xml=yes
14509                     xml_halfassed=no
14510                     XML_LIBS="$ac_xml_config_libs"
14511                     cat >>confdefs.h <<\_ACEOF
14512 #define HAVE_XML 1
14513 _ACEOF
14514
14515 else
14516   true
14517 fi
14518
14519   CPPFLAGS="$ac_save_CPPFLAGS"
14520   LDFLAGS="$ac_save_LDFLAGS"
14521 #  LIBS="$ac_save_LIBS"
14522
14523   fi
14524
14525   if test "$have_xml" = yes; then
14526     INCLUDES="$INCLUDES $ac_xml_config_cflags"
14527     GTK_LIBS="$GTK_LIBS $ac_xml_config_libs"
14528     cat >>confdefs.h <<\_ACEOF
14529 #define HAVE_XML 1
14530 _ACEOF
14531
14532     if test "$have_old_xml" = yes; then
14533       cat >>confdefs.h <<\_ACEOF
14534 #define HAVE_OLD_XML_HEADERS 1
14535 _ACEOF
14536
14537     fi
14538   fi
14539
14540 fi
14541
14542
14543 ###############################################################################
14544 #
14545 #       Checking whether Motif is really Lesstif.
14546 #
14547 ###############################################################################
14548
14549 have_lesstif=no
14550 if test "$have_motif" = yes ; then
14551   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
14552 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
14553 if test "${ac_cv_have_lesstif+set}" = set; then
14554   echo $ECHO_N "(cached) $ECHO_C" >&6
14555 else
14556
14557   ac_save_CPPFLAGS="$CPPFLAGS"
14558   if test \! -z "$includedir" ; then
14559     CPPFLAGS="$CPPFLAGS -I$includedir"
14560   fi
14561   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14562   cat >conftest.$ac_ext <<_ACEOF
14563 #line $LINENO "configure"
14564 /* confdefs.h.  */
14565 _ACEOF
14566 cat confdefs.h >>conftest.$ac_ext
14567 cat >>conftest.$ac_ext <<_ACEOF
14568 /* end confdefs.h.  */
14569 #include <Xm/Xm.h>
14570 int
14571 main ()
14572 {
14573 long vers = LesstifVersion;
14574   ;
14575   return 0;
14576 }
14577 _ACEOF
14578 rm -f conftest.$ac_objext
14579 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14580   (eval $ac_compile) 2>&5
14581   ac_status=$?
14582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14583   (exit $ac_status); } &&
14584          { ac_try='test -s conftest.$ac_objext'
14585   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14586   (eval $ac_try) 2>&5
14587   ac_status=$?
14588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14589   (exit $ac_status); }; }; then
14590   ac_cv_have_lesstif=yes
14591 else
14592   echo "$as_me: failed program was:" >&5
14593 sed 's/^/| /' conftest.$ac_ext >&5
14594
14595 ac_cv_have_lesstif=no
14596 fi
14597 rm -f conftest.$ac_objext conftest.$ac_ext
14598   CPPFLAGS="$ac_save_CPPFLAGS"
14599 fi
14600 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
14601 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
14602   have_lesstif=$ac_cv_have_lesstif
14603 fi
14604
14605
14606 lesstif_version=unknown
14607 lesstif_version_string=unknown
14608
14609 if test "$have_lesstif" = yes ; then
14610   ltv=unknown
14611   echo unknown > conftest-lt
14612   echo "$as_me:$LINENO: checking LessTif version number" >&5
14613 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
14614 if test "${ac_cv_lesstif_version_string+set}" = set; then
14615   echo $ECHO_N "(cached) $ECHO_C" >&6
14616 else
14617
14618   ac_save_CPPFLAGS="$CPPFLAGS"
14619   if test \! -z "$includedir" ; then
14620     CPPFLAGS="$CPPFLAGS -I$includedir"
14621   fi
14622   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14623   if test "$cross_compiling" = yes; then
14624   ac_cv_lesstif_version=unknown
14625                      ac_cv_lesstif_version_string=unknown
14626 else
14627   cat >conftest.$ac_ext <<_ACEOF
14628 #line $LINENO "configure"
14629 /* confdefs.h.  */
14630 _ACEOF
14631 cat confdefs.h >>conftest.$ac_ext
14632 cat >>conftest.$ac_ext <<_ACEOF
14633 /* end confdefs.h.  */
14634 #include <stdio.h>
14635                      #include <Xm/Xm.h>
14636                      int main() {
14637                        FILE *f = fopen("conftest-lt", "w");
14638                        if (!f) exit(1);
14639                        fprintf(f, "%d %d.%d\n", LesstifVersion,
14640                           LESSTIF_VERSION, LESSTIF_REVISION);
14641                        fclose(f);
14642                        exit(0);
14643                      }
14644 _ACEOF
14645 rm -f conftest$ac_exeext
14646 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14647   (eval $ac_link) 2>&5
14648   ac_status=$?
14649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14650   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14652   (eval $ac_try) 2>&5
14653   ac_status=$?
14654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14655   (exit $ac_status); }; }; then
14656   ltv=`cat conftest-lt`
14657                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
14658                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
14659 else
14660   echo "$as_me: program exited with status $ac_status" >&5
14661 echo "$as_me: failed program was:" >&5
14662 sed 's/^/| /' conftest.$ac_ext >&5
14663
14664 ( exit $ac_status )
14665 ac_cv_lesstif_version=unknown
14666                      ac_cv_lesstif_version_string=unknown
14667 fi
14668 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14669 fi
14670   CPPFLAGS="$ac_save_CPPFLAGS"
14671 fi
14672 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
14673 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
14674   rm -f conftest-lt
14675   lesstif_version=$ac_cv_lesstif_version
14676   lesstif_version_string=$ac_cv_lesstif_version_string
14677
14678 fi
14679
14680
14681 if test "$have_motif" = yes ; then
14682   mtv=unknown
14683   echo unknown > conftest-mt
14684   echo "$as_me:$LINENO: checking Motif version number" >&5
14685 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
14686 if test "${ac_cv_motif_version_string+set}" = set; then
14687   echo $ECHO_N "(cached) $ECHO_C" >&6
14688 else
14689
14690   ac_save_CPPFLAGS="$CPPFLAGS"
14691   if test \! -z "$includedir" ; then
14692     CPPFLAGS="$CPPFLAGS -I$includedir"
14693   fi
14694   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14695   if test "$cross_compiling" = yes; then
14696   ac_cv_motif_version=unknown
14697                      ac_cv_motif_version_string=unknown
14698 else
14699   cat >conftest.$ac_ext <<_ACEOF
14700 #line $LINENO "configure"
14701 /* confdefs.h.  */
14702 _ACEOF
14703 cat confdefs.h >>conftest.$ac_ext
14704 cat >>conftest.$ac_ext <<_ACEOF
14705 /* end confdefs.h.  */
14706 #include <stdio.h>
14707                      #include <Xm/Xm.h>
14708                      int main() {
14709                        FILE *f = fopen("conftest-mt", "w");
14710                        if (!f) exit(1);
14711                        fprintf(f, "%d %d.%d\n", XmVersion,
14712                           XmVERSION, XmREVISION);
14713                        fclose(f);
14714                        exit(0);
14715                      }
14716 _ACEOF
14717 rm -f conftest$ac_exeext
14718 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14719   (eval $ac_link) 2>&5
14720   ac_status=$?
14721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14722   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14723   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14724   (eval $ac_try) 2>&5
14725   ac_status=$?
14726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14727   (exit $ac_status); }; }; then
14728   mtv=`cat conftest-mt`
14729                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
14730                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
14731 else
14732   echo "$as_me: program exited with status $ac_status" >&5
14733 echo "$as_me: failed program was:" >&5
14734 sed 's/^/| /' conftest.$ac_ext >&5
14735
14736 ( exit $ac_status )
14737 ac_cv_motif_version=unknown
14738                      ac_cv_motif_version_string=unknown
14739 fi
14740 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14741 fi
14742   CPPFLAGS="$ac_save_CPPFLAGS"
14743 fi
14744 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
14745 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
14746   rm -f conftest-mt
14747   motif_version=$ac_cv_motif_version
14748   motif_version_string=$ac_cv_motif_version_string
14749
14750 fi
14751
14752
14753 ###############################################################################
14754 #
14755 #       Checking whether Motif requires -lXpm.
14756 #
14757 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
14758 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
14759 #       of the library whether to build the XPM code into libXm, or whether
14760 #       to rely on an external libXm.  So the only way to tell whether XPM is
14761 #       a link-time requirement is to examine libXm.a, which is very
14762 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
14763 #       always link against XPM if the XPM lib exists (and this will be a
14764 #       no-op if libXm happens to already have the XPM code in it.)
14765 #
14766 ###############################################################################
14767
14768 motif_requires_xpm=no
14769 if test "$have_motif" = yes ; then
14770    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
14771 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
14772    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
14773    then
14774      motif_requires_xpm=yes
14775      echo "$as_me:$LINENO: result: maybe" >&5
14776 echo "${ECHO_T}maybe" >&6
14777    else
14778      echo "$as_me:$LINENO: result: no" >&5
14779 echo "${ECHO_T}no" >&6
14780    fi
14781 fi
14782
14783
14784 ###############################################################################
14785 #
14786 #       Checking whether Motif requires -lXp.
14787 #
14788 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
14789 #       Extension".   Why this extension isn't in -lXext with all the others,
14790 #       I have no idea.
14791 #
14792 ###############################################################################
14793
14794 have_xp_ext=no
14795 if test "$have_motif" = yes ; then
14796    have_xp_ext=no
14797
14798   ac_save_CPPFLAGS="$CPPFLAGS"
14799   ac_save_LDFLAGS="$LDFLAGS"
14800 #  ac_save_LIBS="$LIBS"
14801
14802   if test \! -z "$includedir" ; then
14803     CPPFLAGS="$CPPFLAGS -I$includedir"
14804   fi
14805   # note: $X_CFLAGS includes $x_includes
14806   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14807
14808   if test \! -z "$libdir" ; then
14809     LDFLAGS="$LDFLAGS -L$libdir"
14810   fi
14811   # note: $X_LIBS includes $x_libraries
14812   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14813
14814   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
14815 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
14816 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
14817   echo $ECHO_N "(cached) $ECHO_C" >&6
14818 else
14819   ac_check_lib_save_LIBS=$LIBS
14820 LIBS="-lXp -lX11 -lXext -lm $LIBS"
14821 cat >conftest.$ac_ext <<_ACEOF
14822 #line $LINENO "configure"
14823 /* confdefs.h.  */
14824 _ACEOF
14825 cat confdefs.h >>conftest.$ac_ext
14826 cat >>conftest.$ac_ext <<_ACEOF
14827 /* end confdefs.h.  */
14828
14829 /* Override any gcc2 internal prototype to avoid an error.  */
14830 #ifdef __cplusplus
14831 extern "C"
14832 #endif
14833 /* We use char because int might match the return type of a gcc2
14834    builtin and then its argument prototype would still apply.  */
14835 char XpQueryExtension ();
14836 int
14837 main ()
14838 {
14839 XpQueryExtension ();
14840   ;
14841   return 0;
14842 }
14843 _ACEOF
14844 rm -f conftest.$ac_objext conftest$ac_exeext
14845 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14846   (eval $ac_link) 2>&5
14847   ac_status=$?
14848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14849   (exit $ac_status); } &&
14850          { ac_try='test -s conftest$ac_exeext'
14851   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14852   (eval $ac_try) 2>&5
14853   ac_status=$?
14854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14855   (exit $ac_status); }; }; then
14856   ac_cv_lib_Xp_XpQueryExtension=yes
14857 else
14858   echo "$as_me: failed program was:" >&5
14859 sed 's/^/| /' conftest.$ac_ext >&5
14860
14861 ac_cv_lib_Xp_XpQueryExtension=no
14862 fi
14863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14864 LIBS=$ac_check_lib_save_LIBS
14865 fi
14866 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
14867 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
14868 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
14869   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
14870 else
14871   true
14872 fi
14873
14874   CPPFLAGS="$ac_save_CPPFLAGS"
14875   LDFLAGS="$ac_save_LDFLAGS"
14876 #  LIBS="$ac_save_LIBS"
14877
14878 fi
14879
14880
14881 ###############################################################################
14882 #
14883 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
14884 #
14885 ###############################################################################
14886
14887 have_xintl=no
14888 if test "$have_motif" = yes ; then
14889
14890   ac_save_CPPFLAGS="$CPPFLAGS"
14891   ac_save_LDFLAGS="$LDFLAGS"
14892 #  ac_save_LIBS="$LIBS"
14893
14894   if test \! -z "$includedir" ; then
14895     CPPFLAGS="$CPPFLAGS -I$includedir"
14896   fi
14897   # note: $X_CFLAGS includes $x_includes
14898   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14899
14900   if test \! -z "$libdir" ; then
14901     LDFLAGS="$LDFLAGS -L$libdir"
14902   fi
14903   # note: $X_LIBS includes $x_libraries
14904   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14905
14906   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
14907 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
14908 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
14909   echo $ECHO_N "(cached) $ECHO_C" >&6
14910 else
14911   ac_check_lib_save_LIBS=$LIBS
14912 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
14913 cat >conftest.$ac_ext <<_ACEOF
14914 #line $LINENO "configure"
14915 /* confdefs.h.  */
14916 _ACEOF
14917 cat confdefs.h >>conftest.$ac_ext
14918 cat >>conftest.$ac_ext <<_ACEOF
14919 /* end confdefs.h.  */
14920
14921 /* Override any gcc2 internal prototype to avoid an error.  */
14922 #ifdef __cplusplus
14923 extern "C"
14924 #endif
14925 /* We use char because int might match the return type of a gcc2
14926    builtin and then its argument prototype would still apply.  */
14927 char _Xsetlocale ();
14928 int
14929 main ()
14930 {
14931 _Xsetlocale ();
14932   ;
14933   return 0;
14934 }
14935 _ACEOF
14936 rm -f conftest.$ac_objext conftest$ac_exeext
14937 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14938   (eval $ac_link) 2>&5
14939   ac_status=$?
14940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14941   (exit $ac_status); } &&
14942          { ac_try='test -s conftest$ac_exeext'
14943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14944   (eval $ac_try) 2>&5
14945   ac_status=$?
14946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14947   (exit $ac_status); }; }; then
14948   ac_cv_lib_Xintl__Xsetlocale=yes
14949 else
14950   echo "$as_me: failed program was:" >&5
14951 sed 's/^/| /' conftest.$ac_ext >&5
14952
14953 ac_cv_lib_Xintl__Xsetlocale=no
14954 fi
14955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14956 LIBS=$ac_check_lib_save_LIBS
14957 fi
14958 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
14959 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
14960 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
14961   have_xintl=yes
14962 else
14963   have_xintl=no
14964 fi
14965
14966   CPPFLAGS="$ac_save_CPPFLAGS"
14967   LDFLAGS="$ac_save_LDFLAGS"
14968 #  LIBS="$ac_save_LIBS"
14969
14970   if test "$have_xintl" = yes; then
14971     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
14972   fi
14973 fi
14974
14975
14976 ###############################################################################
14977 #
14978 #       Check for -lGL or -lMesaGL.
14979 #
14980 ###############################################################################
14981
14982 have_gl=no
14983 ac_have_mesa_gl=no
14984 with_gl_req=unspecified
14985 gl_halfassed=no
14986
14987 # Check whether --with-gl or --without-gl was given.
14988 if test "${with_gl+set}" = set; then
14989   withval="$with_gl"
14990   with_gl="$withval"; with_gl_req="$withval"
14991 else
14992   with_gl=yes
14993 fi;
14994
14995
14996    case "$with_gl" in
14997     yes) ;;
14998     no)  ;;
14999
15000     /*)
15001      echo "$as_me:$LINENO: checking for GL headers" >&5
15002 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
15003      d=$with_gl/include
15004      if test -d $d; then
15005        X_CFLAGS="-I$d $X_CFLAGS"
15006        echo "$as_me:$LINENO: result: $d" >&5
15007 echo "${ECHO_T}$d" >&6
15008      else
15009        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15010 echo "${ECHO_T}not found ($d: no such directory)" >&6
15011      fi
15012
15013      echo "$as_me:$LINENO: checking for GL libs" >&5
15014 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
15015      d=$with_gl/lib
15016      if test -d $d; then
15017        X_LIBS="-L$d $X_LIBS"
15018        echo "$as_me:$LINENO: result: $d" >&5
15019 echo "${ECHO_T}$d" >&6
15020      else
15021        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15022 echo "${ECHO_T}not found ($d: no such directory)" >&6
15023      fi
15024
15025      # replace the directory string with "yes".
15026      with_gl_req="yes"
15027      with_gl=$with_gl_req
15028      ;;
15029
15030     *)
15031      echo ""
15032      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
15033      echo "       If it is a directory, then \`DIR/include' will be added to"
15034      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15035      exit 1
15036      ;;
15037    esac
15038
15039
15040 ac_mesagl_version=unknown
15041 ac_mesagl_version_string=unknown
15042
15043 if test "$with_gl" = yes; then
15044
15045   ac_save_CPPFLAGS="$CPPFLAGS"
15046   if test \! -z "$includedir" ; then
15047     CPPFLAGS="$CPPFLAGS -I$includedir"
15048   fi
15049   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15050   if test "${ac_cv_header_GL_gl_h+set}" = set; then
15051   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15052 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15053 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15054   echo $ECHO_N "(cached) $ECHO_C" >&6
15055 fi
15056 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15057 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15058 else
15059   # Is the header compilable?
15060 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
15061 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
15062 cat >conftest.$ac_ext <<_ACEOF
15063 #line $LINENO "configure"
15064 /* confdefs.h.  */
15065 _ACEOF
15066 cat confdefs.h >>conftest.$ac_ext
15067 cat >>conftest.$ac_ext <<_ACEOF
15068 /* end confdefs.h.  */
15069 $ac_includes_default
15070 #include <GL/gl.h>
15071 _ACEOF
15072 rm -f conftest.$ac_objext
15073 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15074   (eval $ac_compile) 2>&5
15075   ac_status=$?
15076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15077   (exit $ac_status); } &&
15078          { ac_try='test -s conftest.$ac_objext'
15079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15080   (eval $ac_try) 2>&5
15081   ac_status=$?
15082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15083   (exit $ac_status); }; }; then
15084   ac_header_compiler=yes
15085 else
15086   echo "$as_me: failed program was:" >&5
15087 sed 's/^/| /' conftest.$ac_ext >&5
15088
15089 ac_header_compiler=no
15090 fi
15091 rm -f conftest.$ac_objext conftest.$ac_ext
15092 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15093 echo "${ECHO_T}$ac_header_compiler" >&6
15094
15095 # Is the header present?
15096 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
15097 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
15098 cat >conftest.$ac_ext <<_ACEOF
15099 #line $LINENO "configure"
15100 /* confdefs.h.  */
15101 _ACEOF
15102 cat confdefs.h >>conftest.$ac_ext
15103 cat >>conftest.$ac_ext <<_ACEOF
15104 /* end confdefs.h.  */
15105 #include <GL/gl.h>
15106 _ACEOF
15107 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15108   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15109   ac_status=$?
15110   grep -v '^ *+' conftest.er1 >conftest.err
15111   rm -f conftest.er1
15112   cat conftest.err >&5
15113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15114   (exit $ac_status); } >/dev/null; then
15115   if test -s conftest.err; then
15116     ac_cpp_err=$ac_c_preproc_warn_flag
15117   else
15118     ac_cpp_err=
15119   fi
15120 else
15121   ac_cpp_err=yes
15122 fi
15123 if test -z "$ac_cpp_err"; then
15124   ac_header_preproc=yes
15125 else
15126   echo "$as_me: failed program was:" >&5
15127 sed 's/^/| /' conftest.$ac_ext >&5
15128
15129   ac_header_preproc=no
15130 fi
15131 rm -f conftest.err conftest.$ac_ext
15132 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15133 echo "${ECHO_T}$ac_header_preproc" >&6
15134
15135 # So?  What about this header?
15136 case $ac_header_compiler:$ac_header_preproc in
15137   yes:no )
15138     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
15139 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15140     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
15141 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
15142     (
15143       cat <<\_ASBOX
15144 ## ------------------------------------ ##
15145 ## Report this to bug-autoconf@gnu.org. ##
15146 ## ------------------------------------ ##
15147 _ASBOX
15148     ) |
15149       sed "s/^/$as_me: WARNING:     /" >&2
15150     ;;
15151   no:yes )
15152     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
15153 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
15154     { echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5
15155 echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;}
15156     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
15157 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
15158     (
15159       cat <<\_ASBOX
15160 ## ------------------------------------ ##
15161 ## Report this to bug-autoconf@gnu.org. ##
15162 ## ------------------------------------ ##
15163 _ASBOX
15164     ) |
15165       sed "s/^/$as_me: WARNING:     /" >&2
15166     ;;
15167 esac
15168 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15169 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15170 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15171   echo $ECHO_N "(cached) $ECHO_C" >&6
15172 else
15173   ac_cv_header_GL_gl_h=$ac_header_preproc
15174 fi
15175 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15176 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15177
15178 fi
15179 if test $ac_cv_header_GL_gl_h = yes; then
15180   have_gl=yes
15181 else
15182   have_gl=no
15183 fi
15184
15185
15186   CPPFLAGS="$ac_save_CPPFLAGS"
15187   if test "$have_gl" = yes ; then
15188
15189   ac_save_CPPFLAGS="$CPPFLAGS"
15190   if test \! -z "$includedir" ; then
15191     CPPFLAGS="$CPPFLAGS -I$includedir"
15192   fi
15193   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15194   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
15195 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
15196 if test "${ac_cv_header_GL_glx_h+set}" = set; then
15197   echo $ECHO_N "(cached) $ECHO_C" >&6
15198 else
15199   cat >conftest.$ac_ext <<_ACEOF
15200 #line $LINENO "configure"
15201 /* confdefs.h.  */
15202 _ACEOF
15203 cat confdefs.h >>conftest.$ac_ext
15204 cat >>conftest.$ac_ext <<_ACEOF
15205 /* end confdefs.h.  */
15206 #include <GL/gl.h>
15207
15208 #include <GL/glx.h>
15209 _ACEOF
15210 rm -f conftest.$ac_objext
15211 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15212   (eval $ac_compile) 2>&5
15213   ac_status=$?
15214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15215   (exit $ac_status); } &&
15216          { ac_try='test -s conftest.$ac_objext'
15217   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15218   (eval $ac_try) 2>&5
15219   ac_status=$?
15220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15221   (exit $ac_status); }; }; then
15222   ac_cv_header_GL_glx_h=yes
15223 else
15224   echo "$as_me: failed program was:" >&5
15225 sed 's/^/| /' conftest.$ac_ext >&5
15226
15227 ac_cv_header_GL_glx_h=no
15228 fi
15229 rm -f conftest.$ac_objext conftest.$ac_ext
15230 fi
15231 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
15232 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
15233 if test $ac_cv_header_GL_glx_h = yes; then
15234   have_gl=yes
15235 else
15236   have_gl=no
15237 fi
15238
15239
15240   CPPFLAGS="$ac_save_CPPFLAGS"
15241   fi
15242
15243   # If we have the headers, try and figure out which vendor it's from.
15244   #
15245   if test "$have_gl" = yes ; then
15246
15247     # We need to know whether it's MesaGL so that we know which libraries
15248     # to link against.
15249     #
15250     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
15251 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
15252 if test "${ac_cv_have_mesa_gl+set}" = set; then
15253   echo $ECHO_N "(cached) $ECHO_C" >&6
15254 else
15255   ac_cv_have_mesa_gl=no
15256
15257   ac_save_CPPFLAGS="$CPPFLAGS"
15258   if test \! -z "$includedir" ; then
15259     CPPFLAGS="$CPPFLAGS -I$includedir"
15260   fi
15261   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15262   cat >conftest.$ac_ext <<_ACEOF
15263 #line $LINENO "configure"
15264 /* confdefs.h.  */
15265 _ACEOF
15266 cat confdefs.h >>conftest.$ac_ext
15267 cat >>conftest.$ac_ext <<_ACEOF
15268 /* end confdefs.h.  */
15269 #include <GL/glx.h>
15270
15271 _ACEOF
15272 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15273   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
15274   ac_cv_have_mesa_gl=yes
15275 fi
15276 rm -f conftest*
15277
15278   CPPFLAGS="$ac_save_CPPFLAGS"
15279
15280 fi
15281 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
15282 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
15283     ac_have_mesa_gl=$ac_cv_have_mesa_gl
15284
15285
15286     gl_lib_1=""
15287     GL_LIBS=""
15288
15289
15290     # Some versions of MesaGL are compiled to require -lpthread.
15291     # So if the Mesa headers exist, and -lpthread exists, then always
15292     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
15293     #
15294     if test "$ac_have_mesa_gl" = yes; then
15295       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15296 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
15297 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
15298   echo $ECHO_N "(cached) $ECHO_C" >&6
15299 else
15300   ac_check_lib_save_LIBS=$LIBS
15301 LIBS="-lpthread  $LIBS"
15302 cat >conftest.$ac_ext <<_ACEOF
15303 #line $LINENO "configure"
15304 /* confdefs.h.  */
15305 _ACEOF
15306 cat confdefs.h >>conftest.$ac_ext
15307 cat >>conftest.$ac_ext <<_ACEOF
15308 /* end confdefs.h.  */
15309
15310 /* Override any gcc2 internal prototype to avoid an error.  */
15311 #ifdef __cplusplus
15312 extern "C"
15313 #endif
15314 /* We use char because int might match the return type of a gcc2
15315    builtin and then its argument prototype would still apply.  */
15316 char pthread_create ();
15317 int
15318 main ()
15319 {
15320 pthread_create ();
15321   ;
15322   return 0;
15323 }
15324 _ACEOF
15325 rm -f conftest.$ac_objext conftest$ac_exeext
15326 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15327   (eval $ac_link) 2>&5
15328   ac_status=$?
15329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15330   (exit $ac_status); } &&
15331          { ac_try='test -s conftest$ac_exeext'
15332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15333   (eval $ac_try) 2>&5
15334   ac_status=$?
15335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15336   (exit $ac_status); }; }; then
15337   ac_cv_lib_pthread_pthread_create=yes
15338 else
15339   echo "$as_me: failed program was:" >&5
15340 sed 's/^/| /' conftest.$ac_ext >&5
15341
15342 ac_cv_lib_pthread_pthread_create=no
15343 fi
15344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15345 LIBS=$ac_check_lib_save_LIBS
15346 fi
15347 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
15348 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
15349 if test $ac_cv_lib_pthread_pthread_create = yes; then
15350   GL_LIBS="-lpthread"
15351 fi
15352
15353     fi
15354
15355
15356     # If we have Mesa headers, check to see if we can link against -lMesaGL.
15357     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
15358     # Else, warn that GL is busted.  (We have the headers, but no libs.)
15359     #
15360
15361     if test "$ac_have_mesa_gl" = yes ; then
15362
15363   ac_save_CPPFLAGS="$CPPFLAGS"
15364   ac_save_LDFLAGS="$LDFLAGS"
15365 #  ac_save_LIBS="$LIBS"
15366
15367   if test \! -z "$includedir" ; then
15368     CPPFLAGS="$CPPFLAGS -I$includedir"
15369   fi
15370   # note: $X_CFLAGS includes $x_includes
15371   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15372
15373   if test \! -z "$libdir" ; then
15374     LDFLAGS="$LDFLAGS -L$libdir"
15375   fi
15376   # note: $X_LIBS includes $x_libraries
15377   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15378
15379   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
15380 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
15381 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
15382   echo $ECHO_N "(cached) $ECHO_C" >&6
15383 else
15384   ac_check_lib_save_LIBS=$LIBS
15385 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
15386 cat >conftest.$ac_ext <<_ACEOF
15387 #line $LINENO "configure"
15388 /* confdefs.h.  */
15389 _ACEOF
15390 cat confdefs.h >>conftest.$ac_ext
15391 cat >>conftest.$ac_ext <<_ACEOF
15392 /* end confdefs.h.  */
15393
15394 /* Override any gcc2 internal prototype to avoid an error.  */
15395 #ifdef __cplusplus
15396 extern "C"
15397 #endif
15398 /* We use char because int might match the return type of a gcc2
15399    builtin and then its argument prototype would still apply.  */
15400 char glXCreateContext ();
15401 int
15402 main ()
15403 {
15404 glXCreateContext ();
15405   ;
15406   return 0;
15407 }
15408 _ACEOF
15409 rm -f conftest.$ac_objext conftest$ac_exeext
15410 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15411   (eval $ac_link) 2>&5
15412   ac_status=$?
15413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15414   (exit $ac_status); } &&
15415          { ac_try='test -s conftest$ac_exeext'
15416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15417   (eval $ac_try) 2>&5
15418   ac_status=$?
15419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15420   (exit $ac_status); }; }; then
15421   ac_cv_lib_MesaGL_glXCreateContext=yes
15422 else
15423   echo "$as_me: failed program was:" >&5
15424 sed 's/^/| /' conftest.$ac_ext >&5
15425
15426 ac_cv_lib_MesaGL_glXCreateContext=no
15427 fi
15428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15429 LIBS=$ac_check_lib_save_LIBS
15430 fi
15431 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
15432 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
15433 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
15434   gl_lib_1="MesaGL"
15435                       GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
15436 fi
15437
15438   CPPFLAGS="$ac_save_CPPFLAGS"
15439   LDFLAGS="$ac_save_LDFLAGS"
15440 #  LIBS="$ac_save_LIBS"
15441
15442     fi
15443
15444     if test "$gl_lib_1" = "" ; then
15445
15446   ac_save_CPPFLAGS="$CPPFLAGS"
15447   ac_save_LDFLAGS="$LDFLAGS"
15448 #  ac_save_LIBS="$LIBS"
15449
15450   if test \! -z "$includedir" ; then
15451     CPPFLAGS="$CPPFLAGS -I$includedir"
15452   fi
15453   # note: $X_CFLAGS includes $x_includes
15454   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15455
15456   if test \! -z "$libdir" ; then
15457     LDFLAGS="$LDFLAGS -L$libdir"
15458   fi
15459   # note: $X_LIBS includes $x_libraries
15460   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15461
15462   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
15463 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
15464 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
15465   echo $ECHO_N "(cached) $ECHO_C" >&6
15466 else
15467   ac_check_lib_save_LIBS=$LIBS
15468 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
15469 cat >conftest.$ac_ext <<_ACEOF
15470 #line $LINENO "configure"
15471 /* confdefs.h.  */
15472 _ACEOF
15473 cat confdefs.h >>conftest.$ac_ext
15474 cat >>conftest.$ac_ext <<_ACEOF
15475 /* end confdefs.h.  */
15476
15477 /* Override any gcc2 internal prototype to avoid an error.  */
15478 #ifdef __cplusplus
15479 extern "C"
15480 #endif
15481 /* We use char because int might match the return type of a gcc2
15482    builtin and then its argument prototype would still apply.  */
15483 char glXCreateContext ();
15484 int
15485 main ()
15486 {
15487 glXCreateContext ();
15488   ;
15489   return 0;
15490 }
15491 _ACEOF
15492 rm -f conftest.$ac_objext conftest$ac_exeext
15493 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15494   (eval $ac_link) 2>&5
15495   ac_status=$?
15496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15497   (exit $ac_status); } &&
15498          { ac_try='test -s conftest$ac_exeext'
15499   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15500   (eval $ac_try) 2>&5
15501   ac_status=$?
15502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15503   (exit $ac_status); }; }; then
15504   ac_cv_lib_GL_glXCreateContext=yes
15505 else
15506   echo "$as_me: failed program was:" >&5
15507 sed 's/^/| /' conftest.$ac_ext >&5
15508
15509 ac_cv_lib_GL_glXCreateContext=no
15510 fi
15511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15512 LIBS=$ac_check_lib_save_LIBS
15513 fi
15514 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
15515 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
15516 if test $ac_cv_lib_GL_glXCreateContext = yes; then
15517   gl_lib_1="GL"
15518                       GL_LIBS="-lGL -lGLU $GL_LIBS"
15519 fi
15520
15521   CPPFLAGS="$ac_save_CPPFLAGS"
15522   LDFLAGS="$ac_save_LDFLAGS"
15523 #  LIBS="$ac_save_LIBS"
15524
15525     fi
15526
15527     if test "$gl_lib_1" = "" ; then
15528       # we have headers, but no libs -- bail.
15529       have_gl=no
15530       ac_have_mesa_gl=no
15531       gl_halfassed=yes
15532     else
15533       # linking works -- we can build the GL hacks.
15534       cat >>confdefs.h <<\_ACEOF
15535 #define HAVE_GL 1
15536 _ACEOF
15537
15538       if test "$ac_have_mesa_gl" = yes ; then
15539         cat >>confdefs.h <<\_ACEOF
15540 #define HAVE_MESA_GL 1
15541 _ACEOF
15542
15543       fi
15544     fi
15545   fi
15546
15547
15548   # Now that we know we have GL headers and libs, do some more GL testing.
15549   #
15550
15551   if test "$have_gl" = yes ; then
15552     # If it's MesaGL, we'd like to issue a warning if the version number
15553     # is less than or equal to 2.6, because that version had a security bug.
15554     #
15555     if test "$ac_have_mesa_gl" = yes; then
15556
15557       echo "$as_me:$LINENO: checking MesaGL version number" >&5
15558 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
15559 if test "${ac_cv_mesagl_version_string+set}" = set; then
15560   echo $ECHO_N "(cached) $ECHO_C" >&6
15561 else
15562   cat > conftest.$ac_ext <<EOF
15563 #line 15569 "configure"
15564 #include "confdefs.h"
15565 #include <GL/gl.h>
15566 #ifndef MESA_MAJOR_VERSION
15567 # include <GL/xmesa.h>
15568 # ifdef XMESA_MAJOR_VERSION
15569    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
15570       we have to check the XMesa version number (the number of the X protocol
15571       support, which seems to be the same as the Mesa version number.)
15572     */
15573 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
15574 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
15575 # else
15576    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
15577       so we have no way of telling what version of Mesa this is at all.
15578       So, we'll guess that the osmesa version (the "offscreen protocol")
15579       is less than or equal to the real mesa version number.  Except that
15580       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
15581       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
15582     */
15583 # include <GL/osmesa.h>
15584 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
15585 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
15586 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
15587 #   undef MESA_MINOR_VERSION
15588 #   define MESA_MINOR_VERSION 4 or newer, probably?
15589 #  endif
15590 # endif
15591 #endif
15592 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
15593 EOF
15594
15595          ac_save_CPPFLAGS="$CPPFLAGS"
15596          if test \! -z "$includedir" ; then
15597            CPPFLAGS="$CPPFLAGS -I$includedir"
15598          fi
15599          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15600
15601          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
15602
15603          # M4 sucks!!
15604
15605           mglv=`echo "$mglv" | sed -n \
15606              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
15607
15608
15609          rm -f conftest.$ac_ext
15610
15611          CPPFLAGS="$ac_save_CPPFLAGS"
15612
15613          if test "$mglv" = ""; then
15614            ac_mesagl_version=unknown
15615            ac_mesagl_version_string=unknown
15616          else
15617            ac_mesagl_version_string="$mglv"
15618            # M4 sucks!!
15619
15620            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
15621            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
15622
15623            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
15624            if test -z "$ac_mesagl_version"; then
15625              ac_mesagl_version=unknown
15626              ac_mesagl_version_string=unknown
15627            fi
15628          fi
15629          ac_cv_mesagl_version=$ac_mesagl_version
15630          ac_cv_mesagl_version_string=$ac_mesagl_version_string
15631
15632 fi
15633 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
15634 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
15635       ac_mesagl_version=$ac_cv_mesagl_version
15636       ac_mesagl_version_string=$ac_cv_mesagl_version_string
15637     fi
15638
15639
15640     # Check for OpenGL 1.1 features.
15641     #
15642
15643   ac_save_CPPFLAGS="$CPPFLAGS"
15644   ac_save_LDFLAGS="$LDFLAGS"
15645 #  ac_save_LIBS="$LIBS"
15646
15647   if test \! -z "$includedir" ; then
15648     CPPFLAGS="$CPPFLAGS -I$includedir"
15649   fi
15650   # note: $X_CFLAGS includes $x_includes
15651   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15652
15653   if test \! -z "$libdir" ; then
15654     LDFLAGS="$LDFLAGS -L$libdir"
15655   fi
15656   # note: $X_LIBS includes $x_libraries
15657   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15658
15659   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
15660 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
15661 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
15662 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15663   echo $ECHO_N "(cached) $ECHO_C" >&6
15664 else
15665   ac_check_lib_save_LIBS=$LIBS
15666 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
15667 cat >conftest.$ac_ext <<_ACEOF
15668 #line $LINENO "configure"
15669 /* confdefs.h.  */
15670 _ACEOF
15671 cat confdefs.h >>conftest.$ac_ext
15672 cat >>conftest.$ac_ext <<_ACEOF
15673 /* end confdefs.h.  */
15674
15675 /* Override any gcc2 internal prototype to avoid an error.  */
15676 #ifdef __cplusplus
15677 extern "C"
15678 #endif
15679 /* We use char because int might match the return type of a gcc2
15680    builtin and then its argument prototype would still apply.  */
15681 char glBindTexture ();
15682 int
15683 main ()
15684 {
15685 glBindTexture ();
15686   ;
15687   return 0;
15688 }
15689 _ACEOF
15690 rm -f conftest.$ac_objext conftest$ac_exeext
15691 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15692   (eval $ac_link) 2>&5
15693   ac_status=$?
15694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15695   (exit $ac_status); } &&
15696          { ac_try='test -s conftest$ac_exeext'
15697   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15698   (eval $ac_try) 2>&5
15699   ac_status=$?
15700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15701   (exit $ac_status); }; }; then
15702   eval "$as_ac_Lib=yes"
15703 else
15704   echo "$as_me: failed program was:" >&5
15705 sed 's/^/| /' conftest.$ac_ext >&5
15706
15707 eval "$as_ac_Lib=no"
15708 fi
15709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15710 LIBS=$ac_check_lib_save_LIBS
15711 fi
15712 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15713 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15714 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15715   cat >>confdefs.h <<\_ACEOF
15716 #define HAVE_GLBINDTEXTURE 1
15717 _ACEOF
15718
15719 else
15720   true
15721 fi
15722
15723   CPPFLAGS="$ac_save_CPPFLAGS"
15724   LDFLAGS="$ac_save_LDFLAGS"
15725 #  LIBS="$ac_save_LIBS"
15726
15727   fi
15728
15729 elif test "$with_gl" != no; then
15730   echo "error: must be yes or no: --with-gl=$with_gl"
15731   exit 1
15732 fi
15733
15734
15735 ###############################################################################
15736 #
15737 #       Check for -lgle.
15738 #
15739 ###############################################################################
15740
15741 have_gle=no
15742 with_gle_req=unspecified
15743 gle_halfassed=no
15744
15745 # Check whether --with-gle or --without-gle was given.
15746 if test "${with_gle+set}" = set; then
15747   withval="$with_gle"
15748   with_gle="$withval"; with_gle_req="$withval"
15749 else
15750   with_gle=yes
15751 fi;
15752
15753
15754    case "$with_gle" in
15755     yes) ;;
15756     no)  ;;
15757
15758     /*)
15759      echo "$as_me:$LINENO: checking for GLE headers" >&5
15760 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
15761      d=$with_gle/include
15762      if test -d $d; then
15763        X_CFLAGS="-I$d $X_CFLAGS"
15764        echo "$as_me:$LINENO: result: $d" >&5
15765 echo "${ECHO_T}$d" >&6
15766      else
15767        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15768 echo "${ECHO_T}not found ($d: no such directory)" >&6
15769      fi
15770
15771      echo "$as_me:$LINENO: checking for GLE libs" >&5
15772 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
15773      d=$with_gle/lib
15774      if test -d $d; then
15775        X_LIBS="-L$d $X_LIBS"
15776        echo "$as_me:$LINENO: result: $d" >&5
15777 echo "${ECHO_T}$d" >&6
15778      else
15779        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15780 echo "${ECHO_T}not found ($d: no such directory)" >&6
15781      fi
15782
15783      # replace the directory string with "yes".
15784      with_gle_req="yes"
15785      with_gle=$with_gle_req
15786      ;;
15787
15788     *)
15789      echo ""
15790      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
15791      echo "       If it is a directory, then \`DIR/include' will be added to"
15792      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15793      exit 1
15794      ;;
15795    esac
15796
15797
15798 GLE_LIBS=""
15799
15800 if test "$have_gl" = no ; then
15801  true
15802 elif test "$with_gle" = yes; then
15803
15804
15805   ac_save_CPPFLAGS="$CPPFLAGS"
15806   if test \! -z "$includedir" ; then
15807     CPPFLAGS="$CPPFLAGS -I$includedir"
15808   fi
15809   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15810   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
15811 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
15812 if test "${ac_cv_header_GL_gle_h+set}" = set; then
15813   echo $ECHO_N "(cached) $ECHO_C" >&6
15814 else
15815   cat >conftest.$ac_ext <<_ACEOF
15816 #line $LINENO "configure"
15817 /* confdefs.h.  */
15818 _ACEOF
15819 cat confdefs.h >>conftest.$ac_ext
15820 cat >>conftest.$ac_ext <<_ACEOF
15821 /* end confdefs.h.  */
15822 #include <GL/gl.h>
15823
15824 #include <GL/gle.h>
15825 _ACEOF
15826 rm -f conftest.$ac_objext
15827 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15828   (eval $ac_compile) 2>&5
15829   ac_status=$?
15830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15831   (exit $ac_status); } &&
15832          { ac_try='test -s conftest.$ac_objext'
15833   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15834   (eval $ac_try) 2>&5
15835   ac_status=$?
15836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15837   (exit $ac_status); }; }; then
15838   ac_cv_header_GL_gle_h=yes
15839 else
15840   echo "$as_me: failed program was:" >&5
15841 sed 's/^/| /' conftest.$ac_ext >&5
15842
15843 ac_cv_header_GL_gle_h=no
15844 fi
15845 rm -f conftest.$ac_objext conftest.$ac_ext
15846 fi
15847 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
15848 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
15849 if test $ac_cv_header_GL_gle_h = yes; then
15850   have_gle3=yes
15851 else
15852   have_gle3=no
15853 fi
15854
15855
15856   CPPFLAGS="$ac_save_CPPFLAGS"
15857   if test "$have_gle3" = yes ; then
15858     have_gle=yes;
15859   else
15860
15861   ac_save_CPPFLAGS="$CPPFLAGS"
15862   if test \! -z "$includedir" ; then
15863     CPPFLAGS="$CPPFLAGS -I$includedir"
15864   fi
15865   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15866   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
15867 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
15868 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
15869   echo $ECHO_N "(cached) $ECHO_C" >&6
15870 else
15871   cat >conftest.$ac_ext <<_ACEOF
15872 #line $LINENO "configure"
15873 /* confdefs.h.  */
15874 _ACEOF
15875 cat confdefs.h >>conftest.$ac_ext
15876 cat >>conftest.$ac_ext <<_ACEOF
15877 /* end confdefs.h.  */
15878 #include <GL/gl.h>
15879
15880 #include <GL/gutil.h>
15881 _ACEOF
15882 rm -f conftest.$ac_objext
15883 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15884   (eval $ac_compile) 2>&5
15885   ac_status=$?
15886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15887   (exit $ac_status); } &&
15888          { ac_try='test -s conftest.$ac_objext'
15889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15890   (eval $ac_try) 2>&5
15891   ac_status=$?
15892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15893   (exit $ac_status); }; }; then
15894   ac_cv_header_GL_gutil_h=yes
15895 else
15896   echo "$as_me: failed program was:" >&5
15897 sed 's/^/| /' conftest.$ac_ext >&5
15898
15899 ac_cv_header_GL_gutil_h=no
15900 fi
15901 rm -f conftest.$ac_objext conftest.$ac_ext
15902 fi
15903 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
15904 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
15905 if test $ac_cv_header_GL_gutil_h = yes; then
15906   have_gle=yes
15907 else
15908   have_gle=no
15909 fi
15910
15911
15912   CPPFLAGS="$ac_save_CPPFLAGS"
15913     if test "$have_gle" = yes ; then
15914
15915   ac_save_CPPFLAGS="$CPPFLAGS"
15916   if test \! -z "$includedir" ; then
15917     CPPFLAGS="$CPPFLAGS -I$includedir"
15918   fi
15919   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15920   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
15921 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
15922 if test "${ac_cv_header_GL_tube_h+set}" = set; then
15923   echo $ECHO_N "(cached) $ECHO_C" >&6
15924 else
15925   cat >conftest.$ac_ext <<_ACEOF
15926 #line $LINENO "configure"
15927 /* confdefs.h.  */
15928 _ACEOF
15929 cat confdefs.h >>conftest.$ac_ext
15930 cat >>conftest.$ac_ext <<_ACEOF
15931 /* end confdefs.h.  */
15932 #include <GL/gl.h>
15933
15934 #include <GL/tube.h>
15935 _ACEOF
15936 rm -f conftest.$ac_objext
15937 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15938   (eval $ac_compile) 2>&5
15939   ac_status=$?
15940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15941   (exit $ac_status); } &&
15942          { ac_try='test -s conftest.$ac_objext'
15943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15944   (eval $ac_try) 2>&5
15945   ac_status=$?
15946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15947   (exit $ac_status); }; }; then
15948   ac_cv_header_GL_tube_h=yes
15949 else
15950   echo "$as_me: failed program was:" >&5
15951 sed 's/^/| /' conftest.$ac_ext >&5
15952
15953 ac_cv_header_GL_tube_h=no
15954 fi
15955 rm -f conftest.$ac_objext conftest.$ac_ext
15956 fi
15957 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
15958 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
15959 if test $ac_cv_header_GL_tube_h = yes; then
15960   have_gle=yes
15961 else
15962   have_gle=no
15963 fi
15964
15965
15966   CPPFLAGS="$ac_save_CPPFLAGS"
15967     fi
15968   fi
15969
15970   if test "$have_gle" = yes ; then
15971     have_gle=no
15972     gle_halfassed=yes
15973
15974   ac_save_CPPFLAGS="$CPPFLAGS"
15975   ac_save_LDFLAGS="$LDFLAGS"
15976 #  ac_save_LIBS="$LIBS"
15977
15978   if test \! -z "$includedir" ; then
15979     CPPFLAGS="$CPPFLAGS -I$includedir"
15980   fi
15981   # note: $X_CFLAGS includes $x_includes
15982   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15983
15984   if test \! -z "$libdir" ; then
15985     LDFLAGS="$LDFLAGS -L$libdir"
15986   fi
15987   # note: $X_LIBS includes $x_libraries
15988   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15989
15990   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
15991 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
15992 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
15993   echo $ECHO_N "(cached) $ECHO_C" >&6
15994 else
15995   ac_check_lib_save_LIBS=$LIBS
15996 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
15997 cat >conftest.$ac_ext <<_ACEOF
15998 #line $LINENO "configure"
15999 /* confdefs.h.  */
16000 _ACEOF
16001 cat confdefs.h >>conftest.$ac_ext
16002 cat >>conftest.$ac_ext <<_ACEOF
16003 /* end confdefs.h.  */
16004
16005 /* Override any gcc2 internal prototype to avoid an error.  */
16006 #ifdef __cplusplus
16007 extern "C"
16008 #endif
16009 /* We use char because int might match the return type of a gcc2
16010    builtin and then its argument prototype would still apply.  */
16011 char gleCreateGC ();
16012 int
16013 main ()
16014 {
16015 gleCreateGC ();
16016   ;
16017   return 0;
16018 }
16019 _ACEOF
16020 rm -f conftest.$ac_objext conftest$ac_exeext
16021 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16022   (eval $ac_link) 2>&5
16023   ac_status=$?
16024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16025   (exit $ac_status); } &&
16026          { ac_try='test -s conftest$ac_exeext'
16027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16028   (eval $ac_try) 2>&5
16029   ac_status=$?
16030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16031   (exit $ac_status); }; }; then
16032   ac_cv_lib_gle_gleCreateGC=yes
16033 else
16034   echo "$as_me: failed program was:" >&5
16035 sed 's/^/| /' conftest.$ac_ext >&5
16036
16037 ac_cv_lib_gle_gleCreateGC=no
16038 fi
16039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16040 LIBS=$ac_check_lib_save_LIBS
16041 fi
16042 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
16043 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
16044 if test $ac_cv_lib_gle_gleCreateGC = yes; then
16045   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
16046 fi
16047
16048   CPPFLAGS="$ac_save_CPPFLAGS"
16049   LDFLAGS="$ac_save_LDFLAGS"
16050 #  LIBS="$ac_save_LIBS"
16051
16052   fi
16053   if test "$have_gle" = yes ; then
16054     have_gle=no
16055     gle_halfassed=yes
16056
16057     # sometimes the libmatrix stuff is included in libgle.  look there first.
16058 #
16059 # I don't get it.  For some reason, this test passes on SGI, as if
16060 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
16061 # Yet the link is succeeding.  Why???
16062 #
16063 #    AC_CHECK_X_LIB(gle, uview_direction_d,
16064 #                   [have_gle=yes; gle_halfassed=no],
16065 #                   [], $GL_LIBS -lX11 -lXext -lm)
16066
16067     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
16068     # *sigh*
16069     if test "$have_gle3" = yes ; then
16070
16071   ac_save_CPPFLAGS="$CPPFLAGS"
16072   ac_save_LDFLAGS="$LDFLAGS"
16073 #  ac_save_LIBS="$LIBS"
16074
16075   if test \! -z "$includedir" ; then
16076     CPPFLAGS="$CPPFLAGS -I$includedir"
16077   fi
16078   # note: $X_CFLAGS includes $x_includes
16079   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16080
16081   if test \! -z "$libdir" ; then
16082     LDFLAGS="$LDFLAGS -L$libdir"
16083   fi
16084   # note: $X_LIBS includes $x_libraries
16085   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16086
16087   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
16088 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
16089 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
16090   echo $ECHO_N "(cached) $ECHO_C" >&6
16091 else
16092   ac_check_lib_save_LIBS=$LIBS
16093 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16094 cat >conftest.$ac_ext <<_ACEOF
16095 #line $LINENO "configure"
16096 /* confdefs.h.  */
16097 _ACEOF
16098 cat confdefs.h >>conftest.$ac_ext
16099 cat >>conftest.$ac_ext <<_ACEOF
16100 /* end confdefs.h.  */
16101
16102 /* Override any gcc2 internal prototype to avoid an error.  */
16103 #ifdef __cplusplus
16104 extern "C"
16105 #endif
16106 /* We use char because int might match the return type of a gcc2
16107    builtin and then its argument prototype would still apply.  */
16108 char uview_direction ();
16109 int
16110 main ()
16111 {
16112 uview_direction ();
16113   ;
16114   return 0;
16115 }
16116 _ACEOF
16117 rm -f conftest.$ac_objext conftest$ac_exeext
16118 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16119   (eval $ac_link) 2>&5
16120   ac_status=$?
16121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16122   (exit $ac_status); } &&
16123          { ac_try='test -s conftest$ac_exeext'
16124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16125   (eval $ac_try) 2>&5
16126   ac_status=$?
16127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16128   (exit $ac_status); }; }; then
16129   ac_cv_lib_gle_uview_direction=yes
16130 else
16131   echo "$as_me: failed program was:" >&5
16132 sed 's/^/| /' conftest.$ac_ext >&5
16133
16134 ac_cv_lib_gle_uview_direction=no
16135 fi
16136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16137 LIBS=$ac_check_lib_save_LIBS
16138 fi
16139 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
16140 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
16141 if test $ac_cv_lib_gle_uview_direction = yes; then
16142   have_gle=yes; gle_halfassed=no
16143 fi
16144
16145   CPPFLAGS="$ac_save_CPPFLAGS"
16146   LDFLAGS="$ac_save_LDFLAGS"
16147 #  LIBS="$ac_save_LIBS"
16148
16149     fi
16150     # if it wasn't in libgle, then look in libmatrix.
16151     if test "$have_gle" = no ; then
16152
16153   ac_save_CPPFLAGS="$CPPFLAGS"
16154   ac_save_LDFLAGS="$LDFLAGS"
16155 #  ac_save_LIBS="$LIBS"
16156
16157   if test \! -z "$includedir" ; then
16158     CPPFLAGS="$CPPFLAGS -I$includedir"
16159   fi
16160   # note: $X_CFLAGS includes $x_includes
16161   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16162
16163   if test \! -z "$libdir" ; then
16164     LDFLAGS="$LDFLAGS -L$libdir"
16165   fi
16166   # note: $X_LIBS includes $x_libraries
16167   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16168
16169   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
16170 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
16171 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
16172   echo $ECHO_N "(cached) $ECHO_C" >&6
16173 else
16174   ac_check_lib_save_LIBS=$LIBS
16175 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
16176 cat >conftest.$ac_ext <<_ACEOF
16177 #line $LINENO "configure"
16178 /* confdefs.h.  */
16179 _ACEOF
16180 cat confdefs.h >>conftest.$ac_ext
16181 cat >>conftest.$ac_ext <<_ACEOF
16182 /* end confdefs.h.  */
16183
16184 /* Override any gcc2 internal prototype to avoid an error.  */
16185 #ifdef __cplusplus
16186 extern "C"
16187 #endif
16188 /* We use char because int might match the return type of a gcc2
16189    builtin and then its argument prototype would still apply.  */
16190 char uview_direction_d ();
16191 int
16192 main ()
16193 {
16194 uview_direction_d ();
16195   ;
16196   return 0;
16197 }
16198 _ACEOF
16199 rm -f conftest.$ac_objext conftest$ac_exeext
16200 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16201   (eval $ac_link) 2>&5
16202   ac_status=$?
16203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16204   (exit $ac_status); } &&
16205          { ac_try='test -s conftest$ac_exeext'
16206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16207   (eval $ac_try) 2>&5
16208   ac_status=$?
16209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16210   (exit $ac_status); }; }; then
16211   ac_cv_lib_matrix_uview_direction_d=yes
16212 else
16213   echo "$as_me: failed program was:" >&5
16214 sed 's/^/| /' conftest.$ac_ext >&5
16215
16216 ac_cv_lib_matrix_uview_direction_d=no
16217 fi
16218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16219 LIBS=$ac_check_lib_save_LIBS
16220 fi
16221 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
16222 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
16223 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
16224   have_gle=yes; gle_halfassed=no;
16225                       GLE_LIBS="$GLE_LIBS -lmatrix"
16226 fi
16227
16228   CPPFLAGS="$ac_save_CPPFLAGS"
16229   LDFLAGS="$ac_save_LDFLAGS"
16230 #  LIBS="$ac_save_LIBS"
16231
16232     fi
16233   fi
16234
16235   if test "$have_gle" = yes ; then
16236     cat >>confdefs.h <<\_ACEOF
16237 #define HAVE_GLE 1
16238 _ACEOF
16239
16240     if test "$have_gle3" = yes ; then
16241       cat >>confdefs.h <<\_ACEOF
16242 #define HAVE_GLE3 1
16243 _ACEOF
16244
16245     fi
16246   fi
16247
16248 elif test "$with_gle" != no; then
16249   echo "error: must be yes or no: --with-gle=$with_gle"
16250   exit 1
16251
16252 fi
16253
16254
16255
16256 ###############################################################################
16257 #
16258 #       Check for -lXpm.
16259 #
16260 ###############################################################################
16261
16262 have_xpm=no
16263 with_xpm_req=unspecified
16264
16265 # Check whether --with-xpm or --without-xpm was given.
16266 if test "${with_xpm+set}" = set; then
16267   withval="$with_xpm"
16268   with_xpm="$withval"; with_xpm_req="$withval"
16269 else
16270   with_xpm=yes
16271 fi;
16272
16273
16274    case "$with_xpm" in
16275     yes) ;;
16276     no)  ;;
16277
16278     /*)
16279      echo "$as_me:$LINENO: checking for XPM headers" >&5
16280 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
16281      d=$with_xpm/include
16282      if test -d $d; then
16283        X_CFLAGS="-I$d $X_CFLAGS"
16284        echo "$as_me:$LINENO: result: $d" >&5
16285 echo "${ECHO_T}$d" >&6
16286      else
16287        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16288 echo "${ECHO_T}not found ($d: no such directory)" >&6
16289      fi
16290
16291      echo "$as_me:$LINENO: checking for XPM libs" >&5
16292 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
16293      d=$with_xpm/lib
16294      if test -d $d; then
16295        X_LIBS="-L$d $X_LIBS"
16296        echo "$as_me:$LINENO: result: $d" >&5
16297 echo "${ECHO_T}$d" >&6
16298      else
16299        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16300 echo "${ECHO_T}not found ($d: no such directory)" >&6
16301      fi
16302
16303      # replace the directory string with "yes".
16304      with_xpm_req="yes"
16305      with_xpm=$with_xpm_req
16306      ;;
16307
16308     *)
16309      echo ""
16310      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
16311      echo "       If it is a directory, then \`DIR/include' will be added to"
16312      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16313      exit 1
16314      ;;
16315    esac
16316
16317
16318 if test "$with_xpm" = yes; then
16319
16320   ac_save_CPPFLAGS="$CPPFLAGS"
16321   if test \! -z "$includedir" ; then
16322     CPPFLAGS="$CPPFLAGS -I$includedir"
16323   fi
16324   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16325   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
16326 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
16327 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
16328   echo $ECHO_N "(cached) $ECHO_C" >&6
16329 else
16330   cat >conftest.$ac_ext <<_ACEOF
16331 #line $LINENO "configure"
16332 /* confdefs.h.  */
16333 _ACEOF
16334 cat confdefs.h >>conftest.$ac_ext
16335 cat >>conftest.$ac_ext <<_ACEOF
16336 /* end confdefs.h.  */
16337 #include <X11/Xlib.h>
16338
16339 #include <X11/xpm.h>
16340 _ACEOF
16341 rm -f conftest.$ac_objext
16342 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16343   (eval $ac_compile) 2>&5
16344   ac_status=$?
16345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16346   (exit $ac_status); } &&
16347          { ac_try='test -s conftest.$ac_objext'
16348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16349   (eval $ac_try) 2>&5
16350   ac_status=$?
16351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16352   (exit $ac_status); }; }; then
16353   ac_cv_header_X11_xpm_h=yes
16354 else
16355   echo "$as_me: failed program was:" >&5
16356 sed 's/^/| /' conftest.$ac_ext >&5
16357
16358 ac_cv_header_X11_xpm_h=no
16359 fi
16360 rm -f conftest.$ac_objext conftest.$ac_ext
16361 fi
16362 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
16363 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
16364 if test $ac_cv_header_X11_xpm_h = yes; then
16365   have_xpm=yes
16366                     cat >>confdefs.h <<\_ACEOF
16367 #define HAVE_XPM 1
16368 _ACEOF
16369
16370                     XPM_LIBS="-lXpm"
16371 fi
16372
16373
16374   CPPFLAGS="$ac_save_CPPFLAGS"
16375 elif test "$with_xpm" != no; then
16376   echo "error: must be yes or no: --with-xpm=$with_xpm"
16377   exit 1
16378 fi
16379
16380 # See comment near $motif_requires_xpm, above.
16381 # Need to do this here, after both Motif and XPM have been checked for.
16382 #
16383 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
16384   if test "$motif_requires_xpm" = yes ; then
16385     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
16386   fi
16387 fi
16388
16389 ###############################################################################
16390 #
16391 #       Check for -lgdk_pixbuf.
16392 #
16393 ###############################################################################
16394
16395 have_gdk_pixbuf=no
16396 with_gdk_pixbuf_req=unspecified
16397
16398 # Check whether --with-pixbuf or --without-pixbuf was given.
16399 if test "${with_pixbuf+set}" = set; then
16400   withval="$with_pixbuf"
16401   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
16402 else
16403   with_gdk_pixbuf=yes
16404 fi;
16405
16406 # if --with-pixbuf=/directory/ was specified, remember that directory so that
16407 # we can also look for the `gdk-pixbuf-config' program in that directory.
16408 case "$with_gdk_pixbuf" in
16409   /*)
16410     gdk_pixbuf_dir="$with_gdk_pixbuf"
16411     ;;
16412   *)
16413     gdk_pixbuf_dir=""
16414     ;;
16415 esac
16416
16417
16418    case "$with_gdk_pixbuf" in
16419     yes) ;;
16420     no)  ;;
16421
16422     /*)
16423      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
16424 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
16425      d=$with_gdk_pixbuf/include
16426      if test -d $d; then
16427        X_CFLAGS="-I$d $X_CFLAGS"
16428        echo "$as_me:$LINENO: result: $d" >&5
16429 echo "${ECHO_T}$d" >&6
16430      else
16431        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16432 echo "${ECHO_T}not found ($d: no such directory)" >&6
16433      fi
16434
16435      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
16436 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
16437      d=$with_gdk_pixbuf/lib
16438      if test -d $d; then
16439        X_LIBS="-L$d $X_LIBS"
16440        echo "$as_me:$LINENO: result: $d" >&5
16441 echo "${ECHO_T}$d" >&6
16442      else
16443        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16444 echo "${ECHO_T}not found ($d: no such directory)" >&6
16445      fi
16446
16447      # replace the directory string with "yes".
16448      with_gdk_pixbuf_req="yes"
16449      with_gdk_pixbuf=$with_gdk_pixbuf_req
16450      ;;
16451
16452     *)
16453      echo ""
16454      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
16455      echo "       If it is a directory, then \`DIR/include' will be added to"
16456      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16457      exit 1
16458      ;;
16459    esac
16460
16461
16462 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
16463   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
16464   exit 1
16465 fi
16466
16467 if test "$with_gdk_pixbuf" = yes; then
16468   have_gdk_pixbuf=no
16469   have_gdk_pixbuf2=no
16470
16471   if test -n "$pkg_config" ; then
16472     #
16473     # the new way...
16474     # run pkg-config based tests.
16475     #
16476     pkgs=''
16477     ok="yes"
16478
16479     # If we have Gtk 2.x, then *only* gdk-pixbuf 2.x will work.
16480     # If we have Gtk 1.x, then *only* gdk-pixbuf 1.x will work.
16481     # If we don't have Gtk at all, then either will work.
16482
16483     if test "$have_gtk" = no -o "$have_gtk2" = yes; then
16484       #
16485       # we don't have Gtk; or we have Gtk 2.x.  Check for pixbuf 2.x.
16486       #
16487       echo "$as_me:$LINENO: result: checking for gdk_pixbuf 2.x with gtk-config based tests..." >&5
16488 echo "${ECHO_T}checking for gdk_pixbuf 2.x with gtk-config based tests..." >&6
16489       pkg_check_version gdk-pixbuf-2.0      2.0.0
16490       pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
16491       have_gdk_pixbuf="$ok"
16492       have_gdk_pixbuf2="$ok"
16493     fi
16494
16495     if test "$have_gtk" = no -o "$have_gtk2" = no; then
16496       #
16497       # we don't have Gtk; or we have Gtk 1.x.
16498       # If we don't have pixbuf 2.x, then check for pixbuf 1.x.
16499       #
16500       if test "$have_gdk_pixbuf2" = no; then
16501         pkgs=''
16502         ok="yes"
16503       echo "$as_me:$LINENO: result: checking for gdk_pixbuf 1.x with gtk-config based tests..." >&5
16504 echo "${ECHO_T}checking for gdk_pixbuf 1.x with gtk-config based tests..." >&6
16505         pkg_check_version gdk_pixbuf      0.0
16506         pkg_check_version gdk_pixbuf_xlib 0.0
16507         have_gdk_pixbuf="$ok"
16508       fi
16509     fi
16510
16511     if test "$have_gdk_pixbuf" = yes; then
16512       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
16513 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
16514 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
16515   echo $ECHO_N "(cached) $ECHO_C" >&6
16516 else
16517   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
16518 fi
16519 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
16520 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
16521       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
16522 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
16523 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
16524   echo $ECHO_N "(cached) $ECHO_C" >&6
16525 else
16526   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
16527 fi
16528 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
16529 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
16530     fi
16531     ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
16532     ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
16533   fi
16534
16535
16536   if test "$have_gdk_pixbuf" = no; then
16537     #
16538     # the old way...
16539     # run gdk-pixbuf-config based tests.
16540     # note that we can't assume that the existence of "pkg-config" means
16541     # that we don't have to look for gdk-pixbuf-config -- in Gnome 1.4,
16542     # pkg-config exists, but doesn't know about pixbuf.
16543     #
16544
16545    echo "$as_me:$LINENO: result: checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&5
16546 echo "${ECHO_T}checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&6
16547
16548     # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
16549     # look in /foo/bin/ for for gdk-pixbuf-config.
16550     #
16551     gdk_pixbuf_path="$PATH"
16552
16553     if test ! -z "$gtk_dir"; then
16554       # canonicalize slashes.
16555       foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
16556       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
16557     fi
16558
16559     if test ! -z "$gnome_dir"; then
16560       # canonicalize slashes.
16561       foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
16562       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
16563     fi
16564
16565     for ac_prog in gdk-pixbuf-config
16566 do
16567   # Extract the first word of "$ac_prog", so it can be a program name with args.
16568 set dummy $ac_prog; ac_word=$2
16569 echo "$as_me:$LINENO: checking for $ac_word" >&5
16570 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16571 if test "${ac_cv_path_gdk_pixbuf_config+set}" = set; then
16572   echo $ECHO_N "(cached) $ECHO_C" >&6
16573 else
16574   case $gdk_pixbuf_config in
16575   [\\/]* | ?:[\\/]*)
16576   ac_cv_path_gdk_pixbuf_config="$gdk_pixbuf_config" # Let the user override the test with a path.
16577   ;;
16578   *)
16579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16580 for as_dir in $gdk_pixbuf_path
16581 do
16582   IFS=$as_save_IFS
16583   test -z "$as_dir" && as_dir=.
16584   for ac_exec_ext in '' $ac_executable_extensions; do
16585   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16586     ac_cv_path_gdk_pixbuf_config="$as_dir/$ac_word$ac_exec_ext"
16587     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16588     break 2
16589   fi
16590 done
16591 done
16592
16593   ;;
16594 esac
16595 fi
16596 gdk_pixbuf_config=$ac_cv_path_gdk_pixbuf_config
16597
16598 if test -n "$gdk_pixbuf_config"; then
16599   echo "$as_me:$LINENO: result: $gdk_pixbuf_config" >&5
16600 echo "${ECHO_T}$gdk_pixbuf_config" >&6
16601 else
16602   echo "$as_me:$LINENO: result: no" >&5
16603 echo "${ECHO_T}no" >&6
16604 fi
16605
16606   test -n "$gdk_pixbuf_config" && break
16607 done
16608
16609
16610     # If we found the gdk-pixbuf-config program, run it to get flags.
16611     #
16612     if test -n "$gdk_pixbuf_config" ; then
16613       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
16614 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
16615 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
16616   echo $ECHO_N "(cached) $ECHO_C" >&6
16617 else
16618   ac_cv_gdk_pixbuf_config_cflags=`$gdk_pixbuf_config --cflags`
16619 fi
16620 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
16621 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
16622       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
16623 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
16624 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
16625   echo $ECHO_N "(cached) $ECHO_C" >&6
16626 else
16627   ac_cv_gdk_pixbuf_config_libs=`$gdk_pixbuf_config --libs`
16628 fi
16629 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
16630 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
16631
16632       # note that "gdk-pixbuf-config --libs" produces a link line including
16633       # -lgdk_pixbuf, but there's no way to get it to produce one that also
16634       # includes -lgdk_pixbuf_xlib.  Since we don't know *exactly* what the
16635       # name of the library will be, construct it with sed...
16636       # M4 sucks!!
16637
16638       ac_cv_gdk_pixbuf_config_libs=`echo $ac_cv_gdk_pixbuf_config_libs | \
16639        sed 's@ \(-lgdk_pixbuf\([-_a-zA-Z0-9.]*\)\) @ \1 -lgdk_pixbuf_xlib\2 @'`
16640
16641
16642       ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
16643       ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
16644     fi
16645   fi
16646
16647   ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
16648   CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
16649
16650   if test "$have_gdk_pixbuf" = no; then
16651     #
16652     # we appear to have pixbuf; check for headers/libs to be sure.
16653     #
16654
16655     have_gdk_pixbuf=no
16656
16657     # check for header A...
16658
16659   ac_save_CPPFLAGS="$CPPFLAGS"
16660   if test \! -z "$includedir" ; then
16661     CPPFLAGS="$CPPFLAGS -I$includedir"
16662   fi
16663   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16664   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
16665   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
16666 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
16667 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
16668   echo $ECHO_N "(cached) $ECHO_C" >&6
16669 fi
16670 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
16671 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
16672 else
16673   # Is the header compilable?
16674 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
16675 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
16676 cat >conftest.$ac_ext <<_ACEOF
16677 #line $LINENO "configure"
16678 /* confdefs.h.  */
16679 _ACEOF
16680 cat confdefs.h >>conftest.$ac_ext
16681 cat >>conftest.$ac_ext <<_ACEOF
16682 /* end confdefs.h.  */
16683 $ac_includes_default
16684 #include <gdk-pixbuf/gdk-pixbuf.h>
16685 _ACEOF
16686 rm -f conftest.$ac_objext
16687 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16688   (eval $ac_compile) 2>&5
16689   ac_status=$?
16690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16691   (exit $ac_status); } &&
16692          { ac_try='test -s conftest.$ac_objext'
16693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16694   (eval $ac_try) 2>&5
16695   ac_status=$?
16696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16697   (exit $ac_status); }; }; then
16698   ac_header_compiler=yes
16699 else
16700   echo "$as_me: failed program was:" >&5
16701 sed 's/^/| /' conftest.$ac_ext >&5
16702
16703 ac_header_compiler=no
16704 fi
16705 rm -f conftest.$ac_objext conftest.$ac_ext
16706 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16707 echo "${ECHO_T}$ac_header_compiler" >&6
16708
16709 # Is the header present?
16710 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
16711 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
16712 cat >conftest.$ac_ext <<_ACEOF
16713 #line $LINENO "configure"
16714 /* confdefs.h.  */
16715 _ACEOF
16716 cat confdefs.h >>conftest.$ac_ext
16717 cat >>conftest.$ac_ext <<_ACEOF
16718 /* end confdefs.h.  */
16719 #include <gdk-pixbuf/gdk-pixbuf.h>
16720 _ACEOF
16721 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16722   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16723   ac_status=$?
16724   grep -v '^ *+' conftest.er1 >conftest.err
16725   rm -f conftest.er1
16726   cat conftest.err >&5
16727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16728   (exit $ac_status); } >/dev/null; then
16729   if test -s conftest.err; then
16730     ac_cpp_err=$ac_c_preproc_warn_flag
16731   else
16732     ac_cpp_err=
16733   fi
16734 else
16735   ac_cpp_err=yes
16736 fi
16737 if test -z "$ac_cpp_err"; then
16738   ac_header_preproc=yes
16739 else
16740   echo "$as_me: failed program was:" >&5
16741 sed 's/^/| /' conftest.$ac_ext >&5
16742
16743   ac_header_preproc=no
16744 fi
16745 rm -f conftest.err conftest.$ac_ext
16746 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16747 echo "${ECHO_T}$ac_header_preproc" >&6
16748
16749 # So?  What about this header?
16750 case $ac_header_compiler:$ac_header_preproc in
16751   yes:no )
16752     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
16753 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16754     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
16755 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
16756     (
16757       cat <<\_ASBOX
16758 ## ------------------------------------ ##
16759 ## Report this to bug-autoconf@gnu.org. ##
16760 ## ------------------------------------ ##
16761 _ASBOX
16762     ) |
16763       sed "s/^/$as_me: WARNING:     /" >&2
16764     ;;
16765   no:yes )
16766     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
16767 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
16768     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&5
16769 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&2;}
16770     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
16771 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
16772     (
16773       cat <<\_ASBOX
16774 ## ------------------------------------ ##
16775 ## Report this to bug-autoconf@gnu.org. ##
16776 ## ------------------------------------ ##
16777 _ASBOX
16778     ) |
16779       sed "s/^/$as_me: WARNING:     /" >&2
16780     ;;
16781 esac
16782 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
16783 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
16784 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
16785   echo $ECHO_N "(cached) $ECHO_C" >&6
16786 else
16787   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
16788 fi
16789 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
16790 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
16791
16792 fi
16793 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
16794   have_gdk_pixbuf=yes
16795 fi
16796
16797
16798   CPPFLAGS="$ac_save_CPPFLAGS"
16799
16800     # if that worked, check for header B...
16801     if test "$have_gdk_pixbuf" = yes; then
16802       have_gdk_pixbuf=no
16803       gdk_pixbuf_halfassed=yes
16804
16805   ac_save_CPPFLAGS="$CPPFLAGS"
16806   if test \! -z "$includedir" ; then
16807     CPPFLAGS="$CPPFLAGS -I$includedir"
16808   fi
16809   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16810   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16811   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
16812 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16813 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16814   echo $ECHO_N "(cached) $ECHO_C" >&6
16815 fi
16816 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
16817 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
16818 else
16819   # Is the header compilable?
16820 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
16821 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
16822 cat >conftest.$ac_ext <<_ACEOF
16823 #line $LINENO "configure"
16824 /* confdefs.h.  */
16825 _ACEOF
16826 cat confdefs.h >>conftest.$ac_ext
16827 cat >>conftest.$ac_ext <<_ACEOF
16828 /* end confdefs.h.  */
16829 $ac_includes_default
16830 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
16831 _ACEOF
16832 rm -f conftest.$ac_objext
16833 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16834   (eval $ac_compile) 2>&5
16835   ac_status=$?
16836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16837   (exit $ac_status); } &&
16838          { ac_try='test -s conftest.$ac_objext'
16839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16840   (eval $ac_try) 2>&5
16841   ac_status=$?
16842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16843   (exit $ac_status); }; }; then
16844   ac_header_compiler=yes
16845 else
16846   echo "$as_me: failed program was:" >&5
16847 sed 's/^/| /' conftest.$ac_ext >&5
16848
16849 ac_header_compiler=no
16850 fi
16851 rm -f conftest.$ac_objext conftest.$ac_ext
16852 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16853 echo "${ECHO_T}$ac_header_compiler" >&6
16854
16855 # Is the header present?
16856 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
16857 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
16858 cat >conftest.$ac_ext <<_ACEOF
16859 #line $LINENO "configure"
16860 /* confdefs.h.  */
16861 _ACEOF
16862 cat confdefs.h >>conftest.$ac_ext
16863 cat >>conftest.$ac_ext <<_ACEOF
16864 /* end confdefs.h.  */
16865 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
16866 _ACEOF
16867 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16868   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16869   ac_status=$?
16870   grep -v '^ *+' conftest.er1 >conftest.err
16871   rm -f conftest.er1
16872   cat conftest.err >&5
16873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16874   (exit $ac_status); } >/dev/null; then
16875   if test -s conftest.err; then
16876     ac_cpp_err=$ac_c_preproc_warn_flag
16877   else
16878     ac_cpp_err=
16879   fi
16880 else
16881   ac_cpp_err=yes
16882 fi
16883 if test -z "$ac_cpp_err"; then
16884   ac_header_preproc=yes
16885 else
16886   echo "$as_me: failed program was:" >&5
16887 sed 's/^/| /' conftest.$ac_ext >&5
16888
16889   ac_header_preproc=no
16890 fi
16891 rm -f conftest.err conftest.$ac_ext
16892 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16893 echo "${ECHO_T}$ac_header_preproc" >&6
16894
16895 # So?  What about this header?
16896 case $ac_header_compiler:$ac_header_preproc in
16897   yes:no )
16898     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16899 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16900     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16901 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
16902     (
16903       cat <<\_ASBOX
16904 ## ------------------------------------ ##
16905 ## Report this to bug-autoconf@gnu.org. ##
16906 ## ------------------------------------ ##
16907 _ASBOX
16908     ) |
16909       sed "s/^/$as_me: WARNING:     /" >&2
16910     ;;
16911   no:yes )
16912     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
16913 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
16914     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
16915 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
16916     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16917 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
16918     (
16919       cat <<\_ASBOX
16920 ## ------------------------------------ ##
16921 ## Report this to bug-autoconf@gnu.org. ##
16922 ## ------------------------------------ ##
16923 _ASBOX
16924     ) |
16925       sed "s/^/$as_me: WARNING:     /" >&2
16926     ;;
16927 esac
16928 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
16929 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16930 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16931   echo $ECHO_N "(cached) $ECHO_C" >&6
16932 else
16933   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
16934 fi
16935 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
16936 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
16937
16938 fi
16939 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
16940   have_gdk_pixbuf=yes
16941                          gdk_pixbuf_halfassed=no
16942 fi
16943
16944
16945   CPPFLAGS="$ac_save_CPPFLAGS"
16946
16947       # yay, it has a new name in Gtk 2.x...
16948       if test "$have_gdk_pixbuf" = no; then
16949         have_gdk_pixbuf=no
16950         gdk_pixbuf_halfassed=yes
16951
16952   ac_save_CPPFLAGS="$CPPFLAGS"
16953   if test \! -z "$includedir" ; then
16954     CPPFLAGS="$CPPFLAGS -I$includedir"
16955   fi
16956   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16957   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16958   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
16959 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16960 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16961   echo $ECHO_N "(cached) $ECHO_C" >&6
16962 fi
16963 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
16964 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
16965 else
16966   # Is the header compilable?
16967 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
16968 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
16969 cat >conftest.$ac_ext <<_ACEOF
16970 #line $LINENO "configure"
16971 /* confdefs.h.  */
16972 _ACEOF
16973 cat confdefs.h >>conftest.$ac_ext
16974 cat >>conftest.$ac_ext <<_ACEOF
16975 /* end confdefs.h.  */
16976 $ac_includes_default
16977 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
16978 _ACEOF
16979 rm -f conftest.$ac_objext
16980 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16981   (eval $ac_compile) 2>&5
16982   ac_status=$?
16983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16984   (exit $ac_status); } &&
16985          { ac_try='test -s conftest.$ac_objext'
16986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16987   (eval $ac_try) 2>&5
16988   ac_status=$?
16989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16990   (exit $ac_status); }; }; then
16991   ac_header_compiler=yes
16992 else
16993   echo "$as_me: failed program was:" >&5
16994 sed 's/^/| /' conftest.$ac_ext >&5
16995
16996 ac_header_compiler=no
16997 fi
16998 rm -f conftest.$ac_objext conftest.$ac_ext
16999 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17000 echo "${ECHO_T}$ac_header_compiler" >&6
17001
17002 # Is the header present?
17003 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
17004 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
17005 cat >conftest.$ac_ext <<_ACEOF
17006 #line $LINENO "configure"
17007 /* confdefs.h.  */
17008 _ACEOF
17009 cat confdefs.h >>conftest.$ac_ext
17010 cat >>conftest.$ac_ext <<_ACEOF
17011 /* end confdefs.h.  */
17012 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17013 _ACEOF
17014 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17015   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17016   ac_status=$?
17017   grep -v '^ *+' conftest.er1 >conftest.err
17018   rm -f conftest.er1
17019   cat conftest.err >&5
17020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17021   (exit $ac_status); } >/dev/null; then
17022   if test -s conftest.err; then
17023     ac_cpp_err=$ac_c_preproc_warn_flag
17024   else
17025     ac_cpp_err=
17026   fi
17027 else
17028   ac_cpp_err=yes
17029 fi
17030 if test -z "$ac_cpp_err"; then
17031   ac_header_preproc=yes
17032 else
17033   echo "$as_me: failed program was:" >&5
17034 sed 's/^/| /' conftest.$ac_ext >&5
17035
17036   ac_header_preproc=no
17037 fi
17038 rm -f conftest.err conftest.$ac_ext
17039 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17040 echo "${ECHO_T}$ac_header_preproc" >&6
17041
17042 # So?  What about this header?
17043 case $ac_header_compiler:$ac_header_preproc in
17044   yes:no )
17045     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17046 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17047     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17048 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17049     (
17050       cat <<\_ASBOX
17051 ## ------------------------------------ ##
17052 ## Report this to bug-autoconf@gnu.org. ##
17053 ## ------------------------------------ ##
17054 _ASBOX
17055     ) |
17056       sed "s/^/$as_me: WARNING:     /" >&2
17057     ;;
17058   no:yes )
17059     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17060 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17061     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
17062 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
17063     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17064 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17065     (
17066       cat <<\_ASBOX
17067 ## ------------------------------------ ##
17068 ## Report this to bug-autoconf@gnu.org. ##
17069 ## ------------------------------------ ##
17070 _ASBOX
17071     ) |
17072       sed "s/^/$as_me: WARNING:     /" >&2
17073     ;;
17074 esac
17075 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17076 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17077 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17078   echo $ECHO_N "(cached) $ECHO_C" >&6
17079 else
17080   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
17081 fi
17082 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17083 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
17084
17085 fi
17086 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
17087   have_gdk_pixbuf=yes
17088                            gdk_pixbuf_halfassed=no
17089 fi
17090
17091
17092   CPPFLAGS="$ac_save_CPPFLAGS"
17093       fi
17094     fi
17095   fi
17096
17097   CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
17098
17099   if test "$have_gdk_pixbuf" = yes; then
17100     # we have the headers, now check for the libraries
17101     have_gdk_pixbuf=no
17102     gdk_pixbuf_halfassed=yes
17103
17104     # library A...
17105
17106   ac_save_CPPFLAGS="$CPPFLAGS"
17107   ac_save_LDFLAGS="$LDFLAGS"
17108 #  ac_save_LIBS="$LIBS"
17109
17110   if test \! -z "$includedir" ; then
17111     CPPFLAGS="$CPPFLAGS -I$includedir"
17112   fi
17113   # note: $X_CFLAGS includes $x_includes
17114   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17115
17116   if test \! -z "$libdir" ; then
17117     LDFLAGS="$LDFLAGS -L$libdir"
17118   fi
17119   # note: $X_LIBS includes $x_libraries
17120   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17121
17122   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
17123 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
17124 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
17125   echo $ECHO_N "(cached) $ECHO_C" >&6
17126 else
17127   ac_check_lib_save_LIBS=$LIBS
17128 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17129 cat >conftest.$ac_ext <<_ACEOF
17130 #line $LINENO "configure"
17131 /* confdefs.h.  */
17132 _ACEOF
17133 cat confdefs.h >>conftest.$ac_ext
17134 cat >>conftest.$ac_ext <<_ACEOF
17135 /* end confdefs.h.  */
17136
17137 /* Override any gcc2 internal prototype to avoid an error.  */
17138 #ifdef __cplusplus
17139 extern "C"
17140 #endif
17141 /* We use char because int might match the return type of a gcc2
17142    builtin and then its argument prototype would still apply.  */
17143 char gdk_pixbuf_new_from_file ();
17144 int
17145 main ()
17146 {
17147 gdk_pixbuf_new_from_file ();
17148   ;
17149   return 0;
17150 }
17151 _ACEOF
17152 rm -f conftest.$ac_objext conftest$ac_exeext
17153 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17154   (eval $ac_link) 2>&5
17155   ac_status=$?
17156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17157   (exit $ac_status); } &&
17158          { ac_try='test -s conftest$ac_exeext'
17159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17160   (eval $ac_try) 2>&5
17161   ac_status=$?
17162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17163   (exit $ac_status); }; }; then
17164   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
17165 else
17166   echo "$as_me: failed program was:" >&5
17167 sed 's/^/| /' conftest.$ac_ext >&5
17168
17169 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
17170 fi
17171 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17172 LIBS=$ac_check_lib_save_LIBS
17173 fi
17174 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
17175 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
17176 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
17177   have_gdk_pixbuf=yes
17178 fi
17179
17180   CPPFLAGS="$ac_save_CPPFLAGS"
17181   LDFLAGS="$ac_save_LDFLAGS"
17182 #  LIBS="$ac_save_LIBS"
17183
17184     # library B...
17185     if test "$have_gdk_pixbuf" = yes; then
17186       have_gdk_pixbuf=no
17187
17188   ac_save_CPPFLAGS="$CPPFLAGS"
17189   ac_save_LDFLAGS="$LDFLAGS"
17190 #  ac_save_LIBS="$LIBS"
17191
17192   if test \! -z "$includedir" ; then
17193     CPPFLAGS="$CPPFLAGS -I$includedir"
17194   fi
17195   # note: $X_CFLAGS includes $x_includes
17196   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17197
17198   if test \! -z "$libdir" ; then
17199     LDFLAGS="$LDFLAGS -L$libdir"
17200   fi
17201   # note: $X_LIBS includes $x_libraries
17202   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17203
17204   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
17205 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
17206 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
17207   echo $ECHO_N "(cached) $ECHO_C" >&6
17208 else
17209   ac_check_lib_save_LIBS=$LIBS
17210 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17211 cat >conftest.$ac_ext <<_ACEOF
17212 #line $LINENO "configure"
17213 /* confdefs.h.  */
17214 _ACEOF
17215 cat confdefs.h >>conftest.$ac_ext
17216 cat >>conftest.$ac_ext <<_ACEOF
17217 /* end confdefs.h.  */
17218
17219 /* Override any gcc2 internal prototype to avoid an error.  */
17220 #ifdef __cplusplus
17221 extern "C"
17222 #endif
17223 /* We use char because int might match the return type of a gcc2
17224    builtin and then its argument prototype would still apply.  */
17225 char gdk_pixbuf_xlib_init ();
17226 int
17227 main ()
17228 {
17229 gdk_pixbuf_xlib_init ();
17230   ;
17231   return 0;
17232 }
17233 _ACEOF
17234 rm -f conftest.$ac_objext conftest$ac_exeext
17235 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17236   (eval $ac_link) 2>&5
17237   ac_status=$?
17238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17239   (exit $ac_status); } &&
17240          { ac_try='test -s conftest$ac_exeext'
17241   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17242   (eval $ac_try) 2>&5
17243   ac_status=$?
17244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17245   (exit $ac_status); }; }; then
17246   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
17247 else
17248   echo "$as_me: failed program was:" >&5
17249 sed 's/^/| /' conftest.$ac_ext >&5
17250
17251 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
17252 fi
17253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17254 LIBS=$ac_check_lib_save_LIBS
17255 fi
17256 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
17257 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
17258 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
17259   have_gdk_pixbuf=yes
17260                       gdk_pixbuf_halfassed=no
17261 fi
17262
17263   CPPFLAGS="$ac_save_CPPFLAGS"
17264   LDFLAGS="$ac_save_LDFLAGS"
17265 #  LIBS="$ac_save_LIBS"
17266
17267     fi
17268   fi
17269
17270   if test "$have_gdk_pixbuf" = yes; then
17271     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
17272     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
17273     cat >>confdefs.h <<\_ACEOF
17274 #define HAVE_GDK_PIXBUF 1
17275 _ACEOF
17276
17277   else
17278     have_gdk_pixbuf2=no
17279   fi
17280 fi
17281
17282
17283 ###############################################################################
17284 #
17285 #       Check for -ljpeg
17286 #
17287 ###############################################################################
17288
17289 have_jpeg=no
17290 with_jpeg_req=unspecified
17291 jpeg_halfassed=no
17292
17293 # Check whether --with-jpeg or --without-jpeg was given.
17294 if test "${with_jpeg+set}" = set; then
17295   withval="$with_jpeg"
17296   with_jpeg="$withval"; with_jpeg_req="$withval"
17297 else
17298   with_jpeg=yes
17299 fi;
17300
17301
17302    case "$with_jpeg" in
17303     yes) ;;
17304     no)  ;;
17305
17306     /*)
17307      echo "$as_me:$LINENO: checking for JPEG headers" >&5
17308 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
17309      d=$with_jpeg/include
17310      if test -d $d; then
17311        X_CFLAGS="-I$d $X_CFLAGS"
17312        echo "$as_me:$LINENO: result: $d" >&5
17313 echo "${ECHO_T}$d" >&6
17314      else
17315        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17316 echo "${ECHO_T}not found ($d: no such directory)" >&6
17317      fi
17318
17319      echo "$as_me:$LINENO: checking for JPEG libs" >&5
17320 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
17321      d=$with_jpeg/lib
17322      if test -d $d; then
17323        X_LIBS="-L$d $X_LIBS"
17324        echo "$as_me:$LINENO: result: $d" >&5
17325 echo "${ECHO_T}$d" >&6
17326      else
17327        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17328 echo "${ECHO_T}not found ($d: no such directory)" >&6
17329      fi
17330
17331      # replace the directory string with "yes".
17332      with_jpeg_req="yes"
17333      with_jpeg=$with_jpeg_req
17334      ;;
17335
17336     *)
17337      echo ""
17338      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
17339      echo "       If it is a directory, then \`DIR/include' will be added to"
17340      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17341      exit 1
17342      ;;
17343    esac
17344
17345
17346 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
17347   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
17348   exit 1
17349 fi
17350
17351 if test "$with_jpeg" = yes; then
17352
17353   have_jpeg=no
17354
17355   ac_save_CPPFLAGS="$CPPFLAGS"
17356   if test \! -z "$includedir" ; then
17357     CPPFLAGS="$CPPFLAGS -I$includedir"
17358   fi
17359   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17360   if test "${ac_cv_header_jpeglib_h+set}" = set; then
17361   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
17362 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
17363 if test "${ac_cv_header_jpeglib_h+set}" = set; then
17364   echo $ECHO_N "(cached) $ECHO_C" >&6
17365 fi
17366 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
17367 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
17368 else
17369   # Is the header compilable?
17370 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
17371 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
17372 cat >conftest.$ac_ext <<_ACEOF
17373 #line $LINENO "configure"
17374 /* confdefs.h.  */
17375 _ACEOF
17376 cat confdefs.h >>conftest.$ac_ext
17377 cat >>conftest.$ac_ext <<_ACEOF
17378 /* end confdefs.h.  */
17379 $ac_includes_default
17380 #include <jpeglib.h>
17381 _ACEOF
17382 rm -f conftest.$ac_objext
17383 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17384   (eval $ac_compile) 2>&5
17385   ac_status=$?
17386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17387   (exit $ac_status); } &&
17388          { ac_try='test -s conftest.$ac_objext'
17389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17390   (eval $ac_try) 2>&5
17391   ac_status=$?
17392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17393   (exit $ac_status); }; }; then
17394   ac_header_compiler=yes
17395 else
17396   echo "$as_me: failed program was:" >&5
17397 sed 's/^/| /' conftest.$ac_ext >&5
17398
17399 ac_header_compiler=no
17400 fi
17401 rm -f conftest.$ac_objext conftest.$ac_ext
17402 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17403 echo "${ECHO_T}$ac_header_compiler" >&6
17404
17405 # Is the header present?
17406 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
17407 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
17408 cat >conftest.$ac_ext <<_ACEOF
17409 #line $LINENO "configure"
17410 /* confdefs.h.  */
17411 _ACEOF
17412 cat confdefs.h >>conftest.$ac_ext
17413 cat >>conftest.$ac_ext <<_ACEOF
17414 /* end confdefs.h.  */
17415 #include <jpeglib.h>
17416 _ACEOF
17417 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17418   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17419   ac_status=$?
17420   grep -v '^ *+' conftest.er1 >conftest.err
17421   rm -f conftest.er1
17422   cat conftest.err >&5
17423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17424   (exit $ac_status); } >/dev/null; then
17425   if test -s conftest.err; then
17426     ac_cpp_err=$ac_c_preproc_warn_flag
17427   else
17428     ac_cpp_err=
17429   fi
17430 else
17431   ac_cpp_err=yes
17432 fi
17433 if test -z "$ac_cpp_err"; then
17434   ac_header_preproc=yes
17435 else
17436   echo "$as_me: failed program was:" >&5
17437 sed 's/^/| /' conftest.$ac_ext >&5
17438
17439   ac_header_preproc=no
17440 fi
17441 rm -f conftest.err conftest.$ac_ext
17442 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17443 echo "${ECHO_T}$ac_header_preproc" >&6
17444
17445 # So?  What about this header?
17446 case $ac_header_compiler:$ac_header_preproc in
17447   yes:no )
17448     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17449 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17450     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
17451 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
17452     (
17453       cat <<\_ASBOX
17454 ## ------------------------------------ ##
17455 ## Report this to bug-autoconf@gnu.org. ##
17456 ## ------------------------------------ ##
17457 _ASBOX
17458     ) |
17459       sed "s/^/$as_me: WARNING:     /" >&2
17460     ;;
17461   no:yes )
17462     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
17463 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
17464     { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5
17465 echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;}
17466     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
17467 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
17468     (
17469       cat <<\_ASBOX
17470 ## ------------------------------------ ##
17471 ## Report this to bug-autoconf@gnu.org. ##
17472 ## ------------------------------------ ##
17473 _ASBOX
17474     ) |
17475       sed "s/^/$as_me: WARNING:     /" >&2
17476     ;;
17477 esac
17478 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
17479 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
17480 if test "${ac_cv_header_jpeglib_h+set}" = set; then
17481   echo $ECHO_N "(cached) $ECHO_C" >&6
17482 else
17483   ac_cv_header_jpeglib_h=$ac_header_preproc
17484 fi
17485 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
17486 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
17487
17488 fi
17489 if test $ac_cv_header_jpeglib_h = yes; then
17490   have_jpeg=yes
17491 fi
17492
17493
17494   CPPFLAGS="$ac_save_CPPFLAGS"
17495
17496   if test "$have_jpeg" = yes; then
17497     # we have the header, now check for the library
17498     have_jpeg=no
17499     jpeg_halfassed=yes
17500
17501   ac_save_CPPFLAGS="$CPPFLAGS"
17502   ac_save_LDFLAGS="$LDFLAGS"
17503 #  ac_save_LIBS="$LIBS"
17504
17505   if test \! -z "$includedir" ; then
17506     CPPFLAGS="$CPPFLAGS -I$includedir"
17507   fi
17508   # note: $X_CFLAGS includes $x_includes
17509   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17510
17511   if test \! -z "$libdir" ; then
17512     LDFLAGS="$LDFLAGS -L$libdir"
17513   fi
17514   # note: $X_LIBS includes $x_libraries
17515   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17516
17517   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
17518 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
17519 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
17520   echo $ECHO_N "(cached) $ECHO_C" >&6
17521 else
17522   ac_check_lib_save_LIBS=$LIBS
17523 LIBS="-ljpeg  $LIBS"
17524 cat >conftest.$ac_ext <<_ACEOF
17525 #line $LINENO "configure"
17526 /* confdefs.h.  */
17527 _ACEOF
17528 cat confdefs.h >>conftest.$ac_ext
17529 cat >>conftest.$ac_ext <<_ACEOF
17530 /* end confdefs.h.  */
17531
17532 /* Override any gcc2 internal prototype to avoid an error.  */
17533 #ifdef __cplusplus
17534 extern "C"
17535 #endif
17536 /* We use char because int might match the return type of a gcc2
17537    builtin and then its argument prototype would still apply.  */
17538 char jpeg_start_compress ();
17539 int
17540 main ()
17541 {
17542 jpeg_start_compress ();
17543   ;
17544   return 0;
17545 }
17546 _ACEOF
17547 rm -f conftest.$ac_objext conftest$ac_exeext
17548 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17549   (eval $ac_link) 2>&5
17550   ac_status=$?
17551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17552   (exit $ac_status); } &&
17553          { ac_try='test -s conftest$ac_exeext'
17554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17555   (eval $ac_try) 2>&5
17556   ac_status=$?
17557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17558   (exit $ac_status); }; }; then
17559   ac_cv_lib_jpeg_jpeg_start_compress=yes
17560 else
17561   echo "$as_me: failed program was:" >&5
17562 sed 's/^/| /' conftest.$ac_ext >&5
17563
17564 ac_cv_lib_jpeg_jpeg_start_compress=no
17565 fi
17566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17567 LIBS=$ac_check_lib_save_LIBS
17568 fi
17569 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
17570 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
17571 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
17572   have_jpeg=yes
17573                     jpeg_halfassed=no
17574                     JPEG_LIBS="-ljpeg"
17575                     cat >>confdefs.h <<\_ACEOF
17576 #define HAVE_JPEGLIB 1
17577 _ACEOF
17578
17579 fi
17580
17581   CPPFLAGS="$ac_save_CPPFLAGS"
17582   LDFLAGS="$ac_save_LDFLAGS"
17583 #  LIBS="$ac_save_LIBS"
17584
17585   fi
17586 fi
17587
17588
17589 ###############################################################################
17590 #
17591 #       Check for pty support for 'phosphor'
17592 #
17593 ###############################################################################
17594
17595 PTY_LIBS=
17596 have_ptys=no
17597
17598   ac_save_CPPFLAGS="$CPPFLAGS"
17599   if test \! -z "$includedir" ; then
17600     CPPFLAGS="$CPPFLAGS -I$includedir"
17601   fi
17602   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17603   if test "${ac_cv_header_pty_h+set}" = set; then
17604   echo "$as_me:$LINENO: checking for pty.h" >&5
17605 echo $ECHO_N "checking for pty.h... $ECHO_C" >&6
17606 if test "${ac_cv_header_pty_h+set}" = set; then
17607   echo $ECHO_N "(cached) $ECHO_C" >&6
17608 fi
17609 echo "$as_me:$LINENO: result: $ac_cv_header_pty_h" >&5
17610 echo "${ECHO_T}$ac_cv_header_pty_h" >&6
17611 else
17612   # Is the header compilable?
17613 echo "$as_me:$LINENO: checking pty.h usability" >&5
17614 echo $ECHO_N "checking pty.h usability... $ECHO_C" >&6
17615 cat >conftest.$ac_ext <<_ACEOF
17616 #line $LINENO "configure"
17617 /* confdefs.h.  */
17618 _ACEOF
17619 cat confdefs.h >>conftest.$ac_ext
17620 cat >>conftest.$ac_ext <<_ACEOF
17621 /* end confdefs.h.  */
17622 $ac_includes_default
17623 #include <pty.h>
17624 _ACEOF
17625 rm -f conftest.$ac_objext
17626 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17627   (eval $ac_compile) 2>&5
17628   ac_status=$?
17629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17630   (exit $ac_status); } &&
17631          { ac_try='test -s conftest.$ac_objext'
17632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17633   (eval $ac_try) 2>&5
17634   ac_status=$?
17635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17636   (exit $ac_status); }; }; then
17637   ac_header_compiler=yes
17638 else
17639   echo "$as_me: failed program was:" >&5
17640 sed 's/^/| /' conftest.$ac_ext >&5
17641
17642 ac_header_compiler=no
17643 fi
17644 rm -f conftest.$ac_objext conftest.$ac_ext
17645 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17646 echo "${ECHO_T}$ac_header_compiler" >&6
17647
17648 # Is the header present?
17649 echo "$as_me:$LINENO: checking pty.h presence" >&5
17650 echo $ECHO_N "checking pty.h presence... $ECHO_C" >&6
17651 cat >conftest.$ac_ext <<_ACEOF
17652 #line $LINENO "configure"
17653 /* confdefs.h.  */
17654 _ACEOF
17655 cat confdefs.h >>conftest.$ac_ext
17656 cat >>conftest.$ac_ext <<_ACEOF
17657 /* end confdefs.h.  */
17658 #include <pty.h>
17659 _ACEOF
17660 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17661   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17662   ac_status=$?
17663   grep -v '^ *+' conftest.er1 >conftest.err
17664   rm -f conftest.er1
17665   cat conftest.err >&5
17666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17667   (exit $ac_status); } >/dev/null; then
17668   if test -s conftest.err; then
17669     ac_cpp_err=$ac_c_preproc_warn_flag
17670   else
17671     ac_cpp_err=
17672   fi
17673 else
17674   ac_cpp_err=yes
17675 fi
17676 if test -z "$ac_cpp_err"; then
17677   ac_header_preproc=yes
17678 else
17679   echo "$as_me: failed program was:" >&5
17680 sed 's/^/| /' conftest.$ac_ext >&5
17681
17682   ac_header_preproc=no
17683 fi
17684 rm -f conftest.err conftest.$ac_ext
17685 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17686 echo "${ECHO_T}$ac_header_preproc" >&6
17687
17688 # So?  What about this header?
17689 case $ac_header_compiler:$ac_header_preproc in
17690   yes:no )
17691     { echo "$as_me:$LINENO: WARNING: pty.h: accepted by the compiler, rejected by the preprocessor!" >&5
17692 echo "$as_me: WARNING: pty.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17693     { echo "$as_me:$LINENO: WARNING: pty.h: proceeding with the preprocessor's result" >&5
17694 echo "$as_me: WARNING: pty.h: proceeding with the preprocessor's result" >&2;}
17695     (
17696       cat <<\_ASBOX
17697 ## ------------------------------------ ##
17698 ## Report this to bug-autoconf@gnu.org. ##
17699 ## ------------------------------------ ##
17700 _ASBOX
17701     ) |
17702       sed "s/^/$as_me: WARNING:     /" >&2
17703     ;;
17704   no:yes )
17705     { echo "$as_me:$LINENO: WARNING: pty.h: present but cannot be compiled" >&5
17706 echo "$as_me: WARNING: pty.h: present but cannot be compiled" >&2;}
17707     { echo "$as_me:$LINENO: WARNING: pty.h: check for missing prerequisite headers?" >&5
17708 echo "$as_me: WARNING: pty.h: check for missing prerequisite headers?" >&2;}
17709     { echo "$as_me:$LINENO: WARNING: pty.h: proceeding with the preprocessor's result" >&5
17710 echo "$as_me: WARNING: pty.h: proceeding with the preprocessor's result" >&2;}
17711     (
17712       cat <<\_ASBOX
17713 ## ------------------------------------ ##
17714 ## Report this to bug-autoconf@gnu.org. ##
17715 ## ------------------------------------ ##
17716 _ASBOX
17717     ) |
17718       sed "s/^/$as_me: WARNING:     /" >&2
17719     ;;
17720 esac
17721 echo "$as_me:$LINENO: checking for pty.h" >&5
17722 echo $ECHO_N "checking for pty.h... $ECHO_C" >&6
17723 if test "${ac_cv_header_pty_h+set}" = set; then
17724   echo $ECHO_N "(cached) $ECHO_C" >&6
17725 else
17726   ac_cv_header_pty_h=$ac_header_preproc
17727 fi
17728 echo "$as_me:$LINENO: result: $ac_cv_header_pty_h" >&5
17729 echo "${ECHO_T}$ac_cv_header_pty_h" >&6
17730
17731 fi
17732 if test $ac_cv_header_pty_h = yes; then
17733   have_ptys=yes
17734 fi
17735
17736
17737   CPPFLAGS="$ac_save_CPPFLAGS"
17738 if test "$have_ptys" = yes; then
17739   # we have the header, now check for the library
17740   have_ptys=no
17741
17742   ac_save_CPPFLAGS="$CPPFLAGS"
17743   ac_save_LDFLAGS="$LDFLAGS"
17744 #  ac_save_LIBS="$LIBS"
17745
17746   if test \! -z "$includedir" ; then
17747     CPPFLAGS="$CPPFLAGS -I$includedir"
17748   fi
17749   # note: $X_CFLAGS includes $x_includes
17750   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17751
17752   if test \! -z "$libdir" ; then
17753     LDFLAGS="$LDFLAGS -L$libdir"
17754   fi
17755   # note: $X_LIBS includes $x_libraries
17756   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17757
17758   echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17759 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
17760 if test "${ac_cv_lib_util_forkpty+set}" = set; then
17761   echo $ECHO_N "(cached) $ECHO_C" >&6
17762 else
17763   ac_check_lib_save_LIBS=$LIBS
17764 LIBS="-lutil  $LIBS"
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
17773 /* Override any gcc2 internal prototype to avoid an error.  */
17774 #ifdef __cplusplus
17775 extern "C"
17776 #endif
17777 /* We use char because int might match the return type of a gcc2
17778    builtin and then its argument prototype would still apply.  */
17779 char forkpty ();
17780 int
17781 main ()
17782 {
17783 forkpty ();
17784   ;
17785   return 0;
17786 }
17787 _ACEOF
17788 rm -f conftest.$ac_objext conftest$ac_exeext
17789 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17790   (eval $ac_link) 2>&5
17791   ac_status=$?
17792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17793   (exit $ac_status); } &&
17794          { ac_try='test -s conftest$ac_exeext'
17795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17796   (eval $ac_try) 2>&5
17797   ac_status=$?
17798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17799   (exit $ac_status); }; }; then
17800   ac_cv_lib_util_forkpty=yes
17801 else
17802   echo "$as_me: failed program was:" >&5
17803 sed 's/^/| /' conftest.$ac_ext >&5
17804
17805 ac_cv_lib_util_forkpty=no
17806 fi
17807 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17808 LIBS=$ac_check_lib_save_LIBS
17809 fi
17810 echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17811 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
17812 if test $ac_cv_lib_util_forkpty = yes; then
17813   have_ptys=yes
17814                   PTY_LIBS="-lutil"
17815                   cat >>confdefs.h <<\_ACEOF
17816 #define HAVE_FORKPTY 1
17817 _ACEOF
17818
17819 fi
17820
17821   CPPFLAGS="$ac_save_CPPFLAGS"
17822   LDFLAGS="$ac_save_LDFLAGS"
17823 #  LIBS="$ac_save_LIBS"
17824
17825 fi
17826
17827
17828 ###############################################################################
17829 #
17830 #       Check for the XSHM server extension.
17831 #
17832 ###############################################################################
17833
17834 have_xshm=no
17835 with_xshm_req=unspecified
17836
17837 # Check whether --with-xshm-ext or --without-xshm-ext was given.
17838 if test "${with_xshm_ext+set}" = set; then
17839   withval="$with_xshm_ext"
17840   with_xshm="$withval"; with_xshm_req="$withval"
17841 else
17842   with_xshm=yes
17843 fi;
17844
17845
17846    case "$with_xshm" in
17847     yes) ;;
17848     no)  ;;
17849
17850     /*)
17851      echo "$as_me:$LINENO: checking for XSHM headers" >&5
17852 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
17853      d=$with_xshm/include
17854      if test -d $d; then
17855        X_CFLAGS="-I$d $X_CFLAGS"
17856        echo "$as_me:$LINENO: result: $d" >&5
17857 echo "${ECHO_T}$d" >&6
17858      else
17859        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17860 echo "${ECHO_T}not found ($d: no such directory)" >&6
17861      fi
17862
17863      echo "$as_me:$LINENO: checking for XSHM libs" >&5
17864 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
17865      d=$with_xshm/lib
17866      if test -d $d; then
17867        X_LIBS="-L$d $X_LIBS"
17868        echo "$as_me:$LINENO: result: $d" >&5
17869 echo "${ECHO_T}$d" >&6
17870      else
17871        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17872 echo "${ECHO_T}not found ($d: no such directory)" >&6
17873      fi
17874
17875      # replace the directory string with "yes".
17876      with_xshm_req="yes"
17877      with_xshm=$with_xshm_req
17878      ;;
17879
17880     *)
17881      echo ""
17882      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
17883      echo "       If it is a directory, then \`DIR/include' will be added to"
17884      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17885      exit 1
17886      ;;
17887    esac
17888
17889
17890 if test "$with_xshm" = yes; then
17891
17892   # first check for Xshm.h.
17893
17894   ac_save_CPPFLAGS="$CPPFLAGS"
17895   if test \! -z "$includedir" ; then
17896     CPPFLAGS="$CPPFLAGS -I$includedir"
17897   fi
17898   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17899   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
17900 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
17901 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
17902   echo $ECHO_N "(cached) $ECHO_C" >&6
17903 else
17904   cat >conftest.$ac_ext <<_ACEOF
17905 #line $LINENO "configure"
17906 /* confdefs.h.  */
17907 _ACEOF
17908 cat confdefs.h >>conftest.$ac_ext
17909 cat >>conftest.$ac_ext <<_ACEOF
17910 /* end confdefs.h.  */
17911 #include <X11/Xlib.h>
17912
17913 #include <X11/extensions/XShm.h>
17914 _ACEOF
17915 rm -f conftest.$ac_objext
17916 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17917   (eval $ac_compile) 2>&5
17918   ac_status=$?
17919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17920   (exit $ac_status); } &&
17921          { ac_try='test -s conftest.$ac_objext'
17922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17923   (eval $ac_try) 2>&5
17924   ac_status=$?
17925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17926   (exit $ac_status); }; }; then
17927   ac_cv_header_X11_extensions_XShm_h=yes
17928 else
17929   echo "$as_me: failed program was:" >&5
17930 sed 's/^/| /' conftest.$ac_ext >&5
17931
17932 ac_cv_header_X11_extensions_XShm_h=no
17933 fi
17934 rm -f conftest.$ac_objext conftest.$ac_ext
17935 fi
17936 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
17937 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
17938 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
17939   have_xshm=yes
17940 fi
17941
17942
17943   CPPFLAGS="$ac_save_CPPFLAGS"
17944
17945   # if that succeeded, then check for sys/ipc.h.
17946   if test "$have_xshm" = yes; then
17947     have_xshm=no
17948
17949   ac_save_CPPFLAGS="$CPPFLAGS"
17950   if test \! -z "$includedir" ; then
17951     CPPFLAGS="$CPPFLAGS -I$includedir"
17952   fi
17953   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17954   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
17955   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
17956 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
17957 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
17958   echo $ECHO_N "(cached) $ECHO_C" >&6
17959 fi
17960 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
17961 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
17962 else
17963   # Is the header compilable?
17964 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
17965 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
17966 cat >conftest.$ac_ext <<_ACEOF
17967 #line $LINENO "configure"
17968 /* confdefs.h.  */
17969 _ACEOF
17970 cat confdefs.h >>conftest.$ac_ext
17971 cat >>conftest.$ac_ext <<_ACEOF
17972 /* end confdefs.h.  */
17973 $ac_includes_default
17974 #include <sys/ipc.h>
17975 _ACEOF
17976 rm -f conftest.$ac_objext
17977 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17978   (eval $ac_compile) 2>&5
17979   ac_status=$?
17980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17981   (exit $ac_status); } &&
17982          { ac_try='test -s conftest.$ac_objext'
17983   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17984   (eval $ac_try) 2>&5
17985   ac_status=$?
17986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17987   (exit $ac_status); }; }; then
17988   ac_header_compiler=yes
17989 else
17990   echo "$as_me: failed program was:" >&5
17991 sed 's/^/| /' conftest.$ac_ext >&5
17992
17993 ac_header_compiler=no
17994 fi
17995 rm -f conftest.$ac_objext conftest.$ac_ext
17996 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17997 echo "${ECHO_T}$ac_header_compiler" >&6
17998
17999 # Is the header present?
18000 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
18001 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
18002 cat >conftest.$ac_ext <<_ACEOF
18003 #line $LINENO "configure"
18004 /* confdefs.h.  */
18005 _ACEOF
18006 cat confdefs.h >>conftest.$ac_ext
18007 cat >>conftest.$ac_ext <<_ACEOF
18008 /* end confdefs.h.  */
18009 #include <sys/ipc.h>
18010 _ACEOF
18011 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18012   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18013   ac_status=$?
18014   grep -v '^ *+' conftest.er1 >conftest.err
18015   rm -f conftest.er1
18016   cat conftest.err >&5
18017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18018   (exit $ac_status); } >/dev/null; then
18019   if test -s conftest.err; then
18020     ac_cpp_err=$ac_c_preproc_warn_flag
18021   else
18022     ac_cpp_err=
18023   fi
18024 else
18025   ac_cpp_err=yes
18026 fi
18027 if test -z "$ac_cpp_err"; then
18028   ac_header_preproc=yes
18029 else
18030   echo "$as_me: failed program was:" >&5
18031 sed 's/^/| /' conftest.$ac_ext >&5
18032
18033   ac_header_preproc=no
18034 fi
18035 rm -f conftest.err conftest.$ac_ext
18036 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18037 echo "${ECHO_T}$ac_header_preproc" >&6
18038
18039 # So?  What about this header?
18040 case $ac_header_compiler:$ac_header_preproc in
18041   yes:no )
18042     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
18043 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18044     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
18045 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
18046     (
18047       cat <<\_ASBOX
18048 ## ------------------------------------ ##
18049 ## Report this to bug-autoconf@gnu.org. ##
18050 ## ------------------------------------ ##
18051 _ASBOX
18052     ) |
18053       sed "s/^/$as_me: WARNING:     /" >&2
18054     ;;
18055   no:yes )
18056     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
18057 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
18058     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&5
18059 echo "$as_me: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&2;}
18060     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
18061 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
18062     (
18063       cat <<\_ASBOX
18064 ## ------------------------------------ ##
18065 ## Report this to bug-autoconf@gnu.org. ##
18066 ## ------------------------------------ ##
18067 _ASBOX
18068     ) |
18069       sed "s/^/$as_me: WARNING:     /" >&2
18070     ;;
18071 esac
18072 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
18073 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
18074 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18075   echo $ECHO_N "(cached) $ECHO_C" >&6
18076 else
18077   ac_cv_header_sys_ipc_h=$ac_header_preproc
18078 fi
18079 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
18080 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
18081
18082 fi
18083 if test $ac_cv_header_sys_ipc_h = yes; then
18084   have_xshm=yes
18085 fi
18086
18087
18088   CPPFLAGS="$ac_save_CPPFLAGS"
18089   fi
18090
18091   # if that succeeded, then check for sys/shm.h.
18092   if test "$have_xshm" = yes; then
18093     have_xshm=no
18094
18095   ac_save_CPPFLAGS="$CPPFLAGS"
18096   if test \! -z "$includedir" ; then
18097     CPPFLAGS="$CPPFLAGS -I$includedir"
18098   fi
18099   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18100   if test "${ac_cv_header_sys_shm_h+set}" = set; then
18101   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
18102 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
18103 if test "${ac_cv_header_sys_shm_h+set}" = set; then
18104   echo $ECHO_N "(cached) $ECHO_C" >&6
18105 fi
18106 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
18107 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
18108 else
18109   # Is the header compilable?
18110 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
18111 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
18112 cat >conftest.$ac_ext <<_ACEOF
18113 #line $LINENO "configure"
18114 /* confdefs.h.  */
18115 _ACEOF
18116 cat confdefs.h >>conftest.$ac_ext
18117 cat >>conftest.$ac_ext <<_ACEOF
18118 /* end confdefs.h.  */
18119 $ac_includes_default
18120 #include <sys/shm.h>
18121 _ACEOF
18122 rm -f conftest.$ac_objext
18123 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18124   (eval $ac_compile) 2>&5
18125   ac_status=$?
18126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18127   (exit $ac_status); } &&
18128          { ac_try='test -s conftest.$ac_objext'
18129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18130   (eval $ac_try) 2>&5
18131   ac_status=$?
18132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18133   (exit $ac_status); }; }; then
18134   ac_header_compiler=yes
18135 else
18136   echo "$as_me: failed program was:" >&5
18137 sed 's/^/| /' conftest.$ac_ext >&5
18138
18139 ac_header_compiler=no
18140 fi
18141 rm -f conftest.$ac_objext conftest.$ac_ext
18142 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18143 echo "${ECHO_T}$ac_header_compiler" >&6
18144
18145 # Is the header present?
18146 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
18147 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
18148 cat >conftest.$ac_ext <<_ACEOF
18149 #line $LINENO "configure"
18150 /* confdefs.h.  */
18151 _ACEOF
18152 cat confdefs.h >>conftest.$ac_ext
18153 cat >>conftest.$ac_ext <<_ACEOF
18154 /* end confdefs.h.  */
18155 #include <sys/shm.h>
18156 _ACEOF
18157 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18158   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18159   ac_status=$?
18160   grep -v '^ *+' conftest.er1 >conftest.err
18161   rm -f conftest.er1
18162   cat conftest.err >&5
18163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18164   (exit $ac_status); } >/dev/null; then
18165   if test -s conftest.err; then
18166     ac_cpp_err=$ac_c_preproc_warn_flag
18167   else
18168     ac_cpp_err=
18169   fi
18170 else
18171   ac_cpp_err=yes
18172 fi
18173 if test -z "$ac_cpp_err"; then
18174   ac_header_preproc=yes
18175 else
18176   echo "$as_me: failed program was:" >&5
18177 sed 's/^/| /' conftest.$ac_ext >&5
18178
18179   ac_header_preproc=no
18180 fi
18181 rm -f conftest.err conftest.$ac_ext
18182 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18183 echo "${ECHO_T}$ac_header_preproc" >&6
18184
18185 # So?  What about this header?
18186 case $ac_header_compiler:$ac_header_preproc in
18187   yes:no )
18188     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
18189 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18190     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
18191 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
18192     (
18193       cat <<\_ASBOX
18194 ## ------------------------------------ ##
18195 ## Report this to bug-autoconf@gnu.org. ##
18196 ## ------------------------------------ ##
18197 _ASBOX
18198     ) |
18199       sed "s/^/$as_me: WARNING:     /" >&2
18200     ;;
18201   no:yes )
18202     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
18203 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
18204     { echo "$as_me:$LINENO: WARNING: sys/shm.h: check for missing prerequisite headers?" >&5
18205 echo "$as_me: WARNING: sys/shm.h: check for missing prerequisite headers?" >&2;}
18206     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
18207 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
18208     (
18209       cat <<\_ASBOX
18210 ## ------------------------------------ ##
18211 ## Report this to bug-autoconf@gnu.org. ##
18212 ## ------------------------------------ ##
18213 _ASBOX
18214     ) |
18215       sed "s/^/$as_me: WARNING:     /" >&2
18216     ;;
18217 esac
18218 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
18219 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
18220 if test "${ac_cv_header_sys_shm_h+set}" = set; then
18221   echo $ECHO_N "(cached) $ECHO_C" >&6
18222 else
18223   ac_cv_header_sys_shm_h=$ac_header_preproc
18224 fi
18225 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
18226 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
18227
18228 fi
18229 if test $ac_cv_header_sys_shm_h = yes; then
18230   have_xshm=yes
18231 fi
18232
18233
18234   CPPFLAGS="$ac_save_CPPFLAGS"
18235   fi
18236
18237   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
18238   # to exist, but the library code to not exist.  And even better, the library
18239   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
18240   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
18241   # that's not quite right, but close enough.)
18242   #
18243   case "$host" in
18244     *-aix*)
18245       if  `uname -v` -eq 3 ; then
18246         have_xshm=no
18247
18248   ac_save_CPPFLAGS="$CPPFLAGS"
18249   ac_save_LDFLAGS="$LDFLAGS"
18250 #  ac_save_LIBS="$LIBS"
18251
18252   if test \! -z "$includedir" ; then
18253     CPPFLAGS="$CPPFLAGS -I$includedir"
18254   fi
18255   # note: $X_CFLAGS includes $x_includes
18256   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18257
18258   if test \! -z "$libdir" ; then
18259     LDFLAGS="$LDFLAGS -L$libdir"
18260   fi
18261   # note: $X_LIBS includes $x_libraries
18262   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18263
18264   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
18265 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
18266 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
18267   echo $ECHO_N "(cached) $ECHO_C" >&6
18268 else
18269   ac_check_lib_save_LIBS=$LIBS
18270 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
18271 cat >conftest.$ac_ext <<_ACEOF
18272 #line $LINENO "configure"
18273 /* confdefs.h.  */
18274 _ACEOF
18275 cat confdefs.h >>conftest.$ac_ext
18276 cat >>conftest.$ac_ext <<_ACEOF
18277 /* end confdefs.h.  */
18278
18279 /* Override any gcc2 internal prototype to avoid an error.  */
18280 #ifdef __cplusplus
18281 extern "C"
18282 #endif
18283 /* We use char because int might match the return type of a gcc2
18284    builtin and then its argument prototype would still apply.  */
18285 char XShmQueryExtension ();
18286 int
18287 main ()
18288 {
18289 XShmQueryExtension ();
18290   ;
18291   return 0;
18292 }
18293 _ACEOF
18294 rm -f conftest.$ac_objext conftest$ac_exeext
18295 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18296   (eval $ac_link) 2>&5
18297   ac_status=$?
18298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18299   (exit $ac_status); } &&
18300          { ac_try='test -s conftest$ac_exeext'
18301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18302   (eval $ac_try) 2>&5
18303   ac_status=$?
18304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18305   (exit $ac_status); }; }; then
18306   ac_cv_lib_XextSam_XShmQueryExtension=yes
18307 else
18308   echo "$as_me: failed program was:" >&5
18309 sed 's/^/| /' conftest.$ac_ext >&5
18310
18311 ac_cv_lib_XextSam_XShmQueryExtension=no
18312 fi
18313 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18314 LIBS=$ac_check_lib_save_LIBS
18315 fi
18316 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
18317 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
18318 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
18319   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
18320 else
18321   true
18322 fi
18323
18324   CPPFLAGS="$ac_save_CPPFLAGS"
18325   LDFLAGS="$ac_save_LDFLAGS"
18326 #  LIBS="$ac_save_LIBS"
18327
18328       fi
18329     ;;
18330   esac
18331
18332   # if that succeeded, then we've really got it.
18333   if test "$have_xshm" = yes; then
18334     cat >>confdefs.h <<\_ACEOF
18335 #define HAVE_XSHM_EXTENSION 1
18336 _ACEOF
18337
18338   fi
18339
18340 elif test "$with_xshm" != no; then
18341   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
18342   exit 1
18343 fi
18344
18345
18346 ###############################################################################
18347 #
18348 #       Check for the DOUBLE-BUFFER server extension.
18349 #
18350 ###############################################################################
18351
18352 have_xdbe=no
18353 with_xdbe_req=unspecified
18354
18355 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
18356 if test "${with_xdbe_ext+set}" = set; then
18357   withval="$with_xdbe_ext"
18358   with_xdbe="$withval"; with_xdbe_req="$withval"
18359 else
18360   with_xdbe=yes
18361 fi;
18362
18363
18364    case "$with_xdbe" in
18365     yes) ;;
18366     no)  ;;
18367
18368     /*)
18369      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
18370 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
18371      d=$with_xdbe/include
18372      if test -d $d; then
18373        X_CFLAGS="-I$d $X_CFLAGS"
18374        echo "$as_me:$LINENO: result: $d" >&5
18375 echo "${ECHO_T}$d" >&6
18376      else
18377        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18378 echo "${ECHO_T}not found ($d: no such directory)" >&6
18379      fi
18380
18381      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
18382 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
18383      d=$with_xdbe/lib
18384      if test -d $d; then
18385        X_LIBS="-L$d $X_LIBS"
18386        echo "$as_me:$LINENO: result: $d" >&5
18387 echo "${ECHO_T}$d" >&6
18388      else
18389        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18390 echo "${ECHO_T}not found ($d: no such directory)" >&6
18391      fi
18392
18393      # replace the directory string with "yes".
18394      with_xdbe_req="yes"
18395      with_xdbe=$with_xdbe_req
18396      ;;
18397
18398     *)
18399      echo ""
18400      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
18401      echo "       If it is a directory, then \`DIR/include' will be added to"
18402      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18403      exit 1
18404      ;;
18405    esac
18406
18407
18408 if test "$with_xdbe" = yes; then
18409
18410
18411   ac_save_CPPFLAGS="$CPPFLAGS"
18412   if test \! -z "$includedir" ; then
18413     CPPFLAGS="$CPPFLAGS -I$includedir"
18414   fi
18415   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18416   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
18417 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
18418 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
18419   echo $ECHO_N "(cached) $ECHO_C" >&6
18420 else
18421   cat >conftest.$ac_ext <<_ACEOF
18422 #line $LINENO "configure"
18423 /* confdefs.h.  */
18424 _ACEOF
18425 cat confdefs.h >>conftest.$ac_ext
18426 cat >>conftest.$ac_ext <<_ACEOF
18427 /* end confdefs.h.  */
18428 #include <X11/Xlib.h>
18429
18430 #include <X11/extensions/Xdbe.h>
18431 _ACEOF
18432 rm -f conftest.$ac_objext
18433 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18434   (eval $ac_compile) 2>&5
18435   ac_status=$?
18436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18437   (exit $ac_status); } &&
18438          { ac_try='test -s conftest.$ac_objext'
18439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18440   (eval $ac_try) 2>&5
18441   ac_status=$?
18442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18443   (exit $ac_status); }; }; then
18444   ac_cv_header_X11_extensions_Xdbe_h=yes
18445 else
18446   echo "$as_me: failed program was:" >&5
18447 sed 's/^/| /' conftest.$ac_ext >&5
18448
18449 ac_cv_header_X11_extensions_Xdbe_h=no
18450 fi
18451 rm -f conftest.$ac_objext conftest.$ac_ext
18452 fi
18453 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
18454 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
18455 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
18456   have_xdbe=yes
18457 fi
18458
18459
18460   CPPFLAGS="$ac_save_CPPFLAGS"
18461   if test "$have_xdbe" = yes; then
18462     cat >>confdefs.h <<\_ACEOF
18463 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
18464 _ACEOF
18465
18466   fi
18467
18468 elif test "$with_xdbe" != no; then
18469   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
18470   exit 1
18471 fi
18472
18473
18474 ###############################################################################
18475 #
18476 #       Check for the SGI XReadDisplay server extension.
18477 #
18478 #       Note: this has to be down here, rather than up with the other server
18479 #       extension tests, so that the output of `configure --help' is in the
18480 #       right order.  Arrgh!
18481 #
18482 ###############################################################################
18483
18484 have_readdisplay=no
18485 with_readdisplay_req=unspecified
18486
18487 # Check whether --with-readdisplay or --without-readdisplay was given.
18488 if test "${with_readdisplay+set}" = set; then
18489   withval="$with_readdisplay"
18490   with_readdisplay="$withval"; with_readdisplay_req="$withval"
18491 else
18492   with_readdisplay=yes
18493 fi;
18494
18495
18496    case "$with_readdisplay" in
18497     yes) ;;
18498     no)  ;;
18499
18500     /*)
18501      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
18502 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
18503      d=$with_readdisplay/include
18504      if test -d $d; then
18505        X_CFLAGS="-I$d $X_CFLAGS"
18506        echo "$as_me:$LINENO: result: $d" >&5
18507 echo "${ECHO_T}$d" >&6
18508      else
18509        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18510 echo "${ECHO_T}not found ($d: no such directory)" >&6
18511      fi
18512
18513      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
18514 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
18515      d=$with_readdisplay/lib
18516      if test -d $d; then
18517        X_LIBS="-L$d $X_LIBS"
18518        echo "$as_me:$LINENO: result: $d" >&5
18519 echo "${ECHO_T}$d" >&6
18520      else
18521        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18522 echo "${ECHO_T}not found ($d: no such directory)" >&6
18523      fi
18524
18525      # replace the directory string with "yes".
18526      with_readdisplay_req="yes"
18527      with_readdisplay=$with_readdisplay_req
18528      ;;
18529
18530     *)
18531      echo ""
18532      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
18533      echo "       If it is a directory, then \`DIR/include' will be added to"
18534      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18535      exit 1
18536      ;;
18537    esac
18538
18539
18540 if test "$with_readdisplay" = yes; then
18541
18542   ac_save_CPPFLAGS="$CPPFLAGS"
18543   if test \! -z "$includedir" ; then
18544     CPPFLAGS="$CPPFLAGS -I$includedir"
18545   fi
18546   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18547   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
18548 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
18549 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
18550   echo $ECHO_N "(cached) $ECHO_C" >&6
18551 else
18552   cat >conftest.$ac_ext <<_ACEOF
18553 #line $LINENO "configure"
18554 /* confdefs.h.  */
18555 _ACEOF
18556 cat confdefs.h >>conftest.$ac_ext
18557 cat >>conftest.$ac_ext <<_ACEOF
18558 /* end confdefs.h.  */
18559 #include <X11/Xlib.h>
18560
18561 #include <X11/extensions/readdisplay.h>
18562 _ACEOF
18563 rm -f conftest.$ac_objext
18564 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18565   (eval $ac_compile) 2>&5
18566   ac_status=$?
18567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18568   (exit $ac_status); } &&
18569          { ac_try='test -s conftest.$ac_objext'
18570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18571   (eval $ac_try) 2>&5
18572   ac_status=$?
18573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18574   (exit $ac_status); }; }; then
18575   ac_cv_header_X11_extensions_readdisplay_h=yes
18576 else
18577   echo "$as_me: failed program was:" >&5
18578 sed 's/^/| /' conftest.$ac_ext >&5
18579
18580 ac_cv_header_X11_extensions_readdisplay_h=no
18581 fi
18582 rm -f conftest.$ac_objext conftest.$ac_ext
18583 fi
18584 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
18585 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
18586 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
18587   cat >>confdefs.h <<\_ACEOF
18588 #define HAVE_READ_DISPLAY_EXTENSION 1
18589 _ACEOF
18590
18591 fi
18592
18593
18594   CPPFLAGS="$ac_save_CPPFLAGS"
18595 elif test "$with_readdisplay" != no; then
18596   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
18597   exit 1
18598 fi
18599
18600
18601 ###############################################################################
18602 #
18603 #       Check for a program to generate random text.
18604 #
18605 #       Zippy is funnier than the idiocy generally spat out by `fortune',
18606 #       so first see if "fortune zippy" works.  Else, use plain "fortune".
18607 #
18608 #       We used to dig around in Emacs to look for the "yow" program, but
18609 #       most people who have Emacs also have "fortune zippy", so nevermind.
18610 #
18611 ###############################################################################
18612
18613 with_fortune_req=""
18614
18615 # Check whether --with-fortune or --without-fortune was given.
18616 if test "${with_fortune+set}" = set; then
18617   withval="$with_fortune"
18618   with_fortune_req="$withval"; with_fortune="$withval"
18619 else
18620   with_fortune=yes
18621 fi;
18622
18623 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
18624   with_fortune=""
18625   with_fortune_req=""
18626 fi
18627
18628 if test -n "$with_fortune_req" ; then
18629   ac_cv_fortune_program=""
18630   case "$with_fortune_req" in
18631     /*)
18632
18633       set dummy $with_fortune_req ; fortune_tmp=$2
18634       echo "$as_me:$LINENO: checking for $fortune_tmp" >&5
18635 echo $ECHO_N "checking for $fortune_tmp... $ECHO_C" >&6
18636       if test -x "$fortune_tmp" ; then
18637         echo "$as_me:$LINENO: result: yes" >&5
18638 echo "${ECHO_T}yes" >&6
18639       else
18640         echo "$as_me:$LINENO: result: no" >&5
18641 echo "${ECHO_T}no" >&6
18642         with_fortune=""
18643       fi
18644     ;;
18645     *)
18646       set dummy $with_fortune_req ; fortune_tmp=$2
18647       # don't cache
18648       unset ac_cv_path_fortune_tmp
18649       # Extract the first word of "$fortune_tmp", so it can be a program name with args.
18650 set dummy $fortune_tmp; ac_word=$2
18651 echo "$as_me:$LINENO: checking for $ac_word" >&5
18652 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18653 if test "${ac_cv_path_fortune_tmp+set}" = set; then
18654   echo $ECHO_N "(cached) $ECHO_C" >&6
18655 else
18656   case $fortune_tmp in
18657   [\\/]* | ?:[\\/]*)
18658   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
18659   ;;
18660   *)
18661   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18662 for as_dir in $PATH
18663 do
18664   IFS=$as_save_IFS
18665   test -z "$as_dir" && as_dir=.
18666   for ac_exec_ext in '' $ac_executable_extensions; do
18667   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18668     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
18669     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18670     break 2
18671   fi
18672 done
18673 done
18674
18675   ;;
18676 esac
18677 fi
18678 fortune_tmp=$ac_cv_path_fortune_tmp
18679
18680 if test -n "$fortune_tmp"; then
18681   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
18682 echo "${ECHO_T}$fortune_tmp" >&6
18683 else
18684   echo "$as_me:$LINENO: result: no" >&5
18685 echo "${ECHO_T}no" >&6
18686 fi
18687
18688       if test -z "$fortune_tmp" ; then
18689         with_fortune=""
18690       fi
18691     ;;
18692   esac
18693   ac_cv_fortune_program="$with_fortune"
18694
18695 elif test -n "$ac_cv_fortune_program"; then
18696   echo "$as_me:$LINENO: result: checking for fortune... (cached) $ac_cv_fortune_program" >&5
18697 echo "${ECHO_T}checking for fortune... (cached) $ac_cv_fortune_program" >&6
18698 fi
18699
18700 unset ac_cv_path_fortune_tmp
18701 unset fortune_tmp
18702
18703 if test -z "$ac_cv_fortune_program" ; then
18704
18705   # first look for fortune in /usr/games/ (and use absolute path)
18706   for ac_prog in fortune
18707 do
18708   # Extract the first word of "$ac_prog", so it can be a program name with args.
18709 set dummy $ac_prog; ac_word=$2
18710 echo "$as_me:$LINENO: checking for $ac_word" >&5
18711 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18712 if test "${ac_cv_path_fortune_tmp+set}" = set; then
18713   echo $ECHO_N "(cached) $ECHO_C" >&6
18714 else
18715   case $fortune_tmp in
18716   [\\/]* | ?:[\\/]*)
18717   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
18718   ;;
18719   *)
18720   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18721 for as_dir in "/usr/games"
18722 do
18723   IFS=$as_save_IFS
18724   test -z "$as_dir" && as_dir=.
18725   for ac_exec_ext in '' $ac_executable_extensions; do
18726   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18727     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
18728     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18729     break 2
18730   fi
18731 done
18732 done
18733
18734   ;;
18735 esac
18736 fi
18737 fortune_tmp=$ac_cv_path_fortune_tmp
18738
18739 if test -n "$fortune_tmp"; then
18740   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
18741 echo "${ECHO_T}$fortune_tmp" >&6
18742 else
18743   echo "$as_me:$LINENO: result: no" >&5
18744 echo "${ECHO_T}no" >&6
18745 fi
18746
18747   test -n "$fortune_tmp" && break
18748 done
18749
18750
18751   # if it's not there, look on $PATH (and don't use absolute path)
18752   if test -z "$fortune_tmp" ; then
18753      for ac_prog in fortune
18754 do
18755   # Extract the first word of "$ac_prog", so it can be a program name with args.
18756 set dummy $ac_prog; ac_word=$2
18757 echo "$as_me:$LINENO: checking for $ac_word" >&5
18758 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18759 if test "${ac_cv_prog_fortune_tmp+set}" = set; then
18760   echo $ECHO_N "(cached) $ECHO_C" >&6
18761 else
18762   if test -n "$fortune_tmp"; then
18763   ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
18764 else
18765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18766 for as_dir in $PATH
18767 do
18768   IFS=$as_save_IFS
18769   test -z "$as_dir" && as_dir=.
18770   for ac_exec_ext in '' $ac_executable_extensions; do
18771   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18772     ac_cv_prog_fortune_tmp="$ac_prog"
18773     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18774     break 2
18775   fi
18776 done
18777 done
18778
18779 fi
18780 fi
18781 fortune_tmp=$ac_cv_prog_fortune_tmp
18782 if test -n "$fortune_tmp"; then
18783   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
18784 echo "${ECHO_T}$fortune_tmp" >&6
18785 else
18786   echo "$as_me:$LINENO: result: no" >&5
18787 echo "${ECHO_T}no" >&6
18788 fi
18789
18790   test -n "$fortune_tmp" && break
18791 done
18792
18793   fi
18794
18795   # if we didn't find anything, then just assume /usr/games/
18796   if test -z "$fortune_tmp" ; then
18797      fortune_tmp="/usr/games/fortune"
18798   fi
18799
18800   ac_cv_fortune_program="$fortune_tmp"
18801
18802   # now check to see whether "fortune zippy" works.
18803   #
18804   fortune_tmp="$fortune_tmp zippy"
18805   echo "$as_me:$LINENO: checking for zippy quotes" >&5
18806 echo $ECHO_N "checking for zippy quotes... $ECHO_C" >&6
18807   if ( $fortune_tmp >/dev/null 2>&1 ); then
18808     ac_cv_fortune_program="$fortune_tmp"
18809     echo "$as_me:$LINENO: result: $fortune_tmp" >&5
18810 echo "${ECHO_T}$fortune_tmp" >&6
18811   else
18812     echo "$as_me:$LINENO: result: no" >&5
18813 echo "${ECHO_T}no" >&6
18814   fi
18815
18816 fi
18817
18818 unset ac_cv_path_fortune_tmp
18819 unset fortune_tmp
18820
18821 cat >>confdefs.h <<_ACEOF
18822 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
18823 _ACEOF
18824
18825
18826
18827 ###############################################################################
18828 #
18829 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
18830 #       This should be safe, but let's give people the option.
18831 #
18832 ###############################################################################
18833
18834 setuid_hacks_default=no
18835 setuid_hacks="$setuid_hacks_default"
18836
18837 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
18838 if test "${with_setuid_hacks+set}" = set; then
18839   withval="$with_setuid_hacks"
18840   setuid_hacks="$withval"
18841 else
18842   setuid_hacks="$setuid_hacks_default"
18843 fi;
18844
18845
18846    case "$setuid_hacks" in
18847     yes) ;;
18848     no)  ;;
18849
18850     /*)
18851      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
18852 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
18853      d=$setuid_hacks/include
18854      if test -d $d; then
18855        X_CFLAGS="-I$d $X_CFLAGS"
18856        echo "$as_me:$LINENO: result: $d" >&5
18857 echo "${ECHO_T}$d" >&6
18858      else
18859        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18860 echo "${ECHO_T}not found ($d: no such directory)" >&6
18861      fi
18862
18863      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
18864 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
18865      d=$setuid_hacks/lib
18866      if test -d $d; then
18867        X_LIBS="-L$d $X_LIBS"
18868        echo "$as_me:$LINENO: result: $d" >&5
18869 echo "${ECHO_T}$d" >&6
18870      else
18871        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18872 echo "${ECHO_T}not found ($d: no such directory)" >&6
18873      fi
18874
18875      # replace the directory string with "yes".
18876      setuid_hacks_req="yes"
18877      setuid_hacks=$setuid_hacks_req
18878      ;;
18879
18880     *)
18881      echo ""
18882      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
18883      echo "       If it is a directory, then \`DIR/include' will be added to"
18884      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18885      exit 1
18886      ;;
18887    esac
18888
18889
18890 if test "$setuid_hacks" = yes; then
18891   true
18892 elif test "$setuid_hacks" != no; then
18893   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
18894   exit 1
18895 fi
18896
18897
18898 ###############################################################################
18899 #
18900 #       Done testing.  Now, set up the various -I and -L variables,
18901 #       and decide which GUI program to build by default.
18902 #
18903 ###############################################################################
18904
18905 DEPEND=makedepend
18906 DEPEND_FLAGS=
18907 DEPEND_DEFINES=
18908
18909
18910 if test \! -z "$includedir" ; then
18911   INCLUDES="$INCLUDES -I$includedir"
18912 fi
18913
18914 if test \! -z "$libdir" ; then
18915   LDFLAGS="$LDFLAGS -L$libdir"
18916 fi
18917
18918
18919 PREFERRED_DEMO_PROGRAM=''
18920 ALL_DEMO_PROGRAMS=
18921 if test "$have_motif" = yes; then
18922   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
18923   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
18924 fi
18925 if test "$have_gtk" = yes; then
18926   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
18927   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
18928 fi
18929
18930
18931 if test "$have_kerberos" = yes; then
18932   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
18933   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
18934 fi
18935 if test "$have_pam" = yes; then
18936   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
18937   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
18938   INSTALL_PAM="install-pam"
18939 fi
18940 if test "$have_passwd_helper" = yes; then
18941   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
18942   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
18943 fi
18944   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
18945   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
18946
18947
18948 if test "$enable_locking" = yes; then
18949   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
18950   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
18951 else
18952   LOCK_SRCS='$(NOLOCK_SRCS_1)'
18953   LOCK_OBJS='$(NOLOCK_OBJS_1)'
18954 fi
18955
18956 if test "$ac_macosx" = yes; then
18957   EXES_OSX='$(EXES_OSX)'
18958   SCRIPTS_OSX='$(SCRIPTS_OSX)'
18959   MEN_OSX='$(MEN_OSX)'
18960 else
18961   EXES_OSX=
18962   SCRIPTS_OSX=
18963   MEN_OSX=
18964 fi
18965
18966
18967 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
18968
18969 if test "$need_setuid" = yes; then
18970   NEED_SETUID=yes
18971 else
18972   NEED_SETUID=no
18973 fi
18974
18975 if test "$setuid_hacks" = yes; then
18976   SETUID_HACKS=yes
18977 else
18978   SETUID_HACKS=no
18979 fi
18980
18981 tab='   '
18982 if test "$have_gl" = yes; then
18983   GL_EXES='$(GL_EXES)'
18984   GL_UTIL_EXES='$(GL_UTIL_EXES)'
18985   GL_MEN='$(GL_MEN)'
18986   GL_KLUDGE="${tab}  "
18987 else
18988   GL_KLUDGE="-${tab}  "
18989 fi
18990
18991 if test "$have_gle" = yes; then
18992   GLE_EXES='$(GLE_EXES)'
18993   GLE_KLUDGE="${tab}   "
18994 else
18995   GLE_KLUDGE="-${tab}   "
18996 fi
18997
18998 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
18999  JPEG_EXES='$(JPEG_EXES)'
19000 fi
19001
19002
19003 # Another substitution in the XScreenSaver.ad.in file:
19004 #
19005 if test "$have_gnome_help" = yes; then
19006   GNOMEHELP_Y=''
19007   GNOMEHELP_N='!    '
19008 else
19009   GNOMEHELP_Y='!    '
19010   GNOMEHELP_N=''
19011 fi
19012
19013
19014 # Now that we know whether we have Gnome, we can decide where the XML
19015 # config files get installed.
19016 #
19017 if test -z "$HACK_CONF_DIR" ; then
19018   if test -n "$GNOME_DATADIR" ; then
19019     HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
19020   else
19021     HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
19022   fi
19023 fi
19024
19025
19026
19027 # After computing $HACK_CONF_DIR, make sure $GLADE_DATADIR has a value
19028 # so that we know where to install the Gtk pixmaps.
19029 #
19030 # It should usually be "/usr/share/pixmaps/", but we can't just use
19031 # "$(prefix)/share/pixmaps" because that would usually result in
19032 # "/usr/X11R6/share/pixmaps/", which is wrong.  It needs to be the
19033 # Gnome/Gtk prefix, not the overall prefix.
19034 #
19035 if test -n "$GNOME_DATADIR" ; then
19036   GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver'
19037 elif test "$have_gtk" = yes; then
19038   if test -n "$pkg_config"; then
19039     if test "$have_gtk2" = yes; then
19040       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
19041     else
19042       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+`
19043     fi
19044   else
19045     GLADE_DATADIR=`$gtk_config --prefix`
19046   fi
19047   GLADE_DATADIR="$GLADE_DATADIR/share/xscreensaver"
19048 else
19049   GLADE_DATADIR=''
19050 fi
19051
19052
19053 # Set PO_DATADIR to something sensible.
19054 #
19055 echo "$as_me:$LINENO: checking for locale directory" >&5
19056 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
19057 if test -n "$GNOME_DATADIR" ; then
19058   PO_DATADIR="$GNOME_DATADIR"
19059 elif test "$have_gtk" = yes; then
19060   if test -n "$pkg_config"; then
19061     if test "$have_gtk2" = yes; then
19062       PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
19063     else
19064       PO_DATADIR=`$pkg_config --variable=prefix gtk+`
19065     fi
19066   else
19067     PO_DATADIR=`$gtk_config --prefix`
19068   fi
19069   PO_DATADIR="$PO_DATADIR/share"
19070 fi
19071
19072 if test -z "$PO_DATADIR" ; then
19073   #
19074   # #### Total fucking kludge --
19075   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
19076   # but of course we need to expand all the nested variables to do that...
19077   #
19078   dd=$datadir
19079   eval dd=${dd}
19080   eval dd=${dd}
19081   eval dd=${dd}
19082   eval dd=${dd}
19083   eval dd=${dd}
19084   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
19085 fi
19086
19087 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
19088 echo "${ECHO_T}$PO_DATADIR/locale" >&6
19089
19090
19091 # canonicalize slashes.
19092 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
19093
19094 # gcc 3.0 likes to issue this warning for every file:
19095 #
19096 # cc1: warning: changing search order for system directory "/usr/local/include"
19097 # cc1: warning:   as it has already been specified as a non-system directory
19098 #
19099 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
19100 # Which *should* be totally redundant, and thus an ok thing to delete?
19101 #
19102 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
19103
19104
19105 ###############################################################################
19106 #
19107 #       Perform substitutions and write Makefiles.
19108 #
19109 ###############################################################################
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165 APPDEFAULTS=$ac_x_app_defaults
19166
19167
19168
19169
19170
19171
19172
19173                                                                                 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"
19174 cat >confcache <<\_ACEOF
19175 # This file is a shell script that caches the results of configure
19176 # tests run on this system so they can be shared between configure
19177 # scripts and configure runs, see configure's option --config-cache.
19178 # It is not useful on other systems.  If it contains results you don't
19179 # want to keep, you may remove or edit it.
19180 #
19181 # config.status only pays attention to the cache file if you give it
19182 # the --recheck option to rerun configure.
19183 #
19184 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19185 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19186 # following values.
19187
19188 _ACEOF
19189
19190 # The following way of writing the cache mishandles newlines in values,
19191 # but we know of no workaround that is simple, portable, and efficient.
19192 # So, don't put newlines in cache variables' values.
19193 # Ultrix sh set writes to stderr and can't be redirected directly,
19194 # and sets the high bit in the cache file unless we assign to the vars.
19195 {
19196   (set) 2>&1 |
19197     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19198     *ac_space=\ *)
19199       # `set' does not quote correctly, so add quotes (double-quote
19200       # substitution turns \\\\ into \\, and sed turns \\ into \).
19201       sed -n \
19202         "s/'/'\\\\''/g;
19203           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19204       ;;
19205     *)
19206       # `set' quotes correctly as required by POSIX, so do not add quotes.
19207       sed -n \
19208         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19209       ;;
19210     esac;
19211 } |
19212   sed '
19213      t clear
19214      : clear
19215      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19216      t end
19217      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19218      : end' >>confcache
19219 if diff $cache_file confcache >/dev/null 2>&1; then :; else
19220   if test -w $cache_file; then
19221     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19222     cat confcache >$cache_file
19223   else
19224     echo "not updating unwritable cache $cache_file"
19225   fi
19226 fi
19227 rm -f confcache
19228
19229 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19230 # Let make expand exec_prefix.
19231 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19232
19233 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19234 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19235 # trailing colons and then remove the whole line if VPATH becomes empty
19236 # (actually we leave an empty line to preserve line numbers).
19237 if test "x$srcdir" = x.; then
19238   ac_vpsub='/^[         ]*VPATH[        ]*=/{
19239 s/:*\$(srcdir):*/:/;
19240 s/:*\${srcdir}:*/:/;
19241 s/:*@srcdir@:*/:/;
19242 s/^\([^=]*=[    ]*\):*/\1/;
19243 s/:*$//;
19244 s/^[^=]*=[      ]*$//;
19245 }'
19246 fi
19247
19248 DEFS=-DHAVE_CONFIG_H
19249
19250 ac_libobjs=
19251 ac_ltlibobjs=
19252 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19253   # 1. Remove the extension, and $U if already installed.
19254   ac_i=`echo "$ac_i" |
19255          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
19256   # 2. Add them.
19257   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
19258   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
19259 done
19260 LIBOBJS=$ac_libobjs
19261
19262 LTLIBOBJS=$ac_ltlibobjs
19263
19264
19265
19266
19267         mv -f po/POTFILES po/POTFILES.tmp
19268         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
19269         rm -f po/POTFILES.tmp
19270
19271
19272
19273 : ${CONFIG_STATUS=./config.status}
19274 ac_clean_files_save=$ac_clean_files
19275 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19276 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
19277 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19278 cat >$CONFIG_STATUS <<_ACEOF
19279 #! $SHELL
19280 # Generated by $as_me.
19281 # Run this file to recreate the current configuration.
19282 # Compiler output produced by configure, useful for debugging
19283 # configure, is in config.log if it exists.
19284
19285 debug=false
19286 ac_cs_recheck=false
19287 ac_cs_silent=false
19288 SHELL=\${CONFIG_SHELL-$SHELL}
19289 _ACEOF
19290
19291 cat >>$CONFIG_STATUS <<\_ACEOF
19292 ## --------------------- ##
19293 ## M4sh Initialization.  ##
19294 ## --------------------- ##
19295
19296 # Be Bourne compatible
19297 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19298   emulate sh
19299   NULLCMD=:
19300   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19301   # is contrary to our usage.  Disable this feature.
19302   alias -g '${1+"$@"}'='"$@"'
19303 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19304   set -o posix
19305 fi
19306
19307 # Support unset when possible.
19308 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19309   as_unset=unset
19310 else
19311   as_unset=false
19312 fi
19313
19314
19315 # Work around bugs in pre-3.0 UWIN ksh.
19316 $as_unset ENV MAIL MAILPATH
19317 PS1='$ '
19318 PS2='> '
19319 PS4='+ '
19320
19321 # NLS nuisances.
19322 for as_var in \
19323   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
19324   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
19325   LC_TELEPHONE LC_TIME
19326 do
19327   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
19328     eval $as_var=C; export $as_var
19329   else
19330     $as_unset $as_var
19331   fi
19332 done
19333
19334 # Required to use basename.
19335 if expr a : '\(a\)' >/dev/null 2>&1; then
19336   as_expr=expr
19337 else
19338   as_expr=false
19339 fi
19340
19341 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
19342   as_basename=basename
19343 else
19344   as_basename=false
19345 fi
19346
19347
19348 # Name of the executable.
19349 as_me=`$as_basename "$0" ||
19350 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19351          X"$0" : 'X\(//\)$' \| \
19352          X"$0" : 'X\(/\)$' \| \
19353          .     : '\(.\)' 2>/dev/null ||
19354 echo X/"$0" |
19355     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
19356           /^X\/\(\/\/\)$/{ s//\1/; q; }
19357           /^X\/\(\/\).*/{ s//\1/; q; }
19358           s/.*/./; q'`
19359
19360
19361 # PATH needs CR, and LINENO needs CR and PATH.
19362 # Avoid depending upon Character Ranges.
19363 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19364 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19365 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19366 as_cr_digits='0123456789'
19367 as_cr_alnum=$as_cr_Letters$as_cr_digits
19368
19369 # The user is always right.
19370 if test "${PATH_SEPARATOR+set}" != set; then
19371   echo "#! /bin/sh" >conf$$.sh
19372   echo  "exit 0"   >>conf$$.sh
19373   chmod +x conf$$.sh
19374   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
19375     PATH_SEPARATOR=';'
19376   else
19377     PATH_SEPARATOR=:
19378   fi
19379   rm -f conf$$.sh
19380 fi
19381
19382
19383   as_lineno_1=$LINENO
19384   as_lineno_2=$LINENO
19385   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19386   test "x$as_lineno_1" != "x$as_lineno_2" &&
19387   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
19388   # Find who we are.  Look in the path if we contain no path at all
19389   # relative or not.
19390   case $0 in
19391     *[\\/]* ) as_myself=$0 ;;
19392     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19393 for as_dir in $PATH
19394 do
19395   IFS=$as_save_IFS
19396   test -z "$as_dir" && as_dir=.
19397   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19398 done
19399
19400        ;;
19401   esac
19402   # We did not find ourselves, most probably we were run as `sh COMMAND'
19403   # in which case we are not to be found in the path.
19404   if test "x$as_myself" = x; then
19405     as_myself=$0
19406   fi
19407   if test ! -f "$as_myself"; then
19408     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
19409 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
19410    { (exit 1); exit 1; }; }
19411   fi
19412   case $CONFIG_SHELL in
19413   '')
19414     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19415 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
19416 do
19417   IFS=$as_save_IFS
19418   test -z "$as_dir" && as_dir=.
19419   for as_base in sh bash ksh sh5; do
19420          case $as_dir in
19421          /*)
19422            if ("$as_dir/$as_base" -c '
19423   as_lineno_1=$LINENO
19424   as_lineno_2=$LINENO
19425   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19426   test "x$as_lineno_1" != "x$as_lineno_2" &&
19427   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
19428              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
19429              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
19430              CONFIG_SHELL=$as_dir/$as_base
19431              export CONFIG_SHELL
19432              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
19433            fi;;
19434          esac
19435        done
19436 done
19437 ;;
19438   esac
19439
19440   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
19441   # uniformly replaced by the line number.  The first 'sed' inserts a
19442   # line-number line before each line; the second 'sed' does the real
19443   # work.  The second script uses 'N' to pair each line-number line
19444   # with the numbered line, and appends trailing '-' during
19445   # substitution so that $LINENO is not a special case at line end.
19446   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
19447   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
19448   sed '=' <$as_myself |
19449     sed '
19450       N
19451       s,$,-,
19452       : loop
19453       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
19454       t loop
19455       s,-$,,
19456       s,^['$as_cr_digits']*\n,,
19457     ' >$as_me.lineno &&
19458   chmod +x $as_me.lineno ||
19459     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
19460 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
19461    { (exit 1); exit 1; }; }
19462
19463   # Don't try to exec as it changes $[0], causing all sort of problems
19464   # (the dirname of $[0] is not the place where we might find the
19465   # original and so on.  Autoconf is especially sensible to this).
19466   . ./$as_me.lineno
19467   # Exit status is that of the last command.
19468   exit
19469 }
19470
19471
19472 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
19473   *c*,-n*) ECHO_N= ECHO_C='
19474 ' ECHO_T='      ' ;;
19475   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
19476   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
19477 esac
19478
19479 if expr a : '\(a\)' >/dev/null 2>&1; then
19480   as_expr=expr
19481 else
19482   as_expr=false
19483 fi
19484
19485 rm -f conf$$ conf$$.exe conf$$.file
19486 echo >conf$$.file
19487 if ln -s conf$$.file conf$$ 2>/dev/null; then
19488   # We could just check for DJGPP; but this test a) works b) is more generic
19489   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19490   if test -f conf$$.exe; then
19491     # Don't use ln at all; we don't have any links
19492     as_ln_s='cp -p'
19493   else
19494     as_ln_s='ln -s'
19495   fi
19496 elif ln conf$$.file conf$$ 2>/dev/null; then
19497   as_ln_s=ln
19498 else
19499   as_ln_s='cp -p'
19500 fi
19501 rm -f conf$$ conf$$.exe conf$$.file
19502
19503 if mkdir -p . 2>/dev/null; then
19504   as_mkdir_p=:
19505 else
19506   as_mkdir_p=false
19507 fi
19508
19509 as_executable_p="test -f"
19510
19511 # Sed expression to map a string onto a valid CPP name.
19512 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
19513
19514 # Sed expression to map a string onto a valid variable name.
19515 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19516
19517
19518 # IFS
19519 # We need space, tab and new line, in precisely that order.
19520 as_nl='
19521 '
19522 IFS="   $as_nl"
19523
19524 # CDPATH.
19525 $as_unset CDPATH
19526
19527 exec 6>&1
19528
19529 # Open the log real soon, to keep \$[0] and so on meaningful, and to
19530 # report actual input values of CONFIG_FILES etc. instead of their
19531 # values after options handling.  Logging --version etc. is OK.
19532 exec 5>>config.log
19533 {
19534   echo
19535   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19536 ## Running $as_me. ##
19537 _ASBOX
19538 } >&5
19539 cat >&5 <<_CSEOF
19540
19541 This file was extended by $as_me, which was
19542 generated by GNU Autoconf 2.57.  Invocation command line was
19543
19544   CONFIG_FILES    = $CONFIG_FILES
19545   CONFIG_HEADERS  = $CONFIG_HEADERS
19546   CONFIG_LINKS    = $CONFIG_LINKS
19547   CONFIG_COMMANDS = $CONFIG_COMMANDS
19548   $ $0 $@
19549
19550 _CSEOF
19551 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19552 echo >&5
19553 _ACEOF
19554
19555 # Files that config.status was made for.
19556 if test -n "$ac_config_files"; then
19557   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19558 fi
19559
19560 if test -n "$ac_config_headers"; then
19561   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19562 fi
19563
19564 if test -n "$ac_config_links"; then
19565   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19566 fi
19567
19568 if test -n "$ac_config_commands"; then
19569   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19570 fi
19571
19572 cat >>$CONFIG_STATUS <<\_ACEOF
19573
19574 ac_cs_usage="\
19575 \`$as_me' instantiates files from templates according to the
19576 current configuration.
19577
19578 Usage: $0 [OPTIONS] [FILE]...
19579
19580   -h, --help       print this help, then exit
19581   -V, --version    print version number, then exit
19582   -q, --quiet      do not print progress messages
19583   -d, --debug      don't remove temporary files
19584       --recheck    update $as_me by reconfiguring in the same conditions
19585   --file=FILE[:TEMPLATE]
19586                    instantiate the configuration file FILE
19587   --header=FILE[:TEMPLATE]
19588                    instantiate the configuration header FILE
19589
19590 Configuration files:
19591 $config_files
19592
19593 Configuration headers:
19594 $config_headers
19595
19596 Configuration commands:
19597 $config_commands
19598
19599 Report bugs to <bug-autoconf@gnu.org>."
19600 _ACEOF
19601
19602 cat >>$CONFIG_STATUS <<_ACEOF
19603 ac_cs_version="\\
19604 config.status
19605 configured by $0, generated by GNU Autoconf 2.57,
19606   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19607
19608 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19609 Free Software Foundation, Inc.
19610 This config.status script is free software; the Free Software Foundation
19611 gives unlimited permission to copy, distribute and modify it."
19612 srcdir=$srcdir
19613 INSTALL="$INSTALL"
19614 _ACEOF
19615
19616 cat >>$CONFIG_STATUS <<\_ACEOF
19617 # If no file are specified by the user, then we need to provide default
19618 # value.  By we need to know if files were specified by the user.
19619 ac_need_defaults=:
19620 while test $# != 0
19621 do
19622   case $1 in
19623   --*=*)
19624     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19625     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19626     ac_shift=:
19627     ;;
19628   -*)
19629     ac_option=$1
19630     ac_optarg=$2
19631     ac_shift=shift
19632     ;;
19633   *) # This is not an option, so the user has probably given explicit
19634      # arguments.
19635      ac_option=$1
19636      ac_need_defaults=false;;
19637   esac
19638
19639   case $ac_option in
19640   # Handling of the options.
19641 _ACEOF
19642 cat >>$CONFIG_STATUS <<\_ACEOF
19643   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19644     ac_cs_recheck=: ;;
19645   --version | --vers* | -V )
19646     echo "$ac_cs_version"; exit 0 ;;
19647   --he | --h)
19648     # Conflict between --help and --header
19649     { { echo "$as_me:$LINENO: error: ambiguous option: $1
19650 Try \`$0 --help' for more information." >&5
19651 echo "$as_me: error: ambiguous option: $1
19652 Try \`$0 --help' for more information." >&2;}
19653    { (exit 1); exit 1; }; };;
19654   --help | --hel | -h )
19655     echo "$ac_cs_usage"; exit 0 ;;
19656   --debug | --d* | -d )
19657     debug=: ;;
19658   --file | --fil | --fi | --f )
19659     $ac_shift
19660     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
19661     ac_need_defaults=false;;
19662   --header | --heade | --head | --hea )
19663     $ac_shift
19664     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
19665     ac_need_defaults=false;;
19666   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19667   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19668     ac_cs_silent=: ;;
19669
19670   # This is an error.
19671   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
19672 Try \`$0 --help' for more information." >&5
19673 echo "$as_me: error: unrecognized option: $1
19674 Try \`$0 --help' for more information." >&2;}
19675    { (exit 1); exit 1; }; } ;;
19676
19677   *) ac_config_targets="$ac_config_targets $1" ;;
19678
19679   esac
19680   shift
19681 done
19682
19683 ac_configure_extra_args=
19684
19685 if $ac_cs_silent; then
19686   exec 6>/dev/null
19687   ac_configure_extra_args="$ac_configure_extra_args --silent"
19688 fi
19689
19690 _ACEOF
19691 cat >>$CONFIG_STATUS <<_ACEOF
19692 if \$ac_cs_recheck; then
19693   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19694   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19695 fi
19696
19697 _ACEOF
19698
19699 cat >>$CONFIG_STATUS <<_ACEOF
19700 #
19701 # INIT-COMMANDS section.
19702 #
19703
19704 INTLTOOL_PERL=${INTLTOOL_PERL}
19705
19706
19707 _ACEOF
19708
19709
19710
19711 cat >>$CONFIG_STATUS <<\_ACEOF
19712 for ac_config_target in $ac_config_targets
19713 do
19714   case "$ac_config_target" in
19715   # Handling of arguments.
19716   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19717   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
19718   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
19719   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
19720   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
19721   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
19722   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
19723   "driver/xscreensaver.kss" ) CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.kss" ;;
19724   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
19725   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
19726   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
19727   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19728 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19729    { (exit 1); exit 1; }; };;
19730   esac
19731 done
19732
19733 # If the user did not use the arguments to specify the items to instantiate,
19734 # then the envvar interface is used.  Set only those that are not.
19735 # We use the long form for the default assignment because of an extremely
19736 # bizarre bug on SunOS 4.1.3.
19737 if $ac_need_defaults; then
19738   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19739   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19740   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19741 fi
19742
19743 # Have a temporary directory for convenience.  Make it in the build tree
19744 # simply because there is no reason to put it here, and in addition,
19745 # creating and moving files from /tmp can sometimes cause problems.
19746 # Create a temporary directory, and hook for its removal unless debugging.
19747 $debug ||
19748 {
19749   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19750   trap '{ (exit 1); exit 1; }' 1 2 13 15
19751 }
19752
19753 # Create a (secure) tmp directory for tmp files.
19754
19755 {
19756   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
19757   test -n "$tmp" && test -d "$tmp"
19758 }  ||
19759 {
19760   tmp=./confstat$$-$RANDOM
19761   (umask 077 && mkdir $tmp)
19762 } ||
19763 {
19764    echo "$me: cannot create a temporary directory in ." >&2
19765    { (exit 1); exit 1; }
19766 }
19767
19768 _ACEOF
19769
19770 cat >>$CONFIG_STATUS <<_ACEOF
19771
19772 #
19773 # CONFIG_FILES section.
19774 #
19775
19776 # No need to generate the scripts if there are no CONFIG_FILES.
19777 # This happens for instance when ./config.status config.h
19778 if test -n "\$CONFIG_FILES"; then
19779   # Protect against being on the right side of a sed subst in config.status.
19780   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19781    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19782 s,@SHELL@,$SHELL,;t t
19783 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19784 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19785 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19786 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19787 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19788 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19789 s,@exec_prefix@,$exec_prefix,;t t
19790 s,@prefix@,$prefix,;t t
19791 s,@program_transform_name@,$program_transform_name,;t t
19792 s,@bindir@,$bindir,;t t
19793 s,@sbindir@,$sbindir,;t t
19794 s,@libexecdir@,$libexecdir,;t t
19795 s,@datadir@,$datadir,;t t
19796 s,@sysconfdir@,$sysconfdir,;t t
19797 s,@sharedstatedir@,$sharedstatedir,;t t
19798 s,@localstatedir@,$localstatedir,;t t
19799 s,@libdir@,$libdir,;t t
19800 s,@includedir@,$includedir,;t t
19801 s,@oldincludedir@,$oldincludedir,;t t
19802 s,@infodir@,$infodir,;t t
19803 s,@mandir@,$mandir,;t t
19804 s,@build_alias@,$build_alias,;t t
19805 s,@host_alias@,$host_alias,;t t
19806 s,@target_alias@,$target_alias,;t t
19807 s,@DEFS@,$DEFS,;t t
19808 s,@ECHO_C@,$ECHO_C,;t t
19809 s,@ECHO_N@,$ECHO_N,;t t
19810 s,@ECHO_T@,$ECHO_T,;t t
19811 s,@LIBS@,$LIBS,;t t
19812 s,@build@,$build,;t t
19813 s,@build_cpu@,$build_cpu,;t t
19814 s,@build_vendor@,$build_vendor,;t t
19815 s,@build_os@,$build_os,;t t
19816 s,@host@,$host,;t t
19817 s,@host_cpu@,$host_cpu,;t t
19818 s,@host_vendor@,$host_vendor,;t t
19819 s,@host_os@,$host_os,;t t
19820 s,@CC@,$CC,;t t
19821 s,@CFLAGS@,$CFLAGS,;t t
19822 s,@LDFLAGS@,$LDFLAGS,;t t
19823 s,@CPPFLAGS@,$CPPFLAGS,;t t
19824 s,@ac_ct_CC@,$ac_ct_CC,;t t
19825 s,@EXEEXT@,$EXEEXT,;t t
19826 s,@OBJEXT@,$OBJEXT,;t t
19827 s,@CPP@,$CPP,;t t
19828 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19829 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19830 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19831 s,@SET_MAKE@,$SET_MAKE,;t t
19832 s,@EGREP@,$EGREP,;t t
19833 s,@PERL@,$PERL,;t t
19834 s,@X_CFLAGS@,$X_CFLAGS,;t t
19835 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
19836 s,@X_LIBS@,$X_LIBS,;t t
19837 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
19838 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
19839 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
19840 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
19841 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
19842 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
19843 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
19844 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
19845 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
19846 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
19847 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
19848 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
19849 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
19850 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
19851 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
19852 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
19853 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
19854 s,@RANLIB@,$RANLIB,;t t
19855 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19856 s,@ALLOCA@,$ALLOCA,;t t
19857 s,@USE_NLS@,$USE_NLS,;t t
19858 s,@MSGFMT@,$MSGFMT,;t t
19859 s,@GMSGFMT@,$GMSGFMT,;t t
19860 s,@XGETTEXT@,$XGETTEXT,;t t
19861 s,@CATALOGS@,$CATALOGS,;t t
19862 s,@CATOBJEXT@,$CATOBJEXT,;t t
19863 s,@DATADIRNAME@,$DATADIRNAME,;t t
19864 s,@GMOFILES@,$GMOFILES,;t t
19865 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
19866 s,@INTLDEPS@,$INTLDEPS,;t t
19867 s,@INTLLIBS@,$INTLLIBS,;t t
19868 s,@INTLOBJS@,$INTLOBJS,;t t
19869 s,@POFILES@,$POFILES,;t t
19870 s,@POSUB@,$POSUB,;t t
19871 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
19872 s,@pkg_config@,$pkg_config,;t t
19873 s,@glib_config@,$glib_config,;t t
19874 s,@gtk_config@,$gtk_config,;t t
19875 s,@gnome_config@,$gnome_config,;t t
19876 s,@have_gnome_help@,$have_gnome_help,;t t
19877 s,@xml_config@,$xml_config,;t t
19878 s,@gdk_pixbuf_config@,$gdk_pixbuf_config,;t t
19879 s,@fortune_tmp@,$fortune_tmp,;t t
19880 s,@INCLUDES@,$INCLUDES,;t t
19881 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
19882 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
19883 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
19884 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
19885 s,@GTK_LIBS@,$GTK_LIBS,;t t
19886 s,@XML_LIBS@,$XML_LIBS,;t t
19887 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
19888 s,@HACK_LIBS@,$HACK_LIBS,;t t
19889 s,@XPM_LIBS@,$XPM_LIBS,;t t
19890 s,@PTY_LIBS@,$PTY_LIBS,;t t
19891 s,@GL_LIBS@,$GL_LIBS,;t t
19892 s,@GLE_LIBS@,$GLE_LIBS,;t t
19893 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
19894 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
19895 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
19896 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
19897 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
19898 s,@NEED_SETUID@,$NEED_SETUID,;t t
19899 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
19900 s,@OBJCC@,$OBJCC,;t t
19901 s,@EXES_OSX@,$EXES_OSX,;t t
19902 s,@SCRIPTS_OSX@,$SCRIPTS_OSX,;t t
19903 s,@MEN_OSX@,$MEN_OSX,;t t
19904 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
19905 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
19906 s,@XMU_SRCS@,$XMU_SRCS,;t t
19907 s,@XMU_OBJS@,$XMU_OBJS,;t t
19908 s,@XMU_LIBS@,$XMU_LIBS,;t t
19909 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
19910 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
19911 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
19912 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
19913 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
19914 s,@JPEG_EXES@,$JPEG_EXES,;t t
19915 s,@GL_EXES@,$GL_EXES,;t t
19916 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
19917 s,@GL_MEN@,$GL_MEN,;t t
19918 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
19919 s,@GLE_EXES@,$GLE_EXES,;t t
19920 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
19921 s,@GNOMEHELP_Y@,$GNOMEHELP_Y,;t t
19922 s,@GNOMEHELP_N@,$GNOMEHELP_N,;t t
19923 s,@HACKDIR@,$HACKDIR,;t t
19924 s,@GNOME_DATADIR@,$GNOME_DATADIR,;t t
19925 s,@GLADE_DATADIR@,$GLADE_DATADIR,;t t
19926 s,@PO_DATADIR@,$PO_DATADIR,;t t
19927 s,@GNOME_PANELDIR@,$GNOME_PANELDIR,;t t
19928 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
19929 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
19930 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
19931 s,@DEPEND@,$DEPEND,;t t
19932 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
19933 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
19934 s,@LIBOBJS@,$LIBOBJS,;t t
19935 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
19936 CEOF
19937
19938 _ACEOF
19939
19940   cat >>$CONFIG_STATUS <<\_ACEOF
19941   # Split the substitutions into bite-sized pieces for seds with
19942   # small command number limits, like on Digital OSF/1 and HP-UX.
19943   ac_max_sed_lines=48
19944   ac_sed_frag=1 # Number of current file.
19945   ac_beg=1 # First line for current file.
19946   ac_end=$ac_max_sed_lines # Line after last line for current file.
19947   ac_more_lines=:
19948   ac_sed_cmds=
19949   while $ac_more_lines; do
19950     if test $ac_beg -gt 1; then
19951       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19952     else
19953       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19954     fi
19955     if test ! -s $tmp/subs.frag; then
19956       ac_more_lines=false
19957     else
19958       # The purpose of the label and of the branching condition is to
19959       # speed up the sed processing (if there are no `@' at all, there
19960       # is no need to browse any of the substitutions).
19961       # These are the two extra sed commands mentioned above.
19962       (echo ':t
19963   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19964       if test -z "$ac_sed_cmds"; then
19965         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19966       else
19967         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19968       fi
19969       ac_sed_frag=`expr $ac_sed_frag + 1`
19970       ac_beg=$ac_end
19971       ac_end=`expr $ac_end + $ac_max_sed_lines`
19972     fi
19973   done
19974   if test -z "$ac_sed_cmds"; then
19975     ac_sed_cmds=cat
19976   fi
19977 fi # test -n "$CONFIG_FILES"
19978
19979 _ACEOF
19980 cat >>$CONFIG_STATUS <<\_ACEOF
19981 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19982   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19983   case $ac_file in
19984   - | *:- | *:-:* ) # input from stdin
19985         cat >$tmp/stdin
19986         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19987         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19988   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19989         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19990   * )   ac_file_in=$ac_file.in ;;
19991   esac
19992
19993   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19994   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19995 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19996          X"$ac_file" : 'X\(//\)[^/]' \| \
19997          X"$ac_file" : 'X\(//\)$' \| \
19998          X"$ac_file" : 'X\(/\)' \| \
19999          .     : '\(.\)' 2>/dev/null ||
20000 echo X"$ac_file" |
20001     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20002           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20003           /^X\(\/\/\)$/{ s//\1/; q; }
20004           /^X\(\/\).*/{ s//\1/; q; }
20005           s/.*/./; q'`
20006   { if $as_mkdir_p; then
20007     mkdir -p "$ac_dir"
20008   else
20009     as_dir="$ac_dir"
20010     as_dirs=
20011     while test ! -d "$as_dir"; do
20012       as_dirs="$as_dir $as_dirs"
20013       as_dir=`(dirname "$as_dir") 2>/dev/null ||
20014 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20015          X"$as_dir" : 'X\(//\)[^/]' \| \
20016          X"$as_dir" : 'X\(//\)$' \| \
20017          X"$as_dir" : 'X\(/\)' \| \
20018          .     : '\(.\)' 2>/dev/null ||
20019 echo X"$as_dir" |
20020     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20021           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20022           /^X\(\/\/\)$/{ s//\1/; q; }
20023           /^X\(\/\).*/{ s//\1/; q; }
20024           s/.*/./; q'`
20025     done
20026     test ! -n "$as_dirs" || mkdir $as_dirs
20027   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20028 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20029    { (exit 1); exit 1; }; }; }
20030
20031   ac_builddir=.
20032
20033 if test "$ac_dir" != .; then
20034   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
20035   # A "../" for each directory in $ac_dir_suffix.
20036   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
20037 else
20038   ac_dir_suffix= ac_top_builddir=
20039 fi
20040
20041 case $srcdir in
20042   .)  # No --srcdir option.  We are building in place.
20043     ac_srcdir=.
20044     if test -z "$ac_top_builddir"; then
20045        ac_top_srcdir=.
20046     else
20047        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
20048     fi ;;
20049   [\\/]* | ?:[\\/]* )  # Absolute path.
20050     ac_srcdir=$srcdir$ac_dir_suffix;
20051     ac_top_srcdir=$srcdir ;;
20052   *) # Relative path.
20053     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
20054     ac_top_srcdir=$ac_top_builddir$srcdir ;;
20055 esac
20056 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
20057 # absolute.
20058 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
20059 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
20060 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
20061 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
20062
20063
20064   case $INSTALL in
20065   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20066   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
20067   esac
20068
20069   if test x"$ac_file" != x-; then
20070     { echo "$as_me:$LINENO: creating $ac_file" >&5
20071 echo "$as_me: creating $ac_file" >&6;}
20072     rm -f "$ac_file"
20073   fi
20074   # Let's still pretend it is `configure' which instantiates (i.e., don't
20075   # use $as_me), people would be surprised to read:
20076   #    /* config.h.  Generated by config.status.  */
20077   if test x"$ac_file" = x-; then
20078     configure_input=
20079   else
20080     configure_input="$ac_file.  "
20081   fi
20082   configure_input=$configure_input"Generated from `echo $ac_file_in |
20083                                      sed 's,.*/,,'` by configure."
20084
20085   # First look for the input files in the build tree, otherwise in the
20086   # src tree.
20087   ac_file_inputs=`IFS=:
20088     for f in $ac_file_in; do
20089       case $f in
20090       -) echo $tmp/stdin ;;
20091       [\\/$]*)
20092          # Absolute (can't be DOS-style, as IFS=:)
20093          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20094 echo "$as_me: error: cannot find input file: $f" >&2;}
20095    { (exit 1); exit 1; }; }
20096          echo $f;;
20097       *) # Relative
20098          if test -f "$f"; then
20099            # Build tree
20100            echo $f
20101          elif test -f "$srcdir/$f"; then
20102            # Source tree
20103            echo $srcdir/$f
20104          else
20105            # /dev/null tree
20106            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20107 echo "$as_me: error: cannot find input file: $f" >&2;}
20108    { (exit 1); exit 1; }; }
20109          fi;;
20110       esac
20111     done` || { (exit 1); exit 1; }
20112 _ACEOF
20113 cat >>$CONFIG_STATUS <<_ACEOF
20114   sed "$ac_vpsub
20115 $extrasub
20116 _ACEOF
20117 cat >>$CONFIG_STATUS <<\_ACEOF
20118 :t
20119 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20120 s,@configure_input@,$configure_input,;t t
20121 s,@srcdir@,$ac_srcdir,;t t
20122 s,@abs_srcdir@,$ac_abs_srcdir,;t t
20123 s,@top_srcdir@,$ac_top_srcdir,;t t
20124 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
20125 s,@builddir@,$ac_builddir,;t t
20126 s,@abs_builddir@,$ac_abs_builddir,;t t
20127 s,@top_builddir@,$ac_top_builddir,;t t
20128 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
20129 s,@INSTALL@,$ac_INSTALL,;t t
20130 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20131   rm -f $tmp/stdin
20132   if test x"$ac_file" != x-; then
20133     mv $tmp/out $ac_file
20134   else
20135     cat $tmp/out
20136     rm -f $tmp/out
20137   fi
20138
20139 done
20140 _ACEOF
20141 cat >>$CONFIG_STATUS <<\_ACEOF
20142
20143 #
20144 # CONFIG_HEADER section.
20145 #
20146
20147 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20148 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20149 #
20150 # ac_d sets the value in "#define NAME VALUE" lines.
20151 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
20152 ac_dB='[        ].*$,\1#\2'
20153 ac_dC=' '
20154 ac_dD=',;t'
20155 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20156 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20157 ac_uB='$,\1#\2define\3'
20158 ac_uC=' '
20159 ac_uD=',;t'
20160
20161 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20162   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20163   case $ac_file in
20164   - | *:- | *:-:* ) # input from stdin
20165         cat >$tmp/stdin
20166         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20167         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20168   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20169         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20170   * )   ac_file_in=$ac_file.in ;;
20171   esac
20172
20173   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
20174 echo "$as_me: creating $ac_file" >&6;}
20175
20176   # First look for the input files in the build tree, otherwise in the
20177   # src tree.
20178   ac_file_inputs=`IFS=:
20179     for f in $ac_file_in; do
20180       case $f in
20181       -) echo $tmp/stdin ;;
20182       [\\/$]*)
20183          # Absolute (can't be DOS-style, as IFS=:)
20184          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20185 echo "$as_me: error: cannot find input file: $f" >&2;}
20186    { (exit 1); exit 1; }; }
20187          echo $f;;
20188       *) # Relative
20189          if test -f "$f"; then
20190            # Build tree
20191            echo $f
20192          elif test -f "$srcdir/$f"; then
20193            # Source tree
20194            echo $srcdir/$f
20195          else
20196            # /dev/null tree
20197            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20198 echo "$as_me: error: cannot find input file: $f" >&2;}
20199    { (exit 1); exit 1; }; }
20200          fi;;
20201       esac
20202     done` || { (exit 1); exit 1; }
20203   # Remove the trailing spaces.
20204   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
20205
20206 _ACEOF
20207
20208 # Transform confdefs.h into two sed scripts, `conftest.defines' and
20209 # `conftest.undefs', that substitutes the proper values into
20210 # config.h.in to produce config.h.  The first handles `#define'
20211 # templates, and the second `#undef' templates.
20212 # And first: Protect against being on the right side of a sed subst in
20213 # config.status.  Protect against being in an unquoted here document
20214 # in config.status.
20215 rm -f conftest.defines conftest.undefs
20216 # Using a here document instead of a string reduces the quoting nightmare.
20217 # Putting comments in sed scripts is not portable.
20218 #
20219 # `end' is used to avoid that the second main sed command (meant for
20220 # 0-ary CPP macros) applies to n-ary macro definitions.
20221 # See the Autoconf documentation for `clear'.
20222 cat >confdef2sed.sed <<\_ACEOF
20223 s/[\\&,]/\\&/g
20224 s,[\\$`],\\&,g
20225 t clear
20226 : clear
20227 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
20228 t end
20229 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
20230 : end
20231 _ACEOF
20232 # If some macros were called several times there might be several times
20233 # the same #defines, which is useless.  Nevertheless, we may not want to
20234 # sort them, since we want the *last* AC-DEFINE to be honored.
20235 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
20236 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
20237 rm -f confdef2sed.sed
20238
20239 # This sed command replaces #undef with comments.  This is necessary, for
20240 # example, in the case of _POSIX_SOURCE, which is predefined and required
20241 # on some systems where configure will not decide to define it.
20242 cat >>conftest.undefs <<\_ACEOF
20243 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
20244 _ACEOF
20245
20246 # Break up conftest.defines because some shells have a limit on the size
20247 # of here documents, and old seds have small limits too (100 cmds).
20248 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
20249 echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
20250 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
20251 echo '  :' >>$CONFIG_STATUS
20252 rm -f conftest.tail
20253 while grep . conftest.defines >/dev/null
20254 do
20255   # Write a limited-size here document to $tmp/defines.sed.
20256   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
20257   # Speed up: don't consider the non `#define' lines.
20258   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
20259   # Work around the forget-to-reset-the-flag bug.
20260   echo 't clr' >>$CONFIG_STATUS
20261   echo ': clr' >>$CONFIG_STATUS
20262   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
20263   echo 'CEOF
20264   sed -f $tmp/defines.sed $tmp/in >$tmp/out
20265   rm -f $tmp/in
20266   mv $tmp/out $tmp/in
20267 ' >>$CONFIG_STATUS
20268   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
20269   rm -f conftest.defines
20270   mv conftest.tail conftest.defines
20271 done
20272 rm -f conftest.defines
20273 echo '  fi # grep' >>$CONFIG_STATUS
20274 echo >>$CONFIG_STATUS
20275
20276 # Break up conftest.undefs because some shells have a limit on the size
20277 # of here documents, and old seds have small limits too (100 cmds).
20278 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
20279 rm -f conftest.tail
20280 while grep . conftest.undefs >/dev/null
20281 do
20282   # Write a limited-size here document to $tmp/undefs.sed.
20283   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
20284   # Speed up: don't consider the non `#undef'
20285   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
20286   # Work around the forget-to-reset-the-flag bug.
20287   echo 't clr' >>$CONFIG_STATUS
20288   echo ': clr' >>$CONFIG_STATUS
20289   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
20290   echo 'CEOF
20291   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
20292   rm -f $tmp/in
20293   mv $tmp/out $tmp/in
20294 ' >>$CONFIG_STATUS
20295   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
20296   rm -f conftest.undefs
20297   mv conftest.tail conftest.undefs
20298 done
20299 rm -f conftest.undefs
20300
20301 cat >>$CONFIG_STATUS <<\_ACEOF
20302   # Let's still pretend it is `configure' which instantiates (i.e., don't
20303   # use $as_me), people would be surprised to read:
20304   #    /* config.h.  Generated by config.status.  */
20305   if test x"$ac_file" = x-; then
20306     echo "/* Generated by configure.  */" >$tmp/config.h
20307   else
20308     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
20309   fi
20310   cat $tmp/in >>$tmp/config.h
20311   rm -f $tmp/in
20312   if test x"$ac_file" != x-; then
20313     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
20314       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
20315 echo "$as_me: $ac_file is unchanged" >&6;}
20316     else
20317       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
20318 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20319          X"$ac_file" : 'X\(//\)[^/]' \| \
20320          X"$ac_file" : 'X\(//\)$' \| \
20321          X"$ac_file" : 'X\(/\)' \| \
20322          .     : '\(.\)' 2>/dev/null ||
20323 echo X"$ac_file" |
20324     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20325           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20326           /^X\(\/\/\)$/{ s//\1/; q; }
20327           /^X\(\/\).*/{ s//\1/; q; }
20328           s/.*/./; q'`
20329       { if $as_mkdir_p; then
20330     mkdir -p "$ac_dir"
20331   else
20332     as_dir="$ac_dir"
20333     as_dirs=
20334     while test ! -d "$as_dir"; do
20335       as_dirs="$as_dir $as_dirs"
20336       as_dir=`(dirname "$as_dir") 2>/dev/null ||
20337 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20338          X"$as_dir" : 'X\(//\)[^/]' \| \
20339          X"$as_dir" : 'X\(//\)$' \| \
20340          X"$as_dir" : 'X\(/\)' \| \
20341          .     : '\(.\)' 2>/dev/null ||
20342 echo X"$as_dir" |
20343     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20344           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20345           /^X\(\/\/\)$/{ s//\1/; q; }
20346           /^X\(\/\).*/{ s//\1/; q; }
20347           s/.*/./; q'`
20348     done
20349     test ! -n "$as_dirs" || mkdir $as_dirs
20350   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20351 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20352    { (exit 1); exit 1; }; }; }
20353
20354       rm -f $ac_file
20355       mv $tmp/config.h $ac_file
20356     fi
20357   else
20358     cat $tmp/config.h
20359     rm -f $tmp/config.h
20360   fi
20361 done
20362 _ACEOF
20363 cat >>$CONFIG_STATUS <<\_ACEOF
20364
20365 #
20366 # CONFIG_COMMANDS section.
20367 #
20368 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20369   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20370   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20371   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
20372 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20373          X"$ac_dest" : 'X\(//\)[^/]' \| \
20374          X"$ac_dest" : 'X\(//\)$' \| \
20375          X"$ac_dest" : 'X\(/\)' \| \
20376          .     : '\(.\)' 2>/dev/null ||
20377 echo X"$ac_dest" |
20378     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20379           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20380           /^X\(\/\/\)$/{ s//\1/; q; }
20381           /^X\(\/\).*/{ s//\1/; q; }
20382           s/.*/./; q'`
20383   ac_builddir=.
20384
20385 if test "$ac_dir" != .; then
20386   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
20387   # A "../" for each directory in $ac_dir_suffix.
20388   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
20389 else
20390   ac_dir_suffix= ac_top_builddir=
20391 fi
20392
20393 case $srcdir in
20394   .)  # No --srcdir option.  We are building in place.
20395     ac_srcdir=.
20396     if test -z "$ac_top_builddir"; then
20397        ac_top_srcdir=.
20398     else
20399        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
20400     fi ;;
20401   [\\/]* | ?:[\\/]* )  # Absolute path.
20402     ac_srcdir=$srcdir$ac_dir_suffix;
20403     ac_top_srcdir=$srcdir ;;
20404   *) # Relative path.
20405     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
20406     ac_top_srcdir=$ac_top_builddir$srcdir ;;
20407 esac
20408 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
20409 # absolute.
20410 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
20411 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
20412 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
20413 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
20414
20415
20416   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
20417 echo "$as_me: executing $ac_dest commands" >&6;}
20418   case $ac_dest in
20419     default-1 )
20420
20421 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
20422 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
20423   rm -f intltool-extract.out
20424 else
20425   mv -f intltool-extract.out intltool-extract
20426 fi
20427 chmod ugo+x intltool-extract
20428 chmod u+w intltool-extract
20429
20430 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
20431 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
20432   rm -f intltool-merge.out
20433 else
20434   mv -f intltool-merge.out intltool-merge
20435 fi
20436 chmod ugo+x intltool-merge
20437 chmod u+w intltool-merge
20438
20439 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
20440 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
20441   rm -f intltool-update.out
20442 else
20443   mv -f intltool-update.out intltool-update
20444 fi
20445 chmod ugo+x intltool-update
20446 chmod u+w intltool-update
20447
20448  ;;
20449     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
20450         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
20451       esac ;;
20452   esac
20453 done
20454 _ACEOF
20455
20456 cat >>$CONFIG_STATUS <<\_ACEOF
20457
20458 { (exit 0); exit 0; }
20459 _ACEOF
20460 chmod +x $CONFIG_STATUS
20461 ac_clean_files=$ac_clean_files_save
20462
20463
20464 # configure is writing to config.log, and then calls config.status.
20465 # config.status does its own redirection, appending to config.log.
20466 # Unfortunately, on DOS this fails, as config.log is still kept open
20467 # by configure, so config.status won't be able to write to it; its
20468 # output is simply discarded.  So we exec the FD to /dev/null,
20469 # effectively closing config.log, so it can be properly (re)opened and
20470 # appended to by config.status.  When coming back to configure, we
20471 # need to make the FD available again.
20472 if test "$no_create" != yes; then
20473   ac_cs_success=:
20474   ac_config_status_args=
20475   test "$silent" = yes &&
20476     ac_config_status_args="$ac_config_status_args --quiet"
20477   exec 5>/dev/null
20478   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20479   exec 5>>config.log
20480   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20481   # would make configure fail if this is the last instruction.
20482   $ac_cs_success || { (exit 1); exit 1; }
20483 fi
20484
20485
20486 ###############################################################################
20487 #
20488 #       Print some warnings at the end.
20489 #
20490 ###############################################################################
20491
20492 warn_prefix_1="    Warning:"
20493 warn_prefix_2="       Note:"
20494 warn_prefix="$warn_prefix_1"
20495
20496 warning=no
20497 warnsep='    #################################################################'
20498
20499 warnpre() {
20500   if test "$warning" = no ; then
20501     echo '' ; echo "$warnsep" ; echo ''
20502     warning=yes
20503   fi
20504 }
20505
20506 warn() {
20507   warnpre
20508   if test "$warning" = long ; then echo '' ; fi
20509   warning=yes
20510   rest="$@"
20511   echo "$warn_prefix $rest"
20512 }
20513
20514 warnL() {
20515   was=$warning
20516   warnpre
20517   warning=yes
20518   if test "$was" != no ; then echo '' ; fi
20519   rest="$@"
20520   echo "$warn_prefix $rest"
20521 }
20522
20523 warn2() {
20524   rest="$@"
20525   echo "             $rest"
20526   warning=long
20527 }
20528
20529 note() {
20530   warn_prefix="$warn_prefix_2"
20531   warn $@
20532   warn_prefix="$warn_prefix_1"
20533 }
20534
20535 noteL() {
20536   warn_prefix="$warn_prefix_2"
20537   warnL $@
20538   warn_prefix="$warn_prefix_1"
20539 }
20540
20541
20542 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
20543   warn 'The SGI saver extension was requested, but was not found.'
20544 fi
20545
20546 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
20547   warn 'The MIT saver extension was requested, but was not found.'
20548 fi
20549
20550 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
20551   warn 'The XIdle extension was requested, but was not found.'
20552 fi
20553
20554 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
20555   warn 'The XSHM extension was requested, but was not found.'
20556 fi
20557
20558 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
20559   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
20560 fi
20561
20562 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
20563   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
20564 fi
20565
20566 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
20567   warn 'The DPMS extension was requested, but was not found.'
20568 fi
20569
20570 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
20571   warn 'The Xinerama extension was requested, but was not found.'
20572 fi
20573
20574 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
20575   warn 'The XF86VMODE extension was requested, but was not found.'
20576 fi
20577
20578 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
20579   warn "Checking of /proc/interrupts was requested, but it's bogus."
20580 fi
20581
20582 motif_warn2() {
20583   warn2 'Though the Motif front-end to xscreensaver is still'
20584   warn2 'maintained, it is no longer being updated with new'
20585   warn2 'features: all new development on the xscreensaver-demo'
20586   warn2 'program is happening in the GTK version, and not in the'
20587   warn2 'Motif version.  It is recommended that you build against'
20588   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
20589 }
20590
20591 if test "$have_motif" = no -a "$have_gtk" = no; then
20592
20593   if test "$with_motif" = yes; then
20594     warnL "Neither the GTK nor Motif libraries were found; the"
20595     warn2 "\`xscreensaver-demo' program requires one of these."
20596     echo ''
20597     motif_warn2
20598   else
20599     warnL "The GTK libraries do not seem to be available; the"
20600     warn2 "\`xscreensaver-demo' program requires them."
20601     echo ''
20602     warn2 'You can use Motif or Lesstif instead of GTK (use the'
20603     warn2 "\`--with-motif' option) but that is NOT recommended."
20604     motif_warn2
20605   fi
20606
20607 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
20608   warnL "Use of Motif was requested, but it wasn't found;"
20609   warn2 "Gtk will be used instead."
20610
20611 elif test "$jurassic_gtk" = yes ; then
20612
20613   pref_gtk=1.2
20614
20615   v="$ac_gtk_version_string"
20616   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
20617     warnL "Use of Gtk was requested, but its version number is unknown;"
20618   elif test "$with_gtk_req" = yes ; then
20619     warnL "Use of Gtk was requested, but it is version $v;"
20620   else
20621     warnL "Gtk was found on this system, but it is version $v;"
20622   fi
20623
20624   warn2 "Gtk $pref_gtk or newer is required."
20625
20626 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
20627   warnL "Use of Gtk was requested, but it wasn't found."
20628 fi
20629
20630 if test "$gtk2_halfassed" != no ; then
20631   warnL "GTK version $gtk2_halfassed was found, but at least one supporting"
20632   warn2 "library ($gtk2_halfassed_lib) was not, so GTK 2.x can't be used."
20633   if test "$have_gtk" = yes ; then
20634     v="$ac_gtk_version_string"
20635     warn2 "GTK $v is also installed, so it will be used instead."
20636     warn2 "Please read the above output and the \`config.log' file"
20637     warn2 "for more details."
20638   fi
20639 fi
20640
20641
20642 if test "$with_gnome_req" = yes -a "$have_gnome" = no \
20643         -a "$have_gtk2" = no; then
20644   # don't issue this warning if we have GTK2 -- in that case, the
20645   # Gnome-specific code isn't needed.
20646   warn  'Use of the Gnome Control Panel was requested, but the necessary'
20647   warn2 'headers and/or libraries were not found.'
20648 fi
20649
20650 if test "$have_gtk" = yes ; then
20651   if test "$have_xml" = no ; then
20652     if test "$with_xml_req" = yes ; then
20653       warn  'Use of the XML library was requested, but the necessary'
20654       warn2 'headers and/or libraries were not found.'
20655     else
20656       warn  'GTK is being used, but the XML library was not found.'
20657     fi
20658
20659     if test "$xml_halfassed" = yes ; then
20660
20661       if test "$have_zlib" = yes ; then
20662         which="XML libraries"
20663       else
20664         which="\`zlib' library"
20665       fi
20666
20667       echo ''
20668       warn2 'More specifically, we found the headers, but not the'
20669       warn2 "$which; so either XML is half-installed on this"
20670       warn2 "system, or something else went wrong.  The \`config.log'"
20671       warn2 'file might contain some clues.'
20672     fi
20673
20674     echo ''
20675     warn2 "Without XML, the per-display-mode \`Settings' dialogs"
20676     warn2 'will not be available.  Specify the location of the XML'
20677     warn2 'library through the --with-xml option to configure.'
20678   fi
20679 fi
20680
20681 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
20682   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
20683   warn2 "headers were not found.  That can't be good.  Please"
20684   warn2 "install the GDK-Pixbuf development kit and re-configure."
20685 fi
20686
20687 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
20688
20689   preferred_lesstif=0.92
20690
20691   if test "$lesstif_version" = unknown; then
20692     warnL "Unable to determine the LessTif version number!"
20693     warn2 "Make sure you are using version $preferred_lesstif or newer."
20694     warn2 "See <http://www.lesstif.org/>."
20695
20696   elif test \! $lesstif_version -gt 82; then
20697     warnL "LessTif version $lesstif_version_string is being used."
20698     warn2 "LessTif versions 0.82 and earlier are too buggy to"
20699     warn2 "use with XScreenSaver; it is strongly recommended"
20700     warn2 "that you upgrade to at least version $preferred_lesstif!"
20701     warn2 "See <http://www.lesstif.org/>."
20702   fi
20703 fi
20704
20705
20706 if test "$have_motif" = yes -a "$have_gtk" = no ; then
20707   warn  'Motif is being used, and GTK is not.'
20708   echo  ''
20709   motif_warn2
20710 fi
20711
20712
20713 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
20714   warnL 'Use of XPM was requested, but it was not found.'
20715 fi
20716
20717 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
20718   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
20719 fi
20720
20721 if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \
20722    test "$gdk_pixbuf_halfassed" = yes; then
20723
20724   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
20725     true
20726   elif test "$with_xpm_req" = no ; then
20727     warnL 'The XPM library is not being used.'
20728   else
20729     warnL 'The XPM library was not found.'
20730   fi
20731
20732   if test "$with_gdk_pixbuf_req" = yes ; then
20733     true
20734   elif test "$with_gdk_pixbuf_req" = no ; then
20735     warnL 'The GDK-Pixbuf library is not being used.'
20736   else
20737     warnL 'The GDK-Pixbuf library was not found.'
20738   fi
20739
20740   if test "$gdk_pixbuf_halfassed" = yes ; then
20741     echo ''
20742     warn2 'More specifically, we found the headers, but not the'
20743     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
20744     warn2 "system, or something else went wrong.  The \`config.log'"
20745     warn2 'file might contain some clues.'
20746   fi
20747
20748   echo ''
20749   warn2 'Some of the demos will not be as colorful as they'
20750   warn2 'could be.  You should consider installing Pixbuf or'
20751   warn2 'XPM and re-running configure.  The Pixbuf library is'
20752   warn2 'a part of GNOME.  The XPM library comes with most'
20753   warn2 'X11 installations; you can also find it at the X11'
20754   warn2 'archive sites, such as <http://sunsite.unc.edu/>.'
20755   echo  ''
20756   warn2 'GDK-Pixbuf is recommended over XPM, as it provides'
20757   warn2 'support for more image formats.'
20758 fi
20759
20760
20761 if test "$have_jpeg" = no ; then
20762   if test "$with_jpeg_req" = yes ; then
20763     warnL 'Use of libjpeg was requested, but it was not found.'
20764   elif test "$with_jpeg_req" = no ; then
20765     noteL 'The JPEG library is not being used.'
20766   else
20767     noteL 'The JPEG library was not found.'
20768   fi
20769
20770   if test "$jpeg_halfassed" = yes ; then
20771     echo ''
20772     warn2 'More specifically, we found the headers, but not the'
20773     warn2 'library; so either JPEG is half-installed on this'
20774     warn2 "system, or something else went wrong.  The \`config.log'"
20775     warn2 'file might contain some clues.'
20776     echo ''
20777   fi
20778
20779   if test "$have_gdk_pixbuf" = no ; then
20780     warn2 "This means that it won't be possible for the image-manipulating"
20781     warn2 "display modes to load files from disk; and it also means that"
20782     warn2 "the \`webcollage' program will be much slower."
20783   else
20784     warn2 "This means the \`webcollage' program will be much slower."
20785   fi
20786 fi
20787
20788
20789 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
20790   preferred_mesagl=3.4
20791   mgv="$ac_mesagl_version_string"
20792   pgl="$preferred_mesagl"
20793
20794   if test "$ac_mesagl_version" = unknown; then
20795     warnL "Unable to determine the MesaGL version number!"
20796     warn2 "Make sure you are using version $preferred_mesagl or newer."
20797
20798   elif test \! "$ac_mesagl_version" -gt 2006; then
20799     warnL "MesaGL version number is $mgv --"
20800     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
20801     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
20802
20803   elif test \! "$ac_mesagl_version" -gt 3003; then
20804     warnL "MesaGL version number is $mgv --"
20805     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
20806     warn2 "that you upgrade to $pgl or newer."
20807   fi
20808 fi
20809
20810 if test "$have_gl" = no ; then
20811   if test "$with_gl_req" = yes ; then
20812     warnL 'Use of GL was requested, but it was not found.'
20813   elif test "$with_gl_req" = no ; then
20814     noteL 'The OpenGL 3D library is not being used.'
20815   else
20816     noteL 'The OpenGL 3D library was not found.'
20817   fi
20818
20819   if test "$gl_halfassed" = yes ; then
20820     echo ''
20821     warn2 'More specifically, we found the headers, but not the'
20822     warn2 'libraries; so either GL is half-installed on this'
20823     warn2 "system, or something else went wrong.  The \`config.log'"
20824     warn2 'file might contain some clues.'
20825   fi
20826
20827   echo ''
20828   warn2 'Those demos which use 3D will not be built or installed.'
20829   warn2 'You might want to consider installing OpenGL and'
20830   warn2 "re-running configure.  If your vendor doesn't ship"
20831   warn2 'their own implementation of OpenGL, you can get a free'
20832   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
20833   warn2 'info, see <http://www.opengl.org/>.'
20834
20835 fi
20836
20837
20838 if test "$have_gl" = yes -a "$have_gle" = no ; then
20839
20840  # nobody cares about this; don't print the warning unless it was
20841  # requested and not found, or halfway-found.
20842  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
20843
20844   if test "$with_gle_req" = yes ; then
20845     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
20846     warn2 'it was not found (though the OpenGL library was found, and'
20847     warn2 'is being used.)'
20848   elif test "$with_gle_req" = no ; then
20849     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
20850     warn2 'library is not.'
20851   else
20852     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
20853     warn2 'was not.'
20854   fi
20855
20856   if test "$gle_halfassed" = yes ; then
20857     echo ''
20858     warn2 'More specifically, we found the headers, but not the'
20859     warn2 'libraries; so either GLE is half-installed on this'
20860     warn2 "system, or something else went wrong.  The \`config.log'"
20861     warn2 'file might contain some clues.'
20862   fi
20863
20864   echo ''
20865   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
20866   warn2 'will not be built or installed.  You might want to consider'
20867   warn2 'installing GLE and re-running configure.  You can find the'
20868   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
20869   warn2 'OpenGL info, see <http://www.opengl.org/>.'
20870
20871  fi
20872 fi
20873
20874
20875 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
20876   warn 'Use of XReadDisplay was requested, but it was not found.'
20877 fi
20878
20879 if test -n "$with_fortune_req"; then
20880   if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
20881     warnL "$with_fortune_req was requested as the Fortune program,"
20882     warn2 "but was not found.  The default will be used instead."
20883   fi
20884 fi
20885
20886 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
20887   warn 'Use of Kerberos was requested, but it was not found.'
20888 fi
20889
20890 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
20891   warn 'Use of PAM was requested, but it was not found.'
20892 fi
20893
20894 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
20895   warn 'Use of shadow passwords was requested, but they were not found.'
20896 fi
20897
20898
20899 # You are in a twisty maze of namespaces and syntaxes, all alike.
20900 # Fuck the skull of Unix.
20901 #
20902 eval bindir=${bindir}
20903 eval bindir=${bindir}
20904 eval bindir=${bindir}
20905 eval bindir=${bindir}
20906 eval bindir=${bindir}
20907 eval bindir=${bindir}
20908 eval HACKDIR=${HACKDIR}
20909 eval HACKDIR=${HACKDIR}
20910 eval HACKDIR=${HACKDIR}
20911 eval HACKDIR=${HACKDIR}
20912 eval HACKDIR=${HACKDIR}
20913 eval HACKDIR=${HACKDIR}
20914 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20915 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20916 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20917 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20918 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20919 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20920
20921 # canonicalize slashes.
20922 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
20923 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
20924 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
20925
20926
20927 # Sanity check the hackdir
20928 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
20929   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
20930     echo ""
20931     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
20932                    There will be an executable installed with that name, so
20933                    that can't be the name of a directory as well.  Please
20934                    re-configure with a different directory name." >&5
20935 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
20936                    There will be an executable installed with that name, so
20937                    that can't be the name of a directory as well.  Please
20938                    re-configure with a different directory name." >&2;}
20939    { (exit 1); exit 1; }; }
20940   fi
20941 done
20942
20943
20944 do_dir_warning=no
20945
20946 # Now let's see if there's a previous RPM version already installed.  Blargh!
20947
20948 # M4 sucks!!
20949
20950 rpmv=`(rpm -qv xscreensaver) 2>/dev/null | \
20951       sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
20952
20953
20954 if test \! -z "$rpmv" ; then
20955   rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
20956   rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
20957
20958   warning=no
20959   warnL "There is already an installed RPM of xscreensaver $rpmv"
20960   warn2 "on this system.  You might want to remove it (with"
20961   warn2 '"rpm -ve xscreensaver") before running "make install"'
20962   warn2 "from this directory."
20963   echo ""
20964   warn2 "Alternately, you could build this version of xscreensaver"
20965   warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
20966   warn2 "file is included.  See the RPM documentation for more info."
20967   echo ""
20968
20969   if test "$rpmbdir" = "$rpmhdir" ; then
20970     warn2 "The RPM version was installed in $rpmbdir/."
20971   else
20972     warn2 "The RPM version was installed in $rpmbdir/,"
20973     warn2 "with demos in $rpmhdir/."
20974   fi
20975
20976   do_dir_warning=yes
20977 fi
20978
20979
20980 if test "${bindir}" = "${HACKDIR}" ; then
20981   do_dir_warning=yes
20982 fi
20983
20984 if test "$do_dir_warning" = yes; then
20985   echo ""
20986   echo "$warnsep"
20987   echo ""
20988   echo '      When you run "make install", the "xscreensaver",'
20989   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
20990   echo "      will be installed in ${bindir}/."
20991   echo ""
20992   echo "      The various graphics demos (175+ different executables) will"
20993   echo "      be installed in ${HACKDIR}/."
20994   echo ""
20995   echo "      If you would prefer the demos to be installed elsewhere,"
20996   echo "      you should re-run configure with the --with-hackdir=DIR"
20997   echo "      option.  For more information, run \`./configure --help'."
20998   warning=yes
20999 fi
21000
21001 if test "$warning" != no; then
21002   echo '' ; echo "$warnsep" ; echo ''
21003 fi
21004
21005 if test "$do_dir_warning" = no; then
21006   if test "$warning" = no; then
21007     echo ''
21008   fi
21009   echo "User programs will be installed in ${bindir}/"
21010   echo "Screen savers will be installed in ${HACKDIR}/"
21011   echo "Configuration will be installed in ${HACK_CONF_DIR}/"
21012   echo ''
21013 fi