http://packetstormsecurity.org/UNIX/admin/xscreensaver-4.14.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 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
893 User interface options:
894
895   --with-motif            Use the Motif toolkit for the user interface
896                           (not recommended.)
897   --with-gtk              Use the Gtk toolkit for the user interface.
898   --with-gnome            Include support for the Gnome 1.x Control Center.
899                           (This option is not needed with GTK 2.x / Gnome 2.x.)
900
901   --with-xml              The XML toolkit is needed for some parts of
902                           the Gtk interface.  Without it, the configuration
903                           interface will be much less featureful.
904
905 Graphics options:
906
907   --with-gl               Build those demos which depend on OpenGL.
908   --with-gle              Build those demos which depend on GLE
909                           (the OpenGL "extrusion" library.)
910   --with-xpm              Include support for XPM files in some demos.
911                           (Not needed if Pixbuf is used.)
912   --with-pixbuf           Include support for the GDK-Pixbuf library in some
913                           demos, which will make it possible for them to read
914                           GIF, JPEG, and PNG files as well.  (The path here is
915                           ignored if GTK 2.x is being used.)
916   --with-jpeg             Include support for the JPEG library.
917   --with-xshm-ext         Include support for the Shared Memory extension.
918   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
919   --with-readdisplay      Include support for the XReadDisplay extension.
920
921   --with-fortune=PROGRAM  Some demos are able to run an external program and
922                           display its text; this names the program to use by
923                           default (though it can be overridden with X
924                           resources.)  Default is \"/usr/games/fortune\".
925   --with-setuid-hacks     Allow some demos to be installed \`setuid root'
926                           (which is needed in order to ping other hosts.)
927
928
929 Some influential environment variables:
930   CC          C compiler command
931   CFLAGS      C compiler flags
932   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
933               nonstandard directory <lib dir>
934   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
935               headers in a nonstandard directory <include dir>
936   CPP         C preprocessor
937
938 Use these variables to override the choices made by `configure' or to help
939 it to find libraries and programs with nonstandard names/locations.
940
941 _ACEOF
942 fi
943
944 if test "$ac_init_help" = "recursive"; then
945   # If there are subdirs, report their specific --help.
946   ac_popdir=`pwd`
947   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
948     test -d $ac_dir || continue
949     ac_builddir=.
950
951 if test "$ac_dir" != .; then
952   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
953   # A "../" for each directory in $ac_dir_suffix.
954   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
955 else
956   ac_dir_suffix= ac_top_builddir=
957 fi
958
959 case $srcdir in
960   .)  # No --srcdir option.  We are building in place.
961     ac_srcdir=.
962     if test -z "$ac_top_builddir"; then
963        ac_top_srcdir=.
964     else
965        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
966     fi ;;
967   [\\/]* | ?:[\\/]* )  # Absolute path.
968     ac_srcdir=$srcdir$ac_dir_suffix;
969     ac_top_srcdir=$srcdir ;;
970   *) # Relative path.
971     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
972     ac_top_srcdir=$ac_top_builddir$srcdir ;;
973 esac
974 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
975 # absolute.
976 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
977 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
978 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
979 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
980
981     cd $ac_dir
982     # Check for guested configure; otherwise get Cygnus style configure.
983     if test -f $ac_srcdir/configure.gnu; then
984       echo
985       $SHELL $ac_srcdir/configure.gnu  --help=recursive
986     elif test -f $ac_srcdir/configure; then
987       echo
988       $SHELL $ac_srcdir/configure  --help=recursive
989     elif test -f $ac_srcdir/configure.ac ||
990            test -f $ac_srcdir/configure.in; then
991       echo
992       $ac_configure --help
993     else
994       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
995     fi
996     cd $ac_popdir
997   done
998 fi
999
1000 test -n "$ac_init_help" && exit 0
1001 if $ac_init_version; then
1002   cat <<\_ACEOF
1003
1004 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
1005 Free Software Foundation, Inc.
1006 This configure script is free software; the Free Software Foundation
1007 gives unlimited permission to copy, distribute and modify it.
1008 _ACEOF
1009   exit 0
1010 fi
1011 exec 5>config.log
1012 cat >&5 <<_ACEOF
1013 This file contains any messages produced by compilers while
1014 running configure, to aid debugging if configure makes a mistake.
1015
1016 It was created by $as_me, which was
1017 generated by GNU Autoconf 2.57.  Invocation command line was
1018
1019   $ $0 $@
1020
1021 _ACEOF
1022 {
1023 cat <<_ASUNAME
1024 ## --------- ##
1025 ## Platform. ##
1026 ## --------- ##
1027
1028 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1029 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1030 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1031 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1032 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1033
1034 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1035 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1036
1037 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1038 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1039 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1040 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1041 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1042 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1043 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1044
1045 _ASUNAME
1046
1047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1048 for as_dir in $PATH
1049 do
1050   IFS=$as_save_IFS
1051   test -z "$as_dir" && as_dir=.
1052   echo "PATH: $as_dir"
1053 done
1054
1055 } >&5
1056
1057 cat >&5 <<_ACEOF
1058
1059
1060 ## ----------- ##
1061 ## Core tests. ##
1062 ## ----------- ##
1063
1064 _ACEOF
1065
1066
1067 # Keep a trace of the command line.
1068 # Strip out --no-create and --no-recursion so they do not pile up.
1069 # Strip out --silent because we don't want to record it for future runs.
1070 # Also quote any args containing shell meta-characters.
1071 # Make two passes to allow for proper duplicate-argument suppression.
1072 ac_configure_args=
1073 ac_configure_args0=
1074 ac_configure_args1=
1075 ac_sep=
1076 ac_must_keep_next=false
1077 for ac_pass in 1 2
1078 do
1079   for ac_arg
1080   do
1081     case $ac_arg in
1082     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1083     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1084     | -silent | --silent | --silen | --sile | --sil)
1085       continue ;;
1086     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1087       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1088     esac
1089     case $ac_pass in
1090     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1091     2)
1092       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1093       if test $ac_must_keep_next = true; then
1094         ac_must_keep_next=false # Got value, back to normal.
1095       else
1096         case $ac_arg in
1097           *=* | --config-cache | -C | -disable-* | --disable-* \
1098           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1099           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1100           | -with-* | --with-* | -without-* | --without-* | --x)
1101             case "$ac_configure_args0 " in
1102               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1103             esac
1104             ;;
1105           -* ) ac_must_keep_next=true ;;
1106         esac
1107       fi
1108       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1109       # Get rid of the leading space.
1110       ac_sep=" "
1111       ;;
1112     esac
1113   done
1114 done
1115 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1116 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1117
1118 # When interrupted or exit'd, cleanup temporary files, and complete
1119 # config.log.  We remove comments because anyway the quotes in there
1120 # would cause problems or look ugly.
1121 # WARNING: Be sure not to use single quotes in there, as some shells,
1122 # such as our DU 5.0 friend, will then `close' the trap.
1123 trap 'exit_status=$?
1124   # Save into config.log some information that might help in debugging.
1125   {
1126     echo
1127
1128     cat <<\_ASBOX
1129 ## ---------------- ##
1130 ## Cache variables. ##
1131 ## ---------------- ##
1132 _ASBOX
1133     echo
1134     # The following way of writing the cache mishandles newlines in values,
1135 {
1136   (set) 2>&1 |
1137     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1138     *ac_space=\ *)
1139       sed -n \
1140         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1141           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1142       ;;
1143     *)
1144       sed -n \
1145         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1146       ;;
1147     esac;
1148 }
1149     echo
1150
1151     cat <<\_ASBOX
1152 ## ----------------- ##
1153 ## Output variables. ##
1154 ## ----------------- ##
1155 _ASBOX
1156     echo
1157     for ac_var in $ac_subst_vars
1158     do
1159       eval ac_val=$`echo $ac_var`
1160       echo "$ac_var='"'"'$ac_val'"'"'"
1161     done | sort
1162     echo
1163
1164     if test -n "$ac_subst_files"; then
1165       cat <<\_ASBOX
1166 ## ------------- ##
1167 ## Output files. ##
1168 ## ------------- ##
1169 _ASBOX
1170       echo
1171       for ac_var in $ac_subst_files
1172       do
1173         eval ac_val=$`echo $ac_var`
1174         echo "$ac_var='"'"'$ac_val'"'"'"
1175       done | sort
1176       echo
1177     fi
1178
1179     if test -s confdefs.h; then
1180       cat <<\_ASBOX
1181 ## ----------- ##
1182 ## confdefs.h. ##
1183 ## ----------- ##
1184 _ASBOX
1185       echo
1186       sed "/^$/d" confdefs.h | sort
1187       echo
1188     fi
1189     test "$ac_signal" != 0 &&
1190       echo "$as_me: caught signal $ac_signal"
1191     echo "$as_me: exit $exit_status"
1192   } >&5
1193   rm -f core core.* *.core &&
1194   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1195     exit $exit_status
1196      ' 0
1197 for ac_signal in 1 2 13 15; do
1198   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1199 done
1200 ac_signal=0
1201
1202 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1203 rm -rf conftest* confdefs.h
1204 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1205 echo >confdefs.h
1206
1207 # Predefined preprocessor variables.
1208
1209 cat >>confdefs.h <<_ACEOF
1210 #define PACKAGE_NAME "$PACKAGE_NAME"
1211 _ACEOF
1212
1213
1214 cat >>confdefs.h <<_ACEOF
1215 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1216 _ACEOF
1217
1218
1219 cat >>confdefs.h <<_ACEOF
1220 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1221 _ACEOF
1222
1223
1224 cat >>confdefs.h <<_ACEOF
1225 #define PACKAGE_STRING "$PACKAGE_STRING"
1226 _ACEOF
1227
1228
1229 cat >>confdefs.h <<_ACEOF
1230 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1231 _ACEOF
1232
1233
1234 # Let the site file select an alternate cache file if it wants to.
1235 # Prefer explicitly selected file to automatically selected ones.
1236 if test -z "$CONFIG_SITE"; then
1237   if test "x$prefix" != xNONE; then
1238     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1239   else
1240     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1241   fi
1242 fi
1243 for ac_site_file in $CONFIG_SITE; do
1244   if test -r "$ac_site_file"; then
1245     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1246 echo "$as_me: loading site script $ac_site_file" >&6;}
1247     sed 's/^/| /' "$ac_site_file" >&5
1248     . "$ac_site_file"
1249   fi
1250 done
1251
1252 if test -r "$cache_file"; then
1253   # Some versions of bash will fail to source /dev/null (special
1254   # files actually), so we avoid doing that.
1255   if test -f "$cache_file"; then
1256     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1257 echo "$as_me: loading cache $cache_file" >&6;}
1258     case $cache_file in
1259       [\\/]* | ?:[\\/]* ) . $cache_file;;
1260       *)                      . ./$cache_file;;
1261     esac
1262   fi
1263 else
1264   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1265 echo "$as_me: creating cache $cache_file" >&6;}
1266   >$cache_file
1267 fi
1268
1269 # Check that the precious variables saved in the cache have kept the same
1270 # value.
1271 ac_cache_corrupted=false
1272 for ac_var in `(set) 2>&1 |
1273                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1274   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1275   eval ac_new_set=\$ac_env_${ac_var}_set
1276   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1277   eval ac_new_val="\$ac_env_${ac_var}_value"
1278   case $ac_old_set,$ac_new_set in
1279     set,)
1280       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1281 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1282       ac_cache_corrupted=: ;;
1283     ,set)
1284       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1285 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1286       ac_cache_corrupted=: ;;
1287     ,);;
1288     *)
1289       if test "x$ac_old_val" != "x$ac_new_val"; then
1290         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1291 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1292         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1293 echo "$as_me:   former value:  $ac_old_val" >&2;}
1294         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1295 echo "$as_me:   current value: $ac_new_val" >&2;}
1296         ac_cache_corrupted=:
1297       fi;;
1298   esac
1299   # Pass precious variables to config.status.
1300   if test "$ac_new_set" = set; then
1301     case $ac_new_val in
1302     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1303       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1304     *) ac_arg=$ac_var=$ac_new_val ;;
1305     esac
1306     case " $ac_configure_args " in
1307       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1308       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1309     esac
1310   fi
1311 done
1312 if $ac_cache_corrupted; then
1313   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1314 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1315   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1316 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1317    { (exit 1); exit 1; }; }
1318 fi
1319
1320 ac_ext=c
1321 ac_cpp='$CPP $CPPFLAGS'
1322 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1323 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1324 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344           ac_config_headers="$ac_config_headers config.h"
1345
1346
1347 echo "current directory: `pwd`"
1348 echo "command line was: $0 $@"
1349
1350
1351 # After checking to see that --srcdir is correct (which AC_INIT does)
1352 # check for some random other files that come later in the tar file,
1353 # to make sure everything is here.
1354 #
1355 for d in driver utils hacks hacks/glx ; do
1356   f=$srcdir/$d/Makefile.in
1357   if test \! -r $f ; then
1358     echo ""
1359     echo "ERROR: The package is incomplete: $f does not exist."
1360     echo "       This probably means that your download was truncated."
1361     echo ""
1362     exit 1
1363   fi
1364 done
1365
1366 ###############################################################################
1367 #
1368 #       Function to figure out how to run the compiler.
1369 #
1370 ###############################################################################
1371
1372
1373
1374
1375 ###############################################################################
1376 #
1377 #       Functions to figure out how to disable // comments in ANSI C code.
1378 #
1379 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
1380 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
1381 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
1382 #       so much for compatibility!)
1383 #
1384 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
1385 #       declarations preceed statements, without resorting to "-pedantic".
1386 #       This means that there is no way to get gcc3 to issue warnings that
1387 #       ensure that your code complies with the ANSI/ISO C89 standard, without
1388 #       also drowning in totally useless warnings.  Thank you master may I
1389 #       have another.
1390 #
1391 #       So, I give up, let's just use -pedantic.
1392 #
1393 ###############################################################################
1394
1395
1396
1397
1398
1399
1400 ###############################################################################
1401 #
1402 #       Function to figure out how to turn off Objective C on MacOS X.
1403 #       (We have to do this to work around an Apple-specific gcc bug.)
1404 #
1405 ###############################################################################
1406
1407
1408
1409
1410
1411
1412 ###############################################################################
1413 #
1414 #       Function to figure out how to create directory trees.
1415 #
1416 ###############################################################################
1417
1418
1419
1420
1421 ###############################################################################
1422 #
1423 #       Function to check whether gettimeofday() exists, and how to call it.
1424 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1425 #
1426 ###############################################################################
1427
1428
1429
1430
1431 ###############################################################################
1432 #
1433 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1434 #
1435 ###############################################################################
1436
1437 # M4 sucks!!  perl sucks too!!
1438
1439 perl_version_cmd='print $]'
1440
1441
1442
1443
1444
1445 ###############################################################################
1446 #
1447 #       Function to demand "bc".  Losers.
1448 #
1449 ###############################################################################
1450
1451
1452
1453 ###############################################################################
1454 #
1455 #       Functions to check how to do ICMP PING requests.
1456 #
1457 ###############################################################################
1458
1459
1460
1461
1462
1463
1464 ###############################################################################
1465 #
1466 #       Functions to check for various X11 crap.
1467 #
1468 ###############################################################################
1469
1470 # Try and find the app-defaults directory.
1471 # It sucks that autoconf doesn't do this already...
1472 #
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483 # Random special-cases for X on certain pathological OSes.
1484 # You know who you are.
1485 #
1486
1487
1488
1489
1490 ###############################################################################
1491 #
1492 #       Some utility functions to make checking for X things easier.
1493 #
1494 ###############################################################################
1495
1496 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1497 #
1498
1499
1500 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1501 #
1502
1503
1504 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1505 #
1506
1507
1508
1509 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1510 # Use this sparingly; it probably doesn't work very well on X programs.
1511 #
1512
1513
1514 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1515 # (But not the -L directories!)
1516 #
1517
1518
1519
1520
1521 # Usage: HANDLE_X_PATH_ARG([variable_name],
1522 #                          [--command-line-option],
1523 #                          [descriptive string])
1524 #
1525 # All of the --with options take three forms:
1526 #
1527 #   --with-foo (or --with-foo=yes)
1528 #   --without-foo (or --with-foo=no)
1529 #   --with-foo=/DIR
1530 #
1531 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1532 # a directory (string beginning with a slash) it checks to see whether
1533 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1534 # as appropriate.
1535 #
1536
1537
1538
1539
1540 ###############################################################################
1541 ###############################################################################
1542 #
1543 #       End of function definitions.  Now start actually executing stuff.
1544 #
1545 ###############################################################################
1546 ###############################################################################
1547
1548 # random compiler setup
1549 ac_aux_dir=
1550 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1551   if test -f $ac_dir/install-sh; then
1552     ac_aux_dir=$ac_dir
1553     ac_install_sh="$ac_aux_dir/install-sh -c"
1554     break
1555   elif test -f $ac_dir/install.sh; then
1556     ac_aux_dir=$ac_dir
1557     ac_install_sh="$ac_aux_dir/install.sh -c"
1558     break
1559   elif test -f $ac_dir/shtool; then
1560     ac_aux_dir=$ac_dir
1561     ac_install_sh="$ac_aux_dir/shtool install -c"
1562     break
1563   fi
1564 done
1565 if test -z "$ac_aux_dir"; then
1566   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1567 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1568    { (exit 1); exit 1; }; }
1569 fi
1570 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1571 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1572 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1573
1574 # Make sure we can run config.sub.
1575 $ac_config_sub sun4 >/dev/null 2>&1 ||
1576   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1577 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1578    { (exit 1); exit 1; }; }
1579
1580 echo "$as_me:$LINENO: checking build system type" >&5
1581 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1582 if test "${ac_cv_build+set}" = set; then
1583   echo $ECHO_N "(cached) $ECHO_C" >&6
1584 else
1585   ac_cv_build_alias=$build_alias
1586 test -z "$ac_cv_build_alias" &&
1587   ac_cv_build_alias=`$ac_config_guess`
1588 test -z "$ac_cv_build_alias" &&
1589   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1590 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1591    { (exit 1); exit 1; }; }
1592 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1593   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1594 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1595    { (exit 1); exit 1; }; }
1596
1597 fi
1598 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1599 echo "${ECHO_T}$ac_cv_build" >&6
1600 build=$ac_cv_build
1601 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1602 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1603 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1604
1605
1606 echo "$as_me:$LINENO: checking host system type" >&5
1607 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1608 if test "${ac_cv_host+set}" = set; then
1609   echo $ECHO_N "(cached) $ECHO_C" >&6
1610 else
1611   ac_cv_host_alias=$host_alias
1612 test -z "$ac_cv_host_alias" &&
1613   ac_cv_host_alias=$ac_cv_build_alias
1614 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1615   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1616 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1617    { (exit 1); exit 1; }; }
1618
1619 fi
1620 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1621 echo "${ECHO_T}$ac_cv_host" >&6
1622 host=$ac_cv_host
1623 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1624 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1625 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1626
1627
1628
1629 ac_ext=c
1630 ac_cpp='$CPP $CPPFLAGS'
1631 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1632 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1633 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1634 if test -n "$ac_tool_prefix"; then
1635   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1636 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1637 echo "$as_me:$LINENO: checking for $ac_word" >&5
1638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1639 if test "${ac_cv_prog_CC+set}" = set; then
1640   echo $ECHO_N "(cached) $ECHO_C" >&6
1641 else
1642   if test -n "$CC"; then
1643   ac_cv_prog_CC="$CC" # Let the user override the test.
1644 else
1645 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1646 for as_dir in $PATH
1647 do
1648   IFS=$as_save_IFS
1649   test -z "$as_dir" && as_dir=.
1650   for ac_exec_ext in '' $ac_executable_extensions; do
1651   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1652     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1653     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1654     break 2
1655   fi
1656 done
1657 done
1658
1659 fi
1660 fi
1661 CC=$ac_cv_prog_CC
1662 if test -n "$CC"; then
1663   echo "$as_me:$LINENO: result: $CC" >&5
1664 echo "${ECHO_T}$CC" >&6
1665 else
1666   echo "$as_me:$LINENO: result: no" >&5
1667 echo "${ECHO_T}no" >&6
1668 fi
1669
1670 fi
1671 if test -z "$ac_cv_prog_CC"; then
1672   ac_ct_CC=$CC
1673   # Extract the first word of "gcc", so it can be a program name with args.
1674 set dummy gcc; ac_word=$2
1675 echo "$as_me:$LINENO: checking for $ac_word" >&5
1676 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1677 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1678   echo $ECHO_N "(cached) $ECHO_C" >&6
1679 else
1680   if test -n "$ac_ct_CC"; then
1681   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1682 else
1683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1684 for as_dir in $PATH
1685 do
1686   IFS=$as_save_IFS
1687   test -z "$as_dir" && as_dir=.
1688   for ac_exec_ext in '' $ac_executable_extensions; do
1689   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1690     ac_cv_prog_ac_ct_CC="gcc"
1691     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1692     break 2
1693   fi
1694 done
1695 done
1696
1697 fi
1698 fi
1699 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1700 if test -n "$ac_ct_CC"; then
1701   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1702 echo "${ECHO_T}$ac_ct_CC" >&6
1703 else
1704   echo "$as_me:$LINENO: result: no" >&5
1705 echo "${ECHO_T}no" >&6
1706 fi
1707
1708   CC=$ac_ct_CC
1709 else
1710   CC="$ac_cv_prog_CC"
1711 fi
1712
1713 if test -z "$CC"; then
1714   if test -n "$ac_tool_prefix"; then
1715   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1716 set dummy ${ac_tool_prefix}cc; ac_word=$2
1717 echo "$as_me:$LINENO: checking for $ac_word" >&5
1718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1719 if test "${ac_cv_prog_CC+set}" = set; then
1720   echo $ECHO_N "(cached) $ECHO_C" >&6
1721 else
1722   if test -n "$CC"; then
1723   ac_cv_prog_CC="$CC" # Let the user override the test.
1724 else
1725 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1726 for as_dir in $PATH
1727 do
1728   IFS=$as_save_IFS
1729   test -z "$as_dir" && as_dir=.
1730   for ac_exec_ext in '' $ac_executable_extensions; do
1731   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1732     ac_cv_prog_CC="${ac_tool_prefix}cc"
1733     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1734     break 2
1735   fi
1736 done
1737 done
1738
1739 fi
1740 fi
1741 CC=$ac_cv_prog_CC
1742 if test -n "$CC"; then
1743   echo "$as_me:$LINENO: result: $CC" >&5
1744 echo "${ECHO_T}$CC" >&6
1745 else
1746   echo "$as_me:$LINENO: result: no" >&5
1747 echo "${ECHO_T}no" >&6
1748 fi
1749
1750 fi
1751 if test -z "$ac_cv_prog_CC"; then
1752   ac_ct_CC=$CC
1753   # Extract the first word of "cc", so it can be a program name with args.
1754 set dummy cc; ac_word=$2
1755 echo "$as_me:$LINENO: checking for $ac_word" >&5
1756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1757 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1758   echo $ECHO_N "(cached) $ECHO_C" >&6
1759 else
1760   if test -n "$ac_ct_CC"; then
1761   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1762 else
1763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1764 for as_dir in $PATH
1765 do
1766   IFS=$as_save_IFS
1767   test -z "$as_dir" && as_dir=.
1768   for ac_exec_ext in '' $ac_executable_extensions; do
1769   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1770     ac_cv_prog_ac_ct_CC="cc"
1771     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1772     break 2
1773   fi
1774 done
1775 done
1776
1777 fi
1778 fi
1779 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1780 if test -n "$ac_ct_CC"; then
1781   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1782 echo "${ECHO_T}$ac_ct_CC" >&6
1783 else
1784   echo "$as_me:$LINENO: result: no" >&5
1785 echo "${ECHO_T}no" >&6
1786 fi
1787
1788   CC=$ac_ct_CC
1789 else
1790   CC="$ac_cv_prog_CC"
1791 fi
1792
1793 fi
1794 if test -z "$CC"; then
1795   # Extract the first word of "cc", so it can be a program name with args.
1796 set dummy cc; ac_word=$2
1797 echo "$as_me:$LINENO: checking for $ac_word" >&5
1798 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1799 if test "${ac_cv_prog_CC+set}" = set; then
1800   echo $ECHO_N "(cached) $ECHO_C" >&6
1801 else
1802   if test -n "$CC"; then
1803   ac_cv_prog_CC="$CC" # Let the user override the test.
1804 else
1805   ac_prog_rejected=no
1806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1807 for as_dir in $PATH
1808 do
1809   IFS=$as_save_IFS
1810   test -z "$as_dir" && as_dir=.
1811   for ac_exec_ext in '' $ac_executable_extensions; do
1812   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1813     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1814        ac_prog_rejected=yes
1815        continue
1816      fi
1817     ac_cv_prog_CC="cc"
1818     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1819     break 2
1820   fi
1821 done
1822 done
1823
1824 if test $ac_prog_rejected = yes; then
1825   # We found a bogon in the path, so make sure we never use it.
1826   set dummy $ac_cv_prog_CC
1827   shift
1828   if test $# != 0; then
1829     # We chose a different compiler from the bogus one.
1830     # However, it has the same basename, so the bogon will be chosen
1831     # first if we set CC to just the basename; use the full file name.
1832     shift
1833     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1834   fi
1835 fi
1836 fi
1837 fi
1838 CC=$ac_cv_prog_CC
1839 if test -n "$CC"; then
1840   echo "$as_me:$LINENO: result: $CC" >&5
1841 echo "${ECHO_T}$CC" >&6
1842 else
1843   echo "$as_me:$LINENO: result: no" >&5
1844 echo "${ECHO_T}no" >&6
1845 fi
1846
1847 fi
1848 if test -z "$CC"; then
1849   if test -n "$ac_tool_prefix"; then
1850   for ac_prog in cl
1851   do
1852     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1853 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1854 echo "$as_me:$LINENO: checking for $ac_word" >&5
1855 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1856 if test "${ac_cv_prog_CC+set}" = set; then
1857   echo $ECHO_N "(cached) $ECHO_C" >&6
1858 else
1859   if test -n "$CC"; then
1860   ac_cv_prog_CC="$CC" # Let the user override the test.
1861 else
1862 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1863 for as_dir in $PATH
1864 do
1865   IFS=$as_save_IFS
1866   test -z "$as_dir" && as_dir=.
1867   for ac_exec_ext in '' $ac_executable_extensions; do
1868   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1869     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1870     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1871     break 2
1872   fi
1873 done
1874 done
1875
1876 fi
1877 fi
1878 CC=$ac_cv_prog_CC
1879 if test -n "$CC"; then
1880   echo "$as_me:$LINENO: result: $CC" >&5
1881 echo "${ECHO_T}$CC" >&6
1882 else
1883   echo "$as_me:$LINENO: result: no" >&5
1884 echo "${ECHO_T}no" >&6
1885 fi
1886
1887     test -n "$CC" && break
1888   done
1889 fi
1890 if test -z "$CC"; then
1891   ac_ct_CC=$CC
1892   for ac_prog in cl
1893 do
1894   # Extract the first word of "$ac_prog", so it can be a program name with args.
1895 set dummy $ac_prog; ac_word=$2
1896 echo "$as_me:$LINENO: checking for $ac_word" >&5
1897 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1898 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1899   echo $ECHO_N "(cached) $ECHO_C" >&6
1900 else
1901   if test -n "$ac_ct_CC"; then
1902   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1903 else
1904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1905 for as_dir in $PATH
1906 do
1907   IFS=$as_save_IFS
1908   test -z "$as_dir" && as_dir=.
1909   for ac_exec_ext in '' $ac_executable_extensions; do
1910   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1911     ac_cv_prog_ac_ct_CC="$ac_prog"
1912     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1913     break 2
1914   fi
1915 done
1916 done
1917
1918 fi
1919 fi
1920 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1921 if test -n "$ac_ct_CC"; then
1922   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1923 echo "${ECHO_T}$ac_ct_CC" >&6
1924 else
1925   echo "$as_me:$LINENO: result: no" >&5
1926 echo "${ECHO_T}no" >&6
1927 fi
1928
1929   test -n "$ac_ct_CC" && break
1930 done
1931
1932   CC=$ac_ct_CC
1933 fi
1934
1935 fi
1936
1937
1938 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1939 See \`config.log' for more details." >&5
1940 echo "$as_me: error: no acceptable C compiler found in \$PATH
1941 See \`config.log' for more details." >&2;}
1942    { (exit 1); exit 1; }; }
1943
1944 # Provide some information about the compiler.
1945 echo "$as_me:$LINENO:" \
1946      "checking for C compiler version" >&5
1947 ac_compiler=`set X $ac_compile; echo $2`
1948 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1949   (eval $ac_compiler --version </dev/null >&5) 2>&5
1950   ac_status=$?
1951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1952   (exit $ac_status); }
1953 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1954   (eval $ac_compiler -v </dev/null >&5) 2>&5
1955   ac_status=$?
1956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1957   (exit $ac_status); }
1958 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1959   (eval $ac_compiler -V </dev/null >&5) 2>&5
1960   ac_status=$?
1961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1962   (exit $ac_status); }
1963
1964 cat >conftest.$ac_ext <<_ACEOF
1965 #line $LINENO "configure"
1966 /* confdefs.h.  */
1967 _ACEOF
1968 cat confdefs.h >>conftest.$ac_ext
1969 cat >>conftest.$ac_ext <<_ACEOF
1970 /* end confdefs.h.  */
1971
1972 int
1973 main ()
1974 {
1975
1976   ;
1977   return 0;
1978 }
1979 _ACEOF
1980 ac_clean_files_save=$ac_clean_files
1981 ac_clean_files="$ac_clean_files a.out a.exe b.out"
1982 # Try to create an executable without -o first, disregard a.out.
1983 # It will help us diagnose broken compilers, and finding out an intuition
1984 # of exeext.
1985 echo "$as_me:$LINENO: checking for C compiler default output" >&5
1986 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1987 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1988 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1989   (eval $ac_link_default) 2>&5
1990   ac_status=$?
1991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1992   (exit $ac_status); }; then
1993   # Find the output, starting from the most likely.  This scheme is
1994 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1995 # resort.
1996
1997 # Be careful to initialize this variable, since it used to be cached.
1998 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1999 ac_cv_exeext=
2000 # b.out is created by i960 compilers.
2001 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2002 do
2003   test -f "$ac_file" || continue
2004   case $ac_file in
2005     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2006         ;;
2007     conftest.$ac_ext )
2008         # This is the source file.
2009         ;;
2010     [ab].out )
2011         # We found the default executable, but exeext='' is most
2012         # certainly right.
2013         break;;
2014     *.* )
2015         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2016         # FIXME: I believe we export ac_cv_exeext for Libtool,
2017         # but it would be cool to find out if it's true.  Does anybody
2018         # maintain Libtool? --akim.
2019         export ac_cv_exeext
2020         break;;
2021     * )
2022         break;;
2023   esac
2024 done
2025 else
2026   echo "$as_me: failed program was:" >&5
2027 sed 's/^/| /' conftest.$ac_ext >&5
2028
2029 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2030 See \`config.log' for more details." >&5
2031 echo "$as_me: error: C compiler cannot create executables
2032 See \`config.log' for more details." >&2;}
2033    { (exit 77); exit 77; }; }
2034 fi
2035
2036 ac_exeext=$ac_cv_exeext
2037 echo "$as_me:$LINENO: result: $ac_file" >&5
2038 echo "${ECHO_T}$ac_file" >&6
2039
2040 # Check the compiler produces executables we can run.  If not, either
2041 # the compiler is broken, or we cross compile.
2042 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2043 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2044 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2045 # If not cross compiling, check that we can run a simple program.
2046 if test "$cross_compiling" != yes; then
2047   if { ac_try='./$ac_file'
2048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2049   (eval $ac_try) 2>&5
2050   ac_status=$?
2051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2052   (exit $ac_status); }; }; then
2053     cross_compiling=no
2054   else
2055     if test "$cross_compiling" = maybe; then
2056         cross_compiling=yes
2057     else
2058         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2059 If you meant to cross compile, use \`--host'.
2060 See \`config.log' for more details." >&5
2061 echo "$as_me: error: cannot run C compiled programs.
2062 If you meant to cross compile, use \`--host'.
2063 See \`config.log' for more details." >&2;}
2064    { (exit 1); exit 1; }; }
2065     fi
2066   fi
2067 fi
2068 echo "$as_me:$LINENO: result: yes" >&5
2069 echo "${ECHO_T}yes" >&6
2070
2071 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2072 ac_clean_files=$ac_clean_files_save
2073 # Check the compiler produces executables we can run.  If not, either
2074 # the compiler is broken, or we cross compile.
2075 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2076 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2077 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2078 echo "${ECHO_T}$cross_compiling" >&6
2079
2080 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2081 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2082 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2083   (eval $ac_link) 2>&5
2084   ac_status=$?
2085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2086   (exit $ac_status); }; then
2087   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2088 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2089 # work properly (i.e., refer to `conftest.exe'), while it won't with
2090 # `rm'.
2091 for ac_file in conftest.exe conftest conftest.*; do
2092   test -f "$ac_file" || continue
2093   case $ac_file in
2094     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2095     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2096           export ac_cv_exeext
2097           break;;
2098     * ) break;;
2099   esac
2100 done
2101 else
2102   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2103 See \`config.log' for more details." >&5
2104 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2105 See \`config.log' for more details." >&2;}
2106    { (exit 1); exit 1; }; }
2107 fi
2108
2109 rm -f conftest$ac_cv_exeext
2110 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2111 echo "${ECHO_T}$ac_cv_exeext" >&6
2112
2113 rm -f conftest.$ac_ext
2114 EXEEXT=$ac_cv_exeext
2115 ac_exeext=$EXEEXT
2116 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2117 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2118 if test "${ac_cv_objext+set}" = set; then
2119   echo $ECHO_N "(cached) $ECHO_C" >&6
2120 else
2121   cat >conftest.$ac_ext <<_ACEOF
2122 #line $LINENO "configure"
2123 /* confdefs.h.  */
2124 _ACEOF
2125 cat confdefs.h >>conftest.$ac_ext
2126 cat >>conftest.$ac_ext <<_ACEOF
2127 /* end confdefs.h.  */
2128
2129 int
2130 main ()
2131 {
2132
2133   ;
2134   return 0;
2135 }
2136 _ACEOF
2137 rm -f conftest.o conftest.obj
2138 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2139   (eval $ac_compile) 2>&5
2140   ac_status=$?
2141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2142   (exit $ac_status); }; then
2143   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2144   case $ac_file in
2145     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2146     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2147        break;;
2148   esac
2149 done
2150 else
2151   echo "$as_me: failed program was:" >&5
2152 sed 's/^/| /' conftest.$ac_ext >&5
2153
2154 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2155 See \`config.log' for more details." >&5
2156 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2157 See \`config.log' for more details." >&2;}
2158    { (exit 1); exit 1; }; }
2159 fi
2160
2161 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2162 fi
2163 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2164 echo "${ECHO_T}$ac_cv_objext" >&6
2165 OBJEXT=$ac_cv_objext
2166 ac_objext=$OBJEXT
2167 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2168 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2169 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2170   echo $ECHO_N "(cached) $ECHO_C" >&6
2171 else
2172   cat >conftest.$ac_ext <<_ACEOF
2173 #line $LINENO "configure"
2174 /* confdefs.h.  */
2175 _ACEOF
2176 cat confdefs.h >>conftest.$ac_ext
2177 cat >>conftest.$ac_ext <<_ACEOF
2178 /* end confdefs.h.  */
2179
2180 int
2181 main ()
2182 {
2183 #ifndef __GNUC__
2184        choke me
2185 #endif
2186
2187   ;
2188   return 0;
2189 }
2190 _ACEOF
2191 rm -f conftest.$ac_objext
2192 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2193   (eval $ac_compile) 2>&5
2194   ac_status=$?
2195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2196   (exit $ac_status); } &&
2197          { ac_try='test -s conftest.$ac_objext'
2198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2199   (eval $ac_try) 2>&5
2200   ac_status=$?
2201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2202   (exit $ac_status); }; }; then
2203   ac_compiler_gnu=yes
2204 else
2205   echo "$as_me: failed program was:" >&5
2206 sed 's/^/| /' conftest.$ac_ext >&5
2207
2208 ac_compiler_gnu=no
2209 fi
2210 rm -f conftest.$ac_objext conftest.$ac_ext
2211 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2212
2213 fi
2214 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2215 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2216 GCC=`test $ac_compiler_gnu = yes && echo yes`
2217 ac_test_CFLAGS=${CFLAGS+set}
2218 ac_save_CFLAGS=$CFLAGS
2219 CFLAGS="-g"
2220 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2221 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2222 if test "${ac_cv_prog_cc_g+set}" = set; then
2223   echo $ECHO_N "(cached) $ECHO_C" >&6
2224 else
2225   cat >conftest.$ac_ext <<_ACEOF
2226 #line $LINENO "configure"
2227 /* confdefs.h.  */
2228 _ACEOF
2229 cat confdefs.h >>conftest.$ac_ext
2230 cat >>conftest.$ac_ext <<_ACEOF
2231 /* end confdefs.h.  */
2232
2233 int
2234 main ()
2235 {
2236
2237   ;
2238   return 0;
2239 }
2240 _ACEOF
2241 rm -f conftest.$ac_objext
2242 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2243   (eval $ac_compile) 2>&5
2244   ac_status=$?
2245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2246   (exit $ac_status); } &&
2247          { ac_try='test -s conftest.$ac_objext'
2248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2249   (eval $ac_try) 2>&5
2250   ac_status=$?
2251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2252   (exit $ac_status); }; }; then
2253   ac_cv_prog_cc_g=yes
2254 else
2255   echo "$as_me: failed program was:" >&5
2256 sed 's/^/| /' conftest.$ac_ext >&5
2257
2258 ac_cv_prog_cc_g=no
2259 fi
2260 rm -f conftest.$ac_objext conftest.$ac_ext
2261 fi
2262 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2263 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2264 if test "$ac_test_CFLAGS" = set; then
2265   CFLAGS=$ac_save_CFLAGS
2266 elif test $ac_cv_prog_cc_g = yes; then
2267   if test "$GCC" = yes; then
2268     CFLAGS="-g -O2"
2269   else
2270     CFLAGS="-g"
2271   fi
2272 else
2273   if test "$GCC" = yes; then
2274     CFLAGS="-O2"
2275   else
2276     CFLAGS=
2277   fi
2278 fi
2279 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2280 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2281 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2282   echo $ECHO_N "(cached) $ECHO_C" >&6
2283 else
2284   ac_cv_prog_cc_stdc=no
2285 ac_save_CC=$CC
2286 cat >conftest.$ac_ext <<_ACEOF
2287 #line $LINENO "configure"
2288 /* confdefs.h.  */
2289 _ACEOF
2290 cat confdefs.h >>conftest.$ac_ext
2291 cat >>conftest.$ac_ext <<_ACEOF
2292 /* end confdefs.h.  */
2293 #include <stdarg.h>
2294 #include <stdio.h>
2295 #include <sys/types.h>
2296 #include <sys/stat.h>
2297 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2298 struct buf { int x; };
2299 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2300 static char *e (p, i)
2301      char **p;
2302      int i;
2303 {
2304   return p[i];
2305 }
2306 static char *f (char * (*g) (char **, int), char **p, ...)
2307 {
2308   char *s;
2309   va_list v;
2310   va_start (v,p);
2311   s = g (p, va_arg (v,int));
2312   va_end (v);
2313   return s;
2314 }
2315 int test (int i, double x);
2316 struct s1 {int (*f) (int a);};
2317 struct s2 {int (*f) (double a);};
2318 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2319 int argc;
2320 char **argv;
2321 int
2322 main ()
2323 {
2324 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2325   ;
2326   return 0;
2327 }
2328 _ACEOF
2329 # Don't try gcc -ansi; that turns off useful extensions and
2330 # breaks some systems' header files.
2331 # AIX                   -qlanglvl=ansi
2332 # Ultrix and OSF/1      -std1
2333 # HP-UX 10.20 and later -Ae
2334 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2335 # SVR4                  -Xc -D__EXTENSIONS__
2336 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2337 do
2338   CC="$ac_save_CC $ac_arg"
2339   rm -f conftest.$ac_objext
2340 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2341   (eval $ac_compile) 2>&5
2342   ac_status=$?
2343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2344   (exit $ac_status); } &&
2345          { ac_try='test -s conftest.$ac_objext'
2346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2347   (eval $ac_try) 2>&5
2348   ac_status=$?
2349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2350   (exit $ac_status); }; }; then
2351   ac_cv_prog_cc_stdc=$ac_arg
2352 break
2353 else
2354   echo "$as_me: failed program was:" >&5
2355 sed 's/^/| /' conftest.$ac_ext >&5
2356
2357 fi
2358 rm -f conftest.$ac_objext
2359 done
2360 rm -f conftest.$ac_ext conftest.$ac_objext
2361 CC=$ac_save_CC
2362
2363 fi
2364
2365 case "x$ac_cv_prog_cc_stdc" in
2366   x|xno)
2367     echo "$as_me:$LINENO: result: none needed" >&5
2368 echo "${ECHO_T}none needed" >&6 ;;
2369   *)
2370     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2371 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2372     CC="$CC $ac_cv_prog_cc_stdc" ;;
2373 esac
2374
2375 # Some people use a C++ compiler to compile C.  Since we use `exit',
2376 # in C++ we need to declare it.  In case someone uses the same compiler
2377 # for both compiling C and C++ we need to have the C++ compiler decide
2378 # the declaration of exit, since it's the most demanding environment.
2379 cat >conftest.$ac_ext <<_ACEOF
2380 #ifndef __cplusplus
2381   choke me
2382 #endif
2383 _ACEOF
2384 rm -f conftest.$ac_objext
2385 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2386   (eval $ac_compile) 2>&5
2387   ac_status=$?
2388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2389   (exit $ac_status); } &&
2390          { ac_try='test -s conftest.$ac_objext'
2391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2392   (eval $ac_try) 2>&5
2393   ac_status=$?
2394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2395   (exit $ac_status); }; }; then
2396   for ac_declaration in \
2397    ''\
2398    '#include <stdlib.h>' \
2399    'extern "C" void std::exit (int) throw (); using std::exit;' \
2400    'extern "C" void std::exit (int); using std::exit;' \
2401    'extern "C" void exit (int) throw ();' \
2402    'extern "C" void exit (int);' \
2403    'void exit (int);'
2404 do
2405   cat >conftest.$ac_ext <<_ACEOF
2406 #line $LINENO "configure"
2407 /* confdefs.h.  */
2408 _ACEOF
2409 cat confdefs.h >>conftest.$ac_ext
2410 cat >>conftest.$ac_ext <<_ACEOF
2411 /* end confdefs.h.  */
2412 #include <stdlib.h>
2413 $ac_declaration
2414 int
2415 main ()
2416 {
2417 exit (42);
2418   ;
2419   return 0;
2420 }
2421 _ACEOF
2422 rm -f conftest.$ac_objext
2423 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2424   (eval $ac_compile) 2>&5
2425   ac_status=$?
2426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2427   (exit $ac_status); } &&
2428          { ac_try='test -s conftest.$ac_objext'
2429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2430   (eval $ac_try) 2>&5
2431   ac_status=$?
2432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2433   (exit $ac_status); }; }; then
2434   :
2435 else
2436   echo "$as_me: failed program was:" >&5
2437 sed 's/^/| /' conftest.$ac_ext >&5
2438
2439 continue
2440 fi
2441 rm -f conftest.$ac_objext conftest.$ac_ext
2442   cat >conftest.$ac_ext <<_ACEOF
2443 #line $LINENO "configure"
2444 /* confdefs.h.  */
2445 _ACEOF
2446 cat confdefs.h >>conftest.$ac_ext
2447 cat >>conftest.$ac_ext <<_ACEOF
2448 /* end confdefs.h.  */
2449 $ac_declaration
2450 int
2451 main ()
2452 {
2453 exit (42);
2454   ;
2455   return 0;
2456 }
2457 _ACEOF
2458 rm -f conftest.$ac_objext
2459 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2460   (eval $ac_compile) 2>&5
2461   ac_status=$?
2462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2463   (exit $ac_status); } &&
2464          { ac_try='test -s conftest.$ac_objext'
2465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2466   (eval $ac_try) 2>&5
2467   ac_status=$?
2468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2469   (exit $ac_status); }; }; then
2470   break
2471 else
2472   echo "$as_me: failed program was:" >&5
2473 sed 's/^/| /' conftest.$ac_ext >&5
2474
2475 fi
2476 rm -f conftest.$ac_objext conftest.$ac_ext
2477 done
2478 rm -f conftest*
2479 if test -n "$ac_declaration"; then
2480   echo '#ifdef __cplusplus' >>confdefs.h
2481   echo $ac_declaration      >>confdefs.h
2482   echo '#endif'             >>confdefs.h
2483 fi
2484
2485 else
2486   echo "$as_me: failed program was:" >&5
2487 sed 's/^/| /' conftest.$ac_ext >&5
2488
2489 fi
2490 rm -f conftest.$ac_objext conftest.$ac_ext
2491 ac_ext=c
2492 ac_cpp='$CPP $CPPFLAGS'
2493 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2494 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2495 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2496
2497
2498   if test -z "$GCC"; then
2499     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2500 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2501     case "$host" in
2502       *-hpux* )
2503         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2504 echo "${ECHO_T}HPUX: adding -Ae" >&6
2505         CC="$CC -Ae"
2506       ;;
2507       *-aix* )
2508         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2509 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2510         CC="$CC -qlanglvl=ansi -qhalt=e"
2511       ;;
2512
2513       *-dec-* )
2514         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2515 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2516         CC="$CC -std1"
2517       ;;
2518
2519       *)
2520         echo "$as_me:$LINENO: result: no idea" >&5
2521 echo "${ECHO_T}no idea" >&6
2522       ;;
2523     esac
2524   fi
2525
2526   OBJCC="$CC"
2527
2528   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2529 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2530   if test "$cross_compiling" = yes; then
2531   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2532 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2533    { (exit 1); exit 1; }; }
2534 else
2535   cat >conftest.$ac_ext <<_ACEOF
2536 #line $LINENO "configure"
2537 /* confdefs.h.  */
2538 _ACEOF
2539 cat confdefs.h >>conftest.$ac_ext
2540 cat >>conftest.$ac_ext <<_ACEOF
2541 /* end confdefs.h.  */
2542  main(int ac, char **av) { return 0; }
2543 _ACEOF
2544 rm -f conftest$ac_exeext
2545 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2546   (eval $ac_link) 2>&5
2547   ac_status=$?
2548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2549   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2551   (eval $ac_try) 2>&5
2552   ac_status=$?
2553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2554   (exit $ac_status); }; }; then
2555   echo "$as_me:$LINENO: result: yes" >&5
2556 echo "${ECHO_T}yes" >&6
2557 else
2558   echo "$as_me: program exited with status $ac_status" >&5
2559 echo "$as_me: failed program was:" >&5
2560 sed 's/^/| /' conftest.$ac_ext >&5
2561
2562 ( exit $ac_status )
2563 echo "$as_me:$LINENO: result: no" >&5
2564 echo "${ECHO_T}no" >&6
2565      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2566 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2567    { (exit 1); exit 1; }; }
2568 fi
2569 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2570 fi
2571
2572   if test -n "$GCC"; then
2573     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2574 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2575     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs"
2576     OBJCC="$OBJCC -Wall"
2577     # supposedly gcc 3.4 will have "-Wdeclaration-after-statement"
2578     # and then perhaps we can do without -pedantic?
2579   else
2580     case "$host" in
2581       *-irix5* |*-irix6.0-3* )
2582         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2583 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2584         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2585       ;;
2586 #     *-dec-osf* )
2587 #       if test -z "$GCC"; then
2588 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2589 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2590 #       fi
2591 #     ;;
2592     esac
2593   fi
2594
2595 if test -n "$GCC"; then
2596    if test -n "$GCC"; then
2597    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2598 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2599 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2600   echo $ECHO_N "(cached) $ECHO_C" >&6
2601 else
2602   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
2603           grep unrecognized >/dev/null ); then
2604        ac_cv_gcc_accepts_std=no
2605      else
2606        ac_cv_gcc_accepts_std=yes
2607      fi
2608 fi
2609 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2610 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2611    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2612   fi
2613
2614    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2615 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2616    #
2617    # The reason that // comments are banned from xscreensaver is that gcc is
2618    # basically the only compiler in the world that supports them in C code.
2619    # All other vendors support them only in their C++ compilers, not in their
2620    # ANSI C compilers.  This means that it's a portability problem: every time
2621    # these comments have snuck into the xscreensaver source code, I've gotten
2622    # complaints about it the next day.  So we turn off support for them in gcc
2623    # as well to prevent them from accidentially slipping in.
2624    #
2625    if test "$ac_gcc_accepts_std" = yes ; then
2626      #
2627      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2628      # (That appears to be the only additional preprocessor symbol
2629      # it defines, in addition to the syntax changes it makes.)
2630      #
2631      # -std=gnu89 is no good, because // comments were a GNU extension
2632      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2633      # with -std=gnu89 but not with -std=c89.)
2634      #
2635      CC="$CC -std=c89 -U__STRICT_ANSI__"
2636    else
2637      # The old way:
2638      CC="$CC -Wp,-lang-c89"
2639    fi
2640   fi
2641
2642 if test -n "$GCC"; then
2643    if test -n "$GCC"; then
2644    echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
2645 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6
2646 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
2647   echo $ECHO_N "(cached) $ECHO_C" >&6
2648 else
2649   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
2650           grep unrecognized >/dev/null ); then
2651        ac_cv_gcc_accepts_no_cpp_precomp=no
2652      else
2653        ac_cv_gcc_accepts_no_cpp_precomp=yes
2654      fi
2655 fi
2656 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
2657 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6
2658    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
2659   fi
2660
2661    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
2662      echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
2663 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6
2664      CC="$CC -no-cpp-precomp"
2665    fi
2666   fi
2667
2668 ac_ext=c
2669 ac_cpp='$CPP $CPPFLAGS'
2670 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2671 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2672 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2673 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2674 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2675 # On Suns, sometimes $CPP names a directory.
2676 if test -n "$CPP" && test -d "$CPP"; then
2677   CPP=
2678 fi
2679 if test -z "$CPP"; then
2680   if test "${ac_cv_prog_CPP+set}" = set; then
2681   echo $ECHO_N "(cached) $ECHO_C" >&6
2682 else
2683       # Double quotes because CPP needs to be expanded
2684     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2685     do
2686       ac_preproc_ok=false
2687 for ac_c_preproc_warn_flag in '' yes
2688 do
2689   # Use a header file that comes with gcc, so configuring glibc
2690   # with a fresh cross-compiler works.
2691   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2692   # <limits.h> exists even on freestanding compilers.
2693   # On the NeXT, cc -E runs the code through the compiler's parser,
2694   # not just through cpp. "Syntax error" is here to catch this case.
2695   cat >conftest.$ac_ext <<_ACEOF
2696 #line $LINENO "configure"
2697 /* confdefs.h.  */
2698 _ACEOF
2699 cat confdefs.h >>conftest.$ac_ext
2700 cat >>conftest.$ac_ext <<_ACEOF
2701 /* end confdefs.h.  */
2702 #ifdef __STDC__
2703 # include <limits.h>
2704 #else
2705 # include <assert.h>
2706 #endif
2707                      Syntax error
2708 _ACEOF
2709 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2710   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2711   ac_status=$?
2712   grep -v '^ *+' conftest.er1 >conftest.err
2713   rm -f conftest.er1
2714   cat conftest.err >&5
2715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2716   (exit $ac_status); } >/dev/null; then
2717   if test -s conftest.err; then
2718     ac_cpp_err=$ac_c_preproc_warn_flag
2719   else
2720     ac_cpp_err=
2721   fi
2722 else
2723   ac_cpp_err=yes
2724 fi
2725 if test -z "$ac_cpp_err"; then
2726   :
2727 else
2728   echo "$as_me: failed program was:" >&5
2729 sed 's/^/| /' conftest.$ac_ext >&5
2730
2731   # Broken: fails on valid input.
2732 continue
2733 fi
2734 rm -f conftest.err conftest.$ac_ext
2735
2736   # OK, works on sane cases.  Now check whether non-existent headers
2737   # can be detected and how.
2738   cat >conftest.$ac_ext <<_ACEOF
2739 #line $LINENO "configure"
2740 /* confdefs.h.  */
2741 _ACEOF
2742 cat confdefs.h >>conftest.$ac_ext
2743 cat >>conftest.$ac_ext <<_ACEOF
2744 /* end confdefs.h.  */
2745 #include <ac_nonexistent.h>
2746 _ACEOF
2747 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2748   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2749   ac_status=$?
2750   grep -v '^ *+' conftest.er1 >conftest.err
2751   rm -f conftest.er1
2752   cat conftest.err >&5
2753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2754   (exit $ac_status); } >/dev/null; then
2755   if test -s conftest.err; then
2756     ac_cpp_err=$ac_c_preproc_warn_flag
2757   else
2758     ac_cpp_err=
2759   fi
2760 else
2761   ac_cpp_err=yes
2762 fi
2763 if test -z "$ac_cpp_err"; then
2764   # Broken: success on invalid input.
2765 continue
2766 else
2767   echo "$as_me: failed program was:" >&5
2768 sed 's/^/| /' conftest.$ac_ext >&5
2769
2770   # Passes both tests.
2771 ac_preproc_ok=:
2772 break
2773 fi
2774 rm -f conftest.err conftest.$ac_ext
2775
2776 done
2777 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2778 rm -f conftest.err conftest.$ac_ext
2779 if $ac_preproc_ok; then
2780   break
2781 fi
2782
2783     done
2784     ac_cv_prog_CPP=$CPP
2785
2786 fi
2787   CPP=$ac_cv_prog_CPP
2788 else
2789   ac_cv_prog_CPP=$CPP
2790 fi
2791 echo "$as_me:$LINENO: result: $CPP" >&5
2792 echo "${ECHO_T}$CPP" >&6
2793 ac_preproc_ok=false
2794 for ac_c_preproc_warn_flag in '' yes
2795 do
2796   # Use a header file that comes with gcc, so configuring glibc
2797   # with a fresh cross-compiler works.
2798   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2799   # <limits.h> exists even on freestanding compilers.
2800   # On the NeXT, cc -E runs the code through the compiler's parser,
2801   # not just through cpp. "Syntax error" is here to catch this case.
2802   cat >conftest.$ac_ext <<_ACEOF
2803 #line $LINENO "configure"
2804 /* confdefs.h.  */
2805 _ACEOF
2806 cat confdefs.h >>conftest.$ac_ext
2807 cat >>conftest.$ac_ext <<_ACEOF
2808 /* end confdefs.h.  */
2809 #ifdef __STDC__
2810 # include <limits.h>
2811 #else
2812 # include <assert.h>
2813 #endif
2814                      Syntax error
2815 _ACEOF
2816 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2817   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2818   ac_status=$?
2819   grep -v '^ *+' conftest.er1 >conftest.err
2820   rm -f conftest.er1
2821   cat conftest.err >&5
2822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2823   (exit $ac_status); } >/dev/null; then
2824   if test -s conftest.err; then
2825     ac_cpp_err=$ac_c_preproc_warn_flag
2826   else
2827     ac_cpp_err=
2828   fi
2829 else
2830   ac_cpp_err=yes
2831 fi
2832 if test -z "$ac_cpp_err"; then
2833   :
2834 else
2835   echo "$as_me: failed program was:" >&5
2836 sed 's/^/| /' conftest.$ac_ext >&5
2837
2838   # Broken: fails on valid input.
2839 continue
2840 fi
2841 rm -f conftest.err conftest.$ac_ext
2842
2843   # OK, works on sane cases.  Now check whether non-existent headers
2844   # can be detected and how.
2845   cat >conftest.$ac_ext <<_ACEOF
2846 #line $LINENO "configure"
2847 /* confdefs.h.  */
2848 _ACEOF
2849 cat confdefs.h >>conftest.$ac_ext
2850 cat >>conftest.$ac_ext <<_ACEOF
2851 /* end confdefs.h.  */
2852 #include <ac_nonexistent.h>
2853 _ACEOF
2854 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2855   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2856   ac_status=$?
2857   grep -v '^ *+' conftest.er1 >conftest.err
2858   rm -f conftest.er1
2859   cat conftest.err >&5
2860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2861   (exit $ac_status); } >/dev/null; then
2862   if test -s conftest.err; then
2863     ac_cpp_err=$ac_c_preproc_warn_flag
2864   else
2865     ac_cpp_err=
2866   fi
2867 else
2868   ac_cpp_err=yes
2869 fi
2870 if test -z "$ac_cpp_err"; then
2871   # Broken: success on invalid input.
2872 continue
2873 else
2874   echo "$as_me: failed program was:" >&5
2875 sed 's/^/| /' conftest.$ac_ext >&5
2876
2877   # Passes both tests.
2878 ac_preproc_ok=:
2879 break
2880 fi
2881 rm -f conftest.err conftest.$ac_ext
2882
2883 done
2884 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2885 rm -f conftest.err conftest.$ac_ext
2886 if $ac_preproc_ok; then
2887   :
2888 else
2889   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2890 See \`config.log' for more details." >&5
2891 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2892 See \`config.log' for more details." >&2;}
2893    { (exit 1); exit 1; }; }
2894 fi
2895
2896 ac_ext=c
2897 ac_cpp='$CPP $CPPFLAGS'
2898 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2899 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2900 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2901
2902 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
2903 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2904 if test "${ac_cv_c_const+set}" = set; then
2905   echo $ECHO_N "(cached) $ECHO_C" >&6
2906 else
2907   cat >conftest.$ac_ext <<_ACEOF
2908 #line $LINENO "configure"
2909 /* confdefs.h.  */
2910 _ACEOF
2911 cat confdefs.h >>conftest.$ac_ext
2912 cat >>conftest.$ac_ext <<_ACEOF
2913 /* end confdefs.h.  */
2914
2915 int
2916 main ()
2917 {
2918 /* FIXME: Include the comments suggested by Paul. */
2919 #ifndef __cplusplus
2920   /* Ultrix mips cc rejects this.  */
2921   typedef int charset[2];
2922   const charset x;
2923   /* SunOS 4.1.1 cc rejects this.  */
2924   char const *const *ccp;
2925   char **p;
2926   /* NEC SVR4.0.2 mips cc rejects this.  */
2927   struct point {int x, y;};
2928   static struct point const zero = {0,0};
2929   /* AIX XL C 1.02.0.0 rejects this.
2930      It does not let you subtract one const X* pointer from another in
2931      an arm of an if-expression whose if-part is not a constant
2932      expression */
2933   const char *g = "string";
2934   ccp = &g + (g ? g-g : 0);
2935   /* HPUX 7.0 cc rejects these. */
2936   ++ccp;
2937   p = (char**) ccp;
2938   ccp = (char const *const *) p;
2939   { /* SCO 3.2v4 cc rejects this.  */
2940     char *t;
2941     char const *s = 0 ? (char *) 0 : (char const *) 0;
2942
2943     *t++ = 0;
2944   }
2945   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2946     int x[] = {25, 17};
2947     const int *foo = &x[0];
2948     ++foo;
2949   }
2950   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2951     typedef const int *iptr;
2952     iptr p = 0;
2953     ++p;
2954   }
2955   { /* AIX XL C 1.02.0.0 rejects this saying
2956        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2957     struct s { int j; const int *ap[3]; };
2958     struct s *b; b->j = 5;
2959   }
2960   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2961     const int foo = 10;
2962   }
2963 #endif
2964
2965   ;
2966   return 0;
2967 }
2968 _ACEOF
2969 rm -f conftest.$ac_objext
2970 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2971   (eval $ac_compile) 2>&5
2972   ac_status=$?
2973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2974   (exit $ac_status); } &&
2975          { ac_try='test -s conftest.$ac_objext'
2976   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2977   (eval $ac_try) 2>&5
2978   ac_status=$?
2979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2980   (exit $ac_status); }; }; then
2981   ac_cv_c_const=yes
2982 else
2983   echo "$as_me: failed program was:" >&5
2984 sed 's/^/| /' conftest.$ac_ext >&5
2985
2986 ac_cv_c_const=no
2987 fi
2988 rm -f conftest.$ac_objext conftest.$ac_ext
2989 fi
2990 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
2991 echo "${ECHO_T}$ac_cv_c_const" >&6
2992 if test $ac_cv_c_const = no; then
2993
2994 cat >>confdefs.h <<\_ACEOF
2995 #define const
2996 _ACEOF
2997
2998 fi
2999
3000 echo "$as_me:$LINENO: checking for inline" >&5
3001 echo $ECHO_N "checking for inline... $ECHO_C" >&6
3002 if test "${ac_cv_c_inline+set}" = set; then
3003   echo $ECHO_N "(cached) $ECHO_C" >&6
3004 else
3005   ac_cv_c_inline=no
3006 for ac_kw in inline __inline__ __inline; do
3007   cat >conftest.$ac_ext <<_ACEOF
3008 #line $LINENO "configure"
3009 /* confdefs.h.  */
3010 _ACEOF
3011 cat confdefs.h >>conftest.$ac_ext
3012 cat >>conftest.$ac_ext <<_ACEOF
3013 /* end confdefs.h.  */
3014 #ifndef __cplusplus
3015 typedef int foo_t;
3016 static $ac_kw foo_t static_foo () {return 0; }
3017 $ac_kw foo_t foo () {return 0; }
3018 #endif
3019
3020 _ACEOF
3021 rm -f conftest.$ac_objext
3022 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3023   (eval $ac_compile) 2>&5
3024   ac_status=$?
3025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3026   (exit $ac_status); } &&
3027          { ac_try='test -s conftest.$ac_objext'
3028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3029   (eval $ac_try) 2>&5
3030   ac_status=$?
3031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3032   (exit $ac_status); }; }; then
3033   ac_cv_c_inline=$ac_kw; break
3034 else
3035   echo "$as_me: failed program was:" >&5
3036 sed 's/^/| /' conftest.$ac_ext >&5
3037
3038 fi
3039 rm -f conftest.$ac_objext conftest.$ac_ext
3040 done
3041
3042 fi
3043 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3044 echo "${ECHO_T}$ac_cv_c_inline" >&6
3045 case $ac_cv_c_inline in
3046   inline | yes) ;;
3047   no)
3048 cat >>confdefs.h <<\_ACEOF
3049 #define inline
3050 _ACEOF
3051  ;;
3052   *)  cat >>confdefs.h <<_ACEOF
3053 #define inline $ac_cv_c_inline
3054 _ACEOF
3055  ;;
3056 esac
3057
3058
3059 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3060   echo "$as_me:$LINENO: checking for bc" >&5
3061 echo $ECHO_N "checking for bc... $ECHO_C" >&6
3062   if test "$ac_bc_result" = "15" ; then
3063     echo "$as_me:$LINENO: result: yes" >&5
3064 echo "${ECHO_T}yes" >&6
3065   else
3066     echo "$as_me:$LINENO: result: no" >&5
3067 echo "${ECHO_T}no" >&6
3068     echo ''
3069     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3070                   part of Unix since the 1970s.  Come back when your vendor
3071                   has grown a clue." >&5
3072 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3073                   part of Unix since the 1970s.  Come back when your vendor
3074                   has grown a clue." >&2;}
3075    { (exit 1); exit 1; }; }
3076   fi
3077
3078
3079 # stuff for Makefiles
3080 # Find a good install program.  We prefer a C program (faster),
3081 # so one script is as good as another.  But avoid the broken or
3082 # incompatible versions:
3083 # SysV /etc/install, /usr/sbin/install
3084 # SunOS /usr/etc/install
3085 # IRIX /sbin/install
3086 # AIX /bin/install
3087 # AmigaOS /C/install, which installs bootblocks on floppy discs
3088 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3089 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3090 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3091 # ./install, which can be erroneously created by make from ./install.sh.
3092 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3093 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3094 if test -z "$INSTALL"; then
3095 if test "${ac_cv_path_install+set}" = set; then
3096   echo $ECHO_N "(cached) $ECHO_C" >&6
3097 else
3098   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3099 for as_dir in $PATH
3100 do
3101   IFS=$as_save_IFS
3102   test -z "$as_dir" && as_dir=.
3103   # Account for people who put trailing slashes in PATH elements.
3104 case $as_dir/ in
3105   ./ | .// | /cC/* | \
3106   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3107   /usr/ucb/* ) ;;
3108   *)
3109     # OSF1 and SCO ODT 3.0 have their own names for install.
3110     # Don't use installbsd from OSF since it installs stuff as root
3111     # by default.
3112     for ac_prog in ginstall scoinst install; do
3113       for ac_exec_ext in '' $ac_executable_extensions; do
3114         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3115           if test $ac_prog = install &&
3116             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3117             # AIX install.  It has an incompatible calling convention.
3118             :
3119           elif test $ac_prog = install &&
3120             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3121             # program-specific install script used by HP pwplus--don't use.
3122             :
3123           else
3124             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3125             break 3
3126           fi
3127         fi
3128       done
3129     done
3130     ;;
3131 esac
3132 done
3133
3134
3135 fi
3136   if test "${ac_cv_path_install+set}" = set; then
3137     INSTALL=$ac_cv_path_install
3138   else
3139     # As a last resort, use the slow shell script.  We don't cache a
3140     # path for INSTALL within a source directory, because that will
3141     # break other packages using the cache if that directory is
3142     # removed, or if the path is relative.
3143     INSTALL=$ac_install_sh
3144   fi
3145 fi
3146 echo "$as_me:$LINENO: result: $INSTALL" >&5
3147 echo "${ECHO_T}$INSTALL" >&6
3148
3149 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3150 # It thinks the first close brace ends the variable substitution.
3151 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3152
3153 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3154
3155 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3156
3157 echo "$as_me:$LINENO: checking whether \\"\${INSTALL} -d\\" creates intermediate directories" >&5
3158 echo $ECHO_N "checking whether \\"\${INSTALL} -d\\" creates intermediate directories... $ECHO_C" >&6
3159 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
3160   echo $ECHO_N "(cached) $ECHO_C" >&6
3161 else
3162   ac_cv_install_d_creates_dirs=no
3163      rm -rf conftestdir
3164      if mkdir conftestdir; then
3165        cd conftestdir 2>/dev/null
3166        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
3167        if test -d dir1/dir2/. ; then
3168          ac_cv_install_d_creates_dirs=yes
3169        fi
3170        cd .. 2>/dev/null
3171        rm -rf conftestdir
3172      fi
3173
3174 fi
3175 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
3176 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
3177
3178   if test "$ac_cv_install_d_creates_dirs" = no ; then
3179     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
3180 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
3181 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
3182   echo $ECHO_N "(cached) $ECHO_C" >&6
3183 else
3184   ac_cv_mkdir_p_creates_dirs=no
3185        rm -rf conftestdir
3186        if mkdir conftestdir; then
3187          cd conftestdir 2>/dev/null
3188          mkdir -p dir1/dir2 >/dev/null 2>&1
3189          if test -d dir1/dir2/. ; then
3190            ac_cv_mkdir_p_creates_dirs=yes
3191          fi
3192          cd .. 2>/dev/null
3193          rm -rf conftestdir
3194        fi
3195
3196 fi
3197 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3198 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3199   fi
3200
3201   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3202     INSTALL_DIRS='${INSTALL} -d'
3203   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3204     INSTALL_DIRS='mkdir -p'
3205   else
3206     # any other ideas?
3207     INSTALL_DIRS='${INSTALL} -d'
3208   fi
3209
3210 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3211 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3212 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3213 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3214   echo $ECHO_N "(cached) $ECHO_C" >&6
3215 else
3216   cat >conftest.make <<\_ACEOF
3217 all:
3218         @echo 'ac_maketemp="$(MAKE)"'
3219 _ACEOF
3220 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3221 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3222 if test -n "$ac_maketemp"; then
3223   eval ac_cv_prog_make_${ac_make}_set=yes
3224 else
3225   eval ac_cv_prog_make_${ac_make}_set=no
3226 fi
3227 rm -f conftest.make
3228 fi
3229 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3230   echo "$as_me:$LINENO: result: yes" >&5
3231 echo "${ECHO_T}yes" >&6
3232   SET_MAKE=
3233 else
3234   echo "$as_me:$LINENO: result: no" >&5
3235 echo "${ECHO_T}no" >&6
3236   SET_MAKE="MAKE=${MAKE-make}"
3237 fi
3238
3239
3240 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3241 # That's wrong: it should be set to '${INSTALL}', so that one can
3242 # implement the "install-strip" target properly (strip executables,
3243 # but do not try to strip scripts.)
3244 #
3245 INSTALL_SCRIPT='${INSTALL}'
3246
3247 # random libc stuff
3248
3249 echo "$as_me:$LINENO: checking for egrep" >&5
3250 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3251 if test "${ac_cv_prog_egrep+set}" = set; then
3252   echo $ECHO_N "(cached) $ECHO_C" >&6
3253 else
3254   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3255     then ac_cv_prog_egrep='grep -E'
3256     else ac_cv_prog_egrep='egrep'
3257     fi
3258 fi
3259 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3260 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3261  EGREP=$ac_cv_prog_egrep
3262
3263
3264 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3265 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3266 if test "${ac_cv_header_stdc+set}" = set; then
3267   echo $ECHO_N "(cached) $ECHO_C" >&6
3268 else
3269   cat >conftest.$ac_ext <<_ACEOF
3270 #line $LINENO "configure"
3271 /* confdefs.h.  */
3272 _ACEOF
3273 cat confdefs.h >>conftest.$ac_ext
3274 cat >>conftest.$ac_ext <<_ACEOF
3275 /* end confdefs.h.  */
3276 #include <stdlib.h>
3277 #include <stdarg.h>
3278 #include <string.h>
3279 #include <float.h>
3280
3281 int
3282 main ()
3283 {
3284
3285   ;
3286   return 0;
3287 }
3288 _ACEOF
3289 rm -f conftest.$ac_objext
3290 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3291   (eval $ac_compile) 2>&5
3292   ac_status=$?
3293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3294   (exit $ac_status); } &&
3295          { ac_try='test -s conftest.$ac_objext'
3296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3297   (eval $ac_try) 2>&5
3298   ac_status=$?
3299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3300   (exit $ac_status); }; }; then
3301   ac_cv_header_stdc=yes
3302 else
3303   echo "$as_me: failed program was:" >&5
3304 sed 's/^/| /' conftest.$ac_ext >&5
3305
3306 ac_cv_header_stdc=no
3307 fi
3308 rm -f conftest.$ac_objext conftest.$ac_ext
3309
3310 if test $ac_cv_header_stdc = yes; then
3311   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3312   cat >conftest.$ac_ext <<_ACEOF
3313 #line $LINENO "configure"
3314 /* confdefs.h.  */
3315 _ACEOF
3316 cat confdefs.h >>conftest.$ac_ext
3317 cat >>conftest.$ac_ext <<_ACEOF
3318 /* end confdefs.h.  */
3319 #include <string.h>
3320
3321 _ACEOF
3322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3323   $EGREP "memchr" >/dev/null 2>&1; then
3324   :
3325 else
3326   ac_cv_header_stdc=no
3327 fi
3328 rm -f conftest*
3329
3330 fi
3331
3332 if test $ac_cv_header_stdc = yes; then
3333   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3334   cat >conftest.$ac_ext <<_ACEOF
3335 #line $LINENO "configure"
3336 /* confdefs.h.  */
3337 _ACEOF
3338 cat confdefs.h >>conftest.$ac_ext
3339 cat >>conftest.$ac_ext <<_ACEOF
3340 /* end confdefs.h.  */
3341 #include <stdlib.h>
3342
3343 _ACEOF
3344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3345   $EGREP "free" >/dev/null 2>&1; then
3346   :
3347 else
3348   ac_cv_header_stdc=no
3349 fi
3350 rm -f conftest*
3351
3352 fi
3353
3354 if test $ac_cv_header_stdc = yes; then
3355   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3356   if test "$cross_compiling" = yes; then
3357   :
3358 else
3359   cat >conftest.$ac_ext <<_ACEOF
3360 #line $LINENO "configure"
3361 /* confdefs.h.  */
3362 _ACEOF
3363 cat confdefs.h >>conftest.$ac_ext
3364 cat >>conftest.$ac_ext <<_ACEOF
3365 /* end confdefs.h.  */
3366 #include <ctype.h>
3367 #if ((' ' & 0x0FF) == 0x020)
3368 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3369 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3370 #else
3371 # define ISLOWER(c) \
3372                    (('a' <= (c) && (c) <= 'i') \
3373                      || ('j' <= (c) && (c) <= 'r') \
3374                      || ('s' <= (c) && (c) <= 'z'))
3375 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3376 #endif
3377
3378 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3379 int
3380 main ()
3381 {
3382   int i;
3383   for (i = 0; i < 256; i++)
3384     if (XOR (islower (i), ISLOWER (i))
3385         || toupper (i) != TOUPPER (i))
3386       exit(2);
3387   exit (0);
3388 }
3389 _ACEOF
3390 rm -f conftest$ac_exeext
3391 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3392   (eval $ac_link) 2>&5
3393   ac_status=$?
3394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3395   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3396   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3397   (eval $ac_try) 2>&5
3398   ac_status=$?
3399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3400   (exit $ac_status); }; }; then
3401   :
3402 else
3403   echo "$as_me: program exited with status $ac_status" >&5
3404 echo "$as_me: failed program was:" >&5
3405 sed 's/^/| /' conftest.$ac_ext >&5
3406
3407 ( exit $ac_status )
3408 ac_cv_header_stdc=no
3409 fi
3410 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3411 fi
3412 fi
3413 fi
3414 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3415 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3416 if test $ac_cv_header_stdc = yes; then
3417
3418 cat >>confdefs.h <<\_ACEOF
3419 #define STDC_HEADERS 1
3420 _ACEOF
3421
3422 fi
3423
3424 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3435                   inttypes.h stdint.h unistd.h
3436 do
3437 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3438 echo "$as_me:$LINENO: checking for $ac_header" >&5
3439 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3440 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3441   echo $ECHO_N "(cached) $ECHO_C" >&6
3442 else
3443   cat >conftest.$ac_ext <<_ACEOF
3444 #line $LINENO "configure"
3445 /* confdefs.h.  */
3446 _ACEOF
3447 cat confdefs.h >>conftest.$ac_ext
3448 cat >>conftest.$ac_ext <<_ACEOF
3449 /* end confdefs.h.  */
3450 $ac_includes_default
3451
3452 #include <$ac_header>
3453 _ACEOF
3454 rm -f conftest.$ac_objext
3455 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3456   (eval $ac_compile) 2>&5
3457   ac_status=$?
3458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3459   (exit $ac_status); } &&
3460          { ac_try='test -s conftest.$ac_objext'
3461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3462   (eval $ac_try) 2>&5
3463   ac_status=$?
3464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3465   (exit $ac_status); }; }; then
3466   eval "$as_ac_Header=yes"
3467 else
3468   echo "$as_me: failed program was:" >&5
3469 sed 's/^/| /' conftest.$ac_ext >&5
3470
3471 eval "$as_ac_Header=no"
3472 fi
3473 rm -f conftest.$ac_objext conftest.$ac_ext
3474 fi
3475 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3476 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3477 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3478   cat >>confdefs.h <<_ACEOF
3479 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3480 _ACEOF
3481
3482 fi
3483
3484 done
3485
3486
3487
3488 for ac_header in unistd.h
3489 do
3490 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3491 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3492   echo "$as_me:$LINENO: checking for $ac_header" >&5
3493 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3494 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3495   echo $ECHO_N "(cached) $ECHO_C" >&6
3496 fi
3497 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3498 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3499 else
3500   # Is the header compilable?
3501 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3502 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3503 cat >conftest.$ac_ext <<_ACEOF
3504 #line $LINENO "configure"
3505 /* confdefs.h.  */
3506 _ACEOF
3507 cat confdefs.h >>conftest.$ac_ext
3508 cat >>conftest.$ac_ext <<_ACEOF
3509 /* end confdefs.h.  */
3510 $ac_includes_default
3511 #include <$ac_header>
3512 _ACEOF
3513 rm -f conftest.$ac_objext
3514 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3515   (eval $ac_compile) 2>&5
3516   ac_status=$?
3517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3518   (exit $ac_status); } &&
3519          { ac_try='test -s conftest.$ac_objext'
3520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3521   (eval $ac_try) 2>&5
3522   ac_status=$?
3523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3524   (exit $ac_status); }; }; then
3525   ac_header_compiler=yes
3526 else
3527   echo "$as_me: failed program was:" >&5
3528 sed 's/^/| /' conftest.$ac_ext >&5
3529
3530 ac_header_compiler=no
3531 fi
3532 rm -f conftest.$ac_objext conftest.$ac_ext
3533 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3534 echo "${ECHO_T}$ac_header_compiler" >&6
3535
3536 # Is the header present?
3537 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3538 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3539 cat >conftest.$ac_ext <<_ACEOF
3540 #line $LINENO "configure"
3541 /* confdefs.h.  */
3542 _ACEOF
3543 cat confdefs.h >>conftest.$ac_ext
3544 cat >>conftest.$ac_ext <<_ACEOF
3545 /* end confdefs.h.  */
3546 #include <$ac_header>
3547 _ACEOF
3548 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3549   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3550   ac_status=$?
3551   grep -v '^ *+' conftest.er1 >conftest.err
3552   rm -f conftest.er1
3553   cat conftest.err >&5
3554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3555   (exit $ac_status); } >/dev/null; then
3556   if test -s conftest.err; then
3557     ac_cpp_err=$ac_c_preproc_warn_flag
3558   else
3559     ac_cpp_err=
3560   fi
3561 else
3562   ac_cpp_err=yes
3563 fi
3564 if test -z "$ac_cpp_err"; then
3565   ac_header_preproc=yes
3566 else
3567   echo "$as_me: failed program was:" >&5
3568 sed 's/^/| /' conftest.$ac_ext >&5
3569
3570   ac_header_preproc=no
3571 fi
3572 rm -f conftest.err conftest.$ac_ext
3573 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3574 echo "${ECHO_T}$ac_header_preproc" >&6
3575
3576 # So?  What about this header?
3577 case $ac_header_compiler:$ac_header_preproc in
3578   yes:no )
3579     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3580 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3581     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3582 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3583     (
3584       cat <<\_ASBOX
3585 ## ------------------------------------ ##
3586 ## Report this to bug-autoconf@gnu.org. ##
3587 ## ------------------------------------ ##
3588 _ASBOX
3589     ) |
3590       sed "s/^/$as_me: WARNING:     /" >&2
3591     ;;
3592   no:yes )
3593     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3594 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3595     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3596 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3597     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3598 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3599     (
3600       cat <<\_ASBOX
3601 ## ------------------------------------ ##
3602 ## Report this to bug-autoconf@gnu.org. ##
3603 ## ------------------------------------ ##
3604 _ASBOX
3605     ) |
3606       sed "s/^/$as_me: WARNING:     /" >&2
3607     ;;
3608 esac
3609 echo "$as_me:$LINENO: checking for $ac_header" >&5
3610 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3611 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3612   echo $ECHO_N "(cached) $ECHO_C" >&6
3613 else
3614   eval "$as_ac_Header=$ac_header_preproc"
3615 fi
3616 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3617 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3618
3619 fi
3620 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3621   cat >>confdefs.h <<_ACEOF
3622 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3623 _ACEOF
3624
3625 fi
3626
3627 done
3628
3629 echo "$as_me:$LINENO: checking for mode_t" >&5
3630 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3631 if test "${ac_cv_type_mode_t+set}" = set; then
3632   echo $ECHO_N "(cached) $ECHO_C" >&6
3633 else
3634   cat >conftest.$ac_ext <<_ACEOF
3635 #line $LINENO "configure"
3636 /* confdefs.h.  */
3637 _ACEOF
3638 cat confdefs.h >>conftest.$ac_ext
3639 cat >>conftest.$ac_ext <<_ACEOF
3640 /* end confdefs.h.  */
3641 $ac_includes_default
3642 int
3643 main ()
3644 {
3645 if ((mode_t *) 0)
3646   return 0;
3647 if (sizeof (mode_t))
3648   return 0;
3649   ;
3650   return 0;
3651 }
3652 _ACEOF
3653 rm -f conftest.$ac_objext
3654 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3655   (eval $ac_compile) 2>&5
3656   ac_status=$?
3657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3658   (exit $ac_status); } &&
3659          { ac_try='test -s conftest.$ac_objext'
3660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3661   (eval $ac_try) 2>&5
3662   ac_status=$?
3663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3664   (exit $ac_status); }; }; then
3665   ac_cv_type_mode_t=yes
3666 else
3667   echo "$as_me: failed program was:" >&5
3668 sed 's/^/| /' conftest.$ac_ext >&5
3669
3670 ac_cv_type_mode_t=no
3671 fi
3672 rm -f conftest.$ac_objext conftest.$ac_ext
3673 fi
3674 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
3675 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3676 if test $ac_cv_type_mode_t = yes; then
3677   :
3678 else
3679
3680 cat >>confdefs.h <<_ACEOF
3681 #define mode_t int
3682 _ACEOF
3683
3684 fi
3685
3686 echo "$as_me:$LINENO: checking for pid_t" >&5
3687 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
3688 if test "${ac_cv_type_pid_t+set}" = set; then
3689   echo $ECHO_N "(cached) $ECHO_C" >&6
3690 else
3691   cat >conftest.$ac_ext <<_ACEOF
3692 #line $LINENO "configure"
3693 /* confdefs.h.  */
3694 _ACEOF
3695 cat confdefs.h >>conftest.$ac_ext
3696 cat >>conftest.$ac_ext <<_ACEOF
3697 /* end confdefs.h.  */
3698 $ac_includes_default
3699 int
3700 main ()
3701 {
3702 if ((pid_t *) 0)
3703   return 0;
3704 if (sizeof (pid_t))
3705   return 0;
3706   ;
3707   return 0;
3708 }
3709 _ACEOF
3710 rm -f conftest.$ac_objext
3711 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3712   (eval $ac_compile) 2>&5
3713   ac_status=$?
3714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3715   (exit $ac_status); } &&
3716          { ac_try='test -s conftest.$ac_objext'
3717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3718   (eval $ac_try) 2>&5
3719   ac_status=$?
3720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3721   (exit $ac_status); }; }; then
3722   ac_cv_type_pid_t=yes
3723 else
3724   echo "$as_me: failed program was:" >&5
3725 sed 's/^/| /' conftest.$ac_ext >&5
3726
3727 ac_cv_type_pid_t=no
3728 fi
3729 rm -f conftest.$ac_objext conftest.$ac_ext
3730 fi
3731 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
3732 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3733 if test $ac_cv_type_pid_t = yes; then
3734   :
3735 else
3736
3737 cat >>confdefs.h <<_ACEOF
3738 #define pid_t int
3739 _ACEOF
3740
3741 fi
3742
3743 echo "$as_me:$LINENO: checking for size_t" >&5
3744 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
3745 if test "${ac_cv_type_size_t+set}" = set; then
3746   echo $ECHO_N "(cached) $ECHO_C" >&6
3747 else
3748   cat >conftest.$ac_ext <<_ACEOF
3749 #line $LINENO "configure"
3750 /* confdefs.h.  */
3751 _ACEOF
3752 cat confdefs.h >>conftest.$ac_ext
3753 cat >>conftest.$ac_ext <<_ACEOF
3754 /* end confdefs.h.  */
3755 $ac_includes_default
3756 int
3757 main ()
3758 {
3759 if ((size_t *) 0)
3760   return 0;
3761 if (sizeof (size_t))
3762   return 0;
3763   ;
3764   return 0;
3765 }
3766 _ACEOF
3767 rm -f conftest.$ac_objext
3768 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3769   (eval $ac_compile) 2>&5
3770   ac_status=$?
3771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3772   (exit $ac_status); } &&
3773          { ac_try='test -s conftest.$ac_objext'
3774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3775   (eval $ac_try) 2>&5
3776   ac_status=$?
3777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3778   (exit $ac_status); }; }; then
3779   ac_cv_type_size_t=yes
3780 else
3781   echo "$as_me: failed program was:" >&5
3782 sed 's/^/| /' conftest.$ac_ext >&5
3783
3784 ac_cv_type_size_t=no
3785 fi
3786 rm -f conftest.$ac_objext conftest.$ac_ext
3787 fi
3788 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
3789 echo "${ECHO_T}$ac_cv_type_size_t" >&6
3790 if test $ac_cv_type_size_t = yes; then
3791   :
3792 else
3793
3794 cat >>confdefs.h <<_ACEOF
3795 #define size_t unsigned
3796 _ACEOF
3797
3798 fi
3799
3800 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
3801 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
3802 if test "${ac_cv_type_signal+set}" = set; then
3803   echo $ECHO_N "(cached) $ECHO_C" >&6
3804 else
3805   cat >conftest.$ac_ext <<_ACEOF
3806 #line $LINENO "configure"
3807 /* confdefs.h.  */
3808 _ACEOF
3809 cat confdefs.h >>conftest.$ac_ext
3810 cat >>conftest.$ac_ext <<_ACEOF
3811 /* end confdefs.h.  */
3812 #include <sys/types.h>
3813 #include <signal.h>
3814 #ifdef signal
3815 # undef signal
3816 #endif
3817 #ifdef __cplusplus
3818 extern "C" void (*signal (int, void (*)(int)))(int);
3819 #else
3820 void (*signal ()) ();
3821 #endif
3822
3823 int
3824 main ()
3825 {
3826 int i;
3827   ;
3828   return 0;
3829 }
3830 _ACEOF
3831 rm -f conftest.$ac_objext
3832 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3833   (eval $ac_compile) 2>&5
3834   ac_status=$?
3835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3836   (exit $ac_status); } &&
3837          { ac_try='test -s conftest.$ac_objext'
3838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3839   (eval $ac_try) 2>&5
3840   ac_status=$?
3841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3842   (exit $ac_status); }; }; then
3843   ac_cv_type_signal=void
3844 else
3845   echo "$as_me: failed program was:" >&5
3846 sed 's/^/| /' conftest.$ac_ext >&5
3847
3848 ac_cv_type_signal=int
3849 fi
3850 rm -f conftest.$ac_objext conftest.$ac_ext
3851 fi
3852 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
3853 echo "${ECHO_T}$ac_cv_type_signal" >&6
3854
3855 cat >>confdefs.h <<_ACEOF
3856 #define RETSIGTYPE $ac_cv_type_signal
3857 _ACEOF
3858
3859
3860 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
3861 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3862 if test "${ac_cv_header_time+set}" = set; then
3863   echo $ECHO_N "(cached) $ECHO_C" >&6
3864 else
3865   cat >conftest.$ac_ext <<_ACEOF
3866 #line $LINENO "configure"
3867 /* confdefs.h.  */
3868 _ACEOF
3869 cat confdefs.h >>conftest.$ac_ext
3870 cat >>conftest.$ac_ext <<_ACEOF
3871 /* end confdefs.h.  */
3872 #include <sys/types.h>
3873 #include <sys/time.h>
3874 #include <time.h>
3875
3876 int
3877 main ()
3878 {
3879 if ((struct tm *) 0)
3880 return 0;
3881   ;
3882   return 0;
3883 }
3884 _ACEOF
3885 rm -f conftest.$ac_objext
3886 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3887   (eval $ac_compile) 2>&5
3888   ac_status=$?
3889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3890   (exit $ac_status); } &&
3891          { ac_try='test -s conftest.$ac_objext'
3892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3893   (eval $ac_try) 2>&5
3894   ac_status=$?
3895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3896   (exit $ac_status); }; }; then
3897   ac_cv_header_time=yes
3898 else
3899   echo "$as_me: failed program was:" >&5
3900 sed 's/^/| /' conftest.$ac_ext >&5
3901
3902 ac_cv_header_time=no
3903 fi
3904 rm -f conftest.$ac_objext conftest.$ac_ext
3905 fi
3906 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
3907 echo "${ECHO_T}$ac_cv_header_time" >&6
3908 if test $ac_cv_header_time = yes; then
3909
3910 cat >>confdefs.h <<\_ACEOF
3911 #define TIME_WITH_SYS_TIME 1
3912 _ACEOF
3913
3914 fi
3915
3916 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
3917 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
3918 if test "${ac_cv_header_sys_wait_h+set}" = set; then
3919   echo $ECHO_N "(cached) $ECHO_C" >&6
3920 else
3921   cat >conftest.$ac_ext <<_ACEOF
3922 #line $LINENO "configure"
3923 /* confdefs.h.  */
3924 _ACEOF
3925 cat confdefs.h >>conftest.$ac_ext
3926 cat >>conftest.$ac_ext <<_ACEOF
3927 /* end confdefs.h.  */
3928 #include <sys/types.h>
3929 #include <sys/wait.h>
3930 #ifndef WEXITSTATUS
3931 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3932 #endif
3933 #ifndef WIFEXITED
3934 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3935 #endif
3936
3937 int
3938 main ()
3939 {
3940   int s;
3941   wait (&s);
3942   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3943   ;
3944   return 0;
3945 }
3946 _ACEOF
3947 rm -f conftest.$ac_objext
3948 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3949   (eval $ac_compile) 2>&5
3950   ac_status=$?
3951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3952   (exit $ac_status); } &&
3953          { ac_try='test -s conftest.$ac_objext'
3954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3955   (eval $ac_try) 2>&5
3956   ac_status=$?
3957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3958   (exit $ac_status); }; }; then
3959   ac_cv_header_sys_wait_h=yes
3960 else
3961   echo "$as_me: failed program was:" >&5
3962 sed 's/^/| /' conftest.$ac_ext >&5
3963
3964 ac_cv_header_sys_wait_h=no
3965 fi
3966 rm -f conftest.$ac_objext conftest.$ac_ext
3967 fi
3968 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
3969 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
3970 if test $ac_cv_header_sys_wait_h = yes; then
3971
3972 cat >>confdefs.h <<\_ACEOF
3973 #define HAVE_SYS_WAIT_H 1
3974 _ACEOF
3975
3976 fi
3977
3978
3979
3980
3981
3982
3983 ac_header_dirent=no
3984 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3985   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3986 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3987 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3988 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3989   echo $ECHO_N "(cached) $ECHO_C" >&6
3990 else
3991   cat >conftest.$ac_ext <<_ACEOF
3992 #line $LINENO "configure"
3993 /* confdefs.h.  */
3994 _ACEOF
3995 cat confdefs.h >>conftest.$ac_ext
3996 cat >>conftest.$ac_ext <<_ACEOF
3997 /* end confdefs.h.  */
3998 #include <sys/types.h>
3999 #include <$ac_hdr>
4000
4001 int
4002 main ()
4003 {
4004 if ((DIR *) 0)
4005 return 0;
4006   ;
4007   return 0;
4008 }
4009 _ACEOF
4010 rm -f conftest.$ac_objext
4011 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4012   (eval $ac_compile) 2>&5
4013   ac_status=$?
4014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4015   (exit $ac_status); } &&
4016          { ac_try='test -s conftest.$ac_objext'
4017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4018   (eval $ac_try) 2>&5
4019   ac_status=$?
4020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4021   (exit $ac_status); }; }; then
4022   eval "$as_ac_Header=yes"
4023 else
4024   echo "$as_me: failed program was:" >&5
4025 sed 's/^/| /' conftest.$ac_ext >&5
4026
4027 eval "$as_ac_Header=no"
4028 fi
4029 rm -f conftest.$ac_objext conftest.$ac_ext
4030 fi
4031 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4032 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4033 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4034   cat >>confdefs.h <<_ACEOF
4035 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4036 _ACEOF
4037
4038 ac_header_dirent=$ac_hdr; break
4039 fi
4040
4041 done
4042 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4043 if test $ac_header_dirent = dirent.h; then
4044   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4045 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4046 if test "${ac_cv_search_opendir+set}" = set; then
4047   echo $ECHO_N "(cached) $ECHO_C" >&6
4048 else
4049   ac_func_search_save_LIBS=$LIBS
4050 ac_cv_search_opendir=no
4051 cat >conftest.$ac_ext <<_ACEOF
4052 #line $LINENO "configure"
4053 /* confdefs.h.  */
4054 _ACEOF
4055 cat confdefs.h >>conftest.$ac_ext
4056 cat >>conftest.$ac_ext <<_ACEOF
4057 /* end confdefs.h.  */
4058
4059 /* Override any gcc2 internal prototype to avoid an error.  */
4060 #ifdef __cplusplus
4061 extern "C"
4062 #endif
4063 /* We use char because int might match the return type of a gcc2
4064    builtin and then its argument prototype would still apply.  */
4065 char opendir ();
4066 int
4067 main ()
4068 {
4069 opendir ();
4070   ;
4071   return 0;
4072 }
4073 _ACEOF
4074 rm -f conftest.$ac_objext conftest$ac_exeext
4075 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4076   (eval $ac_link) 2>&5
4077   ac_status=$?
4078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4079   (exit $ac_status); } &&
4080          { ac_try='test -s conftest$ac_exeext'
4081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4082   (eval $ac_try) 2>&5
4083   ac_status=$?
4084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085   (exit $ac_status); }; }; then
4086   ac_cv_search_opendir="none required"
4087 else
4088   echo "$as_me: failed program was:" >&5
4089 sed 's/^/| /' conftest.$ac_ext >&5
4090
4091 fi
4092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4093 if test "$ac_cv_search_opendir" = no; then
4094   for ac_lib in dir; do
4095     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4096     cat >conftest.$ac_ext <<_ACEOF
4097 #line $LINENO "configure"
4098 /* confdefs.h.  */
4099 _ACEOF
4100 cat confdefs.h >>conftest.$ac_ext
4101 cat >>conftest.$ac_ext <<_ACEOF
4102 /* end confdefs.h.  */
4103
4104 /* Override any gcc2 internal prototype to avoid an error.  */
4105 #ifdef __cplusplus
4106 extern "C"
4107 #endif
4108 /* We use char because int might match the return type of a gcc2
4109    builtin and then its argument prototype would still apply.  */
4110 char opendir ();
4111 int
4112 main ()
4113 {
4114 opendir ();
4115   ;
4116   return 0;
4117 }
4118 _ACEOF
4119 rm -f conftest.$ac_objext conftest$ac_exeext
4120 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4121   (eval $ac_link) 2>&5
4122   ac_status=$?
4123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4124   (exit $ac_status); } &&
4125          { ac_try='test -s conftest$ac_exeext'
4126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4127   (eval $ac_try) 2>&5
4128   ac_status=$?
4129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4130   (exit $ac_status); }; }; then
4131   ac_cv_search_opendir="-l$ac_lib"
4132 break
4133 else
4134   echo "$as_me: failed program was:" >&5
4135 sed 's/^/| /' conftest.$ac_ext >&5
4136
4137 fi
4138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4139   done
4140 fi
4141 LIBS=$ac_func_search_save_LIBS
4142 fi
4143 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4144 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4145 if test "$ac_cv_search_opendir" != no; then
4146   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4147
4148 fi
4149
4150 else
4151   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4152 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4153 if test "${ac_cv_search_opendir+set}" = set; then
4154   echo $ECHO_N "(cached) $ECHO_C" >&6
4155 else
4156   ac_func_search_save_LIBS=$LIBS
4157 ac_cv_search_opendir=no
4158 cat >conftest.$ac_ext <<_ACEOF
4159 #line $LINENO "configure"
4160 /* confdefs.h.  */
4161 _ACEOF
4162 cat confdefs.h >>conftest.$ac_ext
4163 cat >>conftest.$ac_ext <<_ACEOF
4164 /* end confdefs.h.  */
4165
4166 /* Override any gcc2 internal prototype to avoid an error.  */
4167 #ifdef __cplusplus
4168 extern "C"
4169 #endif
4170 /* We use char because int might match the return type of a gcc2
4171    builtin and then its argument prototype would still apply.  */
4172 char opendir ();
4173 int
4174 main ()
4175 {
4176 opendir ();
4177   ;
4178   return 0;
4179 }
4180 _ACEOF
4181 rm -f conftest.$ac_objext conftest$ac_exeext
4182 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4183   (eval $ac_link) 2>&5
4184   ac_status=$?
4185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4186   (exit $ac_status); } &&
4187          { ac_try='test -s conftest$ac_exeext'
4188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4189   (eval $ac_try) 2>&5
4190   ac_status=$?
4191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4192   (exit $ac_status); }; }; then
4193   ac_cv_search_opendir="none required"
4194 else
4195   echo "$as_me: failed program was:" >&5
4196 sed 's/^/| /' conftest.$ac_ext >&5
4197
4198 fi
4199 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4200 if test "$ac_cv_search_opendir" = no; then
4201   for ac_lib in x; do
4202     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4203     cat >conftest.$ac_ext <<_ACEOF
4204 #line $LINENO "configure"
4205 /* confdefs.h.  */
4206 _ACEOF
4207 cat confdefs.h >>conftest.$ac_ext
4208 cat >>conftest.$ac_ext <<_ACEOF
4209 /* end confdefs.h.  */
4210
4211 /* Override any gcc2 internal prototype to avoid an error.  */
4212 #ifdef __cplusplus
4213 extern "C"
4214 #endif
4215 /* We use char because int might match the return type of a gcc2
4216    builtin and then its argument prototype would still apply.  */
4217 char opendir ();
4218 int
4219 main ()
4220 {
4221 opendir ();
4222   ;
4223   return 0;
4224 }
4225 _ACEOF
4226 rm -f conftest.$ac_objext conftest$ac_exeext
4227 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4228   (eval $ac_link) 2>&5
4229   ac_status=$?
4230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4231   (exit $ac_status); } &&
4232          { ac_try='test -s conftest$ac_exeext'
4233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4234   (eval $ac_try) 2>&5
4235   ac_status=$?
4236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4237   (exit $ac_status); }; }; then
4238   ac_cv_search_opendir="-l$ac_lib"
4239 break
4240 else
4241   echo "$as_me: failed program was:" >&5
4242 sed 's/^/| /' conftest.$ac_ext >&5
4243
4244 fi
4245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4246   done
4247 fi
4248 LIBS=$ac_func_search_save_LIBS
4249 fi
4250 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4251 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4252 if test "$ac_cv_search_opendir" != no; then
4253   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4254
4255 fi
4256
4257 fi
4258
4259 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4260 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4261   if test "${ac_cv_gettimeofday_args+set}" = set; then
4262   echo $ECHO_N "(cached) $ECHO_C" >&6
4263 else
4264   cat >conftest.$ac_ext <<_ACEOF
4265 #line $LINENO "configure"
4266 /* confdefs.h.  */
4267 _ACEOF
4268 cat confdefs.h >>conftest.$ac_ext
4269 cat >>conftest.$ac_ext <<_ACEOF
4270 /* end confdefs.h.  */
4271 #include <stdlib.h>
4272                     #include <sys/time.h>
4273 int
4274 main ()
4275 {
4276 struct timeval tv; struct timezone tzp;
4277                     gettimeofday(&tv, &tzp);
4278   ;
4279   return 0;
4280 }
4281 _ACEOF
4282 rm -f conftest.$ac_objext
4283 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4284   (eval $ac_compile) 2>&5
4285   ac_status=$?
4286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4287   (exit $ac_status); } &&
4288          { ac_try='test -s conftest.$ac_objext'
4289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4290   (eval $ac_try) 2>&5
4291   ac_status=$?
4292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4293   (exit $ac_status); }; }; then
4294   ac_gettimeofday_args=2
4295 else
4296   echo "$as_me: failed program was:" >&5
4297 sed 's/^/| /' conftest.$ac_ext >&5
4298
4299 cat >conftest.$ac_ext <<_ACEOF
4300 #line $LINENO "configure"
4301 /* confdefs.h.  */
4302 _ACEOF
4303 cat confdefs.h >>conftest.$ac_ext
4304 cat >>conftest.$ac_ext <<_ACEOF
4305 /* end confdefs.h.  */
4306 #include <stdlib.h>
4307                                     #include <sys/time.h>
4308 int
4309 main ()
4310 {
4311 struct timeval tv; gettimeofday(&tv);
4312   ;
4313   return 0;
4314 }
4315 _ACEOF
4316 rm -f conftest.$ac_objext
4317 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4318   (eval $ac_compile) 2>&5
4319   ac_status=$?
4320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4321   (exit $ac_status); } &&
4322          { ac_try='test -s conftest.$ac_objext'
4323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4324   (eval $ac_try) 2>&5
4325   ac_status=$?
4326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4327   (exit $ac_status); }; }; then
4328   ac_gettimeofday_args=1
4329 else
4330   echo "$as_me: failed program was:" >&5
4331 sed 's/^/| /' conftest.$ac_ext >&5
4332
4333 ac_gettimeofday_args=0
4334 fi
4335 rm -f conftest.$ac_objext conftest.$ac_ext
4336 fi
4337 rm -f conftest.$ac_objext conftest.$ac_ext
4338     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4339 fi
4340
4341   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4342   if test "$ac_gettimeofday_args" = 1 ; then
4343     cat >>confdefs.h <<\_ACEOF
4344 #define HAVE_GETTIMEOFDAY 1
4345 _ACEOF
4346
4347     echo "$as_me:$LINENO: result: one argument" >&5
4348 echo "${ECHO_T}one argument" >&6
4349   elif test "$ac_gettimeofday_args" = 2 ; then
4350     cat >>confdefs.h <<\_ACEOF
4351 #define HAVE_GETTIMEOFDAY 1
4352 _ACEOF
4353
4354     cat >>confdefs.h <<\_ACEOF
4355 #define GETTIMEOFDAY_TWO_ARGS 1
4356 _ACEOF
4357
4358     echo "$as_me:$LINENO: result: two arguments" >&5
4359 echo "${ECHO_T}two arguments" >&6
4360   else
4361     echo "$as_me:$LINENO: result: unknown" >&5
4362 echo "${ECHO_T}unknown" >&6
4363   fi
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4375 do
4376 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4377 echo "$as_me:$LINENO: checking for $ac_func" >&5
4378 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4379 if eval "test \"\${$as_ac_var+set}\" = set"; then
4380   echo $ECHO_N "(cached) $ECHO_C" >&6
4381 else
4382   cat >conftest.$ac_ext <<_ACEOF
4383 #line $LINENO "configure"
4384 /* confdefs.h.  */
4385 _ACEOF
4386 cat confdefs.h >>conftest.$ac_ext
4387 cat >>conftest.$ac_ext <<_ACEOF
4388 /* end confdefs.h.  */
4389 /* System header to define __stub macros and hopefully few prototypes,
4390     which can conflict with char $ac_func (); below.
4391     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4392     <limits.h> exists even on freestanding compilers.  */
4393 #ifdef __STDC__
4394 # include <limits.h>
4395 #else
4396 # include <assert.h>
4397 #endif
4398 /* Override any gcc2 internal prototype to avoid an error.  */
4399 #ifdef __cplusplus
4400 extern "C"
4401 {
4402 #endif
4403 /* We use char because int might match the return type of a gcc2
4404    builtin and then its argument prototype would still apply.  */
4405 char $ac_func ();
4406 /* The GNU C library defines this for functions which it implements
4407     to always fail with ENOSYS.  Some functions are actually named
4408     something starting with __ and the normal name is an alias.  */
4409 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4410 choke me
4411 #else
4412 char (*f) () = $ac_func;
4413 #endif
4414 #ifdef __cplusplus
4415 }
4416 #endif
4417
4418 int
4419 main ()
4420 {
4421 return f != $ac_func;
4422   ;
4423   return 0;
4424 }
4425 _ACEOF
4426 rm -f conftest.$ac_objext conftest$ac_exeext
4427 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4428   (eval $ac_link) 2>&5
4429   ac_status=$?
4430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4431   (exit $ac_status); } &&
4432          { ac_try='test -s conftest$ac_exeext'
4433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4434   (eval $ac_try) 2>&5
4435   ac_status=$?
4436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4437   (exit $ac_status); }; }; then
4438   eval "$as_ac_var=yes"
4439 else
4440   echo "$as_me: failed program was:" >&5
4441 sed 's/^/| /' conftest.$ac_ext >&5
4442
4443 eval "$as_ac_var=no"
4444 fi
4445 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4446 fi
4447 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4448 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4449 if test `eval echo '${'$as_ac_var'}'` = yes; then
4450   cat >>confdefs.h <<_ACEOF
4451 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4452 _ACEOF
4453
4454 fi
4455 done
4456
4457
4458
4459
4460
4461
4462 for ac_func in sigaction syslog realpath setrlimit
4463 do
4464 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4465 echo "$as_me:$LINENO: checking for $ac_func" >&5
4466 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4467 if eval "test \"\${$as_ac_var+set}\" = set"; then
4468   echo $ECHO_N "(cached) $ECHO_C" >&6
4469 else
4470   cat >conftest.$ac_ext <<_ACEOF
4471 #line $LINENO "configure"
4472 /* confdefs.h.  */
4473 _ACEOF
4474 cat confdefs.h >>conftest.$ac_ext
4475 cat >>conftest.$ac_ext <<_ACEOF
4476 /* end confdefs.h.  */
4477 /* System header to define __stub macros and hopefully few prototypes,
4478     which can conflict with char $ac_func (); below.
4479     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4480     <limits.h> exists even on freestanding compilers.  */
4481 #ifdef __STDC__
4482 # include <limits.h>
4483 #else
4484 # include <assert.h>
4485 #endif
4486 /* Override any gcc2 internal prototype to avoid an error.  */
4487 #ifdef __cplusplus
4488 extern "C"
4489 {
4490 #endif
4491 /* We use char because int might match the return type of a gcc2
4492    builtin and then its argument prototype would still apply.  */
4493 char $ac_func ();
4494 /* The GNU C library defines this for functions which it implements
4495     to always fail with ENOSYS.  Some functions are actually named
4496     something starting with __ and the normal name is an alias.  */
4497 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4498 choke me
4499 #else
4500 char (*f) () = $ac_func;
4501 #endif
4502 #ifdef __cplusplus
4503 }
4504 #endif
4505
4506 int
4507 main ()
4508 {
4509 return f != $ac_func;
4510   ;
4511   return 0;
4512 }
4513 _ACEOF
4514 rm -f conftest.$ac_objext conftest$ac_exeext
4515 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4516   (eval $ac_link) 2>&5
4517   ac_status=$?
4518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4519   (exit $ac_status); } &&
4520          { ac_try='test -s conftest$ac_exeext'
4521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4522   (eval $ac_try) 2>&5
4523   ac_status=$?
4524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4525   (exit $ac_status); }; }; then
4526   eval "$as_ac_var=yes"
4527 else
4528   echo "$as_me: failed program was:" >&5
4529 sed 's/^/| /' conftest.$ac_ext >&5
4530
4531 eval "$as_ac_var=no"
4532 fi
4533 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4534 fi
4535 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4536 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4537 if test `eval echo '${'$as_ac_var'}'` = yes; then
4538   cat >>confdefs.h <<_ACEOF
4539 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4540 _ACEOF
4541
4542 fi
4543 done
4544
4545 echo "$as_me:$LINENO: checking for struct icmp" >&5
4546 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
4547 if test "${ac_cv_have_icmp+set}" = set; then
4548   echo $ECHO_N "(cached) $ECHO_C" >&6
4549 else
4550   cat >conftest.$ac_ext <<_ACEOF
4551 #line $LINENO "configure"
4552 /* confdefs.h.  */
4553 _ACEOF
4554 cat confdefs.h >>conftest.$ac_ext
4555 cat >>conftest.$ac_ext <<_ACEOF
4556 /* end confdefs.h.  */
4557 #include <stdlib.h>
4558                    #include <stdio.h>
4559                    #include <math.h>
4560                    #include <unistd.h>
4561                    #include <limits.h>
4562                    #include <signal.h>
4563                    #include <fcntl.h>
4564                    #include <sys/types.h>
4565                    #include <sys/time.h>
4566                    #include <sys/ipc.h>
4567                    #include <sys/shm.h>
4568                    #include <sys/socket.h>
4569                    #include <netinet/in_systm.h>
4570                    #include <netinet/in.h>
4571                    #include <netinet/ip.h>
4572                    #include <netinet/ip_icmp.h>
4573                    #include <netinet/udp.h>
4574                    #include <arpa/inet.h>
4575                    #include <netdb.h>
4576 int
4577 main ()
4578 {
4579 struct icmp i;
4580                    struct sockaddr s;
4581                    struct sockaddr_in si;
4582                    struct ip ip;
4583                    i.icmp_type = ICMP_ECHO;
4584                    i.icmp_code = 0;
4585                    i.icmp_cksum = 0;
4586                    i.icmp_id = 0;
4587                    i.icmp_seq = 0;
4588                    si.sin_family = AF_INET;
4589                    #if defined(__DECC) || defined(_IP_VHL)
4590                    ip.ip_vhl = 0;
4591                    #else
4592                    ip.ip_hl = 0;
4593                    #endif
4594
4595   ;
4596   return 0;
4597 }
4598 _ACEOF
4599 rm -f conftest.$ac_objext
4600 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4601   (eval $ac_compile) 2>&5
4602   ac_status=$?
4603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4604   (exit $ac_status); } &&
4605          { ac_try='test -s conftest.$ac_objext'
4606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4607   (eval $ac_try) 2>&5
4608   ac_status=$?
4609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4610   (exit $ac_status); }; }; then
4611   ac_cv_have_icmp=yes
4612 else
4613   echo "$as_me: failed program was:" >&5
4614 sed 's/^/| /' conftest.$ac_ext >&5
4615
4616 ac_cv_have_icmp=no
4617 fi
4618 rm -f conftest.$ac_objext conftest.$ac_ext
4619 fi
4620 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
4621 echo "${ECHO_T}$ac_cv_have_icmp" >&6
4622  if test "$ac_cv_have_icmp" = yes ; then
4623    cat >>confdefs.h <<\_ACEOF
4624 #define HAVE_ICMP 1
4625 _ACEOF
4626
4627  fi
4628 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
4629 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
4630 if test "${ac_cv_have_icmphdr+set}" = set; then
4631   echo $ECHO_N "(cached) $ECHO_C" >&6
4632 else
4633   cat >conftest.$ac_ext <<_ACEOF
4634 #line $LINENO "configure"
4635 /* confdefs.h.  */
4636 _ACEOF
4637 cat confdefs.h >>conftest.$ac_ext
4638 cat >>conftest.$ac_ext <<_ACEOF
4639 /* end confdefs.h.  */
4640 #include <stdlib.h>
4641                    #include <stdio.h>
4642                    #include <math.h>
4643                    #include <unistd.h>
4644                    #include <limits.h>
4645                    #include <signal.h>
4646                    #include <fcntl.h>
4647                    #include <sys/types.h>
4648                    #include <sys/time.h>
4649                    #include <sys/ipc.h>
4650                    #include <sys/shm.h>
4651                    #include <sys/socket.h>
4652                    #include <netinet/in_systm.h>
4653                    #include <netinet/in.h>
4654                    #include <netinet/ip.h>
4655                    #include <netinet/ip_icmp.h>
4656                    #include <netinet/udp.h>
4657                    #include <arpa/inet.h>
4658                    #include <netdb.h>
4659 int
4660 main ()
4661 {
4662 struct icmphdr i;
4663                    struct sockaddr s;
4664                    struct sockaddr_in si;
4665                    struct ip ip;
4666                    i.type = ICMP_ECHO;
4667                    i.code = 0;
4668                    i.checksum = 0;
4669                    i.un.echo.id = 0;
4670                    i.un.echo.sequence = 0;
4671                    si.sin_family = AF_INET;
4672                    ip.ip_hl = 0;
4673   ;
4674   return 0;
4675 }
4676 _ACEOF
4677 rm -f conftest.$ac_objext
4678 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4679   (eval $ac_compile) 2>&5
4680   ac_status=$?
4681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4682   (exit $ac_status); } &&
4683          { ac_try='test -s conftest.$ac_objext'
4684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4685   (eval $ac_try) 2>&5
4686   ac_status=$?
4687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4688   (exit $ac_status); }; }; then
4689   ac_cv_have_icmphdr=yes
4690 else
4691   echo "$as_me: failed program was:" >&5
4692 sed 's/^/| /' conftest.$ac_ext >&5
4693
4694 ac_cv_have_icmphdr=no
4695 fi
4696 rm -f conftest.$ac_objext conftest.$ac_ext
4697 fi
4698 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
4699 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
4700  if test "$ac_cv_have_icmphdr" = yes ; then
4701    cat >>confdefs.h <<\_ACEOF
4702 #define HAVE_ICMPHDR 1
4703 _ACEOF
4704
4705  fi
4706
4707
4708 for ac_header in crypt.h sys/select.h
4709 do
4710 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4711 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4712   echo "$as_me:$LINENO: checking for $ac_header" >&5
4713 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4714 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4715   echo $ECHO_N "(cached) $ECHO_C" >&6
4716 fi
4717 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4718 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4719 else
4720   # Is the header compilable?
4721 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4722 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4723 cat >conftest.$ac_ext <<_ACEOF
4724 #line $LINENO "configure"
4725 /* confdefs.h.  */
4726 _ACEOF
4727 cat confdefs.h >>conftest.$ac_ext
4728 cat >>conftest.$ac_ext <<_ACEOF
4729 /* end confdefs.h.  */
4730 $ac_includes_default
4731 #include <$ac_header>
4732 _ACEOF
4733 rm -f conftest.$ac_objext
4734 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4735   (eval $ac_compile) 2>&5
4736   ac_status=$?
4737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4738   (exit $ac_status); } &&
4739          { ac_try='test -s conftest.$ac_objext'
4740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4741   (eval $ac_try) 2>&5
4742   ac_status=$?
4743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4744   (exit $ac_status); }; }; then
4745   ac_header_compiler=yes
4746 else
4747   echo "$as_me: failed program was:" >&5
4748 sed 's/^/| /' conftest.$ac_ext >&5
4749
4750 ac_header_compiler=no
4751 fi
4752 rm -f conftest.$ac_objext conftest.$ac_ext
4753 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4754 echo "${ECHO_T}$ac_header_compiler" >&6
4755
4756 # Is the header present?
4757 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4758 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4759 cat >conftest.$ac_ext <<_ACEOF
4760 #line $LINENO "configure"
4761 /* confdefs.h.  */
4762 _ACEOF
4763 cat confdefs.h >>conftest.$ac_ext
4764 cat >>conftest.$ac_ext <<_ACEOF
4765 /* end confdefs.h.  */
4766 #include <$ac_header>
4767 _ACEOF
4768 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4769   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4770   ac_status=$?
4771   grep -v '^ *+' conftest.er1 >conftest.err
4772   rm -f conftest.er1
4773   cat conftest.err >&5
4774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4775   (exit $ac_status); } >/dev/null; then
4776   if test -s conftest.err; then
4777     ac_cpp_err=$ac_c_preproc_warn_flag
4778   else
4779     ac_cpp_err=
4780   fi
4781 else
4782   ac_cpp_err=yes
4783 fi
4784 if test -z "$ac_cpp_err"; then
4785   ac_header_preproc=yes
4786 else
4787   echo "$as_me: failed program was:" >&5
4788 sed 's/^/| /' conftest.$ac_ext >&5
4789
4790   ac_header_preproc=no
4791 fi
4792 rm -f conftest.err conftest.$ac_ext
4793 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4794 echo "${ECHO_T}$ac_header_preproc" >&6
4795
4796 # So?  What about this header?
4797 case $ac_header_compiler:$ac_header_preproc in
4798   yes:no )
4799     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4800 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4801     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4802 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4803     (
4804       cat <<\_ASBOX
4805 ## ------------------------------------ ##
4806 ## Report this to bug-autoconf@gnu.org. ##
4807 ## ------------------------------------ ##
4808 _ASBOX
4809     ) |
4810       sed "s/^/$as_me: WARNING:     /" >&2
4811     ;;
4812   no:yes )
4813     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4814 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4815     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4816 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4817     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4818 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4819     (
4820       cat <<\_ASBOX
4821 ## ------------------------------------ ##
4822 ## Report this to bug-autoconf@gnu.org. ##
4823 ## ------------------------------------ ##
4824 _ASBOX
4825     ) |
4826       sed "s/^/$as_me: WARNING:     /" >&2
4827     ;;
4828 esac
4829 echo "$as_me:$LINENO: checking for $ac_header" >&5
4830 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4831 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4832   echo $ECHO_N "(cached) $ECHO_C" >&6
4833 else
4834   eval "$as_ac_Header=$ac_header_preproc"
4835 fi
4836 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4837 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4838
4839 fi
4840 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4841   cat >>confdefs.h <<_ACEOF
4842 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4843 _ACEOF
4844
4845 fi
4846
4847 done
4848
4849 for ac_prog in perl5 perl
4850 do
4851   # Extract the first word of "$ac_prog", so it can be a program name with args.
4852 set dummy $ac_prog; ac_word=$2
4853 echo "$as_me:$LINENO: checking for $ac_word" >&5
4854 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4855 if test "${ac_cv_path_PERL+set}" = set; then
4856   echo $ECHO_N "(cached) $ECHO_C" >&6
4857 else
4858   case $PERL in
4859   [\\/]* | ?:[\\/]*)
4860   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4861   ;;
4862   *)
4863   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4864 for as_dir in $PATH
4865 do
4866   IFS=$as_save_IFS
4867   test -z "$as_dir" && as_dir=.
4868   for ac_exec_ext in '' $ac_executable_extensions; do
4869   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4870     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4871     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4872     break 2
4873   fi
4874 done
4875 done
4876
4877   ;;
4878 esac
4879 fi
4880 PERL=$ac_cv_path_PERL
4881
4882 if test -n "$PERL"; then
4883   echo "$as_me:$LINENO: result: $PERL" >&5
4884 echo "${ECHO_T}$PERL" >&6
4885 else
4886   echo "$as_me:$LINENO: result: no" >&5
4887 echo "${ECHO_T}no" >&6
4888 fi
4889
4890   test -n "$PERL" && break
4891 done
4892
4893   if test -z "$PERL" ; then
4894     PERL_VERSION=0
4895   else
4896     echo "$as_me:$LINENO: checking perl version" >&5
4897 echo $ECHO_N "checking perl version... $ECHO_C" >&6
4898 if test "${ac_cv_perl_version+set}" = set; then
4899   echo $ECHO_N "(cached) $ECHO_C" >&6
4900 else
4901   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
4902 fi
4903 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
4904 echo "${ECHO_T}$ac_cv_perl_version" >&6
4905     PERL_VERSION=$ac_cv_perl_version
4906   fi
4907
4908
4909 if test -z "$PERL" ; then
4910   # don't let it be blank...
4911   PERL=/usr/bin/perl
4912 fi
4913
4914 echo "$as_me:$LINENO: checking for X" >&5
4915 echo $ECHO_N "checking for X... $ECHO_C" >&6
4916
4917
4918 # Check whether --with-x or --without-x was given.
4919 if test "${with_x+set}" = set; then
4920   withval="$with_x"
4921
4922 fi;
4923 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4924 if test "x$with_x" = xno; then
4925   # The user explicitly disabled X.
4926   have_x=disabled
4927 else
4928   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4929     # Both variables are already set.
4930     have_x=yes
4931   else
4932     if test "${ac_cv_have_x+set}" = set; then
4933   echo $ECHO_N "(cached) $ECHO_C" >&6
4934 else
4935   # One or both of the vars are not set, and there is no cached value.
4936 ac_x_includes=no ac_x_libraries=no
4937 rm -fr conftest.dir
4938 if mkdir conftest.dir; then
4939   cd conftest.dir
4940   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4941   cat >Imakefile <<'_ACEOF'
4942 acfindx:
4943         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4944 _ACEOF
4945   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4946     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4947     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4948     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4949     for ac_extension in a so sl; do
4950       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4951          test -f $ac_im_libdir/libX11.$ac_extension; then
4952         ac_im_usrlibdir=$ac_im_libdir; break
4953       fi
4954     done
4955     # Screen out bogus values from the imake configuration.  They are
4956     # bogus both because they are the default anyway, and because
4957     # using them would break gcc on systems where it needs fixed includes.
4958     case $ac_im_incroot in
4959         /usr/include) ;;
4960         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4961     esac
4962     case $ac_im_usrlibdir in
4963         /usr/lib | /lib) ;;
4964         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4965     esac
4966   fi
4967   cd ..
4968   rm -fr conftest.dir
4969 fi
4970
4971 # Standard set of common directories for X headers.
4972 # Check X11 before X11Rn because it is often a symlink to the current release.
4973 ac_x_header_dirs='
4974 /usr/X11/include
4975 /usr/X11R6/include
4976 /usr/X11R5/include
4977 /usr/X11R4/include
4978
4979 /usr/include/X11
4980 /usr/include/X11R6
4981 /usr/include/X11R5
4982 /usr/include/X11R4
4983
4984 /usr/local/X11/include
4985 /usr/local/X11R6/include
4986 /usr/local/X11R5/include
4987 /usr/local/X11R4/include
4988
4989 /usr/local/include/X11
4990 /usr/local/include/X11R6
4991 /usr/local/include/X11R5
4992 /usr/local/include/X11R4
4993
4994 /usr/X386/include
4995 /usr/x386/include
4996 /usr/XFree86/include/X11
4997
4998 /usr/include
4999 /usr/local/include
5000 /usr/unsupported/include
5001 /usr/athena/include
5002 /usr/local/x11r5/include
5003 /usr/lpp/Xamples/include
5004
5005 /usr/openwin/include
5006 /usr/openwin/share/include'
5007
5008 if test "$ac_x_includes" = no; then
5009   # Guess where to find include files, by looking for Intrinsic.h.
5010   # First, try using that file with no special directory specified.
5011   cat >conftest.$ac_ext <<_ACEOF
5012 #line $LINENO "configure"
5013 /* confdefs.h.  */
5014 _ACEOF
5015 cat confdefs.h >>conftest.$ac_ext
5016 cat >>conftest.$ac_ext <<_ACEOF
5017 /* end confdefs.h.  */
5018 #include <X11/Intrinsic.h>
5019 _ACEOF
5020 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5021   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5022   ac_status=$?
5023   grep -v '^ *+' conftest.er1 >conftest.err
5024   rm -f conftest.er1
5025   cat conftest.err >&5
5026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5027   (exit $ac_status); } >/dev/null; then
5028   if test -s conftest.err; then
5029     ac_cpp_err=$ac_c_preproc_warn_flag
5030   else
5031     ac_cpp_err=
5032   fi
5033 else
5034   ac_cpp_err=yes
5035 fi
5036 if test -z "$ac_cpp_err"; then
5037   # We can compile using X headers with no special include directory.
5038 ac_x_includes=
5039 else
5040   echo "$as_me: failed program was:" >&5
5041 sed 's/^/| /' conftest.$ac_ext >&5
5042
5043   for ac_dir in $ac_x_header_dirs; do
5044   if test -r "$ac_dir/X11/Intrinsic.h"; then
5045     ac_x_includes=$ac_dir
5046     break
5047   fi
5048 done
5049 fi
5050 rm -f conftest.err conftest.$ac_ext
5051 fi # $ac_x_includes = no
5052
5053 if test "$ac_x_libraries" = no; then
5054   # Check for the libraries.
5055   # See if we find them without any special options.
5056   # Don't add to $LIBS permanently.
5057   ac_save_LIBS=$LIBS
5058   LIBS="-lXt $LIBS"
5059   cat >conftest.$ac_ext <<_ACEOF
5060 #line $LINENO "configure"
5061 /* confdefs.h.  */
5062 _ACEOF
5063 cat confdefs.h >>conftest.$ac_ext
5064 cat >>conftest.$ac_ext <<_ACEOF
5065 /* end confdefs.h.  */
5066 #include <X11/Intrinsic.h>
5067 int
5068 main ()
5069 {
5070 XtMalloc (0)
5071   ;
5072   return 0;
5073 }
5074 _ACEOF
5075 rm -f conftest.$ac_objext conftest$ac_exeext
5076 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5077   (eval $ac_link) 2>&5
5078   ac_status=$?
5079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5080   (exit $ac_status); } &&
5081          { ac_try='test -s conftest$ac_exeext'
5082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5083   (eval $ac_try) 2>&5
5084   ac_status=$?
5085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5086   (exit $ac_status); }; }; then
5087   LIBS=$ac_save_LIBS
5088 # We can link X programs with no special library path.
5089 ac_x_libraries=
5090 else
5091   echo "$as_me: failed program was:" >&5
5092 sed 's/^/| /' conftest.$ac_ext >&5
5093
5094 LIBS=$ac_save_LIBS
5095 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5096 do
5097   # Don't even attempt the hair of trying to link an X program!
5098   for ac_extension in a so sl; do
5099     if test -r $ac_dir/libXt.$ac_extension; then
5100       ac_x_libraries=$ac_dir
5101       break 2
5102     fi
5103   done
5104 done
5105 fi
5106 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5107 fi # $ac_x_libraries = no
5108
5109 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
5110   # Didn't find X anywhere.  Cache the known absence of X.
5111   ac_cv_have_x="have_x=no"
5112 else
5113   # Record where we found X for the cache.
5114   ac_cv_have_x="have_x=yes \
5115                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5116 fi
5117 fi
5118
5119   fi
5120   eval "$ac_cv_have_x"
5121 fi # $with_x != no
5122
5123 if test "$have_x" != yes; then
5124   echo "$as_me:$LINENO: result: $have_x" >&5
5125 echo "${ECHO_T}$have_x" >&6
5126   no_x=yes
5127 else
5128   # If each of the values was on the command line, it overrides each guess.
5129   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5130   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5131   # Update the cache value to reflect the command line values.
5132   ac_cv_have_x="have_x=yes \
5133                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5134   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
5135 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5136 fi
5137
5138 if test "$no_x" = yes; then
5139   # Not all programs may use this symbol, but it does not hurt to define it.
5140
5141 cat >>confdefs.h <<\_ACEOF
5142 #define X_DISPLAY_MISSING 1
5143 _ACEOF
5144
5145   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5146 else
5147   if test -n "$x_includes"; then
5148     X_CFLAGS="$X_CFLAGS -I$x_includes"
5149   fi
5150
5151   # It would also be nice to do this for all -L options, not just this one.
5152   if test -n "$x_libraries"; then
5153     X_LIBS="$X_LIBS -L$x_libraries"
5154     # For Solaris; some versions of Sun CC require a space after -R and
5155     # others require no space.  Words are not sufficient . . . .
5156     case `(uname -sr) 2>/dev/null` in
5157     "SunOS 5"*)
5158       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
5159 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
5160       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
5161       cat >conftest.$ac_ext <<_ACEOF
5162 #line $LINENO "configure"
5163 /* confdefs.h.  */
5164 _ACEOF
5165 cat confdefs.h >>conftest.$ac_ext
5166 cat >>conftest.$ac_ext <<_ACEOF
5167 /* end confdefs.h.  */
5168
5169 int
5170 main ()
5171 {
5172
5173   ;
5174   return 0;
5175 }
5176 _ACEOF
5177 rm -f conftest.$ac_objext conftest$ac_exeext
5178 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5179   (eval $ac_link) 2>&5
5180   ac_status=$?
5181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5182   (exit $ac_status); } &&
5183          { ac_try='test -s conftest$ac_exeext'
5184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5185   (eval $ac_try) 2>&5
5186   ac_status=$?
5187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5188   (exit $ac_status); }; }; then
5189   ac_R_nospace=yes
5190 else
5191   echo "$as_me: failed program was:" >&5
5192 sed 's/^/| /' conftest.$ac_ext >&5
5193
5194 ac_R_nospace=no
5195 fi
5196 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5197       if test $ac_R_nospace = yes; then
5198         echo "$as_me:$LINENO: result: no" >&5
5199 echo "${ECHO_T}no" >&6
5200         X_LIBS="$X_LIBS -R$x_libraries"
5201       else
5202         LIBS="$ac_xsave_LIBS -R $x_libraries"
5203         cat >conftest.$ac_ext <<_ACEOF
5204 #line $LINENO "configure"
5205 /* confdefs.h.  */
5206 _ACEOF
5207 cat confdefs.h >>conftest.$ac_ext
5208 cat >>conftest.$ac_ext <<_ACEOF
5209 /* end confdefs.h.  */
5210
5211 int
5212 main ()
5213 {
5214
5215   ;
5216   return 0;
5217 }
5218 _ACEOF
5219 rm -f conftest.$ac_objext conftest$ac_exeext
5220 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5221   (eval $ac_link) 2>&5
5222   ac_status=$?
5223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5224   (exit $ac_status); } &&
5225          { ac_try='test -s conftest$ac_exeext'
5226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5227   (eval $ac_try) 2>&5
5228   ac_status=$?
5229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5230   (exit $ac_status); }; }; then
5231   ac_R_space=yes
5232 else
5233   echo "$as_me: failed program was:" >&5
5234 sed 's/^/| /' conftest.$ac_ext >&5
5235
5236 ac_R_space=no
5237 fi
5238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5239         if test $ac_R_space = yes; then
5240           echo "$as_me:$LINENO: result: yes" >&5
5241 echo "${ECHO_T}yes" >&6
5242           X_LIBS="$X_LIBS -R $x_libraries"
5243         else
5244           echo "$as_me:$LINENO: result: neither works" >&5
5245 echo "${ECHO_T}neither works" >&6
5246         fi
5247       fi
5248       LIBS=$ac_xsave_LIBS
5249     esac
5250   fi
5251
5252   # Check for system-dependent libraries X programs must link with.
5253   # Do this before checking for the system-independent R6 libraries
5254   # (-lICE), since we may need -lsocket or whatever for X linking.
5255
5256   if test "$ISC" = yes; then
5257     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5258   else
5259     # Martyn Johnson says this is needed for Ultrix, if the X
5260     # libraries were built with DECnet support.  And Karl Berry says
5261     # the Alpha needs dnet_stub (dnet does not exist).
5262     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5263     cat >conftest.$ac_ext <<_ACEOF
5264 #line $LINENO "configure"
5265 /* confdefs.h.  */
5266 _ACEOF
5267 cat confdefs.h >>conftest.$ac_ext
5268 cat >>conftest.$ac_ext <<_ACEOF
5269 /* end confdefs.h.  */
5270
5271 /* Override any gcc2 internal prototype to avoid an error.  */
5272 #ifdef __cplusplus
5273 extern "C"
5274 #endif
5275 /* We use char because int might match the return type of a gcc2
5276    builtin and then its argument prototype would still apply.  */
5277 char XOpenDisplay ();
5278 int
5279 main ()
5280 {
5281 XOpenDisplay ();
5282   ;
5283   return 0;
5284 }
5285 _ACEOF
5286 rm -f conftest.$ac_objext conftest$ac_exeext
5287 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5288   (eval $ac_link) 2>&5
5289   ac_status=$?
5290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5291   (exit $ac_status); } &&
5292          { ac_try='test -s conftest$ac_exeext'
5293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5294   (eval $ac_try) 2>&5
5295   ac_status=$?
5296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5297   (exit $ac_status); }; }; then
5298   :
5299 else
5300   echo "$as_me: failed program was:" >&5
5301 sed 's/^/| /' conftest.$ac_ext >&5
5302
5303 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5304 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5305 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5306   echo $ECHO_N "(cached) $ECHO_C" >&6
5307 else
5308   ac_check_lib_save_LIBS=$LIBS
5309 LIBS="-ldnet  $LIBS"
5310 cat >conftest.$ac_ext <<_ACEOF
5311 #line $LINENO "configure"
5312 /* confdefs.h.  */
5313 _ACEOF
5314 cat confdefs.h >>conftest.$ac_ext
5315 cat >>conftest.$ac_ext <<_ACEOF
5316 /* end confdefs.h.  */
5317
5318 /* Override any gcc2 internal prototype to avoid an error.  */
5319 #ifdef __cplusplus
5320 extern "C"
5321 #endif
5322 /* We use char because int might match the return type of a gcc2
5323    builtin and then its argument prototype would still apply.  */
5324 char dnet_ntoa ();
5325 int
5326 main ()
5327 {
5328 dnet_ntoa ();
5329   ;
5330   return 0;
5331 }
5332 _ACEOF
5333 rm -f conftest.$ac_objext conftest$ac_exeext
5334 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5335   (eval $ac_link) 2>&5
5336   ac_status=$?
5337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338   (exit $ac_status); } &&
5339          { ac_try='test -s conftest$ac_exeext'
5340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5341   (eval $ac_try) 2>&5
5342   ac_status=$?
5343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5344   (exit $ac_status); }; }; then
5345   ac_cv_lib_dnet_dnet_ntoa=yes
5346 else
5347   echo "$as_me: failed program was:" >&5
5348 sed 's/^/| /' conftest.$ac_ext >&5
5349
5350 ac_cv_lib_dnet_dnet_ntoa=no
5351 fi
5352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5353 LIBS=$ac_check_lib_save_LIBS
5354 fi
5355 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5356 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5357 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5358   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5359 fi
5360
5361     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5362       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5363 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5364 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5365   echo $ECHO_N "(cached) $ECHO_C" >&6
5366 else
5367   ac_check_lib_save_LIBS=$LIBS
5368 LIBS="-ldnet_stub  $LIBS"
5369 cat >conftest.$ac_ext <<_ACEOF
5370 #line $LINENO "configure"
5371 /* confdefs.h.  */
5372 _ACEOF
5373 cat confdefs.h >>conftest.$ac_ext
5374 cat >>conftest.$ac_ext <<_ACEOF
5375 /* end confdefs.h.  */
5376
5377 /* Override any gcc2 internal prototype to avoid an error.  */
5378 #ifdef __cplusplus
5379 extern "C"
5380 #endif
5381 /* We use char because int might match the return type of a gcc2
5382    builtin and then its argument prototype would still apply.  */
5383 char dnet_ntoa ();
5384 int
5385 main ()
5386 {
5387 dnet_ntoa ();
5388   ;
5389   return 0;
5390 }
5391 _ACEOF
5392 rm -f conftest.$ac_objext conftest$ac_exeext
5393 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5394   (eval $ac_link) 2>&5
5395   ac_status=$?
5396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5397   (exit $ac_status); } &&
5398          { ac_try='test -s conftest$ac_exeext'
5399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5400   (eval $ac_try) 2>&5
5401   ac_status=$?
5402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5403   (exit $ac_status); }; }; then
5404   ac_cv_lib_dnet_stub_dnet_ntoa=yes
5405 else
5406   echo "$as_me: failed program was:" >&5
5407 sed 's/^/| /' conftest.$ac_ext >&5
5408
5409 ac_cv_lib_dnet_stub_dnet_ntoa=no
5410 fi
5411 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5412 LIBS=$ac_check_lib_save_LIBS
5413 fi
5414 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5415 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5416 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5417   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5418 fi
5419
5420     fi
5421 fi
5422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5423     LIBS="$ac_xsave_LIBS"
5424
5425     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5426     # to get the SysV transport functions.
5427     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5428     # needs -lnsl.
5429     # The nsl library prevents programs from opening the X display
5430     # on Irix 5.2, according to T.E. Dickey.
5431     # The functions gethostbyname, getservbyname, and inet_addr are
5432     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5433     echo "$as_me:$LINENO: checking for gethostbyname" >&5
5434 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5435 if test "${ac_cv_func_gethostbyname+set}" = set; then
5436   echo $ECHO_N "(cached) $ECHO_C" >&6
5437 else
5438   cat >conftest.$ac_ext <<_ACEOF
5439 #line $LINENO "configure"
5440 /* confdefs.h.  */
5441 _ACEOF
5442 cat confdefs.h >>conftest.$ac_ext
5443 cat >>conftest.$ac_ext <<_ACEOF
5444 /* end confdefs.h.  */
5445 /* System header to define __stub macros and hopefully few prototypes,
5446     which can conflict with char gethostbyname (); below.
5447     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5448     <limits.h> exists even on freestanding compilers.  */
5449 #ifdef __STDC__
5450 # include <limits.h>
5451 #else
5452 # include <assert.h>
5453 #endif
5454 /* Override any gcc2 internal prototype to avoid an error.  */
5455 #ifdef __cplusplus
5456 extern "C"
5457 {
5458 #endif
5459 /* We use char because int might match the return type of a gcc2
5460    builtin and then its argument prototype would still apply.  */
5461 char gethostbyname ();
5462 /* The GNU C library defines this for functions which it implements
5463     to always fail with ENOSYS.  Some functions are actually named
5464     something starting with __ and the normal name is an alias.  */
5465 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5466 choke me
5467 #else
5468 char (*f) () = gethostbyname;
5469 #endif
5470 #ifdef __cplusplus
5471 }
5472 #endif
5473
5474 int
5475 main ()
5476 {
5477 return f != gethostbyname;
5478   ;
5479   return 0;
5480 }
5481 _ACEOF
5482 rm -f conftest.$ac_objext conftest$ac_exeext
5483 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5484   (eval $ac_link) 2>&5
5485   ac_status=$?
5486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5487   (exit $ac_status); } &&
5488          { ac_try='test -s conftest$ac_exeext'
5489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5490   (eval $ac_try) 2>&5
5491   ac_status=$?
5492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5493   (exit $ac_status); }; }; then
5494   ac_cv_func_gethostbyname=yes
5495 else
5496   echo "$as_me: failed program was:" >&5
5497 sed 's/^/| /' conftest.$ac_ext >&5
5498
5499 ac_cv_func_gethostbyname=no
5500 fi
5501 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5502 fi
5503 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5504 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5505
5506     if test $ac_cv_func_gethostbyname = no; then
5507       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5508 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5509 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5510   echo $ECHO_N "(cached) $ECHO_C" >&6
5511 else
5512   ac_check_lib_save_LIBS=$LIBS
5513 LIBS="-lnsl  $LIBS"
5514 cat >conftest.$ac_ext <<_ACEOF
5515 #line $LINENO "configure"
5516 /* confdefs.h.  */
5517 _ACEOF
5518 cat confdefs.h >>conftest.$ac_ext
5519 cat >>conftest.$ac_ext <<_ACEOF
5520 /* end confdefs.h.  */
5521
5522 /* Override any gcc2 internal prototype to avoid an error.  */
5523 #ifdef __cplusplus
5524 extern "C"
5525 #endif
5526 /* We use char because int might match the return type of a gcc2
5527    builtin and then its argument prototype would still apply.  */
5528 char gethostbyname ();
5529 int
5530 main ()
5531 {
5532 gethostbyname ();
5533   ;
5534   return 0;
5535 }
5536 _ACEOF
5537 rm -f conftest.$ac_objext conftest$ac_exeext
5538 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5539   (eval $ac_link) 2>&5
5540   ac_status=$?
5541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5542   (exit $ac_status); } &&
5543          { ac_try='test -s conftest$ac_exeext'
5544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5545   (eval $ac_try) 2>&5
5546   ac_status=$?
5547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5548   (exit $ac_status); }; }; then
5549   ac_cv_lib_nsl_gethostbyname=yes
5550 else
5551   echo "$as_me: failed program was:" >&5
5552 sed 's/^/| /' conftest.$ac_ext >&5
5553
5554 ac_cv_lib_nsl_gethostbyname=no
5555 fi
5556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5557 LIBS=$ac_check_lib_save_LIBS
5558 fi
5559 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5560 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5561 if test $ac_cv_lib_nsl_gethostbyname = yes; then
5562   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5563 fi
5564
5565       if test $ac_cv_lib_nsl_gethostbyname = no; then
5566         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5567 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5568 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5569   echo $ECHO_N "(cached) $ECHO_C" >&6
5570 else
5571   ac_check_lib_save_LIBS=$LIBS
5572 LIBS="-lbsd  $LIBS"
5573 cat >conftest.$ac_ext <<_ACEOF
5574 #line $LINENO "configure"
5575 /* confdefs.h.  */
5576 _ACEOF
5577 cat confdefs.h >>conftest.$ac_ext
5578 cat >>conftest.$ac_ext <<_ACEOF
5579 /* end confdefs.h.  */
5580
5581 /* Override any gcc2 internal prototype to avoid an error.  */
5582 #ifdef __cplusplus
5583 extern "C"
5584 #endif
5585 /* We use char because int might match the return type of a gcc2
5586    builtin and then its argument prototype would still apply.  */
5587 char gethostbyname ();
5588 int
5589 main ()
5590 {
5591 gethostbyname ();
5592   ;
5593   return 0;
5594 }
5595 _ACEOF
5596 rm -f conftest.$ac_objext conftest$ac_exeext
5597 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5598   (eval $ac_link) 2>&5
5599   ac_status=$?
5600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5601   (exit $ac_status); } &&
5602          { ac_try='test -s conftest$ac_exeext'
5603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5604   (eval $ac_try) 2>&5
5605   ac_status=$?
5606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5607   (exit $ac_status); }; }; then
5608   ac_cv_lib_bsd_gethostbyname=yes
5609 else
5610   echo "$as_me: failed program was:" >&5
5611 sed 's/^/| /' conftest.$ac_ext >&5
5612
5613 ac_cv_lib_bsd_gethostbyname=no
5614 fi
5615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5616 LIBS=$ac_check_lib_save_LIBS
5617 fi
5618 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
5619 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
5620 if test $ac_cv_lib_bsd_gethostbyname = yes; then
5621   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5622 fi
5623
5624       fi
5625     fi
5626
5627     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5628     # socket/setsockopt and other routines are undefined under SCO ODT
5629     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5630     # on later versions), says Simon Leinen: it contains gethostby*
5631     # variants that don't use the name server (or something).  -lsocket
5632     # must be given before -lnsl if both are needed.  We assume that
5633     # if connect needs -lnsl, so does gethostbyname.
5634     echo "$as_me:$LINENO: checking for connect" >&5
5635 echo $ECHO_N "checking for connect... $ECHO_C" >&6
5636 if test "${ac_cv_func_connect+set}" = set; then
5637   echo $ECHO_N "(cached) $ECHO_C" >&6
5638 else
5639   cat >conftest.$ac_ext <<_ACEOF
5640 #line $LINENO "configure"
5641 /* confdefs.h.  */
5642 _ACEOF
5643 cat confdefs.h >>conftest.$ac_ext
5644 cat >>conftest.$ac_ext <<_ACEOF
5645 /* end confdefs.h.  */
5646 /* System header to define __stub macros and hopefully few prototypes,
5647     which can conflict with char connect (); below.
5648     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5649     <limits.h> exists even on freestanding compilers.  */
5650 #ifdef __STDC__
5651 # include <limits.h>
5652 #else
5653 # include <assert.h>
5654 #endif
5655 /* Override any gcc2 internal prototype to avoid an error.  */
5656 #ifdef __cplusplus
5657 extern "C"
5658 {
5659 #endif
5660 /* We use char because int might match the return type of a gcc2
5661    builtin and then its argument prototype would still apply.  */
5662 char connect ();
5663 /* The GNU C library defines this for functions which it implements
5664     to always fail with ENOSYS.  Some functions are actually named
5665     something starting with __ and the normal name is an alias.  */
5666 #if defined (__stub_connect) || defined (__stub___connect)
5667 choke me
5668 #else
5669 char (*f) () = connect;
5670 #endif
5671 #ifdef __cplusplus
5672 }
5673 #endif
5674
5675 int
5676 main ()
5677 {
5678 return f != connect;
5679   ;
5680   return 0;
5681 }
5682 _ACEOF
5683 rm -f conftest.$ac_objext conftest$ac_exeext
5684 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5685   (eval $ac_link) 2>&5
5686   ac_status=$?
5687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5688   (exit $ac_status); } &&
5689          { ac_try='test -s conftest$ac_exeext'
5690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5691   (eval $ac_try) 2>&5
5692   ac_status=$?
5693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5694   (exit $ac_status); }; }; then
5695   ac_cv_func_connect=yes
5696 else
5697   echo "$as_me: failed program was:" >&5
5698 sed 's/^/| /' conftest.$ac_ext >&5
5699
5700 ac_cv_func_connect=no
5701 fi
5702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5703 fi
5704 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5705 echo "${ECHO_T}$ac_cv_func_connect" >&6
5706
5707     if test $ac_cv_func_connect = no; then
5708       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
5709 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
5710 if test "${ac_cv_lib_socket_connect+set}" = set; then
5711   echo $ECHO_N "(cached) $ECHO_C" >&6
5712 else
5713   ac_check_lib_save_LIBS=$LIBS
5714 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5715 cat >conftest.$ac_ext <<_ACEOF
5716 #line $LINENO "configure"
5717 /* confdefs.h.  */
5718 _ACEOF
5719 cat confdefs.h >>conftest.$ac_ext
5720 cat >>conftest.$ac_ext <<_ACEOF
5721 /* end confdefs.h.  */
5722
5723 /* Override any gcc2 internal prototype to avoid an error.  */
5724 #ifdef __cplusplus
5725 extern "C"
5726 #endif
5727 /* We use char because int might match the return type of a gcc2
5728    builtin and then its argument prototype would still apply.  */
5729 char connect ();
5730 int
5731 main ()
5732 {
5733 connect ();
5734   ;
5735   return 0;
5736 }
5737 _ACEOF
5738 rm -f conftest.$ac_objext conftest$ac_exeext
5739 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5740   (eval $ac_link) 2>&5
5741   ac_status=$?
5742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5743   (exit $ac_status); } &&
5744          { ac_try='test -s conftest$ac_exeext'
5745   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5746   (eval $ac_try) 2>&5
5747   ac_status=$?
5748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5749   (exit $ac_status); }; }; then
5750   ac_cv_lib_socket_connect=yes
5751 else
5752   echo "$as_me: failed program was:" >&5
5753 sed 's/^/| /' conftest.$ac_ext >&5
5754
5755 ac_cv_lib_socket_connect=no
5756 fi
5757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5758 LIBS=$ac_check_lib_save_LIBS
5759 fi
5760 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
5761 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
5762 if test $ac_cv_lib_socket_connect = yes; then
5763   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5764 fi
5765
5766     fi
5767
5768     # Guillermo Gomez says -lposix is necessary on A/UX.
5769     echo "$as_me:$LINENO: checking for remove" >&5
5770 echo $ECHO_N "checking for remove... $ECHO_C" >&6
5771 if test "${ac_cv_func_remove+set}" = set; then
5772   echo $ECHO_N "(cached) $ECHO_C" >&6
5773 else
5774   cat >conftest.$ac_ext <<_ACEOF
5775 #line $LINENO "configure"
5776 /* confdefs.h.  */
5777 _ACEOF
5778 cat confdefs.h >>conftest.$ac_ext
5779 cat >>conftest.$ac_ext <<_ACEOF
5780 /* end confdefs.h.  */
5781 /* System header to define __stub macros and hopefully few prototypes,
5782     which can conflict with char remove (); below.
5783     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5784     <limits.h> exists even on freestanding compilers.  */
5785 #ifdef __STDC__
5786 # include <limits.h>
5787 #else
5788 # include <assert.h>
5789 #endif
5790 /* Override any gcc2 internal prototype to avoid an error.  */
5791 #ifdef __cplusplus
5792 extern "C"
5793 {
5794 #endif
5795 /* We use char because int might match the return type of a gcc2
5796    builtin and then its argument prototype would still apply.  */
5797 char remove ();
5798 /* The GNU C library defines this for functions which it implements
5799     to always fail with ENOSYS.  Some functions are actually named
5800     something starting with __ and the normal name is an alias.  */
5801 #if defined (__stub_remove) || defined (__stub___remove)
5802 choke me
5803 #else
5804 char (*f) () = remove;
5805 #endif
5806 #ifdef __cplusplus
5807 }
5808 #endif
5809
5810 int
5811 main ()
5812 {
5813 return f != remove;
5814   ;
5815   return 0;
5816 }
5817 _ACEOF
5818 rm -f conftest.$ac_objext conftest$ac_exeext
5819 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5820   (eval $ac_link) 2>&5
5821   ac_status=$?
5822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5823   (exit $ac_status); } &&
5824          { ac_try='test -s conftest$ac_exeext'
5825   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5826   (eval $ac_try) 2>&5
5827   ac_status=$?
5828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5829   (exit $ac_status); }; }; then
5830   ac_cv_func_remove=yes
5831 else
5832   echo "$as_me: failed program was:" >&5
5833 sed 's/^/| /' conftest.$ac_ext >&5
5834
5835 ac_cv_func_remove=no
5836 fi
5837 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5838 fi
5839 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
5840 echo "${ECHO_T}$ac_cv_func_remove" >&6
5841
5842     if test $ac_cv_func_remove = no; then
5843       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
5844 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
5845 if test "${ac_cv_lib_posix_remove+set}" = set; then
5846   echo $ECHO_N "(cached) $ECHO_C" >&6
5847 else
5848   ac_check_lib_save_LIBS=$LIBS
5849 LIBS="-lposix  $LIBS"
5850 cat >conftest.$ac_ext <<_ACEOF
5851 #line $LINENO "configure"
5852 /* confdefs.h.  */
5853 _ACEOF
5854 cat confdefs.h >>conftest.$ac_ext
5855 cat >>conftest.$ac_ext <<_ACEOF
5856 /* end confdefs.h.  */
5857
5858 /* Override any gcc2 internal prototype to avoid an error.  */
5859 #ifdef __cplusplus
5860 extern "C"
5861 #endif
5862 /* We use char because int might match the return type of a gcc2
5863    builtin and then its argument prototype would still apply.  */
5864 char remove ();
5865 int
5866 main ()
5867 {
5868 remove ();
5869   ;
5870   return 0;
5871 }
5872 _ACEOF
5873 rm -f conftest.$ac_objext conftest$ac_exeext
5874 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5875   (eval $ac_link) 2>&5
5876   ac_status=$?
5877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5878   (exit $ac_status); } &&
5879          { ac_try='test -s conftest$ac_exeext'
5880   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5881   (eval $ac_try) 2>&5
5882   ac_status=$?
5883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5884   (exit $ac_status); }; }; then
5885   ac_cv_lib_posix_remove=yes
5886 else
5887   echo "$as_me: failed program was:" >&5
5888 sed 's/^/| /' conftest.$ac_ext >&5
5889
5890 ac_cv_lib_posix_remove=no
5891 fi
5892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5893 LIBS=$ac_check_lib_save_LIBS
5894 fi
5895 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
5896 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
5897 if test $ac_cv_lib_posix_remove = yes; then
5898   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5899 fi
5900
5901     fi
5902
5903     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5904     echo "$as_me:$LINENO: checking for shmat" >&5
5905 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
5906 if test "${ac_cv_func_shmat+set}" = set; then
5907   echo $ECHO_N "(cached) $ECHO_C" >&6
5908 else
5909   cat >conftest.$ac_ext <<_ACEOF
5910 #line $LINENO "configure"
5911 /* confdefs.h.  */
5912 _ACEOF
5913 cat confdefs.h >>conftest.$ac_ext
5914 cat >>conftest.$ac_ext <<_ACEOF
5915 /* end confdefs.h.  */
5916 /* System header to define __stub macros and hopefully few prototypes,
5917     which can conflict with char shmat (); below.
5918     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5919     <limits.h> exists even on freestanding compilers.  */
5920 #ifdef __STDC__
5921 # include <limits.h>
5922 #else
5923 # include <assert.h>
5924 #endif
5925 /* Override any gcc2 internal prototype to avoid an error.  */
5926 #ifdef __cplusplus
5927 extern "C"
5928 {
5929 #endif
5930 /* We use char because int might match the return type of a gcc2
5931    builtin and then its argument prototype would still apply.  */
5932 char shmat ();
5933 /* The GNU C library defines this for functions which it implements
5934     to always fail with ENOSYS.  Some functions are actually named
5935     something starting with __ and the normal name is an alias.  */
5936 #if defined (__stub_shmat) || defined (__stub___shmat)
5937 choke me
5938 #else
5939 char (*f) () = shmat;
5940 #endif
5941 #ifdef __cplusplus
5942 }
5943 #endif
5944
5945 int
5946 main ()
5947 {
5948 return f != shmat;
5949   ;
5950   return 0;
5951 }
5952 _ACEOF
5953 rm -f conftest.$ac_objext conftest$ac_exeext
5954 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5955   (eval $ac_link) 2>&5
5956   ac_status=$?
5957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5958   (exit $ac_status); } &&
5959          { ac_try='test -s conftest$ac_exeext'
5960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5961   (eval $ac_try) 2>&5
5962   ac_status=$?
5963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5964   (exit $ac_status); }; }; then
5965   ac_cv_func_shmat=yes
5966 else
5967   echo "$as_me: failed program was:" >&5
5968 sed 's/^/| /' conftest.$ac_ext >&5
5969
5970 ac_cv_func_shmat=no
5971 fi
5972 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5973 fi
5974 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
5975 echo "${ECHO_T}$ac_cv_func_shmat" >&6
5976
5977     if test $ac_cv_func_shmat = no; then
5978       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
5979 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
5980 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
5981   echo $ECHO_N "(cached) $ECHO_C" >&6
5982 else
5983   ac_check_lib_save_LIBS=$LIBS
5984 LIBS="-lipc  $LIBS"
5985 cat >conftest.$ac_ext <<_ACEOF
5986 #line $LINENO "configure"
5987 /* confdefs.h.  */
5988 _ACEOF
5989 cat confdefs.h >>conftest.$ac_ext
5990 cat >>conftest.$ac_ext <<_ACEOF
5991 /* end confdefs.h.  */
5992
5993 /* Override any gcc2 internal prototype to avoid an error.  */
5994 #ifdef __cplusplus
5995 extern "C"
5996 #endif
5997 /* We use char because int might match the return type of a gcc2
5998    builtin and then its argument prototype would still apply.  */
5999 char shmat ();
6000 int
6001 main ()
6002 {
6003 shmat ();
6004   ;
6005   return 0;
6006 }
6007 _ACEOF
6008 rm -f conftest.$ac_objext conftest$ac_exeext
6009 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6010   (eval $ac_link) 2>&5
6011   ac_status=$?
6012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6013   (exit $ac_status); } &&
6014          { ac_try='test -s conftest$ac_exeext'
6015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6016   (eval $ac_try) 2>&5
6017   ac_status=$?
6018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6019   (exit $ac_status); }; }; then
6020   ac_cv_lib_ipc_shmat=yes
6021 else
6022   echo "$as_me: failed program was:" >&5
6023 sed 's/^/| /' conftest.$ac_ext >&5
6024
6025 ac_cv_lib_ipc_shmat=no
6026 fi
6027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6028 LIBS=$ac_check_lib_save_LIBS
6029 fi
6030 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
6031 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
6032 if test $ac_cv_lib_ipc_shmat = yes; then
6033   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6034 fi
6035
6036     fi
6037   fi
6038
6039   # Check for libraries that X11R6 Xt/Xaw programs need.
6040   ac_save_LDFLAGS=$LDFLAGS
6041   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6042   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6043   # check for ICE first), but we must link in the order -lSM -lICE or
6044   # we get undefined symbols.  So assume we have SM if we have ICE.
6045   # These have to be linked with before -lX11, unlike the other
6046   # libraries we check for below, so use a different variable.
6047   # John Interrante, Karl Berry
6048   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
6049 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
6050 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
6051   echo $ECHO_N "(cached) $ECHO_C" >&6
6052 else
6053   ac_check_lib_save_LIBS=$LIBS
6054 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6055 cat >conftest.$ac_ext <<_ACEOF
6056 #line $LINENO "configure"
6057 /* confdefs.h.  */
6058 _ACEOF
6059 cat confdefs.h >>conftest.$ac_ext
6060 cat >>conftest.$ac_ext <<_ACEOF
6061 /* end confdefs.h.  */
6062
6063 /* Override any gcc2 internal prototype to avoid an error.  */
6064 #ifdef __cplusplus
6065 extern "C"
6066 #endif
6067 /* We use char because int might match the return type of a gcc2
6068    builtin and then its argument prototype would still apply.  */
6069 char IceConnectionNumber ();
6070 int
6071 main ()
6072 {
6073 IceConnectionNumber ();
6074   ;
6075   return 0;
6076 }
6077 _ACEOF
6078 rm -f conftest.$ac_objext conftest$ac_exeext
6079 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6080   (eval $ac_link) 2>&5
6081   ac_status=$?
6082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6083   (exit $ac_status); } &&
6084          { ac_try='test -s conftest$ac_exeext'
6085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6086   (eval $ac_try) 2>&5
6087   ac_status=$?
6088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6089   (exit $ac_status); }; }; then
6090   ac_cv_lib_ICE_IceConnectionNumber=yes
6091 else
6092   echo "$as_me: failed program was:" >&5
6093 sed 's/^/| /' conftest.$ac_ext >&5
6094
6095 ac_cv_lib_ICE_IceConnectionNumber=no
6096 fi
6097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6098 LIBS=$ac_check_lib_save_LIBS
6099 fi
6100 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6101 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
6102 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
6103   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6104 fi
6105
6106   LDFLAGS=$ac_save_LDFLAGS
6107
6108 fi
6109
6110
6111 if test "$have_x" != yes; then
6112   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
6113 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
6114    { (exit 1); exit 1; }; }
6115 fi
6116
6117
6118     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
6119 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
6120 if test "${ac_cv_x_app_defaults+set}" = set; then
6121   echo $ECHO_N "(cached) $ECHO_C" >&6
6122 else
6123
6124   rm -fr conftestdir
6125   if mkdir conftestdir; then
6126     cd conftestdir 2>/dev/null
6127     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6128     cat > Imakefile <<'EOF'
6129 acfindx:
6130         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
6131 EOF
6132     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
6133       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
6134       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6135     fi
6136     cd .. 2>/dev/null
6137     rm -fr conftestdir
6138   fi
6139       if test x"$ac_x_app_defaults" = x; then
6140
6141   # Look for the directory under a standard set of common directories.
6142   # Check X11 before X11Rn because it's often a symlink to the current release.
6143   for ac_dir in                                 \
6144     /usr/X11/lib/app-defaults                   \
6145     /usr/X11R6/lib/app-defaults                 \
6146     /usr/X11R6/lib/X11/app-defaults             \
6147     /usr/X11R5/lib/app-defaults                 \
6148     /usr/X11R5/lib/X11/app-defaults             \
6149     /usr/X11R4/lib/app-defaults                 \
6150     /usr/X11R4/lib/X11/app-defaults             \
6151                                                 \
6152     /usr/lib/X11/app-defaults                   \
6153     /usr/lib/X11R6/app-defaults                 \
6154     /usr/lib/X11R5/app-defaults                 \
6155     /usr/lib/X11R4/app-defaults                 \
6156                                                 \
6157     /usr/local/X11/lib/app-defaults             \
6158     /usr/local/X11R6/lib/app-defaults           \
6159     /usr/local/X11R5/lib/app-defaults           \
6160     /usr/local/X11R4/lib/app-defaults           \
6161                                                 \
6162     /usr/local/lib/X11/app-defaults             \
6163     /usr/local/lib/X11R6/app-defaults           \
6164     /usr/local/lib/X11R6/X11/app-defaults       \
6165     /usr/local/lib/X11R5/app-defaults           \
6166     /usr/local/lib/X11R5/X11/app-defaults       \
6167     /usr/local/lib/X11R4/app-defaults           \
6168     /usr/local/lib/X11R4/X11/app-defaults       \
6169                                                 \
6170     /usr/X386/lib/X11/app-defaults              \
6171     /usr/x386/lib/X11/app-defaults              \
6172     /usr/XFree86/lib/X11/app-defaults           \
6173                                                 \
6174     /usr/lib/X11/app-defaults                   \
6175     /usr/local/lib/X11/app-defaults             \
6176     /usr/unsupported/lib/X11/app-defaults       \
6177     /usr/athena/lib/X11/app-defaults            \
6178     /usr/local/x11r5/lib/X11/app-defaults       \
6179     /usr/lpp/Xamples/lib/X11/app-defaults       \
6180     /lib/usr/lib/X11/app-defaults               \
6181                                                 \
6182     /usr/openwin/lib/app-defaults               \
6183     /usr/openwin/lib/X11/app-defaults           \
6184     /usr/openwin/share/lib/app-defaults         \
6185     /usr/openwin/share/lib/X11/app-defaults     \
6186                                                 \
6187     /X11R6/lib/app-defaults                     \
6188     /X11R5/lib/app-defaults                     \
6189     /X11R4/lib/app-defaults                     \
6190     ; \
6191   do
6192     if test -d "$ac_dir"; then
6193       ac_x_app_defaults=$ac_dir
6194       break
6195     fi
6196   done
6197
6198       fi
6199       if test x"$ac_x_app_defaults" = x; then
6200         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
6201       else
6202         # Record where we found app-defaults for the cache.
6203         ac_cv_x_app_defaults="$ac_x_app_defaults"
6204       fi
6205 fi
6206 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
6207 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
6208     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
6209 case "$host" in
6210     *-hpux*)
6211
6212       # The following arcana was gleaned from conversations with
6213       # Eric Schwartz <erics@col.hp.com>:
6214       #
6215       # On HPUX 10.x, the parts of X that HP considers "standard" live in
6216       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6217       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6218       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6219       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6220       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6221       # you don't need any -I or -L arguments.
6222       #
6223       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6224       # are the same division as 10.x.  However, there are no symlinks to
6225       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6226       # arguments are always necessary.
6227       #
6228       # However, X11R6 was available on HPUX 9.x as a patch: if that
6229       # patch was installed, then all of X11R6 went in to
6230       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6231       #
6232       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6233       # whether R5 was available as a patch; R6 undoubtedly was not.)
6234       #
6235       # So.  We try and use the highest numbered pair of
6236       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6237       # that are available.  We do not mix and match different versions
6238       # of X.
6239       #
6240       # Question I still don't know the answer to: (do you?)
6241       #
6242       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6243       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6244       #     that contrib directory?  Did it contain so-called "standard"
6245       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6246       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6247       #     be a situation where one had to reach into the R5 headers and
6248       #     libs to find Xmu?  That is, must both R6 and R5 directories
6249       #     be on the -I and -L lists in that case?
6250       #
6251       for version in X11R6 X11R5 X11R4 ; do
6252         # if either pair of directories exists...
6253         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6254         then
6255            # if contrib exists, use it...
6256            if test -d /usr/contrib/$version/include ; then
6257              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6258              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6259            fi
6260            # if the "standard" one exists, use it.
6261            if test -d /usr/include/$version ; then
6262              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6263              X_LIBS="$X_LIBS -L/usr/lib/$version"
6264            fi
6265            # since at least one of the pair exists, go no farther.
6266            break
6267         fi
6268       done
6269
6270       # Now find Motif.  Thanks for not making xmkmf find this by
6271       # default, you losers.
6272       #
6273       if test -d /usr/include/Motif2.1 ; then
6274         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6275         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6276       elif test -d /usr/include/Motif1.2 ; then
6277         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6278         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6279       elif test -d /usr/include/Motif1.1 ; then
6280         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6281         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6282       fi
6283
6284       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6285       #
6286       if test -d /opt/graphics/OpenGL/include ; then
6287         # HP-UX 10.20 puts it here
6288         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6289         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6290       elif test -d /opt/Mesa/lib ; then
6291         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6292         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6293       fi
6294
6295
6296       if test -d /opt/xpm/lib/X11 ; then
6297         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6298         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6299       fi
6300
6301       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6302       # in /usr/local/, unless there is already an xscreensaver in
6303       # /usr/local/bin/.  This can be overridden with the --prefix arg
6304       # to configure.  I'm not sure this is the right thing to do, but
6305       # Richard Lloyd says so...
6306       #
6307       if test \! -x /usr/local/bin/xscreensaver ; then
6308         ac_default_prefix=/opt/xscreensaver
6309       fi
6310
6311     ;;
6312     *-solaris*)
6313
6314       # Thanks for not making xmkmf find this by default, pinheads.
6315       # And thanks for moving things around again, too.  Is this
6316       # really the standard location now?  What happened to the
6317       # joke that this kind of thing went in /opt?
6318       # cthomp says "answer: CDE (Common Disorganized Environment)"
6319       #
6320       if test -f /usr/dt/include/Xm/Xm.h ; then
6321         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6322         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
6323
6324         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6325         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
6326 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
6327 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
6328   echo $ECHO_N "(cached) $ECHO_C" >&6
6329 else
6330   ac_check_lib_save_LIBS=$LIBS
6331 LIBS="-lgen  $LIBS"
6332 cat >conftest.$ac_ext <<_ACEOF
6333 #line $LINENO "configure"
6334 /* confdefs.h.  */
6335 _ACEOF
6336 cat confdefs.h >>conftest.$ac_ext
6337 cat >>conftest.$ac_ext <<_ACEOF
6338 /* end confdefs.h.  */
6339
6340 /* Override any gcc2 internal prototype to avoid an error.  */
6341 #ifdef __cplusplus
6342 extern "C"
6343 #endif
6344 /* We use char because int might match the return type of a gcc2
6345    builtin and then its argument prototype would still apply.  */
6346 char regcmp ();
6347 int
6348 main ()
6349 {
6350 regcmp ();
6351   ;
6352   return 0;
6353 }
6354 _ACEOF
6355 rm -f conftest.$ac_objext conftest$ac_exeext
6356 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6357   (eval $ac_link) 2>&5
6358   ac_status=$?
6359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6360   (exit $ac_status); } &&
6361          { ac_try='test -s conftest$ac_exeext'
6362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6363   (eval $ac_try) 2>&5
6364   ac_status=$?
6365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6366   (exit $ac_status); }; }; then
6367   ac_cv_lib_gen_regcmp=yes
6368 else
6369   echo "$as_me: failed program was:" >&5
6370 sed 's/^/| /' conftest.$ac_ext >&5
6371
6372 ac_cv_lib_gen_regcmp=no
6373 fi
6374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6375 LIBS=$ac_check_lib_save_LIBS
6376 fi
6377 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
6378 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
6379 if test $ac_cv_lib_gen_regcmp = yes; then
6380   MOTIF_LIBS="$MOTIF_LIBS -lgen"
6381 fi
6382
6383       fi
6384
6385     ;;
6386     *-darwin*)
6387
6388       # On MacOS X (10.x with "fink"), many things are under /sw/.
6389       #
6390       if test -d /sw/include ; then
6391         X_CFLAGS="-I/sw/include $X_CFLAGS"
6392         X_LIBS="-L/sw/lib $X_LIBS"
6393       fi
6394     ;;
6395   esac
6396 echo "$as_me:$LINENO: checking for XPointer" >&5
6397 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
6398 if test "${ac_cv_xpointer+set}" = set; then
6399   echo $ECHO_N "(cached) $ECHO_C" >&6
6400 else
6401
6402   ac_save_CPPFLAGS="$CPPFLAGS"
6403   if test \! -z "$includedir" ; then
6404     CPPFLAGS="$CPPFLAGS -I$includedir"
6405   fi
6406   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6407   cat >conftest.$ac_ext <<_ACEOF
6408 #line $LINENO "configure"
6409 /* confdefs.h.  */
6410 _ACEOF
6411 cat confdefs.h >>conftest.$ac_ext
6412 cat >>conftest.$ac_ext <<_ACEOF
6413 /* end confdefs.h.  */
6414 #include <X11/Xlib.h>
6415 int
6416 main ()
6417 {
6418 XPointer foo = (XPointer) 0;
6419   ;
6420   return 0;
6421 }
6422 _ACEOF
6423 rm -f conftest.$ac_objext
6424 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6425   (eval $ac_compile) 2>&5
6426   ac_status=$?
6427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6428   (exit $ac_status); } &&
6429          { ac_try='test -s conftest.$ac_objext'
6430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6431   (eval $ac_try) 2>&5
6432   ac_status=$?
6433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6434   (exit $ac_status); }; }; then
6435   ac_cv_xpointer=yes
6436 else
6437   echo "$as_me: failed program was:" >&5
6438 sed 's/^/| /' conftest.$ac_ext >&5
6439
6440 ac_cv_xpointer=no
6441 fi
6442 rm -f conftest.$ac_objext conftest.$ac_ext
6443   CPPFLAGS="$ac_save_CPPFLAGS"
6444 fi
6445 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
6446 echo "${ECHO_T}$ac_cv_xpointer" >&6
6447   if test "$ac_cv_xpointer" != yes; then
6448    cat >>confdefs.h <<\_ACEOF
6449 #define XPointer char*
6450 _ACEOF
6451
6452   fi
6453
6454 echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
6455 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6
6456   ac_macosx=no
6457   case "$host" in
6458     *-apple-darwin* )
6459       ac_macosx=yes
6460     ;;
6461   esac
6462 echo "$as_me:$LINENO: result: $ac_macosx" >&5
6463 echo "${ECHO_T}$ac_macosx" >&6
6464
6465
6466
6467 ###############################################################################
6468 #
6469 #       Gettext support
6470 #
6471 ###############################################################################
6472
6473
6474
6475 if test -n ""; then
6476     echo "$as_me:$LINENO: checking for intltool >= " >&5
6477 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
6478
6479     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
6480     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
6481
6482     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
6483
6484
6485     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
6486         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
6487 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
6488     else
6489         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
6490 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
6491         exit 1
6492     fi
6493 fi
6494
6495   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'
6496 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'
6497      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'
6498       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
6499      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'
6500    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'
6501     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'
6502 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'
6503        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'
6504       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'
6505     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'
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519 # Use the tools built into the package, not the ones that are installed.
6520
6521 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
6522 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
6523 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
6524
6525
6526
6527
6528
6529 # Extract the first word of "perl", so it can be a program name with args.
6530 set dummy perl; ac_word=$2
6531 echo "$as_me:$LINENO: checking for $ac_word" >&5
6532 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6533 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
6534   echo $ECHO_N "(cached) $ECHO_C" >&6
6535 else
6536   case $INTLTOOL_PERL in
6537   [\\/]* | ?:[\\/]*)
6538   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
6539   ;;
6540   *)
6541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542 for as_dir in $PATH
6543 do
6544   IFS=$as_save_IFS
6545   test -z "$as_dir" && as_dir=.
6546   for ac_exec_ext in '' $ac_executable_extensions; do
6547   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6548     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
6549     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6550     break 2
6551   fi
6552 done
6553 done
6554
6555   ;;
6556 esac
6557 fi
6558 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
6559
6560 if test -n "$INTLTOOL_PERL"; then
6561   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
6562 echo "${ECHO_T}$INTLTOOL_PERL" >&6
6563 else
6564   echo "$as_me:$LINENO: result: no" >&5
6565 echo "${ECHO_T}no" >&6
6566 fi
6567
6568 if test -z "$INTLTOOL_PERL"; then
6569    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
6570 echo "$as_me: error: perl not found; required for intltool" >&2;}
6571    { (exit 1); exit 1; }; }
6572 fi
6573 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
6574    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
6575 echo "$as_me: error: perl 5.x required for intltool" >&2;}
6576    { (exit 1); exit 1; }; }
6577 fi
6578
6579 # Remove file type tags (using []) from po/POTFILES.
6580
6581
6582
6583
6584
6585
6586
6587 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
6588
6589           ac_config_commands="$ac_config_commands default-1"
6590
6591
6592
6593 GETTEXT_PACKAGE=xscreensaver
6594 cat >>confdefs.h <<_ACEOF
6595 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
6596 _ACEOF
6597
6598 cat >>confdefs.h <<_ACEOF
6599 #define PACKAGE "$GETTEXT_PACKAGE"
6600 _ACEOF
6601
6602
6603
6604 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"
6605 if test -n "$ac_tool_prefix"; then
6606   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6607 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6608 echo "$as_me:$LINENO: checking for $ac_word" >&5
6609 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6610 if test "${ac_cv_prog_RANLIB+set}" = set; then
6611   echo $ECHO_N "(cached) $ECHO_C" >&6
6612 else
6613   if test -n "$RANLIB"; then
6614   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6615 else
6616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6617 for as_dir in $PATH
6618 do
6619   IFS=$as_save_IFS
6620   test -z "$as_dir" && as_dir=.
6621   for ac_exec_ext in '' $ac_executable_extensions; do
6622   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6623     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6624     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6625     break 2
6626   fi
6627 done
6628 done
6629
6630 fi
6631 fi
6632 RANLIB=$ac_cv_prog_RANLIB
6633 if test -n "$RANLIB"; then
6634   echo "$as_me:$LINENO: result: $RANLIB" >&5
6635 echo "${ECHO_T}$RANLIB" >&6
6636 else
6637   echo "$as_me:$LINENO: result: no" >&5
6638 echo "${ECHO_T}no" >&6
6639 fi
6640
6641 fi
6642 if test -z "$ac_cv_prog_RANLIB"; then
6643   ac_ct_RANLIB=$RANLIB
6644   # Extract the first word of "ranlib", so it can be a program name with args.
6645 set dummy ranlib; ac_word=$2
6646 echo "$as_me:$LINENO: checking for $ac_word" >&5
6647 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6648 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6649   echo $ECHO_N "(cached) $ECHO_C" >&6
6650 else
6651   if test -n "$ac_ct_RANLIB"; then
6652   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6653 else
6654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6655 for as_dir in $PATH
6656 do
6657   IFS=$as_save_IFS
6658   test -z "$as_dir" && as_dir=.
6659   for ac_exec_ext in '' $ac_executable_extensions; do
6660   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6661     ac_cv_prog_ac_ct_RANLIB="ranlib"
6662     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6663     break 2
6664   fi
6665 done
6666 done
6667
6668   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6669 fi
6670 fi
6671 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6672 if test -n "$ac_ct_RANLIB"; then
6673   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6674 echo "${ECHO_T}$ac_ct_RANLIB" >&6
6675 else
6676   echo "$as_me:$LINENO: result: no" >&5
6677 echo "${ECHO_T}no" >&6
6678 fi
6679
6680   RANLIB=$ac_ct_RANLIB
6681 else
6682   RANLIB="$ac_cv_prog_RANLIB"
6683 fi
6684
6685 echo "$as_me:$LINENO: checking for off_t" >&5
6686 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
6687 if test "${ac_cv_type_off_t+set}" = set; then
6688   echo $ECHO_N "(cached) $ECHO_C" >&6
6689 else
6690   cat >conftest.$ac_ext <<_ACEOF
6691 #line $LINENO "configure"
6692 /* confdefs.h.  */
6693 _ACEOF
6694 cat confdefs.h >>conftest.$ac_ext
6695 cat >>conftest.$ac_ext <<_ACEOF
6696 /* end confdefs.h.  */
6697 $ac_includes_default
6698 int
6699 main ()
6700 {
6701 if ((off_t *) 0)
6702   return 0;
6703 if (sizeof (off_t))
6704   return 0;
6705   ;
6706   return 0;
6707 }
6708 _ACEOF
6709 rm -f conftest.$ac_objext
6710 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6711   (eval $ac_compile) 2>&5
6712   ac_status=$?
6713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6714   (exit $ac_status); } &&
6715          { ac_try='test -s conftest.$ac_objext'
6716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6717   (eval $ac_try) 2>&5
6718   ac_status=$?
6719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6720   (exit $ac_status); }; }; then
6721   ac_cv_type_off_t=yes
6722 else
6723   echo "$as_me: failed program was:" >&5
6724 sed 's/^/| /' conftest.$ac_ext >&5
6725
6726 ac_cv_type_off_t=no
6727 fi
6728 rm -f conftest.$ac_objext conftest.$ac_ext
6729 fi
6730 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6731 echo "${ECHO_T}$ac_cv_type_off_t" >&6
6732 if test $ac_cv_type_off_t = yes; then
6733   :
6734 else
6735
6736 cat >>confdefs.h <<_ACEOF
6737 #define off_t long
6738 _ACEOF
6739
6740 fi
6741
6742 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6743 # for constant arguments.  Useless!
6744 echo "$as_me:$LINENO: checking for working alloca.h" >&5
6745 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
6746 if test "${ac_cv_working_alloca_h+set}" = set; then
6747   echo $ECHO_N "(cached) $ECHO_C" >&6
6748 else
6749   cat >conftest.$ac_ext <<_ACEOF
6750 #line $LINENO "configure"
6751 /* confdefs.h.  */
6752 _ACEOF
6753 cat confdefs.h >>conftest.$ac_ext
6754 cat >>conftest.$ac_ext <<_ACEOF
6755 /* end confdefs.h.  */
6756 #include <alloca.h>
6757 int
6758 main ()
6759 {
6760 char *p = (char *) alloca (2 * sizeof (int));
6761   ;
6762   return 0;
6763 }
6764 _ACEOF
6765 rm -f conftest.$ac_objext conftest$ac_exeext
6766 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6767   (eval $ac_link) 2>&5
6768   ac_status=$?
6769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6770   (exit $ac_status); } &&
6771          { ac_try='test -s conftest$ac_exeext'
6772   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6773   (eval $ac_try) 2>&5
6774   ac_status=$?
6775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6776   (exit $ac_status); }; }; then
6777   ac_cv_working_alloca_h=yes
6778 else
6779   echo "$as_me: failed program was:" >&5
6780 sed 's/^/| /' conftest.$ac_ext >&5
6781
6782 ac_cv_working_alloca_h=no
6783 fi
6784 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6785 fi
6786 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
6787 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
6788 if test $ac_cv_working_alloca_h = yes; then
6789
6790 cat >>confdefs.h <<\_ACEOF
6791 #define HAVE_ALLOCA_H 1
6792 _ACEOF
6793
6794 fi
6795
6796 echo "$as_me:$LINENO: checking for alloca" >&5
6797 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
6798 if test "${ac_cv_func_alloca_works+set}" = set; then
6799   echo $ECHO_N "(cached) $ECHO_C" >&6
6800 else
6801   cat >conftest.$ac_ext <<_ACEOF
6802 #line $LINENO "configure"
6803 /* confdefs.h.  */
6804 _ACEOF
6805 cat confdefs.h >>conftest.$ac_ext
6806 cat >>conftest.$ac_ext <<_ACEOF
6807 /* end confdefs.h.  */
6808 #ifdef __GNUC__
6809 # define alloca __builtin_alloca
6810 #else
6811 # ifdef _MSC_VER
6812 #  include <malloc.h>
6813 #  define alloca _alloca
6814 # else
6815 #  if HAVE_ALLOCA_H
6816 #   include <alloca.h>
6817 #  else
6818 #   ifdef _AIX
6819  #pragma alloca
6820 #   else
6821 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6822 char *alloca ();
6823 #    endif
6824 #   endif
6825 #  endif
6826 # endif
6827 #endif
6828
6829 int
6830 main ()
6831 {
6832 char *p = (char *) alloca (1);
6833   ;
6834   return 0;
6835 }
6836 _ACEOF
6837 rm -f conftest.$ac_objext conftest$ac_exeext
6838 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6839   (eval $ac_link) 2>&5
6840   ac_status=$?
6841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6842   (exit $ac_status); } &&
6843          { ac_try='test -s conftest$ac_exeext'
6844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6845   (eval $ac_try) 2>&5
6846   ac_status=$?
6847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6848   (exit $ac_status); }; }; then
6849   ac_cv_func_alloca_works=yes
6850 else
6851   echo "$as_me: failed program was:" >&5
6852 sed 's/^/| /' conftest.$ac_ext >&5
6853
6854 ac_cv_func_alloca_works=no
6855 fi
6856 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6857 fi
6858 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
6859 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
6860
6861 if test $ac_cv_func_alloca_works = yes; then
6862
6863 cat >>confdefs.h <<\_ACEOF
6864 #define HAVE_ALLOCA 1
6865 _ACEOF
6866
6867 else
6868   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6869 # that cause trouble.  Some versions do not even contain alloca or
6870 # contain a buggy version.  If you still want to use their alloca,
6871 # use ar to extract alloca.o from them instead of compiling alloca.c.
6872
6873 ALLOCA=alloca.$ac_objext
6874
6875 cat >>confdefs.h <<\_ACEOF
6876 #define C_ALLOCA 1
6877 _ACEOF
6878
6879
6880 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
6881 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
6882 if test "${ac_cv_os_cray+set}" = set; then
6883   echo $ECHO_N "(cached) $ECHO_C" >&6
6884 else
6885   cat >conftest.$ac_ext <<_ACEOF
6886 #line $LINENO "configure"
6887 /* confdefs.h.  */
6888 _ACEOF
6889 cat confdefs.h >>conftest.$ac_ext
6890 cat >>conftest.$ac_ext <<_ACEOF
6891 /* end confdefs.h.  */
6892 #if defined(CRAY) && ! defined(CRAY2)
6893 webecray
6894 #else
6895 wenotbecray
6896 #endif
6897
6898 _ACEOF
6899 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6900   $EGREP "webecray" >/dev/null 2>&1; then
6901   ac_cv_os_cray=yes
6902 else
6903   ac_cv_os_cray=no
6904 fi
6905 rm -f conftest*
6906
6907 fi
6908 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
6909 echo "${ECHO_T}$ac_cv_os_cray" >&6
6910 if test $ac_cv_os_cray = yes; then
6911   for ac_func in _getb67 GETB67 getb67; do
6912     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6913 echo "$as_me:$LINENO: checking for $ac_func" >&5
6914 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6915 if eval "test \"\${$as_ac_var+set}\" = set"; then
6916   echo $ECHO_N "(cached) $ECHO_C" >&6
6917 else
6918   cat >conftest.$ac_ext <<_ACEOF
6919 #line $LINENO "configure"
6920 /* confdefs.h.  */
6921 _ACEOF
6922 cat confdefs.h >>conftest.$ac_ext
6923 cat >>conftest.$ac_ext <<_ACEOF
6924 /* end confdefs.h.  */
6925 /* System header to define __stub macros and hopefully few prototypes,
6926     which can conflict with char $ac_func (); below.
6927     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6928     <limits.h> exists even on freestanding compilers.  */
6929 #ifdef __STDC__
6930 # include <limits.h>
6931 #else
6932 # include <assert.h>
6933 #endif
6934 /* Override any gcc2 internal prototype to avoid an error.  */
6935 #ifdef __cplusplus
6936 extern "C"
6937 {
6938 #endif
6939 /* We use char because int might match the return type of a gcc2
6940    builtin and then its argument prototype would still apply.  */
6941 char $ac_func ();
6942 /* The GNU C library defines this for functions which it implements
6943     to always fail with ENOSYS.  Some functions are actually named
6944     something starting with __ and the normal name is an alias.  */
6945 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6946 choke me
6947 #else
6948 char (*f) () = $ac_func;
6949 #endif
6950 #ifdef __cplusplus
6951 }
6952 #endif
6953
6954 int
6955 main ()
6956 {
6957 return f != $ac_func;
6958   ;
6959   return 0;
6960 }
6961 _ACEOF
6962 rm -f conftest.$ac_objext conftest$ac_exeext
6963 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6964   (eval $ac_link) 2>&5
6965   ac_status=$?
6966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6967   (exit $ac_status); } &&
6968          { ac_try='test -s conftest$ac_exeext'
6969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6970   (eval $ac_try) 2>&5
6971   ac_status=$?
6972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6973   (exit $ac_status); }; }; then
6974   eval "$as_ac_var=yes"
6975 else
6976   echo "$as_me: failed program was:" >&5
6977 sed 's/^/| /' conftest.$ac_ext >&5
6978
6979 eval "$as_ac_var=no"
6980 fi
6981 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6982 fi
6983 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6984 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6985 if test `eval echo '${'$as_ac_var'}'` = yes; then
6986
6987 cat >>confdefs.h <<_ACEOF
6988 #define CRAY_STACKSEG_END $ac_func
6989 _ACEOF
6990
6991     break
6992 fi
6993
6994   done
6995 fi
6996
6997 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
6998 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
6999 if test "${ac_cv_c_stack_direction+set}" = set; then
7000   echo $ECHO_N "(cached) $ECHO_C" >&6
7001 else
7002   if test "$cross_compiling" = yes; then
7003   ac_cv_c_stack_direction=0
7004 else
7005   cat >conftest.$ac_ext <<_ACEOF
7006 #line $LINENO "configure"
7007 /* confdefs.h.  */
7008 _ACEOF
7009 cat confdefs.h >>conftest.$ac_ext
7010 cat >>conftest.$ac_ext <<_ACEOF
7011 /* end confdefs.h.  */
7012 int
7013 find_stack_direction ()
7014 {
7015   static char *addr = 0;
7016   auto char dummy;
7017   if (addr == 0)
7018     {
7019       addr = &dummy;
7020       return find_stack_direction ();
7021     }
7022   else
7023     return (&dummy > addr) ? 1 : -1;
7024 }
7025
7026 int
7027 main ()
7028 {
7029   exit (find_stack_direction () < 0);
7030 }
7031 _ACEOF
7032 rm -f conftest$ac_exeext
7033 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7034   (eval $ac_link) 2>&5
7035   ac_status=$?
7036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7037   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7039   (eval $ac_try) 2>&5
7040   ac_status=$?
7041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7042   (exit $ac_status); }; }; then
7043   ac_cv_c_stack_direction=1
7044 else
7045   echo "$as_me: program exited with status $ac_status" >&5
7046 echo "$as_me: failed program was:" >&5
7047 sed 's/^/| /' conftest.$ac_ext >&5
7048
7049 ( exit $ac_status )
7050 ac_cv_c_stack_direction=-1
7051 fi
7052 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7053 fi
7054 fi
7055 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
7056 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
7057
7058 cat >>confdefs.h <<_ACEOF
7059 #define STACK_DIRECTION $ac_cv_c_stack_direction
7060 _ACEOF
7061
7062
7063 fi
7064
7065
7066
7067 for ac_header in stdlib.h unistd.h
7068 do
7069 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7070 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7071   echo "$as_me:$LINENO: checking for $ac_header" >&5
7072 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7073 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7074   echo $ECHO_N "(cached) $ECHO_C" >&6
7075 fi
7076 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7077 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7078 else
7079   # Is the header compilable?
7080 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7081 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7082 cat >conftest.$ac_ext <<_ACEOF
7083 #line $LINENO "configure"
7084 /* confdefs.h.  */
7085 _ACEOF
7086 cat confdefs.h >>conftest.$ac_ext
7087 cat >>conftest.$ac_ext <<_ACEOF
7088 /* end confdefs.h.  */
7089 $ac_includes_default
7090 #include <$ac_header>
7091 _ACEOF
7092 rm -f conftest.$ac_objext
7093 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7094   (eval $ac_compile) 2>&5
7095   ac_status=$?
7096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7097   (exit $ac_status); } &&
7098          { ac_try='test -s conftest.$ac_objext'
7099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7100   (eval $ac_try) 2>&5
7101   ac_status=$?
7102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7103   (exit $ac_status); }; }; then
7104   ac_header_compiler=yes
7105 else
7106   echo "$as_me: failed program was:" >&5
7107 sed 's/^/| /' conftest.$ac_ext >&5
7108
7109 ac_header_compiler=no
7110 fi
7111 rm -f conftest.$ac_objext conftest.$ac_ext
7112 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7113 echo "${ECHO_T}$ac_header_compiler" >&6
7114
7115 # Is the header present?
7116 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7117 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7118 cat >conftest.$ac_ext <<_ACEOF
7119 #line $LINENO "configure"
7120 /* confdefs.h.  */
7121 _ACEOF
7122 cat confdefs.h >>conftest.$ac_ext
7123 cat >>conftest.$ac_ext <<_ACEOF
7124 /* end confdefs.h.  */
7125 #include <$ac_header>
7126 _ACEOF
7127 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7128   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7129   ac_status=$?
7130   grep -v '^ *+' conftest.er1 >conftest.err
7131   rm -f conftest.er1
7132   cat conftest.err >&5
7133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7134   (exit $ac_status); } >/dev/null; then
7135   if test -s conftest.err; then
7136     ac_cpp_err=$ac_c_preproc_warn_flag
7137   else
7138     ac_cpp_err=
7139   fi
7140 else
7141   ac_cpp_err=yes
7142 fi
7143 if test -z "$ac_cpp_err"; then
7144   ac_header_preproc=yes
7145 else
7146   echo "$as_me: failed program was:" >&5
7147 sed 's/^/| /' conftest.$ac_ext >&5
7148
7149   ac_header_preproc=no
7150 fi
7151 rm -f conftest.err conftest.$ac_ext
7152 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7153 echo "${ECHO_T}$ac_header_preproc" >&6
7154
7155 # So?  What about this header?
7156 case $ac_header_compiler:$ac_header_preproc in
7157   yes:no )
7158     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7159 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7160     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7161 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7162     (
7163       cat <<\_ASBOX
7164 ## ------------------------------------ ##
7165 ## Report this to bug-autoconf@gnu.org. ##
7166 ## ------------------------------------ ##
7167 _ASBOX
7168     ) |
7169       sed "s/^/$as_me: WARNING:     /" >&2
7170     ;;
7171   no:yes )
7172     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7173 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7174     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7175 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7176     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7177 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7178     (
7179       cat <<\_ASBOX
7180 ## ------------------------------------ ##
7181 ## Report this to bug-autoconf@gnu.org. ##
7182 ## ------------------------------------ ##
7183 _ASBOX
7184     ) |
7185       sed "s/^/$as_me: WARNING:     /" >&2
7186     ;;
7187 esac
7188 echo "$as_me:$LINENO: checking for $ac_header" >&5
7189 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7190 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7191   echo $ECHO_N "(cached) $ECHO_C" >&6
7192 else
7193   eval "$as_ac_Header=$ac_header_preproc"
7194 fi
7195 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7196 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7197
7198 fi
7199 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7200   cat >>confdefs.h <<_ACEOF
7201 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7202 _ACEOF
7203
7204 fi
7205
7206 done
7207
7208
7209 for ac_func in getpagesize
7210 do
7211 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7212 echo "$as_me:$LINENO: checking for $ac_func" >&5
7213 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7214 if eval "test \"\${$as_ac_var+set}\" = set"; then
7215   echo $ECHO_N "(cached) $ECHO_C" >&6
7216 else
7217   cat >conftest.$ac_ext <<_ACEOF
7218 #line $LINENO "configure"
7219 /* confdefs.h.  */
7220 _ACEOF
7221 cat confdefs.h >>conftest.$ac_ext
7222 cat >>conftest.$ac_ext <<_ACEOF
7223 /* end confdefs.h.  */
7224 /* System header to define __stub macros and hopefully few prototypes,
7225     which can conflict with char $ac_func (); below.
7226     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7227     <limits.h> exists even on freestanding compilers.  */
7228 #ifdef __STDC__
7229 # include <limits.h>
7230 #else
7231 # include <assert.h>
7232 #endif
7233 /* Override any gcc2 internal prototype to avoid an error.  */
7234 #ifdef __cplusplus
7235 extern "C"
7236 {
7237 #endif
7238 /* We use char because int might match the return type of a gcc2
7239    builtin and then its argument prototype would still apply.  */
7240 char $ac_func ();
7241 /* The GNU C library defines this for functions which it implements
7242     to always fail with ENOSYS.  Some functions are actually named
7243     something starting with __ and the normal name is an alias.  */
7244 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7245 choke me
7246 #else
7247 char (*f) () = $ac_func;
7248 #endif
7249 #ifdef __cplusplus
7250 }
7251 #endif
7252
7253 int
7254 main ()
7255 {
7256 return f != $ac_func;
7257   ;
7258   return 0;
7259 }
7260 _ACEOF
7261 rm -f conftest.$ac_objext conftest$ac_exeext
7262 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7263   (eval $ac_link) 2>&5
7264   ac_status=$?
7265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7266   (exit $ac_status); } &&
7267          { ac_try='test -s conftest$ac_exeext'
7268   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7269   (eval $ac_try) 2>&5
7270   ac_status=$?
7271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7272   (exit $ac_status); }; }; then
7273   eval "$as_ac_var=yes"
7274 else
7275   echo "$as_me: failed program was:" >&5
7276 sed 's/^/| /' conftest.$ac_ext >&5
7277
7278 eval "$as_ac_var=no"
7279 fi
7280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7281 fi
7282 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7283 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7284 if test `eval echo '${'$as_ac_var'}'` = yes; then
7285   cat >>confdefs.h <<_ACEOF
7286 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7287 _ACEOF
7288
7289 fi
7290 done
7291
7292 echo "$as_me:$LINENO: checking for working mmap" >&5
7293 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7294 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7295   echo $ECHO_N "(cached) $ECHO_C" >&6
7296 else
7297   if test "$cross_compiling" = yes; then
7298   ac_cv_func_mmap_fixed_mapped=no
7299 else
7300   cat >conftest.$ac_ext <<_ACEOF
7301 #line $LINENO "configure"
7302 /* confdefs.h.  */
7303 _ACEOF
7304 cat confdefs.h >>conftest.$ac_ext
7305 cat >>conftest.$ac_ext <<_ACEOF
7306 /* end confdefs.h.  */
7307 $ac_includes_default
7308 /* malloc might have been renamed as rpl_malloc. */
7309 #undef malloc
7310
7311 /* Thanks to Mike Haertel and Jim Avera for this test.
7312    Here is a matrix of mmap possibilities:
7313         mmap private not fixed
7314         mmap private fixed at somewhere currently unmapped
7315         mmap private fixed at somewhere already mapped
7316         mmap shared not fixed
7317         mmap shared fixed at somewhere currently unmapped
7318         mmap shared fixed at somewhere already mapped
7319    For private mappings, we should verify that changes cannot be read()
7320    back from the file, nor mmap's back from the file at a different
7321    address.  (There have been systems where private was not correctly
7322    implemented like the infamous i386 svr4.0, and systems where the
7323    VM page cache was not coherent with the file system buffer cache
7324    like early versions of FreeBSD and possibly contemporary NetBSD.)
7325    For shared mappings, we should conversely verify that changes get
7326    propagated back to all the places they're supposed to be.
7327
7328    Grep wants private fixed already mapped.
7329    The main things grep needs to know about mmap are:
7330    * does it exist and is it safe to write into the mmap'd area
7331    * how to use it (BSD variants)  */
7332
7333 #include <fcntl.h>
7334 #include <sys/mman.h>
7335
7336 #if !STDC_HEADERS && !HAVE_STDLIB_H
7337 char *malloc ();
7338 #endif
7339
7340 /* This mess was copied from the GNU getpagesize.h.  */
7341 #if !HAVE_GETPAGESIZE
7342 /* Assume that all systems that can run configure have sys/param.h.  */
7343 # if !HAVE_SYS_PARAM_H
7344 #  define HAVE_SYS_PARAM_H 1
7345 # endif
7346
7347 # ifdef _SC_PAGESIZE
7348 #  define getpagesize() sysconf(_SC_PAGESIZE)
7349 # else /* no _SC_PAGESIZE */
7350 #  if HAVE_SYS_PARAM_H
7351 #   include <sys/param.h>
7352 #   ifdef EXEC_PAGESIZE
7353 #    define getpagesize() EXEC_PAGESIZE
7354 #   else /* no EXEC_PAGESIZE */
7355 #    ifdef NBPG
7356 #     define getpagesize() NBPG * CLSIZE
7357 #     ifndef CLSIZE
7358 #      define CLSIZE 1
7359 #     endif /* no CLSIZE */
7360 #    else /* no NBPG */
7361 #     ifdef NBPC
7362 #      define getpagesize() NBPC
7363 #     else /* no NBPC */
7364 #      ifdef PAGESIZE
7365 #       define getpagesize() PAGESIZE
7366 #      endif /* PAGESIZE */
7367 #     endif /* no NBPC */
7368 #    endif /* no NBPG */
7369 #   endif /* no EXEC_PAGESIZE */
7370 #  else /* no HAVE_SYS_PARAM_H */
7371 #   define getpagesize() 8192   /* punt totally */
7372 #  endif /* no HAVE_SYS_PARAM_H */
7373 # endif /* no _SC_PAGESIZE */
7374
7375 #endif /* no HAVE_GETPAGESIZE */
7376
7377 int
7378 main ()
7379 {
7380   char *data, *data2, *data3;
7381   int i, pagesize;
7382   int fd;
7383
7384   pagesize = getpagesize ();
7385
7386   /* First, make a file with some known garbage in it. */
7387   data = (char *) malloc (pagesize);
7388   if (!data)
7389     exit (1);
7390   for (i = 0; i < pagesize; ++i)
7391     *(data + i) = rand ();
7392   umask (0);
7393   fd = creat ("conftest.mmap", 0600);
7394   if (fd < 0)
7395     exit (1);
7396   if (write (fd, data, pagesize) != pagesize)
7397     exit (1);
7398   close (fd);
7399
7400   /* Next, try to mmap the file at a fixed address which already has
7401      something else allocated at it.  If we can, also make sure that
7402      we see the same garbage.  */
7403   fd = open ("conftest.mmap", O_RDWR);
7404   if (fd < 0)
7405     exit (1);
7406   data2 = (char *) malloc (2 * pagesize);
7407   if (!data2)
7408     exit (1);
7409   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7410   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7411                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
7412     exit (1);
7413   for (i = 0; i < pagesize; ++i)
7414     if (*(data + i) != *(data2 + i))
7415       exit (1);
7416
7417   /* Finally, make sure that changes to the mapped area do not
7418      percolate back to the file as seen by read().  (This is a bug on
7419      some variants of i386 svr4.0.)  */
7420   for (i = 0; i < pagesize; ++i)
7421     *(data2 + i) = *(data2 + i) + 1;
7422   data3 = (char *) malloc (pagesize);
7423   if (!data3)
7424     exit (1);
7425   if (read (fd, data3, pagesize) != pagesize)
7426     exit (1);
7427   for (i = 0; i < pagesize; ++i)
7428     if (*(data + i) != *(data3 + i))
7429       exit (1);
7430   close (fd);
7431   exit (0);
7432 }
7433 _ACEOF
7434 rm -f conftest$ac_exeext
7435 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7436   (eval $ac_link) 2>&5
7437   ac_status=$?
7438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7439   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7441   (eval $ac_try) 2>&5
7442   ac_status=$?
7443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7444   (exit $ac_status); }; }; then
7445   ac_cv_func_mmap_fixed_mapped=yes
7446 else
7447   echo "$as_me: program exited with status $ac_status" >&5
7448 echo "$as_me: failed program was:" >&5
7449 sed 's/^/| /' conftest.$ac_ext >&5
7450
7451 ( exit $ac_status )
7452 ac_cv_func_mmap_fixed_mapped=no
7453 fi
7454 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7455 fi
7456 fi
7457 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
7458 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7459 if test $ac_cv_func_mmap_fixed_mapped = yes; then
7460
7461 cat >>confdefs.h <<\_ACEOF
7462 #define HAVE_MMAP 1
7463 _ACEOF
7464
7465 fi
7466 rm -f conftest.mmap
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
7478 unistd.h sys/param.h
7479 do
7480 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7481 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7482   echo "$as_me:$LINENO: checking for $ac_header" >&5
7483 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7484 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7485   echo $ECHO_N "(cached) $ECHO_C" >&6
7486 fi
7487 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7488 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7489 else
7490   # Is the header compilable?
7491 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7492 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7493 cat >conftest.$ac_ext <<_ACEOF
7494 #line $LINENO "configure"
7495 /* confdefs.h.  */
7496 _ACEOF
7497 cat confdefs.h >>conftest.$ac_ext
7498 cat >>conftest.$ac_ext <<_ACEOF
7499 /* end confdefs.h.  */
7500 $ac_includes_default
7501 #include <$ac_header>
7502 _ACEOF
7503 rm -f conftest.$ac_objext
7504 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7505   (eval $ac_compile) 2>&5
7506   ac_status=$?
7507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7508   (exit $ac_status); } &&
7509          { ac_try='test -s conftest.$ac_objext'
7510   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7511   (eval $ac_try) 2>&5
7512   ac_status=$?
7513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7514   (exit $ac_status); }; }; then
7515   ac_header_compiler=yes
7516 else
7517   echo "$as_me: failed program was:" >&5
7518 sed 's/^/| /' conftest.$ac_ext >&5
7519
7520 ac_header_compiler=no
7521 fi
7522 rm -f conftest.$ac_objext conftest.$ac_ext
7523 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7524 echo "${ECHO_T}$ac_header_compiler" >&6
7525
7526 # Is the header present?
7527 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7528 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7529 cat >conftest.$ac_ext <<_ACEOF
7530 #line $LINENO "configure"
7531 /* confdefs.h.  */
7532 _ACEOF
7533 cat confdefs.h >>conftest.$ac_ext
7534 cat >>conftest.$ac_ext <<_ACEOF
7535 /* end confdefs.h.  */
7536 #include <$ac_header>
7537 _ACEOF
7538 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7539   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7540   ac_status=$?
7541   grep -v '^ *+' conftest.er1 >conftest.err
7542   rm -f conftest.er1
7543   cat conftest.err >&5
7544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7545   (exit $ac_status); } >/dev/null; then
7546   if test -s conftest.err; then
7547     ac_cpp_err=$ac_c_preproc_warn_flag
7548   else
7549     ac_cpp_err=
7550   fi
7551 else
7552   ac_cpp_err=yes
7553 fi
7554 if test -z "$ac_cpp_err"; then
7555   ac_header_preproc=yes
7556 else
7557   echo "$as_me: failed program was:" >&5
7558 sed 's/^/| /' conftest.$ac_ext >&5
7559
7560   ac_header_preproc=no
7561 fi
7562 rm -f conftest.err conftest.$ac_ext
7563 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7564 echo "${ECHO_T}$ac_header_preproc" >&6
7565
7566 # So?  What about this header?
7567 case $ac_header_compiler:$ac_header_preproc in
7568   yes:no )
7569     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7570 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7571     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7572 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7573     (
7574       cat <<\_ASBOX
7575 ## ------------------------------------ ##
7576 ## Report this to bug-autoconf@gnu.org. ##
7577 ## ------------------------------------ ##
7578 _ASBOX
7579     ) |
7580       sed "s/^/$as_me: WARNING:     /" >&2
7581     ;;
7582   no:yes )
7583     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7584 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7585     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7586 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7587     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7588 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7589     (
7590       cat <<\_ASBOX
7591 ## ------------------------------------ ##
7592 ## Report this to bug-autoconf@gnu.org. ##
7593 ## ------------------------------------ ##
7594 _ASBOX
7595     ) |
7596       sed "s/^/$as_me: WARNING:     /" >&2
7597     ;;
7598 esac
7599 echo "$as_me:$LINENO: checking for $ac_header" >&5
7600 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7601 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7602   echo $ECHO_N "(cached) $ECHO_C" >&6
7603 else
7604   eval "$as_ac_Header=$ac_header_preproc"
7605 fi
7606 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7607 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7608
7609 fi
7610 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7611   cat >>confdefs.h <<_ACEOF
7612 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7613 _ACEOF
7614
7615 fi
7616
7617 done
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
7631 strdup __argz_count __argz_stringify __argz_next
7632 do
7633 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7634 echo "$as_me:$LINENO: checking for $ac_func" >&5
7635 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7636 if eval "test \"\${$as_ac_var+set}\" = set"; then
7637   echo $ECHO_N "(cached) $ECHO_C" >&6
7638 else
7639   cat >conftest.$ac_ext <<_ACEOF
7640 #line $LINENO "configure"
7641 /* confdefs.h.  */
7642 _ACEOF
7643 cat confdefs.h >>conftest.$ac_ext
7644 cat >>conftest.$ac_ext <<_ACEOF
7645 /* end confdefs.h.  */
7646 /* System header to define __stub macros and hopefully few prototypes,
7647     which can conflict with char $ac_func (); below.
7648     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7649     <limits.h> exists even on freestanding compilers.  */
7650 #ifdef __STDC__
7651 # include <limits.h>
7652 #else
7653 # include <assert.h>
7654 #endif
7655 /* Override any gcc2 internal prototype to avoid an error.  */
7656 #ifdef __cplusplus
7657 extern "C"
7658 {
7659 #endif
7660 /* We use char because int might match the return type of a gcc2
7661    builtin and then its argument prototype would still apply.  */
7662 char $ac_func ();
7663 /* The GNU C library defines this for functions which it implements
7664     to always fail with ENOSYS.  Some functions are actually named
7665     something starting with __ and the normal name is an alias.  */
7666 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7667 choke me
7668 #else
7669 char (*f) () = $ac_func;
7670 #endif
7671 #ifdef __cplusplus
7672 }
7673 #endif
7674
7675 int
7676 main ()
7677 {
7678 return f != $ac_func;
7679   ;
7680   return 0;
7681 }
7682 _ACEOF
7683 rm -f conftest.$ac_objext conftest$ac_exeext
7684 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7685   (eval $ac_link) 2>&5
7686   ac_status=$?
7687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7688   (exit $ac_status); } &&
7689          { ac_try='test -s conftest$ac_exeext'
7690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7691   (eval $ac_try) 2>&5
7692   ac_status=$?
7693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7694   (exit $ac_status); }; }; then
7695   eval "$as_ac_var=yes"
7696 else
7697   echo "$as_me: failed program was:" >&5
7698 sed 's/^/| /' conftest.$ac_ext >&5
7699
7700 eval "$as_ac_var=no"
7701 fi
7702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7703 fi
7704 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7705 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7706 if test `eval echo '${'$as_ac_var'}'` = yes; then
7707   cat >>confdefs.h <<_ACEOF
7708 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7709 _ACEOF
7710
7711 fi
7712 done
7713
7714
7715    if test $ac_cv_header_locale_h = yes; then
7716     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
7717 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7718 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7719   echo $ECHO_N "(cached) $ECHO_C" >&6
7720 else
7721   cat >conftest.$ac_ext <<_ACEOF
7722 #line $LINENO "configure"
7723 /* confdefs.h.  */
7724 _ACEOF
7725 cat confdefs.h >>conftest.$ac_ext
7726 cat >>conftest.$ac_ext <<_ACEOF
7727 /* end confdefs.h.  */
7728 #include <locale.h>
7729 int
7730 main ()
7731 {
7732 return LC_MESSAGES
7733   ;
7734   return 0;
7735 }
7736 _ACEOF
7737 rm -f conftest.$ac_objext conftest$ac_exeext
7738 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7739   (eval $ac_link) 2>&5
7740   ac_status=$?
7741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7742   (exit $ac_status); } &&
7743          { ac_try='test -s conftest$ac_exeext'
7744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7745   (eval $ac_try) 2>&5
7746   ac_status=$?
7747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7748   (exit $ac_status); }; }; then
7749   am_cv_val_LC_MESSAGES=yes
7750 else
7751   echo "$as_me: failed program was:" >&5
7752 sed 's/^/| /' conftest.$ac_ext >&5
7753
7754 am_cv_val_LC_MESSAGES=no
7755 fi
7756 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7757 fi
7758 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
7759 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
7760     if test $am_cv_val_LC_MESSAGES = yes; then
7761
7762 cat >>confdefs.h <<\_ACEOF
7763 #define HAVE_LC_MESSAGES 1
7764 _ACEOF
7765
7766     fi
7767   fi
7768      USE_NLS=yes
7769
7770
7771         nls_cv_force_use_gnu_gettext="no"
7772
7773     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7774     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7775                               nls_cv_header_intl=
7776       nls_cv_header_libgt=
7777       CATOBJEXT=NONE
7778
7779       if test "${ac_cv_header_libintl_h+set}" = set; then
7780   echo "$as_me:$LINENO: checking for libintl.h" >&5
7781 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7782 if test "${ac_cv_header_libintl_h+set}" = set; then
7783   echo $ECHO_N "(cached) $ECHO_C" >&6
7784 fi
7785 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7786 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7787 else
7788   # Is the header compilable?
7789 echo "$as_me:$LINENO: checking libintl.h usability" >&5
7790 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
7791 cat >conftest.$ac_ext <<_ACEOF
7792 #line $LINENO "configure"
7793 /* confdefs.h.  */
7794 _ACEOF
7795 cat confdefs.h >>conftest.$ac_ext
7796 cat >>conftest.$ac_ext <<_ACEOF
7797 /* end confdefs.h.  */
7798 $ac_includes_default
7799 #include <libintl.h>
7800 _ACEOF
7801 rm -f conftest.$ac_objext
7802 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7803   (eval $ac_compile) 2>&5
7804   ac_status=$?
7805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7806   (exit $ac_status); } &&
7807          { ac_try='test -s conftest.$ac_objext'
7808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7809   (eval $ac_try) 2>&5
7810   ac_status=$?
7811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7812   (exit $ac_status); }; }; then
7813   ac_header_compiler=yes
7814 else
7815   echo "$as_me: failed program was:" >&5
7816 sed 's/^/| /' conftest.$ac_ext >&5
7817
7818 ac_header_compiler=no
7819 fi
7820 rm -f conftest.$ac_objext conftest.$ac_ext
7821 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7822 echo "${ECHO_T}$ac_header_compiler" >&6
7823
7824 # Is the header present?
7825 echo "$as_me:$LINENO: checking libintl.h presence" >&5
7826 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
7827 cat >conftest.$ac_ext <<_ACEOF
7828 #line $LINENO "configure"
7829 /* confdefs.h.  */
7830 _ACEOF
7831 cat confdefs.h >>conftest.$ac_ext
7832 cat >>conftest.$ac_ext <<_ACEOF
7833 /* end confdefs.h.  */
7834 #include <libintl.h>
7835 _ACEOF
7836 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7837   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7838   ac_status=$?
7839   grep -v '^ *+' conftest.er1 >conftest.err
7840   rm -f conftest.er1
7841   cat conftest.err >&5
7842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7843   (exit $ac_status); } >/dev/null; then
7844   if test -s conftest.err; then
7845     ac_cpp_err=$ac_c_preproc_warn_flag
7846   else
7847     ac_cpp_err=
7848   fi
7849 else
7850   ac_cpp_err=yes
7851 fi
7852 if test -z "$ac_cpp_err"; then
7853   ac_header_preproc=yes
7854 else
7855   echo "$as_me: failed program was:" >&5
7856 sed 's/^/| /' conftest.$ac_ext >&5
7857
7858   ac_header_preproc=no
7859 fi
7860 rm -f conftest.err conftest.$ac_ext
7861 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7862 echo "${ECHO_T}$ac_header_preproc" >&6
7863
7864 # So?  What about this header?
7865 case $ac_header_compiler:$ac_header_preproc in
7866   yes:no )
7867     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
7868 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7869     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7870 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
7871     (
7872       cat <<\_ASBOX
7873 ## ------------------------------------ ##
7874 ## Report this to bug-autoconf@gnu.org. ##
7875 ## ------------------------------------ ##
7876 _ASBOX
7877     ) |
7878       sed "s/^/$as_me: WARNING:     /" >&2
7879     ;;
7880   no:yes )
7881     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
7882 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
7883     { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
7884 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
7885     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
7886 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
7887     (
7888       cat <<\_ASBOX
7889 ## ------------------------------------ ##
7890 ## Report this to bug-autoconf@gnu.org. ##
7891 ## ------------------------------------ ##
7892 _ASBOX
7893     ) |
7894       sed "s/^/$as_me: WARNING:     /" >&2
7895     ;;
7896 esac
7897 echo "$as_me:$LINENO: checking for libintl.h" >&5
7898 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
7899 if test "${ac_cv_header_libintl_h+set}" = set; then
7900   echo $ECHO_N "(cached) $ECHO_C" >&6
7901 else
7902   ac_cv_header_libintl_h=$ac_header_preproc
7903 fi
7904 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
7905 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
7906
7907 fi
7908 if test $ac_cv_header_libintl_h = yes; then
7909   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
7910 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
7911 if test "${gt_cv_func_dgettext_libc+set}" = set; then
7912   echo $ECHO_N "(cached) $ECHO_C" >&6
7913 else
7914   cat >conftest.$ac_ext <<_ACEOF
7915 #line $LINENO "configure"
7916 /* confdefs.h.  */
7917 _ACEOF
7918 cat confdefs.h >>conftest.$ac_ext
7919 cat >>conftest.$ac_ext <<_ACEOF
7920 /* end confdefs.h.  */
7921 #include <libintl.h>
7922 int
7923 main ()
7924 {
7925 return (int) dgettext ("","")
7926   ;
7927   return 0;
7928 }
7929 _ACEOF
7930 rm -f conftest.$ac_objext conftest$ac_exeext
7931 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7932   (eval $ac_link) 2>&5
7933   ac_status=$?
7934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7935   (exit $ac_status); } &&
7936          { ac_try='test -s conftest$ac_exeext'
7937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7938   (eval $ac_try) 2>&5
7939   ac_status=$?
7940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7941   (exit $ac_status); }; }; then
7942   gt_cv_func_dgettext_libc=yes
7943 else
7944   echo "$as_me: failed program was:" >&5
7945 sed 's/^/| /' conftest.$ac_ext >&5
7946
7947 gt_cv_func_dgettext_libc=no
7948 fi
7949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7950 fi
7951 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
7952 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
7953
7954           if test "$gt_cv_func_dgettext_libc" != "yes"; then
7955             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
7956 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
7957 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
7958   echo $ECHO_N "(cached) $ECHO_C" >&6
7959 else
7960   ac_check_lib_save_LIBS=$LIBS
7961 LIBS="-lintl  $LIBS"
7962 cat >conftest.$ac_ext <<_ACEOF
7963 #line $LINENO "configure"
7964 /* confdefs.h.  */
7965 _ACEOF
7966 cat confdefs.h >>conftest.$ac_ext
7967 cat >>conftest.$ac_ext <<_ACEOF
7968 /* end confdefs.h.  */
7969
7970 /* Override any gcc2 internal prototype to avoid an error.  */
7971 #ifdef __cplusplus
7972 extern "C"
7973 #endif
7974 /* We use char because int might match the return type of a gcc2
7975    builtin and then its argument prototype would still apply.  */
7976 char bindtextdomain ();
7977 int
7978 main ()
7979 {
7980 bindtextdomain ();
7981   ;
7982   return 0;
7983 }
7984 _ACEOF
7985 rm -f conftest.$ac_objext conftest$ac_exeext
7986 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7987   (eval $ac_link) 2>&5
7988   ac_status=$?
7989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7990   (exit $ac_status); } &&
7991          { ac_try='test -s conftest$ac_exeext'
7992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7993   (eval $ac_try) 2>&5
7994   ac_status=$?
7995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7996   (exit $ac_status); }; }; then
7997   ac_cv_lib_intl_bindtextdomain=yes
7998 else
7999   echo "$as_me: failed program was:" >&5
8000 sed 's/^/| /' conftest.$ac_ext >&5
8001
8002 ac_cv_lib_intl_bindtextdomain=no
8003 fi
8004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8005 LIBS=$ac_check_lib_save_LIBS
8006 fi
8007 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
8008 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
8009 if test $ac_cv_lib_intl_bindtextdomain = yes; then
8010   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
8011 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
8012 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
8013   echo $ECHO_N "(cached) $ECHO_C" >&6
8014 else
8015   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
8016 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
8017 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
8018   echo $ECHO_N "(cached) $ECHO_C" >&6
8019 else
8020   ac_check_lib_save_LIBS=$LIBS
8021 LIBS="-lintl  $LIBS"
8022 cat >conftest.$ac_ext <<_ACEOF
8023 #line $LINENO "configure"
8024 /* confdefs.h.  */
8025 _ACEOF
8026 cat confdefs.h >>conftest.$ac_ext
8027 cat >>conftest.$ac_ext <<_ACEOF
8028 /* end confdefs.h.  */
8029
8030 /* Override any gcc2 internal prototype to avoid an error.  */
8031 #ifdef __cplusplus
8032 extern "C"
8033 #endif
8034 /* We use char because int might match the return type of a gcc2
8035    builtin and then its argument prototype would still apply.  */
8036 char dgettext ();
8037 int
8038 main ()
8039 {
8040 dgettext ();
8041   ;
8042   return 0;
8043 }
8044 _ACEOF
8045 rm -f conftest.$ac_objext conftest$ac_exeext
8046 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8047   (eval $ac_link) 2>&5
8048   ac_status=$?
8049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8050   (exit $ac_status); } &&
8051          { ac_try='test -s conftest$ac_exeext'
8052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8053   (eval $ac_try) 2>&5
8054   ac_status=$?
8055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8056   (exit $ac_status); }; }; then
8057   ac_cv_lib_intl_dgettext=yes
8058 else
8059   echo "$as_me: failed program was:" >&5
8060 sed 's/^/| /' conftest.$ac_ext >&5
8061
8062 ac_cv_lib_intl_dgettext=no
8063 fi
8064 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8065 LIBS=$ac_check_lib_save_LIBS
8066 fi
8067 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
8068 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
8069 if test $ac_cv_lib_intl_dgettext = yes; then
8070   gt_cv_func_dgettext_libintl=yes
8071 else
8072   gt_cv_func_dgettext_libintl=no
8073 fi
8074
8075 fi
8076 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
8077 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
8078 fi
8079
8080           fi
8081
8082           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
8083             LIBS="$LIBS -lintl";
8084           fi
8085
8086           if test "$gt_cv_func_dgettext_libc" = "yes" \
8087             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
8088
8089 cat >>confdefs.h <<\_ACEOF
8090 #define HAVE_GETTEXT 1
8091 _ACEOF
8092
8093             # Extract the first word of "msgfmt", so it can be a program name with args.
8094 set dummy msgfmt; ac_word=$2
8095 echo "$as_me:$LINENO: checking for $ac_word" >&5
8096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8097 if test "${ac_cv_path_MSGFMT+set}" = set; then
8098   echo $ECHO_N "(cached) $ECHO_C" >&6
8099 else
8100   case "$MSGFMT" in
8101   /*)
8102   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8103   ;;
8104   *)
8105   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8106   for ac_dir in $PATH; do
8107     test -z "$ac_dir" && ac_dir=.
8108     if test -f $ac_dir/$ac_word; then
8109       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
8110         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
8111         break
8112       fi
8113     fi
8114   done
8115   IFS="$ac_save_ifs"
8116   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
8117   ;;
8118 esac
8119 fi
8120 MSGFMT="$ac_cv_path_MSGFMT"
8121 if test -n "$MSGFMT"; then
8122   echo "$as_me:$LINENO: result: $MSGFMT" >&5
8123 echo "${ECHO_T}$MSGFMT" >&6
8124 else
8125   echo "$as_me:$LINENO: result: no" >&5
8126 echo "${ECHO_T}no" >&6
8127 fi
8128             if test "$MSGFMT" != "no"; then
8129
8130 for ac_func in dcgettext
8131 do
8132 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8133 echo "$as_me:$LINENO: checking for $ac_func" >&5
8134 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8135 if eval "test \"\${$as_ac_var+set}\" = set"; then
8136   echo $ECHO_N "(cached) $ECHO_C" >&6
8137 else
8138   cat >conftest.$ac_ext <<_ACEOF
8139 #line $LINENO "configure"
8140 /* confdefs.h.  */
8141 _ACEOF
8142 cat confdefs.h >>conftest.$ac_ext
8143 cat >>conftest.$ac_ext <<_ACEOF
8144 /* end confdefs.h.  */
8145 /* System header to define __stub macros and hopefully few prototypes,
8146     which can conflict with char $ac_func (); below.
8147     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8148     <limits.h> exists even on freestanding compilers.  */
8149 #ifdef __STDC__
8150 # include <limits.h>
8151 #else
8152 # include <assert.h>
8153 #endif
8154 /* Override any gcc2 internal prototype to avoid an error.  */
8155 #ifdef __cplusplus
8156 extern "C"
8157 {
8158 #endif
8159 /* We use char because int might match the return type of a gcc2
8160    builtin and then its argument prototype would still apply.  */
8161 char $ac_func ();
8162 /* The GNU C library defines this for functions which it implements
8163     to always fail with ENOSYS.  Some functions are actually named
8164     something starting with __ and the normal name is an alias.  */
8165 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8166 choke me
8167 #else
8168 char (*f) () = $ac_func;
8169 #endif
8170 #ifdef __cplusplus
8171 }
8172 #endif
8173
8174 int
8175 main ()
8176 {
8177 return f != $ac_func;
8178   ;
8179   return 0;
8180 }
8181 _ACEOF
8182 rm -f conftest.$ac_objext conftest$ac_exeext
8183 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8184   (eval $ac_link) 2>&5
8185   ac_status=$?
8186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8187   (exit $ac_status); } &&
8188          { ac_try='test -s conftest$ac_exeext'
8189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8190   (eval $ac_try) 2>&5
8191   ac_status=$?
8192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8193   (exit $ac_status); }; }; then
8194   eval "$as_ac_var=yes"
8195 else
8196   echo "$as_me: failed program was:" >&5
8197 sed 's/^/| /' conftest.$ac_ext >&5
8198
8199 eval "$as_ac_var=no"
8200 fi
8201 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8202 fi
8203 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8204 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8205 if test `eval echo '${'$as_ac_var'}'` = yes; then
8206   cat >>confdefs.h <<_ACEOF
8207 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8208 _ACEOF
8209
8210 fi
8211 done
8212
8213               # Extract the first word of "gmsgfmt", so it can be a program name with args.
8214 set dummy gmsgfmt; ac_word=$2
8215 echo "$as_me:$LINENO: checking for $ac_word" >&5
8216 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8217 if test "${ac_cv_path_GMSGFMT+set}" = set; then
8218   echo $ECHO_N "(cached) $ECHO_C" >&6
8219 else
8220   case $GMSGFMT in
8221   [\\/]* | ?:[\\/]*)
8222   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8223   ;;
8224   *)
8225   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8226 for as_dir in $PATH
8227 do
8228   IFS=$as_save_IFS
8229   test -z "$as_dir" && as_dir=.
8230   for ac_exec_ext in '' $ac_executable_extensions; do
8231   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8232     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
8233     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8234     break 2
8235   fi
8236 done
8237 done
8238
8239   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8240   ;;
8241 esac
8242 fi
8243 GMSGFMT=$ac_cv_path_GMSGFMT
8244
8245 if test -n "$GMSGFMT"; then
8246   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
8247 echo "${ECHO_T}$GMSGFMT" >&6
8248 else
8249   echo "$as_me:$LINENO: result: no" >&5
8250 echo "${ECHO_T}no" >&6
8251 fi
8252
8253               # Extract the first word of "xgettext", so it can be a program name with args.
8254 set dummy xgettext; ac_word=$2
8255 echo "$as_me:$LINENO: checking for $ac_word" >&5
8256 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8257 if test "${ac_cv_path_XGETTEXT+set}" = set; then
8258   echo $ECHO_N "(cached) $ECHO_C" >&6
8259 else
8260   case "$XGETTEXT" in
8261   /*)
8262   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8263   ;;
8264   *)
8265   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8266   for ac_dir in $PATH; do
8267     test -z "$ac_dir" && ac_dir=.
8268     if test -f $ac_dir/$ac_word; then
8269       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8270         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8271         break
8272       fi
8273     fi
8274   done
8275   IFS="$ac_save_ifs"
8276   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8277   ;;
8278 esac
8279 fi
8280 XGETTEXT="$ac_cv_path_XGETTEXT"
8281 if test -n "$XGETTEXT"; then
8282   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
8283 echo "${ECHO_T}$XGETTEXT" >&6
8284 else
8285   echo "$as_me:$LINENO: result: no" >&5
8286 echo "${ECHO_T}no" >&6
8287 fi
8288
8289               cat >conftest.$ac_ext <<_ACEOF
8290 #line $LINENO "configure"
8291 /* confdefs.h.  */
8292 _ACEOF
8293 cat confdefs.h >>conftest.$ac_ext
8294 cat >>conftest.$ac_ext <<_ACEOF
8295 /* end confdefs.h.  */
8296
8297 int
8298 main ()
8299 {
8300 extern int _nl_msg_cat_cntr;
8301                              return _nl_msg_cat_cntr
8302   ;
8303   return 0;
8304 }
8305 _ACEOF
8306 rm -f conftest.$ac_objext conftest$ac_exeext
8307 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8308   (eval $ac_link) 2>&5
8309   ac_status=$?
8310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8311   (exit $ac_status); } &&
8312          { ac_try='test -s conftest$ac_exeext'
8313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8314   (eval $ac_try) 2>&5
8315   ac_status=$?
8316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8317   (exit $ac_status); }; }; then
8318   CATOBJEXT=.gmo
8319                  DATADIRNAME=share
8320 else
8321   echo "$as_me: failed program was:" >&5
8322 sed 's/^/| /' conftest.$ac_ext >&5
8323
8324 CATOBJEXT=.mo
8325                  DATADIRNAME=lib
8326 fi
8327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8328               INSTOBJEXT=.mo
8329             fi
8330           fi
8331
8332           # Added by Martin Baulig 12/15/98 for libc5 systems
8333           if test "$gt_cv_func_dgettext_libc" != "yes" \
8334             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
8335             INTLLIBS=-lintl
8336             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
8337           fi
8338
8339 fi
8340
8341
8342
8343       if test "$CATOBJEXT" = "NONE"; then
8344                         nls_cv_use_gnu_gettext=yes
8345       fi
8346     fi
8347
8348     if test "$nls_cv_use_gnu_gettext" != "yes"; then
8349
8350 cat >>confdefs.h <<\_ACEOF
8351 #define ENABLE_NLS 1
8352 _ACEOF
8353
8354     else
8355             CATOBJEXT=
8356     fi
8357
8358         if test "$XGETTEXT" != ":"; then
8359                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
8360         : ;
8361       else
8362         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
8363 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
8364         XGETTEXT=":"
8365       fi
8366     fi
8367
8368     # We need to process the po/ directory.
8369     POSUB=po
8370
8371               ac_config_commands="$ac_config_commands default-2"
8372
8373
8374                 for lang in $ALL_LINGUAS; do
8375       GMOFILES="$GMOFILES $lang.gmo"
8376       POFILES="$POFILES $lang.po"
8377     done
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391    if test "x$CATOBJEXT" != "x"; then
8392      if test "x$ALL_LINGUAS" = "x"; then
8393        LINGUAS=
8394      else
8395        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
8396 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
8397        NEW_LINGUAS=
8398        for lang in ${LINGUAS=$ALL_LINGUAS}; do
8399          case "$ALL_LINGUAS" in
8400           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
8401          esac
8402        done
8403        LINGUAS=$NEW_LINGUAS
8404        echo "$as_me:$LINENO: result: $LINGUAS" >&5
8405 echo "${ECHO_T}$LINGUAS" >&6
8406      fi
8407
8408           if test -n "$LINGUAS"; then
8409        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8410      fi
8411    fi
8412
8413             test -d po || mkdir po
8414    if test "$CATOBJEXT" = ".cat"; then
8415      if test "${ac_cv_header_linux_version_h+set}" = set; then
8416   echo "$as_me:$LINENO: checking for linux/version.h" >&5
8417 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8418 if test "${ac_cv_header_linux_version_h+set}" = set; then
8419   echo $ECHO_N "(cached) $ECHO_C" >&6
8420 fi
8421 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8422 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8423 else
8424   # Is the header compilable?
8425 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
8426 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
8427 cat >conftest.$ac_ext <<_ACEOF
8428 #line $LINENO "configure"
8429 /* confdefs.h.  */
8430 _ACEOF
8431 cat confdefs.h >>conftest.$ac_ext
8432 cat >>conftest.$ac_ext <<_ACEOF
8433 /* end confdefs.h.  */
8434 $ac_includes_default
8435 #include <linux/version.h>
8436 _ACEOF
8437 rm -f conftest.$ac_objext
8438 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8439   (eval $ac_compile) 2>&5
8440   ac_status=$?
8441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8442   (exit $ac_status); } &&
8443          { ac_try='test -s conftest.$ac_objext'
8444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8445   (eval $ac_try) 2>&5
8446   ac_status=$?
8447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8448   (exit $ac_status); }; }; then
8449   ac_header_compiler=yes
8450 else
8451   echo "$as_me: failed program was:" >&5
8452 sed 's/^/| /' conftest.$ac_ext >&5
8453
8454 ac_header_compiler=no
8455 fi
8456 rm -f conftest.$ac_objext conftest.$ac_ext
8457 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8458 echo "${ECHO_T}$ac_header_compiler" >&6
8459
8460 # Is the header present?
8461 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
8462 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
8463 cat >conftest.$ac_ext <<_ACEOF
8464 #line $LINENO "configure"
8465 /* confdefs.h.  */
8466 _ACEOF
8467 cat confdefs.h >>conftest.$ac_ext
8468 cat >>conftest.$ac_ext <<_ACEOF
8469 /* end confdefs.h.  */
8470 #include <linux/version.h>
8471 _ACEOF
8472 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8473   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8474   ac_status=$?
8475   grep -v '^ *+' conftest.er1 >conftest.err
8476   rm -f conftest.er1
8477   cat conftest.err >&5
8478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8479   (exit $ac_status); } >/dev/null; then
8480   if test -s conftest.err; then
8481     ac_cpp_err=$ac_c_preproc_warn_flag
8482   else
8483     ac_cpp_err=
8484   fi
8485 else
8486   ac_cpp_err=yes
8487 fi
8488 if test -z "$ac_cpp_err"; then
8489   ac_header_preproc=yes
8490 else
8491   echo "$as_me: failed program was:" >&5
8492 sed 's/^/| /' conftest.$ac_ext >&5
8493
8494   ac_header_preproc=no
8495 fi
8496 rm -f conftest.err conftest.$ac_ext
8497 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8498 echo "${ECHO_T}$ac_header_preproc" >&6
8499
8500 # So?  What about this header?
8501 case $ac_header_compiler:$ac_header_preproc in
8502   yes:no )
8503     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
8504 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8505     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8506 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
8507     (
8508       cat <<\_ASBOX
8509 ## ------------------------------------ ##
8510 ## Report this to bug-autoconf@gnu.org. ##
8511 ## ------------------------------------ ##
8512 _ASBOX
8513     ) |
8514       sed "s/^/$as_me: WARNING:     /" >&2
8515     ;;
8516   no:yes )
8517     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
8518 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
8519     { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
8520 echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
8521     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
8522 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
8523     (
8524       cat <<\_ASBOX
8525 ## ------------------------------------ ##
8526 ## Report this to bug-autoconf@gnu.org. ##
8527 ## ------------------------------------ ##
8528 _ASBOX
8529     ) |
8530       sed "s/^/$as_me: WARNING:     /" >&2
8531     ;;
8532 esac
8533 echo "$as_me:$LINENO: checking for linux/version.h" >&5
8534 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
8535 if test "${ac_cv_header_linux_version_h+set}" = set; then
8536   echo $ECHO_N "(cached) $ECHO_C" >&6
8537 else
8538   ac_cv_header_linux_version_h=$ac_header_preproc
8539 fi
8540 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
8541 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
8542
8543 fi
8544 if test $ac_cv_header_linux_version_h = yes; then
8545   msgformat=linux
8546 else
8547   msgformat=xopen
8548 fi
8549
8550
8551
8552                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
8553    fi
8554
8555             MKINSTALLDIRS=
8556 #
8557 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
8558 #
8559 #   if test -n "$ac_aux_dir"; then
8560 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8561 #   fi
8562    if test -z "$MKINSTALLDIRS"; then
8563      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8564    fi
8565
8566    # jwz: you know what, screw it.  Let's just use the version that I
8567    # already computed in configure.in, instead of this version that came
8568    # with the i18n crud, ok?
8569    MKINSTALLDIRS="$INSTALL_DIRS"
8570
8571
8572
8573
8574          test -d po || mkdir po
8575    if test "x$srcdir" != "x."; then
8576      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8577        posrcprefix="$srcdir/"
8578      else
8579        posrcprefix="../$srcdir/"
8580      fi
8581    else
8582      posrcprefix="../"
8583    fi
8584    rm -f po/POTFILES
8585    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8586         < $srcdir/po/POTFILES.in > po/POTFILES
8587
8588
8589
8590 ###############################################################################
8591 #
8592 #       Check for -lXmu (some fucked up vendors don't ship it...)
8593 #
8594 ###############################################################################
8595
8596 have_xmu=no
8597
8598   ac_save_CPPFLAGS="$CPPFLAGS"
8599   if test \! -z "$includedir" ; then
8600     CPPFLAGS="$CPPFLAGS -I$includedir"
8601   fi
8602   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8603   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
8604 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
8605 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
8606   echo $ECHO_N "(cached) $ECHO_C" >&6
8607 else
8608   cat >conftest.$ac_ext <<_ACEOF
8609 #line $LINENO "configure"
8610 /* confdefs.h.  */
8611 _ACEOF
8612 cat confdefs.h >>conftest.$ac_ext
8613 cat >>conftest.$ac_ext <<_ACEOF
8614 /* end confdefs.h.  */
8615 #include <stdlib.h>
8616                    #include <stdio.h>
8617                    #include <X11/Intrinsic.h>
8618
8619 #include <X11/Xmu/Error.h>
8620 _ACEOF
8621 rm -f conftest.$ac_objext
8622 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8623   (eval $ac_compile) 2>&5
8624   ac_status=$?
8625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8626   (exit $ac_status); } &&
8627          { ac_try='test -s conftest.$ac_objext'
8628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8629   (eval $ac_try) 2>&5
8630   ac_status=$?
8631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8632   (exit $ac_status); }; }; then
8633   ac_cv_header_X11_Xmu_Error_h=yes
8634 else
8635   echo "$as_me: failed program was:" >&5
8636 sed 's/^/| /' conftest.$ac_ext >&5
8637
8638 ac_cv_header_X11_Xmu_Error_h=no
8639 fi
8640 rm -f conftest.$ac_objext conftest.$ac_ext
8641 fi
8642 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
8643 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
8644 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
8645   have_xmu=yes
8646 fi
8647
8648
8649   CPPFLAGS="$ac_save_CPPFLAGS"
8650 if test "$have_xmu" = no ; then
8651   XMU_SRCS='$(UTILS_SRC)/xmu.c'
8652   XMU_OBJS='$(UTILS_BIN)/xmu.o'
8653   XMU_LIBS=''
8654 else
8655   XMU_SRCS=''
8656   XMU_OBJS=''
8657   XMU_LIBS='-lXmu'
8658   cat >>confdefs.h <<\_ACEOF
8659 #define HAVE_XMU 1
8660 _ACEOF
8661
8662 fi
8663
8664
8665 ###############################################################################
8666 #
8667 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
8668 #       See comp.windows.x FAQ question 124.  The right fix is to
8669 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
8670 #
8671 ###############################################################################
8672
8673 if test "$have_xmu" = yes ; then
8674   case "$host" in
8675     *-sunos4*)
8676     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
8677 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
8678 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
8679   echo $ECHO_N "(cached) $ECHO_C" >&6
8680 else
8681   ac_save_LDFLAGS="$LDFLAGS"
8682                     if test \! -z "$x_libraries" ; then
8683                       LDFLAGS="$LDFLAGS -L$x_libraries"
8684                     fi
8685                     # Note: this trick never works!  (Generally.)
8686                     # We're only getting away with using AC_TRY_LINK
8687                     # with X libraries because we know it's SunOS.
8688                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
8689                     cat >conftest.$ac_ext <<_ACEOF
8690 #line $LINENO "configure"
8691 /* confdefs.h.  */
8692 _ACEOF
8693 cat confdefs.h >>conftest.$ac_ext
8694 cat >>conftest.$ac_ext <<_ACEOF
8695 /* end confdefs.h.  */
8696
8697 int
8698 main ()
8699 {
8700
8701   ;
8702   return 0;
8703 }
8704 _ACEOF
8705 rm -f conftest.$ac_objext conftest$ac_exeext
8706 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8707   (eval $ac_link) 2>&5
8708   ac_status=$?
8709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8710   (exit $ac_status); } &&
8711          { ac_try='test -s conftest$ac_exeext'
8712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8713   (eval $ac_try) 2>&5
8714   ac_status=$?
8715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8716   (exit $ac_status); }; }; then
8717   ac_cv_sunos_xmu_bug=no
8718 else
8719   echo "$as_me: failed program was:" >&5
8720 sed 's/^/| /' conftest.$ac_ext >&5
8721
8722 ac_cv_sunos_xmu_bug=yes
8723 fi
8724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8725                     LDFLAGS="$ac_save_LDFLAGS"
8726 fi
8727 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
8728 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
8729     if test "$ac_cv_sunos_xmu_bug" = yes ; then
8730       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
8731 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
8732 if test "${ac_cv_ld_static+set}" = set; then
8733   echo $ECHO_N "(cached) $ECHO_C" >&6
8734 else
8735   ac_save_LDFLAGS="$LDFLAGS"
8736                       LDFLAGS="$LDFLAGS -static"
8737                       cat >conftest.$ac_ext <<_ACEOF
8738 #line $LINENO "configure"
8739 /* confdefs.h.  */
8740 _ACEOF
8741 cat confdefs.h >>conftest.$ac_ext
8742 cat >>conftest.$ac_ext <<_ACEOF
8743 /* end confdefs.h.  */
8744
8745 int
8746 main ()
8747 {
8748
8749   ;
8750   return 0;
8751 }
8752 _ACEOF
8753 rm -f conftest.$ac_objext conftest$ac_exeext
8754 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8755   (eval $ac_link) 2>&5
8756   ac_status=$?
8757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8758   (exit $ac_status); } &&
8759          { ac_try='test -s conftest$ac_exeext'
8760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8761   (eval $ac_try) 2>&5
8762   ac_status=$?
8763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8764   (exit $ac_status); }; }; then
8765   ac_cv_ld_static=yes
8766 else
8767   echo "$as_me: failed program was:" >&5
8768 sed 's/^/| /' conftest.$ac_ext >&5
8769
8770 ac_cv_ld_static=no
8771 fi
8772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8773                     LDFLAGS="$ac_save_LDFLAGS"
8774 fi
8775 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
8776 echo "${ECHO_T}$ac_cv_ld_static" >&6
8777       if test "$ac_cv_ld_static" = yes ; then
8778         LDFLAGS="$LDFLAGS -static"
8779       else
8780         LDFLAGS="$LDFLAGS -Bstatic"
8781       fi
8782     fi
8783     ;;
8784   esac
8785 fi
8786
8787
8788 ###############################################################################
8789 #
8790 #       Handle the --with-hackdir option
8791 #
8792 ###############################################################################
8793
8794 have_hackdir=yes
8795 with_hackdir_req=unspecified
8796
8797 # Check whether --with-hackdir or --without-hackdir was given.
8798 if test "${with_hackdir+set}" = set; then
8799   withval="$with_hackdir"
8800   with_hackdir="$withval"; with_hackdir_req="$withval"
8801 else
8802   with_hackdir=yes
8803 fi;
8804
8805 if test x"$with_hackdir" = xyes; then
8806   HACKDIR='${exec_prefix}/lib/xscreensaver'
8807 elif test x"$with_hackdir" = xno; then
8808   HACKDIR='${bindir}'
8809 else
8810   # there must be a better way than this...
8811   if test -z "`echo $with_hackdir | sed 's@^/.*@@'`" ; then
8812     # absolute path
8813     HACKDIR=$with_hackdir
8814   else
8815     # relative path
8816     HACKDIR="\${exec_prefix}$with_hackdir"
8817   fi
8818 fi
8819
8820 # canonicalize slashes.
8821 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
8822
8823 # This option used to be called --enable-subdir; make sure that is no longer
8824 # used, since configure brain-damagedly ignores unknown --enable options.
8825
8826 obsolete_enable=
8827 # Check whether --enable-subdir or --disable-subdir was given.
8828 if test "${enable_subdir+set}" = set; then
8829   enableval="$enable_subdir"
8830   obsolete_enable=yes
8831 fi;
8832 if test -n "$obsolete_enable"; then
8833   echo "error: the --enable-subdir option has been replaced with"
8834   echo "       the new --with-hackdir option; see \`configure --help'"
8835   echo "       for more information."
8836   exit 1
8837 fi
8838
8839
8840 ###############################################################################
8841 #
8842 #       Handle the --with-configdir option
8843 #
8844 ###############################################################################
8845
8846 have_configdir=yes
8847 with_configdir_req=unspecified
8848
8849 # Check whether --with-configdir or --without-configdir was given.
8850 if test "${with_configdir+set}" = set; then
8851   withval="$with_configdir"
8852   with_configdir="$withval"; with_configdir_req="$withval"
8853 else
8854   with_configdir=yes
8855 fi;
8856
8857 if test x"$with_configdir" = xyes; then
8858   # filled in later...
8859   HACK_CONF_DIR=''
8860 elif test x"$with_configdir" = xno; then
8861   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
8862   exit 1
8863 else
8864   # there must be a better way than this...
8865   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
8866     # absolute path
8867     HACK_CONF_DIR=$with_configdir
8868   else
8869     # relative path
8870     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
8871   fi
8872 fi
8873
8874
8875
8876
8877 ###############################################################################
8878 #
8879 #       Check for the SGI SCREEN_SAVER server extension.
8880 #
8881 ###############################################################################
8882
8883 have_sgi=no
8884 with_sgi_req=unspecified
8885
8886 # Check whether --with-sgi-ext or --without-sgi-ext was given.
8887 if test "${with_sgi_ext+set}" = set; then
8888   withval="$with_sgi_ext"
8889   with_sgi="$withval"; with_sgi_req="$withval"
8890 else
8891   with_sgi=yes
8892 fi;
8893
8894
8895    case "$with_sgi" in
8896     yes) ;;
8897     no)  ;;
8898
8899     /*)
8900      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
8901 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
8902      d=$with_sgi/include
8903      if test -d $d; then
8904        X_CFLAGS="-I$d $X_CFLAGS"
8905        echo "$as_me:$LINENO: result: $d" >&5
8906 echo "${ECHO_T}$d" >&6
8907      else
8908        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8909 echo "${ECHO_T}not found ($d: no such directory)" >&6
8910      fi
8911
8912      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
8913 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
8914      d=$with_sgi/lib
8915      if test -d $d; then
8916        X_LIBS="-L$d $X_LIBS"
8917        echo "$as_me:$LINENO: result: $d" >&5
8918 echo "${ECHO_T}$d" >&6
8919      else
8920        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
8921 echo "${ECHO_T}not found ($d: no such directory)" >&6
8922      fi
8923
8924      # replace the directory string with "yes".
8925      with_sgi_req="yes"
8926      with_sgi=$with_sgi_req
8927      ;;
8928
8929     *)
8930      echo ""
8931      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
8932      echo "       If it is a directory, then \`DIR/include' will be added to"
8933      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
8934      exit 1
8935      ;;
8936    esac
8937
8938
8939 if test "$with_sgi" = yes; then
8940
8941   ac_save_CPPFLAGS="$CPPFLAGS"
8942   if test \! -z "$includedir" ; then
8943     CPPFLAGS="$CPPFLAGS -I$includedir"
8944   fi
8945   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
8946   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
8947 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
8948 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
8949   echo $ECHO_N "(cached) $ECHO_C" >&6
8950 else
8951   cat >conftest.$ac_ext <<_ACEOF
8952 #line $LINENO "configure"
8953 /* confdefs.h.  */
8954 _ACEOF
8955 cat confdefs.h >>conftest.$ac_ext
8956 cat >>conftest.$ac_ext <<_ACEOF
8957 /* end confdefs.h.  */
8958 #include <X11/Xlib.h>
8959
8960 #include <X11/extensions/XScreenSaver.h>
8961 _ACEOF
8962 rm -f conftest.$ac_objext
8963 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8964   (eval $ac_compile) 2>&5
8965   ac_status=$?
8966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8967   (exit $ac_status); } &&
8968          { ac_try='test -s conftest.$ac_objext'
8969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8970   (eval $ac_try) 2>&5
8971   ac_status=$?
8972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8973   (exit $ac_status); }; }; then
8974   ac_cv_header_X11_extensions_XScreenSaver_h=yes
8975 else
8976   echo "$as_me: failed program was:" >&5
8977 sed 's/^/| /' conftest.$ac_ext >&5
8978
8979 ac_cv_header_X11_extensions_XScreenSaver_h=no
8980 fi
8981 rm -f conftest.$ac_objext conftest.$ac_ext
8982 fi
8983 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
8984 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
8985 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
8986   have_sgi=yes
8987                      cat >>confdefs.h <<\_ACEOF
8988 #define HAVE_SGI_SAVER_EXTENSION 1
8989 _ACEOF
8990
8991 fi
8992
8993
8994   CPPFLAGS="$ac_save_CPPFLAGS"
8995
8996 elif test "$with_sgi" != no; then
8997   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
8998   exit 1
8999 fi
9000
9001
9002 ###############################################################################
9003 #
9004 #       Check for the MIT-SCREEN-SAVER server extension.
9005 #
9006 ###############################################################################
9007
9008 have_mit=no
9009 with_mit_req=unspecified
9010
9011 # Check whether --with-mit-ext or --without-mit-ext was given.
9012 if test "${with_mit_ext+set}" = set; then
9013   withval="$with_mit_ext"
9014   with_mit="$withval"; with_mit_req="$withval"
9015 else
9016   with_mit=yes
9017 fi;
9018
9019
9020    case "$with_mit" in
9021     yes) ;;
9022     no)  ;;
9023
9024     /*)
9025      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER headers" >&5
9026 echo $ECHO_N "checking for MIT-SCREEN-SAVER headers... $ECHO_C" >&6
9027      d=$with_mit/include
9028      if test -d $d; then
9029        X_CFLAGS="-I$d $X_CFLAGS"
9030        echo "$as_me:$LINENO: result: $d" >&5
9031 echo "${ECHO_T}$d" >&6
9032      else
9033        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9034 echo "${ECHO_T}not found ($d: no such directory)" >&6
9035      fi
9036
9037      echo "$as_me:$LINENO: checking for MIT-SCREEN-SAVER libs" >&5
9038 echo $ECHO_N "checking for MIT-SCREEN-SAVER libs... $ECHO_C" >&6
9039      d=$with_mit/lib
9040      if test -d $d; then
9041        X_LIBS="-L$d $X_LIBS"
9042        echo "$as_me:$LINENO: result: $d" >&5
9043 echo "${ECHO_T}$d" >&6
9044      else
9045        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9046 echo "${ECHO_T}not found ($d: no such directory)" >&6
9047      fi
9048
9049      # replace the directory string with "yes".
9050      with_mit_req="yes"
9051      with_mit=$with_mit_req
9052      ;;
9053
9054     *)
9055      echo ""
9056      echo "error: argument to --with-mit-ext must be \"yes\", \"no\", or a directory."
9057      echo "       If it is a directory, then \`DIR/include' will be added to"
9058      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9059      exit 1
9060      ;;
9061    esac
9062
9063
9064 if test "$with_mit" = yes; then
9065
9066   ac_save_CPPFLAGS="$CPPFLAGS"
9067   if test \! -z "$includedir" ; then
9068     CPPFLAGS="$CPPFLAGS -I$includedir"
9069   fi
9070   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9071   echo "$as_me:$LINENO: checking for X11/extensions/scrnsaver.h" >&5
9072 echo $ECHO_N "checking for X11/extensions/scrnsaver.h... $ECHO_C" >&6
9073 if test "${ac_cv_header_X11_extensions_scrnsaver_h+set}" = set; then
9074   echo $ECHO_N "(cached) $ECHO_C" >&6
9075 else
9076   cat >conftest.$ac_ext <<_ACEOF
9077 #line $LINENO "configure"
9078 /* confdefs.h.  */
9079 _ACEOF
9080 cat confdefs.h >>conftest.$ac_ext
9081 cat >>conftest.$ac_ext <<_ACEOF
9082 /* end confdefs.h.  */
9083 #include <X11/Xlib.h>
9084
9085 #include <X11/extensions/scrnsaver.h>
9086 _ACEOF
9087 rm -f conftest.$ac_objext
9088 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9089   (eval $ac_compile) 2>&5
9090   ac_status=$?
9091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9092   (exit $ac_status); } &&
9093          { ac_try='test -s conftest.$ac_objext'
9094   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9095   (eval $ac_try) 2>&5
9096   ac_status=$?
9097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9098   (exit $ac_status); }; }; then
9099   ac_cv_header_X11_extensions_scrnsaver_h=yes
9100 else
9101   echo "$as_me: failed program was:" >&5
9102 sed 's/^/| /' conftest.$ac_ext >&5
9103
9104 ac_cv_header_X11_extensions_scrnsaver_h=no
9105 fi
9106 rm -f conftest.$ac_objext conftest.$ac_ext
9107 fi
9108 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_scrnsaver_h" >&5
9109 echo "${ECHO_T}$ac_cv_header_X11_extensions_scrnsaver_h" >&6
9110 if test $ac_cv_header_X11_extensions_scrnsaver_h = yes; then
9111   have_mit=yes
9112 fi
9113
9114
9115   CPPFLAGS="$ac_save_CPPFLAGS"
9116
9117   # Now check to see if it's really in the library; XF86Free-3.3 ships
9118   # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
9119   #
9120   if test "$have_mit" = yes; then
9121
9122   ac_save_CPPFLAGS="$CPPFLAGS"
9123   ac_save_LDFLAGS="$LDFLAGS"
9124 #  ac_save_LIBS="$LIBS"
9125
9126   if test \! -z "$includedir" ; then
9127     CPPFLAGS="$CPPFLAGS -I$includedir"
9128   fi
9129   # note: $X_CFLAGS includes $x_includes
9130   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9131
9132   if test \! -z "$libdir" ; then
9133     LDFLAGS="$LDFLAGS -L$libdir"
9134   fi
9135   # note: $X_LIBS includes $x_libraries
9136   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9137
9138   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXext" >&5
9139 echo $ECHO_N "checking for XScreenSaverRegister in -lXext... $ECHO_C" >&6
9140 if test "${ac_cv_lib_Xext_XScreenSaverRegister+set}" = set; then
9141   echo $ECHO_N "(cached) $ECHO_C" >&6
9142 else
9143   ac_check_lib_save_LIBS=$LIBS
9144 LIBS="-lXext -lm $LIBS"
9145 cat >conftest.$ac_ext <<_ACEOF
9146 #line $LINENO "configure"
9147 /* confdefs.h.  */
9148 _ACEOF
9149 cat confdefs.h >>conftest.$ac_ext
9150 cat >>conftest.$ac_ext <<_ACEOF
9151 /* end confdefs.h.  */
9152
9153 /* Override any gcc2 internal prototype to avoid an error.  */
9154 #ifdef __cplusplus
9155 extern "C"
9156 #endif
9157 /* We use char because int might match the return type of a gcc2
9158    builtin and then its argument prototype would still apply.  */
9159 char XScreenSaverRegister ();
9160 int
9161 main ()
9162 {
9163 XScreenSaverRegister ();
9164   ;
9165   return 0;
9166 }
9167 _ACEOF
9168 rm -f conftest.$ac_objext conftest$ac_exeext
9169 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9170   (eval $ac_link) 2>&5
9171   ac_status=$?
9172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9173   (exit $ac_status); } &&
9174          { ac_try='test -s conftest$ac_exeext'
9175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9176   (eval $ac_try) 2>&5
9177   ac_status=$?
9178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9179   (exit $ac_status); }; }; then
9180   ac_cv_lib_Xext_XScreenSaverRegister=yes
9181 else
9182   echo "$as_me: failed program was:" >&5
9183 sed 's/^/| /' conftest.$ac_ext >&5
9184
9185 ac_cv_lib_Xext_XScreenSaverRegister=no
9186 fi
9187 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9188 LIBS=$ac_check_lib_save_LIBS
9189 fi
9190 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XScreenSaverRegister" >&5
9191 echo "${ECHO_T}$ac_cv_lib_Xext_XScreenSaverRegister" >&6
9192 if test $ac_cv_lib_Xext_XScreenSaverRegister = yes; then
9193   true
9194 else
9195   have_mit=no
9196 fi
9197
9198   CPPFLAGS="$ac_save_CPPFLAGS"
9199   LDFLAGS="$ac_save_LDFLAGS"
9200 #  LIBS="$ac_save_LIBS"
9201
9202
9203     if test "$have_mit" = no; then
9204       # Fuck!  Looks like XF86Free-3.3 actually puts it in XExExt instead
9205       # of in Xext.  Thank you master, may I have another.
9206
9207   ac_save_CPPFLAGS="$CPPFLAGS"
9208   ac_save_LDFLAGS="$LDFLAGS"
9209 #  ac_save_LIBS="$LIBS"
9210
9211   if test \! -z "$includedir" ; then
9212     CPPFLAGS="$CPPFLAGS -I$includedir"
9213   fi
9214   # note: $X_CFLAGS includes $x_includes
9215   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9216
9217   if test \! -z "$libdir" ; then
9218     LDFLAGS="$LDFLAGS -L$libdir"
9219   fi
9220   # note: $X_LIBS includes $x_libraries
9221   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9222
9223   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXExExt" >&5
9224 echo $ECHO_N "checking for XScreenSaverRegister in -lXExExt... $ECHO_C" >&6
9225 if test "${ac_cv_lib_XExExt_XScreenSaverRegister+set}" = set; then
9226   echo $ECHO_N "(cached) $ECHO_C" >&6
9227 else
9228   ac_check_lib_save_LIBS=$LIBS
9229 LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
9230 cat >conftest.$ac_ext <<_ACEOF
9231 #line $LINENO "configure"
9232 /* confdefs.h.  */
9233 _ACEOF
9234 cat confdefs.h >>conftest.$ac_ext
9235 cat >>conftest.$ac_ext <<_ACEOF
9236 /* end confdefs.h.  */
9237
9238 /* Override any gcc2 internal prototype to avoid an error.  */
9239 #ifdef __cplusplus
9240 extern "C"
9241 #endif
9242 /* We use char because int might match the return type of a gcc2
9243    builtin and then its argument prototype would still apply.  */
9244 char XScreenSaverRegister ();
9245 int
9246 main ()
9247 {
9248 XScreenSaverRegister ();
9249   ;
9250   return 0;
9251 }
9252 _ACEOF
9253 rm -f conftest.$ac_objext conftest$ac_exeext
9254 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9255   (eval $ac_link) 2>&5
9256   ac_status=$?
9257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9258   (exit $ac_status); } &&
9259          { ac_try='test -s conftest$ac_exeext'
9260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9261   (eval $ac_try) 2>&5
9262   ac_status=$?
9263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9264   (exit $ac_status); }; }; then
9265   ac_cv_lib_XExExt_XScreenSaverRegister=yes
9266 else
9267   echo "$as_me: failed program was:" >&5
9268 sed 's/^/| /' conftest.$ac_ext >&5
9269
9270 ac_cv_lib_XExExt_XScreenSaverRegister=no
9271 fi
9272 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9273 LIBS=$ac_check_lib_save_LIBS
9274 fi
9275 echo "$as_me:$LINENO: result: $ac_cv_lib_XExExt_XScreenSaverRegister" >&5
9276 echo "${ECHO_T}$ac_cv_lib_XExExt_XScreenSaverRegister" >&6
9277 if test $ac_cv_lib_XExExt_XScreenSaverRegister = yes; then
9278   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
9279 else
9280   true
9281 fi
9282
9283   CPPFLAGS="$ac_save_CPPFLAGS"
9284   LDFLAGS="$ac_save_LDFLAGS"
9285 #  LIBS="$ac_save_LIBS"
9286
9287     fi
9288
9289     if test "$have_mit" = no; then
9290       # Double fuck!  Looks like some versions of XFree86 (whichever version
9291       # it is that comes with RedHat Linux 2.0 -- I can't find a version
9292       # number) put this garbage in Xss instead of Xext.  Thank you master,
9293       #  may I have another.
9294
9295   ac_save_CPPFLAGS="$CPPFLAGS"
9296   ac_save_LDFLAGS="$LDFLAGS"
9297 #  ac_save_LIBS="$LIBS"
9298
9299   if test \! -z "$includedir" ; then
9300     CPPFLAGS="$CPPFLAGS -I$includedir"
9301   fi
9302   # note: $X_CFLAGS includes $x_includes
9303   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9304
9305   if test \! -z "$libdir" ; then
9306     LDFLAGS="$LDFLAGS -L$libdir"
9307   fi
9308   # note: $X_LIBS includes $x_libraries
9309   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9310
9311   echo "$as_me:$LINENO: checking for XScreenSaverRegister in -lXss" >&5
9312 echo $ECHO_N "checking for XScreenSaverRegister in -lXss... $ECHO_C" >&6
9313 if test "${ac_cv_lib_Xss_XScreenSaverRegister+set}" = set; then
9314   echo $ECHO_N "(cached) $ECHO_C" >&6
9315 else
9316   ac_check_lib_save_LIBS=$LIBS
9317 LIBS="-lXss -lX11 -lXext -lm $LIBS"
9318 cat >conftest.$ac_ext <<_ACEOF
9319 #line $LINENO "configure"
9320 /* confdefs.h.  */
9321 _ACEOF
9322 cat confdefs.h >>conftest.$ac_ext
9323 cat >>conftest.$ac_ext <<_ACEOF
9324 /* end confdefs.h.  */
9325
9326 /* Override any gcc2 internal prototype to avoid an error.  */
9327 #ifdef __cplusplus
9328 extern "C"
9329 #endif
9330 /* We use char because int might match the return type of a gcc2
9331    builtin and then its argument prototype would still apply.  */
9332 char XScreenSaverRegister ();
9333 int
9334 main ()
9335 {
9336 XScreenSaverRegister ();
9337   ;
9338   return 0;
9339 }
9340 _ACEOF
9341 rm -f conftest.$ac_objext conftest$ac_exeext
9342 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9343   (eval $ac_link) 2>&5
9344   ac_status=$?
9345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9346   (exit $ac_status); } &&
9347          { ac_try='test -s conftest$ac_exeext'
9348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9349   (eval $ac_try) 2>&5
9350   ac_status=$?
9351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9352   (exit $ac_status); }; }; then
9353   ac_cv_lib_Xss_XScreenSaverRegister=yes
9354 else
9355   echo "$as_me: failed program was:" >&5
9356 sed 's/^/| /' conftest.$ac_ext >&5
9357
9358 ac_cv_lib_Xss_XScreenSaverRegister=no
9359 fi
9360 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9361 LIBS=$ac_check_lib_save_LIBS
9362 fi
9363 echo "$as_me:$LINENO: result: $ac_cv_lib_Xss_XScreenSaverRegister" >&5
9364 echo "${ECHO_T}$ac_cv_lib_Xss_XScreenSaverRegister" >&6
9365 if test $ac_cv_lib_Xss_XScreenSaverRegister = yes; then
9366   have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
9367 else
9368   true
9369 fi
9370
9371   CPPFLAGS="$ac_save_CPPFLAGS"
9372   LDFLAGS="$ac_save_LDFLAGS"
9373 #  LIBS="$ac_save_LIBS"
9374
9375     fi
9376
9377   if test "$have_mit" = yes; then
9378     cat >>confdefs.h <<\_ACEOF
9379 #define HAVE_MIT_SAVER_EXTENSION 1
9380 _ACEOF
9381
9382   fi
9383
9384   fi
9385
9386 elif test "$with_mit" != no; then
9387   echo "error: must be yes or no: --with-mit-ext=$with_mit"
9388   exit 1
9389 fi
9390
9391
9392 ###############################################################################
9393 #
9394 #       Check for the XIDLE server extension.
9395 #
9396 ###############################################################################
9397
9398 have_xidle=no
9399 with_xidle_req=unspecified
9400
9401 # Check whether --with-xidle-ext or --without-xidle-ext was given.
9402 if test "${with_xidle_ext+set}" = set; then
9403   withval="$with_xidle_ext"
9404   with_xidle="$withval"; with_xidle_req="$withval"
9405 else
9406   with_xidle=yes
9407 fi;
9408
9409
9410    case "$with_xidle" in
9411     yes) ;;
9412     no)  ;;
9413
9414     /*)
9415      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
9416 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
9417      d=$with_xidle/include
9418      if test -d $d; then
9419        X_CFLAGS="-I$d $X_CFLAGS"
9420        echo "$as_me:$LINENO: result: $d" >&5
9421 echo "${ECHO_T}$d" >&6
9422      else
9423        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9424 echo "${ECHO_T}not found ($d: no such directory)" >&6
9425      fi
9426
9427      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
9428 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
9429      d=$with_xidle/lib
9430      if test -d $d; then
9431        X_LIBS="-L$d $X_LIBS"
9432        echo "$as_me:$LINENO: result: $d" >&5
9433 echo "${ECHO_T}$d" >&6
9434      else
9435        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9436 echo "${ECHO_T}not found ($d: no such directory)" >&6
9437      fi
9438
9439      # replace the directory string with "yes".
9440      with_xidle_req="yes"
9441      with_xidle=$with_xidle_req
9442      ;;
9443
9444     *)
9445      echo ""
9446      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
9447      echo "       If it is a directory, then \`DIR/include' will be added to"
9448      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9449      exit 1
9450      ;;
9451    esac
9452
9453
9454 if test "$with_xidle" = yes; then
9455
9456   ac_save_CPPFLAGS="$CPPFLAGS"
9457   if test \! -z "$includedir" ; then
9458     CPPFLAGS="$CPPFLAGS -I$includedir"
9459   fi
9460   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9461   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
9462 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
9463 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
9464   echo $ECHO_N "(cached) $ECHO_C" >&6
9465 else
9466   cat >conftest.$ac_ext <<_ACEOF
9467 #line $LINENO "configure"
9468 /* confdefs.h.  */
9469 _ACEOF
9470 cat confdefs.h >>conftest.$ac_ext
9471 cat >>conftest.$ac_ext <<_ACEOF
9472 /* end confdefs.h.  */
9473 #include <X11/Xlib.h>
9474
9475 #include <X11/extensions/xidle.h>
9476 _ACEOF
9477 rm -f conftest.$ac_objext
9478 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9479   (eval $ac_compile) 2>&5
9480   ac_status=$?
9481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9482   (exit $ac_status); } &&
9483          { ac_try='test -s conftest.$ac_objext'
9484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9485   (eval $ac_try) 2>&5
9486   ac_status=$?
9487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9488   (exit $ac_status); }; }; then
9489   ac_cv_header_X11_extensions_xidle_h=yes
9490 else
9491   echo "$as_me: failed program was:" >&5
9492 sed 's/^/| /' conftest.$ac_ext >&5
9493
9494 ac_cv_header_X11_extensions_xidle_h=no
9495 fi
9496 rm -f conftest.$ac_objext conftest.$ac_ext
9497 fi
9498 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
9499 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
9500 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
9501   have_xidle=yes
9502                      cat >>confdefs.h <<\_ACEOF
9503 #define HAVE_XIDLE_EXTENSION 1
9504 _ACEOF
9505
9506 fi
9507
9508
9509   CPPFLAGS="$ac_save_CPPFLAGS"
9510 elif test "$with_xidle" != no; then
9511   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
9512   exit 1
9513 fi
9514
9515
9516 ###############################################################################
9517 #
9518 #       Check for the SGI-VIDEO-CONTROL server extension.
9519 #
9520 ###############################################################################
9521
9522 have_sgivc=no
9523 with_sgivc_req=unspecified
9524
9525 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
9526 if test "${with_sgivc_ext+set}" = set; then
9527   withval="$with_sgivc_ext"
9528   with_sgivc="$withval"; with_sgivc_req="$withval"
9529 else
9530   with_sgivc=yes
9531 fi;
9532
9533
9534    case "$with_sgivc" in
9535     yes) ;;
9536     no)  ;;
9537
9538     /*)
9539      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
9540 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
9541      d=$with_sgivc/include
9542      if test -d $d; then
9543        X_CFLAGS="-I$d $X_CFLAGS"
9544        echo "$as_me:$LINENO: result: $d" >&5
9545 echo "${ECHO_T}$d" >&6
9546      else
9547        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9548 echo "${ECHO_T}not found ($d: no such directory)" >&6
9549      fi
9550
9551      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
9552 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
9553      d=$with_sgivc/lib
9554      if test -d $d; then
9555        X_LIBS="-L$d $X_LIBS"
9556        echo "$as_me:$LINENO: result: $d" >&5
9557 echo "${ECHO_T}$d" >&6
9558      else
9559        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9560 echo "${ECHO_T}not found ($d: no such directory)" >&6
9561      fi
9562
9563      # replace the directory string with "yes".
9564      with_sgivc_req="yes"
9565      with_sgivc=$with_sgivc_req
9566      ;;
9567
9568     *)
9569      echo ""
9570      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
9571      echo "       If it is a directory, then \`DIR/include' will be added to"
9572      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9573      exit 1
9574      ;;
9575    esac
9576
9577
9578 if test "$with_sgivc" = yes; then
9579
9580   # first check for XSGIvc.h
9581
9582   ac_save_CPPFLAGS="$CPPFLAGS"
9583   if test \! -z "$includedir" ; then
9584     CPPFLAGS="$CPPFLAGS -I$includedir"
9585   fi
9586   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9587   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
9588 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
9589 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
9590   echo $ECHO_N "(cached) $ECHO_C" >&6
9591 else
9592   cat >conftest.$ac_ext <<_ACEOF
9593 #line $LINENO "configure"
9594 /* confdefs.h.  */
9595 _ACEOF
9596 cat confdefs.h >>conftest.$ac_ext
9597 cat >>conftest.$ac_ext <<_ACEOF
9598 /* end confdefs.h.  */
9599 #include <X11/Xlib.h>
9600
9601 #include <X11/extensions/XSGIvc.h>
9602 _ACEOF
9603 rm -f conftest.$ac_objext
9604 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9605   (eval $ac_compile) 2>&5
9606   ac_status=$?
9607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9608   (exit $ac_status); } &&
9609          { ac_try='test -s conftest.$ac_objext'
9610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9611   (eval $ac_try) 2>&5
9612   ac_status=$?
9613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9614   (exit $ac_status); }; }; then
9615   ac_cv_header_X11_extensions_XSGIvc_h=yes
9616 else
9617   echo "$as_me: failed program was:" >&5
9618 sed 's/^/| /' conftest.$ac_ext >&5
9619
9620 ac_cv_header_X11_extensions_XSGIvc_h=no
9621 fi
9622 rm -f conftest.$ac_objext conftest.$ac_ext
9623 fi
9624 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
9625 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
9626 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
9627   have_sgivc=yes
9628 fi
9629
9630
9631   CPPFLAGS="$ac_save_CPPFLAGS"
9632
9633   # if that succeeded, then check for the -lXsgivc
9634   if test "$have_sgivc" = yes; then
9635     have_sgivc=no
9636
9637   ac_save_CPPFLAGS="$CPPFLAGS"
9638   ac_save_LDFLAGS="$LDFLAGS"
9639 #  ac_save_LIBS="$LIBS"
9640
9641   if test \! -z "$includedir" ; then
9642     CPPFLAGS="$CPPFLAGS -I$includedir"
9643   fi
9644   # note: $X_CFLAGS includes $x_includes
9645   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9646
9647   if test \! -z "$libdir" ; then
9648     LDFLAGS="$LDFLAGS -L$libdir"
9649   fi
9650   # note: $X_LIBS includes $x_libraries
9651   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9652
9653   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
9654 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
9655 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
9656   echo $ECHO_N "(cached) $ECHO_C" >&6
9657 else
9658   ac_check_lib_save_LIBS=$LIBS
9659 LIBS="-lXsgivc -lXext -lX11 $LIBS"
9660 cat >conftest.$ac_ext <<_ACEOF
9661 #line $LINENO "configure"
9662 /* confdefs.h.  */
9663 _ACEOF
9664 cat confdefs.h >>conftest.$ac_ext
9665 cat >>conftest.$ac_ext <<_ACEOF
9666 /* end confdefs.h.  */
9667
9668 /* Override any gcc2 internal prototype to avoid an error.  */
9669 #ifdef __cplusplus
9670 extern "C"
9671 #endif
9672 /* We use char because int might match the return type of a gcc2
9673    builtin and then its argument prototype would still apply.  */
9674 char XSGIvcQueryGammaMap ();
9675 int
9676 main ()
9677 {
9678 XSGIvcQueryGammaMap ();
9679   ;
9680   return 0;
9681 }
9682 _ACEOF
9683 rm -f conftest.$ac_objext conftest$ac_exeext
9684 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9685   (eval $ac_link) 2>&5
9686   ac_status=$?
9687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9688   (exit $ac_status); } &&
9689          { ac_try='test -s conftest$ac_exeext'
9690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9691   (eval $ac_try) 2>&5
9692   ac_status=$?
9693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9694   (exit $ac_status); }; }; then
9695   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
9696 else
9697   echo "$as_me: failed program was:" >&5
9698 sed 's/^/| /' conftest.$ac_ext >&5
9699
9700 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
9701 fi
9702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9703 LIBS=$ac_check_lib_save_LIBS
9704 fi
9705 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
9706 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
9707 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
9708   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
9709 else
9710   true
9711 fi
9712
9713   CPPFLAGS="$ac_save_CPPFLAGS"
9714   LDFLAGS="$ac_save_LDFLAGS"
9715 #  LIBS="$ac_save_LIBS"
9716
9717   fi
9718
9719   # if that succeeded, then we've really got it.
9720   if test "$have_sgivc" = yes; then
9721     cat >>confdefs.h <<\_ACEOF
9722 #define HAVE_SGI_VC_EXTENSION 1
9723 _ACEOF
9724
9725   fi
9726
9727 elif test "$with_sgivc" != no; then
9728   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
9729   exit 1
9730 fi
9731
9732
9733 ###############################################################################
9734 #
9735 #       Check for the DPMS server extension.
9736 #
9737 ###############################################################################
9738
9739 have_dpms=no
9740 with_dpms_req=unspecified
9741
9742 # Check whether --with-dpms-ext or --without-dpms-ext was given.
9743 if test "${with_dpms_ext+set}" = set; then
9744   withval="$with_dpms_ext"
9745   with_dpms="$withval"; with_dpms_req="$withval"
9746 else
9747   with_dpms=yes
9748 fi;
9749
9750
9751    case "$with_dpms" in
9752     yes) ;;
9753     no)  ;;
9754
9755     /*)
9756      echo "$as_me:$LINENO: checking for DPMS headers" >&5
9757 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
9758      d=$with_dpms/include
9759      if test -d $d; then
9760        X_CFLAGS="-I$d $X_CFLAGS"
9761        echo "$as_me:$LINENO: result: $d" >&5
9762 echo "${ECHO_T}$d" >&6
9763      else
9764        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9765 echo "${ECHO_T}not found ($d: no such directory)" >&6
9766      fi
9767
9768      echo "$as_me:$LINENO: checking for DPMS libs" >&5
9769 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
9770      d=$with_dpms/lib
9771      if test -d $d; then
9772        X_LIBS="-L$d $X_LIBS"
9773        echo "$as_me:$LINENO: result: $d" >&5
9774 echo "${ECHO_T}$d" >&6
9775      else
9776        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9777 echo "${ECHO_T}not found ($d: no such directory)" >&6
9778      fi
9779
9780      # replace the directory string with "yes".
9781      with_dpms_req="yes"
9782      with_dpms=$with_dpms_req
9783      ;;
9784
9785     *)
9786      echo ""
9787      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
9788      echo "       If it is a directory, then \`DIR/include' will be added to"
9789      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9790      exit 1
9791      ;;
9792    esac
9793
9794
9795 if test "$with_dpms" = yes; then
9796
9797   # first check for dpms.h
9798
9799   ac_save_CPPFLAGS="$CPPFLAGS"
9800   if test \! -z "$includedir" ; then
9801     CPPFLAGS="$CPPFLAGS -I$includedir"
9802   fi
9803   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9804   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
9805 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
9806 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
9807   echo $ECHO_N "(cached) $ECHO_C" >&6
9808 else
9809   cat >conftest.$ac_ext <<_ACEOF
9810 #line $LINENO "configure"
9811 /* confdefs.h.  */
9812 _ACEOF
9813 cat confdefs.h >>conftest.$ac_ext
9814 cat >>conftest.$ac_ext <<_ACEOF
9815 /* end confdefs.h.  */
9816 #include <X11/Xlib.h>
9817                      #include <X11/Xmd.h>
9818
9819 #include <X11/extensions/dpms.h>
9820 _ACEOF
9821 rm -f conftest.$ac_objext
9822 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9823   (eval $ac_compile) 2>&5
9824   ac_status=$?
9825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9826   (exit $ac_status); } &&
9827          { ac_try='test -s conftest.$ac_objext'
9828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9829   (eval $ac_try) 2>&5
9830   ac_status=$?
9831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9832   (exit $ac_status); }; }; then
9833   ac_cv_header_X11_extensions_dpms_h=yes
9834 else
9835   echo "$as_me: failed program was:" >&5
9836 sed 's/^/| /' conftest.$ac_ext >&5
9837
9838 ac_cv_header_X11_extensions_dpms_h=no
9839 fi
9840 rm -f conftest.$ac_objext conftest.$ac_ext
9841 fi
9842 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
9843 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
9844 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
9845   have_dpms=yes
9846 fi
9847
9848
9849   CPPFLAGS="$ac_save_CPPFLAGS"
9850
9851   # if that succeeded, then check for the DPMS code in the libraries
9852   if test "$have_dpms" = yes; then
9853
9854     # first look in -lXext (this is where it is with XFree86 4.0)
9855     have_dpms=no
9856
9857   ac_save_CPPFLAGS="$CPPFLAGS"
9858   ac_save_LDFLAGS="$LDFLAGS"
9859 #  ac_save_LIBS="$LIBS"
9860
9861   if test \! -z "$includedir" ; then
9862     CPPFLAGS="$CPPFLAGS -I$includedir"
9863   fi
9864   # note: $X_CFLAGS includes $x_includes
9865   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9866
9867   if test \! -z "$libdir" ; then
9868     LDFLAGS="$LDFLAGS -L$libdir"
9869   fi
9870   # note: $X_LIBS includes $x_libraries
9871   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9872
9873   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
9874 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
9875 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
9876   echo $ECHO_N "(cached) $ECHO_C" >&6
9877 else
9878   ac_check_lib_save_LIBS=$LIBS
9879 LIBS="-lXext -lXext -lX11 $LIBS"
9880 cat >conftest.$ac_ext <<_ACEOF
9881 #line $LINENO "configure"
9882 /* confdefs.h.  */
9883 _ACEOF
9884 cat confdefs.h >>conftest.$ac_ext
9885 cat >>conftest.$ac_ext <<_ACEOF
9886 /* end confdefs.h.  */
9887
9888 /* Override any gcc2 internal prototype to avoid an error.  */
9889 #ifdef __cplusplus
9890 extern "C"
9891 #endif
9892 /* We use char because int might match the return type of a gcc2
9893    builtin and then its argument prototype would still apply.  */
9894 char DPMSInfo ();
9895 int
9896 main ()
9897 {
9898 DPMSInfo ();
9899   ;
9900   return 0;
9901 }
9902 _ACEOF
9903 rm -f conftest.$ac_objext conftest$ac_exeext
9904 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9905   (eval $ac_link) 2>&5
9906   ac_status=$?
9907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9908   (exit $ac_status); } &&
9909          { ac_try='test -s conftest$ac_exeext'
9910   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9911   (eval $ac_try) 2>&5
9912   ac_status=$?
9913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9914   (exit $ac_status); }; }; then
9915   ac_cv_lib_Xext_DPMSInfo=yes
9916 else
9917   echo "$as_me: failed program was:" >&5
9918 sed 's/^/| /' conftest.$ac_ext >&5
9919
9920 ac_cv_lib_Xext_DPMSInfo=no
9921 fi
9922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9923 LIBS=$ac_check_lib_save_LIBS
9924 fi
9925 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
9926 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
9927 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
9928   have_dpms=yes
9929 else
9930   true
9931 fi
9932
9933   CPPFLAGS="$ac_save_CPPFLAGS"
9934   LDFLAGS="$ac_save_LDFLAGS"
9935 #  LIBS="$ac_save_LIBS"
9936
9937
9938     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
9939     if test "$have_dpms" = no; then
9940
9941   ac_save_CPPFLAGS="$CPPFLAGS"
9942   ac_save_LDFLAGS="$LDFLAGS"
9943 #  ac_save_LIBS="$LIBS"
9944
9945   if test \! -z "$includedir" ; then
9946     CPPFLAGS="$CPPFLAGS -I$includedir"
9947   fi
9948   # note: $X_CFLAGS includes $x_includes
9949   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9950
9951   if test \! -z "$libdir" ; then
9952     LDFLAGS="$LDFLAGS -L$libdir"
9953   fi
9954   # note: $X_LIBS includes $x_libraries
9955   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
9956
9957   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
9958 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
9959 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
9960   echo $ECHO_N "(cached) $ECHO_C" >&6
9961 else
9962   ac_check_lib_save_LIBS=$LIBS
9963 LIBS="-lXdpms -lXext -lX11 $LIBS"
9964 cat >conftest.$ac_ext <<_ACEOF
9965 #line $LINENO "configure"
9966 /* confdefs.h.  */
9967 _ACEOF
9968 cat confdefs.h >>conftest.$ac_ext
9969 cat >>conftest.$ac_ext <<_ACEOF
9970 /* end confdefs.h.  */
9971
9972 /* Override any gcc2 internal prototype to avoid an error.  */
9973 #ifdef __cplusplus
9974 extern "C"
9975 #endif
9976 /* We use char because int might match the return type of a gcc2
9977    builtin and then its argument prototype would still apply.  */
9978 char DPMSInfo ();
9979 int
9980 main ()
9981 {
9982 DPMSInfo ();
9983   ;
9984   return 0;
9985 }
9986 _ACEOF
9987 rm -f conftest.$ac_objext conftest$ac_exeext
9988 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9989   (eval $ac_link) 2>&5
9990   ac_status=$?
9991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9992   (exit $ac_status); } &&
9993          { ac_try='test -s conftest$ac_exeext'
9994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9995   (eval $ac_try) 2>&5
9996   ac_status=$?
9997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9998   (exit $ac_status); }; }; then
9999   ac_cv_lib_Xdpms_DPMSInfo=yes
10000 else
10001   echo "$as_me: failed program was:" >&5
10002 sed 's/^/| /' conftest.$ac_ext >&5
10003
10004 ac_cv_lib_Xdpms_DPMSInfo=no
10005 fi
10006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10007 LIBS=$ac_check_lib_save_LIBS
10008 fi
10009 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
10010 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
10011 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
10012   have_dpms=yes; XDPMS_LIBS="-lXdpms"
10013 else
10014   true
10015 fi
10016
10017   CPPFLAGS="$ac_save_CPPFLAGS"
10018   LDFLAGS="$ac_save_LDFLAGS"
10019 #  LIBS="$ac_save_LIBS"
10020
10021     fi
10022   fi
10023
10024
10025   # if that succeeded, then we've really got it.
10026   if test "$have_dpms" = yes; then
10027     cat >>confdefs.h <<\_ACEOF
10028 #define HAVE_DPMS_EXTENSION 1
10029 _ACEOF
10030
10031   fi
10032
10033 elif test "$with_dpms" != no; then
10034   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
10035   exit 1
10036 fi
10037
10038
10039 ###############################################################################
10040 #
10041 #       Check for the XINERAMA server extension.
10042 #
10043 ###############################################################################
10044
10045 have_xinerama=no
10046 with_xinerama_req=unspecified
10047
10048 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
10049 if test "${with_xinerama_ext+set}" = set; then
10050   withval="$with_xinerama_ext"
10051   with_xinerama="$withval"; with_xinerama_req="$withval"
10052 else
10053   with_xinerama=yes
10054 fi;
10055
10056
10057    case "$with_xinerama" in
10058     yes) ;;
10059     no)  ;;
10060
10061     /*)
10062      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
10063 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
10064      d=$with_xinerama/include
10065      if test -d $d; then
10066        X_CFLAGS="-I$d $X_CFLAGS"
10067        echo "$as_me:$LINENO: result: $d" >&5
10068 echo "${ECHO_T}$d" >&6
10069      else
10070        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10071 echo "${ECHO_T}not found ($d: no such directory)" >&6
10072      fi
10073
10074      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
10075 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
10076      d=$with_xinerama/lib
10077      if test -d $d; then
10078        X_LIBS="-L$d $X_LIBS"
10079        echo "$as_me:$LINENO: result: $d" >&5
10080 echo "${ECHO_T}$d" >&6
10081      else
10082        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10083 echo "${ECHO_T}not found ($d: no such directory)" >&6
10084      fi
10085
10086      # replace the directory string with "yes".
10087      with_xinerama_req="yes"
10088      with_xinerama=$with_xinerama_req
10089      ;;
10090
10091     *)
10092      echo ""
10093      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
10094      echo "       If it is a directory, then \`DIR/include' will be added to"
10095      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10096      exit 1
10097      ;;
10098    esac
10099
10100
10101 if test "$with_xinerama" = yes; then
10102
10103   # first check for Xinerama.h
10104
10105   ac_save_CPPFLAGS="$CPPFLAGS"
10106   if test \! -z "$includedir" ; then
10107     CPPFLAGS="$CPPFLAGS -I$includedir"
10108   fi
10109   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10110   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
10111 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
10112 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
10113   echo $ECHO_N "(cached) $ECHO_C" >&6
10114 else
10115   cat >conftest.$ac_ext <<_ACEOF
10116 #line $LINENO "configure"
10117 /* confdefs.h.  */
10118 _ACEOF
10119 cat confdefs.h >>conftest.$ac_ext
10120 cat >>conftest.$ac_ext <<_ACEOF
10121 /* end confdefs.h.  */
10122 #include <X11/Xlib.h>
10123
10124 #include <X11/extensions/Xinerama.h>
10125 _ACEOF
10126 rm -f conftest.$ac_objext
10127 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10128   (eval $ac_compile) 2>&5
10129   ac_status=$?
10130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10131   (exit $ac_status); } &&
10132          { ac_try='test -s conftest.$ac_objext'
10133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10134   (eval $ac_try) 2>&5
10135   ac_status=$?
10136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10137   (exit $ac_status); }; }; then
10138   ac_cv_header_X11_extensions_Xinerama_h=yes
10139 else
10140   echo "$as_me: failed program was:" >&5
10141 sed 's/^/| /' conftest.$ac_ext >&5
10142
10143 ac_cv_header_X11_extensions_Xinerama_h=no
10144 fi
10145 rm -f conftest.$ac_objext conftest.$ac_ext
10146 fi
10147 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
10148 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
10149 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
10150   have_xinerama=yes
10151 fi
10152
10153
10154   CPPFLAGS="$ac_save_CPPFLAGS"
10155
10156   # if that succeeded, then check for the XINERAMA code in the libraries
10157   if test "$have_xinerama" = yes; then
10158
10159     # first look in -lXext
10160     have_xinerama=no
10161
10162   ac_save_CPPFLAGS="$CPPFLAGS"
10163   ac_save_LDFLAGS="$LDFLAGS"
10164 #  ac_save_LIBS="$LIBS"
10165
10166   if test \! -z "$includedir" ; then
10167     CPPFLAGS="$CPPFLAGS -I$includedir"
10168   fi
10169   # note: $X_CFLAGS includes $x_includes
10170   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10171
10172   if test \! -z "$libdir" ; then
10173     LDFLAGS="$LDFLAGS -L$libdir"
10174   fi
10175   # note: $X_LIBS includes $x_libraries
10176   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10177
10178   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXext" >&5
10179 echo $ECHO_N "checking for XineramaQueryExtension in -lXext... $ECHO_C" >&6
10180 if test "${ac_cv_lib_Xext_XineramaQueryExtension+set}" = set; then
10181   echo $ECHO_N "(cached) $ECHO_C" >&6
10182 else
10183   ac_check_lib_save_LIBS=$LIBS
10184 LIBS="-lXext -lXext -lX11 $LIBS"
10185 cat >conftest.$ac_ext <<_ACEOF
10186 #line $LINENO "configure"
10187 /* confdefs.h.  */
10188 _ACEOF
10189 cat confdefs.h >>conftest.$ac_ext
10190 cat >>conftest.$ac_ext <<_ACEOF
10191 /* end confdefs.h.  */
10192
10193 /* Override any gcc2 internal prototype to avoid an error.  */
10194 #ifdef __cplusplus
10195 extern "C"
10196 #endif
10197 /* We use char because int might match the return type of a gcc2
10198    builtin and then its argument prototype would still apply.  */
10199 char XineramaQueryExtension ();
10200 int
10201 main ()
10202 {
10203 XineramaQueryExtension ();
10204   ;
10205   return 0;
10206 }
10207 _ACEOF
10208 rm -f conftest.$ac_objext conftest$ac_exeext
10209 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10210   (eval $ac_link) 2>&5
10211   ac_status=$?
10212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10213   (exit $ac_status); } &&
10214          { ac_try='test -s conftest$ac_exeext'
10215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10216   (eval $ac_try) 2>&5
10217   ac_status=$?
10218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10219   (exit $ac_status); }; }; then
10220   ac_cv_lib_Xext_XineramaQueryExtension=yes
10221 else
10222   echo "$as_me: failed program was:" >&5
10223 sed 's/^/| /' conftest.$ac_ext >&5
10224
10225 ac_cv_lib_Xext_XineramaQueryExtension=no
10226 fi
10227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10228 LIBS=$ac_check_lib_save_LIBS
10229 fi
10230 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryExtension" >&5
10231 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryExtension" >&6
10232 if test $ac_cv_lib_Xext_XineramaQueryExtension = yes; then
10233   have_xinerama=yes
10234 else
10235   true
10236 fi
10237
10238   CPPFLAGS="$ac_save_CPPFLAGS"
10239   LDFLAGS="$ac_save_LDFLAGS"
10240 #  LIBS="$ac_save_LIBS"
10241
10242
10243     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
10244     if test "$have_xinerama" = no; then
10245
10246   ac_save_CPPFLAGS="$CPPFLAGS"
10247   ac_save_LDFLAGS="$LDFLAGS"
10248 #  ac_save_LIBS="$LIBS"
10249
10250   if test \! -z "$includedir" ; then
10251     CPPFLAGS="$CPPFLAGS -I$includedir"
10252   fi
10253   # note: $X_CFLAGS includes $x_includes
10254   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10255
10256   if test \! -z "$libdir" ; then
10257     LDFLAGS="$LDFLAGS -L$libdir"
10258   fi
10259   # note: $X_LIBS includes $x_libraries
10260   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10261
10262   echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXinerama" >&5
10263 echo $ECHO_N "checking for XineramaQueryExtension in -lXinerama... $ECHO_C" >&6
10264 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then
10265   echo $ECHO_N "(cached) $ECHO_C" >&6
10266 else
10267   ac_check_lib_save_LIBS=$LIBS
10268 LIBS="-lXinerama -lXext -lX11 $LIBS"
10269 cat >conftest.$ac_ext <<_ACEOF
10270 #line $LINENO "configure"
10271 /* confdefs.h.  */
10272 _ACEOF
10273 cat confdefs.h >>conftest.$ac_ext
10274 cat >>conftest.$ac_ext <<_ACEOF
10275 /* end confdefs.h.  */
10276
10277 /* Override any gcc2 internal prototype to avoid an error.  */
10278 #ifdef __cplusplus
10279 extern "C"
10280 #endif
10281 /* We use char because int might match the return type of a gcc2
10282    builtin and then its argument prototype would still apply.  */
10283 char XineramaQueryExtension ();
10284 int
10285 main ()
10286 {
10287 XineramaQueryExtension ();
10288   ;
10289   return 0;
10290 }
10291 _ACEOF
10292 rm -f conftest.$ac_objext conftest$ac_exeext
10293 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10294   (eval $ac_link) 2>&5
10295   ac_status=$?
10296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10297   (exit $ac_status); } &&
10298          { ac_try='test -s conftest$ac_exeext'
10299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10300   (eval $ac_try) 2>&5
10301   ac_status=$?
10302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10303   (exit $ac_status); }; }; then
10304   ac_cv_lib_Xinerama_XineramaQueryExtension=yes
10305 else
10306   echo "$as_me: failed program was:" >&5
10307 sed 's/^/| /' conftest.$ac_ext >&5
10308
10309 ac_cv_lib_Xinerama_XineramaQueryExtension=no
10310 fi
10311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10312 LIBS=$ac_check_lib_save_LIBS
10313 fi
10314 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
10315 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6
10316 if test $ac_cv_lib_Xinerama_XineramaQueryExtension = yes; then
10317   have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"
10318 else
10319   true
10320 fi
10321
10322   CPPFLAGS="$ac_save_CPPFLAGS"
10323   LDFLAGS="$ac_save_LDFLAGS"
10324 #  LIBS="$ac_save_LIBS"
10325
10326     fi
10327   fi
10328
10329   # if that succeeded, then we've really got it.
10330   if test "$have_xinerama" = yes; then
10331     cat >>confdefs.h <<\_ACEOF
10332 #define HAVE_XINERAMA 1
10333 _ACEOF
10334
10335   fi
10336
10337 elif test "$with_xinerama" != no; then
10338   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
10339   exit 1
10340 fi
10341
10342
10343 ###############################################################################
10344 #
10345 #       Check for the XF86VMODE server extension (for virtual screens.)
10346 #
10347 ###############################################################################
10348
10349 have_xf86vmode=no
10350 with_xf86vmode_req=unspecified
10351
10352 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
10353 if test "${with_xf86vmode_ext+set}" = set; then
10354   withval="$with_xf86vmode_ext"
10355   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
10356 else
10357   with_xf86vmode=yes
10358 fi;
10359
10360
10361    case "$with_xf86vmode" in
10362     yes) ;;
10363     no)  ;;
10364
10365     /*)
10366      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
10367 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
10368      d=$with_xf86vmode/include
10369      if test -d $d; then
10370        X_CFLAGS="-I$d $X_CFLAGS"
10371        echo "$as_me:$LINENO: result: $d" >&5
10372 echo "${ECHO_T}$d" >&6
10373      else
10374        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10375 echo "${ECHO_T}not found ($d: no such directory)" >&6
10376      fi
10377
10378      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
10379 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
10380      d=$with_xf86vmode/lib
10381      if test -d $d; then
10382        X_LIBS="-L$d $X_LIBS"
10383        echo "$as_me:$LINENO: result: $d" >&5
10384 echo "${ECHO_T}$d" >&6
10385      else
10386        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10387 echo "${ECHO_T}not found ($d: no such directory)" >&6
10388      fi
10389
10390      # replace the directory string with "yes".
10391      with_xf86vmode_req="yes"
10392      with_xf86vmode=$with_xf86vmode_req
10393      ;;
10394
10395     *)
10396      echo ""
10397      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
10398      echo "       If it is a directory, then \`DIR/include' will be added to"
10399      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10400      exit 1
10401      ;;
10402    esac
10403
10404
10405 if test "$with_xf86vmode" = yes; then
10406
10407   # first check for xf86vmode.h
10408
10409   ac_save_CPPFLAGS="$CPPFLAGS"
10410   if test \! -z "$includedir" ; then
10411     CPPFLAGS="$CPPFLAGS -I$includedir"
10412   fi
10413   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10414   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10415 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10416 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10417   echo $ECHO_N "(cached) $ECHO_C" >&6
10418 else
10419   cat >conftest.$ac_ext <<_ACEOF
10420 #line $LINENO "configure"
10421 /* confdefs.h.  */
10422 _ACEOF
10423 cat confdefs.h >>conftest.$ac_ext
10424 cat >>conftest.$ac_ext <<_ACEOF
10425 /* end confdefs.h.  */
10426 #include <X11/Xlib.h>
10427
10428 #include <X11/extensions/xf86vmode.h>
10429 _ACEOF
10430 rm -f conftest.$ac_objext
10431 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10432   (eval $ac_compile) 2>&5
10433   ac_status=$?
10434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10435   (exit $ac_status); } &&
10436          { ac_try='test -s conftest.$ac_objext'
10437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10438   (eval $ac_try) 2>&5
10439   ac_status=$?
10440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10441   (exit $ac_status); }; }; then
10442   ac_cv_header_X11_extensions_xf86vmode_h=yes
10443 else
10444   echo "$as_me: failed program was:" >&5
10445 sed 's/^/| /' conftest.$ac_ext >&5
10446
10447 ac_cv_header_X11_extensions_xf86vmode_h=no
10448 fi
10449 rm -f conftest.$ac_objext conftest.$ac_ext
10450 fi
10451 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10452 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10453 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10454   have_xf86vmode=yes
10455 fi
10456
10457
10458   CPPFLAGS="$ac_save_CPPFLAGS"
10459
10460   # if that succeeded, then check for the -lXxf86vm
10461   if test "$have_xf86vmode" = yes; then
10462     have_xf86vmode=no
10463
10464   ac_save_CPPFLAGS="$CPPFLAGS"
10465   ac_save_LDFLAGS="$LDFLAGS"
10466 #  ac_save_LIBS="$LIBS"
10467
10468   if test \! -z "$includedir" ; then
10469     CPPFLAGS="$CPPFLAGS -I$includedir"
10470   fi
10471   # note: $X_CFLAGS includes $x_includes
10472   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10473
10474   if test \! -z "$libdir" ; then
10475     LDFLAGS="$LDFLAGS -L$libdir"
10476   fi
10477   # note: $X_LIBS includes $x_libraries
10478   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10479
10480   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
10481 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
10482 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
10483   echo $ECHO_N "(cached) $ECHO_C" >&6
10484 else
10485   ac_check_lib_save_LIBS=$LIBS
10486 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10487 cat >conftest.$ac_ext <<_ACEOF
10488 #line $LINENO "configure"
10489 /* confdefs.h.  */
10490 _ACEOF
10491 cat confdefs.h >>conftest.$ac_ext
10492 cat >>conftest.$ac_ext <<_ACEOF
10493 /* end confdefs.h.  */
10494
10495 /* Override any gcc2 internal prototype to avoid an error.  */
10496 #ifdef __cplusplus
10497 extern "C"
10498 #endif
10499 /* We use char because int might match the return type of a gcc2
10500    builtin and then its argument prototype would still apply.  */
10501 char XF86VidModeGetViewPort ();
10502 int
10503 main ()
10504 {
10505 XF86VidModeGetViewPort ();
10506   ;
10507   return 0;
10508 }
10509 _ACEOF
10510 rm -f conftest.$ac_objext conftest$ac_exeext
10511 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10512   (eval $ac_link) 2>&5
10513   ac_status=$?
10514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10515   (exit $ac_status); } &&
10516          { ac_try='test -s conftest$ac_exeext'
10517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10518   (eval $ac_try) 2>&5
10519   ac_status=$?
10520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10521   (exit $ac_status); }; }; then
10522   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
10523 else
10524   echo "$as_me: failed program was:" >&5
10525 sed 's/^/| /' conftest.$ac_ext >&5
10526
10527 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
10528 fi
10529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10530 LIBS=$ac_check_lib_save_LIBS
10531 fi
10532 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
10533 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
10534 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
10535   have_xf86vmode=yes; SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10536 else
10537   true
10538 fi
10539
10540   CPPFLAGS="$ac_save_CPPFLAGS"
10541   LDFLAGS="$ac_save_LDFLAGS"
10542 #  LIBS="$ac_save_LIBS"
10543
10544   fi
10545
10546   # if that succeeded, then we've really got it.
10547   if test "$have_xf86vmode" = yes; then
10548     cat >>confdefs.h <<\_ACEOF
10549 #define HAVE_XF86VMODE 1
10550 _ACEOF
10551
10552   fi
10553
10554 elif test "$with_xf86vmode" != no; then
10555   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
10556   exit 1
10557 fi
10558
10559
10560 ###############################################################################
10561 #
10562 #       Check for the XF86VMODE server extension (for gamma fading.)
10563 #
10564 ###############################################################################
10565
10566 have_xf86gamma=no
10567 have_xf86gamma_ramp=no
10568 with_xf86gamma_req=unspecified
10569
10570 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
10571 if test "${with_xf86gamma_ext+set}" = set; then
10572   withval="$with_xf86gamma_ext"
10573   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
10574 else
10575   with_xf86gamma=yes
10576 fi;
10577
10578
10579    case "$with_xf86gamma" in
10580     yes) ;;
10581     no)  ;;
10582
10583     /*)
10584      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
10585 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
10586      d=$with_xf86gamma/include
10587      if test -d $d; then
10588        X_CFLAGS="-I$d $X_CFLAGS"
10589        echo "$as_me:$LINENO: result: $d" >&5
10590 echo "${ECHO_T}$d" >&6
10591      else
10592        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10593 echo "${ECHO_T}not found ($d: no such directory)" >&6
10594      fi
10595
10596      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
10597 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
10598      d=$with_xf86gamma/lib
10599      if test -d $d; then
10600        X_LIBS="-L$d $X_LIBS"
10601        echo "$as_me:$LINENO: result: $d" >&5
10602 echo "${ECHO_T}$d" >&6
10603      else
10604        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10605 echo "${ECHO_T}not found ($d: no such directory)" >&6
10606      fi
10607
10608      # replace the directory string with "yes".
10609      with_xf86gamma_req="yes"
10610      with_xf86gamma=$with_xf86gamma_req
10611      ;;
10612
10613     *)
10614      echo ""
10615      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
10616      echo "       If it is a directory, then \`DIR/include' will be added to"
10617      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10618      exit 1
10619      ;;
10620    esac
10621
10622
10623 if test "$with_xf86gamma" = yes; then
10624
10625   # first check for xf86vmode.h, if we haven't already
10626   if test "$have_xf86vmode" = yes; then
10627     have_xf86gamma=yes
10628   else
10629
10630   ac_save_CPPFLAGS="$CPPFLAGS"
10631   if test \! -z "$includedir" ; then
10632     CPPFLAGS="$CPPFLAGS -I$includedir"
10633   fi
10634   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10635   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10636 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10637 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10638   echo $ECHO_N "(cached) $ECHO_C" >&6
10639 else
10640   cat >conftest.$ac_ext <<_ACEOF
10641 #line $LINENO "configure"
10642 /* confdefs.h.  */
10643 _ACEOF
10644 cat confdefs.h >>conftest.$ac_ext
10645 cat >>conftest.$ac_ext <<_ACEOF
10646 /* end confdefs.h.  */
10647 #include <X11/Xlib.h>
10648
10649 #include <X11/extensions/xf86vmode.h>
10650 _ACEOF
10651 rm -f conftest.$ac_objext
10652 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10653   (eval $ac_compile) 2>&5
10654   ac_status=$?
10655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10656   (exit $ac_status); } &&
10657          { ac_try='test -s conftest.$ac_objext'
10658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10659   (eval $ac_try) 2>&5
10660   ac_status=$?
10661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10662   (exit $ac_status); }; }; then
10663   ac_cv_header_X11_extensions_xf86vmode_h=yes
10664 else
10665   echo "$as_me: failed program was:" >&5
10666 sed 's/^/| /' conftest.$ac_ext >&5
10667
10668 ac_cv_header_X11_extensions_xf86vmode_h=no
10669 fi
10670 rm -f conftest.$ac_objext conftest.$ac_ext
10671 fi
10672 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10673 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10674 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10675   have_xf86gamma=yes
10676 fi
10677
10678
10679   CPPFLAGS="$ac_save_CPPFLAGS"
10680   fi
10681
10682   # if that succeeded, then check for the -lXxf86vm
10683   if test "$have_xf86gamma" = yes; then
10684     have_xf86gamma=no
10685
10686   ac_save_CPPFLAGS="$CPPFLAGS"
10687   ac_save_LDFLAGS="$LDFLAGS"
10688 #  ac_save_LIBS="$LIBS"
10689
10690   if test \! -z "$includedir" ; then
10691     CPPFLAGS="$CPPFLAGS -I$includedir"
10692   fi
10693   # note: $X_CFLAGS includes $x_includes
10694   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10695
10696   if test \! -z "$libdir" ; then
10697     LDFLAGS="$LDFLAGS -L$libdir"
10698   fi
10699   # note: $X_LIBS includes $x_libraries
10700   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10701
10702   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
10703 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
10704 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
10705   echo $ECHO_N "(cached) $ECHO_C" >&6
10706 else
10707   ac_check_lib_save_LIBS=$LIBS
10708 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10709 cat >conftest.$ac_ext <<_ACEOF
10710 #line $LINENO "configure"
10711 /* confdefs.h.  */
10712 _ACEOF
10713 cat confdefs.h >>conftest.$ac_ext
10714 cat >>conftest.$ac_ext <<_ACEOF
10715 /* end confdefs.h.  */
10716
10717 /* Override any gcc2 internal prototype to avoid an error.  */
10718 #ifdef __cplusplus
10719 extern "C"
10720 #endif
10721 /* We use char because int might match the return type of a gcc2
10722    builtin and then its argument prototype would still apply.  */
10723 char XF86VidModeSetGamma ();
10724 int
10725 main ()
10726 {
10727 XF86VidModeSetGamma ();
10728   ;
10729   return 0;
10730 }
10731 _ACEOF
10732 rm -f conftest.$ac_objext conftest$ac_exeext
10733 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10734   (eval $ac_link) 2>&5
10735   ac_status=$?
10736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10737   (exit $ac_status); } &&
10738          { ac_try='test -s conftest$ac_exeext'
10739   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10740   (eval $ac_try) 2>&5
10741   ac_status=$?
10742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10743   (exit $ac_status); }; }; then
10744   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
10745 else
10746   echo "$as_me: failed program was:" >&5
10747 sed 's/^/| /' conftest.$ac_ext >&5
10748
10749 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
10750 fi
10751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10752 LIBS=$ac_check_lib_save_LIBS
10753 fi
10754 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
10755 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
10756 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
10757   have_xf86gamma=yes
10758 else
10759   true
10760 fi
10761
10762   CPPFLAGS="$ac_save_CPPFLAGS"
10763   LDFLAGS="$ac_save_LDFLAGS"
10764 #  LIBS="$ac_save_LIBS"
10765
10766   fi
10767
10768   # check for the Ramp versions of the functions too.
10769   if test "$have_xf86gamma" = yes; then
10770     have_xf86gamma_ramp=no
10771
10772   ac_save_CPPFLAGS="$CPPFLAGS"
10773   ac_save_LDFLAGS="$LDFLAGS"
10774 #  ac_save_LIBS="$LIBS"
10775
10776   if test \! -z "$includedir" ; then
10777     CPPFLAGS="$CPPFLAGS -I$includedir"
10778   fi
10779   # note: $X_CFLAGS includes $x_includes
10780   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10781
10782   if test \! -z "$libdir" ; then
10783     LDFLAGS="$LDFLAGS -L$libdir"
10784   fi
10785   # note: $X_LIBS includes $x_libraries
10786   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10787
10788   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
10789 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
10790 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
10791   echo $ECHO_N "(cached) $ECHO_C" >&6
10792 else
10793   ac_check_lib_save_LIBS=$LIBS
10794 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10795 cat >conftest.$ac_ext <<_ACEOF
10796 #line $LINENO "configure"
10797 /* confdefs.h.  */
10798 _ACEOF
10799 cat confdefs.h >>conftest.$ac_ext
10800 cat >>conftest.$ac_ext <<_ACEOF
10801 /* end confdefs.h.  */
10802
10803 /* Override any gcc2 internal prototype to avoid an error.  */
10804 #ifdef __cplusplus
10805 extern "C"
10806 #endif
10807 /* We use char because int might match the return type of a gcc2
10808    builtin and then its argument prototype would still apply.  */
10809 char XF86VidModeSetGammaRamp ();
10810 int
10811 main ()
10812 {
10813 XF86VidModeSetGammaRamp ();
10814   ;
10815   return 0;
10816 }
10817 _ACEOF
10818 rm -f conftest.$ac_objext conftest$ac_exeext
10819 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10820   (eval $ac_link) 2>&5
10821   ac_status=$?
10822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10823   (exit $ac_status); } &&
10824          { ac_try='test -s conftest$ac_exeext'
10825   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10826   (eval $ac_try) 2>&5
10827   ac_status=$?
10828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10829   (exit $ac_status); }; }; then
10830   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
10831 else
10832   echo "$as_me: failed program was:" >&5
10833 sed 's/^/| /' conftest.$ac_ext >&5
10834
10835 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
10836 fi
10837 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10838 LIBS=$ac_check_lib_save_LIBS
10839 fi
10840 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
10841 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
10842 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
10843   have_xf86gamma_ramp=yes
10844 else
10845   true
10846 fi
10847
10848   CPPFLAGS="$ac_save_CPPFLAGS"
10849   LDFLAGS="$ac_save_LDFLAGS"
10850 #  LIBS="$ac_save_LIBS"
10851
10852   fi
10853
10854   # if those tests succeeded, then we've really got the functions.
10855   if test "$have_xf86gamma" = yes; then
10856     cat >>confdefs.h <<\_ACEOF
10857 #define HAVE_XF86VMODE_GAMMA 1
10858 _ACEOF
10859
10860   fi
10861
10862   if test "$have_xf86gamma_ramp" = yes; then
10863     cat >>confdefs.h <<\_ACEOF
10864 #define HAVE_XF86VMODE_GAMMA_RAMP 1
10865 _ACEOF
10866
10867   fi
10868
10869   # pull in the lib, if we haven't already
10870   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
10871     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
10872   fi
10873
10874 elif test "$with_xf86gamma" != no; then
10875   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
10876   exit 1
10877 fi
10878
10879
10880 ###############################################################################
10881 #
10882 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
10883 #       using other XF86 stuff.)
10884 #
10885 ###############################################################################
10886
10887 have_xf86miscsetgrabkeysstate=no
10888 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
10889
10890   ac_save_CPPFLAGS="$CPPFLAGS"
10891   ac_save_LDFLAGS="$LDFLAGS"
10892 #  ac_save_LIBS="$LIBS"
10893
10894   if test \! -z "$includedir" ; then
10895     CPPFLAGS="$CPPFLAGS -I$includedir"
10896   fi
10897   # note: $X_CFLAGS includes $x_includes
10898   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10899
10900   if test \! -z "$libdir" ; then
10901     LDFLAGS="$LDFLAGS -L$libdir"
10902   fi
10903   # note: $X_LIBS includes $x_libraries
10904   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10905
10906   echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
10907 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6
10908 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
10909   echo $ECHO_N "(cached) $ECHO_C" >&6
10910 else
10911   ac_check_lib_save_LIBS=$LIBS
10912 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
10913 cat >conftest.$ac_ext <<_ACEOF
10914 #line $LINENO "configure"
10915 /* confdefs.h.  */
10916 _ACEOF
10917 cat confdefs.h >>conftest.$ac_ext
10918 cat >>conftest.$ac_ext <<_ACEOF
10919 /* end confdefs.h.  */
10920
10921 /* Override any gcc2 internal prototype to avoid an error.  */
10922 #ifdef __cplusplus
10923 extern "C"
10924 #endif
10925 /* We use char because int might match the return type of a gcc2
10926    builtin and then its argument prototype would still apply.  */
10927 char XF86MiscSetGrabKeysState ();
10928 int
10929 main ()
10930 {
10931 XF86MiscSetGrabKeysState ();
10932   ;
10933   return 0;
10934 }
10935 _ACEOF
10936 rm -f conftest.$ac_objext conftest$ac_exeext
10937 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10938   (eval $ac_link) 2>&5
10939   ac_status=$?
10940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10941   (exit $ac_status); } &&
10942          { ac_try='test -s conftest$ac_exeext'
10943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10944   (eval $ac_try) 2>&5
10945   ac_status=$?
10946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10947   (exit $ac_status); }; }; then
10948   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
10949 else
10950   echo "$as_me: failed program was:" >&5
10951 sed 's/^/| /' conftest.$ac_ext >&5
10952
10953 ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
10954 fi
10955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10956 LIBS=$ac_check_lib_save_LIBS
10957 fi
10958 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
10959 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6
10960 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
10961   have_xf86miscsetgrabkeysstate=yes
10962 else
10963   true
10964 fi
10965
10966   CPPFLAGS="$ac_save_CPPFLAGS"
10967   LDFLAGS="$ac_save_LDFLAGS"
10968 #  LIBS="$ac_save_LIBS"
10969
10970   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
10971     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
10972     cat >>confdefs.h <<\_ACEOF
10973 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
10974 _ACEOF
10975
10976   fi
10977 fi
10978
10979
10980 ###############################################################################
10981 #
10982 #       Check for HP XHPDisableReset and XHPEnableReset.
10983 #
10984 ###############################################################################
10985
10986 echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
10987 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6
10988
10989   ac_save_CPPFLAGS="$CPPFLAGS"
10990   if test \! -z "$includedir" ; then
10991     CPPFLAGS="$CPPFLAGS -I$includedir"
10992   fi
10993   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10994   cat >conftest.$ac_ext <<_ACEOF
10995 #line $LINENO "configure"
10996 /* confdefs.h.  */
10997 _ACEOF
10998 cat confdefs.h >>conftest.$ac_ext
10999 cat >>conftest.$ac_ext <<_ACEOF
11000 /* end confdefs.h.  */
11001 #include <X11/XHPlib.h>
11002
11003 _ACEOF
11004 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11005   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
11006   cat >>confdefs.h <<\_ACEOF
11007 #define HAVE_XHPDISABLERESET 1
11008 _ACEOF
11009
11010                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
11011                    echo "$as_me:$LINENO: result: yes" >&5
11012 echo "${ECHO_T}yes" >&6
11013 else
11014   echo "$as_me:$LINENO: result: no" >&5
11015 echo "${ECHO_T}no" >&6
11016 fi
11017 rm -f conftest*
11018
11019   CPPFLAGS="$ac_save_CPPFLAGS"
11020
11021
11022 ###############################################################################
11023 #
11024 #       Check for /proc/interrupts.
11025 #
11026 ###############################################################################
11027
11028 have_proc_interrupts=no
11029 with_proc_interrupts_req=unspecified
11030
11031 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
11032 if test "${with_proc_interrupts+set}" = set; then
11033   withval="$with_proc_interrupts"
11034   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
11035 else
11036   with_proc_interrupts=yes
11037 fi;
11038
11039 if test "$with_proc_interrupts" = yes; then
11040
11041    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
11042 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
11043 if test "${ac_cv_have_proc_interrupts+set}" = set; then
11044   echo $ECHO_N "(cached) $ECHO_C" >&6
11045 else
11046   ac_cv_have_proc_interrupts=no
11047      if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
11048        ac_cv_have_proc_interrupts=yes
11049      fi
11050
11051 fi
11052 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
11053 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
11054    have_proc_interrupts=$ac_cv_have_proc_interrupts
11055
11056   if test "$have_proc_interrupts" = yes; then
11057     cat >>confdefs.h <<\_ACEOF
11058 #define HAVE_PROC_INTERRUPTS 1
11059 _ACEOF
11060
11061   fi
11062
11063 elif test "$with_proc_interrupts" != no; then
11064   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
11065   exit 1
11066 fi
11067
11068
11069 ###############################################################################
11070 #
11071 #       The --enable-locking option
11072 #
11073 ###############################################################################
11074
11075 # Check whether --enable-locking or --disable-locking was given.
11076 if test "${enable_locking+set}" = set; then
11077   enableval="$enable_locking"
11078   enable_locking="$enableval"
11079 else
11080   enable_locking=yes
11081 fi;
11082 if test "$enable_locking" = yes; then
11083   true
11084 elif test "$enable_locking" = no; then
11085   cat >>confdefs.h <<\_ACEOF
11086 #define NO_LOCKING 1
11087 _ACEOF
11088
11089 else
11090   echo "error: must be yes or no: --enable-locking=$enable_locking"
11091   exit 1
11092 fi
11093
11094 # We can't lock on MacOS X, so don't even bother compiling in support for it.
11095 #
11096 if test "$ac_macosx" = yes; then
11097   if test "$enable_locking" = yes; then
11098     echo "$as_me:$LINENO: result: locking disabled: it doesn't work on MacOS X" >&5
11099 echo "${ECHO_T}locking disabled: it doesn't work on MacOS X" >&6
11100     enable_locking=no
11101     cat >>confdefs.h <<\_ACEOF
11102 #define NO_LOCKING 1
11103 _ACEOF
11104
11105   fi
11106 fi
11107
11108
11109 ###############################################################################
11110 #
11111 #       The --enable-vt-locking option
11112 #
11113 ###############################################################################
11114
11115 #ac_vt_lockswitch=no
11116 #AC_ARG_ENABLE(vt-locking,[
11117 #  --enable-vt-locking     Compile in support for locking Virtual Terminals.
11118 #                          This is the default if the system supports it, and
11119 #                          if locking support is included (--enable-locking.)
11120 #  --disable-vt-locking    Do not allow locking of VTs, even if locking is
11121 #                          enabled.],
11122 #  [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
11123 #if test "$enable_vt_locking" = yes; then
11124 #
11125 #  AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
11126 #   [AC_TRY_COMPILE([#include <fcntl.h>
11127 #                   #include <sys/ioctl.h>
11128 #                   #include <sys/vt.h>],
11129 #                  [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
11130 #                  [ac_cv_vt_lockswitch=yes],
11131 #                  [ac_cv_vt_lockswitch=no])])
11132 #  ac_vt_lockswitch=$ac_cv_vt_lockswitch
11133 #
11134 #elif test "$enable_vt_locking" = no; then
11135 #  true
11136 #else
11137 #  echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
11138 #  exit 1
11139 #fi
11140 #
11141 #if test "$ac_vt_lockswitch" = yes; then
11142 #  AC_DEFINE(HAVE_VT_LOCKSWITCH)
11143 #  # the VT_LOCKSWITCH ioctl can only be used when running as root.
11144 #  # #### but it doesn't work yet, so don't worry about that for now.
11145 ##  need_setuid=yes
11146 #fi
11147
11148
11149 ###############################################################################
11150 #
11151 #       Check for PAM.
11152 #
11153 ###############################################################################
11154
11155 case "$host" in
11156   *-solaris*)
11157    # Solaris systems tend to come with PAM misconfigured.
11158    #  Don't build it by default, even if the headers exist.
11159    with_pam_default=no
11160    ;;
11161   *)
11162    # Default to building PAM support on all other systems, if it exists.
11163    with_pam_default=yes
11164   ;;
11165 esac
11166
11167 have_pam=no
11168 with_pam_req=unspecified
11169
11170
11171 # Check whether --with-pam or --without-pam was given.
11172 if test "${with_pam+set}" = set; then
11173   withval="$with_pam"
11174   with_pam="$withval"; with_pam_req="$withval"
11175 else
11176   with_pam=$with_pam_default
11177 fi;
11178
11179
11180    case "$with_pam" in
11181     yes) ;;
11182     no)  ;;
11183
11184     /*)
11185      echo "$as_me:$LINENO: checking for PAM headers" >&5
11186 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
11187      d=$with_pam/include
11188      if test -d $d; then
11189        X_CFLAGS="-I$d $X_CFLAGS"
11190        echo "$as_me:$LINENO: result: $d" >&5
11191 echo "${ECHO_T}$d" >&6
11192      else
11193        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11194 echo "${ECHO_T}not found ($d: no such directory)" >&6
11195      fi
11196
11197      echo "$as_me:$LINENO: checking for PAM libs" >&5
11198 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
11199      d=$with_pam/lib
11200      if test -d $d; then
11201        X_LIBS="-L$d $X_LIBS"
11202        echo "$as_me:$LINENO: result: $d" >&5
11203 echo "${ECHO_T}$d" >&6
11204      else
11205        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11206 echo "${ECHO_T}not found ($d: no such directory)" >&6
11207      fi
11208
11209      # replace the directory string with "yes".
11210      with_pam_req="yes"
11211      with_pam=$with_pam_req
11212      ;;
11213
11214     *)
11215      echo ""
11216      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
11217      echo "       If it is a directory, then \`DIR/include' will be added to"
11218      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11219      exit 1
11220      ;;
11221    esac
11222
11223
11224 if test "$enable_locking" = yes -a "$with_pam" = yes; then
11225   echo "$as_me:$LINENO: checking for PAM" >&5
11226 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
11227 if test "${ac_cv_pam+set}" = set; then
11228   echo $ECHO_N "(cached) $ECHO_C" >&6
11229 else
11230
11231   ac_save_CPPFLAGS="$CPPFLAGS"
11232   if test \! -z "$includedir" ; then
11233     CPPFLAGS="$CPPFLAGS -I$includedir"
11234   fi
11235   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11236   cat >conftest.$ac_ext <<_ACEOF
11237 #line $LINENO "configure"
11238 /* confdefs.h.  */
11239 _ACEOF
11240 cat confdefs.h >>conftest.$ac_ext
11241 cat >>conftest.$ac_ext <<_ACEOF
11242 /* end confdefs.h.  */
11243 #include <security/pam_appl.h>
11244 int
11245 main ()
11246 {
11247
11248   ;
11249   return 0;
11250 }
11251 _ACEOF
11252 rm -f conftest.$ac_objext
11253 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11254   (eval $ac_compile) 2>&5
11255   ac_status=$?
11256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11257   (exit $ac_status); } &&
11258          { ac_try='test -s conftest.$ac_objext'
11259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11260   (eval $ac_try) 2>&5
11261   ac_status=$?
11262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11263   (exit $ac_status); }; }; then
11264   ac_cv_pam=yes
11265 else
11266   echo "$as_me: failed program was:" >&5
11267 sed 's/^/| /' conftest.$ac_ext >&5
11268
11269 ac_cv_pam=no
11270 fi
11271 rm -f conftest.$ac_objext conftest.$ac_ext
11272   CPPFLAGS="$ac_save_CPPFLAGS"
11273 fi
11274 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
11275 echo "${ECHO_T}$ac_cv_pam" >&6
11276   if test "$ac_cv_pam" = yes ; then
11277     have_pam=yes
11278     cat >>confdefs.h <<\_ACEOF
11279 #define HAVE_PAM 1
11280 _ACEOF
11281
11282     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
11283
11284     # libpam typically requires dlopen and dlsym.  On FreeBSD,
11285     # those are in libc.  On Linux and Solaris, they're in libdl.
11286     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
11287 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
11288 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
11289   echo $ECHO_N "(cached) $ECHO_C" >&6
11290 else
11291   ac_check_lib_save_LIBS=$LIBS
11292 LIBS="-ldl  $LIBS"
11293 cat >conftest.$ac_ext <<_ACEOF
11294 #line $LINENO "configure"
11295 /* confdefs.h.  */
11296 _ACEOF
11297 cat confdefs.h >>conftest.$ac_ext
11298 cat >>conftest.$ac_ext <<_ACEOF
11299 /* end confdefs.h.  */
11300
11301 /* Override any gcc2 internal prototype to avoid an error.  */
11302 #ifdef __cplusplus
11303 extern "C"
11304 #endif
11305 /* We use char because int might match the return type of a gcc2
11306    builtin and then its argument prototype would still apply.  */
11307 char dlopen ();
11308 int
11309 main ()
11310 {
11311 dlopen ();
11312   ;
11313   return 0;
11314 }
11315 _ACEOF
11316 rm -f conftest.$ac_objext conftest$ac_exeext
11317 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11318   (eval $ac_link) 2>&5
11319   ac_status=$?
11320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11321   (exit $ac_status); } &&
11322          { ac_try='test -s conftest$ac_exeext'
11323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11324   (eval $ac_try) 2>&5
11325   ac_status=$?
11326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11327   (exit $ac_status); }; }; then
11328   ac_cv_lib_dl_dlopen=yes
11329 else
11330   echo "$as_me: failed program was:" >&5
11331 sed 's/^/| /' conftest.$ac_ext >&5
11332
11333 ac_cv_lib_dl_dlopen=no
11334 fi
11335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11336 LIBS=$ac_check_lib_save_LIBS
11337 fi
11338 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
11339 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
11340 if test $ac_cv_lib_dl_dlopen = yes; then
11341   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
11342 fi
11343
11344
11345     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
11346 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
11347     if test "${ac_cv_pam_strerror_args+set}" = set; then
11348   echo $ECHO_N "(cached) $ECHO_C" >&6
11349 else
11350   cat >conftest.$ac_ext <<_ACEOF
11351 #line $LINENO "configure"
11352 /* confdefs.h.  */
11353 _ACEOF
11354 cat confdefs.h >>conftest.$ac_ext
11355 cat >>conftest.$ac_ext <<_ACEOF
11356 /* end confdefs.h.  */
11357 #include <stdio.h>
11358                       #include <stdlib.h>
11359                       #include <security/pam_appl.h>
11360 int
11361 main ()
11362 {
11363 pam_handle_t *pamh = 0;
11364                       char *s = pam_strerror(pamh, PAM_SUCCESS);
11365   ;
11366   return 0;
11367 }
11368 _ACEOF
11369 rm -f conftest.$ac_objext
11370 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11371   (eval $ac_compile) 2>&5
11372   ac_status=$?
11373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11374   (exit $ac_status); } &&
11375          { ac_try='test -s conftest.$ac_objext'
11376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11377   (eval $ac_try) 2>&5
11378   ac_status=$?
11379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11380   (exit $ac_status); }; }; then
11381   ac_pam_strerror_args=2
11382 else
11383   echo "$as_me: failed program was:" >&5
11384 sed 's/^/| /' conftest.$ac_ext >&5
11385
11386 cat >conftest.$ac_ext <<_ACEOF
11387 #line $LINENO "configure"
11388 /* confdefs.h.  */
11389 _ACEOF
11390 cat confdefs.h >>conftest.$ac_ext
11391 cat >>conftest.$ac_ext <<_ACEOF
11392 /* end confdefs.h.  */
11393 #include <stdio.h>
11394                                       #include <stdlib.h>
11395                                       #include <security/pam_appl.h>
11396 int
11397 main ()
11398 {
11399 char *s =
11400                                        pam_strerror(PAM_SUCCESS);
11401   ;
11402   return 0;
11403 }
11404 _ACEOF
11405 rm -f conftest.$ac_objext
11406 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11407   (eval $ac_compile) 2>&5
11408   ac_status=$?
11409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11410   (exit $ac_status); } &&
11411          { ac_try='test -s conftest.$ac_objext'
11412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11413   (eval $ac_try) 2>&5
11414   ac_status=$?
11415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11416   (exit $ac_status); }; }; then
11417   ac_pam_strerror_args=1
11418 else
11419   echo "$as_me: failed program was:" >&5
11420 sed 's/^/| /' conftest.$ac_ext >&5
11421
11422 ac_pam_strerror_args=0
11423 fi
11424 rm -f conftest.$ac_objext conftest.$ac_ext
11425 fi
11426 rm -f conftest.$ac_objext conftest.$ac_ext
11427       ac_cv_pam_strerror_args=$ac_pam_strerror_args
11428 fi
11429
11430     ac_pam_strerror_args=$ac_cv_pam_strerror_args
11431     if test "$ac_pam_strerror_args" = 1 ; then
11432       echo "$as_me:$LINENO: result: one argument" >&5
11433 echo "${ECHO_T}one argument" >&6
11434     elif test "$ac_pam_strerror_args" = 2 ; then
11435       cat >>confdefs.h <<\_ACEOF
11436 #define PAM_STRERROR_TWO_ARGS 1
11437 _ACEOF
11438
11439       echo "$as_me:$LINENO: result: two arguments" >&5
11440 echo "${ECHO_T}two arguments" >&6
11441     else
11442       echo "$as_me:$LINENO: result: unknown" >&5
11443 echo "${ECHO_T}unknown" >&6
11444     fi
11445   fi
11446 fi
11447
11448
11449 ###############################################################################
11450 #
11451 #       Check for Kerberos.
11452 #
11453 ###############################################################################
11454
11455 have_kerberos=no
11456 have_kerberos5=no
11457 with_kerberos_req=unspecified
11458
11459
11460 # Check whether --with-kerberos or --without-kerberos was given.
11461 if test "${with_kerberos+set}" = set; then
11462   withval="$with_kerberos"
11463   with_kerberos="$withval"; with_kerberos_req="$withval"
11464 else
11465   with_kerberos=yes
11466 fi;
11467
11468
11469    case "$with_kerberos" in
11470     yes) ;;
11471     no)  ;;
11472
11473     /*)
11474      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
11475 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
11476      d=$with_kerberos/include
11477      if test -d $d; then
11478        X_CFLAGS="-I$d $X_CFLAGS"
11479        echo "$as_me:$LINENO: result: $d" >&5
11480 echo "${ECHO_T}$d" >&6
11481      else
11482        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11483 echo "${ECHO_T}not found ($d: no such directory)" >&6
11484      fi
11485
11486      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
11487 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
11488      d=$with_kerberos/lib
11489      if test -d $d; then
11490        X_LIBS="-L$d $X_LIBS"
11491        echo "$as_me:$LINENO: result: $d" >&5
11492 echo "${ECHO_T}$d" >&6
11493      else
11494        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11495 echo "${ECHO_T}not found ($d: no such directory)" >&6
11496      fi
11497
11498      # replace the directory string with "yes".
11499      with_kerberos_req="yes"
11500      with_kerberos=$with_kerberos_req
11501      ;;
11502
11503     *)
11504      echo ""
11505      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
11506      echo "       If it is a directory, then \`DIR/include' will be added to"
11507      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11508      exit 1
11509      ;;
11510    esac
11511
11512
11513 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
11514   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
11515 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
11516 if test "${ac_cv_kerberos+set}" = set; then
11517   echo $ECHO_N "(cached) $ECHO_C" >&6
11518 else
11519
11520   ac_save_CPPFLAGS="$CPPFLAGS"
11521   if test \! -z "$includedir" ; then
11522     CPPFLAGS="$CPPFLAGS -I$includedir"
11523   fi
11524   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11525   cat >conftest.$ac_ext <<_ACEOF
11526 #line $LINENO "configure"
11527 /* confdefs.h.  */
11528 _ACEOF
11529 cat confdefs.h >>conftest.$ac_ext
11530 cat >>conftest.$ac_ext <<_ACEOF
11531 /* end confdefs.h.  */
11532 #include <krb.h>
11533 int
11534 main ()
11535 {
11536
11537   ;
11538   return 0;
11539 }
11540 _ACEOF
11541 rm -f conftest.$ac_objext
11542 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11543   (eval $ac_compile) 2>&5
11544   ac_status=$?
11545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11546   (exit $ac_status); } &&
11547          { ac_try='test -s conftest.$ac_objext'
11548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11549   (eval $ac_try) 2>&5
11550   ac_status=$?
11551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11552   (exit $ac_status); }; }; then
11553   ac_cv_kerberos=yes
11554 else
11555   echo "$as_me: failed program was:" >&5
11556 sed 's/^/| /' conftest.$ac_ext >&5
11557
11558 ac_cv_kerberos=no
11559 fi
11560 rm -f conftest.$ac_objext conftest.$ac_ext
11561   CPPFLAGS="$ac_save_CPPFLAGS"
11562 fi
11563 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
11564 echo "${ECHO_T}$ac_cv_kerberos" >&6
11565   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
11566 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
11567 if test "${ac_cv_kerberos5+set}" = set; then
11568   echo $ECHO_N "(cached) $ECHO_C" >&6
11569 else
11570
11571   ac_save_CPPFLAGS="$CPPFLAGS"
11572   if test \! -z "$includedir" ; then
11573     CPPFLAGS="$CPPFLAGS -I$includedir"
11574   fi
11575   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11576   cat >conftest.$ac_ext <<_ACEOF
11577 #line $LINENO "configure"
11578 /* confdefs.h.  */
11579 _ACEOF
11580 cat confdefs.h >>conftest.$ac_ext
11581 cat >>conftest.$ac_ext <<_ACEOF
11582 /* end confdefs.h.  */
11583 #include <kerberosIV/krb.h>
11584 int
11585 main ()
11586 {
11587
11588   ;
11589   return 0;
11590 }
11591 _ACEOF
11592 rm -f conftest.$ac_objext
11593 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11594   (eval $ac_compile) 2>&5
11595   ac_status=$?
11596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11597   (exit $ac_status); } &&
11598          { ac_try='test -s conftest.$ac_objext'
11599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11600   (eval $ac_try) 2>&5
11601   ac_status=$?
11602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11603   (exit $ac_status); }; }; then
11604   ac_cv_kerberos5=yes
11605 else
11606   echo "$as_me: failed program was:" >&5
11607 sed 's/^/| /' conftest.$ac_ext >&5
11608
11609 ac_cv_kerberos5=no
11610 fi
11611 rm -f conftest.$ac_objext conftest.$ac_ext
11612   CPPFLAGS="$ac_save_CPPFLAGS"
11613 fi
11614 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
11615 echo "${ECHO_T}$ac_cv_kerberos5" >&6
11616
11617   if test "$ac_cv_kerberos" = yes ; then
11618     have_kerberos=yes
11619     cat >>confdefs.h <<\_ACEOF
11620 #define HAVE_KERBEROS 1
11621 _ACEOF
11622
11623   fi
11624
11625   if test "$ac_cv_kerberos5" = yes ; then
11626
11627     # Andrew Snare <ajs@pigpond.com> wrote:
11628     #
11629     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
11630     # (krb4) was also available.  This turns out not to be the case with
11631     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
11632     # is optional.
11633     #
11634     # So, disable kerberosV support if libkrb4 can't be found.
11635     # This is not the best solution, but it makes the compile not fail.
11636     #
11637
11638   ac_save_CPPFLAGS="$CPPFLAGS"
11639   ac_save_LDFLAGS="$LDFLAGS"
11640 #  ac_save_LIBS="$LIBS"
11641
11642   if test \! -z "$includedir" ; then
11643     CPPFLAGS="$CPPFLAGS -I$includedir"
11644   fi
11645   # note: $X_CFLAGS includes $x_includes
11646   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11647
11648   if test \! -z "$libdir" ; then
11649     LDFLAGS="$LDFLAGS -L$libdir"
11650   fi
11651   # note: $X_LIBS includes $x_libraries
11652   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11653
11654   echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
11655 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6
11656 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
11657   echo $ECHO_N "(cached) $ECHO_C" >&6
11658 else
11659   ac_check_lib_save_LIBS=$LIBS
11660 LIBS="-lkrb4  $LIBS"
11661 cat >conftest.$ac_ext <<_ACEOF
11662 #line $LINENO "configure"
11663 /* confdefs.h.  */
11664 _ACEOF
11665 cat confdefs.h >>conftest.$ac_ext
11666 cat >>conftest.$ac_ext <<_ACEOF
11667 /* end confdefs.h.  */
11668
11669 /* Override any gcc2 internal prototype to avoid an error.  */
11670 #ifdef __cplusplus
11671 extern "C"
11672 #endif
11673 /* We use char because int might match the return type of a gcc2
11674    builtin and then its argument prototype would still apply.  */
11675 char krb_get_tf_realm ();
11676 int
11677 main ()
11678 {
11679 krb_get_tf_realm ();
11680   ;
11681   return 0;
11682 }
11683 _ACEOF
11684 rm -f conftest.$ac_objext conftest$ac_exeext
11685 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11686   (eval $ac_link) 2>&5
11687   ac_status=$?
11688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11689   (exit $ac_status); } &&
11690          { ac_try='test -s conftest$ac_exeext'
11691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11692   (eval $ac_try) 2>&5
11693   ac_status=$?
11694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11695   (exit $ac_status); }; }; then
11696   ac_cv_lib_krb4_krb_get_tf_realm=yes
11697 else
11698   echo "$as_me: failed program was:" >&5
11699 sed 's/^/| /' conftest.$ac_ext >&5
11700
11701 ac_cv_lib_krb4_krb_get_tf_realm=no
11702 fi
11703 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11704 LIBS=$ac_check_lib_save_LIBS
11705 fi
11706 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
11707 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6
11708 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
11709   have_kerberos=yes
11710 else
11711   have_kerberos=no
11712 fi
11713
11714   CPPFLAGS="$ac_save_CPPFLAGS"
11715   LDFLAGS="$ac_save_LDFLAGS"
11716 #  LIBS="$ac_save_LIBS"
11717
11718     if test "$have_kerberos" = yes ; then
11719       have_kerberos5=yes
11720       cat >>confdefs.h <<\_ACEOF
11721 #define HAVE_KERBEROS 1
11722 _ACEOF
11723
11724       cat >>confdefs.h <<\_ACEOF
11725 #define HAVE_KERBEROS5 1
11726 _ACEOF
11727
11728     else
11729       have_kerberos5=no
11730       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
11731 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
11732     fi
11733
11734   fi
11735
11736   if test "$have_kerberos5" = yes ; then
11737     # from Matt Knopp <mhat@infocalypse.netlag.com>
11738     # (who got it from amu@mit.edu)
11739
11740     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
11741
11742     # jwz: MacOS X uses -lkrb5, but not -lcrypt
11743
11744   ac_save_CPPFLAGS="$CPPFLAGS"
11745   ac_save_LDFLAGS="$LDFLAGS"
11746 #  ac_save_LIBS="$LIBS"
11747
11748   if test \! -z "$includedir" ; then
11749     CPPFLAGS="$CPPFLAGS -I$includedir"
11750   fi
11751   # note: $X_CFLAGS includes $x_includes
11752   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11753
11754   if test \! -z "$libdir" ; then
11755     LDFLAGS="$LDFLAGS -L$libdir"
11756   fi
11757   # note: $X_LIBS includes $x_libraries
11758   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11759
11760   echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
11761 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
11762 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
11763   echo $ECHO_N "(cached) $ECHO_C" >&6
11764 else
11765   ac_check_lib_save_LIBS=$LIBS
11766 LIBS="-lcrypt  $LIBS"
11767 cat >conftest.$ac_ext <<_ACEOF
11768 #line $LINENO "configure"
11769 /* confdefs.h.  */
11770 _ACEOF
11771 cat confdefs.h >>conftest.$ac_ext
11772 cat >>conftest.$ac_ext <<_ACEOF
11773 /* end confdefs.h.  */
11774
11775 /* Override any gcc2 internal prototype to avoid an error.  */
11776 #ifdef __cplusplus
11777 extern "C"
11778 #endif
11779 /* We use char because int might match the return type of a gcc2
11780    builtin and then its argument prototype would still apply.  */
11781 char crypt ();
11782 int
11783 main ()
11784 {
11785 crypt ();
11786   ;
11787   return 0;
11788 }
11789 _ACEOF
11790 rm -f conftest.$ac_objext conftest$ac_exeext
11791 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11792   (eval $ac_link) 2>&5
11793   ac_status=$?
11794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11795   (exit $ac_status); } &&
11796          { ac_try='test -s conftest$ac_exeext'
11797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11798   (eval $ac_try) 2>&5
11799   ac_status=$?
11800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11801   (exit $ac_status); }; }; then
11802   ac_cv_lib_crypt_crypt=yes
11803 else
11804   echo "$as_me: failed program was:" >&5
11805 sed 's/^/| /' conftest.$ac_ext >&5
11806
11807 ac_cv_lib_crypt_crypt=no
11808 fi
11809 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11810 LIBS=$ac_check_lib_save_LIBS
11811 fi
11812 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
11813 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
11814 if test $ac_cv_lib_crypt_crypt = yes; then
11815   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
11816 fi
11817
11818   CPPFLAGS="$ac_save_CPPFLAGS"
11819   LDFLAGS="$ac_save_LDFLAGS"
11820 #  LIBS="$ac_save_LIBS"
11821
11822
11823   elif test "$have_kerberos" = yes ; then
11824     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
11825     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
11826   fi
11827
11828   if test "$have_kerberos" = yes ; then
11829     echo "$as_me:$LINENO: checking for res_search" >&5
11830 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
11831 if test "${ac_cv_func_res_search+set}" = set; then
11832   echo $ECHO_N "(cached) $ECHO_C" >&6
11833 else
11834   cat >conftest.$ac_ext <<_ACEOF
11835 #line $LINENO "configure"
11836 /* confdefs.h.  */
11837 _ACEOF
11838 cat confdefs.h >>conftest.$ac_ext
11839 cat >>conftest.$ac_ext <<_ACEOF
11840 /* end confdefs.h.  */
11841 /* System header to define __stub macros and hopefully few prototypes,
11842     which can conflict with char res_search (); below.
11843     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11844     <limits.h> exists even on freestanding compilers.  */
11845 #ifdef __STDC__
11846 # include <limits.h>
11847 #else
11848 # include <assert.h>
11849 #endif
11850 /* Override any gcc2 internal prototype to avoid an error.  */
11851 #ifdef __cplusplus
11852 extern "C"
11853 {
11854 #endif
11855 /* We use char because int might match the return type of a gcc2
11856    builtin and then its argument prototype would still apply.  */
11857 char res_search ();
11858 /* The GNU C library defines this for functions which it implements
11859     to always fail with ENOSYS.  Some functions are actually named
11860     something starting with __ and the normal name is an alias.  */
11861 #if defined (__stub_res_search) || defined (__stub___res_search)
11862 choke me
11863 #else
11864 char (*f) () = res_search;
11865 #endif
11866 #ifdef __cplusplus
11867 }
11868 #endif
11869
11870 int
11871 main ()
11872 {
11873 return f != res_search;
11874   ;
11875   return 0;
11876 }
11877 _ACEOF
11878 rm -f conftest.$ac_objext conftest$ac_exeext
11879 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11880   (eval $ac_link) 2>&5
11881   ac_status=$?
11882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11883   (exit $ac_status); } &&
11884          { ac_try='test -s conftest$ac_exeext'
11885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11886   (eval $ac_try) 2>&5
11887   ac_status=$?
11888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11889   (exit $ac_status); }; }; then
11890   ac_cv_func_res_search=yes
11891 else
11892   echo "$as_me: failed program was:" >&5
11893 sed 's/^/| /' conftest.$ac_ext >&5
11894
11895 ac_cv_func_res_search=no
11896 fi
11897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11898 fi
11899 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
11900 echo "${ECHO_T}$ac_cv_func_res_search" >&6
11901 if test $ac_cv_func_res_search = yes; then
11902   :
11903 else
11904   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
11905 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
11906 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
11907   echo $ECHO_N "(cached) $ECHO_C" >&6
11908 else
11909   ac_check_lib_save_LIBS=$LIBS
11910 LIBS="-lresolv  $LIBS"
11911 cat >conftest.$ac_ext <<_ACEOF
11912 #line $LINENO "configure"
11913 /* confdefs.h.  */
11914 _ACEOF
11915 cat confdefs.h >>conftest.$ac_ext
11916 cat >>conftest.$ac_ext <<_ACEOF
11917 /* end confdefs.h.  */
11918
11919 /* Override any gcc2 internal prototype to avoid an error.  */
11920 #ifdef __cplusplus
11921 extern "C"
11922 #endif
11923 /* We use char because int might match the return type of a gcc2
11924    builtin and then its argument prototype would still apply.  */
11925 char res_search ();
11926 int
11927 main ()
11928 {
11929 res_search ();
11930   ;
11931   return 0;
11932 }
11933 _ACEOF
11934 rm -f conftest.$ac_objext conftest$ac_exeext
11935 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11936   (eval $ac_link) 2>&5
11937   ac_status=$?
11938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11939   (exit $ac_status); } &&
11940          { ac_try='test -s conftest$ac_exeext'
11941   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11942   (eval $ac_try) 2>&5
11943   ac_status=$?
11944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11945   (exit $ac_status); }; }; then
11946   ac_cv_lib_resolv_res_search=yes
11947 else
11948   echo "$as_me: failed program was:" >&5
11949 sed 's/^/| /' conftest.$ac_ext >&5
11950
11951 ac_cv_lib_resolv_res_search=no
11952 fi
11953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11954 LIBS=$ac_check_lib_save_LIBS
11955 fi
11956 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
11957 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
11958 if test $ac_cv_lib_resolv_res_search = yes; then
11959   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
11960 else
11961   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
11962 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
11963
11964 fi
11965
11966 fi
11967
11968   fi
11969 fi
11970
11971
11972 ###############################################################################
11973 #
11974 #       Check for the nine billion variants of shadow passwords...
11975 #
11976 ###############################################################################
11977
11978 need_setuid=no
11979
11980 have_shadow=no
11981 with_shadow_req=unspecified
11982
11983
11984 # Check whether --with-shadow or --without-shadow was given.
11985 if test "${with_shadow+set}" = set; then
11986   withval="$with_shadow"
11987   with_shadow="$withval"; with_shadow_req="$withval"
11988 else
11989   with_shadow=yes
11990 fi;
11991
11992
11993    case "$with_shadow" in
11994     yes) ;;
11995     no)  ;;
11996
11997     /*)
11998      echo "$as_me:$LINENO: checking for shadow password headers" >&5
11999 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
12000      d=$with_shadow/include
12001      if test -d $d; then
12002        X_CFLAGS="-I$d $X_CFLAGS"
12003        echo "$as_me:$LINENO: result: $d" >&5
12004 echo "${ECHO_T}$d" >&6
12005      else
12006        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12007 echo "${ECHO_T}not found ($d: no such directory)" >&6
12008      fi
12009
12010      echo "$as_me:$LINENO: checking for shadow password libs" >&5
12011 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
12012      d=$with_shadow/lib
12013      if test -d $d; then
12014        X_LIBS="-L$d $X_LIBS"
12015        echo "$as_me:$LINENO: result: $d" >&5
12016 echo "${ECHO_T}$d" >&6
12017      else
12018        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12019 echo "${ECHO_T}not found ($d: no such directory)" >&6
12020      fi
12021
12022      # replace the directory string with "yes".
12023      with_shadow_req="yes"
12024      with_shadow=$with_shadow_req
12025      ;;
12026
12027     *)
12028      echo ""
12029      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
12030      echo "       If it is a directory, then \`DIR/include' will be added to"
12031      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12032      exit 1
12033      ;;
12034    esac
12035
12036
12037 if test "$enable_locking" = no ; then
12038   with_shadow_req=no
12039   with_shadow=no
12040 fi
12041
12042
12043 ###############################################################################
12044 #
12045 #       Check for Sun "adjunct" passwords.
12046 #
12047 ###############################################################################
12048
12049 if test "$with_shadow" = yes ; then
12050   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
12051 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
12052 if test "${ac_cv_sun_adjunct+set}" = set; then
12053   echo $ECHO_N "(cached) $ECHO_C" >&6
12054 else
12055
12056   ac_save_CPPFLAGS="$CPPFLAGS"
12057   if test \! -z "$includedir" ; then
12058     CPPFLAGS="$CPPFLAGS -I$includedir"
12059   fi
12060   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12061   cat >conftest.$ac_ext <<_ACEOF
12062 #line $LINENO "configure"
12063 /* confdefs.h.  */
12064 _ACEOF
12065 cat confdefs.h >>conftest.$ac_ext
12066 cat >>conftest.$ac_ext <<_ACEOF
12067 /* end confdefs.h.  */
12068 #include <stdlib.h>
12069                                     #include <unistd.h>
12070                                     #include <sys/types.h>
12071                                     #include <sys/label.h>
12072                                     #include <sys/audit.h>
12073                                     #include <pwdadj.h>
12074 int
12075 main ()
12076 {
12077 struct passwd_adjunct *p = getpwanam("nobody");
12078                        const char *pw = p->pwa_passwd;
12079   ;
12080   return 0;
12081 }
12082 _ACEOF
12083 rm -f conftest.$ac_objext
12084 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12085   (eval $ac_compile) 2>&5
12086   ac_status=$?
12087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12088   (exit $ac_status); } &&
12089          { ac_try='test -s conftest.$ac_objext'
12090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12091   (eval $ac_try) 2>&5
12092   ac_status=$?
12093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12094   (exit $ac_status); }; }; then
12095   ac_cv_sun_adjunct=yes
12096 else
12097   echo "$as_me: failed program was:" >&5
12098 sed 's/^/| /' conftest.$ac_ext >&5
12099
12100 ac_cv_sun_adjunct=no
12101 fi
12102 rm -f conftest.$ac_objext conftest.$ac_ext
12103   CPPFLAGS="$ac_save_CPPFLAGS"
12104 fi
12105 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
12106 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
12107   if test "$ac_cv_sun_adjunct" = yes; then
12108     have_shadow_adjunct=yes
12109     have_shadow=yes
12110     need_setuid=yes
12111   fi
12112 fi
12113
12114
12115 ###############################################################################
12116 #
12117 #       Check for DEC and SCO so-called "enhanced" security.
12118 #
12119 ###############################################################################
12120
12121 if test "$with_shadow" = yes ; then
12122   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
12123 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
12124 if test "${ac_cv_enhanced_passwd+set}" = set; then
12125   echo $ECHO_N "(cached) $ECHO_C" >&6
12126 else
12127
12128   ac_save_CPPFLAGS="$CPPFLAGS"
12129   if test \! -z "$includedir" ; then
12130     CPPFLAGS="$CPPFLAGS -I$includedir"
12131   fi
12132   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12133   cat >conftest.$ac_ext <<_ACEOF
12134 #line $LINENO "configure"
12135 /* confdefs.h.  */
12136 _ACEOF
12137 cat confdefs.h >>conftest.$ac_ext
12138 cat >>conftest.$ac_ext <<_ACEOF
12139 /* end confdefs.h.  */
12140 #include <stdlib.h>
12141                                     #include <unistd.h>
12142                                     #include <sys/types.h>
12143                                     #include <pwd.h>
12144                                     #include <sys/security.h>
12145                                     #include <prot.h>
12146 int
12147 main ()
12148 {
12149 struct pr_passwd *p;
12150                        const char *pw;
12151                        set_auth_parameters(0, 0);
12152                        check_auth_parameters();
12153                        p = getprpwnam("nobody");
12154                        pw = p->ufld.fd_encrypt;
12155   ;
12156   return 0;
12157 }
12158 _ACEOF
12159 rm -f conftest.$ac_objext
12160 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12161   (eval $ac_compile) 2>&5
12162   ac_status=$?
12163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12164   (exit $ac_status); } &&
12165          { ac_try='test -s conftest.$ac_objext'
12166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12167   (eval $ac_try) 2>&5
12168   ac_status=$?
12169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12170   (exit $ac_status); }; }; then
12171   ac_cv_enhanced_passwd=yes
12172 else
12173   echo "$as_me: failed program was:" >&5
12174 sed 's/^/| /' conftest.$ac_ext >&5
12175
12176 ac_cv_enhanced_passwd=no
12177 fi
12178 rm -f conftest.$ac_objext conftest.$ac_ext
12179   CPPFLAGS="$ac_save_CPPFLAGS"
12180 fi
12181 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
12182 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
12183   if test $ac_cv_enhanced_passwd = yes; then
12184     have_shadow_enhanced=yes
12185     have_shadow=yes
12186     need_setuid=yes
12187
12188     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
12189     # (I'm told it needs -lcurses too, but I don't understand why.)
12190     # But on DEC, it's in -lsecurity.
12191     #
12192     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
12193 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
12194 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
12195   echo $ECHO_N "(cached) $ECHO_C" >&6
12196 else
12197   ac_check_lib_save_LIBS=$LIBS
12198 LIBS="-lprot -lx $LIBS"
12199 cat >conftest.$ac_ext <<_ACEOF
12200 #line $LINENO "configure"
12201 /* confdefs.h.  */
12202 _ACEOF
12203 cat confdefs.h >>conftest.$ac_ext
12204 cat >>conftest.$ac_ext <<_ACEOF
12205 /* end confdefs.h.  */
12206
12207 /* Override any gcc2 internal prototype to avoid an error.  */
12208 #ifdef __cplusplus
12209 extern "C"
12210 #endif
12211 /* We use char because int might match the return type of a gcc2
12212    builtin and then its argument prototype would still apply.  */
12213 char getprpwnam ();
12214 int
12215 main ()
12216 {
12217 getprpwnam ();
12218   ;
12219   return 0;
12220 }
12221 _ACEOF
12222 rm -f conftest.$ac_objext conftest$ac_exeext
12223 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12224   (eval $ac_link) 2>&5
12225   ac_status=$?
12226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12227   (exit $ac_status); } &&
12228          { ac_try='test -s conftest$ac_exeext'
12229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12230   (eval $ac_try) 2>&5
12231   ac_status=$?
12232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12233   (exit $ac_status); }; }; then
12234   ac_cv_lib_prot_getprpwnam=yes
12235 else
12236   echo "$as_me: failed program was:" >&5
12237 sed 's/^/| /' conftest.$ac_ext >&5
12238
12239 ac_cv_lib_prot_getprpwnam=no
12240 fi
12241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12242 LIBS=$ac_check_lib_save_LIBS
12243 fi
12244 echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
12245 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
12246 if test $ac_cv_lib_prot_getprpwnam = yes; then
12247   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
12248 else
12249   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
12250 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
12251 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
12252   echo $ECHO_N "(cached) $ECHO_C" >&6
12253 else
12254   ac_check_lib_save_LIBS=$LIBS
12255 LIBS="-lsecurity  $LIBS"
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
12264 /* Override any gcc2 internal prototype to avoid an error.  */
12265 #ifdef __cplusplus
12266 extern "C"
12267 #endif
12268 /* We use char because int might match the return type of a gcc2
12269    builtin and then its argument prototype would still apply.  */
12270 char getprpwnam ();
12271 int
12272 main ()
12273 {
12274 getprpwnam ();
12275   ;
12276   return 0;
12277 }
12278 _ACEOF
12279 rm -f conftest.$ac_objext conftest$ac_exeext
12280 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12281   (eval $ac_link) 2>&5
12282   ac_status=$?
12283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12284   (exit $ac_status); } &&
12285          { ac_try='test -s conftest$ac_exeext'
12286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12287   (eval $ac_try) 2>&5
12288   ac_status=$?
12289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12290   (exit $ac_status); }; }; then
12291   ac_cv_lib_security_getprpwnam=yes
12292 else
12293   echo "$as_me: failed program was:" >&5
12294 sed 's/^/| /' conftest.$ac_ext >&5
12295
12296 ac_cv_lib_security_getprpwnam=no
12297 fi
12298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12299 LIBS=$ac_check_lib_save_LIBS
12300 fi
12301 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
12302 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
12303 if test $ac_cv_lib_security_getprpwnam = yes; then
12304   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
12305 fi
12306
12307 fi
12308
12309   fi
12310 fi
12311
12312 ###############################################################################
12313 #
12314 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
12315 #
12316 ###############################################################################
12317
12318 if test "$with_shadow" = yes ; then
12319   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
12320 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
12321 if test "${ac_cv_hpux_passwd+set}" = set; then
12322   echo $ECHO_N "(cached) $ECHO_C" >&6
12323 else
12324
12325   ac_save_CPPFLAGS="$CPPFLAGS"
12326   if test \! -z "$includedir" ; then
12327     CPPFLAGS="$CPPFLAGS -I$includedir"
12328   fi
12329   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12330   cat >conftest.$ac_ext <<_ACEOF
12331 #line $LINENO "configure"
12332 /* confdefs.h.  */
12333 _ACEOF
12334 cat confdefs.h >>conftest.$ac_ext
12335 cat >>conftest.$ac_ext <<_ACEOF
12336 /* end confdefs.h.  */
12337 #include <stdlib.h>
12338                                     #include <unistd.h>
12339                                     #include <sys/types.h>
12340                                     #include <pwd.h>
12341                                     #include <hpsecurity.h>
12342                                     #include <prot.h>
12343 int
12344 main ()
12345 {
12346 struct s_passwd *p = getspwnam("nobody");
12347                        const char *pw = p->pw_passwd;
12348   ;
12349   return 0;
12350 }
12351 _ACEOF
12352 rm -f conftest.$ac_objext
12353 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12354   (eval $ac_compile) 2>&5
12355   ac_status=$?
12356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12357   (exit $ac_status); } &&
12358          { ac_try='test -s conftest.$ac_objext'
12359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12360   (eval $ac_try) 2>&5
12361   ac_status=$?
12362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12363   (exit $ac_status); }; }; then
12364   ac_cv_hpux_passwd=yes
12365 else
12366   echo "$as_me: failed program was:" >&5
12367 sed 's/^/| /' conftest.$ac_ext >&5
12368
12369 ac_cv_hpux_passwd=no
12370 fi
12371 rm -f conftest.$ac_objext conftest.$ac_ext
12372   CPPFLAGS="$ac_save_CPPFLAGS"
12373 fi
12374 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
12375 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
12376   if test "$ac_cv_hpux_passwd" = yes; then
12377     have_shadow_hpux=yes
12378     have_shadow=yes
12379     need_setuid=yes
12380
12381     # on HPUX, bigcrypt is in -lsec
12382     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
12383 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
12384 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
12385   echo $ECHO_N "(cached) $ECHO_C" >&6
12386 else
12387   ac_check_lib_save_LIBS=$LIBS
12388 LIBS="-lsec  $LIBS"
12389 cat >conftest.$ac_ext <<_ACEOF
12390 #line $LINENO "configure"
12391 /* confdefs.h.  */
12392 _ACEOF
12393 cat confdefs.h >>conftest.$ac_ext
12394 cat >>conftest.$ac_ext <<_ACEOF
12395 /* end confdefs.h.  */
12396
12397 /* Override any gcc2 internal prototype to avoid an error.  */
12398 #ifdef __cplusplus
12399 extern "C"
12400 #endif
12401 /* We use char because int might match the return type of a gcc2
12402    builtin and then its argument prototype would still apply.  */
12403 char bigcrypt ();
12404 int
12405 main ()
12406 {
12407 bigcrypt ();
12408   ;
12409   return 0;
12410 }
12411 _ACEOF
12412 rm -f conftest.$ac_objext conftest$ac_exeext
12413 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12414   (eval $ac_link) 2>&5
12415   ac_status=$?
12416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12417   (exit $ac_status); } &&
12418          { ac_try='test -s conftest$ac_exeext'
12419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12420   (eval $ac_try) 2>&5
12421   ac_status=$?
12422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12423   (exit $ac_status); }; }; then
12424   ac_cv_lib_sec_bigcrypt=yes
12425 else
12426   echo "$as_me: failed program was:" >&5
12427 sed 's/^/| /' conftest.$ac_ext >&5
12428
12429 ac_cv_lib_sec_bigcrypt=no
12430 fi
12431 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12432 LIBS=$ac_check_lib_save_LIBS
12433 fi
12434 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
12435 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
12436 if test $ac_cv_lib_sec_bigcrypt = yes; then
12437   PASSWD_LIBS="$PASSWD_LIBS -lsec"
12438 fi
12439
12440   fi
12441 fi
12442
12443
12444 ###############################################################################
12445 #
12446 #       Check for FreeBSD-style shadow passwords.
12447 #
12448 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
12449 #       password systems -- except you only get stuff in the pw_passwd field
12450 #       if the running program is setuid.  So, guess that we've got this
12451 #       lossage to contend with if /etc/master.passwd exists, and default to
12452 #       a setuid installation.
12453 #
12454 ###############################################################################
12455
12456 if test "$with_shadow" = yes ; then
12457   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
12458 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
12459 if test "${ac_cv_master_passwd+set}" = set; then
12460   echo $ECHO_N "(cached) $ECHO_C" >&6
12461 else
12462   if test -f /etc/master.passwd ; then
12463                     ac_cv_master_passwd=yes
12464                   else
12465                     ac_cv_master_passwd=no
12466                   fi
12467 fi
12468 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
12469 echo "${ECHO_T}$ac_cv_master_passwd" >&6
12470   if test "$ac_cv_master_passwd" = yes; then
12471     need_setuid=yes
12472   fi
12473 fi
12474
12475
12476 ###############################################################################
12477 #
12478 #       Check for traditional (ha!) shadow passwords.
12479 #
12480 ###############################################################################
12481
12482 if test "$with_shadow" = yes ; then
12483   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
12484 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
12485 if test "${ac_cv_shadow+set}" = set; then
12486   echo $ECHO_N "(cached) $ECHO_C" >&6
12487 else
12488
12489   ac_save_CPPFLAGS="$CPPFLAGS"
12490   if test \! -z "$includedir" ; then
12491     CPPFLAGS="$CPPFLAGS -I$includedir"
12492   fi
12493   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12494   cat >conftest.$ac_ext <<_ACEOF
12495 #line $LINENO "configure"
12496 /* confdefs.h.  */
12497 _ACEOF
12498 cat confdefs.h >>conftest.$ac_ext
12499 cat >>conftest.$ac_ext <<_ACEOF
12500 /* end confdefs.h.  */
12501 #include <stdlib.h>
12502                                     #include <unistd.h>
12503                                     #include <sys/types.h>
12504                                     #include <pwd.h>
12505                                     #include <shadow.h>
12506 int
12507 main ()
12508 {
12509 struct spwd *p = getspnam("nobody");
12510                        const char *pw = p->sp_pwdp;
12511   ;
12512   return 0;
12513 }
12514 _ACEOF
12515 rm -f conftest.$ac_objext
12516 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12517   (eval $ac_compile) 2>&5
12518   ac_status=$?
12519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12520   (exit $ac_status); } &&
12521          { ac_try='test -s conftest.$ac_objext'
12522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12523   (eval $ac_try) 2>&5
12524   ac_status=$?
12525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12526   (exit $ac_status); }; }; then
12527   ac_cv_shadow=yes
12528 else
12529   echo "$as_me: failed program was:" >&5
12530 sed 's/^/| /' conftest.$ac_ext >&5
12531
12532 ac_cv_shadow=no
12533 fi
12534 rm -f conftest.$ac_objext conftest.$ac_ext
12535   CPPFLAGS="$ac_save_CPPFLAGS"
12536 fi
12537 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
12538 echo "${ECHO_T}$ac_cv_shadow" >&6
12539   if test "$ac_cv_shadow" = yes; then
12540     have_shadow=yes
12541     need_setuid=yes
12542
12543     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
12544     have_getspnam=no
12545     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
12546 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
12547 if test "${ac_cv_lib_c_getspnam+set}" = set; then
12548   echo $ECHO_N "(cached) $ECHO_C" >&6
12549 else
12550   ac_check_lib_save_LIBS=$LIBS
12551 LIBS="-lc  $LIBS"
12552 cat >conftest.$ac_ext <<_ACEOF
12553 #line $LINENO "configure"
12554 /* confdefs.h.  */
12555 _ACEOF
12556 cat confdefs.h >>conftest.$ac_ext
12557 cat >>conftest.$ac_ext <<_ACEOF
12558 /* end confdefs.h.  */
12559
12560 /* Override any gcc2 internal prototype to avoid an error.  */
12561 #ifdef __cplusplus
12562 extern "C"
12563 #endif
12564 /* We use char because int might match the return type of a gcc2
12565    builtin and then its argument prototype would still apply.  */
12566 char getspnam ();
12567 int
12568 main ()
12569 {
12570 getspnam ();
12571   ;
12572   return 0;
12573 }
12574 _ACEOF
12575 rm -f conftest.$ac_objext conftest$ac_exeext
12576 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12577   (eval $ac_link) 2>&5
12578   ac_status=$?
12579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12580   (exit $ac_status); } &&
12581          { ac_try='test -s conftest$ac_exeext'
12582   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12583   (eval $ac_try) 2>&5
12584   ac_status=$?
12585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12586   (exit $ac_status); }; }; then
12587   ac_cv_lib_c_getspnam=yes
12588 else
12589   echo "$as_me: failed program was:" >&5
12590 sed 's/^/| /' conftest.$ac_ext >&5
12591
12592 ac_cv_lib_c_getspnam=no
12593 fi
12594 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12595 LIBS=$ac_check_lib_save_LIBS
12596 fi
12597 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
12598 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
12599 if test $ac_cv_lib_c_getspnam = yes; then
12600   have_getspnam=yes
12601 fi
12602
12603     if test "$have_getspnam" = no ; then
12604       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
12605 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
12606 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
12607   echo $ECHO_N "(cached) $ECHO_C" >&6
12608 else
12609   ac_check_lib_save_LIBS=$LIBS
12610 LIBS="-lgen  $LIBS"
12611 cat >conftest.$ac_ext <<_ACEOF
12612 #line $LINENO "configure"
12613 /* confdefs.h.  */
12614 _ACEOF
12615 cat confdefs.h >>conftest.$ac_ext
12616 cat >>conftest.$ac_ext <<_ACEOF
12617 /* end confdefs.h.  */
12618
12619 /* Override any gcc2 internal prototype to avoid an error.  */
12620 #ifdef __cplusplus
12621 extern "C"
12622 #endif
12623 /* We use char because int might match the return type of a gcc2
12624    builtin and then its argument prototype would still apply.  */
12625 char getspnam ();
12626 int
12627 main ()
12628 {
12629 getspnam ();
12630   ;
12631   return 0;
12632 }
12633 _ACEOF
12634 rm -f conftest.$ac_objext conftest$ac_exeext
12635 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12636   (eval $ac_link) 2>&5
12637   ac_status=$?
12638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12639   (exit $ac_status); } &&
12640          { ac_try='test -s conftest$ac_exeext'
12641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12642   (eval $ac_try) 2>&5
12643   ac_status=$?
12644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12645   (exit $ac_status); }; }; then
12646   ac_cv_lib_gen_getspnam=yes
12647 else
12648   echo "$as_me: failed program was:" >&5
12649 sed 's/^/| /' conftest.$ac_ext >&5
12650
12651 ac_cv_lib_gen_getspnam=no
12652 fi
12653 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12654 LIBS=$ac_check_lib_save_LIBS
12655 fi
12656 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
12657 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
12658 if test $ac_cv_lib_gen_getspnam = yes; then
12659   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
12660 fi
12661
12662     fi
12663   fi
12664 fi
12665
12666
12667 ###############################################################################
12668 #
12669 #       Check for other libraries needed for non-shadow passwords.
12670 #
12671 ###############################################################################
12672
12673 if test "$enable_locking" = yes ; then
12674
12675   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
12676   have_crypt=no
12677   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
12678 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
12679 if test "${ac_cv_lib_c_crypt+set}" = set; then
12680   echo $ECHO_N "(cached) $ECHO_C" >&6
12681 else
12682   ac_check_lib_save_LIBS=$LIBS
12683 LIBS="-lc  $LIBS"
12684 cat >conftest.$ac_ext <<_ACEOF
12685 #line $LINENO "configure"
12686 /* confdefs.h.  */
12687 _ACEOF
12688 cat confdefs.h >>conftest.$ac_ext
12689 cat >>conftest.$ac_ext <<_ACEOF
12690 /* end confdefs.h.  */
12691
12692 /* Override any gcc2 internal prototype to avoid an error.  */
12693 #ifdef __cplusplus
12694 extern "C"
12695 #endif
12696 /* We use char because int might match the return type of a gcc2
12697    builtin and then its argument prototype would still apply.  */
12698 char crypt ();
12699 int
12700 main ()
12701 {
12702 crypt ();
12703   ;
12704   return 0;
12705 }
12706 _ACEOF
12707 rm -f conftest.$ac_objext conftest$ac_exeext
12708 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12709   (eval $ac_link) 2>&5
12710   ac_status=$?
12711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12712   (exit $ac_status); } &&
12713          { ac_try='test -s conftest$ac_exeext'
12714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12715   (eval $ac_try) 2>&5
12716   ac_status=$?
12717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12718   (exit $ac_status); }; }; then
12719   ac_cv_lib_c_crypt=yes
12720 else
12721   echo "$as_me: failed program was:" >&5
12722 sed 's/^/| /' conftest.$ac_ext >&5
12723
12724 ac_cv_lib_c_crypt=no
12725 fi
12726 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12727 LIBS=$ac_check_lib_save_LIBS
12728 fi
12729 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
12730 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
12731 if test $ac_cv_lib_c_crypt = yes; then
12732   have_crypt=yes
12733 fi
12734
12735   if test "$have_crypt" = no ; then
12736     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
12737 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
12738 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
12739   echo $ECHO_N "(cached) $ECHO_C" >&6
12740 else
12741   ac_check_lib_save_LIBS=$LIBS
12742 LIBS="-lcrypt  $LIBS"
12743 cat >conftest.$ac_ext <<_ACEOF
12744 #line $LINENO "configure"
12745 /* confdefs.h.  */
12746 _ACEOF
12747 cat confdefs.h >>conftest.$ac_ext
12748 cat >>conftest.$ac_ext <<_ACEOF
12749 /* end confdefs.h.  */
12750
12751 /* Override any gcc2 internal prototype to avoid an error.  */
12752 #ifdef __cplusplus
12753 extern "C"
12754 #endif
12755 /* We use char because int might match the return type of a gcc2
12756    builtin and then its argument prototype would still apply.  */
12757 char crypt ();
12758 int
12759 main ()
12760 {
12761 crypt ();
12762   ;
12763   return 0;
12764 }
12765 _ACEOF
12766 rm -f conftest.$ac_objext conftest$ac_exeext
12767 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12768   (eval $ac_link) 2>&5
12769   ac_status=$?
12770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12771   (exit $ac_status); } &&
12772          { ac_try='test -s conftest$ac_exeext'
12773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12774   (eval $ac_try) 2>&5
12775   ac_status=$?
12776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12777   (exit $ac_status); }; }; then
12778   ac_cv_lib_crypt_crypt=yes
12779 else
12780   echo "$as_me: failed program was:" >&5
12781 sed 's/^/| /' conftest.$ac_ext >&5
12782
12783 ac_cv_lib_crypt_crypt=no
12784 fi
12785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12786 LIBS=$ac_check_lib_save_LIBS
12787 fi
12788 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
12789 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
12790 if test $ac_cv_lib_crypt_crypt = yes; then
12791   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
12792 fi
12793
12794   fi
12795 fi
12796
12797
12798 # Most of the above shadow mechanisms will have set need_setuid to yes,
12799 # if they were found.  But, on some systems, we need setuid even when
12800 # using plain old vanilla passwords.
12801 #
12802 if test "$enable_locking" = yes ; then
12803   case "$host" in
12804     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
12805       need_setuid=yes
12806     ;;
12807   esac
12808 fi
12809
12810
12811 if test "$have_shadow_adjunct" = yes ; then
12812   cat >>confdefs.h <<\_ACEOF
12813 #define HAVE_ADJUNCT_PASSWD 1
12814 _ACEOF
12815
12816 elif test "$have_shadow_enhanced" = yes ; then
12817   cat >>confdefs.h <<\_ACEOF
12818 #define HAVE_ENHANCED_PASSWD 1
12819 _ACEOF
12820
12821 elif test "$have_shadow_hpux" = yes ; then
12822   cat >>confdefs.h <<\_ACEOF
12823 #define HAVE_HPUX_PASSWD 1
12824 _ACEOF
12825
12826 elif test "$have_shadow" = yes ; then
12827   cat >>confdefs.h <<\_ACEOF
12828 #define HAVE_SHADOW_PASSWD 1
12829 _ACEOF
12830
12831 fi
12832
12833
12834 ###############################################################################
12835 #
12836 #       Check for -lXm.
12837 #
12838 ###############################################################################
12839
12840 have_motif=no
12841 with_motif_req=unspecified
12842
12843 # Check whether --with-motif or --without-motif was given.
12844 if test "${with_motif+set}" = set; then
12845   withval="$with_motif"
12846   with_motif="$withval"; with_motif_req="$withval"
12847 else
12848   with_motif=no
12849 fi;
12850
12851
12852    case "$with_motif" in
12853     yes) ;;
12854     no)  ;;
12855
12856     /*)
12857      echo "$as_me:$LINENO: checking for Motif headers" >&5
12858 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
12859      d=$with_motif/include
12860      if test -d $d; then
12861        X_CFLAGS="-I$d $X_CFLAGS"
12862        echo "$as_me:$LINENO: result: $d" >&5
12863 echo "${ECHO_T}$d" >&6
12864      else
12865        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12866 echo "${ECHO_T}not found ($d: no such directory)" >&6
12867      fi
12868
12869      echo "$as_me:$LINENO: checking for Motif libs" >&5
12870 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
12871      d=$with_motif/lib
12872      if test -d $d; then
12873        X_LIBS="-L$d $X_LIBS"
12874        echo "$as_me:$LINENO: result: $d" >&5
12875 echo "${ECHO_T}$d" >&6
12876      else
12877        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12878 echo "${ECHO_T}not found ($d: no such directory)" >&6
12879      fi
12880
12881      # replace the directory string with "yes".
12882      with_motif_req="yes"
12883      with_motif=$with_motif_req
12884      ;;
12885
12886     *)
12887      echo ""
12888      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
12889      echo "       If it is a directory, then \`DIR/include' will be added to"
12890      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12891      exit 1
12892      ;;
12893    esac
12894
12895
12896 if test "$with_motif" != yes -a "$with_motif" != no ; then
12897   echo "error: must be yes or no: --with-motif=$with_motif"
12898   exit 1
12899 fi
12900
12901 if test "$with_motif" = yes; then
12902   have_motif=no
12903
12904   ac_save_CPPFLAGS="$CPPFLAGS"
12905   if test \! -z "$includedir" ; then
12906     CPPFLAGS="$CPPFLAGS -I$includedir"
12907   fi
12908   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12909   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
12910 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
12911 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
12912   echo $ECHO_N "(cached) $ECHO_C" >&6
12913 else
12914   cat >conftest.$ac_ext <<_ACEOF
12915 #line $LINENO "configure"
12916 /* confdefs.h.  */
12917 _ACEOF
12918 cat confdefs.h >>conftest.$ac_ext
12919 cat >>conftest.$ac_ext <<_ACEOF
12920 /* end confdefs.h.  */
12921 #include <stdlib.h>
12922                      #include <stdio.h>
12923                      #include <X11/Intrinsic.h>
12924
12925 #include <Xm/Xm.h>
12926 _ACEOF
12927 rm -f conftest.$ac_objext
12928 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12929   (eval $ac_compile) 2>&5
12930   ac_status=$?
12931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12932   (exit $ac_status); } &&
12933          { ac_try='test -s conftest.$ac_objext'
12934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12935   (eval $ac_try) 2>&5
12936   ac_status=$?
12937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12938   (exit $ac_status); }; }; then
12939   ac_cv_header_Xm_Xm_h=yes
12940 else
12941   echo "$as_me: failed program was:" >&5
12942 sed 's/^/| /' conftest.$ac_ext >&5
12943
12944 ac_cv_header_Xm_Xm_h=no
12945 fi
12946 rm -f conftest.$ac_objext conftest.$ac_ext
12947 fi
12948 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
12949 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
12950 if test $ac_cv_header_Xm_Xm_h = yes; then
12951   have_motif=yes
12952                      cat >>confdefs.h <<\_ACEOF
12953 #define HAVE_MOTIF 1
12954 _ACEOF
12955
12956                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
12957 fi
12958
12959
12960   CPPFLAGS="$ac_save_CPPFLAGS"
12961 fi
12962
12963
12964 if test "$have_motif" = yes; then
12965
12966   ac_save_CPPFLAGS="$CPPFLAGS"
12967   if test \! -z "$includedir" ; then
12968     CPPFLAGS="$CPPFLAGS -I$includedir"
12969   fi
12970   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12971   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
12972 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
12973 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
12974   echo $ECHO_N "(cached) $ECHO_C" >&6
12975 else
12976   cat >conftest.$ac_ext <<_ACEOF
12977 #line $LINENO "configure"
12978 /* confdefs.h.  */
12979 _ACEOF
12980 cat confdefs.h >>conftest.$ac_ext
12981 cat >>conftest.$ac_ext <<_ACEOF
12982 /* end confdefs.h.  */
12983 #include <stdlib.h>
12984                      #include <stdio.h>
12985                      #include <X11/Intrinsic.h>
12986
12987 #include <Xm/ComboBox.h>
12988 _ACEOF
12989 rm -f conftest.$ac_objext
12990 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12991   (eval $ac_compile) 2>&5
12992   ac_status=$?
12993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12994   (exit $ac_status); } &&
12995          { ac_try='test -s conftest.$ac_objext'
12996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12997   (eval $ac_try) 2>&5
12998   ac_status=$?
12999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13000   (exit $ac_status); }; }; then
13001   ac_cv_header_Xm_ComboBox_h=yes
13002 else
13003   echo "$as_me: failed program was:" >&5
13004 sed 's/^/| /' conftest.$ac_ext >&5
13005
13006 ac_cv_header_Xm_ComboBox_h=no
13007 fi
13008 rm -f conftest.$ac_objext conftest.$ac_ext
13009 fi
13010 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
13011 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
13012 if test $ac_cv_header_Xm_ComboBox_h = yes; then
13013   cat >>confdefs.h <<\_ACEOF
13014 #define HAVE_XMCOMBOBOX 1
13015 _ACEOF
13016
13017 fi
13018
13019
13020   CPPFLAGS="$ac_save_CPPFLAGS"
13021 fi
13022
13023
13024 ###############################################################################
13025 #
13026 #       Check for -lgtk (and Gnome stuff)
13027 #
13028 ###############################################################################
13029
13030 have_gtk=no
13031 have_gtk2=no
13032 with_gtk_req=unspecified
13033
13034 # Check whether --with-gtk or --without-gtk was given.
13035 if test "${with_gtk+set}" = set; then
13036   withval="$with_gtk"
13037   with_gtk="$withval"; with_gtk_req="$withval"
13038 else
13039   with_gtk=yes
13040 fi;
13041
13042 # if --with-gtk=/directory/ was specified, remember that directory so that
13043 # we can also look for the `gtk-config' program in that directory.
13044 case "$with_gtk" in
13045   /*)
13046     gtk_dir="$with_gtk"
13047     ;;
13048   *)
13049     gtk_dir=""
13050     ;;
13051 esac
13052
13053
13054    case "$with_gtk" in
13055     yes) ;;
13056     no)  ;;
13057
13058     /*)
13059      echo "$as_me:$LINENO: checking for Gtk headers" >&5
13060 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
13061      d=$with_gtk/include
13062      if test -d $d; then
13063        X_CFLAGS="-I$d $X_CFLAGS"
13064        echo "$as_me:$LINENO: result: $d" >&5
13065 echo "${ECHO_T}$d" >&6
13066      else
13067        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13068 echo "${ECHO_T}not found ($d: no such directory)" >&6
13069      fi
13070
13071      echo "$as_me:$LINENO: checking for Gtk libs" >&5
13072 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
13073      d=$with_gtk/lib
13074      if test -d $d; then
13075        X_LIBS="-L$d $X_LIBS"
13076        echo "$as_me:$LINENO: result: $d" >&5
13077 echo "${ECHO_T}$d" >&6
13078      else
13079        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13080 echo "${ECHO_T}not found ($d: no such directory)" >&6
13081      fi
13082
13083      # replace the directory string with "yes".
13084      with_gtk_req="yes"
13085      with_gtk=$with_gtk_req
13086      ;;
13087
13088     *)
13089      echo ""
13090      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
13091      echo "       If it is a directory, then \`DIR/include' will be added to"
13092      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13093      exit 1
13094      ;;
13095    esac
13096
13097
13098 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
13099   echo "error: must be yes or no: --with-gtk=$with_gtk"
13100   exit 1
13101 fi
13102
13103 have_gnome=no
13104 with_gnome_req=unspecified
13105
13106 # Check whether --with-gnome or --without-gnome was given.
13107 if test "${with_gnome+set}" = set; then
13108   withval="$with_gnome"
13109   with_gnome="$withval"; with_gnome_req="$withval"
13110 else
13111   with_gnome=yes
13112 fi;
13113
13114 # if --with-gnome=/directory/ was specified, remember that directory so that
13115 # we can also look for the `gnome-config' program in that directory.
13116 case "$with_gnome" in
13117   /*)
13118     gnome_dir="$with_gnome"
13119     ;;
13120   *)
13121     gnome_dir=""
13122     ;;
13123 esac
13124
13125
13126    case "$with_gnome" in
13127     yes) ;;
13128     no)  ;;
13129
13130     /*)
13131      echo "$as_me:$LINENO: checking for Gnome headers" >&5
13132 echo $ECHO_N "checking for Gnome headers... $ECHO_C" >&6
13133      d=$with_gnome/include
13134      if test -d $d; then
13135        X_CFLAGS="-I$d $X_CFLAGS"
13136        echo "$as_me:$LINENO: result: $d" >&5
13137 echo "${ECHO_T}$d" >&6
13138      else
13139        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13140 echo "${ECHO_T}not found ($d: no such directory)" >&6
13141      fi
13142
13143      echo "$as_me:$LINENO: checking for Gnome libs" >&5
13144 echo $ECHO_N "checking for Gnome libs... $ECHO_C" >&6
13145      d=$with_gnome/lib
13146      if test -d $d; then
13147        X_LIBS="-L$d $X_LIBS"
13148        echo "$as_me:$LINENO: result: $d" >&5
13149 echo "${ECHO_T}$d" >&6
13150      else
13151        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13152 echo "${ECHO_T}not found ($d: no such directory)" >&6
13153      fi
13154
13155      # replace the directory string with "yes".
13156      with_gnome_req="yes"
13157      with_gnome=$with_gnome_req
13158      ;;
13159
13160     *)
13161      echo ""
13162      echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
13163      echo "       If it is a directory, then \`DIR/include' will be added to"
13164      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13165      exit 1
13166      ;;
13167    esac
13168
13169
13170 if test "$with_gnome" != yes -a "$with_gnome" != no ; then
13171   echo "error: must be yes or no: --with-gnome=$with_gnome"
13172   exit 1
13173 fi
13174
13175 parse_gtk_version_string() {
13176   # M4 sucks!!
13177
13178   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
13179   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
13180
13181   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
13182   if test -z "$ac_gtk_version"; then
13183     ac_gtk_version=unknown
13184     ac_gtk_version_string=unknown
13185   fi
13186 }
13187
13188
13189 jurassic_gtk=no
13190 gtk2_halfassed=no
13191
13192 if test "$with_gtk" = yes; then
13193   have_gtk=no
13194
13195   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
13196   # look in /foo/bin/ for glib-config, gtk-config, and gnome-config.
13197   #
13198   gtk_path="$PATH"
13199
13200   if test ! -z "$gtk_dir"; then
13201     # canonicalize slashes.
13202     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
13203     gtk_path="$foo:$gtk_path"
13204   fi
13205
13206   if test ! -z "$gnome_dir"; then
13207     # canonicalize slashes.
13208     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
13209     gtk_path="$foo:$gtk_path"
13210   fi
13211
13212   for ac_prog in pkg-config
13213 do
13214   # Extract the first word of "$ac_prog", so it can be a program name with args.
13215 set dummy $ac_prog; ac_word=$2
13216 echo "$as_me:$LINENO: checking for $ac_word" >&5
13217 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13218 if test "${ac_cv_path_pkg_config+set}" = set; then
13219   echo $ECHO_N "(cached) $ECHO_C" >&6
13220 else
13221   case $pkg_config in
13222   [\\/]* | ?:[\\/]*)
13223   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
13224   ;;
13225   *)
13226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13227 for as_dir in $gtk_path
13228 do
13229   IFS=$as_save_IFS
13230   test -z "$as_dir" && as_dir=.
13231   for ac_exec_ext in '' $ac_executable_extensions; do
13232   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13233     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
13234     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13235     break 2
13236   fi
13237 done
13238 done
13239
13240   ;;
13241 esac
13242 fi
13243 pkg_config=$ac_cv_path_pkg_config
13244
13245 if test -n "$pkg_config"; then
13246   echo "$as_me:$LINENO: result: $pkg_config" >&5
13247 echo "${ECHO_T}$pkg_config" >&6
13248 else
13249   echo "$as_me:$LINENO: result: no" >&5
13250 echo "${ECHO_T}no" >&6
13251 fi
13252
13253   test -n "$pkg_config" && break
13254 done
13255
13256
13257   if test -n "$pkg_config" ; then
13258     #
13259     # the new way...
13260     # run pkg-config based tests.
13261     #
13262     pkgs=''
13263     pkg_check_version() {
13264       if test "$ok" = yes ; then
13265         req="$1"
13266         min="$2"
13267         echo "$as_me:$LINENO: checking for $req" >&5
13268 echo $ECHO_N "checking for $req... $ECHO_C" >&6
13269         if $pkg_config --exists "$req" ; then
13270           vers=`$pkg_config --modversion "$req"`
13271           if $pkg_config --exists "$req >= $min" ; then
13272             echo "$as_me:$LINENO: result: $vers" >&5
13273 echo "${ECHO_T}$vers" >&6
13274             pkgs="$pkgs $req"
13275             return 1
13276           else
13277             echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
13278 echo "${ECHO_T}$vers (wanted >= $min)" >&6
13279             ok=no
13280             return 0
13281           fi
13282         else
13283           echo "$as_me:$LINENO: result: no" >&5
13284 echo "${ECHO_T}no" >&6
13285           ok=no
13286           return 0
13287         fi
13288       fi
13289     }
13290
13291     echo "$as_me:$LINENO: result: checking for GTK 2.x with pkg-config based tests..." >&5
13292 echo "${ECHO_T}checking for GTK 2.x with pkg-config based tests..." >&6
13293
13294     ok="yes"
13295     pkg_check_version       gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
13296     pkg_check_version    gmodule-2.0  2.0.0
13297     pkg_check_version     libxml-2.0  2.4.6
13298     pkg_check_version   libglade-2.0  1.99.0
13299 #   pkg_check_version gdk_pixbuf      0.1
13300     have_gtk="$ok"
13301
13302     if test "$have_gtk" = yes; then
13303       have_gtk2=yes
13304       cat >>confdefs.h <<\_ACEOF
13305 #define HAVE_GTK2 1
13306 _ACEOF
13307
13308     else
13309       if test -n "$ac_gtk_version_string" ; then
13310         gtk2_halfassed="$ac_gtk_version_string"
13311         gtk2_halfassed_lib="$req"
13312       fi
13313     fi
13314
13315     if test "$have_gtk" = no; then
13316       #
13317       # we don't have GTK 2.  Let's look for GTK 1.
13318       #
13319       echo "$as_me:$LINENO: result: checking for GTK 1.x with pkg-config based tests..." >&5
13320 echo "${ECHO_T}checking for GTK 1.x with pkg-config based tests..." >&6
13321
13322       pkgs=''
13323       ok="yes"
13324       pkg_check_version gtk+       1.2     ; ac_gtk_version_string="$vers"
13325       pkg_check_version glib       1.0
13326       pkg_check_version gdk_pixbuf 0.1
13327       have_gtk="$ok"
13328
13329       # Now check for Gnome...
13330       #
13331       if test "$have_gtk" = yes -a "$with_gnome" = yes; then
13332         old_pkgs="$pkgs"
13333         ok=yes
13334         pkg_check_version capplet    1.0
13335         pkg_check_version gnomeui    1.0
13336         pkg_check_version gdk_pixbuf 0.1
13337         have_gnome="$ok"
13338
13339         if test "$have_gnome" = no; then
13340           pkgs="$old_pkgs"
13341         else
13342           cat >>confdefs.h <<\_ACEOF
13343 #define HAVE_CRAPPLET 1
13344 _ACEOF
13345
13346         fi
13347       fi
13348     fi
13349
13350     if test "$have_gtk" = yes; then
13351       parse_gtk_version_string
13352       jurassic_gtk=no
13353     else
13354       have_gnome=no
13355     fi
13356
13357     if test "$have_gtk" = yes; then
13358       echo "$as_me:$LINENO: checking for Gtk includes" >&5
13359 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
13360 if test "${ac_cv_gtk_config_cflags+set}" = set; then
13361   echo $ECHO_N "(cached) $ECHO_C" >&6
13362 else
13363   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
13364 fi
13365 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
13366 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
13367       echo "$as_me:$LINENO: checking for Gtk libs" >&5
13368 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
13369 if test "${ac_cv_gtk_config_libs+set}" = set; then
13370   echo $ECHO_N "(cached) $ECHO_C" >&6
13371 else
13372   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
13373 fi
13374 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
13375 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
13376     fi
13377     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
13378     ac_gtk_config_libs=$ac_cv_gtk_config_libs
13379
13380     ac_gnome_config_cflags=$ac_gtk_config_cflags
13381     ac_gnome_config_libs=$ac_gtk_config_libs
13382
13383   else
13384     #
13385     # the old way...
13386     # run {gnome,gtk}-config based tests.
13387     #
13388     echo "$as_me:$LINENO: result: checking for GTK 1.x with gtk-config based tests..." >&5
13389 echo "${ECHO_T}checking for GTK 1.x with gtk-config based tests..." >&6
13390
13391     for ac_prog in glib12-config glib-config
13392 do
13393   # Extract the first word of "$ac_prog", so it can be a program name with args.
13394 set dummy $ac_prog; ac_word=$2
13395 echo "$as_me:$LINENO: checking for $ac_word" >&5
13396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13397 if test "${ac_cv_path_glib_config+set}" = set; then
13398   echo $ECHO_N "(cached) $ECHO_C" >&6
13399 else
13400   case $glib_config in
13401   [\\/]* | ?:[\\/]*)
13402   ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
13403   ;;
13404   *)
13405   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13406 for as_dir in $gtk_path
13407 do
13408   IFS=$as_save_IFS
13409   test -z "$as_dir" && as_dir=.
13410   for ac_exec_ext in '' $ac_executable_extensions; do
13411   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13412     ac_cv_path_glib_config="$as_dir/$ac_word$ac_exec_ext"
13413     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13414     break 2
13415   fi
13416 done
13417 done
13418
13419   ;;
13420 esac
13421 fi
13422 glib_config=$ac_cv_path_glib_config
13423
13424 if test -n "$glib_config"; then
13425   echo "$as_me:$LINENO: result: $glib_config" >&5
13426 echo "${ECHO_T}$glib_config" >&6
13427 else
13428   echo "$as_me:$LINENO: result: no" >&5
13429 echo "${ECHO_T}no" >&6
13430 fi
13431
13432   test -n "$glib_config" && break
13433 done
13434
13435     for ac_prog in gtk12-config  gtk-config
13436 do
13437   # Extract the first word of "$ac_prog", so it can be a program name with args.
13438 set dummy $ac_prog; ac_word=$2
13439 echo "$as_me:$LINENO: checking for $ac_word" >&5
13440 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13441 if test "${ac_cv_path_gtk_config+set}" = set; then
13442   echo $ECHO_N "(cached) $ECHO_C" >&6
13443 else
13444   case $gtk_config in
13445   [\\/]* | ?:[\\/]*)
13446   ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
13447   ;;
13448   *)
13449   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13450 for as_dir in $gtk_path
13451 do
13452   IFS=$as_save_IFS
13453   test -z "$as_dir" && as_dir=.
13454   for ac_exec_ext in '' $ac_executable_extensions; do
13455   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13456     ac_cv_path_gtk_config="$as_dir/$ac_word$ac_exec_ext"
13457     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13458     break 2
13459   fi
13460 done
13461 done
13462
13463   ;;
13464 esac
13465 fi
13466 gtk_config=$ac_cv_path_gtk_config
13467
13468 if test -n "$gtk_config"; then
13469   echo "$as_me:$LINENO: result: $gtk_config" >&5
13470 echo "${ECHO_T}$gtk_config" >&6
13471 else
13472   echo "$as_me:$LINENO: result: no" >&5
13473 echo "${ECHO_T}no" >&6
13474 fi
13475
13476   test -n "$gtk_config" && break
13477 done
13478
13479
13480     if test "$with_gnome" = yes; then
13481       for ac_prog in gnome-config
13482 do
13483   # Extract the first word of "$ac_prog", so it can be a program name with args.
13484 set dummy $ac_prog; ac_word=$2
13485 echo "$as_me:$LINENO: checking for $ac_word" >&5
13486 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13487 if test "${ac_cv_path_gnome_config+set}" = set; then
13488   echo $ECHO_N "(cached) $ECHO_C" >&6
13489 else
13490   case $gnome_config in
13491   [\\/]* | ?:[\\/]*)
13492   ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
13493   ;;
13494   *)
13495   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13496 for as_dir in $gtk_path
13497 do
13498   IFS=$as_save_IFS
13499   test -z "$as_dir" && as_dir=.
13500   for ac_exec_ext in '' $ac_executable_extensions; do
13501   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13502     ac_cv_path_gnome_config="$as_dir/$ac_word$ac_exec_ext"
13503     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13504     break 2
13505   fi
13506 done
13507 done
13508
13509   ;;
13510 esac
13511 fi
13512 gnome_config=$ac_cv_path_gnome_config
13513
13514 if test -n "$gnome_config"; then
13515   echo "$as_me:$LINENO: result: $gnome_config" >&5
13516 echo "${ECHO_T}$gnome_config" >&6
13517 else
13518   echo "$as_me:$LINENO: result: no" >&5
13519 echo "${ECHO_T}no" >&6
13520 fi
13521
13522   test -n "$gnome_config" && break
13523 done
13524
13525     fi
13526
13527     if test -n "$glib_config" -a  -n "$gtk_config" ; then
13528       have_gtk=yes
13529       if test "$with_gnome" = yes -a -n "$gnome_config" ; then
13530         have_gnome=yes
13531       fi
13532     fi
13533
13534     if test "$have_gtk" = yes; then
13535       echo "$as_me:$LINENO: checking Gtk version number" >&5
13536 echo $ECHO_N "checking Gtk version number... $ECHO_C" >&6
13537 if test "${ac_cv_gtk_version_string+set}" = set; then
13538   echo $ECHO_N "(cached) $ECHO_C" >&6
13539 else
13540   ac_cv_gtk_version_string=`$gtk_config --version`
13541 fi
13542 echo "$as_me:$LINENO: result: $ac_cv_gtk_version_string" >&5
13543 echo "${ECHO_T}$ac_cv_gtk_version_string" >&6
13544       ac_gtk_version_string=$ac_cv_gtk_version_string
13545       parse_gtk_version_string
13546     fi
13547
13548     if test "$have_gtk" = yes; then
13549       if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
13550       then
13551         have_gtk=no
13552         have_gnome=no
13553         jurassic_gtk=yes
13554       fi
13555     fi
13556
13557     if test "$have_gtk" = yes; then
13558       echo "$as_me:$LINENO: checking for Gtk includes" >&5
13559 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
13560 if test "${ac_cv_gtk_config_cflags+set}" = set; then
13561   echo $ECHO_N "(cached) $ECHO_C" >&6
13562 else
13563   ac_cv_gtk_config_cflags=`$gtk_config --cflags`
13564 fi
13565 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
13566 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
13567       echo "$as_me:$LINENO: checking for Gtk libs" >&5
13568 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
13569 if test "${ac_cv_gtk_config_libs+set}" = set; then
13570   echo $ECHO_N "(cached) $ECHO_C" >&6
13571 else
13572   ac_cv_gtk_config_libs=`$gtk_config --libs`
13573 fi
13574 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
13575 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
13576     fi
13577     ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
13578     ac_gtk_config_libs=$ac_cv_gtk_config_libs
13579
13580     # Check for Gnome Capplet support.
13581     # Note that this is only needed with Gnome 1.x, not Gnome 2.x.
13582     # In a Gnome 2.x world, libcapplet will not exist.
13583     # (In fact, this likely won't even be checked, since in a Gnome 2.x
13584     # world, we will probably be up in the "$pkg_config" branch instead
13585     # of here in the "$gnome_config" branch.)
13586     #
13587     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13588       gnome_config_libs="gtk capplet gnomeui gdk_pixbuf"
13589       echo "$as_me:$LINENO: checking for Gnome capplet includes" >&5
13590 echo $ECHO_N "checking for Gnome capplet includes... $ECHO_C" >&6
13591       if test "${ac_cv_gnome_config_cflags+set}" = set; then
13592   echo $ECHO_N "(cached) $ECHO_C" >&6
13593 else
13594   if ( $gnome_config --cflags $gnome_config_libs 2>&1 | \
13595               grep Unknown >/dev/null ) ; then
13596            ac_cv_gnome_config_cflags=''
13597          else
13598           ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
13599          fi
13600 fi
13601
13602       ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
13603       if test "$ac_gnome_config_cflags" = "" ; then
13604         have_gnome=no
13605         echo "$as_me:$LINENO: result: no" >&5
13606 echo "${ECHO_T}no" >&6
13607       else
13608         echo "$as_me:$LINENO: result: $ac_gnome_config_cflags" >&5
13609 echo "${ECHO_T}$ac_gnome_config_cflags" >&6
13610       fi
13611     fi
13612
13613     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13614       echo "$as_me:$LINENO: checking for Gnome capplet libs" >&5
13615 echo $ECHO_N "checking for Gnome capplet libs... $ECHO_C" >&6
13616       if test "${ac_cv_gnome_config_libs+set}" = set; then
13617   echo $ECHO_N "(cached) $ECHO_C" >&6
13618 else
13619   if ( $gnome_config --libs $gnome_config_libs 2>&1 |
13620               grep Unknown >/dev/null ) ; then
13621            ac_cv_gnome_config_libs=''
13622          else
13623            ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
13624          fi
13625 fi
13626
13627       ac_gnome_config_libs=$ac_cv_gnome_config_libs
13628       if test "$ac_gnome_config_libs" = "" ; then
13629         have_gnome=no
13630         echo "$as_me:$LINENO: result: no" >&5
13631 echo "${ECHO_T}no" >&6
13632       else
13633         echo "$as_me:$LINENO: result: $ac_gnome_config_libs" >&5
13634 echo "${ECHO_T}$ac_gnome_config_libs" >&6
13635       fi
13636     fi
13637
13638     # If we have Gnome, then override the gtk-config values with
13639     # the gnome-config values.
13640     #
13641     if test "$have_gnome" = yes -a "$have_gtk" = yes; then
13642       ac_gtk_config_cflags=$ac_gnome_config_cflags
13643       ac_gtk_config_libs=$ac_gnome_config_libs
13644       cat >>confdefs.h <<\_ACEOF
13645 #define HAVE_CRAPPLET 1
13646 _ACEOF
13647
13648     fi
13649
13650   fi   # end of {gnome,gtk}-config based tests
13651
13652   if test "$have_gtk" = yes -a "$have_gtk2" = no; then
13653     # check for this function that was not in libcapplet 1.2.
13654     # (only needed in Gnome/Gtk 1.x, not Gnome/Gtk 2.x)
13655
13656   ac_save_CPPFLAGS="$CPPFLAGS"
13657   ac_save_LDFLAGS="$LDFLAGS"
13658 #  ac_save_LIBS="$LIBS"
13659
13660   if test \! -z "$includedir" ; then
13661     CPPFLAGS="$CPPFLAGS -I$includedir"
13662   fi
13663   # note: $X_CFLAGS includes $x_includes
13664   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13665
13666   if test \! -z "$libdir" ; then
13667     LDFLAGS="$LDFLAGS -L$libdir"
13668   fi
13669   # note: $X_LIBS includes $x_libraries
13670   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13671
13672   echo "$as_me:$LINENO: checking for capplet_widget_changes_are_immediate in -lcapplet" >&5
13673 echo $ECHO_N "checking for capplet_widget_changes_are_immediate in -lcapplet... $ECHO_C" >&6
13674 if test "${ac_cv_lib_capplet_capplet_widget_changes_are_immediate+set}" = set; then
13675   echo $ECHO_N "(cached) $ECHO_C" >&6
13676 else
13677   ac_check_lib_save_LIBS=$LIBS
13678 LIBS="-lcapplet $ac_gnome_config_libs $LIBS"
13679 cat >conftest.$ac_ext <<_ACEOF
13680 #line $LINENO "configure"
13681 /* confdefs.h.  */
13682 _ACEOF
13683 cat confdefs.h >>conftest.$ac_ext
13684 cat >>conftest.$ac_ext <<_ACEOF
13685 /* end confdefs.h.  */
13686
13687 /* Override any gcc2 internal prototype to avoid an error.  */
13688 #ifdef __cplusplus
13689 extern "C"
13690 #endif
13691 /* We use char because int might match the return type of a gcc2
13692    builtin and then its argument prototype would still apply.  */
13693 char capplet_widget_changes_are_immediate ();
13694 int
13695 main ()
13696 {
13697 capplet_widget_changes_are_immediate ();
13698   ;
13699   return 0;
13700 }
13701 _ACEOF
13702 rm -f conftest.$ac_objext conftest$ac_exeext
13703 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13704   (eval $ac_link) 2>&5
13705   ac_status=$?
13706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13707   (exit $ac_status); } &&
13708          { ac_try='test -s conftest$ac_exeext'
13709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13710   (eval $ac_try) 2>&5
13711   ac_status=$?
13712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13713   (exit $ac_status); }; }; then
13714   ac_cv_lib_capplet_capplet_widget_changes_are_immediate=yes
13715 else
13716   echo "$as_me: failed program was:" >&5
13717 sed 's/^/| /' conftest.$ac_ext >&5
13718
13719 ac_cv_lib_capplet_capplet_widget_changes_are_immediate=no
13720 fi
13721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13722 LIBS=$ac_check_lib_save_LIBS
13723 fi
13724 echo "$as_me:$LINENO: result: $ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&5
13725 echo "${ECHO_T}$ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&6
13726 if test $ac_cv_lib_capplet_capplet_widget_changes_are_immediate = yes; then
13727   cat >>confdefs.h <<\_ACEOF
13728 #define HAVE_CRAPPLET_IMMEDIATE 1
13729 _ACEOF
13730
13731 else
13732   true
13733 fi
13734
13735   CPPFLAGS="$ac_save_CPPFLAGS"
13736   LDFLAGS="$ac_save_LDFLAGS"
13737 #  LIBS="$ac_save_LIBS"
13738
13739   fi
13740
13741
13742   GNOME_DATADIR=""
13743   if test "$have_gtk" = yes; then
13744     if test -n "$pkg_config"; then
13745       if test "$have_gtk2" = yes; then
13746         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
13747       else
13748         GNOME_DATADIR=`$pkg_config --variable=prefix gtk+`
13749       fi
13750     else
13751       GNOME_DATADIR=`$gtk_config --prefix`
13752     fi
13753     GNOME_DATADIR="$GNOME_DATADIR/share"
13754   fi
13755
13756   # .desktop files go in different places in Gnome 1.x and Gnome 2.x...
13757   if test "$have_gtk2" = yes; then
13758     GNOME_PANELDIR='$(GNOME_PANELDIR2)'
13759   else
13760     GNOME_PANELDIR='$(GNOME_PANELDIR1)'
13761   fi
13762
13763
13764   if test "$have_gtk" = yes; then
13765     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
13766     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
13767     cat >>confdefs.h <<\_ACEOF
13768 #define HAVE_GTK 1
13769 _ACEOF
13770
13771
13772     if test "$have_gtk2" = yes; then
13773       GTK_EXTRA_OBJS=""
13774     else
13775       GTK_EXTRA_OBJS="\$(GTK_EXTRA_OBJS)"
13776     fi
13777   fi
13778
13779 fi
13780
13781
13782 # Check for the Gnome Help Browser.
13783 #
13784 if test "$have_gtk" = yes; then
13785   for ac_prog in yelp gnome-help-browser
13786 do
13787   # Extract the first word of "$ac_prog", so it can be a program name with args.
13788 set dummy $ac_prog; ac_word=$2
13789 echo "$as_me:$LINENO: checking for $ac_word" >&5
13790 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13791 if test "${ac_cv_prog_have_gnome_help+set}" = set; then
13792   echo $ECHO_N "(cached) $ECHO_C" >&6
13793 else
13794   if test -n "$have_gnome_help"; then
13795   ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
13796 else
13797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13798 for as_dir in $PATH
13799 do
13800   IFS=$as_save_IFS
13801   test -z "$as_dir" && as_dir=.
13802   for ac_exec_ext in '' $ac_executable_extensions; do
13803   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13804     ac_cv_prog_have_gnome_help="$ac_prog"
13805     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13806     break 2
13807   fi
13808 done
13809 done
13810
13811 fi
13812 fi
13813 have_gnome_help=$ac_cv_prog_have_gnome_help
13814 if test -n "$have_gnome_help"; then
13815   echo "$as_me:$LINENO: result: $have_gnome_help" >&5
13816 echo "${ECHO_T}$have_gnome_help" >&6
13817 else
13818   echo "$as_me:$LINENO: result: no" >&5
13819 echo "${ECHO_T}no" >&6
13820 fi
13821
13822   test -n "$have_gnome_help" && break
13823 done
13824 test -n "$have_gnome_help" || have_gnome_help="no"
13825
13826   if test "$have_gnome_help" != no; then
13827     have_gnome_help=yes
13828   fi
13829 fi
13830
13831
13832 ###############################################################################
13833 #
13834 #       Check for -lxml
13835 #
13836 ###############################################################################
13837
13838 have_xml=no
13839 with_xml_req=unspecified
13840 xml_halfassed=no
13841
13842 # Check whether --with-xml or --without-xml was given.
13843 if test "${with_xml+set}" = set; then
13844   withval="$with_xml"
13845   with_xml="$withval"; with_xml_req="$withval"
13846 else
13847   with_xml=yes
13848 fi;
13849
13850 # if --with-xml=/directory/ was specified, remember that directory so that
13851 # we can also look for the `xml-config' program in that directory.
13852 case "$with_xml" in
13853   /*)
13854     xml_dir="$with_xml"
13855     ;;
13856   *)
13857     xml_dir=""
13858     ;;
13859 esac
13860
13861
13862    case "$with_xml" in
13863     yes) ;;
13864     no)  ;;
13865
13866     /*)
13867      echo "$as_me:$LINENO: checking for XML headers" >&5
13868 echo $ECHO_N "checking for XML headers... $ECHO_C" >&6
13869      d=$with_xml/include
13870      if test -d $d; then
13871        X_CFLAGS="-I$d $X_CFLAGS"
13872        echo "$as_me:$LINENO: result: $d" >&5
13873 echo "${ECHO_T}$d" >&6
13874      else
13875        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13876 echo "${ECHO_T}not found ($d: no such directory)" >&6
13877      fi
13878
13879      echo "$as_me:$LINENO: checking for XML libs" >&5
13880 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13881      d=$with_xml/lib
13882      if test -d $d; then
13883        X_LIBS="-L$d $X_LIBS"
13884        echo "$as_me:$LINENO: result: $d" >&5
13885 echo "${ECHO_T}$d" >&6
13886      else
13887        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13888 echo "${ECHO_T}not found ($d: no such directory)" >&6
13889      fi
13890
13891      # replace the directory string with "yes".
13892      with_xml_req="yes"
13893      with_xml=$with_xml_req
13894      ;;
13895
13896     *)
13897      echo ""
13898      echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory."
13899      echo "       If it is a directory, then \`DIR/include' will be added to"
13900      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13901      exit 1
13902      ;;
13903    esac
13904
13905
13906 if test "$with_xml" != yes -a "$with_xml" != no ; then
13907   echo "error: must be yes or no: --with-xml=$with_xml"
13908   exit 1
13909 fi
13910
13911 if test "$with_xml" = yes; then
13912   have_xml=no
13913   have_old_xml=no
13914
13915   # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
13916   # look in /foo/bin/ for for xml-config.
13917   #
13918   xml_path="$PATH"
13919
13920   if test ! -z "$gtk_dir"; then
13921     # canonicalize slashes.
13922     foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
13923     xml_path="$foo:$xml_path"
13924   fi
13925
13926   if test ! -z "$gnome_dir"; then
13927     # canonicalize slashes.
13928     foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
13929     xml_path="$foo:$xml_path"
13930   fi
13931
13932   if test -n "$pkg_config" ; then
13933     #
13934     # the new way...
13935     # run pkg-config based tests.
13936     #
13937     pkgs=""
13938     ok="yes"
13939
13940     # If we have Gtk 2.x, then *only* XML 2.x will work.
13941     # If we have Gtk 1.x, or don't have Gtk at all, then
13942     # either XML 1.x or 2.x will work.
13943
13944     # First check for XML 2.x.
13945     #
13946     pkg_check_version libxml-2.0 2.4.6
13947
13948     # If that didn't work (we don't have XML 2.x) and we *don't* have
13949     # Gtk 2.x, then check to see if we have XML 1.x
13950     #
13951     if test "$ok" = no -a "$have_gtk2" = no; then
13952       ok=yes
13953       pkg_check_version libxml 1.0
13954     fi
13955
13956     have_xml="$ok"
13957
13958     if test "$have_xml" = yes; then
13959       echo "$as_me:$LINENO: checking for XML includes" >&5
13960 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
13961 if test "${ac_cv_xml_config_cflags+set}" = set; then
13962   echo $ECHO_N "(cached) $ECHO_C" >&6
13963 else
13964   ac_cv_xml_config_cflags=`$pkg_config --cflags $pkgs`
13965 fi
13966 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
13967 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
13968       echo "$as_me:$LINENO: checking for XML libs" >&5
13969 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
13970 if test "${ac_cv_xml_config_libs+set}" = set; then
13971   echo $ECHO_N "(cached) $ECHO_C" >&6
13972 else
13973   ac_cv_xml_config_libs=`$pkg_config --libs $pkgs`
13974 fi
13975 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
13976 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
13977       ac_xml_config_cflags=$ac_cv_xml_config_cflags
13978       ac_xml_config_libs=$ac_cv_xml_config_libs
13979     fi
13980
13981   else
13982     #
13983     # the old way...
13984     # run {xml2,xml}-config based tests.
13985     #
13986
13987     for ac_prog in xml2-config xml-config
13988 do
13989   # Extract the first word of "$ac_prog", so it can be a program name with args.
13990 set dummy $ac_prog; ac_word=$2
13991 echo "$as_me:$LINENO: checking for $ac_word" >&5
13992 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13993 if test "${ac_cv_path_xml_config+set}" = set; then
13994   echo $ECHO_N "(cached) $ECHO_C" >&6
13995 else
13996   case $xml_config in
13997   [\\/]* | ?:[\\/]*)
13998   ac_cv_path_xml_config="$xml_config" # Let the user override the test with a path.
13999   ;;
14000   *)
14001   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14002 for as_dir in $xml_path
14003 do
14004   IFS=$as_save_IFS
14005   test -z "$as_dir" && as_dir=.
14006   for ac_exec_ext in '' $ac_executable_extensions; do
14007   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14008     ac_cv_path_xml_config="$as_dir/$ac_word$ac_exec_ext"
14009     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14010     break 2
14011   fi
14012 done
14013 done
14014
14015   ;;
14016 esac
14017 fi
14018 xml_config=$ac_cv_path_xml_config
14019
14020 if test -n "$xml_config"; then
14021   echo "$as_me:$LINENO: result: $xml_config" >&5
14022 echo "${ECHO_T}$xml_config" >&6
14023 else
14024   echo "$as_me:$LINENO: result: no" >&5
14025 echo "${ECHO_T}no" >&6
14026 fi
14027
14028   test -n "$xml_config" && break
14029 done
14030
14031
14032     # If we found the xml-config program, run it to get flags.
14033     #
14034     if test -n "$xml_config" ; then
14035       echo "$as_me:$LINENO: checking for XML includes" >&5
14036 echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
14037 if test "${ac_cv_xml_config_cflags+set}" = set; then
14038   echo $ECHO_N "(cached) $ECHO_C" >&6
14039 else
14040   ac_cv_xml_config_cflags=`$xml_config --cflags`
14041 fi
14042 echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
14043 echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
14044       echo "$as_me:$LINENO: checking for XML libs" >&5
14045 echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
14046 if test "${ac_cv_xml_config_libs+set}" = set; then
14047   echo $ECHO_N "(cached) $ECHO_C" >&6
14048 else
14049   ac_cv_xml_config_libs=`$xml_config --libs`
14050 fi
14051 echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
14052 echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
14053       ac_xml_config_cflags=$ac_cv_xml_config_cflags
14054       ac_xml_config_libs=$ac_cv_xml_config_libs
14055     fi
14056
14057     ac_save_xml_CPPFLAGS="$CPPFLAGS"
14058     CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags"
14059
14060     # first try <libxml/parser.h> which is the new way...
14061     #
14062
14063   ac_save_CPPFLAGS="$CPPFLAGS"
14064   if test \! -z "$includedir" ; then
14065     CPPFLAGS="$CPPFLAGS -I$includedir"
14066   fi
14067   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14068   echo "$as_me:$LINENO: checking for libxml/xmlIO.h" >&5
14069 echo $ECHO_N "checking for libxml/xmlIO.h... $ECHO_C" >&6
14070 if test "${ac_cv_header_libxml_xmlIO_h+set}" = set; then
14071   echo $ECHO_N "(cached) $ECHO_C" >&6
14072 else
14073   cat >conftest.$ac_ext <<_ACEOF
14074 #line $LINENO "configure"
14075 /* confdefs.h.  */
14076 _ACEOF
14077 cat confdefs.h >>conftest.$ac_ext
14078 cat >>conftest.$ac_ext <<_ACEOF
14079 /* end confdefs.h.  */
14080 #include <libxml/parser.h>
14081
14082 #include <libxml/xmlIO.h>
14083 _ACEOF
14084 rm -f conftest.$ac_objext
14085 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14086   (eval $ac_compile) 2>&5
14087   ac_status=$?
14088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14089   (exit $ac_status); } &&
14090          { ac_try='test -s conftest.$ac_objext'
14091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14092   (eval $ac_try) 2>&5
14093   ac_status=$?
14094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14095   (exit $ac_status); }; }; then
14096   ac_cv_header_libxml_xmlIO_h=yes
14097 else
14098   echo "$as_me: failed program was:" >&5
14099 sed 's/^/| /' conftest.$ac_ext >&5
14100
14101 ac_cv_header_libxml_xmlIO_h=no
14102 fi
14103 rm -f conftest.$ac_objext conftest.$ac_ext
14104 fi
14105 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlIO_h" >&5
14106 echo "${ECHO_T}$ac_cv_header_libxml_xmlIO_h" >&6
14107 if test $ac_cv_header_libxml_xmlIO_h = yes; then
14108   have_xml=yes
14109 fi
14110
14111
14112   CPPFLAGS="$ac_save_CPPFLAGS"
14113
14114     # if that didn't work, then try just <parser.h> which is the old way...
14115     #
14116     if test "$have_xml" = no; then
14117
14118   ac_save_CPPFLAGS="$CPPFLAGS"
14119   if test \! -z "$includedir" ; then
14120     CPPFLAGS="$CPPFLAGS -I$includedir"
14121   fi
14122   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14123   echo "$as_me:$LINENO: checking for xmlIO.h" >&5
14124 echo $ECHO_N "checking for xmlIO.h... $ECHO_C" >&6
14125 if test "${ac_cv_header_xmlIO_h+set}" = set; then
14126   echo $ECHO_N "(cached) $ECHO_C" >&6
14127 else
14128   cat >conftest.$ac_ext <<_ACEOF
14129 #line $LINENO "configure"
14130 /* confdefs.h.  */
14131 _ACEOF
14132 cat confdefs.h >>conftest.$ac_ext
14133 cat >>conftest.$ac_ext <<_ACEOF
14134 /* end confdefs.h.  */
14135 #include <parser.h>
14136
14137 #include <xmlIO.h>
14138 _ACEOF
14139 rm -f conftest.$ac_objext
14140 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14141   (eval $ac_compile) 2>&5
14142   ac_status=$?
14143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14144   (exit $ac_status); } &&
14145          { ac_try='test -s conftest.$ac_objext'
14146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14147   (eval $ac_try) 2>&5
14148   ac_status=$?
14149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14150   (exit $ac_status); }; }; then
14151   ac_cv_header_xmlIO_h=yes
14152 else
14153   echo "$as_me: failed program was:" >&5
14154 sed 's/^/| /' conftest.$ac_ext >&5
14155
14156 ac_cv_header_xmlIO_h=no
14157 fi
14158 rm -f conftest.$ac_objext conftest.$ac_ext
14159 fi
14160 echo "$as_me:$LINENO: result: $ac_cv_header_xmlIO_h" >&5
14161 echo "${ECHO_T}$ac_cv_header_xmlIO_h" >&6
14162 if test $ac_cv_header_xmlIO_h = yes; then
14163   have_xml=yes; have_old_xml=yes
14164 fi
14165
14166
14167   CPPFLAGS="$ac_save_CPPFLAGS"
14168     fi
14169
14170     CPPFLAGS="$ac_save_xml_CPPFLAGS"
14171   fi
14172
14173
14174   have_zlib=no
14175   if test "$have_xml" = yes; then
14176     # we have the XML headers; now make sure zlib is around.
14177     # yes, it's stupid we have to do this too, but there is
14178     # dependency screwage in Gnome.
14179
14180   ac_save_CPPFLAGS="$CPPFLAGS"
14181   ac_save_LDFLAGS="$LDFLAGS"
14182 #  ac_save_LIBS="$LIBS"
14183
14184   if test \! -z "$includedir" ; then
14185     CPPFLAGS="$CPPFLAGS -I$includedir"
14186   fi
14187   # note: $X_CFLAGS includes $x_includes
14188   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14189
14190   if test \! -z "$libdir" ; then
14191     LDFLAGS="$LDFLAGS -L$libdir"
14192   fi
14193   # note: $X_LIBS includes $x_libraries
14194   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14195
14196   echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5
14197 echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
14198 if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
14199   echo $ECHO_N "(cached) $ECHO_C" >&6
14200 else
14201   ac_check_lib_save_LIBS=$LIBS
14202 LIBS="-lz  $LIBS"
14203 cat >conftest.$ac_ext <<_ACEOF
14204 #line $LINENO "configure"
14205 /* confdefs.h.  */
14206 _ACEOF
14207 cat confdefs.h >>conftest.$ac_ext
14208 cat >>conftest.$ac_ext <<_ACEOF
14209 /* end confdefs.h.  */
14210
14211 /* Override any gcc2 internal prototype to avoid an error.  */
14212 #ifdef __cplusplus
14213 extern "C"
14214 #endif
14215 /* We use char because int might match the return type of a gcc2
14216    builtin and then its argument prototype would still apply.  */
14217 char zlibVersion ();
14218 int
14219 main ()
14220 {
14221 zlibVersion ();
14222   ;
14223   return 0;
14224 }
14225 _ACEOF
14226 rm -f conftest.$ac_objext conftest$ac_exeext
14227 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14228   (eval $ac_link) 2>&5
14229   ac_status=$?
14230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14231   (exit $ac_status); } &&
14232          { ac_try='test -s conftest$ac_exeext'
14233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14234   (eval $ac_try) 2>&5
14235   ac_status=$?
14236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14237   (exit $ac_status); }; }; then
14238   ac_cv_lib_z_zlibVersion=yes
14239 else
14240   echo "$as_me: failed program was:" >&5
14241 sed 's/^/| /' conftest.$ac_ext >&5
14242
14243 ac_cv_lib_z_zlibVersion=no
14244 fi
14245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14246 LIBS=$ac_check_lib_save_LIBS
14247 fi
14248 echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5
14249 echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
14250 if test $ac_cv_lib_z_zlibVersion = yes; then
14251   have_zlib=yes
14252 fi
14253
14254   CPPFLAGS="$ac_save_CPPFLAGS"
14255   LDFLAGS="$ac_save_LDFLAGS"
14256 #  LIBS="$ac_save_LIBS"
14257
14258     if test "$have_zlib" = no; then
14259       xml_halfassed=yes
14260       have_xml=no
14261     fi
14262   fi
14263
14264   if test "$have_xml" = yes; then
14265     # we have the header, now check for the library
14266     have_xml=no
14267     xml_halfassed=yes
14268
14269   ac_save_CPPFLAGS="$CPPFLAGS"
14270   ac_save_LDFLAGS="$LDFLAGS"
14271 #  ac_save_LIBS="$LIBS"
14272
14273   if test \! -z "$includedir" ; then
14274     CPPFLAGS="$CPPFLAGS -I$includedir"
14275   fi
14276   # note: $X_CFLAGS includes $x_includes
14277   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14278
14279   if test \! -z "$libdir" ; then
14280     LDFLAGS="$LDFLAGS -L$libdir"
14281   fi
14282   # note: $X_LIBS includes $x_libraries
14283   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14284
14285   echo "$as_me:$LINENO: checking for xmlParseChunk in -lc" >&5
14286 echo $ECHO_N "checking for xmlParseChunk in -lc... $ECHO_C" >&6
14287 if test "${ac_cv_lib_c_xmlParseChunk+set}" = set; then
14288   echo $ECHO_N "(cached) $ECHO_C" >&6
14289 else
14290   ac_check_lib_save_LIBS=$LIBS
14291 LIBS="-lc $ac_xml_config_libs $LIBS"
14292 cat >conftest.$ac_ext <<_ACEOF
14293 #line $LINENO "configure"
14294 /* confdefs.h.  */
14295 _ACEOF
14296 cat confdefs.h >>conftest.$ac_ext
14297 cat >>conftest.$ac_ext <<_ACEOF
14298 /* end confdefs.h.  */
14299
14300 /* Override any gcc2 internal prototype to avoid an error.  */
14301 #ifdef __cplusplus
14302 extern "C"
14303 #endif
14304 /* We use char because int might match the return type of a gcc2
14305    builtin and then its argument prototype would still apply.  */
14306 char xmlParseChunk ();
14307 int
14308 main ()
14309 {
14310 xmlParseChunk ();
14311   ;
14312   return 0;
14313 }
14314 _ACEOF
14315 rm -f conftest.$ac_objext conftest$ac_exeext
14316 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14317   (eval $ac_link) 2>&5
14318   ac_status=$?
14319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14320   (exit $ac_status); } &&
14321          { ac_try='test -s conftest$ac_exeext'
14322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14323   (eval $ac_try) 2>&5
14324   ac_status=$?
14325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14326   (exit $ac_status); }; }; then
14327   ac_cv_lib_c_xmlParseChunk=yes
14328 else
14329   echo "$as_me: failed program was:" >&5
14330 sed 's/^/| /' conftest.$ac_ext >&5
14331
14332 ac_cv_lib_c_xmlParseChunk=no
14333 fi
14334 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14335 LIBS=$ac_check_lib_save_LIBS
14336 fi
14337 echo "$as_me:$LINENO: result: $ac_cv_lib_c_xmlParseChunk" >&5
14338 echo "${ECHO_T}$ac_cv_lib_c_xmlParseChunk" >&6
14339 if test $ac_cv_lib_c_xmlParseChunk = yes; then
14340   have_xml=yes
14341                     xml_halfassed=no
14342                     XML_LIBS="$ac_xml_config_libs"
14343                     cat >>confdefs.h <<\_ACEOF
14344 #define HAVE_XML 1
14345 _ACEOF
14346
14347 else
14348   true
14349 fi
14350
14351   CPPFLAGS="$ac_save_CPPFLAGS"
14352   LDFLAGS="$ac_save_LDFLAGS"
14353 #  LIBS="$ac_save_LIBS"
14354
14355   fi
14356
14357   if test "$have_xml" = yes; then
14358     INCLUDES="$INCLUDES $ac_xml_config_cflags"
14359     GTK_LIBS="$GTK_LIBS $ac_xml_config_libs"
14360     cat >>confdefs.h <<\_ACEOF
14361 #define HAVE_XML 1
14362 _ACEOF
14363
14364     if test "$have_old_xml" = yes; then
14365       cat >>confdefs.h <<\_ACEOF
14366 #define HAVE_OLD_XML_HEADERS 1
14367 _ACEOF
14368
14369     fi
14370   fi
14371
14372 fi
14373
14374
14375 ###############################################################################
14376 #
14377 #       Checking whether Motif is really Lesstif.
14378 #
14379 ###############################################################################
14380
14381 have_lesstif=no
14382 if test "$have_motif" = yes ; then
14383   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
14384 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
14385 if test "${ac_cv_have_lesstif+set}" = set; then
14386   echo $ECHO_N "(cached) $ECHO_C" >&6
14387 else
14388
14389   ac_save_CPPFLAGS="$CPPFLAGS"
14390   if test \! -z "$includedir" ; then
14391     CPPFLAGS="$CPPFLAGS -I$includedir"
14392   fi
14393   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14394   cat >conftest.$ac_ext <<_ACEOF
14395 #line $LINENO "configure"
14396 /* confdefs.h.  */
14397 _ACEOF
14398 cat confdefs.h >>conftest.$ac_ext
14399 cat >>conftest.$ac_ext <<_ACEOF
14400 /* end confdefs.h.  */
14401 #include <Xm/Xm.h>
14402 int
14403 main ()
14404 {
14405 long vers = LesstifVersion;
14406   ;
14407   return 0;
14408 }
14409 _ACEOF
14410 rm -f conftest.$ac_objext
14411 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14412   (eval $ac_compile) 2>&5
14413   ac_status=$?
14414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14415   (exit $ac_status); } &&
14416          { ac_try='test -s conftest.$ac_objext'
14417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14418   (eval $ac_try) 2>&5
14419   ac_status=$?
14420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14421   (exit $ac_status); }; }; then
14422   ac_cv_have_lesstif=yes
14423 else
14424   echo "$as_me: failed program was:" >&5
14425 sed 's/^/| /' conftest.$ac_ext >&5
14426
14427 ac_cv_have_lesstif=no
14428 fi
14429 rm -f conftest.$ac_objext conftest.$ac_ext
14430   CPPFLAGS="$ac_save_CPPFLAGS"
14431 fi
14432 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
14433 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
14434   have_lesstif=$ac_cv_have_lesstif
14435 fi
14436
14437
14438 lesstif_version=unknown
14439 lesstif_version_string=unknown
14440
14441 if test "$have_lesstif" = yes ; then
14442   ltv=unknown
14443   echo unknown > conftest-lt
14444   echo "$as_me:$LINENO: checking LessTif version number" >&5
14445 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
14446 if test "${ac_cv_lesstif_version_string+set}" = set; then
14447   echo $ECHO_N "(cached) $ECHO_C" >&6
14448 else
14449
14450   ac_save_CPPFLAGS="$CPPFLAGS"
14451   if test \! -z "$includedir" ; then
14452     CPPFLAGS="$CPPFLAGS -I$includedir"
14453   fi
14454   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14455   if test "$cross_compiling" = yes; then
14456   ac_cv_lesstif_version=unknown
14457                      ac_cv_lesstif_version_string=unknown
14458 else
14459   cat >conftest.$ac_ext <<_ACEOF
14460 #line $LINENO "configure"
14461 /* confdefs.h.  */
14462 _ACEOF
14463 cat confdefs.h >>conftest.$ac_ext
14464 cat >>conftest.$ac_ext <<_ACEOF
14465 /* end confdefs.h.  */
14466 #include <stdio.h>
14467                      #include <Xm/Xm.h>
14468                      int main() {
14469                        FILE *f = fopen("conftest-lt", "w");
14470                        if (!f) exit(1);
14471                        fprintf(f, "%d %d.%d\n", LesstifVersion,
14472                           LESSTIF_VERSION, LESSTIF_REVISION);
14473                        fclose(f);
14474                        exit(0);
14475                      }
14476 _ACEOF
14477 rm -f conftest$ac_exeext
14478 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14479   (eval $ac_link) 2>&5
14480   ac_status=$?
14481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14482   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14484   (eval $ac_try) 2>&5
14485   ac_status=$?
14486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14487   (exit $ac_status); }; }; then
14488   ltv=`cat conftest-lt`
14489                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
14490                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
14491 else
14492   echo "$as_me: program exited with status $ac_status" >&5
14493 echo "$as_me: failed program was:" >&5
14494 sed 's/^/| /' conftest.$ac_ext >&5
14495
14496 ( exit $ac_status )
14497 ac_cv_lesstif_version=unknown
14498                      ac_cv_lesstif_version_string=unknown
14499 fi
14500 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14501 fi
14502   CPPFLAGS="$ac_save_CPPFLAGS"
14503 fi
14504 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
14505 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
14506   rm -f conftest-lt
14507   lesstif_version=$ac_cv_lesstif_version
14508   lesstif_version_string=$ac_cv_lesstif_version_string
14509
14510 fi
14511
14512
14513 if test "$have_motif" = yes ; then
14514   mtv=unknown
14515   echo unknown > conftest-mt
14516   echo "$as_me:$LINENO: checking Motif version number" >&5
14517 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
14518 if test "${ac_cv_motif_version_string+set}" = set; then
14519   echo $ECHO_N "(cached) $ECHO_C" >&6
14520 else
14521
14522   ac_save_CPPFLAGS="$CPPFLAGS"
14523   if test \! -z "$includedir" ; then
14524     CPPFLAGS="$CPPFLAGS -I$includedir"
14525   fi
14526   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14527   if test "$cross_compiling" = yes; then
14528   ac_cv_motif_version=unknown
14529                      ac_cv_motif_version_string=unknown
14530 else
14531   cat >conftest.$ac_ext <<_ACEOF
14532 #line $LINENO "configure"
14533 /* confdefs.h.  */
14534 _ACEOF
14535 cat confdefs.h >>conftest.$ac_ext
14536 cat >>conftest.$ac_ext <<_ACEOF
14537 /* end confdefs.h.  */
14538 #include <stdio.h>
14539                      #include <Xm/Xm.h>
14540                      int main() {
14541                        FILE *f = fopen("conftest-mt", "w");
14542                        if (!f) exit(1);
14543                        fprintf(f, "%d %d.%d\n", XmVersion,
14544                           XmVERSION, XmREVISION);
14545                        fclose(f);
14546                        exit(0);
14547                      }
14548 _ACEOF
14549 rm -f conftest$ac_exeext
14550 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14551   (eval $ac_link) 2>&5
14552   ac_status=$?
14553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14554   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14556   (eval $ac_try) 2>&5
14557   ac_status=$?
14558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14559   (exit $ac_status); }; }; then
14560   mtv=`cat conftest-mt`
14561                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
14562                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
14563 else
14564   echo "$as_me: program exited with status $ac_status" >&5
14565 echo "$as_me: failed program was:" >&5
14566 sed 's/^/| /' conftest.$ac_ext >&5
14567
14568 ( exit $ac_status )
14569 ac_cv_motif_version=unknown
14570                      ac_cv_motif_version_string=unknown
14571 fi
14572 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14573 fi
14574   CPPFLAGS="$ac_save_CPPFLAGS"
14575 fi
14576 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
14577 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
14578   rm -f conftest-mt
14579   motif_version=$ac_cv_motif_version
14580   motif_version_string=$ac_cv_motif_version_string
14581
14582 fi
14583
14584
14585 ###############################################################################
14586 #
14587 #       Checking whether Motif requires -lXpm.
14588 #
14589 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
14590 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
14591 #       of the library whether to build the XPM code into libXm, or whether
14592 #       to rely on an external libXm.  So the only way to tell whether XPM is
14593 #       a link-time requirement is to examine libXm.a, which is very
14594 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
14595 #       always link against XPM if the XPM lib exists (and this will be a
14596 #       no-op if libXm happens to already have the XPM code in it.)
14597 #
14598 ###############################################################################
14599
14600 motif_requires_xpm=no
14601 if test "$have_motif" = yes ; then
14602    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
14603 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
14604    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
14605    then
14606      motif_requires_xpm=yes
14607      echo "$as_me:$LINENO: result: maybe" >&5
14608 echo "${ECHO_T}maybe" >&6
14609    else
14610      echo "$as_me:$LINENO: result: no" >&5
14611 echo "${ECHO_T}no" >&6
14612    fi
14613 fi
14614
14615
14616 ###############################################################################
14617 #
14618 #       Checking whether Motif requires -lXp.
14619 #
14620 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
14621 #       Extension".   Why this extension isn't in -lXext with all the others,
14622 #       I have no idea.
14623 #
14624 ###############################################################################
14625
14626 have_xp_ext=no
14627 if test "$have_motif" = yes ; then
14628    have_xp_ext=no
14629
14630   ac_save_CPPFLAGS="$CPPFLAGS"
14631   ac_save_LDFLAGS="$LDFLAGS"
14632 #  ac_save_LIBS="$LIBS"
14633
14634   if test \! -z "$includedir" ; then
14635     CPPFLAGS="$CPPFLAGS -I$includedir"
14636   fi
14637   # note: $X_CFLAGS includes $x_includes
14638   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14639
14640   if test \! -z "$libdir" ; then
14641     LDFLAGS="$LDFLAGS -L$libdir"
14642   fi
14643   # note: $X_LIBS includes $x_libraries
14644   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14645
14646   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
14647 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
14648 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
14649   echo $ECHO_N "(cached) $ECHO_C" >&6
14650 else
14651   ac_check_lib_save_LIBS=$LIBS
14652 LIBS="-lXp -lX11 -lXext -lm $LIBS"
14653 cat >conftest.$ac_ext <<_ACEOF
14654 #line $LINENO "configure"
14655 /* confdefs.h.  */
14656 _ACEOF
14657 cat confdefs.h >>conftest.$ac_ext
14658 cat >>conftest.$ac_ext <<_ACEOF
14659 /* end confdefs.h.  */
14660
14661 /* Override any gcc2 internal prototype to avoid an error.  */
14662 #ifdef __cplusplus
14663 extern "C"
14664 #endif
14665 /* We use char because int might match the return type of a gcc2
14666    builtin and then its argument prototype would still apply.  */
14667 char XpQueryExtension ();
14668 int
14669 main ()
14670 {
14671 XpQueryExtension ();
14672   ;
14673   return 0;
14674 }
14675 _ACEOF
14676 rm -f conftest.$ac_objext conftest$ac_exeext
14677 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14678   (eval $ac_link) 2>&5
14679   ac_status=$?
14680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14681   (exit $ac_status); } &&
14682          { ac_try='test -s conftest$ac_exeext'
14683   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14684   (eval $ac_try) 2>&5
14685   ac_status=$?
14686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14687   (exit $ac_status); }; }; then
14688   ac_cv_lib_Xp_XpQueryExtension=yes
14689 else
14690   echo "$as_me: failed program was:" >&5
14691 sed 's/^/| /' conftest.$ac_ext >&5
14692
14693 ac_cv_lib_Xp_XpQueryExtension=no
14694 fi
14695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14696 LIBS=$ac_check_lib_save_LIBS
14697 fi
14698 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
14699 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
14700 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
14701   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
14702 else
14703   true
14704 fi
14705
14706   CPPFLAGS="$ac_save_CPPFLAGS"
14707   LDFLAGS="$ac_save_LDFLAGS"
14708 #  LIBS="$ac_save_LIBS"
14709
14710 fi
14711
14712
14713 ###############################################################################
14714 #
14715 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
14716 #
14717 ###############################################################################
14718
14719 have_xintl=no
14720 if test "$have_motif" = yes ; then
14721
14722   ac_save_CPPFLAGS="$CPPFLAGS"
14723   ac_save_LDFLAGS="$LDFLAGS"
14724 #  ac_save_LIBS="$LIBS"
14725
14726   if test \! -z "$includedir" ; then
14727     CPPFLAGS="$CPPFLAGS -I$includedir"
14728   fi
14729   # note: $X_CFLAGS includes $x_includes
14730   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14731
14732   if test \! -z "$libdir" ; then
14733     LDFLAGS="$LDFLAGS -L$libdir"
14734   fi
14735   # note: $X_LIBS includes $x_libraries
14736   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
14737
14738   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
14739 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
14740 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
14741   echo $ECHO_N "(cached) $ECHO_C" >&6
14742 else
14743   ac_check_lib_save_LIBS=$LIBS
14744 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
14745 cat >conftest.$ac_ext <<_ACEOF
14746 #line $LINENO "configure"
14747 /* confdefs.h.  */
14748 _ACEOF
14749 cat confdefs.h >>conftest.$ac_ext
14750 cat >>conftest.$ac_ext <<_ACEOF
14751 /* end confdefs.h.  */
14752
14753 /* Override any gcc2 internal prototype to avoid an error.  */
14754 #ifdef __cplusplus
14755 extern "C"
14756 #endif
14757 /* We use char because int might match the return type of a gcc2
14758    builtin and then its argument prototype would still apply.  */
14759 char _Xsetlocale ();
14760 int
14761 main ()
14762 {
14763 _Xsetlocale ();
14764   ;
14765   return 0;
14766 }
14767 _ACEOF
14768 rm -f conftest.$ac_objext conftest$ac_exeext
14769 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14770   (eval $ac_link) 2>&5
14771   ac_status=$?
14772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14773   (exit $ac_status); } &&
14774          { ac_try='test -s conftest$ac_exeext'
14775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14776   (eval $ac_try) 2>&5
14777   ac_status=$?
14778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14779   (exit $ac_status); }; }; then
14780   ac_cv_lib_Xintl__Xsetlocale=yes
14781 else
14782   echo "$as_me: failed program was:" >&5
14783 sed 's/^/| /' conftest.$ac_ext >&5
14784
14785 ac_cv_lib_Xintl__Xsetlocale=no
14786 fi
14787 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14788 LIBS=$ac_check_lib_save_LIBS
14789 fi
14790 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
14791 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
14792 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
14793   have_xintl=yes
14794 else
14795   have_xintl=no
14796 fi
14797
14798   CPPFLAGS="$ac_save_CPPFLAGS"
14799   LDFLAGS="$ac_save_LDFLAGS"
14800 #  LIBS="$ac_save_LIBS"
14801
14802   if test "$have_xintl" = yes; then
14803     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
14804   fi
14805 fi
14806
14807
14808 ###############################################################################
14809 #
14810 #       Check for -lGL or -lMesaGL.
14811 #
14812 ###############################################################################
14813
14814 have_gl=no
14815 ac_have_mesa_gl=no
14816 with_gl_req=unspecified
14817 gl_halfassed=no
14818
14819 # Check whether --with-gl or --without-gl was given.
14820 if test "${with_gl+set}" = set; then
14821   withval="$with_gl"
14822   with_gl="$withval"; with_gl_req="$withval"
14823 else
14824   with_gl=yes
14825 fi;
14826
14827
14828    case "$with_gl" in
14829     yes) ;;
14830     no)  ;;
14831
14832     /*)
14833      echo "$as_me:$LINENO: checking for GL headers" >&5
14834 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
14835      d=$with_gl/include
14836      if test -d $d; then
14837        X_CFLAGS="-I$d $X_CFLAGS"
14838        echo "$as_me:$LINENO: result: $d" >&5
14839 echo "${ECHO_T}$d" >&6
14840      else
14841        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14842 echo "${ECHO_T}not found ($d: no such directory)" >&6
14843      fi
14844
14845      echo "$as_me:$LINENO: checking for GL libs" >&5
14846 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
14847      d=$with_gl/lib
14848      if test -d $d; then
14849        X_LIBS="-L$d $X_LIBS"
14850        echo "$as_me:$LINENO: result: $d" >&5
14851 echo "${ECHO_T}$d" >&6
14852      else
14853        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14854 echo "${ECHO_T}not found ($d: no such directory)" >&6
14855      fi
14856
14857      # replace the directory string with "yes".
14858      with_gl_req="yes"
14859      with_gl=$with_gl_req
14860      ;;
14861
14862     *)
14863      echo ""
14864      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
14865      echo "       If it is a directory, then \`DIR/include' will be added to"
14866      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14867      exit 1
14868      ;;
14869    esac
14870
14871
14872 ac_mesagl_version=unknown
14873 ac_mesagl_version_string=unknown
14874
14875 if test "$with_gl" = yes; then
14876
14877   ac_save_CPPFLAGS="$CPPFLAGS"
14878   if test \! -z "$includedir" ; then
14879     CPPFLAGS="$CPPFLAGS -I$includedir"
14880   fi
14881   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14882   if test "${ac_cv_header_GL_gl_h+set}" = set; then
14883   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
14884 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
14885 if test "${ac_cv_header_GL_gl_h+set}" = set; then
14886   echo $ECHO_N "(cached) $ECHO_C" >&6
14887 fi
14888 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
14889 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
14890 else
14891   # Is the header compilable?
14892 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
14893 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
14894 cat >conftest.$ac_ext <<_ACEOF
14895 #line $LINENO "configure"
14896 /* confdefs.h.  */
14897 _ACEOF
14898 cat confdefs.h >>conftest.$ac_ext
14899 cat >>conftest.$ac_ext <<_ACEOF
14900 /* end confdefs.h.  */
14901 $ac_includes_default
14902 #include <GL/gl.h>
14903 _ACEOF
14904 rm -f conftest.$ac_objext
14905 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14906   (eval $ac_compile) 2>&5
14907   ac_status=$?
14908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14909   (exit $ac_status); } &&
14910          { ac_try='test -s conftest.$ac_objext'
14911   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14912   (eval $ac_try) 2>&5
14913   ac_status=$?
14914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14915   (exit $ac_status); }; }; then
14916   ac_header_compiler=yes
14917 else
14918   echo "$as_me: failed program was:" >&5
14919 sed 's/^/| /' conftest.$ac_ext >&5
14920
14921 ac_header_compiler=no
14922 fi
14923 rm -f conftest.$ac_objext conftest.$ac_ext
14924 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14925 echo "${ECHO_T}$ac_header_compiler" >&6
14926
14927 # Is the header present?
14928 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
14929 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
14930 cat >conftest.$ac_ext <<_ACEOF
14931 #line $LINENO "configure"
14932 /* confdefs.h.  */
14933 _ACEOF
14934 cat confdefs.h >>conftest.$ac_ext
14935 cat >>conftest.$ac_ext <<_ACEOF
14936 /* end confdefs.h.  */
14937 #include <GL/gl.h>
14938 _ACEOF
14939 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14940   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14941   ac_status=$?
14942   grep -v '^ *+' conftest.er1 >conftest.err
14943   rm -f conftest.er1
14944   cat conftest.err >&5
14945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14946   (exit $ac_status); } >/dev/null; then
14947   if test -s conftest.err; then
14948     ac_cpp_err=$ac_c_preproc_warn_flag
14949   else
14950     ac_cpp_err=
14951   fi
14952 else
14953   ac_cpp_err=yes
14954 fi
14955 if test -z "$ac_cpp_err"; then
14956   ac_header_preproc=yes
14957 else
14958   echo "$as_me: failed program was:" >&5
14959 sed 's/^/| /' conftest.$ac_ext >&5
14960
14961   ac_header_preproc=no
14962 fi
14963 rm -f conftest.err conftest.$ac_ext
14964 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14965 echo "${ECHO_T}$ac_header_preproc" >&6
14966
14967 # So?  What about this header?
14968 case $ac_header_compiler:$ac_header_preproc in
14969   yes:no )
14970     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
14971 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14972     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
14973 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
14974     (
14975       cat <<\_ASBOX
14976 ## ------------------------------------ ##
14977 ## Report this to bug-autoconf@gnu.org. ##
14978 ## ------------------------------------ ##
14979 _ASBOX
14980     ) |
14981       sed "s/^/$as_me: WARNING:     /" >&2
14982     ;;
14983   no:yes )
14984     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
14985 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
14986     { echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5
14987 echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;}
14988     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
14989 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
14990     (
14991       cat <<\_ASBOX
14992 ## ------------------------------------ ##
14993 ## Report this to bug-autoconf@gnu.org. ##
14994 ## ------------------------------------ ##
14995 _ASBOX
14996     ) |
14997       sed "s/^/$as_me: WARNING:     /" >&2
14998     ;;
14999 esac
15000 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15001 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15002 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15003   echo $ECHO_N "(cached) $ECHO_C" >&6
15004 else
15005   ac_cv_header_GL_gl_h=$ac_header_preproc
15006 fi
15007 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15008 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15009
15010 fi
15011 if test $ac_cv_header_GL_gl_h = yes; then
15012   have_gl=yes
15013 else
15014   have_gl=no
15015 fi
15016
15017
15018   CPPFLAGS="$ac_save_CPPFLAGS"
15019   if test "$have_gl" = yes ; then
15020
15021   ac_save_CPPFLAGS="$CPPFLAGS"
15022   if test \! -z "$includedir" ; then
15023     CPPFLAGS="$CPPFLAGS -I$includedir"
15024   fi
15025   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15026   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
15027 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
15028 if test "${ac_cv_header_GL_glx_h+set}" = set; then
15029   echo $ECHO_N "(cached) $ECHO_C" >&6
15030 else
15031   cat >conftest.$ac_ext <<_ACEOF
15032 #line $LINENO "configure"
15033 /* confdefs.h.  */
15034 _ACEOF
15035 cat confdefs.h >>conftest.$ac_ext
15036 cat >>conftest.$ac_ext <<_ACEOF
15037 /* end confdefs.h.  */
15038 #include <GL/gl.h>
15039
15040 #include <GL/glx.h>
15041 _ACEOF
15042 rm -f conftest.$ac_objext
15043 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15044   (eval $ac_compile) 2>&5
15045   ac_status=$?
15046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15047   (exit $ac_status); } &&
15048          { ac_try='test -s conftest.$ac_objext'
15049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15050   (eval $ac_try) 2>&5
15051   ac_status=$?
15052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15053   (exit $ac_status); }; }; then
15054   ac_cv_header_GL_glx_h=yes
15055 else
15056   echo "$as_me: failed program was:" >&5
15057 sed 's/^/| /' conftest.$ac_ext >&5
15058
15059 ac_cv_header_GL_glx_h=no
15060 fi
15061 rm -f conftest.$ac_objext conftest.$ac_ext
15062 fi
15063 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
15064 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
15065 if test $ac_cv_header_GL_glx_h = yes; then
15066   have_gl=yes
15067 else
15068   have_gl=no
15069 fi
15070
15071
15072   CPPFLAGS="$ac_save_CPPFLAGS"
15073   fi
15074
15075   # If we have the headers, try and figure out which vendor it's from.
15076   #
15077   if test "$have_gl" = yes ; then
15078
15079     # We need to know whether it's MesaGL so that we know which libraries
15080     # to link against.
15081     #
15082     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
15083 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
15084 if test "${ac_cv_have_mesa_gl+set}" = set; then
15085   echo $ECHO_N "(cached) $ECHO_C" >&6
15086 else
15087   ac_cv_have_mesa_gl=no
15088
15089   ac_save_CPPFLAGS="$CPPFLAGS"
15090   if test \! -z "$includedir" ; then
15091     CPPFLAGS="$CPPFLAGS -I$includedir"
15092   fi
15093   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15094   cat >conftest.$ac_ext <<_ACEOF
15095 #line $LINENO "configure"
15096 /* confdefs.h.  */
15097 _ACEOF
15098 cat confdefs.h >>conftest.$ac_ext
15099 cat >>conftest.$ac_ext <<_ACEOF
15100 /* end confdefs.h.  */
15101 #include <GL/glx.h>
15102
15103 _ACEOF
15104 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15105   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
15106   ac_cv_have_mesa_gl=yes
15107 fi
15108 rm -f conftest*
15109
15110   CPPFLAGS="$ac_save_CPPFLAGS"
15111
15112 fi
15113 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
15114 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
15115     ac_have_mesa_gl=$ac_cv_have_mesa_gl
15116
15117
15118     gl_lib_1=""
15119     GL_LIBS=""
15120
15121
15122     # Some versions of MesaGL are compiled to require -lpthread.
15123     # So if the Mesa headers exist, and -lpthread exists, then always
15124     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
15125     #
15126     if test "$ac_have_mesa_gl" = yes; then
15127       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15128 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
15129 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
15130   echo $ECHO_N "(cached) $ECHO_C" >&6
15131 else
15132   ac_check_lib_save_LIBS=$LIBS
15133 LIBS="-lpthread  $LIBS"
15134 cat >conftest.$ac_ext <<_ACEOF
15135 #line $LINENO "configure"
15136 /* confdefs.h.  */
15137 _ACEOF
15138 cat confdefs.h >>conftest.$ac_ext
15139 cat >>conftest.$ac_ext <<_ACEOF
15140 /* end confdefs.h.  */
15141
15142 /* Override any gcc2 internal prototype to avoid an error.  */
15143 #ifdef __cplusplus
15144 extern "C"
15145 #endif
15146 /* We use char because int might match the return type of a gcc2
15147    builtin and then its argument prototype would still apply.  */
15148 char pthread_create ();
15149 int
15150 main ()
15151 {
15152 pthread_create ();
15153   ;
15154   return 0;
15155 }
15156 _ACEOF
15157 rm -f conftest.$ac_objext conftest$ac_exeext
15158 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15159   (eval $ac_link) 2>&5
15160   ac_status=$?
15161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15162   (exit $ac_status); } &&
15163          { ac_try='test -s conftest$ac_exeext'
15164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15165   (eval $ac_try) 2>&5
15166   ac_status=$?
15167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15168   (exit $ac_status); }; }; then
15169   ac_cv_lib_pthread_pthread_create=yes
15170 else
15171   echo "$as_me: failed program was:" >&5
15172 sed 's/^/| /' conftest.$ac_ext >&5
15173
15174 ac_cv_lib_pthread_pthread_create=no
15175 fi
15176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15177 LIBS=$ac_check_lib_save_LIBS
15178 fi
15179 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
15180 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
15181 if test $ac_cv_lib_pthread_pthread_create = yes; then
15182   GL_LIBS="-lpthread"
15183 fi
15184
15185     fi
15186
15187
15188     # If we have Mesa headers, check to see if we can link against -lMesaGL.
15189     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
15190     # Else, warn that GL is busted.  (We have the headers, but no libs.)
15191     #
15192
15193     if test "$ac_have_mesa_gl" = yes ; then
15194
15195   ac_save_CPPFLAGS="$CPPFLAGS"
15196   ac_save_LDFLAGS="$LDFLAGS"
15197 #  ac_save_LIBS="$LIBS"
15198
15199   if test \! -z "$includedir" ; then
15200     CPPFLAGS="$CPPFLAGS -I$includedir"
15201   fi
15202   # note: $X_CFLAGS includes $x_includes
15203   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15204
15205   if test \! -z "$libdir" ; then
15206     LDFLAGS="$LDFLAGS -L$libdir"
15207   fi
15208   # note: $X_LIBS includes $x_libraries
15209   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15210
15211   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
15212 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
15213 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
15214   echo $ECHO_N "(cached) $ECHO_C" >&6
15215 else
15216   ac_check_lib_save_LIBS=$LIBS
15217 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
15218 cat >conftest.$ac_ext <<_ACEOF
15219 #line $LINENO "configure"
15220 /* confdefs.h.  */
15221 _ACEOF
15222 cat confdefs.h >>conftest.$ac_ext
15223 cat >>conftest.$ac_ext <<_ACEOF
15224 /* end confdefs.h.  */
15225
15226 /* Override any gcc2 internal prototype to avoid an error.  */
15227 #ifdef __cplusplus
15228 extern "C"
15229 #endif
15230 /* We use char because int might match the return type of a gcc2
15231    builtin and then its argument prototype would still apply.  */
15232 char glXCreateContext ();
15233 int
15234 main ()
15235 {
15236 glXCreateContext ();
15237   ;
15238   return 0;
15239 }
15240 _ACEOF
15241 rm -f conftest.$ac_objext conftest$ac_exeext
15242 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15243   (eval $ac_link) 2>&5
15244   ac_status=$?
15245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15246   (exit $ac_status); } &&
15247          { ac_try='test -s conftest$ac_exeext'
15248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15249   (eval $ac_try) 2>&5
15250   ac_status=$?
15251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15252   (exit $ac_status); }; }; then
15253   ac_cv_lib_MesaGL_glXCreateContext=yes
15254 else
15255   echo "$as_me: failed program was:" >&5
15256 sed 's/^/| /' conftest.$ac_ext >&5
15257
15258 ac_cv_lib_MesaGL_glXCreateContext=no
15259 fi
15260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15261 LIBS=$ac_check_lib_save_LIBS
15262 fi
15263 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
15264 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
15265 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
15266   gl_lib_1="MesaGL"
15267                       GL_LIBS="-lMesaGL -lMesaGLU $GL_LIBS"
15268 fi
15269
15270   CPPFLAGS="$ac_save_CPPFLAGS"
15271   LDFLAGS="$ac_save_LDFLAGS"
15272 #  LIBS="$ac_save_LIBS"
15273
15274     fi
15275
15276     if test "$gl_lib_1" = "" ; then
15277
15278   ac_save_CPPFLAGS="$CPPFLAGS"
15279   ac_save_LDFLAGS="$LDFLAGS"
15280 #  ac_save_LIBS="$LIBS"
15281
15282   if test \! -z "$includedir" ; then
15283     CPPFLAGS="$CPPFLAGS -I$includedir"
15284   fi
15285   # note: $X_CFLAGS includes $x_includes
15286   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15287
15288   if test \! -z "$libdir" ; then
15289     LDFLAGS="$LDFLAGS -L$libdir"
15290   fi
15291   # note: $X_LIBS includes $x_libraries
15292   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15293
15294   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
15295 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
15296 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
15297   echo $ECHO_N "(cached) $ECHO_C" >&6
15298 else
15299   ac_check_lib_save_LIBS=$LIBS
15300 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
15301 cat >conftest.$ac_ext <<_ACEOF
15302 #line $LINENO "configure"
15303 /* confdefs.h.  */
15304 _ACEOF
15305 cat confdefs.h >>conftest.$ac_ext
15306 cat >>conftest.$ac_ext <<_ACEOF
15307 /* end confdefs.h.  */
15308
15309 /* Override any gcc2 internal prototype to avoid an error.  */
15310 #ifdef __cplusplus
15311 extern "C"
15312 #endif
15313 /* We use char because int might match the return type of a gcc2
15314    builtin and then its argument prototype would still apply.  */
15315 char glXCreateContext ();
15316 int
15317 main ()
15318 {
15319 glXCreateContext ();
15320   ;
15321   return 0;
15322 }
15323 _ACEOF
15324 rm -f conftest.$ac_objext conftest$ac_exeext
15325 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15326   (eval $ac_link) 2>&5
15327   ac_status=$?
15328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15329   (exit $ac_status); } &&
15330          { ac_try='test -s conftest$ac_exeext'
15331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15332   (eval $ac_try) 2>&5
15333   ac_status=$?
15334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15335   (exit $ac_status); }; }; then
15336   ac_cv_lib_GL_glXCreateContext=yes
15337 else
15338   echo "$as_me: failed program was:" >&5
15339 sed 's/^/| /' conftest.$ac_ext >&5
15340
15341 ac_cv_lib_GL_glXCreateContext=no
15342 fi
15343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15344 LIBS=$ac_check_lib_save_LIBS
15345 fi
15346 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
15347 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
15348 if test $ac_cv_lib_GL_glXCreateContext = yes; then
15349   gl_lib_1="GL"
15350                       GL_LIBS="-lGL -lGLU $GL_LIBS"
15351 fi
15352
15353   CPPFLAGS="$ac_save_CPPFLAGS"
15354   LDFLAGS="$ac_save_LDFLAGS"
15355 #  LIBS="$ac_save_LIBS"
15356
15357     fi
15358
15359     if test "$gl_lib_1" = "" ; then
15360       # we have headers, but no libs -- bail.
15361       have_gl=no
15362       ac_have_mesa_gl=no
15363       gl_halfassed=yes
15364     else
15365       # linking works -- we can build the GL hacks.
15366       cat >>confdefs.h <<\_ACEOF
15367 #define HAVE_GL 1
15368 _ACEOF
15369
15370       if test "$ac_have_mesa_gl" = yes ; then
15371         cat >>confdefs.h <<\_ACEOF
15372 #define HAVE_MESA_GL 1
15373 _ACEOF
15374
15375       fi
15376     fi
15377   fi
15378
15379
15380   # Now that we know we have GL headers and libs, do some more GL testing.
15381   #
15382
15383   if test "$have_gl" = yes ; then
15384     # If it's MesaGL, we'd like to issue a warning if the version number
15385     # is less than or equal to 2.6, because that version had a security bug.
15386     #
15387     if test "$ac_have_mesa_gl" = yes; then
15388
15389       echo "$as_me:$LINENO: checking MesaGL version number" >&5
15390 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
15391 if test "${ac_cv_mesagl_version_string+set}" = set; then
15392   echo $ECHO_N "(cached) $ECHO_C" >&6
15393 else
15394   cat > conftest.$ac_ext <<EOF
15395 #line 15401 "configure"
15396 #include "confdefs.h"
15397 #include <GL/gl.h>
15398 #ifndef MESA_MAJOR_VERSION
15399 # include <GL/xmesa.h>
15400 # ifdef XMESA_MAJOR_VERSION
15401    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
15402       we have to check the XMesa version number (the number of the X protocol
15403       support, which seems to be the same as the Mesa version number.)
15404     */
15405 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
15406 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
15407 # else
15408    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
15409       so we have no way of telling what version of Mesa this is at all.
15410       So, we'll guess that the osmesa version (the "offscreen protocol")
15411       is less than or equal to the real mesa version number.  Except that
15412       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
15413       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
15414     */
15415 # include <GL/osmesa.h>
15416 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
15417 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
15418 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
15419 #   undef MESA_MINOR_VERSION
15420 #   define MESA_MINOR_VERSION 4 or newer, probably?
15421 #  endif
15422 # endif
15423 #endif
15424 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
15425 EOF
15426
15427          ac_save_CPPFLAGS="$CPPFLAGS"
15428          if test \! -z "$includedir" ; then
15429            CPPFLAGS="$CPPFLAGS -I$includedir"
15430          fi
15431          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15432
15433          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
15434
15435          # M4 sucks!!
15436
15437           mglv=`echo "$mglv" | sed -n \
15438              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
15439
15440
15441          rm -f conftest.$ac_ext
15442
15443          CPPFLAGS="$ac_save_CPPFLAGS"
15444
15445          if test "$mglv" = ""; then
15446            ac_mesagl_version=unknown
15447            ac_mesagl_version_string=unknown
15448          else
15449            ac_mesagl_version_string="$mglv"
15450            # M4 sucks!!
15451
15452            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
15453            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
15454
15455            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
15456            if test -z "$ac_mesagl_version"; then
15457              ac_mesagl_version=unknown
15458              ac_mesagl_version_string=unknown
15459            fi
15460          fi
15461          ac_cv_mesagl_version=$ac_mesagl_version
15462          ac_cv_mesagl_version_string=$ac_mesagl_version_string
15463
15464 fi
15465 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
15466 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
15467       ac_mesagl_version=$ac_cv_mesagl_version
15468       ac_mesagl_version_string=$ac_cv_mesagl_version_string
15469     fi
15470
15471
15472     # Check for OpenGL 1.1 features.
15473     #
15474
15475   ac_save_CPPFLAGS="$CPPFLAGS"
15476   ac_save_LDFLAGS="$LDFLAGS"
15477 #  ac_save_LIBS="$LIBS"
15478
15479   if test \! -z "$includedir" ; then
15480     CPPFLAGS="$CPPFLAGS -I$includedir"
15481   fi
15482   # note: $X_CFLAGS includes $x_includes
15483   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15484
15485   if test \! -z "$libdir" ; then
15486     LDFLAGS="$LDFLAGS -L$libdir"
15487   fi
15488   # note: $X_LIBS includes $x_libraries
15489   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15490
15491   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
15492 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
15493 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
15494 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15495   echo $ECHO_N "(cached) $ECHO_C" >&6
15496 else
15497   ac_check_lib_save_LIBS=$LIBS
15498 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
15499 cat >conftest.$ac_ext <<_ACEOF
15500 #line $LINENO "configure"
15501 /* confdefs.h.  */
15502 _ACEOF
15503 cat confdefs.h >>conftest.$ac_ext
15504 cat >>conftest.$ac_ext <<_ACEOF
15505 /* end confdefs.h.  */
15506
15507 /* Override any gcc2 internal prototype to avoid an error.  */
15508 #ifdef __cplusplus
15509 extern "C"
15510 #endif
15511 /* We use char because int might match the return type of a gcc2
15512    builtin and then its argument prototype would still apply.  */
15513 char glBindTexture ();
15514 int
15515 main ()
15516 {
15517 glBindTexture ();
15518   ;
15519   return 0;
15520 }
15521 _ACEOF
15522 rm -f conftest.$ac_objext conftest$ac_exeext
15523 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15524   (eval $ac_link) 2>&5
15525   ac_status=$?
15526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15527   (exit $ac_status); } &&
15528          { ac_try='test -s conftest$ac_exeext'
15529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15530   (eval $ac_try) 2>&5
15531   ac_status=$?
15532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15533   (exit $ac_status); }; }; then
15534   eval "$as_ac_Lib=yes"
15535 else
15536   echo "$as_me: failed program was:" >&5
15537 sed 's/^/| /' conftest.$ac_ext >&5
15538
15539 eval "$as_ac_Lib=no"
15540 fi
15541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15542 LIBS=$ac_check_lib_save_LIBS
15543 fi
15544 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15545 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15546 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15547   cat >>confdefs.h <<\_ACEOF
15548 #define HAVE_GLBINDTEXTURE 1
15549 _ACEOF
15550
15551 else
15552   true
15553 fi
15554
15555   CPPFLAGS="$ac_save_CPPFLAGS"
15556   LDFLAGS="$ac_save_LDFLAGS"
15557 #  LIBS="$ac_save_LIBS"
15558
15559   fi
15560
15561 elif test "$with_gl" != no; then
15562   echo "error: must be yes or no: --with-gl=$with_gl"
15563   exit 1
15564 fi
15565
15566
15567 ###############################################################################
15568 #
15569 #       Check for -lgle.
15570 #
15571 ###############################################################################
15572
15573 have_gle=no
15574 with_gle_req=unspecified
15575 gle_halfassed=no
15576
15577 # Check whether --with-gle or --without-gle was given.
15578 if test "${with_gle+set}" = set; then
15579   withval="$with_gle"
15580   with_gle="$withval"; with_gle_req="$withval"
15581 else
15582   with_gle=yes
15583 fi;
15584
15585
15586    case "$with_gle" in
15587     yes) ;;
15588     no)  ;;
15589
15590     /*)
15591      echo "$as_me:$LINENO: checking for GLE headers" >&5
15592 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
15593      d=$with_gle/include
15594      if test -d $d; then
15595        X_CFLAGS="-I$d $X_CFLAGS"
15596        echo "$as_me:$LINENO: result: $d" >&5
15597 echo "${ECHO_T}$d" >&6
15598      else
15599        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15600 echo "${ECHO_T}not found ($d: no such directory)" >&6
15601      fi
15602
15603      echo "$as_me:$LINENO: checking for GLE libs" >&5
15604 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
15605      d=$with_gle/lib
15606      if test -d $d; then
15607        X_LIBS="-L$d $X_LIBS"
15608        echo "$as_me:$LINENO: result: $d" >&5
15609 echo "${ECHO_T}$d" >&6
15610      else
15611        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15612 echo "${ECHO_T}not found ($d: no such directory)" >&6
15613      fi
15614
15615      # replace the directory string with "yes".
15616      with_gle_req="yes"
15617      with_gle=$with_gle_req
15618      ;;
15619
15620     *)
15621      echo ""
15622      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
15623      echo "       If it is a directory, then \`DIR/include' will be added to"
15624      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15625      exit 1
15626      ;;
15627    esac
15628
15629
15630 GLE_LIBS=""
15631
15632 if test "$have_gl" = no ; then
15633  true
15634 elif test "$with_gle" = yes; then
15635
15636
15637   ac_save_CPPFLAGS="$CPPFLAGS"
15638   if test \! -z "$includedir" ; then
15639     CPPFLAGS="$CPPFLAGS -I$includedir"
15640   fi
15641   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15642   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
15643 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
15644 if test "${ac_cv_header_GL_gle_h+set}" = set; then
15645   echo $ECHO_N "(cached) $ECHO_C" >&6
15646 else
15647   cat >conftest.$ac_ext <<_ACEOF
15648 #line $LINENO "configure"
15649 /* confdefs.h.  */
15650 _ACEOF
15651 cat confdefs.h >>conftest.$ac_ext
15652 cat >>conftest.$ac_ext <<_ACEOF
15653 /* end confdefs.h.  */
15654 #include <GL/gl.h>
15655
15656 #include <GL/gle.h>
15657 _ACEOF
15658 rm -f conftest.$ac_objext
15659 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15660   (eval $ac_compile) 2>&5
15661   ac_status=$?
15662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15663   (exit $ac_status); } &&
15664          { ac_try='test -s conftest.$ac_objext'
15665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15666   (eval $ac_try) 2>&5
15667   ac_status=$?
15668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15669   (exit $ac_status); }; }; then
15670   ac_cv_header_GL_gle_h=yes
15671 else
15672   echo "$as_me: failed program was:" >&5
15673 sed 's/^/| /' conftest.$ac_ext >&5
15674
15675 ac_cv_header_GL_gle_h=no
15676 fi
15677 rm -f conftest.$ac_objext conftest.$ac_ext
15678 fi
15679 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
15680 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
15681 if test $ac_cv_header_GL_gle_h = yes; then
15682   have_gle3=yes
15683 else
15684   have_gle3=no
15685 fi
15686
15687
15688   CPPFLAGS="$ac_save_CPPFLAGS"
15689   if test "$have_gle3" = yes ; then
15690     have_gle=yes;
15691   else
15692
15693   ac_save_CPPFLAGS="$CPPFLAGS"
15694   if test \! -z "$includedir" ; then
15695     CPPFLAGS="$CPPFLAGS -I$includedir"
15696   fi
15697   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15698   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
15699 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
15700 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
15701   echo $ECHO_N "(cached) $ECHO_C" >&6
15702 else
15703   cat >conftest.$ac_ext <<_ACEOF
15704 #line $LINENO "configure"
15705 /* confdefs.h.  */
15706 _ACEOF
15707 cat confdefs.h >>conftest.$ac_ext
15708 cat >>conftest.$ac_ext <<_ACEOF
15709 /* end confdefs.h.  */
15710 #include <GL/gl.h>
15711
15712 #include <GL/gutil.h>
15713 _ACEOF
15714 rm -f conftest.$ac_objext
15715 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15716   (eval $ac_compile) 2>&5
15717   ac_status=$?
15718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15719   (exit $ac_status); } &&
15720          { ac_try='test -s conftest.$ac_objext'
15721   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15722   (eval $ac_try) 2>&5
15723   ac_status=$?
15724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15725   (exit $ac_status); }; }; then
15726   ac_cv_header_GL_gutil_h=yes
15727 else
15728   echo "$as_me: failed program was:" >&5
15729 sed 's/^/| /' conftest.$ac_ext >&5
15730
15731 ac_cv_header_GL_gutil_h=no
15732 fi
15733 rm -f conftest.$ac_objext conftest.$ac_ext
15734 fi
15735 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
15736 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
15737 if test $ac_cv_header_GL_gutil_h = yes; then
15738   have_gle=yes
15739 else
15740   have_gle=no
15741 fi
15742
15743
15744   CPPFLAGS="$ac_save_CPPFLAGS"
15745     if test "$have_gle" = yes ; then
15746
15747   ac_save_CPPFLAGS="$CPPFLAGS"
15748   if test \! -z "$includedir" ; then
15749     CPPFLAGS="$CPPFLAGS -I$includedir"
15750   fi
15751   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15752   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
15753 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
15754 if test "${ac_cv_header_GL_tube_h+set}" = set; then
15755   echo $ECHO_N "(cached) $ECHO_C" >&6
15756 else
15757   cat >conftest.$ac_ext <<_ACEOF
15758 #line $LINENO "configure"
15759 /* confdefs.h.  */
15760 _ACEOF
15761 cat confdefs.h >>conftest.$ac_ext
15762 cat >>conftest.$ac_ext <<_ACEOF
15763 /* end confdefs.h.  */
15764 #include <GL/gl.h>
15765
15766 #include <GL/tube.h>
15767 _ACEOF
15768 rm -f conftest.$ac_objext
15769 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15770   (eval $ac_compile) 2>&5
15771   ac_status=$?
15772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15773   (exit $ac_status); } &&
15774          { ac_try='test -s conftest.$ac_objext'
15775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15776   (eval $ac_try) 2>&5
15777   ac_status=$?
15778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15779   (exit $ac_status); }; }; then
15780   ac_cv_header_GL_tube_h=yes
15781 else
15782   echo "$as_me: failed program was:" >&5
15783 sed 's/^/| /' conftest.$ac_ext >&5
15784
15785 ac_cv_header_GL_tube_h=no
15786 fi
15787 rm -f conftest.$ac_objext conftest.$ac_ext
15788 fi
15789 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
15790 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
15791 if test $ac_cv_header_GL_tube_h = yes; then
15792   have_gle=yes
15793 else
15794   have_gle=no
15795 fi
15796
15797
15798   CPPFLAGS="$ac_save_CPPFLAGS"
15799     fi
15800   fi
15801
15802   if test "$have_gle" = yes ; then
15803     have_gle=no
15804     gle_halfassed=yes
15805
15806   ac_save_CPPFLAGS="$CPPFLAGS"
15807   ac_save_LDFLAGS="$LDFLAGS"
15808 #  ac_save_LIBS="$LIBS"
15809
15810   if test \! -z "$includedir" ; then
15811     CPPFLAGS="$CPPFLAGS -I$includedir"
15812   fi
15813   # note: $X_CFLAGS includes $x_includes
15814   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15815
15816   if test \! -z "$libdir" ; then
15817     LDFLAGS="$LDFLAGS -L$libdir"
15818   fi
15819   # note: $X_LIBS includes $x_libraries
15820   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15821
15822   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
15823 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
15824 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
15825   echo $ECHO_N "(cached) $ECHO_C" >&6
15826 else
15827   ac_check_lib_save_LIBS=$LIBS
15828 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
15829 cat >conftest.$ac_ext <<_ACEOF
15830 #line $LINENO "configure"
15831 /* confdefs.h.  */
15832 _ACEOF
15833 cat confdefs.h >>conftest.$ac_ext
15834 cat >>conftest.$ac_ext <<_ACEOF
15835 /* end confdefs.h.  */
15836
15837 /* Override any gcc2 internal prototype to avoid an error.  */
15838 #ifdef __cplusplus
15839 extern "C"
15840 #endif
15841 /* We use char because int might match the return type of a gcc2
15842    builtin and then its argument prototype would still apply.  */
15843 char gleCreateGC ();
15844 int
15845 main ()
15846 {
15847 gleCreateGC ();
15848   ;
15849   return 0;
15850 }
15851 _ACEOF
15852 rm -f conftest.$ac_objext conftest$ac_exeext
15853 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15854   (eval $ac_link) 2>&5
15855   ac_status=$?
15856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15857   (exit $ac_status); } &&
15858          { ac_try='test -s conftest$ac_exeext'
15859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15860   (eval $ac_try) 2>&5
15861   ac_status=$?
15862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15863   (exit $ac_status); }; }; then
15864   ac_cv_lib_gle_gleCreateGC=yes
15865 else
15866   echo "$as_me: failed program was:" >&5
15867 sed 's/^/| /' conftest.$ac_ext >&5
15868
15869 ac_cv_lib_gle_gleCreateGC=no
15870 fi
15871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15872 LIBS=$ac_check_lib_save_LIBS
15873 fi
15874 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
15875 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
15876 if test $ac_cv_lib_gle_gleCreateGC = yes; then
15877   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
15878 fi
15879
15880   CPPFLAGS="$ac_save_CPPFLAGS"
15881   LDFLAGS="$ac_save_LDFLAGS"
15882 #  LIBS="$ac_save_LIBS"
15883
15884   fi
15885   if test "$have_gle" = yes ; then
15886     have_gle=no
15887     gle_halfassed=yes
15888
15889     # sometimes the libmatrix stuff is included in libgle.  look there first.
15890 #
15891 # I don't get it.  For some reason, this test passes on SGI, as if
15892 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
15893 # Yet the link is succeeding.  Why???
15894 #
15895 #    AC_CHECK_X_LIB(gle, uview_direction_d,
15896 #                   [have_gle=yes; gle_halfassed=no],
15897 #                   [], $GL_LIBS -lX11 -lXext -lm)
15898
15899     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
15900     # *sigh*
15901     if test "$have_gle3" = yes ; then
15902
15903   ac_save_CPPFLAGS="$CPPFLAGS"
15904   ac_save_LDFLAGS="$LDFLAGS"
15905 #  ac_save_LIBS="$LIBS"
15906
15907   if test \! -z "$includedir" ; then
15908     CPPFLAGS="$CPPFLAGS -I$includedir"
15909   fi
15910   # note: $X_CFLAGS includes $x_includes
15911   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15912
15913   if test \! -z "$libdir" ; then
15914     LDFLAGS="$LDFLAGS -L$libdir"
15915   fi
15916   # note: $X_LIBS includes $x_libraries
15917   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15918
15919   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
15920 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
15921 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
15922   echo $ECHO_N "(cached) $ECHO_C" >&6
15923 else
15924   ac_check_lib_save_LIBS=$LIBS
15925 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
15926 cat >conftest.$ac_ext <<_ACEOF
15927 #line $LINENO "configure"
15928 /* confdefs.h.  */
15929 _ACEOF
15930 cat confdefs.h >>conftest.$ac_ext
15931 cat >>conftest.$ac_ext <<_ACEOF
15932 /* end confdefs.h.  */
15933
15934 /* Override any gcc2 internal prototype to avoid an error.  */
15935 #ifdef __cplusplus
15936 extern "C"
15937 #endif
15938 /* We use char because int might match the return type of a gcc2
15939    builtin and then its argument prototype would still apply.  */
15940 char uview_direction ();
15941 int
15942 main ()
15943 {
15944 uview_direction ();
15945   ;
15946   return 0;
15947 }
15948 _ACEOF
15949 rm -f conftest.$ac_objext conftest$ac_exeext
15950 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15951   (eval $ac_link) 2>&5
15952   ac_status=$?
15953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15954   (exit $ac_status); } &&
15955          { ac_try='test -s conftest$ac_exeext'
15956   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15957   (eval $ac_try) 2>&5
15958   ac_status=$?
15959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15960   (exit $ac_status); }; }; then
15961   ac_cv_lib_gle_uview_direction=yes
15962 else
15963   echo "$as_me: failed program was:" >&5
15964 sed 's/^/| /' conftest.$ac_ext >&5
15965
15966 ac_cv_lib_gle_uview_direction=no
15967 fi
15968 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15969 LIBS=$ac_check_lib_save_LIBS
15970 fi
15971 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
15972 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
15973 if test $ac_cv_lib_gle_uview_direction = yes; then
15974   have_gle=yes; gle_halfassed=no
15975 fi
15976
15977   CPPFLAGS="$ac_save_CPPFLAGS"
15978   LDFLAGS="$ac_save_LDFLAGS"
15979 #  LIBS="$ac_save_LIBS"
15980
15981     fi
15982     # if it wasn't in libgle, then look in libmatrix.
15983     if test "$have_gle" = no ; then
15984
15985   ac_save_CPPFLAGS="$CPPFLAGS"
15986   ac_save_LDFLAGS="$LDFLAGS"
15987 #  ac_save_LIBS="$LIBS"
15988
15989   if test \! -z "$includedir" ; then
15990     CPPFLAGS="$CPPFLAGS -I$includedir"
15991   fi
15992   # note: $X_CFLAGS includes $x_includes
15993   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15994
15995   if test \! -z "$libdir" ; then
15996     LDFLAGS="$LDFLAGS -L$libdir"
15997   fi
15998   # note: $X_LIBS includes $x_libraries
15999   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16000
16001   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
16002 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
16003 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
16004   echo $ECHO_N "(cached) $ECHO_C" >&6
16005 else
16006   ac_check_lib_save_LIBS=$LIBS
16007 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
16008 cat >conftest.$ac_ext <<_ACEOF
16009 #line $LINENO "configure"
16010 /* confdefs.h.  */
16011 _ACEOF
16012 cat confdefs.h >>conftest.$ac_ext
16013 cat >>conftest.$ac_ext <<_ACEOF
16014 /* end confdefs.h.  */
16015
16016 /* Override any gcc2 internal prototype to avoid an error.  */
16017 #ifdef __cplusplus
16018 extern "C"
16019 #endif
16020 /* We use char because int might match the return type of a gcc2
16021    builtin and then its argument prototype would still apply.  */
16022 char uview_direction_d ();
16023 int
16024 main ()
16025 {
16026 uview_direction_d ();
16027   ;
16028   return 0;
16029 }
16030 _ACEOF
16031 rm -f conftest.$ac_objext conftest$ac_exeext
16032 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16033   (eval $ac_link) 2>&5
16034   ac_status=$?
16035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16036   (exit $ac_status); } &&
16037          { ac_try='test -s conftest$ac_exeext'
16038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16039   (eval $ac_try) 2>&5
16040   ac_status=$?
16041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16042   (exit $ac_status); }; }; then
16043   ac_cv_lib_matrix_uview_direction_d=yes
16044 else
16045   echo "$as_me: failed program was:" >&5
16046 sed 's/^/| /' conftest.$ac_ext >&5
16047
16048 ac_cv_lib_matrix_uview_direction_d=no
16049 fi
16050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16051 LIBS=$ac_check_lib_save_LIBS
16052 fi
16053 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
16054 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
16055 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
16056   have_gle=yes; gle_halfassed=no;
16057                       GLE_LIBS="$GLE_LIBS -lmatrix"
16058 fi
16059
16060   CPPFLAGS="$ac_save_CPPFLAGS"
16061   LDFLAGS="$ac_save_LDFLAGS"
16062 #  LIBS="$ac_save_LIBS"
16063
16064     fi
16065   fi
16066
16067   if test "$have_gle" = yes ; then
16068     cat >>confdefs.h <<\_ACEOF
16069 #define HAVE_GLE 1
16070 _ACEOF
16071
16072     if test "$have_gle3" = yes ; then
16073       cat >>confdefs.h <<\_ACEOF
16074 #define HAVE_GLE3 1
16075 _ACEOF
16076
16077     fi
16078   fi
16079
16080 elif test "$with_gle" != no; then
16081   echo "error: must be yes or no: --with-gle=$with_gle"
16082   exit 1
16083
16084 fi
16085
16086
16087
16088 ###############################################################################
16089 #
16090 #       Check for -lXpm.
16091 #
16092 ###############################################################################
16093
16094 have_xpm=no
16095 with_xpm_req=unspecified
16096
16097 # Check whether --with-xpm or --without-xpm was given.
16098 if test "${with_xpm+set}" = set; then
16099   withval="$with_xpm"
16100   with_xpm="$withval"; with_xpm_req="$withval"
16101 else
16102   with_xpm=yes
16103 fi;
16104
16105
16106    case "$with_xpm" in
16107     yes) ;;
16108     no)  ;;
16109
16110     /*)
16111      echo "$as_me:$LINENO: checking for XPM headers" >&5
16112 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
16113      d=$with_xpm/include
16114      if test -d $d; then
16115        X_CFLAGS="-I$d $X_CFLAGS"
16116        echo "$as_me:$LINENO: result: $d" >&5
16117 echo "${ECHO_T}$d" >&6
16118      else
16119        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16120 echo "${ECHO_T}not found ($d: no such directory)" >&6
16121      fi
16122
16123      echo "$as_me:$LINENO: checking for XPM libs" >&5
16124 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
16125      d=$with_xpm/lib
16126      if test -d $d; then
16127        X_LIBS="-L$d $X_LIBS"
16128        echo "$as_me:$LINENO: result: $d" >&5
16129 echo "${ECHO_T}$d" >&6
16130      else
16131        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16132 echo "${ECHO_T}not found ($d: no such directory)" >&6
16133      fi
16134
16135      # replace the directory string with "yes".
16136      with_xpm_req="yes"
16137      with_xpm=$with_xpm_req
16138      ;;
16139
16140     *)
16141      echo ""
16142      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
16143      echo "       If it is a directory, then \`DIR/include' will be added to"
16144      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16145      exit 1
16146      ;;
16147    esac
16148
16149
16150 if test "$with_xpm" = yes; then
16151
16152   ac_save_CPPFLAGS="$CPPFLAGS"
16153   if test \! -z "$includedir" ; then
16154     CPPFLAGS="$CPPFLAGS -I$includedir"
16155   fi
16156   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16157   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
16158 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
16159 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
16160   echo $ECHO_N "(cached) $ECHO_C" >&6
16161 else
16162   cat >conftest.$ac_ext <<_ACEOF
16163 #line $LINENO "configure"
16164 /* confdefs.h.  */
16165 _ACEOF
16166 cat confdefs.h >>conftest.$ac_ext
16167 cat >>conftest.$ac_ext <<_ACEOF
16168 /* end confdefs.h.  */
16169 #include <X11/Xlib.h>
16170
16171 #include <X11/xpm.h>
16172 _ACEOF
16173 rm -f conftest.$ac_objext
16174 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16175   (eval $ac_compile) 2>&5
16176   ac_status=$?
16177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16178   (exit $ac_status); } &&
16179          { ac_try='test -s conftest.$ac_objext'
16180   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16181   (eval $ac_try) 2>&5
16182   ac_status=$?
16183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16184   (exit $ac_status); }; }; then
16185   ac_cv_header_X11_xpm_h=yes
16186 else
16187   echo "$as_me: failed program was:" >&5
16188 sed 's/^/| /' conftest.$ac_ext >&5
16189
16190 ac_cv_header_X11_xpm_h=no
16191 fi
16192 rm -f conftest.$ac_objext conftest.$ac_ext
16193 fi
16194 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
16195 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
16196 if test $ac_cv_header_X11_xpm_h = yes; then
16197   have_xpm=yes
16198                     cat >>confdefs.h <<\_ACEOF
16199 #define HAVE_XPM 1
16200 _ACEOF
16201
16202                     XPM_LIBS="-lXpm"
16203 fi
16204
16205
16206   CPPFLAGS="$ac_save_CPPFLAGS"
16207 elif test "$with_xpm" != no; then
16208   echo "error: must be yes or no: --with-xpm=$with_xpm"
16209   exit 1
16210 fi
16211
16212 # See comment near $motif_requires_xpm, above.
16213 # Need to do this here, after both Motif and XPM have been checked for.
16214 #
16215 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
16216   if test "$motif_requires_xpm" = yes ; then
16217     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
16218   fi
16219 fi
16220
16221 ###############################################################################
16222 #
16223 #       Check for -lgdk_pixbuf.
16224 #
16225 ###############################################################################
16226
16227 have_gdk_pixbuf=no
16228 with_gdk_pixbuf_req=unspecified
16229
16230 # Check whether --with-pixbuf or --without-pixbuf was given.
16231 if test "${with_pixbuf+set}" = set; then
16232   withval="$with_pixbuf"
16233   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
16234 else
16235   with_gdk_pixbuf=yes
16236 fi;
16237
16238 # if --with-pixbuf=/directory/ was specified, remember that directory so that
16239 # we can also look for the `gdk-pixbuf-config' program in that directory.
16240 case "$with_gdk_pixbuf" in
16241   /*)
16242     gdk_pixbuf_dir="$with_gdk_pixbuf"
16243     ;;
16244   *)
16245     gdk_pixbuf_dir=""
16246     ;;
16247 esac
16248
16249
16250    case "$with_gdk_pixbuf" in
16251     yes) ;;
16252     no)  ;;
16253
16254     /*)
16255      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
16256 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
16257      d=$with_gdk_pixbuf/include
16258      if test -d $d; then
16259        X_CFLAGS="-I$d $X_CFLAGS"
16260        echo "$as_me:$LINENO: result: $d" >&5
16261 echo "${ECHO_T}$d" >&6
16262      else
16263        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16264 echo "${ECHO_T}not found ($d: no such directory)" >&6
16265      fi
16266
16267      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
16268 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
16269      d=$with_gdk_pixbuf/lib
16270      if test -d $d; then
16271        X_LIBS="-L$d $X_LIBS"
16272        echo "$as_me:$LINENO: result: $d" >&5
16273 echo "${ECHO_T}$d" >&6
16274      else
16275        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16276 echo "${ECHO_T}not found ($d: no such directory)" >&6
16277      fi
16278
16279      # replace the directory string with "yes".
16280      with_gdk_pixbuf_req="yes"
16281      with_gdk_pixbuf=$with_gdk_pixbuf_req
16282      ;;
16283
16284     *)
16285      echo ""
16286      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
16287      echo "       If it is a directory, then \`DIR/include' will be added to"
16288      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16289      exit 1
16290      ;;
16291    esac
16292
16293
16294 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
16295   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
16296   exit 1
16297 fi
16298
16299 if test "$with_gdk_pixbuf" = yes; then
16300   have_gdk_pixbuf=no
16301   have_gdk_pixbuf2=no
16302
16303   if test -n "$pkg_config" ; then
16304     #
16305     # the new way...
16306     # run pkg-config based tests.
16307     #
16308     pkgs=''
16309     ok="yes"
16310
16311     # If we have Gtk 2.x, then *only* gdk-pixbuf 2.x will work.
16312     # If we have Gtk 1.x, then *only* gdk-pixbuf 1.x will work.
16313     # If we don't have Gtk at all, then either will work.
16314
16315     if test "$have_gtk" = no -o "$have_gtk2" = yes; then
16316       #
16317       # we don't have Gtk; or we have Gtk 2.x.  Check for pixbuf 2.x.
16318       #
16319       echo "$as_me:$LINENO: result: checking for gdk_pixbuf 2.x with gtk-config based tests..." >&5
16320 echo "${ECHO_T}checking for gdk_pixbuf 2.x with gtk-config based tests..." >&6
16321       pkg_check_version gdk-pixbuf-2.0      2.0.0
16322       pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
16323       have_gdk_pixbuf="$ok"
16324       have_gdk_pixbuf2="$ok"
16325     fi
16326
16327     if test "$have_gtk" = no -o "$have_gtk2" = no; then
16328       #
16329       # we don't have Gtk; or we have Gtk 1.x.
16330       # If we don't have pixbuf 2.x, then check for pixbuf 1.x.
16331       #
16332       if test "$have_gdk_pixbuf2" = no; then
16333         pkgs=''
16334         ok="yes"
16335       echo "$as_me:$LINENO: result: checking for gdk_pixbuf 1.x with gtk-config based tests..." >&5
16336 echo "${ECHO_T}checking for gdk_pixbuf 1.x with gtk-config based tests..." >&6
16337         pkg_check_version gdk_pixbuf      0.0
16338         pkg_check_version gdk_pixbuf_xlib 0.0
16339         have_gdk_pixbuf="$ok"
16340       fi
16341     fi
16342
16343     if test "$have_gdk_pixbuf" = yes; then
16344       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
16345 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
16346 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
16347   echo $ECHO_N "(cached) $ECHO_C" >&6
16348 else
16349   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
16350 fi
16351 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
16352 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
16353       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
16354 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
16355 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
16356   echo $ECHO_N "(cached) $ECHO_C" >&6
16357 else
16358   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
16359 fi
16360 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
16361 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
16362     fi
16363     ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
16364     ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
16365   fi
16366
16367
16368   if test "$have_gdk_pixbuf" = no; then
16369     #
16370     # the old way...
16371     # run gdk-pixbuf-config based tests.
16372     # note that we can't assume that the existence of "pkg-config" means
16373     # that we don't have to look for gdk-pixbuf-config -- in Gnome 1.4,
16374     # pkg-config exists, but doesn't know about pixbuf.
16375     #
16376
16377    echo "$as_me:$LINENO: result: checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&5
16378 echo "${ECHO_T}checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&6
16379
16380     # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
16381     # look in /foo/bin/ for for gdk-pixbuf-config.
16382     #
16383     gdk_pixbuf_path="$PATH"
16384
16385     if test ! -z "$gtk_dir"; then
16386       # canonicalize slashes.
16387       foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
16388       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
16389     fi
16390
16391     if test ! -z "$gnome_dir"; then
16392       # canonicalize slashes.
16393       foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
16394       gdk_pixbuf_path="$foo:$gdk_pixbuf_path"
16395     fi
16396
16397     for ac_prog in gdk-pixbuf-config
16398 do
16399   # Extract the first word of "$ac_prog", so it can be a program name with args.
16400 set dummy $ac_prog; ac_word=$2
16401 echo "$as_me:$LINENO: checking for $ac_word" >&5
16402 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16403 if test "${ac_cv_path_gdk_pixbuf_config+set}" = set; then
16404   echo $ECHO_N "(cached) $ECHO_C" >&6
16405 else
16406   case $gdk_pixbuf_config in
16407   [\\/]* | ?:[\\/]*)
16408   ac_cv_path_gdk_pixbuf_config="$gdk_pixbuf_config" # Let the user override the test with a path.
16409   ;;
16410   *)
16411   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16412 for as_dir in $gdk_pixbuf_path
16413 do
16414   IFS=$as_save_IFS
16415   test -z "$as_dir" && as_dir=.
16416   for ac_exec_ext in '' $ac_executable_extensions; do
16417   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16418     ac_cv_path_gdk_pixbuf_config="$as_dir/$ac_word$ac_exec_ext"
16419     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16420     break 2
16421   fi
16422 done
16423 done
16424
16425   ;;
16426 esac
16427 fi
16428 gdk_pixbuf_config=$ac_cv_path_gdk_pixbuf_config
16429
16430 if test -n "$gdk_pixbuf_config"; then
16431   echo "$as_me:$LINENO: result: $gdk_pixbuf_config" >&5
16432 echo "${ECHO_T}$gdk_pixbuf_config" >&6
16433 else
16434   echo "$as_me:$LINENO: result: no" >&5
16435 echo "${ECHO_T}no" >&6
16436 fi
16437
16438   test -n "$gdk_pixbuf_config" && break
16439 done
16440
16441
16442     # If we found the gdk-pixbuf-config program, run it to get flags.
16443     #
16444     if test -n "$gdk_pixbuf_config" ; then
16445       echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
16446 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
16447 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
16448   echo $ECHO_N "(cached) $ECHO_C" >&6
16449 else
16450   ac_cv_gdk_pixbuf_config_cflags=`$gdk_pixbuf_config --cflags`
16451 fi
16452 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
16453 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
16454       echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
16455 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
16456 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
16457   echo $ECHO_N "(cached) $ECHO_C" >&6
16458 else
16459   ac_cv_gdk_pixbuf_config_libs=`$gdk_pixbuf_config --libs`
16460 fi
16461 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
16462 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
16463
16464       # note that "gdk-pixbuf-config --libs" produces a link line including
16465       # -lgdk_pixbuf, but there's no way to get it to produce one that also
16466       # includes -lgdk_pixbuf_xlib.  Since we don't know *exactly* what the
16467       # name of the library will be, construct it with sed...
16468       # M4 sucks!!
16469
16470       ac_cv_gdk_pixbuf_config_libs=`echo $ac_cv_gdk_pixbuf_config_libs | \
16471        sed 's@ \(-lgdk_pixbuf\([-_a-zA-Z0-9.]*\)\) @ \1 -lgdk_pixbuf_xlib\2 @'`
16472
16473
16474       ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
16475       ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
16476     fi
16477   fi
16478
16479   ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
16480   CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
16481
16482   if test "$have_gdk_pixbuf" = no; then
16483     #
16484     # we appear to have pixbuf; check for headers/libs to be sure.
16485     #
16486
16487     have_gdk_pixbuf=no
16488
16489     # check for header A...
16490
16491   ac_save_CPPFLAGS="$CPPFLAGS"
16492   if test \! -z "$includedir" ; then
16493     CPPFLAGS="$CPPFLAGS -I$includedir"
16494   fi
16495   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16496   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
16497   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
16498 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
16499 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
16500   echo $ECHO_N "(cached) $ECHO_C" >&6
16501 fi
16502 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
16503 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
16504 else
16505   # Is the header compilable?
16506 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
16507 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
16508 cat >conftest.$ac_ext <<_ACEOF
16509 #line $LINENO "configure"
16510 /* confdefs.h.  */
16511 _ACEOF
16512 cat confdefs.h >>conftest.$ac_ext
16513 cat >>conftest.$ac_ext <<_ACEOF
16514 /* end confdefs.h.  */
16515 $ac_includes_default
16516 #include <gdk-pixbuf/gdk-pixbuf.h>
16517 _ACEOF
16518 rm -f conftest.$ac_objext
16519 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16520   (eval $ac_compile) 2>&5
16521   ac_status=$?
16522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16523   (exit $ac_status); } &&
16524          { ac_try='test -s conftest.$ac_objext'
16525   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16526   (eval $ac_try) 2>&5
16527   ac_status=$?
16528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16529   (exit $ac_status); }; }; then
16530   ac_header_compiler=yes
16531 else
16532   echo "$as_me: failed program was:" >&5
16533 sed 's/^/| /' conftest.$ac_ext >&5
16534
16535 ac_header_compiler=no
16536 fi
16537 rm -f conftest.$ac_objext conftest.$ac_ext
16538 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16539 echo "${ECHO_T}$ac_header_compiler" >&6
16540
16541 # Is the header present?
16542 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
16543 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
16544 cat >conftest.$ac_ext <<_ACEOF
16545 #line $LINENO "configure"
16546 /* confdefs.h.  */
16547 _ACEOF
16548 cat confdefs.h >>conftest.$ac_ext
16549 cat >>conftest.$ac_ext <<_ACEOF
16550 /* end confdefs.h.  */
16551 #include <gdk-pixbuf/gdk-pixbuf.h>
16552 _ACEOF
16553 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16554   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16555   ac_status=$?
16556   grep -v '^ *+' conftest.er1 >conftest.err
16557   rm -f conftest.er1
16558   cat conftest.err >&5
16559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16560   (exit $ac_status); } >/dev/null; then
16561   if test -s conftest.err; then
16562     ac_cpp_err=$ac_c_preproc_warn_flag
16563   else
16564     ac_cpp_err=
16565   fi
16566 else
16567   ac_cpp_err=yes
16568 fi
16569 if test -z "$ac_cpp_err"; then
16570   ac_header_preproc=yes
16571 else
16572   echo "$as_me: failed program was:" >&5
16573 sed 's/^/| /' conftest.$ac_ext >&5
16574
16575   ac_header_preproc=no
16576 fi
16577 rm -f conftest.err conftest.$ac_ext
16578 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16579 echo "${ECHO_T}$ac_header_preproc" >&6
16580
16581 # So?  What about this header?
16582 case $ac_header_compiler:$ac_header_preproc in
16583   yes:no )
16584     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
16585 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16586     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
16587 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
16588     (
16589       cat <<\_ASBOX
16590 ## ------------------------------------ ##
16591 ## Report this to bug-autoconf@gnu.org. ##
16592 ## ------------------------------------ ##
16593 _ASBOX
16594     ) |
16595       sed "s/^/$as_me: WARNING:     /" >&2
16596     ;;
16597   no:yes )
16598     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
16599 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
16600     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&5
16601 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&2;}
16602     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
16603 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
16604     (
16605       cat <<\_ASBOX
16606 ## ------------------------------------ ##
16607 ## Report this to bug-autoconf@gnu.org. ##
16608 ## ------------------------------------ ##
16609 _ASBOX
16610     ) |
16611       sed "s/^/$as_me: WARNING:     /" >&2
16612     ;;
16613 esac
16614 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
16615 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
16616 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
16617   echo $ECHO_N "(cached) $ECHO_C" >&6
16618 else
16619   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
16620 fi
16621 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
16622 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
16623
16624 fi
16625 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
16626   have_gdk_pixbuf=yes
16627 fi
16628
16629
16630   CPPFLAGS="$ac_save_CPPFLAGS"
16631
16632     # if that worked, check for header B...
16633     if test "$have_gdk_pixbuf" = yes; then
16634       have_gdk_pixbuf=no
16635       gdk_pixbuf_halfassed=yes
16636
16637   ac_save_CPPFLAGS="$CPPFLAGS"
16638   if test \! -z "$includedir" ; then
16639     CPPFLAGS="$CPPFLAGS -I$includedir"
16640   fi
16641   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16642   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16643   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
16644 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16645 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16646   echo $ECHO_N "(cached) $ECHO_C" >&6
16647 fi
16648 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
16649 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
16650 else
16651   # Is the header compilable?
16652 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
16653 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
16654 cat >conftest.$ac_ext <<_ACEOF
16655 #line $LINENO "configure"
16656 /* confdefs.h.  */
16657 _ACEOF
16658 cat confdefs.h >>conftest.$ac_ext
16659 cat >>conftest.$ac_ext <<_ACEOF
16660 /* end confdefs.h.  */
16661 $ac_includes_default
16662 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
16663 _ACEOF
16664 rm -f conftest.$ac_objext
16665 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16666   (eval $ac_compile) 2>&5
16667   ac_status=$?
16668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16669   (exit $ac_status); } &&
16670          { ac_try='test -s conftest.$ac_objext'
16671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16672   (eval $ac_try) 2>&5
16673   ac_status=$?
16674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16675   (exit $ac_status); }; }; then
16676   ac_header_compiler=yes
16677 else
16678   echo "$as_me: failed program was:" >&5
16679 sed 's/^/| /' conftest.$ac_ext >&5
16680
16681 ac_header_compiler=no
16682 fi
16683 rm -f conftest.$ac_objext conftest.$ac_ext
16684 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16685 echo "${ECHO_T}$ac_header_compiler" >&6
16686
16687 # Is the header present?
16688 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
16689 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
16690 cat >conftest.$ac_ext <<_ACEOF
16691 #line $LINENO "configure"
16692 /* confdefs.h.  */
16693 _ACEOF
16694 cat confdefs.h >>conftest.$ac_ext
16695 cat >>conftest.$ac_ext <<_ACEOF
16696 /* end confdefs.h.  */
16697 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
16698 _ACEOF
16699 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16700   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16701   ac_status=$?
16702   grep -v '^ *+' conftest.er1 >conftest.err
16703   rm -f conftest.er1
16704   cat conftest.err >&5
16705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16706   (exit $ac_status); } >/dev/null; then
16707   if test -s conftest.err; then
16708     ac_cpp_err=$ac_c_preproc_warn_flag
16709   else
16710     ac_cpp_err=
16711   fi
16712 else
16713   ac_cpp_err=yes
16714 fi
16715 if test -z "$ac_cpp_err"; then
16716   ac_header_preproc=yes
16717 else
16718   echo "$as_me: failed program was:" >&5
16719 sed 's/^/| /' conftest.$ac_ext >&5
16720
16721   ac_header_preproc=no
16722 fi
16723 rm -f conftest.err conftest.$ac_ext
16724 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16725 echo "${ECHO_T}$ac_header_preproc" >&6
16726
16727 # So?  What about this header?
16728 case $ac_header_compiler:$ac_header_preproc in
16729   yes:no )
16730     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16731 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16732     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16733 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
16734     (
16735       cat <<\_ASBOX
16736 ## ------------------------------------ ##
16737 ## Report this to bug-autoconf@gnu.org. ##
16738 ## ------------------------------------ ##
16739 _ASBOX
16740     ) |
16741       sed "s/^/$as_me: WARNING:     /" >&2
16742     ;;
16743   no:yes )
16744     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
16745 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
16746     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
16747 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
16748     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16749 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
16750     (
16751       cat <<\_ASBOX
16752 ## ------------------------------------ ##
16753 ## Report this to bug-autoconf@gnu.org. ##
16754 ## ------------------------------------ ##
16755 _ASBOX
16756     ) |
16757       sed "s/^/$as_me: WARNING:     /" >&2
16758     ;;
16759 esac
16760 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
16761 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16762 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16763   echo $ECHO_N "(cached) $ECHO_C" >&6
16764 else
16765   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
16766 fi
16767 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
16768 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
16769
16770 fi
16771 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
16772   have_gdk_pixbuf=yes
16773                          gdk_pixbuf_halfassed=no
16774 fi
16775
16776
16777   CPPFLAGS="$ac_save_CPPFLAGS"
16778
16779       # yay, it has a new name in Gtk 2.x...
16780       if test "$have_gdk_pixbuf" = no; then
16781         have_gdk_pixbuf=no
16782         gdk_pixbuf_halfassed=yes
16783
16784   ac_save_CPPFLAGS="$CPPFLAGS"
16785   if test \! -z "$includedir" ; then
16786     CPPFLAGS="$CPPFLAGS -I$includedir"
16787   fi
16788   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16789   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16790   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
16791 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16792 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16793   echo $ECHO_N "(cached) $ECHO_C" >&6
16794 fi
16795 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
16796 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
16797 else
16798   # Is the header compilable?
16799 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
16800 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
16801 cat >conftest.$ac_ext <<_ACEOF
16802 #line $LINENO "configure"
16803 /* confdefs.h.  */
16804 _ACEOF
16805 cat confdefs.h >>conftest.$ac_ext
16806 cat >>conftest.$ac_ext <<_ACEOF
16807 /* end confdefs.h.  */
16808 $ac_includes_default
16809 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
16810 _ACEOF
16811 rm -f conftest.$ac_objext
16812 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16813   (eval $ac_compile) 2>&5
16814   ac_status=$?
16815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16816   (exit $ac_status); } &&
16817          { ac_try='test -s conftest.$ac_objext'
16818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16819   (eval $ac_try) 2>&5
16820   ac_status=$?
16821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16822   (exit $ac_status); }; }; then
16823   ac_header_compiler=yes
16824 else
16825   echo "$as_me: failed program was:" >&5
16826 sed 's/^/| /' conftest.$ac_ext >&5
16827
16828 ac_header_compiler=no
16829 fi
16830 rm -f conftest.$ac_objext conftest.$ac_ext
16831 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16832 echo "${ECHO_T}$ac_header_compiler" >&6
16833
16834 # Is the header present?
16835 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
16836 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
16837 cat >conftest.$ac_ext <<_ACEOF
16838 #line $LINENO "configure"
16839 /* confdefs.h.  */
16840 _ACEOF
16841 cat confdefs.h >>conftest.$ac_ext
16842 cat >>conftest.$ac_ext <<_ACEOF
16843 /* end confdefs.h.  */
16844 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
16845 _ACEOF
16846 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16847   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16848   ac_status=$?
16849   grep -v '^ *+' conftest.er1 >conftest.err
16850   rm -f conftest.er1
16851   cat conftest.err >&5
16852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16853   (exit $ac_status); } >/dev/null; then
16854   if test -s conftest.err; then
16855     ac_cpp_err=$ac_c_preproc_warn_flag
16856   else
16857     ac_cpp_err=
16858   fi
16859 else
16860   ac_cpp_err=yes
16861 fi
16862 if test -z "$ac_cpp_err"; then
16863   ac_header_preproc=yes
16864 else
16865   echo "$as_me: failed program was:" >&5
16866 sed 's/^/| /' conftest.$ac_ext >&5
16867
16868   ac_header_preproc=no
16869 fi
16870 rm -f conftest.err conftest.$ac_ext
16871 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16872 echo "${ECHO_T}$ac_header_preproc" >&6
16873
16874 # So?  What about this header?
16875 case $ac_header_compiler:$ac_header_preproc in
16876   yes:no )
16877     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
16878 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16879     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16880 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
16881     (
16882       cat <<\_ASBOX
16883 ## ------------------------------------ ##
16884 ## Report this to bug-autoconf@gnu.org. ##
16885 ## ------------------------------------ ##
16886 _ASBOX
16887     ) |
16888       sed "s/^/$as_me: WARNING:     /" >&2
16889     ;;
16890   no:yes )
16891     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
16892 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
16893     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&5
16894 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: check for missing prerequisite headers?" >&2;}
16895     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
16896 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
16897     (
16898       cat <<\_ASBOX
16899 ## ------------------------------------ ##
16900 ## Report this to bug-autoconf@gnu.org. ##
16901 ## ------------------------------------ ##
16902 _ASBOX
16903     ) |
16904       sed "s/^/$as_me: WARNING:     /" >&2
16905     ;;
16906 esac
16907 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
16908 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16909 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
16910   echo $ECHO_N "(cached) $ECHO_C" >&6
16911 else
16912   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
16913 fi
16914 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
16915 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
16916
16917 fi
16918 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
16919   have_gdk_pixbuf=yes
16920                            gdk_pixbuf_halfassed=no
16921 fi
16922
16923
16924   CPPFLAGS="$ac_save_CPPFLAGS"
16925       fi
16926     fi
16927   fi
16928
16929   CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
16930
16931   if test "$have_gdk_pixbuf" = yes; then
16932     # we have the headers, now check for the libraries
16933     have_gdk_pixbuf=no
16934     gdk_pixbuf_halfassed=yes
16935
16936     # library A...
16937
16938   ac_save_CPPFLAGS="$CPPFLAGS"
16939   ac_save_LDFLAGS="$LDFLAGS"
16940 #  ac_save_LIBS="$LIBS"
16941
16942   if test \! -z "$includedir" ; then
16943     CPPFLAGS="$CPPFLAGS -I$includedir"
16944   fi
16945   # note: $X_CFLAGS includes $x_includes
16946   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16947
16948   if test \! -z "$libdir" ; then
16949     LDFLAGS="$LDFLAGS -L$libdir"
16950   fi
16951   # note: $X_LIBS includes $x_libraries
16952   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16953
16954   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
16955 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
16956 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
16957   echo $ECHO_N "(cached) $ECHO_C" >&6
16958 else
16959   ac_check_lib_save_LIBS=$LIBS
16960 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
16961 cat >conftest.$ac_ext <<_ACEOF
16962 #line $LINENO "configure"
16963 /* confdefs.h.  */
16964 _ACEOF
16965 cat confdefs.h >>conftest.$ac_ext
16966 cat >>conftest.$ac_ext <<_ACEOF
16967 /* end confdefs.h.  */
16968
16969 /* Override any gcc2 internal prototype to avoid an error.  */
16970 #ifdef __cplusplus
16971 extern "C"
16972 #endif
16973 /* We use char because int might match the return type of a gcc2
16974    builtin and then its argument prototype would still apply.  */
16975 char gdk_pixbuf_new_from_file ();
16976 int
16977 main ()
16978 {
16979 gdk_pixbuf_new_from_file ();
16980   ;
16981   return 0;
16982 }
16983 _ACEOF
16984 rm -f conftest.$ac_objext conftest$ac_exeext
16985 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16986   (eval $ac_link) 2>&5
16987   ac_status=$?
16988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16989   (exit $ac_status); } &&
16990          { ac_try='test -s conftest$ac_exeext'
16991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16992   (eval $ac_try) 2>&5
16993   ac_status=$?
16994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16995   (exit $ac_status); }; }; then
16996   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
16997 else
16998   echo "$as_me: failed program was:" >&5
16999 sed 's/^/| /' conftest.$ac_ext >&5
17000
17001 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
17002 fi
17003 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17004 LIBS=$ac_check_lib_save_LIBS
17005 fi
17006 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
17007 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
17008 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
17009   have_gdk_pixbuf=yes
17010 fi
17011
17012   CPPFLAGS="$ac_save_CPPFLAGS"
17013   LDFLAGS="$ac_save_LDFLAGS"
17014 #  LIBS="$ac_save_LIBS"
17015
17016     # library B...
17017     if test "$have_gdk_pixbuf" = yes; then
17018       have_gdk_pixbuf=no
17019
17020   ac_save_CPPFLAGS="$CPPFLAGS"
17021   ac_save_LDFLAGS="$LDFLAGS"
17022 #  ac_save_LIBS="$LIBS"
17023
17024   if test \! -z "$includedir" ; then
17025     CPPFLAGS="$CPPFLAGS -I$includedir"
17026   fi
17027   # note: $X_CFLAGS includes $x_includes
17028   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17029
17030   if test \! -z "$libdir" ; then
17031     LDFLAGS="$LDFLAGS -L$libdir"
17032   fi
17033   # note: $X_LIBS includes $x_libraries
17034   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17035
17036   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
17037 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
17038 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
17039   echo $ECHO_N "(cached) $ECHO_C" >&6
17040 else
17041   ac_check_lib_save_LIBS=$LIBS
17042 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17043 cat >conftest.$ac_ext <<_ACEOF
17044 #line $LINENO "configure"
17045 /* confdefs.h.  */
17046 _ACEOF
17047 cat confdefs.h >>conftest.$ac_ext
17048 cat >>conftest.$ac_ext <<_ACEOF
17049 /* end confdefs.h.  */
17050
17051 /* Override any gcc2 internal prototype to avoid an error.  */
17052 #ifdef __cplusplus
17053 extern "C"
17054 #endif
17055 /* We use char because int might match the return type of a gcc2
17056    builtin and then its argument prototype would still apply.  */
17057 char gdk_pixbuf_xlib_init ();
17058 int
17059 main ()
17060 {
17061 gdk_pixbuf_xlib_init ();
17062   ;
17063   return 0;
17064 }
17065 _ACEOF
17066 rm -f conftest.$ac_objext conftest$ac_exeext
17067 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17068   (eval $ac_link) 2>&5
17069   ac_status=$?
17070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17071   (exit $ac_status); } &&
17072          { ac_try='test -s conftest$ac_exeext'
17073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17074   (eval $ac_try) 2>&5
17075   ac_status=$?
17076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17077   (exit $ac_status); }; }; then
17078   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
17079 else
17080   echo "$as_me: failed program was:" >&5
17081 sed 's/^/| /' conftest.$ac_ext >&5
17082
17083 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
17084 fi
17085 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17086 LIBS=$ac_check_lib_save_LIBS
17087 fi
17088 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
17089 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
17090 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
17091   have_gdk_pixbuf=yes
17092                       gdk_pixbuf_halfassed=no
17093 fi
17094
17095   CPPFLAGS="$ac_save_CPPFLAGS"
17096   LDFLAGS="$ac_save_LDFLAGS"
17097 #  LIBS="$ac_save_LIBS"
17098
17099     fi
17100   fi
17101
17102   if test "$have_gdk_pixbuf" = yes; then
17103     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
17104     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
17105     cat >>confdefs.h <<\_ACEOF
17106 #define HAVE_GDK_PIXBUF 1
17107 _ACEOF
17108
17109   else
17110     have_gdk_pixbuf2=no
17111   fi
17112 fi
17113
17114
17115 ###############################################################################
17116 #
17117 #       Check for -ljpeg
17118 #
17119 ###############################################################################
17120
17121 have_jpeg=no
17122 with_jpeg_req=unspecified
17123 jpeg_halfassed=no
17124
17125 # Check whether --with-jpeg or --without-jpeg was given.
17126 if test "${with_jpeg+set}" = set; then
17127   withval="$with_jpeg"
17128   with_jpeg="$withval"; with_jpeg_req="$withval"
17129 else
17130   with_jpeg=yes
17131 fi;
17132
17133
17134    case "$with_jpeg" in
17135     yes) ;;
17136     no)  ;;
17137
17138     /*)
17139      echo "$as_me:$LINENO: checking for JPEG headers" >&5
17140 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
17141      d=$with_jpeg/include
17142      if test -d $d; then
17143        X_CFLAGS="-I$d $X_CFLAGS"
17144        echo "$as_me:$LINENO: result: $d" >&5
17145 echo "${ECHO_T}$d" >&6
17146      else
17147        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17148 echo "${ECHO_T}not found ($d: no such directory)" >&6
17149      fi
17150
17151      echo "$as_me:$LINENO: checking for JPEG libs" >&5
17152 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
17153      d=$with_jpeg/lib
17154      if test -d $d; then
17155        X_LIBS="-L$d $X_LIBS"
17156        echo "$as_me:$LINENO: result: $d" >&5
17157 echo "${ECHO_T}$d" >&6
17158      else
17159        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17160 echo "${ECHO_T}not found ($d: no such directory)" >&6
17161      fi
17162
17163      # replace the directory string with "yes".
17164      with_jpeg_req="yes"
17165      with_jpeg=$with_jpeg_req
17166      ;;
17167
17168     *)
17169      echo ""
17170      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
17171      echo "       If it is a directory, then \`DIR/include' will be added to"
17172      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17173      exit 1
17174      ;;
17175    esac
17176
17177
17178 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
17179   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
17180   exit 1
17181 fi
17182
17183 if test "$with_jpeg" = yes; then
17184
17185   have_jpeg=no
17186
17187   ac_save_CPPFLAGS="$CPPFLAGS"
17188   if test \! -z "$includedir" ; then
17189     CPPFLAGS="$CPPFLAGS -I$includedir"
17190   fi
17191   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17192   if test "${ac_cv_header_jpeglib_h+set}" = set; then
17193   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
17194 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
17195 if test "${ac_cv_header_jpeglib_h+set}" = set; then
17196   echo $ECHO_N "(cached) $ECHO_C" >&6
17197 fi
17198 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
17199 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
17200 else
17201   # Is the header compilable?
17202 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
17203 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
17204 cat >conftest.$ac_ext <<_ACEOF
17205 #line $LINENO "configure"
17206 /* confdefs.h.  */
17207 _ACEOF
17208 cat confdefs.h >>conftest.$ac_ext
17209 cat >>conftest.$ac_ext <<_ACEOF
17210 /* end confdefs.h.  */
17211 $ac_includes_default
17212 #include <jpeglib.h>
17213 _ACEOF
17214 rm -f conftest.$ac_objext
17215 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17216   (eval $ac_compile) 2>&5
17217   ac_status=$?
17218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17219   (exit $ac_status); } &&
17220          { ac_try='test -s conftest.$ac_objext'
17221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17222   (eval $ac_try) 2>&5
17223   ac_status=$?
17224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17225   (exit $ac_status); }; }; then
17226   ac_header_compiler=yes
17227 else
17228   echo "$as_me: failed program was:" >&5
17229 sed 's/^/| /' conftest.$ac_ext >&5
17230
17231 ac_header_compiler=no
17232 fi
17233 rm -f conftest.$ac_objext conftest.$ac_ext
17234 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17235 echo "${ECHO_T}$ac_header_compiler" >&6
17236
17237 # Is the header present?
17238 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
17239 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
17240 cat >conftest.$ac_ext <<_ACEOF
17241 #line $LINENO "configure"
17242 /* confdefs.h.  */
17243 _ACEOF
17244 cat confdefs.h >>conftest.$ac_ext
17245 cat >>conftest.$ac_ext <<_ACEOF
17246 /* end confdefs.h.  */
17247 #include <jpeglib.h>
17248 _ACEOF
17249 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17250   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17251   ac_status=$?
17252   grep -v '^ *+' conftest.er1 >conftest.err
17253   rm -f conftest.er1
17254   cat conftest.err >&5
17255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17256   (exit $ac_status); } >/dev/null; then
17257   if test -s conftest.err; then
17258     ac_cpp_err=$ac_c_preproc_warn_flag
17259   else
17260     ac_cpp_err=
17261   fi
17262 else
17263   ac_cpp_err=yes
17264 fi
17265 if test -z "$ac_cpp_err"; then
17266   ac_header_preproc=yes
17267 else
17268   echo "$as_me: failed program was:" >&5
17269 sed 's/^/| /' conftest.$ac_ext >&5
17270
17271   ac_header_preproc=no
17272 fi
17273 rm -f conftest.err conftest.$ac_ext
17274 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17275 echo "${ECHO_T}$ac_header_preproc" >&6
17276
17277 # So?  What about this header?
17278 case $ac_header_compiler:$ac_header_preproc in
17279   yes:no )
17280     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17281 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17282     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
17283 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
17284     (
17285       cat <<\_ASBOX
17286 ## ------------------------------------ ##
17287 ## Report this to bug-autoconf@gnu.org. ##
17288 ## ------------------------------------ ##
17289 _ASBOX
17290     ) |
17291       sed "s/^/$as_me: WARNING:     /" >&2
17292     ;;
17293   no:yes )
17294     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
17295 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
17296     { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5
17297 echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;}
17298     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
17299 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
17300     (
17301       cat <<\_ASBOX
17302 ## ------------------------------------ ##
17303 ## Report this to bug-autoconf@gnu.org. ##
17304 ## ------------------------------------ ##
17305 _ASBOX
17306     ) |
17307       sed "s/^/$as_me: WARNING:     /" >&2
17308     ;;
17309 esac
17310 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
17311 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
17312 if test "${ac_cv_header_jpeglib_h+set}" = set; then
17313   echo $ECHO_N "(cached) $ECHO_C" >&6
17314 else
17315   ac_cv_header_jpeglib_h=$ac_header_preproc
17316 fi
17317 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
17318 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
17319
17320 fi
17321 if test $ac_cv_header_jpeglib_h = yes; then
17322   have_jpeg=yes
17323 fi
17324
17325
17326   CPPFLAGS="$ac_save_CPPFLAGS"
17327
17328   if test "$have_jpeg" = yes; then
17329     # we have the header, now check for the library
17330     have_jpeg=no
17331     jpeg_halfassed=yes
17332
17333   ac_save_CPPFLAGS="$CPPFLAGS"
17334   ac_save_LDFLAGS="$LDFLAGS"
17335 #  ac_save_LIBS="$LIBS"
17336
17337   if test \! -z "$includedir" ; then
17338     CPPFLAGS="$CPPFLAGS -I$includedir"
17339   fi
17340   # note: $X_CFLAGS includes $x_includes
17341   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17342
17343   if test \! -z "$libdir" ; then
17344     LDFLAGS="$LDFLAGS -L$libdir"
17345   fi
17346   # note: $X_LIBS includes $x_libraries
17347   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17348
17349   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
17350 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
17351 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
17352   echo $ECHO_N "(cached) $ECHO_C" >&6
17353 else
17354   ac_check_lib_save_LIBS=$LIBS
17355 LIBS="-ljpeg  $LIBS"
17356 cat >conftest.$ac_ext <<_ACEOF
17357 #line $LINENO "configure"
17358 /* confdefs.h.  */
17359 _ACEOF
17360 cat confdefs.h >>conftest.$ac_ext
17361 cat >>conftest.$ac_ext <<_ACEOF
17362 /* end confdefs.h.  */
17363
17364 /* Override any gcc2 internal prototype to avoid an error.  */
17365 #ifdef __cplusplus
17366 extern "C"
17367 #endif
17368 /* We use char because int might match the return type of a gcc2
17369    builtin and then its argument prototype would still apply.  */
17370 char jpeg_start_compress ();
17371 int
17372 main ()
17373 {
17374 jpeg_start_compress ();
17375   ;
17376   return 0;
17377 }
17378 _ACEOF
17379 rm -f conftest.$ac_objext conftest$ac_exeext
17380 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17381   (eval $ac_link) 2>&5
17382   ac_status=$?
17383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17384   (exit $ac_status); } &&
17385          { ac_try='test -s conftest$ac_exeext'
17386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17387   (eval $ac_try) 2>&5
17388   ac_status=$?
17389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17390   (exit $ac_status); }; }; then
17391   ac_cv_lib_jpeg_jpeg_start_compress=yes
17392 else
17393   echo "$as_me: failed program was:" >&5
17394 sed 's/^/| /' conftest.$ac_ext >&5
17395
17396 ac_cv_lib_jpeg_jpeg_start_compress=no
17397 fi
17398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17399 LIBS=$ac_check_lib_save_LIBS
17400 fi
17401 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
17402 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
17403 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
17404   have_jpeg=yes
17405                     jpeg_halfassed=no
17406                     JPEG_LIBS="-ljpeg"
17407                     cat >>confdefs.h <<\_ACEOF
17408 #define HAVE_JPEGLIB 1
17409 _ACEOF
17410
17411 fi
17412
17413   CPPFLAGS="$ac_save_CPPFLAGS"
17414   LDFLAGS="$ac_save_LDFLAGS"
17415 #  LIBS="$ac_save_LIBS"
17416
17417   fi
17418 fi
17419
17420
17421 ###############################################################################
17422 #
17423 #       Check for the XSHM server extension.
17424 #
17425 ###############################################################################
17426
17427 have_xshm=no
17428 with_xshm_req=unspecified
17429
17430 # Check whether --with-xshm-ext or --without-xshm-ext was given.
17431 if test "${with_xshm_ext+set}" = set; then
17432   withval="$with_xshm_ext"
17433   with_xshm="$withval"; with_xshm_req="$withval"
17434 else
17435   with_xshm=yes
17436 fi;
17437
17438
17439    case "$with_xshm" in
17440     yes) ;;
17441     no)  ;;
17442
17443     /*)
17444      echo "$as_me:$LINENO: checking for XSHM headers" >&5
17445 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
17446      d=$with_xshm/include
17447      if test -d $d; then
17448        X_CFLAGS="-I$d $X_CFLAGS"
17449        echo "$as_me:$LINENO: result: $d" >&5
17450 echo "${ECHO_T}$d" >&6
17451      else
17452        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17453 echo "${ECHO_T}not found ($d: no such directory)" >&6
17454      fi
17455
17456      echo "$as_me:$LINENO: checking for XSHM libs" >&5
17457 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
17458      d=$with_xshm/lib
17459      if test -d $d; then
17460        X_LIBS="-L$d $X_LIBS"
17461        echo "$as_me:$LINENO: result: $d" >&5
17462 echo "${ECHO_T}$d" >&6
17463      else
17464        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17465 echo "${ECHO_T}not found ($d: no such directory)" >&6
17466      fi
17467
17468      # replace the directory string with "yes".
17469      with_xshm_req="yes"
17470      with_xshm=$with_xshm_req
17471      ;;
17472
17473     *)
17474      echo ""
17475      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
17476      echo "       If it is a directory, then \`DIR/include' will be added to"
17477      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17478      exit 1
17479      ;;
17480    esac
17481
17482
17483 if test "$with_xshm" = yes; then
17484
17485   # first check for Xshm.h.
17486
17487   ac_save_CPPFLAGS="$CPPFLAGS"
17488   if test \! -z "$includedir" ; then
17489     CPPFLAGS="$CPPFLAGS -I$includedir"
17490   fi
17491   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17492   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
17493 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
17494 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
17495   echo $ECHO_N "(cached) $ECHO_C" >&6
17496 else
17497   cat >conftest.$ac_ext <<_ACEOF
17498 #line $LINENO "configure"
17499 /* confdefs.h.  */
17500 _ACEOF
17501 cat confdefs.h >>conftest.$ac_ext
17502 cat >>conftest.$ac_ext <<_ACEOF
17503 /* end confdefs.h.  */
17504 #include <X11/Xlib.h>
17505
17506 #include <X11/extensions/XShm.h>
17507 _ACEOF
17508 rm -f conftest.$ac_objext
17509 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17510   (eval $ac_compile) 2>&5
17511   ac_status=$?
17512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17513   (exit $ac_status); } &&
17514          { ac_try='test -s conftest.$ac_objext'
17515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17516   (eval $ac_try) 2>&5
17517   ac_status=$?
17518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17519   (exit $ac_status); }; }; then
17520   ac_cv_header_X11_extensions_XShm_h=yes
17521 else
17522   echo "$as_me: failed program was:" >&5
17523 sed 's/^/| /' conftest.$ac_ext >&5
17524
17525 ac_cv_header_X11_extensions_XShm_h=no
17526 fi
17527 rm -f conftest.$ac_objext conftest.$ac_ext
17528 fi
17529 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
17530 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
17531 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
17532   have_xshm=yes
17533 fi
17534
17535
17536   CPPFLAGS="$ac_save_CPPFLAGS"
17537
17538   # if that succeeded, then check for sys/ipc.h.
17539   if test "$have_xshm" = yes; then
17540     have_xshm=no
17541
17542   ac_save_CPPFLAGS="$CPPFLAGS"
17543   if test \! -z "$includedir" ; then
17544     CPPFLAGS="$CPPFLAGS -I$includedir"
17545   fi
17546   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17547   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
17548   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
17549 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
17550 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
17551   echo $ECHO_N "(cached) $ECHO_C" >&6
17552 fi
17553 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
17554 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
17555 else
17556   # Is the header compilable?
17557 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
17558 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
17559 cat >conftest.$ac_ext <<_ACEOF
17560 #line $LINENO "configure"
17561 /* confdefs.h.  */
17562 _ACEOF
17563 cat confdefs.h >>conftest.$ac_ext
17564 cat >>conftest.$ac_ext <<_ACEOF
17565 /* end confdefs.h.  */
17566 $ac_includes_default
17567 #include <sys/ipc.h>
17568 _ACEOF
17569 rm -f conftest.$ac_objext
17570 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17571   (eval $ac_compile) 2>&5
17572   ac_status=$?
17573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17574   (exit $ac_status); } &&
17575          { ac_try='test -s conftest.$ac_objext'
17576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17577   (eval $ac_try) 2>&5
17578   ac_status=$?
17579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17580   (exit $ac_status); }; }; then
17581   ac_header_compiler=yes
17582 else
17583   echo "$as_me: failed program was:" >&5
17584 sed 's/^/| /' conftest.$ac_ext >&5
17585
17586 ac_header_compiler=no
17587 fi
17588 rm -f conftest.$ac_objext conftest.$ac_ext
17589 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17590 echo "${ECHO_T}$ac_header_compiler" >&6
17591
17592 # Is the header present?
17593 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
17594 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
17595 cat >conftest.$ac_ext <<_ACEOF
17596 #line $LINENO "configure"
17597 /* confdefs.h.  */
17598 _ACEOF
17599 cat confdefs.h >>conftest.$ac_ext
17600 cat >>conftest.$ac_ext <<_ACEOF
17601 /* end confdefs.h.  */
17602 #include <sys/ipc.h>
17603 _ACEOF
17604 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17605   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17606   ac_status=$?
17607   grep -v '^ *+' conftest.er1 >conftest.err
17608   rm -f conftest.er1
17609   cat conftest.err >&5
17610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17611   (exit $ac_status); } >/dev/null; then
17612   if test -s conftest.err; then
17613     ac_cpp_err=$ac_c_preproc_warn_flag
17614   else
17615     ac_cpp_err=
17616   fi
17617 else
17618   ac_cpp_err=yes
17619 fi
17620 if test -z "$ac_cpp_err"; then
17621   ac_header_preproc=yes
17622 else
17623   echo "$as_me: failed program was:" >&5
17624 sed 's/^/| /' conftest.$ac_ext >&5
17625
17626   ac_header_preproc=no
17627 fi
17628 rm -f conftest.err conftest.$ac_ext
17629 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17630 echo "${ECHO_T}$ac_header_preproc" >&6
17631
17632 # So?  What about this header?
17633 case $ac_header_compiler:$ac_header_preproc in
17634   yes:no )
17635     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
17636 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17637     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
17638 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
17639     (
17640       cat <<\_ASBOX
17641 ## ------------------------------------ ##
17642 ## Report this to bug-autoconf@gnu.org. ##
17643 ## ------------------------------------ ##
17644 _ASBOX
17645     ) |
17646       sed "s/^/$as_me: WARNING:     /" >&2
17647     ;;
17648   no:yes )
17649     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
17650 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
17651     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&5
17652 echo "$as_me: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&2;}
17653     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
17654 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
17655     (
17656       cat <<\_ASBOX
17657 ## ------------------------------------ ##
17658 ## Report this to bug-autoconf@gnu.org. ##
17659 ## ------------------------------------ ##
17660 _ASBOX
17661     ) |
17662       sed "s/^/$as_me: WARNING:     /" >&2
17663     ;;
17664 esac
17665 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
17666 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
17667 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
17668   echo $ECHO_N "(cached) $ECHO_C" >&6
17669 else
17670   ac_cv_header_sys_ipc_h=$ac_header_preproc
17671 fi
17672 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
17673 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
17674
17675 fi
17676 if test $ac_cv_header_sys_ipc_h = yes; then
17677   have_xshm=yes
17678 fi
17679
17680
17681   CPPFLAGS="$ac_save_CPPFLAGS"
17682   fi
17683
17684   # if that succeeded, then check for sys/shm.h.
17685   if test "$have_xshm" = yes; then
17686     have_xshm=no
17687
17688   ac_save_CPPFLAGS="$CPPFLAGS"
17689   if test \! -z "$includedir" ; then
17690     CPPFLAGS="$CPPFLAGS -I$includedir"
17691   fi
17692   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17693   if test "${ac_cv_header_sys_shm_h+set}" = set; then
17694   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
17695 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
17696 if test "${ac_cv_header_sys_shm_h+set}" = set; then
17697   echo $ECHO_N "(cached) $ECHO_C" >&6
17698 fi
17699 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
17700 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
17701 else
17702   # Is the header compilable?
17703 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
17704 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
17705 cat >conftest.$ac_ext <<_ACEOF
17706 #line $LINENO "configure"
17707 /* confdefs.h.  */
17708 _ACEOF
17709 cat confdefs.h >>conftest.$ac_ext
17710 cat >>conftest.$ac_ext <<_ACEOF
17711 /* end confdefs.h.  */
17712 $ac_includes_default
17713 #include <sys/shm.h>
17714 _ACEOF
17715 rm -f conftest.$ac_objext
17716 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17717   (eval $ac_compile) 2>&5
17718   ac_status=$?
17719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17720   (exit $ac_status); } &&
17721          { ac_try='test -s conftest.$ac_objext'
17722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17723   (eval $ac_try) 2>&5
17724   ac_status=$?
17725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17726   (exit $ac_status); }; }; then
17727   ac_header_compiler=yes
17728 else
17729   echo "$as_me: failed program was:" >&5
17730 sed 's/^/| /' conftest.$ac_ext >&5
17731
17732 ac_header_compiler=no
17733 fi
17734 rm -f conftest.$ac_objext conftest.$ac_ext
17735 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17736 echo "${ECHO_T}$ac_header_compiler" >&6
17737
17738 # Is the header present?
17739 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
17740 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
17741 cat >conftest.$ac_ext <<_ACEOF
17742 #line $LINENO "configure"
17743 /* confdefs.h.  */
17744 _ACEOF
17745 cat confdefs.h >>conftest.$ac_ext
17746 cat >>conftest.$ac_ext <<_ACEOF
17747 /* end confdefs.h.  */
17748 #include <sys/shm.h>
17749 _ACEOF
17750 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17751   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17752   ac_status=$?
17753   grep -v '^ *+' conftest.er1 >conftest.err
17754   rm -f conftest.er1
17755   cat conftest.err >&5
17756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17757   (exit $ac_status); } >/dev/null; then
17758   if test -s conftest.err; then
17759     ac_cpp_err=$ac_c_preproc_warn_flag
17760   else
17761     ac_cpp_err=
17762   fi
17763 else
17764   ac_cpp_err=yes
17765 fi
17766 if test -z "$ac_cpp_err"; then
17767   ac_header_preproc=yes
17768 else
17769   echo "$as_me: failed program was:" >&5
17770 sed 's/^/| /' conftest.$ac_ext >&5
17771
17772   ac_header_preproc=no
17773 fi
17774 rm -f conftest.err conftest.$ac_ext
17775 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17776 echo "${ECHO_T}$ac_header_preproc" >&6
17777
17778 # So?  What about this header?
17779 case $ac_header_compiler:$ac_header_preproc in
17780   yes:no )
17781     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
17782 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17783     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
17784 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
17785     (
17786       cat <<\_ASBOX
17787 ## ------------------------------------ ##
17788 ## Report this to bug-autoconf@gnu.org. ##
17789 ## ------------------------------------ ##
17790 _ASBOX
17791     ) |
17792       sed "s/^/$as_me: WARNING:     /" >&2
17793     ;;
17794   no:yes )
17795     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
17796 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
17797     { echo "$as_me:$LINENO: WARNING: sys/shm.h: check for missing prerequisite headers?" >&5
17798 echo "$as_me: WARNING: sys/shm.h: check for missing prerequisite headers?" >&2;}
17799     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
17800 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
17801     (
17802       cat <<\_ASBOX
17803 ## ------------------------------------ ##
17804 ## Report this to bug-autoconf@gnu.org. ##
17805 ## ------------------------------------ ##
17806 _ASBOX
17807     ) |
17808       sed "s/^/$as_me: WARNING:     /" >&2
17809     ;;
17810 esac
17811 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
17812 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
17813 if test "${ac_cv_header_sys_shm_h+set}" = set; then
17814   echo $ECHO_N "(cached) $ECHO_C" >&6
17815 else
17816   ac_cv_header_sys_shm_h=$ac_header_preproc
17817 fi
17818 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
17819 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
17820
17821 fi
17822 if test $ac_cv_header_sys_shm_h = yes; then
17823   have_xshm=yes
17824 fi
17825
17826
17827   CPPFLAGS="$ac_save_CPPFLAGS"
17828   fi
17829
17830   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
17831   # to exist, but the library code to not exist.  And even better, the library
17832   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
17833   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
17834   # that's not quite right, but close enough.)
17835   #
17836   case "$host" in
17837     *-aix*)
17838       if  `uname -v` -eq 3 ; then
17839         have_xshm=no
17840
17841   ac_save_CPPFLAGS="$CPPFLAGS"
17842   ac_save_LDFLAGS="$LDFLAGS"
17843 #  ac_save_LIBS="$LIBS"
17844
17845   if test \! -z "$includedir" ; then
17846     CPPFLAGS="$CPPFLAGS -I$includedir"
17847   fi
17848   # note: $X_CFLAGS includes $x_includes
17849   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17850
17851   if test \! -z "$libdir" ; then
17852     LDFLAGS="$LDFLAGS -L$libdir"
17853   fi
17854   # note: $X_LIBS includes $x_libraries
17855   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17856
17857   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
17858 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
17859 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
17860   echo $ECHO_N "(cached) $ECHO_C" >&6
17861 else
17862   ac_check_lib_save_LIBS=$LIBS
17863 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
17864 cat >conftest.$ac_ext <<_ACEOF
17865 #line $LINENO "configure"
17866 /* confdefs.h.  */
17867 _ACEOF
17868 cat confdefs.h >>conftest.$ac_ext
17869 cat >>conftest.$ac_ext <<_ACEOF
17870 /* end confdefs.h.  */
17871
17872 /* Override any gcc2 internal prototype to avoid an error.  */
17873 #ifdef __cplusplus
17874 extern "C"
17875 #endif
17876 /* We use char because int might match the return type of a gcc2
17877    builtin and then its argument prototype would still apply.  */
17878 char XShmQueryExtension ();
17879 int
17880 main ()
17881 {
17882 XShmQueryExtension ();
17883   ;
17884   return 0;
17885 }
17886 _ACEOF
17887 rm -f conftest.$ac_objext conftest$ac_exeext
17888 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17889   (eval $ac_link) 2>&5
17890   ac_status=$?
17891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17892   (exit $ac_status); } &&
17893          { ac_try='test -s conftest$ac_exeext'
17894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17895   (eval $ac_try) 2>&5
17896   ac_status=$?
17897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17898   (exit $ac_status); }; }; then
17899   ac_cv_lib_XextSam_XShmQueryExtension=yes
17900 else
17901   echo "$as_me: failed program was:" >&5
17902 sed 's/^/| /' conftest.$ac_ext >&5
17903
17904 ac_cv_lib_XextSam_XShmQueryExtension=no
17905 fi
17906 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17907 LIBS=$ac_check_lib_save_LIBS
17908 fi
17909 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
17910 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
17911 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
17912   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
17913 else
17914   true
17915 fi
17916
17917   CPPFLAGS="$ac_save_CPPFLAGS"
17918   LDFLAGS="$ac_save_LDFLAGS"
17919 #  LIBS="$ac_save_LIBS"
17920
17921       fi
17922     ;;
17923   esac
17924
17925   # if that succeeded, then we've really got it.
17926   if test "$have_xshm" = yes; then
17927     cat >>confdefs.h <<\_ACEOF
17928 #define HAVE_XSHM_EXTENSION 1
17929 _ACEOF
17930
17931   fi
17932
17933 elif test "$with_xshm" != no; then
17934   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
17935   exit 1
17936 fi
17937
17938
17939 ###############################################################################
17940 #
17941 #       Check for the DOUBLE-BUFFER server extension.
17942 #
17943 ###############################################################################
17944
17945 have_xdbe=no
17946 with_xdbe_req=unspecified
17947
17948 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
17949 if test "${with_xdbe_ext+set}" = set; then
17950   withval="$with_xdbe_ext"
17951   with_xdbe="$withval"; with_xdbe_req="$withval"
17952 else
17953   with_xdbe=yes
17954 fi;
17955
17956
17957    case "$with_xdbe" in
17958     yes) ;;
17959     no)  ;;
17960
17961     /*)
17962      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
17963 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
17964      d=$with_xdbe/include
17965      if test -d $d; then
17966        X_CFLAGS="-I$d $X_CFLAGS"
17967        echo "$as_me:$LINENO: result: $d" >&5
17968 echo "${ECHO_T}$d" >&6
17969      else
17970        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17971 echo "${ECHO_T}not found ($d: no such directory)" >&6
17972      fi
17973
17974      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
17975 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
17976      d=$with_xdbe/lib
17977      if test -d $d; then
17978        X_LIBS="-L$d $X_LIBS"
17979        echo "$as_me:$LINENO: result: $d" >&5
17980 echo "${ECHO_T}$d" >&6
17981      else
17982        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17983 echo "${ECHO_T}not found ($d: no such directory)" >&6
17984      fi
17985
17986      # replace the directory string with "yes".
17987      with_xdbe_req="yes"
17988      with_xdbe=$with_xdbe_req
17989      ;;
17990
17991     *)
17992      echo ""
17993      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
17994      echo "       If it is a directory, then \`DIR/include' will be added to"
17995      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17996      exit 1
17997      ;;
17998    esac
17999
18000
18001 if test "$with_xdbe" = yes; then
18002
18003
18004   ac_save_CPPFLAGS="$CPPFLAGS"
18005   if test \! -z "$includedir" ; then
18006     CPPFLAGS="$CPPFLAGS -I$includedir"
18007   fi
18008   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18009   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
18010 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
18011 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
18012   echo $ECHO_N "(cached) $ECHO_C" >&6
18013 else
18014   cat >conftest.$ac_ext <<_ACEOF
18015 #line $LINENO "configure"
18016 /* confdefs.h.  */
18017 _ACEOF
18018 cat confdefs.h >>conftest.$ac_ext
18019 cat >>conftest.$ac_ext <<_ACEOF
18020 /* end confdefs.h.  */
18021 #include <X11/Xlib.h>
18022
18023 #include <X11/extensions/Xdbe.h>
18024 _ACEOF
18025 rm -f conftest.$ac_objext
18026 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18027   (eval $ac_compile) 2>&5
18028   ac_status=$?
18029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18030   (exit $ac_status); } &&
18031          { ac_try='test -s conftest.$ac_objext'
18032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18033   (eval $ac_try) 2>&5
18034   ac_status=$?
18035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18036   (exit $ac_status); }; }; then
18037   ac_cv_header_X11_extensions_Xdbe_h=yes
18038 else
18039   echo "$as_me: failed program was:" >&5
18040 sed 's/^/| /' conftest.$ac_ext >&5
18041
18042 ac_cv_header_X11_extensions_Xdbe_h=no
18043 fi
18044 rm -f conftest.$ac_objext conftest.$ac_ext
18045 fi
18046 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
18047 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
18048 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
18049   have_xdbe=yes
18050 fi
18051
18052
18053   CPPFLAGS="$ac_save_CPPFLAGS"
18054   if test "$have_xdbe" = yes; then
18055     cat >>confdefs.h <<\_ACEOF
18056 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
18057 _ACEOF
18058
18059   fi
18060
18061 elif test "$with_xdbe" != no; then
18062   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
18063   exit 1
18064 fi
18065
18066
18067 ###############################################################################
18068 #
18069 #       Check for the SGI XReadDisplay server extension.
18070 #
18071 #       Note: this has to be down here, rather than up with the other server
18072 #       extension tests, so that the output of `configure --help' is in the
18073 #       right order.  Arrgh!
18074 #
18075 ###############################################################################
18076
18077 have_readdisplay=no
18078 with_readdisplay_req=unspecified
18079
18080 # Check whether --with-readdisplay or --without-readdisplay was given.
18081 if test "${with_readdisplay+set}" = set; then
18082   withval="$with_readdisplay"
18083   with_readdisplay="$withval"; with_readdisplay_req="$withval"
18084 else
18085   with_readdisplay=yes
18086 fi;
18087
18088
18089    case "$with_readdisplay" in
18090     yes) ;;
18091     no)  ;;
18092
18093     /*)
18094      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
18095 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
18096      d=$with_readdisplay/include
18097      if test -d $d; then
18098        X_CFLAGS="-I$d $X_CFLAGS"
18099        echo "$as_me:$LINENO: result: $d" >&5
18100 echo "${ECHO_T}$d" >&6
18101      else
18102        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18103 echo "${ECHO_T}not found ($d: no such directory)" >&6
18104      fi
18105
18106      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
18107 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
18108      d=$with_readdisplay/lib
18109      if test -d $d; then
18110        X_LIBS="-L$d $X_LIBS"
18111        echo "$as_me:$LINENO: result: $d" >&5
18112 echo "${ECHO_T}$d" >&6
18113      else
18114        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18115 echo "${ECHO_T}not found ($d: no such directory)" >&6
18116      fi
18117
18118      # replace the directory string with "yes".
18119      with_readdisplay_req="yes"
18120      with_readdisplay=$with_readdisplay_req
18121      ;;
18122
18123     *)
18124      echo ""
18125      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
18126      echo "       If it is a directory, then \`DIR/include' will be added to"
18127      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18128      exit 1
18129      ;;
18130    esac
18131
18132
18133 if test "$with_readdisplay" = yes; then
18134
18135   ac_save_CPPFLAGS="$CPPFLAGS"
18136   if test \! -z "$includedir" ; then
18137     CPPFLAGS="$CPPFLAGS -I$includedir"
18138   fi
18139   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18140   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
18141 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
18142 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
18143   echo $ECHO_N "(cached) $ECHO_C" >&6
18144 else
18145   cat >conftest.$ac_ext <<_ACEOF
18146 #line $LINENO "configure"
18147 /* confdefs.h.  */
18148 _ACEOF
18149 cat confdefs.h >>conftest.$ac_ext
18150 cat >>conftest.$ac_ext <<_ACEOF
18151 /* end confdefs.h.  */
18152 #include <X11/Xlib.h>
18153
18154 #include <X11/extensions/readdisplay.h>
18155 _ACEOF
18156 rm -f conftest.$ac_objext
18157 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18158   (eval $ac_compile) 2>&5
18159   ac_status=$?
18160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18161   (exit $ac_status); } &&
18162          { ac_try='test -s conftest.$ac_objext'
18163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18164   (eval $ac_try) 2>&5
18165   ac_status=$?
18166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18167   (exit $ac_status); }; }; then
18168   ac_cv_header_X11_extensions_readdisplay_h=yes
18169 else
18170   echo "$as_me: failed program was:" >&5
18171 sed 's/^/| /' conftest.$ac_ext >&5
18172
18173 ac_cv_header_X11_extensions_readdisplay_h=no
18174 fi
18175 rm -f conftest.$ac_objext conftest.$ac_ext
18176 fi
18177 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
18178 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
18179 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
18180   cat >>confdefs.h <<\_ACEOF
18181 #define HAVE_READ_DISPLAY_EXTENSION 1
18182 _ACEOF
18183
18184 fi
18185
18186
18187   CPPFLAGS="$ac_save_CPPFLAGS"
18188 elif test "$with_readdisplay" != no; then
18189   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
18190   exit 1
18191 fi
18192
18193
18194 ###############################################################################
18195 #
18196 #       Check for a program to generate random text.
18197 #
18198 #       Zippy is funnier than the idiocy generally spat out by `fortune',
18199 #       so first see if "fortune zippy" works.  Else, use plain "fortune".
18200 #
18201 #       We used to dig around in Emacs to look for the "yow" program, but
18202 #       most people who have Emacs also have "fortune zippy", so nevermind.
18203 #
18204 ###############################################################################
18205
18206 with_fortune_req=""
18207
18208 # Check whether --with-fortune or --without-fortune was given.
18209 if test "${with_fortune+set}" = set; then
18210   withval="$with_fortune"
18211   with_fortune_req="$withval"; with_fortune="$withval"
18212 else
18213   with_fortune=yes
18214 fi;
18215
18216 if test "$with_fortune" = no || test "$with_fortune" = yes ; then
18217   with_fortune=""
18218   with_fortune_req=""
18219 fi
18220
18221 if test -n "$with_fortune_req" ; then
18222   ac_cv_fortune_program=""
18223   case "$with_fortune_req" in
18224     /*)
18225
18226       set dummy $with_fortune_req ; fortune_tmp=$2
18227       echo "$as_me:$LINENO: checking for $fortune_tmp" >&5
18228 echo $ECHO_N "checking for $fortune_tmp... $ECHO_C" >&6
18229       if test -x "$fortune_tmp" ; then
18230         echo "$as_me:$LINENO: result: yes" >&5
18231 echo "${ECHO_T}yes" >&6
18232       else
18233         echo "$as_me:$LINENO: result: no" >&5
18234 echo "${ECHO_T}no" >&6
18235         with_fortune=""
18236       fi
18237     ;;
18238     *)
18239       set dummy $with_fortune_req ; fortune_tmp=$2
18240       # don't cache
18241       unset ac_cv_path_fortune_tmp
18242       # Extract the first word of "$fortune_tmp", so it can be a program name with args.
18243 set dummy $fortune_tmp; ac_word=$2
18244 echo "$as_me:$LINENO: checking for $ac_word" >&5
18245 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18246 if test "${ac_cv_path_fortune_tmp+set}" = set; then
18247   echo $ECHO_N "(cached) $ECHO_C" >&6
18248 else
18249   case $fortune_tmp in
18250   [\\/]* | ?:[\\/]*)
18251   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
18252   ;;
18253   *)
18254   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18255 for as_dir in $PATH
18256 do
18257   IFS=$as_save_IFS
18258   test -z "$as_dir" && as_dir=.
18259   for ac_exec_ext in '' $ac_executable_extensions; do
18260   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18261     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
18262     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18263     break 2
18264   fi
18265 done
18266 done
18267
18268   ;;
18269 esac
18270 fi
18271 fortune_tmp=$ac_cv_path_fortune_tmp
18272
18273 if test -n "$fortune_tmp"; then
18274   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
18275 echo "${ECHO_T}$fortune_tmp" >&6
18276 else
18277   echo "$as_me:$LINENO: result: no" >&5
18278 echo "${ECHO_T}no" >&6
18279 fi
18280
18281       if test -z "$fortune_tmp" ; then
18282         with_fortune=""
18283       fi
18284     ;;
18285   esac
18286   ac_cv_fortune_program="$with_fortune"
18287
18288 elif test -n "$ac_cv_fortune_program"; then
18289   echo "$as_me:$LINENO: result: checking for fortune... (cached) $ac_cv_fortune_program" >&5
18290 echo "${ECHO_T}checking for fortune... (cached) $ac_cv_fortune_program" >&6
18291 fi
18292
18293 unset ac_cv_path_fortune_tmp
18294 unset fortune_tmp
18295
18296 if test -z "$ac_cv_fortune_program" ; then
18297
18298   # first look for fortune in /usr/games/ (and use absolute path)
18299   for ac_prog in fortune
18300 do
18301   # Extract the first word of "$ac_prog", so it can be a program name with args.
18302 set dummy $ac_prog; ac_word=$2
18303 echo "$as_me:$LINENO: checking for $ac_word" >&5
18304 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18305 if test "${ac_cv_path_fortune_tmp+set}" = set; then
18306   echo $ECHO_N "(cached) $ECHO_C" >&6
18307 else
18308   case $fortune_tmp in
18309   [\\/]* | ?:[\\/]*)
18310   ac_cv_path_fortune_tmp="$fortune_tmp" # Let the user override the test with a path.
18311   ;;
18312   *)
18313   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18314 for as_dir in "/usr/games"
18315 do
18316   IFS=$as_save_IFS
18317   test -z "$as_dir" && as_dir=.
18318   for ac_exec_ext in '' $ac_executable_extensions; do
18319   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18320     ac_cv_path_fortune_tmp="$as_dir/$ac_word$ac_exec_ext"
18321     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18322     break 2
18323   fi
18324 done
18325 done
18326
18327   ;;
18328 esac
18329 fi
18330 fortune_tmp=$ac_cv_path_fortune_tmp
18331
18332 if test -n "$fortune_tmp"; then
18333   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
18334 echo "${ECHO_T}$fortune_tmp" >&6
18335 else
18336   echo "$as_me:$LINENO: result: no" >&5
18337 echo "${ECHO_T}no" >&6
18338 fi
18339
18340   test -n "$fortune_tmp" && break
18341 done
18342
18343
18344   # if it's not there, look on $PATH (and don't use absolute path)
18345   if test -z "$fortune_tmp" ; then
18346      for ac_prog in fortune
18347 do
18348   # Extract the first word of "$ac_prog", so it can be a program name with args.
18349 set dummy $ac_prog; ac_word=$2
18350 echo "$as_me:$LINENO: checking for $ac_word" >&5
18351 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18352 if test "${ac_cv_prog_fortune_tmp+set}" = set; then
18353   echo $ECHO_N "(cached) $ECHO_C" >&6
18354 else
18355   if test -n "$fortune_tmp"; then
18356   ac_cv_prog_fortune_tmp="$fortune_tmp" # Let the user override the test.
18357 else
18358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18359 for as_dir in $PATH
18360 do
18361   IFS=$as_save_IFS
18362   test -z "$as_dir" && as_dir=.
18363   for ac_exec_ext in '' $ac_executable_extensions; do
18364   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18365     ac_cv_prog_fortune_tmp="$ac_prog"
18366     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18367     break 2
18368   fi
18369 done
18370 done
18371
18372 fi
18373 fi
18374 fortune_tmp=$ac_cv_prog_fortune_tmp
18375 if test -n "$fortune_tmp"; then
18376   echo "$as_me:$LINENO: result: $fortune_tmp" >&5
18377 echo "${ECHO_T}$fortune_tmp" >&6
18378 else
18379   echo "$as_me:$LINENO: result: no" >&5
18380 echo "${ECHO_T}no" >&6
18381 fi
18382
18383   test -n "$fortune_tmp" && break
18384 done
18385
18386   fi
18387
18388   # if we didn't find anything, then just assume /usr/games/
18389   if test -z "$fortune_tmp" ; then
18390      fortune_tmp="/usr/games/fortune"
18391   fi
18392
18393   ac_cv_fortune_program="$fortune_tmp"
18394
18395   # now check to see whether "fortune zippy" works.
18396   #
18397   fortune_tmp="$fortune_tmp zippy"
18398   echo "$as_me:$LINENO: checking for zippy quotes" >&5
18399 echo $ECHO_N "checking for zippy quotes... $ECHO_C" >&6
18400   if ( $fortune_tmp >/dev/null 2>&1 ); then
18401     ac_cv_fortune_program="$fortune_tmp"
18402     echo "$as_me:$LINENO: result: $fortune_tmp" >&5
18403 echo "${ECHO_T}$fortune_tmp" >&6
18404   else
18405     echo "$as_me:$LINENO: result: no" >&5
18406 echo "${ECHO_T}no" >&6
18407   fi
18408
18409 fi
18410
18411 unset ac_cv_path_fortune_tmp
18412 unset fortune_tmp
18413
18414 cat >>confdefs.h <<_ACEOF
18415 #define FORTUNE_PROGRAM "$ac_cv_fortune_program"
18416 _ACEOF
18417
18418
18419
18420 ###############################################################################
18421 #
18422 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
18423 #       This should be safe, but let's give people the option.
18424 #
18425 ###############################################################################
18426
18427 setuid_hacks_default=no
18428 setuid_hacks="$setuid_hacks_default"
18429
18430 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
18431 if test "${with_setuid_hacks+set}" = set; then
18432   withval="$with_setuid_hacks"
18433   setuid_hacks="$withval"
18434 else
18435   setuid_hacks="$setuid_hacks_default"
18436 fi;
18437
18438
18439    case "$setuid_hacks" in
18440     yes) ;;
18441     no)  ;;
18442
18443     /*)
18444      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
18445 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
18446      d=$setuid_hacks/include
18447      if test -d $d; then
18448        X_CFLAGS="-I$d $X_CFLAGS"
18449        echo "$as_me:$LINENO: result: $d" >&5
18450 echo "${ECHO_T}$d" >&6
18451      else
18452        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18453 echo "${ECHO_T}not found ($d: no such directory)" >&6
18454      fi
18455
18456      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
18457 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
18458      d=$setuid_hacks/lib
18459      if test -d $d; then
18460        X_LIBS="-L$d $X_LIBS"
18461        echo "$as_me:$LINENO: result: $d" >&5
18462 echo "${ECHO_T}$d" >&6
18463      else
18464        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18465 echo "${ECHO_T}not found ($d: no such directory)" >&6
18466      fi
18467
18468      # replace the directory string with "yes".
18469      setuid_hacks_req="yes"
18470      setuid_hacks=$setuid_hacks_req
18471      ;;
18472
18473     *)
18474      echo ""
18475      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
18476      echo "       If it is a directory, then \`DIR/include' will be added to"
18477      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18478      exit 1
18479      ;;
18480    esac
18481
18482
18483 if test "$setuid_hacks" = yes; then
18484   true
18485 elif test "$setuid_hacks" != no; then
18486   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
18487   exit 1
18488 fi
18489
18490
18491 ###############################################################################
18492 #
18493 #       Done testing.  Now, set up the various -I and -L variables,
18494 #       and decide which GUI program to build by default.
18495 #
18496 ###############################################################################
18497
18498 DEPEND=makedepend
18499 DEPEND_FLAGS=
18500 DEPEND_DEFINES=
18501
18502
18503 if test \! -z "$includedir" ; then
18504   INCLUDES="$INCLUDES -I$includedir"
18505 fi
18506
18507 if test \! -z "$libdir" ; then
18508   LDFLAGS="$LDFLAGS -L$libdir"
18509 fi
18510
18511
18512 PREFERRED_DEMO_PROGRAM=''
18513 ALL_DEMO_PROGRAMS=
18514 if test "$have_motif" = yes; then
18515   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
18516   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
18517 fi
18518 if test "$have_gtk" = yes; then
18519   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
18520   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
18521 fi
18522
18523
18524 if test "$have_kerberos" = yes; then
18525   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
18526   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
18527 fi
18528 if test "$have_pam" = yes; then
18529   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
18530   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
18531   INSTALL_PAM="install-pam"
18532 fi
18533   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
18534   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
18535
18536
18537 if test "$enable_locking" = yes; then
18538   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
18539   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
18540 else
18541   LOCK_SRCS='$(NOLOCK_SRCS_1)'
18542   LOCK_OBJS='$(NOLOCK_OBJS_1)'
18543 fi
18544
18545 if test "$ac_macosx" = yes; then
18546   EXES_OSX='$(EXES_OSX)'
18547   SCRIPTS_OSX='$(SCRIPTS_OSX)'
18548   MEN_OSX='$(MEN_OSX)'
18549 else
18550   EXES_OSX=
18551   SCRIPTS_OSX=
18552   MEN_OSX=
18553 fi
18554
18555
18556 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
18557
18558 if test "$need_setuid" = yes; then
18559   NEED_SETUID=yes
18560 else
18561   NEED_SETUID=no
18562 fi
18563
18564 if test "$setuid_hacks" = yes; then
18565   SETUID_HACKS=yes
18566 else
18567   SETUID_HACKS=no
18568 fi
18569
18570 tab='   '
18571 if test "$have_gl" = yes; then
18572   GL_EXES='$(GL_EXES)'
18573   GL_UTIL_EXES='$(GL_UTIL_EXES)'
18574   GL_MEN='$(GL_MEN)'
18575   GL_KLUDGE="${tab}  "
18576 else
18577   GL_KLUDGE="-${tab}  "
18578 fi
18579
18580 if test "$have_gle" = yes; then
18581   GLE_EXES='$(GLE_EXES)'
18582   GLE_KLUDGE="${tab}   "
18583 else
18584   GLE_KLUDGE="-${tab}   "
18585 fi
18586
18587 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
18588  JPEG_EXES='$(JPEG_EXES)'
18589 fi
18590
18591
18592 # Another substitution in the XScreenSaver.ad.in file:
18593 #
18594 if test "$have_gnome_help" = yes; then
18595   GNOMEHELP_Y=''
18596   GNOMEHELP_N='!    '
18597 else
18598   GNOMEHELP_Y='!    '
18599   GNOMEHELP_N=''
18600 fi
18601
18602
18603 # Now that we know whether we have Gnome, we can decide where the XML
18604 # config files get installed.
18605 #
18606 if test -z "$HACK_CONF_DIR" ; then
18607   if test -n "$GNOME_DATADIR" ; then
18608     HACK_CONF_DIR='${GNOME_DATADIR}/control-center/screensavers'
18609   else
18610     HACK_CONF_DIR='${prefix}/lib/xscreensaver/config'
18611   fi
18612 fi
18613
18614
18615
18616 # After computing $HACK_CONF_DIR, make sure $GLADE_DATADIR has a value
18617 # so that we know where to install the Gtk pixmaps.
18618 #
18619 # It should usually be "/usr/share/pixmaps/", but we can't just use
18620 # "$(prefix)/share/pixmaps" because that would usually result in
18621 # "/usr/X11R6/share/pixmaps/", which is wrong.  It needs to be the
18622 # Gnome/Gtk prefix, not the overall prefix.
18623 #
18624 if test -n "$GNOME_DATADIR" ; then
18625   GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver'
18626 elif test "$have_gtk" = yes; then
18627   if test -n "$pkg_config"; then
18628     if test "$have_gtk2" = yes; then
18629       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
18630     else
18631       GLADE_DATADIR=`$pkg_config --variable=prefix gtk+`
18632     fi
18633   else
18634     GLADE_DATADIR=`$gtk_config --prefix`
18635   fi
18636   GLADE_DATADIR="$GLADE_DATADIR/share/xscreensaver"
18637 else
18638   GLADE_DATADIR=''
18639 fi
18640
18641
18642 # Set PO_DATADIR to something sensible.
18643 #
18644 echo "$as_me:$LINENO: checking for locale directory" >&5
18645 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
18646 if test -n "$GNOME_DATADIR" ; then
18647   PO_DATADIR="$GNOME_DATADIR"
18648 elif test "$have_gtk" = yes; then
18649   if test -n "$pkg_config"; then
18650     if test "$have_gtk2" = yes; then
18651       PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
18652     else
18653       PO_DATADIR=`$pkg_config --variable=prefix gtk+`
18654     fi
18655   else
18656     PO_DATADIR=`$gtk_config --prefix`
18657   fi
18658   PO_DATADIR="$PO_DATADIR/share"
18659 fi
18660
18661 if test -z "$PO_DATADIR" ; then
18662   #
18663   # #### Total fucking kludge --
18664   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
18665   # but of course we need to expand all the nested variables to do that...
18666   #
18667   dd=$datadir
18668   eval dd=${dd}
18669   eval dd=${dd}
18670   eval dd=${dd}
18671   eval dd=${dd}
18672   eval dd=${dd}
18673   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
18674 fi
18675
18676 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
18677 echo "${ECHO_T}$PO_DATADIR/locale" >&6
18678
18679
18680 # canonicalize slashes.
18681 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
18682
18683 # gcc 3.0 likes to issue this warning for every file:
18684 #
18685 # cc1: warning: changing search order for system directory "/usr/local/include"
18686 # cc1: warning:   as it has already been specified as a non-system directory
18687 #
18688 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
18689 # Which *should* be totally redundant, and thus an ok thing to delete?
18690 #
18691 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
18692
18693
18694 ###############################################################################
18695 #
18696 #       Perform substitutions and write Makefiles.
18697 #
18698 ###############################################################################
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753 APPDEFAULTS=$ac_x_app_defaults
18754
18755
18756
18757
18758
18759
18760
18761                                                                                 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"
18762 cat >confcache <<\_ACEOF
18763 # This file is a shell script that caches the results of configure
18764 # tests run on this system so they can be shared between configure
18765 # scripts and configure runs, see configure's option --config-cache.
18766 # It is not useful on other systems.  If it contains results you don't
18767 # want to keep, you may remove or edit it.
18768 #
18769 # config.status only pays attention to the cache file if you give it
18770 # the --recheck option to rerun configure.
18771 #
18772 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18773 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18774 # following values.
18775
18776 _ACEOF
18777
18778 # The following way of writing the cache mishandles newlines in values,
18779 # but we know of no workaround that is simple, portable, and efficient.
18780 # So, don't put newlines in cache variables' values.
18781 # Ultrix sh set writes to stderr and can't be redirected directly,
18782 # and sets the high bit in the cache file unless we assign to the vars.
18783 {
18784   (set) 2>&1 |
18785     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18786     *ac_space=\ *)
18787       # `set' does not quote correctly, so add quotes (double-quote
18788       # substitution turns \\\\ into \\, and sed turns \\ into \).
18789       sed -n \
18790         "s/'/'\\\\''/g;
18791           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18792       ;;
18793     *)
18794       # `set' quotes correctly as required by POSIX, so do not add quotes.
18795       sed -n \
18796         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18797       ;;
18798     esac;
18799 } |
18800   sed '
18801      t clear
18802      : clear
18803      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18804      t end
18805      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18806      : end' >>confcache
18807 if diff $cache_file confcache >/dev/null 2>&1; then :; else
18808   if test -w $cache_file; then
18809     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18810     cat confcache >$cache_file
18811   else
18812     echo "not updating unwritable cache $cache_file"
18813   fi
18814 fi
18815 rm -f confcache
18816
18817 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18818 # Let make expand exec_prefix.
18819 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18820
18821 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18822 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18823 # trailing colons and then remove the whole line if VPATH becomes empty
18824 # (actually we leave an empty line to preserve line numbers).
18825 if test "x$srcdir" = x.; then
18826   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18827 s/:*\$(srcdir):*/:/;
18828 s/:*\${srcdir}:*/:/;
18829 s/:*@srcdir@:*/:/;
18830 s/^\([^=]*=[    ]*\):*/\1/;
18831 s/:*$//;
18832 s/^[^=]*=[      ]*$//;
18833 }'
18834 fi
18835
18836 DEFS=-DHAVE_CONFIG_H
18837
18838 ac_libobjs=
18839 ac_ltlibobjs=
18840 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18841   # 1. Remove the extension, and $U if already installed.
18842   ac_i=`echo "$ac_i" |
18843          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18844   # 2. Add them.
18845   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18846   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18847 done
18848 LIBOBJS=$ac_libobjs
18849
18850 LTLIBOBJS=$ac_ltlibobjs
18851
18852
18853
18854
18855         mv -f po/POTFILES po/POTFILES.tmp
18856         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
18857         rm -f po/POTFILES.tmp
18858
18859
18860
18861 : ${CONFIG_STATUS=./config.status}
18862 ac_clean_files_save=$ac_clean_files
18863 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18864 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18865 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18866 cat >$CONFIG_STATUS <<_ACEOF
18867 #! $SHELL
18868 # Generated by $as_me.
18869 # Run this file to recreate the current configuration.
18870 # Compiler output produced by configure, useful for debugging
18871 # configure, is in config.log if it exists.
18872
18873 debug=false
18874 ac_cs_recheck=false
18875 ac_cs_silent=false
18876 SHELL=\${CONFIG_SHELL-$SHELL}
18877 _ACEOF
18878
18879 cat >>$CONFIG_STATUS <<\_ACEOF
18880 ## --------------------- ##
18881 ## M4sh Initialization.  ##
18882 ## --------------------- ##
18883
18884 # Be Bourne compatible
18885 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18886   emulate sh
18887   NULLCMD=:
18888   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18889   # is contrary to our usage.  Disable this feature.
18890   alias -g '${1+"$@"}'='"$@"'
18891 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18892   set -o posix
18893 fi
18894
18895 # Support unset when possible.
18896 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18897   as_unset=unset
18898 else
18899   as_unset=false
18900 fi
18901
18902
18903 # Work around bugs in pre-3.0 UWIN ksh.
18904 $as_unset ENV MAIL MAILPATH
18905 PS1='$ '
18906 PS2='> '
18907 PS4='+ '
18908
18909 # NLS nuisances.
18910 for as_var in \
18911   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18912   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18913   LC_TELEPHONE LC_TIME
18914 do
18915   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18916     eval $as_var=C; export $as_var
18917   else
18918     $as_unset $as_var
18919   fi
18920 done
18921
18922 # Required to use basename.
18923 if expr a : '\(a\)' >/dev/null 2>&1; then
18924   as_expr=expr
18925 else
18926   as_expr=false
18927 fi
18928
18929 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18930   as_basename=basename
18931 else
18932   as_basename=false
18933 fi
18934
18935
18936 # Name of the executable.
18937 as_me=`$as_basename "$0" ||
18938 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18939          X"$0" : 'X\(//\)$' \| \
18940          X"$0" : 'X\(/\)$' \| \
18941          .     : '\(.\)' 2>/dev/null ||
18942 echo X/"$0" |
18943     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18944           /^X\/\(\/\/\)$/{ s//\1/; q; }
18945           /^X\/\(\/\).*/{ s//\1/; q; }
18946           s/.*/./; q'`
18947
18948
18949 # PATH needs CR, and LINENO needs CR and PATH.
18950 # Avoid depending upon Character Ranges.
18951 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18952 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18953 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18954 as_cr_digits='0123456789'
18955 as_cr_alnum=$as_cr_Letters$as_cr_digits
18956
18957 # The user is always right.
18958 if test "${PATH_SEPARATOR+set}" != set; then
18959   echo "#! /bin/sh" >conf$$.sh
18960   echo  "exit 0"   >>conf$$.sh
18961   chmod +x conf$$.sh
18962   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
18963     PATH_SEPARATOR=';'
18964   else
18965     PATH_SEPARATOR=:
18966   fi
18967   rm -f conf$$.sh
18968 fi
18969
18970
18971   as_lineno_1=$LINENO
18972   as_lineno_2=$LINENO
18973   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18974   test "x$as_lineno_1" != "x$as_lineno_2" &&
18975   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
18976   # Find who we are.  Look in the path if we contain no path at all
18977   # relative or not.
18978   case $0 in
18979     *[\\/]* ) as_myself=$0 ;;
18980     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18981 for as_dir in $PATH
18982 do
18983   IFS=$as_save_IFS
18984   test -z "$as_dir" && as_dir=.
18985   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18986 done
18987
18988        ;;
18989   esac
18990   # We did not find ourselves, most probably we were run as `sh COMMAND'
18991   # in which case we are not to be found in the path.
18992   if test "x$as_myself" = x; then
18993     as_myself=$0
18994   fi
18995   if test ! -f "$as_myself"; then
18996     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18997 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18998    { (exit 1); exit 1; }; }
18999   fi
19000   case $CONFIG_SHELL in
19001   '')
19002     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19003 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
19004 do
19005   IFS=$as_save_IFS
19006   test -z "$as_dir" && as_dir=.
19007   for as_base in sh bash ksh sh5; do
19008          case $as_dir in
19009          /*)
19010            if ("$as_dir/$as_base" -c '
19011   as_lineno_1=$LINENO
19012   as_lineno_2=$LINENO
19013   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19014   test "x$as_lineno_1" != "x$as_lineno_2" &&
19015   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
19016              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
19017              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
19018              CONFIG_SHELL=$as_dir/$as_base
19019              export CONFIG_SHELL
19020              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
19021            fi;;
19022          esac
19023        done
19024 done
19025 ;;
19026   esac
19027
19028   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
19029   # uniformly replaced by the line number.  The first 'sed' inserts a
19030   # line-number line before each line; the second 'sed' does the real
19031   # work.  The second script uses 'N' to pair each line-number line
19032   # with the numbered line, and appends trailing '-' during
19033   # substitution so that $LINENO is not a special case at line end.
19034   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
19035   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
19036   sed '=' <$as_myself |
19037     sed '
19038       N
19039       s,$,-,
19040       : loop
19041       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
19042       t loop
19043       s,-$,,
19044       s,^['$as_cr_digits']*\n,,
19045     ' >$as_me.lineno &&
19046   chmod +x $as_me.lineno ||
19047     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
19048 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
19049    { (exit 1); exit 1; }; }
19050
19051   # Don't try to exec as it changes $[0], causing all sort of problems
19052   # (the dirname of $[0] is not the place where we might find the
19053   # original and so on.  Autoconf is especially sensible to this).
19054   . ./$as_me.lineno
19055   # Exit status is that of the last command.
19056   exit
19057 }
19058
19059
19060 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
19061   *c*,-n*) ECHO_N= ECHO_C='
19062 ' ECHO_T='      ' ;;
19063   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
19064   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
19065 esac
19066
19067 if expr a : '\(a\)' >/dev/null 2>&1; then
19068   as_expr=expr
19069 else
19070   as_expr=false
19071 fi
19072
19073 rm -f conf$$ conf$$.exe conf$$.file
19074 echo >conf$$.file
19075 if ln -s conf$$.file conf$$ 2>/dev/null; then
19076   # We could just check for DJGPP; but this test a) works b) is more generic
19077   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19078   if test -f conf$$.exe; then
19079     # Don't use ln at all; we don't have any links
19080     as_ln_s='cp -p'
19081   else
19082     as_ln_s='ln -s'
19083   fi
19084 elif ln conf$$.file conf$$ 2>/dev/null; then
19085   as_ln_s=ln
19086 else
19087   as_ln_s='cp -p'
19088 fi
19089 rm -f conf$$ conf$$.exe conf$$.file
19090
19091 if mkdir -p . 2>/dev/null; then
19092   as_mkdir_p=:
19093 else
19094   as_mkdir_p=false
19095 fi
19096
19097 as_executable_p="test -f"
19098
19099 # Sed expression to map a string onto a valid CPP name.
19100 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
19101
19102 # Sed expression to map a string onto a valid variable name.
19103 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19104
19105
19106 # IFS
19107 # We need space, tab and new line, in precisely that order.
19108 as_nl='
19109 '
19110 IFS="   $as_nl"
19111
19112 # CDPATH.
19113 $as_unset CDPATH
19114
19115 exec 6>&1
19116
19117 # Open the log real soon, to keep \$[0] and so on meaningful, and to
19118 # report actual input values of CONFIG_FILES etc. instead of their
19119 # values after options handling.  Logging --version etc. is OK.
19120 exec 5>>config.log
19121 {
19122   echo
19123   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19124 ## Running $as_me. ##
19125 _ASBOX
19126 } >&5
19127 cat >&5 <<_CSEOF
19128
19129 This file was extended by $as_me, which was
19130 generated by GNU Autoconf 2.57.  Invocation command line was
19131
19132   CONFIG_FILES    = $CONFIG_FILES
19133   CONFIG_HEADERS  = $CONFIG_HEADERS
19134   CONFIG_LINKS    = $CONFIG_LINKS
19135   CONFIG_COMMANDS = $CONFIG_COMMANDS
19136   $ $0 $@
19137
19138 _CSEOF
19139 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19140 echo >&5
19141 _ACEOF
19142
19143 # Files that config.status was made for.
19144 if test -n "$ac_config_files"; then
19145   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19146 fi
19147
19148 if test -n "$ac_config_headers"; then
19149   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19150 fi
19151
19152 if test -n "$ac_config_links"; then
19153   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19154 fi
19155
19156 if test -n "$ac_config_commands"; then
19157   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19158 fi
19159
19160 cat >>$CONFIG_STATUS <<\_ACEOF
19161
19162 ac_cs_usage="\
19163 \`$as_me' instantiates files from templates according to the
19164 current configuration.
19165
19166 Usage: $0 [OPTIONS] [FILE]...
19167
19168   -h, --help       print this help, then exit
19169   -V, --version    print version number, then exit
19170   -q, --quiet      do not print progress messages
19171   -d, --debug      don't remove temporary files
19172       --recheck    update $as_me by reconfiguring in the same conditions
19173   --file=FILE[:TEMPLATE]
19174                    instantiate the configuration file FILE
19175   --header=FILE[:TEMPLATE]
19176                    instantiate the configuration header FILE
19177
19178 Configuration files:
19179 $config_files
19180
19181 Configuration headers:
19182 $config_headers
19183
19184 Configuration commands:
19185 $config_commands
19186
19187 Report bugs to <bug-autoconf@gnu.org>."
19188 _ACEOF
19189
19190 cat >>$CONFIG_STATUS <<_ACEOF
19191 ac_cs_version="\\
19192 config.status
19193 configured by $0, generated by GNU Autoconf 2.57,
19194   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19195
19196 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19197 Free Software Foundation, Inc.
19198 This config.status script is free software; the Free Software Foundation
19199 gives unlimited permission to copy, distribute and modify it."
19200 srcdir=$srcdir
19201 INSTALL="$INSTALL"
19202 _ACEOF
19203
19204 cat >>$CONFIG_STATUS <<\_ACEOF
19205 # If no file are specified by the user, then we need to provide default
19206 # value.  By we need to know if files were specified by the user.
19207 ac_need_defaults=:
19208 while test $# != 0
19209 do
19210   case $1 in
19211   --*=*)
19212     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19213     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19214     ac_shift=:
19215     ;;
19216   -*)
19217     ac_option=$1
19218     ac_optarg=$2
19219     ac_shift=shift
19220     ;;
19221   *) # This is not an option, so the user has probably given explicit
19222      # arguments.
19223      ac_option=$1
19224      ac_need_defaults=false;;
19225   esac
19226
19227   case $ac_option in
19228   # Handling of the options.
19229 _ACEOF
19230 cat >>$CONFIG_STATUS <<\_ACEOF
19231   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19232     ac_cs_recheck=: ;;
19233   --version | --vers* | -V )
19234     echo "$ac_cs_version"; exit 0 ;;
19235   --he | --h)
19236     # Conflict between --help and --header
19237     { { echo "$as_me:$LINENO: error: ambiguous option: $1
19238 Try \`$0 --help' for more information." >&5
19239 echo "$as_me: error: ambiguous option: $1
19240 Try \`$0 --help' for more information." >&2;}
19241    { (exit 1); exit 1; }; };;
19242   --help | --hel | -h )
19243     echo "$ac_cs_usage"; exit 0 ;;
19244   --debug | --d* | -d )
19245     debug=: ;;
19246   --file | --fil | --fi | --f )
19247     $ac_shift
19248     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
19249     ac_need_defaults=false;;
19250   --header | --heade | --head | --hea )
19251     $ac_shift
19252     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
19253     ac_need_defaults=false;;
19254   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19255   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19256     ac_cs_silent=: ;;
19257
19258   # This is an error.
19259   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
19260 Try \`$0 --help' for more information." >&5
19261 echo "$as_me: error: unrecognized option: $1
19262 Try \`$0 --help' for more information." >&2;}
19263    { (exit 1); exit 1; }; } ;;
19264
19265   *) ac_config_targets="$ac_config_targets $1" ;;
19266
19267   esac
19268   shift
19269 done
19270
19271 ac_configure_extra_args=
19272
19273 if $ac_cs_silent; then
19274   exec 6>/dev/null
19275   ac_configure_extra_args="$ac_configure_extra_args --silent"
19276 fi
19277
19278 _ACEOF
19279 cat >>$CONFIG_STATUS <<_ACEOF
19280 if \$ac_cs_recheck; then
19281   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19282   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19283 fi
19284
19285 _ACEOF
19286
19287 cat >>$CONFIG_STATUS <<_ACEOF
19288 #
19289 # INIT-COMMANDS section.
19290 #
19291
19292 INTLTOOL_PERL=${INTLTOOL_PERL}
19293
19294
19295 _ACEOF
19296
19297
19298
19299 cat >>$CONFIG_STATUS <<\_ACEOF
19300 for ac_config_target in $ac_config_targets
19301 do
19302   case "$ac_config_target" in
19303   # Handling of arguments.
19304   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19305   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
19306   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
19307   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
19308   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
19309   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
19310   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
19311   "driver/xscreensaver.kss" ) CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.kss" ;;
19312   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
19313   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
19314   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
19315   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19316 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19317    { (exit 1); exit 1; }; };;
19318   esac
19319 done
19320
19321 # If the user did not use the arguments to specify the items to instantiate,
19322 # then the envvar interface is used.  Set only those that are not.
19323 # We use the long form for the default assignment because of an extremely
19324 # bizarre bug on SunOS 4.1.3.
19325 if $ac_need_defaults; then
19326   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19327   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19328   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19329 fi
19330
19331 # Have a temporary directory for convenience.  Make it in the build tree
19332 # simply because there is no reason to put it here, and in addition,
19333 # creating and moving files from /tmp can sometimes cause problems.
19334 # Create a temporary directory, and hook for its removal unless debugging.
19335 $debug ||
19336 {
19337   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19338   trap '{ (exit 1); exit 1; }' 1 2 13 15
19339 }
19340
19341 # Create a (secure) tmp directory for tmp files.
19342
19343 {
19344   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
19345   test -n "$tmp" && test -d "$tmp"
19346 }  ||
19347 {
19348   tmp=./confstat$$-$RANDOM
19349   (umask 077 && mkdir $tmp)
19350 } ||
19351 {
19352    echo "$me: cannot create a temporary directory in ." >&2
19353    { (exit 1); exit 1; }
19354 }
19355
19356 _ACEOF
19357
19358 cat >>$CONFIG_STATUS <<_ACEOF
19359
19360 #
19361 # CONFIG_FILES section.
19362 #
19363
19364 # No need to generate the scripts if there are no CONFIG_FILES.
19365 # This happens for instance when ./config.status config.h
19366 if test -n "\$CONFIG_FILES"; then
19367   # Protect against being on the right side of a sed subst in config.status.
19368   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19369    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19370 s,@SHELL@,$SHELL,;t t
19371 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19372 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19373 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19374 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19375 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19376 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19377 s,@exec_prefix@,$exec_prefix,;t t
19378 s,@prefix@,$prefix,;t t
19379 s,@program_transform_name@,$program_transform_name,;t t
19380 s,@bindir@,$bindir,;t t
19381 s,@sbindir@,$sbindir,;t t
19382 s,@libexecdir@,$libexecdir,;t t
19383 s,@datadir@,$datadir,;t t
19384 s,@sysconfdir@,$sysconfdir,;t t
19385 s,@sharedstatedir@,$sharedstatedir,;t t
19386 s,@localstatedir@,$localstatedir,;t t
19387 s,@libdir@,$libdir,;t t
19388 s,@includedir@,$includedir,;t t
19389 s,@oldincludedir@,$oldincludedir,;t t
19390 s,@infodir@,$infodir,;t t
19391 s,@mandir@,$mandir,;t t
19392 s,@build_alias@,$build_alias,;t t
19393 s,@host_alias@,$host_alias,;t t
19394 s,@target_alias@,$target_alias,;t t
19395 s,@DEFS@,$DEFS,;t t
19396 s,@ECHO_C@,$ECHO_C,;t t
19397 s,@ECHO_N@,$ECHO_N,;t t
19398 s,@ECHO_T@,$ECHO_T,;t t
19399 s,@LIBS@,$LIBS,;t t
19400 s,@build@,$build,;t t
19401 s,@build_cpu@,$build_cpu,;t t
19402 s,@build_vendor@,$build_vendor,;t t
19403 s,@build_os@,$build_os,;t t
19404 s,@host@,$host,;t t
19405 s,@host_cpu@,$host_cpu,;t t
19406 s,@host_vendor@,$host_vendor,;t t
19407 s,@host_os@,$host_os,;t t
19408 s,@CC@,$CC,;t t
19409 s,@CFLAGS@,$CFLAGS,;t t
19410 s,@LDFLAGS@,$LDFLAGS,;t t
19411 s,@CPPFLAGS@,$CPPFLAGS,;t t
19412 s,@ac_ct_CC@,$ac_ct_CC,;t t
19413 s,@EXEEXT@,$EXEEXT,;t t
19414 s,@OBJEXT@,$OBJEXT,;t t
19415 s,@CPP@,$CPP,;t t
19416 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19417 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19418 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19419 s,@SET_MAKE@,$SET_MAKE,;t t
19420 s,@EGREP@,$EGREP,;t t
19421 s,@PERL@,$PERL,;t t
19422 s,@X_CFLAGS@,$X_CFLAGS,;t t
19423 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
19424 s,@X_LIBS@,$X_LIBS,;t t
19425 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
19426 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
19427 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
19428 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
19429 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
19430 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
19431 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
19432 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
19433 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
19434 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
19435 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
19436 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
19437 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
19438 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
19439 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
19440 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
19441 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
19442 s,@RANLIB@,$RANLIB,;t t
19443 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19444 s,@ALLOCA@,$ALLOCA,;t t
19445 s,@USE_NLS@,$USE_NLS,;t t
19446 s,@MSGFMT@,$MSGFMT,;t t
19447 s,@GMSGFMT@,$GMSGFMT,;t t
19448 s,@XGETTEXT@,$XGETTEXT,;t t
19449 s,@CATALOGS@,$CATALOGS,;t t
19450 s,@CATOBJEXT@,$CATOBJEXT,;t t
19451 s,@DATADIRNAME@,$DATADIRNAME,;t t
19452 s,@GMOFILES@,$GMOFILES,;t t
19453 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
19454 s,@INTLDEPS@,$INTLDEPS,;t t
19455 s,@INTLLIBS@,$INTLLIBS,;t t
19456 s,@INTLOBJS@,$INTLOBJS,;t t
19457 s,@POFILES@,$POFILES,;t t
19458 s,@POSUB@,$POSUB,;t t
19459 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
19460 s,@pkg_config@,$pkg_config,;t t
19461 s,@glib_config@,$glib_config,;t t
19462 s,@gtk_config@,$gtk_config,;t t
19463 s,@gnome_config@,$gnome_config,;t t
19464 s,@have_gnome_help@,$have_gnome_help,;t t
19465 s,@xml_config@,$xml_config,;t t
19466 s,@gdk_pixbuf_config@,$gdk_pixbuf_config,;t t
19467 s,@fortune_tmp@,$fortune_tmp,;t t
19468 s,@INCLUDES@,$INCLUDES,;t t
19469 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
19470 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
19471 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
19472 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
19473 s,@GTK_LIBS@,$GTK_LIBS,;t t
19474 s,@XML_LIBS@,$XML_LIBS,;t t
19475 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
19476 s,@HACK_LIBS@,$HACK_LIBS,;t t
19477 s,@XPM_LIBS@,$XPM_LIBS,;t t
19478 s,@GL_LIBS@,$GL_LIBS,;t t
19479 s,@GLE_LIBS@,$GLE_LIBS,;t t
19480 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
19481 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
19482 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
19483 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
19484 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
19485 s,@NEED_SETUID@,$NEED_SETUID,;t t
19486 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
19487 s,@OBJCC@,$OBJCC,;t t
19488 s,@EXES_OSX@,$EXES_OSX,;t t
19489 s,@SCRIPTS_OSX@,$SCRIPTS_OSX,;t t
19490 s,@MEN_OSX@,$MEN_OSX,;t t
19491 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
19492 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
19493 s,@XMU_SRCS@,$XMU_SRCS,;t t
19494 s,@XMU_OBJS@,$XMU_OBJS,;t t
19495 s,@XMU_LIBS@,$XMU_LIBS,;t t
19496 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
19497 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
19498 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
19499 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
19500 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
19501 s,@JPEG_EXES@,$JPEG_EXES,;t t
19502 s,@GL_EXES@,$GL_EXES,;t t
19503 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
19504 s,@GL_MEN@,$GL_MEN,;t t
19505 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
19506 s,@GLE_EXES@,$GLE_EXES,;t t
19507 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
19508 s,@GNOMEHELP_Y@,$GNOMEHELP_Y,;t t
19509 s,@GNOMEHELP_N@,$GNOMEHELP_N,;t t
19510 s,@HACKDIR@,$HACKDIR,;t t
19511 s,@GNOME_DATADIR@,$GNOME_DATADIR,;t t
19512 s,@GLADE_DATADIR@,$GLADE_DATADIR,;t t
19513 s,@PO_DATADIR@,$PO_DATADIR,;t t
19514 s,@GNOME_PANELDIR@,$GNOME_PANELDIR,;t t
19515 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
19516 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
19517 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
19518 s,@DEPEND@,$DEPEND,;t t
19519 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
19520 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
19521 s,@LIBOBJS@,$LIBOBJS,;t t
19522 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
19523 CEOF
19524
19525 _ACEOF
19526
19527   cat >>$CONFIG_STATUS <<\_ACEOF
19528   # Split the substitutions into bite-sized pieces for seds with
19529   # small command number limits, like on Digital OSF/1 and HP-UX.
19530   ac_max_sed_lines=48
19531   ac_sed_frag=1 # Number of current file.
19532   ac_beg=1 # First line for current file.
19533   ac_end=$ac_max_sed_lines # Line after last line for current file.
19534   ac_more_lines=:
19535   ac_sed_cmds=
19536   while $ac_more_lines; do
19537     if test $ac_beg -gt 1; then
19538       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19539     else
19540       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19541     fi
19542     if test ! -s $tmp/subs.frag; then
19543       ac_more_lines=false
19544     else
19545       # The purpose of the label and of the branching condition is to
19546       # speed up the sed processing (if there are no `@' at all, there
19547       # is no need to browse any of the substitutions).
19548       # These are the two extra sed commands mentioned above.
19549       (echo ':t
19550   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19551       if test -z "$ac_sed_cmds"; then
19552         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19553       else
19554         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19555       fi
19556       ac_sed_frag=`expr $ac_sed_frag + 1`
19557       ac_beg=$ac_end
19558       ac_end=`expr $ac_end + $ac_max_sed_lines`
19559     fi
19560   done
19561   if test -z "$ac_sed_cmds"; then
19562     ac_sed_cmds=cat
19563   fi
19564 fi # test -n "$CONFIG_FILES"
19565
19566 _ACEOF
19567 cat >>$CONFIG_STATUS <<\_ACEOF
19568 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19569   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19570   case $ac_file in
19571   - | *:- | *:-:* ) # input from stdin
19572         cat >$tmp/stdin
19573         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19574         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19575   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19576         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19577   * )   ac_file_in=$ac_file.in ;;
19578   esac
19579
19580   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19581   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19582 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19583          X"$ac_file" : 'X\(//\)[^/]' \| \
19584          X"$ac_file" : 'X\(//\)$' \| \
19585          X"$ac_file" : 'X\(/\)' \| \
19586          .     : '\(.\)' 2>/dev/null ||
19587 echo X"$ac_file" |
19588     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19589           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19590           /^X\(\/\/\)$/{ s//\1/; q; }
19591           /^X\(\/\).*/{ s//\1/; q; }
19592           s/.*/./; q'`
19593   { if $as_mkdir_p; then
19594     mkdir -p "$ac_dir"
19595   else
19596     as_dir="$ac_dir"
19597     as_dirs=
19598     while test ! -d "$as_dir"; do
19599       as_dirs="$as_dir $as_dirs"
19600       as_dir=`(dirname "$as_dir") 2>/dev/null ||
19601 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19602          X"$as_dir" : 'X\(//\)[^/]' \| \
19603          X"$as_dir" : 'X\(//\)$' \| \
19604          X"$as_dir" : 'X\(/\)' \| \
19605          .     : '\(.\)' 2>/dev/null ||
19606 echo X"$as_dir" |
19607     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19608           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19609           /^X\(\/\/\)$/{ s//\1/; q; }
19610           /^X\(\/\).*/{ s//\1/; q; }
19611           s/.*/./; q'`
19612     done
19613     test ! -n "$as_dirs" || mkdir $as_dirs
19614   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19615 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19616    { (exit 1); exit 1; }; }; }
19617
19618   ac_builddir=.
19619
19620 if test "$ac_dir" != .; then
19621   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19622   # A "../" for each directory in $ac_dir_suffix.
19623   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19624 else
19625   ac_dir_suffix= ac_top_builddir=
19626 fi
19627
19628 case $srcdir in
19629   .)  # No --srcdir option.  We are building in place.
19630     ac_srcdir=.
19631     if test -z "$ac_top_builddir"; then
19632        ac_top_srcdir=.
19633     else
19634        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19635     fi ;;
19636   [\\/]* | ?:[\\/]* )  # Absolute path.
19637     ac_srcdir=$srcdir$ac_dir_suffix;
19638     ac_top_srcdir=$srcdir ;;
19639   *) # Relative path.
19640     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19641     ac_top_srcdir=$ac_top_builddir$srcdir ;;
19642 esac
19643 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19644 # absolute.
19645 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
19646 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
19647 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19648 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19649
19650
19651   case $INSTALL in
19652   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19653   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
19654   esac
19655
19656   if test x"$ac_file" != x-; then
19657     { echo "$as_me:$LINENO: creating $ac_file" >&5
19658 echo "$as_me: creating $ac_file" >&6;}
19659     rm -f "$ac_file"
19660   fi
19661   # Let's still pretend it is `configure' which instantiates (i.e., don't
19662   # use $as_me), people would be surprised to read:
19663   #    /* config.h.  Generated by config.status.  */
19664   if test x"$ac_file" = x-; then
19665     configure_input=
19666   else
19667     configure_input="$ac_file.  "
19668   fi
19669   configure_input=$configure_input"Generated from `echo $ac_file_in |
19670                                      sed 's,.*/,,'` by configure."
19671
19672   # First look for the input files in the build tree, otherwise in the
19673   # src tree.
19674   ac_file_inputs=`IFS=:
19675     for f in $ac_file_in; do
19676       case $f in
19677       -) echo $tmp/stdin ;;
19678       [\\/$]*)
19679          # Absolute (can't be DOS-style, as IFS=:)
19680          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19681 echo "$as_me: error: cannot find input file: $f" >&2;}
19682    { (exit 1); exit 1; }; }
19683          echo $f;;
19684       *) # Relative
19685          if test -f "$f"; then
19686            # Build tree
19687            echo $f
19688          elif test -f "$srcdir/$f"; then
19689            # Source tree
19690            echo $srcdir/$f
19691          else
19692            # /dev/null tree
19693            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19694 echo "$as_me: error: cannot find input file: $f" >&2;}
19695    { (exit 1); exit 1; }; }
19696          fi;;
19697       esac
19698     done` || { (exit 1); exit 1; }
19699 _ACEOF
19700 cat >>$CONFIG_STATUS <<_ACEOF
19701   sed "$ac_vpsub
19702 $extrasub
19703 _ACEOF
19704 cat >>$CONFIG_STATUS <<\_ACEOF
19705 :t
19706 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19707 s,@configure_input@,$configure_input,;t t
19708 s,@srcdir@,$ac_srcdir,;t t
19709 s,@abs_srcdir@,$ac_abs_srcdir,;t t
19710 s,@top_srcdir@,$ac_top_srcdir,;t t
19711 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19712 s,@builddir@,$ac_builddir,;t t
19713 s,@abs_builddir@,$ac_abs_builddir,;t t
19714 s,@top_builddir@,$ac_top_builddir,;t t
19715 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19716 s,@INSTALL@,$ac_INSTALL,;t t
19717 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19718   rm -f $tmp/stdin
19719   if test x"$ac_file" != x-; then
19720     mv $tmp/out $ac_file
19721   else
19722     cat $tmp/out
19723     rm -f $tmp/out
19724   fi
19725
19726 done
19727 _ACEOF
19728 cat >>$CONFIG_STATUS <<\_ACEOF
19729
19730 #
19731 # CONFIG_HEADER section.
19732 #
19733
19734 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19735 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19736 #
19737 # ac_d sets the value in "#define NAME VALUE" lines.
19738 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
19739 ac_dB='[        ].*$,\1#\2'
19740 ac_dC=' '
19741 ac_dD=',;t'
19742 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19743 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19744 ac_uB='$,\1#\2define\3'
19745 ac_uC=' '
19746 ac_uD=',;t'
19747
19748 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19749   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19750   case $ac_file in
19751   - | *:- | *:-:* ) # input from stdin
19752         cat >$tmp/stdin
19753         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19754         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19755   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19756         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19757   * )   ac_file_in=$ac_file.in ;;
19758   esac
19759
19760   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19761 echo "$as_me: creating $ac_file" >&6;}
19762
19763   # First look for the input files in the build tree, otherwise in the
19764   # src tree.
19765   ac_file_inputs=`IFS=:
19766     for f in $ac_file_in; do
19767       case $f in
19768       -) echo $tmp/stdin ;;
19769       [\\/$]*)
19770          # Absolute (can't be DOS-style, as IFS=:)
19771          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19772 echo "$as_me: error: cannot find input file: $f" >&2;}
19773    { (exit 1); exit 1; }; }
19774          echo $f;;
19775       *) # Relative
19776          if test -f "$f"; then
19777            # Build tree
19778            echo $f
19779          elif test -f "$srcdir/$f"; then
19780            # Source tree
19781            echo $srcdir/$f
19782          else
19783            # /dev/null tree
19784            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19785 echo "$as_me: error: cannot find input file: $f" >&2;}
19786    { (exit 1); exit 1; }; }
19787          fi;;
19788       esac
19789     done` || { (exit 1); exit 1; }
19790   # Remove the trailing spaces.
19791   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
19792
19793 _ACEOF
19794
19795 # Transform confdefs.h into two sed scripts, `conftest.defines' and
19796 # `conftest.undefs', that substitutes the proper values into
19797 # config.h.in to produce config.h.  The first handles `#define'
19798 # templates, and the second `#undef' templates.
19799 # And first: Protect against being on the right side of a sed subst in
19800 # config.status.  Protect against being in an unquoted here document
19801 # in config.status.
19802 rm -f conftest.defines conftest.undefs
19803 # Using a here document instead of a string reduces the quoting nightmare.
19804 # Putting comments in sed scripts is not portable.
19805 #
19806 # `end' is used to avoid that the second main sed command (meant for
19807 # 0-ary CPP macros) applies to n-ary macro definitions.
19808 # See the Autoconf documentation for `clear'.
19809 cat >confdef2sed.sed <<\_ACEOF
19810 s/[\\&,]/\\&/g
19811 s,[\\$`],\\&,g
19812 t clear
19813 : clear
19814 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19815 t end
19816 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19817 : end
19818 _ACEOF
19819 # If some macros were called several times there might be several times
19820 # the same #defines, which is useless.  Nevertheless, we may not want to
19821 # sort them, since we want the *last* AC-DEFINE to be honored.
19822 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19823 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19824 rm -f confdef2sed.sed
19825
19826 # This sed command replaces #undef with comments.  This is necessary, for
19827 # example, in the case of _POSIX_SOURCE, which is predefined and required
19828 # on some systems where configure will not decide to define it.
19829 cat >>conftest.undefs <<\_ACEOF
19830 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19831 _ACEOF
19832
19833 # Break up conftest.defines because some shells have a limit on the size
19834 # of here documents, and old seds have small limits too (100 cmds).
19835 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
19836 echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
19837 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19838 echo '  :' >>$CONFIG_STATUS
19839 rm -f conftest.tail
19840 while grep . conftest.defines >/dev/null
19841 do
19842   # Write a limited-size here document to $tmp/defines.sed.
19843   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19844   # Speed up: don't consider the non `#define' lines.
19845   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
19846   # Work around the forget-to-reset-the-flag bug.
19847   echo 't clr' >>$CONFIG_STATUS
19848   echo ': clr' >>$CONFIG_STATUS
19849   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
19850   echo 'CEOF
19851   sed -f $tmp/defines.sed $tmp/in >$tmp/out
19852   rm -f $tmp/in
19853   mv $tmp/out $tmp/in
19854 ' >>$CONFIG_STATUS
19855   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19856   rm -f conftest.defines
19857   mv conftest.tail conftest.defines
19858 done
19859 rm -f conftest.defines
19860 echo '  fi # grep' >>$CONFIG_STATUS
19861 echo >>$CONFIG_STATUS
19862
19863 # Break up conftest.undefs because some shells have a limit on the size
19864 # of here documents, and old seds have small limits too (100 cmds).
19865 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
19866 rm -f conftest.tail
19867 while grep . conftest.undefs >/dev/null
19868 do
19869   # Write a limited-size here document to $tmp/undefs.sed.
19870   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19871   # Speed up: don't consider the non `#undef'
19872   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
19873   # Work around the forget-to-reset-the-flag bug.
19874   echo 't clr' >>$CONFIG_STATUS
19875   echo ': clr' >>$CONFIG_STATUS
19876   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19877   echo 'CEOF
19878   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19879   rm -f $tmp/in
19880   mv $tmp/out $tmp/in
19881 ' >>$CONFIG_STATUS
19882   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19883   rm -f conftest.undefs
19884   mv conftest.tail conftest.undefs
19885 done
19886 rm -f conftest.undefs
19887
19888 cat >>$CONFIG_STATUS <<\_ACEOF
19889   # Let's still pretend it is `configure' which instantiates (i.e., don't
19890   # use $as_me), people would be surprised to read:
19891   #    /* config.h.  Generated by config.status.  */
19892   if test x"$ac_file" = x-; then
19893     echo "/* Generated by configure.  */" >$tmp/config.h
19894   else
19895     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
19896   fi
19897   cat $tmp/in >>$tmp/config.h
19898   rm -f $tmp/in
19899   if test x"$ac_file" != x-; then
19900     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
19901       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19902 echo "$as_me: $ac_file is unchanged" >&6;}
19903     else
19904       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19905 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19906          X"$ac_file" : 'X\(//\)[^/]' \| \
19907          X"$ac_file" : 'X\(//\)$' \| \
19908          X"$ac_file" : 'X\(/\)' \| \
19909          .     : '\(.\)' 2>/dev/null ||
19910 echo X"$ac_file" |
19911     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19912           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19913           /^X\(\/\/\)$/{ s//\1/; q; }
19914           /^X\(\/\).*/{ s//\1/; q; }
19915           s/.*/./; q'`
19916       { if $as_mkdir_p; then
19917     mkdir -p "$ac_dir"
19918   else
19919     as_dir="$ac_dir"
19920     as_dirs=
19921     while test ! -d "$as_dir"; do
19922       as_dirs="$as_dir $as_dirs"
19923       as_dir=`(dirname "$as_dir") 2>/dev/null ||
19924 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19925          X"$as_dir" : 'X\(//\)[^/]' \| \
19926          X"$as_dir" : 'X\(//\)$' \| \
19927          X"$as_dir" : 'X\(/\)' \| \
19928          .     : '\(.\)' 2>/dev/null ||
19929 echo X"$as_dir" |
19930     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19931           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19932           /^X\(\/\/\)$/{ s//\1/; q; }
19933           /^X\(\/\).*/{ s//\1/; q; }
19934           s/.*/./; q'`
19935     done
19936     test ! -n "$as_dirs" || mkdir $as_dirs
19937   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19938 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19939    { (exit 1); exit 1; }; }; }
19940
19941       rm -f $ac_file
19942       mv $tmp/config.h $ac_file
19943     fi
19944   else
19945     cat $tmp/config.h
19946     rm -f $tmp/config.h
19947   fi
19948 done
19949 _ACEOF
19950 cat >>$CONFIG_STATUS <<\_ACEOF
19951
19952 #
19953 # CONFIG_COMMANDS section.
19954 #
19955 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19956   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19957   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19958   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
19959 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19960          X"$ac_dest" : 'X\(//\)[^/]' \| \
19961          X"$ac_dest" : 'X\(//\)$' \| \
19962          X"$ac_dest" : 'X\(/\)' \| \
19963          .     : '\(.\)' 2>/dev/null ||
19964 echo X"$ac_dest" |
19965     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19966           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19967           /^X\(\/\/\)$/{ s//\1/; q; }
19968           /^X\(\/\).*/{ s//\1/; q; }
19969           s/.*/./; q'`
19970   ac_builddir=.
19971
19972 if test "$ac_dir" != .; then
19973   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19974   # A "../" for each directory in $ac_dir_suffix.
19975   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19976 else
19977   ac_dir_suffix= ac_top_builddir=
19978 fi
19979
19980 case $srcdir in
19981   .)  # No --srcdir option.  We are building in place.
19982     ac_srcdir=.
19983     if test -z "$ac_top_builddir"; then
19984        ac_top_srcdir=.
19985     else
19986        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19987     fi ;;
19988   [\\/]* | ?:[\\/]* )  # Absolute path.
19989     ac_srcdir=$srcdir$ac_dir_suffix;
19990     ac_top_srcdir=$srcdir ;;
19991   *) # Relative path.
19992     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19993     ac_top_srcdir=$ac_top_builddir$srcdir ;;
19994 esac
19995 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19996 # absolute.
19997 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
19998 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
19999 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
20000 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
20001
20002
20003   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
20004 echo "$as_me: executing $ac_dest commands" >&6;}
20005   case $ac_dest in
20006     default-1 )
20007
20008 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
20009 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
20010   rm -f intltool-extract.out
20011 else
20012   mv -f intltool-extract.out intltool-extract
20013 fi
20014 chmod ugo+x intltool-extract
20015 chmod u+w intltool-extract
20016
20017 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
20018 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
20019   rm -f intltool-merge.out
20020 else
20021   mv -f intltool-merge.out intltool-merge
20022 fi
20023 chmod ugo+x intltool-merge
20024 chmod u+w intltool-merge
20025
20026 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
20027 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
20028   rm -f intltool-update.out
20029 else
20030   mv -f intltool-update.out intltool-update
20031 fi
20032 chmod ugo+x intltool-update
20033 chmod u+w intltool-update
20034
20035  ;;
20036     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
20037         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
20038       esac ;;
20039   esac
20040 done
20041 _ACEOF
20042
20043 cat >>$CONFIG_STATUS <<\_ACEOF
20044
20045 { (exit 0); exit 0; }
20046 _ACEOF
20047 chmod +x $CONFIG_STATUS
20048 ac_clean_files=$ac_clean_files_save
20049
20050
20051 # configure is writing to config.log, and then calls config.status.
20052 # config.status does its own redirection, appending to config.log.
20053 # Unfortunately, on DOS this fails, as config.log is still kept open
20054 # by configure, so config.status won't be able to write to it; its
20055 # output is simply discarded.  So we exec the FD to /dev/null,
20056 # effectively closing config.log, so it can be properly (re)opened and
20057 # appended to by config.status.  When coming back to configure, we
20058 # need to make the FD available again.
20059 if test "$no_create" != yes; then
20060   ac_cs_success=:
20061   ac_config_status_args=
20062   test "$silent" = yes &&
20063     ac_config_status_args="$ac_config_status_args --quiet"
20064   exec 5>/dev/null
20065   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20066   exec 5>>config.log
20067   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20068   # would make configure fail if this is the last instruction.
20069   $ac_cs_success || { (exit 1); exit 1; }
20070 fi
20071
20072
20073 ###############################################################################
20074 #
20075 #       Print some warnings at the end.
20076 #
20077 ###############################################################################
20078
20079 warn_prefix_1="    Warning:"
20080 warn_prefix_2="       Note:"
20081 warn_prefix="$warn_prefix_1"
20082
20083 warning=no
20084 warnsep='    #################################################################'
20085
20086 warnpre() {
20087   if test "$warning" = no ; then
20088     echo '' ; echo "$warnsep" ; echo ''
20089     warning=yes
20090   fi
20091 }
20092
20093 warn() {
20094   warnpre
20095   if test "$warning" = long ; then echo '' ; fi
20096   warning=yes
20097   rest="$@"
20098   echo "$warn_prefix $rest"
20099 }
20100
20101 warnL() {
20102   was=$warning
20103   warnpre
20104   warning=yes
20105   if test "$was" != no ; then echo '' ; fi
20106   rest="$@"
20107   echo "$warn_prefix $rest"
20108 }
20109
20110 warn2() {
20111   rest="$@"
20112   echo "             $rest"
20113   warning=long
20114 }
20115
20116 note() {
20117   warn_prefix="$warn_prefix_2"
20118   warn $@
20119   warn_prefix="$warn_prefix_1"
20120 }
20121
20122 noteL() {
20123   warn_prefix="$warn_prefix_2"
20124   warnL $@
20125   warn_prefix="$warn_prefix_1"
20126 }
20127
20128
20129 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
20130   warn 'The SGI saver extension was requested, but was not found.'
20131 fi
20132
20133 if test "$with_mit_req" = yes -a "$have_mit" = no ; then
20134   warn 'The MIT saver extension was requested, but was not found.'
20135 fi
20136
20137 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
20138   warn 'The XIdle extension was requested, but was not found.'
20139 fi
20140
20141 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
20142   warn 'The XSHM extension was requested, but was not found.'
20143 fi
20144
20145 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
20146   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
20147 fi
20148
20149 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
20150   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
20151 fi
20152
20153 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
20154   warn 'The DPMS extension was requested, but was not found.'
20155 fi
20156
20157 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
20158   warn 'The Xinerama extension was requested, but was not found.'
20159 fi
20160
20161 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
20162   warn 'The XF86VMODE extension was requested, but was not found.'
20163 fi
20164
20165 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
20166   warn "Checking of /proc/interrupts was requested, but it's bogus."
20167 fi
20168
20169 motif_warn2() {
20170   warn2 'Though the Motif front-end to xscreensaver is still'
20171   warn2 'maintained, it is no longer being updated with new'
20172   warn2 'features: all new development on the xscreensaver-demo'
20173   warn2 'program is happening in the GTK version, and not in the'
20174   warn2 'Motif version.  It is recommended that you build against'
20175   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
20176 }
20177
20178 if test "$have_motif" = no -a "$have_gtk" = no; then
20179
20180   if test "$with_motif" = yes; then
20181     warnL "Neither the GTK nor Motif libraries were found; the"
20182     warn2 "\`xscreensaver-demo' program requires one of these."
20183     echo ''
20184     motif_warn2
20185   else
20186     warnL "The GTK libraries do not seem to be available; the"
20187     warn2 "\`xscreensaver-demo' program requires them."
20188     echo ''
20189     warn2 'You can use Motif or Lesstif instead of GTK (use the'
20190     warn2 "\`--with-motif' option) but that is NOT recommended."
20191     motif_warn2
20192   fi
20193
20194 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
20195   warnL "Use of Motif was requested, but it wasn't found;"
20196   warn2 "Gtk will be used instead."
20197
20198 elif test "$jurassic_gtk" = yes ; then
20199
20200   pref_gtk=1.2
20201
20202   v="$ac_gtk_version_string"
20203   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
20204     warnL "Use of Gtk was requested, but its version number is unknown;"
20205   elif test "$with_gtk_req" = yes ; then
20206     warnL "Use of Gtk was requested, but it is version $v;"
20207   else
20208     warnL "Gtk was found on this system, but it is version $v;"
20209   fi
20210
20211   warn2 "Gtk $pref_gtk or newer is required."
20212
20213 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
20214   warnL "Use of Gtk was requested, but it wasn't found."
20215 fi
20216
20217 if test "$gtk2_halfassed" != no ; then
20218   warnL "GTK version $gtk2_halfassed was found, but at least one supporting"
20219   warn2 "library ($gtk2_halfassed_lib) was not, so GTK 2.x can't be used."
20220   if test "$have_gtk" = yes ; then
20221     v="$ac_gtk_version_string"
20222     warn2 "GTK $v is also installed, so it will be used instead."
20223     warn2 "Please read the above output and the \`config.log' file"
20224     warn2 "for more details."
20225   fi
20226 fi
20227
20228
20229 if test "$with_gnome_req" = yes -a "$have_gnome" = no \
20230         -a "$have_gtk2" = no; then
20231   # don't issue this warning if we have GTK2 -- in that case, the
20232   # Gnome-specific code isn't needed.
20233   warn  'Use of the Gnome Control Panel was requested, but the necessary'
20234   warn2 'headers and/or libraries were not found.'
20235 fi
20236
20237 if test "$have_gtk" = yes ; then
20238   if test "$have_xml" = no ; then
20239     if test "$with_xml_req" = yes ; then
20240       warn  'Use of the XML library was requested, but the necessary'
20241       warn2 'headers and/or libraries were not found.'
20242     else
20243       warn  'GTK is being used, but the XML library was not found.'
20244     fi
20245
20246     if test "$xml_halfassed" = yes ; then
20247
20248       if test "$have_zlib" = yes ; then
20249         which="XML libraries"
20250       else
20251         which="\`zlib' library"
20252       fi
20253
20254       echo ''
20255       warn2 'More specifically, we found the headers, but not the'
20256       warn2 "$which; so either XML is half-installed on this"
20257       warn2 "system, or something else went wrong.  The \`config.log'"
20258       warn2 'file might contain some clues.'
20259     fi
20260
20261     echo ''
20262     warn2 "Without XML, the per-display-mode \`Settings' dialogs"
20263     warn2 'will not be available.  Specify the location of the XML'
20264     warn2 'library through the --with-xml option to configure.'
20265   fi
20266 fi
20267
20268 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
20269   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
20270   warn2 "headers were not found.  That can't be good.  Please"
20271   warn2 "install the GDK-Pixbuf development kit and re-configure."
20272 fi
20273
20274 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
20275
20276   preferred_lesstif=0.92
20277
20278   if test "$lesstif_version" = unknown; then
20279     warnL "Unable to determine the LessTif version number!"
20280     warn2 "Make sure you are using version $preferred_lesstif or newer."
20281     warn2 "See <http://www.lesstif.org/>."
20282
20283   elif test \! $lesstif_version -gt 82; then
20284     warnL "LessTif version $lesstif_version_string is being used."
20285     warn2 "LessTif versions 0.82 and earlier are too buggy to"
20286     warn2 "use with XScreenSaver; it is strongly recommended"
20287     warn2 "that you upgrade to at least version $preferred_lesstif!"
20288     warn2 "See <http://www.lesstif.org/>."
20289   fi
20290 fi
20291
20292
20293 if test "$have_motif" = yes -a "$have_gtk" = no ; then
20294   warn  'Motif is being used, and GTK is not.'
20295   echo  ''
20296   motif_warn2
20297 fi
20298
20299
20300 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
20301   warnL 'Use of XPM was requested, but it was not found.'
20302 fi
20303
20304 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
20305   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
20306 fi
20307
20308 if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \
20309    test "$gdk_pixbuf_halfassed" = yes; then
20310
20311   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
20312     true
20313   elif test "$with_xpm_req" = no ; then
20314     warnL 'The XPM library is not being used.'
20315   else
20316     warnL 'The XPM library was not found.'
20317   fi
20318
20319   if test "$with_gdk_pixbuf_req" = yes ; then
20320     true
20321   elif test "$with_gdk_pixbuf_req" = no ; then
20322     warnL 'The GDK-Pixbuf library is not being used.'
20323   else
20324     warnL 'The GDK-Pixbuf library was not found.'
20325   fi
20326
20327   if test "$gdk_pixbuf_halfassed" = yes ; then
20328     echo ''
20329     warn2 'More specifically, we found the headers, but not the'
20330     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
20331     warn2 "system, or something else went wrong.  The \`config.log'"
20332     warn2 'file might contain some clues.'
20333   fi
20334
20335   echo ''
20336   warn2 'Some of the demos will not be as colorful as they'
20337   warn2 'could be.  You should consider installing Pixbuf or'
20338   warn2 'XPM and re-running configure.  The Pixbuf library is'
20339   warn2 'a part of GNOME.  The XPM library comes with most'
20340   warn2 'X11 installations; you can also find it at the X11'
20341   warn2 'archive sites, such as <http://sunsite.unc.edu/>.'
20342   echo  ''
20343   warn2 'GDK-Pixbuf is recommended over XPM, as it provides'
20344   warn2 'support for more image formats.'
20345 fi
20346
20347
20348 if test "$have_jpeg" = no ; then
20349   if test "$with_jpeg_req" = yes ; then
20350     warnL 'Use of libjpeg was requested, but it was not found.'
20351   elif test "$with_jpeg_req" = no ; then
20352     noteL 'The JPEG library is not being used.'
20353   else
20354     noteL 'The JPEG library was not found.'
20355   fi
20356
20357   if test "$jpeg_halfassed" = yes ; then
20358     echo ''
20359     warn2 'More specifically, we found the headers, but not the'
20360     warn2 'library; so either JPEG is half-installed on this'
20361     warn2 "system, or something else went wrong.  The \`config.log'"
20362     warn2 'file might contain some clues.'
20363     echo ''
20364   fi
20365
20366   if test "$have_gdk_pixbuf" = no ; then
20367     warn2 "This means that it won't be possible for the image-manipulating"
20368     warn2 "display modes to load files from disk; and it also means that"
20369     warn2 "the \`webcollage' program will be much slower."
20370   else
20371     warn2 "This means the \`webcollage' program will be much slower."
20372   fi
20373 fi
20374
20375
20376 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
20377   preferred_mesagl=3.4
20378   mgv="$ac_mesagl_version_string"
20379   pgl="$preferred_mesagl"
20380
20381   if test "$ac_mesagl_version" = unknown; then
20382     warnL "Unable to determine the MesaGL version number!"
20383     warn2 "Make sure you are using version $preferred_mesagl or newer."
20384
20385   elif test \! "$ac_mesagl_version" -gt 2006; then
20386     warnL "MesaGL version number is $mgv --"
20387     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
20388     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
20389
20390   elif test \! "$ac_mesagl_version" -gt 3003; then
20391     warnL "MesaGL version number is $mgv --"
20392     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
20393     warn2 "that you upgrade to $pgl or newer."
20394   fi
20395 fi
20396
20397 if test "$have_gl" = no ; then
20398   if test "$with_gl_req" = yes ; then
20399     warnL 'Use of GL was requested, but it was not found.'
20400   elif test "$with_gl_req" = no ; then
20401     noteL 'The OpenGL 3D library is not being used.'
20402   else
20403     noteL 'The OpenGL 3D library was not found.'
20404   fi
20405
20406   if test "$gl_halfassed" = yes ; then
20407     echo ''
20408     warn2 'More specifically, we found the headers, but not the'
20409     warn2 'libraries; so either GL is half-installed on this'
20410     warn2 "system, or something else went wrong.  The \`config.log'"
20411     warn2 'file might contain some clues.'
20412   fi
20413
20414   echo ''
20415   warn2 'Those demos which use 3D will not be built or installed.'
20416   warn2 'You might want to consider installing OpenGL and'
20417   warn2 "re-running configure.  If your vendor doesn't ship"
20418   warn2 'their own implementation of OpenGL, you can get a free'
20419   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
20420   warn2 'info, see <http://www.opengl.org/>.'
20421
20422 fi
20423
20424
20425 if test "$have_gl" = yes -a "$have_gle" = no ; then
20426
20427  # nobody cares about this; don't print the warning unless it was
20428  # requested and not found, or halfway-found.
20429  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
20430
20431   if test "$with_gle_req" = yes ; then
20432     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
20433     warn2 'it was not found (though the OpenGL library was found, and'
20434     warn2 'is being used.)'
20435   elif test "$with_gle_req" = no ; then
20436     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
20437     warn2 'library is not.'
20438   else
20439     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
20440     warn2 'was not.'
20441   fi
20442
20443   if test "$gle_halfassed" = yes ; then
20444     echo ''
20445     warn2 'More specifically, we found the headers, but not the'
20446     warn2 'libraries; so either GLE is half-installed on this'
20447     warn2 "system, or something else went wrong.  The \`config.log'"
20448     warn2 'file might contain some clues.'
20449   fi
20450
20451   echo ''
20452   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
20453   warn2 'will not be built or installed.  You might want to consider'
20454   warn2 'installing GLE and re-running configure.  You can find the'
20455   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
20456   warn2 'OpenGL info, see <http://www.opengl.org/>.'
20457
20458  fi
20459 fi
20460
20461
20462 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
20463   warn 'Use of XReadDisplay was requested, but it was not found.'
20464 fi
20465
20466 if test -n "$with_fortune_req"; then
20467   if test "$with_fortune_req" != "$ac_cv_fortune_program" ; then
20468     warnL "$with_fortune_req was requested as the Fortune program,"
20469     warn2 "but was not found.  The default will be used instead."
20470   fi
20471 fi
20472
20473 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
20474   warn 'Use of Kerberos was requested, but it was not found.'
20475 fi
20476
20477 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
20478   warn 'Use of PAM was requested, but it was not found.'
20479 fi
20480
20481 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
20482   warn 'Use of shadow passwords was requested, but they were not found.'
20483 fi
20484
20485
20486 # You are in a twisty maze of namespaces and syntaxes, all alike.
20487 # Fuck the skull of Unix.
20488 #
20489 eval bindir=${bindir}
20490 eval bindir=${bindir}
20491 eval bindir=${bindir}
20492 eval bindir=${bindir}
20493 eval bindir=${bindir}
20494 eval bindir=${bindir}
20495 eval HACKDIR=${HACKDIR}
20496 eval HACKDIR=${HACKDIR}
20497 eval HACKDIR=${HACKDIR}
20498 eval HACKDIR=${HACKDIR}
20499 eval HACKDIR=${HACKDIR}
20500 eval HACKDIR=${HACKDIR}
20501 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20502 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20503 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20504 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20505 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20506 eval HACK_CONF_DIR=${HACK_CONF_DIR}
20507
20508 # canonicalize slashes.
20509 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
20510 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
20511 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
20512
20513
20514 # Sanity check the hackdir
20515 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
20516   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
20517     echo ""
20518     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
20519                    There will be an executable installed with that name, so
20520                    that can't be the name of a directory as well.  Please
20521                    re-configure with a different directory name." >&5
20522 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
20523                    There will be an executable installed with that name, so
20524                    that can't be the name of a directory as well.  Please
20525                    re-configure with a different directory name." >&2;}
20526    { (exit 1); exit 1; }; }
20527   fi
20528 done
20529
20530
20531 do_dir_warning=no
20532
20533 # Now let's see if there's a previous RPM version already installed.  Blargh!
20534
20535 # M4 sucks!!
20536
20537 rpmv=`(rpm -qv xscreensaver) 2>/dev/null | \
20538       sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
20539
20540
20541 if test \! -z "$rpmv" ; then
20542   rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
20543   rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
20544
20545   warning=no
20546   warnL "There is already an installed RPM of xscreensaver $rpmv"
20547   warn2 "on this system.  You might want to remove it (with"
20548   warn2 '"rpm -ve xscreensaver") before running "make install"'
20549   warn2 "from this directory."
20550   echo ""
20551   warn2 "Alternately, you could build this version of xscreensaver"
20552   warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
20553   warn2 "file is included.  See the RPM documentation for more info."
20554   echo ""
20555
20556   if test "$rpmbdir" = "$rpmhdir" ; then
20557     warn2 "The RPM version was installed in $rpmbdir/."
20558   else
20559     warn2 "The RPM version was installed in $rpmbdir/,"
20560     warn2 "with demos in $rpmhdir/."
20561   fi
20562
20563   do_dir_warning=yes
20564 fi
20565
20566
20567 if test "${bindir}" = "${HACKDIR}" ; then
20568   do_dir_warning=yes
20569 fi
20570
20571 if test "$do_dir_warning" = yes; then
20572   echo ""
20573   echo "$warnsep"
20574   echo ""
20575   echo '      When you run "make install", the "xscreensaver",'
20576   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
20577   echo "      will be installed in ${bindir}/."
20578   echo ""
20579   echo "      The various graphics demos (175+ different executables) will"
20580   echo "      be installed in ${HACKDIR}/."
20581   echo ""
20582   echo "      If you would prefer the demos to be installed elsewhere,"
20583   echo "      you should re-run configure with the --with-hackdir=DIR"
20584   echo "      option.  For more information, run \`./configure --help'."
20585   warning=yes
20586 fi
20587
20588 if test "$warning" != no; then
20589   echo '' ; echo "$warnsep" ; echo ''
20590 fi
20591
20592 if test "$do_dir_warning" = no; then
20593   if test "$warning" = no; then
20594     echo ''
20595   fi
20596   echo "User programs will be installed in ${bindir}/"
20597   echo "Screen savers will be installed in ${HACKDIR}/"
20598   echo "Configuration will be installed in ${HACK_CONF_DIR}/"
20599   echo ''
20600 fi