e774dadf658766ea44a4a6220288cf4c918dea86
[xscreensaver] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59.
4 #
5 # Copyright (C) 2003 Free Software Foundation, Inc.
6 # This configure script is free software; the Free Software Foundation
7 # gives unlimited permission to copy, distribute and modify it.
8 ## --------------------- ##
9 ## M4sh Initialization.  ##
10 ## --------------------- ##
11
12 # Be Bourne compatible
13 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14   emulate sh
15   NULLCMD=:
16   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17   # is contrary to our usage.  Disable this feature.
18   alias -g '${1+"$@"}'='"$@"'
19 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20   set -o posix
21 fi
22 DUALCASE=1; export DUALCASE # for MKS sh
23
24 # Support unset when possible.
25 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26   as_unset=unset
27 else
28   as_unset=false
29 fi
30
31
32 # Work around bugs in pre-3.0 UWIN ksh.
33 $as_unset ENV MAIL MAILPATH
34 PS1='$ '
35 PS2='> '
36 PS4='+ '
37
38 # NLS nuisances.
39 for as_var in \
40   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42   LC_TELEPHONE LC_TIME
43 do
44   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
45     eval $as_var=C; export $as_var
46   else
47     $as_unset $as_var
48   fi
49 done
50
51 # Required to use basename.
52 if expr a : '\(a\)' >/dev/null 2>&1; then
53   as_expr=expr
54 else
55   as_expr=false
56 fi
57
58 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59   as_basename=basename
60 else
61   as_basename=false
62 fi
63
64
65 # Name of the executable.
66 as_me=`$as_basename "$0" ||
67 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68          X"$0" : 'X\(//\)$' \| \
69          X"$0" : 'X\(/\)$' \| \
70          .     : '\(.\)' 2>/dev/null ||
71 echo X/"$0" |
72     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73           /^X\/\(\/\/\)$/{ s//\1/; q; }
74           /^X\/\(\/\).*/{ s//\1/; q; }
75           s/.*/./; q'`
76
77
78 # PATH needs CR, and LINENO needs CR and PATH.
79 # Avoid depending upon Character Ranges.
80 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83 as_cr_digits='0123456789'
84 as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86 # The user is always right.
87 if test "${PATH_SEPARATOR+set}" != set; then
88   echo "#! /bin/sh" >conf$$.sh
89   echo  "exit 0"   >>conf$$.sh
90   chmod +x conf$$.sh
91   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92     PATH_SEPARATOR=';'
93   else
94     PATH_SEPARATOR=:
95   fi
96   rm -f conf$$.sh
97 fi
98
99
100   as_lineno_1=$LINENO
101   as_lineno_2=$LINENO
102   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103   test "x$as_lineno_1" != "x$as_lineno_2" &&
104   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
105   # Find who we are.  Look in the path if we contain no path at all
106   # relative or not.
107   case $0 in
108     *[\\/]* ) as_myself=$0 ;;
109     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110 for as_dir in $PATH
111 do
112   IFS=$as_save_IFS
113   test -z "$as_dir" && as_dir=.
114   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115 done
116
117        ;;
118   esac
119   # We did not find ourselves, most probably we were run as `sh COMMAND'
120   # in which case we are not to be found in the path.
121   if test "x$as_myself" = x; then
122     as_myself=$0
123   fi
124   if test ! -f "$as_myself"; then
125     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126    { (exit 1); exit 1; }; }
127   fi
128   case $CONFIG_SHELL in
129   '')
130     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132 do
133   IFS=$as_save_IFS
134   test -z "$as_dir" && as_dir=.
135   for as_base in sh bash ksh sh5; do
136          case $as_dir in
137          /*)
138            if ("$as_dir/$as_base" -c '
139   as_lineno_1=$LINENO
140   as_lineno_2=$LINENO
141   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142   test "x$as_lineno_1" != "x$as_lineno_2" &&
143   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
144              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146              CONFIG_SHELL=$as_dir/$as_base
147              export CONFIG_SHELL
148              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149            fi;;
150          esac
151        done
152 done
153 ;;
154   esac
155
156   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157   # uniformly replaced by the line number.  The first 'sed' inserts a
158   # line-number line before each line; the second 'sed' does the real
159   # work.  The second script uses 'N' to pair each line-number line
160   # with the numbered line, and appends trailing '-' during
161   # substitution so that $LINENO is not a special case at line end.
162   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
164   sed '=' <$as_myself |
165     sed '
166       N
167       s,$,-,
168       : loop
169       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170       t loop
171       s,-$,,
172       s,^['$as_cr_digits']*\n,,
173     ' >$as_me.lineno &&
174   chmod +x $as_me.lineno ||
175     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176    { (exit 1); exit 1; }; }
177
178   # Don't try to exec as it changes $[0], causing all sort of problems
179   # (the dirname of $[0] is not the place where we might find the
180   # original and so on.  Autoconf is especially sensible to this).
181   . ./$as_me.lineno
182   # Exit status is that of the last command.
183   exit
184 }
185
186
187 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188   *c*,-n*) ECHO_N= ECHO_C='
189 ' ECHO_T='      ' ;;
190   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
192 esac
193
194 if expr a : '\(a\)' >/dev/null 2>&1; then
195   as_expr=expr
196 else
197   as_expr=false
198 fi
199
200 rm -f conf$$ conf$$.exe conf$$.file
201 echo >conf$$.file
202 if ln -s conf$$.file conf$$ 2>/dev/null; then
203   # We could just check for DJGPP; but this test a) works b) is more generic
204   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205   if test -f conf$$.exe; then
206     # Don't use ln at all; we don't have any links
207     as_ln_s='cp -p'
208   else
209     as_ln_s='ln -s'
210   fi
211 elif ln conf$$.file conf$$ 2>/dev/null; then
212   as_ln_s=ln
213 else
214   as_ln_s='cp -p'
215 fi
216 rm -f conf$$ conf$$.exe conf$$.file
217
218 if mkdir -p . 2>/dev/null; then
219   as_mkdir_p=:
220 else
221   test -d ./-p && rmdir ./-p
222   as_mkdir_p=false
223 fi
224
225 as_executable_p="test -f"
226
227 # Sed expression to map a string onto a valid CPP name.
228 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
229
230 # Sed expression to map a string onto a valid variable name.
231 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
232
233
234 # IFS
235 # We need space, tab and new line, in precisely that order.
236 as_nl='
237 '
238 IFS="   $as_nl"
239
240 # CDPATH.
241 $as_unset CDPATH
242
243
244 # Name of the host.
245 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246 # so uname gets run too.
247 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249 exec 6>&1
250
251 #
252 # Initializations.
253 #
254 ac_default_prefix=/usr/local
255 ac_config_libobj_dir=.
256 cross_compiling=no
257 subdirs=
258 MFLAGS=
259 MAKEFLAGS=
260 SHELL=${CONFIG_SHELL-/bin/sh}
261
262 # Maximum number of lines to put in a shell here document.
263 # This variable seems obsolete.  It should probably be removed, and
264 # only ac_max_sed_lines should be used.
265 : ${ac_max_here_lines=38}
266
267 # Identity of this package.
268 PACKAGE_NAME=
269 PACKAGE_TARNAME=
270 PACKAGE_VERSION=
271 PACKAGE_STRING=
272 PACKAGE_BUGREPORT=
273
274 ac_unique_file="driver/subprocs.c"
275 # Factoring default headers for most tests.
276 ac_includes_default="\
277 #include <stdio.h>
278 #if HAVE_SYS_TYPES_H
279 # include <sys/types.h>
280 #endif
281 #if HAVE_SYS_STAT_H
282 # include <sys/stat.h>
283 #endif
284 #if STDC_HEADERS
285 # include <stdlib.h>
286 # include <stddef.h>
287 #else
288 # if HAVE_STDLIB_H
289 #  include <stdlib.h>
290 # endif
291 #endif
292 #if HAVE_STRING_H
293 # if !STDC_HEADERS && HAVE_MEMORY_H
294 #  include <memory.h>
295 # endif
296 # include <string.h>
297 #endif
298 #if HAVE_STRINGS_H
299 # include <strings.h>
300 #endif
301 #if HAVE_INTTYPES_H
302 # include <inttypes.h>
303 #else
304 # if HAVE_STDINT_H
305 #  include <stdint.h>
306 # endif
307 #endif
308 #if HAVE_UNISTD_H
309 # include <unistd.h>
310 #endif"
311
312 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE EGREP PERL X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XML_RULE INTLTOOL_CAVES_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL GETTEXT_PACKAGE RANLIB ac_ct_RANLIB ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB MKINSTALLDIRS login_manager_tmp pkg_config gnome_open_program gnome_url_show_program INCLUDES PREFERRED_DEMO_PROGRAM ALL_DEMO_PROGRAMS SAVER_LIBS MOTIF_LIBS GTK_LIBS XML_LIBS JPEG_LIBS HACK_LIBS XPM_LIBS PTY_LIBS GL_LIBS GLE_LIBS XDPMS_LIBS XINERAMA_LIBS PASSWD_LIBS INSTALL_SETUID SETUID_HACKS INSTALL_DIRS NEED_SETUID INSTALL_PAM NEW_LOGIN_COMMAND NEW_LOGIN_COMMAND_P DEFAULT_IMAGES_P DEFAULT_IMAGE_DIRECTORY DEFAULT_TEXT_FILE 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 GNOME24 GNOME22 NOGNOME HACKDIR HACKDIR_FULL GTK_DATADIR PO_DATADIR HACK_CONF_DIR GTK_EXTRA_OBJS APPDEFAULTS DEPEND DEPEND_FLAGS DEPEND_DEFINES LIBOBJS LTLIBOBJS'
313 ac_subst_files=''
314
315 # Initialize some variables set by options.
316 ac_init_help=
317 ac_init_version=false
318 # The variables have the same names as the options, with
319 # dashes changed to underlines.
320 cache_file=/dev/null
321 exec_prefix=NONE
322 no_create=
323 no_recursion=
324 prefix=NONE
325 program_prefix=NONE
326 program_suffix=NONE
327 program_transform_name=s,x,x,
328 silent=
329 site=
330 srcdir=
331 verbose=
332 x_includes=NONE
333 x_libraries=NONE
334
335 # Installation directory options.
336 # These are left unexpanded so users can "make install exec_prefix=/foo"
337 # and all the variables that are supposed to be based on exec_prefix
338 # by default will actually change.
339 # Use braces instead of parens because sh, perl, etc. also accept them.
340 bindir='${exec_prefix}/bin'
341 sbindir='${exec_prefix}/sbin'
342 libexecdir='${exec_prefix}/libexec'
343 datadir='${prefix}/share'
344 sysconfdir='${prefix}/etc'
345 sharedstatedir='${prefix}/com'
346 localstatedir='${prefix}/var'
347 libdir='${exec_prefix}/lib'
348 includedir='${prefix}/include'
349 oldincludedir='/usr/include'
350 infodir='${prefix}/info'
351 mandir=\${datadir}/man
352
353 ac_prev=
354 for ac_option
355 do
356   # If the previous option needs an argument, assign it.
357   if test -n "$ac_prev"; then
358     eval "$ac_prev=\$ac_option"
359     ac_prev=
360     continue
361   fi
362
363   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
364
365   # Accept the important Cygnus configure options, so we can diagnose typos.
366
367   case $ac_option in
368
369   -bindir | --bindir | --bindi | --bind | --bin | --bi)
370     ac_prev=bindir ;;
371   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
372     bindir=$ac_optarg ;;
373
374   -build | --build | --buil | --bui | --bu)
375     ac_prev=build_alias ;;
376   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
377     build_alias=$ac_optarg ;;
378
379   -cache-file | --cache-file | --cache-fil | --cache-fi \
380   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381     ac_prev=cache_file ;;
382   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
384     cache_file=$ac_optarg ;;
385
386   --config-cache | -C)
387     cache_file=config.cache ;;
388
389   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390     ac_prev=datadir ;;
391   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392   | --da=*)
393     datadir=$ac_optarg ;;
394
395   -disable-* | --disable-*)
396     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
397     # Reject names that are not valid shell variable names.
398     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400    { (exit 1); exit 1; }; }
401     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402     eval "enable_$ac_feature=no" ;;
403
404   -enable-* | --enable-*)
405     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
406     # Reject names that are not valid shell variable names.
407     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409    { (exit 1); exit 1; }; }
410     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411     case $ac_option in
412       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
413       *) ac_optarg=yes ;;
414     esac
415     eval "enable_$ac_feature='$ac_optarg'" ;;
416
417   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419   | --exec | --exe | --ex)
420     ac_prev=exec_prefix ;;
421   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423   | --exec=* | --exe=* | --ex=*)
424     exec_prefix=$ac_optarg ;;
425
426   -gas | --gas | --ga | --g)
427     # Obsolete; use --with-gas.
428     with_gas=yes ;;
429
430   -help | --help | --hel | --he | -h)
431     ac_init_help=long ;;
432   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433     ac_init_help=recursive ;;
434   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435     ac_init_help=short ;;
436
437   -host | --host | --hos | --ho)
438     ac_prev=host_alias ;;
439   -host=* | --host=* | --hos=* | --ho=*)
440     host_alias=$ac_optarg ;;
441
442   -includedir | --includedir | --includedi | --included | --include \
443   | --includ | --inclu | --incl | --inc)
444     ac_prev=includedir ;;
445   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446   | --includ=* | --inclu=* | --incl=* | --inc=*)
447     includedir=$ac_optarg ;;
448
449   -infodir | --infodir | --infodi | --infod | --info | --inf)
450     ac_prev=infodir ;;
451   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
452     infodir=$ac_optarg ;;
453
454   -libdir | --libdir | --libdi | --libd)
455     ac_prev=libdir ;;
456   -libdir=* | --libdir=* | --libdi=* | --libd=*)
457     libdir=$ac_optarg ;;
458
459   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460   | --libexe | --libex | --libe)
461     ac_prev=libexecdir ;;
462   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463   | --libexe=* | --libex=* | --libe=*)
464     libexecdir=$ac_optarg ;;
465
466   -localstatedir | --localstatedir | --localstatedi | --localstated \
467   | --localstate | --localstat | --localsta | --localst \
468   | --locals | --local | --loca | --loc | --lo)
469     ac_prev=localstatedir ;;
470   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
473     localstatedir=$ac_optarg ;;
474
475   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476     ac_prev=mandir ;;
477   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
478     mandir=$ac_optarg ;;
479
480   -nfp | --nfp | --nf)
481     # Obsolete; use --without-fp.
482     with_fp=no ;;
483
484   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
485   | --no-cr | --no-c | -n)
486     no_create=yes ;;
487
488   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490     no_recursion=yes ;;
491
492   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494   | --oldin | --oldi | --old | --ol | --o)
495     ac_prev=oldincludedir ;;
496   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
499     oldincludedir=$ac_optarg ;;
500
501   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502     ac_prev=prefix ;;
503   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
504     prefix=$ac_optarg ;;
505
506   -program-prefix | --program-prefix | --program-prefi | --program-pref \
507   | --program-pre | --program-pr | --program-p)
508     ac_prev=program_prefix ;;
509   -program-prefix=* | --program-prefix=* | --program-prefi=* \
510   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
511     program_prefix=$ac_optarg ;;
512
513   -program-suffix | --program-suffix | --program-suffi | --program-suff \
514   | --program-suf | --program-su | --program-s)
515     ac_prev=program_suffix ;;
516   -program-suffix=* | --program-suffix=* | --program-suffi=* \
517   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
518     program_suffix=$ac_optarg ;;
519
520   -program-transform-name | --program-transform-name \
521   | --program-transform-nam | --program-transform-na \
522   | --program-transform-n | --program-transform- \
523   | --program-transform | --program-transfor \
524   | --program-transfo | --program-transf \
525   | --program-trans | --program-tran \
526   | --progr-tra | --program-tr | --program-t)
527     ac_prev=program_transform_name ;;
528   -program-transform-name=* | --program-transform-name=* \
529   | --program-transform-nam=* | --program-transform-na=* \
530   | --program-transform-n=* | --program-transform-=* \
531   | --program-transform=* | --program-transfor=* \
532   | --program-transfo=* | --program-transf=* \
533   | --program-trans=* | --program-tran=* \
534   | --progr-tra=* | --program-tr=* | --program-t=*)
535     program_transform_name=$ac_optarg ;;
536
537   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538   | -silent | --silent | --silen | --sile | --sil)
539     silent=yes ;;
540
541   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542     ac_prev=sbindir ;;
543   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544   | --sbi=* | --sb=*)
545     sbindir=$ac_optarg ;;
546
547   -sharedstatedir | --sharedstatedir | --sharedstatedi \
548   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549   | --sharedst | --shareds | --shared | --share | --shar \
550   | --sha | --sh)
551     ac_prev=sharedstatedir ;;
552   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555   | --sha=* | --sh=*)
556     sharedstatedir=$ac_optarg ;;
557
558   -site | --site | --sit)
559     ac_prev=site ;;
560   -site=* | --site=* | --sit=*)
561     site=$ac_optarg ;;
562
563   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564     ac_prev=srcdir ;;
565   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
566     srcdir=$ac_optarg ;;
567
568   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569   | --syscon | --sysco | --sysc | --sys | --sy)
570     ac_prev=sysconfdir ;;
571   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
573     sysconfdir=$ac_optarg ;;
574
575   -target | --target | --targe | --targ | --tar | --ta | --t)
576     ac_prev=target_alias ;;
577   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
578     target_alias=$ac_optarg ;;
579
580   -v | -verbose | --verbose | --verbos | --verbo | --verb)
581     verbose=yes ;;
582
583   -version | --version | --versio | --versi | --vers | -V)
584     ac_init_version=: ;;
585
586   -with-* | --with-*)
587     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
588     # Reject names that are not valid shell variable names.
589     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590       { echo "$as_me: error: invalid package name: $ac_package" >&2
591    { (exit 1); exit 1; }; }
592     ac_package=`echo $ac_package| sed 's/-/_/g'`
593     case $ac_option in
594       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
595       *) ac_optarg=yes ;;
596     esac
597     eval "with_$ac_package='$ac_optarg'" ;;
598
599   -without-* | --without-*)
600     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
601     # Reject names that are not valid shell variable names.
602     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603       { echo "$as_me: error: invalid package name: $ac_package" >&2
604    { (exit 1); exit 1; }; }
605     ac_package=`echo $ac_package | sed 's/-/_/g'`
606     eval "with_$ac_package=no" ;;
607
608   --x)
609     # Obsolete; use --with-x.
610     with_x=yes ;;
611
612   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613   | --x-incl | --x-inc | --x-in | --x-i)
614     ac_prev=x_includes ;;
615   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
617     x_includes=$ac_optarg ;;
618
619   -x-libraries | --x-libraries | --x-librarie | --x-librari \
620   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621     ac_prev=x_libraries ;;
622   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
624     x_libraries=$ac_optarg ;;
625
626   -*) { echo "$as_me: error: unrecognized option: $ac_option
627 Try \`$0 --help' for more information." >&2
628    { (exit 1); exit 1; }; }
629     ;;
630
631   *=*)
632     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633     # Reject names that are not valid shell variable names.
634     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636    { (exit 1); exit 1; }; }
637     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638     eval "$ac_envvar='$ac_optarg'"
639     export $ac_envvar ;;
640
641   *)
642     # FIXME: should be removed in autoconf 3.0.
643     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
647     ;;
648
649   esac
650 done
651
652 if test -n "$ac_prev"; then
653   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654   { echo "$as_me: error: missing argument to $ac_option" >&2
655    { (exit 1); exit 1; }; }
656 fi
657
658 # Be sure to have absolute paths.
659 for ac_var in exec_prefix prefix
660 do
661   eval ac_val=$`echo $ac_var`
662   case $ac_val in
663     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665    { (exit 1); exit 1; }; };;
666   esac
667 done
668
669 # Be sure to have absolute paths.
670 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671               localstatedir libdir includedir oldincludedir infodir mandir
672 do
673   eval ac_val=$`echo $ac_var`
674   case $ac_val in
675     [\\/$]* | ?:[\\/]* ) ;;
676     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677    { (exit 1); exit 1; }; };;
678   esac
679 done
680
681 # There might be people who depend on the old broken behavior: `$host'
682 # used to hold the argument of --host etc.
683 # FIXME: To remove some day.
684 build=$build_alias
685 host=$host_alias
686 target=$target_alias
687
688 # FIXME: To remove some day.
689 if test "x$host_alias" != x; then
690   if test "x$build_alias" = x; then
691     cross_compiling=maybe
692     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693     If a cross compiler is detected then cross compile mode will be used." >&2
694   elif test "x$build_alias" != "x$host_alias"; then
695     cross_compiling=yes
696   fi
697 fi
698
699 ac_tool_prefix=
700 test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702 test "$silent" = yes && exec 6>/dev/null
703
704
705 # Find the source files, if location was not specified.
706 if test -z "$srcdir"; then
707   ac_srcdir_defaulted=yes
708   # Try the directory containing this script, then its parent.
709   ac_confdir=`(dirname "$0") 2>/dev/null ||
710 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
711          X"$0" : 'X\(//\)[^/]' \| \
712          X"$0" : 'X\(//\)$' \| \
713          X"$0" : 'X\(/\)' \| \
714          .     : '\(.\)' 2>/dev/null ||
715 echo X"$0" |
716     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718           /^X\(\/\/\)$/{ s//\1/; q; }
719           /^X\(\/\).*/{ s//\1/; q; }
720           s/.*/./; q'`
721   srcdir=$ac_confdir
722   if test ! -r $srcdir/$ac_unique_file; then
723     srcdir=..
724   fi
725 else
726   ac_srcdir_defaulted=no
727 fi
728 if test ! -r $srcdir/$ac_unique_file; then
729   if test "$ac_srcdir_defaulted" = yes; then
730     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731    { (exit 1); exit 1; }; }
732   else
733     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734    { (exit 1); exit 1; }; }
735   fi
736 fi
737 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739    { (exit 1); exit 1; }; }
740 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741 ac_env_build_alias_set=${build_alias+set}
742 ac_env_build_alias_value=$build_alias
743 ac_cv_env_build_alias_set=${build_alias+set}
744 ac_cv_env_build_alias_value=$build_alias
745 ac_env_host_alias_set=${host_alias+set}
746 ac_env_host_alias_value=$host_alias
747 ac_cv_env_host_alias_set=${host_alias+set}
748 ac_cv_env_host_alias_value=$host_alias
749 ac_env_target_alias_set=${target_alias+set}
750 ac_env_target_alias_value=$target_alias
751 ac_cv_env_target_alias_set=${target_alias+set}
752 ac_cv_env_target_alias_value=$target_alias
753 ac_env_CC_set=${CC+set}
754 ac_env_CC_value=$CC
755 ac_cv_env_CC_set=${CC+set}
756 ac_cv_env_CC_value=$CC
757 ac_env_CFLAGS_set=${CFLAGS+set}
758 ac_env_CFLAGS_value=$CFLAGS
759 ac_cv_env_CFLAGS_set=${CFLAGS+set}
760 ac_cv_env_CFLAGS_value=$CFLAGS
761 ac_env_LDFLAGS_set=${LDFLAGS+set}
762 ac_env_LDFLAGS_value=$LDFLAGS
763 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764 ac_cv_env_LDFLAGS_value=$LDFLAGS
765 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766 ac_env_CPPFLAGS_value=$CPPFLAGS
767 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769 ac_env_CPP_set=${CPP+set}
770 ac_env_CPP_value=$CPP
771 ac_cv_env_CPP_set=${CPP+set}
772 ac_cv_env_CPP_value=$CPP
773
774 #
775 # Report the --help message.
776 #
777 if test "$ac_init_help" = "long"; then
778   # Omit some internal or obsolete options to make the list less imposing.
779   # This message is too long to be a string in the A/UX 3.1 sh.
780   cat <<_ACEOF
781 \`configure' configures this package to adapt to many kinds of systems.
782
783 Usage: $0 [OPTION]... [VAR=VALUE]...
784
785 To assign environment variables (e.g., CC, CFLAGS...), specify them as
786 VAR=VALUE.  See below for descriptions of some of the useful variables.
787
788 Defaults for the options are specified in brackets.
789
790
791 Configuration:
792
793   -h, --help              display this help and exit
794       --help=short        display options specific to this package
795       --help=recursive    display the short help of all the included packages
796   -V, --version           display version information and exit
797   -q, --quiet, --silent   do not print \`checking...' messages
798       --cache-file=FILE   cache test results in FILE [disabled]
799   -C, --config-cache      alias for \`--cache-file=config.cache'
800   -n, --no-create         do not create output files
801       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
802
803 _ACEOF
804
805   cat <<_ACEOF
806 Installation directories:
807   --prefix=PREFIX         install architecture-independent files in PREFIX
808                           [$ac_default_prefix]
809   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
810                           [PREFIX]
811
812 By default, \`make install' will install all the files in
813 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
814 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
815 for instance \`--prefix=\$HOME'.
816
817 For better control, use the options below.
818
819 Fine tuning of the installation directories:
820   --bindir=DIR           user executables [EPREFIX/bin]
821   --libexecdir=DIR       program executables [EPREFIX/libexec]
822   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
823   --libdir=DIR           object code libraries [EPREFIX/lib]
824   --includedir=DIR       C header files [PREFIX/include]
825   --x-includes=DIR        X include files are in DIR
826   --x-libraries=DIR       X library files are in DIR
827   --mandir=DIR           man documentation [PREFIX/man]
828 _ACEOF
829
830   cat <<\_ACEOF
831
832 X features:
833   --x-includes=DIR    X include files are in DIR
834   --x-libraries=DIR   X library files are in DIR
835
836 System types:
837   --build=BUILD     configure for building on BUILD [guessed]
838   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
839 _ACEOF
840 fi
841
842 if test -n "$ac_init_help"; then
843
844   cat <<\_ACEOF
845
846 Optional Features:
847   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
848   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
849
850 Screen locking options:
851   --enable-locking        Compile in support for locking the display.
852   --disable-locking       Do not allow locking at all.
853
854 Optional Packages:
855   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
856   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
857
858
859 Installation options:
860   --with-hackdir=DIR      Where to install the hundreds of demo executables.
861                           Default: `PREFIX/libexec/xscreensaver/'
862   --with-configdir=DIR    Where to install the data files that describe each
863                           of the display modes to the GUI.
864                           Default: `PREFIX/share/xscreensaver/config/'
865   --with-x-app-defaults=DIR
866                            Where to install xscreensaver configuration file.
867
868 Except where noted, all of the --with options below can also take a
869 directory argument: for example, `--with-motif=/opt/Motif'.  That would
870 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
871 to be added to the -L list, assuming those directories exist.
872
873 By default, support for each of these options will be built in, if the
874 relevant library routines exist.  At run time, they will then be used
875 only if the X server being used supports them.  Each --with option has
876 a corresponding --without option, to override building support for them
877 at all.
878
879 Screen blanking and idle-detection options:
880
881   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
882   --with-xidle-ext        Include support for the XIDLE extension.
883   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
884   --with-dpms-ext         Include support for the DPMS extension.
885   --with-xinerama-ext     Include support for the XINERAMA extension.
886   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
887   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
888   --with-randr-ext        Include support for the X Resize+Rotate extension.
889   --with-proc-interrupts  Include support for consulting the /proc/interrupts
890                           file to notice keyboard activity.
891   --with-pam              Include support for PAM (Pluggable Auth Modules.)
892   --with-pam-service-name=NAME
893                           NAME is the name of the PAM service that
894                           xscreensaver will authenticate as.
895   --with-kerberos         Include support for Kerberos authentication.
896   --with-shadow           Include support for shadow password authentication.
897   --with-passwd-helper    Include support for an external password
898                           verification helper program.
899   --with-login-manager    Put a "New Login" button on the unlock dialog that
900                           runs a login manager such as gdmflexiserver.
901
902 User interface options:
903
904   --with-gtk              Use the Gtk toolkit for the user interface.
905   --with-motif            Use the Motif toolkit for the user interface
906                           (not recommended.)
907
908 Graphics options:
909
910   --with-gl               Build those demos which depend on OpenGL.
911   --with-gle              Build those demos which depend on GLE
912                           (the OpenGL "extrusion" library.)
913   --with-pixbuf           Include support for the GDK-Pixbuf library in some
914                           demos, which will make it possible for them to read
915                           GIF, JPEG, and PNG files as well.
916   --with-xpm              Include support for XPM files in some demos.
917                           (Not needed if Pixbuf is used.)
918   --with-jpeg             Include support for the JPEG library.
919   --with-xshm-ext         Include support for the Shared Memory extension.
920   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
921   --with-readdisplay      Include support for the XReadDisplay extension.
922   --with-image-directory=DIR  By default, some demos may display random images
923                           from this directory.
924   --with-text-file=FILE   By default, some demos may display this file.
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
975 # Do not use `cd foo && pwd` to compute absolute paths, because
976 # the directories may not exist.
977 case `pwd` in
978 .) ac_abs_builddir="$ac_dir";;
979 *)
980   case "$ac_dir" in
981   .) ac_abs_builddir=`pwd`;;
982   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
983   *) ac_abs_builddir=`pwd`/"$ac_dir";;
984   esac;;
985 esac
986 case $ac_abs_builddir in
987 .) ac_abs_top_builddir=${ac_top_builddir}.;;
988 *)
989   case ${ac_top_builddir}. in
990   .) ac_abs_top_builddir=$ac_abs_builddir;;
991   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
992   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
993   esac;;
994 esac
995 case $ac_abs_builddir in
996 .) ac_abs_srcdir=$ac_srcdir;;
997 *)
998   case $ac_srcdir in
999   .) ac_abs_srcdir=$ac_abs_builddir;;
1000   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1001   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1002   esac;;
1003 esac
1004 case $ac_abs_builddir in
1005 .) ac_abs_top_srcdir=$ac_top_srcdir;;
1006 *)
1007   case $ac_top_srcdir in
1008   .) ac_abs_top_srcdir=$ac_abs_builddir;;
1009   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1010   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1011   esac;;
1012 esac
1013
1014     cd $ac_dir
1015     # Check for guested configure; otherwise get Cygnus style configure.
1016     if test -f $ac_srcdir/configure.gnu; then
1017       echo
1018       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1019     elif test -f $ac_srcdir/configure; then
1020       echo
1021       $SHELL $ac_srcdir/configure  --help=recursive
1022     elif test -f $ac_srcdir/configure.ac ||
1023            test -f $ac_srcdir/configure.in; then
1024       echo
1025       $ac_configure --help
1026     else
1027       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1028     fi
1029     cd $ac_popdir
1030   done
1031 fi
1032
1033 test -n "$ac_init_help" && exit 0
1034 if $ac_init_version; then
1035   cat <<\_ACEOF
1036
1037 Copyright (C) 2003 Free Software Foundation, Inc.
1038 This configure script is free software; the Free Software Foundation
1039 gives unlimited permission to copy, distribute and modify it.
1040 _ACEOF
1041   exit 0
1042 fi
1043 exec 5>config.log
1044 cat >&5 <<_ACEOF
1045 This file contains any messages produced by compilers while
1046 running configure, to aid debugging if configure makes a mistake.
1047
1048 It was created by $as_me, which was
1049 generated by GNU Autoconf 2.59.  Invocation command line was
1050
1051   $ $0 $@
1052
1053 _ACEOF
1054 {
1055 cat <<_ASUNAME
1056 ## --------- ##
1057 ## Platform. ##
1058 ## --------- ##
1059
1060 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1061 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1062 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1063 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1064 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1065
1066 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1067 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1068
1069 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1070 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1071 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1072 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1073 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1074 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1075 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1076
1077 _ASUNAME
1078
1079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1080 for as_dir in $PATH
1081 do
1082   IFS=$as_save_IFS
1083   test -z "$as_dir" && as_dir=.
1084   echo "PATH: $as_dir"
1085 done
1086
1087 } >&5
1088
1089 cat >&5 <<_ACEOF
1090
1091
1092 ## ----------- ##
1093 ## Core tests. ##
1094 ## ----------- ##
1095
1096 _ACEOF
1097
1098
1099 # Keep a trace of the command line.
1100 # Strip out --no-create and --no-recursion so they do not pile up.
1101 # Strip out --silent because we don't want to record it for future runs.
1102 # Also quote any args containing shell meta-characters.
1103 # Make two passes to allow for proper duplicate-argument suppression.
1104 ac_configure_args=
1105 ac_configure_args0=
1106 ac_configure_args1=
1107 ac_sep=
1108 ac_must_keep_next=false
1109 for ac_pass in 1 2
1110 do
1111   for ac_arg
1112   do
1113     case $ac_arg in
1114     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1115     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1116     | -silent | --silent | --silen | --sile | --sil)
1117       continue ;;
1118     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1119       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1120     esac
1121     case $ac_pass in
1122     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1123     2)
1124       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1125       if test $ac_must_keep_next = true; then
1126         ac_must_keep_next=false # Got value, back to normal.
1127       else
1128         case $ac_arg in
1129           *=* | --config-cache | -C | -disable-* | --disable-* \
1130           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1131           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1132           | -with-* | --with-* | -without-* | --without-* | --x)
1133             case "$ac_configure_args0 " in
1134               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1135             esac
1136             ;;
1137           -* ) ac_must_keep_next=true ;;
1138         esac
1139       fi
1140       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1141       # Get rid of the leading space.
1142       ac_sep=" "
1143       ;;
1144     esac
1145   done
1146 done
1147 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1148 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1149
1150 # When interrupted or exit'd, cleanup temporary files, and complete
1151 # config.log.  We remove comments because anyway the quotes in there
1152 # would cause problems or look ugly.
1153 # WARNING: Be sure not to use single quotes in there, as some shells,
1154 # such as our DU 5.0 friend, will then `close' the trap.
1155 trap 'exit_status=$?
1156   # Save into config.log some information that might help in debugging.
1157   {
1158     echo
1159
1160     cat <<\_ASBOX
1161 ## ---------------- ##
1162 ## Cache variables. ##
1163 ## ---------------- ##
1164 _ASBOX
1165     echo
1166     # The following way of writing the cache mishandles newlines in values,
1167 {
1168   (set) 2>&1 |
1169     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1170     *ac_space=\ *)
1171       sed -n \
1172         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1173           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1174       ;;
1175     *)
1176       sed -n \
1177         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1178       ;;
1179     esac;
1180 }
1181     echo
1182
1183     cat <<\_ASBOX
1184 ## ----------------- ##
1185 ## Output variables. ##
1186 ## ----------------- ##
1187 _ASBOX
1188     echo
1189     for ac_var in $ac_subst_vars
1190     do
1191       eval ac_val=$`echo $ac_var`
1192       echo "$ac_var='"'"'$ac_val'"'"'"
1193     done | sort
1194     echo
1195
1196     if test -n "$ac_subst_files"; then
1197       cat <<\_ASBOX
1198 ## ------------- ##
1199 ## Output files. ##
1200 ## ------------- ##
1201 _ASBOX
1202       echo
1203       for ac_var in $ac_subst_files
1204       do
1205         eval ac_val=$`echo $ac_var`
1206         echo "$ac_var='"'"'$ac_val'"'"'"
1207       done | sort
1208       echo
1209     fi
1210
1211     if test -s confdefs.h; then
1212       cat <<\_ASBOX
1213 ## ----------- ##
1214 ## confdefs.h. ##
1215 ## ----------- ##
1216 _ASBOX
1217       echo
1218       sed "/^$/d" confdefs.h | sort
1219       echo
1220     fi
1221     test "$ac_signal" != 0 &&
1222       echo "$as_me: caught signal $ac_signal"
1223     echo "$as_me: exit $exit_status"
1224   } >&5
1225   rm -f core *.core &&
1226   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1227     exit $exit_status
1228      ' 0
1229 for ac_signal in 1 2 13 15; do
1230   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1231 done
1232 ac_signal=0
1233
1234 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1235 rm -rf conftest* confdefs.h
1236 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1237 echo >confdefs.h
1238
1239 # Predefined preprocessor variables.
1240
1241 cat >>confdefs.h <<_ACEOF
1242 #define PACKAGE_NAME "$PACKAGE_NAME"
1243 _ACEOF
1244
1245
1246 cat >>confdefs.h <<_ACEOF
1247 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1248 _ACEOF
1249
1250
1251 cat >>confdefs.h <<_ACEOF
1252 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1253 _ACEOF
1254
1255
1256 cat >>confdefs.h <<_ACEOF
1257 #define PACKAGE_STRING "$PACKAGE_STRING"
1258 _ACEOF
1259
1260
1261 cat >>confdefs.h <<_ACEOF
1262 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1263 _ACEOF
1264
1265
1266 # Let the site file select an alternate cache file if it wants to.
1267 # Prefer explicitly selected file to automatically selected ones.
1268 if test -z "$CONFIG_SITE"; then
1269   if test "x$prefix" != xNONE; then
1270     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1271   else
1272     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1273   fi
1274 fi
1275 for ac_site_file in $CONFIG_SITE; do
1276   if test -r "$ac_site_file"; then
1277     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1278 echo "$as_me: loading site script $ac_site_file" >&6;}
1279     sed 's/^/| /' "$ac_site_file" >&5
1280     . "$ac_site_file"
1281   fi
1282 done
1283
1284 if test -r "$cache_file"; then
1285   # Some versions of bash will fail to source /dev/null (special
1286   # files actually), so we avoid doing that.
1287   if test -f "$cache_file"; then
1288     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1289 echo "$as_me: loading cache $cache_file" >&6;}
1290     case $cache_file in
1291       [\\/]* | ?:[\\/]* ) . $cache_file;;
1292       *)                      . ./$cache_file;;
1293     esac
1294   fi
1295 else
1296   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1297 echo "$as_me: creating cache $cache_file" >&6;}
1298   >$cache_file
1299 fi
1300
1301 # Check that the precious variables saved in the cache have kept the same
1302 # value.
1303 ac_cache_corrupted=false
1304 for ac_var in `(set) 2>&1 |
1305                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1306   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1307   eval ac_new_set=\$ac_env_${ac_var}_set
1308   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1309   eval ac_new_val="\$ac_env_${ac_var}_value"
1310   case $ac_old_set,$ac_new_set in
1311     set,)
1312       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1313 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1314       ac_cache_corrupted=: ;;
1315     ,set)
1316       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1317 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1318       ac_cache_corrupted=: ;;
1319     ,);;
1320     *)
1321       if test "x$ac_old_val" != "x$ac_new_val"; then
1322         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1323 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1324         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1325 echo "$as_me:   former value:  $ac_old_val" >&2;}
1326         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1327 echo "$as_me:   current value: $ac_new_val" >&2;}
1328         ac_cache_corrupted=:
1329       fi;;
1330   esac
1331   # Pass precious variables to config.status.
1332   if test "$ac_new_set" = set; then
1333     case $ac_new_val in
1334     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1335       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1336     *) ac_arg=$ac_var=$ac_new_val ;;
1337     esac
1338     case " $ac_configure_args " in
1339       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1340       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1341     esac
1342   fi
1343 done
1344 if $ac_cache_corrupted; then
1345   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1346 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1347   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1348 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1349    { (exit 1); exit 1; }; }
1350 fi
1351
1352 ac_ext=c
1353 ac_cpp='$CPP $CPPFLAGS'
1354 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1355 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1356 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376           ac_config_headers="$ac_config_headers config.h"
1377
1378
1379 echo "current directory: `pwd`"
1380 echo "command line was: $0 $@"
1381
1382 ###############################################################################
1383 #
1384 #       Autoheader stuff
1385 #
1386 ###############################################################################
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546 # After checking to see that --srcdir is correct (which AC_INIT does)
1547 # check for some random other files that come later in the tar file,
1548 # to make sure everything is here.
1549 #
1550 for d in driver utils hacks hacks/glx ; do
1551   f=$srcdir/$d/Makefile.in
1552   if test \! -r $f ; then
1553     echo ""
1554     echo "ERROR: The package is incomplete: $f does not exist."
1555     echo "       This probably means that your download was truncated."
1556     echo ""
1557     exit 1
1558   fi
1559 done
1560
1561 ###############################################################################
1562 #
1563 #       Function to figure out how to run the compiler.
1564 #
1565 ###############################################################################
1566
1567
1568
1569
1570 ###############################################################################
1571 #
1572 #       Functions to figure out how to disable // comments in ANSI C code.
1573 #
1574 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
1575 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
1576 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
1577 #       so much for compatibility!)
1578 #
1579 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
1580 #       declarations preceed statements, without resorting to "-pedantic".
1581 #       This means that there is no way to get gcc3 to issue warnings that
1582 #       ensure that your code complies with the ANSI/ISO C89 standard, without
1583 #       also drowning in totally useless warnings.  Thank you master may I
1584 #       have another.
1585 #
1586 #       So, I give up, let's just use -pedantic.
1587 #
1588 ###############################################################################
1589
1590
1591
1592
1593
1594
1595 ###############################################################################
1596 #
1597 #       Function to figure out how to turn off Objective C on MacOS X.
1598 #       (We have to do this to work around an Apple-specific gcc bug.)
1599 #
1600 ###############################################################################
1601
1602
1603
1604
1605
1606
1607 ###############################################################################
1608 #
1609 #       Function to figure out how to create directory trees.
1610 #
1611 ###############################################################################
1612
1613
1614
1615
1616 ###############################################################################
1617 #
1618 #       Function to check whether gettimeofday() exists, and how to call it.
1619 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1620 #
1621 ###############################################################################
1622
1623
1624
1625
1626 ###############################################################################
1627 #
1628 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1629 #
1630 ###############################################################################
1631
1632 # M4 sucks!!  perl sucks too!!
1633
1634 perl_version_cmd='print $]'
1635
1636
1637
1638
1639
1640 ###############################################################################
1641 #
1642 #       Function to demand "bc".  Losers.
1643 #
1644 ###############################################################################
1645
1646
1647
1648 ###############################################################################
1649 #
1650 #       Functions to check how to do ICMP PING requests.
1651 #
1652 ###############################################################################
1653
1654
1655
1656
1657
1658
1659 ###############################################################################
1660 #
1661 #       Functions to check for various X11 crap.
1662 #
1663 ###############################################################################
1664
1665 # Try and find the app-defaults directory.
1666 # It sucks that autoconf doesn't do this already...
1667 #
1668
1669
1670 ###############################################################################
1671 #
1672 #       Handle the --with-x-app-defaults option HERE
1673 #
1674 ###############################################################################
1675
1676
1677 # Check whether --with-x-app-defaults or --without-x-app-defaults was given.
1678 if test "${with_x_app_defaults+set}" = set; then
1679   withval="$with_x_app_defaults"
1680   ac_cv_x_app_defaults="$withval"
1681 else
1682   eval ac_x_app_defaults="$withval"
1683 fi;
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694 # Random special-cases for X on certain pathological OSes.
1695 # You know who you are.
1696 #
1697
1698
1699
1700
1701 ###############################################################################
1702 #
1703 #       Some utility functions to make checking for X things easier.
1704 #
1705 ###############################################################################
1706
1707 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1708 #
1709
1710
1711 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1712 #
1713
1714
1715 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1716 #
1717
1718
1719
1720 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1721 # Use this sparingly; it probably doesn't work very well on X programs.
1722 #
1723
1724
1725 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1726 # (But not the -L directories!)
1727 #
1728
1729
1730
1731
1732 # Usage: HANDLE_X_PATH_ARG([variable_name],
1733 #                          [--command-line-option],
1734 #                          [descriptive string])
1735 #
1736 # All of the --with options take three forms:
1737 #
1738 #   --with-foo (or --with-foo=yes)
1739 #   --without-foo (or --with-foo=no)
1740 #   --with-foo=/DIR
1741 #
1742 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1743 # a directory (string beginning with a slash) it checks to see whether
1744 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1745 # as appropriate.
1746 #
1747
1748
1749
1750
1751 ###############################################################################
1752 ###############################################################################
1753 #
1754 #       End of function definitions.  Now start actually executing stuff.
1755 #
1756 ###############################################################################
1757 ###############################################################################
1758
1759 # random compiler setup
1760 ac_aux_dir=
1761 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1762   if test -f $ac_dir/install-sh; then
1763     ac_aux_dir=$ac_dir
1764     ac_install_sh="$ac_aux_dir/install-sh -c"
1765     break
1766   elif test -f $ac_dir/install.sh; then
1767     ac_aux_dir=$ac_dir
1768     ac_install_sh="$ac_aux_dir/install.sh -c"
1769     break
1770   elif test -f $ac_dir/shtool; then
1771     ac_aux_dir=$ac_dir
1772     ac_install_sh="$ac_aux_dir/shtool install -c"
1773     break
1774   fi
1775 done
1776 if test -z "$ac_aux_dir"; then
1777   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1778 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1779    { (exit 1); exit 1; }; }
1780 fi
1781 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1782 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1783 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1784
1785 # Make sure we can run config.sub.
1786 $ac_config_sub sun4 >/dev/null 2>&1 ||
1787   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1788 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1789    { (exit 1); exit 1; }; }
1790
1791 echo "$as_me:$LINENO: checking build system type" >&5
1792 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1793 if test "${ac_cv_build+set}" = set; then
1794   echo $ECHO_N "(cached) $ECHO_C" >&6
1795 else
1796   ac_cv_build_alias=$build_alias
1797 test -z "$ac_cv_build_alias" &&
1798   ac_cv_build_alias=`$ac_config_guess`
1799 test -z "$ac_cv_build_alias" &&
1800   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1801 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1802    { (exit 1); exit 1; }; }
1803 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1804   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1805 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1806    { (exit 1); exit 1; }; }
1807
1808 fi
1809 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1810 echo "${ECHO_T}$ac_cv_build" >&6
1811 build=$ac_cv_build
1812 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1813 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1814 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1815
1816
1817 echo "$as_me:$LINENO: checking host system type" >&5
1818 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1819 if test "${ac_cv_host+set}" = set; then
1820   echo $ECHO_N "(cached) $ECHO_C" >&6
1821 else
1822   ac_cv_host_alias=$host_alias
1823 test -z "$ac_cv_host_alias" &&
1824   ac_cv_host_alias=$ac_cv_build_alias
1825 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1826   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1827 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1828    { (exit 1); exit 1; }; }
1829
1830 fi
1831 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1832 echo "${ECHO_T}$ac_cv_host" >&6
1833 host=$ac_cv_host
1834 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1835 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1836 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1837
1838
1839
1840 ac_ext=c
1841 ac_cpp='$CPP $CPPFLAGS'
1842 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1843 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1844 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1845 if test -n "$ac_tool_prefix"; then
1846   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1847 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1848 echo "$as_me:$LINENO: checking for $ac_word" >&5
1849 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1850 if test "${ac_cv_prog_CC+set}" = set; then
1851   echo $ECHO_N "(cached) $ECHO_C" >&6
1852 else
1853   if test -n "$CC"; then
1854   ac_cv_prog_CC="$CC" # Let the user override the test.
1855 else
1856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1857 for as_dir in $PATH
1858 do
1859   IFS=$as_save_IFS
1860   test -z "$as_dir" && as_dir=.
1861   for ac_exec_ext in '' $ac_executable_extensions; do
1862   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1863     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1864     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1865     break 2
1866   fi
1867 done
1868 done
1869
1870 fi
1871 fi
1872 CC=$ac_cv_prog_CC
1873 if test -n "$CC"; then
1874   echo "$as_me:$LINENO: result: $CC" >&5
1875 echo "${ECHO_T}$CC" >&6
1876 else
1877   echo "$as_me:$LINENO: result: no" >&5
1878 echo "${ECHO_T}no" >&6
1879 fi
1880
1881 fi
1882 if test -z "$ac_cv_prog_CC"; then
1883   ac_ct_CC=$CC
1884   # Extract the first word of "gcc", so it can be a program name with args.
1885 set dummy gcc; ac_word=$2
1886 echo "$as_me:$LINENO: checking for $ac_word" >&5
1887 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1888 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1889   echo $ECHO_N "(cached) $ECHO_C" >&6
1890 else
1891   if test -n "$ac_ct_CC"; then
1892   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1893 else
1894 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1895 for as_dir in $PATH
1896 do
1897   IFS=$as_save_IFS
1898   test -z "$as_dir" && as_dir=.
1899   for ac_exec_ext in '' $ac_executable_extensions; do
1900   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1901     ac_cv_prog_ac_ct_CC="gcc"
1902     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1903     break 2
1904   fi
1905 done
1906 done
1907
1908 fi
1909 fi
1910 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1911 if test -n "$ac_ct_CC"; then
1912   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1913 echo "${ECHO_T}$ac_ct_CC" >&6
1914 else
1915   echo "$as_me:$LINENO: result: no" >&5
1916 echo "${ECHO_T}no" >&6
1917 fi
1918
1919   CC=$ac_ct_CC
1920 else
1921   CC="$ac_cv_prog_CC"
1922 fi
1923
1924 if test -z "$CC"; then
1925   if test -n "$ac_tool_prefix"; then
1926   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1927 set dummy ${ac_tool_prefix}cc; ac_word=$2
1928 echo "$as_me:$LINENO: checking for $ac_word" >&5
1929 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1930 if test "${ac_cv_prog_CC+set}" = set; then
1931   echo $ECHO_N "(cached) $ECHO_C" >&6
1932 else
1933   if test -n "$CC"; then
1934   ac_cv_prog_CC="$CC" # Let the user override the test.
1935 else
1936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1937 for as_dir in $PATH
1938 do
1939   IFS=$as_save_IFS
1940   test -z "$as_dir" && as_dir=.
1941   for ac_exec_ext in '' $ac_executable_extensions; do
1942   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1943     ac_cv_prog_CC="${ac_tool_prefix}cc"
1944     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1945     break 2
1946   fi
1947 done
1948 done
1949
1950 fi
1951 fi
1952 CC=$ac_cv_prog_CC
1953 if test -n "$CC"; then
1954   echo "$as_me:$LINENO: result: $CC" >&5
1955 echo "${ECHO_T}$CC" >&6
1956 else
1957   echo "$as_me:$LINENO: result: no" >&5
1958 echo "${ECHO_T}no" >&6
1959 fi
1960
1961 fi
1962 if test -z "$ac_cv_prog_CC"; then
1963   ac_ct_CC=$CC
1964   # Extract the first word of "cc", so it can be a program name with args.
1965 set dummy cc; ac_word=$2
1966 echo "$as_me:$LINENO: checking for $ac_word" >&5
1967 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1968 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1969   echo $ECHO_N "(cached) $ECHO_C" >&6
1970 else
1971   if test -n "$ac_ct_CC"; then
1972   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1973 else
1974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1975 for as_dir in $PATH
1976 do
1977   IFS=$as_save_IFS
1978   test -z "$as_dir" && as_dir=.
1979   for ac_exec_ext in '' $ac_executable_extensions; do
1980   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1981     ac_cv_prog_ac_ct_CC="cc"
1982     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1983     break 2
1984   fi
1985 done
1986 done
1987
1988 fi
1989 fi
1990 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1991 if test -n "$ac_ct_CC"; then
1992   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1993 echo "${ECHO_T}$ac_ct_CC" >&6
1994 else
1995   echo "$as_me:$LINENO: result: no" >&5
1996 echo "${ECHO_T}no" >&6
1997 fi
1998
1999   CC=$ac_ct_CC
2000 else
2001   CC="$ac_cv_prog_CC"
2002 fi
2003
2004 fi
2005 if test -z "$CC"; then
2006   # Extract the first word of "cc", so it can be a program name with args.
2007 set dummy cc; ac_word=$2
2008 echo "$as_me:$LINENO: checking for $ac_word" >&5
2009 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2010 if test "${ac_cv_prog_CC+set}" = set; then
2011   echo $ECHO_N "(cached) $ECHO_C" >&6
2012 else
2013   if test -n "$CC"; then
2014   ac_cv_prog_CC="$CC" # Let the user override the test.
2015 else
2016   ac_prog_rejected=no
2017 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2018 for as_dir in $PATH
2019 do
2020   IFS=$as_save_IFS
2021   test -z "$as_dir" && as_dir=.
2022   for ac_exec_ext in '' $ac_executable_extensions; do
2023   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2024     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2025        ac_prog_rejected=yes
2026        continue
2027      fi
2028     ac_cv_prog_CC="cc"
2029     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2030     break 2
2031   fi
2032 done
2033 done
2034
2035 if test $ac_prog_rejected = yes; then
2036   # We found a bogon in the path, so make sure we never use it.
2037   set dummy $ac_cv_prog_CC
2038   shift
2039   if test $# != 0; then
2040     # We chose a different compiler from the bogus one.
2041     # However, it has the same basename, so the bogon will be chosen
2042     # first if we set CC to just the basename; use the full file name.
2043     shift
2044     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2045   fi
2046 fi
2047 fi
2048 fi
2049 CC=$ac_cv_prog_CC
2050 if test -n "$CC"; then
2051   echo "$as_me:$LINENO: result: $CC" >&5
2052 echo "${ECHO_T}$CC" >&6
2053 else
2054   echo "$as_me:$LINENO: result: no" >&5
2055 echo "${ECHO_T}no" >&6
2056 fi
2057
2058 fi
2059 if test -z "$CC"; then
2060   if test -n "$ac_tool_prefix"; then
2061   for ac_prog in cl
2062   do
2063     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2064 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2065 echo "$as_me:$LINENO: checking for $ac_word" >&5
2066 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2067 if test "${ac_cv_prog_CC+set}" = set; then
2068   echo $ECHO_N "(cached) $ECHO_C" >&6
2069 else
2070   if test -n "$CC"; then
2071   ac_cv_prog_CC="$CC" # Let the user override the test.
2072 else
2073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2074 for as_dir in $PATH
2075 do
2076   IFS=$as_save_IFS
2077   test -z "$as_dir" && as_dir=.
2078   for ac_exec_ext in '' $ac_executable_extensions; do
2079   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2080     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2081     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2082     break 2
2083   fi
2084 done
2085 done
2086
2087 fi
2088 fi
2089 CC=$ac_cv_prog_CC
2090 if test -n "$CC"; then
2091   echo "$as_me:$LINENO: result: $CC" >&5
2092 echo "${ECHO_T}$CC" >&6
2093 else
2094   echo "$as_me:$LINENO: result: no" >&5
2095 echo "${ECHO_T}no" >&6
2096 fi
2097
2098     test -n "$CC" && break
2099   done
2100 fi
2101 if test -z "$CC"; then
2102   ac_ct_CC=$CC
2103   for ac_prog in cl
2104 do
2105   # Extract the first word of "$ac_prog", so it can be a program name with args.
2106 set dummy $ac_prog; ac_word=$2
2107 echo "$as_me:$LINENO: checking for $ac_word" >&5
2108 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2109 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2110   echo $ECHO_N "(cached) $ECHO_C" >&6
2111 else
2112   if test -n "$ac_ct_CC"; then
2113   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2114 else
2115 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2116 for as_dir in $PATH
2117 do
2118   IFS=$as_save_IFS
2119   test -z "$as_dir" && as_dir=.
2120   for ac_exec_ext in '' $ac_executable_extensions; do
2121   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2122     ac_cv_prog_ac_ct_CC="$ac_prog"
2123     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2124     break 2
2125   fi
2126 done
2127 done
2128
2129 fi
2130 fi
2131 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2132 if test -n "$ac_ct_CC"; then
2133   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2134 echo "${ECHO_T}$ac_ct_CC" >&6
2135 else
2136   echo "$as_me:$LINENO: result: no" >&5
2137 echo "${ECHO_T}no" >&6
2138 fi
2139
2140   test -n "$ac_ct_CC" && break
2141 done
2142
2143   CC=$ac_ct_CC
2144 fi
2145
2146 fi
2147
2148
2149 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2150 See \`config.log' for more details." >&5
2151 echo "$as_me: error: no acceptable C compiler found in \$PATH
2152 See \`config.log' for more details." >&2;}
2153    { (exit 1); exit 1; }; }
2154
2155 # Provide some information about the compiler.
2156 echo "$as_me:$LINENO:" \
2157      "checking for C compiler version" >&5
2158 ac_compiler=`set X $ac_compile; echo $2`
2159 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2160   (eval $ac_compiler --version </dev/null >&5) 2>&5
2161   ac_status=$?
2162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2163   (exit $ac_status); }
2164 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2165   (eval $ac_compiler -v </dev/null >&5) 2>&5
2166   ac_status=$?
2167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2168   (exit $ac_status); }
2169 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2170   (eval $ac_compiler -V </dev/null >&5) 2>&5
2171   ac_status=$?
2172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2173   (exit $ac_status); }
2174
2175 cat >conftest.$ac_ext <<_ACEOF
2176 /* confdefs.h.  */
2177 _ACEOF
2178 cat confdefs.h >>conftest.$ac_ext
2179 cat >>conftest.$ac_ext <<_ACEOF
2180 /* end confdefs.h.  */
2181
2182 int
2183 main ()
2184 {
2185
2186   ;
2187   return 0;
2188 }
2189 _ACEOF
2190 ac_clean_files_save=$ac_clean_files
2191 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2192 # Try to create an executable without -o first, disregard a.out.
2193 # It will help us diagnose broken compilers, and finding out an intuition
2194 # of exeext.
2195 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2196 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2197 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2198 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2199   (eval $ac_link_default) 2>&5
2200   ac_status=$?
2201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2202   (exit $ac_status); }; then
2203   # Find the output, starting from the most likely.  This scheme is
2204 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2205 # resort.
2206
2207 # Be careful to initialize this variable, since it used to be cached.
2208 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2209 ac_cv_exeext=
2210 # b.out is created by i960 compilers.
2211 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2212 do
2213   test -f "$ac_file" || continue
2214   case $ac_file in
2215     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2216         ;;
2217     conftest.$ac_ext )
2218         # This is the source file.
2219         ;;
2220     [ab].out )
2221         # We found the default executable, but exeext='' is most
2222         # certainly right.
2223         break;;
2224     *.* )
2225         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2226         # FIXME: I believe we export ac_cv_exeext for Libtool,
2227         # but it would be cool to find out if it's true.  Does anybody
2228         # maintain Libtool? --akim.
2229         export ac_cv_exeext
2230         break;;
2231     * )
2232         break;;
2233   esac
2234 done
2235 else
2236   echo "$as_me: failed program was:" >&5
2237 sed 's/^/| /' conftest.$ac_ext >&5
2238
2239 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2240 See \`config.log' for more details." >&5
2241 echo "$as_me: error: C compiler cannot create executables
2242 See \`config.log' for more details." >&2;}
2243    { (exit 77); exit 77; }; }
2244 fi
2245
2246 ac_exeext=$ac_cv_exeext
2247 echo "$as_me:$LINENO: result: $ac_file" >&5
2248 echo "${ECHO_T}$ac_file" >&6
2249
2250 # Check the compiler produces executables we can run.  If not, either
2251 # the compiler is broken, or we cross compile.
2252 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2253 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2254 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2255 # If not cross compiling, check that we can run a simple program.
2256 if test "$cross_compiling" != yes; then
2257   if { ac_try='./$ac_file'
2258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2259   (eval $ac_try) 2>&5
2260   ac_status=$?
2261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2262   (exit $ac_status); }; }; then
2263     cross_compiling=no
2264   else
2265     if test "$cross_compiling" = maybe; then
2266         cross_compiling=yes
2267     else
2268         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2269 If you meant to cross compile, use \`--host'.
2270 See \`config.log' for more details." >&5
2271 echo "$as_me: error: cannot run C compiled programs.
2272 If you meant to cross compile, use \`--host'.
2273 See \`config.log' for more details." >&2;}
2274    { (exit 1); exit 1; }; }
2275     fi
2276   fi
2277 fi
2278 echo "$as_me:$LINENO: result: yes" >&5
2279 echo "${ECHO_T}yes" >&6
2280
2281 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2282 ac_clean_files=$ac_clean_files_save
2283 # Check the compiler produces executables we can run.  If not, either
2284 # the compiler is broken, or we cross compile.
2285 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2286 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2287 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2288 echo "${ECHO_T}$cross_compiling" >&6
2289
2290 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2291 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2292 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2293   (eval $ac_link) 2>&5
2294   ac_status=$?
2295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2296   (exit $ac_status); }; then
2297   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2298 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2299 # work properly (i.e., refer to `conftest.exe'), while it won't with
2300 # `rm'.
2301 for ac_file in conftest.exe conftest conftest.*; do
2302   test -f "$ac_file" || continue
2303   case $ac_file in
2304     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2305     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2306           export ac_cv_exeext
2307           break;;
2308     * ) break;;
2309   esac
2310 done
2311 else
2312   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2313 See \`config.log' for more details." >&5
2314 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2315 See \`config.log' for more details." >&2;}
2316    { (exit 1); exit 1; }; }
2317 fi
2318
2319 rm -f conftest$ac_cv_exeext
2320 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2321 echo "${ECHO_T}$ac_cv_exeext" >&6
2322
2323 rm -f conftest.$ac_ext
2324 EXEEXT=$ac_cv_exeext
2325 ac_exeext=$EXEEXT
2326 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2327 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2328 if test "${ac_cv_objext+set}" = set; then
2329   echo $ECHO_N "(cached) $ECHO_C" >&6
2330 else
2331   cat >conftest.$ac_ext <<_ACEOF
2332 /* confdefs.h.  */
2333 _ACEOF
2334 cat confdefs.h >>conftest.$ac_ext
2335 cat >>conftest.$ac_ext <<_ACEOF
2336 /* end confdefs.h.  */
2337
2338 int
2339 main ()
2340 {
2341
2342   ;
2343   return 0;
2344 }
2345 _ACEOF
2346 rm -f conftest.o conftest.obj
2347 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2348   (eval $ac_compile) 2>&5
2349   ac_status=$?
2350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2351   (exit $ac_status); }; then
2352   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2353   case $ac_file in
2354     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2355     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2356        break;;
2357   esac
2358 done
2359 else
2360   echo "$as_me: failed program was:" >&5
2361 sed 's/^/| /' conftest.$ac_ext >&5
2362
2363 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2364 See \`config.log' for more details." >&5
2365 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2366 See \`config.log' for more details." >&2;}
2367    { (exit 1); exit 1; }; }
2368 fi
2369
2370 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2371 fi
2372 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2373 echo "${ECHO_T}$ac_cv_objext" >&6
2374 OBJEXT=$ac_cv_objext
2375 ac_objext=$OBJEXT
2376 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2377 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2378 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2379   echo $ECHO_N "(cached) $ECHO_C" >&6
2380 else
2381   cat >conftest.$ac_ext <<_ACEOF
2382 /* confdefs.h.  */
2383 _ACEOF
2384 cat confdefs.h >>conftest.$ac_ext
2385 cat >>conftest.$ac_ext <<_ACEOF
2386 /* end confdefs.h.  */
2387
2388 int
2389 main ()
2390 {
2391 #ifndef __GNUC__
2392        choke me
2393 #endif
2394
2395   ;
2396   return 0;
2397 }
2398 _ACEOF
2399 rm -f conftest.$ac_objext
2400 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2401   (eval $ac_compile) 2>conftest.er1
2402   ac_status=$?
2403   grep -v '^ *+' conftest.er1 >conftest.err
2404   rm -f conftest.er1
2405   cat conftest.err >&5
2406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2407   (exit $ac_status); } &&
2408          { ac_try='test -z "$ac_c_werror_flag"
2409                          || test ! -s conftest.err'
2410   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2411   (eval $ac_try) 2>&5
2412   ac_status=$?
2413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2414   (exit $ac_status); }; } &&
2415          { ac_try='test -s conftest.$ac_objext'
2416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2417   (eval $ac_try) 2>&5
2418   ac_status=$?
2419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2420   (exit $ac_status); }; }; then
2421   ac_compiler_gnu=yes
2422 else
2423   echo "$as_me: failed program was:" >&5
2424 sed 's/^/| /' conftest.$ac_ext >&5
2425
2426 ac_compiler_gnu=no
2427 fi
2428 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2429 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2430
2431 fi
2432 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2433 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2434 GCC=`test $ac_compiler_gnu = yes && echo yes`
2435 ac_test_CFLAGS=${CFLAGS+set}
2436 ac_save_CFLAGS=$CFLAGS
2437 CFLAGS="-g"
2438 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2439 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2440 if test "${ac_cv_prog_cc_g+set}" = set; then
2441   echo $ECHO_N "(cached) $ECHO_C" >&6
2442 else
2443   cat >conftest.$ac_ext <<_ACEOF
2444 /* confdefs.h.  */
2445 _ACEOF
2446 cat confdefs.h >>conftest.$ac_ext
2447 cat >>conftest.$ac_ext <<_ACEOF
2448 /* end confdefs.h.  */
2449
2450 int
2451 main ()
2452 {
2453
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>conftest.er1
2461   ac_status=$?
2462   grep -v '^ *+' conftest.er1 >conftest.err
2463   rm -f conftest.er1
2464   cat conftest.err >&5
2465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2466   (exit $ac_status); } &&
2467          { ac_try='test -z "$ac_c_werror_flag"
2468                          || test ! -s conftest.err'
2469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2470   (eval $ac_try) 2>&5
2471   ac_status=$?
2472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2473   (exit $ac_status); }; } &&
2474          { ac_try='test -s conftest.$ac_objext'
2475   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2476   (eval $ac_try) 2>&5
2477   ac_status=$?
2478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2479   (exit $ac_status); }; }; then
2480   ac_cv_prog_cc_g=yes
2481 else
2482   echo "$as_me: failed program was:" >&5
2483 sed 's/^/| /' conftest.$ac_ext >&5
2484
2485 ac_cv_prog_cc_g=no
2486 fi
2487 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2488 fi
2489 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2490 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2491 if test "$ac_test_CFLAGS" = set; then
2492   CFLAGS=$ac_save_CFLAGS
2493 elif test $ac_cv_prog_cc_g = yes; then
2494   if test "$GCC" = yes; then
2495     CFLAGS="-g -O2"
2496   else
2497     CFLAGS="-g"
2498   fi
2499 else
2500   if test "$GCC" = yes; then
2501     CFLAGS="-O2"
2502   else
2503     CFLAGS=
2504   fi
2505 fi
2506 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2507 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2508 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2509   echo $ECHO_N "(cached) $ECHO_C" >&6
2510 else
2511   ac_cv_prog_cc_stdc=no
2512 ac_save_CC=$CC
2513 cat >conftest.$ac_ext <<_ACEOF
2514 /* confdefs.h.  */
2515 _ACEOF
2516 cat confdefs.h >>conftest.$ac_ext
2517 cat >>conftest.$ac_ext <<_ACEOF
2518 /* end confdefs.h.  */
2519 #include <stdarg.h>
2520 #include <stdio.h>
2521 #include <sys/types.h>
2522 #include <sys/stat.h>
2523 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2524 struct buf { int x; };
2525 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2526 static char *e (p, i)
2527      char **p;
2528      int i;
2529 {
2530   return p[i];
2531 }
2532 static char *f (char * (*g) (char **, int), char **p, ...)
2533 {
2534   char *s;
2535   va_list v;
2536   va_start (v,p);
2537   s = g (p, va_arg (v,int));
2538   va_end (v);
2539   return s;
2540 }
2541
2542 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2543    function prototypes and stuff, but not '\xHH' hex character constants.
2544    These don't provoke an error unfortunately, instead are silently treated
2545    as 'x'.  The following induces an error, until -std1 is added to get
2546    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2547    array size at least.  It's necessary to write '\x00'==0 to get something
2548    that's true only with -std1.  */
2549 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2550
2551 int test (int i, double x);
2552 struct s1 {int (*f) (int a);};
2553 struct s2 {int (*f) (double a);};
2554 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2555 int argc;
2556 char **argv;
2557 int
2558 main ()
2559 {
2560 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2561   ;
2562   return 0;
2563 }
2564 _ACEOF
2565 # Don't try gcc -ansi; that turns off useful extensions and
2566 # breaks some systems' header files.
2567 # AIX                   -qlanglvl=ansi
2568 # Ultrix and OSF/1      -std1
2569 # HP-UX 10.20 and later -Ae
2570 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2571 # SVR4                  -Xc -D__EXTENSIONS__
2572 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2573 do
2574   CC="$ac_save_CC $ac_arg"
2575   rm -f conftest.$ac_objext
2576 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2577   (eval $ac_compile) 2>conftest.er1
2578   ac_status=$?
2579   grep -v '^ *+' conftest.er1 >conftest.err
2580   rm -f conftest.er1
2581   cat conftest.err >&5
2582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2583   (exit $ac_status); } &&
2584          { ac_try='test -z "$ac_c_werror_flag"
2585                          || test ! -s conftest.err'
2586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2587   (eval $ac_try) 2>&5
2588   ac_status=$?
2589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2590   (exit $ac_status); }; } &&
2591          { ac_try='test -s conftest.$ac_objext'
2592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2593   (eval $ac_try) 2>&5
2594   ac_status=$?
2595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2596   (exit $ac_status); }; }; then
2597   ac_cv_prog_cc_stdc=$ac_arg
2598 break
2599 else
2600   echo "$as_me: failed program was:" >&5
2601 sed 's/^/| /' conftest.$ac_ext >&5
2602
2603 fi
2604 rm -f conftest.err conftest.$ac_objext
2605 done
2606 rm -f conftest.$ac_ext conftest.$ac_objext
2607 CC=$ac_save_CC
2608
2609 fi
2610
2611 case "x$ac_cv_prog_cc_stdc" in
2612   x|xno)
2613     echo "$as_me:$LINENO: result: none needed" >&5
2614 echo "${ECHO_T}none needed" >&6 ;;
2615   *)
2616     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2617 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2618     CC="$CC $ac_cv_prog_cc_stdc" ;;
2619 esac
2620
2621 # Some people use a C++ compiler to compile C.  Since we use `exit',
2622 # in C++ we need to declare it.  In case someone uses the same compiler
2623 # for both compiling C and C++ we need to have the C++ compiler decide
2624 # the declaration of exit, since it's the most demanding environment.
2625 cat >conftest.$ac_ext <<_ACEOF
2626 #ifndef __cplusplus
2627   choke me
2628 #endif
2629 _ACEOF
2630 rm -f conftest.$ac_objext
2631 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2632   (eval $ac_compile) 2>conftest.er1
2633   ac_status=$?
2634   grep -v '^ *+' conftest.er1 >conftest.err
2635   rm -f conftest.er1
2636   cat conftest.err >&5
2637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2638   (exit $ac_status); } &&
2639          { ac_try='test -z "$ac_c_werror_flag"
2640                          || test ! -s conftest.err'
2641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2642   (eval $ac_try) 2>&5
2643   ac_status=$?
2644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2645   (exit $ac_status); }; } &&
2646          { ac_try='test -s conftest.$ac_objext'
2647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2648   (eval $ac_try) 2>&5
2649   ac_status=$?
2650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2651   (exit $ac_status); }; }; then
2652   for ac_declaration in \
2653    '' \
2654    'extern "C" void std::exit (int) throw (); using std::exit;' \
2655    'extern "C" void std::exit (int); using std::exit;' \
2656    'extern "C" void exit (int) throw ();' \
2657    'extern "C" void exit (int);' \
2658    'void exit (int);'
2659 do
2660   cat >conftest.$ac_ext <<_ACEOF
2661 /* confdefs.h.  */
2662 _ACEOF
2663 cat confdefs.h >>conftest.$ac_ext
2664 cat >>conftest.$ac_ext <<_ACEOF
2665 /* end confdefs.h.  */
2666 $ac_declaration
2667 #include <stdlib.h>
2668 int
2669 main ()
2670 {
2671 exit (42);
2672   ;
2673   return 0;
2674 }
2675 _ACEOF
2676 rm -f conftest.$ac_objext
2677 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2678   (eval $ac_compile) 2>conftest.er1
2679   ac_status=$?
2680   grep -v '^ *+' conftest.er1 >conftest.err
2681   rm -f conftest.er1
2682   cat conftest.err >&5
2683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2684   (exit $ac_status); } &&
2685          { ac_try='test -z "$ac_c_werror_flag"
2686                          || test ! -s conftest.err'
2687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2688   (eval $ac_try) 2>&5
2689   ac_status=$?
2690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2691   (exit $ac_status); }; } &&
2692          { ac_try='test -s conftest.$ac_objext'
2693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2694   (eval $ac_try) 2>&5
2695   ac_status=$?
2696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2697   (exit $ac_status); }; }; then
2698   :
2699 else
2700   echo "$as_me: failed program was:" >&5
2701 sed 's/^/| /' conftest.$ac_ext >&5
2702
2703 continue
2704 fi
2705 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2706   cat >conftest.$ac_ext <<_ACEOF
2707 /* confdefs.h.  */
2708 _ACEOF
2709 cat confdefs.h >>conftest.$ac_ext
2710 cat >>conftest.$ac_ext <<_ACEOF
2711 /* end confdefs.h.  */
2712 $ac_declaration
2713 int
2714 main ()
2715 {
2716 exit (42);
2717   ;
2718   return 0;
2719 }
2720 _ACEOF
2721 rm -f conftest.$ac_objext
2722 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2723   (eval $ac_compile) 2>conftest.er1
2724   ac_status=$?
2725   grep -v '^ *+' conftest.er1 >conftest.err
2726   rm -f conftest.er1
2727   cat conftest.err >&5
2728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2729   (exit $ac_status); } &&
2730          { ac_try='test -z "$ac_c_werror_flag"
2731                          || test ! -s conftest.err'
2732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2733   (eval $ac_try) 2>&5
2734   ac_status=$?
2735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2736   (exit $ac_status); }; } &&
2737          { ac_try='test -s conftest.$ac_objext'
2738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2739   (eval $ac_try) 2>&5
2740   ac_status=$?
2741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2742   (exit $ac_status); }; }; then
2743   break
2744 else
2745   echo "$as_me: failed program was:" >&5
2746 sed 's/^/| /' conftest.$ac_ext >&5
2747
2748 fi
2749 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2750 done
2751 rm -f conftest*
2752 if test -n "$ac_declaration"; then
2753   echo '#ifdef __cplusplus' >>confdefs.h
2754   echo $ac_declaration      >>confdefs.h
2755   echo '#endif'             >>confdefs.h
2756 fi
2757
2758 else
2759   echo "$as_me: failed program was:" >&5
2760 sed 's/^/| /' conftest.$ac_ext >&5
2761
2762 fi
2763 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2764 ac_ext=c
2765 ac_cpp='$CPP $CPPFLAGS'
2766 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2767 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2768 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2769
2770
2771   if test -z "$GCC"; then
2772     # not using GCC
2773     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2774 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2775     case "$host" in
2776       *-hpux* )
2777         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2778 echo "${ECHO_T}HPUX: adding -Ae" >&6
2779         CC="$CC -Ae"
2780       ;;
2781       *-aix* )
2782         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2783 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2784         CC="$CC -qlanglvl=ansi -qhalt=e"
2785       ;;
2786       *-dec-* )
2787         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2788 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2789         CC="$CC -std1"
2790       ;;
2791       *)
2792         echo "$as_me:$LINENO: result: no idea" >&5
2793 echo "${ECHO_T}no idea" >&6
2794       ;;
2795     esac
2796   else
2797     # using GCC
2798     case "$host" in
2799       *-solaris*)
2800         echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
2801 echo "${ECHO_T}Solaris: adding -D__EXTENSIONS__" >&6
2802         CC="$CC -D__EXTENSIONS__"
2803       ;;
2804     esac
2805   fi
2806
2807   OBJCC="$CC"
2808
2809   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2810 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2811   if test "$cross_compiling" = yes; then
2812   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2813 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2814    { (exit 1); exit 1; }; }
2815 else
2816   cat >conftest.$ac_ext <<_ACEOF
2817 /* confdefs.h.  */
2818 _ACEOF
2819 cat confdefs.h >>conftest.$ac_ext
2820 cat >>conftest.$ac_ext <<_ACEOF
2821 /* end confdefs.h.  */
2822  main(int ac, char **av) { return 0; }
2823 _ACEOF
2824 rm -f conftest$ac_exeext
2825 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2826   (eval $ac_link) 2>&5
2827   ac_status=$?
2828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2829   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2831   (eval $ac_try) 2>&5
2832   ac_status=$?
2833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2834   (exit $ac_status); }; }; then
2835   echo "$as_me:$LINENO: result: yes" >&5
2836 echo "${ECHO_T}yes" >&6
2837 else
2838   echo "$as_me: program exited with status $ac_status" >&5
2839 echo "$as_me: failed program was:" >&5
2840 sed 's/^/| /' conftest.$ac_ext >&5
2841
2842 ( exit $ac_status )
2843 echo "$as_me:$LINENO: result: no" >&5
2844 echo "${ECHO_T}no" >&6
2845      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2846 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2847    { (exit 1); exit 1; }; }
2848 fi
2849 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2850 fi
2851
2852   if test -n "$GCC"; then
2853     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2854 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2855     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
2856     OBJCC="$OBJCC -Wall"
2857     # supposedly gcc 3.4 will have "-Wdeclaration-after-statement"
2858     # and then perhaps we can do without -pedantic?
2859   else
2860     case "$host" in
2861       *-irix5* |*-irix6.0-3* )
2862         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2863 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2864         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2865       ;;
2866 #     *-dec-osf* )
2867 #       if test -z "$GCC"; then
2868 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2869 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2870 #       fi
2871 #     ;;
2872     esac
2873   fi
2874
2875 if test -n "$GCC"; then
2876    if test -n "$GCC"; then
2877    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2878 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2879 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2880   echo $ECHO_N "(cached) $ECHO_C" >&6
2881 else
2882   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
2883           grep unrecognized >/dev/null ); then
2884        ac_cv_gcc_accepts_std=no
2885      else
2886        ac_cv_gcc_accepts_std=yes
2887      fi
2888 fi
2889 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2890 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2891    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2892   fi
2893
2894    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2895 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2896    #
2897    # The reason that // comments are banned from xscreensaver is that gcc is
2898    # basically the only compiler in the world that supports them in C code.
2899    # All other vendors support them only in their C++ compilers, not in their
2900    # ANSI C compilers.  This means that it's a portability problem: every time
2901    # these comments have snuck into the xscreensaver source code, I've gotten
2902    # complaints about it the next day.  So we turn off support for them in gcc
2903    # as well to prevent them from accidentially slipping in.
2904    #
2905    if test "$ac_gcc_accepts_std" = yes ; then
2906      #
2907      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2908      # (That appears to be the only additional preprocessor symbol
2909      # it defines, in addition to the syntax changes it makes.)
2910      #
2911      # -std=gnu89 is no good, because // comments were a GNU extension
2912      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2913      # with -std=gnu89 but not with -std=c89.)
2914      #
2915      CC="$CC -std=c89 -U__STRICT_ANSI__"
2916    else
2917      # The old way:
2918      CC="$CC -Wp,-lang-c89"
2919    fi
2920   fi
2921
2922 if test -n "$GCC"; then
2923    if test -n "$GCC"; then
2924    echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
2925 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6
2926 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
2927   echo $ECHO_N "(cached) $ECHO_C" >&6
2928 else
2929   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
2930           grep unrecognized >/dev/null ); then
2931        ac_cv_gcc_accepts_no_cpp_precomp=no
2932      else
2933        ac_cv_gcc_accepts_no_cpp_precomp=yes
2934      fi
2935 fi
2936 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
2937 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6
2938    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
2939   fi
2940
2941    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
2942      echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
2943 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6
2944      CC="$CC -no-cpp-precomp"
2945    fi
2946   fi
2947
2948 ac_ext=c
2949 ac_cpp='$CPP $CPPFLAGS'
2950 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2951 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2952 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2953 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2954 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2955 # On Suns, sometimes $CPP names a directory.
2956 if test -n "$CPP" && test -d "$CPP"; then
2957   CPP=
2958 fi
2959 if test -z "$CPP"; then
2960   if test "${ac_cv_prog_CPP+set}" = set; then
2961   echo $ECHO_N "(cached) $ECHO_C" >&6
2962 else
2963       # Double quotes because CPP needs to be expanded
2964     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2965     do
2966       ac_preproc_ok=false
2967 for ac_c_preproc_warn_flag in '' yes
2968 do
2969   # Use a header file that comes with gcc, so configuring glibc
2970   # with a fresh cross-compiler works.
2971   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2972   # <limits.h> exists even on freestanding compilers.
2973   # On the NeXT, cc -E runs the code through the compiler's parser,
2974   # not just through cpp. "Syntax error" is here to catch this case.
2975   cat >conftest.$ac_ext <<_ACEOF
2976 /* confdefs.h.  */
2977 _ACEOF
2978 cat confdefs.h >>conftest.$ac_ext
2979 cat >>conftest.$ac_ext <<_ACEOF
2980 /* end confdefs.h.  */
2981 #ifdef __STDC__
2982 # include <limits.h>
2983 #else
2984 # include <assert.h>
2985 #endif
2986                      Syntax error
2987 _ACEOF
2988 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2989   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2990   ac_status=$?
2991   grep -v '^ *+' conftest.er1 >conftest.err
2992   rm -f conftest.er1
2993   cat conftest.err >&5
2994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2995   (exit $ac_status); } >/dev/null; then
2996   if test -s conftest.err; then
2997     ac_cpp_err=$ac_c_preproc_warn_flag
2998     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2999   else
3000     ac_cpp_err=
3001   fi
3002 else
3003   ac_cpp_err=yes
3004 fi
3005 if test -z "$ac_cpp_err"; then
3006   :
3007 else
3008   echo "$as_me: failed program was:" >&5
3009 sed 's/^/| /' conftest.$ac_ext >&5
3010
3011   # Broken: fails on valid input.
3012 continue
3013 fi
3014 rm -f conftest.err conftest.$ac_ext
3015
3016   # OK, works on sane cases.  Now check whether non-existent headers
3017   # can be detected and how.
3018   cat >conftest.$ac_ext <<_ACEOF
3019 /* confdefs.h.  */
3020 _ACEOF
3021 cat confdefs.h >>conftest.$ac_ext
3022 cat >>conftest.$ac_ext <<_ACEOF
3023 /* end confdefs.h.  */
3024 #include <ac_nonexistent.h>
3025 _ACEOF
3026 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3027   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3028   ac_status=$?
3029   grep -v '^ *+' conftest.er1 >conftest.err
3030   rm -f conftest.er1
3031   cat conftest.err >&5
3032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3033   (exit $ac_status); } >/dev/null; then
3034   if test -s conftest.err; then
3035     ac_cpp_err=$ac_c_preproc_warn_flag
3036     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3037   else
3038     ac_cpp_err=
3039   fi
3040 else
3041   ac_cpp_err=yes
3042 fi
3043 if test -z "$ac_cpp_err"; then
3044   # Broken: success on invalid input.
3045 continue
3046 else
3047   echo "$as_me: failed program was:" >&5
3048 sed 's/^/| /' conftest.$ac_ext >&5
3049
3050   # Passes both tests.
3051 ac_preproc_ok=:
3052 break
3053 fi
3054 rm -f conftest.err conftest.$ac_ext
3055
3056 done
3057 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3058 rm -f conftest.err conftest.$ac_ext
3059 if $ac_preproc_ok; then
3060   break
3061 fi
3062
3063     done
3064     ac_cv_prog_CPP=$CPP
3065
3066 fi
3067   CPP=$ac_cv_prog_CPP
3068 else
3069   ac_cv_prog_CPP=$CPP
3070 fi
3071 echo "$as_me:$LINENO: result: $CPP" >&5
3072 echo "${ECHO_T}$CPP" >&6
3073 ac_preproc_ok=false
3074 for ac_c_preproc_warn_flag in '' yes
3075 do
3076   # Use a header file that comes with gcc, so configuring glibc
3077   # with a fresh cross-compiler works.
3078   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3079   # <limits.h> exists even on freestanding compilers.
3080   # On the NeXT, cc -E runs the code through the compiler's parser,
3081   # not just through cpp. "Syntax error" is here to catch this case.
3082   cat >conftest.$ac_ext <<_ACEOF
3083 /* confdefs.h.  */
3084 _ACEOF
3085 cat confdefs.h >>conftest.$ac_ext
3086 cat >>conftest.$ac_ext <<_ACEOF
3087 /* end confdefs.h.  */
3088 #ifdef __STDC__
3089 # include <limits.h>
3090 #else
3091 # include <assert.h>
3092 #endif
3093                      Syntax error
3094 _ACEOF
3095 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3096   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3097   ac_status=$?
3098   grep -v '^ *+' conftest.er1 >conftest.err
3099   rm -f conftest.er1
3100   cat conftest.err >&5
3101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3102   (exit $ac_status); } >/dev/null; then
3103   if test -s conftest.err; then
3104     ac_cpp_err=$ac_c_preproc_warn_flag
3105     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3106   else
3107     ac_cpp_err=
3108   fi
3109 else
3110   ac_cpp_err=yes
3111 fi
3112 if test -z "$ac_cpp_err"; then
3113   :
3114 else
3115   echo "$as_me: failed program was:" >&5
3116 sed 's/^/| /' conftest.$ac_ext >&5
3117
3118   # Broken: fails on valid input.
3119 continue
3120 fi
3121 rm -f conftest.err conftest.$ac_ext
3122
3123   # OK, works on sane cases.  Now check whether non-existent headers
3124   # can be detected and how.
3125   cat >conftest.$ac_ext <<_ACEOF
3126 /* confdefs.h.  */
3127 _ACEOF
3128 cat confdefs.h >>conftest.$ac_ext
3129 cat >>conftest.$ac_ext <<_ACEOF
3130 /* end confdefs.h.  */
3131 #include <ac_nonexistent.h>
3132 _ACEOF
3133 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3134   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3135   ac_status=$?
3136   grep -v '^ *+' conftest.er1 >conftest.err
3137   rm -f conftest.er1
3138   cat conftest.err >&5
3139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3140   (exit $ac_status); } >/dev/null; then
3141   if test -s conftest.err; then
3142     ac_cpp_err=$ac_c_preproc_warn_flag
3143     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3144   else
3145     ac_cpp_err=
3146   fi
3147 else
3148   ac_cpp_err=yes
3149 fi
3150 if test -z "$ac_cpp_err"; then
3151   # Broken: success on invalid input.
3152 continue
3153 else
3154   echo "$as_me: failed program was:" >&5
3155 sed 's/^/| /' conftest.$ac_ext >&5
3156
3157   # Passes both tests.
3158 ac_preproc_ok=:
3159 break
3160 fi
3161 rm -f conftest.err conftest.$ac_ext
3162
3163 done
3164 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3165 rm -f conftest.err conftest.$ac_ext
3166 if $ac_preproc_ok; then
3167   :
3168 else
3169   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3170 See \`config.log' for more details." >&5
3171 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3172 See \`config.log' for more details." >&2;}
3173    { (exit 1); exit 1; }; }
3174 fi
3175
3176 ac_ext=c
3177 ac_cpp='$CPP $CPPFLAGS'
3178 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3179 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3180 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3181
3182 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3183 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3184 if test "${ac_cv_c_const+set}" = set; then
3185   echo $ECHO_N "(cached) $ECHO_C" >&6
3186 else
3187   cat >conftest.$ac_ext <<_ACEOF
3188 /* confdefs.h.  */
3189 _ACEOF
3190 cat confdefs.h >>conftest.$ac_ext
3191 cat >>conftest.$ac_ext <<_ACEOF
3192 /* end confdefs.h.  */
3193
3194 int
3195 main ()
3196 {
3197 /* FIXME: Include the comments suggested by Paul. */
3198 #ifndef __cplusplus
3199   /* Ultrix mips cc rejects this.  */
3200   typedef int charset[2];
3201   const charset x;
3202   /* SunOS 4.1.1 cc rejects this.  */
3203   char const *const *ccp;
3204   char **p;
3205   /* NEC SVR4.0.2 mips cc rejects this.  */
3206   struct point {int x, y;};
3207   static struct point const zero = {0,0};
3208   /* AIX XL C 1.02.0.0 rejects this.
3209      It does not let you subtract one const X* pointer from another in
3210      an arm of an if-expression whose if-part is not a constant
3211      expression */
3212   const char *g = "string";
3213   ccp = &g + (g ? g-g : 0);
3214   /* HPUX 7.0 cc rejects these. */
3215   ++ccp;
3216   p = (char**) ccp;
3217   ccp = (char const *const *) p;
3218   { /* SCO 3.2v4 cc rejects this.  */
3219     char *t;
3220     char const *s = 0 ? (char *) 0 : (char const *) 0;
3221
3222     *t++ = 0;
3223   }
3224   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3225     int x[] = {25, 17};
3226     const int *foo = &x[0];
3227     ++foo;
3228   }
3229   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3230     typedef const int *iptr;
3231     iptr p = 0;
3232     ++p;
3233   }
3234   { /* AIX XL C 1.02.0.0 rejects this saying
3235        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3236     struct s { int j; const int *ap[3]; };
3237     struct s *b; b->j = 5;
3238   }
3239   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3240     const int foo = 10;
3241   }
3242 #endif
3243
3244   ;
3245   return 0;
3246 }
3247 _ACEOF
3248 rm -f conftest.$ac_objext
3249 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3250   (eval $ac_compile) 2>conftest.er1
3251   ac_status=$?
3252   grep -v '^ *+' conftest.er1 >conftest.err
3253   rm -f conftest.er1
3254   cat conftest.err >&5
3255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3256   (exit $ac_status); } &&
3257          { ac_try='test -z "$ac_c_werror_flag"
3258                          || test ! -s conftest.err'
3259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3260   (eval $ac_try) 2>&5
3261   ac_status=$?
3262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3263   (exit $ac_status); }; } &&
3264          { ac_try='test -s conftest.$ac_objext'
3265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3266   (eval $ac_try) 2>&5
3267   ac_status=$?
3268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3269   (exit $ac_status); }; }; then
3270   ac_cv_c_const=yes
3271 else
3272   echo "$as_me: failed program was:" >&5
3273 sed 's/^/| /' conftest.$ac_ext >&5
3274
3275 ac_cv_c_const=no
3276 fi
3277 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3278 fi
3279 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3280 echo "${ECHO_T}$ac_cv_c_const" >&6
3281 if test $ac_cv_c_const = no; then
3282
3283 cat >>confdefs.h <<\_ACEOF
3284 #define const
3285 _ACEOF
3286
3287 fi
3288
3289 echo "$as_me:$LINENO: checking for inline" >&5
3290 echo $ECHO_N "checking for inline... $ECHO_C" >&6
3291 if test "${ac_cv_c_inline+set}" = set; then
3292   echo $ECHO_N "(cached) $ECHO_C" >&6
3293 else
3294   ac_cv_c_inline=no
3295 for ac_kw in inline __inline__ __inline; do
3296   cat >conftest.$ac_ext <<_ACEOF
3297 /* confdefs.h.  */
3298 _ACEOF
3299 cat confdefs.h >>conftest.$ac_ext
3300 cat >>conftest.$ac_ext <<_ACEOF
3301 /* end confdefs.h.  */
3302 #ifndef __cplusplus
3303 typedef int foo_t;
3304 static $ac_kw foo_t static_foo () {return 0; }
3305 $ac_kw foo_t foo () {return 0; }
3306 #endif
3307
3308 _ACEOF
3309 rm -f conftest.$ac_objext
3310 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3311   (eval $ac_compile) 2>conftest.er1
3312   ac_status=$?
3313   grep -v '^ *+' conftest.er1 >conftest.err
3314   rm -f conftest.er1
3315   cat conftest.err >&5
3316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3317   (exit $ac_status); } &&
3318          { ac_try='test -z "$ac_c_werror_flag"
3319                          || test ! -s conftest.err'
3320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3321   (eval $ac_try) 2>&5
3322   ac_status=$?
3323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3324   (exit $ac_status); }; } &&
3325          { ac_try='test -s conftest.$ac_objext'
3326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3327   (eval $ac_try) 2>&5
3328   ac_status=$?
3329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3330   (exit $ac_status); }; }; then
3331   ac_cv_c_inline=$ac_kw; break
3332 else
3333   echo "$as_me: failed program was:" >&5
3334 sed 's/^/| /' conftest.$ac_ext >&5
3335
3336 fi
3337 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3338 done
3339
3340 fi
3341 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3342 echo "${ECHO_T}$ac_cv_c_inline" >&6
3343
3344
3345 case $ac_cv_c_inline in
3346   inline | yes) ;;
3347   *)
3348     case $ac_cv_c_inline in
3349       no) ac_val=;;
3350       *) ac_val=$ac_cv_c_inline;;
3351     esac
3352     cat >>confdefs.h <<_ACEOF
3353 #ifndef __cplusplus
3354 #define inline $ac_val
3355 #endif
3356 _ACEOF
3357     ;;
3358 esac
3359
3360
3361 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3362   echo "$as_me:$LINENO: checking for bc" >&5
3363 echo $ECHO_N "checking for bc... $ECHO_C" >&6
3364   if test "$ac_bc_result" = "15" ; then
3365     echo "$as_me:$LINENO: result: yes" >&5
3366 echo "${ECHO_T}yes" >&6
3367   else
3368     echo "$as_me:$LINENO: result: no" >&5
3369 echo "${ECHO_T}no" >&6
3370     echo ''
3371     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3372                   part of Unix since the 1970s.  Come back when your vendor
3373                   has grown a clue." >&5
3374 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3375                   part of Unix since the 1970s.  Come back when your vendor
3376                   has grown a clue." >&2;}
3377    { (exit 1); exit 1; }; }
3378   fi
3379
3380
3381 # stuff for Makefiles
3382 # Find a good install program.  We prefer a C program (faster),
3383 # so one script is as good as another.  But avoid the broken or
3384 # incompatible versions:
3385 # SysV /etc/install, /usr/sbin/install
3386 # SunOS /usr/etc/install
3387 # IRIX /sbin/install
3388 # AIX /bin/install
3389 # AmigaOS /C/install, which installs bootblocks on floppy discs
3390 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3391 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3392 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3393 # OS/2's system install, which has a completely different semantic
3394 # ./install, which can be erroneously created by make from ./install.sh.
3395 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3396 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3397 if test -z "$INSTALL"; then
3398 if test "${ac_cv_path_install+set}" = set; then
3399   echo $ECHO_N "(cached) $ECHO_C" >&6
3400 else
3401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3402 for as_dir in $PATH
3403 do
3404   IFS=$as_save_IFS
3405   test -z "$as_dir" && as_dir=.
3406   # Account for people who put trailing slashes in PATH elements.
3407 case $as_dir/ in
3408   ./ | .// | /cC/* | \
3409   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3410   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3411   /usr/ucb/* ) ;;
3412   *)
3413     # OSF1 and SCO ODT 3.0 have their own names for install.
3414     # Don't use installbsd from OSF since it installs stuff as root
3415     # by default.
3416     for ac_prog in ginstall scoinst install; do
3417       for ac_exec_ext in '' $ac_executable_extensions; do
3418         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3419           if test $ac_prog = install &&
3420             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3421             # AIX install.  It has an incompatible calling convention.
3422             :
3423           elif test $ac_prog = install &&
3424             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3425             # program-specific install script used by HP pwplus--don't use.
3426             :
3427           else
3428             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3429             break 3
3430           fi
3431         fi
3432       done
3433     done
3434     ;;
3435 esac
3436 done
3437
3438
3439 fi
3440   if test "${ac_cv_path_install+set}" = set; then
3441     INSTALL=$ac_cv_path_install
3442   else
3443     # As a last resort, use the slow shell script.  We don't cache a
3444     # path for INSTALL within a source directory, because that will
3445     # break other packages using the cache if that directory is
3446     # removed, or if the path is relative.
3447     INSTALL=$ac_install_sh
3448   fi
3449 fi
3450 echo "$as_me:$LINENO: result: $INSTALL" >&5
3451 echo "${ECHO_T}$INSTALL" >&6
3452
3453 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3454 # It thinks the first close brace ends the variable substitution.
3455 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3456
3457 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3458
3459 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3460
3461 echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
3462 echo $ECHO_N "checking whether \"\${INSTALL} -d\" creates intermediate directories... $ECHO_C" >&6
3463 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
3464   echo $ECHO_N "(cached) $ECHO_C" >&6
3465 else
3466   ac_cv_install_d_creates_dirs=no
3467      rm -rf conftestdir
3468      if mkdir conftestdir; then
3469        cd conftestdir 2>/dev/null
3470        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
3471        if test -d dir1/dir2/. ; then
3472          ac_cv_install_d_creates_dirs=yes
3473        fi
3474        cd .. 2>/dev/null
3475        rm -rf conftestdir
3476      fi
3477
3478 fi
3479 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
3480 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
3481
3482   if test "$ac_cv_install_d_creates_dirs" = no ; then
3483     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
3484 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
3485 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
3486   echo $ECHO_N "(cached) $ECHO_C" >&6
3487 else
3488   ac_cv_mkdir_p_creates_dirs=no
3489        rm -rf conftestdir
3490        if mkdir conftestdir; then
3491          cd conftestdir 2>/dev/null
3492          mkdir -p dir1/dir2 >/dev/null 2>&1
3493          if test -d dir1/dir2/. ; then
3494            ac_cv_mkdir_p_creates_dirs=yes
3495          fi
3496          cd .. 2>/dev/null
3497          rm -rf conftestdir
3498        fi
3499
3500 fi
3501 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3502 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3503   fi
3504
3505   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3506     INSTALL_DIRS='${INSTALL} -d'
3507   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3508     INSTALL_DIRS='mkdir -p'
3509   else
3510     # any other ideas?
3511     INSTALL_DIRS='${INSTALL} -d'
3512   fi
3513
3514 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3515 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3516 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
3517 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3518   echo $ECHO_N "(cached) $ECHO_C" >&6
3519 else
3520   cat >conftest.make <<\_ACEOF
3521 all:
3522         @echo 'ac_maketemp="$(MAKE)"'
3523 _ACEOF
3524 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3525 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3526 if test -n "$ac_maketemp"; then
3527   eval ac_cv_prog_make_${ac_make}_set=yes
3528 else
3529   eval ac_cv_prog_make_${ac_make}_set=no
3530 fi
3531 rm -f conftest.make
3532 fi
3533 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3534   echo "$as_me:$LINENO: result: yes" >&5
3535 echo "${ECHO_T}yes" >&6
3536   SET_MAKE=
3537 else
3538   echo "$as_me:$LINENO: result: no" >&5
3539 echo "${ECHO_T}no" >&6
3540   SET_MAKE="MAKE=${MAKE-make}"
3541 fi
3542
3543
3544 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3545 # That's wrong: it should be set to '${INSTALL}', so that one can
3546 # implement the "install-strip" target properly (strip executables,
3547 # but do not try to strip scripts.)
3548 #
3549 INSTALL_SCRIPT='${INSTALL}'
3550
3551 # random libc stuff
3552
3553 echo "$as_me:$LINENO: checking for egrep" >&5
3554 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3555 if test "${ac_cv_prog_egrep+set}" = set; then
3556   echo $ECHO_N "(cached) $ECHO_C" >&6
3557 else
3558   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3559     then ac_cv_prog_egrep='grep -E'
3560     else ac_cv_prog_egrep='egrep'
3561     fi
3562 fi
3563 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3564 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3565  EGREP=$ac_cv_prog_egrep
3566
3567
3568 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3569 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3570 if test "${ac_cv_header_stdc+set}" = set; then
3571   echo $ECHO_N "(cached) $ECHO_C" >&6
3572 else
3573   cat >conftest.$ac_ext <<_ACEOF
3574 /* confdefs.h.  */
3575 _ACEOF
3576 cat confdefs.h >>conftest.$ac_ext
3577 cat >>conftest.$ac_ext <<_ACEOF
3578 /* end confdefs.h.  */
3579 #include <stdlib.h>
3580 #include <stdarg.h>
3581 #include <string.h>
3582 #include <float.h>
3583
3584 int
3585 main ()
3586 {
3587
3588   ;
3589   return 0;
3590 }
3591 _ACEOF
3592 rm -f conftest.$ac_objext
3593 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3594   (eval $ac_compile) 2>conftest.er1
3595   ac_status=$?
3596   grep -v '^ *+' conftest.er1 >conftest.err
3597   rm -f conftest.er1
3598   cat conftest.err >&5
3599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3600   (exit $ac_status); } &&
3601          { ac_try='test -z "$ac_c_werror_flag"
3602                          || test ! -s conftest.err'
3603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3604   (eval $ac_try) 2>&5
3605   ac_status=$?
3606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3607   (exit $ac_status); }; } &&
3608          { ac_try='test -s conftest.$ac_objext'
3609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3610   (eval $ac_try) 2>&5
3611   ac_status=$?
3612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3613   (exit $ac_status); }; }; then
3614   ac_cv_header_stdc=yes
3615 else
3616   echo "$as_me: failed program was:" >&5
3617 sed 's/^/| /' conftest.$ac_ext >&5
3618
3619 ac_cv_header_stdc=no
3620 fi
3621 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3622
3623 if test $ac_cv_header_stdc = yes; then
3624   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3625   cat >conftest.$ac_ext <<_ACEOF
3626 /* confdefs.h.  */
3627 _ACEOF
3628 cat confdefs.h >>conftest.$ac_ext
3629 cat >>conftest.$ac_ext <<_ACEOF
3630 /* end confdefs.h.  */
3631 #include <string.h>
3632
3633 _ACEOF
3634 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3635   $EGREP "memchr" >/dev/null 2>&1; then
3636   :
3637 else
3638   ac_cv_header_stdc=no
3639 fi
3640 rm -f conftest*
3641
3642 fi
3643
3644 if test $ac_cv_header_stdc = yes; then
3645   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3646   cat >conftest.$ac_ext <<_ACEOF
3647 /* confdefs.h.  */
3648 _ACEOF
3649 cat confdefs.h >>conftest.$ac_ext
3650 cat >>conftest.$ac_ext <<_ACEOF
3651 /* end confdefs.h.  */
3652 #include <stdlib.h>
3653
3654 _ACEOF
3655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3656   $EGREP "free" >/dev/null 2>&1; then
3657   :
3658 else
3659   ac_cv_header_stdc=no
3660 fi
3661 rm -f conftest*
3662
3663 fi
3664
3665 if test $ac_cv_header_stdc = yes; then
3666   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3667   if test "$cross_compiling" = yes; then
3668   :
3669 else
3670   cat >conftest.$ac_ext <<_ACEOF
3671 /* confdefs.h.  */
3672 _ACEOF
3673 cat confdefs.h >>conftest.$ac_ext
3674 cat >>conftest.$ac_ext <<_ACEOF
3675 /* end confdefs.h.  */
3676 #include <ctype.h>
3677 #if ((' ' & 0x0FF) == 0x020)
3678 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3679 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3680 #else
3681 # define ISLOWER(c) \
3682                    (('a' <= (c) && (c) <= 'i') \
3683                      || ('j' <= (c) && (c) <= 'r') \
3684                      || ('s' <= (c) && (c) <= 'z'))
3685 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3686 #endif
3687
3688 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3689 int
3690 main ()
3691 {
3692   int i;
3693   for (i = 0; i < 256; i++)
3694     if (XOR (islower (i), ISLOWER (i))
3695         || toupper (i) != TOUPPER (i))
3696       exit(2);
3697   exit (0);
3698 }
3699 _ACEOF
3700 rm -f conftest$ac_exeext
3701 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3702   (eval $ac_link) 2>&5
3703   ac_status=$?
3704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3705   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3707   (eval $ac_try) 2>&5
3708   ac_status=$?
3709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3710   (exit $ac_status); }; }; then
3711   :
3712 else
3713   echo "$as_me: program exited with status $ac_status" >&5
3714 echo "$as_me: failed program was:" >&5
3715 sed 's/^/| /' conftest.$ac_ext >&5
3716
3717 ( exit $ac_status )
3718 ac_cv_header_stdc=no
3719 fi
3720 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3721 fi
3722 fi
3723 fi
3724 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3725 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3726 if test $ac_cv_header_stdc = yes; then
3727
3728 cat >>confdefs.h <<\_ACEOF
3729 #define STDC_HEADERS 1
3730 _ACEOF
3731
3732 fi
3733
3734 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3745                   inttypes.h stdint.h unistd.h
3746 do
3747 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3748 echo "$as_me:$LINENO: checking for $ac_header" >&5
3749 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3750 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3751   echo $ECHO_N "(cached) $ECHO_C" >&6
3752 else
3753   cat >conftest.$ac_ext <<_ACEOF
3754 /* confdefs.h.  */
3755 _ACEOF
3756 cat confdefs.h >>conftest.$ac_ext
3757 cat >>conftest.$ac_ext <<_ACEOF
3758 /* end confdefs.h.  */
3759 $ac_includes_default
3760
3761 #include <$ac_header>
3762 _ACEOF
3763 rm -f conftest.$ac_objext
3764 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3765   (eval $ac_compile) 2>conftest.er1
3766   ac_status=$?
3767   grep -v '^ *+' conftest.er1 >conftest.err
3768   rm -f conftest.er1
3769   cat conftest.err >&5
3770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3771   (exit $ac_status); } &&
3772          { ac_try='test -z "$ac_c_werror_flag"
3773                          || test ! -s conftest.err'
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); }; } &&
3779          { ac_try='test -s conftest.$ac_objext'
3780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3781   (eval $ac_try) 2>&5
3782   ac_status=$?
3783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3784   (exit $ac_status); }; }; then
3785   eval "$as_ac_Header=yes"
3786 else
3787   echo "$as_me: failed program was:" >&5
3788 sed 's/^/| /' conftest.$ac_ext >&5
3789
3790 eval "$as_ac_Header=no"
3791 fi
3792 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3793 fi
3794 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3795 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3796 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3797   cat >>confdefs.h <<_ACEOF
3798 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3799 _ACEOF
3800
3801 fi
3802
3803 done
3804
3805
3806
3807 for ac_header in unistd.h
3808 do
3809 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3810 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3811   echo "$as_me:$LINENO: checking for $ac_header" >&5
3812 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3813 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3814   echo $ECHO_N "(cached) $ECHO_C" >&6
3815 fi
3816 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3817 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3818 else
3819   # Is the header compilable?
3820 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3821 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3822 cat >conftest.$ac_ext <<_ACEOF
3823 /* confdefs.h.  */
3824 _ACEOF
3825 cat confdefs.h >>conftest.$ac_ext
3826 cat >>conftest.$ac_ext <<_ACEOF
3827 /* end confdefs.h.  */
3828 $ac_includes_default
3829 #include <$ac_header>
3830 _ACEOF
3831 rm -f conftest.$ac_objext
3832 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3833   (eval $ac_compile) 2>conftest.er1
3834   ac_status=$?
3835   grep -v '^ *+' conftest.er1 >conftest.err
3836   rm -f conftest.er1
3837   cat conftest.err >&5
3838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3839   (exit $ac_status); } &&
3840          { ac_try='test -z "$ac_c_werror_flag"
3841                          || test ! -s conftest.err'
3842   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3843   (eval $ac_try) 2>&5
3844   ac_status=$?
3845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3846   (exit $ac_status); }; } &&
3847          { ac_try='test -s conftest.$ac_objext'
3848   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3849   (eval $ac_try) 2>&5
3850   ac_status=$?
3851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3852   (exit $ac_status); }; }; then
3853   ac_header_compiler=yes
3854 else
3855   echo "$as_me: failed program was:" >&5
3856 sed 's/^/| /' conftest.$ac_ext >&5
3857
3858 ac_header_compiler=no
3859 fi
3860 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3861 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3862 echo "${ECHO_T}$ac_header_compiler" >&6
3863
3864 # Is the header present?
3865 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3866 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3867 cat >conftest.$ac_ext <<_ACEOF
3868 /* confdefs.h.  */
3869 _ACEOF
3870 cat confdefs.h >>conftest.$ac_ext
3871 cat >>conftest.$ac_ext <<_ACEOF
3872 /* end confdefs.h.  */
3873 #include <$ac_header>
3874 _ACEOF
3875 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3876   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3877   ac_status=$?
3878   grep -v '^ *+' conftest.er1 >conftest.err
3879   rm -f conftest.er1
3880   cat conftest.err >&5
3881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3882   (exit $ac_status); } >/dev/null; then
3883   if test -s conftest.err; then
3884     ac_cpp_err=$ac_c_preproc_warn_flag
3885     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3886   else
3887     ac_cpp_err=
3888   fi
3889 else
3890   ac_cpp_err=yes
3891 fi
3892 if test -z "$ac_cpp_err"; then
3893   ac_header_preproc=yes
3894 else
3895   echo "$as_me: failed program was:" >&5
3896 sed 's/^/| /' conftest.$ac_ext >&5
3897
3898   ac_header_preproc=no
3899 fi
3900 rm -f conftest.err conftest.$ac_ext
3901 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3902 echo "${ECHO_T}$ac_header_preproc" >&6
3903
3904 # So?  What about this header?
3905 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3906   yes:no: )
3907     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3908 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3909     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
3910 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
3911     ac_header_preproc=yes
3912     ;;
3913   no:yes:* )
3914     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3915 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3916     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
3917 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
3918     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
3919 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
3920     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
3921 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
3922     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3923 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3924     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
3925 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
3926     (
3927       cat <<\_ASBOX
3928 ## ------------------------------------------ ##
3929 ## Report this to the AC_PACKAGE_NAME lists.  ##
3930 ## ------------------------------------------ ##
3931 _ASBOX
3932     ) |
3933       sed "s/^/$as_me: WARNING:     /" >&2
3934     ;;
3935 esac
3936 echo "$as_me:$LINENO: checking for $ac_header" >&5
3937 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3938 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3939   echo $ECHO_N "(cached) $ECHO_C" >&6
3940 else
3941   eval "$as_ac_Header=\$ac_header_preproc"
3942 fi
3943 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3944 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3945
3946 fi
3947 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3948   cat >>confdefs.h <<_ACEOF
3949 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3950 _ACEOF
3951
3952 fi
3953
3954 done
3955
3956 echo "$as_me:$LINENO: checking for mode_t" >&5
3957 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3958 if test "${ac_cv_type_mode_t+set}" = set; then
3959   echo $ECHO_N "(cached) $ECHO_C" >&6
3960 else
3961   cat >conftest.$ac_ext <<_ACEOF
3962 /* confdefs.h.  */
3963 _ACEOF
3964 cat confdefs.h >>conftest.$ac_ext
3965 cat >>conftest.$ac_ext <<_ACEOF
3966 /* end confdefs.h.  */
3967 $ac_includes_default
3968 int
3969 main ()
3970 {
3971 if ((mode_t *) 0)
3972   return 0;
3973 if (sizeof (mode_t))
3974   return 0;
3975   ;
3976   return 0;
3977 }
3978 _ACEOF
3979 rm -f conftest.$ac_objext
3980 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3981   (eval $ac_compile) 2>conftest.er1
3982   ac_status=$?
3983   grep -v '^ *+' conftest.er1 >conftest.err
3984   rm -f conftest.er1
3985   cat conftest.err >&5
3986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3987   (exit $ac_status); } &&
3988          { ac_try='test -z "$ac_c_werror_flag"
3989                          || test ! -s conftest.err'
3990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3991   (eval $ac_try) 2>&5
3992   ac_status=$?
3993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3994   (exit $ac_status); }; } &&
3995          { ac_try='test -s conftest.$ac_objext'
3996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3997   (eval $ac_try) 2>&5
3998   ac_status=$?
3999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000   (exit $ac_status); }; }; then
4001   ac_cv_type_mode_t=yes
4002 else
4003   echo "$as_me: failed program was:" >&5
4004 sed 's/^/| /' conftest.$ac_ext >&5
4005
4006 ac_cv_type_mode_t=no
4007 fi
4008 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4009 fi
4010 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4011 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4012 if test $ac_cv_type_mode_t = yes; then
4013   :
4014 else
4015
4016 cat >>confdefs.h <<_ACEOF
4017 #define mode_t int
4018 _ACEOF
4019
4020 fi
4021
4022 echo "$as_me:$LINENO: checking for pid_t" >&5
4023 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4024 if test "${ac_cv_type_pid_t+set}" = set; then
4025   echo $ECHO_N "(cached) $ECHO_C" >&6
4026 else
4027   cat >conftest.$ac_ext <<_ACEOF
4028 /* confdefs.h.  */
4029 _ACEOF
4030 cat confdefs.h >>conftest.$ac_ext
4031 cat >>conftest.$ac_ext <<_ACEOF
4032 /* end confdefs.h.  */
4033 $ac_includes_default
4034 int
4035 main ()
4036 {
4037 if ((pid_t *) 0)
4038   return 0;
4039 if (sizeof (pid_t))
4040   return 0;
4041   ;
4042   return 0;
4043 }
4044 _ACEOF
4045 rm -f conftest.$ac_objext
4046 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4047   (eval $ac_compile) 2>conftest.er1
4048   ac_status=$?
4049   grep -v '^ *+' conftest.er1 >conftest.err
4050   rm -f conftest.er1
4051   cat conftest.err >&5
4052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4053   (exit $ac_status); } &&
4054          { ac_try='test -z "$ac_c_werror_flag"
4055                          || test ! -s conftest.err'
4056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4057   (eval $ac_try) 2>&5
4058   ac_status=$?
4059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4060   (exit $ac_status); }; } &&
4061          { ac_try='test -s conftest.$ac_objext'
4062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4063   (eval $ac_try) 2>&5
4064   ac_status=$?
4065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4066   (exit $ac_status); }; }; then
4067   ac_cv_type_pid_t=yes
4068 else
4069   echo "$as_me: failed program was:" >&5
4070 sed 's/^/| /' conftest.$ac_ext >&5
4071
4072 ac_cv_type_pid_t=no
4073 fi
4074 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4075 fi
4076 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4077 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4078 if test $ac_cv_type_pid_t = yes; then
4079   :
4080 else
4081
4082 cat >>confdefs.h <<_ACEOF
4083 #define pid_t int
4084 _ACEOF
4085
4086 fi
4087
4088 echo "$as_me:$LINENO: checking for size_t" >&5
4089 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4090 if test "${ac_cv_type_size_t+set}" = set; then
4091   echo $ECHO_N "(cached) $ECHO_C" >&6
4092 else
4093   cat >conftest.$ac_ext <<_ACEOF
4094 /* confdefs.h.  */
4095 _ACEOF
4096 cat confdefs.h >>conftest.$ac_ext
4097 cat >>conftest.$ac_ext <<_ACEOF
4098 /* end confdefs.h.  */
4099 $ac_includes_default
4100 int
4101 main ()
4102 {
4103 if ((size_t *) 0)
4104   return 0;
4105 if (sizeof (size_t))
4106   return 0;
4107   ;
4108   return 0;
4109 }
4110 _ACEOF
4111 rm -f conftest.$ac_objext
4112 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4113   (eval $ac_compile) 2>conftest.er1
4114   ac_status=$?
4115   grep -v '^ *+' conftest.er1 >conftest.err
4116   rm -f conftest.er1
4117   cat conftest.err >&5
4118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4119   (exit $ac_status); } &&
4120          { ac_try='test -z "$ac_c_werror_flag"
4121                          || test ! -s conftest.err'
4122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4123   (eval $ac_try) 2>&5
4124   ac_status=$?
4125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126   (exit $ac_status); }; } &&
4127          { ac_try='test -s conftest.$ac_objext'
4128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4129   (eval $ac_try) 2>&5
4130   ac_status=$?
4131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4132   (exit $ac_status); }; }; then
4133   ac_cv_type_size_t=yes
4134 else
4135   echo "$as_me: failed program was:" >&5
4136 sed 's/^/| /' conftest.$ac_ext >&5
4137
4138 ac_cv_type_size_t=no
4139 fi
4140 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4141 fi
4142 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4143 echo "${ECHO_T}$ac_cv_type_size_t" >&6
4144 if test $ac_cv_type_size_t = yes; then
4145   :
4146 else
4147
4148 cat >>confdefs.h <<_ACEOF
4149 #define size_t unsigned
4150 _ACEOF
4151
4152 fi
4153
4154 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4155 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4156 if test "${ac_cv_type_signal+set}" = set; then
4157   echo $ECHO_N "(cached) $ECHO_C" >&6
4158 else
4159   cat >conftest.$ac_ext <<_ACEOF
4160 /* confdefs.h.  */
4161 _ACEOF
4162 cat confdefs.h >>conftest.$ac_ext
4163 cat >>conftest.$ac_ext <<_ACEOF
4164 /* end confdefs.h.  */
4165 #include <sys/types.h>
4166 #include <signal.h>
4167 #ifdef signal
4168 # undef signal
4169 #endif
4170 #ifdef __cplusplus
4171 extern "C" void (*signal (int, void (*)(int)))(int);
4172 #else
4173 void (*signal ()) ();
4174 #endif
4175
4176 int
4177 main ()
4178 {
4179 int i;
4180   ;
4181   return 0;
4182 }
4183 _ACEOF
4184 rm -f conftest.$ac_objext
4185 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4186   (eval $ac_compile) 2>conftest.er1
4187   ac_status=$?
4188   grep -v '^ *+' conftest.er1 >conftest.err
4189   rm -f conftest.er1
4190   cat conftest.err >&5
4191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4192   (exit $ac_status); } &&
4193          { ac_try='test -z "$ac_c_werror_flag"
4194                          || test ! -s conftest.err'
4195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4196   (eval $ac_try) 2>&5
4197   ac_status=$?
4198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4199   (exit $ac_status); }; } &&
4200          { ac_try='test -s conftest.$ac_objext'
4201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4202   (eval $ac_try) 2>&5
4203   ac_status=$?
4204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4205   (exit $ac_status); }; }; then
4206   ac_cv_type_signal=void
4207 else
4208   echo "$as_me: failed program was:" >&5
4209 sed 's/^/| /' conftest.$ac_ext >&5
4210
4211 ac_cv_type_signal=int
4212 fi
4213 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4214 fi
4215 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4216 echo "${ECHO_T}$ac_cv_type_signal" >&6
4217
4218 cat >>confdefs.h <<_ACEOF
4219 #define RETSIGTYPE $ac_cv_type_signal
4220 _ACEOF
4221
4222
4223 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4224 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4225 if test "${ac_cv_header_time+set}" = set; then
4226   echo $ECHO_N "(cached) $ECHO_C" >&6
4227 else
4228   cat >conftest.$ac_ext <<_ACEOF
4229 /* confdefs.h.  */
4230 _ACEOF
4231 cat confdefs.h >>conftest.$ac_ext
4232 cat >>conftest.$ac_ext <<_ACEOF
4233 /* end confdefs.h.  */
4234 #include <sys/types.h>
4235 #include <sys/time.h>
4236 #include <time.h>
4237
4238 int
4239 main ()
4240 {
4241 if ((struct tm *) 0)
4242 return 0;
4243   ;
4244   return 0;
4245 }
4246 _ACEOF
4247 rm -f conftest.$ac_objext
4248 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4249   (eval $ac_compile) 2>conftest.er1
4250   ac_status=$?
4251   grep -v '^ *+' conftest.er1 >conftest.err
4252   rm -f conftest.er1
4253   cat conftest.err >&5
4254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4255   (exit $ac_status); } &&
4256          { ac_try='test -z "$ac_c_werror_flag"
4257                          || test ! -s conftest.err'
4258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4259   (eval $ac_try) 2>&5
4260   ac_status=$?
4261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4262   (exit $ac_status); }; } &&
4263          { ac_try='test -s conftest.$ac_objext'
4264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4265   (eval $ac_try) 2>&5
4266   ac_status=$?
4267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4268   (exit $ac_status); }; }; then
4269   ac_cv_header_time=yes
4270 else
4271   echo "$as_me: failed program was:" >&5
4272 sed 's/^/| /' conftest.$ac_ext >&5
4273
4274 ac_cv_header_time=no
4275 fi
4276 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4277 fi
4278 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
4279 echo "${ECHO_T}$ac_cv_header_time" >&6
4280 if test $ac_cv_header_time = yes; then
4281
4282 cat >>confdefs.h <<\_ACEOF
4283 #define TIME_WITH_SYS_TIME 1
4284 _ACEOF
4285
4286 fi
4287
4288 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
4289 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4290 if test "${ac_cv_header_sys_wait_h+set}" = set; then
4291   echo $ECHO_N "(cached) $ECHO_C" >&6
4292 else
4293   cat >conftest.$ac_ext <<_ACEOF
4294 /* confdefs.h.  */
4295 _ACEOF
4296 cat confdefs.h >>conftest.$ac_ext
4297 cat >>conftest.$ac_ext <<_ACEOF
4298 /* end confdefs.h.  */
4299 #include <sys/types.h>
4300 #include <sys/wait.h>
4301 #ifndef WEXITSTATUS
4302 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4303 #endif
4304 #ifndef WIFEXITED
4305 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4306 #endif
4307
4308 int
4309 main ()
4310 {
4311   int s;
4312   wait (&s);
4313   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4314   ;
4315   return 0;
4316 }
4317 _ACEOF
4318 rm -f conftest.$ac_objext
4319 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4320   (eval $ac_compile) 2>conftest.er1
4321   ac_status=$?
4322   grep -v '^ *+' conftest.er1 >conftest.err
4323   rm -f conftest.er1
4324   cat conftest.err >&5
4325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4326   (exit $ac_status); } &&
4327          { ac_try='test -z "$ac_c_werror_flag"
4328                          || test ! -s conftest.err'
4329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4330   (eval $ac_try) 2>&5
4331   ac_status=$?
4332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4333   (exit $ac_status); }; } &&
4334          { ac_try='test -s conftest.$ac_objext'
4335   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4336   (eval $ac_try) 2>&5
4337   ac_status=$?
4338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4339   (exit $ac_status); }; }; then
4340   ac_cv_header_sys_wait_h=yes
4341 else
4342   echo "$as_me: failed program was:" >&5
4343 sed 's/^/| /' conftest.$ac_ext >&5
4344
4345 ac_cv_header_sys_wait_h=no
4346 fi
4347 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4348 fi
4349 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
4350 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
4351 if test $ac_cv_header_sys_wait_h = yes; then
4352
4353 cat >>confdefs.h <<\_ACEOF
4354 #define HAVE_SYS_WAIT_H 1
4355 _ACEOF
4356
4357 fi
4358
4359
4360
4361
4362
4363
4364 ac_header_dirent=no
4365 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4366   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4367 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4368 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4369 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372   cat >conftest.$ac_ext <<_ACEOF
4373 /* confdefs.h.  */
4374 _ACEOF
4375 cat confdefs.h >>conftest.$ac_ext
4376 cat >>conftest.$ac_ext <<_ACEOF
4377 /* end confdefs.h.  */
4378 #include <sys/types.h>
4379 #include <$ac_hdr>
4380
4381 int
4382 main ()
4383 {
4384 if ((DIR *) 0)
4385 return 0;
4386   ;
4387   return 0;
4388 }
4389 _ACEOF
4390 rm -f conftest.$ac_objext
4391 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4392   (eval $ac_compile) 2>conftest.er1
4393   ac_status=$?
4394   grep -v '^ *+' conftest.er1 >conftest.err
4395   rm -f conftest.er1
4396   cat conftest.err >&5
4397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4398   (exit $ac_status); } &&
4399          { ac_try='test -z "$ac_c_werror_flag"
4400                          || test ! -s conftest.err'
4401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4402   (eval $ac_try) 2>&5
4403   ac_status=$?
4404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4405   (exit $ac_status); }; } &&
4406          { ac_try='test -s conftest.$ac_objext'
4407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4408   (eval $ac_try) 2>&5
4409   ac_status=$?
4410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4411   (exit $ac_status); }; }; then
4412   eval "$as_ac_Header=yes"
4413 else
4414   echo "$as_me: failed program was:" >&5
4415 sed 's/^/| /' conftest.$ac_ext >&5
4416
4417 eval "$as_ac_Header=no"
4418 fi
4419 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4420 fi
4421 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4422 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4423 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4424   cat >>confdefs.h <<_ACEOF
4425 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4426 _ACEOF
4427
4428 ac_header_dirent=$ac_hdr; break
4429 fi
4430
4431 done
4432 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4433 if test $ac_header_dirent = dirent.h; then
4434   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4435 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4436 if test "${ac_cv_search_opendir+set}" = set; then
4437   echo $ECHO_N "(cached) $ECHO_C" >&6
4438 else
4439   ac_func_search_save_LIBS=$LIBS
4440 ac_cv_search_opendir=no
4441 cat >conftest.$ac_ext <<_ACEOF
4442 /* confdefs.h.  */
4443 _ACEOF
4444 cat confdefs.h >>conftest.$ac_ext
4445 cat >>conftest.$ac_ext <<_ACEOF
4446 /* end confdefs.h.  */
4447
4448 /* Override any gcc2 internal prototype to avoid an error.  */
4449 #ifdef __cplusplus
4450 extern "C"
4451 #endif
4452 /* We use char because int might match the return type of a gcc2
4453    builtin and then its argument prototype would still apply.  */
4454 char opendir ();
4455 int
4456 main ()
4457 {
4458 opendir ();
4459   ;
4460   return 0;
4461 }
4462 _ACEOF
4463 rm -f conftest.$ac_objext conftest$ac_exeext
4464 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4465   (eval $ac_link) 2>conftest.er1
4466   ac_status=$?
4467   grep -v '^ *+' conftest.er1 >conftest.err
4468   rm -f conftest.er1
4469   cat conftest.err >&5
4470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4471   (exit $ac_status); } &&
4472          { ac_try='test -z "$ac_c_werror_flag"
4473                          || test ! -s conftest.err'
4474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4475   (eval $ac_try) 2>&5
4476   ac_status=$?
4477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4478   (exit $ac_status); }; } &&
4479          { ac_try='test -s conftest$ac_exeext'
4480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4481   (eval $ac_try) 2>&5
4482   ac_status=$?
4483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484   (exit $ac_status); }; }; then
4485   ac_cv_search_opendir="none required"
4486 else
4487   echo "$as_me: failed program was:" >&5
4488 sed 's/^/| /' conftest.$ac_ext >&5
4489
4490 fi
4491 rm -f conftest.err conftest.$ac_objext \
4492       conftest$ac_exeext conftest.$ac_ext
4493 if test "$ac_cv_search_opendir" = no; then
4494   for ac_lib in dir; do
4495     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4496     cat >conftest.$ac_ext <<_ACEOF
4497 /* confdefs.h.  */
4498 _ACEOF
4499 cat confdefs.h >>conftest.$ac_ext
4500 cat >>conftest.$ac_ext <<_ACEOF
4501 /* end confdefs.h.  */
4502
4503 /* Override any gcc2 internal prototype to avoid an error.  */
4504 #ifdef __cplusplus
4505 extern "C"
4506 #endif
4507 /* We use char because int might match the return type of a gcc2
4508    builtin and then its argument prototype would still apply.  */
4509 char opendir ();
4510 int
4511 main ()
4512 {
4513 opendir ();
4514   ;
4515   return 0;
4516 }
4517 _ACEOF
4518 rm -f conftest.$ac_objext conftest$ac_exeext
4519 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4520   (eval $ac_link) 2>conftest.er1
4521   ac_status=$?
4522   grep -v '^ *+' conftest.er1 >conftest.err
4523   rm -f conftest.er1
4524   cat conftest.err >&5
4525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4526   (exit $ac_status); } &&
4527          { ac_try='test -z "$ac_c_werror_flag"
4528                          || test ! -s conftest.err'
4529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4530   (eval $ac_try) 2>&5
4531   ac_status=$?
4532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4533   (exit $ac_status); }; } &&
4534          { ac_try='test -s conftest$ac_exeext'
4535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4536   (eval $ac_try) 2>&5
4537   ac_status=$?
4538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4539   (exit $ac_status); }; }; then
4540   ac_cv_search_opendir="-l$ac_lib"
4541 break
4542 else
4543   echo "$as_me: failed program was:" >&5
4544 sed 's/^/| /' conftest.$ac_ext >&5
4545
4546 fi
4547 rm -f conftest.err conftest.$ac_objext \
4548       conftest$ac_exeext conftest.$ac_ext
4549   done
4550 fi
4551 LIBS=$ac_func_search_save_LIBS
4552 fi
4553 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4554 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4555 if test "$ac_cv_search_opendir" != no; then
4556   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4557
4558 fi
4559
4560 else
4561   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4562 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4563 if test "${ac_cv_search_opendir+set}" = set; then
4564   echo $ECHO_N "(cached) $ECHO_C" >&6
4565 else
4566   ac_func_search_save_LIBS=$LIBS
4567 ac_cv_search_opendir=no
4568 cat >conftest.$ac_ext <<_ACEOF
4569 /* confdefs.h.  */
4570 _ACEOF
4571 cat confdefs.h >>conftest.$ac_ext
4572 cat >>conftest.$ac_ext <<_ACEOF
4573 /* end confdefs.h.  */
4574
4575 /* Override any gcc2 internal prototype to avoid an error.  */
4576 #ifdef __cplusplus
4577 extern "C"
4578 #endif
4579 /* We use char because int might match the return type of a gcc2
4580    builtin and then its argument prototype would still apply.  */
4581 char opendir ();
4582 int
4583 main ()
4584 {
4585 opendir ();
4586   ;
4587   return 0;
4588 }
4589 _ACEOF
4590 rm -f conftest.$ac_objext conftest$ac_exeext
4591 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4592   (eval $ac_link) 2>conftest.er1
4593   ac_status=$?
4594   grep -v '^ *+' conftest.er1 >conftest.err
4595   rm -f conftest.er1
4596   cat conftest.err >&5
4597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4598   (exit $ac_status); } &&
4599          { ac_try='test -z "$ac_c_werror_flag"
4600                          || test ! -s conftest.err'
4601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4602   (eval $ac_try) 2>&5
4603   ac_status=$?
4604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4605   (exit $ac_status); }; } &&
4606          { ac_try='test -s conftest$ac_exeext'
4607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4608   (eval $ac_try) 2>&5
4609   ac_status=$?
4610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4611   (exit $ac_status); }; }; then
4612   ac_cv_search_opendir="none required"
4613 else
4614   echo "$as_me: failed program was:" >&5
4615 sed 's/^/| /' conftest.$ac_ext >&5
4616
4617 fi
4618 rm -f conftest.err conftest.$ac_objext \
4619       conftest$ac_exeext conftest.$ac_ext
4620 if test "$ac_cv_search_opendir" = no; then
4621   for ac_lib in x; do
4622     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4623     cat >conftest.$ac_ext <<_ACEOF
4624 /* confdefs.h.  */
4625 _ACEOF
4626 cat confdefs.h >>conftest.$ac_ext
4627 cat >>conftest.$ac_ext <<_ACEOF
4628 /* end confdefs.h.  */
4629
4630 /* Override any gcc2 internal prototype to avoid an error.  */
4631 #ifdef __cplusplus
4632 extern "C"
4633 #endif
4634 /* We use char because int might match the return type of a gcc2
4635    builtin and then its argument prototype would still apply.  */
4636 char opendir ();
4637 int
4638 main ()
4639 {
4640 opendir ();
4641   ;
4642   return 0;
4643 }
4644 _ACEOF
4645 rm -f conftest.$ac_objext conftest$ac_exeext
4646 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4647   (eval $ac_link) 2>conftest.er1
4648   ac_status=$?
4649   grep -v '^ *+' conftest.er1 >conftest.err
4650   rm -f conftest.er1
4651   cat conftest.err >&5
4652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4653   (exit $ac_status); } &&
4654          { ac_try='test -z "$ac_c_werror_flag"
4655                          || test ! -s conftest.err'
4656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4657   (eval $ac_try) 2>&5
4658   ac_status=$?
4659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4660   (exit $ac_status); }; } &&
4661          { ac_try='test -s conftest$ac_exeext'
4662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4663   (eval $ac_try) 2>&5
4664   ac_status=$?
4665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4666   (exit $ac_status); }; }; then
4667   ac_cv_search_opendir="-l$ac_lib"
4668 break
4669 else
4670   echo "$as_me: failed program was:" >&5
4671 sed 's/^/| /' conftest.$ac_ext >&5
4672
4673 fi
4674 rm -f conftest.err conftest.$ac_objext \
4675       conftest$ac_exeext conftest.$ac_ext
4676   done
4677 fi
4678 LIBS=$ac_func_search_save_LIBS
4679 fi
4680 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4681 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4682 if test "$ac_cv_search_opendir" != no; then
4683   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4684
4685 fi
4686
4687 fi
4688
4689 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4690 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4691   if test "${ac_cv_gettimeofday_args+set}" = set; then
4692   echo $ECHO_N "(cached) $ECHO_C" >&6
4693 else
4694   cat >conftest.$ac_ext <<_ACEOF
4695 /* confdefs.h.  */
4696 _ACEOF
4697 cat confdefs.h >>conftest.$ac_ext
4698 cat >>conftest.$ac_ext <<_ACEOF
4699 /* end confdefs.h.  */
4700 #include <stdlib.h>
4701                     #include <sys/time.h>
4702 int
4703 main ()
4704 {
4705 struct timeval tv; struct timezone tzp;
4706                     gettimeofday(&tv, &tzp);
4707   ;
4708   return 0;
4709 }
4710 _ACEOF
4711 rm -f conftest.$ac_objext
4712 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4713   (eval $ac_compile) 2>conftest.er1
4714   ac_status=$?
4715   grep -v '^ *+' conftest.er1 >conftest.err
4716   rm -f conftest.er1
4717   cat conftest.err >&5
4718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4719   (exit $ac_status); } &&
4720          { ac_try='test -z "$ac_c_werror_flag"
4721                          || test ! -s conftest.err'
4722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4723   (eval $ac_try) 2>&5
4724   ac_status=$?
4725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4726   (exit $ac_status); }; } &&
4727          { ac_try='test -s conftest.$ac_objext'
4728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4729   (eval $ac_try) 2>&5
4730   ac_status=$?
4731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4732   (exit $ac_status); }; }; then
4733   ac_gettimeofday_args=2
4734 else
4735   echo "$as_me: failed program was:" >&5
4736 sed 's/^/| /' conftest.$ac_ext >&5
4737
4738 cat >conftest.$ac_ext <<_ACEOF
4739 /* confdefs.h.  */
4740 _ACEOF
4741 cat confdefs.h >>conftest.$ac_ext
4742 cat >>conftest.$ac_ext <<_ACEOF
4743 /* end confdefs.h.  */
4744 #include <stdlib.h>
4745                                     #include <sys/time.h>
4746 int
4747 main ()
4748 {
4749 struct timeval tv; gettimeofday(&tv);
4750   ;
4751   return 0;
4752 }
4753 _ACEOF
4754 rm -f conftest.$ac_objext
4755 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4756   (eval $ac_compile) 2>conftest.er1
4757   ac_status=$?
4758   grep -v '^ *+' conftest.er1 >conftest.err
4759   rm -f conftest.er1
4760   cat conftest.err >&5
4761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4762   (exit $ac_status); } &&
4763          { ac_try='test -z "$ac_c_werror_flag"
4764                          || test ! -s conftest.err'
4765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4766   (eval $ac_try) 2>&5
4767   ac_status=$?
4768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4769   (exit $ac_status); }; } &&
4770          { ac_try='test -s conftest.$ac_objext'
4771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4772   (eval $ac_try) 2>&5
4773   ac_status=$?
4774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4775   (exit $ac_status); }; }; then
4776   ac_gettimeofday_args=1
4777 else
4778   echo "$as_me: failed program was:" >&5
4779 sed 's/^/| /' conftest.$ac_ext >&5
4780
4781 ac_gettimeofday_args=0
4782 fi
4783 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4784 fi
4785 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4786     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4787 fi
4788
4789   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4790   if test "$ac_gettimeofday_args" = 1 ; then
4791     cat >>confdefs.h <<\_ACEOF
4792 #define HAVE_GETTIMEOFDAY 1
4793 _ACEOF
4794
4795     echo "$as_me:$LINENO: result: one argument" >&5
4796 echo "${ECHO_T}one argument" >&6
4797   elif test "$ac_gettimeofday_args" = 2 ; then
4798     cat >>confdefs.h <<\_ACEOF
4799 #define HAVE_GETTIMEOFDAY 1
4800 _ACEOF
4801
4802     cat >>confdefs.h <<\_ACEOF
4803 #define GETTIMEOFDAY_TWO_ARGS 1
4804 _ACEOF
4805
4806     echo "$as_me:$LINENO: result: two arguments" >&5
4807 echo "${ECHO_T}two arguments" >&6
4808   else
4809     echo "$as_me:$LINENO: result: unknown" >&5
4810 echo "${ECHO_T}unknown" >&6
4811   fi
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4823 do
4824 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4825 echo "$as_me:$LINENO: checking for $ac_func" >&5
4826 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4827 if eval "test \"\${$as_ac_var+set}\" = set"; then
4828   echo $ECHO_N "(cached) $ECHO_C" >&6
4829 else
4830   cat >conftest.$ac_ext <<_ACEOF
4831 /* confdefs.h.  */
4832 _ACEOF
4833 cat confdefs.h >>conftest.$ac_ext
4834 cat >>conftest.$ac_ext <<_ACEOF
4835 /* end confdefs.h.  */
4836 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4837    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4838 #define $ac_func innocuous_$ac_func
4839
4840 /* System header to define __stub macros and hopefully few prototypes,
4841     which can conflict with char $ac_func (); below.
4842     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4843     <limits.h> exists even on freestanding compilers.  */
4844
4845 #ifdef __STDC__
4846 # include <limits.h>
4847 #else
4848 # include <assert.h>
4849 #endif
4850
4851 #undef $ac_func
4852
4853 /* Override any gcc2 internal prototype to avoid an error.  */
4854 #ifdef __cplusplus
4855 extern "C"
4856 {
4857 #endif
4858 /* We use char because int might match the return type of a gcc2
4859    builtin and then its argument prototype would still apply.  */
4860 char $ac_func ();
4861 /* The GNU C library defines this for functions which it implements
4862     to always fail with ENOSYS.  Some functions are actually named
4863     something starting with __ and the normal name is an alias.  */
4864 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4865 choke me
4866 #else
4867 char (*f) () = $ac_func;
4868 #endif
4869 #ifdef __cplusplus
4870 }
4871 #endif
4872
4873 int
4874 main ()
4875 {
4876 return f != $ac_func;
4877   ;
4878   return 0;
4879 }
4880 _ACEOF
4881 rm -f conftest.$ac_objext conftest$ac_exeext
4882 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4883   (eval $ac_link) 2>conftest.er1
4884   ac_status=$?
4885   grep -v '^ *+' conftest.er1 >conftest.err
4886   rm -f conftest.er1
4887   cat conftest.err >&5
4888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4889   (exit $ac_status); } &&
4890          { ac_try='test -z "$ac_c_werror_flag"
4891                          || test ! -s conftest.err'
4892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4893   (eval $ac_try) 2>&5
4894   ac_status=$?
4895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4896   (exit $ac_status); }; } &&
4897          { ac_try='test -s conftest$ac_exeext'
4898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4899   (eval $ac_try) 2>&5
4900   ac_status=$?
4901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4902   (exit $ac_status); }; }; then
4903   eval "$as_ac_var=yes"
4904 else
4905   echo "$as_me: failed program was:" >&5
4906 sed 's/^/| /' conftest.$ac_ext >&5
4907
4908 eval "$as_ac_var=no"
4909 fi
4910 rm -f conftest.err conftest.$ac_objext \
4911       conftest$ac_exeext conftest.$ac_ext
4912 fi
4913 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4914 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4915 if test `eval echo '${'$as_ac_var'}'` = yes; then
4916   cat >>confdefs.h <<_ACEOF
4917 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4918 _ACEOF
4919
4920 fi
4921 done
4922
4923
4924
4925
4926
4927 for ac_func in sigaction syslog realpath setrlimit
4928 do
4929 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4930 echo "$as_me:$LINENO: checking for $ac_func" >&5
4931 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4932 if eval "test \"\${$as_ac_var+set}\" = set"; then
4933   echo $ECHO_N "(cached) $ECHO_C" >&6
4934 else
4935   cat >conftest.$ac_ext <<_ACEOF
4936 /* confdefs.h.  */
4937 _ACEOF
4938 cat confdefs.h >>conftest.$ac_ext
4939 cat >>conftest.$ac_ext <<_ACEOF
4940 /* end confdefs.h.  */
4941 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4942    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4943 #define $ac_func innocuous_$ac_func
4944
4945 /* System header to define __stub macros and hopefully few prototypes,
4946     which can conflict with char $ac_func (); below.
4947     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4948     <limits.h> exists even on freestanding compilers.  */
4949
4950 #ifdef __STDC__
4951 # include <limits.h>
4952 #else
4953 # include <assert.h>
4954 #endif
4955
4956 #undef $ac_func
4957
4958 /* Override any gcc2 internal prototype to avoid an error.  */
4959 #ifdef __cplusplus
4960 extern "C"
4961 {
4962 #endif
4963 /* We use char because int might match the return type of a gcc2
4964    builtin and then its argument prototype would still apply.  */
4965 char $ac_func ();
4966 /* The GNU C library defines this for functions which it implements
4967     to always fail with ENOSYS.  Some functions are actually named
4968     something starting with __ and the normal name is an alias.  */
4969 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4970 choke me
4971 #else
4972 char (*f) () = $ac_func;
4973 #endif
4974 #ifdef __cplusplus
4975 }
4976 #endif
4977
4978 int
4979 main ()
4980 {
4981 return f != $ac_func;
4982   ;
4983   return 0;
4984 }
4985 _ACEOF
4986 rm -f conftest.$ac_objext conftest$ac_exeext
4987 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4988   (eval $ac_link) 2>conftest.er1
4989   ac_status=$?
4990   grep -v '^ *+' conftest.er1 >conftest.err
4991   rm -f conftest.er1
4992   cat conftest.err >&5
4993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4994   (exit $ac_status); } &&
4995          { ac_try='test -z "$ac_c_werror_flag"
4996                          || test ! -s conftest.err'
4997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4998   (eval $ac_try) 2>&5
4999   ac_status=$?
5000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5001   (exit $ac_status); }; } &&
5002          { ac_try='test -s conftest$ac_exeext'
5003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5004   (eval $ac_try) 2>&5
5005   ac_status=$?
5006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5007   (exit $ac_status); }; }; then
5008   eval "$as_ac_var=yes"
5009 else
5010   echo "$as_me: failed program was:" >&5
5011 sed 's/^/| /' conftest.$ac_ext >&5
5012
5013 eval "$as_ac_var=no"
5014 fi
5015 rm -f conftest.err conftest.$ac_objext \
5016       conftest$ac_exeext conftest.$ac_ext
5017 fi
5018 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5019 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5020 if test `eval echo '${'$as_ac_var'}'` = yes; then
5021   cat >>confdefs.h <<_ACEOF
5022 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5023 _ACEOF
5024
5025 fi
5026 done
5027
5028
5029 for ac_func in setlocale
5030 do
5031 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5032 echo "$as_me:$LINENO: checking for $ac_func" >&5
5033 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5034 if eval "test \"\${$as_ac_var+set}\" = set"; then
5035   echo $ECHO_N "(cached) $ECHO_C" >&6
5036 else
5037   cat >conftest.$ac_ext <<_ACEOF
5038 /* confdefs.h.  */
5039 _ACEOF
5040 cat confdefs.h >>conftest.$ac_ext
5041 cat >>conftest.$ac_ext <<_ACEOF
5042 /* end confdefs.h.  */
5043 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5044    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5045 #define $ac_func innocuous_$ac_func
5046
5047 /* System header to define __stub macros and hopefully few prototypes,
5048     which can conflict with char $ac_func (); below.
5049     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5050     <limits.h> exists even on freestanding compilers.  */
5051
5052 #ifdef __STDC__
5053 # include <limits.h>
5054 #else
5055 # include <assert.h>
5056 #endif
5057
5058 #undef $ac_func
5059
5060 /* Override any gcc2 internal prototype to avoid an error.  */
5061 #ifdef __cplusplus
5062 extern "C"
5063 {
5064 #endif
5065 /* We use char because int might match the return type of a gcc2
5066    builtin and then its argument prototype would still apply.  */
5067 char $ac_func ();
5068 /* The GNU C library defines this for functions which it implements
5069     to always fail with ENOSYS.  Some functions are actually named
5070     something starting with __ and the normal name is an alias.  */
5071 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5072 choke me
5073 #else
5074 char (*f) () = $ac_func;
5075 #endif
5076 #ifdef __cplusplus
5077 }
5078 #endif
5079
5080 int
5081 main ()
5082 {
5083 return f != $ac_func;
5084   ;
5085   return 0;
5086 }
5087 _ACEOF
5088 rm -f conftest.$ac_objext conftest$ac_exeext
5089 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5090   (eval $ac_link) 2>conftest.er1
5091   ac_status=$?
5092   grep -v '^ *+' conftest.er1 >conftest.err
5093   rm -f conftest.er1
5094   cat conftest.err >&5
5095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5096   (exit $ac_status); } &&
5097          { ac_try='test -z "$ac_c_werror_flag"
5098                          || test ! -s conftest.err'
5099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5100   (eval $ac_try) 2>&5
5101   ac_status=$?
5102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5103   (exit $ac_status); }; } &&
5104          { ac_try='test -s conftest$ac_exeext'
5105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5106   (eval $ac_try) 2>&5
5107   ac_status=$?
5108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5109   (exit $ac_status); }; }; then
5110   eval "$as_ac_var=yes"
5111 else
5112   echo "$as_me: failed program was:" >&5
5113 sed 's/^/| /' conftest.$ac_ext >&5
5114
5115 eval "$as_ac_var=no"
5116 fi
5117 rm -f conftest.err conftest.$ac_objext \
5118       conftest$ac_exeext conftest.$ac_ext
5119 fi
5120 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5121 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5122 if test `eval echo '${'$as_ac_var'}'` = yes; then
5123   cat >>confdefs.h <<_ACEOF
5124 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5125 _ACEOF
5126
5127 fi
5128 done
5129
5130 echo "$as_me:$LINENO: checking for struct icmp" >&5
5131 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
5132 if test "${ac_cv_have_icmp+set}" = set; then
5133   echo $ECHO_N "(cached) $ECHO_C" >&6
5134 else
5135   cat >conftest.$ac_ext <<_ACEOF
5136 /* confdefs.h.  */
5137 _ACEOF
5138 cat confdefs.h >>conftest.$ac_ext
5139 cat >>conftest.$ac_ext <<_ACEOF
5140 /* end confdefs.h.  */
5141 #include <stdlib.h>
5142                    #include <stdio.h>
5143                    #include <math.h>
5144                    #include <unistd.h>
5145                    #include <limits.h>
5146                    #include <signal.h>
5147                    #include <fcntl.h>
5148                    #include <sys/types.h>
5149                    #include <sys/time.h>
5150                    #include <sys/ipc.h>
5151                    #include <sys/shm.h>
5152                    #include <sys/socket.h>
5153                    #include <netinet/in_systm.h>
5154                    #include <netinet/in.h>
5155                    #include <netinet/ip.h>
5156                    #include <netinet/ip_icmp.h>
5157                    #include <netinet/udp.h>
5158                    #include <arpa/inet.h>
5159                    #include <netdb.h>
5160 int
5161 main ()
5162 {
5163 struct icmp i;
5164                    struct sockaddr s;
5165                    struct sockaddr_in si;
5166                    struct ip ip;
5167                    i.icmp_type = ICMP_ECHO;
5168                    i.icmp_code = 0;
5169                    i.icmp_cksum = 0;
5170                    i.icmp_id = 0;
5171                    i.icmp_seq = 0;
5172                    si.sin_family = AF_INET;
5173                    #if defined(__DECC) || defined(_IP_VHL)
5174                    ip.ip_vhl = 0;
5175                    #else
5176                    ip.ip_hl = 0;
5177                    #endif
5178
5179   ;
5180   return 0;
5181 }
5182 _ACEOF
5183 rm -f conftest.$ac_objext
5184 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5185   (eval $ac_compile) 2>conftest.er1
5186   ac_status=$?
5187   grep -v '^ *+' conftest.er1 >conftest.err
5188   rm -f conftest.er1
5189   cat conftest.err >&5
5190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5191   (exit $ac_status); } &&
5192          { ac_try='test -z "$ac_c_werror_flag"
5193                          || test ! -s conftest.err'
5194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5195   (eval $ac_try) 2>&5
5196   ac_status=$?
5197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5198   (exit $ac_status); }; } &&
5199          { ac_try='test -s conftest.$ac_objext'
5200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5201   (eval $ac_try) 2>&5
5202   ac_status=$?
5203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5204   (exit $ac_status); }; }; then
5205   ac_cv_have_icmp=yes
5206 else
5207   echo "$as_me: failed program was:" >&5
5208 sed 's/^/| /' conftest.$ac_ext >&5
5209
5210 ac_cv_have_icmp=no
5211 fi
5212 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5213 fi
5214 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
5215 echo "${ECHO_T}$ac_cv_have_icmp" >&6
5216  if test "$ac_cv_have_icmp" = yes ; then
5217    cat >>confdefs.h <<\_ACEOF
5218 #define HAVE_ICMP 1
5219 _ACEOF
5220
5221  fi
5222 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
5223 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
5224 if test "${ac_cv_have_icmphdr+set}" = set; then
5225   echo $ECHO_N "(cached) $ECHO_C" >&6
5226 else
5227   cat >conftest.$ac_ext <<_ACEOF
5228 /* confdefs.h.  */
5229 _ACEOF
5230 cat confdefs.h >>conftest.$ac_ext
5231 cat >>conftest.$ac_ext <<_ACEOF
5232 /* end confdefs.h.  */
5233 #include <stdlib.h>
5234                    #include <stdio.h>
5235                    #include <math.h>
5236                    #include <unistd.h>
5237                    #include <limits.h>
5238                    #include <signal.h>
5239                    #include <fcntl.h>
5240                    #include <sys/types.h>
5241                    #include <sys/time.h>
5242                    #include <sys/ipc.h>
5243                    #include <sys/shm.h>
5244                    #include <sys/socket.h>
5245                    #include <netinet/in_systm.h>
5246                    #include <netinet/in.h>
5247                    #include <netinet/ip.h>
5248                    #include <netinet/ip_icmp.h>
5249                    #include <netinet/udp.h>
5250                    #include <arpa/inet.h>
5251                    #include <netdb.h>
5252 int
5253 main ()
5254 {
5255 struct icmphdr i;
5256                    struct sockaddr s;
5257                    struct sockaddr_in si;
5258                    struct ip ip;
5259                    i.type = ICMP_ECHO;
5260                    i.code = 0;
5261                    i.checksum = 0;
5262                    i.un.echo.id = 0;
5263                    i.un.echo.sequence = 0;
5264                    si.sin_family = AF_INET;
5265                    ip.ip_hl = 0;
5266   ;
5267   return 0;
5268 }
5269 _ACEOF
5270 rm -f conftest.$ac_objext
5271 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5272   (eval $ac_compile) 2>conftest.er1
5273   ac_status=$?
5274   grep -v '^ *+' conftest.er1 >conftest.err
5275   rm -f conftest.er1
5276   cat conftest.err >&5
5277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5278   (exit $ac_status); } &&
5279          { ac_try='test -z "$ac_c_werror_flag"
5280                          || test ! -s conftest.err'
5281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5282   (eval $ac_try) 2>&5
5283   ac_status=$?
5284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5285   (exit $ac_status); }; } &&
5286          { ac_try='test -s conftest.$ac_objext'
5287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5288   (eval $ac_try) 2>&5
5289   ac_status=$?
5290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5291   (exit $ac_status); }; }; then
5292   ac_cv_have_icmphdr=yes
5293 else
5294   echo "$as_me: failed program was:" >&5
5295 sed 's/^/| /' conftest.$ac_ext >&5
5296
5297 ac_cv_have_icmphdr=no
5298 fi
5299 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5300 fi
5301 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
5302 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
5303  if test "$ac_cv_have_icmphdr" = yes ; then
5304    cat >>confdefs.h <<\_ACEOF
5305 #define HAVE_ICMPHDR 1
5306 _ACEOF
5307
5308  fi
5309
5310
5311 for ac_header in crypt.h sys/select.h
5312 do
5313 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5314 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5315   echo "$as_me:$LINENO: checking for $ac_header" >&5
5316 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5317 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5318   echo $ECHO_N "(cached) $ECHO_C" >&6
5319 fi
5320 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5321 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5322 else
5323   # Is the header compilable?
5324 echo "$as_me:$LINENO: checking $ac_header usability" >&5
5325 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5326 cat >conftest.$ac_ext <<_ACEOF
5327 /* confdefs.h.  */
5328 _ACEOF
5329 cat confdefs.h >>conftest.$ac_ext
5330 cat >>conftest.$ac_ext <<_ACEOF
5331 /* end confdefs.h.  */
5332 $ac_includes_default
5333 #include <$ac_header>
5334 _ACEOF
5335 rm -f conftest.$ac_objext
5336 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5337   (eval $ac_compile) 2>conftest.er1
5338   ac_status=$?
5339   grep -v '^ *+' conftest.er1 >conftest.err
5340   rm -f conftest.er1
5341   cat conftest.err >&5
5342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5343   (exit $ac_status); } &&
5344          { ac_try='test -z "$ac_c_werror_flag"
5345                          || test ! -s conftest.err'
5346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5347   (eval $ac_try) 2>&5
5348   ac_status=$?
5349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5350   (exit $ac_status); }; } &&
5351          { ac_try='test -s conftest.$ac_objext'
5352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5353   (eval $ac_try) 2>&5
5354   ac_status=$?
5355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5356   (exit $ac_status); }; }; then
5357   ac_header_compiler=yes
5358 else
5359   echo "$as_me: failed program was:" >&5
5360 sed 's/^/| /' conftest.$ac_ext >&5
5361
5362 ac_header_compiler=no
5363 fi
5364 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5365 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5366 echo "${ECHO_T}$ac_header_compiler" >&6
5367
5368 # Is the header present?
5369 echo "$as_me:$LINENO: checking $ac_header presence" >&5
5370 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5371 cat >conftest.$ac_ext <<_ACEOF
5372 /* confdefs.h.  */
5373 _ACEOF
5374 cat confdefs.h >>conftest.$ac_ext
5375 cat >>conftest.$ac_ext <<_ACEOF
5376 /* end confdefs.h.  */
5377 #include <$ac_header>
5378 _ACEOF
5379 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5380   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5381   ac_status=$?
5382   grep -v '^ *+' conftest.er1 >conftest.err
5383   rm -f conftest.er1
5384   cat conftest.err >&5
5385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5386   (exit $ac_status); } >/dev/null; then
5387   if test -s conftest.err; then
5388     ac_cpp_err=$ac_c_preproc_warn_flag
5389     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5390   else
5391     ac_cpp_err=
5392   fi
5393 else
5394   ac_cpp_err=yes
5395 fi
5396 if test -z "$ac_cpp_err"; then
5397   ac_header_preproc=yes
5398 else
5399   echo "$as_me: failed program was:" >&5
5400 sed 's/^/| /' conftest.$ac_ext >&5
5401
5402   ac_header_preproc=no
5403 fi
5404 rm -f conftest.err conftest.$ac_ext
5405 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5406 echo "${ECHO_T}$ac_header_preproc" >&6
5407
5408 # So?  What about this header?
5409 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5410   yes:no: )
5411     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5412 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5413     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5414 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5415     ac_header_preproc=yes
5416     ;;
5417   no:yes:* )
5418     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5419 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5420     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
5421 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
5422     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5423 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5424     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
5425 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
5426     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5427 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5428     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5429 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5430     (
5431       cat <<\_ASBOX
5432 ## ------------------------------------------ ##
5433 ## Report this to the AC_PACKAGE_NAME lists.  ##
5434 ## ------------------------------------------ ##
5435 _ASBOX
5436     ) |
5437       sed "s/^/$as_me: WARNING:     /" >&2
5438     ;;
5439 esac
5440 echo "$as_me:$LINENO: checking for $ac_header" >&5
5441 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5442 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5443   echo $ECHO_N "(cached) $ECHO_C" >&6
5444 else
5445   eval "$as_ac_Header=\$ac_header_preproc"
5446 fi
5447 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5448 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5449
5450 fi
5451 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5452   cat >>confdefs.h <<_ACEOF
5453 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5454 _ACEOF
5455
5456 fi
5457
5458 done
5459
5460 for ac_prog in perl5 perl
5461 do
5462   # Extract the first word of "$ac_prog", so it can be a program name with args.
5463 set dummy $ac_prog; ac_word=$2
5464 echo "$as_me:$LINENO: checking for $ac_word" >&5
5465 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5466 if test "${ac_cv_path_PERL+set}" = set; then
5467   echo $ECHO_N "(cached) $ECHO_C" >&6
5468 else
5469   case $PERL in
5470   [\\/]* | ?:[\\/]*)
5471   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5472   ;;
5473   *)
5474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5475 for as_dir in $PATH
5476 do
5477   IFS=$as_save_IFS
5478   test -z "$as_dir" && as_dir=.
5479   for ac_exec_ext in '' $ac_executable_extensions; do
5480   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5481     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5482     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5483     break 2
5484   fi
5485 done
5486 done
5487
5488   ;;
5489 esac
5490 fi
5491 PERL=$ac_cv_path_PERL
5492
5493 if test -n "$PERL"; then
5494   echo "$as_me:$LINENO: result: $PERL" >&5
5495 echo "${ECHO_T}$PERL" >&6
5496 else
5497   echo "$as_me:$LINENO: result: no" >&5
5498 echo "${ECHO_T}no" >&6
5499 fi
5500
5501   test -n "$PERL" && break
5502 done
5503
5504   if test -z "$PERL" ; then
5505     PERL_VERSION=0
5506   else
5507     echo "$as_me:$LINENO: checking perl version" >&5
5508 echo $ECHO_N "checking perl version... $ECHO_C" >&6
5509 if test "${ac_cv_perl_version+set}" = set; then
5510   echo $ECHO_N "(cached) $ECHO_C" >&6
5511 else
5512   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
5513 fi
5514 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
5515 echo "${ECHO_T}$ac_cv_perl_version" >&6
5516     PERL_VERSION=$ac_cv_perl_version
5517   fi
5518
5519
5520 if test -z "$PERL" ; then
5521   # don't let it be blank...
5522   PERL=/usr/bin/perl
5523 fi
5524
5525 echo "$as_me:$LINENO: checking for X" >&5
5526 echo $ECHO_N "checking for X... $ECHO_C" >&6
5527
5528
5529 # Check whether --with-x or --without-x was given.
5530 if test "${with_x+set}" = set; then
5531   withval="$with_x"
5532
5533 fi;
5534 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5535 if test "x$with_x" = xno; then
5536   # The user explicitly disabled X.
5537   have_x=disabled
5538 else
5539   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5540     # Both variables are already set.
5541     have_x=yes
5542   else
5543     if test "${ac_cv_have_x+set}" = set; then
5544   echo $ECHO_N "(cached) $ECHO_C" >&6
5545 else
5546   # One or both of the vars are not set, and there is no cached value.
5547 ac_x_includes=no ac_x_libraries=no
5548 rm -fr conftest.dir
5549 if mkdir conftest.dir; then
5550   cd conftest.dir
5551   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5552   cat >Imakefile <<'_ACEOF'
5553 acfindx:
5554         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5555 _ACEOF
5556   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5557     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5558     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5559     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5560     for ac_extension in a so sl; do
5561       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5562          test -f $ac_im_libdir/libX11.$ac_extension; then
5563         ac_im_usrlibdir=$ac_im_libdir; break
5564       fi
5565     done
5566     # Screen out bogus values from the imake configuration.  They are
5567     # bogus both because they are the default anyway, and because
5568     # using them would break gcc on systems where it needs fixed includes.
5569     case $ac_im_incroot in
5570         /usr/include) ;;
5571         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
5572     esac
5573     case $ac_im_usrlibdir in
5574         /usr/lib | /lib) ;;
5575         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
5576     esac
5577   fi
5578   cd ..
5579   rm -fr conftest.dir
5580 fi
5581
5582 # Standard set of common directories for X headers.
5583 # Check X11 before X11Rn because it is often a symlink to the current release.
5584 ac_x_header_dirs='
5585 /usr/X11/include
5586 /usr/X11R6/include
5587 /usr/X11R5/include
5588 /usr/X11R4/include
5589
5590 /usr/include/X11
5591 /usr/include/X11R6
5592 /usr/include/X11R5
5593 /usr/include/X11R4
5594
5595 /usr/local/X11/include
5596 /usr/local/X11R6/include
5597 /usr/local/X11R5/include
5598 /usr/local/X11R4/include
5599
5600 /usr/local/include/X11
5601 /usr/local/include/X11R6
5602 /usr/local/include/X11R5
5603 /usr/local/include/X11R4
5604
5605 /usr/X386/include
5606 /usr/x386/include
5607 /usr/XFree86/include/X11
5608
5609 /usr/include
5610 /usr/local/include
5611 /usr/unsupported/include
5612 /usr/athena/include
5613 /usr/local/x11r5/include
5614 /usr/lpp/Xamples/include
5615
5616 /usr/openwin/include
5617 /usr/openwin/share/include'
5618
5619 if test "$ac_x_includes" = no; then
5620   # Guess where to find include files, by looking for Intrinsic.h.
5621   # First, try using that file with no special directory specified.
5622   cat >conftest.$ac_ext <<_ACEOF
5623 /* confdefs.h.  */
5624 _ACEOF
5625 cat confdefs.h >>conftest.$ac_ext
5626 cat >>conftest.$ac_ext <<_ACEOF
5627 /* end confdefs.h.  */
5628 #include <X11/Intrinsic.h>
5629 _ACEOF
5630 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5631   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5632   ac_status=$?
5633   grep -v '^ *+' conftest.er1 >conftest.err
5634   rm -f conftest.er1
5635   cat conftest.err >&5
5636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5637   (exit $ac_status); } >/dev/null; then
5638   if test -s conftest.err; then
5639     ac_cpp_err=$ac_c_preproc_warn_flag
5640     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5641   else
5642     ac_cpp_err=
5643   fi
5644 else
5645   ac_cpp_err=yes
5646 fi
5647 if test -z "$ac_cpp_err"; then
5648   # We can compile using X headers with no special include directory.
5649 ac_x_includes=
5650 else
5651   echo "$as_me: failed program was:" >&5
5652 sed 's/^/| /' conftest.$ac_ext >&5
5653
5654   for ac_dir in $ac_x_header_dirs; do
5655   if test -r "$ac_dir/X11/Intrinsic.h"; then
5656     ac_x_includes=$ac_dir
5657     break
5658   fi
5659 done
5660 fi
5661 rm -f conftest.err conftest.$ac_ext
5662 fi # $ac_x_includes = no
5663
5664 if test "$ac_x_libraries" = no; then
5665   # Check for the libraries.
5666   # See if we find them without any special options.
5667   # Don't add to $LIBS permanently.
5668   ac_save_LIBS=$LIBS
5669   LIBS="-lXt $LIBS"
5670   cat >conftest.$ac_ext <<_ACEOF
5671 /* confdefs.h.  */
5672 _ACEOF
5673 cat confdefs.h >>conftest.$ac_ext
5674 cat >>conftest.$ac_ext <<_ACEOF
5675 /* end confdefs.h.  */
5676 #include <X11/Intrinsic.h>
5677 int
5678 main ()
5679 {
5680 XtMalloc (0)
5681   ;
5682   return 0;
5683 }
5684 _ACEOF
5685 rm -f conftest.$ac_objext conftest$ac_exeext
5686 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5687   (eval $ac_link) 2>conftest.er1
5688   ac_status=$?
5689   grep -v '^ *+' conftest.er1 >conftest.err
5690   rm -f conftest.er1
5691   cat conftest.err >&5
5692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5693   (exit $ac_status); } &&
5694          { ac_try='test -z "$ac_c_werror_flag"
5695                          || test ! -s conftest.err'
5696   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5697   (eval $ac_try) 2>&5
5698   ac_status=$?
5699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5700   (exit $ac_status); }; } &&
5701          { ac_try='test -s conftest$ac_exeext'
5702   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5703   (eval $ac_try) 2>&5
5704   ac_status=$?
5705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5706   (exit $ac_status); }; }; then
5707   LIBS=$ac_save_LIBS
5708 # We can link X programs with no special library path.
5709 ac_x_libraries=
5710 else
5711   echo "$as_me: failed program was:" >&5
5712 sed 's/^/| /' conftest.$ac_ext >&5
5713
5714 LIBS=$ac_save_LIBS
5715 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5716 do
5717   # Don't even attempt the hair of trying to link an X program!
5718   for ac_extension in a so sl; do
5719     if test -r $ac_dir/libXt.$ac_extension; then
5720       ac_x_libraries=$ac_dir
5721       break 2
5722     fi
5723   done
5724 done
5725 fi
5726 rm -f conftest.err conftest.$ac_objext \
5727       conftest$ac_exeext conftest.$ac_ext
5728 fi # $ac_x_libraries = no
5729
5730 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
5731   # Didn't find X anywhere.  Cache the known absence of X.
5732   ac_cv_have_x="have_x=no"
5733 else
5734   # Record where we found X for the cache.
5735   ac_cv_have_x="have_x=yes \
5736                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5737 fi
5738 fi
5739
5740   fi
5741   eval "$ac_cv_have_x"
5742 fi # $with_x != no
5743
5744 if test "$have_x" != yes; then
5745   echo "$as_me:$LINENO: result: $have_x" >&5
5746 echo "${ECHO_T}$have_x" >&6
5747   no_x=yes
5748 else
5749   # If each of the values was on the command line, it overrides each guess.
5750   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5751   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5752   # Update the cache value to reflect the command line values.
5753   ac_cv_have_x="have_x=yes \
5754                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5755   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
5756 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5757 fi
5758
5759 if test "$no_x" = yes; then
5760   # Not all programs may use this symbol, but it does not hurt to define it.
5761
5762 cat >>confdefs.h <<\_ACEOF
5763 #define X_DISPLAY_MISSING 1
5764 _ACEOF
5765
5766   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5767 else
5768   if test -n "$x_includes"; then
5769     X_CFLAGS="$X_CFLAGS -I$x_includes"
5770   fi
5771
5772   # It would also be nice to do this for all -L options, not just this one.
5773   if test -n "$x_libraries"; then
5774     X_LIBS="$X_LIBS -L$x_libraries"
5775     # For Solaris; some versions of Sun CC require a space after -R and
5776     # others require no space.  Words are not sufficient . . . .
5777     case `(uname -sr) 2>/dev/null` in
5778     "SunOS 5"*)
5779       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
5780 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
5781       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
5782       cat >conftest.$ac_ext <<_ACEOF
5783 /* confdefs.h.  */
5784 _ACEOF
5785 cat confdefs.h >>conftest.$ac_ext
5786 cat >>conftest.$ac_ext <<_ACEOF
5787 /* end confdefs.h.  */
5788
5789 int
5790 main ()
5791 {
5792
5793   ;
5794   return 0;
5795 }
5796 _ACEOF
5797 rm -f conftest.$ac_objext conftest$ac_exeext
5798 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5799   (eval $ac_link) 2>conftest.er1
5800   ac_status=$?
5801   grep -v '^ *+' conftest.er1 >conftest.err
5802   rm -f conftest.er1
5803   cat conftest.err >&5
5804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5805   (exit $ac_status); } &&
5806          { ac_try='test -z "$ac_c_werror_flag"
5807                          || test ! -s conftest.err'
5808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5809   (eval $ac_try) 2>&5
5810   ac_status=$?
5811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5812   (exit $ac_status); }; } &&
5813          { ac_try='test -s conftest$ac_exeext'
5814   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5815   (eval $ac_try) 2>&5
5816   ac_status=$?
5817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818   (exit $ac_status); }; }; then
5819   ac_R_nospace=yes
5820 else
5821   echo "$as_me: failed program was:" >&5
5822 sed 's/^/| /' conftest.$ac_ext >&5
5823
5824 ac_R_nospace=no
5825 fi
5826 rm -f conftest.err conftest.$ac_objext \
5827       conftest$ac_exeext conftest.$ac_ext
5828       if test $ac_R_nospace = yes; then
5829         echo "$as_me:$LINENO: result: no" >&5
5830 echo "${ECHO_T}no" >&6
5831         X_LIBS="$X_LIBS -R$x_libraries"
5832       else
5833         LIBS="$ac_xsave_LIBS -R $x_libraries"
5834         cat >conftest.$ac_ext <<_ACEOF
5835 /* confdefs.h.  */
5836 _ACEOF
5837 cat confdefs.h >>conftest.$ac_ext
5838 cat >>conftest.$ac_ext <<_ACEOF
5839 /* end confdefs.h.  */
5840
5841 int
5842 main ()
5843 {
5844
5845   ;
5846   return 0;
5847 }
5848 _ACEOF
5849 rm -f conftest.$ac_objext conftest$ac_exeext
5850 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5851   (eval $ac_link) 2>conftest.er1
5852   ac_status=$?
5853   grep -v '^ *+' conftest.er1 >conftest.err
5854   rm -f conftest.er1
5855   cat conftest.err >&5
5856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5857   (exit $ac_status); } &&
5858          { ac_try='test -z "$ac_c_werror_flag"
5859                          || test ! -s conftest.err'
5860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5861   (eval $ac_try) 2>&5
5862   ac_status=$?
5863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5864   (exit $ac_status); }; } &&
5865          { ac_try='test -s conftest$ac_exeext'
5866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5867   (eval $ac_try) 2>&5
5868   ac_status=$?
5869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5870   (exit $ac_status); }; }; then
5871   ac_R_space=yes
5872 else
5873   echo "$as_me: failed program was:" >&5
5874 sed 's/^/| /' conftest.$ac_ext >&5
5875
5876 ac_R_space=no
5877 fi
5878 rm -f conftest.err conftest.$ac_objext \
5879       conftest$ac_exeext conftest.$ac_ext
5880         if test $ac_R_space = yes; then
5881           echo "$as_me:$LINENO: result: yes" >&5
5882 echo "${ECHO_T}yes" >&6
5883           X_LIBS="$X_LIBS -R $x_libraries"
5884         else
5885           echo "$as_me:$LINENO: result: neither works" >&5
5886 echo "${ECHO_T}neither works" >&6
5887         fi
5888       fi
5889       LIBS=$ac_xsave_LIBS
5890     esac
5891   fi
5892
5893   # Check for system-dependent libraries X programs must link with.
5894   # Do this before checking for the system-independent R6 libraries
5895   # (-lICE), since we may need -lsocket or whatever for X linking.
5896
5897   if test "$ISC" = yes; then
5898     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5899   else
5900     # Martyn Johnson says this is needed for Ultrix, if the X
5901     # libraries were built with DECnet support.  And Karl Berry says
5902     # the Alpha needs dnet_stub (dnet does not exist).
5903     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5904     cat >conftest.$ac_ext <<_ACEOF
5905 /* confdefs.h.  */
5906 _ACEOF
5907 cat confdefs.h >>conftest.$ac_ext
5908 cat >>conftest.$ac_ext <<_ACEOF
5909 /* end confdefs.h.  */
5910
5911 /* Override any gcc2 internal prototype to avoid an error.  */
5912 #ifdef __cplusplus
5913 extern "C"
5914 #endif
5915 /* We use char because int might match the return type of a gcc2
5916    builtin and then its argument prototype would still apply.  */
5917 char XOpenDisplay ();
5918 int
5919 main ()
5920 {
5921 XOpenDisplay ();
5922   ;
5923   return 0;
5924 }
5925 _ACEOF
5926 rm -f conftest.$ac_objext conftest$ac_exeext
5927 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5928   (eval $ac_link) 2>conftest.er1
5929   ac_status=$?
5930   grep -v '^ *+' conftest.er1 >conftest.err
5931   rm -f conftest.er1
5932   cat conftest.err >&5
5933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5934   (exit $ac_status); } &&
5935          { ac_try='test -z "$ac_c_werror_flag"
5936                          || test ! -s conftest.err'
5937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5938   (eval $ac_try) 2>&5
5939   ac_status=$?
5940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5941   (exit $ac_status); }; } &&
5942          { ac_try='test -s conftest$ac_exeext'
5943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5944   (eval $ac_try) 2>&5
5945   ac_status=$?
5946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5947   (exit $ac_status); }; }; then
5948   :
5949 else
5950   echo "$as_me: failed program was:" >&5
5951 sed 's/^/| /' conftest.$ac_ext >&5
5952
5953 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5954 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5955 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5956   echo $ECHO_N "(cached) $ECHO_C" >&6
5957 else
5958   ac_check_lib_save_LIBS=$LIBS
5959 LIBS="-ldnet  $LIBS"
5960 cat >conftest.$ac_ext <<_ACEOF
5961 /* confdefs.h.  */
5962 _ACEOF
5963 cat confdefs.h >>conftest.$ac_ext
5964 cat >>conftest.$ac_ext <<_ACEOF
5965 /* end confdefs.h.  */
5966
5967 /* Override any gcc2 internal prototype to avoid an error.  */
5968 #ifdef __cplusplus
5969 extern "C"
5970 #endif
5971 /* We use char because int might match the return type of a gcc2
5972    builtin and then its argument prototype would still apply.  */
5973 char dnet_ntoa ();
5974 int
5975 main ()
5976 {
5977 dnet_ntoa ();
5978   ;
5979   return 0;
5980 }
5981 _ACEOF
5982 rm -f conftest.$ac_objext conftest$ac_exeext
5983 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5984   (eval $ac_link) 2>conftest.er1
5985   ac_status=$?
5986   grep -v '^ *+' conftest.er1 >conftest.err
5987   rm -f conftest.er1
5988   cat conftest.err >&5
5989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5990   (exit $ac_status); } &&
5991          { ac_try='test -z "$ac_c_werror_flag"
5992                          || test ! -s conftest.err'
5993   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5994   (eval $ac_try) 2>&5
5995   ac_status=$?
5996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5997   (exit $ac_status); }; } &&
5998          { ac_try='test -s conftest$ac_exeext'
5999   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6000   (eval $ac_try) 2>&5
6001   ac_status=$?
6002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6003   (exit $ac_status); }; }; then
6004   ac_cv_lib_dnet_dnet_ntoa=yes
6005 else
6006   echo "$as_me: failed program was:" >&5
6007 sed 's/^/| /' conftest.$ac_ext >&5
6008
6009 ac_cv_lib_dnet_dnet_ntoa=no
6010 fi
6011 rm -f conftest.err conftest.$ac_objext \
6012       conftest$ac_exeext conftest.$ac_ext
6013 LIBS=$ac_check_lib_save_LIBS
6014 fi
6015 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6016 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
6017 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6018   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6019 fi
6020
6021     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6022       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6023 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
6024 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6025   echo $ECHO_N "(cached) $ECHO_C" >&6
6026 else
6027   ac_check_lib_save_LIBS=$LIBS
6028 LIBS="-ldnet_stub  $LIBS"
6029 cat >conftest.$ac_ext <<_ACEOF
6030 /* confdefs.h.  */
6031 _ACEOF
6032 cat confdefs.h >>conftest.$ac_ext
6033 cat >>conftest.$ac_ext <<_ACEOF
6034 /* end confdefs.h.  */
6035
6036 /* Override any gcc2 internal prototype to avoid an error.  */
6037 #ifdef __cplusplus
6038 extern "C"
6039 #endif
6040 /* We use char because int might match the return type of a gcc2
6041    builtin and then its argument prototype would still apply.  */
6042 char dnet_ntoa ();
6043 int
6044 main ()
6045 {
6046 dnet_ntoa ();
6047   ;
6048   return 0;
6049 }
6050 _ACEOF
6051 rm -f conftest.$ac_objext conftest$ac_exeext
6052 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6053   (eval $ac_link) 2>conftest.er1
6054   ac_status=$?
6055   grep -v '^ *+' conftest.er1 >conftest.err
6056   rm -f conftest.er1
6057   cat conftest.err >&5
6058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6059   (exit $ac_status); } &&
6060          { ac_try='test -z "$ac_c_werror_flag"
6061                          || test ! -s conftest.err'
6062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6063   (eval $ac_try) 2>&5
6064   ac_status=$?
6065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6066   (exit $ac_status); }; } &&
6067          { ac_try='test -s conftest$ac_exeext'
6068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6069   (eval $ac_try) 2>&5
6070   ac_status=$?
6071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6072   (exit $ac_status); }; }; then
6073   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6074 else
6075   echo "$as_me: failed program was:" >&5
6076 sed 's/^/| /' conftest.$ac_ext >&5
6077
6078 ac_cv_lib_dnet_stub_dnet_ntoa=no
6079 fi
6080 rm -f conftest.err conftest.$ac_objext \
6081       conftest$ac_exeext conftest.$ac_ext
6082 LIBS=$ac_check_lib_save_LIBS
6083 fi
6084 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6085 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
6086 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
6087   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6088 fi
6089
6090     fi
6091 fi
6092 rm -f conftest.err conftest.$ac_objext \
6093       conftest$ac_exeext conftest.$ac_ext
6094     LIBS="$ac_xsave_LIBS"
6095
6096     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6097     # to get the SysV transport functions.
6098     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6099     # needs -lnsl.
6100     # The nsl library prevents programs from opening the X display
6101     # on Irix 5.2, according to T.E. Dickey.
6102     # The functions gethostbyname, getservbyname, and inet_addr are
6103     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6104     echo "$as_me:$LINENO: checking for gethostbyname" >&5
6105 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
6106 if test "${ac_cv_func_gethostbyname+set}" = set; then
6107   echo $ECHO_N "(cached) $ECHO_C" >&6
6108 else
6109   cat >conftest.$ac_ext <<_ACEOF
6110 /* confdefs.h.  */
6111 _ACEOF
6112 cat confdefs.h >>conftest.$ac_ext
6113 cat >>conftest.$ac_ext <<_ACEOF
6114 /* end confdefs.h.  */
6115 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6116    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6117 #define gethostbyname innocuous_gethostbyname
6118
6119 /* System header to define __stub macros and hopefully few prototypes,
6120     which can conflict with char gethostbyname (); below.
6121     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6122     <limits.h> exists even on freestanding compilers.  */
6123
6124 #ifdef __STDC__
6125 # include <limits.h>
6126 #else
6127 # include <assert.h>
6128 #endif
6129
6130 #undef gethostbyname
6131
6132 /* Override any gcc2 internal prototype to avoid an error.  */
6133 #ifdef __cplusplus
6134 extern "C"
6135 {
6136 #endif
6137 /* We use char because int might match the return type of a gcc2
6138    builtin and then its argument prototype would still apply.  */
6139 char gethostbyname ();
6140 /* The GNU C library defines this for functions which it implements
6141     to always fail with ENOSYS.  Some functions are actually named
6142     something starting with __ and the normal name is an alias.  */
6143 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6144 choke me
6145 #else
6146 char (*f) () = gethostbyname;
6147 #endif
6148 #ifdef __cplusplus
6149 }
6150 #endif
6151
6152 int
6153 main ()
6154 {
6155 return f != gethostbyname;
6156   ;
6157   return 0;
6158 }
6159 _ACEOF
6160 rm -f conftest.$ac_objext conftest$ac_exeext
6161 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6162   (eval $ac_link) 2>conftest.er1
6163   ac_status=$?
6164   grep -v '^ *+' conftest.er1 >conftest.err
6165   rm -f conftest.er1
6166   cat conftest.err >&5
6167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6168   (exit $ac_status); } &&
6169          { ac_try='test -z "$ac_c_werror_flag"
6170                          || test ! -s conftest.err'
6171   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6172   (eval $ac_try) 2>&5
6173   ac_status=$?
6174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6175   (exit $ac_status); }; } &&
6176          { ac_try='test -s conftest$ac_exeext'
6177   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6178   (eval $ac_try) 2>&5
6179   ac_status=$?
6180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6181   (exit $ac_status); }; }; then
6182   ac_cv_func_gethostbyname=yes
6183 else
6184   echo "$as_me: failed program was:" >&5
6185 sed 's/^/| /' conftest.$ac_ext >&5
6186
6187 ac_cv_func_gethostbyname=no
6188 fi
6189 rm -f conftest.err conftest.$ac_objext \
6190       conftest$ac_exeext conftest.$ac_ext
6191 fi
6192 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6193 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
6194
6195     if test $ac_cv_func_gethostbyname = no; then
6196       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6197 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
6198 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6199   echo $ECHO_N "(cached) $ECHO_C" >&6
6200 else
6201   ac_check_lib_save_LIBS=$LIBS
6202 LIBS="-lnsl  $LIBS"
6203 cat >conftest.$ac_ext <<_ACEOF
6204 /* confdefs.h.  */
6205 _ACEOF
6206 cat confdefs.h >>conftest.$ac_ext
6207 cat >>conftest.$ac_ext <<_ACEOF
6208 /* end confdefs.h.  */
6209
6210 /* Override any gcc2 internal prototype to avoid an error.  */
6211 #ifdef __cplusplus
6212 extern "C"
6213 #endif
6214 /* We use char because int might match the return type of a gcc2
6215    builtin and then its argument prototype would still apply.  */
6216 char gethostbyname ();
6217 int
6218 main ()
6219 {
6220 gethostbyname ();
6221   ;
6222   return 0;
6223 }
6224 _ACEOF
6225 rm -f conftest.$ac_objext conftest$ac_exeext
6226 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6227   (eval $ac_link) 2>conftest.er1
6228   ac_status=$?
6229   grep -v '^ *+' conftest.er1 >conftest.err
6230   rm -f conftest.er1
6231   cat conftest.err >&5
6232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6233   (exit $ac_status); } &&
6234          { ac_try='test -z "$ac_c_werror_flag"
6235                          || test ! -s conftest.err'
6236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6237   (eval $ac_try) 2>&5
6238   ac_status=$?
6239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6240   (exit $ac_status); }; } &&
6241          { ac_try='test -s conftest$ac_exeext'
6242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6243   (eval $ac_try) 2>&5
6244   ac_status=$?
6245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6246   (exit $ac_status); }; }; then
6247   ac_cv_lib_nsl_gethostbyname=yes
6248 else
6249   echo "$as_me: failed program was:" >&5
6250 sed 's/^/| /' conftest.$ac_ext >&5
6251
6252 ac_cv_lib_nsl_gethostbyname=no
6253 fi
6254 rm -f conftest.err conftest.$ac_objext \
6255       conftest$ac_exeext conftest.$ac_ext
6256 LIBS=$ac_check_lib_save_LIBS
6257 fi
6258 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6259 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
6260 if test $ac_cv_lib_nsl_gethostbyname = yes; then
6261   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6262 fi
6263
6264       if test $ac_cv_lib_nsl_gethostbyname = no; then
6265         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
6266 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
6267 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6268   echo $ECHO_N "(cached) $ECHO_C" >&6
6269 else
6270   ac_check_lib_save_LIBS=$LIBS
6271 LIBS="-lbsd  $LIBS"
6272 cat >conftest.$ac_ext <<_ACEOF
6273 /* confdefs.h.  */
6274 _ACEOF
6275 cat confdefs.h >>conftest.$ac_ext
6276 cat >>conftest.$ac_ext <<_ACEOF
6277 /* end confdefs.h.  */
6278
6279 /* Override any gcc2 internal prototype to avoid an error.  */
6280 #ifdef __cplusplus
6281 extern "C"
6282 #endif
6283 /* We use char because int might match the return type of a gcc2
6284    builtin and then its argument prototype would still apply.  */
6285 char gethostbyname ();
6286 int
6287 main ()
6288 {
6289 gethostbyname ();
6290   ;
6291   return 0;
6292 }
6293 _ACEOF
6294 rm -f conftest.$ac_objext conftest$ac_exeext
6295 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6296   (eval $ac_link) 2>conftest.er1
6297   ac_status=$?
6298   grep -v '^ *+' conftest.er1 >conftest.err
6299   rm -f conftest.er1
6300   cat conftest.err >&5
6301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6302   (exit $ac_status); } &&
6303          { ac_try='test -z "$ac_c_werror_flag"
6304                          || test ! -s conftest.err'
6305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6306   (eval $ac_try) 2>&5
6307   ac_status=$?
6308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6309   (exit $ac_status); }; } &&
6310          { ac_try='test -s conftest$ac_exeext'
6311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6312   (eval $ac_try) 2>&5
6313   ac_status=$?
6314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6315   (exit $ac_status); }; }; then
6316   ac_cv_lib_bsd_gethostbyname=yes
6317 else
6318   echo "$as_me: failed program was:" >&5
6319 sed 's/^/| /' conftest.$ac_ext >&5
6320
6321 ac_cv_lib_bsd_gethostbyname=no
6322 fi
6323 rm -f conftest.err conftest.$ac_objext \
6324       conftest$ac_exeext conftest.$ac_ext
6325 LIBS=$ac_check_lib_save_LIBS
6326 fi
6327 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6328 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
6329 if test $ac_cv_lib_bsd_gethostbyname = yes; then
6330   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6331 fi
6332
6333       fi
6334     fi
6335
6336     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6337     # socket/setsockopt and other routines are undefined under SCO ODT
6338     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6339     # on later versions), says Simon Leinen: it contains gethostby*
6340     # variants that don't use the name server (or something).  -lsocket
6341     # must be given before -lnsl if both are needed.  We assume that
6342     # if connect needs -lnsl, so does gethostbyname.
6343     echo "$as_me:$LINENO: checking for connect" >&5
6344 echo $ECHO_N "checking for connect... $ECHO_C" >&6
6345 if test "${ac_cv_func_connect+set}" = set; then
6346   echo $ECHO_N "(cached) $ECHO_C" >&6
6347 else
6348   cat >conftest.$ac_ext <<_ACEOF
6349 /* confdefs.h.  */
6350 _ACEOF
6351 cat confdefs.h >>conftest.$ac_ext
6352 cat >>conftest.$ac_ext <<_ACEOF
6353 /* end confdefs.h.  */
6354 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
6355    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6356 #define connect innocuous_connect
6357
6358 /* System header to define __stub macros and hopefully few prototypes,
6359     which can conflict with char connect (); below.
6360     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6361     <limits.h> exists even on freestanding compilers.  */
6362
6363 #ifdef __STDC__
6364 # include <limits.h>
6365 #else
6366 # include <assert.h>
6367 #endif
6368
6369 #undef connect
6370
6371 /* Override any gcc2 internal prototype to avoid an error.  */
6372 #ifdef __cplusplus
6373 extern "C"
6374 {
6375 #endif
6376 /* We use char because int might match the return type of a gcc2
6377    builtin and then its argument prototype would still apply.  */
6378 char connect ();
6379 /* The GNU C library defines this for functions which it implements
6380     to always fail with ENOSYS.  Some functions are actually named
6381     something starting with __ and the normal name is an alias.  */
6382 #if defined (__stub_connect) || defined (__stub___connect)
6383 choke me
6384 #else
6385 char (*f) () = connect;
6386 #endif
6387 #ifdef __cplusplus
6388 }
6389 #endif
6390
6391 int
6392 main ()
6393 {
6394 return f != connect;
6395   ;
6396   return 0;
6397 }
6398 _ACEOF
6399 rm -f conftest.$ac_objext conftest$ac_exeext
6400 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6401   (eval $ac_link) 2>conftest.er1
6402   ac_status=$?
6403   grep -v '^ *+' conftest.er1 >conftest.err
6404   rm -f conftest.er1
6405   cat conftest.err >&5
6406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6407   (exit $ac_status); } &&
6408          { ac_try='test -z "$ac_c_werror_flag"
6409                          || test ! -s conftest.err'
6410   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6411   (eval $ac_try) 2>&5
6412   ac_status=$?
6413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6414   (exit $ac_status); }; } &&
6415          { ac_try='test -s conftest$ac_exeext'
6416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6417   (eval $ac_try) 2>&5
6418   ac_status=$?
6419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6420   (exit $ac_status); }; }; then
6421   ac_cv_func_connect=yes
6422 else
6423   echo "$as_me: failed program was:" >&5
6424 sed 's/^/| /' conftest.$ac_ext >&5
6425
6426 ac_cv_func_connect=no
6427 fi
6428 rm -f conftest.err conftest.$ac_objext \
6429       conftest$ac_exeext conftest.$ac_ext
6430 fi
6431 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
6432 echo "${ECHO_T}$ac_cv_func_connect" >&6
6433
6434     if test $ac_cv_func_connect = no; then
6435       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
6436 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
6437 if test "${ac_cv_lib_socket_connect+set}" = set; then
6438   echo $ECHO_N "(cached) $ECHO_C" >&6
6439 else
6440   ac_check_lib_save_LIBS=$LIBS
6441 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6442 cat >conftest.$ac_ext <<_ACEOF
6443 /* confdefs.h.  */
6444 _ACEOF
6445 cat confdefs.h >>conftest.$ac_ext
6446 cat >>conftest.$ac_ext <<_ACEOF
6447 /* end confdefs.h.  */
6448
6449 /* Override any gcc2 internal prototype to avoid an error.  */
6450 #ifdef __cplusplus
6451 extern "C"
6452 #endif
6453 /* We use char because int might match the return type of a gcc2
6454    builtin and then its argument prototype would still apply.  */
6455 char connect ();
6456 int
6457 main ()
6458 {
6459 connect ();
6460   ;
6461   return 0;
6462 }
6463 _ACEOF
6464 rm -f conftest.$ac_objext conftest$ac_exeext
6465 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6466   (eval $ac_link) 2>conftest.er1
6467   ac_status=$?
6468   grep -v '^ *+' conftest.er1 >conftest.err
6469   rm -f conftest.er1
6470   cat conftest.err >&5
6471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6472   (exit $ac_status); } &&
6473          { ac_try='test -z "$ac_c_werror_flag"
6474                          || test ! -s conftest.err'
6475   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6476   (eval $ac_try) 2>&5
6477   ac_status=$?
6478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6479   (exit $ac_status); }; } &&
6480          { ac_try='test -s conftest$ac_exeext'
6481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6482   (eval $ac_try) 2>&5
6483   ac_status=$?
6484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6485   (exit $ac_status); }; }; then
6486   ac_cv_lib_socket_connect=yes
6487 else
6488   echo "$as_me: failed program was:" >&5
6489 sed 's/^/| /' conftest.$ac_ext >&5
6490
6491 ac_cv_lib_socket_connect=no
6492 fi
6493 rm -f conftest.err conftest.$ac_objext \
6494       conftest$ac_exeext conftest.$ac_ext
6495 LIBS=$ac_check_lib_save_LIBS
6496 fi
6497 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
6498 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
6499 if test $ac_cv_lib_socket_connect = yes; then
6500   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6501 fi
6502
6503     fi
6504
6505     # Guillermo Gomez says -lposix is necessary on A/UX.
6506     echo "$as_me:$LINENO: checking for remove" >&5
6507 echo $ECHO_N "checking for remove... $ECHO_C" >&6
6508 if test "${ac_cv_func_remove+set}" = set; then
6509   echo $ECHO_N "(cached) $ECHO_C" >&6
6510 else
6511   cat >conftest.$ac_ext <<_ACEOF
6512 /* confdefs.h.  */
6513 _ACEOF
6514 cat confdefs.h >>conftest.$ac_ext
6515 cat >>conftest.$ac_ext <<_ACEOF
6516 /* end confdefs.h.  */
6517 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
6518    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6519 #define remove innocuous_remove
6520
6521 /* System header to define __stub macros and hopefully few prototypes,
6522     which can conflict with char remove (); below.
6523     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6524     <limits.h> exists even on freestanding compilers.  */
6525
6526 #ifdef __STDC__
6527 # include <limits.h>
6528 #else
6529 # include <assert.h>
6530 #endif
6531
6532 #undef remove
6533
6534 /* Override any gcc2 internal prototype to avoid an error.  */
6535 #ifdef __cplusplus
6536 extern "C"
6537 {
6538 #endif
6539 /* We use char because int might match the return type of a gcc2
6540    builtin and then its argument prototype would still apply.  */
6541 char remove ();
6542 /* The GNU C library defines this for functions which it implements
6543     to always fail with ENOSYS.  Some functions are actually named
6544     something starting with __ and the normal name is an alias.  */
6545 #if defined (__stub_remove) || defined (__stub___remove)
6546 choke me
6547 #else
6548 char (*f) () = remove;
6549 #endif
6550 #ifdef __cplusplus
6551 }
6552 #endif
6553
6554 int
6555 main ()
6556 {
6557 return f != remove;
6558   ;
6559   return 0;
6560 }
6561 _ACEOF
6562 rm -f conftest.$ac_objext conftest$ac_exeext
6563 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6564   (eval $ac_link) 2>conftest.er1
6565   ac_status=$?
6566   grep -v '^ *+' conftest.er1 >conftest.err
6567   rm -f conftest.er1
6568   cat conftest.err >&5
6569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6570   (exit $ac_status); } &&
6571          { ac_try='test -z "$ac_c_werror_flag"
6572                          || test ! -s conftest.err'
6573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6574   (eval $ac_try) 2>&5
6575   ac_status=$?
6576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6577   (exit $ac_status); }; } &&
6578          { ac_try='test -s conftest$ac_exeext'
6579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6580   (eval $ac_try) 2>&5
6581   ac_status=$?
6582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6583   (exit $ac_status); }; }; then
6584   ac_cv_func_remove=yes
6585 else
6586   echo "$as_me: failed program was:" >&5
6587 sed 's/^/| /' conftest.$ac_ext >&5
6588
6589 ac_cv_func_remove=no
6590 fi
6591 rm -f conftest.err conftest.$ac_objext \
6592       conftest$ac_exeext conftest.$ac_ext
6593 fi
6594 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
6595 echo "${ECHO_T}$ac_cv_func_remove" >&6
6596
6597     if test $ac_cv_func_remove = no; then
6598       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
6599 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
6600 if test "${ac_cv_lib_posix_remove+set}" = set; then
6601   echo $ECHO_N "(cached) $ECHO_C" >&6
6602 else
6603   ac_check_lib_save_LIBS=$LIBS
6604 LIBS="-lposix  $LIBS"
6605 cat >conftest.$ac_ext <<_ACEOF
6606 /* confdefs.h.  */
6607 _ACEOF
6608 cat confdefs.h >>conftest.$ac_ext
6609 cat >>conftest.$ac_ext <<_ACEOF
6610 /* end confdefs.h.  */
6611
6612 /* Override any gcc2 internal prototype to avoid an error.  */
6613 #ifdef __cplusplus
6614 extern "C"
6615 #endif
6616 /* We use char because int might match the return type of a gcc2
6617    builtin and then its argument prototype would still apply.  */
6618 char remove ();
6619 int
6620 main ()
6621 {
6622 remove ();
6623   ;
6624   return 0;
6625 }
6626 _ACEOF
6627 rm -f conftest.$ac_objext conftest$ac_exeext
6628 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6629   (eval $ac_link) 2>conftest.er1
6630   ac_status=$?
6631   grep -v '^ *+' conftest.er1 >conftest.err
6632   rm -f conftest.er1
6633   cat conftest.err >&5
6634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6635   (exit $ac_status); } &&
6636          { ac_try='test -z "$ac_c_werror_flag"
6637                          || test ! -s conftest.err'
6638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6639   (eval $ac_try) 2>&5
6640   ac_status=$?
6641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6642   (exit $ac_status); }; } &&
6643          { ac_try='test -s conftest$ac_exeext'
6644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6645   (eval $ac_try) 2>&5
6646   ac_status=$?
6647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6648   (exit $ac_status); }; }; then
6649   ac_cv_lib_posix_remove=yes
6650 else
6651   echo "$as_me: failed program was:" >&5
6652 sed 's/^/| /' conftest.$ac_ext >&5
6653
6654 ac_cv_lib_posix_remove=no
6655 fi
6656 rm -f conftest.err conftest.$ac_objext \
6657       conftest$ac_exeext conftest.$ac_ext
6658 LIBS=$ac_check_lib_save_LIBS
6659 fi
6660 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
6661 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
6662 if test $ac_cv_lib_posix_remove = yes; then
6663   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6664 fi
6665
6666     fi
6667
6668     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6669     echo "$as_me:$LINENO: checking for shmat" >&5
6670 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
6671 if test "${ac_cv_func_shmat+set}" = set; then
6672   echo $ECHO_N "(cached) $ECHO_C" >&6
6673 else
6674   cat >conftest.$ac_ext <<_ACEOF
6675 /* confdefs.h.  */
6676 _ACEOF
6677 cat confdefs.h >>conftest.$ac_ext
6678 cat >>conftest.$ac_ext <<_ACEOF
6679 /* end confdefs.h.  */
6680 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
6681    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6682 #define shmat innocuous_shmat
6683
6684 /* System header to define __stub macros and hopefully few prototypes,
6685     which can conflict with char shmat (); below.
6686     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6687     <limits.h> exists even on freestanding compilers.  */
6688
6689 #ifdef __STDC__
6690 # include <limits.h>
6691 #else
6692 # include <assert.h>
6693 #endif
6694
6695 #undef shmat
6696
6697 /* Override any gcc2 internal prototype to avoid an error.  */
6698 #ifdef __cplusplus
6699 extern "C"
6700 {
6701 #endif
6702 /* We use char because int might match the return type of a gcc2
6703    builtin and then its argument prototype would still apply.  */
6704 char shmat ();
6705 /* The GNU C library defines this for functions which it implements
6706     to always fail with ENOSYS.  Some functions are actually named
6707     something starting with __ and the normal name is an alias.  */
6708 #if defined (__stub_shmat) || defined (__stub___shmat)
6709 choke me
6710 #else
6711 char (*f) () = shmat;
6712 #endif
6713 #ifdef __cplusplus
6714 }
6715 #endif
6716
6717 int
6718 main ()
6719 {
6720 return f != shmat;
6721   ;
6722   return 0;
6723 }
6724 _ACEOF
6725 rm -f conftest.$ac_objext conftest$ac_exeext
6726 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6727   (eval $ac_link) 2>conftest.er1
6728   ac_status=$?
6729   grep -v '^ *+' conftest.er1 >conftest.err
6730   rm -f conftest.er1
6731   cat conftest.err >&5
6732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6733   (exit $ac_status); } &&
6734          { ac_try='test -z "$ac_c_werror_flag"
6735                          || test ! -s conftest.err'
6736   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6737   (eval $ac_try) 2>&5
6738   ac_status=$?
6739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6740   (exit $ac_status); }; } &&
6741          { ac_try='test -s conftest$ac_exeext'
6742   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6743   (eval $ac_try) 2>&5
6744   ac_status=$?
6745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6746   (exit $ac_status); }; }; then
6747   ac_cv_func_shmat=yes
6748 else
6749   echo "$as_me: failed program was:" >&5
6750 sed 's/^/| /' conftest.$ac_ext >&5
6751
6752 ac_cv_func_shmat=no
6753 fi
6754 rm -f conftest.err conftest.$ac_objext \
6755       conftest$ac_exeext conftest.$ac_ext
6756 fi
6757 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
6758 echo "${ECHO_T}$ac_cv_func_shmat" >&6
6759
6760     if test $ac_cv_func_shmat = no; then
6761       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
6762 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
6763 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
6764   echo $ECHO_N "(cached) $ECHO_C" >&6
6765 else
6766   ac_check_lib_save_LIBS=$LIBS
6767 LIBS="-lipc  $LIBS"
6768 cat >conftest.$ac_ext <<_ACEOF
6769 /* confdefs.h.  */
6770 _ACEOF
6771 cat confdefs.h >>conftest.$ac_ext
6772 cat >>conftest.$ac_ext <<_ACEOF
6773 /* end confdefs.h.  */
6774
6775 /* Override any gcc2 internal prototype to avoid an error.  */
6776 #ifdef __cplusplus
6777 extern "C"
6778 #endif
6779 /* We use char because int might match the return type of a gcc2
6780    builtin and then its argument prototype would still apply.  */
6781 char shmat ();
6782 int
6783 main ()
6784 {
6785 shmat ();
6786   ;
6787   return 0;
6788 }
6789 _ACEOF
6790 rm -f conftest.$ac_objext conftest$ac_exeext
6791 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6792   (eval $ac_link) 2>conftest.er1
6793   ac_status=$?
6794   grep -v '^ *+' conftest.er1 >conftest.err
6795   rm -f conftest.er1
6796   cat conftest.err >&5
6797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6798   (exit $ac_status); } &&
6799          { ac_try='test -z "$ac_c_werror_flag"
6800                          || test ! -s conftest.err'
6801   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6802   (eval $ac_try) 2>&5
6803   ac_status=$?
6804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6805   (exit $ac_status); }; } &&
6806          { ac_try='test -s conftest$ac_exeext'
6807   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6808   (eval $ac_try) 2>&5
6809   ac_status=$?
6810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6811   (exit $ac_status); }; }; then
6812   ac_cv_lib_ipc_shmat=yes
6813 else
6814   echo "$as_me: failed program was:" >&5
6815 sed 's/^/| /' conftest.$ac_ext >&5
6816
6817 ac_cv_lib_ipc_shmat=no
6818 fi
6819 rm -f conftest.err conftest.$ac_objext \
6820       conftest$ac_exeext conftest.$ac_ext
6821 LIBS=$ac_check_lib_save_LIBS
6822 fi
6823 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
6824 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
6825 if test $ac_cv_lib_ipc_shmat = yes; then
6826   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6827 fi
6828
6829     fi
6830   fi
6831
6832   # Check for libraries that X11R6 Xt/Xaw programs need.
6833   ac_save_LDFLAGS=$LDFLAGS
6834   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6835   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6836   # check for ICE first), but we must link in the order -lSM -lICE or
6837   # we get undefined symbols.  So assume we have SM if we have ICE.
6838   # These have to be linked with before -lX11, unlike the other
6839   # libraries we check for below, so use a different variable.
6840   # John Interrante, Karl Berry
6841   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
6842 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
6843 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
6844   echo $ECHO_N "(cached) $ECHO_C" >&6
6845 else
6846   ac_check_lib_save_LIBS=$LIBS
6847 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6848 cat >conftest.$ac_ext <<_ACEOF
6849 /* confdefs.h.  */
6850 _ACEOF
6851 cat confdefs.h >>conftest.$ac_ext
6852 cat >>conftest.$ac_ext <<_ACEOF
6853 /* end confdefs.h.  */
6854
6855 /* Override any gcc2 internal prototype to avoid an error.  */
6856 #ifdef __cplusplus
6857 extern "C"
6858 #endif
6859 /* We use char because int might match the return type of a gcc2
6860    builtin and then its argument prototype would still apply.  */
6861 char IceConnectionNumber ();
6862 int
6863 main ()
6864 {
6865 IceConnectionNumber ();
6866   ;
6867   return 0;
6868 }
6869 _ACEOF
6870 rm -f conftest.$ac_objext conftest$ac_exeext
6871 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6872   (eval $ac_link) 2>conftest.er1
6873   ac_status=$?
6874   grep -v '^ *+' conftest.er1 >conftest.err
6875   rm -f conftest.er1
6876   cat conftest.err >&5
6877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6878   (exit $ac_status); } &&
6879          { ac_try='test -z "$ac_c_werror_flag"
6880                          || test ! -s conftest.err'
6881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6882   (eval $ac_try) 2>&5
6883   ac_status=$?
6884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6885   (exit $ac_status); }; } &&
6886          { ac_try='test -s conftest$ac_exeext'
6887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6888   (eval $ac_try) 2>&5
6889   ac_status=$?
6890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6891   (exit $ac_status); }; }; then
6892   ac_cv_lib_ICE_IceConnectionNumber=yes
6893 else
6894   echo "$as_me: failed program was:" >&5
6895 sed 's/^/| /' conftest.$ac_ext >&5
6896
6897 ac_cv_lib_ICE_IceConnectionNumber=no
6898 fi
6899 rm -f conftest.err conftest.$ac_objext \
6900       conftest$ac_exeext conftest.$ac_ext
6901 LIBS=$ac_check_lib_save_LIBS
6902 fi
6903 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6904 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
6905 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
6906   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6907 fi
6908
6909   LDFLAGS=$ac_save_LDFLAGS
6910
6911 fi
6912
6913
6914 if test "$have_x" != yes; then
6915   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
6916 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
6917    { (exit 1); exit 1; }; }
6918 fi
6919
6920
6921     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
6922 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
6923 if test "${ac_cv_x_app_defaults+set}" = set; then
6924   echo $ECHO_N "(cached) $ECHO_C" >&6
6925 else
6926
6927   rm -fr conftestdir
6928   if mkdir conftestdir; then
6929     cd conftestdir 2>/dev/null
6930     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6931     cat > Imakefile <<'EOF'
6932 acfindx:
6933         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
6934 EOF
6935     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
6936       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
6937       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6938     fi
6939     cd .. 2>/dev/null
6940     rm -fr conftestdir
6941   fi
6942       if test x"$ac_x_app_defaults" = x; then
6943
6944   # Look for the directory under a standard set of common directories.
6945   # Check X11 before X11Rn because it's often a symlink to the current release.
6946   for ac_dir in                                 \
6947     /usr/X11/lib/app-defaults                   \
6948     /usr/X11R6/lib/app-defaults                 \
6949     /usr/X11R6/lib/X11/app-defaults             \
6950     /usr/X11R5/lib/app-defaults                 \
6951     /usr/X11R5/lib/X11/app-defaults             \
6952     /usr/X11R4/lib/app-defaults                 \
6953     /usr/X11R4/lib/X11/app-defaults             \
6954                                                 \
6955     /usr/lib/X11/app-defaults                   \
6956     /usr/lib/X11R6/app-defaults                 \
6957     /usr/lib/X11R5/app-defaults                 \
6958     /usr/lib/X11R4/app-defaults                 \
6959                                                 \
6960     /usr/local/X11/lib/app-defaults             \
6961     /usr/local/X11R6/lib/app-defaults           \
6962     /usr/local/X11R5/lib/app-defaults           \
6963     /usr/local/X11R4/lib/app-defaults           \
6964                                                 \
6965     /usr/local/lib/X11/app-defaults             \
6966     /usr/local/lib/X11R6/app-defaults           \
6967     /usr/local/lib/X11R6/X11/app-defaults       \
6968     /usr/local/lib/X11R5/app-defaults           \
6969     /usr/local/lib/X11R5/X11/app-defaults       \
6970     /usr/local/lib/X11R4/app-defaults           \
6971     /usr/local/lib/X11R4/X11/app-defaults       \
6972                                                 \
6973     /usr/X386/lib/X11/app-defaults              \
6974     /usr/x386/lib/X11/app-defaults              \
6975     /usr/XFree86/lib/X11/app-defaults           \
6976                                                 \
6977     /usr/lib/X11/app-defaults                   \
6978     /usr/local/lib/X11/app-defaults             \
6979     /usr/unsupported/lib/X11/app-defaults       \
6980     /usr/athena/lib/X11/app-defaults            \
6981     /usr/local/x11r5/lib/X11/app-defaults       \
6982     /usr/lpp/Xamples/lib/X11/app-defaults       \
6983     /lib/usr/lib/X11/app-defaults               \
6984                                                 \
6985     /usr/openwin/lib/app-defaults               \
6986     /usr/openwin/lib/X11/app-defaults           \
6987     /usr/openwin/share/lib/app-defaults         \
6988     /usr/openwin/share/lib/X11/app-defaults     \
6989                                                 \
6990     /X11R6/lib/app-defaults                     \
6991     /X11R5/lib/app-defaults                     \
6992     /X11R4/lib/app-defaults                     \
6993     ; \
6994   do
6995     if test -d "$ac_dir"; then
6996       ac_x_app_defaults=$ac_dir
6997       break
6998     fi
6999   done
7000
7001       fi
7002       if test x"$ac_x_app_defaults" = x; then
7003         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
7004       else
7005         # Record where we found app-defaults for the cache.
7006         ac_cv_x_app_defaults="$ac_x_app_defaults"
7007       fi
7008 fi
7009 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
7010 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
7011     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
7012 case "$host" in
7013     *-hpux*)
7014
7015       # The following arcana was gleaned from conversations with
7016       # Eric Schwartz <erics@col.hp.com>:
7017       #
7018       # On HPUX 10.x, the parts of X that HP considers "standard" live in
7019       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
7020       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
7021       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
7022       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
7023       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
7024       # you don't need any -I or -L arguments.
7025       #
7026       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
7027       # are the same division as 10.x.  However, there are no symlinks to
7028       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
7029       # arguments are always necessary.
7030       #
7031       # However, X11R6 was available on HPUX 9.x as a patch: if that
7032       # patch was installed, then all of X11R6 went in to
7033       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
7034       #
7035       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
7036       # whether R5 was available as a patch; R6 undoubtedly was not.)
7037       #
7038       # So.  We try and use the highest numbered pair of
7039       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
7040       # that are available.  We do not mix and match different versions
7041       # of X.
7042       #
7043       # Question I still don't know the answer to: (do you?)
7044       #
7045       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
7046       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
7047       #     that contrib directory?  Did it contain so-called "standard"
7048       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
7049       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
7050       #     be a situation where one had to reach into the R5 headers and
7051       #     libs to find Xmu?  That is, must both R6 and R5 directories
7052       #     be on the -I and -L lists in that case?
7053       #
7054       for version in X11R6 X11R5 X11R4 ; do
7055         # if either pair of directories exists...
7056         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
7057         then
7058            # if contrib exists, use it...
7059            if test -d /usr/contrib/$version/include ; then
7060              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
7061              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
7062            fi
7063            # if the "standard" one exists, use it.
7064            if test -d /usr/include/$version ; then
7065              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
7066              X_LIBS="$X_LIBS -L/usr/lib/$version"
7067            fi
7068            # since at least one of the pair exists, go no farther.
7069            break
7070         fi
7071       done
7072
7073       # Now find Motif.  Thanks for not making xmkmf find this by
7074       # default, you losers.
7075       #
7076       if test -d /usr/include/Motif2.1 ; then
7077         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7078         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7079       elif test -d /usr/include/Motif1.2 ; then
7080         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7081         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7082       elif test -d /usr/include/Motif1.1 ; then
7083         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7084         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7085       fi
7086
7087       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
7088       #
7089       if test -d /opt/graphics/OpenGL/include ; then
7090         # HP-UX 10.20 puts it here
7091         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
7092         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
7093       elif test -d /opt/Mesa/lib ; then
7094         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
7095         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
7096       fi
7097
7098
7099       if test -d /opt/xpm/lib/X11 ; then
7100         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
7101         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
7102       fi
7103
7104       # On HPUX, default to installing in /opt/xscreensaver/ instead of
7105       # in /usr/local/, unless there is already an xscreensaver in
7106       # /usr/local/bin/.  This can be overridden with the --prefix arg
7107       # to configure.  I'm not sure this is the right thing to do, but
7108       # Richard Lloyd says so...
7109       #
7110       if test \! -x /usr/local/bin/xscreensaver ; then
7111         ac_default_prefix=/opt/xscreensaver
7112       fi
7113
7114     ;;
7115     *-solaris*)
7116
7117       # Thanks for not making xmkmf find this by default, pinheads.
7118       # And thanks for moving things around again, too.  Is this
7119       # really the standard location now?  What happened to the
7120       # joke that this kind of thing went in /opt?
7121       # cthomp says "answer: CDE (Common Disorganized Environment)"
7122       #
7123       if test -f /usr/dt/include/Xm/Xm.h ; then
7124         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
7125         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
7126
7127         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
7128         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
7129 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
7130 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
7131   echo $ECHO_N "(cached) $ECHO_C" >&6
7132 else
7133   ac_check_lib_save_LIBS=$LIBS
7134 LIBS="-lgen  $LIBS"
7135 cat >conftest.$ac_ext <<_ACEOF
7136 /* confdefs.h.  */
7137 _ACEOF
7138 cat confdefs.h >>conftest.$ac_ext
7139 cat >>conftest.$ac_ext <<_ACEOF
7140 /* end confdefs.h.  */
7141
7142 /* Override any gcc2 internal prototype to avoid an error.  */
7143 #ifdef __cplusplus
7144 extern "C"
7145 #endif
7146 /* We use char because int might match the return type of a gcc2
7147    builtin and then its argument prototype would still apply.  */
7148 char regcmp ();
7149 int
7150 main ()
7151 {
7152 regcmp ();
7153   ;
7154   return 0;
7155 }
7156 _ACEOF
7157 rm -f conftest.$ac_objext conftest$ac_exeext
7158 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7159   (eval $ac_link) 2>conftest.er1
7160   ac_status=$?
7161   grep -v '^ *+' conftest.er1 >conftest.err
7162   rm -f conftest.er1
7163   cat conftest.err >&5
7164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7165   (exit $ac_status); } &&
7166          { ac_try='test -z "$ac_c_werror_flag"
7167                          || test ! -s conftest.err'
7168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7169   (eval $ac_try) 2>&5
7170   ac_status=$?
7171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7172   (exit $ac_status); }; } &&
7173          { ac_try='test -s conftest$ac_exeext'
7174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7175   (eval $ac_try) 2>&5
7176   ac_status=$?
7177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7178   (exit $ac_status); }; }; then
7179   ac_cv_lib_gen_regcmp=yes
7180 else
7181   echo "$as_me: failed program was:" >&5
7182 sed 's/^/| /' conftest.$ac_ext >&5
7183
7184 ac_cv_lib_gen_regcmp=no
7185 fi
7186 rm -f conftest.err conftest.$ac_objext \
7187       conftest$ac_exeext conftest.$ac_ext
7188 LIBS=$ac_check_lib_save_LIBS
7189 fi
7190 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
7191 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
7192 if test $ac_cv_lib_gen_regcmp = yes; then
7193   MOTIF_LIBS="$MOTIF_LIBS -lgen"
7194 fi
7195
7196       fi
7197
7198     ;;
7199     *-darwin*)
7200
7201       # On MacOS X (10.x with "fink"), many things are under /sw/.
7202       #
7203       if test -d /sw/include ; then
7204         X_CFLAGS="-I/sw/include $X_CFLAGS"
7205         X_LIBS="-L/sw/lib $X_LIBS"
7206       fi
7207     ;;
7208   esac
7209 echo "$as_me:$LINENO: checking for XPointer" >&5
7210 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
7211 if test "${ac_cv_xpointer+set}" = set; then
7212   echo $ECHO_N "(cached) $ECHO_C" >&6
7213 else
7214
7215   ac_save_CPPFLAGS="$CPPFLAGS"
7216   if test \! -z "$includedir" ; then
7217     CPPFLAGS="$CPPFLAGS -I$includedir"
7218   fi
7219   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7220   cat >conftest.$ac_ext <<_ACEOF
7221 /* confdefs.h.  */
7222 _ACEOF
7223 cat confdefs.h >>conftest.$ac_ext
7224 cat >>conftest.$ac_ext <<_ACEOF
7225 /* end confdefs.h.  */
7226 #include <X11/Xlib.h>
7227 int
7228 main ()
7229 {
7230 XPointer foo = (XPointer) 0;
7231   ;
7232   return 0;
7233 }
7234 _ACEOF
7235 rm -f conftest.$ac_objext
7236 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7237   (eval $ac_compile) 2>conftest.er1
7238   ac_status=$?
7239   grep -v '^ *+' conftest.er1 >conftest.err
7240   rm -f conftest.er1
7241   cat conftest.err >&5
7242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7243   (exit $ac_status); } &&
7244          { ac_try='test -z "$ac_c_werror_flag"
7245                          || test ! -s conftest.err'
7246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7247   (eval $ac_try) 2>&5
7248   ac_status=$?
7249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7250   (exit $ac_status); }; } &&
7251          { ac_try='test -s conftest.$ac_objext'
7252   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7253   (eval $ac_try) 2>&5
7254   ac_status=$?
7255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7256   (exit $ac_status); }; }; then
7257   ac_cv_xpointer=yes
7258 else
7259   echo "$as_me: failed program was:" >&5
7260 sed 's/^/| /' conftest.$ac_ext >&5
7261
7262 ac_cv_xpointer=no
7263 fi
7264 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7265   CPPFLAGS="$ac_save_CPPFLAGS"
7266 fi
7267 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
7268 echo "${ECHO_T}$ac_cv_xpointer" >&6
7269   if test "$ac_cv_xpointer" != yes; then
7270    cat >>confdefs.h <<\_ACEOF
7271 #define XPointer char*
7272 _ACEOF
7273
7274   fi
7275
7276 echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
7277 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6
7278   ac_macosx=no
7279   case "$host" in
7280     *-apple-darwin* )
7281       ac_macosx=yes
7282     ;;
7283   esac
7284 echo "$as_me:$LINENO: result: $ac_macosx" >&5
7285 echo "${ECHO_T}$ac_macosx" >&6
7286
7287
7288 if test "$ac_macosx" = yes; then
7289   if test -n "$GCC"; then
7290     # Without these, every link against libGL gets a bunch of useless warnings.
7291     osx_crud="-bind_at_load -multiply_defined suppress"
7292     echo "$as_me:$LINENO: result: adding \"$osx_crud\" to LDFLAGS" >&5
7293 echo "${ECHO_T}adding \"$osx_crud\" to LDFLAGS" >&6
7294      LDFLAGS="$LDFLAGS $osx_crud"
7295   fi
7296 fi
7297
7298 ###############################################################################
7299 #
7300 #       Gettext support
7301 #
7302 ###############################################################################
7303
7304
7305
7306 if test -n ""; then
7307     echo "$as_me:$LINENO: checking for intltool >= " >&5
7308 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
7309
7310     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
7311     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
7312
7313     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
7314
7315
7316     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
7317         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
7318 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
7319     else
7320         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
7321 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
7322         exit 1
7323     fi
7324 fi
7325
7326   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'
7327 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'
7328      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'
7329       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
7330      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'
7331    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'
7332     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'
7333 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'
7334        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'
7335       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'
7336     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'
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350 # Use the tools built into the package, not the ones that are installed.
7351
7352 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
7353 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
7354 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
7355
7356
7357
7358
7359
7360 # Extract the first word of "perl", so it can be a program name with args.
7361 set dummy perl; ac_word=$2
7362 echo "$as_me:$LINENO: checking for $ac_word" >&5
7363 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7364 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
7365   echo $ECHO_N "(cached) $ECHO_C" >&6
7366 else
7367   case $INTLTOOL_PERL in
7368   [\\/]* | ?:[\\/]*)
7369   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
7370   ;;
7371   *)
7372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7373 for as_dir in $PATH
7374 do
7375   IFS=$as_save_IFS
7376   test -z "$as_dir" && as_dir=.
7377   for ac_exec_ext in '' $ac_executable_extensions; do
7378   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7379     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
7380     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7381     break 2
7382   fi
7383 done
7384 done
7385
7386   ;;
7387 esac
7388 fi
7389 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
7390
7391 if test -n "$INTLTOOL_PERL"; then
7392   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
7393 echo "${ECHO_T}$INTLTOOL_PERL" >&6
7394 else
7395   echo "$as_me:$LINENO: result: no" >&5
7396 echo "${ECHO_T}no" >&6
7397 fi
7398
7399 if test -z "$INTLTOOL_PERL"; then
7400    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
7401 echo "$as_me: error: perl not found; required for intltool" >&2;}
7402    { (exit 1); exit 1; }; }
7403 fi
7404 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7405    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
7406 echo "$as_me: error: perl 5.x required for intltool" >&2;}
7407    { (exit 1); exit 1; }; }
7408 fi
7409
7410 # Remove file type tags (using []) from po/POTFILES.
7411
7412
7413
7414
7415
7416
7417
7418 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7419
7420           ac_config_commands="$ac_config_commands default-1"
7421
7422
7423
7424 GETTEXT_PACKAGE=xscreensaver
7425
7426 cat >>confdefs.h <<_ACEOF
7427 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7428 _ACEOF
7429
7430
7431 cat >>confdefs.h <<_ACEOF
7432 #define PACKAGE "$GETTEXT_PACKAGE"
7433 _ACEOF
7434
7435
7436
7437 ALL_LINGUAS="ca da de es et fi fr hu it ja ko nb nl no pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
7438 if test -n "$ac_tool_prefix"; then
7439   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7440 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7441 echo "$as_me:$LINENO: checking for $ac_word" >&5
7442 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7443 if test "${ac_cv_prog_RANLIB+set}" = set; then
7444   echo $ECHO_N "(cached) $ECHO_C" >&6
7445 else
7446   if test -n "$RANLIB"; then
7447   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7448 else
7449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7450 for as_dir in $PATH
7451 do
7452   IFS=$as_save_IFS
7453   test -z "$as_dir" && as_dir=.
7454   for ac_exec_ext in '' $ac_executable_extensions; do
7455   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7456     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7457     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7458     break 2
7459   fi
7460 done
7461 done
7462
7463 fi
7464 fi
7465 RANLIB=$ac_cv_prog_RANLIB
7466 if test -n "$RANLIB"; then
7467   echo "$as_me:$LINENO: result: $RANLIB" >&5
7468 echo "${ECHO_T}$RANLIB" >&6
7469 else
7470   echo "$as_me:$LINENO: result: no" >&5
7471 echo "${ECHO_T}no" >&6
7472 fi
7473
7474 fi
7475 if test -z "$ac_cv_prog_RANLIB"; then
7476   ac_ct_RANLIB=$RANLIB
7477   # Extract the first word of "ranlib", so it can be a program name with args.
7478 set dummy ranlib; ac_word=$2
7479 echo "$as_me:$LINENO: checking for $ac_word" >&5
7480 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7481 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7482   echo $ECHO_N "(cached) $ECHO_C" >&6
7483 else
7484   if test -n "$ac_ct_RANLIB"; then
7485   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7486 else
7487 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7488 for as_dir in $PATH
7489 do
7490   IFS=$as_save_IFS
7491   test -z "$as_dir" && as_dir=.
7492   for ac_exec_ext in '' $ac_executable_extensions; do
7493   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7494     ac_cv_prog_ac_ct_RANLIB="ranlib"
7495     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7496     break 2
7497   fi
7498 done
7499 done
7500
7501   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7502 fi
7503 fi
7504 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7505 if test -n "$ac_ct_RANLIB"; then
7506   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7507 echo "${ECHO_T}$ac_ct_RANLIB" >&6
7508 else
7509   echo "$as_me:$LINENO: result: no" >&5
7510 echo "${ECHO_T}no" >&6
7511 fi
7512
7513   RANLIB=$ac_ct_RANLIB
7514 else
7515   RANLIB="$ac_cv_prog_RANLIB"
7516 fi
7517
7518 echo "$as_me:$LINENO: checking for off_t" >&5
7519 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
7520 if test "${ac_cv_type_off_t+set}" = set; then
7521   echo $ECHO_N "(cached) $ECHO_C" >&6
7522 else
7523   cat >conftest.$ac_ext <<_ACEOF
7524 /* confdefs.h.  */
7525 _ACEOF
7526 cat confdefs.h >>conftest.$ac_ext
7527 cat >>conftest.$ac_ext <<_ACEOF
7528 /* end confdefs.h.  */
7529 $ac_includes_default
7530 int
7531 main ()
7532 {
7533 if ((off_t *) 0)
7534   return 0;
7535 if (sizeof (off_t))
7536   return 0;
7537   ;
7538   return 0;
7539 }
7540 _ACEOF
7541 rm -f conftest.$ac_objext
7542 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7543   (eval $ac_compile) 2>conftest.er1
7544   ac_status=$?
7545   grep -v '^ *+' conftest.er1 >conftest.err
7546   rm -f conftest.er1
7547   cat conftest.err >&5
7548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7549   (exit $ac_status); } &&
7550          { ac_try='test -z "$ac_c_werror_flag"
7551                          || test ! -s conftest.err'
7552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7553   (eval $ac_try) 2>&5
7554   ac_status=$?
7555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7556   (exit $ac_status); }; } &&
7557          { ac_try='test -s conftest.$ac_objext'
7558   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7559   (eval $ac_try) 2>&5
7560   ac_status=$?
7561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7562   (exit $ac_status); }; }; then
7563   ac_cv_type_off_t=yes
7564 else
7565   echo "$as_me: failed program was:" >&5
7566 sed 's/^/| /' conftest.$ac_ext >&5
7567
7568 ac_cv_type_off_t=no
7569 fi
7570 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7571 fi
7572 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
7573 echo "${ECHO_T}$ac_cv_type_off_t" >&6
7574 if test $ac_cv_type_off_t = yes; then
7575   :
7576 else
7577
7578 cat >>confdefs.h <<_ACEOF
7579 #define off_t long
7580 _ACEOF
7581
7582 fi
7583
7584 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7585 # for constant arguments.  Useless!
7586 echo "$as_me:$LINENO: checking for working alloca.h" >&5
7587 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7588 if test "${ac_cv_working_alloca_h+set}" = set; then
7589   echo $ECHO_N "(cached) $ECHO_C" >&6
7590 else
7591   cat >conftest.$ac_ext <<_ACEOF
7592 /* confdefs.h.  */
7593 _ACEOF
7594 cat confdefs.h >>conftest.$ac_ext
7595 cat >>conftest.$ac_ext <<_ACEOF
7596 /* end confdefs.h.  */
7597 #include <alloca.h>
7598 int
7599 main ()
7600 {
7601 char *p = (char *) alloca (2 * sizeof (int));
7602   ;
7603   return 0;
7604 }
7605 _ACEOF
7606 rm -f conftest.$ac_objext conftest$ac_exeext
7607 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7608   (eval $ac_link) 2>conftest.er1
7609   ac_status=$?
7610   grep -v '^ *+' conftest.er1 >conftest.err
7611   rm -f conftest.er1
7612   cat conftest.err >&5
7613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7614   (exit $ac_status); } &&
7615          { ac_try='test -z "$ac_c_werror_flag"
7616                          || test ! -s conftest.err'
7617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7618   (eval $ac_try) 2>&5
7619   ac_status=$?
7620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7621   (exit $ac_status); }; } &&
7622          { ac_try='test -s conftest$ac_exeext'
7623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7624   (eval $ac_try) 2>&5
7625   ac_status=$?
7626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7627   (exit $ac_status); }; }; then
7628   ac_cv_working_alloca_h=yes
7629 else
7630   echo "$as_me: failed program was:" >&5
7631 sed 's/^/| /' conftest.$ac_ext >&5
7632
7633 ac_cv_working_alloca_h=no
7634 fi
7635 rm -f conftest.err conftest.$ac_objext \
7636       conftest$ac_exeext conftest.$ac_ext
7637 fi
7638 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
7639 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7640 if test $ac_cv_working_alloca_h = yes; then
7641
7642 cat >>confdefs.h <<\_ACEOF
7643 #define HAVE_ALLOCA_H 1
7644 _ACEOF
7645
7646 fi
7647
7648 echo "$as_me:$LINENO: checking for alloca" >&5
7649 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7650 if test "${ac_cv_func_alloca_works+set}" = set; then
7651   echo $ECHO_N "(cached) $ECHO_C" >&6
7652 else
7653   cat >conftest.$ac_ext <<_ACEOF
7654 /* confdefs.h.  */
7655 _ACEOF
7656 cat confdefs.h >>conftest.$ac_ext
7657 cat >>conftest.$ac_ext <<_ACEOF
7658 /* end confdefs.h.  */
7659 #ifdef __GNUC__
7660 # define alloca __builtin_alloca
7661 #else
7662 # ifdef _MSC_VER
7663 #  include <malloc.h>
7664 #  define alloca _alloca
7665 # else
7666 #  if HAVE_ALLOCA_H
7667 #   include <alloca.h>
7668 #  else
7669 #   ifdef _AIX
7670  #pragma alloca
7671 #   else
7672 #    ifndef alloca /* predefined by HP cc +Olibcalls */
7673 char *alloca ();
7674 #    endif
7675 #   endif
7676 #  endif
7677 # endif
7678 #endif
7679
7680 int
7681 main ()
7682 {
7683 char *p = (char *) alloca (1);
7684   ;
7685   return 0;
7686 }
7687 _ACEOF
7688 rm -f conftest.$ac_objext conftest$ac_exeext
7689 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7690   (eval $ac_link) 2>conftest.er1
7691   ac_status=$?
7692   grep -v '^ *+' conftest.er1 >conftest.err
7693   rm -f conftest.er1
7694   cat conftest.err >&5
7695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7696   (exit $ac_status); } &&
7697          { ac_try='test -z "$ac_c_werror_flag"
7698                          || test ! -s conftest.err'
7699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7700   (eval $ac_try) 2>&5
7701   ac_status=$?
7702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7703   (exit $ac_status); }; } &&
7704          { ac_try='test -s conftest$ac_exeext'
7705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7706   (eval $ac_try) 2>&5
7707   ac_status=$?
7708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7709   (exit $ac_status); }; }; then
7710   ac_cv_func_alloca_works=yes
7711 else
7712   echo "$as_me: failed program was:" >&5
7713 sed 's/^/| /' conftest.$ac_ext >&5
7714
7715 ac_cv_func_alloca_works=no
7716 fi
7717 rm -f conftest.err conftest.$ac_objext \
7718       conftest$ac_exeext conftest.$ac_ext
7719 fi
7720 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
7721 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
7722
7723 if test $ac_cv_func_alloca_works = yes; then
7724
7725 cat >>confdefs.h <<\_ACEOF
7726 #define HAVE_ALLOCA 1
7727 _ACEOF
7728
7729 else
7730   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7731 # that cause trouble.  Some versions do not even contain alloca or
7732 # contain a buggy version.  If you still want to use their alloca,
7733 # use ar to extract alloca.o from them instead of compiling alloca.c.
7734
7735 ALLOCA=alloca.$ac_objext
7736
7737 cat >>confdefs.h <<\_ACEOF
7738 #define C_ALLOCA 1
7739 _ACEOF
7740
7741
7742 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
7743 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
7744 if test "${ac_cv_os_cray+set}" = set; then
7745   echo $ECHO_N "(cached) $ECHO_C" >&6
7746 else
7747   cat >conftest.$ac_ext <<_ACEOF
7748 /* confdefs.h.  */
7749 _ACEOF
7750 cat confdefs.h >>conftest.$ac_ext
7751 cat >>conftest.$ac_ext <<_ACEOF
7752 /* end confdefs.h.  */
7753 #if defined(CRAY) && ! defined(CRAY2)
7754 webecray
7755 #else
7756 wenotbecray
7757 #endif
7758
7759 _ACEOF
7760 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7761   $EGREP "webecray" >/dev/null 2>&1; then
7762   ac_cv_os_cray=yes
7763 else
7764   ac_cv_os_cray=no
7765 fi
7766 rm -f conftest*
7767
7768 fi
7769 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
7770 echo "${ECHO_T}$ac_cv_os_cray" >&6
7771 if test $ac_cv_os_cray = yes; then
7772   for ac_func in _getb67 GETB67 getb67; do
7773     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7774 echo "$as_me:$LINENO: checking for $ac_func" >&5
7775 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7776 if eval "test \"\${$as_ac_var+set}\" = set"; then
7777   echo $ECHO_N "(cached) $ECHO_C" >&6
7778 else
7779   cat >conftest.$ac_ext <<_ACEOF
7780 /* confdefs.h.  */
7781 _ACEOF
7782 cat confdefs.h >>conftest.$ac_ext
7783 cat >>conftest.$ac_ext <<_ACEOF
7784 /* end confdefs.h.  */
7785 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7786    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7787 #define $ac_func innocuous_$ac_func
7788
7789 /* System header to define __stub macros and hopefully few prototypes,
7790     which can conflict with char $ac_func (); below.
7791     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7792     <limits.h> exists even on freestanding compilers.  */
7793
7794 #ifdef __STDC__
7795 # include <limits.h>
7796 #else
7797 # include <assert.h>
7798 #endif
7799
7800 #undef $ac_func
7801
7802 /* Override any gcc2 internal prototype to avoid an error.  */
7803 #ifdef __cplusplus
7804 extern "C"
7805 {
7806 #endif
7807 /* We use char because int might match the return type of a gcc2
7808    builtin and then its argument prototype would still apply.  */
7809 char $ac_func ();
7810 /* The GNU C library defines this for functions which it implements
7811     to always fail with ENOSYS.  Some functions are actually named
7812     something starting with __ and the normal name is an alias.  */
7813 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7814 choke me
7815 #else
7816 char (*f) () = $ac_func;
7817 #endif
7818 #ifdef __cplusplus
7819 }
7820 #endif
7821
7822 int
7823 main ()
7824 {
7825 return f != $ac_func;
7826   ;
7827   return 0;
7828 }
7829 _ACEOF
7830 rm -f conftest.$ac_objext conftest$ac_exeext
7831 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7832   (eval $ac_link) 2>conftest.er1
7833   ac_status=$?
7834   grep -v '^ *+' conftest.er1 >conftest.err
7835   rm -f conftest.er1
7836   cat conftest.err >&5
7837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7838   (exit $ac_status); } &&
7839          { ac_try='test -z "$ac_c_werror_flag"
7840                          || test ! -s conftest.err'
7841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7842   (eval $ac_try) 2>&5
7843   ac_status=$?
7844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7845   (exit $ac_status); }; } &&
7846          { ac_try='test -s conftest$ac_exeext'
7847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7848   (eval $ac_try) 2>&5
7849   ac_status=$?
7850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7851   (exit $ac_status); }; }; then
7852   eval "$as_ac_var=yes"
7853 else
7854   echo "$as_me: failed program was:" >&5
7855 sed 's/^/| /' conftest.$ac_ext >&5
7856
7857 eval "$as_ac_var=no"
7858 fi
7859 rm -f conftest.err conftest.$ac_objext \
7860       conftest$ac_exeext conftest.$ac_ext
7861 fi
7862 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7863 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7864 if test `eval echo '${'$as_ac_var'}'` = yes; then
7865
7866 cat >>confdefs.h <<_ACEOF
7867 #define CRAY_STACKSEG_END $ac_func
7868 _ACEOF
7869
7870     break
7871 fi
7872
7873   done
7874 fi
7875
7876 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
7877 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7878 if test "${ac_cv_c_stack_direction+set}" = set; then
7879   echo $ECHO_N "(cached) $ECHO_C" >&6
7880 else
7881   if test "$cross_compiling" = yes; then
7882   ac_cv_c_stack_direction=0
7883 else
7884   cat >conftest.$ac_ext <<_ACEOF
7885 /* confdefs.h.  */
7886 _ACEOF
7887 cat confdefs.h >>conftest.$ac_ext
7888 cat >>conftest.$ac_ext <<_ACEOF
7889 /* end confdefs.h.  */
7890 int
7891 find_stack_direction ()
7892 {
7893   static char *addr = 0;
7894   auto char dummy;
7895   if (addr == 0)
7896     {
7897       addr = &dummy;
7898       return find_stack_direction ();
7899     }
7900   else
7901     return (&dummy > addr) ? 1 : -1;
7902 }
7903
7904 int
7905 main ()
7906 {
7907   exit (find_stack_direction () < 0);
7908 }
7909 _ACEOF
7910 rm -f conftest$ac_exeext
7911 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7912   (eval $ac_link) 2>&5
7913   ac_status=$?
7914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7915   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7917   (eval $ac_try) 2>&5
7918   ac_status=$?
7919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7920   (exit $ac_status); }; }; then
7921   ac_cv_c_stack_direction=1
7922 else
7923   echo "$as_me: program exited with status $ac_status" >&5
7924 echo "$as_me: failed program was:" >&5
7925 sed 's/^/| /' conftest.$ac_ext >&5
7926
7927 ( exit $ac_status )
7928 ac_cv_c_stack_direction=-1
7929 fi
7930 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7931 fi
7932 fi
7933 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
7934 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
7935
7936 cat >>confdefs.h <<_ACEOF
7937 #define STACK_DIRECTION $ac_cv_c_stack_direction
7938 _ACEOF
7939
7940
7941 fi
7942
7943
7944
7945 for ac_header in stdlib.h unistd.h
7946 do
7947 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7948 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7949   echo "$as_me:$LINENO: checking for $ac_header" >&5
7950 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7951 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7952   echo $ECHO_N "(cached) $ECHO_C" >&6
7953 fi
7954 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7955 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7956 else
7957   # Is the header compilable?
7958 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7959 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7960 cat >conftest.$ac_ext <<_ACEOF
7961 /* confdefs.h.  */
7962 _ACEOF
7963 cat confdefs.h >>conftest.$ac_ext
7964 cat >>conftest.$ac_ext <<_ACEOF
7965 /* end confdefs.h.  */
7966 $ac_includes_default
7967 #include <$ac_header>
7968 _ACEOF
7969 rm -f conftest.$ac_objext
7970 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7971   (eval $ac_compile) 2>conftest.er1
7972   ac_status=$?
7973   grep -v '^ *+' conftest.er1 >conftest.err
7974   rm -f conftest.er1
7975   cat conftest.err >&5
7976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7977   (exit $ac_status); } &&
7978          { ac_try='test -z "$ac_c_werror_flag"
7979                          || test ! -s conftest.err'
7980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7981   (eval $ac_try) 2>&5
7982   ac_status=$?
7983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7984   (exit $ac_status); }; } &&
7985          { ac_try='test -s conftest.$ac_objext'
7986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7987   (eval $ac_try) 2>&5
7988   ac_status=$?
7989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7990   (exit $ac_status); }; }; then
7991   ac_header_compiler=yes
7992 else
7993   echo "$as_me: failed program was:" >&5
7994 sed 's/^/| /' conftest.$ac_ext >&5
7995
7996 ac_header_compiler=no
7997 fi
7998 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7999 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8000 echo "${ECHO_T}$ac_header_compiler" >&6
8001
8002 # Is the header present?
8003 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8004 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8005 cat >conftest.$ac_ext <<_ACEOF
8006 /* confdefs.h.  */
8007 _ACEOF
8008 cat confdefs.h >>conftest.$ac_ext
8009 cat >>conftest.$ac_ext <<_ACEOF
8010 /* end confdefs.h.  */
8011 #include <$ac_header>
8012 _ACEOF
8013 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8014   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8015   ac_status=$?
8016   grep -v '^ *+' conftest.er1 >conftest.err
8017   rm -f conftest.er1
8018   cat conftest.err >&5
8019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8020   (exit $ac_status); } >/dev/null; then
8021   if test -s conftest.err; then
8022     ac_cpp_err=$ac_c_preproc_warn_flag
8023     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8024   else
8025     ac_cpp_err=
8026   fi
8027 else
8028   ac_cpp_err=yes
8029 fi
8030 if test -z "$ac_cpp_err"; then
8031   ac_header_preproc=yes
8032 else
8033   echo "$as_me: failed program was:" >&5
8034 sed 's/^/| /' conftest.$ac_ext >&5
8035
8036   ac_header_preproc=no
8037 fi
8038 rm -f conftest.err conftest.$ac_ext
8039 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8040 echo "${ECHO_T}$ac_header_preproc" >&6
8041
8042 # So?  What about this header?
8043 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8044   yes:no: )
8045     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8046 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8047     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8048 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8049     ac_header_preproc=yes
8050     ;;
8051   no:yes:* )
8052     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8053 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8054     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8055 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8056     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8057 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8058     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8059 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8060     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8061 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8062     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8063 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8064     (
8065       cat <<\_ASBOX
8066 ## ------------------------------------------ ##
8067 ## Report this to the AC_PACKAGE_NAME lists.  ##
8068 ## ------------------------------------------ ##
8069 _ASBOX
8070     ) |
8071       sed "s/^/$as_me: WARNING:     /" >&2
8072     ;;
8073 esac
8074 echo "$as_me:$LINENO: checking for $ac_header" >&5
8075 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8076 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8077   echo $ECHO_N "(cached) $ECHO_C" >&6
8078 else
8079   eval "$as_ac_Header=\$ac_header_preproc"
8080 fi
8081 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8082 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8083
8084 fi
8085 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8086   cat >>confdefs.h <<_ACEOF
8087 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8088 _ACEOF
8089
8090 fi
8091
8092 done
8093
8094
8095 for ac_func in getpagesize
8096 do
8097 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8098 echo "$as_me:$LINENO: checking for $ac_func" >&5
8099 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8100 if eval "test \"\${$as_ac_var+set}\" = set"; then
8101   echo $ECHO_N "(cached) $ECHO_C" >&6
8102 else
8103   cat >conftest.$ac_ext <<_ACEOF
8104 /* confdefs.h.  */
8105 _ACEOF
8106 cat confdefs.h >>conftest.$ac_ext
8107 cat >>conftest.$ac_ext <<_ACEOF
8108 /* end confdefs.h.  */
8109 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8110    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8111 #define $ac_func innocuous_$ac_func
8112
8113 /* System header to define __stub macros and hopefully few prototypes,
8114     which can conflict with char $ac_func (); below.
8115     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8116     <limits.h> exists even on freestanding compilers.  */
8117
8118 #ifdef __STDC__
8119 # include <limits.h>
8120 #else
8121 # include <assert.h>
8122 #endif
8123
8124 #undef $ac_func
8125
8126 /* Override any gcc2 internal prototype to avoid an error.  */
8127 #ifdef __cplusplus
8128 extern "C"
8129 {
8130 #endif
8131 /* We use char because int might match the return type of a gcc2
8132    builtin and then its argument prototype would still apply.  */
8133 char $ac_func ();
8134 /* The GNU C library defines this for functions which it implements
8135     to always fail with ENOSYS.  Some functions are actually named
8136     something starting with __ and the normal name is an alias.  */
8137 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8138 choke me
8139 #else
8140 char (*f) () = $ac_func;
8141 #endif
8142 #ifdef __cplusplus
8143 }
8144 #endif
8145
8146 int
8147 main ()
8148 {
8149 return f != $ac_func;
8150   ;
8151   return 0;
8152 }
8153 _ACEOF
8154 rm -f conftest.$ac_objext conftest$ac_exeext
8155 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8156   (eval $ac_link) 2>conftest.er1
8157   ac_status=$?
8158   grep -v '^ *+' conftest.er1 >conftest.err
8159   rm -f conftest.er1
8160   cat conftest.err >&5
8161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8162   (exit $ac_status); } &&
8163          { ac_try='test -z "$ac_c_werror_flag"
8164                          || test ! -s conftest.err'
8165   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8166   (eval $ac_try) 2>&5
8167   ac_status=$?
8168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8169   (exit $ac_status); }; } &&
8170          { ac_try='test -s conftest$ac_exeext'
8171   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8172   (eval $ac_try) 2>&5
8173   ac_status=$?
8174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8175   (exit $ac_status); }; }; then
8176   eval "$as_ac_var=yes"
8177 else
8178   echo "$as_me: failed program was:" >&5
8179 sed 's/^/| /' conftest.$ac_ext >&5
8180
8181 eval "$as_ac_var=no"
8182 fi
8183 rm -f conftest.err conftest.$ac_objext \
8184       conftest$ac_exeext conftest.$ac_ext
8185 fi
8186 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8187 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8188 if test `eval echo '${'$as_ac_var'}'` = yes; then
8189   cat >>confdefs.h <<_ACEOF
8190 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8191 _ACEOF
8192
8193 fi
8194 done
8195
8196 echo "$as_me:$LINENO: checking for working mmap" >&5
8197 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8198 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8199   echo $ECHO_N "(cached) $ECHO_C" >&6
8200 else
8201   if test "$cross_compiling" = yes; then
8202   ac_cv_func_mmap_fixed_mapped=no
8203 else
8204   cat >conftest.$ac_ext <<_ACEOF
8205 /* confdefs.h.  */
8206 _ACEOF
8207 cat confdefs.h >>conftest.$ac_ext
8208 cat >>conftest.$ac_ext <<_ACEOF
8209 /* end confdefs.h.  */
8210 $ac_includes_default
8211 /* malloc might have been renamed as rpl_malloc. */
8212 #undef malloc
8213
8214 /* Thanks to Mike Haertel and Jim Avera for this test.
8215    Here is a matrix of mmap possibilities:
8216         mmap private not fixed
8217         mmap private fixed at somewhere currently unmapped
8218         mmap private fixed at somewhere already mapped
8219         mmap shared not fixed
8220         mmap shared fixed at somewhere currently unmapped
8221         mmap shared fixed at somewhere already mapped
8222    For private mappings, we should verify that changes cannot be read()
8223    back from the file, nor mmap's back from the file at a different
8224    address.  (There have been systems where private was not correctly
8225    implemented like the infamous i386 svr4.0, and systems where the
8226    VM page cache was not coherent with the file system buffer cache
8227    like early versions of FreeBSD and possibly contemporary NetBSD.)
8228    For shared mappings, we should conversely verify that changes get
8229    propagated back to all the places they're supposed to be.
8230
8231    Grep wants private fixed already mapped.
8232    The main things grep needs to know about mmap are:
8233    * does it exist and is it safe to write into the mmap'd area
8234    * how to use it (BSD variants)  */
8235
8236 #include <fcntl.h>
8237 #include <sys/mman.h>
8238
8239 #if !STDC_HEADERS && !HAVE_STDLIB_H
8240 char *malloc ();
8241 #endif
8242
8243 /* This mess was copied from the GNU getpagesize.h.  */
8244 #if !HAVE_GETPAGESIZE
8245 /* Assume that all systems that can run configure have sys/param.h.  */
8246 # if !HAVE_SYS_PARAM_H
8247 #  define HAVE_SYS_PARAM_H 1
8248 # endif
8249
8250 # ifdef _SC_PAGESIZE
8251 #  define getpagesize() sysconf(_SC_PAGESIZE)
8252 # else /* no _SC_PAGESIZE */
8253 #  if HAVE_SYS_PARAM_H
8254 #   include <sys/param.h>
8255 #   ifdef EXEC_PAGESIZE
8256 #    define getpagesize() EXEC_PAGESIZE
8257 #   else /* no EXEC_PAGESIZE */
8258 #    ifdef NBPG
8259 #     define getpagesize() NBPG * CLSIZE
8260 #     ifndef CLSIZE
8261 #      define CLSIZE 1
8262 #     endif /* no CLSIZE */
8263 #    else /* no NBPG */
8264 #     ifdef NBPC
8265 #      define getpagesize() NBPC
8266 #     else /* no NBPC */
8267 #      ifdef PAGESIZE
8268 #       define getpagesize() PAGESIZE
8269 #      endif /* PAGESIZE */
8270 #     endif /* no NBPC */
8271 #    endif /* no NBPG */
8272 #   endif /* no EXEC_PAGESIZE */
8273 #  else /* no HAVE_SYS_PARAM_H */
8274 #   define getpagesize() 8192   /* punt totally */
8275 #  endif /* no HAVE_SYS_PARAM_H */
8276 # endif /* no _SC_PAGESIZE */
8277
8278 #endif /* no HAVE_GETPAGESIZE */
8279
8280 int
8281 main ()
8282 {
8283   char *data, *data2, *data3;
8284   int i, pagesize;
8285   int fd;
8286
8287   pagesize = getpagesize ();
8288
8289   /* First, make a file with some known garbage in it. */
8290   data = (char *) malloc (pagesize);
8291   if (!data)
8292     exit (1);
8293   for (i = 0; i < pagesize; ++i)
8294     *(data + i) = rand ();
8295   umask (0);
8296   fd = creat ("conftest.mmap", 0600);
8297   if (fd < 0)
8298     exit (1);
8299   if (write (fd, data, pagesize) != pagesize)
8300     exit (1);
8301   close (fd);
8302
8303   /* Next, try to mmap the file at a fixed address which already has
8304      something else allocated at it.  If we can, also make sure that
8305      we see the same garbage.  */
8306   fd = open ("conftest.mmap", O_RDWR);
8307   if (fd < 0)
8308     exit (1);
8309   data2 = (char *) malloc (2 * pagesize);
8310   if (!data2)
8311     exit (1);
8312   data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
8313   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8314                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8315     exit (1);
8316   for (i = 0; i < pagesize; ++i)
8317     if (*(data + i) != *(data2 + i))
8318       exit (1);
8319
8320   /* Finally, make sure that changes to the mapped area do not
8321      percolate back to the file as seen by read().  (This is a bug on
8322      some variants of i386 svr4.0.)  */
8323   for (i = 0; i < pagesize; ++i)
8324     *(data2 + i) = *(data2 + i) + 1;
8325   data3 = (char *) malloc (pagesize);
8326   if (!data3)
8327     exit (1);
8328   if (read (fd, data3, pagesize) != pagesize)
8329     exit (1);
8330   for (i = 0; i < pagesize; ++i)
8331     if (*(data + i) != *(data3 + i))
8332       exit (1);
8333   close (fd);
8334   exit (0);
8335 }
8336 _ACEOF
8337 rm -f conftest$ac_exeext
8338 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8339   (eval $ac_link) 2>&5
8340   ac_status=$?
8341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8342   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8344   (eval $ac_try) 2>&5
8345   ac_status=$?
8346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8347   (exit $ac_status); }; }; then
8348   ac_cv_func_mmap_fixed_mapped=yes
8349 else
8350   echo "$as_me: program exited with status $ac_status" >&5
8351 echo "$as_me: failed program was:" >&5
8352 sed 's/^/| /' conftest.$ac_ext >&5
8353
8354 ( exit $ac_status )
8355 ac_cv_func_mmap_fixed_mapped=no
8356 fi
8357 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8358 fi
8359 fi
8360 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8361 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8362 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8363
8364 cat >>confdefs.h <<\_ACEOF
8365 #define HAVE_MMAP 1
8366 _ACEOF
8367
8368 fi
8369 rm -f conftest.mmap
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
8381 unistd.h sys/param.h
8382 do
8383 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8384 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8385   echo "$as_me:$LINENO: checking for $ac_header" >&5
8386 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8387 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8388   echo $ECHO_N "(cached) $ECHO_C" >&6
8389 fi
8390 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8391 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8392 else
8393   # Is the header compilable?
8394 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8395 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8396 cat >conftest.$ac_ext <<_ACEOF
8397 /* confdefs.h.  */
8398 _ACEOF
8399 cat confdefs.h >>conftest.$ac_ext
8400 cat >>conftest.$ac_ext <<_ACEOF
8401 /* end confdefs.h.  */
8402 $ac_includes_default
8403 #include <$ac_header>
8404 _ACEOF
8405 rm -f conftest.$ac_objext
8406 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8407   (eval $ac_compile) 2>conftest.er1
8408   ac_status=$?
8409   grep -v '^ *+' conftest.er1 >conftest.err
8410   rm -f conftest.er1
8411   cat conftest.err >&5
8412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8413   (exit $ac_status); } &&
8414          { ac_try='test -z "$ac_c_werror_flag"
8415                          || test ! -s conftest.err'
8416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8417   (eval $ac_try) 2>&5
8418   ac_status=$?
8419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8420   (exit $ac_status); }; } &&
8421          { ac_try='test -s conftest.$ac_objext'
8422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8423   (eval $ac_try) 2>&5
8424   ac_status=$?
8425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8426   (exit $ac_status); }; }; then
8427   ac_header_compiler=yes
8428 else
8429   echo "$as_me: failed program was:" >&5
8430 sed 's/^/| /' conftest.$ac_ext >&5
8431
8432 ac_header_compiler=no
8433 fi
8434 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8435 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8436 echo "${ECHO_T}$ac_header_compiler" >&6
8437
8438 # Is the header present?
8439 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8440 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8441 cat >conftest.$ac_ext <<_ACEOF
8442 /* confdefs.h.  */
8443 _ACEOF
8444 cat confdefs.h >>conftest.$ac_ext
8445 cat >>conftest.$ac_ext <<_ACEOF
8446 /* end confdefs.h.  */
8447 #include <$ac_header>
8448 _ACEOF
8449 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8450   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8451   ac_status=$?
8452   grep -v '^ *+' conftest.er1 >conftest.err
8453   rm -f conftest.er1
8454   cat conftest.err >&5
8455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8456   (exit $ac_status); } >/dev/null; then
8457   if test -s conftest.err; then
8458     ac_cpp_err=$ac_c_preproc_warn_flag
8459     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8460   else
8461     ac_cpp_err=
8462   fi
8463 else
8464   ac_cpp_err=yes
8465 fi
8466 if test -z "$ac_cpp_err"; then
8467   ac_header_preproc=yes
8468 else
8469   echo "$as_me: failed program was:" >&5
8470 sed 's/^/| /' conftest.$ac_ext >&5
8471
8472   ac_header_preproc=no
8473 fi
8474 rm -f conftest.err conftest.$ac_ext
8475 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8476 echo "${ECHO_T}$ac_header_preproc" >&6
8477
8478 # So?  What about this header?
8479 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8480   yes:no: )
8481     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8482 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8483     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8484 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8485     ac_header_preproc=yes
8486     ;;
8487   no:yes:* )
8488     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8489 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8490     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8491 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8492     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8493 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8494     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8495 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8496     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8497 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8498     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8499 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8500     (
8501       cat <<\_ASBOX
8502 ## ------------------------------------------ ##
8503 ## Report this to the AC_PACKAGE_NAME lists.  ##
8504 ## ------------------------------------------ ##
8505 _ASBOX
8506     ) |
8507       sed "s/^/$as_me: WARNING:     /" >&2
8508     ;;
8509 esac
8510 echo "$as_me:$LINENO: checking for $ac_header" >&5
8511 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8512 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8513   echo $ECHO_N "(cached) $ECHO_C" >&6
8514 else
8515   eval "$as_ac_Header=\$ac_header_preproc"
8516 fi
8517 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8518 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8519
8520 fi
8521 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8522   cat >>confdefs.h <<_ACEOF
8523 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8524 _ACEOF
8525
8526 fi
8527
8528 done
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
8542 strdup __argz_count __argz_stringify __argz_next
8543 do
8544 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8545 echo "$as_me:$LINENO: checking for $ac_func" >&5
8546 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8547 if eval "test \"\${$as_ac_var+set}\" = set"; then
8548   echo $ECHO_N "(cached) $ECHO_C" >&6
8549 else
8550   cat >conftest.$ac_ext <<_ACEOF
8551 /* confdefs.h.  */
8552 _ACEOF
8553 cat confdefs.h >>conftest.$ac_ext
8554 cat >>conftest.$ac_ext <<_ACEOF
8555 /* end confdefs.h.  */
8556 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8557    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8558 #define $ac_func innocuous_$ac_func
8559
8560 /* System header to define __stub macros and hopefully few prototypes,
8561     which can conflict with char $ac_func (); below.
8562     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8563     <limits.h> exists even on freestanding compilers.  */
8564
8565 #ifdef __STDC__
8566 # include <limits.h>
8567 #else
8568 # include <assert.h>
8569 #endif
8570
8571 #undef $ac_func
8572
8573 /* Override any gcc2 internal prototype to avoid an error.  */
8574 #ifdef __cplusplus
8575 extern "C"
8576 {
8577 #endif
8578 /* We use char because int might match the return type of a gcc2
8579    builtin and then its argument prototype would still apply.  */
8580 char $ac_func ();
8581 /* The GNU C library defines this for functions which it implements
8582     to always fail with ENOSYS.  Some functions are actually named
8583     something starting with __ and the normal name is an alias.  */
8584 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8585 choke me
8586 #else
8587 char (*f) () = $ac_func;
8588 #endif
8589 #ifdef __cplusplus
8590 }
8591 #endif
8592
8593 int
8594 main ()
8595 {
8596 return f != $ac_func;
8597   ;
8598   return 0;
8599 }
8600 _ACEOF
8601 rm -f conftest.$ac_objext conftest$ac_exeext
8602 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8603   (eval $ac_link) 2>conftest.er1
8604   ac_status=$?
8605   grep -v '^ *+' conftest.er1 >conftest.err
8606   rm -f conftest.er1
8607   cat conftest.err >&5
8608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8609   (exit $ac_status); } &&
8610          { ac_try='test -z "$ac_c_werror_flag"
8611                          || test ! -s conftest.err'
8612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8613   (eval $ac_try) 2>&5
8614   ac_status=$?
8615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8616   (exit $ac_status); }; } &&
8617          { ac_try='test -s conftest$ac_exeext'
8618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8619   (eval $ac_try) 2>&5
8620   ac_status=$?
8621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8622   (exit $ac_status); }; }; then
8623   eval "$as_ac_var=yes"
8624 else
8625   echo "$as_me: failed program was:" >&5
8626 sed 's/^/| /' conftest.$ac_ext >&5
8627
8628 eval "$as_ac_var=no"
8629 fi
8630 rm -f conftest.err conftest.$ac_objext \
8631       conftest$ac_exeext conftest.$ac_ext
8632 fi
8633 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8634 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8635 if test `eval echo '${'$as_ac_var'}'` = yes; then
8636   cat >>confdefs.h <<_ACEOF
8637 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8638 _ACEOF
8639
8640 fi
8641 done
8642
8643
8644    if test $ac_cv_header_locale_h = yes; then
8645     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
8646 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
8647 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
8648   echo $ECHO_N "(cached) $ECHO_C" >&6
8649 else
8650   cat >conftest.$ac_ext <<_ACEOF
8651 /* confdefs.h.  */
8652 _ACEOF
8653 cat confdefs.h >>conftest.$ac_ext
8654 cat >>conftest.$ac_ext <<_ACEOF
8655 /* end confdefs.h.  */
8656 #include <locale.h>
8657 int
8658 main ()
8659 {
8660 return LC_MESSAGES
8661   ;
8662   return 0;
8663 }
8664 _ACEOF
8665 rm -f conftest.$ac_objext conftest$ac_exeext
8666 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8667   (eval $ac_link) 2>conftest.er1
8668   ac_status=$?
8669   grep -v '^ *+' conftest.er1 >conftest.err
8670   rm -f conftest.er1
8671   cat conftest.err >&5
8672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8673   (exit $ac_status); } &&
8674          { ac_try='test -z "$ac_c_werror_flag"
8675                          || test ! -s conftest.err'
8676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8677   (eval $ac_try) 2>&5
8678   ac_status=$?
8679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8680   (exit $ac_status); }; } &&
8681          { ac_try='test -s conftest$ac_exeext'
8682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8683   (eval $ac_try) 2>&5
8684   ac_status=$?
8685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8686   (exit $ac_status); }; }; then
8687   am_cv_val_LC_MESSAGES=yes
8688 else
8689   echo "$as_me: failed program was:" >&5
8690 sed 's/^/| /' conftest.$ac_ext >&5
8691
8692 am_cv_val_LC_MESSAGES=no
8693 fi
8694 rm -f conftest.err conftest.$ac_objext \
8695       conftest$ac_exeext conftest.$ac_ext
8696 fi
8697 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
8698 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
8699     if test $am_cv_val_LC_MESSAGES = yes; then
8700
8701 cat >>confdefs.h <<\_ACEOF
8702 #define HAVE_LC_MESSAGES 1
8703 _ACEOF
8704
8705     fi
8706   fi
8707      USE_NLS=yes
8708
8709
8710         nls_cv_force_use_gnu_gettext="no"
8711
8712     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
8713     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
8714                               nls_cv_header_intl=
8715       nls_cv_header_libgt=
8716       CATOBJEXT=NONE
8717
8718       if test "${ac_cv_header_libintl_h+set}" = set; then
8719   echo "$as_me:$LINENO: checking for libintl.h" >&5
8720 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
8721 if test "${ac_cv_header_libintl_h+set}" = set; then
8722   echo $ECHO_N "(cached) $ECHO_C" >&6
8723 fi
8724 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
8725 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
8726 else
8727   # Is the header compilable?
8728 echo "$as_me:$LINENO: checking libintl.h usability" >&5
8729 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
8730 cat >conftest.$ac_ext <<_ACEOF
8731 /* confdefs.h.  */
8732 _ACEOF
8733 cat confdefs.h >>conftest.$ac_ext
8734 cat >>conftest.$ac_ext <<_ACEOF
8735 /* end confdefs.h.  */
8736 $ac_includes_default
8737 #include <libintl.h>
8738 _ACEOF
8739 rm -f conftest.$ac_objext
8740 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8741   (eval $ac_compile) 2>conftest.er1
8742   ac_status=$?
8743   grep -v '^ *+' conftest.er1 >conftest.err
8744   rm -f conftest.er1
8745   cat conftest.err >&5
8746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8747   (exit $ac_status); } &&
8748          { ac_try='test -z "$ac_c_werror_flag"
8749                          || test ! -s conftest.err'
8750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8751   (eval $ac_try) 2>&5
8752   ac_status=$?
8753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8754   (exit $ac_status); }; } &&
8755          { ac_try='test -s conftest.$ac_objext'
8756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8757   (eval $ac_try) 2>&5
8758   ac_status=$?
8759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8760   (exit $ac_status); }; }; then
8761   ac_header_compiler=yes
8762 else
8763   echo "$as_me: failed program was:" >&5
8764 sed 's/^/| /' conftest.$ac_ext >&5
8765
8766 ac_header_compiler=no
8767 fi
8768 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8769 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8770 echo "${ECHO_T}$ac_header_compiler" >&6
8771
8772 # Is the header present?
8773 echo "$as_me:$LINENO: checking libintl.h presence" >&5
8774 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
8775 cat >conftest.$ac_ext <<_ACEOF
8776 /* confdefs.h.  */
8777 _ACEOF
8778 cat confdefs.h >>conftest.$ac_ext
8779 cat >>conftest.$ac_ext <<_ACEOF
8780 /* end confdefs.h.  */
8781 #include <libintl.h>
8782 _ACEOF
8783 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8784   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8785   ac_status=$?
8786   grep -v '^ *+' conftest.er1 >conftest.err
8787   rm -f conftest.er1
8788   cat conftest.err >&5
8789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8790   (exit $ac_status); } >/dev/null; then
8791   if test -s conftest.err; then
8792     ac_cpp_err=$ac_c_preproc_warn_flag
8793     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8794   else
8795     ac_cpp_err=
8796   fi
8797 else
8798   ac_cpp_err=yes
8799 fi
8800 if test -z "$ac_cpp_err"; then
8801   ac_header_preproc=yes
8802 else
8803   echo "$as_me: failed program was:" >&5
8804 sed 's/^/| /' conftest.$ac_ext >&5
8805
8806   ac_header_preproc=no
8807 fi
8808 rm -f conftest.err conftest.$ac_ext
8809 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8810 echo "${ECHO_T}$ac_header_preproc" >&6
8811
8812 # So?  What about this header?
8813 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8814   yes:no: )
8815     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
8816 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8817     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
8818 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
8819     ac_header_preproc=yes
8820     ;;
8821   no:yes:* )
8822     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
8823 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
8824     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
8825 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
8826     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
8827 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
8828     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
8829 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
8830     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
8831 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
8832     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
8833 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
8834     (
8835       cat <<\_ASBOX
8836 ## ------------------------------------------ ##
8837 ## Report this to the AC_PACKAGE_NAME lists.  ##
8838 ## ------------------------------------------ ##
8839 _ASBOX
8840     ) |
8841       sed "s/^/$as_me: WARNING:     /" >&2
8842     ;;
8843 esac
8844 echo "$as_me:$LINENO: checking for libintl.h" >&5
8845 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
8846 if test "${ac_cv_header_libintl_h+set}" = set; then
8847   echo $ECHO_N "(cached) $ECHO_C" >&6
8848 else
8849   ac_cv_header_libintl_h=$ac_header_preproc
8850 fi
8851 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
8852 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
8853
8854 fi
8855 if test $ac_cv_header_libintl_h = yes; then
8856   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
8857 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
8858 if test "${gt_cv_func_dgettext_libc+set}" = set; then
8859   echo $ECHO_N "(cached) $ECHO_C" >&6
8860 else
8861   cat >conftest.$ac_ext <<_ACEOF
8862 /* confdefs.h.  */
8863 _ACEOF
8864 cat confdefs.h >>conftest.$ac_ext
8865 cat >>conftest.$ac_ext <<_ACEOF
8866 /* end confdefs.h.  */
8867 #include <libintl.h>
8868 int
8869 main ()
8870 {
8871 return (int) dgettext ("","")
8872   ;
8873   return 0;
8874 }
8875 _ACEOF
8876 rm -f conftest.$ac_objext conftest$ac_exeext
8877 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8878   (eval $ac_link) 2>conftest.er1
8879   ac_status=$?
8880   grep -v '^ *+' conftest.er1 >conftest.err
8881   rm -f conftest.er1
8882   cat conftest.err >&5
8883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8884   (exit $ac_status); } &&
8885          { ac_try='test -z "$ac_c_werror_flag"
8886                          || test ! -s conftest.err'
8887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8888   (eval $ac_try) 2>&5
8889   ac_status=$?
8890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8891   (exit $ac_status); }; } &&
8892          { ac_try='test -s conftest$ac_exeext'
8893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8894   (eval $ac_try) 2>&5
8895   ac_status=$?
8896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8897   (exit $ac_status); }; }; then
8898   gt_cv_func_dgettext_libc=yes
8899 else
8900   echo "$as_me: failed program was:" >&5
8901 sed 's/^/| /' conftest.$ac_ext >&5
8902
8903 gt_cv_func_dgettext_libc=no
8904 fi
8905 rm -f conftest.err conftest.$ac_objext \
8906       conftest$ac_exeext conftest.$ac_ext
8907 fi
8908 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
8909 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
8910
8911           if test "$gt_cv_func_dgettext_libc" != "yes"; then
8912             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
8913 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
8914 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
8915   echo $ECHO_N "(cached) $ECHO_C" >&6
8916 else
8917   ac_check_lib_save_LIBS=$LIBS
8918 LIBS="-lintl  $LIBS"
8919 cat >conftest.$ac_ext <<_ACEOF
8920 /* confdefs.h.  */
8921 _ACEOF
8922 cat confdefs.h >>conftest.$ac_ext
8923 cat >>conftest.$ac_ext <<_ACEOF
8924 /* end confdefs.h.  */
8925
8926 /* Override any gcc2 internal prototype to avoid an error.  */
8927 #ifdef __cplusplus
8928 extern "C"
8929 #endif
8930 /* We use char because int might match the return type of a gcc2
8931    builtin and then its argument prototype would still apply.  */
8932 char bindtextdomain ();
8933 int
8934 main ()
8935 {
8936 bindtextdomain ();
8937   ;
8938   return 0;
8939 }
8940 _ACEOF
8941 rm -f conftest.$ac_objext conftest$ac_exeext
8942 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8943   (eval $ac_link) 2>conftest.er1
8944   ac_status=$?
8945   grep -v '^ *+' conftest.er1 >conftest.err
8946   rm -f conftest.er1
8947   cat conftest.err >&5
8948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8949   (exit $ac_status); } &&
8950          { ac_try='test -z "$ac_c_werror_flag"
8951                          || test ! -s conftest.err'
8952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8953   (eval $ac_try) 2>&5
8954   ac_status=$?
8955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8956   (exit $ac_status); }; } &&
8957          { ac_try='test -s conftest$ac_exeext'
8958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8959   (eval $ac_try) 2>&5
8960   ac_status=$?
8961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8962   (exit $ac_status); }; }; then
8963   ac_cv_lib_intl_bindtextdomain=yes
8964 else
8965   echo "$as_me: failed program was:" >&5
8966 sed 's/^/| /' conftest.$ac_ext >&5
8967
8968 ac_cv_lib_intl_bindtextdomain=no
8969 fi
8970 rm -f conftest.err conftest.$ac_objext \
8971       conftest$ac_exeext conftest.$ac_ext
8972 LIBS=$ac_check_lib_save_LIBS
8973 fi
8974 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
8975 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
8976 if test $ac_cv_lib_intl_bindtextdomain = yes; then
8977   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
8978 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
8979 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
8980   echo $ECHO_N "(cached) $ECHO_C" >&6
8981 else
8982   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
8983 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
8984 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
8985   echo $ECHO_N "(cached) $ECHO_C" >&6
8986 else
8987   ac_check_lib_save_LIBS=$LIBS
8988 LIBS="-lintl  $LIBS"
8989 cat >conftest.$ac_ext <<_ACEOF
8990 /* confdefs.h.  */
8991 _ACEOF
8992 cat confdefs.h >>conftest.$ac_ext
8993 cat >>conftest.$ac_ext <<_ACEOF
8994 /* end confdefs.h.  */
8995
8996 /* Override any gcc2 internal prototype to avoid an error.  */
8997 #ifdef __cplusplus
8998 extern "C"
8999 #endif
9000 /* We use char because int might match the return type of a gcc2
9001    builtin and then its argument prototype would still apply.  */
9002 char dgettext ();
9003 int
9004 main ()
9005 {
9006 dgettext ();
9007   ;
9008   return 0;
9009 }
9010 _ACEOF
9011 rm -f conftest.$ac_objext conftest$ac_exeext
9012 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9013   (eval $ac_link) 2>conftest.er1
9014   ac_status=$?
9015   grep -v '^ *+' conftest.er1 >conftest.err
9016   rm -f conftest.er1
9017   cat conftest.err >&5
9018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9019   (exit $ac_status); } &&
9020          { ac_try='test -z "$ac_c_werror_flag"
9021                          || test ! -s conftest.err'
9022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9023   (eval $ac_try) 2>&5
9024   ac_status=$?
9025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9026   (exit $ac_status); }; } &&
9027          { ac_try='test -s conftest$ac_exeext'
9028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9029   (eval $ac_try) 2>&5
9030   ac_status=$?
9031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9032   (exit $ac_status); }; }; then
9033   ac_cv_lib_intl_dgettext=yes
9034 else
9035   echo "$as_me: failed program was:" >&5
9036 sed 's/^/| /' conftest.$ac_ext >&5
9037
9038 ac_cv_lib_intl_dgettext=no
9039 fi
9040 rm -f conftest.err conftest.$ac_objext \
9041       conftest$ac_exeext conftest.$ac_ext
9042 LIBS=$ac_check_lib_save_LIBS
9043 fi
9044 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
9045 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
9046 if test $ac_cv_lib_intl_dgettext = yes; then
9047   gt_cv_func_dgettext_libintl=yes
9048 else
9049   gt_cv_func_dgettext_libintl=no
9050 fi
9051
9052 fi
9053 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
9054 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
9055 fi
9056
9057           fi
9058
9059           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
9060             LIBS="$LIBS -lintl";
9061           fi
9062
9063           if test "$gt_cv_func_dgettext_libc" = "yes" \
9064             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
9065
9066 cat >>confdefs.h <<\_ACEOF
9067 #define HAVE_GETTEXT 1
9068 _ACEOF
9069
9070             # Extract the first word of "msgfmt", so it can be a program name with args.
9071 set dummy msgfmt; ac_word=$2
9072 echo "$as_me:$LINENO: checking for $ac_word" >&5
9073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9074 if test "${ac_cv_path_MSGFMT+set}" = set; then
9075   echo $ECHO_N "(cached) $ECHO_C" >&6
9076 else
9077   case "$MSGFMT" in
9078   /*)
9079   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
9080   ;;
9081   *)
9082   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9083   for ac_dir in $PATH; do
9084     test -z "$ac_dir" && ac_dir=.
9085     if test -f $ac_dir/$ac_word; then
9086       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
9087         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
9088         break
9089       fi
9090     fi
9091   done
9092   IFS="$ac_save_ifs"
9093   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
9094   ;;
9095 esac
9096 fi
9097 MSGFMT="$ac_cv_path_MSGFMT"
9098 if test -n "$MSGFMT"; then
9099   echo "$as_me:$LINENO: result: $MSGFMT" >&5
9100 echo "${ECHO_T}$MSGFMT" >&6
9101 else
9102   echo "$as_me:$LINENO: result: no" >&5
9103 echo "${ECHO_T}no" >&6
9104 fi
9105             if test "$MSGFMT" != "no"; then
9106
9107 for ac_func in dcgettext
9108 do
9109 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9110 echo "$as_me:$LINENO: checking for $ac_func" >&5
9111 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9112 if eval "test \"\${$as_ac_var+set}\" = set"; then
9113   echo $ECHO_N "(cached) $ECHO_C" >&6
9114 else
9115   cat >conftest.$ac_ext <<_ACEOF
9116 /* confdefs.h.  */
9117 _ACEOF
9118 cat confdefs.h >>conftest.$ac_ext
9119 cat >>conftest.$ac_ext <<_ACEOF
9120 /* end confdefs.h.  */
9121 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9122    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9123 #define $ac_func innocuous_$ac_func
9124
9125 /* System header to define __stub macros and hopefully few prototypes,
9126     which can conflict with char $ac_func (); below.
9127     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9128     <limits.h> exists even on freestanding compilers.  */
9129
9130 #ifdef __STDC__
9131 # include <limits.h>
9132 #else
9133 # include <assert.h>
9134 #endif
9135
9136 #undef $ac_func
9137
9138 /* Override any gcc2 internal prototype to avoid an error.  */
9139 #ifdef __cplusplus
9140 extern "C"
9141 {
9142 #endif
9143 /* We use char because int might match the return type of a gcc2
9144    builtin and then its argument prototype would still apply.  */
9145 char $ac_func ();
9146 /* The GNU C library defines this for functions which it implements
9147     to always fail with ENOSYS.  Some functions are actually named
9148     something starting with __ and the normal name is an alias.  */
9149 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9150 choke me
9151 #else
9152 char (*f) () = $ac_func;
9153 #endif
9154 #ifdef __cplusplus
9155 }
9156 #endif
9157
9158 int
9159 main ()
9160 {
9161 return f != $ac_func;
9162   ;
9163   return 0;
9164 }
9165 _ACEOF
9166 rm -f conftest.$ac_objext conftest$ac_exeext
9167 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9168   (eval $ac_link) 2>conftest.er1
9169   ac_status=$?
9170   grep -v '^ *+' conftest.er1 >conftest.err
9171   rm -f conftest.er1
9172   cat conftest.err >&5
9173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9174   (exit $ac_status); } &&
9175          { ac_try='test -z "$ac_c_werror_flag"
9176                          || test ! -s conftest.err'
9177   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9178   (eval $ac_try) 2>&5
9179   ac_status=$?
9180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9181   (exit $ac_status); }; } &&
9182          { ac_try='test -s conftest$ac_exeext'
9183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9184   (eval $ac_try) 2>&5
9185   ac_status=$?
9186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9187   (exit $ac_status); }; }; then
9188   eval "$as_ac_var=yes"
9189 else
9190   echo "$as_me: failed program was:" >&5
9191 sed 's/^/| /' conftest.$ac_ext >&5
9192
9193 eval "$as_ac_var=no"
9194 fi
9195 rm -f conftest.err conftest.$ac_objext \
9196       conftest$ac_exeext conftest.$ac_ext
9197 fi
9198 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9199 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9200 if test `eval echo '${'$as_ac_var'}'` = yes; then
9201   cat >>confdefs.h <<_ACEOF
9202 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9203 _ACEOF
9204
9205 fi
9206 done
9207
9208               # Extract the first word of "gmsgfmt", so it can be a program name with args.
9209 set dummy gmsgfmt; ac_word=$2
9210 echo "$as_me:$LINENO: checking for $ac_word" >&5
9211 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9212 if test "${ac_cv_path_GMSGFMT+set}" = set; then
9213   echo $ECHO_N "(cached) $ECHO_C" >&6
9214 else
9215   case $GMSGFMT in
9216   [\\/]* | ?:[\\/]*)
9217   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
9218   ;;
9219   *)
9220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9221 for as_dir in $PATH
9222 do
9223   IFS=$as_save_IFS
9224   test -z "$as_dir" && as_dir=.
9225   for ac_exec_ext in '' $ac_executable_extensions; do
9226   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9227     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
9228     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9229     break 2
9230   fi
9231 done
9232 done
9233
9234   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
9235   ;;
9236 esac
9237 fi
9238 GMSGFMT=$ac_cv_path_GMSGFMT
9239
9240 if test -n "$GMSGFMT"; then
9241   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
9242 echo "${ECHO_T}$GMSGFMT" >&6
9243 else
9244   echo "$as_me:$LINENO: result: no" >&5
9245 echo "${ECHO_T}no" >&6
9246 fi
9247
9248               # Extract the first word of "xgettext", so it can be a program name with args.
9249 set dummy xgettext; ac_word=$2
9250 echo "$as_me:$LINENO: checking for $ac_word" >&5
9251 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9252 if test "${ac_cv_path_XGETTEXT+set}" = set; then
9253   echo $ECHO_N "(cached) $ECHO_C" >&6
9254 else
9255   case "$XGETTEXT" in
9256   /*)
9257   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
9258   ;;
9259   *)
9260   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9261   for ac_dir in $PATH; do
9262     test -z "$ac_dir" && ac_dir=.
9263     if test -f $ac_dir/$ac_word; then
9264       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
9265         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
9266         break
9267       fi
9268     fi
9269   done
9270   IFS="$ac_save_ifs"
9271   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
9272   ;;
9273 esac
9274 fi
9275 XGETTEXT="$ac_cv_path_XGETTEXT"
9276 if test -n "$XGETTEXT"; then
9277   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
9278 echo "${ECHO_T}$XGETTEXT" >&6
9279 else
9280   echo "$as_me:$LINENO: result: no" >&5
9281 echo "${ECHO_T}no" >&6
9282 fi
9283
9284               cat >conftest.$ac_ext <<_ACEOF
9285 /* confdefs.h.  */
9286 _ACEOF
9287 cat confdefs.h >>conftest.$ac_ext
9288 cat >>conftest.$ac_ext <<_ACEOF
9289 /* end confdefs.h.  */
9290
9291 int
9292 main ()
9293 {
9294 extern int _nl_msg_cat_cntr;
9295                              return _nl_msg_cat_cntr
9296   ;
9297   return 0;
9298 }
9299 _ACEOF
9300 rm -f conftest.$ac_objext conftest$ac_exeext
9301 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9302   (eval $ac_link) 2>conftest.er1
9303   ac_status=$?
9304   grep -v '^ *+' conftest.er1 >conftest.err
9305   rm -f conftest.er1
9306   cat conftest.err >&5
9307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9308   (exit $ac_status); } &&
9309          { ac_try='test -z "$ac_c_werror_flag"
9310                          || test ! -s conftest.err'
9311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9312   (eval $ac_try) 2>&5
9313   ac_status=$?
9314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9315   (exit $ac_status); }; } &&
9316          { ac_try='test -s conftest$ac_exeext'
9317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9318   (eval $ac_try) 2>&5
9319   ac_status=$?
9320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9321   (exit $ac_status); }; }; then
9322   CATOBJEXT=.gmo
9323                  DATADIRNAME=share
9324 else
9325   echo "$as_me: failed program was:" >&5
9326 sed 's/^/| /' conftest.$ac_ext >&5
9327
9328 CATOBJEXT=.mo
9329                  DATADIRNAME=lib
9330 fi
9331 rm -f conftest.err conftest.$ac_objext \
9332       conftest$ac_exeext conftest.$ac_ext
9333               INSTOBJEXT=.mo
9334             fi
9335           fi
9336
9337           # Added by Martin Baulig 12/15/98 for libc5 systems
9338           if test "$gt_cv_func_dgettext_libc" != "yes" \
9339             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
9340             INTLLIBS=-lintl
9341             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
9342           fi
9343
9344 fi
9345
9346
9347
9348       if test "$CATOBJEXT" = "NONE"; then
9349                         nls_cv_use_gnu_gettext=yes
9350       fi
9351     fi
9352
9353     if test "$nls_cv_use_gnu_gettext" != "yes"; then
9354
9355 cat >>confdefs.h <<\_ACEOF
9356 #define ENABLE_NLS 1
9357 _ACEOF
9358
9359     else
9360             CATOBJEXT=
9361     fi
9362
9363         if test "$XGETTEXT" != ":"; then
9364                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9365         : ;
9366       else
9367         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
9368 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
9369         XGETTEXT=":"
9370       fi
9371     fi
9372
9373     # We need to process the po/ directory.
9374     POSUB=po
9375
9376               ac_config_commands="$ac_config_commands default-2"
9377
9378
9379                 for lang in $ALL_LINGUAS; do
9380       GMOFILES="$GMOFILES $lang.gmo"
9381       POFILES="$POFILES $lang.po"
9382     done
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396    if test "x$CATOBJEXT" != "x"; then
9397      if test "x$ALL_LINGUAS" = "x"; then
9398        LINGUAS=
9399      else
9400        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9401 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
9402        NEW_LINGUAS=
9403        for lang in ${LINGUAS=$ALL_LINGUAS}; do
9404          case "$ALL_LINGUAS" in
9405           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
9406          esac
9407        done
9408        LINGUAS=$NEW_LINGUAS
9409        echo "$as_me:$LINENO: result: $LINGUAS" >&5
9410 echo "${ECHO_T}$LINGUAS" >&6
9411      fi
9412
9413           if test -n "$LINGUAS"; then
9414        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9415      fi
9416    fi
9417
9418             test -d po || mkdir po
9419    if test "$CATOBJEXT" = ".cat"; then
9420      if test "${ac_cv_header_linux_version_h+set}" = set; then
9421   echo "$as_me:$LINENO: checking for linux/version.h" >&5
9422 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
9423 if test "${ac_cv_header_linux_version_h+set}" = set; then
9424   echo $ECHO_N "(cached) $ECHO_C" >&6
9425 fi
9426 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9427 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
9428 else
9429   # Is the header compilable?
9430 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
9431 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
9432 cat >conftest.$ac_ext <<_ACEOF
9433 /* confdefs.h.  */
9434 _ACEOF
9435 cat confdefs.h >>conftest.$ac_ext
9436 cat >>conftest.$ac_ext <<_ACEOF
9437 /* end confdefs.h.  */
9438 $ac_includes_default
9439 #include <linux/version.h>
9440 _ACEOF
9441 rm -f conftest.$ac_objext
9442 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9443   (eval $ac_compile) 2>conftest.er1
9444   ac_status=$?
9445   grep -v '^ *+' conftest.er1 >conftest.err
9446   rm -f conftest.er1
9447   cat conftest.err >&5
9448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9449   (exit $ac_status); } &&
9450          { ac_try='test -z "$ac_c_werror_flag"
9451                          || test ! -s conftest.err'
9452   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9453   (eval $ac_try) 2>&5
9454   ac_status=$?
9455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9456   (exit $ac_status); }; } &&
9457          { ac_try='test -s conftest.$ac_objext'
9458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9459   (eval $ac_try) 2>&5
9460   ac_status=$?
9461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9462   (exit $ac_status); }; }; then
9463   ac_header_compiler=yes
9464 else
9465   echo "$as_me: failed program was:" >&5
9466 sed 's/^/| /' conftest.$ac_ext >&5
9467
9468 ac_header_compiler=no
9469 fi
9470 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9471 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9472 echo "${ECHO_T}$ac_header_compiler" >&6
9473
9474 # Is the header present?
9475 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
9476 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
9477 cat >conftest.$ac_ext <<_ACEOF
9478 /* confdefs.h.  */
9479 _ACEOF
9480 cat confdefs.h >>conftest.$ac_ext
9481 cat >>conftest.$ac_ext <<_ACEOF
9482 /* end confdefs.h.  */
9483 #include <linux/version.h>
9484 _ACEOF
9485 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9486   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9487   ac_status=$?
9488   grep -v '^ *+' conftest.er1 >conftest.err
9489   rm -f conftest.er1
9490   cat conftest.err >&5
9491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9492   (exit $ac_status); } >/dev/null; then
9493   if test -s conftest.err; then
9494     ac_cpp_err=$ac_c_preproc_warn_flag
9495     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9496   else
9497     ac_cpp_err=
9498   fi
9499 else
9500   ac_cpp_err=yes
9501 fi
9502 if test -z "$ac_cpp_err"; then
9503   ac_header_preproc=yes
9504 else
9505   echo "$as_me: failed program was:" >&5
9506 sed 's/^/| /' conftest.$ac_ext >&5
9507
9508   ac_header_preproc=no
9509 fi
9510 rm -f conftest.err conftest.$ac_ext
9511 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9512 echo "${ECHO_T}$ac_header_preproc" >&6
9513
9514 # So?  What about this header?
9515 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9516   yes:no: )
9517     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
9518 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9519     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
9520 echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
9521     ac_header_preproc=yes
9522     ;;
9523   no:yes:* )
9524     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
9525 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
9526     { echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
9527 echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
9528     { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
9529 echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
9530     { echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
9531 echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9532     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
9533 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
9534     { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
9535 echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
9536     (
9537       cat <<\_ASBOX
9538 ## ------------------------------------------ ##
9539 ## Report this to the AC_PACKAGE_NAME lists.  ##
9540 ## ------------------------------------------ ##
9541 _ASBOX
9542     ) |
9543       sed "s/^/$as_me: WARNING:     /" >&2
9544     ;;
9545 esac
9546 echo "$as_me:$LINENO: checking for linux/version.h" >&5
9547 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
9548 if test "${ac_cv_header_linux_version_h+set}" = set; then
9549   echo $ECHO_N "(cached) $ECHO_C" >&6
9550 else
9551   ac_cv_header_linux_version_h=$ac_header_preproc
9552 fi
9553 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9554 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
9555
9556 fi
9557 if test $ac_cv_header_linux_version_h = yes; then
9558   msgformat=linux
9559 else
9560   msgformat=xopen
9561 fi
9562
9563
9564
9565                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
9566    fi
9567
9568             MKINSTALLDIRS=
9569 #
9570 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
9571 #
9572 #   if test -n "$ac_aux_dir"; then
9573 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
9574 #   fi
9575    if test -z "$MKINSTALLDIRS"; then
9576      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
9577    fi
9578
9579    # jwz: you know what, screw it.  Let's just use the version that I
9580    # already computed in configure.in, instead of this version that came
9581    # with the i18n crud, ok?
9582    MKINSTALLDIRS="$INSTALL_DIRS"
9583
9584
9585
9586
9587          test -d po || mkdir po
9588    if test "x$srcdir" != "x."; then
9589      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
9590        posrcprefix="$srcdir/"
9591      else
9592        posrcprefix="../$srcdir/"
9593      fi
9594    else
9595      posrcprefix="../"
9596    fi
9597    rm -f po/POTFILES
9598    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
9599         < $srcdir/po/POTFILES.in > po/POTFILES
9600
9601 MKINSTALLDIRS="$INSTALL_DIRS"
9602
9603
9604 ###############################################################################
9605 #
9606 #       Check for -lXmu (some fucked up vendors don't ship it...)
9607 #
9608 ###############################################################################
9609
9610 have_xmu=no
9611
9612   ac_save_CPPFLAGS="$CPPFLAGS"
9613   if test \! -z "$includedir" ; then
9614     CPPFLAGS="$CPPFLAGS -I$includedir"
9615   fi
9616   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9617   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
9618 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
9619 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
9620   echo $ECHO_N "(cached) $ECHO_C" >&6
9621 else
9622   cat >conftest.$ac_ext <<_ACEOF
9623 /* confdefs.h.  */
9624 _ACEOF
9625 cat confdefs.h >>conftest.$ac_ext
9626 cat >>conftest.$ac_ext <<_ACEOF
9627 /* end confdefs.h.  */
9628 #include <stdlib.h>
9629                    #include <stdio.h>
9630                    #include <X11/Intrinsic.h>
9631
9632 #include <X11/Xmu/Error.h>
9633 _ACEOF
9634 rm -f conftest.$ac_objext
9635 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9636   (eval $ac_compile) 2>conftest.er1
9637   ac_status=$?
9638   grep -v '^ *+' conftest.er1 >conftest.err
9639   rm -f conftest.er1
9640   cat conftest.err >&5
9641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9642   (exit $ac_status); } &&
9643          { ac_try='test -z "$ac_c_werror_flag"
9644                          || test ! -s conftest.err'
9645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9646   (eval $ac_try) 2>&5
9647   ac_status=$?
9648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9649   (exit $ac_status); }; } &&
9650          { ac_try='test -s conftest.$ac_objext'
9651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9652   (eval $ac_try) 2>&5
9653   ac_status=$?
9654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9655   (exit $ac_status); }; }; then
9656   ac_cv_header_X11_Xmu_Error_h=yes
9657 else
9658   echo "$as_me: failed program was:" >&5
9659 sed 's/^/| /' conftest.$ac_ext >&5
9660
9661 ac_cv_header_X11_Xmu_Error_h=no
9662 fi
9663 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9664 fi
9665 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
9666 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
9667 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
9668   have_xmu=yes
9669 fi
9670
9671
9672   CPPFLAGS="$ac_save_CPPFLAGS"
9673 if test "$have_xmu" = no ; then
9674   XMU_SRCS='$(UTILS_SRC)/xmu.c'
9675   XMU_OBJS='$(UTILS_BIN)/xmu.o'
9676   XMU_LIBS=''
9677 else
9678   XMU_SRCS=''
9679   XMU_OBJS=''
9680   XMU_LIBS='-lXmu'
9681   cat >>confdefs.h <<\_ACEOF
9682 #define HAVE_XMU 1
9683 _ACEOF
9684
9685 fi
9686
9687
9688 ###############################################################################
9689 #
9690 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
9691 #       See comp.windows.x FAQ question 124.  The right fix is to
9692 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
9693 #
9694 ###############################################################################
9695
9696 if test "$have_xmu" = yes ; then
9697   case "$host" in
9698     *-sunos4*)
9699     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
9700 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
9701 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
9702   echo $ECHO_N "(cached) $ECHO_C" >&6
9703 else
9704   ac_save_LDFLAGS="$LDFLAGS"
9705                     if test \! -z "$x_libraries" ; then
9706                       LDFLAGS="$LDFLAGS -L$x_libraries"
9707                     fi
9708                     # Note: this trick never works!  (Generally.)
9709                     # We're only getting away with using AC_TRY_LINK
9710                     # with X libraries because we know it's SunOS.
9711                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
9712                     cat >conftest.$ac_ext <<_ACEOF
9713 /* confdefs.h.  */
9714 _ACEOF
9715 cat confdefs.h >>conftest.$ac_ext
9716 cat >>conftest.$ac_ext <<_ACEOF
9717 /* end confdefs.h.  */
9718
9719 int
9720 main ()
9721 {
9722
9723   ;
9724   return 0;
9725 }
9726 _ACEOF
9727 rm -f conftest.$ac_objext conftest$ac_exeext
9728 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9729   (eval $ac_link) 2>conftest.er1
9730   ac_status=$?
9731   grep -v '^ *+' conftest.er1 >conftest.err
9732   rm -f conftest.er1
9733   cat conftest.err >&5
9734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9735   (exit $ac_status); } &&
9736          { ac_try='test -z "$ac_c_werror_flag"
9737                          || test ! -s conftest.err'
9738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9739   (eval $ac_try) 2>&5
9740   ac_status=$?
9741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9742   (exit $ac_status); }; } &&
9743          { ac_try='test -s conftest$ac_exeext'
9744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9745   (eval $ac_try) 2>&5
9746   ac_status=$?
9747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9748   (exit $ac_status); }; }; then
9749   ac_cv_sunos_xmu_bug=no
9750 else
9751   echo "$as_me: failed program was:" >&5
9752 sed 's/^/| /' conftest.$ac_ext >&5
9753
9754 ac_cv_sunos_xmu_bug=yes
9755 fi
9756 rm -f conftest.err conftest.$ac_objext \
9757       conftest$ac_exeext conftest.$ac_ext
9758                     LDFLAGS="$ac_save_LDFLAGS"
9759 fi
9760 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
9761 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
9762     if test "$ac_cv_sunos_xmu_bug" = yes ; then
9763       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
9764 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
9765 if test "${ac_cv_ld_static+set}" = set; then
9766   echo $ECHO_N "(cached) $ECHO_C" >&6
9767 else
9768   ac_save_LDFLAGS="$LDFLAGS"
9769                       LDFLAGS="$LDFLAGS -static"
9770                       cat >conftest.$ac_ext <<_ACEOF
9771 /* confdefs.h.  */
9772 _ACEOF
9773 cat confdefs.h >>conftest.$ac_ext
9774 cat >>conftest.$ac_ext <<_ACEOF
9775 /* end confdefs.h.  */
9776
9777 int
9778 main ()
9779 {
9780
9781   ;
9782   return 0;
9783 }
9784 _ACEOF
9785 rm -f conftest.$ac_objext conftest$ac_exeext
9786 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9787   (eval $ac_link) 2>conftest.er1
9788   ac_status=$?
9789   grep -v '^ *+' conftest.er1 >conftest.err
9790   rm -f conftest.er1
9791   cat conftest.err >&5
9792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9793   (exit $ac_status); } &&
9794          { ac_try='test -z "$ac_c_werror_flag"
9795                          || test ! -s conftest.err'
9796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9797   (eval $ac_try) 2>&5
9798   ac_status=$?
9799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9800   (exit $ac_status); }; } &&
9801          { ac_try='test -s conftest$ac_exeext'
9802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9803   (eval $ac_try) 2>&5
9804   ac_status=$?
9805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9806   (exit $ac_status); }; }; then
9807   ac_cv_ld_static=yes
9808 else
9809   echo "$as_me: failed program was:" >&5
9810 sed 's/^/| /' conftest.$ac_ext >&5
9811
9812 ac_cv_ld_static=no
9813 fi
9814 rm -f conftest.err conftest.$ac_objext \
9815       conftest$ac_exeext conftest.$ac_ext
9816                     LDFLAGS="$ac_save_LDFLAGS"
9817 fi
9818 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
9819 echo "${ECHO_T}$ac_cv_ld_static" >&6
9820       if test "$ac_cv_ld_static" = yes ; then
9821         LDFLAGS="$LDFLAGS -static"
9822       else
9823         LDFLAGS="$LDFLAGS -Bstatic"
9824       fi
9825     fi
9826     ;;
9827   esac
9828 fi
9829
9830
9831 ###############################################################################
9832 #
9833 #       Handle the --with-hackdir option
9834 #
9835 ###############################################################################
9836
9837 have_hackdir=yes
9838 with_hackdir_req=unspecified
9839
9840 # Check whether --with-hackdir or --without-hackdir was given.
9841 if test "${with_hackdir+set}" = set; then
9842   withval="$with_hackdir"
9843   with_hackdir="$withval"; with_hackdir_req="$withval"
9844 else
9845   with_hackdir=yes
9846 fi;
9847
9848 if test x"$with_hackdir" = xyes; then
9849   HACKDIR='${libexecdir}/xscreensaver'
9850 elif test x"$with_hackdir" = xno; then
9851   HACKDIR='${bindir}'
9852 else
9853   HACKDIR=$with_hackdir
9854 fi
9855
9856 # canonicalize slashes.
9857 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
9858
9859 # Expand HACKDIR as HACKDIR_FULL
9860 eval HACKDIR_FULL=${HACKDIR}
9861 eval HACKDIR_FULL=${HACKDIR_FULL}
9862 eval HACKDIR_FULL=${HACKDIR_FULL}
9863
9864 # This option used to be called --enable-subdir; make sure that is no longer
9865 # used, since configure brain-damagedly ignores unknown --enable options.
9866
9867 obsolete_enable=
9868 # Check whether --enable-subdir or --disable-subdir was given.
9869 if test "${enable_subdir+set}" = set; then
9870   enableval="$enable_subdir"
9871   obsolete_enable=yes
9872 fi;
9873 if test -n "$obsolete_enable"; then
9874   echo "error: the --enable-subdir option has been replaced with"
9875   echo "       the new --with-hackdir option; see \`configure --help'"
9876   echo "       for more information."
9877   exit 1
9878 fi
9879
9880
9881 ###############################################################################
9882 #
9883 #       Handle the --with-configdir option
9884 #       Help for --with-x-app-defaults option added..
9885 #
9886 ###############################################################################
9887
9888 have_configdir=yes
9889 with_configdir_req=unspecified
9890
9891 # Check whether --with-configdir or --without-configdir was given.
9892 if test "${with_configdir+set}" = set; then
9893   withval="$with_configdir"
9894   with_configdir="$withval"; with_configdir_req="$withval"
9895 else
9896   with_configdir=yes
9897 fi;
9898
9899 if test x"$with_configdir" = xyes; then
9900   HACK_CONF_DIR='${datadir}/xscreensaver/config'
9901 elif test x"$with_configdir" = xno; then
9902   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
9903   exit 1
9904 else
9905   # there must be a better way than this...
9906   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
9907     # absolute path
9908     HACK_CONF_DIR=$with_configdir
9909   else
9910     # relative path
9911     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
9912   fi
9913 fi
9914
9915
9916
9917
9918 ###############################################################################
9919 #
9920 #       Check for the SGI SCREEN_SAVER server extension.
9921 #
9922 ###############################################################################
9923
9924 have_sgi=no
9925 with_sgi_req=unspecified
9926
9927 # Check whether --with-sgi-ext or --without-sgi-ext was given.
9928 if test "${with_sgi_ext+set}" = set; then
9929   withval="$with_sgi_ext"
9930   with_sgi="$withval"; with_sgi_req="$withval"
9931 else
9932   with_sgi=yes
9933 fi;
9934
9935
9936    case "$with_sgi" in
9937     yes) ;;
9938     no)  ;;
9939
9940     /*)
9941      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
9942 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
9943      d=$with_sgi/include
9944      if test -d $d; then
9945        X_CFLAGS="-I$d $X_CFLAGS"
9946        echo "$as_me:$LINENO: result: $d" >&5
9947 echo "${ECHO_T}$d" >&6
9948      else
9949        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9950 echo "${ECHO_T}not found ($d: no such directory)" >&6
9951      fi
9952
9953      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
9954 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
9955      d=$with_sgi/lib
9956      if test -d $d; then
9957        X_LIBS="-L$d $X_LIBS"
9958        echo "$as_me:$LINENO: result: $d" >&5
9959 echo "${ECHO_T}$d" >&6
9960      else
9961        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9962 echo "${ECHO_T}not found ($d: no such directory)" >&6
9963      fi
9964
9965      # replace the directory string with "yes".
9966      with_sgi_req="yes"
9967      with_sgi=$with_sgi_req
9968      ;;
9969
9970     *)
9971      echo ""
9972      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
9973      echo "       If it is a directory, then \`DIR/include' will be added to"
9974      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9975      exit 1
9976      ;;
9977    esac
9978
9979
9980 if test "$with_sgi" = yes; then
9981
9982   ac_save_CPPFLAGS="$CPPFLAGS"
9983   if test \! -z "$includedir" ; then
9984     CPPFLAGS="$CPPFLAGS -I$includedir"
9985   fi
9986   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9987   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
9988 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
9989 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
9990   echo $ECHO_N "(cached) $ECHO_C" >&6
9991 else
9992   cat >conftest.$ac_ext <<_ACEOF
9993 /* confdefs.h.  */
9994 _ACEOF
9995 cat confdefs.h >>conftest.$ac_ext
9996 cat >>conftest.$ac_ext <<_ACEOF
9997 /* end confdefs.h.  */
9998 #include <X11/Xlib.h>
9999
10000 #include <X11/extensions/XScreenSaver.h>
10001 _ACEOF
10002 rm -f conftest.$ac_objext
10003 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10004   (eval $ac_compile) 2>conftest.er1
10005   ac_status=$?
10006   grep -v '^ *+' conftest.er1 >conftest.err
10007   rm -f conftest.er1
10008   cat conftest.err >&5
10009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10010   (exit $ac_status); } &&
10011          { ac_try='test -z "$ac_c_werror_flag"
10012                          || test ! -s conftest.err'
10013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10014   (eval $ac_try) 2>&5
10015   ac_status=$?
10016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017   (exit $ac_status); }; } &&
10018          { ac_try='test -s conftest.$ac_objext'
10019   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10020   (eval $ac_try) 2>&5
10021   ac_status=$?
10022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10023   (exit $ac_status); }; }; then
10024   ac_cv_header_X11_extensions_XScreenSaver_h=yes
10025 else
10026   echo "$as_me: failed program was:" >&5
10027 sed 's/^/| /' conftest.$ac_ext >&5
10028
10029 ac_cv_header_X11_extensions_XScreenSaver_h=no
10030 fi
10031 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10032 fi
10033 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
10034 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
10035 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
10036   have_sgi=yes
10037                      cat >>confdefs.h <<\_ACEOF
10038 #define HAVE_SGI_SAVER_EXTENSION 1
10039 _ACEOF
10040
10041 fi
10042
10043
10044   CPPFLAGS="$ac_save_CPPFLAGS"
10045
10046 elif test "$with_sgi" != no; then
10047   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
10048   exit 1
10049 fi
10050
10051
10052 ###############################################################################
10053 #
10054 #       Check for the XIDLE server extension.
10055 #
10056 ###############################################################################
10057
10058 have_xidle=no
10059 with_xidle_req=unspecified
10060
10061 # Check whether --with-xidle-ext or --without-xidle-ext was given.
10062 if test "${with_xidle_ext+set}" = set; then
10063   withval="$with_xidle_ext"
10064   with_xidle="$withval"; with_xidle_req="$withval"
10065 else
10066   with_xidle=yes
10067 fi;
10068
10069
10070    case "$with_xidle" in
10071     yes) ;;
10072     no)  ;;
10073
10074     /*)
10075      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
10076 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
10077      d=$with_xidle/include
10078      if test -d $d; then
10079        X_CFLAGS="-I$d $X_CFLAGS"
10080        echo "$as_me:$LINENO: result: $d" >&5
10081 echo "${ECHO_T}$d" >&6
10082      else
10083        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10084 echo "${ECHO_T}not found ($d: no such directory)" >&6
10085      fi
10086
10087      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
10088 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
10089      d=$with_xidle/lib
10090      if test -d $d; then
10091        X_LIBS="-L$d $X_LIBS"
10092        echo "$as_me:$LINENO: result: $d" >&5
10093 echo "${ECHO_T}$d" >&6
10094      else
10095        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10096 echo "${ECHO_T}not found ($d: no such directory)" >&6
10097      fi
10098
10099      # replace the directory string with "yes".
10100      with_xidle_req="yes"
10101      with_xidle=$with_xidle_req
10102      ;;
10103
10104     *)
10105      echo ""
10106      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
10107      echo "       If it is a directory, then \`DIR/include' will be added to"
10108      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10109      exit 1
10110      ;;
10111    esac
10112
10113
10114 if test "$with_xidle" = yes; then
10115
10116   ac_save_CPPFLAGS="$CPPFLAGS"
10117   if test \! -z "$includedir" ; then
10118     CPPFLAGS="$CPPFLAGS -I$includedir"
10119   fi
10120   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10121   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
10122 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
10123 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
10124   echo $ECHO_N "(cached) $ECHO_C" >&6
10125 else
10126   cat >conftest.$ac_ext <<_ACEOF
10127 /* confdefs.h.  */
10128 _ACEOF
10129 cat confdefs.h >>conftest.$ac_ext
10130 cat >>conftest.$ac_ext <<_ACEOF
10131 /* end confdefs.h.  */
10132 #include <X11/Xlib.h>
10133
10134 #include <X11/extensions/xidle.h>
10135 _ACEOF
10136 rm -f conftest.$ac_objext
10137 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10138   (eval $ac_compile) 2>conftest.er1
10139   ac_status=$?
10140   grep -v '^ *+' conftest.er1 >conftest.err
10141   rm -f conftest.er1
10142   cat conftest.err >&5
10143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10144   (exit $ac_status); } &&
10145          { ac_try='test -z "$ac_c_werror_flag"
10146                          || test ! -s conftest.err'
10147   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10148   (eval $ac_try) 2>&5
10149   ac_status=$?
10150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10151   (exit $ac_status); }; } &&
10152          { ac_try='test -s conftest.$ac_objext'
10153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10154   (eval $ac_try) 2>&5
10155   ac_status=$?
10156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10157   (exit $ac_status); }; }; then
10158   ac_cv_header_X11_extensions_xidle_h=yes
10159 else
10160   echo "$as_me: failed program was:" >&5
10161 sed 's/^/| /' conftest.$ac_ext >&5
10162
10163 ac_cv_header_X11_extensions_xidle_h=no
10164 fi
10165 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10166 fi
10167 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
10168 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
10169 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
10170   have_xidle=yes
10171                      cat >>confdefs.h <<\_ACEOF
10172 #define HAVE_XIDLE_EXTENSION 1
10173 _ACEOF
10174
10175 fi
10176
10177
10178   CPPFLAGS="$ac_save_CPPFLAGS"
10179 elif test "$with_xidle" != no; then
10180   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
10181   exit 1
10182 fi
10183
10184
10185 ###############################################################################
10186 #
10187 #       Check for the SGI-VIDEO-CONTROL server extension.
10188 #
10189 ###############################################################################
10190
10191 have_sgivc=no
10192 with_sgivc_req=unspecified
10193
10194 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
10195 if test "${with_sgivc_ext+set}" = set; then
10196   withval="$with_sgivc_ext"
10197   with_sgivc="$withval"; with_sgivc_req="$withval"
10198 else
10199   with_sgivc=yes
10200 fi;
10201
10202
10203    case "$with_sgivc" in
10204     yes) ;;
10205     no)  ;;
10206
10207     /*)
10208      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
10209 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
10210      d=$with_sgivc/include
10211      if test -d $d; then
10212        X_CFLAGS="-I$d $X_CFLAGS"
10213        echo "$as_me:$LINENO: result: $d" >&5
10214 echo "${ECHO_T}$d" >&6
10215      else
10216        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10217 echo "${ECHO_T}not found ($d: no such directory)" >&6
10218      fi
10219
10220      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
10221 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
10222      d=$with_sgivc/lib
10223      if test -d $d; then
10224        X_LIBS="-L$d $X_LIBS"
10225        echo "$as_me:$LINENO: result: $d" >&5
10226 echo "${ECHO_T}$d" >&6
10227      else
10228        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10229 echo "${ECHO_T}not found ($d: no such directory)" >&6
10230      fi
10231
10232      # replace the directory string with "yes".
10233      with_sgivc_req="yes"
10234      with_sgivc=$with_sgivc_req
10235      ;;
10236
10237     *)
10238      echo ""
10239      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
10240      echo "       If it is a directory, then \`DIR/include' will be added to"
10241      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10242      exit 1
10243      ;;
10244    esac
10245
10246
10247 if test "$with_sgivc" = yes; then
10248
10249   # first check for XSGIvc.h
10250
10251   ac_save_CPPFLAGS="$CPPFLAGS"
10252   if test \! -z "$includedir" ; then
10253     CPPFLAGS="$CPPFLAGS -I$includedir"
10254   fi
10255   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10256   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
10257 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
10258 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
10259   echo $ECHO_N "(cached) $ECHO_C" >&6
10260 else
10261   cat >conftest.$ac_ext <<_ACEOF
10262 /* confdefs.h.  */
10263 _ACEOF
10264 cat confdefs.h >>conftest.$ac_ext
10265 cat >>conftest.$ac_ext <<_ACEOF
10266 /* end confdefs.h.  */
10267 #include <X11/Xlib.h>
10268
10269 #include <X11/extensions/XSGIvc.h>
10270 _ACEOF
10271 rm -f conftest.$ac_objext
10272 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10273   (eval $ac_compile) 2>conftest.er1
10274   ac_status=$?
10275   grep -v '^ *+' conftest.er1 >conftest.err
10276   rm -f conftest.er1
10277   cat conftest.err >&5
10278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10279   (exit $ac_status); } &&
10280          { ac_try='test -z "$ac_c_werror_flag"
10281                          || test ! -s conftest.err'
10282   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10283   (eval $ac_try) 2>&5
10284   ac_status=$?
10285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10286   (exit $ac_status); }; } &&
10287          { ac_try='test -s conftest.$ac_objext'
10288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10289   (eval $ac_try) 2>&5
10290   ac_status=$?
10291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10292   (exit $ac_status); }; }; then
10293   ac_cv_header_X11_extensions_XSGIvc_h=yes
10294 else
10295   echo "$as_me: failed program was:" >&5
10296 sed 's/^/| /' conftest.$ac_ext >&5
10297
10298 ac_cv_header_X11_extensions_XSGIvc_h=no
10299 fi
10300 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10301 fi
10302 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
10303 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
10304 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
10305   have_sgivc=yes
10306 fi
10307
10308
10309   CPPFLAGS="$ac_save_CPPFLAGS"
10310
10311   # if that succeeded, then check for the -lXsgivc
10312   if test "$have_sgivc" = yes; then
10313     have_sgivc=no
10314
10315   ac_save_CPPFLAGS="$CPPFLAGS"
10316   ac_save_LDFLAGS="$LDFLAGS"
10317 #  ac_save_LIBS="$LIBS"
10318
10319   if test \! -z "$includedir" ; then
10320     CPPFLAGS="$CPPFLAGS -I$includedir"
10321   fi
10322   # note: $X_CFLAGS includes $x_includes
10323   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10324
10325   if test \! -z "$libdir" ; then
10326     LDFLAGS="$LDFLAGS -L$libdir"
10327   fi
10328   # note: $X_LIBS includes $x_libraries
10329   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10330
10331   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
10332 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
10333 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
10334   echo $ECHO_N "(cached) $ECHO_C" >&6
10335 else
10336   ac_check_lib_save_LIBS=$LIBS
10337 LIBS="-lXsgivc -lXext -lX11 $LIBS"
10338 cat >conftest.$ac_ext <<_ACEOF
10339 /* confdefs.h.  */
10340 _ACEOF
10341 cat confdefs.h >>conftest.$ac_ext
10342 cat >>conftest.$ac_ext <<_ACEOF
10343 /* end confdefs.h.  */
10344
10345 /* Override any gcc2 internal prototype to avoid an error.  */
10346 #ifdef __cplusplus
10347 extern "C"
10348 #endif
10349 /* We use char because int might match the return type of a gcc2
10350    builtin and then its argument prototype would still apply.  */
10351 char XSGIvcQueryGammaMap ();
10352 int
10353 main ()
10354 {
10355 XSGIvcQueryGammaMap ();
10356   ;
10357   return 0;
10358 }
10359 _ACEOF
10360 rm -f conftest.$ac_objext conftest$ac_exeext
10361 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10362   (eval $ac_link) 2>conftest.er1
10363   ac_status=$?
10364   grep -v '^ *+' conftest.er1 >conftest.err
10365   rm -f conftest.er1
10366   cat conftest.err >&5
10367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10368   (exit $ac_status); } &&
10369          { ac_try='test -z "$ac_c_werror_flag"
10370                          || test ! -s conftest.err'
10371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10372   (eval $ac_try) 2>&5
10373   ac_status=$?
10374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10375   (exit $ac_status); }; } &&
10376          { ac_try='test -s conftest$ac_exeext'
10377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10378   (eval $ac_try) 2>&5
10379   ac_status=$?
10380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10381   (exit $ac_status); }; }; then
10382   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
10383 else
10384   echo "$as_me: failed program was:" >&5
10385 sed 's/^/| /' conftest.$ac_ext >&5
10386
10387 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
10388 fi
10389 rm -f conftest.err conftest.$ac_objext \
10390       conftest$ac_exeext conftest.$ac_ext
10391 LIBS=$ac_check_lib_save_LIBS
10392 fi
10393 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
10394 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
10395 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
10396   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
10397 else
10398   true
10399 fi
10400
10401   CPPFLAGS="$ac_save_CPPFLAGS"
10402   LDFLAGS="$ac_save_LDFLAGS"
10403 #  LIBS="$ac_save_LIBS"
10404
10405   fi
10406
10407   # if that succeeded, then we've really got it.
10408   if test "$have_sgivc" = yes; then
10409     cat >>confdefs.h <<\_ACEOF
10410 #define HAVE_SGI_VC_EXTENSION 1
10411 _ACEOF
10412
10413   fi
10414
10415 elif test "$with_sgivc" != no; then
10416   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10417   exit 1
10418 fi
10419
10420
10421 ###############################################################################
10422 #
10423 #       Check for the DPMS server extension.
10424 #
10425 ###############################################################################
10426
10427 have_dpms=no
10428 with_dpms_req=unspecified
10429
10430 # Check whether --with-dpms-ext or --without-dpms-ext was given.
10431 if test "${with_dpms_ext+set}" = set; then
10432   withval="$with_dpms_ext"
10433   with_dpms="$withval"; with_dpms_req="$withval"
10434 else
10435   with_dpms=yes
10436 fi;
10437
10438
10439    case "$with_dpms" in
10440     yes) ;;
10441     no)  ;;
10442
10443     /*)
10444      echo "$as_me:$LINENO: checking for DPMS headers" >&5
10445 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
10446      d=$with_dpms/include
10447      if test -d $d; then
10448        X_CFLAGS="-I$d $X_CFLAGS"
10449        echo "$as_me:$LINENO: result: $d" >&5
10450 echo "${ECHO_T}$d" >&6
10451      else
10452        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10453 echo "${ECHO_T}not found ($d: no such directory)" >&6
10454      fi
10455
10456      echo "$as_me:$LINENO: checking for DPMS libs" >&5
10457 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
10458      d=$with_dpms/lib
10459      if test -d $d; then
10460        X_LIBS="-L$d $X_LIBS"
10461        echo "$as_me:$LINENO: result: $d" >&5
10462 echo "${ECHO_T}$d" >&6
10463      else
10464        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10465 echo "${ECHO_T}not found ($d: no such directory)" >&6
10466      fi
10467
10468      # replace the directory string with "yes".
10469      with_dpms_req="yes"
10470      with_dpms=$with_dpms_req
10471      ;;
10472
10473     *)
10474      echo ""
10475      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
10476      echo "       If it is a directory, then \`DIR/include' will be added to"
10477      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10478      exit 1
10479      ;;
10480    esac
10481
10482
10483 if test "$with_dpms" = yes; then
10484
10485   # first check for dpms.h
10486
10487   ac_save_CPPFLAGS="$CPPFLAGS"
10488   if test \! -z "$includedir" ; then
10489     CPPFLAGS="$CPPFLAGS -I$includedir"
10490   fi
10491   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10492   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
10493 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
10494 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
10495   echo $ECHO_N "(cached) $ECHO_C" >&6
10496 else
10497   cat >conftest.$ac_ext <<_ACEOF
10498 /* confdefs.h.  */
10499 _ACEOF
10500 cat confdefs.h >>conftest.$ac_ext
10501 cat >>conftest.$ac_ext <<_ACEOF
10502 /* end confdefs.h.  */
10503 #include <X11/Xlib.h>
10504                      #include <X11/Xmd.h>
10505
10506 #include <X11/extensions/dpms.h>
10507 _ACEOF
10508 rm -f conftest.$ac_objext
10509 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10510   (eval $ac_compile) 2>conftest.er1
10511   ac_status=$?
10512   grep -v '^ *+' conftest.er1 >conftest.err
10513   rm -f conftest.er1
10514   cat conftest.err >&5
10515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10516   (exit $ac_status); } &&
10517          { ac_try='test -z "$ac_c_werror_flag"
10518                          || test ! -s conftest.err'
10519   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10520   (eval $ac_try) 2>&5
10521   ac_status=$?
10522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10523   (exit $ac_status); }; } &&
10524          { ac_try='test -s conftest.$ac_objext'
10525   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10526   (eval $ac_try) 2>&5
10527   ac_status=$?
10528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10529   (exit $ac_status); }; }; then
10530   ac_cv_header_X11_extensions_dpms_h=yes
10531 else
10532   echo "$as_me: failed program was:" >&5
10533 sed 's/^/| /' conftest.$ac_ext >&5
10534
10535 ac_cv_header_X11_extensions_dpms_h=no
10536 fi
10537 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10538 fi
10539 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
10540 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
10541 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
10542   have_dpms=yes
10543 fi
10544
10545
10546   CPPFLAGS="$ac_save_CPPFLAGS"
10547
10548   # if that succeeded, then check for the DPMS code in the libraries
10549   if test "$have_dpms" = yes; then
10550
10551     # first look in -lXext (this is where it is with XFree86 4.0)
10552     have_dpms=no
10553
10554   ac_save_CPPFLAGS="$CPPFLAGS"
10555   ac_save_LDFLAGS="$LDFLAGS"
10556 #  ac_save_LIBS="$LIBS"
10557
10558   if test \! -z "$includedir" ; then
10559     CPPFLAGS="$CPPFLAGS -I$includedir"
10560   fi
10561   # note: $X_CFLAGS includes $x_includes
10562   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10563
10564   if test \! -z "$libdir" ; then
10565     LDFLAGS="$LDFLAGS -L$libdir"
10566   fi
10567   # note: $X_LIBS includes $x_libraries
10568   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10569
10570   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
10571 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
10572 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
10573   echo $ECHO_N "(cached) $ECHO_C" >&6
10574 else
10575   ac_check_lib_save_LIBS=$LIBS
10576 LIBS="-lXext -lXext -lX11 $LIBS"
10577 cat >conftest.$ac_ext <<_ACEOF
10578 /* confdefs.h.  */
10579 _ACEOF
10580 cat confdefs.h >>conftest.$ac_ext
10581 cat >>conftest.$ac_ext <<_ACEOF
10582 /* end confdefs.h.  */
10583
10584 /* Override any gcc2 internal prototype to avoid an error.  */
10585 #ifdef __cplusplus
10586 extern "C"
10587 #endif
10588 /* We use char because int might match the return type of a gcc2
10589    builtin and then its argument prototype would still apply.  */
10590 char DPMSInfo ();
10591 int
10592 main ()
10593 {
10594 DPMSInfo ();
10595   ;
10596   return 0;
10597 }
10598 _ACEOF
10599 rm -f conftest.$ac_objext conftest$ac_exeext
10600 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10601   (eval $ac_link) 2>conftest.er1
10602   ac_status=$?
10603   grep -v '^ *+' conftest.er1 >conftest.err
10604   rm -f conftest.er1
10605   cat conftest.err >&5
10606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10607   (exit $ac_status); } &&
10608          { ac_try='test -z "$ac_c_werror_flag"
10609                          || test ! -s conftest.err'
10610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10611   (eval $ac_try) 2>&5
10612   ac_status=$?
10613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10614   (exit $ac_status); }; } &&
10615          { ac_try='test -s conftest$ac_exeext'
10616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10617   (eval $ac_try) 2>&5
10618   ac_status=$?
10619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10620   (exit $ac_status); }; }; then
10621   ac_cv_lib_Xext_DPMSInfo=yes
10622 else
10623   echo "$as_me: failed program was:" >&5
10624 sed 's/^/| /' conftest.$ac_ext >&5
10625
10626 ac_cv_lib_Xext_DPMSInfo=no
10627 fi
10628 rm -f conftest.err conftest.$ac_objext \
10629       conftest$ac_exeext conftest.$ac_ext
10630 LIBS=$ac_check_lib_save_LIBS
10631 fi
10632 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
10633 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
10634 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
10635   have_dpms=yes
10636 else
10637   true
10638 fi
10639
10640   CPPFLAGS="$ac_save_CPPFLAGS"
10641   LDFLAGS="$ac_save_LDFLAGS"
10642 #  LIBS="$ac_save_LIBS"
10643
10644
10645     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
10646     if test "$have_dpms" = no; then
10647
10648   ac_save_CPPFLAGS="$CPPFLAGS"
10649   ac_save_LDFLAGS="$LDFLAGS"
10650 #  ac_save_LIBS="$LIBS"
10651
10652   if test \! -z "$includedir" ; then
10653     CPPFLAGS="$CPPFLAGS -I$includedir"
10654   fi
10655   # note: $X_CFLAGS includes $x_includes
10656   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10657
10658   if test \! -z "$libdir" ; then
10659     LDFLAGS="$LDFLAGS -L$libdir"
10660   fi
10661   # note: $X_LIBS includes $x_libraries
10662   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10663
10664   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
10665 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
10666 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
10667   echo $ECHO_N "(cached) $ECHO_C" >&6
10668 else
10669   ac_check_lib_save_LIBS=$LIBS
10670 LIBS="-lXdpms -lXext -lX11 $LIBS"
10671 cat >conftest.$ac_ext <<_ACEOF
10672 /* confdefs.h.  */
10673 _ACEOF
10674 cat confdefs.h >>conftest.$ac_ext
10675 cat >>conftest.$ac_ext <<_ACEOF
10676 /* end confdefs.h.  */
10677
10678 /* Override any gcc2 internal prototype to avoid an error.  */
10679 #ifdef __cplusplus
10680 extern "C"
10681 #endif
10682 /* We use char because int might match the return type of a gcc2
10683    builtin and then its argument prototype would still apply.  */
10684 char DPMSInfo ();
10685 int
10686 main ()
10687 {
10688 DPMSInfo ();
10689   ;
10690   return 0;
10691 }
10692 _ACEOF
10693 rm -f conftest.$ac_objext conftest$ac_exeext
10694 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10695   (eval $ac_link) 2>conftest.er1
10696   ac_status=$?
10697   grep -v '^ *+' conftest.er1 >conftest.err
10698   rm -f conftest.er1
10699   cat conftest.err >&5
10700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10701   (exit $ac_status); } &&
10702          { ac_try='test -z "$ac_c_werror_flag"
10703                          || test ! -s conftest.err'
10704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10705   (eval $ac_try) 2>&5
10706   ac_status=$?
10707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10708   (exit $ac_status); }; } &&
10709          { ac_try='test -s conftest$ac_exeext'
10710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10711   (eval $ac_try) 2>&5
10712   ac_status=$?
10713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10714   (exit $ac_status); }; }; then
10715   ac_cv_lib_Xdpms_DPMSInfo=yes
10716 else
10717   echo "$as_me: failed program was:" >&5
10718 sed 's/^/| /' conftest.$ac_ext >&5
10719
10720 ac_cv_lib_Xdpms_DPMSInfo=no
10721 fi
10722 rm -f conftest.err conftest.$ac_objext \
10723       conftest$ac_exeext conftest.$ac_ext
10724 LIBS=$ac_check_lib_save_LIBS
10725 fi
10726 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
10727 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
10728 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
10729   have_dpms=yes; XDPMS_LIBS="-lXdpms"
10730 else
10731   true
10732 fi
10733
10734   CPPFLAGS="$ac_save_CPPFLAGS"
10735   LDFLAGS="$ac_save_LDFLAGS"
10736 #  LIBS="$ac_save_LIBS"
10737
10738     fi
10739   fi
10740
10741
10742   # if that succeeded, then we've really got it.
10743   if test "$have_dpms" = yes; then
10744     cat >>confdefs.h <<\_ACEOF
10745 #define HAVE_DPMS_EXTENSION 1
10746 _ACEOF
10747
10748   fi
10749
10750 elif test "$with_dpms" != no; then
10751   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
10752   exit 1
10753 fi
10754
10755
10756 ###############################################################################
10757 #
10758 #       Check for the XINERAMA server extension.
10759 #
10760 ###############################################################################
10761
10762 have_xinerama=no
10763 with_xinerama_req=unspecified
10764
10765 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
10766 if test "${with_xinerama_ext+set}" = set; then
10767   withval="$with_xinerama_ext"
10768   with_xinerama="$withval"; with_xinerama_req="$withval"
10769 else
10770   with_xinerama=yes
10771 fi;
10772
10773
10774    case "$with_xinerama" in
10775     yes) ;;
10776     no)  ;;
10777
10778     /*)
10779      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
10780 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
10781      d=$with_xinerama/include
10782      if test -d $d; then
10783        X_CFLAGS="-I$d $X_CFLAGS"
10784        echo "$as_me:$LINENO: result: $d" >&5
10785 echo "${ECHO_T}$d" >&6
10786      else
10787        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10788 echo "${ECHO_T}not found ($d: no such directory)" >&6
10789      fi
10790
10791      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
10792 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
10793      d=$with_xinerama/lib
10794      if test -d $d; then
10795        X_LIBS="-L$d $X_LIBS"
10796        echo "$as_me:$LINENO: result: $d" >&5
10797 echo "${ECHO_T}$d" >&6
10798      else
10799        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10800 echo "${ECHO_T}not found ($d: no such directory)" >&6
10801      fi
10802
10803      # replace the directory string with "yes".
10804      with_xinerama_req="yes"
10805      with_xinerama=$with_xinerama_req
10806      ;;
10807
10808     *)
10809      echo ""
10810      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
10811      echo "       If it is a directory, then \`DIR/include' will be added to"
10812      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10813      exit 1
10814      ;;
10815    esac
10816
10817
10818 if test "$with_xinerama" = yes; then
10819
10820   # first check for Xinerama.h
10821
10822   ac_save_CPPFLAGS="$CPPFLAGS"
10823   if test \! -z "$includedir" ; then
10824     CPPFLAGS="$CPPFLAGS -I$includedir"
10825   fi
10826   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10827   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
10828 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
10829 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
10830   echo $ECHO_N "(cached) $ECHO_C" >&6
10831 else
10832   cat >conftest.$ac_ext <<_ACEOF
10833 /* confdefs.h.  */
10834 _ACEOF
10835 cat confdefs.h >>conftest.$ac_ext
10836 cat >>conftest.$ac_ext <<_ACEOF
10837 /* end confdefs.h.  */
10838 #include <X11/Xlib.h>
10839
10840 #include <X11/extensions/Xinerama.h>
10841 _ACEOF
10842 rm -f conftest.$ac_objext
10843 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10844   (eval $ac_compile) 2>conftest.er1
10845   ac_status=$?
10846   grep -v '^ *+' conftest.er1 >conftest.err
10847   rm -f conftest.er1
10848   cat conftest.err >&5
10849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10850   (exit $ac_status); } &&
10851          { ac_try='test -z "$ac_c_werror_flag"
10852                          || test ! -s conftest.err'
10853   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10854   (eval $ac_try) 2>&5
10855   ac_status=$?
10856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10857   (exit $ac_status); }; } &&
10858          { ac_try='test -s conftest.$ac_objext'
10859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10860   (eval $ac_try) 2>&5
10861   ac_status=$?
10862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10863   (exit $ac_status); }; }; then
10864   ac_cv_header_X11_extensions_Xinerama_h=yes
10865 else
10866   echo "$as_me: failed program was:" >&5
10867 sed 's/^/| /' conftest.$ac_ext >&5
10868
10869 ac_cv_header_X11_extensions_Xinerama_h=no
10870 fi
10871 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10872 fi
10873 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
10874 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
10875 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
10876   have_xinerama=yes
10877 fi
10878
10879
10880   CPPFLAGS="$ac_save_CPPFLAGS"
10881
10882   # if that succeeded, then check for the XINERAMA code in the libraries
10883   if test "$have_xinerama" = yes; then
10884
10885     # first look in -lXext
10886     have_xinerama=no
10887
10888   ac_save_CPPFLAGS="$CPPFLAGS"
10889   ac_save_LDFLAGS="$LDFLAGS"
10890 #  ac_save_LIBS="$LIBS"
10891
10892   if test \! -z "$includedir" ; then
10893     CPPFLAGS="$CPPFLAGS -I$includedir"
10894   fi
10895   # note: $X_CFLAGS includes $x_includes
10896   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10897
10898   if test \! -z "$libdir" ; then
10899     LDFLAGS="$LDFLAGS -L$libdir"
10900   fi
10901   # note: $X_LIBS includes $x_libraries
10902   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10903
10904   echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
10905 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6
10906 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
10907   echo $ECHO_N "(cached) $ECHO_C" >&6
10908 else
10909   ac_check_lib_save_LIBS=$LIBS
10910 LIBS="-lXext -lXext -lX11 $LIBS"
10911 cat >conftest.$ac_ext <<_ACEOF
10912 /* confdefs.h.  */
10913 _ACEOF
10914 cat confdefs.h >>conftest.$ac_ext
10915 cat >>conftest.$ac_ext <<_ACEOF
10916 /* end confdefs.h.  */
10917
10918 /* Override any gcc2 internal prototype to avoid an error.  */
10919 #ifdef __cplusplus
10920 extern "C"
10921 #endif
10922 /* We use char because int might match the return type of a gcc2
10923    builtin and then its argument prototype would still apply.  */
10924 char XineramaQueryScreens ();
10925 int
10926 main ()
10927 {
10928 XineramaQueryScreens ();
10929   ;
10930   return 0;
10931 }
10932 _ACEOF
10933 rm -f conftest.$ac_objext conftest$ac_exeext
10934 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10935   (eval $ac_link) 2>conftest.er1
10936   ac_status=$?
10937   grep -v '^ *+' conftest.er1 >conftest.err
10938   rm -f conftest.er1
10939   cat conftest.err >&5
10940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10941   (exit $ac_status); } &&
10942          { ac_try='test -z "$ac_c_werror_flag"
10943                          || test ! -s conftest.err'
10944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10945   (eval $ac_try) 2>&5
10946   ac_status=$?
10947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10948   (exit $ac_status); }; } &&
10949          { ac_try='test -s conftest$ac_exeext'
10950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10951   (eval $ac_try) 2>&5
10952   ac_status=$?
10953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10954   (exit $ac_status); }; }; then
10955   ac_cv_lib_Xext_XineramaQueryScreens=yes
10956 else
10957   echo "$as_me: failed program was:" >&5
10958 sed 's/^/| /' conftest.$ac_ext >&5
10959
10960 ac_cv_lib_Xext_XineramaQueryScreens=no
10961 fi
10962 rm -f conftest.err conftest.$ac_objext \
10963       conftest$ac_exeext conftest.$ac_ext
10964 LIBS=$ac_check_lib_save_LIBS
10965 fi
10966 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
10967 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6
10968 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
10969   have_xinerama=yes
10970 else
10971   true
10972 fi
10973
10974   CPPFLAGS="$ac_save_CPPFLAGS"
10975   LDFLAGS="$ac_save_LDFLAGS"
10976 #  LIBS="$ac_save_LIBS"
10977
10978
10979     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
10980     if test "$have_xinerama" = no; then
10981
10982   ac_save_CPPFLAGS="$CPPFLAGS"
10983   ac_save_LDFLAGS="$LDFLAGS"
10984 #  ac_save_LIBS="$LIBS"
10985
10986   if test \! -z "$includedir" ; then
10987     CPPFLAGS="$CPPFLAGS -I$includedir"
10988   fi
10989   # note: $X_CFLAGS includes $x_includes
10990   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10991
10992   if test \! -z "$libdir" ; then
10993     LDFLAGS="$LDFLAGS -L$libdir"
10994   fi
10995   # note: $X_LIBS includes $x_libraries
10996   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10997
10998   echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
10999 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
11000 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11001   echo $ECHO_N "(cached) $ECHO_C" >&6
11002 else
11003   ac_check_lib_save_LIBS=$LIBS
11004 LIBS="-lXinerama -lXext -lX11 $LIBS"
11005 cat >conftest.$ac_ext <<_ACEOF
11006 /* confdefs.h.  */
11007 _ACEOF
11008 cat confdefs.h >>conftest.$ac_ext
11009 cat >>conftest.$ac_ext <<_ACEOF
11010 /* end confdefs.h.  */
11011
11012 /* Override any gcc2 internal prototype to avoid an error.  */
11013 #ifdef __cplusplus
11014 extern "C"
11015 #endif
11016 /* We use char because int might match the return type of a gcc2
11017    builtin and then its argument prototype would still apply.  */
11018 char XineramaQueryScreens ();
11019 int
11020 main ()
11021 {
11022 XineramaQueryScreens ();
11023   ;
11024   return 0;
11025 }
11026 _ACEOF
11027 rm -f conftest.$ac_objext conftest$ac_exeext
11028 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11029   (eval $ac_link) 2>conftest.er1
11030   ac_status=$?
11031   grep -v '^ *+' conftest.er1 >conftest.err
11032   rm -f conftest.er1
11033   cat conftest.err >&5
11034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11035   (exit $ac_status); } &&
11036          { ac_try='test -z "$ac_c_werror_flag"
11037                          || test ! -s conftest.err'
11038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11039   (eval $ac_try) 2>&5
11040   ac_status=$?
11041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11042   (exit $ac_status); }; } &&
11043          { ac_try='test -s conftest$ac_exeext'
11044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11045   (eval $ac_try) 2>&5
11046   ac_status=$?
11047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11048   (exit $ac_status); }; }; then
11049   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11050 else
11051   echo "$as_me: failed program was:" >&5
11052 sed 's/^/| /' conftest.$ac_ext >&5
11053
11054 ac_cv_lib_Xinerama_XineramaQueryScreens=no
11055 fi
11056 rm -f conftest.err conftest.$ac_objext \
11057       conftest$ac_exeext conftest.$ac_ext
11058 LIBS=$ac_check_lib_save_LIBS
11059 fi
11060 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11061 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
11062 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
11063   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
11064 else
11065   true
11066 fi
11067
11068   CPPFLAGS="$ac_save_CPPFLAGS"
11069   LDFLAGS="$ac_save_LDFLAGS"
11070 #  LIBS="$ac_save_LIBS"
11071
11072     fi
11073   fi
11074
11075   # if that succeeded, then we've really got it.
11076   if test "$have_xinerama" = yes; then
11077     cat >>confdefs.h <<\_ACEOF
11078 #define HAVE_XINERAMA 1
11079 _ACEOF
11080
11081   fi
11082
11083 elif test "$with_xinerama" != no; then
11084   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
11085   exit 1
11086 fi
11087
11088
11089 ###############################################################################
11090 #
11091 #       Check for the XF86VMODE server extension (for virtual screens.)
11092 #
11093 ###############################################################################
11094
11095 have_xf86vmode=no
11096 with_xf86vmode_req=unspecified
11097
11098 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
11099 if test "${with_xf86vmode_ext+set}" = set; then
11100   withval="$with_xf86vmode_ext"
11101   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
11102 else
11103   with_xf86vmode=yes
11104 fi;
11105
11106
11107    case "$with_xf86vmode" in
11108     yes) ;;
11109     no)  ;;
11110
11111     /*)
11112      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
11113 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
11114      d=$with_xf86vmode/include
11115      if test -d $d; then
11116        X_CFLAGS="-I$d $X_CFLAGS"
11117        echo "$as_me:$LINENO: result: $d" >&5
11118 echo "${ECHO_T}$d" >&6
11119      else
11120        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11121 echo "${ECHO_T}not found ($d: no such directory)" >&6
11122      fi
11123
11124      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
11125 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
11126      d=$with_xf86vmode/lib
11127      if test -d $d; then
11128        X_LIBS="-L$d $X_LIBS"
11129        echo "$as_me:$LINENO: result: $d" >&5
11130 echo "${ECHO_T}$d" >&6
11131      else
11132        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11133 echo "${ECHO_T}not found ($d: no such directory)" >&6
11134      fi
11135
11136      # replace the directory string with "yes".
11137      with_xf86vmode_req="yes"
11138      with_xf86vmode=$with_xf86vmode_req
11139      ;;
11140
11141     *)
11142      echo ""
11143      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
11144      echo "       If it is a directory, then \`DIR/include' will be added to"
11145      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11146      exit 1
11147      ;;
11148    esac
11149
11150
11151 VIDMODE_LIBS=""
11152
11153 if test "$with_xf86vmode" = yes; then
11154
11155   # first check for xf86vmode.h
11156
11157   ac_save_CPPFLAGS="$CPPFLAGS"
11158   if test \! -z "$includedir" ; then
11159     CPPFLAGS="$CPPFLAGS -I$includedir"
11160   fi
11161   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11162   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11163 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
11164 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11165   echo $ECHO_N "(cached) $ECHO_C" >&6
11166 else
11167   cat >conftest.$ac_ext <<_ACEOF
11168 /* confdefs.h.  */
11169 _ACEOF
11170 cat confdefs.h >>conftest.$ac_ext
11171 cat >>conftest.$ac_ext <<_ACEOF
11172 /* end confdefs.h.  */
11173 #include <X11/Xlib.h>
11174
11175 #include <X11/extensions/xf86vmode.h>
11176 _ACEOF
11177 rm -f conftest.$ac_objext
11178 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11179   (eval $ac_compile) 2>conftest.er1
11180   ac_status=$?
11181   grep -v '^ *+' conftest.er1 >conftest.err
11182   rm -f conftest.er1
11183   cat conftest.err >&5
11184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11185   (exit $ac_status); } &&
11186          { ac_try='test -z "$ac_c_werror_flag"
11187                          || test ! -s conftest.err'
11188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11189   (eval $ac_try) 2>&5
11190   ac_status=$?
11191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11192   (exit $ac_status); }; } &&
11193          { ac_try='test -s conftest.$ac_objext'
11194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11195   (eval $ac_try) 2>&5
11196   ac_status=$?
11197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11198   (exit $ac_status); }; }; then
11199   ac_cv_header_X11_extensions_xf86vmode_h=yes
11200 else
11201   echo "$as_me: failed program was:" >&5
11202 sed 's/^/| /' conftest.$ac_ext >&5
11203
11204 ac_cv_header_X11_extensions_xf86vmode_h=no
11205 fi
11206 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11207 fi
11208 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11209 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
11210 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11211   have_xf86vmode=yes
11212 fi
11213
11214
11215   CPPFLAGS="$ac_save_CPPFLAGS"
11216
11217   # if that succeeded, then check for the -lXxf86vm
11218   if test "$have_xf86vmode" = yes; then
11219     have_xf86vmode=no
11220
11221   ac_save_CPPFLAGS="$CPPFLAGS"
11222   ac_save_LDFLAGS="$LDFLAGS"
11223 #  ac_save_LIBS="$LIBS"
11224
11225   if test \! -z "$includedir" ; then
11226     CPPFLAGS="$CPPFLAGS -I$includedir"
11227   fi
11228   # note: $X_CFLAGS includes $x_includes
11229   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11230
11231   if test \! -z "$libdir" ; then
11232     LDFLAGS="$LDFLAGS -L$libdir"
11233   fi
11234   # note: $X_LIBS includes $x_libraries
11235   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11236
11237   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
11238 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
11239 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
11240   echo $ECHO_N "(cached) $ECHO_C" >&6
11241 else
11242   ac_check_lib_save_LIBS=$LIBS
11243 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11244 cat >conftest.$ac_ext <<_ACEOF
11245 /* confdefs.h.  */
11246 _ACEOF
11247 cat confdefs.h >>conftest.$ac_ext
11248 cat >>conftest.$ac_ext <<_ACEOF
11249 /* end confdefs.h.  */
11250
11251 /* Override any gcc2 internal prototype to avoid an error.  */
11252 #ifdef __cplusplus
11253 extern "C"
11254 #endif
11255 /* We use char because int might match the return type of a gcc2
11256    builtin and then its argument prototype would still apply.  */
11257 char XF86VidModeGetViewPort ();
11258 int
11259 main ()
11260 {
11261 XF86VidModeGetViewPort ();
11262   ;
11263   return 0;
11264 }
11265 _ACEOF
11266 rm -f conftest.$ac_objext conftest$ac_exeext
11267 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11268   (eval $ac_link) 2>conftest.er1
11269   ac_status=$?
11270   grep -v '^ *+' conftest.er1 >conftest.err
11271   rm -f conftest.er1
11272   cat conftest.err >&5
11273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11274   (exit $ac_status); } &&
11275          { ac_try='test -z "$ac_c_werror_flag"
11276                          || test ! -s conftest.err'
11277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11278   (eval $ac_try) 2>&5
11279   ac_status=$?
11280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11281   (exit $ac_status); }; } &&
11282          { ac_try='test -s conftest$ac_exeext'
11283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11284   (eval $ac_try) 2>&5
11285   ac_status=$?
11286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11287   (exit $ac_status); }; }; then
11288   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
11289 else
11290   echo "$as_me: failed program was:" >&5
11291 sed 's/^/| /' conftest.$ac_ext >&5
11292
11293 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
11294 fi
11295 rm -f conftest.err conftest.$ac_objext \
11296       conftest$ac_exeext conftest.$ac_ext
11297 LIBS=$ac_check_lib_save_LIBS
11298 fi
11299 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
11300 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
11301 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
11302   have_xf86vmode=yes;
11303                    VIDMODE_LIBS="-lXxf86vm";
11304                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
11305 else
11306   true
11307 fi
11308
11309   CPPFLAGS="$ac_save_CPPFLAGS"
11310   LDFLAGS="$ac_save_LDFLAGS"
11311 #  LIBS="$ac_save_LIBS"
11312
11313   fi
11314
11315   # if that succeeded, then we've really got it.
11316   if test "$have_xf86vmode" = yes; then
11317     cat >>confdefs.h <<\_ACEOF
11318 #define HAVE_XF86VMODE 1
11319 _ACEOF
11320
11321   fi
11322
11323 elif test "$with_xf86vmode" != no; then
11324   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
11325   exit 1
11326 fi
11327
11328
11329 ###############################################################################
11330 #
11331 #       Check for the XF86VMODE server extension (for gamma fading.)
11332 #
11333 ###############################################################################
11334
11335 have_xf86gamma=no
11336 have_xf86gamma_ramp=no
11337 with_xf86gamma_req=unspecified
11338
11339 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
11340 if test "${with_xf86gamma_ext+set}" = set; then
11341   withval="$with_xf86gamma_ext"
11342   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
11343 else
11344   with_xf86gamma=yes
11345 fi;
11346
11347
11348    case "$with_xf86gamma" in
11349     yes) ;;
11350     no)  ;;
11351
11352     /*)
11353      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
11354 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
11355      d=$with_xf86gamma/include
11356      if test -d $d; then
11357        X_CFLAGS="-I$d $X_CFLAGS"
11358        echo "$as_me:$LINENO: result: $d" >&5
11359 echo "${ECHO_T}$d" >&6
11360      else
11361        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11362 echo "${ECHO_T}not found ($d: no such directory)" >&6
11363      fi
11364
11365      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
11366 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
11367      d=$with_xf86gamma/lib
11368      if test -d $d; then
11369        X_LIBS="-L$d $X_LIBS"
11370        echo "$as_me:$LINENO: result: $d" >&5
11371 echo "${ECHO_T}$d" >&6
11372      else
11373        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11374 echo "${ECHO_T}not found ($d: no such directory)" >&6
11375      fi
11376
11377      # replace the directory string with "yes".
11378      with_xf86gamma_req="yes"
11379      with_xf86gamma=$with_xf86gamma_req
11380      ;;
11381
11382     *)
11383      echo ""
11384      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
11385      echo "       If it is a directory, then \`DIR/include' will be added to"
11386      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11387      exit 1
11388      ;;
11389    esac
11390
11391
11392 if test "$with_xf86gamma" = yes; then
11393
11394   # first check for xf86vmode.h, if we haven't already
11395   if test "$have_xf86vmode" = yes; then
11396     have_xf86gamma=yes
11397   else
11398
11399   ac_save_CPPFLAGS="$CPPFLAGS"
11400   if test \! -z "$includedir" ; then
11401     CPPFLAGS="$CPPFLAGS -I$includedir"
11402   fi
11403   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11404   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11405 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
11406 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11407   echo $ECHO_N "(cached) $ECHO_C" >&6
11408 else
11409   cat >conftest.$ac_ext <<_ACEOF
11410 /* confdefs.h.  */
11411 _ACEOF
11412 cat confdefs.h >>conftest.$ac_ext
11413 cat >>conftest.$ac_ext <<_ACEOF
11414 /* end confdefs.h.  */
11415 #include <X11/Xlib.h>
11416
11417 #include <X11/extensions/xf86vmode.h>
11418 _ACEOF
11419 rm -f conftest.$ac_objext
11420 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11421   (eval $ac_compile) 2>conftest.er1
11422   ac_status=$?
11423   grep -v '^ *+' conftest.er1 >conftest.err
11424   rm -f conftest.er1
11425   cat conftest.err >&5
11426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11427   (exit $ac_status); } &&
11428          { ac_try='test -z "$ac_c_werror_flag"
11429                          || test ! -s conftest.err'
11430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11431   (eval $ac_try) 2>&5
11432   ac_status=$?
11433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11434   (exit $ac_status); }; } &&
11435          { ac_try='test -s conftest.$ac_objext'
11436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11437   (eval $ac_try) 2>&5
11438   ac_status=$?
11439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11440   (exit $ac_status); }; }; then
11441   ac_cv_header_X11_extensions_xf86vmode_h=yes
11442 else
11443   echo "$as_me: failed program was:" >&5
11444 sed 's/^/| /' conftest.$ac_ext >&5
11445
11446 ac_cv_header_X11_extensions_xf86vmode_h=no
11447 fi
11448 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11449 fi
11450 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11451 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
11452 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11453   have_xf86gamma=yes
11454 fi
11455
11456
11457   CPPFLAGS="$ac_save_CPPFLAGS"
11458   fi
11459
11460   # if that succeeded, then check for the -lXxf86vm
11461   if test "$have_xf86gamma" = yes; then
11462     have_xf86gamma=no
11463
11464   ac_save_CPPFLAGS="$CPPFLAGS"
11465   ac_save_LDFLAGS="$LDFLAGS"
11466 #  ac_save_LIBS="$LIBS"
11467
11468   if test \! -z "$includedir" ; then
11469     CPPFLAGS="$CPPFLAGS -I$includedir"
11470   fi
11471   # note: $X_CFLAGS includes $x_includes
11472   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11473
11474   if test \! -z "$libdir" ; then
11475     LDFLAGS="$LDFLAGS -L$libdir"
11476   fi
11477   # note: $X_LIBS includes $x_libraries
11478   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11479
11480   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
11481 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
11482 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
11483   echo $ECHO_N "(cached) $ECHO_C" >&6
11484 else
11485   ac_check_lib_save_LIBS=$LIBS
11486 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11487 cat >conftest.$ac_ext <<_ACEOF
11488 /* confdefs.h.  */
11489 _ACEOF
11490 cat confdefs.h >>conftest.$ac_ext
11491 cat >>conftest.$ac_ext <<_ACEOF
11492 /* end confdefs.h.  */
11493
11494 /* Override any gcc2 internal prototype to avoid an error.  */
11495 #ifdef __cplusplus
11496 extern "C"
11497 #endif
11498 /* We use char because int might match the return type of a gcc2
11499    builtin and then its argument prototype would still apply.  */
11500 char XF86VidModeSetGamma ();
11501 int
11502 main ()
11503 {
11504 XF86VidModeSetGamma ();
11505   ;
11506   return 0;
11507 }
11508 _ACEOF
11509 rm -f conftest.$ac_objext conftest$ac_exeext
11510 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11511   (eval $ac_link) 2>conftest.er1
11512   ac_status=$?
11513   grep -v '^ *+' conftest.er1 >conftest.err
11514   rm -f conftest.er1
11515   cat conftest.err >&5
11516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11517   (exit $ac_status); } &&
11518          { ac_try='test -z "$ac_c_werror_flag"
11519                          || test ! -s conftest.err'
11520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11521   (eval $ac_try) 2>&5
11522   ac_status=$?
11523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11524   (exit $ac_status); }; } &&
11525          { ac_try='test -s conftest$ac_exeext'
11526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11527   (eval $ac_try) 2>&5
11528   ac_status=$?
11529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11530   (exit $ac_status); }; }; then
11531   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
11532 else
11533   echo "$as_me: failed program was:" >&5
11534 sed 's/^/| /' conftest.$ac_ext >&5
11535
11536 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
11537 fi
11538 rm -f conftest.err conftest.$ac_objext \
11539       conftest$ac_exeext conftest.$ac_ext
11540 LIBS=$ac_check_lib_save_LIBS
11541 fi
11542 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
11543 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
11544 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
11545   have_xf86gamma=yes
11546 else
11547   true
11548 fi
11549
11550   CPPFLAGS="$ac_save_CPPFLAGS"
11551   LDFLAGS="$ac_save_LDFLAGS"
11552 #  LIBS="$ac_save_LIBS"
11553
11554   fi
11555
11556   # check for the Ramp versions of the functions too.
11557   if test "$have_xf86gamma" = yes; then
11558     have_xf86gamma_ramp=no
11559
11560   ac_save_CPPFLAGS="$CPPFLAGS"
11561   ac_save_LDFLAGS="$LDFLAGS"
11562 #  ac_save_LIBS="$LIBS"
11563
11564   if test \! -z "$includedir" ; then
11565     CPPFLAGS="$CPPFLAGS -I$includedir"
11566   fi
11567   # note: $X_CFLAGS includes $x_includes
11568   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11569
11570   if test \! -z "$libdir" ; then
11571     LDFLAGS="$LDFLAGS -L$libdir"
11572   fi
11573   # note: $X_LIBS includes $x_libraries
11574   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11575
11576   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
11577 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
11578 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
11579   echo $ECHO_N "(cached) $ECHO_C" >&6
11580 else
11581   ac_check_lib_save_LIBS=$LIBS
11582 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11583 cat >conftest.$ac_ext <<_ACEOF
11584 /* confdefs.h.  */
11585 _ACEOF
11586 cat confdefs.h >>conftest.$ac_ext
11587 cat >>conftest.$ac_ext <<_ACEOF
11588 /* end confdefs.h.  */
11589
11590 /* Override any gcc2 internal prototype to avoid an error.  */
11591 #ifdef __cplusplus
11592 extern "C"
11593 #endif
11594 /* We use char because int might match the return type of a gcc2
11595    builtin and then its argument prototype would still apply.  */
11596 char XF86VidModeSetGammaRamp ();
11597 int
11598 main ()
11599 {
11600 XF86VidModeSetGammaRamp ();
11601   ;
11602   return 0;
11603 }
11604 _ACEOF
11605 rm -f conftest.$ac_objext conftest$ac_exeext
11606 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11607   (eval $ac_link) 2>conftest.er1
11608   ac_status=$?
11609   grep -v '^ *+' conftest.er1 >conftest.err
11610   rm -f conftest.er1
11611   cat conftest.err >&5
11612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11613   (exit $ac_status); } &&
11614          { ac_try='test -z "$ac_c_werror_flag"
11615                          || test ! -s conftest.err'
11616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11617   (eval $ac_try) 2>&5
11618   ac_status=$?
11619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11620   (exit $ac_status); }; } &&
11621          { ac_try='test -s conftest$ac_exeext'
11622   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11623   (eval $ac_try) 2>&5
11624   ac_status=$?
11625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11626   (exit $ac_status); }; }; then
11627   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
11628 else
11629   echo "$as_me: failed program was:" >&5
11630 sed 's/^/| /' conftest.$ac_ext >&5
11631
11632 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
11633 fi
11634 rm -f conftest.err conftest.$ac_objext \
11635       conftest$ac_exeext conftest.$ac_ext
11636 LIBS=$ac_check_lib_save_LIBS
11637 fi
11638 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
11639 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
11640 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
11641   have_xf86gamma_ramp=yes
11642 else
11643   true
11644 fi
11645
11646   CPPFLAGS="$ac_save_CPPFLAGS"
11647   LDFLAGS="$ac_save_LDFLAGS"
11648 #  LIBS="$ac_save_LIBS"
11649
11650   fi
11651
11652   # if those tests succeeded, then we've really got the functions.
11653   if test "$have_xf86gamma" = yes; then
11654     cat >>confdefs.h <<\_ACEOF
11655 #define HAVE_XF86VMODE_GAMMA 1
11656 _ACEOF
11657
11658   fi
11659
11660   if test "$have_xf86gamma_ramp" = yes; then
11661     cat >>confdefs.h <<\_ACEOF
11662 #define HAVE_XF86VMODE_GAMMA_RAMP 1
11663 _ACEOF
11664
11665   fi
11666
11667   # pull in the lib, if we haven't already
11668   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
11669     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
11670   fi
11671
11672 elif test "$with_xf86gamma" != no; then
11673   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
11674   exit 1
11675 fi
11676
11677
11678 ###############################################################################
11679 #
11680 #       Check for the RANDR (Resize and Rotate) server extension.
11681 #
11682 #       We need this to detect when the resolution of the desktop
11683 #       has changed out from under us (this is a newer, different
11684 #       mechanism than the XF86VMODE virtual viewports.)
11685 #
11686 ###############################################################################
11687
11688 have_randr=no
11689 with_randr_req=unspecified
11690
11691 # Check whether --with-randr-ext or --without-randr-ext was given.
11692 if test "${with_randr_ext+set}" = set; then
11693   withval="$with_randr_ext"
11694   with_randr="$withval"; with_randr_req="$withval"
11695 else
11696   with_randr=yes
11697 fi;
11698
11699
11700    case "$with_randr" in
11701     yes) ;;
11702     no)  ;;
11703
11704     /*)
11705      echo "$as_me:$LINENO: checking for RANDR headers" >&5
11706 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6
11707      d=$with_randr/include
11708      if test -d $d; then
11709        X_CFLAGS="-I$d $X_CFLAGS"
11710        echo "$as_me:$LINENO: result: $d" >&5
11711 echo "${ECHO_T}$d" >&6
11712      else
11713        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11714 echo "${ECHO_T}not found ($d: no such directory)" >&6
11715      fi
11716
11717      echo "$as_me:$LINENO: checking for RANDR libs" >&5
11718 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6
11719      d=$with_randr/lib
11720      if test -d $d; then
11721        X_LIBS="-L$d $X_LIBS"
11722        echo "$as_me:$LINENO: result: $d" >&5
11723 echo "${ECHO_T}$d" >&6
11724      else
11725        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11726 echo "${ECHO_T}not found ($d: no such directory)" >&6
11727      fi
11728
11729      # replace the directory string with "yes".
11730      with_randr_req="yes"
11731      with_randr=$with_randr_req
11732      ;;
11733
11734     *)
11735      echo ""
11736      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
11737      echo "       If it is a directory, then \`DIR/include' will be added to"
11738      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11739      exit 1
11740      ;;
11741    esac
11742
11743
11744 if test "$with_randr" = yes; then
11745
11746   # first check for Randr.h
11747
11748   ac_save_CPPFLAGS="$CPPFLAGS"
11749   if test \! -z "$includedir" ; then
11750     CPPFLAGS="$CPPFLAGS -I$includedir"
11751   fi
11752   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11753   echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
11754 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6
11755 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
11756   echo $ECHO_N "(cached) $ECHO_C" >&6
11757 else
11758   cat >conftest.$ac_ext <<_ACEOF
11759 /* confdefs.h.  */
11760 _ACEOF
11761 cat confdefs.h >>conftest.$ac_ext
11762 cat >>conftest.$ac_ext <<_ACEOF
11763 /* end confdefs.h.  */
11764 #include <X11/Xlib.h>
11765
11766 #include <X11/extensions/Xrandr.h>
11767 _ACEOF
11768 rm -f conftest.$ac_objext
11769 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11770   (eval $ac_compile) 2>conftest.er1
11771   ac_status=$?
11772   grep -v '^ *+' conftest.er1 >conftest.err
11773   rm -f conftest.er1
11774   cat conftest.err >&5
11775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11776   (exit $ac_status); } &&
11777          { ac_try='test -z "$ac_c_werror_flag"
11778                          || test ! -s conftest.err'
11779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11780   (eval $ac_try) 2>&5
11781   ac_status=$?
11782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11783   (exit $ac_status); }; } &&
11784          { ac_try='test -s conftest.$ac_objext'
11785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11786   (eval $ac_try) 2>&5
11787   ac_status=$?
11788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11789   (exit $ac_status); }; }; then
11790   ac_cv_header_X11_extensions_Xrandr_h=yes
11791 else
11792   echo "$as_me: failed program was:" >&5
11793 sed 's/^/| /' conftest.$ac_ext >&5
11794
11795 ac_cv_header_X11_extensions_Xrandr_h=no
11796 fi
11797 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11798 fi
11799 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
11800 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6
11801 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
11802   have_randr=yes
11803 fi
11804
11805
11806   CPPFLAGS="$ac_save_CPPFLAGS"
11807
11808   # if that succeeded, then check for the XRR code in the libraries
11809   if test "$have_randr" = yes; then
11810
11811     # RANDR probably needs -lXrender
11812     xrender_libs=
11813
11814   ac_save_CPPFLAGS="$CPPFLAGS"
11815   ac_save_LDFLAGS="$LDFLAGS"
11816 #  ac_save_LIBS="$LIBS"
11817
11818   if test \! -z "$includedir" ; then
11819     CPPFLAGS="$CPPFLAGS -I$includedir"
11820   fi
11821   # note: $X_CFLAGS includes $x_includes
11822   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11823
11824   if test \! -z "$libdir" ; then
11825     LDFLAGS="$LDFLAGS -L$libdir"
11826   fi
11827   # note: $X_LIBS includes $x_libraries
11828   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11829
11830   echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
11831 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6
11832 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
11833   echo $ECHO_N "(cached) $ECHO_C" >&6
11834 else
11835   ac_check_lib_save_LIBS=$LIBS
11836 LIBS="-lXrender -lXext -lX11 $LIBS"
11837 cat >conftest.$ac_ext <<_ACEOF
11838 /* confdefs.h.  */
11839 _ACEOF
11840 cat confdefs.h >>conftest.$ac_ext
11841 cat >>conftest.$ac_ext <<_ACEOF
11842 /* end confdefs.h.  */
11843
11844 /* Override any gcc2 internal prototype to avoid an error.  */
11845 #ifdef __cplusplus
11846 extern "C"
11847 #endif
11848 /* We use char because int might match the return type of a gcc2
11849    builtin and then its argument prototype would still apply.  */
11850 char XRenderSetSubpixelOrder ();
11851 int
11852 main ()
11853 {
11854 XRenderSetSubpixelOrder ();
11855   ;
11856   return 0;
11857 }
11858 _ACEOF
11859 rm -f conftest.$ac_objext conftest$ac_exeext
11860 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11861   (eval $ac_link) 2>conftest.er1
11862   ac_status=$?
11863   grep -v '^ *+' conftest.er1 >conftest.err
11864   rm -f conftest.er1
11865   cat conftest.err >&5
11866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11867   (exit $ac_status); } &&
11868          { ac_try='test -z "$ac_c_werror_flag"
11869                          || test ! -s conftest.err'
11870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11871   (eval $ac_try) 2>&5
11872   ac_status=$?
11873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11874   (exit $ac_status); }; } &&
11875          { ac_try='test -s conftest$ac_exeext'
11876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11877   (eval $ac_try) 2>&5
11878   ac_status=$?
11879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11880   (exit $ac_status); }; }; then
11881   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
11882 else
11883   echo "$as_me: failed program was:" >&5
11884 sed 's/^/| /' conftest.$ac_ext >&5
11885
11886 ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
11887 fi
11888 rm -f conftest.err conftest.$ac_objext \
11889       conftest$ac_exeext conftest.$ac_ext
11890 LIBS=$ac_check_lib_save_LIBS
11891 fi
11892 echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
11893 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6
11894 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
11895   xrender_libs="-lXrender"
11896 else
11897   true
11898 fi
11899
11900   CPPFLAGS="$ac_save_CPPFLAGS"
11901   LDFLAGS="$ac_save_LDFLAGS"
11902 #  LIBS="$ac_save_LIBS"
11903
11904
11905     # first look for RANDR in -lXext
11906     have_randr=no
11907
11908   ac_save_CPPFLAGS="$CPPFLAGS"
11909   ac_save_LDFLAGS="$LDFLAGS"
11910 #  ac_save_LIBS="$LIBS"
11911
11912   if test \! -z "$includedir" ; then
11913     CPPFLAGS="$CPPFLAGS -I$includedir"
11914   fi
11915   # note: $X_CFLAGS includes $x_includes
11916   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11917
11918   if test \! -z "$libdir" ; then
11919     LDFLAGS="$LDFLAGS -L$libdir"
11920   fi
11921   # note: $X_LIBS includes $x_libraries
11922   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11923
11924   echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
11925 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6
11926 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
11927   echo $ECHO_N "(cached) $ECHO_C" >&6
11928 else
11929   ac_check_lib_save_LIBS=$LIBS
11930 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
11931 cat >conftest.$ac_ext <<_ACEOF
11932 /* confdefs.h.  */
11933 _ACEOF
11934 cat confdefs.h >>conftest.$ac_ext
11935 cat >>conftest.$ac_ext <<_ACEOF
11936 /* end confdefs.h.  */
11937
11938 /* Override any gcc2 internal prototype to avoid an error.  */
11939 #ifdef __cplusplus
11940 extern "C"
11941 #endif
11942 /* We use char because int might match the return type of a gcc2
11943    builtin and then its argument prototype would still apply.  */
11944 char XRRGetScreenInfo ();
11945 int
11946 main ()
11947 {
11948 XRRGetScreenInfo ();
11949   ;
11950   return 0;
11951 }
11952 _ACEOF
11953 rm -f conftest.$ac_objext conftest$ac_exeext
11954 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11955   (eval $ac_link) 2>conftest.er1
11956   ac_status=$?
11957   grep -v '^ *+' conftest.er1 >conftest.err
11958   rm -f conftest.er1
11959   cat conftest.err >&5
11960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11961   (exit $ac_status); } &&
11962          { ac_try='test -z "$ac_c_werror_flag"
11963                          || test ! -s conftest.err'
11964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11965   (eval $ac_try) 2>&5
11966   ac_status=$?
11967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11968   (exit $ac_status); }; } &&
11969          { ac_try='test -s conftest$ac_exeext'
11970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11971   (eval $ac_try) 2>&5
11972   ac_status=$?
11973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11974   (exit $ac_status); }; }; then
11975   ac_cv_lib_Xext_XRRGetScreenInfo=yes
11976 else
11977   echo "$as_me: failed program was:" >&5
11978 sed 's/^/| /' conftest.$ac_ext >&5
11979
11980 ac_cv_lib_Xext_XRRGetScreenInfo=no
11981 fi
11982 rm -f conftest.err conftest.$ac_objext \
11983       conftest$ac_exeext conftest.$ac_ext
11984 LIBS=$ac_check_lib_save_LIBS
11985 fi
11986 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
11987 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6
11988 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
11989   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
11990 else
11991   true
11992 fi
11993
11994   CPPFLAGS="$ac_save_CPPFLAGS"
11995   LDFLAGS="$ac_save_LDFLAGS"
11996 #  LIBS="$ac_save_LIBS"
11997
11998
11999     # if that failed, look in -lXrandr
12000     if test "$have_randr" = no; then
12001
12002   ac_save_CPPFLAGS="$CPPFLAGS"
12003   ac_save_LDFLAGS="$LDFLAGS"
12004 #  ac_save_LIBS="$LIBS"
12005
12006   if test \! -z "$includedir" ; then
12007     CPPFLAGS="$CPPFLAGS -I$includedir"
12008   fi
12009   # note: $X_CFLAGS includes $x_includes
12010   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12011
12012   if test \! -z "$libdir" ; then
12013     LDFLAGS="$LDFLAGS -L$libdir"
12014   fi
12015   # note: $X_LIBS includes $x_libraries
12016   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12017
12018   echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12019 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6
12020 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12021   echo $ECHO_N "(cached) $ECHO_C" >&6
12022 else
12023   ac_check_lib_save_LIBS=$LIBS
12024 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12025 cat >conftest.$ac_ext <<_ACEOF
12026 /* confdefs.h.  */
12027 _ACEOF
12028 cat confdefs.h >>conftest.$ac_ext
12029 cat >>conftest.$ac_ext <<_ACEOF
12030 /* end confdefs.h.  */
12031
12032 /* Override any gcc2 internal prototype to avoid an error.  */
12033 #ifdef __cplusplus
12034 extern "C"
12035 #endif
12036 /* We use char because int might match the return type of a gcc2
12037    builtin and then its argument prototype would still apply.  */
12038 char XRRGetScreenInfo ();
12039 int
12040 main ()
12041 {
12042 XRRGetScreenInfo ();
12043   ;
12044   return 0;
12045 }
12046 _ACEOF
12047 rm -f conftest.$ac_objext conftest$ac_exeext
12048 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12049   (eval $ac_link) 2>conftest.er1
12050   ac_status=$?
12051   grep -v '^ *+' conftest.er1 >conftest.err
12052   rm -f conftest.er1
12053   cat conftest.err >&5
12054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12055   (exit $ac_status); } &&
12056          { ac_try='test -z "$ac_c_werror_flag"
12057                          || test ! -s conftest.err'
12058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12059   (eval $ac_try) 2>&5
12060   ac_status=$?
12061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12062   (exit $ac_status); }; } &&
12063          { ac_try='test -s conftest$ac_exeext'
12064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12065   (eval $ac_try) 2>&5
12066   ac_status=$?
12067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12068   (exit $ac_status); }; }; then
12069   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
12070 else
12071   echo "$as_me: failed program was:" >&5
12072 sed 's/^/| /' conftest.$ac_ext >&5
12073
12074 ac_cv_lib_Xrandr_XRRGetScreenInfo=no
12075 fi
12076 rm -f conftest.err conftest.$ac_objext \
12077       conftest$ac_exeext conftest.$ac_ext
12078 LIBS=$ac_check_lib_save_LIBS
12079 fi
12080 echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
12081 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6
12082 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
12083   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
12084 else
12085   true
12086 fi
12087
12088   CPPFLAGS="$ac_save_CPPFLAGS"
12089   LDFLAGS="$ac_save_LDFLAGS"
12090 #  LIBS="$ac_save_LIBS"
12091
12092     fi
12093   fi
12094
12095   # if that succeeded, then we've really got it.
12096   if test "$have_randr" = yes; then
12097     cat >>confdefs.h <<\_ACEOF
12098 #define HAVE_RANDR 1
12099 _ACEOF
12100
12101   fi
12102
12103 elif test "$with_randr" != no; then
12104   echo "error: must be yes or no: --with-randr-ext=$with_randr"
12105   exit 1
12106 fi
12107
12108
12109 ###############################################################################
12110 #
12111 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
12112 #       using other XF86 stuff.)
12113 #
12114 ###############################################################################
12115
12116 have_xf86miscsetgrabkeysstate=no
12117 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
12118
12119   ac_save_CPPFLAGS="$CPPFLAGS"
12120   ac_save_LDFLAGS="$LDFLAGS"
12121 #  ac_save_LIBS="$LIBS"
12122
12123   if test \! -z "$includedir" ; then
12124     CPPFLAGS="$CPPFLAGS -I$includedir"
12125   fi
12126   # note: $X_CFLAGS includes $x_includes
12127   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12128
12129   if test \! -z "$libdir" ; then
12130     LDFLAGS="$LDFLAGS -L$libdir"
12131   fi
12132   # note: $X_LIBS includes $x_libraries
12133   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12134
12135   echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
12136 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6
12137 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
12138   echo $ECHO_N "(cached) $ECHO_C" >&6
12139 else
12140   ac_check_lib_save_LIBS=$LIBS
12141 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
12142 cat >conftest.$ac_ext <<_ACEOF
12143 /* confdefs.h.  */
12144 _ACEOF
12145 cat confdefs.h >>conftest.$ac_ext
12146 cat >>conftest.$ac_ext <<_ACEOF
12147 /* end confdefs.h.  */
12148
12149 /* Override any gcc2 internal prototype to avoid an error.  */
12150 #ifdef __cplusplus
12151 extern "C"
12152 #endif
12153 /* We use char because int might match the return type of a gcc2
12154    builtin and then its argument prototype would still apply.  */
12155 char XF86MiscSetGrabKeysState ();
12156 int
12157 main ()
12158 {
12159 XF86MiscSetGrabKeysState ();
12160   ;
12161   return 0;
12162 }
12163 _ACEOF
12164 rm -f conftest.$ac_objext conftest$ac_exeext
12165 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12166   (eval $ac_link) 2>conftest.er1
12167   ac_status=$?
12168   grep -v '^ *+' conftest.er1 >conftest.err
12169   rm -f conftest.er1
12170   cat conftest.err >&5
12171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12172   (exit $ac_status); } &&
12173          { ac_try='test -z "$ac_c_werror_flag"
12174                          || test ! -s conftest.err'
12175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12176   (eval $ac_try) 2>&5
12177   ac_status=$?
12178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12179   (exit $ac_status); }; } &&
12180          { ac_try='test -s conftest$ac_exeext'
12181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12182   (eval $ac_try) 2>&5
12183   ac_status=$?
12184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12185   (exit $ac_status); }; }; then
12186   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
12187 else
12188   echo "$as_me: failed program was:" >&5
12189 sed 's/^/| /' conftest.$ac_ext >&5
12190
12191 ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
12192 fi
12193 rm -f conftest.err conftest.$ac_objext \
12194       conftest$ac_exeext conftest.$ac_ext
12195 LIBS=$ac_check_lib_save_LIBS
12196 fi
12197 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
12198 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6
12199 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
12200   have_xf86miscsetgrabkeysstate=yes
12201 else
12202   true
12203 fi
12204
12205   CPPFLAGS="$ac_save_CPPFLAGS"
12206   LDFLAGS="$ac_save_LDFLAGS"
12207 #  LIBS="$ac_save_LIBS"
12208
12209   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
12210     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
12211     cat >>confdefs.h <<\_ACEOF
12212 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
12213 _ACEOF
12214
12215   fi
12216 fi
12217
12218
12219 ###############################################################################
12220 #
12221 #       Check for HP XHPDisableReset and XHPEnableReset.
12222 #
12223 ###############################################################################
12224
12225 echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
12226 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6
12227
12228   ac_save_CPPFLAGS="$CPPFLAGS"
12229   if test \! -z "$includedir" ; then
12230     CPPFLAGS="$CPPFLAGS -I$includedir"
12231   fi
12232   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12233   cat >conftest.$ac_ext <<_ACEOF
12234 /* confdefs.h.  */
12235 _ACEOF
12236 cat confdefs.h >>conftest.$ac_ext
12237 cat >>conftest.$ac_ext <<_ACEOF
12238 /* end confdefs.h.  */
12239 #include <X11/XHPlib.h>
12240
12241 _ACEOF
12242 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12243   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
12244   cat >>confdefs.h <<\_ACEOF
12245 #define HAVE_XHPDISABLERESET 1
12246 _ACEOF
12247
12248                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
12249                    echo "$as_me:$LINENO: result: yes" >&5
12250 echo "${ECHO_T}yes" >&6
12251 else
12252   echo "$as_me:$LINENO: result: no" >&5
12253 echo "${ECHO_T}no" >&6
12254 fi
12255 rm -f conftest*
12256
12257   CPPFLAGS="$ac_save_CPPFLAGS"
12258
12259
12260 ###############################################################################
12261 #
12262 #       Check for /proc/interrupts.
12263 #
12264 ###############################################################################
12265
12266 have_proc_interrupts=no
12267 with_proc_interrupts_req=unspecified
12268
12269 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
12270 if test "${with_proc_interrupts+set}" = set; then
12271   withval="$with_proc_interrupts"
12272   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
12273 else
12274   with_proc_interrupts=yes
12275 fi;
12276
12277 if test "$with_proc_interrupts" = yes; then
12278
12279   # Note that we may be building in an environment (e.g. Debian buildd chroot)
12280   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
12281   # check that it has the bits we need, but otherwise we'll just go on faith.
12282   #
12283   have_proc_interrupts=yes
12284
12285   if test -f /proc/interrupts; then
12286    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
12287 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
12288 if test "${ac_cv_have_proc_interrupts+set}" = set; then
12289   echo $ECHO_N "(cached) $ECHO_C" >&6
12290 else
12291   ac_cv_have_proc_interrupts=no
12292      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
12293        ac_cv_have_proc_interrupts=yes
12294      fi
12295
12296 fi
12297 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
12298 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
12299    have_proc_interrupts=$ac_cv_have_proc_interrupts
12300   fi
12301
12302   if test "$have_proc_interrupts" = yes; then
12303     cat >>confdefs.h <<\_ACEOF
12304 #define HAVE_PROC_INTERRUPTS 1
12305 _ACEOF
12306
12307   fi
12308
12309 elif test "$with_proc_interrupts" != no; then
12310   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
12311   exit 1
12312 fi
12313
12314
12315 ###############################################################################
12316 #
12317 #       The --enable-locking option
12318 #
12319 ###############################################################################
12320
12321 # Check whether --enable-locking or --disable-locking was given.
12322 if test "${enable_locking+set}" = set; then
12323   enableval="$enable_locking"
12324   enable_locking="$enableval"
12325 else
12326   enable_locking=yes
12327 fi;
12328 if test "$enable_locking" = yes; then
12329   true
12330 elif test "$enable_locking" = no; then
12331   cat >>confdefs.h <<\_ACEOF
12332 #define NO_LOCKING 1
12333 _ACEOF
12334
12335 else
12336   echo "error: must be yes or no: --enable-locking=$enable_locking"
12337   exit 1
12338 fi
12339
12340 # We can't lock on MacOS X, so don't even bother compiling in support for it.
12341 #
12342 if test "$ac_macosx" = yes; then
12343   if test "$enable_locking" = yes; then
12344     echo "$as_me:$LINENO: result: locking disabled: it doesn't work on MacOS X" >&5
12345 echo "${ECHO_T}locking disabled: it doesn't work on MacOS X" >&6
12346     enable_locking=no
12347     cat >>confdefs.h <<\_ACEOF
12348 #define NO_LOCKING 1
12349 _ACEOF
12350
12351   fi
12352 fi
12353
12354
12355 ###############################################################################
12356 #
12357 #       Check for PAM.
12358 #
12359 ###############################################################################
12360
12361 case "$host" in
12362   *-solaris*)
12363    # Solaris systems tend to come with PAM misconfigured.
12364    #  Don't build it by default, even if the headers exist.
12365    with_pam_default=no
12366    ;;
12367   *)
12368    # Default to building PAM support on all other systems, if it exists.
12369    with_pam_default=yes
12370   ;;
12371 esac
12372
12373 have_pam=no
12374 with_pam_req=unspecified
12375
12376
12377 # Check whether --with-pam or --without-pam was given.
12378 if test "${with_pam+set}" = set; then
12379   withval="$with_pam"
12380   with_pam="$withval"; with_pam_req="$withval"
12381 else
12382   with_pam=$with_pam_default
12383 fi;
12384
12385
12386 # Check whether --with-pam_service_name or --without-pam_service_name was given.
12387 if test "${with_pam_service_name+set}" = set; then
12388   withval="$with_pam_service_name"
12389   pam_service_name="$withval"
12390 else
12391   pam_service_name="xscreensaver"
12392 fi;
12393
12394
12395    case "$with_pam" in
12396     yes) ;;
12397     no)  ;;
12398
12399     /*)
12400      echo "$as_me:$LINENO: checking for PAM headers" >&5
12401 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
12402      d=$with_pam/include
12403      if test -d $d; then
12404        X_CFLAGS="-I$d $X_CFLAGS"
12405        echo "$as_me:$LINENO: result: $d" >&5
12406 echo "${ECHO_T}$d" >&6
12407      else
12408        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12409 echo "${ECHO_T}not found ($d: no such directory)" >&6
12410      fi
12411
12412      echo "$as_me:$LINENO: checking for PAM libs" >&5
12413 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
12414      d=$with_pam/lib
12415      if test -d $d; then
12416        X_LIBS="-L$d $X_LIBS"
12417        echo "$as_me:$LINENO: result: $d" >&5
12418 echo "${ECHO_T}$d" >&6
12419      else
12420        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12421 echo "${ECHO_T}not found ($d: no such directory)" >&6
12422      fi
12423
12424      # replace the directory string with "yes".
12425      with_pam_req="yes"
12426      with_pam=$with_pam_req
12427      ;;
12428
12429     *)
12430      echo ""
12431      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
12432      echo "       If it is a directory, then \`DIR/include' will be added to"
12433      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12434      exit 1
12435      ;;
12436    esac
12437
12438
12439 if test "$enable_locking" = yes -a "$with_pam" = yes; then
12440   echo "$as_me:$LINENO: checking for PAM" >&5
12441 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
12442 if test "${ac_cv_pam+set}" = set; then
12443   echo $ECHO_N "(cached) $ECHO_C" >&6
12444 else
12445
12446   ac_save_CPPFLAGS="$CPPFLAGS"
12447   if test \! -z "$includedir" ; then
12448     CPPFLAGS="$CPPFLAGS -I$includedir"
12449   fi
12450   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12451   cat >conftest.$ac_ext <<_ACEOF
12452 /* confdefs.h.  */
12453 _ACEOF
12454 cat confdefs.h >>conftest.$ac_ext
12455 cat >>conftest.$ac_ext <<_ACEOF
12456 /* end confdefs.h.  */
12457 #include <security/pam_appl.h>
12458 int
12459 main ()
12460 {
12461
12462   ;
12463   return 0;
12464 }
12465 _ACEOF
12466 rm -f conftest.$ac_objext
12467 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12468   (eval $ac_compile) 2>conftest.er1
12469   ac_status=$?
12470   grep -v '^ *+' conftest.er1 >conftest.err
12471   rm -f conftest.er1
12472   cat conftest.err >&5
12473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12474   (exit $ac_status); } &&
12475          { ac_try='test -z "$ac_c_werror_flag"
12476                          || test ! -s conftest.err'
12477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12478   (eval $ac_try) 2>&5
12479   ac_status=$?
12480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12481   (exit $ac_status); }; } &&
12482          { ac_try='test -s conftest.$ac_objext'
12483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12484   (eval $ac_try) 2>&5
12485   ac_status=$?
12486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12487   (exit $ac_status); }; }; then
12488   ac_cv_pam=yes
12489 else
12490   echo "$as_me: failed program was:" >&5
12491 sed 's/^/| /' conftest.$ac_ext >&5
12492
12493 ac_cv_pam=no
12494 fi
12495 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12496   CPPFLAGS="$ac_save_CPPFLAGS"
12497 fi
12498 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
12499 echo "${ECHO_T}$ac_cv_pam" >&6
12500   if test "$ac_cv_pam" = yes ; then
12501     have_pam=yes
12502     cat >>confdefs.h <<\_ACEOF
12503 #define HAVE_PAM 1
12504 _ACEOF
12505
12506     cat >>confdefs.h <<_ACEOF
12507 #define PAM_SERVICE_NAME "$pam_service_name"
12508 _ACEOF
12509
12510
12511     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
12512
12513     # libpam typically requires dlopen and dlsym.  On FreeBSD,
12514     # those are in libc.  On Linux and Solaris, they're in libdl.
12515     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12516 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
12517 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12518   echo $ECHO_N "(cached) $ECHO_C" >&6
12519 else
12520   ac_check_lib_save_LIBS=$LIBS
12521 LIBS="-ldl  $LIBS"
12522 cat >conftest.$ac_ext <<_ACEOF
12523 /* confdefs.h.  */
12524 _ACEOF
12525 cat confdefs.h >>conftest.$ac_ext
12526 cat >>conftest.$ac_ext <<_ACEOF
12527 /* end confdefs.h.  */
12528
12529 /* Override any gcc2 internal prototype to avoid an error.  */
12530 #ifdef __cplusplus
12531 extern "C"
12532 #endif
12533 /* We use char because int might match the return type of a gcc2
12534    builtin and then its argument prototype would still apply.  */
12535 char dlopen ();
12536 int
12537 main ()
12538 {
12539 dlopen ();
12540   ;
12541   return 0;
12542 }
12543 _ACEOF
12544 rm -f conftest.$ac_objext conftest$ac_exeext
12545 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12546   (eval $ac_link) 2>conftest.er1
12547   ac_status=$?
12548   grep -v '^ *+' conftest.er1 >conftest.err
12549   rm -f conftest.er1
12550   cat conftest.err >&5
12551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12552   (exit $ac_status); } &&
12553          { ac_try='test -z "$ac_c_werror_flag"
12554                          || test ! -s conftest.err'
12555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12556   (eval $ac_try) 2>&5
12557   ac_status=$?
12558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12559   (exit $ac_status); }; } &&
12560          { ac_try='test -s conftest$ac_exeext'
12561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12562   (eval $ac_try) 2>&5
12563   ac_status=$?
12564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12565   (exit $ac_status); }; }; then
12566   ac_cv_lib_dl_dlopen=yes
12567 else
12568   echo "$as_me: failed program was:" >&5
12569 sed 's/^/| /' conftest.$ac_ext >&5
12570
12571 ac_cv_lib_dl_dlopen=no
12572 fi
12573 rm -f conftest.err conftest.$ac_objext \
12574       conftest$ac_exeext conftest.$ac_ext
12575 LIBS=$ac_check_lib_save_LIBS
12576 fi
12577 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12578 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
12579 if test $ac_cv_lib_dl_dlopen = yes; then
12580   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
12581 fi
12582
12583
12584     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
12585     have_timedwait=no
12586     echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
12587 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6
12588 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
12589   echo $ECHO_N "(cached) $ECHO_C" >&6
12590 else
12591   ac_check_lib_save_LIBS=$LIBS
12592 LIBS="-lc  $LIBS"
12593 cat >conftest.$ac_ext <<_ACEOF
12594 /* confdefs.h.  */
12595 _ACEOF
12596 cat confdefs.h >>conftest.$ac_ext
12597 cat >>conftest.$ac_ext <<_ACEOF
12598 /* end confdefs.h.  */
12599
12600 /* Override any gcc2 internal prototype to avoid an error.  */
12601 #ifdef __cplusplus
12602 extern "C"
12603 #endif
12604 /* We use char because int might match the return type of a gcc2
12605    builtin and then its argument prototype would still apply.  */
12606 char sigtimedwait ();
12607 int
12608 main ()
12609 {
12610 sigtimedwait ();
12611   ;
12612   return 0;
12613 }
12614 _ACEOF
12615 rm -f conftest.$ac_objext conftest$ac_exeext
12616 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12617   (eval $ac_link) 2>conftest.er1
12618   ac_status=$?
12619   grep -v '^ *+' conftest.er1 >conftest.err
12620   rm -f conftest.er1
12621   cat conftest.err >&5
12622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12623   (exit $ac_status); } &&
12624          { ac_try='test -z "$ac_c_werror_flag"
12625                          || test ! -s conftest.err'
12626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12627   (eval $ac_try) 2>&5
12628   ac_status=$?
12629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12630   (exit $ac_status); }; } &&
12631          { ac_try='test -s conftest$ac_exeext'
12632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12633   (eval $ac_try) 2>&5
12634   ac_status=$?
12635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12636   (exit $ac_status); }; }; then
12637   ac_cv_lib_c_sigtimedwait=yes
12638 else
12639   echo "$as_me: failed program was:" >&5
12640 sed 's/^/| /' conftest.$ac_ext >&5
12641
12642 ac_cv_lib_c_sigtimedwait=no
12643 fi
12644 rm -f conftest.err conftest.$ac_objext \
12645       conftest$ac_exeext conftest.$ac_ext
12646 LIBS=$ac_check_lib_save_LIBS
12647 fi
12648 echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
12649 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6
12650 if test $ac_cv_lib_c_sigtimedwait = yes; then
12651   have_timedwait=yes
12652 fi
12653
12654     if test "$have_timedwait" = no ; then
12655       echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
12656 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6
12657 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
12658   echo $ECHO_N "(cached) $ECHO_C" >&6
12659 else
12660   ac_check_lib_save_LIBS=$LIBS
12661 LIBS="-lrt  $LIBS"
12662 cat >conftest.$ac_ext <<_ACEOF
12663 /* confdefs.h.  */
12664 _ACEOF
12665 cat confdefs.h >>conftest.$ac_ext
12666 cat >>conftest.$ac_ext <<_ACEOF
12667 /* end confdefs.h.  */
12668
12669 /* Override any gcc2 internal prototype to avoid an error.  */
12670 #ifdef __cplusplus
12671 extern "C"
12672 #endif
12673 /* We use char because int might match the return type of a gcc2
12674    builtin and then its argument prototype would still apply.  */
12675 char sigtimedwait ();
12676 int
12677 main ()
12678 {
12679 sigtimedwait ();
12680   ;
12681   return 0;
12682 }
12683 _ACEOF
12684 rm -f conftest.$ac_objext conftest$ac_exeext
12685 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12686   (eval $ac_link) 2>conftest.er1
12687   ac_status=$?
12688   grep -v '^ *+' conftest.er1 >conftest.err
12689   rm -f conftest.er1
12690   cat conftest.err >&5
12691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12692   (exit $ac_status); } &&
12693          { ac_try='test -z "$ac_c_werror_flag"
12694                          || test ! -s conftest.err'
12695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12696   (eval $ac_try) 2>&5
12697   ac_status=$?
12698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12699   (exit $ac_status); }; } &&
12700          { ac_try='test -s conftest$ac_exeext'
12701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12702   (eval $ac_try) 2>&5
12703   ac_status=$?
12704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12705   (exit $ac_status); }; }; then
12706   ac_cv_lib_rt_sigtimedwait=yes
12707 else
12708   echo "$as_me: failed program was:" >&5
12709 sed 's/^/| /' conftest.$ac_ext >&5
12710
12711 ac_cv_lib_rt_sigtimedwait=no
12712 fi
12713 rm -f conftest.err conftest.$ac_objext \
12714       conftest$ac_exeext conftest.$ac_ext
12715 LIBS=$ac_check_lib_save_LIBS
12716 fi
12717 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
12718 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6
12719 if test $ac_cv_lib_rt_sigtimedwait = yes; then
12720   PASSWD_LIBS="${PASSWD_LIBS} -lrt"
12721 fi
12722
12723     fi
12724
12725     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
12726 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
12727     if test "${ac_cv_pam_strerror_args+set}" = set; then
12728   echo $ECHO_N "(cached) $ECHO_C" >&6
12729 else
12730   cat >conftest.$ac_ext <<_ACEOF
12731 /* confdefs.h.  */
12732 _ACEOF
12733 cat confdefs.h >>conftest.$ac_ext
12734 cat >>conftest.$ac_ext <<_ACEOF
12735 /* end confdefs.h.  */
12736 #include <stdio.h>
12737                       #include <stdlib.h>
12738                       #include <security/pam_appl.h>
12739 int
12740 main ()
12741 {
12742 pam_handle_t *pamh = 0;
12743                       char *s = pam_strerror(pamh, PAM_SUCCESS);
12744   ;
12745   return 0;
12746 }
12747 _ACEOF
12748 rm -f conftest.$ac_objext
12749 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12750   (eval $ac_compile) 2>conftest.er1
12751   ac_status=$?
12752   grep -v '^ *+' conftest.er1 >conftest.err
12753   rm -f conftest.er1
12754   cat conftest.err >&5
12755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12756   (exit $ac_status); } &&
12757          { ac_try='test -z "$ac_c_werror_flag"
12758                          || test ! -s conftest.err'
12759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12760   (eval $ac_try) 2>&5
12761   ac_status=$?
12762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12763   (exit $ac_status); }; } &&
12764          { ac_try='test -s conftest.$ac_objext'
12765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12766   (eval $ac_try) 2>&5
12767   ac_status=$?
12768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12769   (exit $ac_status); }; }; then
12770   ac_pam_strerror_args=2
12771 else
12772   echo "$as_me: failed program was:" >&5
12773 sed 's/^/| /' conftest.$ac_ext >&5
12774
12775 cat >conftest.$ac_ext <<_ACEOF
12776 /* confdefs.h.  */
12777 _ACEOF
12778 cat confdefs.h >>conftest.$ac_ext
12779 cat >>conftest.$ac_ext <<_ACEOF
12780 /* end confdefs.h.  */
12781 #include <stdio.h>
12782                                       #include <stdlib.h>
12783                                       #include <security/pam_appl.h>
12784 int
12785 main ()
12786 {
12787 char *s =
12788                                        pam_strerror(PAM_SUCCESS);
12789   ;
12790   return 0;
12791 }
12792 _ACEOF
12793 rm -f conftest.$ac_objext
12794 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12795   (eval $ac_compile) 2>conftest.er1
12796   ac_status=$?
12797   grep -v '^ *+' conftest.er1 >conftest.err
12798   rm -f conftest.er1
12799   cat conftest.err >&5
12800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12801   (exit $ac_status); } &&
12802          { ac_try='test -z "$ac_c_werror_flag"
12803                          || test ! -s conftest.err'
12804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12805   (eval $ac_try) 2>&5
12806   ac_status=$?
12807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12808   (exit $ac_status); }; } &&
12809          { ac_try='test -s conftest.$ac_objext'
12810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12811   (eval $ac_try) 2>&5
12812   ac_status=$?
12813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12814   (exit $ac_status); }; }; then
12815   ac_pam_strerror_args=1
12816 else
12817   echo "$as_me: failed program was:" >&5
12818 sed 's/^/| /' conftest.$ac_ext >&5
12819
12820 ac_pam_strerror_args=0
12821 fi
12822 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12823 fi
12824 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12825       ac_cv_pam_strerror_args=$ac_pam_strerror_args
12826 fi
12827
12828     ac_pam_strerror_args=$ac_cv_pam_strerror_args
12829     if test "$ac_pam_strerror_args" = 1 ; then
12830       echo "$as_me:$LINENO: result: one argument" >&5
12831 echo "${ECHO_T}one argument" >&6
12832     elif test "$ac_pam_strerror_args" = 2 ; then
12833       cat >>confdefs.h <<\_ACEOF
12834 #define PAM_STRERROR_TWO_ARGS 1
12835 _ACEOF
12836
12837       echo "$as_me:$LINENO: result: two arguments" >&5
12838 echo "${ECHO_T}two arguments" >&6
12839     else
12840       echo "$as_me:$LINENO: result: unknown" >&5
12841 echo "${ECHO_T}unknown" >&6
12842     fi
12843   fi
12844 fi
12845
12846
12847 ###############################################################################
12848 #
12849 #       Check for Kerberos.
12850 #
12851 ###############################################################################
12852
12853 have_kerberos=no
12854 have_kerberos5=no
12855 with_kerberos_req=unspecified
12856
12857
12858 # Check whether --with-kerberos or --without-kerberos was given.
12859 if test "${with_kerberos+set}" = set; then
12860   withval="$with_kerberos"
12861   with_kerberos="$withval"; with_kerberos_req="$withval"
12862 else
12863   with_kerberos=yes
12864 fi;
12865
12866
12867    case "$with_kerberos" in
12868     yes) ;;
12869     no)  ;;
12870
12871     /*)
12872      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
12873 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
12874      d=$with_kerberos/include
12875      if test -d $d; then
12876        X_CFLAGS="-I$d $X_CFLAGS"
12877        echo "$as_me:$LINENO: result: $d" >&5
12878 echo "${ECHO_T}$d" >&6
12879      else
12880        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12881 echo "${ECHO_T}not found ($d: no such directory)" >&6
12882      fi
12883
12884      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
12885 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
12886      d=$with_kerberos/lib
12887      if test -d $d; then
12888        X_LIBS="-L$d $X_LIBS"
12889        echo "$as_me:$LINENO: result: $d" >&5
12890 echo "${ECHO_T}$d" >&6
12891      else
12892        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12893 echo "${ECHO_T}not found ($d: no such directory)" >&6
12894      fi
12895
12896      # replace the directory string with "yes".
12897      with_kerberos_req="yes"
12898      with_kerberos=$with_kerberos_req
12899      ;;
12900
12901     *)
12902      echo ""
12903      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
12904      echo "       If it is a directory, then \`DIR/include' will be added to"
12905      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12906      exit 1
12907      ;;
12908    esac
12909
12910
12911 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
12912   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
12913 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
12914 if test "${ac_cv_kerberos+set}" = set; then
12915   echo $ECHO_N "(cached) $ECHO_C" >&6
12916 else
12917
12918   ac_save_CPPFLAGS="$CPPFLAGS"
12919   if test \! -z "$includedir" ; then
12920     CPPFLAGS="$CPPFLAGS -I$includedir"
12921   fi
12922   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12923   cat >conftest.$ac_ext <<_ACEOF
12924 /* confdefs.h.  */
12925 _ACEOF
12926 cat confdefs.h >>conftest.$ac_ext
12927 cat >>conftest.$ac_ext <<_ACEOF
12928 /* end confdefs.h.  */
12929 #include <krb.h>
12930 int
12931 main ()
12932 {
12933
12934   ;
12935   return 0;
12936 }
12937 _ACEOF
12938 rm -f conftest.$ac_objext
12939 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12940   (eval $ac_compile) 2>conftest.er1
12941   ac_status=$?
12942   grep -v '^ *+' conftest.er1 >conftest.err
12943   rm -f conftest.er1
12944   cat conftest.err >&5
12945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12946   (exit $ac_status); } &&
12947          { ac_try='test -z "$ac_c_werror_flag"
12948                          || test ! -s conftest.err'
12949   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12950   (eval $ac_try) 2>&5
12951   ac_status=$?
12952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12953   (exit $ac_status); }; } &&
12954          { ac_try='test -s conftest.$ac_objext'
12955   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12956   (eval $ac_try) 2>&5
12957   ac_status=$?
12958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12959   (exit $ac_status); }; }; then
12960   ac_cv_kerberos=yes
12961 else
12962   echo "$as_me: failed program was:" >&5
12963 sed 's/^/| /' conftest.$ac_ext >&5
12964
12965 ac_cv_kerberos=no
12966 fi
12967 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12968   CPPFLAGS="$ac_save_CPPFLAGS"
12969 fi
12970 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
12971 echo "${ECHO_T}$ac_cv_kerberos" >&6
12972   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
12973 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
12974 if test "${ac_cv_kerberos5+set}" = set; then
12975   echo $ECHO_N "(cached) $ECHO_C" >&6
12976 else
12977
12978   ac_save_CPPFLAGS="$CPPFLAGS"
12979   if test \! -z "$includedir" ; then
12980     CPPFLAGS="$CPPFLAGS -I$includedir"
12981   fi
12982   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12983   cat >conftest.$ac_ext <<_ACEOF
12984 /* confdefs.h.  */
12985 _ACEOF
12986 cat confdefs.h >>conftest.$ac_ext
12987 cat >>conftest.$ac_ext <<_ACEOF
12988 /* end confdefs.h.  */
12989 #include <kerberosIV/krb.h>
12990 int
12991 main ()
12992 {
12993
12994   ;
12995   return 0;
12996 }
12997 _ACEOF
12998 rm -f conftest.$ac_objext
12999 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13000   (eval $ac_compile) 2>conftest.er1
13001   ac_status=$?
13002   grep -v '^ *+' conftest.er1 >conftest.err
13003   rm -f conftest.er1
13004   cat conftest.err >&5
13005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13006   (exit $ac_status); } &&
13007          { ac_try='test -z "$ac_c_werror_flag"
13008                          || test ! -s conftest.err'
13009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13010   (eval $ac_try) 2>&5
13011   ac_status=$?
13012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13013   (exit $ac_status); }; } &&
13014          { ac_try='test -s conftest.$ac_objext'
13015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13016   (eval $ac_try) 2>&5
13017   ac_status=$?
13018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13019   (exit $ac_status); }; }; then
13020   ac_cv_kerberos5=yes
13021 else
13022   echo "$as_me: failed program was:" >&5
13023 sed 's/^/| /' conftest.$ac_ext >&5
13024
13025 ac_cv_kerberos5=no
13026 fi
13027 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13028   CPPFLAGS="$ac_save_CPPFLAGS"
13029 fi
13030 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
13031 echo "${ECHO_T}$ac_cv_kerberos5" >&6
13032
13033   if test "$ac_cv_kerberos" = yes ; then
13034     have_kerberos=yes
13035     cat >>confdefs.h <<\_ACEOF
13036 #define HAVE_KERBEROS 1
13037 _ACEOF
13038
13039   fi
13040
13041   if test "$ac_cv_kerberos5" = yes ; then
13042
13043     # Andrew Snare <ajs@pigpond.com> wrote:
13044     #
13045     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
13046     # (krb4) was also available.  This turns out not to be the case with
13047     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
13048     # is optional.
13049     #
13050     # So, disable kerberosV support if libkrb4 can't be found.
13051     # This is not the best solution, but it makes the compile not fail.
13052     #
13053
13054   ac_save_CPPFLAGS="$CPPFLAGS"
13055   ac_save_LDFLAGS="$LDFLAGS"
13056 #  ac_save_LIBS="$LIBS"
13057
13058   if test \! -z "$includedir" ; then
13059     CPPFLAGS="$CPPFLAGS -I$includedir"
13060   fi
13061   # note: $X_CFLAGS includes $x_includes
13062   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13063
13064   if test \! -z "$libdir" ; then
13065     LDFLAGS="$LDFLAGS -L$libdir"
13066   fi
13067   # note: $X_LIBS includes $x_libraries
13068   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13069
13070   echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
13071 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6
13072 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
13073   echo $ECHO_N "(cached) $ECHO_C" >&6
13074 else
13075   ac_check_lib_save_LIBS=$LIBS
13076 LIBS="-lkrb4  $LIBS"
13077 cat >conftest.$ac_ext <<_ACEOF
13078 /* confdefs.h.  */
13079 _ACEOF
13080 cat confdefs.h >>conftest.$ac_ext
13081 cat >>conftest.$ac_ext <<_ACEOF
13082 /* end confdefs.h.  */
13083
13084 /* Override any gcc2 internal prototype to avoid an error.  */
13085 #ifdef __cplusplus
13086 extern "C"
13087 #endif
13088 /* We use char because int might match the return type of a gcc2
13089    builtin and then its argument prototype would still apply.  */
13090 char krb_get_tf_realm ();
13091 int
13092 main ()
13093 {
13094 krb_get_tf_realm ();
13095   ;
13096   return 0;
13097 }
13098 _ACEOF
13099 rm -f conftest.$ac_objext conftest$ac_exeext
13100 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13101   (eval $ac_link) 2>conftest.er1
13102   ac_status=$?
13103   grep -v '^ *+' conftest.er1 >conftest.err
13104   rm -f conftest.er1
13105   cat conftest.err >&5
13106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13107   (exit $ac_status); } &&
13108          { ac_try='test -z "$ac_c_werror_flag"
13109                          || test ! -s conftest.err'
13110   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13111   (eval $ac_try) 2>&5
13112   ac_status=$?
13113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13114   (exit $ac_status); }; } &&
13115          { ac_try='test -s conftest$ac_exeext'
13116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13117   (eval $ac_try) 2>&5
13118   ac_status=$?
13119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13120   (exit $ac_status); }; }; then
13121   ac_cv_lib_krb4_krb_get_tf_realm=yes
13122 else
13123   echo "$as_me: failed program was:" >&5
13124 sed 's/^/| /' conftest.$ac_ext >&5
13125
13126 ac_cv_lib_krb4_krb_get_tf_realm=no
13127 fi
13128 rm -f conftest.err conftest.$ac_objext \
13129       conftest$ac_exeext conftest.$ac_ext
13130 LIBS=$ac_check_lib_save_LIBS
13131 fi
13132 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
13133 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6
13134 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
13135   have_kerberos=yes
13136 else
13137   have_kerberos=no
13138 fi
13139
13140   CPPFLAGS="$ac_save_CPPFLAGS"
13141   LDFLAGS="$ac_save_LDFLAGS"
13142 #  LIBS="$ac_save_LIBS"
13143
13144     if test "$have_kerberos" = yes ; then
13145       have_kerberos5=yes
13146       cat >>confdefs.h <<\_ACEOF
13147 #define HAVE_KERBEROS 1
13148 _ACEOF
13149
13150       cat >>confdefs.h <<\_ACEOF
13151 #define HAVE_KERBEROS5 1
13152 _ACEOF
13153
13154     else
13155       have_kerberos5=no
13156       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
13157 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
13158     fi
13159
13160   fi
13161
13162   if test "$have_kerberos5" = yes ; then
13163     # from Matt Knopp <mhat@infocalypse.netlag.com>
13164     # (who got it from amu@mit.edu)
13165
13166     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
13167
13168     # jwz: MacOS X uses -lkrb5, but not -lcrypt
13169
13170   ac_save_CPPFLAGS="$CPPFLAGS"
13171   ac_save_LDFLAGS="$LDFLAGS"
13172 #  ac_save_LIBS="$LIBS"
13173
13174   if test \! -z "$includedir" ; then
13175     CPPFLAGS="$CPPFLAGS -I$includedir"
13176   fi
13177   # note: $X_CFLAGS includes $x_includes
13178   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13179
13180   if test \! -z "$libdir" ; then
13181     LDFLAGS="$LDFLAGS -L$libdir"
13182   fi
13183   # note: $X_LIBS includes $x_libraries
13184   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13185
13186   echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
13187 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
13188 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
13189   echo $ECHO_N "(cached) $ECHO_C" >&6
13190 else
13191   ac_check_lib_save_LIBS=$LIBS
13192 LIBS="-lcrypt  $LIBS"
13193 cat >conftest.$ac_ext <<_ACEOF
13194 /* confdefs.h.  */
13195 _ACEOF
13196 cat confdefs.h >>conftest.$ac_ext
13197 cat >>conftest.$ac_ext <<_ACEOF
13198 /* end confdefs.h.  */
13199
13200 /* Override any gcc2 internal prototype to avoid an error.  */
13201 #ifdef __cplusplus
13202 extern "C"
13203 #endif
13204 /* We use char because int might match the return type of a gcc2
13205    builtin and then its argument prototype would still apply.  */
13206 char crypt ();
13207 int
13208 main ()
13209 {
13210 crypt ();
13211   ;
13212   return 0;
13213 }
13214 _ACEOF
13215 rm -f conftest.$ac_objext conftest$ac_exeext
13216 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13217   (eval $ac_link) 2>conftest.er1
13218   ac_status=$?
13219   grep -v '^ *+' conftest.er1 >conftest.err
13220   rm -f conftest.er1
13221   cat conftest.err >&5
13222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13223   (exit $ac_status); } &&
13224          { ac_try='test -z "$ac_c_werror_flag"
13225                          || test ! -s conftest.err'
13226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13227   (eval $ac_try) 2>&5
13228   ac_status=$?
13229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13230   (exit $ac_status); }; } &&
13231          { ac_try='test -s conftest$ac_exeext'
13232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13233   (eval $ac_try) 2>&5
13234   ac_status=$?
13235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13236   (exit $ac_status); }; }; then
13237   ac_cv_lib_crypt_crypt=yes
13238 else
13239   echo "$as_me: failed program was:" >&5
13240 sed 's/^/| /' conftest.$ac_ext >&5
13241
13242 ac_cv_lib_crypt_crypt=no
13243 fi
13244 rm -f conftest.err conftest.$ac_objext \
13245       conftest$ac_exeext conftest.$ac_ext
13246 LIBS=$ac_check_lib_save_LIBS
13247 fi
13248 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
13249 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
13250 if test $ac_cv_lib_crypt_crypt = yes; then
13251   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
13252 fi
13253
13254   CPPFLAGS="$ac_save_CPPFLAGS"
13255   LDFLAGS="$ac_save_LDFLAGS"
13256 #  LIBS="$ac_save_LIBS"
13257
13258
13259   elif test "$have_kerberos" = yes ; then
13260     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
13261     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
13262   fi
13263
13264   if test "$have_kerberos" = yes ; then
13265     echo "$as_me:$LINENO: checking for res_search" >&5
13266 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
13267 if test "${ac_cv_func_res_search+set}" = set; then
13268   echo $ECHO_N "(cached) $ECHO_C" >&6
13269 else
13270   cat >conftest.$ac_ext <<_ACEOF
13271 /* confdefs.h.  */
13272 _ACEOF
13273 cat confdefs.h >>conftest.$ac_ext
13274 cat >>conftest.$ac_ext <<_ACEOF
13275 /* end confdefs.h.  */
13276 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
13277    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13278 #define res_search innocuous_res_search
13279
13280 /* System header to define __stub macros and hopefully few prototypes,
13281     which can conflict with char res_search (); below.
13282     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13283     <limits.h> exists even on freestanding compilers.  */
13284
13285 #ifdef __STDC__
13286 # include <limits.h>
13287 #else
13288 # include <assert.h>
13289 #endif
13290
13291 #undef res_search
13292
13293 /* Override any gcc2 internal prototype to avoid an error.  */
13294 #ifdef __cplusplus
13295 extern "C"
13296 {
13297 #endif
13298 /* We use char because int might match the return type of a gcc2
13299    builtin and then its argument prototype would still apply.  */
13300 char res_search ();
13301 /* The GNU C library defines this for functions which it implements
13302     to always fail with ENOSYS.  Some functions are actually named
13303     something starting with __ and the normal name is an alias.  */
13304 #if defined (__stub_res_search) || defined (__stub___res_search)
13305 choke me
13306 #else
13307 char (*f) () = res_search;
13308 #endif
13309 #ifdef __cplusplus
13310 }
13311 #endif
13312
13313 int
13314 main ()
13315 {
13316 return f != res_search;
13317   ;
13318   return 0;
13319 }
13320 _ACEOF
13321 rm -f conftest.$ac_objext conftest$ac_exeext
13322 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13323   (eval $ac_link) 2>conftest.er1
13324   ac_status=$?
13325   grep -v '^ *+' conftest.er1 >conftest.err
13326   rm -f conftest.er1
13327   cat conftest.err >&5
13328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13329   (exit $ac_status); } &&
13330          { ac_try='test -z "$ac_c_werror_flag"
13331                          || test ! -s conftest.err'
13332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13333   (eval $ac_try) 2>&5
13334   ac_status=$?
13335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13336   (exit $ac_status); }; } &&
13337          { ac_try='test -s conftest$ac_exeext'
13338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13339   (eval $ac_try) 2>&5
13340   ac_status=$?
13341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13342   (exit $ac_status); }; }; then
13343   ac_cv_func_res_search=yes
13344 else
13345   echo "$as_me: failed program was:" >&5
13346 sed 's/^/| /' conftest.$ac_ext >&5
13347
13348 ac_cv_func_res_search=no
13349 fi
13350 rm -f conftest.err conftest.$ac_objext \
13351       conftest$ac_exeext conftest.$ac_ext
13352 fi
13353 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
13354 echo "${ECHO_T}$ac_cv_func_res_search" >&6
13355 if test $ac_cv_func_res_search = yes; then
13356   :
13357 else
13358   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
13359 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
13360 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
13361   echo $ECHO_N "(cached) $ECHO_C" >&6
13362 else
13363   ac_check_lib_save_LIBS=$LIBS
13364 LIBS="-lresolv  $LIBS"
13365 cat >conftest.$ac_ext <<_ACEOF
13366 /* confdefs.h.  */
13367 _ACEOF
13368 cat confdefs.h >>conftest.$ac_ext
13369 cat >>conftest.$ac_ext <<_ACEOF
13370 /* end confdefs.h.  */
13371
13372 /* Override any gcc2 internal prototype to avoid an error.  */
13373 #ifdef __cplusplus
13374 extern "C"
13375 #endif
13376 /* We use char because int might match the return type of a gcc2
13377    builtin and then its argument prototype would still apply.  */
13378 char res_search ();
13379 int
13380 main ()
13381 {
13382 res_search ();
13383   ;
13384   return 0;
13385 }
13386 _ACEOF
13387 rm -f conftest.$ac_objext conftest$ac_exeext
13388 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13389   (eval $ac_link) 2>conftest.er1
13390   ac_status=$?
13391   grep -v '^ *+' conftest.er1 >conftest.err
13392   rm -f conftest.er1
13393   cat conftest.err >&5
13394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13395   (exit $ac_status); } &&
13396          { ac_try='test -z "$ac_c_werror_flag"
13397                          || test ! -s conftest.err'
13398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13399   (eval $ac_try) 2>&5
13400   ac_status=$?
13401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13402   (exit $ac_status); }; } &&
13403          { ac_try='test -s conftest$ac_exeext'
13404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13405   (eval $ac_try) 2>&5
13406   ac_status=$?
13407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13408   (exit $ac_status); }; }; then
13409   ac_cv_lib_resolv_res_search=yes
13410 else
13411   echo "$as_me: failed program was:" >&5
13412 sed 's/^/| /' conftest.$ac_ext >&5
13413
13414 ac_cv_lib_resolv_res_search=no
13415 fi
13416 rm -f conftest.err conftest.$ac_objext \
13417       conftest$ac_exeext conftest.$ac_ext
13418 LIBS=$ac_check_lib_save_LIBS
13419 fi
13420 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
13421 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
13422 if test $ac_cv_lib_resolv_res_search = yes; then
13423   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
13424 else
13425   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
13426 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
13427
13428 fi
13429
13430 fi
13431
13432   fi
13433 fi
13434
13435
13436 ###############################################################################
13437 #
13438 #       Check for the nine billion variants of shadow passwords...
13439 #
13440 ###############################################################################
13441
13442 need_setuid=no
13443
13444 have_shadow=no
13445 with_shadow_req=unspecified
13446
13447
13448 # Check whether --with-shadow or --without-shadow was given.
13449 if test "${with_shadow+set}" = set; then
13450   withval="$with_shadow"
13451   with_shadow="$withval"; with_shadow_req="$withval"
13452 else
13453   with_shadow=yes
13454 fi;
13455
13456
13457    case "$with_shadow" in
13458     yes) ;;
13459     no)  ;;
13460
13461     /*)
13462      echo "$as_me:$LINENO: checking for shadow password headers" >&5
13463 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
13464      d=$with_shadow/include
13465      if test -d $d; then
13466        X_CFLAGS="-I$d $X_CFLAGS"
13467        echo "$as_me:$LINENO: result: $d" >&5
13468 echo "${ECHO_T}$d" >&6
13469      else
13470        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13471 echo "${ECHO_T}not found ($d: no such directory)" >&6
13472      fi
13473
13474      echo "$as_me:$LINENO: checking for shadow password libs" >&5
13475 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
13476      d=$with_shadow/lib
13477      if test -d $d; then
13478        X_LIBS="-L$d $X_LIBS"
13479        echo "$as_me:$LINENO: result: $d" >&5
13480 echo "${ECHO_T}$d" >&6
13481      else
13482        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13483 echo "${ECHO_T}not found ($d: no such directory)" >&6
13484      fi
13485
13486      # replace the directory string with "yes".
13487      with_shadow_req="yes"
13488      with_shadow=$with_shadow_req
13489      ;;
13490
13491     *)
13492      echo ""
13493      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
13494      echo "       If it is a directory, then \`DIR/include' will be added to"
13495      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13496      exit 1
13497      ;;
13498    esac
13499
13500
13501 if test "$enable_locking" = no ; then
13502   with_shadow_req=no
13503   with_shadow=no
13504 fi
13505
13506
13507 ###############################################################################
13508 #
13509 #       Check for Sun "adjunct" passwords.
13510 #
13511 ###############################################################################
13512
13513 if test "$with_shadow" = yes ; then
13514   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
13515 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
13516 if test "${ac_cv_sun_adjunct+set}" = set; then
13517   echo $ECHO_N "(cached) $ECHO_C" >&6
13518 else
13519
13520   ac_save_CPPFLAGS="$CPPFLAGS"
13521   if test \! -z "$includedir" ; then
13522     CPPFLAGS="$CPPFLAGS -I$includedir"
13523   fi
13524   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13525   cat >conftest.$ac_ext <<_ACEOF
13526 /* confdefs.h.  */
13527 _ACEOF
13528 cat confdefs.h >>conftest.$ac_ext
13529 cat >>conftest.$ac_ext <<_ACEOF
13530 /* end confdefs.h.  */
13531 #include <stdlib.h>
13532                                     #include <unistd.h>
13533                                     #include <sys/types.h>
13534                                     #include <sys/label.h>
13535                                     #include <sys/audit.h>
13536                                     #include <pwdadj.h>
13537 int
13538 main ()
13539 {
13540 struct passwd_adjunct *p = getpwanam("nobody");
13541                        const char *pw = p->pwa_passwd;
13542   ;
13543   return 0;
13544 }
13545 _ACEOF
13546 rm -f conftest.$ac_objext
13547 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13548   (eval $ac_compile) 2>conftest.er1
13549   ac_status=$?
13550   grep -v '^ *+' conftest.er1 >conftest.err
13551   rm -f conftest.er1
13552   cat conftest.err >&5
13553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13554   (exit $ac_status); } &&
13555          { ac_try='test -z "$ac_c_werror_flag"
13556                          || test ! -s conftest.err'
13557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13558   (eval $ac_try) 2>&5
13559   ac_status=$?
13560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13561   (exit $ac_status); }; } &&
13562          { ac_try='test -s conftest.$ac_objext'
13563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13564   (eval $ac_try) 2>&5
13565   ac_status=$?
13566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13567   (exit $ac_status); }; }; then
13568   ac_cv_sun_adjunct=yes
13569 else
13570   echo "$as_me: failed program was:" >&5
13571 sed 's/^/| /' conftest.$ac_ext >&5
13572
13573 ac_cv_sun_adjunct=no
13574 fi
13575 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13576   CPPFLAGS="$ac_save_CPPFLAGS"
13577 fi
13578 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
13579 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
13580   if test "$ac_cv_sun_adjunct" = yes; then
13581     have_shadow_adjunct=yes
13582     have_shadow=yes
13583     need_setuid=yes
13584   fi
13585 fi
13586
13587
13588 ###############################################################################
13589 #
13590 #       Check for DEC and SCO so-called "enhanced" security.
13591 #
13592 ###############################################################################
13593
13594 if test "$with_shadow" = yes ; then
13595   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
13596 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
13597 if test "${ac_cv_enhanced_passwd+set}" = set; then
13598   echo $ECHO_N "(cached) $ECHO_C" >&6
13599 else
13600
13601   ac_save_CPPFLAGS="$CPPFLAGS"
13602   if test \! -z "$includedir" ; then
13603     CPPFLAGS="$CPPFLAGS -I$includedir"
13604   fi
13605   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13606   cat >conftest.$ac_ext <<_ACEOF
13607 /* confdefs.h.  */
13608 _ACEOF
13609 cat confdefs.h >>conftest.$ac_ext
13610 cat >>conftest.$ac_ext <<_ACEOF
13611 /* end confdefs.h.  */
13612 #include <stdlib.h>
13613                                     #include <unistd.h>
13614                                     #include <sys/types.h>
13615                                     #include <pwd.h>
13616                                     #include <sys/security.h>
13617                                     #include <prot.h>
13618 int
13619 main ()
13620 {
13621 struct pr_passwd *p;
13622                        const char *pw;
13623                        set_auth_parameters(0, 0);
13624                        check_auth_parameters();
13625                        p = getprpwnam("nobody");
13626                        pw = p->ufld.fd_encrypt;
13627   ;
13628   return 0;
13629 }
13630 _ACEOF
13631 rm -f conftest.$ac_objext
13632 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13633   (eval $ac_compile) 2>conftest.er1
13634   ac_status=$?
13635   grep -v '^ *+' conftest.er1 >conftest.err
13636   rm -f conftest.er1
13637   cat conftest.err >&5
13638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13639   (exit $ac_status); } &&
13640          { ac_try='test -z "$ac_c_werror_flag"
13641                          || test ! -s conftest.err'
13642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13643   (eval $ac_try) 2>&5
13644   ac_status=$?
13645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13646   (exit $ac_status); }; } &&
13647          { ac_try='test -s conftest.$ac_objext'
13648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13649   (eval $ac_try) 2>&5
13650   ac_status=$?
13651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13652   (exit $ac_status); }; }; then
13653   ac_cv_enhanced_passwd=yes
13654 else
13655   echo "$as_me: failed program was:" >&5
13656 sed 's/^/| /' conftest.$ac_ext >&5
13657
13658 ac_cv_enhanced_passwd=no
13659 fi
13660 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13661   CPPFLAGS="$ac_save_CPPFLAGS"
13662 fi
13663 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
13664 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
13665   if test $ac_cv_enhanced_passwd = yes; then
13666     have_shadow_enhanced=yes
13667     have_shadow=yes
13668     need_setuid=yes
13669
13670     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
13671     # (I'm told it needs -lcurses too, but I don't understand why.)
13672     # But on DEC, it's in -lsecurity.
13673     #
13674     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
13675 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
13676 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
13677   echo $ECHO_N "(cached) $ECHO_C" >&6
13678 else
13679   ac_check_lib_save_LIBS=$LIBS
13680 LIBS="-lprot -lx $LIBS"
13681 cat >conftest.$ac_ext <<_ACEOF
13682 /* confdefs.h.  */
13683 _ACEOF
13684 cat confdefs.h >>conftest.$ac_ext
13685 cat >>conftest.$ac_ext <<_ACEOF
13686 /* end confdefs.h.  */
13687
13688 /* Override any gcc2 internal prototype to avoid an error.  */
13689 #ifdef __cplusplus
13690 extern "C"
13691 #endif
13692 /* We use char because int might match the return type of a gcc2
13693    builtin and then its argument prototype would still apply.  */
13694 char getprpwnam ();
13695 int
13696 main ()
13697 {
13698 getprpwnam ();
13699   ;
13700   return 0;
13701 }
13702 _ACEOF
13703 rm -f conftest.$ac_objext conftest$ac_exeext
13704 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13705   (eval $ac_link) 2>conftest.er1
13706   ac_status=$?
13707   grep -v '^ *+' conftest.er1 >conftest.err
13708   rm -f conftest.er1
13709   cat conftest.err >&5
13710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13711   (exit $ac_status); } &&
13712          { ac_try='test -z "$ac_c_werror_flag"
13713                          || test ! -s conftest.err'
13714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13715   (eval $ac_try) 2>&5
13716   ac_status=$?
13717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13718   (exit $ac_status); }; } &&
13719          { ac_try='test -s conftest$ac_exeext'
13720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13721   (eval $ac_try) 2>&5
13722   ac_status=$?
13723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13724   (exit $ac_status); }; }; then
13725   ac_cv_lib_prot_getprpwnam=yes
13726 else
13727   echo "$as_me: failed program was:" >&5
13728 sed 's/^/| /' conftest.$ac_ext >&5
13729
13730 ac_cv_lib_prot_getprpwnam=no
13731 fi
13732 rm -f conftest.err conftest.$ac_objext \
13733       conftest$ac_exeext conftest.$ac_ext
13734 LIBS=$ac_check_lib_save_LIBS
13735 fi
13736 echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
13737 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
13738 if test $ac_cv_lib_prot_getprpwnam = yes; then
13739   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
13740 else
13741   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
13742 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
13743 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
13744   echo $ECHO_N "(cached) $ECHO_C" >&6
13745 else
13746   ac_check_lib_save_LIBS=$LIBS
13747 LIBS="-lsecurity  $LIBS"
13748 cat >conftest.$ac_ext <<_ACEOF
13749 /* confdefs.h.  */
13750 _ACEOF
13751 cat confdefs.h >>conftest.$ac_ext
13752 cat >>conftest.$ac_ext <<_ACEOF
13753 /* end confdefs.h.  */
13754
13755 /* Override any gcc2 internal prototype to avoid an error.  */
13756 #ifdef __cplusplus
13757 extern "C"
13758 #endif
13759 /* We use char because int might match the return type of a gcc2
13760    builtin and then its argument prototype would still apply.  */
13761 char getprpwnam ();
13762 int
13763 main ()
13764 {
13765 getprpwnam ();
13766   ;
13767   return 0;
13768 }
13769 _ACEOF
13770 rm -f conftest.$ac_objext conftest$ac_exeext
13771 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13772   (eval $ac_link) 2>conftest.er1
13773   ac_status=$?
13774   grep -v '^ *+' conftest.er1 >conftest.err
13775   rm -f conftest.er1
13776   cat conftest.err >&5
13777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13778   (exit $ac_status); } &&
13779          { ac_try='test -z "$ac_c_werror_flag"
13780                          || test ! -s conftest.err'
13781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13782   (eval $ac_try) 2>&5
13783   ac_status=$?
13784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13785   (exit $ac_status); }; } &&
13786          { ac_try='test -s conftest$ac_exeext'
13787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13788   (eval $ac_try) 2>&5
13789   ac_status=$?
13790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13791   (exit $ac_status); }; }; then
13792   ac_cv_lib_security_getprpwnam=yes
13793 else
13794   echo "$as_me: failed program was:" >&5
13795 sed 's/^/| /' conftest.$ac_ext >&5
13796
13797 ac_cv_lib_security_getprpwnam=no
13798 fi
13799 rm -f conftest.err conftest.$ac_objext \
13800       conftest$ac_exeext conftest.$ac_ext
13801 LIBS=$ac_check_lib_save_LIBS
13802 fi
13803 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
13804 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
13805 if test $ac_cv_lib_security_getprpwnam = yes; then
13806   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
13807 fi
13808
13809 fi
13810
13811   fi
13812 fi
13813
13814 ###############################################################################
13815 #
13816 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
13817 #
13818 ###############################################################################
13819
13820 if test "$with_shadow" = yes ; then
13821   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
13822 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
13823 if test "${ac_cv_hpux_passwd+set}" = set; then
13824   echo $ECHO_N "(cached) $ECHO_C" >&6
13825 else
13826
13827   ac_save_CPPFLAGS="$CPPFLAGS"
13828   if test \! -z "$includedir" ; then
13829     CPPFLAGS="$CPPFLAGS -I$includedir"
13830   fi
13831   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13832   cat >conftest.$ac_ext <<_ACEOF
13833 /* confdefs.h.  */
13834 _ACEOF
13835 cat confdefs.h >>conftest.$ac_ext
13836 cat >>conftest.$ac_ext <<_ACEOF
13837 /* end confdefs.h.  */
13838 #include <stdlib.h>
13839                                     #include <unistd.h>
13840                                     #include <sys/types.h>
13841                                     #include <pwd.h>
13842                                     #include <hpsecurity.h>
13843                                     #include <prot.h>
13844 int
13845 main ()
13846 {
13847 struct s_passwd *p = getspwnam("nobody");
13848                        const char *pw = p->pw_passwd;
13849   ;
13850   return 0;
13851 }
13852 _ACEOF
13853 rm -f conftest.$ac_objext
13854 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13855   (eval $ac_compile) 2>conftest.er1
13856   ac_status=$?
13857   grep -v '^ *+' conftest.er1 >conftest.err
13858   rm -f conftest.er1
13859   cat conftest.err >&5
13860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13861   (exit $ac_status); } &&
13862          { ac_try='test -z "$ac_c_werror_flag"
13863                          || test ! -s conftest.err'
13864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13865   (eval $ac_try) 2>&5
13866   ac_status=$?
13867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13868   (exit $ac_status); }; } &&
13869          { ac_try='test -s conftest.$ac_objext'
13870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13871   (eval $ac_try) 2>&5
13872   ac_status=$?
13873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13874   (exit $ac_status); }; }; then
13875   ac_cv_hpux_passwd=yes
13876 else
13877   echo "$as_me: failed program was:" >&5
13878 sed 's/^/| /' conftest.$ac_ext >&5
13879
13880 ac_cv_hpux_passwd=no
13881 fi
13882 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13883   CPPFLAGS="$ac_save_CPPFLAGS"
13884 fi
13885 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
13886 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
13887   if test "$ac_cv_hpux_passwd" = yes; then
13888     have_shadow_hpux=yes
13889     have_shadow=yes
13890     need_setuid=yes
13891
13892     # on HPUX, bigcrypt is in -lsec
13893     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
13894 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
13895 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
13896   echo $ECHO_N "(cached) $ECHO_C" >&6
13897 else
13898   ac_check_lib_save_LIBS=$LIBS
13899 LIBS="-lsec  $LIBS"
13900 cat >conftest.$ac_ext <<_ACEOF
13901 /* confdefs.h.  */
13902 _ACEOF
13903 cat confdefs.h >>conftest.$ac_ext
13904 cat >>conftest.$ac_ext <<_ACEOF
13905 /* end confdefs.h.  */
13906
13907 /* Override any gcc2 internal prototype to avoid an error.  */
13908 #ifdef __cplusplus
13909 extern "C"
13910 #endif
13911 /* We use char because int might match the return type of a gcc2
13912    builtin and then its argument prototype would still apply.  */
13913 char bigcrypt ();
13914 int
13915 main ()
13916 {
13917 bigcrypt ();
13918   ;
13919   return 0;
13920 }
13921 _ACEOF
13922 rm -f conftest.$ac_objext conftest$ac_exeext
13923 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13924   (eval $ac_link) 2>conftest.er1
13925   ac_status=$?
13926   grep -v '^ *+' conftest.er1 >conftest.err
13927   rm -f conftest.er1
13928   cat conftest.err >&5
13929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13930   (exit $ac_status); } &&
13931          { ac_try='test -z "$ac_c_werror_flag"
13932                          || test ! -s conftest.err'
13933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13934   (eval $ac_try) 2>&5
13935   ac_status=$?
13936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13937   (exit $ac_status); }; } &&
13938          { ac_try='test -s conftest$ac_exeext'
13939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13940   (eval $ac_try) 2>&5
13941   ac_status=$?
13942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13943   (exit $ac_status); }; }; then
13944   ac_cv_lib_sec_bigcrypt=yes
13945 else
13946   echo "$as_me: failed program was:" >&5
13947 sed 's/^/| /' conftest.$ac_ext >&5
13948
13949 ac_cv_lib_sec_bigcrypt=no
13950 fi
13951 rm -f conftest.err conftest.$ac_objext \
13952       conftest$ac_exeext conftest.$ac_ext
13953 LIBS=$ac_check_lib_save_LIBS
13954 fi
13955 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
13956 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
13957 if test $ac_cv_lib_sec_bigcrypt = yes; then
13958   PASSWD_LIBS="$PASSWD_LIBS -lsec"
13959 fi
13960
13961   fi
13962 fi
13963
13964
13965 ###############################################################################
13966 #
13967 #       Check for FreeBSD-style shadow passwords.
13968 #
13969 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
13970 #       password systems -- except you only get stuff in the pw_passwd field
13971 #       if the running program is setuid.  So, guess that we've got this
13972 #       lossage to contend with if /etc/master.passwd exists, and default to
13973 #       a setuid installation.
13974 #
13975 ###############################################################################
13976
13977 if test "$with_shadow" = yes ; then
13978   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
13979 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
13980 if test "${ac_cv_master_passwd+set}" = set; then
13981   echo $ECHO_N "(cached) $ECHO_C" >&6
13982 else
13983   if test -f /etc/master.passwd ; then
13984                     ac_cv_master_passwd=yes
13985                   else
13986                     ac_cv_master_passwd=no
13987                   fi
13988 fi
13989 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
13990 echo "${ECHO_T}$ac_cv_master_passwd" >&6
13991   if test "$ac_cv_master_passwd" = yes; then
13992     need_setuid=yes
13993   fi
13994 fi
13995
13996
13997 ###############################################################################
13998 #
13999 #       Check for traditional (ha!) shadow passwords.
14000 #
14001 ###############################################################################
14002
14003 if test "$with_shadow" = yes ; then
14004   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
14005 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
14006 if test "${ac_cv_shadow+set}" = set; then
14007   echo $ECHO_N "(cached) $ECHO_C" >&6
14008 else
14009
14010   ac_save_CPPFLAGS="$CPPFLAGS"
14011   if test \! -z "$includedir" ; then
14012     CPPFLAGS="$CPPFLAGS -I$includedir"
14013   fi
14014   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14015   cat >conftest.$ac_ext <<_ACEOF
14016 /* confdefs.h.  */
14017 _ACEOF
14018 cat confdefs.h >>conftest.$ac_ext
14019 cat >>conftest.$ac_ext <<_ACEOF
14020 /* end confdefs.h.  */
14021 #include <stdlib.h>
14022                                     #include <unistd.h>
14023                                     #include <sys/types.h>
14024                                     #include <pwd.h>
14025                                     #include <shadow.h>
14026 int
14027 main ()
14028 {
14029 struct spwd *p = getspnam("nobody");
14030                        const char *pw = p->sp_pwdp;
14031   ;
14032   return 0;
14033 }
14034 _ACEOF
14035 rm -f conftest.$ac_objext
14036 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14037   (eval $ac_compile) 2>conftest.er1
14038   ac_status=$?
14039   grep -v '^ *+' conftest.er1 >conftest.err
14040   rm -f conftest.er1
14041   cat conftest.err >&5
14042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14043   (exit $ac_status); } &&
14044          { ac_try='test -z "$ac_c_werror_flag"
14045                          || test ! -s conftest.err'
14046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14047   (eval $ac_try) 2>&5
14048   ac_status=$?
14049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14050   (exit $ac_status); }; } &&
14051          { ac_try='test -s conftest.$ac_objext'
14052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14053   (eval $ac_try) 2>&5
14054   ac_status=$?
14055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14056   (exit $ac_status); }; }; then
14057   ac_cv_shadow=yes
14058 else
14059   echo "$as_me: failed program was:" >&5
14060 sed 's/^/| /' conftest.$ac_ext >&5
14061
14062 ac_cv_shadow=no
14063 fi
14064 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14065   CPPFLAGS="$ac_save_CPPFLAGS"
14066 fi
14067 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
14068 echo "${ECHO_T}$ac_cv_shadow" >&6
14069   if test "$ac_cv_shadow" = yes; then
14070     have_shadow=yes
14071     need_setuid=yes
14072
14073     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
14074     have_getspnam=no
14075     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
14076 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
14077 if test "${ac_cv_lib_c_getspnam+set}" = set; then
14078   echo $ECHO_N "(cached) $ECHO_C" >&6
14079 else
14080   ac_check_lib_save_LIBS=$LIBS
14081 LIBS="-lc  $LIBS"
14082 cat >conftest.$ac_ext <<_ACEOF
14083 /* confdefs.h.  */
14084 _ACEOF
14085 cat confdefs.h >>conftest.$ac_ext
14086 cat >>conftest.$ac_ext <<_ACEOF
14087 /* end confdefs.h.  */
14088
14089 /* Override any gcc2 internal prototype to avoid an error.  */
14090 #ifdef __cplusplus
14091 extern "C"
14092 #endif
14093 /* We use char because int might match the return type of a gcc2
14094    builtin and then its argument prototype would still apply.  */
14095 char getspnam ();
14096 int
14097 main ()
14098 {
14099 getspnam ();
14100   ;
14101   return 0;
14102 }
14103 _ACEOF
14104 rm -f conftest.$ac_objext conftest$ac_exeext
14105 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14106   (eval $ac_link) 2>conftest.er1
14107   ac_status=$?
14108   grep -v '^ *+' conftest.er1 >conftest.err
14109   rm -f conftest.er1
14110   cat conftest.err >&5
14111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14112   (exit $ac_status); } &&
14113          { ac_try='test -z "$ac_c_werror_flag"
14114                          || test ! -s conftest.err'
14115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14116   (eval $ac_try) 2>&5
14117   ac_status=$?
14118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14119   (exit $ac_status); }; } &&
14120          { ac_try='test -s conftest$ac_exeext'
14121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14122   (eval $ac_try) 2>&5
14123   ac_status=$?
14124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14125   (exit $ac_status); }; }; then
14126   ac_cv_lib_c_getspnam=yes
14127 else
14128   echo "$as_me: failed program was:" >&5
14129 sed 's/^/| /' conftest.$ac_ext >&5
14130
14131 ac_cv_lib_c_getspnam=no
14132 fi
14133 rm -f conftest.err conftest.$ac_objext \
14134       conftest$ac_exeext conftest.$ac_ext
14135 LIBS=$ac_check_lib_save_LIBS
14136 fi
14137 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
14138 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
14139 if test $ac_cv_lib_c_getspnam = yes; then
14140   have_getspnam=yes
14141 fi
14142
14143     if test "$have_getspnam" = no ; then
14144       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
14145 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
14146 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
14147   echo $ECHO_N "(cached) $ECHO_C" >&6
14148 else
14149   ac_check_lib_save_LIBS=$LIBS
14150 LIBS="-lgen  $LIBS"
14151 cat >conftest.$ac_ext <<_ACEOF
14152 /* confdefs.h.  */
14153 _ACEOF
14154 cat confdefs.h >>conftest.$ac_ext
14155 cat >>conftest.$ac_ext <<_ACEOF
14156 /* end confdefs.h.  */
14157
14158 /* Override any gcc2 internal prototype to avoid an error.  */
14159 #ifdef __cplusplus
14160 extern "C"
14161 #endif
14162 /* We use char because int might match the return type of a gcc2
14163    builtin and then its argument prototype would still apply.  */
14164 char getspnam ();
14165 int
14166 main ()
14167 {
14168 getspnam ();
14169   ;
14170   return 0;
14171 }
14172 _ACEOF
14173 rm -f conftest.$ac_objext conftest$ac_exeext
14174 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14175   (eval $ac_link) 2>conftest.er1
14176   ac_status=$?
14177   grep -v '^ *+' conftest.er1 >conftest.err
14178   rm -f conftest.er1
14179   cat conftest.err >&5
14180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14181   (exit $ac_status); } &&
14182          { ac_try='test -z "$ac_c_werror_flag"
14183                          || test ! -s conftest.err'
14184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14185   (eval $ac_try) 2>&5
14186   ac_status=$?
14187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14188   (exit $ac_status); }; } &&
14189          { ac_try='test -s conftest$ac_exeext'
14190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14191   (eval $ac_try) 2>&5
14192   ac_status=$?
14193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14194   (exit $ac_status); }; }; then
14195   ac_cv_lib_gen_getspnam=yes
14196 else
14197   echo "$as_me: failed program was:" >&5
14198 sed 's/^/| /' conftest.$ac_ext >&5
14199
14200 ac_cv_lib_gen_getspnam=no
14201 fi
14202 rm -f conftest.err conftest.$ac_objext \
14203       conftest$ac_exeext conftest.$ac_ext
14204 LIBS=$ac_check_lib_save_LIBS
14205 fi
14206 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
14207 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
14208 if test $ac_cv_lib_gen_getspnam = yes; then
14209   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
14210 fi
14211
14212     fi
14213   fi
14214 fi
14215
14216
14217 ###############################################################################
14218 #
14219 #       Check for other libraries needed for non-shadow passwords.
14220 #
14221 ###############################################################################
14222
14223 if test "$enable_locking" = yes ; then
14224
14225   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
14226   have_crypt=no
14227   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
14228 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
14229 if test "${ac_cv_lib_c_crypt+set}" = set; then
14230   echo $ECHO_N "(cached) $ECHO_C" >&6
14231 else
14232   ac_check_lib_save_LIBS=$LIBS
14233 LIBS="-lc  $LIBS"
14234 cat >conftest.$ac_ext <<_ACEOF
14235 /* confdefs.h.  */
14236 _ACEOF
14237 cat confdefs.h >>conftest.$ac_ext
14238 cat >>conftest.$ac_ext <<_ACEOF
14239 /* end confdefs.h.  */
14240
14241 /* Override any gcc2 internal prototype to avoid an error.  */
14242 #ifdef __cplusplus
14243 extern "C"
14244 #endif
14245 /* We use char because int might match the return type of a gcc2
14246    builtin and then its argument prototype would still apply.  */
14247 char crypt ();
14248 int
14249 main ()
14250 {
14251 crypt ();
14252   ;
14253   return 0;
14254 }
14255 _ACEOF
14256 rm -f conftest.$ac_objext conftest$ac_exeext
14257 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14258   (eval $ac_link) 2>conftest.er1
14259   ac_status=$?
14260   grep -v '^ *+' conftest.er1 >conftest.err
14261   rm -f conftest.er1
14262   cat conftest.err >&5
14263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14264   (exit $ac_status); } &&
14265          { ac_try='test -z "$ac_c_werror_flag"
14266                          || test ! -s conftest.err'
14267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14268   (eval $ac_try) 2>&5
14269   ac_status=$?
14270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14271   (exit $ac_status); }; } &&
14272          { ac_try='test -s conftest$ac_exeext'
14273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14274   (eval $ac_try) 2>&5
14275   ac_status=$?
14276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14277   (exit $ac_status); }; }; then
14278   ac_cv_lib_c_crypt=yes
14279 else
14280   echo "$as_me: failed program was:" >&5
14281 sed 's/^/| /' conftest.$ac_ext >&5
14282
14283 ac_cv_lib_c_crypt=no
14284 fi
14285 rm -f conftest.err conftest.$ac_objext \
14286       conftest$ac_exeext conftest.$ac_ext
14287 LIBS=$ac_check_lib_save_LIBS
14288 fi
14289 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
14290 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
14291 if test $ac_cv_lib_c_crypt = yes; then
14292   have_crypt=yes
14293 fi
14294
14295   if test "$have_crypt" = no ; then
14296     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14297 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
14298 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14299   echo $ECHO_N "(cached) $ECHO_C" >&6
14300 else
14301   ac_check_lib_save_LIBS=$LIBS
14302 LIBS="-lcrypt  $LIBS"
14303 cat >conftest.$ac_ext <<_ACEOF
14304 /* confdefs.h.  */
14305 _ACEOF
14306 cat confdefs.h >>conftest.$ac_ext
14307 cat >>conftest.$ac_ext <<_ACEOF
14308 /* end confdefs.h.  */
14309
14310 /* Override any gcc2 internal prototype to avoid an error.  */
14311 #ifdef __cplusplus
14312 extern "C"
14313 #endif
14314 /* We use char because int might match the return type of a gcc2
14315    builtin and then its argument prototype would still apply.  */
14316 char crypt ();
14317 int
14318 main ()
14319 {
14320 crypt ();
14321   ;
14322   return 0;
14323 }
14324 _ACEOF
14325 rm -f conftest.$ac_objext conftest$ac_exeext
14326 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14327   (eval $ac_link) 2>conftest.er1
14328   ac_status=$?
14329   grep -v '^ *+' conftest.er1 >conftest.err
14330   rm -f conftest.er1
14331   cat conftest.err >&5
14332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14333   (exit $ac_status); } &&
14334          { ac_try='test -z "$ac_c_werror_flag"
14335                          || test ! -s conftest.err'
14336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14337   (eval $ac_try) 2>&5
14338   ac_status=$?
14339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14340   (exit $ac_status); }; } &&
14341          { ac_try='test -s conftest$ac_exeext'
14342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14343   (eval $ac_try) 2>&5
14344   ac_status=$?
14345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14346   (exit $ac_status); }; }; then
14347   ac_cv_lib_crypt_crypt=yes
14348 else
14349   echo "$as_me: failed program was:" >&5
14350 sed 's/^/| /' conftest.$ac_ext >&5
14351
14352 ac_cv_lib_crypt_crypt=no
14353 fi
14354 rm -f conftest.err conftest.$ac_objext \
14355       conftest$ac_exeext conftest.$ac_ext
14356 LIBS=$ac_check_lib_save_LIBS
14357 fi
14358 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14359 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
14360 if test $ac_cv_lib_crypt_crypt = yes; then
14361   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14362 fi
14363
14364   fi
14365 fi
14366
14367
14368 # Most of the above shadow mechanisms will have set need_setuid to yes,
14369 # if they were found.  But, on some systems, we need setuid even when
14370 # using plain old vanilla passwords.
14371 #
14372 if test "$enable_locking" = yes ; then
14373   case "$host" in
14374     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
14375       need_setuid=yes
14376     ;;
14377   esac
14378 fi
14379
14380
14381 if test "$have_shadow_adjunct" = yes ; then
14382   cat >>confdefs.h <<\_ACEOF
14383 #define HAVE_ADJUNCT_PASSWD 1
14384 _ACEOF
14385
14386 elif test "$have_shadow_enhanced" = yes ; then
14387   cat >>confdefs.h <<\_ACEOF
14388 #define HAVE_ENHANCED_PASSWD 1
14389 _ACEOF
14390
14391 elif test "$have_shadow_hpux" = yes ; then
14392   cat >>confdefs.h <<\_ACEOF
14393 #define HAVE_HPUX_PASSWD 1
14394 _ACEOF
14395
14396 elif test "$have_shadow" = yes ; then
14397   cat >>confdefs.h <<\_ACEOF
14398 #define HAVE_SHADOW_PASSWD 1
14399 _ACEOF
14400
14401 fi
14402
14403
14404 ###############################################################################
14405 #
14406 #       Check for external password helper
14407 #       On SuSE, instead of having xscreensaver be a setuid program, they
14408 #       fork an external program that takes the password on stdin, and
14409 #       returns true if that password is a valid one.  Then only that
14410 #       smaller program needs to be setuid.
14411 #
14412 #       (Note that this external program is not a GUI: the GUI is still
14413 #       all in xscreensaver itself; the external program just does auth.)
14414 #
14415 ###############################################################################
14416
14417 have_passwd_helper=no
14418 with_passwd_helper_req=unspecified
14419
14420
14421 # Check whether --with-passwd-helper or --without-passwd-helper was given.
14422 if test "${with_passwd_helper+set}" = set; then
14423   withval="$with_passwd_helper"
14424   with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
14425 else
14426   with_passwd_helper=no
14427 fi;
14428 # no HANDLE_X_PATH_ARG for this one
14429
14430 if test "$enable_locking" = no ; then
14431   with_passwd_helper_req=no
14432   with_passwd_helper=no
14433 fi
14434
14435 case "$with_passwd_helper" in
14436   ""|no) : ;;
14437   /*)
14438     cat >>confdefs.h <<_ACEOF
14439 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
14440 _ACEOF
14441
14442     have_passwd_helper=yes;;
14443   *)
14444     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
14445     exit 1
14446 esac
14447
14448
14449 ###############################################################################
14450 #
14451 #       Check for a login manager for a "New Login" button on the lock dialog.
14452 #       Usually this will be "/usr/bin/gdmflexiserver".
14453 #
14454 ###############################################################################
14455
14456 have_login_manager=no
14457 with_login_manager_req=unspecified
14458 default_login_manager='gdmflexiserver -l'
14459
14460
14461 # Check whether --with-login-manager or --without-login-manager was given.
14462 if test "${with_login_manager+set}" = set; then
14463   withval="$with_login_manager"
14464   with_login_manager="$withval"; with_login_manager_req="$withval"
14465 else
14466   with_login_manager=no
14467 fi;
14468 # no HANDLE_X_PATH_ARG for this one
14469
14470 if test "$enable_locking" = no ; then
14471   with_login_manager_req=no
14472   with_login_manager=no
14473 fi
14474
14475 if test -n "$with_login_manager_req" ; then
14476   ac_cv_login_manager_program=""
14477
14478  if test "$with_login_manager_req" = "yes" ; then
14479    with_login_manager_req=$default_login_manager
14480  fi
14481
14482   case "$with_login_manager_req" in
14483     /*)
14484       # absolute path
14485       set dummy $with_login_manager_req ; login_manager_tmp=$2
14486       echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
14487 echo $ECHO_N "checking for $login_manager_tmp... $ECHO_C" >&6
14488       if test -x "$login_manager_tmp" ; then
14489         echo "$as_me:$LINENO: result: yes" >&5
14490 echo "${ECHO_T}yes" >&6
14491       else
14492         echo "$as_me:$LINENO: result: no" >&5
14493 echo "${ECHO_T}no" >&6
14494         with_login_manager=""
14495       fi
14496     ;;
14497     *)
14498       # relative path
14499       set dummy $with_login_manager_req ; login_manager_tmp=$2
14500       # don't cache
14501       unset ac_cv_path_login_manager_tmp
14502       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
14503 set dummy $login_manager_tmp; ac_word=$2
14504 echo "$as_me:$LINENO: checking for $ac_word" >&5
14505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14506 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
14507   echo $ECHO_N "(cached) $ECHO_C" >&6
14508 else
14509   case $login_manager_tmp in
14510   [\\/]* | ?:[\\/]*)
14511   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
14512   ;;
14513   *)
14514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14515 for as_dir in $PATH
14516 do
14517   IFS=$as_save_IFS
14518   test -z "$as_dir" && as_dir=.
14519   for ac_exec_ext in '' $ac_executable_extensions; do
14520   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14521     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
14522     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14523     break 2
14524   fi
14525 done
14526 done
14527
14528   ;;
14529 esac
14530 fi
14531 login_manager_tmp=$ac_cv_path_login_manager_tmp
14532
14533 if test -n "$login_manager_tmp"; then
14534   echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
14535 echo "${ECHO_T}$login_manager_tmp" >&6
14536 else
14537   echo "$as_me:$LINENO: result: no" >&5
14538 echo "${ECHO_T}no" >&6
14539 fi
14540
14541       if test -z "$login_manager_tmp" ; then
14542         with_login_manager=""
14543       else
14544         with_login_manager="$login_manager_tmp"
14545       fi
14546     ;;
14547   esac
14548   ac_cv_login_manager_program="$with_login_manager"
14549
14550 elif test -n "$ac_cv_login_manager_program"; then
14551   echo "$as_me:$LINENO: result: checking for login_manager... (cached) $ac_cv_login_manager_program" >&5
14552 echo "${ECHO_T}checking for login_manager... (cached) $ac_cv_login_manager_program" >&6
14553 fi
14554
14555 NEW_LOGIN_COMMAND_P=''
14556 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
14557
14558 if test -z "$NEW_LOGIN_COMMAND" ; then
14559   NEW_LOGIN_COMMAND="$default_login_manager"
14560   NEW_LOGIN_COMMAND_P='! '
14561 fi
14562
14563
14564
14565 ###############################################################################
14566 #
14567 #       Check for -lgtk (and Gnome stuff)
14568 #
14569 ###############################################################################
14570
14571 have_gtk=no
14572 with_gtk_req=unspecified
14573
14574 # Check whether --with-gtk or --without-gtk was given.
14575 if test "${with_gtk+set}" = set; then
14576   withval="$with_gtk"
14577   with_gtk="$withval"; with_gtk_req="$withval"
14578 else
14579   with_gtk=yes
14580 fi;
14581
14582 # if --with-gtk=/directory/ was specified, remember that directory so that
14583 # we can also look for the `gtk-config' program in that directory.
14584 case "$with_gtk" in
14585   /*)
14586     gtk_dir="$with_gtk"
14587     ;;
14588   *)
14589     gtk_dir=""
14590     ;;
14591 esac
14592
14593
14594    case "$with_gtk" in
14595     yes) ;;
14596     no)  ;;
14597
14598     /*)
14599      echo "$as_me:$LINENO: checking for Gtk headers" >&5
14600 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
14601      d=$with_gtk/include
14602      if test -d $d; then
14603        X_CFLAGS="-I$d $X_CFLAGS"
14604        echo "$as_me:$LINENO: result: $d" >&5
14605 echo "${ECHO_T}$d" >&6
14606      else
14607        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14608 echo "${ECHO_T}not found ($d: no such directory)" >&6
14609      fi
14610
14611      echo "$as_me:$LINENO: checking for Gtk libs" >&5
14612 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
14613      d=$with_gtk/lib
14614      if test -d $d; then
14615        X_LIBS="-L$d $X_LIBS"
14616        echo "$as_me:$LINENO: result: $d" >&5
14617 echo "${ECHO_T}$d" >&6
14618      else
14619        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14620 echo "${ECHO_T}not found ($d: no such directory)" >&6
14621      fi
14622
14623      # replace the directory string with "yes".
14624      with_gtk_req="yes"
14625      with_gtk=$with_gtk_req
14626      ;;
14627
14628     *)
14629      echo ""
14630      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
14631      echo "       If it is a directory, then \`DIR/include' will be added to"
14632      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14633      exit 1
14634      ;;
14635    esac
14636
14637
14638 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
14639   echo "error: must be yes or no: --with-gtk=$with_gtk"
14640   exit 1
14641 fi
14642
14643
14644 parse_gtk_version_string() {
14645   # M4 sucks!!
14646
14647   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
14648   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
14649
14650   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
14651   if test -z "$ac_gtk_version"; then
14652     ac_gtk_version=unknown
14653     ac_gtk_version_string=unknown
14654   fi
14655 }
14656
14657 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
14658 # if the user specified --with-gtk=/foo/ then look there.
14659 #
14660 gtk_path="$PATH"
14661 if test ! -z "$gtk_dir"; then
14662   # canonicalize slashes.
14663   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
14664   gtk_path="$foo:$gtk_path"
14665 fi
14666
14667 for ac_prog in pkg-config
14668 do
14669   # Extract the first word of "$ac_prog", so it can be a program name with args.
14670 set dummy $ac_prog; ac_word=$2
14671 echo "$as_me:$LINENO: checking for $ac_word" >&5
14672 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14673 if test "${ac_cv_path_pkg_config+set}" = set; then
14674   echo $ECHO_N "(cached) $ECHO_C" >&6
14675 else
14676   case $pkg_config in
14677   [\\/]* | ?:[\\/]*)
14678   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
14679   ;;
14680   *)
14681   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14682 for as_dir in $gtk_path
14683 do
14684   IFS=$as_save_IFS
14685   test -z "$as_dir" && as_dir=.
14686   for ac_exec_ext in '' $ac_executable_extensions; do
14687   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14688     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
14689     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14690     break 2
14691   fi
14692 done
14693 done
14694
14695   ;;
14696 esac
14697 fi
14698 pkg_config=$ac_cv_path_pkg_config
14699
14700 if test -n "$pkg_config"; then
14701   echo "$as_me:$LINENO: result: $pkg_config" >&5
14702 echo "${ECHO_T}$pkg_config" >&6
14703 else
14704   echo "$as_me:$LINENO: result: no" >&5
14705 echo "${ECHO_T}no" >&6
14706 fi
14707
14708   test -n "$pkg_config" && break
14709 done
14710
14711
14712 if test -z "$pkg_config" ; then
14713   { echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
14714 echo "$as_me: WARNING: pkg-config not found!" >&2;}
14715   pkg_config="false"
14716 fi
14717
14718
14719 # Utility function for running pkg-config-based tests...
14720 #
14721 pkgs=''
14722 pkg_check_version() {
14723   if test "$ok" = yes ; then
14724     req="$1"
14725     min="$2"
14726     echo "$as_me:$LINENO: checking for $req" >&5
14727 echo $ECHO_N "checking for $req... $ECHO_C" >&6
14728     if $pkg_config --exists "$req" ; then
14729       vers=`$pkg_config --modversion "$req"`
14730       if $pkg_config --exists "$req >= $min" ; then
14731         echo "$as_me:$LINENO: result: $vers" >&5
14732 echo "${ECHO_T}$vers" >&6
14733         pkgs="$pkgs $req"
14734         return 1
14735       else
14736         echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
14737 echo "${ECHO_T}$vers (wanted >= $min)" >&6
14738         ok=no
14739         return 0
14740       fi
14741     else
14742       echo "$as_me:$LINENO: result: no" >&5
14743 echo "${ECHO_T}no" >&6
14744       ok=no
14745       return 0
14746     fi
14747   fi
14748 }
14749
14750
14751 jurassic_gtk=no
14752 gtk_halfassed=no
14753
14754 if test "$with_gtk" = yes; then
14755   have_gtk=no
14756
14757   ok="yes"
14758   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
14759   pkg_check_version         gmodule-2.0  2.0.0
14760   pkg_check_version          libxml-2.0  2.4.6
14761   pkg_check_version        libglade-2.0  1.99.0
14762   pkg_check_version      gdk-pixbuf-2.0  2.0.0
14763   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
14764   have_gtk="$ok"
14765
14766   if test "$have_gtk" = no; then
14767     if test -n "$ac_gtk_version_string" ; then
14768       gtk_halfassed="$ac_gtk_version_string"
14769       gtk_halfassed_lib="$req"
14770     fi
14771   fi
14772
14773   if test "$have_gtk" = yes; then
14774     parse_gtk_version_string
14775     jurassic_gtk=no
14776   fi
14777
14778   if test "$have_gtk" = yes; then
14779     echo "$as_me:$LINENO: checking for Gtk includes" >&5
14780 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
14781 if test "${ac_cv_gtk_config_cflags+set}" = set; then
14782   echo $ECHO_N "(cached) $ECHO_C" >&6
14783 else
14784   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
14785 fi
14786 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
14787 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
14788     echo "$as_me:$LINENO: checking for Gtk libs" >&5
14789 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
14790 if test "${ac_cv_gtk_config_libs+set}" = set; then
14791   echo $ECHO_N "(cached) $ECHO_C" >&6
14792 else
14793   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
14794 fi
14795 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
14796 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
14797   fi
14798
14799   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
14800   ac_gtk_config_libs=$ac_cv_gtk_config_libs
14801
14802   GTK_EXTRA_OBJS=""
14803   GTK_DATADIR=""
14804   if test "$have_gtk" = yes; then
14805     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
14806     GTK_DATADIR="$GTK_DATADIR/share"
14807   fi
14808
14809   if test "$have_gtk" = yes; then
14810     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
14811     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
14812     cat >>confdefs.h <<\_ACEOF
14813 #define HAVE_GTK 1
14814 _ACEOF
14815
14816     cat >>confdefs.h <<\_ACEOF
14817 #define HAVE_GTK2 1
14818 _ACEOF
14819
14820     cat >>confdefs.h <<\_ACEOF
14821 #define HAVE_XML 1
14822 _ACEOF
14823
14824   fi
14825
14826 fi
14827
14828
14829 # Check for the various Gnome help and URL loading programs.
14830 #
14831 if test "$have_gtk" = yes; then
14832   for ac_prog in gnome-open
14833 do
14834   # Extract the first word of "$ac_prog", so it can be a program name with args.
14835 set dummy $ac_prog; ac_word=$2
14836 echo "$as_me:$LINENO: checking for $ac_word" >&5
14837 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14838 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
14839   echo $ECHO_N "(cached) $ECHO_C" >&6
14840 else
14841   if test -n "$gnome_open_program"; then
14842   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
14843 else
14844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14845 for as_dir in $PATH
14846 do
14847   IFS=$as_save_IFS
14848   test -z "$as_dir" && as_dir=.
14849   for ac_exec_ext in '' $ac_executable_extensions; do
14850   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14851     ac_cv_prog_gnome_open_program="$ac_prog"
14852     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14853     break 2
14854   fi
14855 done
14856 done
14857
14858 fi
14859 fi
14860 gnome_open_program=$ac_cv_prog_gnome_open_program
14861 if test -n "$gnome_open_program"; then
14862   echo "$as_me:$LINENO: result: $gnome_open_program" >&5
14863 echo "${ECHO_T}$gnome_open_program" >&6
14864 else
14865   echo "$as_me:$LINENO: result: no" >&5
14866 echo "${ECHO_T}no" >&6
14867 fi
14868
14869   test -n "$gnome_open_program" && break
14870 done
14871
14872   for ac_prog in gnome-url-show
14873 do
14874   # Extract the first word of "$ac_prog", so it can be a program name with args.
14875 set dummy $ac_prog; ac_word=$2
14876 echo "$as_me:$LINENO: checking for $ac_word" >&5
14877 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14878 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
14879   echo $ECHO_N "(cached) $ECHO_C" >&6
14880 else
14881   if test -n "$gnome_url_show_program"; then
14882   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
14883 else
14884 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14885 for as_dir in $PATH
14886 do
14887   IFS=$as_save_IFS
14888   test -z "$as_dir" && as_dir=.
14889   for ac_exec_ext in '' $ac_executable_extensions; do
14890   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14891     ac_cv_prog_gnome_url_show_program="$ac_prog"
14892     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14893     break 2
14894   fi
14895 done
14896 done
14897
14898 fi
14899 fi
14900 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
14901 if test -n "$gnome_url_show_program"; then
14902   echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
14903 echo "${ECHO_T}$gnome_url_show_program" >&6
14904 else
14905   echo "$as_me:$LINENO: result: no" >&5
14906 echo "${ECHO_T}no" >&6
14907 fi
14908
14909   test -n "$gnome_url_show_program" && break
14910 done
14911
14912 fi
14913
14914
14915 ###############################################################################
14916 #
14917 #       Check for -lXm.
14918 #
14919 ###############################################################################
14920
14921 have_motif=no
14922 with_motif_req=unspecified
14923
14924 # Check whether --with-motif or --without-motif was given.
14925 if test "${with_motif+set}" = set; then
14926   withval="$with_motif"
14927   with_motif="$withval"; with_motif_req="$withval"
14928 else
14929   with_motif=no
14930 fi;
14931
14932
14933    case "$with_motif" in
14934     yes) ;;
14935     no)  ;;
14936
14937     /*)
14938      echo "$as_me:$LINENO: checking for Motif headers" >&5
14939 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
14940      d=$with_motif/include
14941      if test -d $d; then
14942        X_CFLAGS="-I$d $X_CFLAGS"
14943        echo "$as_me:$LINENO: result: $d" >&5
14944 echo "${ECHO_T}$d" >&6
14945      else
14946        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14947 echo "${ECHO_T}not found ($d: no such directory)" >&6
14948      fi
14949
14950      echo "$as_me:$LINENO: checking for Motif libs" >&5
14951 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
14952      d=$with_motif/lib
14953      if test -d $d; then
14954        X_LIBS="-L$d $X_LIBS"
14955        echo "$as_me:$LINENO: result: $d" >&5
14956 echo "${ECHO_T}$d" >&6
14957      else
14958        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14959 echo "${ECHO_T}not found ($d: no such directory)" >&6
14960      fi
14961
14962      # replace the directory string with "yes".
14963      with_motif_req="yes"
14964      with_motif=$with_motif_req
14965      ;;
14966
14967     *)
14968      echo ""
14969      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
14970      echo "       If it is a directory, then \`DIR/include' will be added to"
14971      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14972      exit 1
14973      ;;
14974    esac
14975
14976
14977 if test "$with_motif" != yes -a "$with_motif" != no ; then
14978   echo "error: must be yes or no: --with-motif=$with_motif"
14979   exit 1
14980 fi
14981
14982 if test "$with_motif" = yes; then
14983   have_motif=no
14984
14985   ac_save_CPPFLAGS="$CPPFLAGS"
14986   if test \! -z "$includedir" ; then
14987     CPPFLAGS="$CPPFLAGS -I$includedir"
14988   fi
14989   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14990   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
14991 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
14992 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
14993   echo $ECHO_N "(cached) $ECHO_C" >&6
14994 else
14995   cat >conftest.$ac_ext <<_ACEOF
14996 /* confdefs.h.  */
14997 _ACEOF
14998 cat confdefs.h >>conftest.$ac_ext
14999 cat >>conftest.$ac_ext <<_ACEOF
15000 /* end confdefs.h.  */
15001 #include <stdlib.h>
15002                      #include <stdio.h>
15003                      #include <X11/Intrinsic.h>
15004
15005 #include <Xm/Xm.h>
15006 _ACEOF
15007 rm -f conftest.$ac_objext
15008 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15009   (eval $ac_compile) 2>conftest.er1
15010   ac_status=$?
15011   grep -v '^ *+' conftest.er1 >conftest.err
15012   rm -f conftest.er1
15013   cat conftest.err >&5
15014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15015   (exit $ac_status); } &&
15016          { ac_try='test -z "$ac_c_werror_flag"
15017                          || test ! -s conftest.err'
15018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15019   (eval $ac_try) 2>&5
15020   ac_status=$?
15021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15022   (exit $ac_status); }; } &&
15023          { ac_try='test -s conftest.$ac_objext'
15024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15025   (eval $ac_try) 2>&5
15026   ac_status=$?
15027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15028   (exit $ac_status); }; }; then
15029   ac_cv_header_Xm_Xm_h=yes
15030 else
15031   echo "$as_me: failed program was:" >&5
15032 sed 's/^/| /' conftest.$ac_ext >&5
15033
15034 ac_cv_header_Xm_Xm_h=no
15035 fi
15036 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15037 fi
15038 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
15039 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
15040 if test $ac_cv_header_Xm_Xm_h = yes; then
15041   have_motif=yes
15042                      cat >>confdefs.h <<\_ACEOF
15043 #define HAVE_MOTIF 1
15044 _ACEOF
15045
15046                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
15047 fi
15048
15049
15050   CPPFLAGS="$ac_save_CPPFLAGS"
15051 fi
15052
15053
15054 if test "$have_motif" = yes; then
15055
15056   ac_save_CPPFLAGS="$CPPFLAGS"
15057   if test \! -z "$includedir" ; then
15058     CPPFLAGS="$CPPFLAGS -I$includedir"
15059   fi
15060   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15061   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
15062 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
15063 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
15064   echo $ECHO_N "(cached) $ECHO_C" >&6
15065 else
15066   cat >conftest.$ac_ext <<_ACEOF
15067 /* confdefs.h.  */
15068 _ACEOF
15069 cat confdefs.h >>conftest.$ac_ext
15070 cat >>conftest.$ac_ext <<_ACEOF
15071 /* end confdefs.h.  */
15072 #include <stdlib.h>
15073                      #include <stdio.h>
15074                      #include <X11/Intrinsic.h>
15075
15076 #include <Xm/ComboBox.h>
15077 _ACEOF
15078 rm -f conftest.$ac_objext
15079 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15080   (eval $ac_compile) 2>conftest.er1
15081   ac_status=$?
15082   grep -v '^ *+' conftest.er1 >conftest.err
15083   rm -f conftest.er1
15084   cat conftest.err >&5
15085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15086   (exit $ac_status); } &&
15087          { ac_try='test -z "$ac_c_werror_flag"
15088                          || test ! -s conftest.err'
15089   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15090   (eval $ac_try) 2>&5
15091   ac_status=$?
15092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15093   (exit $ac_status); }; } &&
15094          { ac_try='test -s conftest.$ac_objext'
15095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15096   (eval $ac_try) 2>&5
15097   ac_status=$?
15098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15099   (exit $ac_status); }; }; then
15100   ac_cv_header_Xm_ComboBox_h=yes
15101 else
15102   echo "$as_me: failed program was:" >&5
15103 sed 's/^/| /' conftest.$ac_ext >&5
15104
15105 ac_cv_header_Xm_ComboBox_h=no
15106 fi
15107 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15108 fi
15109 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
15110 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
15111 if test $ac_cv_header_Xm_ComboBox_h = yes; then
15112   cat >>confdefs.h <<\_ACEOF
15113 #define HAVE_XMCOMBOBOX 1
15114 _ACEOF
15115
15116 fi
15117
15118
15119   CPPFLAGS="$ac_save_CPPFLAGS"
15120 fi
15121
15122
15123 ###############################################################################
15124 #
15125 #       Checking whether Motif is really Lesstif.
15126 #
15127 ###############################################################################
15128
15129 have_lesstif=no
15130 if test "$have_motif" = yes ; then
15131   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
15132 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
15133 if test "${ac_cv_have_lesstif+set}" = set; then
15134   echo $ECHO_N "(cached) $ECHO_C" >&6
15135 else
15136
15137   ac_save_CPPFLAGS="$CPPFLAGS"
15138   if test \! -z "$includedir" ; then
15139     CPPFLAGS="$CPPFLAGS -I$includedir"
15140   fi
15141   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15142   cat >conftest.$ac_ext <<_ACEOF
15143 /* confdefs.h.  */
15144 _ACEOF
15145 cat confdefs.h >>conftest.$ac_ext
15146 cat >>conftest.$ac_ext <<_ACEOF
15147 /* end confdefs.h.  */
15148 #include <Xm/Xm.h>
15149 int
15150 main ()
15151 {
15152 long vers = LesstifVersion;
15153   ;
15154   return 0;
15155 }
15156 _ACEOF
15157 rm -f conftest.$ac_objext
15158 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15159   (eval $ac_compile) 2>conftest.er1
15160   ac_status=$?
15161   grep -v '^ *+' conftest.er1 >conftest.err
15162   rm -f conftest.er1
15163   cat conftest.err >&5
15164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15165   (exit $ac_status); } &&
15166          { ac_try='test -z "$ac_c_werror_flag"
15167                          || test ! -s conftest.err'
15168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15169   (eval $ac_try) 2>&5
15170   ac_status=$?
15171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15172   (exit $ac_status); }; } &&
15173          { ac_try='test -s conftest.$ac_objext'
15174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15175   (eval $ac_try) 2>&5
15176   ac_status=$?
15177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15178   (exit $ac_status); }; }; then
15179   ac_cv_have_lesstif=yes
15180 else
15181   echo "$as_me: failed program was:" >&5
15182 sed 's/^/| /' conftest.$ac_ext >&5
15183
15184 ac_cv_have_lesstif=no
15185 fi
15186 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15187   CPPFLAGS="$ac_save_CPPFLAGS"
15188 fi
15189 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
15190 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
15191   have_lesstif=$ac_cv_have_lesstif
15192 fi
15193
15194
15195 lesstif_version=unknown
15196 lesstif_version_string=unknown
15197
15198 if test "$have_lesstif" = yes ; then
15199   ltv=unknown
15200   echo unknown > conftest-lt
15201   echo "$as_me:$LINENO: checking LessTif version number" >&5
15202 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
15203 if test "${ac_cv_lesstif_version_string+set}" = set; then
15204   echo $ECHO_N "(cached) $ECHO_C" >&6
15205 else
15206
15207   ac_save_CPPFLAGS="$CPPFLAGS"
15208   if test \! -z "$includedir" ; then
15209     CPPFLAGS="$CPPFLAGS -I$includedir"
15210   fi
15211   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15212   if test "$cross_compiling" = yes; then
15213   ac_cv_lesstif_version=unknown
15214                      ac_cv_lesstif_version_string=unknown
15215 else
15216   cat >conftest.$ac_ext <<_ACEOF
15217 /* confdefs.h.  */
15218 _ACEOF
15219 cat confdefs.h >>conftest.$ac_ext
15220 cat >>conftest.$ac_ext <<_ACEOF
15221 /* end confdefs.h.  */
15222 #include <stdio.h>
15223                      #include <Xm/Xm.h>
15224                      int main() {
15225                        FILE *f = fopen("conftest-lt", "w");
15226                        if (!f) exit(1);
15227                        fprintf(f, "%d %d.%d\n", LesstifVersion,
15228                           LESSTIF_VERSION, LESSTIF_REVISION);
15229                        fclose(f);
15230                        exit(0);
15231                      }
15232 _ACEOF
15233 rm -f conftest$ac_exeext
15234 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15235   (eval $ac_link) 2>&5
15236   ac_status=$?
15237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15238   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15240   (eval $ac_try) 2>&5
15241   ac_status=$?
15242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15243   (exit $ac_status); }; }; then
15244   ltv=`cat conftest-lt`
15245                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
15246                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
15247 else
15248   echo "$as_me: program exited with status $ac_status" >&5
15249 echo "$as_me: failed program was:" >&5
15250 sed 's/^/| /' conftest.$ac_ext >&5
15251
15252 ( exit $ac_status )
15253 ac_cv_lesstif_version=unknown
15254                      ac_cv_lesstif_version_string=unknown
15255 fi
15256 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15257 fi
15258   CPPFLAGS="$ac_save_CPPFLAGS"
15259 fi
15260 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
15261 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
15262   rm -f conftest-lt
15263   lesstif_version=$ac_cv_lesstif_version
15264   lesstif_version_string=$ac_cv_lesstif_version_string
15265
15266 fi
15267
15268
15269 if test "$have_motif" = yes ; then
15270   mtv=unknown
15271   echo unknown > conftest-mt
15272   echo "$as_me:$LINENO: checking Motif version number" >&5
15273 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
15274 if test "${ac_cv_motif_version_string+set}" = set; then
15275   echo $ECHO_N "(cached) $ECHO_C" >&6
15276 else
15277
15278   ac_save_CPPFLAGS="$CPPFLAGS"
15279   if test \! -z "$includedir" ; then
15280     CPPFLAGS="$CPPFLAGS -I$includedir"
15281   fi
15282   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15283   if test "$cross_compiling" = yes; then
15284   ac_cv_motif_version=unknown
15285                      ac_cv_motif_version_string=unknown
15286 else
15287   cat >conftest.$ac_ext <<_ACEOF
15288 /* confdefs.h.  */
15289 _ACEOF
15290 cat confdefs.h >>conftest.$ac_ext
15291 cat >>conftest.$ac_ext <<_ACEOF
15292 /* end confdefs.h.  */
15293 #include <stdio.h>
15294                      #include <Xm/Xm.h>
15295                      int main() {
15296                        FILE *f = fopen("conftest-mt", "w");
15297                        if (!f) exit(1);
15298                        fprintf(f, "%d %d.%d\n", XmVersion,
15299                           XmVERSION, XmREVISION);
15300                        fclose(f);
15301                        exit(0);
15302                      }
15303 _ACEOF
15304 rm -f conftest$ac_exeext
15305 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15306   (eval $ac_link) 2>&5
15307   ac_status=$?
15308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15309   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15311   (eval $ac_try) 2>&5
15312   ac_status=$?
15313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15314   (exit $ac_status); }; }; then
15315   mtv=`cat conftest-mt`
15316                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
15317                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
15318 else
15319   echo "$as_me: program exited with status $ac_status" >&5
15320 echo "$as_me: failed program was:" >&5
15321 sed 's/^/| /' conftest.$ac_ext >&5
15322
15323 ( exit $ac_status )
15324 ac_cv_motif_version=unknown
15325                      ac_cv_motif_version_string=unknown
15326 fi
15327 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15328 fi
15329   CPPFLAGS="$ac_save_CPPFLAGS"
15330 fi
15331 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
15332 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
15333   rm -f conftest-mt
15334   motif_version=$ac_cv_motif_version
15335   motif_version_string=$ac_cv_motif_version_string
15336
15337 fi
15338
15339
15340 ###############################################################################
15341 #
15342 #       Checking whether Motif requires -lXpm.
15343 #
15344 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
15345 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
15346 #       of the library whether to build the XPM code into libXm, or whether
15347 #       to rely on an external libXm.  So the only way to tell whether XPM is
15348 #       a link-time requirement is to examine libXm.a, which is very
15349 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
15350 #       always link against XPM if the XPM lib exists (and this will be a
15351 #       no-op if libXm happens to already have the XPM code in it.)
15352 #
15353 ###############################################################################
15354
15355 motif_requires_xpm=no
15356 if test "$have_motif" = yes ; then
15357    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
15358 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
15359    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
15360    then
15361      motif_requires_xpm=yes
15362      echo "$as_me:$LINENO: result: maybe" >&5
15363 echo "${ECHO_T}maybe" >&6
15364    else
15365      echo "$as_me:$LINENO: result: no" >&5
15366 echo "${ECHO_T}no" >&6
15367    fi
15368 fi
15369
15370
15371 ###############################################################################
15372 #
15373 #       Checking whether Motif requires -lXp.
15374 #
15375 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
15376 #       Extension".   Why this extension isn't in -lXext with all the others,
15377 #       I have no idea.
15378 #
15379 ###############################################################################
15380
15381 have_xp_ext=no
15382 if test "$have_motif" = yes ; then
15383    have_xp_ext=no
15384
15385   ac_save_CPPFLAGS="$CPPFLAGS"
15386   ac_save_LDFLAGS="$LDFLAGS"
15387 #  ac_save_LIBS="$LIBS"
15388
15389   if test \! -z "$includedir" ; then
15390     CPPFLAGS="$CPPFLAGS -I$includedir"
15391   fi
15392   # note: $X_CFLAGS includes $x_includes
15393   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15394
15395   if test \! -z "$libdir" ; then
15396     LDFLAGS="$LDFLAGS -L$libdir"
15397   fi
15398   # note: $X_LIBS includes $x_libraries
15399   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15400
15401   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
15402 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
15403 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
15404   echo $ECHO_N "(cached) $ECHO_C" >&6
15405 else
15406   ac_check_lib_save_LIBS=$LIBS
15407 LIBS="-lXp -lX11 -lXext -lm $LIBS"
15408 cat >conftest.$ac_ext <<_ACEOF
15409 /* confdefs.h.  */
15410 _ACEOF
15411 cat confdefs.h >>conftest.$ac_ext
15412 cat >>conftest.$ac_ext <<_ACEOF
15413 /* end confdefs.h.  */
15414
15415 /* Override any gcc2 internal prototype to avoid an error.  */
15416 #ifdef __cplusplus
15417 extern "C"
15418 #endif
15419 /* We use char because int might match the return type of a gcc2
15420    builtin and then its argument prototype would still apply.  */
15421 char XpQueryExtension ();
15422 int
15423 main ()
15424 {
15425 XpQueryExtension ();
15426   ;
15427   return 0;
15428 }
15429 _ACEOF
15430 rm -f conftest.$ac_objext conftest$ac_exeext
15431 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15432   (eval $ac_link) 2>conftest.er1
15433   ac_status=$?
15434   grep -v '^ *+' conftest.er1 >conftest.err
15435   rm -f conftest.er1
15436   cat conftest.err >&5
15437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15438   (exit $ac_status); } &&
15439          { ac_try='test -z "$ac_c_werror_flag"
15440                          || test ! -s conftest.err'
15441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15442   (eval $ac_try) 2>&5
15443   ac_status=$?
15444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15445   (exit $ac_status); }; } &&
15446          { ac_try='test -s conftest$ac_exeext'
15447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15448   (eval $ac_try) 2>&5
15449   ac_status=$?
15450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15451   (exit $ac_status); }; }; then
15452   ac_cv_lib_Xp_XpQueryExtension=yes
15453 else
15454   echo "$as_me: failed program was:" >&5
15455 sed 's/^/| /' conftest.$ac_ext >&5
15456
15457 ac_cv_lib_Xp_XpQueryExtension=no
15458 fi
15459 rm -f conftest.err conftest.$ac_objext \
15460       conftest$ac_exeext conftest.$ac_ext
15461 LIBS=$ac_check_lib_save_LIBS
15462 fi
15463 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
15464 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
15465 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
15466   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
15467 else
15468   true
15469 fi
15470
15471   CPPFLAGS="$ac_save_CPPFLAGS"
15472   LDFLAGS="$ac_save_LDFLAGS"
15473 #  LIBS="$ac_save_LIBS"
15474
15475 fi
15476
15477
15478 ###############################################################################
15479 #
15480 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
15481 #
15482 ###############################################################################
15483
15484 have_xintl=no
15485 if test "$have_motif" = yes ; then
15486
15487   ac_save_CPPFLAGS="$CPPFLAGS"
15488   ac_save_LDFLAGS="$LDFLAGS"
15489 #  ac_save_LIBS="$LIBS"
15490
15491   if test \! -z "$includedir" ; then
15492     CPPFLAGS="$CPPFLAGS -I$includedir"
15493   fi
15494   # note: $X_CFLAGS includes $x_includes
15495   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15496
15497   if test \! -z "$libdir" ; then
15498     LDFLAGS="$LDFLAGS -L$libdir"
15499   fi
15500   # note: $X_LIBS includes $x_libraries
15501   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15502
15503   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
15504 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
15505 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
15506   echo $ECHO_N "(cached) $ECHO_C" >&6
15507 else
15508   ac_check_lib_save_LIBS=$LIBS
15509 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
15510 cat >conftest.$ac_ext <<_ACEOF
15511 /* confdefs.h.  */
15512 _ACEOF
15513 cat confdefs.h >>conftest.$ac_ext
15514 cat >>conftest.$ac_ext <<_ACEOF
15515 /* end confdefs.h.  */
15516
15517 /* Override any gcc2 internal prototype to avoid an error.  */
15518 #ifdef __cplusplus
15519 extern "C"
15520 #endif
15521 /* We use char because int might match the return type of a gcc2
15522    builtin and then its argument prototype would still apply.  */
15523 char _Xsetlocale ();
15524 int
15525 main ()
15526 {
15527 _Xsetlocale ();
15528   ;
15529   return 0;
15530 }
15531 _ACEOF
15532 rm -f conftest.$ac_objext conftest$ac_exeext
15533 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15534   (eval $ac_link) 2>conftest.er1
15535   ac_status=$?
15536   grep -v '^ *+' conftest.er1 >conftest.err
15537   rm -f conftest.er1
15538   cat conftest.err >&5
15539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15540   (exit $ac_status); } &&
15541          { ac_try='test -z "$ac_c_werror_flag"
15542                          || test ! -s conftest.err'
15543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15544   (eval $ac_try) 2>&5
15545   ac_status=$?
15546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15547   (exit $ac_status); }; } &&
15548          { ac_try='test -s conftest$ac_exeext'
15549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15550   (eval $ac_try) 2>&5
15551   ac_status=$?
15552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15553   (exit $ac_status); }; }; then
15554   ac_cv_lib_Xintl__Xsetlocale=yes
15555 else
15556   echo "$as_me: failed program was:" >&5
15557 sed 's/^/| /' conftest.$ac_ext >&5
15558
15559 ac_cv_lib_Xintl__Xsetlocale=no
15560 fi
15561 rm -f conftest.err conftest.$ac_objext \
15562       conftest$ac_exeext conftest.$ac_ext
15563 LIBS=$ac_check_lib_save_LIBS
15564 fi
15565 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
15566 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
15567 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
15568   have_xintl=yes
15569 else
15570   have_xintl=no
15571 fi
15572
15573   CPPFLAGS="$ac_save_CPPFLAGS"
15574   LDFLAGS="$ac_save_LDFLAGS"
15575 #  LIBS="$ac_save_LIBS"
15576
15577   if test "$have_xintl" = yes; then
15578     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
15579   fi
15580 fi
15581
15582
15583 ###############################################################################
15584 #
15585 #       Check for -lGL or -lMesaGL.
15586 #
15587 ###############################################################################
15588
15589 have_gl=no
15590 ac_have_mesa_gl=no
15591 with_gl_req=unspecified
15592 gl_halfassed=no
15593
15594 # Check whether --with-gl or --without-gl was given.
15595 if test "${with_gl+set}" = set; then
15596   withval="$with_gl"
15597   with_gl="$withval"; with_gl_req="$withval"
15598 else
15599   with_gl=yes
15600 fi;
15601
15602
15603    case "$with_gl" in
15604     yes) ;;
15605     no)  ;;
15606
15607     /*)
15608      echo "$as_me:$LINENO: checking for GL headers" >&5
15609 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
15610      d=$with_gl/include
15611      if test -d $d; then
15612        X_CFLAGS="-I$d $X_CFLAGS"
15613        echo "$as_me:$LINENO: result: $d" >&5
15614 echo "${ECHO_T}$d" >&6
15615      else
15616        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15617 echo "${ECHO_T}not found ($d: no such directory)" >&6
15618      fi
15619
15620      echo "$as_me:$LINENO: checking for GL libs" >&5
15621 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
15622      d=$with_gl/lib
15623      if test -d $d; then
15624        X_LIBS="-L$d $X_LIBS"
15625        echo "$as_me:$LINENO: result: $d" >&5
15626 echo "${ECHO_T}$d" >&6
15627      else
15628        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15629 echo "${ECHO_T}not found ($d: no such directory)" >&6
15630      fi
15631
15632      # replace the directory string with "yes".
15633      with_gl_req="yes"
15634      with_gl=$with_gl_req
15635      ;;
15636
15637     *)
15638      echo ""
15639      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
15640      echo "       If it is a directory, then \`DIR/include' will be added to"
15641      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15642      exit 1
15643      ;;
15644    esac
15645
15646
15647 ac_mesagl_version=unknown
15648 ac_mesagl_version_string=unknown
15649
15650 if test "$with_gl" = yes; then
15651
15652   ac_save_CPPFLAGS="$CPPFLAGS"
15653   if test \! -z "$includedir" ; then
15654     CPPFLAGS="$CPPFLAGS -I$includedir"
15655   fi
15656   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15657   if test "${ac_cv_header_GL_gl_h+set}" = set; then
15658   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15659 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15660 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15661   echo $ECHO_N "(cached) $ECHO_C" >&6
15662 fi
15663 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15664 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15665 else
15666   # Is the header compilable?
15667 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
15668 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
15669 cat >conftest.$ac_ext <<_ACEOF
15670 /* confdefs.h.  */
15671 _ACEOF
15672 cat confdefs.h >>conftest.$ac_ext
15673 cat >>conftest.$ac_ext <<_ACEOF
15674 /* end confdefs.h.  */
15675 $ac_includes_default
15676 #include <GL/gl.h>
15677 _ACEOF
15678 rm -f conftest.$ac_objext
15679 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15680   (eval $ac_compile) 2>conftest.er1
15681   ac_status=$?
15682   grep -v '^ *+' conftest.er1 >conftest.err
15683   rm -f conftest.er1
15684   cat conftest.err >&5
15685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15686   (exit $ac_status); } &&
15687          { ac_try='test -z "$ac_c_werror_flag"
15688                          || test ! -s conftest.err'
15689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15690   (eval $ac_try) 2>&5
15691   ac_status=$?
15692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15693   (exit $ac_status); }; } &&
15694          { ac_try='test -s conftest.$ac_objext'
15695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15696   (eval $ac_try) 2>&5
15697   ac_status=$?
15698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15699   (exit $ac_status); }; }; then
15700   ac_header_compiler=yes
15701 else
15702   echo "$as_me: failed program was:" >&5
15703 sed 's/^/| /' conftest.$ac_ext >&5
15704
15705 ac_header_compiler=no
15706 fi
15707 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15708 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15709 echo "${ECHO_T}$ac_header_compiler" >&6
15710
15711 # Is the header present?
15712 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
15713 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
15714 cat >conftest.$ac_ext <<_ACEOF
15715 /* confdefs.h.  */
15716 _ACEOF
15717 cat confdefs.h >>conftest.$ac_ext
15718 cat >>conftest.$ac_ext <<_ACEOF
15719 /* end confdefs.h.  */
15720 #include <GL/gl.h>
15721 _ACEOF
15722 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15723   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15724   ac_status=$?
15725   grep -v '^ *+' conftest.er1 >conftest.err
15726   rm -f conftest.er1
15727   cat conftest.err >&5
15728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15729   (exit $ac_status); } >/dev/null; then
15730   if test -s conftest.err; then
15731     ac_cpp_err=$ac_c_preproc_warn_flag
15732     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15733   else
15734     ac_cpp_err=
15735   fi
15736 else
15737   ac_cpp_err=yes
15738 fi
15739 if test -z "$ac_cpp_err"; then
15740   ac_header_preproc=yes
15741 else
15742   echo "$as_me: failed program was:" >&5
15743 sed 's/^/| /' conftest.$ac_ext >&5
15744
15745   ac_header_preproc=no
15746 fi
15747 rm -f conftest.err conftest.$ac_ext
15748 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15749 echo "${ECHO_T}$ac_header_preproc" >&6
15750
15751 # So?  What about this header?
15752 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15753   yes:no: )
15754     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
15755 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15756     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
15757 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
15758     ac_header_preproc=yes
15759     ;;
15760   no:yes:* )
15761     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
15762 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
15763     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
15764 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
15765     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
15766 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
15767     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
15768 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15769     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
15770 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
15771     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
15772 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
15773     (
15774       cat <<\_ASBOX
15775 ## ------------------------------------------ ##
15776 ## Report this to the AC_PACKAGE_NAME lists.  ##
15777 ## ------------------------------------------ ##
15778 _ASBOX
15779     ) |
15780       sed "s/^/$as_me: WARNING:     /" >&2
15781     ;;
15782 esac
15783 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15784 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15785 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15786   echo $ECHO_N "(cached) $ECHO_C" >&6
15787 else
15788   ac_cv_header_GL_gl_h=$ac_header_preproc
15789 fi
15790 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15791 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15792
15793 fi
15794 if test $ac_cv_header_GL_gl_h = yes; then
15795   have_gl=yes
15796 else
15797   have_gl=no
15798 fi
15799
15800
15801   CPPFLAGS="$ac_save_CPPFLAGS"
15802   if test "$have_gl" = yes ; then
15803
15804   ac_save_CPPFLAGS="$CPPFLAGS"
15805   if test \! -z "$includedir" ; then
15806     CPPFLAGS="$CPPFLAGS -I$includedir"
15807   fi
15808   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15809   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
15810 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
15811 if test "${ac_cv_header_GL_glx_h+set}" = set; then
15812   echo $ECHO_N "(cached) $ECHO_C" >&6
15813 else
15814   cat >conftest.$ac_ext <<_ACEOF
15815 /* confdefs.h.  */
15816 _ACEOF
15817 cat confdefs.h >>conftest.$ac_ext
15818 cat >>conftest.$ac_ext <<_ACEOF
15819 /* end confdefs.h.  */
15820 #include <GL/gl.h>
15821
15822 #include <GL/glx.h>
15823 _ACEOF
15824 rm -f conftest.$ac_objext
15825 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15826   (eval $ac_compile) 2>conftest.er1
15827   ac_status=$?
15828   grep -v '^ *+' conftest.er1 >conftest.err
15829   rm -f conftest.er1
15830   cat conftest.err >&5
15831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15832   (exit $ac_status); } &&
15833          { ac_try='test -z "$ac_c_werror_flag"
15834                          || test ! -s conftest.err'
15835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15836   (eval $ac_try) 2>&5
15837   ac_status=$?
15838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15839   (exit $ac_status); }; } &&
15840          { ac_try='test -s conftest.$ac_objext'
15841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15842   (eval $ac_try) 2>&5
15843   ac_status=$?
15844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15845   (exit $ac_status); }; }; then
15846   ac_cv_header_GL_glx_h=yes
15847 else
15848   echo "$as_me: failed program was:" >&5
15849 sed 's/^/| /' conftest.$ac_ext >&5
15850
15851 ac_cv_header_GL_glx_h=no
15852 fi
15853 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15854 fi
15855 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
15856 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
15857 if test $ac_cv_header_GL_glx_h = yes; then
15858   have_gl=yes
15859 else
15860   have_gl=no
15861 fi
15862
15863
15864   CPPFLAGS="$ac_save_CPPFLAGS"
15865   fi
15866
15867   # If we have the headers, try and figure out which vendor it's from.
15868   #
15869   if test "$have_gl" = yes ; then
15870
15871     # We need to know whether it's MesaGL so that we know which libraries
15872     # to link against.
15873     #
15874     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
15875 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
15876 if test "${ac_cv_have_mesa_gl+set}" = set; then
15877   echo $ECHO_N "(cached) $ECHO_C" >&6
15878 else
15879   ac_cv_have_mesa_gl=no
15880
15881   ac_save_CPPFLAGS="$CPPFLAGS"
15882   if test \! -z "$includedir" ; then
15883     CPPFLAGS="$CPPFLAGS -I$includedir"
15884   fi
15885   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15886   cat >conftest.$ac_ext <<_ACEOF
15887 /* confdefs.h.  */
15888 _ACEOF
15889 cat confdefs.h >>conftest.$ac_ext
15890 cat >>conftest.$ac_ext <<_ACEOF
15891 /* end confdefs.h.  */
15892 #include <GL/glx.h>
15893
15894 _ACEOF
15895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15896   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
15897   ac_cv_have_mesa_gl=yes
15898 fi
15899 rm -f conftest*
15900
15901   CPPFLAGS="$ac_save_CPPFLAGS"
15902
15903 fi
15904 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
15905 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
15906     ac_have_mesa_gl=$ac_cv_have_mesa_gl
15907
15908
15909     gl_lib_1=""
15910     GL_LIBS=""
15911
15912
15913     # Some versions of MesaGL are compiled to require -lpthread.
15914     # So if the Mesa headers exist, and -lpthread exists, then always
15915     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
15916     #
15917     if test "$ac_have_mesa_gl" = yes; then
15918       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15919 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
15920 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
15921   echo $ECHO_N "(cached) $ECHO_C" >&6
15922 else
15923   ac_check_lib_save_LIBS=$LIBS
15924 LIBS="-lpthread  $LIBS"
15925 cat >conftest.$ac_ext <<_ACEOF
15926 /* confdefs.h.  */
15927 _ACEOF
15928 cat confdefs.h >>conftest.$ac_ext
15929 cat >>conftest.$ac_ext <<_ACEOF
15930 /* end confdefs.h.  */
15931
15932 /* Override any gcc2 internal prototype to avoid an error.  */
15933 #ifdef __cplusplus
15934 extern "C"
15935 #endif
15936 /* We use char because int might match the return type of a gcc2
15937    builtin and then its argument prototype would still apply.  */
15938 char pthread_create ();
15939 int
15940 main ()
15941 {
15942 pthread_create ();
15943   ;
15944   return 0;
15945 }
15946 _ACEOF
15947 rm -f conftest.$ac_objext conftest$ac_exeext
15948 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15949   (eval $ac_link) 2>conftest.er1
15950   ac_status=$?
15951   grep -v '^ *+' conftest.er1 >conftest.err
15952   rm -f conftest.er1
15953   cat conftest.err >&5
15954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15955   (exit $ac_status); } &&
15956          { ac_try='test -z "$ac_c_werror_flag"
15957                          || test ! -s conftest.err'
15958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15959   (eval $ac_try) 2>&5
15960   ac_status=$?
15961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15962   (exit $ac_status); }; } &&
15963          { ac_try='test -s conftest$ac_exeext'
15964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15965   (eval $ac_try) 2>&5
15966   ac_status=$?
15967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15968   (exit $ac_status); }; }; then
15969   ac_cv_lib_pthread_pthread_create=yes
15970 else
15971   echo "$as_me: failed program was:" >&5
15972 sed 's/^/| /' conftest.$ac_ext >&5
15973
15974 ac_cv_lib_pthread_pthread_create=no
15975 fi
15976 rm -f conftest.err conftest.$ac_objext \
15977       conftest$ac_exeext conftest.$ac_ext
15978 LIBS=$ac_check_lib_save_LIBS
15979 fi
15980 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
15981 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
15982 if test $ac_cv_lib_pthread_pthread_create = yes; then
15983   GL_LIBS="-lpthread"
15984 fi
15985
15986     fi
15987
15988
15989     # If we have Mesa headers, check to see if we can link against -lMesaGL.
15990     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
15991     # Else, warn that GL is busted.  (We have the headers, but no libs.)
15992     #
15993
15994     if test "$ac_have_mesa_gl" = yes ; then
15995
15996   ac_save_CPPFLAGS="$CPPFLAGS"
15997   ac_save_LDFLAGS="$LDFLAGS"
15998 #  ac_save_LIBS="$LIBS"
15999
16000   if test \! -z "$includedir" ; then
16001     CPPFLAGS="$CPPFLAGS -I$includedir"
16002   fi
16003   # note: $X_CFLAGS includes $x_includes
16004   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16005
16006   if test \! -z "$libdir" ; then
16007     LDFLAGS="$LDFLAGS -L$libdir"
16008   fi
16009   # note: $X_LIBS includes $x_libraries
16010   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16011
16012   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
16013 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
16014 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
16015   echo $ECHO_N "(cached) $ECHO_C" >&6
16016 else
16017   ac_check_lib_save_LIBS=$LIBS
16018 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16019 cat >conftest.$ac_ext <<_ACEOF
16020 /* confdefs.h.  */
16021 _ACEOF
16022 cat confdefs.h >>conftest.$ac_ext
16023 cat >>conftest.$ac_ext <<_ACEOF
16024 /* end confdefs.h.  */
16025
16026 /* Override any gcc2 internal prototype to avoid an error.  */
16027 #ifdef __cplusplus
16028 extern "C"
16029 #endif
16030 /* We use char because int might match the return type of a gcc2
16031    builtin and then its argument prototype would still apply.  */
16032 char glXCreateContext ();
16033 int
16034 main ()
16035 {
16036 glXCreateContext ();
16037   ;
16038   return 0;
16039 }
16040 _ACEOF
16041 rm -f conftest.$ac_objext conftest$ac_exeext
16042 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16043   (eval $ac_link) 2>conftest.er1
16044   ac_status=$?
16045   grep -v '^ *+' conftest.er1 >conftest.err
16046   rm -f conftest.er1
16047   cat conftest.err >&5
16048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16049   (exit $ac_status); } &&
16050          { ac_try='test -z "$ac_c_werror_flag"
16051                          || test ! -s conftest.err'
16052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16053   (eval $ac_try) 2>&5
16054   ac_status=$?
16055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16056   (exit $ac_status); }; } &&
16057          { ac_try='test -s conftest$ac_exeext'
16058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16059   (eval $ac_try) 2>&5
16060   ac_status=$?
16061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16062   (exit $ac_status); }; }; then
16063   ac_cv_lib_MesaGL_glXCreateContext=yes
16064 else
16065   echo "$as_me: failed program was:" >&5
16066 sed 's/^/| /' conftest.$ac_ext >&5
16067
16068 ac_cv_lib_MesaGL_glXCreateContext=no
16069 fi
16070 rm -f conftest.err conftest.$ac_objext \
16071       conftest$ac_exeext conftest.$ac_ext
16072 LIBS=$ac_check_lib_save_LIBS
16073 fi
16074 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
16075 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
16076 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
16077   gl_lib_1="MesaGL"
16078                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
16079 fi
16080
16081   CPPFLAGS="$ac_save_CPPFLAGS"
16082   LDFLAGS="$ac_save_LDFLAGS"
16083 #  LIBS="$ac_save_LIBS"
16084
16085     fi
16086
16087     if test "$gl_lib_1" = "" ; then
16088
16089   ac_save_CPPFLAGS="$CPPFLAGS"
16090   ac_save_LDFLAGS="$LDFLAGS"
16091 #  ac_save_LIBS="$LIBS"
16092
16093   if test \! -z "$includedir" ; then
16094     CPPFLAGS="$CPPFLAGS -I$includedir"
16095   fi
16096   # note: $X_CFLAGS includes $x_includes
16097   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16098
16099   if test \! -z "$libdir" ; then
16100     LDFLAGS="$LDFLAGS -L$libdir"
16101   fi
16102   # note: $X_LIBS includes $x_libraries
16103   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16104
16105   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
16106 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
16107 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
16108   echo $ECHO_N "(cached) $ECHO_C" >&6
16109 else
16110   ac_check_lib_save_LIBS=$LIBS
16111 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16112 cat >conftest.$ac_ext <<_ACEOF
16113 /* confdefs.h.  */
16114 _ACEOF
16115 cat confdefs.h >>conftest.$ac_ext
16116 cat >>conftest.$ac_ext <<_ACEOF
16117 /* end confdefs.h.  */
16118
16119 /* Override any gcc2 internal prototype to avoid an error.  */
16120 #ifdef __cplusplus
16121 extern "C"
16122 #endif
16123 /* We use char because int might match the return type of a gcc2
16124    builtin and then its argument prototype would still apply.  */
16125 char glXCreateContext ();
16126 int
16127 main ()
16128 {
16129 glXCreateContext ();
16130   ;
16131   return 0;
16132 }
16133 _ACEOF
16134 rm -f conftest.$ac_objext conftest$ac_exeext
16135 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16136   (eval $ac_link) 2>conftest.er1
16137   ac_status=$?
16138   grep -v '^ *+' conftest.er1 >conftest.err
16139   rm -f conftest.er1
16140   cat conftest.err >&5
16141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16142   (exit $ac_status); } &&
16143          { ac_try='test -z "$ac_c_werror_flag"
16144                          || test ! -s conftest.err'
16145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16146   (eval $ac_try) 2>&5
16147   ac_status=$?
16148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16149   (exit $ac_status); }; } &&
16150          { ac_try='test -s conftest$ac_exeext'
16151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16152   (eval $ac_try) 2>&5
16153   ac_status=$?
16154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16155   (exit $ac_status); }; }; then
16156   ac_cv_lib_GL_glXCreateContext=yes
16157 else
16158   echo "$as_me: failed program was:" >&5
16159 sed 's/^/| /' conftest.$ac_ext >&5
16160
16161 ac_cv_lib_GL_glXCreateContext=no
16162 fi
16163 rm -f conftest.err conftest.$ac_objext \
16164       conftest$ac_exeext conftest.$ac_ext
16165 LIBS=$ac_check_lib_save_LIBS
16166 fi
16167 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
16168 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
16169 if test $ac_cv_lib_GL_glXCreateContext = yes; then
16170   gl_lib_1="GL"
16171                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
16172 fi
16173
16174   CPPFLAGS="$ac_save_CPPFLAGS"
16175   LDFLAGS="$ac_save_LDFLAGS"
16176 #  LIBS="$ac_save_LIBS"
16177
16178     fi
16179
16180     if test "$gl_lib_1" = "" ; then
16181       # we have headers, but no libs -- bail.
16182       have_gl=no
16183       ac_have_mesa_gl=no
16184       gl_halfassed=yes
16185     else
16186       # linking works -- we can build the GL hacks.
16187       cat >>confdefs.h <<\_ACEOF
16188 #define HAVE_GL 1
16189 _ACEOF
16190
16191       if test "$ac_have_mesa_gl" = yes ; then
16192         cat >>confdefs.h <<\_ACEOF
16193 #define HAVE_MESA_GL 1
16194 _ACEOF
16195
16196       fi
16197     fi
16198   fi
16199
16200
16201   # Now that we know we have GL headers and libs, do some more GL testing.
16202   #
16203
16204   if test "$have_gl" = yes ; then
16205     # If it's MesaGL, we'd like to issue a warning if the version number
16206     # is less than or equal to 2.6, because that version had a security bug.
16207     #
16208     if test "$ac_have_mesa_gl" = yes; then
16209
16210       echo "$as_me:$LINENO: checking MesaGL version number" >&5
16211 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
16212 if test "${ac_cv_mesagl_version_string+set}" = set; then
16213   echo $ECHO_N "(cached) $ECHO_C" >&6
16214 else
16215   cat > conftest.$ac_ext <<EOF
16216 #line 16220 "configure"
16217 #include "confdefs.h"
16218 #include <GL/gl.h>
16219 #ifndef MESA_MAJOR_VERSION
16220 # include <GL/xmesa.h>
16221 # ifdef XMESA_MAJOR_VERSION
16222    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
16223       we have to check the XMesa version number (the number of the X protocol
16224       support, which seems to be the same as the Mesa version number.)
16225     */
16226 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
16227 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
16228 # else
16229    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
16230       so we have no way of telling what version of Mesa this is at all.
16231       So, we'll guess that the osmesa version (the "offscreen protocol")
16232       is less than or equal to the real mesa version number.  Except that
16233       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
16234       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
16235     */
16236 # include <GL/osmesa.h>
16237 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
16238 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
16239 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
16240 #   undef MESA_MINOR_VERSION
16241 #   define MESA_MINOR_VERSION 4 or newer, probably?
16242 #  endif
16243 # endif
16244 #endif
16245 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
16246 EOF
16247
16248          ac_save_CPPFLAGS="$CPPFLAGS"
16249          if test \! -z "$includedir" ; then
16250            CPPFLAGS="$CPPFLAGS -I$includedir"
16251          fi
16252          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16253
16254          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
16255
16256          # M4 sucks!!
16257
16258           mglv=`echo "$mglv" | sed -n \
16259              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
16260
16261
16262          rm -f conftest.$ac_ext
16263
16264          CPPFLAGS="$ac_save_CPPFLAGS"
16265
16266          if test "$mglv" = ""; then
16267            ac_mesagl_version=unknown
16268            ac_mesagl_version_string=unknown
16269          else
16270            ac_mesagl_version_string="$mglv"
16271            # M4 sucks!!
16272
16273            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
16274            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
16275
16276            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
16277            if test -z "$ac_mesagl_version"; then
16278              ac_mesagl_version=unknown
16279              ac_mesagl_version_string=unknown
16280            fi
16281          fi
16282          ac_cv_mesagl_version=$ac_mesagl_version
16283          ac_cv_mesagl_version_string=$ac_mesagl_version_string
16284
16285 fi
16286 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
16287 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
16288       ac_mesagl_version=$ac_cv_mesagl_version
16289       ac_mesagl_version_string=$ac_cv_mesagl_version_string
16290     fi
16291
16292
16293     # Check for OpenGL 1.1 features.
16294     #
16295
16296   ac_save_CPPFLAGS="$CPPFLAGS"
16297   ac_save_LDFLAGS="$LDFLAGS"
16298 #  ac_save_LIBS="$LIBS"
16299
16300   if test \! -z "$includedir" ; then
16301     CPPFLAGS="$CPPFLAGS -I$includedir"
16302   fi
16303   # note: $X_CFLAGS includes $x_includes
16304   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16305
16306   if test \! -z "$libdir" ; then
16307     LDFLAGS="$LDFLAGS -L$libdir"
16308   fi
16309   # note: $X_LIBS includes $x_libraries
16310   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16311
16312   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
16313 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
16314 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
16315 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16316   echo $ECHO_N "(cached) $ECHO_C" >&6
16317 else
16318   ac_check_lib_save_LIBS=$LIBS
16319 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
16320 cat >conftest.$ac_ext <<_ACEOF
16321 /* confdefs.h.  */
16322 _ACEOF
16323 cat confdefs.h >>conftest.$ac_ext
16324 cat >>conftest.$ac_ext <<_ACEOF
16325 /* end confdefs.h.  */
16326
16327 /* Override any gcc2 internal prototype to avoid an error.  */
16328 #ifdef __cplusplus
16329 extern "C"
16330 #endif
16331 /* We use char because int might match the return type of a gcc2
16332    builtin and then its argument prototype would still apply.  */
16333 char glBindTexture ();
16334 int
16335 main ()
16336 {
16337 glBindTexture ();
16338   ;
16339   return 0;
16340 }
16341 _ACEOF
16342 rm -f conftest.$ac_objext conftest$ac_exeext
16343 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16344   (eval $ac_link) 2>conftest.er1
16345   ac_status=$?
16346   grep -v '^ *+' conftest.er1 >conftest.err
16347   rm -f conftest.er1
16348   cat conftest.err >&5
16349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16350   (exit $ac_status); } &&
16351          { ac_try='test -z "$ac_c_werror_flag"
16352                          || test ! -s conftest.err'
16353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16354   (eval $ac_try) 2>&5
16355   ac_status=$?
16356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16357   (exit $ac_status); }; } &&
16358          { ac_try='test -s conftest$ac_exeext'
16359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16360   (eval $ac_try) 2>&5
16361   ac_status=$?
16362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16363   (exit $ac_status); }; }; then
16364   eval "$as_ac_Lib=yes"
16365 else
16366   echo "$as_me: failed program was:" >&5
16367 sed 's/^/| /' conftest.$ac_ext >&5
16368
16369 eval "$as_ac_Lib=no"
16370 fi
16371 rm -f conftest.err conftest.$ac_objext \
16372       conftest$ac_exeext conftest.$ac_ext
16373 LIBS=$ac_check_lib_save_LIBS
16374 fi
16375 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16376 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16377 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16378   cat >>confdefs.h <<\_ACEOF
16379 #define HAVE_GLBINDTEXTURE 1
16380 _ACEOF
16381
16382 else
16383   true
16384 fi
16385
16386   CPPFLAGS="$ac_save_CPPFLAGS"
16387   LDFLAGS="$ac_save_LDFLAGS"
16388 #  LIBS="$ac_save_LIBS"
16389
16390   fi
16391
16392 elif test "$with_gl" != no; then
16393   echo "error: must be yes or no: --with-gl=$with_gl"
16394   exit 1
16395 fi
16396
16397
16398 ###############################################################################
16399 #
16400 #       Check for -lgle.
16401 #
16402 ###############################################################################
16403
16404 have_gle=no
16405 with_gle_req=unspecified
16406 gle_halfassed=no
16407
16408 # Check whether --with-gle or --without-gle was given.
16409 if test "${with_gle+set}" = set; then
16410   withval="$with_gle"
16411   with_gle="$withval"; with_gle_req="$withval"
16412 else
16413   with_gle=yes
16414 fi;
16415
16416
16417    case "$with_gle" in
16418     yes) ;;
16419     no)  ;;
16420
16421     /*)
16422      echo "$as_me:$LINENO: checking for GLE headers" >&5
16423 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
16424      d=$with_gle/include
16425      if test -d $d; then
16426        X_CFLAGS="-I$d $X_CFLAGS"
16427        echo "$as_me:$LINENO: result: $d" >&5
16428 echo "${ECHO_T}$d" >&6
16429      else
16430        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16431 echo "${ECHO_T}not found ($d: no such directory)" >&6
16432      fi
16433
16434      echo "$as_me:$LINENO: checking for GLE libs" >&5
16435 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
16436      d=$with_gle/lib
16437      if test -d $d; then
16438        X_LIBS="-L$d $X_LIBS"
16439        echo "$as_me:$LINENO: result: $d" >&5
16440 echo "${ECHO_T}$d" >&6
16441      else
16442        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16443 echo "${ECHO_T}not found ($d: no such directory)" >&6
16444      fi
16445
16446      # replace the directory string with "yes".
16447      with_gle_req="yes"
16448      with_gle=$with_gle_req
16449      ;;
16450
16451     *)
16452      echo ""
16453      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
16454      echo "       If it is a directory, then \`DIR/include' will be added to"
16455      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16456      exit 1
16457      ;;
16458    esac
16459
16460
16461 GLE_LIBS=""
16462
16463 if test "$have_gl" = no ; then
16464  true
16465 elif test "$with_gle" = yes; then
16466
16467
16468   ac_save_CPPFLAGS="$CPPFLAGS"
16469   if test \! -z "$includedir" ; then
16470     CPPFLAGS="$CPPFLAGS -I$includedir"
16471   fi
16472   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16473   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
16474 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
16475 if test "${ac_cv_header_GL_gle_h+set}" = set; then
16476   echo $ECHO_N "(cached) $ECHO_C" >&6
16477 else
16478   cat >conftest.$ac_ext <<_ACEOF
16479 /* confdefs.h.  */
16480 _ACEOF
16481 cat confdefs.h >>conftest.$ac_ext
16482 cat >>conftest.$ac_ext <<_ACEOF
16483 /* end confdefs.h.  */
16484 #include <GL/gl.h>
16485
16486 #include <GL/gle.h>
16487 _ACEOF
16488 rm -f conftest.$ac_objext
16489 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16490   (eval $ac_compile) 2>conftest.er1
16491   ac_status=$?
16492   grep -v '^ *+' conftest.er1 >conftest.err
16493   rm -f conftest.er1
16494   cat conftest.err >&5
16495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16496   (exit $ac_status); } &&
16497          { ac_try='test -z "$ac_c_werror_flag"
16498                          || test ! -s conftest.err'
16499   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16500   (eval $ac_try) 2>&5
16501   ac_status=$?
16502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16503   (exit $ac_status); }; } &&
16504          { ac_try='test -s conftest.$ac_objext'
16505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16506   (eval $ac_try) 2>&5
16507   ac_status=$?
16508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16509   (exit $ac_status); }; }; then
16510   ac_cv_header_GL_gle_h=yes
16511 else
16512   echo "$as_me: failed program was:" >&5
16513 sed 's/^/| /' conftest.$ac_ext >&5
16514
16515 ac_cv_header_GL_gle_h=no
16516 fi
16517 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16518 fi
16519 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
16520 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
16521 if test $ac_cv_header_GL_gle_h = yes; then
16522   have_gle3=yes
16523 else
16524   have_gle3=no
16525 fi
16526
16527
16528   CPPFLAGS="$ac_save_CPPFLAGS"
16529   if test "$have_gle3" = yes ; then
16530     have_gle=yes;
16531   else
16532
16533   ac_save_CPPFLAGS="$CPPFLAGS"
16534   if test \! -z "$includedir" ; then
16535     CPPFLAGS="$CPPFLAGS -I$includedir"
16536   fi
16537   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16538   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
16539 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
16540 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
16541   echo $ECHO_N "(cached) $ECHO_C" >&6
16542 else
16543   cat >conftest.$ac_ext <<_ACEOF
16544 /* confdefs.h.  */
16545 _ACEOF
16546 cat confdefs.h >>conftest.$ac_ext
16547 cat >>conftest.$ac_ext <<_ACEOF
16548 /* end confdefs.h.  */
16549 #include <GL/gl.h>
16550
16551 #include <GL/gutil.h>
16552 _ACEOF
16553 rm -f conftest.$ac_objext
16554 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16555   (eval $ac_compile) 2>conftest.er1
16556   ac_status=$?
16557   grep -v '^ *+' conftest.er1 >conftest.err
16558   rm -f conftest.er1
16559   cat conftest.err >&5
16560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16561   (exit $ac_status); } &&
16562          { ac_try='test -z "$ac_c_werror_flag"
16563                          || test ! -s conftest.err'
16564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16565   (eval $ac_try) 2>&5
16566   ac_status=$?
16567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16568   (exit $ac_status); }; } &&
16569          { ac_try='test -s conftest.$ac_objext'
16570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16571   (eval $ac_try) 2>&5
16572   ac_status=$?
16573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16574   (exit $ac_status); }; }; then
16575   ac_cv_header_GL_gutil_h=yes
16576 else
16577   echo "$as_me: failed program was:" >&5
16578 sed 's/^/| /' conftest.$ac_ext >&5
16579
16580 ac_cv_header_GL_gutil_h=no
16581 fi
16582 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16583 fi
16584 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
16585 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
16586 if test $ac_cv_header_GL_gutil_h = yes; then
16587   have_gle=yes
16588 else
16589   have_gle=no
16590 fi
16591
16592
16593   CPPFLAGS="$ac_save_CPPFLAGS"
16594     if test "$have_gle" = yes ; then
16595
16596   ac_save_CPPFLAGS="$CPPFLAGS"
16597   if test \! -z "$includedir" ; then
16598     CPPFLAGS="$CPPFLAGS -I$includedir"
16599   fi
16600   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16601   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
16602 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
16603 if test "${ac_cv_header_GL_tube_h+set}" = set; then
16604   echo $ECHO_N "(cached) $ECHO_C" >&6
16605 else
16606   cat >conftest.$ac_ext <<_ACEOF
16607 /* confdefs.h.  */
16608 _ACEOF
16609 cat confdefs.h >>conftest.$ac_ext
16610 cat >>conftest.$ac_ext <<_ACEOF
16611 /* end confdefs.h.  */
16612 #include <GL/gl.h>
16613
16614 #include <GL/tube.h>
16615 _ACEOF
16616 rm -f conftest.$ac_objext
16617 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16618   (eval $ac_compile) 2>conftest.er1
16619   ac_status=$?
16620   grep -v '^ *+' conftest.er1 >conftest.err
16621   rm -f conftest.er1
16622   cat conftest.err >&5
16623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16624   (exit $ac_status); } &&
16625          { ac_try='test -z "$ac_c_werror_flag"
16626                          || test ! -s conftest.err'
16627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16628   (eval $ac_try) 2>&5
16629   ac_status=$?
16630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16631   (exit $ac_status); }; } &&
16632          { ac_try='test -s conftest.$ac_objext'
16633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16634   (eval $ac_try) 2>&5
16635   ac_status=$?
16636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16637   (exit $ac_status); }; }; then
16638   ac_cv_header_GL_tube_h=yes
16639 else
16640   echo "$as_me: failed program was:" >&5
16641 sed 's/^/| /' conftest.$ac_ext >&5
16642
16643 ac_cv_header_GL_tube_h=no
16644 fi
16645 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16646 fi
16647 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
16648 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
16649 if test $ac_cv_header_GL_tube_h = yes; then
16650   have_gle=yes
16651 else
16652   have_gle=no
16653 fi
16654
16655
16656   CPPFLAGS="$ac_save_CPPFLAGS"
16657     fi
16658   fi
16659
16660   if test "$have_gle" = yes ; then
16661     have_gle=no
16662     gle_halfassed=yes
16663
16664   ac_save_CPPFLAGS="$CPPFLAGS"
16665   ac_save_LDFLAGS="$LDFLAGS"
16666 #  ac_save_LIBS="$LIBS"
16667
16668   if test \! -z "$includedir" ; then
16669     CPPFLAGS="$CPPFLAGS -I$includedir"
16670   fi
16671   # note: $X_CFLAGS includes $x_includes
16672   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16673
16674   if test \! -z "$libdir" ; then
16675     LDFLAGS="$LDFLAGS -L$libdir"
16676   fi
16677   # note: $X_LIBS includes $x_libraries
16678   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16679
16680   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
16681 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
16682 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
16683   echo $ECHO_N "(cached) $ECHO_C" >&6
16684 else
16685   ac_check_lib_save_LIBS=$LIBS
16686 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16687 cat >conftest.$ac_ext <<_ACEOF
16688 /* confdefs.h.  */
16689 _ACEOF
16690 cat confdefs.h >>conftest.$ac_ext
16691 cat >>conftest.$ac_ext <<_ACEOF
16692 /* end confdefs.h.  */
16693
16694 /* Override any gcc2 internal prototype to avoid an error.  */
16695 #ifdef __cplusplus
16696 extern "C"
16697 #endif
16698 /* We use char because int might match the return type of a gcc2
16699    builtin and then its argument prototype would still apply.  */
16700 char gleCreateGC ();
16701 int
16702 main ()
16703 {
16704 gleCreateGC ();
16705   ;
16706   return 0;
16707 }
16708 _ACEOF
16709 rm -f conftest.$ac_objext conftest$ac_exeext
16710 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16711   (eval $ac_link) 2>conftest.er1
16712   ac_status=$?
16713   grep -v '^ *+' conftest.er1 >conftest.err
16714   rm -f conftest.er1
16715   cat conftest.err >&5
16716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16717   (exit $ac_status); } &&
16718          { ac_try='test -z "$ac_c_werror_flag"
16719                          || test ! -s conftest.err'
16720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16721   (eval $ac_try) 2>&5
16722   ac_status=$?
16723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16724   (exit $ac_status); }; } &&
16725          { ac_try='test -s conftest$ac_exeext'
16726   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16727   (eval $ac_try) 2>&5
16728   ac_status=$?
16729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16730   (exit $ac_status); }; }; then
16731   ac_cv_lib_gle_gleCreateGC=yes
16732 else
16733   echo "$as_me: failed program was:" >&5
16734 sed 's/^/| /' conftest.$ac_ext >&5
16735
16736 ac_cv_lib_gle_gleCreateGC=no
16737 fi
16738 rm -f conftest.err conftest.$ac_objext \
16739       conftest$ac_exeext conftest.$ac_ext
16740 LIBS=$ac_check_lib_save_LIBS
16741 fi
16742 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
16743 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
16744 if test $ac_cv_lib_gle_gleCreateGC = yes; then
16745   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
16746 fi
16747
16748   CPPFLAGS="$ac_save_CPPFLAGS"
16749   LDFLAGS="$ac_save_LDFLAGS"
16750 #  LIBS="$ac_save_LIBS"
16751
16752   fi
16753   if test "$have_gle" = yes ; then
16754     have_gle=no
16755     gle_halfassed=yes
16756
16757     # sometimes the libmatrix stuff is included in libgle.  look there first.
16758 #
16759 # I don't get it.  For some reason, this test passes on SGI, as if
16760 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
16761 # Yet the link is succeeding.  Why???
16762 #
16763 #    AC_CHECK_X_LIB(gle, uview_direction_d,
16764 #                   [have_gle=yes; gle_halfassed=no],
16765 #                   [], $GL_LIBS -lX11 -lXext -lm)
16766
16767     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
16768     # *sigh*
16769     if test "$have_gle3" = yes ; then
16770
16771   ac_save_CPPFLAGS="$CPPFLAGS"
16772   ac_save_LDFLAGS="$LDFLAGS"
16773 #  ac_save_LIBS="$LIBS"
16774
16775   if test \! -z "$includedir" ; then
16776     CPPFLAGS="$CPPFLAGS -I$includedir"
16777   fi
16778   # note: $X_CFLAGS includes $x_includes
16779   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16780
16781   if test \! -z "$libdir" ; then
16782     LDFLAGS="$LDFLAGS -L$libdir"
16783   fi
16784   # note: $X_LIBS includes $x_libraries
16785   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16786
16787   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
16788 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
16789 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
16790   echo $ECHO_N "(cached) $ECHO_C" >&6
16791 else
16792   ac_check_lib_save_LIBS=$LIBS
16793 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16794 cat >conftest.$ac_ext <<_ACEOF
16795 /* confdefs.h.  */
16796 _ACEOF
16797 cat confdefs.h >>conftest.$ac_ext
16798 cat >>conftest.$ac_ext <<_ACEOF
16799 /* end confdefs.h.  */
16800
16801 /* Override any gcc2 internal prototype to avoid an error.  */
16802 #ifdef __cplusplus
16803 extern "C"
16804 #endif
16805 /* We use char because int might match the return type of a gcc2
16806    builtin and then its argument prototype would still apply.  */
16807 char uview_direction ();
16808 int
16809 main ()
16810 {
16811 uview_direction ();
16812   ;
16813   return 0;
16814 }
16815 _ACEOF
16816 rm -f conftest.$ac_objext conftest$ac_exeext
16817 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16818   (eval $ac_link) 2>conftest.er1
16819   ac_status=$?
16820   grep -v '^ *+' conftest.er1 >conftest.err
16821   rm -f conftest.er1
16822   cat conftest.err >&5
16823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16824   (exit $ac_status); } &&
16825          { ac_try='test -z "$ac_c_werror_flag"
16826                          || test ! -s conftest.err'
16827   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16828   (eval $ac_try) 2>&5
16829   ac_status=$?
16830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16831   (exit $ac_status); }; } &&
16832          { ac_try='test -s conftest$ac_exeext'
16833   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16834   (eval $ac_try) 2>&5
16835   ac_status=$?
16836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16837   (exit $ac_status); }; }; then
16838   ac_cv_lib_gle_uview_direction=yes
16839 else
16840   echo "$as_me: failed program was:" >&5
16841 sed 's/^/| /' conftest.$ac_ext >&5
16842
16843 ac_cv_lib_gle_uview_direction=no
16844 fi
16845 rm -f conftest.err conftest.$ac_objext \
16846       conftest$ac_exeext conftest.$ac_ext
16847 LIBS=$ac_check_lib_save_LIBS
16848 fi
16849 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
16850 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
16851 if test $ac_cv_lib_gle_uview_direction = yes; then
16852   have_gle=yes; gle_halfassed=no
16853 fi
16854
16855   CPPFLAGS="$ac_save_CPPFLAGS"
16856   LDFLAGS="$ac_save_LDFLAGS"
16857 #  LIBS="$ac_save_LIBS"
16858
16859     fi
16860     # if it wasn't in libgle, then look in libmatrix.
16861     if test "$have_gle" = no ; then
16862
16863   ac_save_CPPFLAGS="$CPPFLAGS"
16864   ac_save_LDFLAGS="$LDFLAGS"
16865 #  ac_save_LIBS="$LIBS"
16866
16867   if test \! -z "$includedir" ; then
16868     CPPFLAGS="$CPPFLAGS -I$includedir"
16869   fi
16870   # note: $X_CFLAGS includes $x_includes
16871   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16872
16873   if test \! -z "$libdir" ; then
16874     LDFLAGS="$LDFLAGS -L$libdir"
16875   fi
16876   # note: $X_LIBS includes $x_libraries
16877   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16878
16879   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
16880 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
16881 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
16882   echo $ECHO_N "(cached) $ECHO_C" >&6
16883 else
16884   ac_check_lib_save_LIBS=$LIBS
16885 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
16886 cat >conftest.$ac_ext <<_ACEOF
16887 /* confdefs.h.  */
16888 _ACEOF
16889 cat confdefs.h >>conftest.$ac_ext
16890 cat >>conftest.$ac_ext <<_ACEOF
16891 /* end confdefs.h.  */
16892
16893 /* Override any gcc2 internal prototype to avoid an error.  */
16894 #ifdef __cplusplus
16895 extern "C"
16896 #endif
16897 /* We use char because int might match the return type of a gcc2
16898    builtin and then its argument prototype would still apply.  */
16899 char uview_direction_d ();
16900 int
16901 main ()
16902 {
16903 uview_direction_d ();
16904   ;
16905   return 0;
16906 }
16907 _ACEOF
16908 rm -f conftest.$ac_objext conftest$ac_exeext
16909 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16910   (eval $ac_link) 2>conftest.er1
16911   ac_status=$?
16912   grep -v '^ *+' conftest.er1 >conftest.err
16913   rm -f conftest.er1
16914   cat conftest.err >&5
16915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16916   (exit $ac_status); } &&
16917          { ac_try='test -z "$ac_c_werror_flag"
16918                          || test ! -s conftest.err'
16919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16920   (eval $ac_try) 2>&5
16921   ac_status=$?
16922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16923   (exit $ac_status); }; } &&
16924          { ac_try='test -s conftest$ac_exeext'
16925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16926   (eval $ac_try) 2>&5
16927   ac_status=$?
16928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16929   (exit $ac_status); }; }; then
16930   ac_cv_lib_matrix_uview_direction_d=yes
16931 else
16932   echo "$as_me: failed program was:" >&5
16933 sed 's/^/| /' conftest.$ac_ext >&5
16934
16935 ac_cv_lib_matrix_uview_direction_d=no
16936 fi
16937 rm -f conftest.err conftest.$ac_objext \
16938       conftest$ac_exeext conftest.$ac_ext
16939 LIBS=$ac_check_lib_save_LIBS
16940 fi
16941 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
16942 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
16943 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
16944   have_gle=yes; gle_halfassed=no;
16945                       GLE_LIBS="$GLE_LIBS -lmatrix"
16946 fi
16947
16948   CPPFLAGS="$ac_save_CPPFLAGS"
16949   LDFLAGS="$ac_save_LDFLAGS"
16950 #  LIBS="$ac_save_LIBS"
16951
16952     fi
16953   fi
16954
16955   if test "$have_gle" = yes ; then
16956     cat >>confdefs.h <<\_ACEOF
16957 #define HAVE_GLE 1
16958 _ACEOF
16959
16960     if test "$have_gle3" = yes ; then
16961       cat >>confdefs.h <<\_ACEOF
16962 #define HAVE_GLE3 1
16963 _ACEOF
16964
16965     fi
16966   fi
16967
16968 elif test "$with_gle" != no; then
16969   echo "error: must be yes or no: --with-gle=$with_gle"
16970   exit 1
16971
16972 fi
16973
16974
16975 ###############################################################################
16976 #
16977 #       Check for -lgdk_pixbuf.
16978 #       These tests are for gdk_pixbuf usage of the hacks,
16979 #       not xscreensaver-demo (thus we have to test again to get
16980 #       the libraries right: don't want to pull in all of GTK
16981 #       for the hacks.)
16982 #
16983 ###############################################################################
16984
16985 have_gdk_pixbuf=no
16986 with_gdk_pixbuf_req=unspecified
16987
16988 # Check whether --with-pixbuf or --without-pixbuf was given.
16989 if test "${with_pixbuf+set}" = set; then
16990   withval="$with_pixbuf"
16991   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
16992 else
16993   with_gdk_pixbuf=yes
16994 fi;
16995
16996 # if --with-pixbuf=/directory/ was specified, remember that directory so that
16997 # we can also look for the `gdk-pixbuf-config' program in that directory.
16998 case "$with_gdk_pixbuf" in
16999   /*)
17000     gdk_pixbuf_dir="$with_gdk_pixbuf"
17001     ;;
17002   *)
17003     gdk_pixbuf_dir=""
17004     ;;
17005 esac
17006
17007
17008    case "$with_gdk_pixbuf" in
17009     yes) ;;
17010     no)  ;;
17011
17012     /*)
17013      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
17014 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
17015      d=$with_gdk_pixbuf/include
17016      if test -d $d; then
17017        X_CFLAGS="-I$d $X_CFLAGS"
17018        echo "$as_me:$LINENO: result: $d" >&5
17019 echo "${ECHO_T}$d" >&6
17020      else
17021        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17022 echo "${ECHO_T}not found ($d: no such directory)" >&6
17023      fi
17024
17025      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
17026 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
17027      d=$with_gdk_pixbuf/lib
17028      if test -d $d; then
17029        X_LIBS="-L$d $X_LIBS"
17030        echo "$as_me:$LINENO: result: $d" >&5
17031 echo "${ECHO_T}$d" >&6
17032      else
17033        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17034 echo "${ECHO_T}not found ($d: no such directory)" >&6
17035      fi
17036
17037      # replace the directory string with "yes".
17038      with_gdk_pixbuf_req="yes"
17039      with_gdk_pixbuf=$with_gdk_pixbuf_req
17040      ;;
17041
17042     *)
17043      echo ""
17044      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
17045      echo "       If it is a directory, then \`DIR/include' will be added to"
17046      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17047      exit 1
17048      ;;
17049    esac
17050
17051
17052 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
17053   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
17054   exit 1
17055 fi
17056
17057 if test "$with_gdk_pixbuf" = yes; then
17058   have_gdk_pixbuf=no
17059
17060   pkgs=''
17061   ok="yes"
17062
17063   pkg_check_version gdk-pixbuf-2.0      2.0.0
17064   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
17065   have_gdk_pixbuf="$ok"
17066
17067   if test "$have_gdk_pixbuf" = yes; then
17068     echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
17069 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
17070 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
17071   echo $ECHO_N "(cached) $ECHO_C" >&6
17072 else
17073   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
17074 fi
17075 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
17076 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
17077     echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
17078 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
17079 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
17080   echo $ECHO_N "(cached) $ECHO_C" >&6
17081 else
17082   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
17083 fi
17084 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
17085 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
17086   fi
17087
17088   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
17089   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
17090
17091
17092   if test "$have_gdk_pixbuf" = yes; then
17093     #
17094     # we appear to have pixbuf; check for headers/libs to be sure.
17095     #
17096     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
17097     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
17098
17099     have_gdk_pixbuf=no
17100
17101     # check for header A...
17102
17103   ac_save_CPPFLAGS="$CPPFLAGS"
17104   if test \! -z "$includedir" ; then
17105     CPPFLAGS="$CPPFLAGS -I$includedir"
17106   fi
17107   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17108   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17109   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17110 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
17111 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17112   echo $ECHO_N "(cached) $ECHO_C" >&6
17113 fi
17114 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17115 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
17116 else
17117   # Is the header compilable?
17118 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
17119 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
17120 cat >conftest.$ac_ext <<_ACEOF
17121 /* confdefs.h.  */
17122 _ACEOF
17123 cat confdefs.h >>conftest.$ac_ext
17124 cat >>conftest.$ac_ext <<_ACEOF
17125 /* end confdefs.h.  */
17126 $ac_includes_default
17127 #include <gdk-pixbuf/gdk-pixbuf.h>
17128 _ACEOF
17129 rm -f conftest.$ac_objext
17130 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17131   (eval $ac_compile) 2>conftest.er1
17132   ac_status=$?
17133   grep -v '^ *+' conftest.er1 >conftest.err
17134   rm -f conftest.er1
17135   cat conftest.err >&5
17136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17137   (exit $ac_status); } &&
17138          { ac_try='test -z "$ac_c_werror_flag"
17139                          || test ! -s conftest.err'
17140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17141   (eval $ac_try) 2>&5
17142   ac_status=$?
17143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17144   (exit $ac_status); }; } &&
17145          { ac_try='test -s conftest.$ac_objext'
17146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17147   (eval $ac_try) 2>&5
17148   ac_status=$?
17149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17150   (exit $ac_status); }; }; then
17151   ac_header_compiler=yes
17152 else
17153   echo "$as_me: failed program was:" >&5
17154 sed 's/^/| /' conftest.$ac_ext >&5
17155
17156 ac_header_compiler=no
17157 fi
17158 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17159 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17160 echo "${ECHO_T}$ac_header_compiler" >&6
17161
17162 # Is the header present?
17163 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
17164 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
17165 cat >conftest.$ac_ext <<_ACEOF
17166 /* confdefs.h.  */
17167 _ACEOF
17168 cat confdefs.h >>conftest.$ac_ext
17169 cat >>conftest.$ac_ext <<_ACEOF
17170 /* end confdefs.h.  */
17171 #include <gdk-pixbuf/gdk-pixbuf.h>
17172 _ACEOF
17173 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17174   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17175   ac_status=$?
17176   grep -v '^ *+' conftest.er1 >conftest.err
17177   rm -f conftest.er1
17178   cat conftest.err >&5
17179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17180   (exit $ac_status); } >/dev/null; then
17181   if test -s conftest.err; then
17182     ac_cpp_err=$ac_c_preproc_warn_flag
17183     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17184   else
17185     ac_cpp_err=
17186   fi
17187 else
17188   ac_cpp_err=yes
17189 fi
17190 if test -z "$ac_cpp_err"; then
17191   ac_header_preproc=yes
17192 else
17193   echo "$as_me: failed program was:" >&5
17194 sed 's/^/| /' conftest.$ac_ext >&5
17195
17196   ac_header_preproc=no
17197 fi
17198 rm -f conftest.err conftest.$ac_ext
17199 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17200 echo "${ECHO_T}$ac_header_preproc" >&6
17201
17202 # So?  What about this header?
17203 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17204   yes:no: )
17205     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
17206 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17207     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
17208 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
17209     ac_header_preproc=yes
17210     ;;
17211   no:yes:* )
17212     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
17213 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
17214     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
17215 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
17216     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
17217 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
17218     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
17219 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17220     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
17221 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
17222     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
17223 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
17224     (
17225       cat <<\_ASBOX
17226 ## ------------------------------------------ ##
17227 ## Report this to the AC_PACKAGE_NAME lists.  ##
17228 ## ------------------------------------------ ##
17229 _ASBOX
17230     ) |
17231       sed "s/^/$as_me: WARNING:     /" >&2
17232     ;;
17233 esac
17234 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17235 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
17236 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17237   echo $ECHO_N "(cached) $ECHO_C" >&6
17238 else
17239   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
17240 fi
17241 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17242 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
17243
17244 fi
17245 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
17246   have_gdk_pixbuf=yes
17247 fi
17248
17249
17250   CPPFLAGS="$ac_save_CPPFLAGS"
17251
17252     # if that worked, check for header B...
17253     if test "$have_gdk_pixbuf" = yes; then
17254       have_gdk_pixbuf=no
17255       gdk_pixbuf_halfassed=yes
17256
17257   ac_save_CPPFLAGS="$CPPFLAGS"
17258   if test \! -z "$includedir" ; then
17259     CPPFLAGS="$CPPFLAGS -I$includedir"
17260   fi
17261   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17262   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17263   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17264 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17265 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17266   echo $ECHO_N "(cached) $ECHO_C" >&6
17267 fi
17268 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17269 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
17270 else
17271   # Is the header compilable?
17272 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
17273 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
17274 cat >conftest.$ac_ext <<_ACEOF
17275 /* confdefs.h.  */
17276 _ACEOF
17277 cat confdefs.h >>conftest.$ac_ext
17278 cat >>conftest.$ac_ext <<_ACEOF
17279 /* end confdefs.h.  */
17280 $ac_includes_default
17281 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17282 _ACEOF
17283 rm -f conftest.$ac_objext
17284 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17285   (eval $ac_compile) 2>conftest.er1
17286   ac_status=$?
17287   grep -v '^ *+' conftest.er1 >conftest.err
17288   rm -f conftest.er1
17289   cat conftest.err >&5
17290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17291   (exit $ac_status); } &&
17292          { ac_try='test -z "$ac_c_werror_flag"
17293                          || test ! -s conftest.err'
17294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17295   (eval $ac_try) 2>&5
17296   ac_status=$?
17297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17298   (exit $ac_status); }; } &&
17299          { ac_try='test -s conftest.$ac_objext'
17300   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17301   (eval $ac_try) 2>&5
17302   ac_status=$?
17303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17304   (exit $ac_status); }; }; then
17305   ac_header_compiler=yes
17306 else
17307   echo "$as_me: failed program was:" >&5
17308 sed 's/^/| /' conftest.$ac_ext >&5
17309
17310 ac_header_compiler=no
17311 fi
17312 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17313 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17314 echo "${ECHO_T}$ac_header_compiler" >&6
17315
17316 # Is the header present?
17317 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
17318 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
17319 cat >conftest.$ac_ext <<_ACEOF
17320 /* confdefs.h.  */
17321 _ACEOF
17322 cat confdefs.h >>conftest.$ac_ext
17323 cat >>conftest.$ac_ext <<_ACEOF
17324 /* end confdefs.h.  */
17325 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17326 _ACEOF
17327 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17328   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17329   ac_status=$?
17330   grep -v '^ *+' conftest.er1 >conftest.err
17331   rm -f conftest.er1
17332   cat conftest.err >&5
17333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17334   (exit $ac_status); } >/dev/null; then
17335   if test -s conftest.err; then
17336     ac_cpp_err=$ac_c_preproc_warn_flag
17337     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17338   else
17339     ac_cpp_err=
17340   fi
17341 else
17342   ac_cpp_err=yes
17343 fi
17344 if test -z "$ac_cpp_err"; then
17345   ac_header_preproc=yes
17346 else
17347   echo "$as_me: failed program was:" >&5
17348 sed 's/^/| /' conftest.$ac_ext >&5
17349
17350   ac_header_preproc=no
17351 fi
17352 rm -f conftest.err conftest.$ac_ext
17353 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17354 echo "${ECHO_T}$ac_header_preproc" >&6
17355
17356 # So?  What about this header?
17357 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17358   yes:no: )
17359     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17360 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17361     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17362 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17363     ac_header_preproc=yes
17364     ;;
17365   no:yes:* )
17366     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17367 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17368     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17369 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17370     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17371 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17372     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17373 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17374     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17375 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17376     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17377 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17378     (
17379       cat <<\_ASBOX
17380 ## ------------------------------------------ ##
17381 ## Report this to the AC_PACKAGE_NAME lists.  ##
17382 ## ------------------------------------------ ##
17383 _ASBOX
17384     ) |
17385       sed "s/^/$as_me: WARNING:     /" >&2
17386     ;;
17387 esac
17388 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17389 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17390 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17391   echo $ECHO_N "(cached) $ECHO_C" >&6
17392 else
17393   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
17394 fi
17395 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17396 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
17397
17398 fi
17399 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
17400   have_gdk_pixbuf=yes
17401                          gdk_pixbuf_halfassed=no
17402 fi
17403
17404
17405   CPPFLAGS="$ac_save_CPPFLAGS"
17406
17407       # yay, it has a new name in Gtk 2.x...
17408       if test "$have_gdk_pixbuf" = no; then
17409         have_gdk_pixbuf=no
17410         gdk_pixbuf_halfassed=yes
17411
17412   ac_save_CPPFLAGS="$CPPFLAGS"
17413   if test \! -z "$includedir" ; then
17414     CPPFLAGS="$CPPFLAGS -I$includedir"
17415   fi
17416   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17417   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17418   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17419 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17420 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17421   echo $ECHO_N "(cached) $ECHO_C" >&6
17422 fi
17423 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17424 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
17425 else
17426   # Is the header compilable?
17427 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
17428 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
17429 cat >conftest.$ac_ext <<_ACEOF
17430 /* confdefs.h.  */
17431 _ACEOF
17432 cat confdefs.h >>conftest.$ac_ext
17433 cat >>conftest.$ac_ext <<_ACEOF
17434 /* end confdefs.h.  */
17435 $ac_includes_default
17436 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17437 _ACEOF
17438 rm -f conftest.$ac_objext
17439 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17440   (eval $ac_compile) 2>conftest.er1
17441   ac_status=$?
17442   grep -v '^ *+' conftest.er1 >conftest.err
17443   rm -f conftest.er1
17444   cat conftest.err >&5
17445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17446   (exit $ac_status); } &&
17447          { ac_try='test -z "$ac_c_werror_flag"
17448                          || test ! -s conftest.err'
17449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17450   (eval $ac_try) 2>&5
17451   ac_status=$?
17452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17453   (exit $ac_status); }; } &&
17454          { ac_try='test -s conftest.$ac_objext'
17455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17456   (eval $ac_try) 2>&5
17457   ac_status=$?
17458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17459   (exit $ac_status); }; }; then
17460   ac_header_compiler=yes
17461 else
17462   echo "$as_me: failed program was:" >&5
17463 sed 's/^/| /' conftest.$ac_ext >&5
17464
17465 ac_header_compiler=no
17466 fi
17467 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17468 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17469 echo "${ECHO_T}$ac_header_compiler" >&6
17470
17471 # Is the header present?
17472 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
17473 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
17474 cat >conftest.$ac_ext <<_ACEOF
17475 /* confdefs.h.  */
17476 _ACEOF
17477 cat confdefs.h >>conftest.$ac_ext
17478 cat >>conftest.$ac_ext <<_ACEOF
17479 /* end confdefs.h.  */
17480 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17481 _ACEOF
17482 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17483   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17484   ac_status=$?
17485   grep -v '^ *+' conftest.er1 >conftest.err
17486   rm -f conftest.er1
17487   cat conftest.err >&5
17488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17489   (exit $ac_status); } >/dev/null; then
17490   if test -s conftest.err; then
17491     ac_cpp_err=$ac_c_preproc_warn_flag
17492     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17493   else
17494     ac_cpp_err=
17495   fi
17496 else
17497   ac_cpp_err=yes
17498 fi
17499 if test -z "$ac_cpp_err"; then
17500   ac_header_preproc=yes
17501 else
17502   echo "$as_me: failed program was:" >&5
17503 sed 's/^/| /' conftest.$ac_ext >&5
17504
17505   ac_header_preproc=no
17506 fi
17507 rm -f conftest.err conftest.$ac_ext
17508 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17509 echo "${ECHO_T}$ac_header_preproc" >&6
17510
17511 # So?  What about this header?
17512 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17513   yes:no: )
17514     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17515 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17516     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17517 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17518     ac_header_preproc=yes
17519     ;;
17520   no:yes:* )
17521     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17522 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17523     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17524 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17525     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17526 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17527     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17528 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17529     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17530 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17531     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17532 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17533     (
17534       cat <<\_ASBOX
17535 ## ------------------------------------------ ##
17536 ## Report this to the AC_PACKAGE_NAME lists.  ##
17537 ## ------------------------------------------ ##
17538 _ASBOX
17539     ) |
17540       sed "s/^/$as_me: WARNING:     /" >&2
17541     ;;
17542 esac
17543 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17544 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17545 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17546   echo $ECHO_N "(cached) $ECHO_C" >&6
17547 else
17548   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
17549 fi
17550 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17551 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
17552
17553 fi
17554 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
17555   have_gdk_pixbuf=yes
17556                            gdk_pixbuf_halfassed=no
17557 fi
17558
17559
17560   CPPFLAGS="$ac_save_CPPFLAGS"
17561       fi
17562     fi
17563     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
17564   fi
17565
17566   if test "$have_gdk_pixbuf" = yes; then
17567     # we have the headers, now check for the libraries
17568     have_gdk_pixbuf=no
17569     gdk_pixbuf_halfassed=yes
17570
17571     echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
17572 echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6
17573
17574     # library A...
17575
17576   ac_save_CPPFLAGS="$CPPFLAGS"
17577   ac_save_LDFLAGS="$LDFLAGS"
17578 #  ac_save_LIBS="$LIBS"
17579
17580   if test \! -z "$includedir" ; then
17581     CPPFLAGS="$CPPFLAGS -I$includedir"
17582   fi
17583   # note: $X_CFLAGS includes $x_includes
17584   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17585
17586   if test \! -z "$libdir" ; then
17587     LDFLAGS="$LDFLAGS -L$libdir"
17588   fi
17589   # note: $X_LIBS includes $x_libraries
17590   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17591
17592   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
17593 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
17594 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
17595   echo $ECHO_N "(cached) $ECHO_C" >&6
17596 else
17597   ac_check_lib_save_LIBS=$LIBS
17598 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17599 cat >conftest.$ac_ext <<_ACEOF
17600 /* confdefs.h.  */
17601 _ACEOF
17602 cat confdefs.h >>conftest.$ac_ext
17603 cat >>conftest.$ac_ext <<_ACEOF
17604 /* end confdefs.h.  */
17605
17606 /* Override any gcc2 internal prototype to avoid an error.  */
17607 #ifdef __cplusplus
17608 extern "C"
17609 #endif
17610 /* We use char because int might match the return type of a gcc2
17611    builtin and then its argument prototype would still apply.  */
17612 char gdk_pixbuf_new_from_file ();
17613 int
17614 main ()
17615 {
17616 gdk_pixbuf_new_from_file ();
17617   ;
17618   return 0;
17619 }
17620 _ACEOF
17621 rm -f conftest.$ac_objext conftest$ac_exeext
17622 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17623   (eval $ac_link) 2>conftest.er1
17624   ac_status=$?
17625   grep -v '^ *+' conftest.er1 >conftest.err
17626   rm -f conftest.er1
17627   cat conftest.err >&5
17628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17629   (exit $ac_status); } &&
17630          { ac_try='test -z "$ac_c_werror_flag"
17631                          || test ! -s conftest.err'
17632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17633   (eval $ac_try) 2>&5
17634   ac_status=$?
17635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17636   (exit $ac_status); }; } &&
17637          { ac_try='test -s conftest$ac_exeext'
17638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17639   (eval $ac_try) 2>&5
17640   ac_status=$?
17641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17642   (exit $ac_status); }; }; then
17643   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
17644 else
17645   echo "$as_me: failed program was:" >&5
17646 sed 's/^/| /' conftest.$ac_ext >&5
17647
17648 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
17649 fi
17650 rm -f conftest.err conftest.$ac_objext \
17651       conftest$ac_exeext conftest.$ac_ext
17652 LIBS=$ac_check_lib_save_LIBS
17653 fi
17654 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
17655 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
17656 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
17657   have_gdk_pixbuf=yes
17658 fi
17659
17660   CPPFLAGS="$ac_save_CPPFLAGS"
17661   LDFLAGS="$ac_save_LDFLAGS"
17662 #  LIBS="$ac_save_LIBS"
17663
17664     # library B...
17665     if test "$have_gdk_pixbuf" = yes; then
17666       have_gdk_pixbuf=no
17667
17668   ac_save_CPPFLAGS="$CPPFLAGS"
17669   ac_save_LDFLAGS="$LDFLAGS"
17670 #  ac_save_LIBS="$LIBS"
17671
17672   if test \! -z "$includedir" ; then
17673     CPPFLAGS="$CPPFLAGS -I$includedir"
17674   fi
17675   # note: $X_CFLAGS includes $x_includes
17676   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17677
17678   if test \! -z "$libdir" ; then
17679     LDFLAGS="$LDFLAGS -L$libdir"
17680   fi
17681   # note: $X_LIBS includes $x_libraries
17682   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17683
17684   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
17685 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
17686 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
17687   echo $ECHO_N "(cached) $ECHO_C" >&6
17688 else
17689   ac_check_lib_save_LIBS=$LIBS
17690 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17691 cat >conftest.$ac_ext <<_ACEOF
17692 /* confdefs.h.  */
17693 _ACEOF
17694 cat confdefs.h >>conftest.$ac_ext
17695 cat >>conftest.$ac_ext <<_ACEOF
17696 /* end confdefs.h.  */
17697
17698 /* Override any gcc2 internal prototype to avoid an error.  */
17699 #ifdef __cplusplus
17700 extern "C"
17701 #endif
17702 /* We use char because int might match the return type of a gcc2
17703    builtin and then its argument prototype would still apply.  */
17704 char gdk_pixbuf_xlib_init ();
17705 int
17706 main ()
17707 {
17708 gdk_pixbuf_xlib_init ();
17709   ;
17710   return 0;
17711 }
17712 _ACEOF
17713 rm -f conftest.$ac_objext conftest$ac_exeext
17714 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17715   (eval $ac_link) 2>conftest.er1
17716   ac_status=$?
17717   grep -v '^ *+' conftest.er1 >conftest.err
17718   rm -f conftest.er1
17719   cat conftest.err >&5
17720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17721   (exit $ac_status); } &&
17722          { ac_try='test -z "$ac_c_werror_flag"
17723                          || test ! -s conftest.err'
17724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17725   (eval $ac_try) 2>&5
17726   ac_status=$?
17727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17728   (exit $ac_status); }; } &&
17729          { ac_try='test -s conftest$ac_exeext'
17730   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17731   (eval $ac_try) 2>&5
17732   ac_status=$?
17733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17734   (exit $ac_status); }; }; then
17735   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
17736 else
17737   echo "$as_me: failed program was:" >&5
17738 sed 's/^/| /' conftest.$ac_ext >&5
17739
17740 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
17741 fi
17742 rm -f conftest.err conftest.$ac_objext \
17743       conftest$ac_exeext conftest.$ac_ext
17744 LIBS=$ac_check_lib_save_LIBS
17745 fi
17746 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
17747 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
17748 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
17749   have_gdk_pixbuf=yes
17750                       gdk_pixbuf_halfassed=no
17751 fi
17752
17753   CPPFLAGS="$ac_save_CPPFLAGS"
17754   LDFLAGS="$ac_save_LDFLAGS"
17755 #  LIBS="$ac_save_LIBS"
17756
17757     fi
17758   fi
17759
17760   if test "$have_gdk_pixbuf" = yes; then
17761     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
17762     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
17763     cat >>confdefs.h <<\_ACEOF
17764 #define HAVE_GDK_PIXBUF 1
17765 _ACEOF
17766
17767   else
17768     echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
17769 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6
17770   fi
17771 fi
17772
17773
17774 ###############################################################################
17775 #
17776 #       Check for -lXpm.
17777 #
17778 ###############################################################################
17779
17780 have_xpm=no
17781 with_xpm_req=unspecified
17782
17783 # Check whether --with-xpm or --without-xpm was given.
17784 if test "${with_xpm+set}" = set; then
17785   withval="$with_xpm"
17786   with_xpm="$withval"; with_xpm_req="$withval"
17787 else
17788   with_xpm=yes
17789 fi;
17790
17791
17792    case "$with_xpm" in
17793     yes) ;;
17794     no)  ;;
17795
17796     /*)
17797      echo "$as_me:$LINENO: checking for XPM headers" >&5
17798 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
17799      d=$with_xpm/include
17800      if test -d $d; then
17801        X_CFLAGS="-I$d $X_CFLAGS"
17802        echo "$as_me:$LINENO: result: $d" >&5
17803 echo "${ECHO_T}$d" >&6
17804      else
17805        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17806 echo "${ECHO_T}not found ($d: no such directory)" >&6
17807      fi
17808
17809      echo "$as_me:$LINENO: checking for XPM libs" >&5
17810 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
17811      d=$with_xpm/lib
17812      if test -d $d; then
17813        X_LIBS="-L$d $X_LIBS"
17814        echo "$as_me:$LINENO: result: $d" >&5
17815 echo "${ECHO_T}$d" >&6
17816      else
17817        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17818 echo "${ECHO_T}not found ($d: no such directory)" >&6
17819      fi
17820
17821      # replace the directory string with "yes".
17822      with_xpm_req="yes"
17823      with_xpm=$with_xpm_req
17824      ;;
17825
17826     *)
17827      echo ""
17828      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
17829      echo "       If it is a directory, then \`DIR/include' will be added to"
17830      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17831      exit 1
17832      ;;
17833    esac
17834
17835
17836 if test "$with_xpm" = yes; then
17837
17838   ac_save_CPPFLAGS="$CPPFLAGS"
17839   if test \! -z "$includedir" ; then
17840     CPPFLAGS="$CPPFLAGS -I$includedir"
17841   fi
17842   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17843   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
17844 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
17845 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
17846   echo $ECHO_N "(cached) $ECHO_C" >&6
17847 else
17848   cat >conftest.$ac_ext <<_ACEOF
17849 /* confdefs.h.  */
17850 _ACEOF
17851 cat confdefs.h >>conftest.$ac_ext
17852 cat >>conftest.$ac_ext <<_ACEOF
17853 /* end confdefs.h.  */
17854 #include <X11/Xlib.h>
17855
17856 #include <X11/xpm.h>
17857 _ACEOF
17858 rm -f conftest.$ac_objext
17859 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17860   (eval $ac_compile) 2>conftest.er1
17861   ac_status=$?
17862   grep -v '^ *+' conftest.er1 >conftest.err
17863   rm -f conftest.er1
17864   cat conftest.err >&5
17865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17866   (exit $ac_status); } &&
17867          { ac_try='test -z "$ac_c_werror_flag"
17868                          || test ! -s conftest.err'
17869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17870   (eval $ac_try) 2>&5
17871   ac_status=$?
17872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17873   (exit $ac_status); }; } &&
17874          { ac_try='test -s conftest.$ac_objext'
17875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17876   (eval $ac_try) 2>&5
17877   ac_status=$?
17878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17879   (exit $ac_status); }; }; then
17880   ac_cv_header_X11_xpm_h=yes
17881 else
17882   echo "$as_me: failed program was:" >&5
17883 sed 's/^/| /' conftest.$ac_ext >&5
17884
17885 ac_cv_header_X11_xpm_h=no
17886 fi
17887 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17888 fi
17889 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
17890 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
17891 if test $ac_cv_header_X11_xpm_h = yes; then
17892   have_xpm=yes
17893                     cat >>confdefs.h <<\_ACEOF
17894 #define HAVE_XPM 1
17895 _ACEOF
17896
17897                     XPM_LIBS="-lXpm $XPM_LIBS"
17898 fi
17899
17900
17901   CPPFLAGS="$ac_save_CPPFLAGS"
17902 elif test "$with_xpm" != no; then
17903   echo "error: must be yes or no: --with-xpm=$with_xpm"
17904   exit 1
17905 fi
17906
17907 # See comment near $motif_requires_xpm, above.
17908 # Need to do this here, after both Motif and XPM have been checked for.
17909 #
17910 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
17911   if test "$motif_requires_xpm" = yes ; then
17912     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
17913   fi
17914 fi
17915
17916 if test "$XPM_LIBS" = "" ; then
17917   XPM_LIBS=$(MINIXPM)
17918 fi
17919
17920
17921 ###############################################################################
17922 #
17923 #       Check for -ljpeg
17924 #
17925 ###############################################################################
17926
17927 have_jpeg=no
17928 with_jpeg_req=unspecified
17929 jpeg_halfassed=no
17930
17931 # Check whether --with-jpeg or --without-jpeg was given.
17932 if test "${with_jpeg+set}" = set; then
17933   withval="$with_jpeg"
17934   with_jpeg="$withval"; with_jpeg_req="$withval"
17935 else
17936   with_jpeg=yes
17937 fi;
17938
17939
17940    case "$with_jpeg" in
17941     yes) ;;
17942     no)  ;;
17943
17944     /*)
17945      echo "$as_me:$LINENO: checking for JPEG headers" >&5
17946 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
17947      d=$with_jpeg/include
17948      if test -d $d; then
17949        X_CFLAGS="-I$d $X_CFLAGS"
17950        echo "$as_me:$LINENO: result: $d" >&5
17951 echo "${ECHO_T}$d" >&6
17952      else
17953        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17954 echo "${ECHO_T}not found ($d: no such directory)" >&6
17955      fi
17956
17957      echo "$as_me:$LINENO: checking for JPEG libs" >&5
17958 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
17959      d=$with_jpeg/lib
17960      if test -d $d; then
17961        X_LIBS="-L$d $X_LIBS"
17962        echo "$as_me:$LINENO: result: $d" >&5
17963 echo "${ECHO_T}$d" >&6
17964      else
17965        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17966 echo "${ECHO_T}not found ($d: no such directory)" >&6
17967      fi
17968
17969      # replace the directory string with "yes".
17970      with_jpeg_req="yes"
17971      with_jpeg=$with_jpeg_req
17972      ;;
17973
17974     *)
17975      echo ""
17976      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
17977      echo "       If it is a directory, then \`DIR/include' will be added to"
17978      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17979      exit 1
17980      ;;
17981    esac
17982
17983
17984 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
17985   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
17986   exit 1
17987 fi
17988
17989 if test "$with_jpeg" = yes; then
17990
17991   have_jpeg=no
17992
17993   ac_save_CPPFLAGS="$CPPFLAGS"
17994   if test \! -z "$includedir" ; then
17995     CPPFLAGS="$CPPFLAGS -I$includedir"
17996   fi
17997   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17998   if test "${ac_cv_header_jpeglib_h+set}" = set; then
17999   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18000 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
18001 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18002   echo $ECHO_N "(cached) $ECHO_C" >&6
18003 fi
18004 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18005 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
18006 else
18007   # Is the header compilable?
18008 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
18009 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
18010 cat >conftest.$ac_ext <<_ACEOF
18011 /* confdefs.h.  */
18012 _ACEOF
18013 cat confdefs.h >>conftest.$ac_ext
18014 cat >>conftest.$ac_ext <<_ACEOF
18015 /* end confdefs.h.  */
18016 $ac_includes_default
18017 #include <jpeglib.h>
18018 _ACEOF
18019 rm -f conftest.$ac_objext
18020 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18021   (eval $ac_compile) 2>conftest.er1
18022   ac_status=$?
18023   grep -v '^ *+' conftest.er1 >conftest.err
18024   rm -f conftest.er1
18025   cat conftest.err >&5
18026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18027   (exit $ac_status); } &&
18028          { ac_try='test -z "$ac_c_werror_flag"
18029                          || test ! -s conftest.err'
18030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18031   (eval $ac_try) 2>&5
18032   ac_status=$?
18033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18034   (exit $ac_status); }; } &&
18035          { ac_try='test -s conftest.$ac_objext'
18036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18037   (eval $ac_try) 2>&5
18038   ac_status=$?
18039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18040   (exit $ac_status); }; }; then
18041   ac_header_compiler=yes
18042 else
18043   echo "$as_me: failed program was:" >&5
18044 sed 's/^/| /' conftest.$ac_ext >&5
18045
18046 ac_header_compiler=no
18047 fi
18048 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18049 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18050 echo "${ECHO_T}$ac_header_compiler" >&6
18051
18052 # Is the header present?
18053 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
18054 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
18055 cat >conftest.$ac_ext <<_ACEOF
18056 /* confdefs.h.  */
18057 _ACEOF
18058 cat confdefs.h >>conftest.$ac_ext
18059 cat >>conftest.$ac_ext <<_ACEOF
18060 /* end confdefs.h.  */
18061 #include <jpeglib.h>
18062 _ACEOF
18063 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18064   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18065   ac_status=$?
18066   grep -v '^ *+' conftest.er1 >conftest.err
18067   rm -f conftest.er1
18068   cat conftest.err >&5
18069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18070   (exit $ac_status); } >/dev/null; then
18071   if test -s conftest.err; then
18072     ac_cpp_err=$ac_c_preproc_warn_flag
18073     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18074   else
18075     ac_cpp_err=
18076   fi
18077 else
18078   ac_cpp_err=yes
18079 fi
18080 if test -z "$ac_cpp_err"; then
18081   ac_header_preproc=yes
18082 else
18083   echo "$as_me: failed program was:" >&5
18084 sed 's/^/| /' conftest.$ac_ext >&5
18085
18086   ac_header_preproc=no
18087 fi
18088 rm -f conftest.err conftest.$ac_ext
18089 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18090 echo "${ECHO_T}$ac_header_preproc" >&6
18091
18092 # So?  What about this header?
18093 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18094   yes:no: )
18095     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18096 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18097     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
18098 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
18099     ac_header_preproc=yes
18100     ;;
18101   no:yes:* )
18102     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
18103 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
18104     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
18105 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
18106     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
18107 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
18108     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
18109 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18110     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
18111 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
18112     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
18113 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
18114     (
18115       cat <<\_ASBOX
18116 ## ------------------------------------------ ##
18117 ## Report this to the AC_PACKAGE_NAME lists.  ##
18118 ## ------------------------------------------ ##
18119 _ASBOX
18120     ) |
18121       sed "s/^/$as_me: WARNING:     /" >&2
18122     ;;
18123 esac
18124 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18125 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
18126 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18127   echo $ECHO_N "(cached) $ECHO_C" >&6
18128 else
18129   ac_cv_header_jpeglib_h=$ac_header_preproc
18130 fi
18131 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18132 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
18133
18134 fi
18135 if test $ac_cv_header_jpeglib_h = yes; then
18136   have_jpeg=yes
18137 fi
18138
18139
18140   CPPFLAGS="$ac_save_CPPFLAGS"
18141
18142   if test "$have_jpeg" = yes; then
18143     # we have the header, now check for the library
18144     have_jpeg=no
18145     jpeg_halfassed=yes
18146
18147   ac_save_CPPFLAGS="$CPPFLAGS"
18148   ac_save_LDFLAGS="$LDFLAGS"
18149 #  ac_save_LIBS="$LIBS"
18150
18151   if test \! -z "$includedir" ; then
18152     CPPFLAGS="$CPPFLAGS -I$includedir"
18153   fi
18154   # note: $X_CFLAGS includes $x_includes
18155   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18156
18157   if test \! -z "$libdir" ; then
18158     LDFLAGS="$LDFLAGS -L$libdir"
18159   fi
18160   # note: $X_LIBS includes $x_libraries
18161   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18162
18163   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
18164 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
18165 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
18166   echo $ECHO_N "(cached) $ECHO_C" >&6
18167 else
18168   ac_check_lib_save_LIBS=$LIBS
18169 LIBS="-ljpeg  $LIBS"
18170 cat >conftest.$ac_ext <<_ACEOF
18171 /* confdefs.h.  */
18172 _ACEOF
18173 cat confdefs.h >>conftest.$ac_ext
18174 cat >>conftest.$ac_ext <<_ACEOF
18175 /* end confdefs.h.  */
18176
18177 /* Override any gcc2 internal prototype to avoid an error.  */
18178 #ifdef __cplusplus
18179 extern "C"
18180 #endif
18181 /* We use char because int might match the return type of a gcc2
18182    builtin and then its argument prototype would still apply.  */
18183 char jpeg_start_compress ();
18184 int
18185 main ()
18186 {
18187 jpeg_start_compress ();
18188   ;
18189   return 0;
18190 }
18191 _ACEOF
18192 rm -f conftest.$ac_objext conftest$ac_exeext
18193 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18194   (eval $ac_link) 2>conftest.er1
18195   ac_status=$?
18196   grep -v '^ *+' conftest.er1 >conftest.err
18197   rm -f conftest.er1
18198   cat conftest.err >&5
18199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18200   (exit $ac_status); } &&
18201          { ac_try='test -z "$ac_c_werror_flag"
18202                          || test ! -s conftest.err'
18203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18204   (eval $ac_try) 2>&5
18205   ac_status=$?
18206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18207   (exit $ac_status); }; } &&
18208          { ac_try='test -s conftest$ac_exeext'
18209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18210   (eval $ac_try) 2>&5
18211   ac_status=$?
18212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18213   (exit $ac_status); }; }; then
18214   ac_cv_lib_jpeg_jpeg_start_compress=yes
18215 else
18216   echo "$as_me: failed program was:" >&5
18217 sed 's/^/| /' conftest.$ac_ext >&5
18218
18219 ac_cv_lib_jpeg_jpeg_start_compress=no
18220 fi
18221 rm -f conftest.err conftest.$ac_objext \
18222       conftest$ac_exeext conftest.$ac_ext
18223 LIBS=$ac_check_lib_save_LIBS
18224 fi
18225 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
18226 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
18227 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
18228   have_jpeg=yes
18229                     jpeg_halfassed=no
18230                     JPEG_LIBS="-ljpeg"
18231                     cat >>confdefs.h <<\_ACEOF
18232 #define HAVE_JPEGLIB 1
18233 _ACEOF
18234
18235 fi
18236
18237   CPPFLAGS="$ac_save_CPPFLAGS"
18238   LDFLAGS="$ac_save_LDFLAGS"
18239 #  LIBS="$ac_save_LIBS"
18240
18241   fi
18242 fi
18243
18244
18245 ###############################################################################
18246 #
18247 #       Check for pty support: this allows 'phosphor' and 'apple2'
18248 #       to run curses-based programs, or be used as terminal windows.
18249 #
18250 ###############################################################################
18251
18252 PTY_LIBS=
18253
18254
18255 for ac_header in pty.h util.h
18256 do
18257 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18258 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18259   echo "$as_me:$LINENO: checking for $ac_header" >&5
18260 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18261 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18262   echo $ECHO_N "(cached) $ECHO_C" >&6
18263 fi
18264 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18265 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18266 else
18267   # Is the header compilable?
18268 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18269 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18270 cat >conftest.$ac_ext <<_ACEOF
18271 /* confdefs.h.  */
18272 _ACEOF
18273 cat confdefs.h >>conftest.$ac_ext
18274 cat >>conftest.$ac_ext <<_ACEOF
18275 /* end confdefs.h.  */
18276 $ac_includes_default
18277 #include <$ac_header>
18278 _ACEOF
18279 rm -f conftest.$ac_objext
18280 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18281   (eval $ac_compile) 2>conftest.er1
18282   ac_status=$?
18283   grep -v '^ *+' conftest.er1 >conftest.err
18284   rm -f conftest.er1
18285   cat conftest.err >&5
18286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18287   (exit $ac_status); } &&
18288          { ac_try='test -z "$ac_c_werror_flag"
18289                          || test ! -s conftest.err'
18290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18291   (eval $ac_try) 2>&5
18292   ac_status=$?
18293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18294   (exit $ac_status); }; } &&
18295          { ac_try='test -s conftest.$ac_objext'
18296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18297   (eval $ac_try) 2>&5
18298   ac_status=$?
18299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18300   (exit $ac_status); }; }; then
18301   ac_header_compiler=yes
18302 else
18303   echo "$as_me: failed program was:" >&5
18304 sed 's/^/| /' conftest.$ac_ext >&5
18305
18306 ac_header_compiler=no
18307 fi
18308 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18309 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18310 echo "${ECHO_T}$ac_header_compiler" >&6
18311
18312 # Is the header present?
18313 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18314 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18315 cat >conftest.$ac_ext <<_ACEOF
18316 /* confdefs.h.  */
18317 _ACEOF
18318 cat confdefs.h >>conftest.$ac_ext
18319 cat >>conftest.$ac_ext <<_ACEOF
18320 /* end confdefs.h.  */
18321 #include <$ac_header>
18322 _ACEOF
18323 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18324   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18325   ac_status=$?
18326   grep -v '^ *+' conftest.er1 >conftest.err
18327   rm -f conftest.er1
18328   cat conftest.err >&5
18329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18330   (exit $ac_status); } >/dev/null; then
18331   if test -s conftest.err; then
18332     ac_cpp_err=$ac_c_preproc_warn_flag
18333     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18334   else
18335     ac_cpp_err=
18336   fi
18337 else
18338   ac_cpp_err=yes
18339 fi
18340 if test -z "$ac_cpp_err"; then
18341   ac_header_preproc=yes
18342 else
18343   echo "$as_me: failed program was:" >&5
18344 sed 's/^/| /' conftest.$ac_ext >&5
18345
18346   ac_header_preproc=no
18347 fi
18348 rm -f conftest.err conftest.$ac_ext
18349 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18350 echo "${ECHO_T}$ac_header_preproc" >&6
18351
18352 # So?  What about this header?
18353 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18354   yes:no: )
18355     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18356 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18357     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18358 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18359     ac_header_preproc=yes
18360     ;;
18361   no:yes:* )
18362     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18363 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18364     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18365 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18366     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18367 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18368     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18369 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18370     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18371 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18372     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18373 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18374     (
18375       cat <<\_ASBOX
18376 ## ------------------------------------------ ##
18377 ## Report this to the AC_PACKAGE_NAME lists.  ##
18378 ## ------------------------------------------ ##
18379 _ASBOX
18380     ) |
18381       sed "s/^/$as_me: WARNING:     /" >&2
18382     ;;
18383 esac
18384 echo "$as_me:$LINENO: checking for $ac_header" >&5
18385 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18386 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18387   echo $ECHO_N "(cached) $ECHO_C" >&6
18388 else
18389   eval "$as_ac_Header=\$ac_header_preproc"
18390 fi
18391 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18392 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18393
18394 fi
18395 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18396   cat >>confdefs.h <<_ACEOF
18397 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18398 _ACEOF
18399
18400 fi
18401
18402 done
18403
18404
18405   ac_save_CPPFLAGS="$CPPFLAGS"
18406   ac_save_LDFLAGS="$LDFLAGS"
18407 #  ac_save_LIBS="$LIBS"
18408
18409   if test \! -z "$includedir" ; then
18410     CPPFLAGS="$CPPFLAGS -I$includedir"
18411   fi
18412   # note: $X_CFLAGS includes $x_includes
18413   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18414
18415   if test \! -z "$libdir" ; then
18416     LDFLAGS="$LDFLAGS -L$libdir"
18417   fi
18418   # note: $X_LIBS includes $x_libraries
18419   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18420
18421   echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18422 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
18423 if test "${ac_cv_lib_util_forkpty+set}" = set; then
18424   echo $ECHO_N "(cached) $ECHO_C" >&6
18425 else
18426   ac_check_lib_save_LIBS=$LIBS
18427 LIBS="-lutil  $LIBS"
18428 cat >conftest.$ac_ext <<_ACEOF
18429 /* confdefs.h.  */
18430 _ACEOF
18431 cat confdefs.h >>conftest.$ac_ext
18432 cat >>conftest.$ac_ext <<_ACEOF
18433 /* end confdefs.h.  */
18434
18435 /* Override any gcc2 internal prototype to avoid an error.  */
18436 #ifdef __cplusplus
18437 extern "C"
18438 #endif
18439 /* We use char because int might match the return type of a gcc2
18440    builtin and then its argument prototype would still apply.  */
18441 char forkpty ();
18442 int
18443 main ()
18444 {
18445 forkpty ();
18446   ;
18447   return 0;
18448 }
18449 _ACEOF
18450 rm -f conftest.$ac_objext conftest$ac_exeext
18451 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18452   (eval $ac_link) 2>conftest.er1
18453   ac_status=$?
18454   grep -v '^ *+' conftest.er1 >conftest.err
18455   rm -f conftest.er1
18456   cat conftest.err >&5
18457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18458   (exit $ac_status); } &&
18459          { ac_try='test -z "$ac_c_werror_flag"
18460                          || test ! -s conftest.err'
18461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18462   (eval $ac_try) 2>&5
18463   ac_status=$?
18464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18465   (exit $ac_status); }; } &&
18466          { ac_try='test -s conftest$ac_exeext'
18467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18468   (eval $ac_try) 2>&5
18469   ac_status=$?
18470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18471   (exit $ac_status); }; }; then
18472   ac_cv_lib_util_forkpty=yes
18473 else
18474   echo "$as_me: failed program was:" >&5
18475 sed 's/^/| /' conftest.$ac_ext >&5
18476
18477 ac_cv_lib_util_forkpty=no
18478 fi
18479 rm -f conftest.err conftest.$ac_objext \
18480       conftest$ac_exeext conftest.$ac_ext
18481 LIBS=$ac_check_lib_save_LIBS
18482 fi
18483 echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18484 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
18485 if test $ac_cv_lib_util_forkpty = yes; then
18486   PTY_LIBS="-lutil"
18487                 ac_have_forkpty=yes
18488                 cat >>confdefs.h <<\_ACEOF
18489 #define HAVE_FORKPTY 1
18490 _ACEOF
18491
18492 fi
18493
18494   CPPFLAGS="$ac_save_CPPFLAGS"
18495   LDFLAGS="$ac_save_LDFLAGS"
18496 #  LIBS="$ac_save_LIBS"
18497
18498
18499 if test "$ac_have_forkpty" != yes ; then
18500   # we don't need (or have) -lutil on MacOS 10.4.2...
18501
18502   ac_save_CPPFLAGS="$CPPFLAGS"
18503   ac_save_LDFLAGS="$LDFLAGS"
18504 #  ac_save_LIBS="$LIBS"
18505
18506   if test \! -z "$includedir" ; then
18507     CPPFLAGS="$CPPFLAGS -I$includedir"
18508   fi
18509   # note: $X_CFLAGS includes $x_includes
18510   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18511
18512   if test \! -z "$libdir" ; then
18513     LDFLAGS="$LDFLAGS -L$libdir"
18514   fi
18515   # note: $X_LIBS includes $x_libraries
18516   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18517
18518   echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
18519 echo $ECHO_N "checking for forkpty in -lc... $ECHO_C" >&6
18520 if test "${ac_cv_lib_c_forkpty+set}" = set; then
18521   echo $ECHO_N "(cached) $ECHO_C" >&6
18522 else
18523   ac_check_lib_save_LIBS=$LIBS
18524 LIBS="-lc  $LIBS"
18525 cat >conftest.$ac_ext <<_ACEOF
18526 /* confdefs.h.  */
18527 _ACEOF
18528 cat confdefs.h >>conftest.$ac_ext
18529 cat >>conftest.$ac_ext <<_ACEOF
18530 /* end confdefs.h.  */
18531
18532 /* Override any gcc2 internal prototype to avoid an error.  */
18533 #ifdef __cplusplus
18534 extern "C"
18535 #endif
18536 /* We use char because int might match the return type of a gcc2
18537    builtin and then its argument prototype would still apply.  */
18538 char forkpty ();
18539 int
18540 main ()
18541 {
18542 forkpty ();
18543   ;
18544   return 0;
18545 }
18546 _ACEOF
18547 rm -f conftest.$ac_objext conftest$ac_exeext
18548 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18549   (eval $ac_link) 2>conftest.er1
18550   ac_status=$?
18551   grep -v '^ *+' conftest.er1 >conftest.err
18552   rm -f conftest.er1
18553   cat conftest.err >&5
18554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18555   (exit $ac_status); } &&
18556          { ac_try='test -z "$ac_c_werror_flag"
18557                          || test ! -s conftest.err'
18558   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18559   (eval $ac_try) 2>&5
18560   ac_status=$?
18561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18562   (exit $ac_status); }; } &&
18563          { ac_try='test -s conftest$ac_exeext'
18564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18565   (eval $ac_try) 2>&5
18566   ac_status=$?
18567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18568   (exit $ac_status); }; }; then
18569   ac_cv_lib_c_forkpty=yes
18570 else
18571   echo "$as_me: failed program was:" >&5
18572 sed 's/^/| /' conftest.$ac_ext >&5
18573
18574 ac_cv_lib_c_forkpty=no
18575 fi
18576 rm -f conftest.err conftest.$ac_objext \
18577       conftest$ac_exeext conftest.$ac_ext
18578 LIBS=$ac_check_lib_save_LIBS
18579 fi
18580 echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
18581 echo "${ECHO_T}$ac_cv_lib_c_forkpty" >&6
18582 if test $ac_cv_lib_c_forkpty = yes; then
18583   PTY_LIBS=""
18584                   cat >>confdefs.h <<\_ACEOF
18585 #define HAVE_FORKPTY 1
18586 _ACEOF
18587
18588 fi
18589
18590   CPPFLAGS="$ac_save_CPPFLAGS"
18591   LDFLAGS="$ac_save_LDFLAGS"
18592 #  LIBS="$ac_save_LIBS"
18593
18594 fi
18595
18596 ###############################################################################
18597 #
18598 #       Check for the XSHM server extension.
18599 #
18600 ###############################################################################
18601
18602 have_xshm=no
18603 with_xshm_req=unspecified
18604
18605 # Check whether --with-xshm-ext or --without-xshm-ext was given.
18606 if test "${with_xshm_ext+set}" = set; then
18607   withval="$with_xshm_ext"
18608   with_xshm="$withval"; with_xshm_req="$withval"
18609 else
18610   with_xshm=yes
18611 fi;
18612
18613
18614    case "$with_xshm" in
18615     yes) ;;
18616     no)  ;;
18617
18618     /*)
18619      echo "$as_me:$LINENO: checking for XSHM headers" >&5
18620 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
18621      d=$with_xshm/include
18622      if test -d $d; then
18623        X_CFLAGS="-I$d $X_CFLAGS"
18624        echo "$as_me:$LINENO: result: $d" >&5
18625 echo "${ECHO_T}$d" >&6
18626      else
18627        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18628 echo "${ECHO_T}not found ($d: no such directory)" >&6
18629      fi
18630
18631      echo "$as_me:$LINENO: checking for XSHM libs" >&5
18632 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
18633      d=$with_xshm/lib
18634      if test -d $d; then
18635        X_LIBS="-L$d $X_LIBS"
18636        echo "$as_me:$LINENO: result: $d" >&5
18637 echo "${ECHO_T}$d" >&6
18638      else
18639        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18640 echo "${ECHO_T}not found ($d: no such directory)" >&6
18641      fi
18642
18643      # replace the directory string with "yes".
18644      with_xshm_req="yes"
18645      with_xshm=$with_xshm_req
18646      ;;
18647
18648     *)
18649      echo ""
18650      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
18651      echo "       If it is a directory, then \`DIR/include' will be added to"
18652      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18653      exit 1
18654      ;;
18655    esac
18656
18657
18658 if test "$with_xshm" = yes; then
18659
18660   # first check for Xshm.h.
18661
18662   ac_save_CPPFLAGS="$CPPFLAGS"
18663   if test \! -z "$includedir" ; then
18664     CPPFLAGS="$CPPFLAGS -I$includedir"
18665   fi
18666   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18667   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
18668 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
18669 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
18670   echo $ECHO_N "(cached) $ECHO_C" >&6
18671 else
18672   cat >conftest.$ac_ext <<_ACEOF
18673 /* confdefs.h.  */
18674 _ACEOF
18675 cat confdefs.h >>conftest.$ac_ext
18676 cat >>conftest.$ac_ext <<_ACEOF
18677 /* end confdefs.h.  */
18678 #include <X11/Xlib.h>
18679
18680 #include <X11/extensions/XShm.h>
18681 _ACEOF
18682 rm -f conftest.$ac_objext
18683 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18684   (eval $ac_compile) 2>conftest.er1
18685   ac_status=$?
18686   grep -v '^ *+' conftest.er1 >conftest.err
18687   rm -f conftest.er1
18688   cat conftest.err >&5
18689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18690   (exit $ac_status); } &&
18691          { ac_try='test -z "$ac_c_werror_flag"
18692                          || test ! -s conftest.err'
18693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18694   (eval $ac_try) 2>&5
18695   ac_status=$?
18696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18697   (exit $ac_status); }; } &&
18698          { ac_try='test -s conftest.$ac_objext'
18699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18700   (eval $ac_try) 2>&5
18701   ac_status=$?
18702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18703   (exit $ac_status); }; }; then
18704   ac_cv_header_X11_extensions_XShm_h=yes
18705 else
18706   echo "$as_me: failed program was:" >&5
18707 sed 's/^/| /' conftest.$ac_ext >&5
18708
18709 ac_cv_header_X11_extensions_XShm_h=no
18710 fi
18711 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18712 fi
18713 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
18714 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
18715 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
18716   have_xshm=yes
18717 fi
18718
18719
18720   CPPFLAGS="$ac_save_CPPFLAGS"
18721
18722   # if that succeeded, then check for sys/ipc.h.
18723   if test "$have_xshm" = yes; then
18724     have_xshm=no
18725
18726   ac_save_CPPFLAGS="$CPPFLAGS"
18727   if test \! -z "$includedir" ; then
18728     CPPFLAGS="$CPPFLAGS -I$includedir"
18729   fi
18730   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18731   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18732   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
18733 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
18734 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18735   echo $ECHO_N "(cached) $ECHO_C" >&6
18736 fi
18737 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
18738 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
18739 else
18740   # Is the header compilable?
18741 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
18742 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
18743 cat >conftest.$ac_ext <<_ACEOF
18744 /* confdefs.h.  */
18745 _ACEOF
18746 cat confdefs.h >>conftest.$ac_ext
18747 cat >>conftest.$ac_ext <<_ACEOF
18748 /* end confdefs.h.  */
18749 $ac_includes_default
18750 #include <sys/ipc.h>
18751 _ACEOF
18752 rm -f conftest.$ac_objext
18753 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18754   (eval $ac_compile) 2>conftest.er1
18755   ac_status=$?
18756   grep -v '^ *+' conftest.er1 >conftest.err
18757   rm -f conftest.er1
18758   cat conftest.err >&5
18759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18760   (exit $ac_status); } &&
18761          { ac_try='test -z "$ac_c_werror_flag"
18762                          || test ! -s conftest.err'
18763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18764   (eval $ac_try) 2>&5
18765   ac_status=$?
18766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18767   (exit $ac_status); }; } &&
18768          { ac_try='test -s conftest.$ac_objext'
18769   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18770   (eval $ac_try) 2>&5
18771   ac_status=$?
18772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18773   (exit $ac_status); }; }; then
18774   ac_header_compiler=yes
18775 else
18776   echo "$as_me: failed program was:" >&5
18777 sed 's/^/| /' conftest.$ac_ext >&5
18778
18779 ac_header_compiler=no
18780 fi
18781 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18782 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18783 echo "${ECHO_T}$ac_header_compiler" >&6
18784
18785 # Is the header present?
18786 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
18787 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
18788 cat >conftest.$ac_ext <<_ACEOF
18789 /* confdefs.h.  */
18790 _ACEOF
18791 cat confdefs.h >>conftest.$ac_ext
18792 cat >>conftest.$ac_ext <<_ACEOF
18793 /* end confdefs.h.  */
18794 #include <sys/ipc.h>
18795 _ACEOF
18796 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18797   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18798   ac_status=$?
18799   grep -v '^ *+' conftest.er1 >conftest.err
18800   rm -f conftest.er1
18801   cat conftest.err >&5
18802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18803   (exit $ac_status); } >/dev/null; then
18804   if test -s conftest.err; then
18805     ac_cpp_err=$ac_c_preproc_warn_flag
18806     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18807   else
18808     ac_cpp_err=
18809   fi
18810 else
18811   ac_cpp_err=yes
18812 fi
18813 if test -z "$ac_cpp_err"; then
18814   ac_header_preproc=yes
18815 else
18816   echo "$as_me: failed program was:" >&5
18817 sed 's/^/| /' conftest.$ac_ext >&5
18818
18819   ac_header_preproc=no
18820 fi
18821 rm -f conftest.err conftest.$ac_ext
18822 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18823 echo "${ECHO_T}$ac_header_preproc" >&6
18824
18825 # So?  What about this header?
18826 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18827   yes:no: )
18828     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
18829 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18830     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
18831 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
18832     ac_header_preproc=yes
18833     ;;
18834   no:yes:* )
18835     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
18836 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
18837     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
18838 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
18839     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
18840 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
18841     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
18842 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18843     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
18844 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
18845     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
18846 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
18847     (
18848       cat <<\_ASBOX
18849 ## ------------------------------------------ ##
18850 ## Report this to the AC_PACKAGE_NAME lists.  ##
18851 ## ------------------------------------------ ##
18852 _ASBOX
18853     ) |
18854       sed "s/^/$as_me: WARNING:     /" >&2
18855     ;;
18856 esac
18857 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
18858 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
18859 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18860   echo $ECHO_N "(cached) $ECHO_C" >&6
18861 else
18862   ac_cv_header_sys_ipc_h=$ac_header_preproc
18863 fi
18864 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
18865 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
18866
18867 fi
18868 if test $ac_cv_header_sys_ipc_h = yes; then
18869   have_xshm=yes
18870 fi
18871
18872
18873   CPPFLAGS="$ac_save_CPPFLAGS"
18874   fi
18875
18876   # if that succeeded, then check for sys/shm.h.
18877   if test "$have_xshm" = yes; then
18878     have_xshm=no
18879
18880   ac_save_CPPFLAGS="$CPPFLAGS"
18881   if test \! -z "$includedir" ; then
18882     CPPFLAGS="$CPPFLAGS -I$includedir"
18883   fi
18884   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18885   if test "${ac_cv_header_sys_shm_h+set}" = set; then
18886   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
18887 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
18888 if test "${ac_cv_header_sys_shm_h+set}" = set; then
18889   echo $ECHO_N "(cached) $ECHO_C" >&6
18890 fi
18891 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
18892 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
18893 else
18894   # Is the header compilable?
18895 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
18896 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
18897 cat >conftest.$ac_ext <<_ACEOF
18898 /* confdefs.h.  */
18899 _ACEOF
18900 cat confdefs.h >>conftest.$ac_ext
18901 cat >>conftest.$ac_ext <<_ACEOF
18902 /* end confdefs.h.  */
18903 $ac_includes_default
18904 #include <sys/shm.h>
18905 _ACEOF
18906 rm -f conftest.$ac_objext
18907 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18908   (eval $ac_compile) 2>conftest.er1
18909   ac_status=$?
18910   grep -v '^ *+' conftest.er1 >conftest.err
18911   rm -f conftest.er1
18912   cat conftest.err >&5
18913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18914   (exit $ac_status); } &&
18915          { ac_try='test -z "$ac_c_werror_flag"
18916                          || test ! -s conftest.err'
18917   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18918   (eval $ac_try) 2>&5
18919   ac_status=$?
18920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18921   (exit $ac_status); }; } &&
18922          { ac_try='test -s conftest.$ac_objext'
18923   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18924   (eval $ac_try) 2>&5
18925   ac_status=$?
18926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18927   (exit $ac_status); }; }; then
18928   ac_header_compiler=yes
18929 else
18930   echo "$as_me: failed program was:" >&5
18931 sed 's/^/| /' conftest.$ac_ext >&5
18932
18933 ac_header_compiler=no
18934 fi
18935 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18936 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18937 echo "${ECHO_T}$ac_header_compiler" >&6
18938
18939 # Is the header present?
18940 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
18941 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
18942 cat >conftest.$ac_ext <<_ACEOF
18943 /* confdefs.h.  */
18944 _ACEOF
18945 cat confdefs.h >>conftest.$ac_ext
18946 cat >>conftest.$ac_ext <<_ACEOF
18947 /* end confdefs.h.  */
18948 #include <sys/shm.h>
18949 _ACEOF
18950 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18951   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18952   ac_status=$?
18953   grep -v '^ *+' conftest.er1 >conftest.err
18954   rm -f conftest.er1
18955   cat conftest.err >&5
18956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18957   (exit $ac_status); } >/dev/null; then
18958   if test -s conftest.err; then
18959     ac_cpp_err=$ac_c_preproc_warn_flag
18960     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18961   else
18962     ac_cpp_err=
18963   fi
18964 else
18965   ac_cpp_err=yes
18966 fi
18967 if test -z "$ac_cpp_err"; then
18968   ac_header_preproc=yes
18969 else
18970   echo "$as_me: failed program was:" >&5
18971 sed 's/^/| /' conftest.$ac_ext >&5
18972
18973   ac_header_preproc=no
18974 fi
18975 rm -f conftest.err conftest.$ac_ext
18976 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18977 echo "${ECHO_T}$ac_header_preproc" >&6
18978
18979 # So?  What about this header?
18980 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18981   yes:no: )
18982     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
18983 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18984     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
18985 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
18986     ac_header_preproc=yes
18987     ;;
18988   no:yes:* )
18989     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
18990 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
18991     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
18992 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
18993     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
18994 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
18995     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
18996 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18997     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
18998 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
18999     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
19000 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
19001     (
19002       cat <<\_ASBOX
19003 ## ------------------------------------------ ##
19004 ## Report this to the AC_PACKAGE_NAME lists.  ##
19005 ## ------------------------------------------ ##
19006 _ASBOX
19007     ) |
19008       sed "s/^/$as_me: WARNING:     /" >&2
19009     ;;
19010 esac
19011 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19012 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
19013 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19014   echo $ECHO_N "(cached) $ECHO_C" >&6
19015 else
19016   ac_cv_header_sys_shm_h=$ac_header_preproc
19017 fi
19018 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19019 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
19020
19021 fi
19022 if test $ac_cv_header_sys_shm_h = yes; then
19023   have_xshm=yes
19024 fi
19025
19026
19027   CPPFLAGS="$ac_save_CPPFLAGS"
19028   fi
19029
19030   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
19031   # to exist, but the library code to not exist.  And even better, the library
19032   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
19033   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
19034   # that's not quite right, but close enough.)
19035   #
19036   case "$host" in
19037     *-aix*)
19038       if  `uname -v` -eq 3 ; then
19039         have_xshm=no
19040
19041   ac_save_CPPFLAGS="$CPPFLAGS"
19042   ac_save_LDFLAGS="$LDFLAGS"
19043 #  ac_save_LIBS="$LIBS"
19044
19045   if test \! -z "$includedir" ; then
19046     CPPFLAGS="$CPPFLAGS -I$includedir"
19047   fi
19048   # note: $X_CFLAGS includes $x_includes
19049   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19050
19051   if test \! -z "$libdir" ; then
19052     LDFLAGS="$LDFLAGS -L$libdir"
19053   fi
19054   # note: $X_LIBS includes $x_libraries
19055   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19056
19057   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
19058 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
19059 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
19060   echo $ECHO_N "(cached) $ECHO_C" >&6
19061 else
19062   ac_check_lib_save_LIBS=$LIBS
19063 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
19064 cat >conftest.$ac_ext <<_ACEOF
19065 /* confdefs.h.  */
19066 _ACEOF
19067 cat confdefs.h >>conftest.$ac_ext
19068 cat >>conftest.$ac_ext <<_ACEOF
19069 /* end confdefs.h.  */
19070
19071 /* Override any gcc2 internal prototype to avoid an error.  */
19072 #ifdef __cplusplus
19073 extern "C"
19074 #endif
19075 /* We use char because int might match the return type of a gcc2
19076    builtin and then its argument prototype would still apply.  */
19077 char XShmQueryExtension ();
19078 int
19079 main ()
19080 {
19081 XShmQueryExtension ();
19082   ;
19083   return 0;
19084 }
19085 _ACEOF
19086 rm -f conftest.$ac_objext conftest$ac_exeext
19087 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19088   (eval $ac_link) 2>conftest.er1
19089   ac_status=$?
19090   grep -v '^ *+' conftest.er1 >conftest.err
19091   rm -f conftest.er1
19092   cat conftest.err >&5
19093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19094   (exit $ac_status); } &&
19095          { ac_try='test -z "$ac_c_werror_flag"
19096                          || test ! -s conftest.err'
19097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19098   (eval $ac_try) 2>&5
19099   ac_status=$?
19100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19101   (exit $ac_status); }; } &&
19102          { ac_try='test -s conftest$ac_exeext'
19103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19104   (eval $ac_try) 2>&5
19105   ac_status=$?
19106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19107   (exit $ac_status); }; }; then
19108   ac_cv_lib_XextSam_XShmQueryExtension=yes
19109 else
19110   echo "$as_me: failed program was:" >&5
19111 sed 's/^/| /' conftest.$ac_ext >&5
19112
19113 ac_cv_lib_XextSam_XShmQueryExtension=no
19114 fi
19115 rm -f conftest.err conftest.$ac_objext \
19116       conftest$ac_exeext conftest.$ac_ext
19117 LIBS=$ac_check_lib_save_LIBS
19118 fi
19119 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
19120 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
19121 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
19122   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
19123 else
19124   true
19125 fi
19126
19127   CPPFLAGS="$ac_save_CPPFLAGS"
19128   LDFLAGS="$ac_save_LDFLAGS"
19129 #  LIBS="$ac_save_LIBS"
19130
19131       fi
19132     ;;
19133   esac
19134
19135   # if that succeeded, then we've really got it.
19136   if test "$have_xshm" = yes; then
19137     cat >>confdefs.h <<\_ACEOF
19138 #define HAVE_XSHM_EXTENSION 1
19139 _ACEOF
19140
19141   fi
19142
19143 elif test "$with_xshm" != no; then
19144   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
19145   exit 1
19146 fi
19147
19148
19149 ###############################################################################
19150 #
19151 #       Check for the DOUBLE-BUFFER server extension.
19152 #
19153 ###############################################################################
19154
19155 have_xdbe=no
19156 with_xdbe_req=unspecified
19157
19158 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
19159 if test "${with_xdbe_ext+set}" = set; then
19160   withval="$with_xdbe_ext"
19161   with_xdbe="$withval"; with_xdbe_req="$withval"
19162 else
19163   with_xdbe=yes
19164 fi;
19165
19166
19167    case "$with_xdbe" in
19168     yes) ;;
19169     no)  ;;
19170
19171     /*)
19172      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
19173 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
19174      d=$with_xdbe/include
19175      if test -d $d; then
19176        X_CFLAGS="-I$d $X_CFLAGS"
19177        echo "$as_me:$LINENO: result: $d" >&5
19178 echo "${ECHO_T}$d" >&6
19179      else
19180        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19181 echo "${ECHO_T}not found ($d: no such directory)" >&6
19182      fi
19183
19184      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
19185 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
19186      d=$with_xdbe/lib
19187      if test -d $d; then
19188        X_LIBS="-L$d $X_LIBS"
19189        echo "$as_me:$LINENO: result: $d" >&5
19190 echo "${ECHO_T}$d" >&6
19191      else
19192        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19193 echo "${ECHO_T}not found ($d: no such directory)" >&6
19194      fi
19195
19196      # replace the directory string with "yes".
19197      with_xdbe_req="yes"
19198      with_xdbe=$with_xdbe_req
19199      ;;
19200
19201     *)
19202      echo ""
19203      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
19204      echo "       If it is a directory, then \`DIR/include' will be added to"
19205      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19206      exit 1
19207      ;;
19208    esac
19209
19210
19211 if test "$with_xdbe" = yes; then
19212
19213
19214   ac_save_CPPFLAGS="$CPPFLAGS"
19215   if test \! -z "$includedir" ; then
19216     CPPFLAGS="$CPPFLAGS -I$includedir"
19217   fi
19218   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19219   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
19220 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
19221 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
19222   echo $ECHO_N "(cached) $ECHO_C" >&6
19223 else
19224   cat >conftest.$ac_ext <<_ACEOF
19225 /* confdefs.h.  */
19226 _ACEOF
19227 cat confdefs.h >>conftest.$ac_ext
19228 cat >>conftest.$ac_ext <<_ACEOF
19229 /* end confdefs.h.  */
19230 #include <X11/Xlib.h>
19231
19232 #include <X11/extensions/Xdbe.h>
19233 _ACEOF
19234 rm -f conftest.$ac_objext
19235 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19236   (eval $ac_compile) 2>conftest.er1
19237   ac_status=$?
19238   grep -v '^ *+' conftest.er1 >conftest.err
19239   rm -f conftest.er1
19240   cat conftest.err >&5
19241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19242   (exit $ac_status); } &&
19243          { ac_try='test -z "$ac_c_werror_flag"
19244                          || test ! -s conftest.err'
19245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19246   (eval $ac_try) 2>&5
19247   ac_status=$?
19248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19249   (exit $ac_status); }; } &&
19250          { ac_try='test -s conftest.$ac_objext'
19251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19252   (eval $ac_try) 2>&5
19253   ac_status=$?
19254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19255   (exit $ac_status); }; }; then
19256   ac_cv_header_X11_extensions_Xdbe_h=yes
19257 else
19258   echo "$as_me: failed program was:" >&5
19259 sed 's/^/| /' conftest.$ac_ext >&5
19260
19261 ac_cv_header_X11_extensions_Xdbe_h=no
19262 fi
19263 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19264 fi
19265 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
19266 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
19267 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
19268   have_xdbe=yes
19269 fi
19270
19271
19272   CPPFLAGS="$ac_save_CPPFLAGS"
19273   if test "$have_xdbe" = yes; then
19274     cat >>confdefs.h <<\_ACEOF
19275 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
19276 _ACEOF
19277
19278   fi
19279
19280 elif test "$with_xdbe" != no; then
19281   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
19282   exit 1
19283 fi
19284
19285
19286 ###############################################################################
19287 #
19288 #       Check for the SGI XReadDisplay server extension.
19289 #
19290 #       Note: this has to be down here, rather than up with the other server
19291 #       extension tests, so that the output of `configure --help' is in the
19292 #       right order.  Arrgh!
19293 #
19294 ###############################################################################
19295
19296 have_readdisplay=no
19297 with_readdisplay_req=unspecified
19298
19299 # Check whether --with-readdisplay or --without-readdisplay was given.
19300 if test "${with_readdisplay+set}" = set; then
19301   withval="$with_readdisplay"
19302   with_readdisplay="$withval"; with_readdisplay_req="$withval"
19303 else
19304   with_readdisplay=yes
19305 fi;
19306
19307
19308    case "$with_readdisplay" in
19309     yes) ;;
19310     no)  ;;
19311
19312     /*)
19313      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
19314 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
19315      d=$with_readdisplay/include
19316      if test -d $d; then
19317        X_CFLAGS="-I$d $X_CFLAGS"
19318        echo "$as_me:$LINENO: result: $d" >&5
19319 echo "${ECHO_T}$d" >&6
19320      else
19321        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19322 echo "${ECHO_T}not found ($d: no such directory)" >&6
19323      fi
19324
19325      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
19326 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
19327      d=$with_readdisplay/lib
19328      if test -d $d; then
19329        X_LIBS="-L$d $X_LIBS"
19330        echo "$as_me:$LINENO: result: $d" >&5
19331 echo "${ECHO_T}$d" >&6
19332      else
19333        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19334 echo "${ECHO_T}not found ($d: no such directory)" >&6
19335      fi
19336
19337      # replace the directory string with "yes".
19338      with_readdisplay_req="yes"
19339      with_readdisplay=$with_readdisplay_req
19340      ;;
19341
19342     *)
19343      echo ""
19344      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
19345      echo "       If it is a directory, then \`DIR/include' will be added to"
19346      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19347      exit 1
19348      ;;
19349    esac
19350
19351
19352 if test "$with_readdisplay" = yes; then
19353
19354   ac_save_CPPFLAGS="$CPPFLAGS"
19355   if test \! -z "$includedir" ; then
19356     CPPFLAGS="$CPPFLAGS -I$includedir"
19357   fi
19358   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19359   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
19360 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
19361 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
19362   echo $ECHO_N "(cached) $ECHO_C" >&6
19363 else
19364   cat >conftest.$ac_ext <<_ACEOF
19365 /* confdefs.h.  */
19366 _ACEOF
19367 cat confdefs.h >>conftest.$ac_ext
19368 cat >>conftest.$ac_ext <<_ACEOF
19369 /* end confdefs.h.  */
19370 #include <X11/Xlib.h>
19371
19372 #include <X11/extensions/readdisplay.h>
19373 _ACEOF
19374 rm -f conftest.$ac_objext
19375 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19376   (eval $ac_compile) 2>conftest.er1
19377   ac_status=$?
19378   grep -v '^ *+' conftest.er1 >conftest.err
19379   rm -f conftest.er1
19380   cat conftest.err >&5
19381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19382   (exit $ac_status); } &&
19383          { ac_try='test -z "$ac_c_werror_flag"
19384                          || test ! -s conftest.err'
19385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19386   (eval $ac_try) 2>&5
19387   ac_status=$?
19388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19389   (exit $ac_status); }; } &&
19390          { ac_try='test -s conftest.$ac_objext'
19391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19392   (eval $ac_try) 2>&5
19393   ac_status=$?
19394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19395   (exit $ac_status); }; }; then
19396   ac_cv_header_X11_extensions_readdisplay_h=yes
19397 else
19398   echo "$as_me: failed program was:" >&5
19399 sed 's/^/| /' conftest.$ac_ext >&5
19400
19401 ac_cv_header_X11_extensions_readdisplay_h=no
19402 fi
19403 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19404 fi
19405 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
19406 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
19407 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
19408   cat >>confdefs.h <<\_ACEOF
19409 #define HAVE_READ_DISPLAY_EXTENSION 1
19410 _ACEOF
19411
19412 fi
19413
19414
19415   CPPFLAGS="$ac_save_CPPFLAGS"
19416 elif test "$with_readdisplay" != no; then
19417   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
19418   exit 1
19419 fi
19420
19421
19422 ###############################################################################
19423 #
19424 #       Check for a directory full of images to use as the default value
19425 #       of the "imageDirectory" preference.
19426 #
19427 ###############################################################################
19428
19429 have_imagedir=no
19430 with_imagedir_req=unspecified
19431
19432
19433 # Check whether --with-image-directory or --without-image-directory was given.
19434 if test "${with_image_directory+set}" = set; then
19435   withval="$with_image_directory"
19436   with_imagedir="$withval"; with_imagedir_req="$withval"
19437 else
19438   with_imagedir=yes
19439 fi;
19440 # no HANDLE_X_PATH_ARG for this one
19441
19442 case "$with_imagedir" in
19443   /*)
19444     # absolute path
19445     echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
19446 echo $ECHO_N "checking for image directory $with_imagedir... $ECHO_C" >&6
19447     if test -d "$with_imagedir" ; then
19448       echo "$as_me:$LINENO: result: yes" >&5
19449 echo "${ECHO_T}yes" >&6
19450     else
19451       echo "$as_me:$LINENO: result: no" >&5
19452 echo "${ECHO_T}no" >&6
19453       with_imagedir=""
19454     fi
19455   ;;
19456   yes)
19457     with_imagedir=""
19458
19459     #### Could use some more defaults here...
19460     for dd in \
19461       "/usr/share/backgrounds/images/"          \
19462       "/usr/share/wallpapers/"                  \
19463       "/Library/Desktop Pictures/"              \
19464     ; do
19465       if test -z "$with_imagedir"; then
19466         echo "$as_me:$LINENO: checking for image directory $dd" >&5
19467 echo $ECHO_N "checking for image directory $dd... $ECHO_C" >&6
19468         if test -d "$dd" ; then
19469           echo "$as_me:$LINENO: result: yes" >&5
19470 echo "${ECHO_T}yes" >&6
19471           with_imagedir="$dd"
19472         else
19473           echo "$as_me:$LINENO: result: no" >&5
19474 echo "${ECHO_T}no" >&6
19475         fi
19476       fi
19477     done
19478
19479   ;;
19480   no)
19481     with_imagedir=""
19482   ;;
19483
19484   *)
19485     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
19486     exit 1
19487   ;;
19488 esac
19489 ac_cv_imagedir="$with_imagedir"
19490
19491 DEFAULT_IMAGES_P='True'
19492 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
19493
19494 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
19495   DEFAULT_IMAGES_P='False'
19496 fi
19497
19498
19499 ###############################################################################
19500 #
19501 #       Pick a text file to use as the default of the "textFile" preference.
19502 #       Any old file will do, but preferably one that will make interesting
19503 #       shapes when displayed by "starwars" and "fontglide".
19504 #
19505 ###############################################################################
19506
19507 have_textfile=no
19508 with_textfile_req=unspecified
19509
19510
19511 # Check whether --with-text-file or --without-text-file was given.
19512 if test "${with_text_file+set}" = set; then
19513   withval="$with_text_file"
19514   with_textfile="$withval"; with_textfile_req="$withval"
19515 else
19516   with_textfile=yes
19517 fi;
19518 # no HANDLE_X_PATH_ARG for this one
19519
19520 case "$with_textfile" in
19521   /*)
19522     # absolute path
19523     echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
19524 echo $ECHO_N "checking for text file $with_textfile... $ECHO_C" >&6
19525     if test -f "$with_textfile" ; then
19526       echo "$as_me:$LINENO: result: yes" >&5
19527 echo "${ECHO_T}yes" >&6
19528     else
19529       echo "$as_me:$LINENO: result: no" >&5
19530 echo "${ECHO_T}no" >&6
19531       with_textfile=""
19532     fi
19533   ;;
19534   yes)
19535     with_textfile=""
19536
19537     #### Could use some more defaults here...
19538     for f in \
19539       "/usr/X11R6/lib/X11/doc/README"           \
19540       "/usr/share/doc/xserver-common/copyright" \
19541       "/usr/X11R6/README"                       \
19542     ; do
19543       if test -z "$with_textfile"; then
19544         echo "$as_me:$LINENO: checking for text file $f" >&5
19545 echo $ECHO_N "checking for text file $f... $ECHO_C" >&6
19546         if test -f "$f" ; then
19547           echo "$as_me:$LINENO: result: yes" >&5
19548 echo "${ECHO_T}yes" >&6
19549           with_textfile="$f"
19550         else
19551           echo "$as_me:$LINENO: result: no" >&5
19552 echo "${ECHO_T}no" >&6
19553         fi
19554       fi
19555     done
19556
19557   ;;
19558   no)
19559     with_textfile=""
19560   ;;
19561
19562   *)
19563     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
19564     exit 1
19565   ;;
19566 esac
19567 ac_cv_textfile="$with_textfile"
19568
19569 DEFAULT_TEXT_FILE="$ac_cv_textfile"
19570
19571
19572 ###############################################################################
19573 #
19574 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
19575 #       This should be safe, but let's give people the option.
19576 #
19577 ###############################################################################
19578
19579 setuid_hacks_default=no
19580 setuid_hacks="$setuid_hacks_default"
19581
19582 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
19583 if test "${with_setuid_hacks+set}" = set; then
19584   withval="$with_setuid_hacks"
19585   setuid_hacks="$withval"
19586 else
19587   setuid_hacks="$setuid_hacks_default"
19588 fi;
19589
19590
19591    case "$setuid_hacks" in
19592     yes) ;;
19593     no)  ;;
19594
19595     /*)
19596      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
19597 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
19598      d=$setuid_hacks/include
19599      if test -d $d; then
19600        X_CFLAGS="-I$d $X_CFLAGS"
19601        echo "$as_me:$LINENO: result: $d" >&5
19602 echo "${ECHO_T}$d" >&6
19603      else
19604        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19605 echo "${ECHO_T}not found ($d: no such directory)" >&6
19606      fi
19607
19608      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
19609 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
19610      d=$setuid_hacks/lib
19611      if test -d $d; then
19612        X_LIBS="-L$d $X_LIBS"
19613        echo "$as_me:$LINENO: result: $d" >&5
19614 echo "${ECHO_T}$d" >&6
19615      else
19616        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19617 echo "${ECHO_T}not found ($d: no such directory)" >&6
19618      fi
19619
19620      # replace the directory string with "yes".
19621      setuid_hacks_req="yes"
19622      setuid_hacks=$setuid_hacks_req
19623      ;;
19624
19625     *)
19626      echo ""
19627      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
19628      echo "       If it is a directory, then \`DIR/include' will be added to"
19629      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19630      exit 1
19631      ;;
19632    esac
19633
19634
19635 if test "$setuid_hacks" = yes; then
19636   true
19637 elif test "$setuid_hacks" != no; then
19638   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
19639   exit 1
19640 fi
19641
19642
19643 ###############################################################################
19644 #
19645 #       Done testing.  Now, set up the various -I and -L variables,
19646 #       and decide which GUI program to build by default.
19647 #
19648 ###############################################################################
19649
19650 DEPEND=makedepend
19651 DEPEND_FLAGS=
19652 DEPEND_DEFINES=
19653
19654
19655 if test \! -z "$includedir" ; then
19656   INCLUDES="$INCLUDES -I$includedir"
19657 fi
19658
19659 if test \! -z "$libdir" ; then
19660   LDFLAGS="$LDFLAGS -L$libdir"
19661 fi
19662
19663
19664 PREFERRED_DEMO_PROGRAM=''
19665 ALL_DEMO_PROGRAMS=
19666 if test "$have_motif" = yes; then
19667   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
19668   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
19669 fi
19670 if test "$have_gtk" = yes; then
19671   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
19672   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
19673 fi
19674
19675
19676 if test "$have_kerberos" = yes; then
19677   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
19678   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
19679 fi
19680 if test "$have_pam" = yes; then
19681   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
19682   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
19683   INSTALL_PAM="install-pam"
19684 fi
19685 if test "$have_passwd_helper" = yes; then
19686   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
19687   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
19688 fi
19689   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
19690   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
19691
19692
19693 if test "$enable_locking" = yes; then
19694   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
19695   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
19696 else
19697   LOCK_SRCS='$(NOLOCK_SRCS_1)'
19698   LOCK_OBJS='$(NOLOCK_OBJS_1)'
19699 fi
19700
19701 if test "$ac_macosx" = yes; then
19702   EXES_OSX='$(EXES_OSX)'
19703   SCRIPTS_OSX='$(SCRIPTS_OSX)'
19704   MEN_OSX='$(MEN_OSX)'
19705 else
19706   EXES_OSX=
19707   SCRIPTS_OSX=
19708   MEN_OSX=
19709 fi
19710
19711
19712 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
19713
19714 if test "$need_setuid" = yes; then
19715   NEED_SETUID=yes
19716 else
19717   NEED_SETUID=no
19718 fi
19719
19720 if test "$setuid_hacks" = yes; then
19721   SETUID_HACKS=yes
19722 else
19723   SETUID_HACKS=no
19724 fi
19725
19726 tab='   '
19727 if test "$have_gl" = yes; then
19728   GL_EXES='$(GL_EXES)'
19729   GL_UTIL_EXES='$(GL_UTIL_EXES)'
19730   GL_MEN='$(GL_MEN)'
19731   GL_KLUDGE="${tab}  "
19732 else
19733   GL_KLUDGE="-${tab}  "
19734 fi
19735
19736 if test "$have_gle" = yes; then
19737   GLE_EXES='$(GLE_EXES)'
19738   GLE_KLUDGE="${tab}   "
19739 else
19740   GLE_KLUDGE="-${tab}   "
19741 fi
19742
19743 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
19744  JPEG_EXES='$(JPEG_EXES)'
19745 fi
19746
19747
19748 # Another substitution in the XScreenSaver.ad.in file:
19749 #
19750 if test "$gnome_open_program" != ''; then
19751   GNOME24=''
19752   GNOME22='!    '
19753   NOGNOME='!    '
19754 elif test "$gnome_url_show_program" != ''; then
19755   GNOME24='!    '
19756   GNOME22=''
19757   NOGNOME='!    '
19758 else
19759   GNOME24='!    '
19760   GNOME22='!    '
19761   NOGNOME=''
19762 fi
19763
19764
19765 # Set PO_DATADIR to something sensible.
19766 #
19767 echo "$as_me:$LINENO: checking for locale directory" >&5
19768 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
19769 if test -n "$GTK_DATADIR" ; then
19770   PO_DATADIR="$GTK_DATADIR"
19771 elif test "$have_gtk" = yes; then
19772   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
19773   PO_DATADIR="$PO_DATADIR/share"
19774 fi
19775
19776 if test -z "$PO_DATADIR" ; then
19777   #
19778   # #### Total fucking kludge --
19779   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
19780   # but of course we need to expand all the nested variables to do that...
19781   #
19782   dd=$datadir
19783   eval dd=${dd}
19784   eval dd=${dd}
19785   eval dd=${dd}
19786   eval dd=${dd}
19787   eval dd=${dd}
19788   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
19789 fi
19790
19791 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
19792 echo "${ECHO_T}$PO_DATADIR/locale" >&6
19793
19794
19795 # canonicalize slashes.
19796 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
19797
19798 # gcc 3.0 likes to issue this warning for every file:
19799 #
19800 # cc1: warning: changing search order for system directory "/usr/local/include"
19801 # cc1: warning:   as it has already been specified as a non-system directory
19802 #
19803 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
19804 # Which *should* be totally redundant, and thus an ok thing to delete?
19805 #
19806 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
19807
19808
19809 ###############################################################################
19810 #
19811 #       Perform substitutions and write Makefiles.
19812 #
19813 ###############################################################################
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875 APPDEFAULTS=$ac_x_app_defaults
19876
19877
19878
19879
19880
19881
19882
19883                                                                       ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
19884 cat >confcache <<\_ACEOF
19885 # This file is a shell script that caches the results of configure
19886 # tests run on this system so they can be shared between configure
19887 # scripts and configure runs, see configure's option --config-cache.
19888 # It is not useful on other systems.  If it contains results you don't
19889 # want to keep, you may remove or edit it.
19890 #
19891 # config.status only pays attention to the cache file if you give it
19892 # the --recheck option to rerun configure.
19893 #
19894 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19895 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19896 # following values.
19897
19898 _ACEOF
19899
19900 # The following way of writing the cache mishandles newlines in values,
19901 # but we know of no workaround that is simple, portable, and efficient.
19902 # So, don't put newlines in cache variables' values.
19903 # Ultrix sh set writes to stderr and can't be redirected directly,
19904 # and sets the high bit in the cache file unless we assign to the vars.
19905 {
19906   (set) 2>&1 |
19907     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19908     *ac_space=\ *)
19909       # `set' does not quote correctly, so add quotes (double-quote
19910       # substitution turns \\\\ into \\, and sed turns \\ into \).
19911       sed -n \
19912         "s/'/'\\\\''/g;
19913           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19914       ;;
19915     *)
19916       # `set' quotes correctly as required by POSIX, so do not add quotes.
19917       sed -n \
19918         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19919       ;;
19920     esac;
19921 } |
19922   sed '
19923      t clear
19924      : clear
19925      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19926      t end
19927      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19928      : end' >>confcache
19929 if diff $cache_file confcache >/dev/null 2>&1; then :; else
19930   if test -w $cache_file; then
19931     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19932     cat confcache >$cache_file
19933   else
19934     echo "not updating unwritable cache $cache_file"
19935   fi
19936 fi
19937 rm -f confcache
19938
19939 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19940 # Let make expand exec_prefix.
19941 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19942
19943 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19944 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19945 # trailing colons and then remove the whole line if VPATH becomes empty
19946 # (actually we leave an empty line to preserve line numbers).
19947 if test "x$srcdir" = x.; then
19948   ac_vpsub='/^[  ]*VPATH[        ]*=/{
19949 s/:*\$(srcdir):*/:/;
19950 s/:*\${srcdir}:*/:/;
19951 s/:*@srcdir@:*/:/;
19952 s/^\([^=]*=[     ]*\):*/\1/;
19953 s/:*$//;
19954 s/^[^=]*=[       ]*$//;
19955 }'
19956 fi
19957
19958 DEFS=-DHAVE_CONFIG_H
19959
19960 ac_libobjs=
19961 ac_ltlibobjs=
19962 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19963   # 1. Remove the extension, and $U if already installed.
19964   ac_i=`echo "$ac_i" |
19965          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
19966   # 2. Add them.
19967   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
19968   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
19969 done
19970 LIBOBJS=$ac_libobjs
19971
19972 LTLIBOBJS=$ac_ltlibobjs
19973
19974
19975
19976
19977         mv -f po/POTFILES po/POTFILES.tmp
19978         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
19979         rm -f po/POTFILES.tmp
19980
19981
19982
19983 : ${CONFIG_STATUS=./config.status}
19984 ac_clean_files_save=$ac_clean_files
19985 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19986 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
19987 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19988 cat >$CONFIG_STATUS <<_ACEOF
19989 #! $SHELL
19990 # Generated by $as_me.
19991 # Run this file to recreate the current configuration.
19992 # Compiler output produced by configure, useful for debugging
19993 # configure, is in config.log if it exists.
19994
19995 debug=false
19996 ac_cs_recheck=false
19997 ac_cs_silent=false
19998 SHELL=\${CONFIG_SHELL-$SHELL}
19999 _ACEOF
20000
20001 cat >>$CONFIG_STATUS <<\_ACEOF
20002 ## --------------------- ##
20003 ## M4sh Initialization.  ##
20004 ## --------------------- ##
20005
20006 # Be Bourne compatible
20007 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20008   emulate sh
20009   NULLCMD=:
20010   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20011   # is contrary to our usage.  Disable this feature.
20012   alias -g '${1+"$@"}'='"$@"'
20013 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20014   set -o posix
20015 fi
20016 DUALCASE=1; export DUALCASE # for MKS sh
20017
20018 # Support unset when possible.
20019 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
20020   as_unset=unset
20021 else
20022   as_unset=false
20023 fi
20024
20025
20026 # Work around bugs in pre-3.0 UWIN ksh.
20027 $as_unset ENV MAIL MAILPATH
20028 PS1='$ '
20029 PS2='> '
20030 PS4='+ '
20031
20032 # NLS nuisances.
20033 for as_var in \
20034   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20035   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20036   LC_TELEPHONE LC_TIME
20037 do
20038   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
20039     eval $as_var=C; export $as_var
20040   else
20041     $as_unset $as_var
20042   fi
20043 done
20044
20045 # Required to use basename.
20046 if expr a : '\(a\)' >/dev/null 2>&1; then
20047   as_expr=expr
20048 else
20049   as_expr=false
20050 fi
20051
20052 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
20053   as_basename=basename
20054 else
20055   as_basename=false
20056 fi
20057
20058
20059 # Name of the executable.
20060 as_me=`$as_basename "$0" ||
20061 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20062          X"$0" : 'X\(//\)$' \| \
20063          X"$0" : 'X\(/\)$' \| \
20064          .     : '\(.\)' 2>/dev/null ||
20065 echo X/"$0" |
20066     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
20067           /^X\/\(\/\/\)$/{ s//\1/; q; }
20068           /^X\/\(\/\).*/{ s//\1/; q; }
20069           s/.*/./; q'`
20070
20071
20072 # PATH needs CR, and LINENO needs CR and PATH.
20073 # Avoid depending upon Character Ranges.
20074 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20075 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20076 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20077 as_cr_digits='0123456789'
20078 as_cr_alnum=$as_cr_Letters$as_cr_digits
20079
20080 # The user is always right.
20081 if test "${PATH_SEPARATOR+set}" != set; then
20082   echo "#! /bin/sh" >conf$$.sh
20083   echo  "exit 0"   >>conf$$.sh
20084   chmod +x conf$$.sh
20085   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20086     PATH_SEPARATOR=';'
20087   else
20088     PATH_SEPARATOR=:
20089   fi
20090   rm -f conf$$.sh
20091 fi
20092
20093
20094   as_lineno_1=$LINENO
20095   as_lineno_2=$LINENO
20096   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20097   test "x$as_lineno_1" != "x$as_lineno_2" &&
20098   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
20099   # Find who we are.  Look in the path if we contain no path at all
20100   # relative or not.
20101   case $0 in
20102     *[\\/]* ) as_myself=$0 ;;
20103     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20104 for as_dir in $PATH
20105 do
20106   IFS=$as_save_IFS
20107   test -z "$as_dir" && as_dir=.
20108   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20109 done
20110
20111        ;;
20112   esac
20113   # We did not find ourselves, most probably we were run as `sh COMMAND'
20114   # in which case we are not to be found in the path.
20115   if test "x$as_myself" = x; then
20116     as_myself=$0
20117   fi
20118   if test ! -f "$as_myself"; then
20119     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
20120 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
20121    { (exit 1); exit 1; }; }
20122   fi
20123   case $CONFIG_SHELL in
20124   '')
20125     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20126 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
20127 do
20128   IFS=$as_save_IFS
20129   test -z "$as_dir" && as_dir=.
20130   for as_base in sh bash ksh sh5; do
20131          case $as_dir in
20132          /*)
20133            if ("$as_dir/$as_base" -c '
20134   as_lineno_1=$LINENO
20135   as_lineno_2=$LINENO
20136   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20137   test "x$as_lineno_1" != "x$as_lineno_2" &&
20138   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
20139              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
20140              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
20141              CONFIG_SHELL=$as_dir/$as_base
20142              export CONFIG_SHELL
20143              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
20144            fi;;
20145          esac
20146        done
20147 done
20148 ;;
20149   esac
20150
20151   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20152   # uniformly replaced by the line number.  The first 'sed' inserts a
20153   # line-number line before each line; the second 'sed' does the real
20154   # work.  The second script uses 'N' to pair each line-number line
20155   # with the numbered line, and appends trailing '-' during
20156   # substitution so that $LINENO is not a special case at line end.
20157   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20158   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
20159   sed '=' <$as_myself |
20160     sed '
20161       N
20162       s,$,-,
20163       : loop
20164       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
20165       t loop
20166       s,-$,,
20167       s,^['$as_cr_digits']*\n,,
20168     ' >$as_me.lineno &&
20169   chmod +x $as_me.lineno ||
20170     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
20171 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
20172    { (exit 1); exit 1; }; }
20173
20174   # Don't try to exec as it changes $[0], causing all sort of problems
20175   # (the dirname of $[0] is not the place where we might find the
20176   # original and so on.  Autoconf is especially sensible to this).
20177   . ./$as_me.lineno
20178   # Exit status is that of the last command.
20179   exit
20180 }
20181
20182
20183 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
20184   *c*,-n*) ECHO_N= ECHO_C='
20185 ' ECHO_T='      ' ;;
20186   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
20187   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
20188 esac
20189
20190 if expr a : '\(a\)' >/dev/null 2>&1; then
20191   as_expr=expr
20192 else
20193   as_expr=false
20194 fi
20195
20196 rm -f conf$$ conf$$.exe conf$$.file
20197 echo >conf$$.file
20198 if ln -s conf$$.file conf$$ 2>/dev/null; then
20199   # We could just check for DJGPP; but this test a) works b) is more generic
20200   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20201   if test -f conf$$.exe; then
20202     # Don't use ln at all; we don't have any links
20203     as_ln_s='cp -p'
20204   else
20205     as_ln_s='ln -s'
20206   fi
20207 elif ln conf$$.file conf$$ 2>/dev/null; then
20208   as_ln_s=ln
20209 else
20210   as_ln_s='cp -p'
20211 fi
20212 rm -f conf$$ conf$$.exe conf$$.file
20213
20214 if mkdir -p . 2>/dev/null; then
20215   as_mkdir_p=:
20216 else
20217   test -d ./-p && rmdir ./-p
20218   as_mkdir_p=false
20219 fi
20220
20221 as_executable_p="test -f"
20222
20223 # Sed expression to map a string onto a valid CPP name.
20224 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20225
20226 # Sed expression to map a string onto a valid variable name.
20227 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20228
20229
20230 # IFS
20231 # We need space, tab and new line, in precisely that order.
20232 as_nl='
20233 '
20234 IFS="   $as_nl"
20235
20236 # CDPATH.
20237 $as_unset CDPATH
20238
20239 exec 6>&1
20240
20241 # Open the log real soon, to keep \$[0] and so on meaningful, and to
20242 # report actual input values of CONFIG_FILES etc. instead of their
20243 # values after options handling.  Logging --version etc. is OK.
20244 exec 5>>config.log
20245 {
20246   echo
20247   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20248 ## Running $as_me. ##
20249 _ASBOX
20250 } >&5
20251 cat >&5 <<_CSEOF
20252
20253 This file was extended by $as_me, which was
20254 generated by GNU Autoconf 2.59.  Invocation command line was
20255
20256   CONFIG_FILES    = $CONFIG_FILES
20257   CONFIG_HEADERS  = $CONFIG_HEADERS
20258   CONFIG_LINKS    = $CONFIG_LINKS
20259   CONFIG_COMMANDS = $CONFIG_COMMANDS
20260   $ $0 $@
20261
20262 _CSEOF
20263 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
20264 echo >&5
20265 _ACEOF
20266
20267 # Files that config.status was made for.
20268 if test -n "$ac_config_files"; then
20269   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20270 fi
20271
20272 if test -n "$ac_config_headers"; then
20273   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20274 fi
20275
20276 if test -n "$ac_config_links"; then
20277   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20278 fi
20279
20280 if test -n "$ac_config_commands"; then
20281   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20282 fi
20283
20284 cat >>$CONFIG_STATUS <<\_ACEOF
20285
20286 ac_cs_usage="\
20287 \`$as_me' instantiates files from templates according to the
20288 current configuration.
20289
20290 Usage: $0 [OPTIONS] [FILE]...
20291
20292   -h, --help       print this help, then exit
20293   -V, --version    print version number, then exit
20294   -q, --quiet      do not print progress messages
20295   -d, --debug      don't remove temporary files
20296       --recheck    update $as_me by reconfiguring in the same conditions
20297   --file=FILE[:TEMPLATE]
20298                    instantiate the configuration file FILE
20299   --header=FILE[:TEMPLATE]
20300                    instantiate the configuration header FILE
20301
20302 Configuration files:
20303 $config_files
20304
20305 Configuration headers:
20306 $config_headers
20307
20308 Configuration commands:
20309 $config_commands
20310
20311 Report bugs to <bug-autoconf@gnu.org>."
20312 _ACEOF
20313
20314 cat >>$CONFIG_STATUS <<_ACEOF
20315 ac_cs_version="\\
20316 config.status
20317 configured by $0, generated by GNU Autoconf 2.59,
20318   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20319
20320 Copyright (C) 2003 Free Software Foundation, Inc.
20321 This config.status script is free software; the Free Software Foundation
20322 gives unlimited permission to copy, distribute and modify it."
20323 srcdir=$srcdir
20324 INSTALL="$INSTALL"
20325 _ACEOF
20326
20327 cat >>$CONFIG_STATUS <<\_ACEOF
20328 # If no file are specified by the user, then we need to provide default
20329 # value.  By we need to know if files were specified by the user.
20330 ac_need_defaults=:
20331 while test $# != 0
20332 do
20333   case $1 in
20334   --*=*)
20335     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20336     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20337     ac_shift=:
20338     ;;
20339   -*)
20340     ac_option=$1
20341     ac_optarg=$2
20342     ac_shift=shift
20343     ;;
20344   *) # This is not an option, so the user has probably given explicit
20345      # arguments.
20346      ac_option=$1
20347      ac_need_defaults=false;;
20348   esac
20349
20350   case $ac_option in
20351   # Handling of the options.
20352 _ACEOF
20353 cat >>$CONFIG_STATUS <<\_ACEOF
20354   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20355     ac_cs_recheck=: ;;
20356   --version | --vers* | -V )
20357     echo "$ac_cs_version"; exit 0 ;;
20358   --he | --h)
20359     # Conflict between --help and --header
20360     { { echo "$as_me:$LINENO: error: ambiguous option: $1
20361 Try \`$0 --help' for more information." >&5
20362 echo "$as_me: error: ambiguous option: $1
20363 Try \`$0 --help' for more information." >&2;}
20364    { (exit 1); exit 1; }; };;
20365   --help | --hel | -h )
20366     echo "$ac_cs_usage"; exit 0 ;;
20367   --debug | --d* | -d )
20368     debug=: ;;
20369   --file | --fil | --fi | --f )
20370     $ac_shift
20371     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
20372     ac_need_defaults=false;;
20373   --header | --heade | --head | --hea )
20374     $ac_shift
20375     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
20376     ac_need_defaults=false;;
20377   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20378   | -silent | --silent | --silen | --sile | --sil | --si | --s)
20379     ac_cs_silent=: ;;
20380
20381   # This is an error.
20382   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
20383 Try \`$0 --help' for more information." >&5
20384 echo "$as_me: error: unrecognized option: $1
20385 Try \`$0 --help' for more information." >&2;}
20386    { (exit 1); exit 1; }; } ;;
20387
20388   *) ac_config_targets="$ac_config_targets $1" ;;
20389
20390   esac
20391   shift
20392 done
20393
20394 ac_configure_extra_args=
20395
20396 if $ac_cs_silent; then
20397   exec 6>/dev/null
20398   ac_configure_extra_args="$ac_configure_extra_args --silent"
20399 fi
20400
20401 _ACEOF
20402 cat >>$CONFIG_STATUS <<_ACEOF
20403 if \$ac_cs_recheck; then
20404   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
20405   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20406 fi
20407
20408 _ACEOF
20409
20410 cat >>$CONFIG_STATUS <<_ACEOF
20411 #
20412 # INIT-COMMANDS section.
20413 #
20414
20415 INTLTOOL_PERL=${INTLTOOL_PERL}
20416
20417
20418 _ACEOF
20419
20420
20421
20422 cat >>$CONFIG_STATUS <<\_ACEOF
20423 for ac_config_target in $ac_config_targets
20424 do
20425   case "$ac_config_target" in
20426   # Handling of arguments.
20427   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20428   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
20429   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
20430   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
20431   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
20432   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
20433   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
20434   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
20435   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
20436   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
20437   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
20438 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20439    { (exit 1); exit 1; }; };;
20440   esac
20441 done
20442
20443 # If the user did not use the arguments to specify the items to instantiate,
20444 # then the envvar interface is used.  Set only those that are not.
20445 # We use the long form for the default assignment because of an extremely
20446 # bizarre bug on SunOS 4.1.3.
20447 if $ac_need_defaults; then
20448   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20449   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20450   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20451 fi
20452
20453 # Have a temporary directory for convenience.  Make it in the build tree
20454 # simply because there is no reason to put it here, and in addition,
20455 # creating and moving files from /tmp can sometimes cause problems.
20456 # Create a temporary directory, and hook for its removal unless debugging.
20457 $debug ||
20458 {
20459   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20460   trap '{ (exit 1); exit 1; }' 1 2 13 15
20461 }
20462
20463 # Create a (secure) tmp directory for tmp files.
20464
20465 {
20466   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
20467   test -n "$tmp" && test -d "$tmp"
20468 }  ||
20469 {
20470   tmp=./confstat$$-$RANDOM
20471   (umask 077 && mkdir $tmp)
20472 } ||
20473 {
20474    echo "$me: cannot create a temporary directory in ." >&2
20475    { (exit 1); exit 1; }
20476 }
20477
20478 _ACEOF
20479
20480 cat >>$CONFIG_STATUS <<_ACEOF
20481
20482 #
20483 # CONFIG_FILES section.
20484 #
20485
20486 # No need to generate the scripts if there are no CONFIG_FILES.
20487 # This happens for instance when ./config.status config.h
20488 if test -n "\$CONFIG_FILES"; then
20489   # Protect against being on the right side of a sed subst in config.status.
20490   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20491    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20492 s,@SHELL@,$SHELL,;t t
20493 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20494 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20495 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20496 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20497 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20498 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20499 s,@exec_prefix@,$exec_prefix,;t t
20500 s,@prefix@,$prefix,;t t
20501 s,@program_transform_name@,$program_transform_name,;t t
20502 s,@bindir@,$bindir,;t t
20503 s,@sbindir@,$sbindir,;t t
20504 s,@libexecdir@,$libexecdir,;t t
20505 s,@datadir@,$datadir,;t t
20506 s,@sysconfdir@,$sysconfdir,;t t
20507 s,@sharedstatedir@,$sharedstatedir,;t t
20508 s,@localstatedir@,$localstatedir,;t t
20509 s,@libdir@,$libdir,;t t
20510 s,@includedir@,$includedir,;t t
20511 s,@oldincludedir@,$oldincludedir,;t t
20512 s,@infodir@,$infodir,;t t
20513 s,@mandir@,$mandir,;t t
20514 s,@build_alias@,$build_alias,;t t
20515 s,@host_alias@,$host_alias,;t t
20516 s,@target_alias@,$target_alias,;t t
20517 s,@DEFS@,$DEFS,;t t
20518 s,@ECHO_C@,$ECHO_C,;t t
20519 s,@ECHO_N@,$ECHO_N,;t t
20520 s,@ECHO_T@,$ECHO_T,;t t
20521 s,@LIBS@,$LIBS,;t t
20522 s,@build@,$build,;t t
20523 s,@build_cpu@,$build_cpu,;t t
20524 s,@build_vendor@,$build_vendor,;t t
20525 s,@build_os@,$build_os,;t t
20526 s,@host@,$host,;t t
20527 s,@host_cpu@,$host_cpu,;t t
20528 s,@host_vendor@,$host_vendor,;t t
20529 s,@host_os@,$host_os,;t t
20530 s,@CC@,$CC,;t t
20531 s,@CFLAGS@,$CFLAGS,;t t
20532 s,@LDFLAGS@,$LDFLAGS,;t t
20533 s,@CPPFLAGS@,$CPPFLAGS,;t t
20534 s,@ac_ct_CC@,$ac_ct_CC,;t t
20535 s,@EXEEXT@,$EXEEXT,;t t
20536 s,@OBJEXT@,$OBJEXT,;t t
20537 s,@CPP@,$CPP,;t t
20538 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20539 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20540 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20541 s,@SET_MAKE@,$SET_MAKE,;t t
20542 s,@EGREP@,$EGREP,;t t
20543 s,@PERL@,$PERL,;t t
20544 s,@X_CFLAGS@,$X_CFLAGS,;t t
20545 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
20546 s,@X_LIBS@,$X_LIBS,;t t
20547 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
20548 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
20549 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
20550 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
20551 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
20552 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
20553 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
20554 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
20555 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
20556 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
20557 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
20558 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
20559 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
20560 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
20561 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
20562 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
20563 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
20564 s,@RANLIB@,$RANLIB,;t t
20565 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20566 s,@ALLOCA@,$ALLOCA,;t t
20567 s,@USE_NLS@,$USE_NLS,;t t
20568 s,@MSGFMT@,$MSGFMT,;t t
20569 s,@GMSGFMT@,$GMSGFMT,;t t
20570 s,@XGETTEXT@,$XGETTEXT,;t t
20571 s,@CATALOGS@,$CATALOGS,;t t
20572 s,@CATOBJEXT@,$CATOBJEXT,;t t
20573 s,@DATADIRNAME@,$DATADIRNAME,;t t
20574 s,@GMOFILES@,$GMOFILES,;t t
20575 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
20576 s,@INTLDEPS@,$INTLDEPS,;t t
20577 s,@INTLLIBS@,$INTLLIBS,;t t
20578 s,@INTLOBJS@,$INTLOBJS,;t t
20579 s,@POFILES@,$POFILES,;t t
20580 s,@POSUB@,$POSUB,;t t
20581 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
20582 s,@login_manager_tmp@,$login_manager_tmp,;t t
20583 s,@pkg_config@,$pkg_config,;t t
20584 s,@gnome_open_program@,$gnome_open_program,;t t
20585 s,@gnome_url_show_program@,$gnome_url_show_program,;t t
20586 s,@INCLUDES@,$INCLUDES,;t t
20587 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
20588 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
20589 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
20590 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
20591 s,@GTK_LIBS@,$GTK_LIBS,;t t
20592 s,@XML_LIBS@,$XML_LIBS,;t t
20593 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
20594 s,@HACK_LIBS@,$HACK_LIBS,;t t
20595 s,@XPM_LIBS@,$XPM_LIBS,;t t
20596 s,@PTY_LIBS@,$PTY_LIBS,;t t
20597 s,@GL_LIBS@,$GL_LIBS,;t t
20598 s,@GLE_LIBS@,$GLE_LIBS,;t t
20599 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
20600 s,@XINERAMA_LIBS@,$XINERAMA_LIBS,;t t
20601 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
20602 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
20603 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
20604 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
20605 s,@NEED_SETUID@,$NEED_SETUID,;t t
20606 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
20607 s,@NEW_LOGIN_COMMAND@,$NEW_LOGIN_COMMAND,;t t
20608 s,@NEW_LOGIN_COMMAND_P@,$NEW_LOGIN_COMMAND_P,;t t
20609 s,@DEFAULT_IMAGES_P@,$DEFAULT_IMAGES_P,;t t
20610 s,@DEFAULT_IMAGE_DIRECTORY@,$DEFAULT_IMAGE_DIRECTORY,;t t
20611 s,@DEFAULT_TEXT_FILE@,$DEFAULT_TEXT_FILE,;t t
20612 s,@OBJCC@,$OBJCC,;t t
20613 s,@EXES_OSX@,$EXES_OSX,;t t
20614 s,@SCRIPTS_OSX@,$SCRIPTS_OSX,;t t
20615 s,@MEN_OSX@,$MEN_OSX,;t t
20616 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
20617 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
20618 s,@XMU_SRCS@,$XMU_SRCS,;t t
20619 s,@XMU_OBJS@,$XMU_OBJS,;t t
20620 s,@XMU_LIBS@,$XMU_LIBS,;t t
20621 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
20622 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
20623 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
20624 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
20625 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
20626 s,@JPEG_EXES@,$JPEG_EXES,;t t
20627 s,@GL_EXES@,$GL_EXES,;t t
20628 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
20629 s,@GL_MEN@,$GL_MEN,;t t
20630 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
20631 s,@GLE_EXES@,$GLE_EXES,;t t
20632 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
20633 s,@GNOME24@,$GNOME24,;t t
20634 s,@GNOME22@,$GNOME22,;t t
20635 s,@NOGNOME@,$NOGNOME,;t t
20636 s,@HACKDIR@,$HACKDIR,;t t
20637 s,@HACKDIR_FULL@,$HACKDIR_FULL,;t t
20638 s,@GTK_DATADIR@,$GTK_DATADIR,;t t
20639 s,@PO_DATADIR@,$PO_DATADIR,;t t
20640 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
20641 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
20642 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
20643 s,@DEPEND@,$DEPEND,;t t
20644 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
20645 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
20646 s,@LIBOBJS@,$LIBOBJS,;t t
20647 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
20648 CEOF
20649
20650 _ACEOF
20651
20652   cat >>$CONFIG_STATUS <<\_ACEOF
20653   # Split the substitutions into bite-sized pieces for seds with
20654   # small command number limits, like on Digital OSF/1 and HP-UX.
20655   ac_max_sed_lines=48
20656   ac_sed_frag=1 # Number of current file.
20657   ac_beg=1 # First line for current file.
20658   ac_end=$ac_max_sed_lines # Line after last line for current file.
20659   ac_more_lines=:
20660   ac_sed_cmds=
20661   while $ac_more_lines; do
20662     if test $ac_beg -gt 1; then
20663       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20664     else
20665       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20666     fi
20667     if test ! -s $tmp/subs.frag; then
20668       ac_more_lines=false
20669     else
20670       # The purpose of the label and of the branching condition is to
20671       # speed up the sed processing (if there are no `@' at all, there
20672       # is no need to browse any of the substitutions).
20673       # These are the two extra sed commands mentioned above.
20674       (echo ':t
20675   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20676       if test -z "$ac_sed_cmds"; then
20677         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20678       else
20679         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20680       fi
20681       ac_sed_frag=`expr $ac_sed_frag + 1`
20682       ac_beg=$ac_end
20683       ac_end=`expr $ac_end + $ac_max_sed_lines`
20684     fi
20685   done
20686   if test -z "$ac_sed_cmds"; then
20687     ac_sed_cmds=cat
20688   fi
20689 fi # test -n "$CONFIG_FILES"
20690
20691 _ACEOF
20692 cat >>$CONFIG_STATUS <<\_ACEOF
20693 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20694   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20695   case $ac_file in
20696   - | *:- | *:-:* ) # input from stdin
20697         cat >$tmp/stdin
20698         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20699         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20700   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20701         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20702   * )   ac_file_in=$ac_file.in ;;
20703   esac
20704
20705   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20706   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
20707 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20708          X"$ac_file" : 'X\(//\)[^/]' \| \
20709          X"$ac_file" : 'X\(//\)$' \| \
20710          X"$ac_file" : 'X\(/\)' \| \
20711          .     : '\(.\)' 2>/dev/null ||
20712 echo X"$ac_file" |
20713     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20714           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20715           /^X\(\/\/\)$/{ s//\1/; q; }
20716           /^X\(\/\).*/{ s//\1/; q; }
20717           s/.*/./; q'`
20718   { if $as_mkdir_p; then
20719     mkdir -p "$ac_dir"
20720   else
20721     as_dir="$ac_dir"
20722     as_dirs=
20723     while test ! -d "$as_dir"; do
20724       as_dirs="$as_dir $as_dirs"
20725       as_dir=`(dirname "$as_dir") 2>/dev/null ||
20726 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20727          X"$as_dir" : 'X\(//\)[^/]' \| \
20728          X"$as_dir" : 'X\(//\)$' \| \
20729          X"$as_dir" : 'X\(/\)' \| \
20730          .     : '\(.\)' 2>/dev/null ||
20731 echo X"$as_dir" |
20732     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20733           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20734           /^X\(\/\/\)$/{ s//\1/; q; }
20735           /^X\(\/\).*/{ s//\1/; q; }
20736           s/.*/./; q'`
20737     done
20738     test ! -n "$as_dirs" || mkdir $as_dirs
20739   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20740 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20741    { (exit 1); exit 1; }; }; }
20742
20743   ac_builddir=.
20744
20745 if test "$ac_dir" != .; then
20746   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
20747   # A "../" for each directory in $ac_dir_suffix.
20748   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
20749 else
20750   ac_dir_suffix= ac_top_builddir=
20751 fi
20752
20753 case $srcdir in
20754   .)  # No --srcdir option.  We are building in place.
20755     ac_srcdir=.
20756     if test -z "$ac_top_builddir"; then
20757        ac_top_srcdir=.
20758     else
20759        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
20760     fi ;;
20761   [\\/]* | ?:[\\/]* )  # Absolute path.
20762     ac_srcdir=$srcdir$ac_dir_suffix;
20763     ac_top_srcdir=$srcdir ;;
20764   *) # Relative path.
20765     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
20766     ac_top_srcdir=$ac_top_builddir$srcdir ;;
20767 esac
20768
20769 # Do not use `cd foo && pwd` to compute absolute paths, because
20770 # the directories may not exist.
20771 case `pwd` in
20772 .) ac_abs_builddir="$ac_dir";;
20773 *)
20774   case "$ac_dir" in
20775   .) ac_abs_builddir=`pwd`;;
20776   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
20777   *) ac_abs_builddir=`pwd`/"$ac_dir";;
20778   esac;;
20779 esac
20780 case $ac_abs_builddir in
20781 .) ac_abs_top_builddir=${ac_top_builddir}.;;
20782 *)
20783   case ${ac_top_builddir}. in
20784   .) ac_abs_top_builddir=$ac_abs_builddir;;
20785   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
20786   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
20787   esac;;
20788 esac
20789 case $ac_abs_builddir in
20790 .) ac_abs_srcdir=$ac_srcdir;;
20791 *)
20792   case $ac_srcdir in
20793   .) ac_abs_srcdir=$ac_abs_builddir;;
20794   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
20795   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
20796   esac;;
20797 esac
20798 case $ac_abs_builddir in
20799 .) ac_abs_top_srcdir=$ac_top_srcdir;;
20800 *)
20801   case $ac_top_srcdir in
20802   .) ac_abs_top_srcdir=$ac_abs_builddir;;
20803   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
20804   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
20805   esac;;
20806 esac
20807
20808
20809   case $INSTALL in
20810   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20811   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
20812   esac
20813
20814   if test x"$ac_file" != x-; then
20815     { echo "$as_me:$LINENO: creating $ac_file" >&5
20816 echo "$as_me: creating $ac_file" >&6;}
20817     rm -f "$ac_file"
20818   fi
20819   # Let's still pretend it is `configure' which instantiates (i.e., don't
20820   # use $as_me), people would be surprised to read:
20821   #    /* config.h.  Generated by config.status.  */
20822   if test x"$ac_file" = x-; then
20823     configure_input=
20824   else
20825     configure_input="$ac_file.  "
20826   fi
20827   configure_input=$configure_input"Generated from `echo $ac_file_in |
20828                                      sed 's,.*/,,'` by configure."
20829
20830   # First look for the input files in the build tree, otherwise in the
20831   # src tree.
20832   ac_file_inputs=`IFS=:
20833     for f in $ac_file_in; do
20834       case $f in
20835       -) echo $tmp/stdin ;;
20836       [\\/$]*)
20837          # Absolute (can't be DOS-style, as IFS=:)
20838          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20839 echo "$as_me: error: cannot find input file: $f" >&2;}
20840    { (exit 1); exit 1; }; }
20841          echo "$f";;
20842       *) # Relative
20843          if test -f "$f"; then
20844            # Build tree
20845            echo "$f"
20846          elif test -f "$srcdir/$f"; then
20847            # Source tree
20848            echo "$srcdir/$f"
20849          else
20850            # /dev/null tree
20851            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20852 echo "$as_me: error: cannot find input file: $f" >&2;}
20853    { (exit 1); exit 1; }; }
20854          fi;;
20855       esac
20856     done` || { (exit 1); exit 1; }
20857 _ACEOF
20858 cat >>$CONFIG_STATUS <<_ACEOF
20859   sed "$ac_vpsub
20860 $extrasub
20861 _ACEOF
20862 cat >>$CONFIG_STATUS <<\_ACEOF
20863 :t
20864 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20865 s,@configure_input@,$configure_input,;t t
20866 s,@srcdir@,$ac_srcdir,;t t
20867 s,@abs_srcdir@,$ac_abs_srcdir,;t t
20868 s,@top_srcdir@,$ac_top_srcdir,;t t
20869 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
20870 s,@builddir@,$ac_builddir,;t t
20871 s,@abs_builddir@,$ac_abs_builddir,;t t
20872 s,@top_builddir@,$ac_top_builddir,;t t
20873 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
20874 s,@INSTALL@,$ac_INSTALL,;t t
20875 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20876   rm -f $tmp/stdin
20877   if test x"$ac_file" != x-; then
20878     mv $tmp/out $ac_file
20879   else
20880     cat $tmp/out
20881     rm -f $tmp/out
20882   fi
20883
20884 done
20885 _ACEOF
20886 cat >>$CONFIG_STATUS <<\_ACEOF
20887
20888 #
20889 # CONFIG_HEADER section.
20890 #
20891
20892 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20893 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20894 #
20895 # ac_d sets the value in "#define NAME VALUE" lines.
20896 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
20897 ac_dB='[         ].*$,\1#\2'
20898 ac_dC=' '
20899 ac_dD=',;t'
20900 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20901 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20902 ac_uB='$,\1#\2define\3'
20903 ac_uC=' '
20904 ac_uD=',;t'
20905
20906 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20907   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20908   case $ac_file in
20909   - | *:- | *:-:* ) # input from stdin
20910         cat >$tmp/stdin
20911         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20912         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20913   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20914         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20915   * )   ac_file_in=$ac_file.in ;;
20916   esac
20917
20918   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
20919 echo "$as_me: creating $ac_file" >&6;}
20920
20921   # First look for the input files in the build tree, otherwise in the
20922   # src tree.
20923   ac_file_inputs=`IFS=:
20924     for f in $ac_file_in; do
20925       case $f in
20926       -) echo $tmp/stdin ;;
20927       [\\/$]*)
20928          # Absolute (can't be DOS-style, as IFS=:)
20929          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20930 echo "$as_me: error: cannot find input file: $f" >&2;}
20931    { (exit 1); exit 1; }; }
20932          # Do quote $f, to prevent DOS paths from being IFS'd.
20933          echo "$f";;
20934       *) # Relative
20935          if test -f "$f"; then
20936            # Build tree
20937            echo "$f"
20938          elif test -f "$srcdir/$f"; then
20939            # Source tree
20940            echo "$srcdir/$f"
20941          else
20942            # /dev/null tree
20943            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20944 echo "$as_me: error: cannot find input file: $f" >&2;}
20945    { (exit 1); exit 1; }; }
20946          fi;;
20947       esac
20948     done` || { (exit 1); exit 1; }
20949   # Remove the trailing spaces.
20950   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
20951
20952 _ACEOF
20953
20954 # Transform confdefs.h into two sed scripts, `conftest.defines' and
20955 # `conftest.undefs', that substitutes the proper values into
20956 # config.h.in to produce config.h.  The first handles `#define'
20957 # templates, and the second `#undef' templates.
20958 # And first: Protect against being on the right side of a sed subst in
20959 # config.status.  Protect against being in an unquoted here document
20960 # in config.status.
20961 rm -f conftest.defines conftest.undefs
20962 # Using a here document instead of a string reduces the quoting nightmare.
20963 # Putting comments in sed scripts is not portable.
20964 #
20965 # `end' is used to avoid that the second main sed command (meant for
20966 # 0-ary CPP macros) applies to n-ary macro definitions.
20967 # See the Autoconf documentation for `clear'.
20968 cat >confdef2sed.sed <<\_ACEOF
20969 s/[\\&,]/\\&/g
20970 s,[\\$`],\\&,g
20971 t clear
20972 : clear
20973 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
20974 t end
20975 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
20976 : end
20977 _ACEOF
20978 # If some macros were called several times there might be several times
20979 # the same #defines, which is useless.  Nevertheless, we may not want to
20980 # sort them, since we want the *last* AC-DEFINE to be honored.
20981 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
20982 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
20983 rm -f confdef2sed.sed
20984
20985 # This sed command replaces #undef with comments.  This is necessary, for
20986 # example, in the case of _POSIX_SOURCE, which is predefined and required
20987 # on some systems where configure will not decide to define it.
20988 cat >>conftest.undefs <<\_ACEOF
20989 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
20990 _ACEOF
20991
20992 # Break up conftest.defines because some shells have a limit on the size
20993 # of here documents, and old seds have small limits too (100 cmds).
20994 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
20995 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
20996 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
20997 echo '  :' >>$CONFIG_STATUS
20998 rm -f conftest.tail
20999 while grep . conftest.defines >/dev/null
21000 do
21001   # Write a limited-size here document to $tmp/defines.sed.
21002   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
21003   # Speed up: don't consider the non `#define' lines.
21004   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
21005   # Work around the forget-to-reset-the-flag bug.
21006   echo 't clr' >>$CONFIG_STATUS
21007   echo ': clr' >>$CONFIG_STATUS
21008   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
21009   echo 'CEOF
21010   sed -f $tmp/defines.sed $tmp/in >$tmp/out
21011   rm -f $tmp/in
21012   mv $tmp/out $tmp/in
21013 ' >>$CONFIG_STATUS
21014   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
21015   rm -f conftest.defines
21016   mv conftest.tail conftest.defines
21017 done
21018 rm -f conftest.defines
21019 echo '  fi # grep' >>$CONFIG_STATUS
21020 echo >>$CONFIG_STATUS
21021
21022 # Break up conftest.undefs because some shells have a limit on the size
21023 # of here documents, and old seds have small limits too (100 cmds).
21024 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
21025 rm -f conftest.tail
21026 while grep . conftest.undefs >/dev/null
21027 do
21028   # Write a limited-size here document to $tmp/undefs.sed.
21029   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
21030   # Speed up: don't consider the non `#undef'
21031   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
21032   # Work around the forget-to-reset-the-flag bug.
21033   echo 't clr' >>$CONFIG_STATUS
21034   echo ': clr' >>$CONFIG_STATUS
21035   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
21036   echo 'CEOF
21037   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
21038   rm -f $tmp/in
21039   mv $tmp/out $tmp/in
21040 ' >>$CONFIG_STATUS
21041   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
21042   rm -f conftest.undefs
21043   mv conftest.tail conftest.undefs
21044 done
21045 rm -f conftest.undefs
21046
21047 cat >>$CONFIG_STATUS <<\_ACEOF
21048   # Let's still pretend it is `configure' which instantiates (i.e., don't
21049   # use $as_me), people would be surprised to read:
21050   #    /* config.h.  Generated by config.status.  */
21051   if test x"$ac_file" = x-; then
21052     echo "/* Generated by configure.  */" >$tmp/config.h
21053   else
21054     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
21055   fi
21056   cat $tmp/in >>$tmp/config.h
21057   rm -f $tmp/in
21058   if test x"$ac_file" != x-; then
21059     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
21060       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21061 echo "$as_me: $ac_file is unchanged" >&6;}
21062     else
21063       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21064 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21065          X"$ac_file" : 'X\(//\)[^/]' \| \
21066          X"$ac_file" : 'X\(//\)$' \| \
21067          X"$ac_file" : 'X\(/\)' \| \
21068          .     : '\(.\)' 2>/dev/null ||
21069 echo X"$ac_file" |
21070     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21071           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21072           /^X\(\/\/\)$/{ s//\1/; q; }
21073           /^X\(\/\).*/{ s//\1/; q; }
21074           s/.*/./; q'`
21075       { if $as_mkdir_p; then
21076     mkdir -p "$ac_dir"
21077   else
21078     as_dir="$ac_dir"
21079     as_dirs=
21080     while test ! -d "$as_dir"; do
21081       as_dirs="$as_dir $as_dirs"
21082       as_dir=`(dirname "$as_dir") 2>/dev/null ||
21083 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21084          X"$as_dir" : 'X\(//\)[^/]' \| \
21085          X"$as_dir" : 'X\(//\)$' \| \
21086          X"$as_dir" : 'X\(/\)' \| \
21087          .     : '\(.\)' 2>/dev/null ||
21088 echo X"$as_dir" |
21089     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21090           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21091           /^X\(\/\/\)$/{ s//\1/; q; }
21092           /^X\(\/\).*/{ s//\1/; q; }
21093           s/.*/./; q'`
21094     done
21095     test ! -n "$as_dirs" || mkdir $as_dirs
21096   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21097 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21098    { (exit 1); exit 1; }; }; }
21099
21100       rm -f $ac_file
21101       mv $tmp/config.h $ac_file
21102     fi
21103   else
21104     cat $tmp/config.h
21105     rm -f $tmp/config.h
21106   fi
21107 done
21108 _ACEOF
21109 cat >>$CONFIG_STATUS <<\_ACEOF
21110
21111 #
21112 # CONFIG_COMMANDS section.
21113 #
21114 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21115   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21116   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21117   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
21118 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21119          X"$ac_dest" : 'X\(//\)[^/]' \| \
21120          X"$ac_dest" : 'X\(//\)$' \| \
21121          X"$ac_dest" : 'X\(/\)' \| \
21122          .     : '\(.\)' 2>/dev/null ||
21123 echo X"$ac_dest" |
21124     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21125           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21126           /^X\(\/\/\)$/{ s//\1/; q; }
21127           /^X\(\/\).*/{ s//\1/; q; }
21128           s/.*/./; q'`
21129   { if $as_mkdir_p; then
21130     mkdir -p "$ac_dir"
21131   else
21132     as_dir="$ac_dir"
21133     as_dirs=
21134     while test ! -d "$as_dir"; do
21135       as_dirs="$as_dir $as_dirs"
21136       as_dir=`(dirname "$as_dir") 2>/dev/null ||
21137 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21138          X"$as_dir" : 'X\(//\)[^/]' \| \
21139          X"$as_dir" : 'X\(//\)$' \| \
21140          X"$as_dir" : 'X\(/\)' \| \
21141          .     : '\(.\)' 2>/dev/null ||
21142 echo X"$as_dir" |
21143     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21144           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21145           /^X\(\/\/\)$/{ s//\1/; q; }
21146           /^X\(\/\).*/{ s//\1/; q; }
21147           s/.*/./; q'`
21148     done
21149     test ! -n "$as_dirs" || mkdir $as_dirs
21150   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21151 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21152    { (exit 1); exit 1; }; }; }
21153
21154   ac_builddir=.
21155
21156 if test "$ac_dir" != .; then
21157   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21158   # A "../" for each directory in $ac_dir_suffix.
21159   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
21160 else
21161   ac_dir_suffix= ac_top_builddir=
21162 fi
21163
21164 case $srcdir in
21165   .)  # No --srcdir option.  We are building in place.
21166     ac_srcdir=.
21167     if test -z "$ac_top_builddir"; then
21168        ac_top_srcdir=.
21169     else
21170        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
21171     fi ;;
21172   [\\/]* | ?:[\\/]* )  # Absolute path.
21173     ac_srcdir=$srcdir$ac_dir_suffix;
21174     ac_top_srcdir=$srcdir ;;
21175   *) # Relative path.
21176     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
21177     ac_top_srcdir=$ac_top_builddir$srcdir ;;
21178 esac
21179
21180 # Do not use `cd foo && pwd` to compute absolute paths, because
21181 # the directories may not exist.
21182 case `pwd` in
21183 .) ac_abs_builddir="$ac_dir";;
21184 *)
21185   case "$ac_dir" in
21186   .) ac_abs_builddir=`pwd`;;
21187   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
21188   *) ac_abs_builddir=`pwd`/"$ac_dir";;
21189   esac;;
21190 esac
21191 case $ac_abs_builddir in
21192 .) ac_abs_top_builddir=${ac_top_builddir}.;;
21193 *)
21194   case ${ac_top_builddir}. in
21195   .) ac_abs_top_builddir=$ac_abs_builddir;;
21196   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
21197   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
21198   esac;;
21199 esac
21200 case $ac_abs_builddir in
21201 .) ac_abs_srcdir=$ac_srcdir;;
21202 *)
21203   case $ac_srcdir in
21204   .) ac_abs_srcdir=$ac_abs_builddir;;
21205   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
21206   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
21207   esac;;
21208 esac
21209 case $ac_abs_builddir in
21210 .) ac_abs_top_srcdir=$ac_top_srcdir;;
21211 *)
21212   case $ac_top_srcdir in
21213   .) ac_abs_top_srcdir=$ac_abs_builddir;;
21214   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
21215   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
21216   esac;;
21217 esac
21218
21219
21220   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
21221 echo "$as_me: executing $ac_dest commands" >&6;}
21222   case $ac_dest in
21223     default-1 )
21224
21225 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
21226 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
21227   rm -f intltool-extract.out
21228 else
21229   mv -f intltool-extract.out intltool-extract
21230 fi
21231 chmod ugo+x intltool-extract
21232 chmod u+w intltool-extract
21233
21234 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
21235 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
21236   rm -f intltool-merge.out
21237 else
21238   mv -f intltool-merge.out intltool-merge
21239 fi
21240 chmod ugo+x intltool-merge
21241 chmod u+w intltool-merge
21242
21243 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
21244 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
21245   rm -f intltool-update.out
21246 else
21247   mv -f intltool-update.out intltool-update
21248 fi
21249 chmod ugo+x intltool-update
21250 chmod u+w intltool-update
21251
21252  ;;
21253     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
21254         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
21255       esac ;;
21256   esac
21257 done
21258 _ACEOF
21259
21260 cat >>$CONFIG_STATUS <<\_ACEOF
21261
21262 { (exit 0); exit 0; }
21263 _ACEOF
21264 chmod +x $CONFIG_STATUS
21265 ac_clean_files=$ac_clean_files_save
21266
21267
21268 # configure is writing to config.log, and then calls config.status.
21269 # config.status does its own redirection, appending to config.log.
21270 # Unfortunately, on DOS this fails, as config.log is still kept open
21271 # by configure, so config.status won't be able to write to it; its
21272 # output is simply discarded.  So we exec the FD to /dev/null,
21273 # effectively closing config.log, so it can be properly (re)opened and
21274 # appended to by config.status.  When coming back to configure, we
21275 # need to make the FD available again.
21276 if test "$no_create" != yes; then
21277   ac_cs_success=:
21278   ac_config_status_args=
21279   test "$silent" = yes &&
21280     ac_config_status_args="$ac_config_status_args --quiet"
21281   exec 5>/dev/null
21282   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21283   exec 5>>config.log
21284   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21285   # would make configure fail if this is the last instruction.
21286   $ac_cs_success || { (exit 1); exit 1; }
21287 fi
21288
21289
21290 ###############################################################################
21291 #
21292 #       Print some warnings at the end.
21293 #
21294 ###############################################################################
21295
21296 warn_prefix_1="    Warning:"
21297 warn_prefix_2="       Note:"
21298 warn_prefix="$warn_prefix_1"
21299
21300 warning=no
21301 warnsep='    #################################################################'
21302
21303 warnpre() {
21304   if test "$warning" = no ; then
21305     echo '' ; echo "$warnsep" ; echo ''
21306     warning=yes
21307   fi
21308 }
21309
21310 warn() {
21311   warnpre
21312   if test "$warning" = long ; then echo '' ; fi
21313   warning=yes
21314   rest="$@"
21315   echo "$warn_prefix $rest"
21316 }
21317
21318 warnL() {
21319   was=$warning
21320   warnpre
21321   warning=yes
21322   if test "$was" != no ; then echo '' ; fi
21323   rest="$@"
21324   echo "$warn_prefix $rest"
21325 }
21326
21327 warn2() {
21328   rest="$@"
21329   echo "             $rest"
21330   warning=long
21331 }
21332
21333 note() {
21334   warn_prefix="$warn_prefix_2"
21335   warn $@
21336   warn_prefix="$warn_prefix_1"
21337 }
21338
21339 noteL() {
21340   warn_prefix="$warn_prefix_2"
21341   warnL $@
21342   warn_prefix="$warn_prefix_1"
21343 }
21344
21345
21346 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
21347   warn 'The SGI saver extension was requested, but was not found.'
21348 fi
21349
21350 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
21351   warn 'The XIdle extension was requested, but was not found.'
21352 fi
21353
21354 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
21355   warn 'The XSHM extension was requested, but was not found.'
21356 fi
21357
21358 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
21359   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
21360 fi
21361
21362 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
21363   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
21364 fi
21365
21366 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
21367   warn 'The DPMS extension was requested, but was not found.'
21368 fi
21369
21370 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
21371   warn 'The Xinerama extension was requested, but was not found.'
21372 fi
21373
21374 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
21375   warn 'The XF86VMODE extension was requested, but was not found.'
21376 fi
21377
21378 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
21379   warn 'The RANDR extension was requested, but was not found.'
21380 fi
21381
21382 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
21383   warn "Checking of /proc/interrupts was requested, but it's bogus."
21384 fi
21385
21386 if test "$pkg_config" = false ; then
21387   warnL 'The "pkg-config" program was not found.  Without that,'
21388   warn2 "detection of the various GTK libraries won't work."
21389 else
21390   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
21391   if test "x$pkgerr" != "x" ; then
21392     warnL 'The "pkg-config" program produces errors.  This often causes'
21393     warn2 "detection of the various GTK libraries to malfunction."
21394     warn2 "The errors are:"
21395     echo ''
21396     echo "$pkgerr" | sed 's/^/             > /g'
21397   fi
21398 fi
21399
21400 if test "$gtk_halfassed" != no ; then
21401   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
21402   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
21403   warn2 "Perhaps some of the development packages are not installed?"
21404   if test "$have_gtk" = yes ; then
21405     v="$ac_gtk_version_string"
21406     warn2 "GTK $v is also installed, so it will be used instead."
21407     warn2 "Please read the above output and the \`config.log' file"
21408     warn2 "for more details."
21409   fi
21410 fi
21411
21412 motif_warn2() {
21413   warn2 'Though the Motif front-end to xscreensaver is still'
21414   warn2 'maintained, it is no longer being updated with new'
21415   warn2 'features: all new development on the xscreensaver-demo'
21416   warn2 'program is happening in the GTK version, and not in the'
21417   warn2 'Motif version.  It is recommended that you build against'
21418   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
21419 }
21420
21421 if test "$have_motif" = no -a "$have_gtk" = no; then
21422
21423   if test "$with_motif" = yes; then
21424     warnL "Neither the GTK nor Motif libraries were found; the"
21425     warn2 "\`xscreensaver-demo' program requires one of these."
21426     echo ''
21427     motif_warn2
21428   else
21429     warnL "The GTK libraries do not seem to be available; the"
21430     warn2 "\`xscreensaver-demo' program requires them."
21431 #   echo ''
21432 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
21433 #   warn2 "\`--with-motif' option) but that is NOT recommended."
21434 #   motif_warn2
21435   fi
21436
21437 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
21438   warnL "Use of Motif was requested, but it wasn't found;"
21439   warn2 "Gtk will be used instead."
21440
21441 elif test "$jurassic_gtk" = yes ; then
21442
21443   pref_gtk=2.0
21444
21445   v="$ac_gtk_version_string"
21446   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
21447     warnL "Use of Gtk was requested, but its version number is unknown;"
21448   elif test "$with_gtk_req" = yes ; then
21449     warnL "Use of Gtk was requested, but it is version $v;"
21450   else
21451     warnL "Gtk was found on this system, but it is version $v;"
21452   fi
21453
21454   warn2 "Gtk $pref_gtk or newer is required."
21455
21456 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
21457   warnL "Use of Gtk was requested, but it wasn't found."
21458 fi
21459
21460
21461 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
21462   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
21463   warn2 "headers were not found.  That can't be good.  Please"
21464   warn2 "install the GDK-Pixbuf development kit and re-configure."
21465 fi
21466
21467 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
21468
21469   preferred_lesstif=0.92
21470
21471   if test "$lesstif_version" = unknown; then
21472     warnL "Unable to determine the LessTif version number!"
21473     warn2 "Make sure you are using version $preferred_lesstif or newer."
21474     warn2 "See <http://www.lesstif.org/>."
21475
21476   elif test \! $lesstif_version -gt 82; then
21477     warnL "LessTif version $lesstif_version_string is being used."
21478     warn2 "LessTif versions 0.82 and earlier are too buggy to"
21479     warn2 "use with XScreenSaver; it is strongly recommended"
21480     warn2 "that you upgrade to at least version $preferred_lesstif!"
21481     warn2 "See <http://www.lesstif.org/>."
21482   fi
21483 fi
21484
21485
21486 if test "$have_motif" = yes -a "$have_gtk" = no ; then
21487   warn  'Motif is being used, and GTK is not.'
21488   echo  ''
21489   motif_warn2
21490 fi
21491
21492
21493 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
21494   warnL 'Use of XPM was requested, but it was not found.'
21495 fi
21496
21497 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
21498   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
21499 fi
21500
21501 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
21502    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
21503
21504   if test "$with_gdk_pixbuf_req" = yes ; then
21505     true
21506   elif test "$with_gdk_pixbuf_req" = no ; then
21507     warnL 'The GDK-Pixbuf library is not being used.'
21508   else
21509     warnL 'The GDK-Pixbuf library was not found.'
21510   fi
21511
21512   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
21513     true
21514   elif test "$with_xpm_req" = no ; then
21515     warnL 'The XPM library is not being used.'
21516   else
21517     warnL 'The XPM library was not found.'
21518   fi
21519
21520   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
21521     warn2 'The XPM library is being used instead.'
21522   fi
21523
21524   if test "$gdk_pixbuf_halfassed" = yes ; then
21525     echo ''
21526     warn2 'More specifically, we found the headers, but not the'
21527     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
21528     warn2 "system, or something else went wrong.  The \`config.log'"
21529     warn2 'file might contain some clues.'
21530   fi
21531
21532   echo ''
21533   warn2 'Some of the demos will not use images as much as they could.'
21534   warn2 'You should consider installing GDK-Pixbuf and re-running'
21535   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
21536   warn2 'provides support for more image formats.)'
21537 fi
21538
21539
21540 if test "$have_jpeg" = no ; then
21541   if test "$with_jpeg_req" = yes ; then
21542     warnL 'Use of libjpeg was requested, but it was not found.'
21543   elif test "$with_jpeg_req" = no ; then
21544     noteL 'The JPEG library is not being used.'
21545   else
21546     noteL 'The JPEG library was not found.'
21547   fi
21548
21549   if test "$jpeg_halfassed" = yes ; then
21550     echo ''
21551     warn2 'More specifically, we found the headers, but not the'
21552     warn2 'library; so either JPEG is half-installed on this'
21553     warn2 "system, or something else went wrong.  The \`config.log'"
21554     warn2 'file might contain some clues.'
21555     echo ''
21556   fi
21557
21558   if test "$have_gdk_pixbuf" = no ; then
21559     warn2 "This means that it won't be possible for the image-manipulating"
21560     warn2 "display modes to load files from disk; and it also means that"
21561     warn2 "the \`webcollage' program will be much slower."
21562   else
21563     warn2 "This means the \`webcollage' program will be much slower."
21564   fi
21565 fi
21566
21567
21568 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
21569   preferred_mesagl=3.4
21570   mgv="$ac_mesagl_version_string"
21571   pgl="$preferred_mesagl"
21572
21573   if test "$ac_mesagl_version" = unknown; then
21574     warnL "Unable to determine the MesaGL version number!"
21575     warn2 "Make sure you are using version $preferred_mesagl or newer."
21576
21577   elif test \! "$ac_mesagl_version" -gt 2006; then
21578     warnL "MesaGL version number is $mgv --"
21579     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
21580     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
21581
21582   elif test \! "$ac_mesagl_version" -gt 3003; then
21583     warnL "MesaGL version number is $mgv --"
21584     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
21585     warn2 "that you upgrade to $pgl or newer."
21586   fi
21587 fi
21588
21589 if test "$have_gl" = no ; then
21590   if test "$with_gl_req" = yes ; then
21591     warnL 'Use of GL was requested, but it was not found.'
21592   elif test "$with_gl_req" = no ; then
21593     noteL 'The OpenGL 3D library is not being used.'
21594   else
21595     noteL 'The OpenGL 3D library was not found.'
21596   fi
21597
21598   if test "$gl_halfassed" = yes ; then
21599     echo ''
21600     warn2 'More specifically, we found the headers, but not the'
21601     warn2 'libraries; so either GL is half-installed on this'
21602     warn2 "system, or something else went wrong.  The \`config.log'"
21603     warn2 'file might contain some clues.'
21604   fi
21605
21606   echo ''
21607   warn2 'Those demos which use 3D will not be built or installed.'
21608   warn2 'You might want to consider installing OpenGL and'
21609   warn2 "re-running configure.  If your vendor doesn't ship"
21610   warn2 'their own implementation of OpenGL, you can get a free'
21611   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
21612   warn2 'info, see <http://www.opengl.org/>.'
21613
21614 fi
21615
21616
21617 if test "$have_gl" = yes -a "$have_gle" = no ; then
21618
21619  # nobody cares about this; don't print the warning unless it was
21620  # requested and not found, or halfway-found.
21621  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
21622
21623   if test "$with_gle_req" = yes ; then
21624     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
21625     warn2 'it was not found (though the OpenGL library was found, and'
21626     warn2 'is being used.)'
21627   elif test "$with_gle_req" = no ; then
21628     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
21629     warn2 'library is not.'
21630   else
21631     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
21632     warn2 'was not.'
21633   fi
21634
21635   if test "$gle_halfassed" = yes ; then
21636     echo ''
21637     warn2 'More specifically, we found the headers, but not the'
21638     warn2 'libraries; so either GLE is half-installed on this'
21639     warn2 "system, or something else went wrong.  The \`config.log'"
21640     warn2 'file might contain some clues.'
21641   fi
21642
21643   echo ''
21644   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
21645   warn2 'will not be built or installed.  You might want to consider'
21646   warn2 'installing GLE and re-running configure.  You can find the'
21647   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
21648   warn2 'OpenGL info, see <http://www.opengl.org/>.'
21649
21650  fi
21651 fi
21652
21653
21654 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
21655   warn 'Use of XReadDisplay was requested, but it was not found.'
21656 fi
21657
21658 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
21659   warn 'Use of Kerberos was requested, but it was not found.'
21660 fi
21661
21662 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
21663   warn 'Use of PAM was requested, but it was not found.'
21664 fi
21665
21666 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
21667   warn 'Use of shadow passwords was requested, but they were not found.'
21668 fi
21669
21670
21671 # You are in a twisty maze of namespaces and syntaxes, all alike.
21672 # Fuck the skull of Unix.
21673 #
21674 eval bindir=${bindir}
21675 eval bindir=${bindir}
21676 eval bindir=${bindir}
21677 eval bindir=${bindir}
21678 eval bindir=${bindir}
21679 eval bindir=${bindir}
21680 eval HACKDIR=${HACKDIR}
21681 eval HACKDIR=${HACKDIR}
21682 eval HACKDIR=${HACKDIR}
21683 eval HACKDIR=${HACKDIR}
21684 eval HACKDIR=${HACKDIR}
21685 eval HACKDIR=${HACKDIR}
21686 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21687 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21688 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21689 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21690 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21691 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21692
21693 # canonicalize slashes.
21694 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
21695 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
21696 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
21697
21698
21699 # Sanity check the hackdir
21700 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
21701   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
21702     echo ""
21703     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
21704                    There will be an executable installed with that name, so
21705                    that can't be the name of a directory as well.  Please
21706                    re-configure with a different directory name." >&5
21707 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
21708                    There will be an executable installed with that name, so
21709                    that can't be the name of a directory as well.  Please
21710                    re-configure with a different directory name." >&2;}
21711    { (exit 1); exit 1; }; }
21712   fi
21713 done
21714
21715
21716 do_dir_warning=no
21717
21718 # Now let's warn if there's a previous RPM version already installed.
21719 # But don't bother with this test if we are currently *building* an RPM.
21720
21721 if test -z "$RPM_PACKAGE_VERSION" ; then
21722
21723   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
21724
21725   # M4 sucks!!
21726
21727   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
21728         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
21729         head -1`
21730
21731
21732   if test \! -z "$rpmv" ; then
21733     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
21734     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/attraction$@\1@p'`
21735
21736     warning=no
21737     warnL "There is already an installed RPM of xscreensaver $rpmv"
21738     warn2 'on this system.  You might want to remove it ("rpm -ve")'
21739     warn2 'before running "make install" in this directory.'
21740     echo ""
21741     warn2 "Alternately, you could build this version of xscreensaver"
21742     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
21743     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
21744     warn2 "See the RPM documentation for more info."
21745     echo ""
21746
21747     if test "$rpmbdir" = "$rpmhdir" ; then
21748       warn2 "The RPM version was installed in $rpmbdir/."
21749       do_dir_warning=yes
21750     else
21751       warn2 "The RPM version was installed in $rpmbdir/,"
21752       warn2 "with demos in $rpmhdir/."
21753     fi
21754   fi
21755 fi
21756
21757 if test "${bindir}" = "${HACKDIR}" ; then
21758   do_dir_warning=yes
21759 fi
21760
21761 if test "$do_dir_warning" = yes; then
21762   echo ""
21763   echo "$warnsep"
21764   echo ""
21765   echo '      When you run "make install", the "xscreensaver",'
21766   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
21767   echo "      will be installed in ${bindir}/."
21768   echo ""
21769   echo "      The various graphics demos (190+ different executables) will"
21770   echo "      be installed in ${HACKDIR}/."
21771   echo ""
21772   echo "      If you would prefer the demos to be installed elsewhere,"
21773   echo "      you should re-run configure with the --with-hackdir=DIR"
21774   echo "      option.  For more information, run \`./configure --help'."
21775   warning=yes
21776 fi
21777
21778 if test "$warning" != no; then
21779   echo '' ; echo "$warnsep" ; echo ''
21780 fi
21781
21782 if test "$do_dir_warning" = no; then
21783   if test "$warning" = no; then
21784     echo ''
21785   fi
21786   echo "User programs will be installed in ${bindir}/"
21787   echo "Screen savers will be installed in ${HACKDIR}/"
21788   echo "Hack configurations will be installed in ${HACK_CONF_DIR}/"
21789   echo "Saver configuration will be installed in ${APPDEFAULTS}/"
21790   echo ''
21791 fi