ftp://ftp.krokus.ru/pub/OpenBSD/distfiles/xscreensaver-5.01.tar.gz
[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 HAVE_PAM_FAIL_DELAY NEW_LOGIN_COMMAND NEW_LOGIN_COMMAND_P DEFAULT_IMAGES_P DEFAULT_IMAGE_DIRECTORY DEFAULT_TEXT_FILE WITH_BROWSER 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   --enable-root-passwd        Allow root passwd to unlock screen.
855   --disable-root-passwd       Do not allow that.
856
857 Optional Packages:
858   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
859   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
860
861
862 Installation options:
863   --with-hackdir=DIR      Where to install the hundreds of demo executables.
864                           Default: `PREFIX/libexec/xscreensaver/'
865   --with-configdir=DIR    Where to install the data files that describe each
866                           of the display modes to the GUI.
867                           Default: `PREFIX/share/xscreensaver/config/'
868   --with-x-app-defaults=DIR
869                            Where to install xscreensaver configuration file.
870
871 Except where noted, all of the --with options below can also take a
872 directory argument: for example, `--with-motif=/opt/Motif'.  That would
873 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
874 to be added to the -L list, assuming those directories exist.
875
876 By default, support for each of these options will be built in, if the
877 relevant library routines exist.  At run time, they will then be used
878 only if the X server being used supports them.  Each --with option has
879 a corresponding --without option, to override building support for them
880 at all.
881
882 Screen blanking and idle-detection options:
883
884   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
885   --with-xidle-ext        Include support for the XIDLE extension.
886   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
887   --with-dpms-ext         Include support for the DPMS extension.
888   --with-xinerama-ext     Include support for the XINERAMA extension.
889   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
890   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
891   --with-randr-ext        Include support for the X Resize+Rotate extension.
892   --with-proc-interrupts  Include support for consulting the /proc/interrupts
893                           file to notice keyboard activity.
894   --with-pam              Include support for PAM (Pluggable Auth Modules.)
895   --with-pam-service-name=NAME
896                           NAME is the name of the PAM service that
897                           xscreensaver will authenticate as.
898   --with-kerberos         Include support for Kerberos authentication.
899   --with-shadow           Include support for shadow password authentication.
900   --with-passwd-helper    Include support for an external password
901                           verification helper program.
902   --with-login-manager    Put a "New Login" button on the unlock dialog that
903                           runs a login manager such as gdmflexiserver.
904
905 User interface options:
906
907   --with-gtk              Use the Gtk toolkit for the user interface.
908   --with-motif            Use the Motif toolkit for the user interface
909                           (not recommended.)
910
911 Graphics options:
912
913   --with-gl               Build those demos which depend on OpenGL.
914   --with-gle              Build those demos which depend on GLE
915                           (the OpenGL "extrusion" library.)
916   --with-pixbuf           Include support for the GDK-Pixbuf library in some
917                           demos, which will make it possible for them to read
918                           GIF, JPEG, and PNG files as well.
919   --with-xpm              Include support for XPM files in some demos.
920                           (Not needed if Pixbuf is used.)
921   --with-jpeg             Include support for the JPEG library.
922   --with-xshm-ext         Include support for the Shared Memory extension.
923   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
924   --with-readdisplay      Include support for the XReadDisplay extension.
925   --with-image-directory=DIR  By default, some demos may display random images
926                           from this directory.
927   --with-text-file=FILE   By default, some demos may display this file.
928   --with-browser=BROWSER   Specify the browser to show help URL.
929   --with-setuid-hacks     Allow some demos to be installed `setuid root'
930                           (which is needed in order to ping other hosts.)
931
932
933 Some influential environment variables:
934   CC          C compiler command
935   CFLAGS      C compiler flags
936   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
937               nonstandard directory <lib dir>
938   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
939               headers in a nonstandard directory <include dir>
940   CPP         C preprocessor
941
942 Use these variables to override the choices made by `configure' or to help
943 it to find libraries and programs with nonstandard names/locations.
944
945 _ACEOF
946 fi
947
948 if test "$ac_init_help" = "recursive"; then
949   # If there are subdirs, report their specific --help.
950   ac_popdir=`pwd`
951   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
952     test -d $ac_dir || continue
953     ac_builddir=.
954
955 if test "$ac_dir" != .; then
956   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
957   # A "../" for each directory in $ac_dir_suffix.
958   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
959 else
960   ac_dir_suffix= ac_top_builddir=
961 fi
962
963 case $srcdir in
964   .)  # No --srcdir option.  We are building in place.
965     ac_srcdir=.
966     if test -z "$ac_top_builddir"; then
967        ac_top_srcdir=.
968     else
969        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
970     fi ;;
971   [\\/]* | ?:[\\/]* )  # Absolute path.
972     ac_srcdir=$srcdir$ac_dir_suffix;
973     ac_top_srcdir=$srcdir ;;
974   *) # Relative path.
975     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
976     ac_top_srcdir=$ac_top_builddir$srcdir ;;
977 esac
978
979 # Do not use `cd foo && pwd` to compute absolute paths, because
980 # the directories may not exist.
981 case `pwd` in
982 .) ac_abs_builddir="$ac_dir";;
983 *)
984   case "$ac_dir" in
985   .) ac_abs_builddir=`pwd`;;
986   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
987   *) ac_abs_builddir=`pwd`/"$ac_dir";;
988   esac;;
989 esac
990 case $ac_abs_builddir in
991 .) ac_abs_top_builddir=${ac_top_builddir}.;;
992 *)
993   case ${ac_top_builddir}. in
994   .) ac_abs_top_builddir=$ac_abs_builddir;;
995   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
996   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
997   esac;;
998 esac
999 case $ac_abs_builddir in
1000 .) ac_abs_srcdir=$ac_srcdir;;
1001 *)
1002   case $ac_srcdir in
1003   .) ac_abs_srcdir=$ac_abs_builddir;;
1004   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1005   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1006   esac;;
1007 esac
1008 case $ac_abs_builddir in
1009 .) ac_abs_top_srcdir=$ac_top_srcdir;;
1010 *)
1011   case $ac_top_srcdir in
1012   .) ac_abs_top_srcdir=$ac_abs_builddir;;
1013   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1014   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1015   esac;;
1016 esac
1017
1018     cd $ac_dir
1019     # Check for guested configure; otherwise get Cygnus style configure.
1020     if test -f $ac_srcdir/configure.gnu; then
1021       echo
1022       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1023     elif test -f $ac_srcdir/configure; then
1024       echo
1025       $SHELL $ac_srcdir/configure  --help=recursive
1026     elif test -f $ac_srcdir/configure.ac ||
1027            test -f $ac_srcdir/configure.in; then
1028       echo
1029       $ac_configure --help
1030     else
1031       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1032     fi
1033     cd $ac_popdir
1034   done
1035 fi
1036
1037 test -n "$ac_init_help" && exit 0
1038 if $ac_init_version; then
1039   cat <<\_ACEOF
1040
1041 Copyright (C) 2003 Free Software Foundation, Inc.
1042 This configure script is free software; the Free Software Foundation
1043 gives unlimited permission to copy, distribute and modify it.
1044 _ACEOF
1045   exit 0
1046 fi
1047 exec 5>config.log
1048 cat >&5 <<_ACEOF
1049 This file contains any messages produced by compilers while
1050 running configure, to aid debugging if configure makes a mistake.
1051
1052 It was created by $as_me, which was
1053 generated by GNU Autoconf 2.59.  Invocation command line was
1054
1055   $ $0 $@
1056
1057 _ACEOF
1058 {
1059 cat <<_ASUNAME
1060 ## --------- ##
1061 ## Platform. ##
1062 ## --------- ##
1063
1064 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1065 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1066 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1067 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1068 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1069
1070 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1071 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1072
1073 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1074 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1075 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1076 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1077 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1078 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1079 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1080
1081 _ASUNAME
1082
1083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1084 for as_dir in $PATH
1085 do
1086   IFS=$as_save_IFS
1087   test -z "$as_dir" && as_dir=.
1088   echo "PATH: $as_dir"
1089 done
1090
1091 } >&5
1092
1093 cat >&5 <<_ACEOF
1094
1095
1096 ## ----------- ##
1097 ## Core tests. ##
1098 ## ----------- ##
1099
1100 _ACEOF
1101
1102
1103 # Keep a trace of the command line.
1104 # Strip out --no-create and --no-recursion so they do not pile up.
1105 # Strip out --silent because we don't want to record it for future runs.
1106 # Also quote any args containing shell meta-characters.
1107 # Make two passes to allow for proper duplicate-argument suppression.
1108 ac_configure_args=
1109 ac_configure_args0=
1110 ac_configure_args1=
1111 ac_sep=
1112 ac_must_keep_next=false
1113 for ac_pass in 1 2
1114 do
1115   for ac_arg
1116   do
1117     case $ac_arg in
1118     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1119     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1120     | -silent | --silent | --silen | --sile | --sil)
1121       continue ;;
1122     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1123       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1124     esac
1125     case $ac_pass in
1126     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1127     2)
1128       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1129       if test $ac_must_keep_next = true; then
1130         ac_must_keep_next=false # Got value, back to normal.
1131       else
1132         case $ac_arg in
1133           *=* | --config-cache | -C | -disable-* | --disable-* \
1134           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1135           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1136           | -with-* | --with-* | -without-* | --without-* | --x)
1137             case "$ac_configure_args0 " in
1138               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1139             esac
1140             ;;
1141           -* ) ac_must_keep_next=true ;;
1142         esac
1143       fi
1144       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1145       # Get rid of the leading space.
1146       ac_sep=" "
1147       ;;
1148     esac
1149   done
1150 done
1151 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1152 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1153
1154 # When interrupted or exit'd, cleanup temporary files, and complete
1155 # config.log.  We remove comments because anyway the quotes in there
1156 # would cause problems or look ugly.
1157 # WARNING: Be sure not to use single quotes in there, as some shells,
1158 # such as our DU 5.0 friend, will then `close' the trap.
1159 trap 'exit_status=$?
1160   # Save into config.log some information that might help in debugging.
1161   {
1162     echo
1163
1164     cat <<\_ASBOX
1165 ## ---------------- ##
1166 ## Cache variables. ##
1167 ## ---------------- ##
1168 _ASBOX
1169     echo
1170     # The following way of writing the cache mishandles newlines in values,
1171 {
1172   (set) 2>&1 |
1173     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1174     *ac_space=\ *)
1175       sed -n \
1176         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1177           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1178       ;;
1179     *)
1180       sed -n \
1181         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1182       ;;
1183     esac;
1184 }
1185     echo
1186
1187     cat <<\_ASBOX
1188 ## ----------------- ##
1189 ## Output variables. ##
1190 ## ----------------- ##
1191 _ASBOX
1192     echo
1193     for ac_var in $ac_subst_vars
1194     do
1195       eval ac_val=$`echo $ac_var`
1196       echo "$ac_var='"'"'$ac_val'"'"'"
1197     done | sort
1198     echo
1199
1200     if test -n "$ac_subst_files"; then
1201       cat <<\_ASBOX
1202 ## ------------- ##
1203 ## Output files. ##
1204 ## ------------- ##
1205 _ASBOX
1206       echo
1207       for ac_var in $ac_subst_files
1208       do
1209         eval ac_val=$`echo $ac_var`
1210         echo "$ac_var='"'"'$ac_val'"'"'"
1211       done | sort
1212       echo
1213     fi
1214
1215     if test -s confdefs.h; then
1216       cat <<\_ASBOX
1217 ## ----------- ##
1218 ## confdefs.h. ##
1219 ## ----------- ##
1220 _ASBOX
1221       echo
1222       sed "/^$/d" confdefs.h | sort
1223       echo
1224     fi
1225     test "$ac_signal" != 0 &&
1226       echo "$as_me: caught signal $ac_signal"
1227     echo "$as_me: exit $exit_status"
1228   } >&5
1229   rm -f core *.core &&
1230   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1231     exit $exit_status
1232      ' 0
1233 for ac_signal in 1 2 13 15; do
1234   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1235 done
1236 ac_signal=0
1237
1238 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1239 rm -rf conftest* confdefs.h
1240 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1241 echo >confdefs.h
1242
1243 # Predefined preprocessor variables.
1244
1245 cat >>confdefs.h <<_ACEOF
1246 #define PACKAGE_NAME "$PACKAGE_NAME"
1247 _ACEOF
1248
1249
1250 cat >>confdefs.h <<_ACEOF
1251 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1252 _ACEOF
1253
1254
1255 cat >>confdefs.h <<_ACEOF
1256 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1257 _ACEOF
1258
1259
1260 cat >>confdefs.h <<_ACEOF
1261 #define PACKAGE_STRING "$PACKAGE_STRING"
1262 _ACEOF
1263
1264
1265 cat >>confdefs.h <<_ACEOF
1266 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1267 _ACEOF
1268
1269
1270 # Let the site file select an alternate cache file if it wants to.
1271 # Prefer explicitly selected file to automatically selected ones.
1272 if test -z "$CONFIG_SITE"; then
1273   if test "x$prefix" != xNONE; then
1274     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1275   else
1276     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1277   fi
1278 fi
1279 for ac_site_file in $CONFIG_SITE; do
1280   if test -r "$ac_site_file"; then
1281     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1282 echo "$as_me: loading site script $ac_site_file" >&6;}
1283     sed 's/^/| /' "$ac_site_file" >&5
1284     . "$ac_site_file"
1285   fi
1286 done
1287
1288 if test -r "$cache_file"; then
1289   # Some versions of bash will fail to source /dev/null (special
1290   # files actually), so we avoid doing that.
1291   if test -f "$cache_file"; then
1292     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1293 echo "$as_me: loading cache $cache_file" >&6;}
1294     case $cache_file in
1295       [\\/]* | ?:[\\/]* ) . $cache_file;;
1296       *)                      . ./$cache_file;;
1297     esac
1298   fi
1299 else
1300   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1301 echo "$as_me: creating cache $cache_file" >&6;}
1302   >$cache_file
1303 fi
1304
1305 # Check that the precious variables saved in the cache have kept the same
1306 # value.
1307 ac_cache_corrupted=false
1308 for ac_var in `(set) 2>&1 |
1309                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1310   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1311   eval ac_new_set=\$ac_env_${ac_var}_set
1312   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1313   eval ac_new_val="\$ac_env_${ac_var}_value"
1314   case $ac_old_set,$ac_new_set in
1315     set,)
1316       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1317 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1318       ac_cache_corrupted=: ;;
1319     ,set)
1320       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1321 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1322       ac_cache_corrupted=: ;;
1323     ,);;
1324     *)
1325       if test "x$ac_old_val" != "x$ac_new_val"; then
1326         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1327 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1328         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1329 echo "$as_me:   former value:  $ac_old_val" >&2;}
1330         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1331 echo "$as_me:   current value: $ac_new_val" >&2;}
1332         ac_cache_corrupted=:
1333       fi;;
1334   esac
1335   # Pass precious variables to config.status.
1336   if test "$ac_new_set" = set; then
1337     case $ac_new_val in
1338     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1339       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1340     *) ac_arg=$ac_var=$ac_new_val ;;
1341     esac
1342     case " $ac_configure_args " in
1343       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1344       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1345     esac
1346   fi
1347 done
1348 if $ac_cache_corrupted; then
1349   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1350 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1351   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1352 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1353    { (exit 1); exit 1; }; }
1354 fi
1355
1356 ac_ext=c
1357 ac_cpp='$CPP $CPPFLAGS'
1358 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1359 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380           ac_config_headers="$ac_config_headers config.h"
1381
1382
1383 echo "current directory: `pwd`"
1384 echo "command line was: $0 $@"
1385
1386 ###############################################################################
1387 #
1388 #       Autoheader stuff
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
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556 # After checking to see that --srcdir is correct (which AC_INIT does)
1557 # check for some random other files that come later in the tar file,
1558 # to make sure everything is here.
1559 #
1560 for d in driver utils hacks hacks/glx ; do
1561   f=$srcdir/$d/Makefile.in
1562   if test \! -r $f ; then
1563     echo ""
1564     echo "ERROR: The package is incomplete: $f does not exist."
1565     echo "       This probably means that your download was truncated."
1566     echo ""
1567     exit 1
1568   fi
1569 done
1570
1571 ###############################################################################
1572 #
1573 #       Function to figure out how to run the compiler.
1574 #
1575 ###############################################################################
1576
1577
1578
1579
1580 ###############################################################################
1581 #
1582 #       Functions to figure out how to disable // comments in ANSI C code.
1583 #
1584 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
1585 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
1586 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
1587 #       so much for compatibility!)
1588 #
1589 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
1590 #       declarations preceed statements, without resorting to "-pedantic".
1591 #       This means that there is no way to get gcc3 to issue warnings that
1592 #       ensure that your code complies with the ANSI/ISO C89 standard, without
1593 #       also drowning in totally useless warnings.  Thank you master may I
1594 #       have another.
1595 #
1596 #       So, I give up, let's just use -pedantic.
1597 #
1598 ###############################################################################
1599
1600
1601
1602
1603
1604
1605 ###############################################################################
1606 #
1607 #       Function to figure out how to turn off Objective C on MacOS X.
1608 #       (We have to do this to work around an Apple-specific gcc bug.)
1609 #
1610 ###############################################################################
1611
1612
1613
1614
1615
1616
1617 ###############################################################################
1618 #
1619 #       Function to figure out how to create directory trees.
1620 #
1621 ###############################################################################
1622
1623
1624
1625
1626 ###############################################################################
1627 #
1628 #       Function to check whether gettimeofday() exists, and how to call it.
1629 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1630 #
1631 ###############################################################################
1632
1633
1634
1635
1636 ###############################################################################
1637 #
1638 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1639 #
1640 ###############################################################################
1641
1642 # M4 sucks!!  perl sucks too!!
1643
1644 perl_version_cmd='print $]'
1645
1646
1647
1648
1649
1650 ###############################################################################
1651 #
1652 #       Function to demand "bc".  Losers.
1653 #
1654 ###############################################################################
1655
1656
1657
1658 ###############################################################################
1659 #
1660 #       Functions to check how to do ICMP PING requests.
1661 #
1662 ###############################################################################
1663
1664
1665
1666
1667
1668
1669 ###############################################################################
1670 #
1671 #       Functions to check for various X11 crap.
1672 #
1673 ###############################################################################
1674
1675 # Try and find the app-defaults directory.
1676 # It sucks that autoconf doesn't do this already...
1677 #
1678
1679
1680 ###############################################################################
1681 #
1682 #       Handle the --with-x-app-defaults option HERE
1683 #
1684 ###############################################################################
1685
1686
1687 # Check whether --with-x-app-defaults or --without-x-app-defaults was given.
1688 if test "${with_x_app_defaults+set}" = set; then
1689   withval="$with_x_app_defaults"
1690   ac_cv_x_app_defaults="$withval"
1691 else
1692   eval ac_x_app_defaults="$withval"
1693 fi;
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704 # Random special-cases for X on certain pathological OSes.
1705 # You know who you are.
1706 #
1707
1708
1709
1710
1711 ###############################################################################
1712 #
1713 #       Some utility functions to make checking for X things easier.
1714 #
1715 ###############################################################################
1716
1717 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1718 #
1719
1720
1721 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1722 #
1723
1724
1725 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1726 #
1727
1728
1729
1730 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1731 # Use this sparingly; it probably doesn't work very well on X programs.
1732 #
1733
1734
1735 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1736 # (But not the -L directories!)
1737 #
1738
1739
1740
1741
1742 # Usage: HANDLE_X_PATH_ARG([variable_name],
1743 #                          [--command-line-option],
1744 #                          [descriptive string])
1745 #
1746 # All of the --with options take three forms:
1747 #
1748 #   --with-foo (or --with-foo=yes)
1749 #   --without-foo (or --with-foo=no)
1750 #   --with-foo=/DIR
1751 #
1752 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1753 # a directory (string beginning with a slash) it checks to see whether
1754 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1755 # as appropriate.
1756 #
1757
1758
1759
1760
1761 ###############################################################################
1762 ###############################################################################
1763 #
1764 #       End of function definitions.  Now start actually executing stuff.
1765 #
1766 ###############################################################################
1767 ###############################################################################
1768
1769 # random compiler setup
1770 ac_aux_dir=
1771 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1772   if test -f $ac_dir/install-sh; then
1773     ac_aux_dir=$ac_dir
1774     ac_install_sh="$ac_aux_dir/install-sh -c"
1775     break
1776   elif test -f $ac_dir/install.sh; then
1777     ac_aux_dir=$ac_dir
1778     ac_install_sh="$ac_aux_dir/install.sh -c"
1779     break
1780   elif test -f $ac_dir/shtool; then
1781     ac_aux_dir=$ac_dir
1782     ac_install_sh="$ac_aux_dir/shtool install -c"
1783     break
1784   fi
1785 done
1786 if test -z "$ac_aux_dir"; then
1787   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1788 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1789    { (exit 1); exit 1; }; }
1790 fi
1791 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1792 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1793 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1794
1795 # Make sure we can run config.sub.
1796 $ac_config_sub sun4 >/dev/null 2>&1 ||
1797   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1798 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1799    { (exit 1); exit 1; }; }
1800
1801 echo "$as_me:$LINENO: checking build system type" >&5
1802 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1803 if test "${ac_cv_build+set}" = set; then
1804   echo $ECHO_N "(cached) $ECHO_C" >&6
1805 else
1806   ac_cv_build_alias=$build_alias
1807 test -z "$ac_cv_build_alias" &&
1808   ac_cv_build_alias=`$ac_config_guess`
1809 test -z "$ac_cv_build_alias" &&
1810   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1811 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1812    { (exit 1); exit 1; }; }
1813 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1814   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1815 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1816    { (exit 1); exit 1; }; }
1817
1818 fi
1819 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1820 echo "${ECHO_T}$ac_cv_build" >&6
1821 build=$ac_cv_build
1822 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1823 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1824 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1825
1826
1827 echo "$as_me:$LINENO: checking host system type" >&5
1828 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1829 if test "${ac_cv_host+set}" = set; then
1830   echo $ECHO_N "(cached) $ECHO_C" >&6
1831 else
1832   ac_cv_host_alias=$host_alias
1833 test -z "$ac_cv_host_alias" &&
1834   ac_cv_host_alias=$ac_cv_build_alias
1835 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1836   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1837 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1838    { (exit 1); exit 1; }; }
1839
1840 fi
1841 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1842 echo "${ECHO_T}$ac_cv_host" >&6
1843 host=$ac_cv_host
1844 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1845 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1846 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1847
1848
1849
1850 ac_ext=c
1851 ac_cpp='$CPP $CPPFLAGS'
1852 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1853 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1854 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1855 if test -n "$ac_tool_prefix"; then
1856   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1857 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1858 echo "$as_me:$LINENO: checking for $ac_word" >&5
1859 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1860 if test "${ac_cv_prog_CC+set}" = set; then
1861   echo $ECHO_N "(cached) $ECHO_C" >&6
1862 else
1863   if test -n "$CC"; then
1864   ac_cv_prog_CC="$CC" # Let the user override the test.
1865 else
1866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1867 for as_dir in $PATH
1868 do
1869   IFS=$as_save_IFS
1870   test -z "$as_dir" && as_dir=.
1871   for ac_exec_ext in '' $ac_executable_extensions; do
1872   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1873     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1874     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1875     break 2
1876   fi
1877 done
1878 done
1879
1880 fi
1881 fi
1882 CC=$ac_cv_prog_CC
1883 if test -n "$CC"; then
1884   echo "$as_me:$LINENO: result: $CC" >&5
1885 echo "${ECHO_T}$CC" >&6
1886 else
1887   echo "$as_me:$LINENO: result: no" >&5
1888 echo "${ECHO_T}no" >&6
1889 fi
1890
1891 fi
1892 if test -z "$ac_cv_prog_CC"; then
1893   ac_ct_CC=$CC
1894   # Extract the first word of "gcc", so it can be a program name with args.
1895 set dummy gcc; ac_word=$2
1896 echo "$as_me:$LINENO: checking for $ac_word" >&5
1897 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1898 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1899   echo $ECHO_N "(cached) $ECHO_C" >&6
1900 else
1901   if test -n "$ac_ct_CC"; then
1902   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1903 else
1904 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1905 for as_dir in $PATH
1906 do
1907   IFS=$as_save_IFS
1908   test -z "$as_dir" && as_dir=.
1909   for ac_exec_ext in '' $ac_executable_extensions; do
1910   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1911     ac_cv_prog_ac_ct_CC="gcc"
1912     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1913     break 2
1914   fi
1915 done
1916 done
1917
1918 fi
1919 fi
1920 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1921 if test -n "$ac_ct_CC"; then
1922   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1923 echo "${ECHO_T}$ac_ct_CC" >&6
1924 else
1925   echo "$as_me:$LINENO: result: no" >&5
1926 echo "${ECHO_T}no" >&6
1927 fi
1928
1929   CC=$ac_ct_CC
1930 else
1931   CC="$ac_cv_prog_CC"
1932 fi
1933
1934 if test -z "$CC"; then
1935   if test -n "$ac_tool_prefix"; then
1936   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1937 set dummy ${ac_tool_prefix}cc; ac_word=$2
1938 echo "$as_me:$LINENO: checking for $ac_word" >&5
1939 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1940 if test "${ac_cv_prog_CC+set}" = set; then
1941   echo $ECHO_N "(cached) $ECHO_C" >&6
1942 else
1943   if test -n "$CC"; then
1944   ac_cv_prog_CC="$CC" # Let the user override the test.
1945 else
1946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1947 for as_dir in $PATH
1948 do
1949   IFS=$as_save_IFS
1950   test -z "$as_dir" && as_dir=.
1951   for ac_exec_ext in '' $ac_executable_extensions; do
1952   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1953     ac_cv_prog_CC="${ac_tool_prefix}cc"
1954     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1955     break 2
1956   fi
1957 done
1958 done
1959
1960 fi
1961 fi
1962 CC=$ac_cv_prog_CC
1963 if test -n "$CC"; then
1964   echo "$as_me:$LINENO: result: $CC" >&5
1965 echo "${ECHO_T}$CC" >&6
1966 else
1967   echo "$as_me:$LINENO: result: no" >&5
1968 echo "${ECHO_T}no" >&6
1969 fi
1970
1971 fi
1972 if test -z "$ac_cv_prog_CC"; then
1973   ac_ct_CC=$CC
1974   # Extract the first word of "cc", so it can be a program name with args.
1975 set dummy cc; ac_word=$2
1976 echo "$as_me:$LINENO: checking for $ac_word" >&5
1977 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1978 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1979   echo $ECHO_N "(cached) $ECHO_C" >&6
1980 else
1981   if test -n "$ac_ct_CC"; then
1982   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1983 else
1984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1985 for as_dir in $PATH
1986 do
1987   IFS=$as_save_IFS
1988   test -z "$as_dir" && as_dir=.
1989   for ac_exec_ext in '' $ac_executable_extensions; do
1990   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1991     ac_cv_prog_ac_ct_CC="cc"
1992     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1993     break 2
1994   fi
1995 done
1996 done
1997
1998 fi
1999 fi
2000 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2001 if test -n "$ac_ct_CC"; then
2002   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2003 echo "${ECHO_T}$ac_ct_CC" >&6
2004 else
2005   echo "$as_me:$LINENO: result: no" >&5
2006 echo "${ECHO_T}no" >&6
2007 fi
2008
2009   CC=$ac_ct_CC
2010 else
2011   CC="$ac_cv_prog_CC"
2012 fi
2013
2014 fi
2015 if test -z "$CC"; then
2016   # Extract the first word of "cc", so it can be a program name with args.
2017 set dummy cc; ac_word=$2
2018 echo "$as_me:$LINENO: checking for $ac_word" >&5
2019 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2020 if test "${ac_cv_prog_CC+set}" = set; then
2021   echo $ECHO_N "(cached) $ECHO_C" >&6
2022 else
2023   if test -n "$CC"; then
2024   ac_cv_prog_CC="$CC" # Let the user override the test.
2025 else
2026   ac_prog_rejected=no
2027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2028 for as_dir in $PATH
2029 do
2030   IFS=$as_save_IFS
2031   test -z "$as_dir" && as_dir=.
2032   for ac_exec_ext in '' $ac_executable_extensions; do
2033   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2034     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2035        ac_prog_rejected=yes
2036        continue
2037      fi
2038     ac_cv_prog_CC="cc"
2039     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2040     break 2
2041   fi
2042 done
2043 done
2044
2045 if test $ac_prog_rejected = yes; then
2046   # We found a bogon in the path, so make sure we never use it.
2047   set dummy $ac_cv_prog_CC
2048   shift
2049   if test $# != 0; then
2050     # We chose a different compiler from the bogus one.
2051     # However, it has the same basename, so the bogon will be chosen
2052     # first if we set CC to just the basename; use the full file name.
2053     shift
2054     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2055   fi
2056 fi
2057 fi
2058 fi
2059 CC=$ac_cv_prog_CC
2060 if test -n "$CC"; then
2061   echo "$as_me:$LINENO: result: $CC" >&5
2062 echo "${ECHO_T}$CC" >&6
2063 else
2064   echo "$as_me:$LINENO: result: no" >&5
2065 echo "${ECHO_T}no" >&6
2066 fi
2067
2068 fi
2069 if test -z "$CC"; then
2070   if test -n "$ac_tool_prefix"; then
2071   for ac_prog in cl
2072   do
2073     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2074 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2075 echo "$as_me:$LINENO: checking for $ac_word" >&5
2076 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2077 if test "${ac_cv_prog_CC+set}" = set; then
2078   echo $ECHO_N "(cached) $ECHO_C" >&6
2079 else
2080   if test -n "$CC"; then
2081   ac_cv_prog_CC="$CC" # Let the user override the test.
2082 else
2083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2084 for as_dir in $PATH
2085 do
2086   IFS=$as_save_IFS
2087   test -z "$as_dir" && as_dir=.
2088   for ac_exec_ext in '' $ac_executable_extensions; do
2089   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2090     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2091     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2092     break 2
2093   fi
2094 done
2095 done
2096
2097 fi
2098 fi
2099 CC=$ac_cv_prog_CC
2100 if test -n "$CC"; then
2101   echo "$as_me:$LINENO: result: $CC" >&5
2102 echo "${ECHO_T}$CC" >&6
2103 else
2104   echo "$as_me:$LINENO: result: no" >&5
2105 echo "${ECHO_T}no" >&6
2106 fi
2107
2108     test -n "$CC" && break
2109   done
2110 fi
2111 if test -z "$CC"; then
2112   ac_ct_CC=$CC
2113   for ac_prog in cl
2114 do
2115   # Extract the first word of "$ac_prog", so it can be a program name with args.
2116 set dummy $ac_prog; ac_word=$2
2117 echo "$as_me:$LINENO: checking for $ac_word" >&5
2118 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2119 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2120   echo $ECHO_N "(cached) $ECHO_C" >&6
2121 else
2122   if test -n "$ac_ct_CC"; then
2123   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2124 else
2125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2126 for as_dir in $PATH
2127 do
2128   IFS=$as_save_IFS
2129   test -z "$as_dir" && as_dir=.
2130   for ac_exec_ext in '' $ac_executable_extensions; do
2131   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2132     ac_cv_prog_ac_ct_CC="$ac_prog"
2133     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2134     break 2
2135   fi
2136 done
2137 done
2138
2139 fi
2140 fi
2141 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2142 if test -n "$ac_ct_CC"; then
2143   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2144 echo "${ECHO_T}$ac_ct_CC" >&6
2145 else
2146   echo "$as_me:$LINENO: result: no" >&5
2147 echo "${ECHO_T}no" >&6
2148 fi
2149
2150   test -n "$ac_ct_CC" && break
2151 done
2152
2153   CC=$ac_ct_CC
2154 fi
2155
2156 fi
2157
2158
2159 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2160 See \`config.log' for more details." >&5
2161 echo "$as_me: error: no acceptable C compiler found in \$PATH
2162 See \`config.log' for more details." >&2;}
2163    { (exit 1); exit 1; }; }
2164
2165 # Provide some information about the compiler.
2166 echo "$as_me:$LINENO:" \
2167      "checking for C compiler version" >&5
2168 ac_compiler=`set X $ac_compile; echo $2`
2169 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2170   (eval $ac_compiler --version </dev/null >&5) 2>&5
2171   ac_status=$?
2172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2173   (exit $ac_status); }
2174 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2175   (eval $ac_compiler -v </dev/null >&5) 2>&5
2176   ac_status=$?
2177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2178   (exit $ac_status); }
2179 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2180   (eval $ac_compiler -V </dev/null >&5) 2>&5
2181   ac_status=$?
2182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2183   (exit $ac_status); }
2184
2185 cat >conftest.$ac_ext <<_ACEOF
2186 /* confdefs.h.  */
2187 _ACEOF
2188 cat confdefs.h >>conftest.$ac_ext
2189 cat >>conftest.$ac_ext <<_ACEOF
2190 /* end confdefs.h.  */
2191
2192 int
2193 main ()
2194 {
2195
2196   ;
2197   return 0;
2198 }
2199 _ACEOF
2200 ac_clean_files_save=$ac_clean_files
2201 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2202 # Try to create an executable without -o first, disregard a.out.
2203 # It will help us diagnose broken compilers, and finding out an intuition
2204 # of exeext.
2205 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2206 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2207 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2208 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2209   (eval $ac_link_default) 2>&5
2210   ac_status=$?
2211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2212   (exit $ac_status); }; then
2213   # Find the output, starting from the most likely.  This scheme is
2214 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2215 # resort.
2216
2217 # Be careful to initialize this variable, since it used to be cached.
2218 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2219 ac_cv_exeext=
2220 # b.out is created by i960 compilers.
2221 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2222 do
2223   test -f "$ac_file" || continue
2224   case $ac_file in
2225     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2226         ;;
2227     conftest.$ac_ext )
2228         # This is the source file.
2229         ;;
2230     [ab].out )
2231         # We found the default executable, but exeext='' is most
2232         # certainly right.
2233         break;;
2234     *.* )
2235         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2236         # FIXME: I believe we export ac_cv_exeext for Libtool,
2237         # but it would be cool to find out if it's true.  Does anybody
2238         # maintain Libtool? --akim.
2239         export ac_cv_exeext
2240         break;;
2241     * )
2242         break;;
2243   esac
2244 done
2245 else
2246   echo "$as_me: failed program was:" >&5
2247 sed 's/^/| /' conftest.$ac_ext >&5
2248
2249 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2250 See \`config.log' for more details." >&5
2251 echo "$as_me: error: C compiler cannot create executables
2252 See \`config.log' for more details." >&2;}
2253    { (exit 77); exit 77; }; }
2254 fi
2255
2256 ac_exeext=$ac_cv_exeext
2257 echo "$as_me:$LINENO: result: $ac_file" >&5
2258 echo "${ECHO_T}$ac_file" >&6
2259
2260 # Check the compiler produces executables we can run.  If not, either
2261 # the compiler is broken, or we cross compile.
2262 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2263 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2264 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2265 # If not cross compiling, check that we can run a simple program.
2266 if test "$cross_compiling" != yes; then
2267   if { ac_try='./$ac_file'
2268   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2269   (eval $ac_try) 2>&5
2270   ac_status=$?
2271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2272   (exit $ac_status); }; }; then
2273     cross_compiling=no
2274   else
2275     if test "$cross_compiling" = maybe; then
2276         cross_compiling=yes
2277     else
2278         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2279 If you meant to cross compile, use \`--host'.
2280 See \`config.log' for more details." >&5
2281 echo "$as_me: error: cannot run C compiled programs.
2282 If you meant to cross compile, use \`--host'.
2283 See \`config.log' for more details." >&2;}
2284    { (exit 1); exit 1; }; }
2285     fi
2286   fi
2287 fi
2288 echo "$as_me:$LINENO: result: yes" >&5
2289 echo "${ECHO_T}yes" >&6
2290
2291 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2292 ac_clean_files=$ac_clean_files_save
2293 # Check the compiler produces executables we can run.  If not, either
2294 # the compiler is broken, or we cross compile.
2295 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2296 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2297 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2298 echo "${ECHO_T}$cross_compiling" >&6
2299
2300 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2301 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2302 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2303   (eval $ac_link) 2>&5
2304   ac_status=$?
2305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2306   (exit $ac_status); }; then
2307   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2308 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2309 # work properly (i.e., refer to `conftest.exe'), while it won't with
2310 # `rm'.
2311 for ac_file in conftest.exe conftest conftest.*; do
2312   test -f "$ac_file" || continue
2313   case $ac_file in
2314     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2315     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2316           export ac_cv_exeext
2317           break;;
2318     * ) break;;
2319   esac
2320 done
2321 else
2322   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2323 See \`config.log' for more details." >&5
2324 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2325 See \`config.log' for more details." >&2;}
2326    { (exit 1); exit 1; }; }
2327 fi
2328
2329 rm -f conftest$ac_cv_exeext
2330 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2331 echo "${ECHO_T}$ac_cv_exeext" >&6
2332
2333 rm -f conftest.$ac_ext
2334 EXEEXT=$ac_cv_exeext
2335 ac_exeext=$EXEEXT
2336 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2337 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2338 if test "${ac_cv_objext+set}" = set; then
2339   echo $ECHO_N "(cached) $ECHO_C" >&6
2340 else
2341   cat >conftest.$ac_ext <<_ACEOF
2342 /* confdefs.h.  */
2343 _ACEOF
2344 cat confdefs.h >>conftest.$ac_ext
2345 cat >>conftest.$ac_ext <<_ACEOF
2346 /* end confdefs.h.  */
2347
2348 int
2349 main ()
2350 {
2351
2352   ;
2353   return 0;
2354 }
2355 _ACEOF
2356 rm -f conftest.o conftest.obj
2357 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2358   (eval $ac_compile) 2>&5
2359   ac_status=$?
2360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2361   (exit $ac_status); }; then
2362   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2363   case $ac_file in
2364     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2365     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2366        break;;
2367   esac
2368 done
2369 else
2370   echo "$as_me: failed program was:" >&5
2371 sed 's/^/| /' conftest.$ac_ext >&5
2372
2373 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2374 See \`config.log' for more details." >&5
2375 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2376 See \`config.log' for more details." >&2;}
2377    { (exit 1); exit 1; }; }
2378 fi
2379
2380 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2381 fi
2382 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2383 echo "${ECHO_T}$ac_cv_objext" >&6
2384 OBJEXT=$ac_cv_objext
2385 ac_objext=$OBJEXT
2386 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2387 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2388 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2389   echo $ECHO_N "(cached) $ECHO_C" >&6
2390 else
2391   cat >conftest.$ac_ext <<_ACEOF
2392 /* confdefs.h.  */
2393 _ACEOF
2394 cat confdefs.h >>conftest.$ac_ext
2395 cat >>conftest.$ac_ext <<_ACEOF
2396 /* end confdefs.h.  */
2397
2398 int
2399 main ()
2400 {
2401 #ifndef __GNUC__
2402        choke me
2403 #endif
2404
2405   ;
2406   return 0;
2407 }
2408 _ACEOF
2409 rm -f conftest.$ac_objext
2410 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2411   (eval $ac_compile) 2>conftest.er1
2412   ac_status=$?
2413   grep -v '^ *+' conftest.er1 >conftest.err
2414   rm -f conftest.er1
2415   cat conftest.err >&5
2416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2417   (exit $ac_status); } &&
2418          { ac_try='test -z "$ac_c_werror_flag"
2419                          || test ! -s conftest.err'
2420   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2421   (eval $ac_try) 2>&5
2422   ac_status=$?
2423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2424   (exit $ac_status); }; } &&
2425          { ac_try='test -s conftest.$ac_objext'
2426   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2427   (eval $ac_try) 2>&5
2428   ac_status=$?
2429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2430   (exit $ac_status); }; }; then
2431   ac_compiler_gnu=yes
2432 else
2433   echo "$as_me: failed program was:" >&5
2434 sed 's/^/| /' conftest.$ac_ext >&5
2435
2436 ac_compiler_gnu=no
2437 fi
2438 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2439 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2440
2441 fi
2442 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2443 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2444 GCC=`test $ac_compiler_gnu = yes && echo yes`
2445 ac_test_CFLAGS=${CFLAGS+set}
2446 ac_save_CFLAGS=$CFLAGS
2447 CFLAGS="-g"
2448 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2449 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2450 if test "${ac_cv_prog_cc_g+set}" = set; then
2451   echo $ECHO_N "(cached) $ECHO_C" >&6
2452 else
2453   cat >conftest.$ac_ext <<_ACEOF
2454 /* confdefs.h.  */
2455 _ACEOF
2456 cat confdefs.h >>conftest.$ac_ext
2457 cat >>conftest.$ac_ext <<_ACEOF
2458 /* end confdefs.h.  */
2459
2460 int
2461 main ()
2462 {
2463
2464   ;
2465   return 0;
2466 }
2467 _ACEOF
2468 rm -f conftest.$ac_objext
2469 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2470   (eval $ac_compile) 2>conftest.er1
2471   ac_status=$?
2472   grep -v '^ *+' conftest.er1 >conftest.err
2473   rm -f conftest.er1
2474   cat conftest.err >&5
2475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2476   (exit $ac_status); } &&
2477          { ac_try='test -z "$ac_c_werror_flag"
2478                          || test ! -s conftest.err'
2479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2480   (eval $ac_try) 2>&5
2481   ac_status=$?
2482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2483   (exit $ac_status); }; } &&
2484          { ac_try='test -s conftest.$ac_objext'
2485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2486   (eval $ac_try) 2>&5
2487   ac_status=$?
2488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2489   (exit $ac_status); }; }; then
2490   ac_cv_prog_cc_g=yes
2491 else
2492   echo "$as_me: failed program was:" >&5
2493 sed 's/^/| /' conftest.$ac_ext >&5
2494
2495 ac_cv_prog_cc_g=no
2496 fi
2497 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2498 fi
2499 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2500 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2501 if test "$ac_test_CFLAGS" = set; then
2502   CFLAGS=$ac_save_CFLAGS
2503 elif test $ac_cv_prog_cc_g = yes; then
2504   if test "$GCC" = yes; then
2505     CFLAGS="-g -O2"
2506   else
2507     CFLAGS="-g"
2508   fi
2509 else
2510   if test "$GCC" = yes; then
2511     CFLAGS="-O2"
2512   else
2513     CFLAGS=
2514   fi
2515 fi
2516 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2517 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2518 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2519   echo $ECHO_N "(cached) $ECHO_C" >&6
2520 else
2521   ac_cv_prog_cc_stdc=no
2522 ac_save_CC=$CC
2523 cat >conftest.$ac_ext <<_ACEOF
2524 /* confdefs.h.  */
2525 _ACEOF
2526 cat confdefs.h >>conftest.$ac_ext
2527 cat >>conftest.$ac_ext <<_ACEOF
2528 /* end confdefs.h.  */
2529 #include <stdarg.h>
2530 #include <stdio.h>
2531 #include <sys/types.h>
2532 #include <sys/stat.h>
2533 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2534 struct buf { int x; };
2535 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2536 static char *e (p, i)
2537      char **p;
2538      int i;
2539 {
2540   return p[i];
2541 }
2542 static char *f (char * (*g) (char **, int), char **p, ...)
2543 {
2544   char *s;
2545   va_list v;
2546   va_start (v,p);
2547   s = g (p, va_arg (v,int));
2548   va_end (v);
2549   return s;
2550 }
2551
2552 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2553    function prototypes and stuff, but not '\xHH' hex character constants.
2554    These don't provoke an error unfortunately, instead are silently treated
2555    as 'x'.  The following induces an error, until -std1 is added to get
2556    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2557    array size at least.  It's necessary to write '\x00'==0 to get something
2558    that's true only with -std1.  */
2559 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2560
2561 int test (int i, double x);
2562 struct s1 {int (*f) (int a);};
2563 struct s2 {int (*f) (double a);};
2564 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2565 int argc;
2566 char **argv;
2567 int
2568 main ()
2569 {
2570 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2571   ;
2572   return 0;
2573 }
2574 _ACEOF
2575 # Don't try gcc -ansi; that turns off useful extensions and
2576 # breaks some systems' header files.
2577 # AIX                   -qlanglvl=ansi
2578 # Ultrix and OSF/1      -std1
2579 # HP-UX 10.20 and later -Ae
2580 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2581 # SVR4                  -Xc -D__EXTENSIONS__
2582 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2583 do
2584   CC="$ac_save_CC $ac_arg"
2585   rm -f conftest.$ac_objext
2586 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2587   (eval $ac_compile) 2>conftest.er1
2588   ac_status=$?
2589   grep -v '^ *+' conftest.er1 >conftest.err
2590   rm -f conftest.er1
2591   cat conftest.err >&5
2592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2593   (exit $ac_status); } &&
2594          { ac_try='test -z "$ac_c_werror_flag"
2595                          || test ! -s conftest.err'
2596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2597   (eval $ac_try) 2>&5
2598   ac_status=$?
2599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2600   (exit $ac_status); }; } &&
2601          { ac_try='test -s conftest.$ac_objext'
2602   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2603   (eval $ac_try) 2>&5
2604   ac_status=$?
2605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2606   (exit $ac_status); }; }; then
2607   ac_cv_prog_cc_stdc=$ac_arg
2608 break
2609 else
2610   echo "$as_me: failed program was:" >&5
2611 sed 's/^/| /' conftest.$ac_ext >&5
2612
2613 fi
2614 rm -f conftest.err conftest.$ac_objext
2615 done
2616 rm -f conftest.$ac_ext conftest.$ac_objext
2617 CC=$ac_save_CC
2618
2619 fi
2620
2621 case "x$ac_cv_prog_cc_stdc" in
2622   x|xno)
2623     echo "$as_me:$LINENO: result: none needed" >&5
2624 echo "${ECHO_T}none needed" >&6 ;;
2625   *)
2626     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2627 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2628     CC="$CC $ac_cv_prog_cc_stdc" ;;
2629 esac
2630
2631 # Some people use a C++ compiler to compile C.  Since we use `exit',
2632 # in C++ we need to declare it.  In case someone uses the same compiler
2633 # for both compiling C and C++ we need to have the C++ compiler decide
2634 # the declaration of exit, since it's the most demanding environment.
2635 cat >conftest.$ac_ext <<_ACEOF
2636 #ifndef __cplusplus
2637   choke me
2638 #endif
2639 _ACEOF
2640 rm -f conftest.$ac_objext
2641 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2642   (eval $ac_compile) 2>conftest.er1
2643   ac_status=$?
2644   grep -v '^ *+' conftest.er1 >conftest.err
2645   rm -f conftest.er1
2646   cat conftest.err >&5
2647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2648   (exit $ac_status); } &&
2649          { ac_try='test -z "$ac_c_werror_flag"
2650                          || test ! -s conftest.err'
2651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2652   (eval $ac_try) 2>&5
2653   ac_status=$?
2654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2655   (exit $ac_status); }; } &&
2656          { ac_try='test -s conftest.$ac_objext'
2657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2658   (eval $ac_try) 2>&5
2659   ac_status=$?
2660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2661   (exit $ac_status); }; }; then
2662   for ac_declaration in \
2663    '' \
2664    'extern "C" void std::exit (int) throw (); using std::exit;' \
2665    'extern "C" void std::exit (int); using std::exit;' \
2666    'extern "C" void exit (int) throw ();' \
2667    'extern "C" void exit (int);' \
2668    'void exit (int);'
2669 do
2670   cat >conftest.$ac_ext <<_ACEOF
2671 /* confdefs.h.  */
2672 _ACEOF
2673 cat confdefs.h >>conftest.$ac_ext
2674 cat >>conftest.$ac_ext <<_ACEOF
2675 /* end confdefs.h.  */
2676 $ac_declaration
2677 #include <stdlib.h>
2678 int
2679 main ()
2680 {
2681 exit (42);
2682   ;
2683   return 0;
2684 }
2685 _ACEOF
2686 rm -f conftest.$ac_objext
2687 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2688   (eval $ac_compile) 2>conftest.er1
2689   ac_status=$?
2690   grep -v '^ *+' conftest.er1 >conftest.err
2691   rm -f conftest.er1
2692   cat conftest.err >&5
2693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2694   (exit $ac_status); } &&
2695          { ac_try='test -z "$ac_c_werror_flag"
2696                          || test ! -s conftest.err'
2697   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2698   (eval $ac_try) 2>&5
2699   ac_status=$?
2700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2701   (exit $ac_status); }; } &&
2702          { ac_try='test -s conftest.$ac_objext'
2703   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2704   (eval $ac_try) 2>&5
2705   ac_status=$?
2706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2707   (exit $ac_status); }; }; then
2708   :
2709 else
2710   echo "$as_me: failed program was:" >&5
2711 sed 's/^/| /' conftest.$ac_ext >&5
2712
2713 continue
2714 fi
2715 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2716   cat >conftest.$ac_ext <<_ACEOF
2717 /* confdefs.h.  */
2718 _ACEOF
2719 cat confdefs.h >>conftest.$ac_ext
2720 cat >>conftest.$ac_ext <<_ACEOF
2721 /* end confdefs.h.  */
2722 $ac_declaration
2723 int
2724 main ()
2725 {
2726 exit (42);
2727   ;
2728   return 0;
2729 }
2730 _ACEOF
2731 rm -f conftest.$ac_objext
2732 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2733   (eval $ac_compile) 2>conftest.er1
2734   ac_status=$?
2735   grep -v '^ *+' conftest.er1 >conftest.err
2736   rm -f conftest.er1
2737   cat conftest.err >&5
2738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2739   (exit $ac_status); } &&
2740          { ac_try='test -z "$ac_c_werror_flag"
2741                          || test ! -s conftest.err'
2742   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2743   (eval $ac_try) 2>&5
2744   ac_status=$?
2745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2746   (exit $ac_status); }; } &&
2747          { ac_try='test -s conftest.$ac_objext'
2748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2749   (eval $ac_try) 2>&5
2750   ac_status=$?
2751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2752   (exit $ac_status); }; }; then
2753   break
2754 else
2755   echo "$as_me: failed program was:" >&5
2756 sed 's/^/| /' conftest.$ac_ext >&5
2757
2758 fi
2759 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2760 done
2761 rm -f conftest*
2762 if test -n "$ac_declaration"; then
2763   echo '#ifdef __cplusplus' >>confdefs.h
2764   echo $ac_declaration      >>confdefs.h
2765   echo '#endif'             >>confdefs.h
2766 fi
2767
2768 else
2769   echo "$as_me: failed program was:" >&5
2770 sed 's/^/| /' conftest.$ac_ext >&5
2771
2772 fi
2773 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2774 ac_ext=c
2775 ac_cpp='$CPP $CPPFLAGS'
2776 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2777 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2778 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2779
2780
2781   if test -z "$GCC"; then
2782     # not using GCC
2783     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2784 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2785     case "$host" in
2786       *-hpux* )
2787         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2788 echo "${ECHO_T}HPUX: adding -Ae" >&6
2789         CC="$CC -Ae"
2790       ;;
2791       *-aix* )
2792         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2793 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2794         CC="$CC -qlanglvl=ansi -qhalt=e"
2795       ;;
2796       *-dec-* )
2797         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2798 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2799         CC="$CC -std1"
2800       ;;
2801       *)
2802         echo "$as_me:$LINENO: result: no idea" >&5
2803 echo "${ECHO_T}no idea" >&6
2804       ;;
2805     esac
2806   else
2807     # using GCC
2808     case "$host" in
2809       *-solaris*)
2810         echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
2811 echo "${ECHO_T}Solaris: adding -D__EXTENSIONS__" >&6
2812         CC="$CC -D__EXTENSIONS__"
2813       ;;
2814     esac
2815   fi
2816
2817   OBJCC="$CC"
2818
2819   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2820 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2821   if test "$cross_compiling" = yes; then
2822   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2823 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2824    { (exit 1); exit 1; }; }
2825 else
2826   cat >conftest.$ac_ext <<_ACEOF
2827 /* confdefs.h.  */
2828 _ACEOF
2829 cat confdefs.h >>conftest.$ac_ext
2830 cat >>conftest.$ac_ext <<_ACEOF
2831 /* end confdefs.h.  */
2832  main(int ac, char **av) { return 0; }
2833 _ACEOF
2834 rm -f conftest$ac_exeext
2835 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2836   (eval $ac_link) 2>&5
2837   ac_status=$?
2838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2839   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2840   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2841   (eval $ac_try) 2>&5
2842   ac_status=$?
2843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2844   (exit $ac_status); }; }; then
2845   echo "$as_me:$LINENO: result: yes" >&5
2846 echo "${ECHO_T}yes" >&6
2847 else
2848   echo "$as_me: program exited with status $ac_status" >&5
2849 echo "$as_me: failed program was:" >&5
2850 sed 's/^/| /' conftest.$ac_ext >&5
2851
2852 ( exit $ac_status )
2853 echo "$as_me:$LINENO: result: no" >&5
2854 echo "${ECHO_T}no" >&6
2855      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2856 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2857    { (exit 1); exit 1; }; }
2858 fi
2859 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2860 fi
2861
2862   if test -n "$GCC"; then
2863     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2864 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2865     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
2866     OBJCC="$OBJCC -Wall"
2867     # supposedly gcc 3.4 will have "-Wdeclaration-after-statement"
2868     # and then perhaps we can do without -pedantic?
2869   else
2870     case "$host" in
2871       *-irix5* |*-irix6.0-3* )
2872         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2873 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2874         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2875       ;;
2876 #     *-dec-osf* )
2877 #       if test -z "$GCC"; then
2878 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2879 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2880 #       fi
2881 #     ;;
2882     esac
2883   fi
2884
2885 if test -n "$GCC"; then
2886    if test -n "$GCC"; then
2887    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2888 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2889 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2890   echo $ECHO_N "(cached) $ECHO_C" >&6
2891 else
2892   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
2893           grep unrecognized >/dev/null ); then
2894        ac_cv_gcc_accepts_std=no
2895      else
2896        ac_cv_gcc_accepts_std=yes
2897      fi
2898 fi
2899 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2900 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2901    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2902   fi
2903
2904    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2905 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2906    #
2907    # The reason that // comments are banned from xscreensaver is that gcc is
2908    # basically the only compiler in the world that supports them in C code.
2909    # All other vendors support them only in their C++ compilers, not in their
2910    # ANSI C compilers.  This means that it's a portability problem: every time
2911    # these comments have snuck into the xscreensaver source code, I've gotten
2912    # complaints about it the next day.  So we turn off support for them in gcc
2913    # as well to prevent them from accidentially slipping in.
2914    #
2915    if test "$ac_gcc_accepts_std" = yes ; then
2916      #
2917      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2918      # (That appears to be the only additional preprocessor symbol
2919      # it defines, in addition to the syntax changes it makes.)
2920      #
2921      # -std=gnu89 is no good, because // comments were a GNU extension
2922      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2923      # with -std=gnu89 but not with -std=c89.)
2924      #
2925      CC="$CC -std=c89 -U__STRICT_ANSI__"
2926    else
2927      # The old way:
2928      CC="$CC -Wp,-lang-c89"
2929    fi
2930   fi
2931
2932 if test -n "$GCC"; then
2933    if test -n "$GCC"; then
2934    echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
2935 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6
2936 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
2937   echo $ECHO_N "(cached) $ECHO_C" >&6
2938 else
2939   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
2940           grep unrecognized >/dev/null ); then
2941        ac_cv_gcc_accepts_no_cpp_precomp=no
2942      else
2943        ac_cv_gcc_accepts_no_cpp_precomp=yes
2944      fi
2945 fi
2946 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
2947 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6
2948    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
2949   fi
2950
2951    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
2952      echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
2953 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6
2954      CC="$CC -no-cpp-precomp"
2955    fi
2956   fi
2957
2958 ac_ext=c
2959 ac_cpp='$CPP $CPPFLAGS'
2960 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2961 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2962 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2963 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2964 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2965 # On Suns, sometimes $CPP names a directory.
2966 if test -n "$CPP" && test -d "$CPP"; then
2967   CPP=
2968 fi
2969 if test -z "$CPP"; then
2970   if test "${ac_cv_prog_CPP+set}" = set; then
2971   echo $ECHO_N "(cached) $ECHO_C" >&6
2972 else
2973       # Double quotes because CPP needs to be expanded
2974     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2975     do
2976       ac_preproc_ok=false
2977 for ac_c_preproc_warn_flag in '' yes
2978 do
2979   # Use a header file that comes with gcc, so configuring glibc
2980   # with a fresh cross-compiler works.
2981   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2982   # <limits.h> exists even on freestanding compilers.
2983   # On the NeXT, cc -E runs the code through the compiler's parser,
2984   # not just through cpp. "Syntax error" is here to catch this case.
2985   cat >conftest.$ac_ext <<_ACEOF
2986 /* confdefs.h.  */
2987 _ACEOF
2988 cat confdefs.h >>conftest.$ac_ext
2989 cat >>conftest.$ac_ext <<_ACEOF
2990 /* end confdefs.h.  */
2991 #ifdef __STDC__
2992 # include <limits.h>
2993 #else
2994 # include <assert.h>
2995 #endif
2996                      Syntax error
2997 _ACEOF
2998 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2999   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3000   ac_status=$?
3001   grep -v '^ *+' conftest.er1 >conftest.err
3002   rm -f conftest.er1
3003   cat conftest.err >&5
3004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3005   (exit $ac_status); } >/dev/null; then
3006   if test -s conftest.err; then
3007     ac_cpp_err=$ac_c_preproc_warn_flag
3008     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3009   else
3010     ac_cpp_err=
3011   fi
3012 else
3013   ac_cpp_err=yes
3014 fi
3015 if test -z "$ac_cpp_err"; then
3016   :
3017 else
3018   echo "$as_me: failed program was:" >&5
3019 sed 's/^/| /' conftest.$ac_ext >&5
3020
3021   # Broken: fails on valid input.
3022 continue
3023 fi
3024 rm -f conftest.err conftest.$ac_ext
3025
3026   # OK, works on sane cases.  Now check whether non-existent headers
3027   # can be detected and how.
3028   cat >conftest.$ac_ext <<_ACEOF
3029 /* confdefs.h.  */
3030 _ACEOF
3031 cat confdefs.h >>conftest.$ac_ext
3032 cat >>conftest.$ac_ext <<_ACEOF
3033 /* end confdefs.h.  */
3034 #include <ac_nonexistent.h>
3035 _ACEOF
3036 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3037   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3038   ac_status=$?
3039   grep -v '^ *+' conftest.er1 >conftest.err
3040   rm -f conftest.er1
3041   cat conftest.err >&5
3042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3043   (exit $ac_status); } >/dev/null; then
3044   if test -s conftest.err; then
3045     ac_cpp_err=$ac_c_preproc_warn_flag
3046     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3047   else
3048     ac_cpp_err=
3049   fi
3050 else
3051   ac_cpp_err=yes
3052 fi
3053 if test -z "$ac_cpp_err"; then
3054   # Broken: success on invalid input.
3055 continue
3056 else
3057   echo "$as_me: failed program was:" >&5
3058 sed 's/^/| /' conftest.$ac_ext >&5
3059
3060   # Passes both tests.
3061 ac_preproc_ok=:
3062 break
3063 fi
3064 rm -f conftest.err conftest.$ac_ext
3065
3066 done
3067 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3068 rm -f conftest.err conftest.$ac_ext
3069 if $ac_preproc_ok; then
3070   break
3071 fi
3072
3073     done
3074     ac_cv_prog_CPP=$CPP
3075
3076 fi
3077   CPP=$ac_cv_prog_CPP
3078 else
3079   ac_cv_prog_CPP=$CPP
3080 fi
3081 echo "$as_me:$LINENO: result: $CPP" >&5
3082 echo "${ECHO_T}$CPP" >&6
3083 ac_preproc_ok=false
3084 for ac_c_preproc_warn_flag in '' yes
3085 do
3086   # Use a header file that comes with gcc, so configuring glibc
3087   # with a fresh cross-compiler works.
3088   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3089   # <limits.h> exists even on freestanding compilers.
3090   # On the NeXT, cc -E runs the code through the compiler's parser,
3091   # not just through cpp. "Syntax error" is here to catch this case.
3092   cat >conftest.$ac_ext <<_ACEOF
3093 /* confdefs.h.  */
3094 _ACEOF
3095 cat confdefs.h >>conftest.$ac_ext
3096 cat >>conftest.$ac_ext <<_ACEOF
3097 /* end confdefs.h.  */
3098 #ifdef __STDC__
3099 # include <limits.h>
3100 #else
3101 # include <assert.h>
3102 #endif
3103                      Syntax error
3104 _ACEOF
3105 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3106   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3107   ac_status=$?
3108   grep -v '^ *+' conftest.er1 >conftest.err
3109   rm -f conftest.er1
3110   cat conftest.err >&5
3111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3112   (exit $ac_status); } >/dev/null; then
3113   if test -s conftest.err; then
3114     ac_cpp_err=$ac_c_preproc_warn_flag
3115     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3116   else
3117     ac_cpp_err=
3118   fi
3119 else
3120   ac_cpp_err=yes
3121 fi
3122 if test -z "$ac_cpp_err"; then
3123   :
3124 else
3125   echo "$as_me: failed program was:" >&5
3126 sed 's/^/| /' conftest.$ac_ext >&5
3127
3128   # Broken: fails on valid input.
3129 continue
3130 fi
3131 rm -f conftest.err conftest.$ac_ext
3132
3133   # OK, works on sane cases.  Now check whether non-existent headers
3134   # can be detected and how.
3135   cat >conftest.$ac_ext <<_ACEOF
3136 /* confdefs.h.  */
3137 _ACEOF
3138 cat confdefs.h >>conftest.$ac_ext
3139 cat >>conftest.$ac_ext <<_ACEOF
3140 /* end confdefs.h.  */
3141 #include <ac_nonexistent.h>
3142 _ACEOF
3143 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3144   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3145   ac_status=$?
3146   grep -v '^ *+' conftest.er1 >conftest.err
3147   rm -f conftest.er1
3148   cat conftest.err >&5
3149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3150   (exit $ac_status); } >/dev/null; then
3151   if test -s conftest.err; then
3152     ac_cpp_err=$ac_c_preproc_warn_flag
3153     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3154   else
3155     ac_cpp_err=
3156   fi
3157 else
3158   ac_cpp_err=yes
3159 fi
3160 if test -z "$ac_cpp_err"; then
3161   # Broken: success on invalid input.
3162 continue
3163 else
3164   echo "$as_me: failed program was:" >&5
3165 sed 's/^/| /' conftest.$ac_ext >&5
3166
3167   # Passes both tests.
3168 ac_preproc_ok=:
3169 break
3170 fi
3171 rm -f conftest.err conftest.$ac_ext
3172
3173 done
3174 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3175 rm -f conftest.err conftest.$ac_ext
3176 if $ac_preproc_ok; then
3177   :
3178 else
3179   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3180 See \`config.log' for more details." >&5
3181 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3182 See \`config.log' for more details." >&2;}
3183    { (exit 1); exit 1; }; }
3184 fi
3185
3186 ac_ext=c
3187 ac_cpp='$CPP $CPPFLAGS'
3188 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3189 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3190 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3191
3192 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3193 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3194 if test "${ac_cv_c_const+set}" = set; then
3195   echo $ECHO_N "(cached) $ECHO_C" >&6
3196 else
3197   cat >conftest.$ac_ext <<_ACEOF
3198 /* confdefs.h.  */
3199 _ACEOF
3200 cat confdefs.h >>conftest.$ac_ext
3201 cat >>conftest.$ac_ext <<_ACEOF
3202 /* end confdefs.h.  */
3203
3204 int
3205 main ()
3206 {
3207 /* FIXME: Include the comments suggested by Paul. */
3208 #ifndef __cplusplus
3209   /* Ultrix mips cc rejects this.  */
3210   typedef int charset[2];
3211   const charset x;
3212   /* SunOS 4.1.1 cc rejects this.  */
3213   char const *const *ccp;
3214   char **p;
3215   /* NEC SVR4.0.2 mips cc rejects this.  */
3216   struct point {int x, y;};
3217   static struct point const zero = {0,0};
3218   /* AIX XL C 1.02.0.0 rejects this.
3219      It does not let you subtract one const X* pointer from another in
3220      an arm of an if-expression whose if-part is not a constant
3221      expression */
3222   const char *g = "string";
3223   ccp = &g + (g ? g-g : 0);
3224   /* HPUX 7.0 cc rejects these. */
3225   ++ccp;
3226   p = (char**) ccp;
3227   ccp = (char const *const *) p;
3228   { /* SCO 3.2v4 cc rejects this.  */
3229     char *t;
3230     char const *s = 0 ? (char *) 0 : (char const *) 0;
3231
3232     *t++ = 0;
3233   }
3234   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3235     int x[] = {25, 17};
3236     const int *foo = &x[0];
3237     ++foo;
3238   }
3239   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3240     typedef const int *iptr;
3241     iptr p = 0;
3242     ++p;
3243   }
3244   { /* AIX XL C 1.02.0.0 rejects this saying
3245        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3246     struct s { int j; const int *ap[3]; };
3247     struct s *b; b->j = 5;
3248   }
3249   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3250     const int foo = 10;
3251   }
3252 #endif
3253
3254   ;
3255   return 0;
3256 }
3257 _ACEOF
3258 rm -f conftest.$ac_objext
3259 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3260   (eval $ac_compile) 2>conftest.er1
3261   ac_status=$?
3262   grep -v '^ *+' conftest.er1 >conftest.err
3263   rm -f conftest.er1
3264   cat conftest.err >&5
3265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3266   (exit $ac_status); } &&
3267          { ac_try='test -z "$ac_c_werror_flag"
3268                          || test ! -s conftest.err'
3269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3270   (eval $ac_try) 2>&5
3271   ac_status=$?
3272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3273   (exit $ac_status); }; } &&
3274          { ac_try='test -s conftest.$ac_objext'
3275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3276   (eval $ac_try) 2>&5
3277   ac_status=$?
3278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3279   (exit $ac_status); }; }; then
3280   ac_cv_c_const=yes
3281 else
3282   echo "$as_me: failed program was:" >&5
3283 sed 's/^/| /' conftest.$ac_ext >&5
3284
3285 ac_cv_c_const=no
3286 fi
3287 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3288 fi
3289 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3290 echo "${ECHO_T}$ac_cv_c_const" >&6
3291 if test $ac_cv_c_const = no; then
3292
3293 cat >>confdefs.h <<\_ACEOF
3294 #define const
3295 _ACEOF
3296
3297 fi
3298
3299 echo "$as_me:$LINENO: checking for inline" >&5
3300 echo $ECHO_N "checking for inline... $ECHO_C" >&6
3301 if test "${ac_cv_c_inline+set}" = set; then
3302   echo $ECHO_N "(cached) $ECHO_C" >&6
3303 else
3304   ac_cv_c_inline=no
3305 for ac_kw in inline __inline__ __inline; do
3306   cat >conftest.$ac_ext <<_ACEOF
3307 /* confdefs.h.  */
3308 _ACEOF
3309 cat confdefs.h >>conftest.$ac_ext
3310 cat >>conftest.$ac_ext <<_ACEOF
3311 /* end confdefs.h.  */
3312 #ifndef __cplusplus
3313 typedef int foo_t;
3314 static $ac_kw foo_t static_foo () {return 0; }
3315 $ac_kw foo_t foo () {return 0; }
3316 #endif
3317
3318 _ACEOF
3319 rm -f conftest.$ac_objext
3320 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3321   (eval $ac_compile) 2>conftest.er1
3322   ac_status=$?
3323   grep -v '^ *+' conftest.er1 >conftest.err
3324   rm -f conftest.er1
3325   cat conftest.err >&5
3326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3327   (exit $ac_status); } &&
3328          { ac_try='test -z "$ac_c_werror_flag"
3329                          || test ! -s conftest.err'
3330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3331   (eval $ac_try) 2>&5
3332   ac_status=$?
3333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3334   (exit $ac_status); }; } &&
3335          { ac_try='test -s conftest.$ac_objext'
3336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3337   (eval $ac_try) 2>&5
3338   ac_status=$?
3339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3340   (exit $ac_status); }; }; then
3341   ac_cv_c_inline=$ac_kw; break
3342 else
3343   echo "$as_me: failed program was:" >&5
3344 sed 's/^/| /' conftest.$ac_ext >&5
3345
3346 fi
3347 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3348 done
3349
3350 fi
3351 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3352 echo "${ECHO_T}$ac_cv_c_inline" >&6
3353
3354
3355 case $ac_cv_c_inline in
3356   inline | yes) ;;
3357   *)
3358     case $ac_cv_c_inline in
3359       no) ac_val=;;
3360       *) ac_val=$ac_cv_c_inline;;
3361     esac
3362     cat >>confdefs.h <<_ACEOF
3363 #ifndef __cplusplus
3364 #define inline $ac_val
3365 #endif
3366 _ACEOF
3367     ;;
3368 esac
3369
3370
3371 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3372   echo "$as_me:$LINENO: checking for bc" >&5
3373 echo $ECHO_N "checking for bc... $ECHO_C" >&6
3374   if test "$ac_bc_result" = "15" ; then
3375     echo "$as_me:$LINENO: result: yes" >&5
3376 echo "${ECHO_T}yes" >&6
3377   else
3378     echo "$as_me:$LINENO: result: no" >&5
3379 echo "${ECHO_T}no" >&6
3380     echo ''
3381     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3382                   part of Unix since the 1970s.  Come back when your vendor
3383                   has grown a clue." >&5
3384 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3385                   part of Unix since the 1970s.  Come back when your vendor
3386                   has grown a clue." >&2;}
3387    { (exit 1); exit 1; }; }
3388   fi
3389
3390
3391 # stuff for Makefiles
3392 # Find a good install program.  We prefer a C program (faster),
3393 # so one script is as good as another.  But avoid the broken or
3394 # incompatible versions:
3395 # SysV /etc/install, /usr/sbin/install
3396 # SunOS /usr/etc/install
3397 # IRIX /sbin/install
3398 # AIX /bin/install
3399 # AmigaOS /C/install, which installs bootblocks on floppy discs
3400 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3401 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3402 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3403 # OS/2's system install, which has a completely different semantic
3404 # ./install, which can be erroneously created by make from ./install.sh.
3405 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3406 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3407 if test -z "$INSTALL"; then
3408 if test "${ac_cv_path_install+set}" = set; then
3409   echo $ECHO_N "(cached) $ECHO_C" >&6
3410 else
3411   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3412 for as_dir in $PATH
3413 do
3414   IFS=$as_save_IFS
3415   test -z "$as_dir" && as_dir=.
3416   # Account for people who put trailing slashes in PATH elements.
3417 case $as_dir/ in
3418   ./ | .// | /cC/* | \
3419   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3420   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3421   /usr/ucb/* ) ;;
3422   *)
3423     # OSF1 and SCO ODT 3.0 have their own names for install.
3424     # Don't use installbsd from OSF since it installs stuff as root
3425     # by default.
3426     for ac_prog in ginstall scoinst install; do
3427       for ac_exec_ext in '' $ac_executable_extensions; do
3428         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3429           if test $ac_prog = install &&
3430             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3431             # AIX install.  It has an incompatible calling convention.
3432             :
3433           elif test $ac_prog = install &&
3434             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3435             # program-specific install script used by HP pwplus--don't use.
3436             :
3437           else
3438             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3439             break 3
3440           fi
3441         fi
3442       done
3443     done
3444     ;;
3445 esac
3446 done
3447
3448
3449 fi
3450   if test "${ac_cv_path_install+set}" = set; then
3451     INSTALL=$ac_cv_path_install
3452   else
3453     # As a last resort, use the slow shell script.  We don't cache a
3454     # path for INSTALL within a source directory, because that will
3455     # break other packages using the cache if that directory is
3456     # removed, or if the path is relative.
3457     INSTALL=$ac_install_sh
3458   fi
3459 fi
3460 echo "$as_me:$LINENO: result: $INSTALL" >&5
3461 echo "${ECHO_T}$INSTALL" >&6
3462
3463 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3464 # It thinks the first close brace ends the variable substitution.
3465 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3466
3467 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3468
3469 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3470
3471 echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
3472 echo $ECHO_N "checking whether \"\${INSTALL} -d\" creates intermediate directories... $ECHO_C" >&6
3473 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
3474   echo $ECHO_N "(cached) $ECHO_C" >&6
3475 else
3476   ac_cv_install_d_creates_dirs=no
3477      rm -rf conftestdir
3478      if mkdir conftestdir; then
3479        cd conftestdir 2>/dev/null
3480        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
3481        if test -d dir1/dir2/. ; then
3482          ac_cv_install_d_creates_dirs=yes
3483        fi
3484        cd .. 2>/dev/null
3485        rm -rf conftestdir
3486      fi
3487
3488 fi
3489 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
3490 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
3491
3492   if test "$ac_cv_install_d_creates_dirs" = no ; then
3493     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
3494 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
3495 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
3496   echo $ECHO_N "(cached) $ECHO_C" >&6
3497 else
3498   ac_cv_mkdir_p_creates_dirs=no
3499        rm -rf conftestdir
3500        if mkdir conftestdir; then
3501          cd conftestdir 2>/dev/null
3502          mkdir -p dir1/dir2 >/dev/null 2>&1
3503          if test -d dir1/dir2/. ; then
3504            ac_cv_mkdir_p_creates_dirs=yes
3505          fi
3506          cd .. 2>/dev/null
3507          rm -rf conftestdir
3508        fi
3509
3510 fi
3511 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3512 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3513   fi
3514
3515   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3516     INSTALL_DIRS='${INSTALL} -d'
3517   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3518     INSTALL_DIRS='mkdir -p'
3519   else
3520     # any other ideas?
3521     INSTALL_DIRS='${INSTALL} -d'
3522   fi
3523
3524 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3525 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3526 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
3527 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3528   echo $ECHO_N "(cached) $ECHO_C" >&6
3529 else
3530   cat >conftest.make <<\_ACEOF
3531 all:
3532         @echo 'ac_maketemp="$(MAKE)"'
3533 _ACEOF
3534 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3535 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3536 if test -n "$ac_maketemp"; then
3537   eval ac_cv_prog_make_${ac_make}_set=yes
3538 else
3539   eval ac_cv_prog_make_${ac_make}_set=no
3540 fi
3541 rm -f conftest.make
3542 fi
3543 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3544   echo "$as_me:$LINENO: result: yes" >&5
3545 echo "${ECHO_T}yes" >&6
3546   SET_MAKE=
3547 else
3548   echo "$as_me:$LINENO: result: no" >&5
3549 echo "${ECHO_T}no" >&6
3550   SET_MAKE="MAKE=${MAKE-make}"
3551 fi
3552
3553
3554 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3555 # That's wrong: it should be set to '${INSTALL}', so that one can
3556 # implement the "install-strip" target properly (strip executables,
3557 # but do not try to strip scripts.)
3558 #
3559 INSTALL_SCRIPT='${INSTALL}'
3560
3561 # random libc stuff
3562
3563 echo "$as_me:$LINENO: checking for egrep" >&5
3564 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3565 if test "${ac_cv_prog_egrep+set}" = set; then
3566   echo $ECHO_N "(cached) $ECHO_C" >&6
3567 else
3568   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3569     then ac_cv_prog_egrep='grep -E'
3570     else ac_cv_prog_egrep='egrep'
3571     fi
3572 fi
3573 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3574 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3575  EGREP=$ac_cv_prog_egrep
3576
3577
3578 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3579 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3580 if test "${ac_cv_header_stdc+set}" = set; then
3581   echo $ECHO_N "(cached) $ECHO_C" >&6
3582 else
3583   cat >conftest.$ac_ext <<_ACEOF
3584 /* confdefs.h.  */
3585 _ACEOF
3586 cat confdefs.h >>conftest.$ac_ext
3587 cat >>conftest.$ac_ext <<_ACEOF
3588 /* end confdefs.h.  */
3589 #include <stdlib.h>
3590 #include <stdarg.h>
3591 #include <string.h>
3592 #include <float.h>
3593
3594 int
3595 main ()
3596 {
3597
3598   ;
3599   return 0;
3600 }
3601 _ACEOF
3602 rm -f conftest.$ac_objext
3603 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3604   (eval $ac_compile) 2>conftest.er1
3605   ac_status=$?
3606   grep -v '^ *+' conftest.er1 >conftest.err
3607   rm -f conftest.er1
3608   cat conftest.err >&5
3609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3610   (exit $ac_status); } &&
3611          { ac_try='test -z "$ac_c_werror_flag"
3612                          || test ! -s conftest.err'
3613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3614   (eval $ac_try) 2>&5
3615   ac_status=$?
3616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3617   (exit $ac_status); }; } &&
3618          { ac_try='test -s conftest.$ac_objext'
3619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3620   (eval $ac_try) 2>&5
3621   ac_status=$?
3622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3623   (exit $ac_status); }; }; then
3624   ac_cv_header_stdc=yes
3625 else
3626   echo "$as_me: failed program was:" >&5
3627 sed 's/^/| /' conftest.$ac_ext >&5
3628
3629 ac_cv_header_stdc=no
3630 fi
3631 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3632
3633 if test $ac_cv_header_stdc = yes; then
3634   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3635   cat >conftest.$ac_ext <<_ACEOF
3636 /* confdefs.h.  */
3637 _ACEOF
3638 cat confdefs.h >>conftest.$ac_ext
3639 cat >>conftest.$ac_ext <<_ACEOF
3640 /* end confdefs.h.  */
3641 #include <string.h>
3642
3643 _ACEOF
3644 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3645   $EGREP "memchr" >/dev/null 2>&1; then
3646   :
3647 else
3648   ac_cv_header_stdc=no
3649 fi
3650 rm -f conftest*
3651
3652 fi
3653
3654 if test $ac_cv_header_stdc = yes; then
3655   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3656   cat >conftest.$ac_ext <<_ACEOF
3657 /* confdefs.h.  */
3658 _ACEOF
3659 cat confdefs.h >>conftest.$ac_ext
3660 cat >>conftest.$ac_ext <<_ACEOF
3661 /* end confdefs.h.  */
3662 #include <stdlib.h>
3663
3664 _ACEOF
3665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3666   $EGREP "free" >/dev/null 2>&1; then
3667   :
3668 else
3669   ac_cv_header_stdc=no
3670 fi
3671 rm -f conftest*
3672
3673 fi
3674
3675 if test $ac_cv_header_stdc = yes; then
3676   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3677   if test "$cross_compiling" = yes; then
3678   :
3679 else
3680   cat >conftest.$ac_ext <<_ACEOF
3681 /* confdefs.h.  */
3682 _ACEOF
3683 cat confdefs.h >>conftest.$ac_ext
3684 cat >>conftest.$ac_ext <<_ACEOF
3685 /* end confdefs.h.  */
3686 #include <ctype.h>
3687 #if ((' ' & 0x0FF) == 0x020)
3688 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3689 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3690 #else
3691 # define ISLOWER(c) \
3692                    (('a' <= (c) && (c) <= 'i') \
3693                      || ('j' <= (c) && (c) <= 'r') \
3694                      || ('s' <= (c) && (c) <= 'z'))
3695 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3696 #endif
3697
3698 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3699 int
3700 main ()
3701 {
3702   int i;
3703   for (i = 0; i < 256; i++)
3704     if (XOR (islower (i), ISLOWER (i))
3705         || toupper (i) != TOUPPER (i))
3706       exit(2);
3707   exit (0);
3708 }
3709 _ACEOF
3710 rm -f conftest$ac_exeext
3711 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3712   (eval $ac_link) 2>&5
3713   ac_status=$?
3714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3715   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3717   (eval $ac_try) 2>&5
3718   ac_status=$?
3719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3720   (exit $ac_status); }; }; then
3721   :
3722 else
3723   echo "$as_me: program exited with status $ac_status" >&5
3724 echo "$as_me: failed program was:" >&5
3725 sed 's/^/| /' conftest.$ac_ext >&5
3726
3727 ( exit $ac_status )
3728 ac_cv_header_stdc=no
3729 fi
3730 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3731 fi
3732 fi
3733 fi
3734 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3735 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3736 if test $ac_cv_header_stdc = yes; then
3737
3738 cat >>confdefs.h <<\_ACEOF
3739 #define STDC_HEADERS 1
3740 _ACEOF
3741
3742 fi
3743
3744 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3755                   inttypes.h stdint.h unistd.h
3756 do
3757 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3758 echo "$as_me:$LINENO: checking for $ac_header" >&5
3759 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3760 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3761   echo $ECHO_N "(cached) $ECHO_C" >&6
3762 else
3763   cat >conftest.$ac_ext <<_ACEOF
3764 /* confdefs.h.  */
3765 _ACEOF
3766 cat confdefs.h >>conftest.$ac_ext
3767 cat >>conftest.$ac_ext <<_ACEOF
3768 /* end confdefs.h.  */
3769 $ac_includes_default
3770
3771 #include <$ac_header>
3772 _ACEOF
3773 rm -f conftest.$ac_objext
3774 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3775   (eval $ac_compile) 2>conftest.er1
3776   ac_status=$?
3777   grep -v '^ *+' conftest.er1 >conftest.err
3778   rm -f conftest.er1
3779   cat conftest.err >&5
3780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3781   (exit $ac_status); } &&
3782          { ac_try='test -z "$ac_c_werror_flag"
3783                          || test ! -s conftest.err'
3784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3785   (eval $ac_try) 2>&5
3786   ac_status=$?
3787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3788   (exit $ac_status); }; } &&
3789          { ac_try='test -s conftest.$ac_objext'
3790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3791   (eval $ac_try) 2>&5
3792   ac_status=$?
3793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3794   (exit $ac_status); }; }; then
3795   eval "$as_ac_Header=yes"
3796 else
3797   echo "$as_me: failed program was:" >&5
3798 sed 's/^/| /' conftest.$ac_ext >&5
3799
3800 eval "$as_ac_Header=no"
3801 fi
3802 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3803 fi
3804 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3805 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3806 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3807   cat >>confdefs.h <<_ACEOF
3808 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3809 _ACEOF
3810
3811 fi
3812
3813 done
3814
3815
3816
3817 for ac_header in unistd.h
3818 do
3819 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3820 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3821   echo "$as_me:$LINENO: checking for $ac_header" >&5
3822 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3823 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3824   echo $ECHO_N "(cached) $ECHO_C" >&6
3825 fi
3826 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3827 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3828 else
3829   # Is the header compilable?
3830 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3831 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3832 cat >conftest.$ac_ext <<_ACEOF
3833 /* confdefs.h.  */
3834 _ACEOF
3835 cat confdefs.h >>conftest.$ac_ext
3836 cat >>conftest.$ac_ext <<_ACEOF
3837 /* end confdefs.h.  */
3838 $ac_includes_default
3839 #include <$ac_header>
3840 _ACEOF
3841 rm -f conftest.$ac_objext
3842 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3843   (eval $ac_compile) 2>conftest.er1
3844   ac_status=$?
3845   grep -v '^ *+' conftest.er1 >conftest.err
3846   rm -f conftest.er1
3847   cat conftest.err >&5
3848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3849   (exit $ac_status); } &&
3850          { ac_try='test -z "$ac_c_werror_flag"
3851                          || test ! -s conftest.err'
3852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3853   (eval $ac_try) 2>&5
3854   ac_status=$?
3855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3856   (exit $ac_status); }; } &&
3857          { ac_try='test -s conftest.$ac_objext'
3858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3859   (eval $ac_try) 2>&5
3860   ac_status=$?
3861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3862   (exit $ac_status); }; }; then
3863   ac_header_compiler=yes
3864 else
3865   echo "$as_me: failed program was:" >&5
3866 sed 's/^/| /' conftest.$ac_ext >&5
3867
3868 ac_header_compiler=no
3869 fi
3870 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3871 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3872 echo "${ECHO_T}$ac_header_compiler" >&6
3873
3874 # Is the header present?
3875 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3876 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3877 cat >conftest.$ac_ext <<_ACEOF
3878 /* confdefs.h.  */
3879 _ACEOF
3880 cat confdefs.h >>conftest.$ac_ext
3881 cat >>conftest.$ac_ext <<_ACEOF
3882 /* end confdefs.h.  */
3883 #include <$ac_header>
3884 _ACEOF
3885 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3886   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3887   ac_status=$?
3888   grep -v '^ *+' conftest.er1 >conftest.err
3889   rm -f conftest.er1
3890   cat conftest.err >&5
3891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3892   (exit $ac_status); } >/dev/null; then
3893   if test -s conftest.err; then
3894     ac_cpp_err=$ac_c_preproc_warn_flag
3895     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3896   else
3897     ac_cpp_err=
3898   fi
3899 else
3900   ac_cpp_err=yes
3901 fi
3902 if test -z "$ac_cpp_err"; then
3903   ac_header_preproc=yes
3904 else
3905   echo "$as_me: failed program was:" >&5
3906 sed 's/^/| /' conftest.$ac_ext >&5
3907
3908   ac_header_preproc=no
3909 fi
3910 rm -f conftest.err conftest.$ac_ext
3911 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3912 echo "${ECHO_T}$ac_header_preproc" >&6
3913
3914 # So?  What about this header?
3915 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3916   yes:no: )
3917     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3918 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3919     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
3920 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
3921     ac_header_preproc=yes
3922     ;;
3923   no:yes:* )
3924     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3925 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3926     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
3927 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
3928     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
3929 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
3930     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
3931 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
3932     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3933 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3934     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
3935 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
3936     (
3937       cat <<\_ASBOX
3938 ## ------------------------------------------ ##
3939 ## Report this to the AC_PACKAGE_NAME lists.  ##
3940 ## ------------------------------------------ ##
3941 _ASBOX
3942     ) |
3943       sed "s/^/$as_me: WARNING:     /" >&2
3944     ;;
3945 esac
3946 echo "$as_me:$LINENO: checking for $ac_header" >&5
3947 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3948 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3949   echo $ECHO_N "(cached) $ECHO_C" >&6
3950 else
3951   eval "$as_ac_Header=\$ac_header_preproc"
3952 fi
3953 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3954 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3955
3956 fi
3957 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3958   cat >>confdefs.h <<_ACEOF
3959 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3960 _ACEOF
3961
3962 fi
3963
3964 done
3965
3966 echo "$as_me:$LINENO: checking for mode_t" >&5
3967 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3968 if test "${ac_cv_type_mode_t+set}" = set; then
3969   echo $ECHO_N "(cached) $ECHO_C" >&6
3970 else
3971   cat >conftest.$ac_ext <<_ACEOF
3972 /* confdefs.h.  */
3973 _ACEOF
3974 cat confdefs.h >>conftest.$ac_ext
3975 cat >>conftest.$ac_ext <<_ACEOF
3976 /* end confdefs.h.  */
3977 $ac_includes_default
3978 int
3979 main ()
3980 {
3981 if ((mode_t *) 0)
3982   return 0;
3983 if (sizeof (mode_t))
3984   return 0;
3985   ;
3986   return 0;
3987 }
3988 _ACEOF
3989 rm -f conftest.$ac_objext
3990 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3991   (eval $ac_compile) 2>conftest.er1
3992   ac_status=$?
3993   grep -v '^ *+' conftest.er1 >conftest.err
3994   rm -f conftest.er1
3995   cat conftest.err >&5
3996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3997   (exit $ac_status); } &&
3998          { ac_try='test -z "$ac_c_werror_flag"
3999                          || test ! -s conftest.err'
4000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4001   (eval $ac_try) 2>&5
4002   ac_status=$?
4003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4004   (exit $ac_status); }; } &&
4005          { ac_try='test -s conftest.$ac_objext'
4006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4007   (eval $ac_try) 2>&5
4008   ac_status=$?
4009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4010   (exit $ac_status); }; }; then
4011   ac_cv_type_mode_t=yes
4012 else
4013   echo "$as_me: failed program was:" >&5
4014 sed 's/^/| /' conftest.$ac_ext >&5
4015
4016 ac_cv_type_mode_t=no
4017 fi
4018 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4019 fi
4020 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4021 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4022 if test $ac_cv_type_mode_t = yes; then
4023   :
4024 else
4025
4026 cat >>confdefs.h <<_ACEOF
4027 #define mode_t int
4028 _ACEOF
4029
4030 fi
4031
4032 echo "$as_me:$LINENO: checking for pid_t" >&5
4033 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4034 if test "${ac_cv_type_pid_t+set}" = set; then
4035   echo $ECHO_N "(cached) $ECHO_C" >&6
4036 else
4037   cat >conftest.$ac_ext <<_ACEOF
4038 /* confdefs.h.  */
4039 _ACEOF
4040 cat confdefs.h >>conftest.$ac_ext
4041 cat >>conftest.$ac_ext <<_ACEOF
4042 /* end confdefs.h.  */
4043 $ac_includes_default
4044 int
4045 main ()
4046 {
4047 if ((pid_t *) 0)
4048   return 0;
4049 if (sizeof (pid_t))
4050   return 0;
4051   ;
4052   return 0;
4053 }
4054 _ACEOF
4055 rm -f conftest.$ac_objext
4056 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4057   (eval $ac_compile) 2>conftest.er1
4058   ac_status=$?
4059   grep -v '^ *+' conftest.er1 >conftest.err
4060   rm -f conftest.er1
4061   cat conftest.err >&5
4062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4063   (exit $ac_status); } &&
4064          { ac_try='test -z "$ac_c_werror_flag"
4065                          || test ! -s conftest.err'
4066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4067   (eval $ac_try) 2>&5
4068   ac_status=$?
4069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4070   (exit $ac_status); }; } &&
4071          { ac_try='test -s conftest.$ac_objext'
4072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4073   (eval $ac_try) 2>&5
4074   ac_status=$?
4075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4076   (exit $ac_status); }; }; then
4077   ac_cv_type_pid_t=yes
4078 else
4079   echo "$as_me: failed program was:" >&5
4080 sed 's/^/| /' conftest.$ac_ext >&5
4081
4082 ac_cv_type_pid_t=no
4083 fi
4084 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4085 fi
4086 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4087 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4088 if test $ac_cv_type_pid_t = yes; then
4089   :
4090 else
4091
4092 cat >>confdefs.h <<_ACEOF
4093 #define pid_t int
4094 _ACEOF
4095
4096 fi
4097
4098 echo "$as_me:$LINENO: checking for size_t" >&5
4099 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4100 if test "${ac_cv_type_size_t+set}" = set; then
4101   echo $ECHO_N "(cached) $ECHO_C" >&6
4102 else
4103   cat >conftest.$ac_ext <<_ACEOF
4104 /* confdefs.h.  */
4105 _ACEOF
4106 cat confdefs.h >>conftest.$ac_ext
4107 cat >>conftest.$ac_ext <<_ACEOF
4108 /* end confdefs.h.  */
4109 $ac_includes_default
4110 int
4111 main ()
4112 {
4113 if ((size_t *) 0)
4114   return 0;
4115 if (sizeof (size_t))
4116   return 0;
4117   ;
4118   return 0;
4119 }
4120 _ACEOF
4121 rm -f conftest.$ac_objext
4122 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4123   (eval $ac_compile) 2>conftest.er1
4124   ac_status=$?
4125   grep -v '^ *+' conftest.er1 >conftest.err
4126   rm -f conftest.er1
4127   cat conftest.err >&5
4128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4129   (exit $ac_status); } &&
4130          { ac_try='test -z "$ac_c_werror_flag"
4131                          || test ! -s conftest.err'
4132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4133   (eval $ac_try) 2>&5
4134   ac_status=$?
4135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4136   (exit $ac_status); }; } &&
4137          { ac_try='test -s conftest.$ac_objext'
4138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4139   (eval $ac_try) 2>&5
4140   ac_status=$?
4141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4142   (exit $ac_status); }; }; then
4143   ac_cv_type_size_t=yes
4144 else
4145   echo "$as_me: failed program was:" >&5
4146 sed 's/^/| /' conftest.$ac_ext >&5
4147
4148 ac_cv_type_size_t=no
4149 fi
4150 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4151 fi
4152 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4153 echo "${ECHO_T}$ac_cv_type_size_t" >&6
4154 if test $ac_cv_type_size_t = yes; then
4155   :
4156 else
4157
4158 cat >>confdefs.h <<_ACEOF
4159 #define size_t unsigned
4160 _ACEOF
4161
4162 fi
4163
4164 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4165 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4166 if test "${ac_cv_type_signal+set}" = set; then
4167   echo $ECHO_N "(cached) $ECHO_C" >&6
4168 else
4169   cat >conftest.$ac_ext <<_ACEOF
4170 /* confdefs.h.  */
4171 _ACEOF
4172 cat confdefs.h >>conftest.$ac_ext
4173 cat >>conftest.$ac_ext <<_ACEOF
4174 /* end confdefs.h.  */
4175 #include <sys/types.h>
4176 #include <signal.h>
4177 #ifdef signal
4178 # undef signal
4179 #endif
4180 #ifdef __cplusplus
4181 extern "C" void (*signal (int, void (*)(int)))(int);
4182 #else
4183 void (*signal ()) ();
4184 #endif
4185
4186 int
4187 main ()
4188 {
4189 int i;
4190   ;
4191   return 0;
4192 }
4193 _ACEOF
4194 rm -f conftest.$ac_objext
4195 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4196   (eval $ac_compile) 2>conftest.er1
4197   ac_status=$?
4198   grep -v '^ *+' conftest.er1 >conftest.err
4199   rm -f conftest.er1
4200   cat conftest.err >&5
4201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4202   (exit $ac_status); } &&
4203          { ac_try='test -z "$ac_c_werror_flag"
4204                          || test ! -s conftest.err'
4205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4206   (eval $ac_try) 2>&5
4207   ac_status=$?
4208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4209   (exit $ac_status); }; } &&
4210          { ac_try='test -s conftest.$ac_objext'
4211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4212   (eval $ac_try) 2>&5
4213   ac_status=$?
4214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4215   (exit $ac_status); }; }; then
4216   ac_cv_type_signal=void
4217 else
4218   echo "$as_me: failed program was:" >&5
4219 sed 's/^/| /' conftest.$ac_ext >&5
4220
4221 ac_cv_type_signal=int
4222 fi
4223 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4224 fi
4225 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4226 echo "${ECHO_T}$ac_cv_type_signal" >&6
4227
4228 cat >>confdefs.h <<_ACEOF
4229 #define RETSIGTYPE $ac_cv_type_signal
4230 _ACEOF
4231
4232
4233 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4234 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4235 if test "${ac_cv_header_time+set}" = set; then
4236   echo $ECHO_N "(cached) $ECHO_C" >&6
4237 else
4238   cat >conftest.$ac_ext <<_ACEOF
4239 /* confdefs.h.  */
4240 _ACEOF
4241 cat confdefs.h >>conftest.$ac_ext
4242 cat >>conftest.$ac_ext <<_ACEOF
4243 /* end confdefs.h.  */
4244 #include <sys/types.h>
4245 #include <sys/time.h>
4246 #include <time.h>
4247
4248 int
4249 main ()
4250 {
4251 if ((struct tm *) 0)
4252 return 0;
4253   ;
4254   return 0;
4255 }
4256 _ACEOF
4257 rm -f conftest.$ac_objext
4258 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4259   (eval $ac_compile) 2>conftest.er1
4260   ac_status=$?
4261   grep -v '^ *+' conftest.er1 >conftest.err
4262   rm -f conftest.er1
4263   cat conftest.err >&5
4264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4265   (exit $ac_status); } &&
4266          { ac_try='test -z "$ac_c_werror_flag"
4267                          || test ! -s conftest.err'
4268   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4269   (eval $ac_try) 2>&5
4270   ac_status=$?
4271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4272   (exit $ac_status); }; } &&
4273          { ac_try='test -s conftest.$ac_objext'
4274   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4275   (eval $ac_try) 2>&5
4276   ac_status=$?
4277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4278   (exit $ac_status); }; }; then
4279   ac_cv_header_time=yes
4280 else
4281   echo "$as_me: failed program was:" >&5
4282 sed 's/^/| /' conftest.$ac_ext >&5
4283
4284 ac_cv_header_time=no
4285 fi
4286 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4287 fi
4288 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
4289 echo "${ECHO_T}$ac_cv_header_time" >&6
4290 if test $ac_cv_header_time = yes; then
4291
4292 cat >>confdefs.h <<\_ACEOF
4293 #define TIME_WITH_SYS_TIME 1
4294 _ACEOF
4295
4296 fi
4297
4298 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
4299 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4300 if test "${ac_cv_header_sys_wait_h+set}" = set; then
4301   echo $ECHO_N "(cached) $ECHO_C" >&6
4302 else
4303   cat >conftest.$ac_ext <<_ACEOF
4304 /* confdefs.h.  */
4305 _ACEOF
4306 cat confdefs.h >>conftest.$ac_ext
4307 cat >>conftest.$ac_ext <<_ACEOF
4308 /* end confdefs.h.  */
4309 #include <sys/types.h>
4310 #include <sys/wait.h>
4311 #ifndef WEXITSTATUS
4312 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4313 #endif
4314 #ifndef WIFEXITED
4315 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4316 #endif
4317
4318 int
4319 main ()
4320 {
4321   int s;
4322   wait (&s);
4323   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4324   ;
4325   return 0;
4326 }
4327 _ACEOF
4328 rm -f conftest.$ac_objext
4329 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4330   (eval $ac_compile) 2>conftest.er1
4331   ac_status=$?
4332   grep -v '^ *+' conftest.er1 >conftest.err
4333   rm -f conftest.er1
4334   cat conftest.err >&5
4335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4336   (exit $ac_status); } &&
4337          { ac_try='test -z "$ac_c_werror_flag"
4338                          || test ! -s conftest.err'
4339   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4340   (eval $ac_try) 2>&5
4341   ac_status=$?
4342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4343   (exit $ac_status); }; } &&
4344          { ac_try='test -s conftest.$ac_objext'
4345   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4346   (eval $ac_try) 2>&5
4347   ac_status=$?
4348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4349   (exit $ac_status); }; }; then
4350   ac_cv_header_sys_wait_h=yes
4351 else
4352   echo "$as_me: failed program was:" >&5
4353 sed 's/^/| /' conftest.$ac_ext >&5
4354
4355 ac_cv_header_sys_wait_h=no
4356 fi
4357 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4358 fi
4359 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
4360 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
4361 if test $ac_cv_header_sys_wait_h = yes; then
4362
4363 cat >>confdefs.h <<\_ACEOF
4364 #define HAVE_SYS_WAIT_H 1
4365 _ACEOF
4366
4367 fi
4368
4369
4370
4371
4372
4373
4374 ac_header_dirent=no
4375 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4376   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4377 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4378 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4379 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4380   echo $ECHO_N "(cached) $ECHO_C" >&6
4381 else
4382   cat >conftest.$ac_ext <<_ACEOF
4383 /* confdefs.h.  */
4384 _ACEOF
4385 cat confdefs.h >>conftest.$ac_ext
4386 cat >>conftest.$ac_ext <<_ACEOF
4387 /* end confdefs.h.  */
4388 #include <sys/types.h>
4389 #include <$ac_hdr>
4390
4391 int
4392 main ()
4393 {
4394 if ((DIR *) 0)
4395 return 0;
4396   ;
4397   return 0;
4398 }
4399 _ACEOF
4400 rm -f conftest.$ac_objext
4401 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4402   (eval $ac_compile) 2>conftest.er1
4403   ac_status=$?
4404   grep -v '^ *+' conftest.er1 >conftest.err
4405   rm -f conftest.er1
4406   cat conftest.err >&5
4407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4408   (exit $ac_status); } &&
4409          { ac_try='test -z "$ac_c_werror_flag"
4410                          || test ! -s conftest.err'
4411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4412   (eval $ac_try) 2>&5
4413   ac_status=$?
4414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4415   (exit $ac_status); }; } &&
4416          { ac_try='test -s conftest.$ac_objext'
4417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4418   (eval $ac_try) 2>&5
4419   ac_status=$?
4420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4421   (exit $ac_status); }; }; then
4422   eval "$as_ac_Header=yes"
4423 else
4424   echo "$as_me: failed program was:" >&5
4425 sed 's/^/| /' conftest.$ac_ext >&5
4426
4427 eval "$as_ac_Header=no"
4428 fi
4429 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4430 fi
4431 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4432 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4433 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4434   cat >>confdefs.h <<_ACEOF
4435 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4436 _ACEOF
4437
4438 ac_header_dirent=$ac_hdr; break
4439 fi
4440
4441 done
4442 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4443 if test $ac_header_dirent = dirent.h; then
4444   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4445 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4446 if test "${ac_cv_search_opendir+set}" = set; then
4447   echo $ECHO_N "(cached) $ECHO_C" >&6
4448 else
4449   ac_func_search_save_LIBS=$LIBS
4450 ac_cv_search_opendir=no
4451 cat >conftest.$ac_ext <<_ACEOF
4452 /* confdefs.h.  */
4453 _ACEOF
4454 cat confdefs.h >>conftest.$ac_ext
4455 cat >>conftest.$ac_ext <<_ACEOF
4456 /* end confdefs.h.  */
4457
4458 /* Override any gcc2 internal prototype to avoid an error.  */
4459 #ifdef __cplusplus
4460 extern "C"
4461 #endif
4462 /* We use char because int might match the return type of a gcc2
4463    builtin and then its argument prototype would still apply.  */
4464 char opendir ();
4465 int
4466 main ()
4467 {
4468 opendir ();
4469   ;
4470   return 0;
4471 }
4472 _ACEOF
4473 rm -f conftest.$ac_objext conftest$ac_exeext
4474 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4475   (eval $ac_link) 2>conftest.er1
4476   ac_status=$?
4477   grep -v '^ *+' conftest.er1 >conftest.err
4478   rm -f conftest.er1
4479   cat conftest.err >&5
4480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4481   (exit $ac_status); } &&
4482          { ac_try='test -z "$ac_c_werror_flag"
4483                          || test ! -s conftest.err'
4484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4485   (eval $ac_try) 2>&5
4486   ac_status=$?
4487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4488   (exit $ac_status); }; } &&
4489          { ac_try='test -s conftest$ac_exeext'
4490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4491   (eval $ac_try) 2>&5
4492   ac_status=$?
4493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4494   (exit $ac_status); }; }; then
4495   ac_cv_search_opendir="none required"
4496 else
4497   echo "$as_me: failed program was:" >&5
4498 sed 's/^/| /' conftest.$ac_ext >&5
4499
4500 fi
4501 rm -f conftest.err conftest.$ac_objext \
4502       conftest$ac_exeext conftest.$ac_ext
4503 if test "$ac_cv_search_opendir" = no; then
4504   for ac_lib in dir; do
4505     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4506     cat >conftest.$ac_ext <<_ACEOF
4507 /* confdefs.h.  */
4508 _ACEOF
4509 cat confdefs.h >>conftest.$ac_ext
4510 cat >>conftest.$ac_ext <<_ACEOF
4511 /* end confdefs.h.  */
4512
4513 /* Override any gcc2 internal prototype to avoid an error.  */
4514 #ifdef __cplusplus
4515 extern "C"
4516 #endif
4517 /* We use char because int might match the return type of a gcc2
4518    builtin and then its argument prototype would still apply.  */
4519 char opendir ();
4520 int
4521 main ()
4522 {
4523 opendir ();
4524   ;
4525   return 0;
4526 }
4527 _ACEOF
4528 rm -f conftest.$ac_objext conftest$ac_exeext
4529 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4530   (eval $ac_link) 2>conftest.er1
4531   ac_status=$?
4532   grep -v '^ *+' conftest.er1 >conftest.err
4533   rm -f conftest.er1
4534   cat conftest.err >&5
4535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4536   (exit $ac_status); } &&
4537          { ac_try='test -z "$ac_c_werror_flag"
4538                          || test ! -s conftest.err'
4539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4540   (eval $ac_try) 2>&5
4541   ac_status=$?
4542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4543   (exit $ac_status); }; } &&
4544          { ac_try='test -s conftest$ac_exeext'
4545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4546   (eval $ac_try) 2>&5
4547   ac_status=$?
4548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4549   (exit $ac_status); }; }; then
4550   ac_cv_search_opendir="-l$ac_lib"
4551 break
4552 else
4553   echo "$as_me: failed program was:" >&5
4554 sed 's/^/| /' conftest.$ac_ext >&5
4555
4556 fi
4557 rm -f conftest.err conftest.$ac_objext \
4558       conftest$ac_exeext conftest.$ac_ext
4559   done
4560 fi
4561 LIBS=$ac_func_search_save_LIBS
4562 fi
4563 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4564 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4565 if test "$ac_cv_search_opendir" != no; then
4566   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4567
4568 fi
4569
4570 else
4571   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4572 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4573 if test "${ac_cv_search_opendir+set}" = set; then
4574   echo $ECHO_N "(cached) $ECHO_C" >&6
4575 else
4576   ac_func_search_save_LIBS=$LIBS
4577 ac_cv_search_opendir=no
4578 cat >conftest.$ac_ext <<_ACEOF
4579 /* confdefs.h.  */
4580 _ACEOF
4581 cat confdefs.h >>conftest.$ac_ext
4582 cat >>conftest.$ac_ext <<_ACEOF
4583 /* end confdefs.h.  */
4584
4585 /* Override any gcc2 internal prototype to avoid an error.  */
4586 #ifdef __cplusplus
4587 extern "C"
4588 #endif
4589 /* We use char because int might match the return type of a gcc2
4590    builtin and then its argument prototype would still apply.  */
4591 char opendir ();
4592 int
4593 main ()
4594 {
4595 opendir ();
4596   ;
4597   return 0;
4598 }
4599 _ACEOF
4600 rm -f conftest.$ac_objext conftest$ac_exeext
4601 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4602   (eval $ac_link) 2>conftest.er1
4603   ac_status=$?
4604   grep -v '^ *+' conftest.er1 >conftest.err
4605   rm -f conftest.er1
4606   cat conftest.err >&5
4607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4608   (exit $ac_status); } &&
4609          { ac_try='test -z "$ac_c_werror_flag"
4610                          || test ! -s conftest.err'
4611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4612   (eval $ac_try) 2>&5
4613   ac_status=$?
4614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4615   (exit $ac_status); }; } &&
4616          { ac_try='test -s conftest$ac_exeext'
4617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4618   (eval $ac_try) 2>&5
4619   ac_status=$?
4620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4621   (exit $ac_status); }; }; then
4622   ac_cv_search_opendir="none required"
4623 else
4624   echo "$as_me: failed program was:" >&5
4625 sed 's/^/| /' conftest.$ac_ext >&5
4626
4627 fi
4628 rm -f conftest.err conftest.$ac_objext \
4629       conftest$ac_exeext conftest.$ac_ext
4630 if test "$ac_cv_search_opendir" = no; then
4631   for ac_lib in x; do
4632     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4633     cat >conftest.$ac_ext <<_ACEOF
4634 /* confdefs.h.  */
4635 _ACEOF
4636 cat confdefs.h >>conftest.$ac_ext
4637 cat >>conftest.$ac_ext <<_ACEOF
4638 /* end confdefs.h.  */
4639
4640 /* Override any gcc2 internal prototype to avoid an error.  */
4641 #ifdef __cplusplus
4642 extern "C"
4643 #endif
4644 /* We use char because int might match the return type of a gcc2
4645    builtin and then its argument prototype would still apply.  */
4646 char opendir ();
4647 int
4648 main ()
4649 {
4650 opendir ();
4651   ;
4652   return 0;
4653 }
4654 _ACEOF
4655 rm -f conftest.$ac_objext conftest$ac_exeext
4656 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4657   (eval $ac_link) 2>conftest.er1
4658   ac_status=$?
4659   grep -v '^ *+' conftest.er1 >conftest.err
4660   rm -f conftest.er1
4661   cat conftest.err >&5
4662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4663   (exit $ac_status); } &&
4664          { ac_try='test -z "$ac_c_werror_flag"
4665                          || test ! -s conftest.err'
4666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4667   (eval $ac_try) 2>&5
4668   ac_status=$?
4669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4670   (exit $ac_status); }; } &&
4671          { ac_try='test -s conftest$ac_exeext'
4672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4673   (eval $ac_try) 2>&5
4674   ac_status=$?
4675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4676   (exit $ac_status); }; }; then
4677   ac_cv_search_opendir="-l$ac_lib"
4678 break
4679 else
4680   echo "$as_me: failed program was:" >&5
4681 sed 's/^/| /' conftest.$ac_ext >&5
4682
4683 fi
4684 rm -f conftest.err conftest.$ac_objext \
4685       conftest$ac_exeext conftest.$ac_ext
4686   done
4687 fi
4688 LIBS=$ac_func_search_save_LIBS
4689 fi
4690 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4691 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4692 if test "$ac_cv_search_opendir" != no; then
4693   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4694
4695 fi
4696
4697 fi
4698
4699 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4700 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4701   if test "${ac_cv_gettimeofday_args+set}" = set; then
4702   echo $ECHO_N "(cached) $ECHO_C" >&6
4703 else
4704   cat >conftest.$ac_ext <<_ACEOF
4705 /* confdefs.h.  */
4706 _ACEOF
4707 cat confdefs.h >>conftest.$ac_ext
4708 cat >>conftest.$ac_ext <<_ACEOF
4709 /* end confdefs.h.  */
4710 #include <stdlib.h>
4711                     #include <sys/time.h>
4712 int
4713 main ()
4714 {
4715 struct timeval tv; struct timezone tzp;
4716                     gettimeofday(&tv, &tzp);
4717   ;
4718   return 0;
4719 }
4720 _ACEOF
4721 rm -f conftest.$ac_objext
4722 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4723   (eval $ac_compile) 2>conftest.er1
4724   ac_status=$?
4725   grep -v '^ *+' conftest.er1 >conftest.err
4726   rm -f conftest.er1
4727   cat conftest.err >&5
4728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4729   (exit $ac_status); } &&
4730          { ac_try='test -z "$ac_c_werror_flag"
4731                          || test ! -s conftest.err'
4732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4733   (eval $ac_try) 2>&5
4734   ac_status=$?
4735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4736   (exit $ac_status); }; } &&
4737          { ac_try='test -s conftest.$ac_objext'
4738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4739   (eval $ac_try) 2>&5
4740   ac_status=$?
4741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4742   (exit $ac_status); }; }; then
4743   ac_gettimeofday_args=2
4744 else
4745   echo "$as_me: failed program was:" >&5
4746 sed 's/^/| /' conftest.$ac_ext >&5
4747
4748 cat >conftest.$ac_ext <<_ACEOF
4749 /* confdefs.h.  */
4750 _ACEOF
4751 cat confdefs.h >>conftest.$ac_ext
4752 cat >>conftest.$ac_ext <<_ACEOF
4753 /* end confdefs.h.  */
4754 #include <stdlib.h>
4755                                     #include <sys/time.h>
4756 int
4757 main ()
4758 {
4759 struct timeval tv; gettimeofday(&tv);
4760   ;
4761   return 0;
4762 }
4763 _ACEOF
4764 rm -f conftest.$ac_objext
4765 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4766   (eval $ac_compile) 2>conftest.er1
4767   ac_status=$?
4768   grep -v '^ *+' conftest.er1 >conftest.err
4769   rm -f conftest.er1
4770   cat conftest.err >&5
4771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4772   (exit $ac_status); } &&
4773          { ac_try='test -z "$ac_c_werror_flag"
4774                          || test ! -s conftest.err'
4775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4776   (eval $ac_try) 2>&5
4777   ac_status=$?
4778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4779   (exit $ac_status); }; } &&
4780          { ac_try='test -s conftest.$ac_objext'
4781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4782   (eval $ac_try) 2>&5
4783   ac_status=$?
4784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4785   (exit $ac_status); }; }; then
4786   ac_gettimeofday_args=1
4787 else
4788   echo "$as_me: failed program was:" >&5
4789 sed 's/^/| /' conftest.$ac_ext >&5
4790
4791 ac_gettimeofday_args=0
4792 fi
4793 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4794 fi
4795 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4796     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4797 fi
4798
4799   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4800   if test "$ac_gettimeofday_args" = 1 ; then
4801     cat >>confdefs.h <<\_ACEOF
4802 #define HAVE_GETTIMEOFDAY 1
4803 _ACEOF
4804
4805     echo "$as_me:$LINENO: result: one argument" >&5
4806 echo "${ECHO_T}one argument" >&6
4807   elif test "$ac_gettimeofday_args" = 2 ; then
4808     cat >>confdefs.h <<\_ACEOF
4809 #define HAVE_GETTIMEOFDAY 1
4810 _ACEOF
4811
4812     cat >>confdefs.h <<\_ACEOF
4813 #define GETTIMEOFDAY_TWO_ARGS 1
4814 _ACEOF
4815
4816     echo "$as_me:$LINENO: result: two arguments" >&5
4817 echo "${ECHO_T}two arguments" >&6
4818   else
4819     echo "$as_me:$LINENO: result: unknown" >&5
4820 echo "${ECHO_T}unknown" >&6
4821   fi
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4833 do
4834 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4835 echo "$as_me:$LINENO: checking for $ac_func" >&5
4836 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4837 if eval "test \"\${$as_ac_var+set}\" = set"; then
4838   echo $ECHO_N "(cached) $ECHO_C" >&6
4839 else
4840   cat >conftest.$ac_ext <<_ACEOF
4841 /* confdefs.h.  */
4842 _ACEOF
4843 cat confdefs.h >>conftest.$ac_ext
4844 cat >>conftest.$ac_ext <<_ACEOF
4845 /* end confdefs.h.  */
4846 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4847    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4848 #define $ac_func innocuous_$ac_func
4849
4850 /* System header to define __stub macros and hopefully few prototypes,
4851     which can conflict with char $ac_func (); below.
4852     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4853     <limits.h> exists even on freestanding compilers.  */
4854
4855 #ifdef __STDC__
4856 # include <limits.h>
4857 #else
4858 # include <assert.h>
4859 #endif
4860
4861 #undef $ac_func
4862
4863 /* Override any gcc2 internal prototype to avoid an error.  */
4864 #ifdef __cplusplus
4865 extern "C"
4866 {
4867 #endif
4868 /* We use char because int might match the return type of a gcc2
4869    builtin and then its argument prototype would still apply.  */
4870 char $ac_func ();
4871 /* The GNU C library defines this for functions which it implements
4872     to always fail with ENOSYS.  Some functions are actually named
4873     something starting with __ and the normal name is an alias.  */
4874 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4875 choke me
4876 #else
4877 char (*f) () = $ac_func;
4878 #endif
4879 #ifdef __cplusplus
4880 }
4881 #endif
4882
4883 int
4884 main ()
4885 {
4886 return f != $ac_func;
4887   ;
4888   return 0;
4889 }
4890 _ACEOF
4891 rm -f conftest.$ac_objext conftest$ac_exeext
4892 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4893   (eval $ac_link) 2>conftest.er1
4894   ac_status=$?
4895   grep -v '^ *+' conftest.er1 >conftest.err
4896   rm -f conftest.er1
4897   cat conftest.err >&5
4898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4899   (exit $ac_status); } &&
4900          { ac_try='test -z "$ac_c_werror_flag"
4901                          || test ! -s conftest.err'
4902   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4903   (eval $ac_try) 2>&5
4904   ac_status=$?
4905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4906   (exit $ac_status); }; } &&
4907          { ac_try='test -s conftest$ac_exeext'
4908   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4909   (eval $ac_try) 2>&5
4910   ac_status=$?
4911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4912   (exit $ac_status); }; }; then
4913   eval "$as_ac_var=yes"
4914 else
4915   echo "$as_me: failed program was:" >&5
4916 sed 's/^/| /' conftest.$ac_ext >&5
4917
4918 eval "$as_ac_var=no"
4919 fi
4920 rm -f conftest.err conftest.$ac_objext \
4921       conftest$ac_exeext conftest.$ac_ext
4922 fi
4923 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4924 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4925 if test `eval echo '${'$as_ac_var'}'` = yes; then
4926   cat >>confdefs.h <<_ACEOF
4927 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4928 _ACEOF
4929
4930 fi
4931 done
4932
4933
4934
4935
4936
4937 for ac_func in sigaction syslog realpath setrlimit
4938 do
4939 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4940 echo "$as_me:$LINENO: checking for $ac_func" >&5
4941 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4942 if eval "test \"\${$as_ac_var+set}\" = set"; then
4943   echo $ECHO_N "(cached) $ECHO_C" >&6
4944 else
4945   cat >conftest.$ac_ext <<_ACEOF
4946 /* confdefs.h.  */
4947 _ACEOF
4948 cat confdefs.h >>conftest.$ac_ext
4949 cat >>conftest.$ac_ext <<_ACEOF
4950 /* end confdefs.h.  */
4951 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4952    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4953 #define $ac_func innocuous_$ac_func
4954
4955 /* System header to define __stub macros and hopefully few prototypes,
4956     which can conflict with char $ac_func (); below.
4957     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4958     <limits.h> exists even on freestanding compilers.  */
4959
4960 #ifdef __STDC__
4961 # include <limits.h>
4962 #else
4963 # include <assert.h>
4964 #endif
4965
4966 #undef $ac_func
4967
4968 /* Override any gcc2 internal prototype to avoid an error.  */
4969 #ifdef __cplusplus
4970 extern "C"
4971 {
4972 #endif
4973 /* We use char because int might match the return type of a gcc2
4974    builtin and then its argument prototype would still apply.  */
4975 char $ac_func ();
4976 /* The GNU C library defines this for functions which it implements
4977     to always fail with ENOSYS.  Some functions are actually named
4978     something starting with __ and the normal name is an alias.  */
4979 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4980 choke me
4981 #else
4982 char (*f) () = $ac_func;
4983 #endif
4984 #ifdef __cplusplus
4985 }
4986 #endif
4987
4988 int
4989 main ()
4990 {
4991 return f != $ac_func;
4992   ;
4993   return 0;
4994 }
4995 _ACEOF
4996 rm -f conftest.$ac_objext conftest$ac_exeext
4997 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4998   (eval $ac_link) 2>conftest.er1
4999   ac_status=$?
5000   grep -v '^ *+' conftest.er1 >conftest.err
5001   rm -f conftest.er1
5002   cat conftest.err >&5
5003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5004   (exit $ac_status); } &&
5005          { ac_try='test -z "$ac_c_werror_flag"
5006                          || test ! -s conftest.err'
5007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5008   (eval $ac_try) 2>&5
5009   ac_status=$?
5010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5011   (exit $ac_status); }; } &&
5012          { ac_try='test -s conftest$ac_exeext'
5013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5014   (eval $ac_try) 2>&5
5015   ac_status=$?
5016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5017   (exit $ac_status); }; }; then
5018   eval "$as_ac_var=yes"
5019 else
5020   echo "$as_me: failed program was:" >&5
5021 sed 's/^/| /' conftest.$ac_ext >&5
5022
5023 eval "$as_ac_var=no"
5024 fi
5025 rm -f conftest.err conftest.$ac_objext \
5026       conftest$ac_exeext conftest.$ac_ext
5027 fi
5028 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5029 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5030 if test `eval echo '${'$as_ac_var'}'` = yes; then
5031   cat >>confdefs.h <<_ACEOF
5032 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5033 _ACEOF
5034
5035 fi
5036 done
5037
5038
5039 for ac_func in setlocale
5040 do
5041 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5042 echo "$as_me:$LINENO: checking for $ac_func" >&5
5043 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5044 if eval "test \"\${$as_ac_var+set}\" = set"; then
5045   echo $ECHO_N "(cached) $ECHO_C" >&6
5046 else
5047   cat >conftest.$ac_ext <<_ACEOF
5048 /* confdefs.h.  */
5049 _ACEOF
5050 cat confdefs.h >>conftest.$ac_ext
5051 cat >>conftest.$ac_ext <<_ACEOF
5052 /* end confdefs.h.  */
5053 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5054    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5055 #define $ac_func innocuous_$ac_func
5056
5057 /* System header to define __stub macros and hopefully few prototypes,
5058     which can conflict with char $ac_func (); below.
5059     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5060     <limits.h> exists even on freestanding compilers.  */
5061
5062 #ifdef __STDC__
5063 # include <limits.h>
5064 #else
5065 # include <assert.h>
5066 #endif
5067
5068 #undef $ac_func
5069
5070 /* Override any gcc2 internal prototype to avoid an error.  */
5071 #ifdef __cplusplus
5072 extern "C"
5073 {
5074 #endif
5075 /* We use char because int might match the return type of a gcc2
5076    builtin and then its argument prototype would still apply.  */
5077 char $ac_func ();
5078 /* The GNU C library defines this for functions which it implements
5079     to always fail with ENOSYS.  Some functions are actually named
5080     something starting with __ and the normal name is an alias.  */
5081 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5082 choke me
5083 #else
5084 char (*f) () = $ac_func;
5085 #endif
5086 #ifdef __cplusplus
5087 }
5088 #endif
5089
5090 int
5091 main ()
5092 {
5093 return f != $ac_func;
5094   ;
5095   return 0;
5096 }
5097 _ACEOF
5098 rm -f conftest.$ac_objext conftest$ac_exeext
5099 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5100   (eval $ac_link) 2>conftest.er1
5101   ac_status=$?
5102   grep -v '^ *+' conftest.er1 >conftest.err
5103   rm -f conftest.er1
5104   cat conftest.err >&5
5105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5106   (exit $ac_status); } &&
5107          { ac_try='test -z "$ac_c_werror_flag"
5108                          || test ! -s conftest.err'
5109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5110   (eval $ac_try) 2>&5
5111   ac_status=$?
5112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5113   (exit $ac_status); }; } &&
5114          { ac_try='test -s conftest$ac_exeext'
5115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5116   (eval $ac_try) 2>&5
5117   ac_status=$?
5118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5119   (exit $ac_status); }; }; then
5120   eval "$as_ac_var=yes"
5121 else
5122   echo "$as_me: failed program was:" >&5
5123 sed 's/^/| /' conftest.$ac_ext >&5
5124
5125 eval "$as_ac_var=no"
5126 fi
5127 rm -f conftest.err conftest.$ac_objext \
5128       conftest$ac_exeext conftest.$ac_ext
5129 fi
5130 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5131 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5132 if test `eval echo '${'$as_ac_var'}'` = yes; then
5133   cat >>confdefs.h <<_ACEOF
5134 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5135 _ACEOF
5136
5137 fi
5138 done
5139
5140 echo "$as_me:$LINENO: checking for struct icmp" >&5
5141 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
5142 if test "${ac_cv_have_icmp+set}" = set; then
5143   echo $ECHO_N "(cached) $ECHO_C" >&6
5144 else
5145   cat >conftest.$ac_ext <<_ACEOF
5146 /* confdefs.h.  */
5147 _ACEOF
5148 cat confdefs.h >>conftest.$ac_ext
5149 cat >>conftest.$ac_ext <<_ACEOF
5150 /* end confdefs.h.  */
5151 #include <stdlib.h>
5152                    #include <stdio.h>
5153                    #include <math.h>
5154                    #include <unistd.h>
5155                    #include <limits.h>
5156                    #include <signal.h>
5157                    #include <fcntl.h>
5158                    #include <sys/types.h>
5159                    #include <sys/time.h>
5160                    #include <sys/ipc.h>
5161                    #include <sys/shm.h>
5162                    #include <sys/socket.h>
5163                    #include <netinet/in_systm.h>
5164                    #include <netinet/in.h>
5165                    #include <netinet/ip.h>
5166                    #include <netinet/ip_icmp.h>
5167                    #include <netinet/udp.h>
5168                    #include <arpa/inet.h>
5169                    #include <netdb.h>
5170 int
5171 main ()
5172 {
5173 struct icmp i;
5174                    struct sockaddr s;
5175                    struct sockaddr_in si;
5176                    struct ip ip;
5177                    i.icmp_type = ICMP_ECHO;
5178                    i.icmp_code = 0;
5179                    i.icmp_cksum = 0;
5180                    i.icmp_id = 0;
5181                    i.icmp_seq = 0;
5182                    si.sin_family = AF_INET;
5183                    #if defined(__DECC) || defined(_IP_VHL)
5184                    ip.ip_vhl = 0;
5185                    #else
5186                    ip.ip_hl = 0;
5187                    #endif
5188
5189   ;
5190   return 0;
5191 }
5192 _ACEOF
5193 rm -f conftest.$ac_objext
5194 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5195   (eval $ac_compile) 2>conftest.er1
5196   ac_status=$?
5197   grep -v '^ *+' conftest.er1 >conftest.err
5198   rm -f conftest.er1
5199   cat conftest.err >&5
5200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5201   (exit $ac_status); } &&
5202          { ac_try='test -z "$ac_c_werror_flag"
5203                          || test ! -s conftest.err'
5204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5205   (eval $ac_try) 2>&5
5206   ac_status=$?
5207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5208   (exit $ac_status); }; } &&
5209          { ac_try='test -s conftest.$ac_objext'
5210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5211   (eval $ac_try) 2>&5
5212   ac_status=$?
5213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5214   (exit $ac_status); }; }; then
5215   ac_cv_have_icmp=yes
5216 else
5217   echo "$as_me: failed program was:" >&5
5218 sed 's/^/| /' conftest.$ac_ext >&5
5219
5220 ac_cv_have_icmp=no
5221 fi
5222 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5223 fi
5224 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
5225 echo "${ECHO_T}$ac_cv_have_icmp" >&6
5226  if test "$ac_cv_have_icmp" = yes ; then
5227    cat >>confdefs.h <<\_ACEOF
5228 #define HAVE_ICMP 1
5229 _ACEOF
5230
5231  fi
5232 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
5233 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
5234 if test "${ac_cv_have_icmphdr+set}" = set; then
5235   echo $ECHO_N "(cached) $ECHO_C" >&6
5236 else
5237   cat >conftest.$ac_ext <<_ACEOF
5238 /* confdefs.h.  */
5239 _ACEOF
5240 cat confdefs.h >>conftest.$ac_ext
5241 cat >>conftest.$ac_ext <<_ACEOF
5242 /* end confdefs.h.  */
5243 #include <stdlib.h>
5244                    #include <stdio.h>
5245                    #include <math.h>
5246                    #include <unistd.h>
5247                    #include <limits.h>
5248                    #include <signal.h>
5249                    #include <fcntl.h>
5250                    #include <sys/types.h>
5251                    #include <sys/time.h>
5252                    #include <sys/ipc.h>
5253                    #include <sys/shm.h>
5254                    #include <sys/socket.h>
5255                    #include <netinet/in_systm.h>
5256                    #include <netinet/in.h>
5257                    #include <netinet/ip.h>
5258                    #include <netinet/ip_icmp.h>
5259                    #include <netinet/udp.h>
5260                    #include <arpa/inet.h>
5261                    #include <netdb.h>
5262 int
5263 main ()
5264 {
5265 struct icmphdr i;
5266                    struct sockaddr s;
5267                    struct sockaddr_in si;
5268                    struct ip ip;
5269                    i.type = ICMP_ECHO;
5270                    i.code = 0;
5271                    i.checksum = 0;
5272                    i.un.echo.id = 0;
5273                    i.un.echo.sequence = 0;
5274                    si.sin_family = AF_INET;
5275                    ip.ip_hl = 0;
5276   ;
5277   return 0;
5278 }
5279 _ACEOF
5280 rm -f conftest.$ac_objext
5281 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5282   (eval $ac_compile) 2>conftest.er1
5283   ac_status=$?
5284   grep -v '^ *+' conftest.er1 >conftest.err
5285   rm -f conftest.er1
5286   cat conftest.err >&5
5287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5288   (exit $ac_status); } &&
5289          { ac_try='test -z "$ac_c_werror_flag"
5290                          || test ! -s conftest.err'
5291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5292   (eval $ac_try) 2>&5
5293   ac_status=$?
5294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5295   (exit $ac_status); }; } &&
5296          { ac_try='test -s conftest.$ac_objext'
5297   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5298   (eval $ac_try) 2>&5
5299   ac_status=$?
5300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5301   (exit $ac_status); }; }; then
5302   ac_cv_have_icmphdr=yes
5303 else
5304   echo "$as_me: failed program was:" >&5
5305 sed 's/^/| /' conftest.$ac_ext >&5
5306
5307 ac_cv_have_icmphdr=no
5308 fi
5309 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5310 fi
5311 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
5312 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
5313  if test "$ac_cv_have_icmphdr" = yes ; then
5314    cat >>confdefs.h <<\_ACEOF
5315 #define HAVE_ICMPHDR 1
5316 _ACEOF
5317
5318  fi
5319
5320
5321 for ac_header in crypt.h sys/select.h
5322 do
5323 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5324 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5325   echo "$as_me:$LINENO: checking for $ac_header" >&5
5326 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5327 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5328   echo $ECHO_N "(cached) $ECHO_C" >&6
5329 fi
5330 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5331 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5332 else
5333   # Is the header compilable?
5334 echo "$as_me:$LINENO: checking $ac_header usability" >&5
5335 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5336 cat >conftest.$ac_ext <<_ACEOF
5337 /* confdefs.h.  */
5338 _ACEOF
5339 cat confdefs.h >>conftest.$ac_ext
5340 cat >>conftest.$ac_ext <<_ACEOF
5341 /* end confdefs.h.  */
5342 $ac_includes_default
5343 #include <$ac_header>
5344 _ACEOF
5345 rm -f conftest.$ac_objext
5346 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5347   (eval $ac_compile) 2>conftest.er1
5348   ac_status=$?
5349   grep -v '^ *+' conftest.er1 >conftest.err
5350   rm -f conftest.er1
5351   cat conftest.err >&5
5352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5353   (exit $ac_status); } &&
5354          { ac_try='test -z "$ac_c_werror_flag"
5355                          || test ! -s conftest.err'
5356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5357   (eval $ac_try) 2>&5
5358   ac_status=$?
5359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5360   (exit $ac_status); }; } &&
5361          { ac_try='test -s conftest.$ac_objext'
5362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5363   (eval $ac_try) 2>&5
5364   ac_status=$?
5365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5366   (exit $ac_status); }; }; then
5367   ac_header_compiler=yes
5368 else
5369   echo "$as_me: failed program was:" >&5
5370 sed 's/^/| /' conftest.$ac_ext >&5
5371
5372 ac_header_compiler=no
5373 fi
5374 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5375 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5376 echo "${ECHO_T}$ac_header_compiler" >&6
5377
5378 # Is the header present?
5379 echo "$as_me:$LINENO: checking $ac_header presence" >&5
5380 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5381 cat >conftest.$ac_ext <<_ACEOF
5382 /* confdefs.h.  */
5383 _ACEOF
5384 cat confdefs.h >>conftest.$ac_ext
5385 cat >>conftest.$ac_ext <<_ACEOF
5386 /* end confdefs.h.  */
5387 #include <$ac_header>
5388 _ACEOF
5389 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5390   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5391   ac_status=$?
5392   grep -v '^ *+' conftest.er1 >conftest.err
5393   rm -f conftest.er1
5394   cat conftest.err >&5
5395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5396   (exit $ac_status); } >/dev/null; then
5397   if test -s conftest.err; then
5398     ac_cpp_err=$ac_c_preproc_warn_flag
5399     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5400   else
5401     ac_cpp_err=
5402   fi
5403 else
5404   ac_cpp_err=yes
5405 fi
5406 if test -z "$ac_cpp_err"; then
5407   ac_header_preproc=yes
5408 else
5409   echo "$as_me: failed program was:" >&5
5410 sed 's/^/| /' conftest.$ac_ext >&5
5411
5412   ac_header_preproc=no
5413 fi
5414 rm -f conftest.err conftest.$ac_ext
5415 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5416 echo "${ECHO_T}$ac_header_preproc" >&6
5417
5418 # So?  What about this header?
5419 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5420   yes:no: )
5421     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5422 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5423     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5424 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5425     ac_header_preproc=yes
5426     ;;
5427   no:yes:* )
5428     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5429 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5430     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
5431 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
5432     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5433 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5434     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
5435 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
5436     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5437 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5438     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5439 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5440     (
5441       cat <<\_ASBOX
5442 ## ------------------------------------------ ##
5443 ## Report this to the AC_PACKAGE_NAME lists.  ##
5444 ## ------------------------------------------ ##
5445 _ASBOX
5446     ) |
5447       sed "s/^/$as_me: WARNING:     /" >&2
5448     ;;
5449 esac
5450 echo "$as_me:$LINENO: checking for $ac_header" >&5
5451 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5452 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5453   echo $ECHO_N "(cached) $ECHO_C" >&6
5454 else
5455   eval "$as_ac_Header=\$ac_header_preproc"
5456 fi
5457 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5458 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5459
5460 fi
5461 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5462   cat >>confdefs.h <<_ACEOF
5463 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5464 _ACEOF
5465
5466 fi
5467
5468 done
5469
5470 for ac_prog in perl5 perl
5471 do
5472   # Extract the first word of "$ac_prog", so it can be a program name with args.
5473 set dummy $ac_prog; ac_word=$2
5474 echo "$as_me:$LINENO: checking for $ac_word" >&5
5475 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5476 if test "${ac_cv_path_PERL+set}" = set; then
5477   echo $ECHO_N "(cached) $ECHO_C" >&6
5478 else
5479   case $PERL in
5480   [\\/]* | ?:[\\/]*)
5481   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5482   ;;
5483   *)
5484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5485 for as_dir in $PATH
5486 do
5487   IFS=$as_save_IFS
5488   test -z "$as_dir" && as_dir=.
5489   for ac_exec_ext in '' $ac_executable_extensions; do
5490   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5491     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5492     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5493     break 2
5494   fi
5495 done
5496 done
5497
5498   ;;
5499 esac
5500 fi
5501 PERL=$ac_cv_path_PERL
5502
5503 if test -n "$PERL"; then
5504   echo "$as_me:$LINENO: result: $PERL" >&5
5505 echo "${ECHO_T}$PERL" >&6
5506 else
5507   echo "$as_me:$LINENO: result: no" >&5
5508 echo "${ECHO_T}no" >&6
5509 fi
5510
5511   test -n "$PERL" && break
5512 done
5513
5514   if test -z "$PERL" ; then
5515     PERL_VERSION=0
5516   else
5517     echo "$as_me:$LINENO: checking perl version" >&5
5518 echo $ECHO_N "checking perl version... $ECHO_C" >&6
5519 if test "${ac_cv_perl_version+set}" = set; then
5520   echo $ECHO_N "(cached) $ECHO_C" >&6
5521 else
5522   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
5523 fi
5524 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
5525 echo "${ECHO_T}$ac_cv_perl_version" >&6
5526     PERL_VERSION=$ac_cv_perl_version
5527   fi
5528
5529
5530 if test -z "$PERL" ; then
5531   # don't let it be blank...
5532   PERL=/usr/bin/perl
5533 fi
5534
5535 echo "$as_me:$LINENO: checking for X" >&5
5536 echo $ECHO_N "checking for X... $ECHO_C" >&6
5537
5538
5539 # Check whether --with-x or --without-x was given.
5540 if test "${with_x+set}" = set; then
5541   withval="$with_x"
5542
5543 fi;
5544 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5545 if test "x$with_x" = xno; then
5546   # The user explicitly disabled X.
5547   have_x=disabled
5548 else
5549   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5550     # Both variables are already set.
5551     have_x=yes
5552   else
5553     if test "${ac_cv_have_x+set}" = set; then
5554   echo $ECHO_N "(cached) $ECHO_C" >&6
5555 else
5556   # One or both of the vars are not set, and there is no cached value.
5557 ac_x_includes=no ac_x_libraries=no
5558 rm -fr conftest.dir
5559 if mkdir conftest.dir; then
5560   cd conftest.dir
5561   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5562   cat >Imakefile <<'_ACEOF'
5563 acfindx:
5564         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5565 _ACEOF
5566   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5567     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5568     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5569     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5570     for ac_extension in a so sl; do
5571       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5572          test -f $ac_im_libdir/libX11.$ac_extension; then
5573         ac_im_usrlibdir=$ac_im_libdir; break
5574       fi
5575     done
5576     # Screen out bogus values from the imake configuration.  They are
5577     # bogus both because they are the default anyway, and because
5578     # using them would break gcc on systems where it needs fixed includes.
5579     case $ac_im_incroot in
5580         /usr/include) ;;
5581         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
5582     esac
5583     case $ac_im_usrlibdir in
5584         /usr/lib | /lib) ;;
5585         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
5586     esac
5587   fi
5588   cd ..
5589   rm -fr conftest.dir
5590 fi
5591
5592 # Standard set of common directories for X headers.
5593 # Check X11 before X11Rn because it is often a symlink to the current release.
5594 ac_x_header_dirs='
5595 /usr/X11/include
5596 /usr/X11R6/include
5597 /usr/X11R5/include
5598 /usr/X11R4/include
5599
5600 /usr/include/X11
5601 /usr/include/X11R6
5602 /usr/include/X11R5
5603 /usr/include/X11R4
5604
5605 /usr/local/X11/include
5606 /usr/local/X11R6/include
5607 /usr/local/X11R5/include
5608 /usr/local/X11R4/include
5609
5610 /usr/local/include/X11
5611 /usr/local/include/X11R6
5612 /usr/local/include/X11R5
5613 /usr/local/include/X11R4
5614
5615 /usr/X386/include
5616 /usr/x386/include
5617 /usr/XFree86/include/X11
5618
5619 /usr/include
5620 /usr/local/include
5621 /usr/unsupported/include
5622 /usr/athena/include
5623 /usr/local/x11r5/include
5624 /usr/lpp/Xamples/include
5625
5626 /usr/openwin/include
5627 /usr/openwin/share/include'
5628
5629 if test "$ac_x_includes" = no; then
5630   # Guess where to find include files, by looking for Intrinsic.h.
5631   # First, try using that file with no special directory specified.
5632   cat >conftest.$ac_ext <<_ACEOF
5633 /* confdefs.h.  */
5634 _ACEOF
5635 cat confdefs.h >>conftest.$ac_ext
5636 cat >>conftest.$ac_ext <<_ACEOF
5637 /* end confdefs.h.  */
5638 #include <X11/Intrinsic.h>
5639 _ACEOF
5640 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5641   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5642   ac_status=$?
5643   grep -v '^ *+' conftest.er1 >conftest.err
5644   rm -f conftest.er1
5645   cat conftest.err >&5
5646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5647   (exit $ac_status); } >/dev/null; then
5648   if test -s conftest.err; then
5649     ac_cpp_err=$ac_c_preproc_warn_flag
5650     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5651   else
5652     ac_cpp_err=
5653   fi
5654 else
5655   ac_cpp_err=yes
5656 fi
5657 if test -z "$ac_cpp_err"; then
5658   # We can compile using X headers with no special include directory.
5659 ac_x_includes=
5660 else
5661   echo "$as_me: failed program was:" >&5
5662 sed 's/^/| /' conftest.$ac_ext >&5
5663
5664   for ac_dir in $ac_x_header_dirs; do
5665   if test -r "$ac_dir/X11/Intrinsic.h"; then
5666     ac_x_includes=$ac_dir
5667     break
5668   fi
5669 done
5670 fi
5671 rm -f conftest.err conftest.$ac_ext
5672 fi # $ac_x_includes = no
5673
5674 if test "$ac_x_libraries" = no; then
5675   # Check for the libraries.
5676   # See if we find them without any special options.
5677   # Don't add to $LIBS permanently.
5678   ac_save_LIBS=$LIBS
5679   LIBS="-lXt $LIBS"
5680   cat >conftest.$ac_ext <<_ACEOF
5681 /* confdefs.h.  */
5682 _ACEOF
5683 cat confdefs.h >>conftest.$ac_ext
5684 cat >>conftest.$ac_ext <<_ACEOF
5685 /* end confdefs.h.  */
5686 #include <X11/Intrinsic.h>
5687 int
5688 main ()
5689 {
5690 XtMalloc (0)
5691   ;
5692   return 0;
5693 }
5694 _ACEOF
5695 rm -f conftest.$ac_objext conftest$ac_exeext
5696 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5697   (eval $ac_link) 2>conftest.er1
5698   ac_status=$?
5699   grep -v '^ *+' conftest.er1 >conftest.err
5700   rm -f conftest.er1
5701   cat conftest.err >&5
5702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5703   (exit $ac_status); } &&
5704          { ac_try='test -z "$ac_c_werror_flag"
5705                          || test ! -s conftest.err'
5706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5707   (eval $ac_try) 2>&5
5708   ac_status=$?
5709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5710   (exit $ac_status); }; } &&
5711          { ac_try='test -s conftest$ac_exeext'
5712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5713   (eval $ac_try) 2>&5
5714   ac_status=$?
5715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5716   (exit $ac_status); }; }; then
5717   LIBS=$ac_save_LIBS
5718 # We can link X programs with no special library path.
5719 ac_x_libraries=
5720 else
5721   echo "$as_me: failed program was:" >&5
5722 sed 's/^/| /' conftest.$ac_ext >&5
5723
5724 LIBS=$ac_save_LIBS
5725 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5726 do
5727   # Don't even attempt the hair of trying to link an X program!
5728   for ac_extension in a so sl; do
5729     if test -r $ac_dir/libXt.$ac_extension; then
5730       ac_x_libraries=$ac_dir
5731       break 2
5732     fi
5733   done
5734 done
5735 fi
5736 rm -f conftest.err conftest.$ac_objext \
5737       conftest$ac_exeext conftest.$ac_ext
5738 fi # $ac_x_libraries = no
5739
5740 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
5741   # Didn't find X anywhere.  Cache the known absence of X.
5742   ac_cv_have_x="have_x=no"
5743 else
5744   # Record where we found X for the cache.
5745   ac_cv_have_x="have_x=yes \
5746                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5747 fi
5748 fi
5749
5750   fi
5751   eval "$ac_cv_have_x"
5752 fi # $with_x != no
5753
5754 if test "$have_x" != yes; then
5755   echo "$as_me:$LINENO: result: $have_x" >&5
5756 echo "${ECHO_T}$have_x" >&6
5757   no_x=yes
5758 else
5759   # If each of the values was on the command line, it overrides each guess.
5760   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5761   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5762   # Update the cache value to reflect the command line values.
5763   ac_cv_have_x="have_x=yes \
5764                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5765   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
5766 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5767 fi
5768
5769 if test "$no_x" = yes; then
5770   # Not all programs may use this symbol, but it does not hurt to define it.
5771
5772 cat >>confdefs.h <<\_ACEOF
5773 #define X_DISPLAY_MISSING 1
5774 _ACEOF
5775
5776   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5777 else
5778   if test -n "$x_includes"; then
5779     X_CFLAGS="$X_CFLAGS -I$x_includes"
5780   fi
5781
5782   # It would also be nice to do this for all -L options, not just this one.
5783   if test -n "$x_libraries"; then
5784     X_LIBS="$X_LIBS -L$x_libraries"
5785     # For Solaris; some versions of Sun CC require a space after -R and
5786     # others require no space.  Words are not sufficient . . . .
5787     case `(uname -sr) 2>/dev/null` in
5788     "SunOS 5"*)
5789       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
5790 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
5791       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
5792       cat >conftest.$ac_ext <<_ACEOF
5793 /* confdefs.h.  */
5794 _ACEOF
5795 cat confdefs.h >>conftest.$ac_ext
5796 cat >>conftest.$ac_ext <<_ACEOF
5797 /* end confdefs.h.  */
5798
5799 int
5800 main ()
5801 {
5802
5803   ;
5804   return 0;
5805 }
5806 _ACEOF
5807 rm -f conftest.$ac_objext conftest$ac_exeext
5808 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5809   (eval $ac_link) 2>conftest.er1
5810   ac_status=$?
5811   grep -v '^ *+' conftest.er1 >conftest.err
5812   rm -f conftest.er1
5813   cat conftest.err >&5
5814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5815   (exit $ac_status); } &&
5816          { ac_try='test -z "$ac_c_werror_flag"
5817                          || test ! -s conftest.err'
5818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5819   (eval $ac_try) 2>&5
5820   ac_status=$?
5821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5822   (exit $ac_status); }; } &&
5823          { ac_try='test -s conftest$ac_exeext'
5824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5825   (eval $ac_try) 2>&5
5826   ac_status=$?
5827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5828   (exit $ac_status); }; }; then
5829   ac_R_nospace=yes
5830 else
5831   echo "$as_me: failed program was:" >&5
5832 sed 's/^/| /' conftest.$ac_ext >&5
5833
5834 ac_R_nospace=no
5835 fi
5836 rm -f conftest.err conftest.$ac_objext \
5837       conftest$ac_exeext conftest.$ac_ext
5838       if test $ac_R_nospace = yes; then
5839         echo "$as_me:$LINENO: result: no" >&5
5840 echo "${ECHO_T}no" >&6
5841         X_LIBS="$X_LIBS -R$x_libraries"
5842       else
5843         LIBS="$ac_xsave_LIBS -R $x_libraries"
5844         cat >conftest.$ac_ext <<_ACEOF
5845 /* confdefs.h.  */
5846 _ACEOF
5847 cat confdefs.h >>conftest.$ac_ext
5848 cat >>conftest.$ac_ext <<_ACEOF
5849 /* end confdefs.h.  */
5850
5851 int
5852 main ()
5853 {
5854
5855   ;
5856   return 0;
5857 }
5858 _ACEOF
5859 rm -f conftest.$ac_objext conftest$ac_exeext
5860 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5861   (eval $ac_link) 2>conftest.er1
5862   ac_status=$?
5863   grep -v '^ *+' conftest.er1 >conftest.err
5864   rm -f conftest.er1
5865   cat conftest.err >&5
5866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867   (exit $ac_status); } &&
5868          { ac_try='test -z "$ac_c_werror_flag"
5869                          || test ! -s conftest.err'
5870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5871   (eval $ac_try) 2>&5
5872   ac_status=$?
5873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5874   (exit $ac_status); }; } &&
5875          { ac_try='test -s conftest$ac_exeext'
5876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5877   (eval $ac_try) 2>&5
5878   ac_status=$?
5879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880   (exit $ac_status); }; }; then
5881   ac_R_space=yes
5882 else
5883   echo "$as_me: failed program was:" >&5
5884 sed 's/^/| /' conftest.$ac_ext >&5
5885
5886 ac_R_space=no
5887 fi
5888 rm -f conftest.err conftest.$ac_objext \
5889       conftest$ac_exeext conftest.$ac_ext
5890         if test $ac_R_space = yes; then
5891           echo "$as_me:$LINENO: result: yes" >&5
5892 echo "${ECHO_T}yes" >&6
5893           X_LIBS="$X_LIBS -R $x_libraries"
5894         else
5895           echo "$as_me:$LINENO: result: neither works" >&5
5896 echo "${ECHO_T}neither works" >&6
5897         fi
5898       fi
5899       LIBS=$ac_xsave_LIBS
5900     esac
5901   fi
5902
5903   # Check for system-dependent libraries X programs must link with.
5904   # Do this before checking for the system-independent R6 libraries
5905   # (-lICE), since we may need -lsocket or whatever for X linking.
5906
5907   if test "$ISC" = yes; then
5908     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5909   else
5910     # Martyn Johnson says this is needed for Ultrix, if the X
5911     # libraries were built with DECnet support.  And Karl Berry says
5912     # the Alpha needs dnet_stub (dnet does not exist).
5913     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5914     cat >conftest.$ac_ext <<_ACEOF
5915 /* confdefs.h.  */
5916 _ACEOF
5917 cat confdefs.h >>conftest.$ac_ext
5918 cat >>conftest.$ac_ext <<_ACEOF
5919 /* end confdefs.h.  */
5920
5921 /* Override any gcc2 internal prototype to avoid an error.  */
5922 #ifdef __cplusplus
5923 extern "C"
5924 #endif
5925 /* We use char because int might match the return type of a gcc2
5926    builtin and then its argument prototype would still apply.  */
5927 char XOpenDisplay ();
5928 int
5929 main ()
5930 {
5931 XOpenDisplay ();
5932   ;
5933   return 0;
5934 }
5935 _ACEOF
5936 rm -f conftest.$ac_objext conftest$ac_exeext
5937 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5938   (eval $ac_link) 2>conftest.er1
5939   ac_status=$?
5940   grep -v '^ *+' conftest.er1 >conftest.err
5941   rm -f conftest.er1
5942   cat conftest.err >&5
5943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5944   (exit $ac_status); } &&
5945          { ac_try='test -z "$ac_c_werror_flag"
5946                          || test ! -s conftest.err'
5947   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5948   (eval $ac_try) 2>&5
5949   ac_status=$?
5950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5951   (exit $ac_status); }; } &&
5952          { ac_try='test -s conftest$ac_exeext'
5953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5954   (eval $ac_try) 2>&5
5955   ac_status=$?
5956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5957   (exit $ac_status); }; }; then
5958   :
5959 else
5960   echo "$as_me: failed program was:" >&5
5961 sed 's/^/| /' conftest.$ac_ext >&5
5962
5963 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5964 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5965 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5966   echo $ECHO_N "(cached) $ECHO_C" >&6
5967 else
5968   ac_check_lib_save_LIBS=$LIBS
5969 LIBS="-ldnet  $LIBS"
5970 cat >conftest.$ac_ext <<_ACEOF
5971 /* confdefs.h.  */
5972 _ACEOF
5973 cat confdefs.h >>conftest.$ac_ext
5974 cat >>conftest.$ac_ext <<_ACEOF
5975 /* end confdefs.h.  */
5976
5977 /* Override any gcc2 internal prototype to avoid an error.  */
5978 #ifdef __cplusplus
5979 extern "C"
5980 #endif
5981 /* We use char because int might match the return type of a gcc2
5982    builtin and then its argument prototype would still apply.  */
5983 char dnet_ntoa ();
5984 int
5985 main ()
5986 {
5987 dnet_ntoa ();
5988   ;
5989   return 0;
5990 }
5991 _ACEOF
5992 rm -f conftest.$ac_objext conftest$ac_exeext
5993 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5994   (eval $ac_link) 2>conftest.er1
5995   ac_status=$?
5996   grep -v '^ *+' conftest.er1 >conftest.err
5997   rm -f conftest.er1
5998   cat conftest.err >&5
5999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6000   (exit $ac_status); } &&
6001          { ac_try='test -z "$ac_c_werror_flag"
6002                          || test ! -s conftest.err'
6003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6004   (eval $ac_try) 2>&5
6005   ac_status=$?
6006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6007   (exit $ac_status); }; } &&
6008          { ac_try='test -s conftest$ac_exeext'
6009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6010   (eval $ac_try) 2>&5
6011   ac_status=$?
6012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6013   (exit $ac_status); }; }; then
6014   ac_cv_lib_dnet_dnet_ntoa=yes
6015 else
6016   echo "$as_me: failed program was:" >&5
6017 sed 's/^/| /' conftest.$ac_ext >&5
6018
6019 ac_cv_lib_dnet_dnet_ntoa=no
6020 fi
6021 rm -f conftest.err conftest.$ac_objext \
6022       conftest$ac_exeext conftest.$ac_ext
6023 LIBS=$ac_check_lib_save_LIBS
6024 fi
6025 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6026 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
6027 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6028   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6029 fi
6030
6031     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6032       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6033 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
6034 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6035   echo $ECHO_N "(cached) $ECHO_C" >&6
6036 else
6037   ac_check_lib_save_LIBS=$LIBS
6038 LIBS="-ldnet_stub  $LIBS"
6039 cat >conftest.$ac_ext <<_ACEOF
6040 /* confdefs.h.  */
6041 _ACEOF
6042 cat confdefs.h >>conftest.$ac_ext
6043 cat >>conftest.$ac_ext <<_ACEOF
6044 /* end confdefs.h.  */
6045
6046 /* Override any gcc2 internal prototype to avoid an error.  */
6047 #ifdef __cplusplus
6048 extern "C"
6049 #endif
6050 /* We use char because int might match the return type of a gcc2
6051    builtin and then its argument prototype would still apply.  */
6052 char dnet_ntoa ();
6053 int
6054 main ()
6055 {
6056 dnet_ntoa ();
6057   ;
6058   return 0;
6059 }
6060 _ACEOF
6061 rm -f conftest.$ac_objext conftest$ac_exeext
6062 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6063   (eval $ac_link) 2>conftest.er1
6064   ac_status=$?
6065   grep -v '^ *+' conftest.er1 >conftest.err
6066   rm -f conftest.er1
6067   cat conftest.err >&5
6068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6069   (exit $ac_status); } &&
6070          { ac_try='test -z "$ac_c_werror_flag"
6071                          || test ! -s conftest.err'
6072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6073   (eval $ac_try) 2>&5
6074   ac_status=$?
6075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6076   (exit $ac_status); }; } &&
6077          { ac_try='test -s conftest$ac_exeext'
6078   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6079   (eval $ac_try) 2>&5
6080   ac_status=$?
6081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6082   (exit $ac_status); }; }; then
6083   ac_cv_lib_dnet_stub_dnet_ntoa=yes
6084 else
6085   echo "$as_me: failed program was:" >&5
6086 sed 's/^/| /' conftest.$ac_ext >&5
6087
6088 ac_cv_lib_dnet_stub_dnet_ntoa=no
6089 fi
6090 rm -f conftest.err conftest.$ac_objext \
6091       conftest$ac_exeext conftest.$ac_ext
6092 LIBS=$ac_check_lib_save_LIBS
6093 fi
6094 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6095 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
6096 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
6097   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6098 fi
6099
6100     fi
6101 fi
6102 rm -f conftest.err conftest.$ac_objext \
6103       conftest$ac_exeext conftest.$ac_ext
6104     LIBS="$ac_xsave_LIBS"
6105
6106     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6107     # to get the SysV transport functions.
6108     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6109     # needs -lnsl.
6110     # The nsl library prevents programs from opening the X display
6111     # on Irix 5.2, according to T.E. Dickey.
6112     # The functions gethostbyname, getservbyname, and inet_addr are
6113     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6114     echo "$as_me:$LINENO: checking for gethostbyname" >&5
6115 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
6116 if test "${ac_cv_func_gethostbyname+set}" = set; then
6117   echo $ECHO_N "(cached) $ECHO_C" >&6
6118 else
6119   cat >conftest.$ac_ext <<_ACEOF
6120 /* confdefs.h.  */
6121 _ACEOF
6122 cat confdefs.h >>conftest.$ac_ext
6123 cat >>conftest.$ac_ext <<_ACEOF
6124 /* end confdefs.h.  */
6125 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6126    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6127 #define gethostbyname innocuous_gethostbyname
6128
6129 /* System header to define __stub macros and hopefully few prototypes,
6130     which can conflict with char gethostbyname (); below.
6131     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6132     <limits.h> exists even on freestanding compilers.  */
6133
6134 #ifdef __STDC__
6135 # include <limits.h>
6136 #else
6137 # include <assert.h>
6138 #endif
6139
6140 #undef gethostbyname
6141
6142 /* Override any gcc2 internal prototype to avoid an error.  */
6143 #ifdef __cplusplus
6144 extern "C"
6145 {
6146 #endif
6147 /* We use char because int might match the return type of a gcc2
6148    builtin and then its argument prototype would still apply.  */
6149 char gethostbyname ();
6150 /* The GNU C library defines this for functions which it implements
6151     to always fail with ENOSYS.  Some functions are actually named
6152     something starting with __ and the normal name is an alias.  */
6153 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6154 choke me
6155 #else
6156 char (*f) () = gethostbyname;
6157 #endif
6158 #ifdef __cplusplus
6159 }
6160 #endif
6161
6162 int
6163 main ()
6164 {
6165 return f != gethostbyname;
6166   ;
6167   return 0;
6168 }
6169 _ACEOF
6170 rm -f conftest.$ac_objext conftest$ac_exeext
6171 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6172   (eval $ac_link) 2>conftest.er1
6173   ac_status=$?
6174   grep -v '^ *+' conftest.er1 >conftest.err
6175   rm -f conftest.er1
6176   cat conftest.err >&5
6177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6178   (exit $ac_status); } &&
6179          { ac_try='test -z "$ac_c_werror_flag"
6180                          || test ! -s conftest.err'
6181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6182   (eval $ac_try) 2>&5
6183   ac_status=$?
6184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6185   (exit $ac_status); }; } &&
6186          { ac_try='test -s conftest$ac_exeext'
6187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6188   (eval $ac_try) 2>&5
6189   ac_status=$?
6190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6191   (exit $ac_status); }; }; then
6192   ac_cv_func_gethostbyname=yes
6193 else
6194   echo "$as_me: failed program was:" >&5
6195 sed 's/^/| /' conftest.$ac_ext >&5
6196
6197 ac_cv_func_gethostbyname=no
6198 fi
6199 rm -f conftest.err conftest.$ac_objext \
6200       conftest$ac_exeext conftest.$ac_ext
6201 fi
6202 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6203 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
6204
6205     if test $ac_cv_func_gethostbyname = no; then
6206       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6207 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
6208 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6209   echo $ECHO_N "(cached) $ECHO_C" >&6
6210 else
6211   ac_check_lib_save_LIBS=$LIBS
6212 LIBS="-lnsl  $LIBS"
6213 cat >conftest.$ac_ext <<_ACEOF
6214 /* confdefs.h.  */
6215 _ACEOF
6216 cat confdefs.h >>conftest.$ac_ext
6217 cat >>conftest.$ac_ext <<_ACEOF
6218 /* end confdefs.h.  */
6219
6220 /* Override any gcc2 internal prototype to avoid an error.  */
6221 #ifdef __cplusplus
6222 extern "C"
6223 #endif
6224 /* We use char because int might match the return type of a gcc2
6225    builtin and then its argument prototype would still apply.  */
6226 char gethostbyname ();
6227 int
6228 main ()
6229 {
6230 gethostbyname ();
6231   ;
6232   return 0;
6233 }
6234 _ACEOF
6235 rm -f conftest.$ac_objext conftest$ac_exeext
6236 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6237   (eval $ac_link) 2>conftest.er1
6238   ac_status=$?
6239   grep -v '^ *+' conftest.er1 >conftest.err
6240   rm -f conftest.er1
6241   cat conftest.err >&5
6242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6243   (exit $ac_status); } &&
6244          { ac_try='test -z "$ac_c_werror_flag"
6245                          || test ! -s conftest.err'
6246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6247   (eval $ac_try) 2>&5
6248   ac_status=$?
6249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6250   (exit $ac_status); }; } &&
6251          { ac_try='test -s conftest$ac_exeext'
6252   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6253   (eval $ac_try) 2>&5
6254   ac_status=$?
6255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6256   (exit $ac_status); }; }; then
6257   ac_cv_lib_nsl_gethostbyname=yes
6258 else
6259   echo "$as_me: failed program was:" >&5
6260 sed 's/^/| /' conftest.$ac_ext >&5
6261
6262 ac_cv_lib_nsl_gethostbyname=no
6263 fi
6264 rm -f conftest.err conftest.$ac_objext \
6265       conftest$ac_exeext conftest.$ac_ext
6266 LIBS=$ac_check_lib_save_LIBS
6267 fi
6268 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6269 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
6270 if test $ac_cv_lib_nsl_gethostbyname = yes; then
6271   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6272 fi
6273
6274       if test $ac_cv_lib_nsl_gethostbyname = no; then
6275         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
6276 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
6277 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6278   echo $ECHO_N "(cached) $ECHO_C" >&6
6279 else
6280   ac_check_lib_save_LIBS=$LIBS
6281 LIBS="-lbsd  $LIBS"
6282 cat >conftest.$ac_ext <<_ACEOF
6283 /* confdefs.h.  */
6284 _ACEOF
6285 cat confdefs.h >>conftest.$ac_ext
6286 cat >>conftest.$ac_ext <<_ACEOF
6287 /* end confdefs.h.  */
6288
6289 /* Override any gcc2 internal prototype to avoid an error.  */
6290 #ifdef __cplusplus
6291 extern "C"
6292 #endif
6293 /* We use char because int might match the return type of a gcc2
6294    builtin and then its argument prototype would still apply.  */
6295 char gethostbyname ();
6296 int
6297 main ()
6298 {
6299 gethostbyname ();
6300   ;
6301   return 0;
6302 }
6303 _ACEOF
6304 rm -f conftest.$ac_objext conftest$ac_exeext
6305 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6306   (eval $ac_link) 2>conftest.er1
6307   ac_status=$?
6308   grep -v '^ *+' conftest.er1 >conftest.err
6309   rm -f conftest.er1
6310   cat conftest.err >&5
6311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6312   (exit $ac_status); } &&
6313          { ac_try='test -z "$ac_c_werror_flag"
6314                          || test ! -s conftest.err'
6315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6316   (eval $ac_try) 2>&5
6317   ac_status=$?
6318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6319   (exit $ac_status); }; } &&
6320          { ac_try='test -s conftest$ac_exeext'
6321   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6322   (eval $ac_try) 2>&5
6323   ac_status=$?
6324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6325   (exit $ac_status); }; }; then
6326   ac_cv_lib_bsd_gethostbyname=yes
6327 else
6328   echo "$as_me: failed program was:" >&5
6329 sed 's/^/| /' conftest.$ac_ext >&5
6330
6331 ac_cv_lib_bsd_gethostbyname=no
6332 fi
6333 rm -f conftest.err conftest.$ac_objext \
6334       conftest$ac_exeext conftest.$ac_ext
6335 LIBS=$ac_check_lib_save_LIBS
6336 fi
6337 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6338 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
6339 if test $ac_cv_lib_bsd_gethostbyname = yes; then
6340   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6341 fi
6342
6343       fi
6344     fi
6345
6346     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6347     # socket/setsockopt and other routines are undefined under SCO ODT
6348     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6349     # on later versions), says Simon Leinen: it contains gethostby*
6350     # variants that don't use the name server (or something).  -lsocket
6351     # must be given before -lnsl if both are needed.  We assume that
6352     # if connect needs -lnsl, so does gethostbyname.
6353     echo "$as_me:$LINENO: checking for connect" >&5
6354 echo $ECHO_N "checking for connect... $ECHO_C" >&6
6355 if test "${ac_cv_func_connect+set}" = set; then
6356   echo $ECHO_N "(cached) $ECHO_C" >&6
6357 else
6358   cat >conftest.$ac_ext <<_ACEOF
6359 /* confdefs.h.  */
6360 _ACEOF
6361 cat confdefs.h >>conftest.$ac_ext
6362 cat >>conftest.$ac_ext <<_ACEOF
6363 /* end confdefs.h.  */
6364 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
6365    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6366 #define connect innocuous_connect
6367
6368 /* System header to define __stub macros and hopefully few prototypes,
6369     which can conflict with char connect (); below.
6370     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6371     <limits.h> exists even on freestanding compilers.  */
6372
6373 #ifdef __STDC__
6374 # include <limits.h>
6375 #else
6376 # include <assert.h>
6377 #endif
6378
6379 #undef connect
6380
6381 /* Override any gcc2 internal prototype to avoid an error.  */
6382 #ifdef __cplusplus
6383 extern "C"
6384 {
6385 #endif
6386 /* We use char because int might match the return type of a gcc2
6387    builtin and then its argument prototype would still apply.  */
6388 char connect ();
6389 /* The GNU C library defines this for functions which it implements
6390     to always fail with ENOSYS.  Some functions are actually named
6391     something starting with __ and the normal name is an alias.  */
6392 #if defined (__stub_connect) || defined (__stub___connect)
6393 choke me
6394 #else
6395 char (*f) () = connect;
6396 #endif
6397 #ifdef __cplusplus
6398 }
6399 #endif
6400
6401 int
6402 main ()
6403 {
6404 return f != connect;
6405   ;
6406   return 0;
6407 }
6408 _ACEOF
6409 rm -f conftest.$ac_objext conftest$ac_exeext
6410 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6411   (eval $ac_link) 2>conftest.er1
6412   ac_status=$?
6413   grep -v '^ *+' conftest.er1 >conftest.err
6414   rm -f conftest.er1
6415   cat conftest.err >&5
6416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6417   (exit $ac_status); } &&
6418          { ac_try='test -z "$ac_c_werror_flag"
6419                          || test ! -s conftest.err'
6420   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6421   (eval $ac_try) 2>&5
6422   ac_status=$?
6423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6424   (exit $ac_status); }; } &&
6425          { ac_try='test -s conftest$ac_exeext'
6426   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6427   (eval $ac_try) 2>&5
6428   ac_status=$?
6429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6430   (exit $ac_status); }; }; then
6431   ac_cv_func_connect=yes
6432 else
6433   echo "$as_me: failed program was:" >&5
6434 sed 's/^/| /' conftest.$ac_ext >&5
6435
6436 ac_cv_func_connect=no
6437 fi
6438 rm -f conftest.err conftest.$ac_objext \
6439       conftest$ac_exeext conftest.$ac_ext
6440 fi
6441 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
6442 echo "${ECHO_T}$ac_cv_func_connect" >&6
6443
6444     if test $ac_cv_func_connect = no; then
6445       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
6446 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
6447 if test "${ac_cv_lib_socket_connect+set}" = set; then
6448   echo $ECHO_N "(cached) $ECHO_C" >&6
6449 else
6450   ac_check_lib_save_LIBS=$LIBS
6451 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6452 cat >conftest.$ac_ext <<_ACEOF
6453 /* confdefs.h.  */
6454 _ACEOF
6455 cat confdefs.h >>conftest.$ac_ext
6456 cat >>conftest.$ac_ext <<_ACEOF
6457 /* end confdefs.h.  */
6458
6459 /* Override any gcc2 internal prototype to avoid an error.  */
6460 #ifdef __cplusplus
6461 extern "C"
6462 #endif
6463 /* We use char because int might match the return type of a gcc2
6464    builtin and then its argument prototype would still apply.  */
6465 char connect ();
6466 int
6467 main ()
6468 {
6469 connect ();
6470   ;
6471   return 0;
6472 }
6473 _ACEOF
6474 rm -f conftest.$ac_objext conftest$ac_exeext
6475 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6476   (eval $ac_link) 2>conftest.er1
6477   ac_status=$?
6478   grep -v '^ *+' conftest.er1 >conftest.err
6479   rm -f conftest.er1
6480   cat conftest.err >&5
6481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6482   (exit $ac_status); } &&
6483          { ac_try='test -z "$ac_c_werror_flag"
6484                          || test ! -s conftest.err'
6485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6486   (eval $ac_try) 2>&5
6487   ac_status=$?
6488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6489   (exit $ac_status); }; } &&
6490          { ac_try='test -s conftest$ac_exeext'
6491   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6492   (eval $ac_try) 2>&5
6493   ac_status=$?
6494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6495   (exit $ac_status); }; }; then
6496   ac_cv_lib_socket_connect=yes
6497 else
6498   echo "$as_me: failed program was:" >&5
6499 sed 's/^/| /' conftest.$ac_ext >&5
6500
6501 ac_cv_lib_socket_connect=no
6502 fi
6503 rm -f conftest.err conftest.$ac_objext \
6504       conftest$ac_exeext conftest.$ac_ext
6505 LIBS=$ac_check_lib_save_LIBS
6506 fi
6507 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
6508 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
6509 if test $ac_cv_lib_socket_connect = yes; then
6510   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6511 fi
6512
6513     fi
6514
6515     # Guillermo Gomez says -lposix is necessary on A/UX.
6516     echo "$as_me:$LINENO: checking for remove" >&5
6517 echo $ECHO_N "checking for remove... $ECHO_C" >&6
6518 if test "${ac_cv_func_remove+set}" = set; then
6519   echo $ECHO_N "(cached) $ECHO_C" >&6
6520 else
6521   cat >conftest.$ac_ext <<_ACEOF
6522 /* confdefs.h.  */
6523 _ACEOF
6524 cat confdefs.h >>conftest.$ac_ext
6525 cat >>conftest.$ac_ext <<_ACEOF
6526 /* end confdefs.h.  */
6527 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
6528    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6529 #define remove innocuous_remove
6530
6531 /* System header to define __stub macros and hopefully few prototypes,
6532     which can conflict with char remove (); below.
6533     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6534     <limits.h> exists even on freestanding compilers.  */
6535
6536 #ifdef __STDC__
6537 # include <limits.h>
6538 #else
6539 # include <assert.h>
6540 #endif
6541
6542 #undef remove
6543
6544 /* Override any gcc2 internal prototype to avoid an error.  */
6545 #ifdef __cplusplus
6546 extern "C"
6547 {
6548 #endif
6549 /* We use char because int might match the return type of a gcc2
6550    builtin and then its argument prototype would still apply.  */
6551 char remove ();
6552 /* The GNU C library defines this for functions which it implements
6553     to always fail with ENOSYS.  Some functions are actually named
6554     something starting with __ and the normal name is an alias.  */
6555 #if defined (__stub_remove) || defined (__stub___remove)
6556 choke me
6557 #else
6558 char (*f) () = remove;
6559 #endif
6560 #ifdef __cplusplus
6561 }
6562 #endif
6563
6564 int
6565 main ()
6566 {
6567 return f != remove;
6568   ;
6569   return 0;
6570 }
6571 _ACEOF
6572 rm -f conftest.$ac_objext conftest$ac_exeext
6573 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6574   (eval $ac_link) 2>conftest.er1
6575   ac_status=$?
6576   grep -v '^ *+' conftest.er1 >conftest.err
6577   rm -f conftest.er1
6578   cat conftest.err >&5
6579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6580   (exit $ac_status); } &&
6581          { ac_try='test -z "$ac_c_werror_flag"
6582                          || test ! -s conftest.err'
6583   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6584   (eval $ac_try) 2>&5
6585   ac_status=$?
6586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6587   (exit $ac_status); }; } &&
6588          { ac_try='test -s conftest$ac_exeext'
6589   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6590   (eval $ac_try) 2>&5
6591   ac_status=$?
6592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6593   (exit $ac_status); }; }; then
6594   ac_cv_func_remove=yes
6595 else
6596   echo "$as_me: failed program was:" >&5
6597 sed 's/^/| /' conftest.$ac_ext >&5
6598
6599 ac_cv_func_remove=no
6600 fi
6601 rm -f conftest.err conftest.$ac_objext \
6602       conftest$ac_exeext conftest.$ac_ext
6603 fi
6604 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
6605 echo "${ECHO_T}$ac_cv_func_remove" >&6
6606
6607     if test $ac_cv_func_remove = no; then
6608       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
6609 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
6610 if test "${ac_cv_lib_posix_remove+set}" = set; then
6611   echo $ECHO_N "(cached) $ECHO_C" >&6
6612 else
6613   ac_check_lib_save_LIBS=$LIBS
6614 LIBS="-lposix  $LIBS"
6615 cat >conftest.$ac_ext <<_ACEOF
6616 /* confdefs.h.  */
6617 _ACEOF
6618 cat confdefs.h >>conftest.$ac_ext
6619 cat >>conftest.$ac_ext <<_ACEOF
6620 /* end confdefs.h.  */
6621
6622 /* Override any gcc2 internal prototype to avoid an error.  */
6623 #ifdef __cplusplus
6624 extern "C"
6625 #endif
6626 /* We use char because int might match the return type of a gcc2
6627    builtin and then its argument prototype would still apply.  */
6628 char remove ();
6629 int
6630 main ()
6631 {
6632 remove ();
6633   ;
6634   return 0;
6635 }
6636 _ACEOF
6637 rm -f conftest.$ac_objext conftest$ac_exeext
6638 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6639   (eval $ac_link) 2>conftest.er1
6640   ac_status=$?
6641   grep -v '^ *+' conftest.er1 >conftest.err
6642   rm -f conftest.er1
6643   cat conftest.err >&5
6644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6645   (exit $ac_status); } &&
6646          { ac_try='test -z "$ac_c_werror_flag"
6647                          || test ! -s conftest.err'
6648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6649   (eval $ac_try) 2>&5
6650   ac_status=$?
6651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6652   (exit $ac_status); }; } &&
6653          { ac_try='test -s conftest$ac_exeext'
6654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6655   (eval $ac_try) 2>&5
6656   ac_status=$?
6657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6658   (exit $ac_status); }; }; then
6659   ac_cv_lib_posix_remove=yes
6660 else
6661   echo "$as_me: failed program was:" >&5
6662 sed 's/^/| /' conftest.$ac_ext >&5
6663
6664 ac_cv_lib_posix_remove=no
6665 fi
6666 rm -f conftest.err conftest.$ac_objext \
6667       conftest$ac_exeext conftest.$ac_ext
6668 LIBS=$ac_check_lib_save_LIBS
6669 fi
6670 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
6671 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
6672 if test $ac_cv_lib_posix_remove = yes; then
6673   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6674 fi
6675
6676     fi
6677
6678     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6679     echo "$as_me:$LINENO: checking for shmat" >&5
6680 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
6681 if test "${ac_cv_func_shmat+set}" = set; then
6682   echo $ECHO_N "(cached) $ECHO_C" >&6
6683 else
6684   cat >conftest.$ac_ext <<_ACEOF
6685 /* confdefs.h.  */
6686 _ACEOF
6687 cat confdefs.h >>conftest.$ac_ext
6688 cat >>conftest.$ac_ext <<_ACEOF
6689 /* end confdefs.h.  */
6690 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
6691    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6692 #define shmat innocuous_shmat
6693
6694 /* System header to define __stub macros and hopefully few prototypes,
6695     which can conflict with char shmat (); below.
6696     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6697     <limits.h> exists even on freestanding compilers.  */
6698
6699 #ifdef __STDC__
6700 # include <limits.h>
6701 #else
6702 # include <assert.h>
6703 #endif
6704
6705 #undef shmat
6706
6707 /* Override any gcc2 internal prototype to avoid an error.  */
6708 #ifdef __cplusplus
6709 extern "C"
6710 {
6711 #endif
6712 /* We use char because int might match the return type of a gcc2
6713    builtin and then its argument prototype would still apply.  */
6714 char shmat ();
6715 /* The GNU C library defines this for functions which it implements
6716     to always fail with ENOSYS.  Some functions are actually named
6717     something starting with __ and the normal name is an alias.  */
6718 #if defined (__stub_shmat) || defined (__stub___shmat)
6719 choke me
6720 #else
6721 char (*f) () = shmat;
6722 #endif
6723 #ifdef __cplusplus
6724 }
6725 #endif
6726
6727 int
6728 main ()
6729 {
6730 return f != shmat;
6731   ;
6732   return 0;
6733 }
6734 _ACEOF
6735 rm -f conftest.$ac_objext conftest$ac_exeext
6736 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6737   (eval $ac_link) 2>conftest.er1
6738   ac_status=$?
6739   grep -v '^ *+' conftest.er1 >conftest.err
6740   rm -f conftest.er1
6741   cat conftest.err >&5
6742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6743   (exit $ac_status); } &&
6744          { ac_try='test -z "$ac_c_werror_flag"
6745                          || test ! -s conftest.err'
6746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6747   (eval $ac_try) 2>&5
6748   ac_status=$?
6749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6750   (exit $ac_status); }; } &&
6751          { ac_try='test -s conftest$ac_exeext'
6752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6753   (eval $ac_try) 2>&5
6754   ac_status=$?
6755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6756   (exit $ac_status); }; }; then
6757   ac_cv_func_shmat=yes
6758 else
6759   echo "$as_me: failed program was:" >&5
6760 sed 's/^/| /' conftest.$ac_ext >&5
6761
6762 ac_cv_func_shmat=no
6763 fi
6764 rm -f conftest.err conftest.$ac_objext \
6765       conftest$ac_exeext conftest.$ac_ext
6766 fi
6767 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
6768 echo "${ECHO_T}$ac_cv_func_shmat" >&6
6769
6770     if test $ac_cv_func_shmat = no; then
6771       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
6772 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
6773 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
6774   echo $ECHO_N "(cached) $ECHO_C" >&6
6775 else
6776   ac_check_lib_save_LIBS=$LIBS
6777 LIBS="-lipc  $LIBS"
6778 cat >conftest.$ac_ext <<_ACEOF
6779 /* confdefs.h.  */
6780 _ACEOF
6781 cat confdefs.h >>conftest.$ac_ext
6782 cat >>conftest.$ac_ext <<_ACEOF
6783 /* end confdefs.h.  */
6784
6785 /* Override any gcc2 internal prototype to avoid an error.  */
6786 #ifdef __cplusplus
6787 extern "C"
6788 #endif
6789 /* We use char because int might match the return type of a gcc2
6790    builtin and then its argument prototype would still apply.  */
6791 char shmat ();
6792 int
6793 main ()
6794 {
6795 shmat ();
6796   ;
6797   return 0;
6798 }
6799 _ACEOF
6800 rm -f conftest.$ac_objext conftest$ac_exeext
6801 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6802   (eval $ac_link) 2>conftest.er1
6803   ac_status=$?
6804   grep -v '^ *+' conftest.er1 >conftest.err
6805   rm -f conftest.er1
6806   cat conftest.err >&5
6807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6808   (exit $ac_status); } &&
6809          { ac_try='test -z "$ac_c_werror_flag"
6810                          || test ! -s conftest.err'
6811   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6812   (eval $ac_try) 2>&5
6813   ac_status=$?
6814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6815   (exit $ac_status); }; } &&
6816          { ac_try='test -s conftest$ac_exeext'
6817   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6818   (eval $ac_try) 2>&5
6819   ac_status=$?
6820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6821   (exit $ac_status); }; }; then
6822   ac_cv_lib_ipc_shmat=yes
6823 else
6824   echo "$as_me: failed program was:" >&5
6825 sed 's/^/| /' conftest.$ac_ext >&5
6826
6827 ac_cv_lib_ipc_shmat=no
6828 fi
6829 rm -f conftest.err conftest.$ac_objext \
6830       conftest$ac_exeext conftest.$ac_ext
6831 LIBS=$ac_check_lib_save_LIBS
6832 fi
6833 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
6834 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
6835 if test $ac_cv_lib_ipc_shmat = yes; then
6836   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6837 fi
6838
6839     fi
6840   fi
6841
6842   # Check for libraries that X11R6 Xt/Xaw programs need.
6843   ac_save_LDFLAGS=$LDFLAGS
6844   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6845   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6846   # check for ICE first), but we must link in the order -lSM -lICE or
6847   # we get undefined symbols.  So assume we have SM if we have ICE.
6848   # These have to be linked with before -lX11, unlike the other
6849   # libraries we check for below, so use a different variable.
6850   # John Interrante, Karl Berry
6851   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
6852 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
6853 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
6854   echo $ECHO_N "(cached) $ECHO_C" >&6
6855 else
6856   ac_check_lib_save_LIBS=$LIBS
6857 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6858 cat >conftest.$ac_ext <<_ACEOF
6859 /* confdefs.h.  */
6860 _ACEOF
6861 cat confdefs.h >>conftest.$ac_ext
6862 cat >>conftest.$ac_ext <<_ACEOF
6863 /* end confdefs.h.  */
6864
6865 /* Override any gcc2 internal prototype to avoid an error.  */
6866 #ifdef __cplusplus
6867 extern "C"
6868 #endif
6869 /* We use char because int might match the return type of a gcc2
6870    builtin and then its argument prototype would still apply.  */
6871 char IceConnectionNumber ();
6872 int
6873 main ()
6874 {
6875 IceConnectionNumber ();
6876   ;
6877   return 0;
6878 }
6879 _ACEOF
6880 rm -f conftest.$ac_objext conftest$ac_exeext
6881 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6882   (eval $ac_link) 2>conftest.er1
6883   ac_status=$?
6884   grep -v '^ *+' conftest.er1 >conftest.err
6885   rm -f conftest.er1
6886   cat conftest.err >&5
6887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6888   (exit $ac_status); } &&
6889          { ac_try='test -z "$ac_c_werror_flag"
6890                          || test ! -s conftest.err'
6891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6892   (eval $ac_try) 2>&5
6893   ac_status=$?
6894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6895   (exit $ac_status); }; } &&
6896          { ac_try='test -s conftest$ac_exeext'
6897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6898   (eval $ac_try) 2>&5
6899   ac_status=$?
6900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6901   (exit $ac_status); }; }; then
6902   ac_cv_lib_ICE_IceConnectionNumber=yes
6903 else
6904   echo "$as_me: failed program was:" >&5
6905 sed 's/^/| /' conftest.$ac_ext >&5
6906
6907 ac_cv_lib_ICE_IceConnectionNumber=no
6908 fi
6909 rm -f conftest.err conftest.$ac_objext \
6910       conftest$ac_exeext conftest.$ac_ext
6911 LIBS=$ac_check_lib_save_LIBS
6912 fi
6913 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6914 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
6915 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
6916   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6917 fi
6918
6919   LDFLAGS=$ac_save_LDFLAGS
6920
6921 fi
6922
6923
6924 if test "$have_x" != yes; then
6925   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
6926 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
6927    { (exit 1); exit 1; }; }
6928 fi
6929
6930
6931     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
6932 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
6933 if test "${ac_cv_x_app_defaults+set}" = set; then
6934   echo $ECHO_N "(cached) $ECHO_C" >&6
6935 else
6936
6937   rm -fr conftestdir
6938   if mkdir conftestdir; then
6939     cd conftestdir 2>/dev/null
6940     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6941     cat > Imakefile <<'EOF'
6942 acfindx:
6943         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
6944 EOF
6945     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
6946       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
6947       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6948     fi
6949     cd .. 2>/dev/null
6950     rm -fr conftestdir
6951   fi
6952       if test x"$ac_x_app_defaults" = x; then
6953
6954   # Look for the directory under a standard set of common directories.
6955   # Check X11 before X11Rn because it's often a symlink to the current release.
6956   for ac_dir in                                 \
6957     /usr/X11/lib/app-defaults                   \
6958     /usr/X11R6/lib/app-defaults                 \
6959     /usr/X11R6/lib/X11/app-defaults             \
6960     /usr/X11R5/lib/app-defaults                 \
6961     /usr/X11R5/lib/X11/app-defaults             \
6962     /usr/X11R4/lib/app-defaults                 \
6963     /usr/X11R4/lib/X11/app-defaults             \
6964                                                 \
6965     /usr/lib/X11/app-defaults                   \
6966     /usr/lib/X11R6/app-defaults                 \
6967     /usr/lib/X11R5/app-defaults                 \
6968     /usr/lib/X11R4/app-defaults                 \
6969                                                 \
6970     /usr/local/X11/lib/app-defaults             \
6971     /usr/local/X11R6/lib/app-defaults           \
6972     /usr/local/X11R5/lib/app-defaults           \
6973     /usr/local/X11R4/lib/app-defaults           \
6974                                                 \
6975     /usr/local/lib/X11/app-defaults             \
6976     /usr/local/lib/X11R6/app-defaults           \
6977     /usr/local/lib/X11R6/X11/app-defaults       \
6978     /usr/local/lib/X11R5/app-defaults           \
6979     /usr/local/lib/X11R5/X11/app-defaults       \
6980     /usr/local/lib/X11R4/app-defaults           \
6981     /usr/local/lib/X11R4/X11/app-defaults       \
6982                                                 \
6983     /usr/X386/lib/X11/app-defaults              \
6984     /usr/x386/lib/X11/app-defaults              \
6985     /usr/XFree86/lib/X11/app-defaults           \
6986                                                 \
6987     /usr/lib/X11/app-defaults                   \
6988     /usr/local/lib/X11/app-defaults             \
6989     /usr/unsupported/lib/X11/app-defaults       \
6990     /usr/athena/lib/X11/app-defaults            \
6991     /usr/local/x11r5/lib/X11/app-defaults       \
6992     /usr/lpp/Xamples/lib/X11/app-defaults       \
6993     /lib/usr/lib/X11/app-defaults               \
6994                                                 \
6995     /usr/openwin/lib/app-defaults               \
6996     /usr/openwin/lib/X11/app-defaults           \
6997     /usr/openwin/share/lib/app-defaults         \
6998     /usr/openwin/share/lib/X11/app-defaults     \
6999                                                 \
7000     /X11R6/lib/app-defaults                     \
7001     /X11R5/lib/app-defaults                     \
7002     /X11R4/lib/app-defaults                     \
7003     ; \
7004   do
7005     if test -d "$ac_dir"; then
7006       ac_x_app_defaults=$ac_dir
7007       break
7008     fi
7009   done
7010
7011       fi
7012       if test x"$ac_x_app_defaults" = x; then
7013         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
7014       else
7015         # Record where we found app-defaults for the cache.
7016         ac_cv_x_app_defaults="$ac_x_app_defaults"
7017       fi
7018 fi
7019 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
7020 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
7021     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
7022 case "$host" in
7023     *-hpux*)
7024
7025       # The following arcana was gleaned from conversations with
7026       # Eric Schwartz <erics@col.hp.com>:
7027       #
7028       # On HPUX 10.x, the parts of X that HP considers "standard" live in
7029       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
7030       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
7031       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
7032       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
7033       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
7034       # you don't need any -I or -L arguments.
7035       #
7036       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
7037       # are the same division as 10.x.  However, there are no symlinks to
7038       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
7039       # arguments are always necessary.
7040       #
7041       # However, X11R6 was available on HPUX 9.x as a patch: if that
7042       # patch was installed, then all of X11R6 went in to
7043       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
7044       #
7045       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
7046       # whether R5 was available as a patch; R6 undoubtedly was not.)
7047       #
7048       # So.  We try and use the highest numbered pair of
7049       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
7050       # that are available.  We do not mix and match different versions
7051       # of X.
7052       #
7053       # Question I still don't know the answer to: (do you?)
7054       #
7055       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
7056       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
7057       #     that contrib directory?  Did it contain so-called "standard"
7058       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
7059       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
7060       #     be a situation where one had to reach into the R5 headers and
7061       #     libs to find Xmu?  That is, must both R6 and R5 directories
7062       #     be on the -I and -L lists in that case?
7063       #
7064       for version in X11R6 X11R5 X11R4 ; do
7065         # if either pair of directories exists...
7066         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
7067         then
7068            # if contrib exists, use it...
7069            if test -d /usr/contrib/$version/include ; then
7070              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
7071              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
7072            fi
7073            # if the "standard" one exists, use it.
7074            if test -d /usr/include/$version ; then
7075              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
7076              X_LIBS="$X_LIBS -L/usr/lib/$version"
7077            fi
7078            # since at least one of the pair exists, go no farther.
7079            break
7080         fi
7081       done
7082
7083       # Now find Motif.  Thanks for not making xmkmf find this by
7084       # default, you losers.
7085       #
7086       if test -d /usr/include/Motif2.1 ; then
7087         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
7088         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
7089       elif test -d /usr/include/Motif1.2 ; then
7090         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
7091         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
7092       elif test -d /usr/include/Motif1.1 ; then
7093         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
7094         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
7095       fi
7096
7097       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
7098       #
7099       if test -d /opt/graphics/OpenGL/include ; then
7100         # HP-UX 10.20 puts it here
7101         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
7102         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
7103       elif test -d /opt/Mesa/lib ; then
7104         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
7105         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
7106       fi
7107
7108
7109       if test -d /opt/xpm/lib/X11 ; then
7110         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
7111         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
7112       fi
7113
7114       # On HPUX, default to installing in /opt/xscreensaver/ instead of
7115       # in /usr/local/, unless there is already an xscreensaver in
7116       # /usr/local/bin/.  This can be overridden with the --prefix arg
7117       # to configure.  I'm not sure this is the right thing to do, but
7118       # Richard Lloyd says so...
7119       #
7120       if test \! -x /usr/local/bin/xscreensaver ; then
7121         ac_default_prefix=/opt/xscreensaver
7122       fi
7123
7124     ;;
7125     *-solaris*)
7126
7127       # Thanks for not making xmkmf find this by default, pinheads.
7128       # And thanks for moving things around again, too.  Is this
7129       # really the standard location now?  What happened to the
7130       # joke that this kind of thing went in /opt?
7131       # cthomp says "answer: CDE (Common Disorganized Environment)"
7132       #
7133       if test -f /usr/dt/include/Xm/Xm.h ; then
7134         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
7135         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
7136
7137         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
7138         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
7139 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
7140 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
7141   echo $ECHO_N "(cached) $ECHO_C" >&6
7142 else
7143   ac_check_lib_save_LIBS=$LIBS
7144 LIBS="-lgen  $LIBS"
7145 cat >conftest.$ac_ext <<_ACEOF
7146 /* confdefs.h.  */
7147 _ACEOF
7148 cat confdefs.h >>conftest.$ac_ext
7149 cat >>conftest.$ac_ext <<_ACEOF
7150 /* end confdefs.h.  */
7151
7152 /* Override any gcc2 internal prototype to avoid an error.  */
7153 #ifdef __cplusplus
7154 extern "C"
7155 #endif
7156 /* We use char because int might match the return type of a gcc2
7157    builtin and then its argument prototype would still apply.  */
7158 char regcmp ();
7159 int
7160 main ()
7161 {
7162 regcmp ();
7163   ;
7164   return 0;
7165 }
7166 _ACEOF
7167 rm -f conftest.$ac_objext conftest$ac_exeext
7168 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7169   (eval $ac_link) 2>conftest.er1
7170   ac_status=$?
7171   grep -v '^ *+' conftest.er1 >conftest.err
7172   rm -f conftest.er1
7173   cat conftest.err >&5
7174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7175   (exit $ac_status); } &&
7176          { ac_try='test -z "$ac_c_werror_flag"
7177                          || test ! -s conftest.err'
7178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7179   (eval $ac_try) 2>&5
7180   ac_status=$?
7181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7182   (exit $ac_status); }; } &&
7183          { ac_try='test -s conftest$ac_exeext'
7184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7185   (eval $ac_try) 2>&5
7186   ac_status=$?
7187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7188   (exit $ac_status); }; }; then
7189   ac_cv_lib_gen_regcmp=yes
7190 else
7191   echo "$as_me: failed program was:" >&5
7192 sed 's/^/| /' conftest.$ac_ext >&5
7193
7194 ac_cv_lib_gen_regcmp=no
7195 fi
7196 rm -f conftest.err conftest.$ac_objext \
7197       conftest$ac_exeext conftest.$ac_ext
7198 LIBS=$ac_check_lib_save_LIBS
7199 fi
7200 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
7201 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
7202 if test $ac_cv_lib_gen_regcmp = yes; then
7203   MOTIF_LIBS="$MOTIF_LIBS -lgen"
7204 fi
7205
7206       fi
7207
7208     ;;
7209     *-darwin*)
7210
7211       # On MacOS X (10.x with "fink"), many things are under /sw/.
7212       #
7213       if test -d /sw/include ; then
7214         X_CFLAGS="-I/sw/include $X_CFLAGS"
7215         X_LIBS="-L/sw/lib $X_LIBS"
7216       fi
7217     ;;
7218   esac
7219 echo "$as_me:$LINENO: checking for XPointer" >&5
7220 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
7221 if test "${ac_cv_xpointer+set}" = set; then
7222   echo $ECHO_N "(cached) $ECHO_C" >&6
7223 else
7224
7225   ac_save_CPPFLAGS="$CPPFLAGS"
7226   if test \! -z "$includedir" ; then
7227     CPPFLAGS="$CPPFLAGS -I$includedir"
7228   fi
7229   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7230   cat >conftest.$ac_ext <<_ACEOF
7231 /* confdefs.h.  */
7232 _ACEOF
7233 cat confdefs.h >>conftest.$ac_ext
7234 cat >>conftest.$ac_ext <<_ACEOF
7235 /* end confdefs.h.  */
7236 #include <X11/Xlib.h>
7237 int
7238 main ()
7239 {
7240 XPointer foo = (XPointer) 0;
7241   ;
7242   return 0;
7243 }
7244 _ACEOF
7245 rm -f conftest.$ac_objext
7246 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7247   (eval $ac_compile) 2>conftest.er1
7248   ac_status=$?
7249   grep -v '^ *+' conftest.er1 >conftest.err
7250   rm -f conftest.er1
7251   cat conftest.err >&5
7252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7253   (exit $ac_status); } &&
7254          { ac_try='test -z "$ac_c_werror_flag"
7255                          || test ! -s conftest.err'
7256   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7257   (eval $ac_try) 2>&5
7258   ac_status=$?
7259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7260   (exit $ac_status); }; } &&
7261          { ac_try='test -s conftest.$ac_objext'
7262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7263   (eval $ac_try) 2>&5
7264   ac_status=$?
7265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7266   (exit $ac_status); }; }; then
7267   ac_cv_xpointer=yes
7268 else
7269   echo "$as_me: failed program was:" >&5
7270 sed 's/^/| /' conftest.$ac_ext >&5
7271
7272 ac_cv_xpointer=no
7273 fi
7274 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7275   CPPFLAGS="$ac_save_CPPFLAGS"
7276 fi
7277 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
7278 echo "${ECHO_T}$ac_cv_xpointer" >&6
7279   if test "$ac_cv_xpointer" != yes; then
7280    cat >>confdefs.h <<\_ACEOF
7281 #define XPointer char*
7282 _ACEOF
7283
7284   fi
7285
7286 echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
7287 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6
7288   ac_macosx=no
7289   case "$host" in
7290     *-apple-darwin* )
7291       ac_macosx=yes
7292     ;;
7293   esac
7294 echo "$as_me:$LINENO: result: $ac_macosx" >&5
7295 echo "${ECHO_T}$ac_macosx" >&6
7296
7297
7298 if test "$ac_macosx" = yes; then
7299   if test -n "$GCC"; then
7300     # Without these, every link against libGL gets a bunch of useless warnings.
7301     osx_crud="-bind_at_load -multiply_defined suppress"
7302     echo "$as_me:$LINENO: result: adding \"$osx_crud\" to LDFLAGS" >&5
7303 echo "${ECHO_T}adding \"$osx_crud\" to LDFLAGS" >&6
7304      LDFLAGS="$LDFLAGS $osx_crud"
7305   fi
7306 fi
7307
7308 ###############################################################################
7309 #
7310 #       Gettext support
7311 #
7312 ###############################################################################
7313
7314
7315
7316 if test -n ""; then
7317     echo "$as_me:$LINENO: checking for intltool >= " >&5
7318 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
7319
7320     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
7321     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
7322
7323     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
7324
7325
7326     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
7327         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
7328 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
7329     else
7330         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
7331 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
7332         exit 1
7333     fi
7334 fi
7335
7336   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'
7337 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'
7338      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'
7339       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
7340      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'
7341    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'
7342     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'
7343 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'
7344        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'
7345       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'
7346     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'
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360 # Use the tools built into the package, not the ones that are installed.
7361
7362 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
7363 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
7364 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
7365
7366
7367
7368
7369
7370 # Extract the first word of "perl", so it can be a program name with args.
7371 set dummy perl; ac_word=$2
7372 echo "$as_me:$LINENO: checking for $ac_word" >&5
7373 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7374 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
7375   echo $ECHO_N "(cached) $ECHO_C" >&6
7376 else
7377   case $INTLTOOL_PERL in
7378   [\\/]* | ?:[\\/]*)
7379   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
7380   ;;
7381   *)
7382   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7383 for as_dir in $PATH
7384 do
7385   IFS=$as_save_IFS
7386   test -z "$as_dir" && as_dir=.
7387   for ac_exec_ext in '' $ac_executable_extensions; do
7388   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7389     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
7390     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7391     break 2
7392   fi
7393 done
7394 done
7395
7396   ;;
7397 esac
7398 fi
7399 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
7400
7401 if test -n "$INTLTOOL_PERL"; then
7402   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
7403 echo "${ECHO_T}$INTLTOOL_PERL" >&6
7404 else
7405   echo "$as_me:$LINENO: result: no" >&5
7406 echo "${ECHO_T}no" >&6
7407 fi
7408
7409 if test -z "$INTLTOOL_PERL"; then
7410    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
7411 echo "$as_me: error: perl not found; required for intltool" >&2;}
7412    { (exit 1); exit 1; }; }
7413 fi
7414 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7415    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
7416 echo "$as_me: error: perl 5.x required for intltool" >&2;}
7417    { (exit 1); exit 1; }; }
7418 fi
7419
7420 # Remove file type tags (using []) from po/POTFILES.
7421
7422
7423
7424
7425
7426
7427
7428 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7429
7430           ac_config_commands="$ac_config_commands default-1"
7431
7432
7433
7434 GETTEXT_PACKAGE=xscreensaver
7435
7436 cat >>confdefs.h <<_ACEOF
7437 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7438 _ACEOF
7439
7440
7441 cat >>confdefs.h <<_ACEOF
7442 #define PACKAGE "$GETTEXT_PACKAGE"
7443 _ACEOF
7444
7445
7446
7447 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"
7448 if test -n "$ac_tool_prefix"; then
7449   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7450 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7451 echo "$as_me:$LINENO: checking for $ac_word" >&5
7452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7453 if test "${ac_cv_prog_RANLIB+set}" = set; then
7454   echo $ECHO_N "(cached) $ECHO_C" >&6
7455 else
7456   if test -n "$RANLIB"; then
7457   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7458 else
7459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7460 for as_dir in $PATH
7461 do
7462   IFS=$as_save_IFS
7463   test -z "$as_dir" && as_dir=.
7464   for ac_exec_ext in '' $ac_executable_extensions; do
7465   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7466     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7467     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7468     break 2
7469   fi
7470 done
7471 done
7472
7473 fi
7474 fi
7475 RANLIB=$ac_cv_prog_RANLIB
7476 if test -n "$RANLIB"; then
7477   echo "$as_me:$LINENO: result: $RANLIB" >&5
7478 echo "${ECHO_T}$RANLIB" >&6
7479 else
7480   echo "$as_me:$LINENO: result: no" >&5
7481 echo "${ECHO_T}no" >&6
7482 fi
7483
7484 fi
7485 if test -z "$ac_cv_prog_RANLIB"; then
7486   ac_ct_RANLIB=$RANLIB
7487   # Extract the first word of "ranlib", so it can be a program name with args.
7488 set dummy ranlib; ac_word=$2
7489 echo "$as_me:$LINENO: checking for $ac_word" >&5
7490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7491 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7492   echo $ECHO_N "(cached) $ECHO_C" >&6
7493 else
7494   if test -n "$ac_ct_RANLIB"; then
7495   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7496 else
7497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7498 for as_dir in $PATH
7499 do
7500   IFS=$as_save_IFS
7501   test -z "$as_dir" && as_dir=.
7502   for ac_exec_ext in '' $ac_executable_extensions; do
7503   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7504     ac_cv_prog_ac_ct_RANLIB="ranlib"
7505     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7506     break 2
7507   fi
7508 done
7509 done
7510
7511   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7512 fi
7513 fi
7514 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7515 if test -n "$ac_ct_RANLIB"; then
7516   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7517 echo "${ECHO_T}$ac_ct_RANLIB" >&6
7518 else
7519   echo "$as_me:$LINENO: result: no" >&5
7520 echo "${ECHO_T}no" >&6
7521 fi
7522
7523   RANLIB=$ac_ct_RANLIB
7524 else
7525   RANLIB="$ac_cv_prog_RANLIB"
7526 fi
7527
7528 echo "$as_me:$LINENO: checking for off_t" >&5
7529 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
7530 if test "${ac_cv_type_off_t+set}" = set; then
7531   echo $ECHO_N "(cached) $ECHO_C" >&6
7532 else
7533   cat >conftest.$ac_ext <<_ACEOF
7534 /* confdefs.h.  */
7535 _ACEOF
7536 cat confdefs.h >>conftest.$ac_ext
7537 cat >>conftest.$ac_ext <<_ACEOF
7538 /* end confdefs.h.  */
7539 $ac_includes_default
7540 int
7541 main ()
7542 {
7543 if ((off_t *) 0)
7544   return 0;
7545 if (sizeof (off_t))
7546   return 0;
7547   ;
7548   return 0;
7549 }
7550 _ACEOF
7551 rm -f conftest.$ac_objext
7552 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7553   (eval $ac_compile) 2>conftest.er1
7554   ac_status=$?
7555   grep -v '^ *+' conftest.er1 >conftest.err
7556   rm -f conftest.er1
7557   cat conftest.err >&5
7558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7559   (exit $ac_status); } &&
7560          { ac_try='test -z "$ac_c_werror_flag"
7561                          || test ! -s conftest.err'
7562   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7563   (eval $ac_try) 2>&5
7564   ac_status=$?
7565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7566   (exit $ac_status); }; } &&
7567          { ac_try='test -s conftest.$ac_objext'
7568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7569   (eval $ac_try) 2>&5
7570   ac_status=$?
7571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7572   (exit $ac_status); }; }; then
7573   ac_cv_type_off_t=yes
7574 else
7575   echo "$as_me: failed program was:" >&5
7576 sed 's/^/| /' conftest.$ac_ext >&5
7577
7578 ac_cv_type_off_t=no
7579 fi
7580 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7581 fi
7582 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
7583 echo "${ECHO_T}$ac_cv_type_off_t" >&6
7584 if test $ac_cv_type_off_t = yes; then
7585   :
7586 else
7587
7588 cat >>confdefs.h <<_ACEOF
7589 #define off_t long
7590 _ACEOF
7591
7592 fi
7593
7594 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7595 # for constant arguments.  Useless!
7596 echo "$as_me:$LINENO: checking for working alloca.h" >&5
7597 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7598 if test "${ac_cv_working_alloca_h+set}" = set; then
7599   echo $ECHO_N "(cached) $ECHO_C" >&6
7600 else
7601   cat >conftest.$ac_ext <<_ACEOF
7602 /* confdefs.h.  */
7603 _ACEOF
7604 cat confdefs.h >>conftest.$ac_ext
7605 cat >>conftest.$ac_ext <<_ACEOF
7606 /* end confdefs.h.  */
7607 #include <alloca.h>
7608 int
7609 main ()
7610 {
7611 char *p = (char *) alloca (2 * sizeof (int));
7612   ;
7613   return 0;
7614 }
7615 _ACEOF
7616 rm -f conftest.$ac_objext conftest$ac_exeext
7617 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7618   (eval $ac_link) 2>conftest.er1
7619   ac_status=$?
7620   grep -v '^ *+' conftest.er1 >conftest.err
7621   rm -f conftest.er1
7622   cat conftest.err >&5
7623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624   (exit $ac_status); } &&
7625          { ac_try='test -z "$ac_c_werror_flag"
7626                          || test ! -s conftest.err'
7627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7628   (eval $ac_try) 2>&5
7629   ac_status=$?
7630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7631   (exit $ac_status); }; } &&
7632          { ac_try='test -s conftest$ac_exeext'
7633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7634   (eval $ac_try) 2>&5
7635   ac_status=$?
7636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7637   (exit $ac_status); }; }; then
7638   ac_cv_working_alloca_h=yes
7639 else
7640   echo "$as_me: failed program was:" >&5
7641 sed 's/^/| /' conftest.$ac_ext >&5
7642
7643 ac_cv_working_alloca_h=no
7644 fi
7645 rm -f conftest.err conftest.$ac_objext \
7646       conftest$ac_exeext conftest.$ac_ext
7647 fi
7648 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
7649 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7650 if test $ac_cv_working_alloca_h = yes; then
7651
7652 cat >>confdefs.h <<\_ACEOF
7653 #define HAVE_ALLOCA_H 1
7654 _ACEOF
7655
7656 fi
7657
7658 echo "$as_me:$LINENO: checking for alloca" >&5
7659 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7660 if test "${ac_cv_func_alloca_works+set}" = set; then
7661   echo $ECHO_N "(cached) $ECHO_C" >&6
7662 else
7663   cat >conftest.$ac_ext <<_ACEOF
7664 /* confdefs.h.  */
7665 _ACEOF
7666 cat confdefs.h >>conftest.$ac_ext
7667 cat >>conftest.$ac_ext <<_ACEOF
7668 /* end confdefs.h.  */
7669 #ifdef __GNUC__
7670 # define alloca __builtin_alloca
7671 #else
7672 # ifdef _MSC_VER
7673 #  include <malloc.h>
7674 #  define alloca _alloca
7675 # else
7676 #  if HAVE_ALLOCA_H
7677 #   include <alloca.h>
7678 #  else
7679 #   ifdef _AIX
7680  #pragma alloca
7681 #   else
7682 #    ifndef alloca /* predefined by HP cc +Olibcalls */
7683 char *alloca ();
7684 #    endif
7685 #   endif
7686 #  endif
7687 # endif
7688 #endif
7689
7690 int
7691 main ()
7692 {
7693 char *p = (char *) alloca (1);
7694   ;
7695   return 0;
7696 }
7697 _ACEOF
7698 rm -f conftest.$ac_objext conftest$ac_exeext
7699 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7700   (eval $ac_link) 2>conftest.er1
7701   ac_status=$?
7702   grep -v '^ *+' conftest.er1 >conftest.err
7703   rm -f conftest.er1
7704   cat conftest.err >&5
7705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7706   (exit $ac_status); } &&
7707          { ac_try='test -z "$ac_c_werror_flag"
7708                          || test ! -s conftest.err'
7709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7710   (eval $ac_try) 2>&5
7711   ac_status=$?
7712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7713   (exit $ac_status); }; } &&
7714          { ac_try='test -s conftest$ac_exeext'
7715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7716   (eval $ac_try) 2>&5
7717   ac_status=$?
7718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7719   (exit $ac_status); }; }; then
7720   ac_cv_func_alloca_works=yes
7721 else
7722   echo "$as_me: failed program was:" >&5
7723 sed 's/^/| /' conftest.$ac_ext >&5
7724
7725 ac_cv_func_alloca_works=no
7726 fi
7727 rm -f conftest.err conftest.$ac_objext \
7728       conftest$ac_exeext conftest.$ac_ext
7729 fi
7730 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
7731 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
7732
7733 if test $ac_cv_func_alloca_works = yes; then
7734
7735 cat >>confdefs.h <<\_ACEOF
7736 #define HAVE_ALLOCA 1
7737 _ACEOF
7738
7739 else
7740   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7741 # that cause trouble.  Some versions do not even contain alloca or
7742 # contain a buggy version.  If you still want to use their alloca,
7743 # use ar to extract alloca.o from them instead of compiling alloca.c.
7744
7745 ALLOCA=alloca.$ac_objext
7746
7747 cat >>confdefs.h <<\_ACEOF
7748 #define C_ALLOCA 1
7749 _ACEOF
7750
7751
7752 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
7753 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
7754 if test "${ac_cv_os_cray+set}" = set; then
7755   echo $ECHO_N "(cached) $ECHO_C" >&6
7756 else
7757   cat >conftest.$ac_ext <<_ACEOF
7758 /* confdefs.h.  */
7759 _ACEOF
7760 cat confdefs.h >>conftest.$ac_ext
7761 cat >>conftest.$ac_ext <<_ACEOF
7762 /* end confdefs.h.  */
7763 #if defined(CRAY) && ! defined(CRAY2)
7764 webecray
7765 #else
7766 wenotbecray
7767 #endif
7768
7769 _ACEOF
7770 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7771   $EGREP "webecray" >/dev/null 2>&1; then
7772   ac_cv_os_cray=yes
7773 else
7774   ac_cv_os_cray=no
7775 fi
7776 rm -f conftest*
7777
7778 fi
7779 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
7780 echo "${ECHO_T}$ac_cv_os_cray" >&6
7781 if test $ac_cv_os_cray = yes; then
7782   for ac_func in _getb67 GETB67 getb67; do
7783     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7784 echo "$as_me:$LINENO: checking for $ac_func" >&5
7785 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7786 if eval "test \"\${$as_ac_var+set}\" = set"; then
7787   echo $ECHO_N "(cached) $ECHO_C" >&6
7788 else
7789   cat >conftest.$ac_ext <<_ACEOF
7790 /* confdefs.h.  */
7791 _ACEOF
7792 cat confdefs.h >>conftest.$ac_ext
7793 cat >>conftest.$ac_ext <<_ACEOF
7794 /* end confdefs.h.  */
7795 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7796    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7797 #define $ac_func innocuous_$ac_func
7798
7799 /* System header to define __stub macros and hopefully few prototypes,
7800     which can conflict with char $ac_func (); below.
7801     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7802     <limits.h> exists even on freestanding compilers.  */
7803
7804 #ifdef __STDC__
7805 # include <limits.h>
7806 #else
7807 # include <assert.h>
7808 #endif
7809
7810 #undef $ac_func
7811
7812 /* Override any gcc2 internal prototype to avoid an error.  */
7813 #ifdef __cplusplus
7814 extern "C"
7815 {
7816 #endif
7817 /* We use char because int might match the return type of a gcc2
7818    builtin and then its argument prototype would still apply.  */
7819 char $ac_func ();
7820 /* The GNU C library defines this for functions which it implements
7821     to always fail with ENOSYS.  Some functions are actually named
7822     something starting with __ and the normal name is an alias.  */
7823 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7824 choke me
7825 #else
7826 char (*f) () = $ac_func;
7827 #endif
7828 #ifdef __cplusplus
7829 }
7830 #endif
7831
7832 int
7833 main ()
7834 {
7835 return f != $ac_func;
7836   ;
7837   return 0;
7838 }
7839 _ACEOF
7840 rm -f conftest.$ac_objext conftest$ac_exeext
7841 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7842   (eval $ac_link) 2>conftest.er1
7843   ac_status=$?
7844   grep -v '^ *+' conftest.er1 >conftest.err
7845   rm -f conftest.er1
7846   cat conftest.err >&5
7847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7848   (exit $ac_status); } &&
7849          { ac_try='test -z "$ac_c_werror_flag"
7850                          || test ! -s conftest.err'
7851   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7852   (eval $ac_try) 2>&5
7853   ac_status=$?
7854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7855   (exit $ac_status); }; } &&
7856          { ac_try='test -s conftest$ac_exeext'
7857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7858   (eval $ac_try) 2>&5
7859   ac_status=$?
7860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7861   (exit $ac_status); }; }; then
7862   eval "$as_ac_var=yes"
7863 else
7864   echo "$as_me: failed program was:" >&5
7865 sed 's/^/| /' conftest.$ac_ext >&5
7866
7867 eval "$as_ac_var=no"
7868 fi
7869 rm -f conftest.err conftest.$ac_objext \
7870       conftest$ac_exeext conftest.$ac_ext
7871 fi
7872 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7873 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7874 if test `eval echo '${'$as_ac_var'}'` = yes; then
7875
7876 cat >>confdefs.h <<_ACEOF
7877 #define CRAY_STACKSEG_END $ac_func
7878 _ACEOF
7879
7880     break
7881 fi
7882
7883   done
7884 fi
7885
7886 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
7887 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7888 if test "${ac_cv_c_stack_direction+set}" = set; then
7889   echo $ECHO_N "(cached) $ECHO_C" >&6
7890 else
7891   if test "$cross_compiling" = yes; then
7892   ac_cv_c_stack_direction=0
7893 else
7894   cat >conftest.$ac_ext <<_ACEOF
7895 /* confdefs.h.  */
7896 _ACEOF
7897 cat confdefs.h >>conftest.$ac_ext
7898 cat >>conftest.$ac_ext <<_ACEOF
7899 /* end confdefs.h.  */
7900 int
7901 find_stack_direction ()
7902 {
7903   static char *addr = 0;
7904   auto char dummy;
7905   if (addr == 0)
7906     {
7907       addr = &dummy;
7908       return find_stack_direction ();
7909     }
7910   else
7911     return (&dummy > addr) ? 1 : -1;
7912 }
7913
7914 int
7915 main ()
7916 {
7917   exit (find_stack_direction () < 0);
7918 }
7919 _ACEOF
7920 rm -f conftest$ac_exeext
7921 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7922   (eval $ac_link) 2>&5
7923   ac_status=$?
7924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7925   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7927   (eval $ac_try) 2>&5
7928   ac_status=$?
7929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7930   (exit $ac_status); }; }; then
7931   ac_cv_c_stack_direction=1
7932 else
7933   echo "$as_me: program exited with status $ac_status" >&5
7934 echo "$as_me: failed program was:" >&5
7935 sed 's/^/| /' conftest.$ac_ext >&5
7936
7937 ( exit $ac_status )
7938 ac_cv_c_stack_direction=-1
7939 fi
7940 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7941 fi
7942 fi
7943 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
7944 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
7945
7946 cat >>confdefs.h <<_ACEOF
7947 #define STACK_DIRECTION $ac_cv_c_stack_direction
7948 _ACEOF
7949
7950
7951 fi
7952
7953
7954
7955 for ac_header in stdlib.h unistd.h
7956 do
7957 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7958 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7959   echo "$as_me:$LINENO: checking for $ac_header" >&5
7960 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7961 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7962   echo $ECHO_N "(cached) $ECHO_C" >&6
7963 fi
7964 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7965 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7966 else
7967   # Is the header compilable?
7968 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7969 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7970 cat >conftest.$ac_ext <<_ACEOF
7971 /* confdefs.h.  */
7972 _ACEOF
7973 cat confdefs.h >>conftest.$ac_ext
7974 cat >>conftest.$ac_ext <<_ACEOF
7975 /* end confdefs.h.  */
7976 $ac_includes_default
7977 #include <$ac_header>
7978 _ACEOF
7979 rm -f conftest.$ac_objext
7980 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7981   (eval $ac_compile) 2>conftest.er1
7982   ac_status=$?
7983   grep -v '^ *+' conftest.er1 >conftest.err
7984   rm -f conftest.er1
7985   cat conftest.err >&5
7986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7987   (exit $ac_status); } &&
7988          { ac_try='test -z "$ac_c_werror_flag"
7989                          || test ! -s conftest.err'
7990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7991   (eval $ac_try) 2>&5
7992   ac_status=$?
7993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7994   (exit $ac_status); }; } &&
7995          { ac_try='test -s conftest.$ac_objext'
7996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7997   (eval $ac_try) 2>&5
7998   ac_status=$?
7999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8000   (exit $ac_status); }; }; then
8001   ac_header_compiler=yes
8002 else
8003   echo "$as_me: failed program was:" >&5
8004 sed 's/^/| /' conftest.$ac_ext >&5
8005
8006 ac_header_compiler=no
8007 fi
8008 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8009 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8010 echo "${ECHO_T}$ac_header_compiler" >&6
8011
8012 # Is the header present?
8013 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8014 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8015 cat >conftest.$ac_ext <<_ACEOF
8016 /* confdefs.h.  */
8017 _ACEOF
8018 cat confdefs.h >>conftest.$ac_ext
8019 cat >>conftest.$ac_ext <<_ACEOF
8020 /* end confdefs.h.  */
8021 #include <$ac_header>
8022 _ACEOF
8023 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8024   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8025   ac_status=$?
8026   grep -v '^ *+' conftest.er1 >conftest.err
8027   rm -f conftest.er1
8028   cat conftest.err >&5
8029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8030   (exit $ac_status); } >/dev/null; then
8031   if test -s conftest.err; then
8032     ac_cpp_err=$ac_c_preproc_warn_flag
8033     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8034   else
8035     ac_cpp_err=
8036   fi
8037 else
8038   ac_cpp_err=yes
8039 fi
8040 if test -z "$ac_cpp_err"; then
8041   ac_header_preproc=yes
8042 else
8043   echo "$as_me: failed program was:" >&5
8044 sed 's/^/| /' conftest.$ac_ext >&5
8045
8046   ac_header_preproc=no
8047 fi
8048 rm -f conftest.err conftest.$ac_ext
8049 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8050 echo "${ECHO_T}$ac_header_preproc" >&6
8051
8052 # So?  What about this header?
8053 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8054   yes:no: )
8055     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8056 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8057     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8058 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8059     ac_header_preproc=yes
8060     ;;
8061   no:yes:* )
8062     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8063 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8064     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8065 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8066     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8067 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8068     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8069 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8070     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8071 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8072     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8073 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8074     (
8075       cat <<\_ASBOX
8076 ## ------------------------------------------ ##
8077 ## Report this to the AC_PACKAGE_NAME lists.  ##
8078 ## ------------------------------------------ ##
8079 _ASBOX
8080     ) |
8081       sed "s/^/$as_me: WARNING:     /" >&2
8082     ;;
8083 esac
8084 echo "$as_me:$LINENO: checking for $ac_header" >&5
8085 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8086 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8087   echo $ECHO_N "(cached) $ECHO_C" >&6
8088 else
8089   eval "$as_ac_Header=\$ac_header_preproc"
8090 fi
8091 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8092 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8093
8094 fi
8095 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8096   cat >>confdefs.h <<_ACEOF
8097 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8098 _ACEOF
8099
8100 fi
8101
8102 done
8103
8104
8105 for ac_func in getpagesize
8106 do
8107 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8108 echo "$as_me:$LINENO: checking for $ac_func" >&5
8109 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8110 if eval "test \"\${$as_ac_var+set}\" = set"; then
8111   echo $ECHO_N "(cached) $ECHO_C" >&6
8112 else
8113   cat >conftest.$ac_ext <<_ACEOF
8114 /* confdefs.h.  */
8115 _ACEOF
8116 cat confdefs.h >>conftest.$ac_ext
8117 cat >>conftest.$ac_ext <<_ACEOF
8118 /* end confdefs.h.  */
8119 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8120    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8121 #define $ac_func innocuous_$ac_func
8122
8123 /* System header to define __stub macros and hopefully few prototypes,
8124     which can conflict with char $ac_func (); below.
8125     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8126     <limits.h> exists even on freestanding compilers.  */
8127
8128 #ifdef __STDC__
8129 # include <limits.h>
8130 #else
8131 # include <assert.h>
8132 #endif
8133
8134 #undef $ac_func
8135
8136 /* Override any gcc2 internal prototype to avoid an error.  */
8137 #ifdef __cplusplus
8138 extern "C"
8139 {
8140 #endif
8141 /* We use char because int might match the return type of a gcc2
8142    builtin and then its argument prototype would still apply.  */
8143 char $ac_func ();
8144 /* The GNU C library defines this for functions which it implements
8145     to always fail with ENOSYS.  Some functions are actually named
8146     something starting with __ and the normal name is an alias.  */
8147 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8148 choke me
8149 #else
8150 char (*f) () = $ac_func;
8151 #endif
8152 #ifdef __cplusplus
8153 }
8154 #endif
8155
8156 int
8157 main ()
8158 {
8159 return f != $ac_func;
8160   ;
8161   return 0;
8162 }
8163 _ACEOF
8164 rm -f conftest.$ac_objext conftest$ac_exeext
8165 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8166   (eval $ac_link) 2>conftest.er1
8167   ac_status=$?
8168   grep -v '^ *+' conftest.er1 >conftest.err
8169   rm -f conftest.er1
8170   cat conftest.err >&5
8171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8172   (exit $ac_status); } &&
8173          { ac_try='test -z "$ac_c_werror_flag"
8174                          || test ! -s conftest.err'
8175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8176   (eval $ac_try) 2>&5
8177   ac_status=$?
8178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8179   (exit $ac_status); }; } &&
8180          { ac_try='test -s conftest$ac_exeext'
8181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8182   (eval $ac_try) 2>&5
8183   ac_status=$?
8184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8185   (exit $ac_status); }; }; then
8186   eval "$as_ac_var=yes"
8187 else
8188   echo "$as_me: failed program was:" >&5
8189 sed 's/^/| /' conftest.$ac_ext >&5
8190
8191 eval "$as_ac_var=no"
8192 fi
8193 rm -f conftest.err conftest.$ac_objext \
8194       conftest$ac_exeext conftest.$ac_ext
8195 fi
8196 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8197 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8198 if test `eval echo '${'$as_ac_var'}'` = yes; then
8199   cat >>confdefs.h <<_ACEOF
8200 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8201 _ACEOF
8202
8203 fi
8204 done
8205
8206 echo "$as_me:$LINENO: checking for working mmap" >&5
8207 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8208 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8209   echo $ECHO_N "(cached) $ECHO_C" >&6
8210 else
8211   if test "$cross_compiling" = yes; then
8212   ac_cv_func_mmap_fixed_mapped=no
8213 else
8214   cat >conftest.$ac_ext <<_ACEOF
8215 /* confdefs.h.  */
8216 _ACEOF
8217 cat confdefs.h >>conftest.$ac_ext
8218 cat >>conftest.$ac_ext <<_ACEOF
8219 /* end confdefs.h.  */
8220 $ac_includes_default
8221 /* malloc might have been renamed as rpl_malloc. */
8222 #undef malloc
8223
8224 /* Thanks to Mike Haertel and Jim Avera for this test.
8225    Here is a matrix of mmap possibilities:
8226         mmap private not fixed
8227         mmap private fixed at somewhere currently unmapped
8228         mmap private fixed at somewhere already mapped
8229         mmap shared not fixed
8230         mmap shared fixed at somewhere currently unmapped
8231         mmap shared fixed at somewhere already mapped
8232    For private mappings, we should verify that changes cannot be read()
8233    back from the file, nor mmap's back from the file at a different
8234    address.  (There have been systems where private was not correctly
8235    implemented like the infamous i386 svr4.0, and systems where the
8236    VM page cache was not coherent with the file system buffer cache
8237    like early versions of FreeBSD and possibly contemporary NetBSD.)
8238    For shared mappings, we should conversely verify that changes get
8239    propagated back to all the places they're supposed to be.
8240
8241    Grep wants private fixed already mapped.
8242    The main things grep needs to know about mmap are:
8243    * does it exist and is it safe to write into the mmap'd area
8244    * how to use it (BSD variants)  */
8245
8246 #include <fcntl.h>
8247 #include <sys/mman.h>
8248
8249 #if !STDC_HEADERS && !HAVE_STDLIB_H
8250 char *malloc ();
8251 #endif
8252
8253 /* This mess was copied from the GNU getpagesize.h.  */
8254 #if !HAVE_GETPAGESIZE
8255 /* Assume that all systems that can run configure have sys/param.h.  */
8256 # if !HAVE_SYS_PARAM_H
8257 #  define HAVE_SYS_PARAM_H 1
8258 # endif
8259
8260 # ifdef _SC_PAGESIZE
8261 #  define getpagesize() sysconf(_SC_PAGESIZE)
8262 # else /* no _SC_PAGESIZE */
8263 #  if HAVE_SYS_PARAM_H
8264 #   include <sys/param.h>
8265 #   ifdef EXEC_PAGESIZE
8266 #    define getpagesize() EXEC_PAGESIZE
8267 #   else /* no EXEC_PAGESIZE */
8268 #    ifdef NBPG
8269 #     define getpagesize() NBPG * CLSIZE
8270 #     ifndef CLSIZE
8271 #      define CLSIZE 1
8272 #     endif /* no CLSIZE */
8273 #    else /* no NBPG */
8274 #     ifdef NBPC
8275 #      define getpagesize() NBPC
8276 #     else /* no NBPC */
8277 #      ifdef PAGESIZE
8278 #       define getpagesize() PAGESIZE
8279 #      endif /* PAGESIZE */
8280 #     endif /* no NBPC */
8281 #    endif /* no NBPG */
8282 #   endif /* no EXEC_PAGESIZE */
8283 #  else /* no HAVE_SYS_PARAM_H */
8284 #   define getpagesize() 8192   /* punt totally */
8285 #  endif /* no HAVE_SYS_PARAM_H */
8286 # endif /* no _SC_PAGESIZE */
8287
8288 #endif /* no HAVE_GETPAGESIZE */
8289
8290 int
8291 main ()
8292 {
8293   char *data, *data2, *data3;
8294   int i, pagesize;
8295   int fd;
8296
8297   pagesize = getpagesize ();
8298
8299   /* First, make a file with some known garbage in it. */
8300   data = (char *) malloc (pagesize);
8301   if (!data)
8302     exit (1);
8303   for (i = 0; i < pagesize; ++i)
8304     *(data + i) = rand ();
8305   umask (0);
8306   fd = creat ("conftest.mmap", 0600);
8307   if (fd < 0)
8308     exit (1);
8309   if (write (fd, data, pagesize) != pagesize)
8310     exit (1);
8311   close (fd);
8312
8313   /* Next, try to mmap the file at a fixed address which already has
8314      something else allocated at it.  If we can, also make sure that
8315      we see the same garbage.  */
8316   fd = open ("conftest.mmap", O_RDWR);
8317   if (fd < 0)
8318     exit (1);
8319   data2 = (char *) malloc (2 * pagesize);
8320   if (!data2)
8321     exit (1);
8322   data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
8323   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8324                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8325     exit (1);
8326   for (i = 0; i < pagesize; ++i)
8327     if (*(data + i) != *(data2 + i))
8328       exit (1);
8329
8330   /* Finally, make sure that changes to the mapped area do not
8331      percolate back to the file as seen by read().  (This is a bug on
8332      some variants of i386 svr4.0.)  */
8333   for (i = 0; i < pagesize; ++i)
8334     *(data2 + i) = *(data2 + i) + 1;
8335   data3 = (char *) malloc (pagesize);
8336   if (!data3)
8337     exit (1);
8338   if (read (fd, data3, pagesize) != pagesize)
8339     exit (1);
8340   for (i = 0; i < pagesize; ++i)
8341     if (*(data + i) != *(data3 + i))
8342       exit (1);
8343   close (fd);
8344   exit (0);
8345 }
8346 _ACEOF
8347 rm -f conftest$ac_exeext
8348 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8349   (eval $ac_link) 2>&5
8350   ac_status=$?
8351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8352   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8354   (eval $ac_try) 2>&5
8355   ac_status=$?
8356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8357   (exit $ac_status); }; }; then
8358   ac_cv_func_mmap_fixed_mapped=yes
8359 else
8360   echo "$as_me: program exited with status $ac_status" >&5
8361 echo "$as_me: failed program was:" >&5
8362 sed 's/^/| /' conftest.$ac_ext >&5
8363
8364 ( exit $ac_status )
8365 ac_cv_func_mmap_fixed_mapped=no
8366 fi
8367 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8368 fi
8369 fi
8370 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8371 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8372 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8373
8374 cat >>confdefs.h <<\_ACEOF
8375 #define HAVE_MMAP 1
8376 _ACEOF
8377
8378 fi
8379 rm -f conftest.mmap
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
8391 unistd.h sys/param.h
8392 do
8393 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8394 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8395   echo "$as_me:$LINENO: checking for $ac_header" >&5
8396 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8397 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8398   echo $ECHO_N "(cached) $ECHO_C" >&6
8399 fi
8400 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8401 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8402 else
8403   # Is the header compilable?
8404 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8405 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8406 cat >conftest.$ac_ext <<_ACEOF
8407 /* confdefs.h.  */
8408 _ACEOF
8409 cat confdefs.h >>conftest.$ac_ext
8410 cat >>conftest.$ac_ext <<_ACEOF
8411 /* end confdefs.h.  */
8412 $ac_includes_default
8413 #include <$ac_header>
8414 _ACEOF
8415 rm -f conftest.$ac_objext
8416 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8417   (eval $ac_compile) 2>conftest.er1
8418   ac_status=$?
8419   grep -v '^ *+' conftest.er1 >conftest.err
8420   rm -f conftest.er1
8421   cat conftest.err >&5
8422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8423   (exit $ac_status); } &&
8424          { ac_try='test -z "$ac_c_werror_flag"
8425                          || test ! -s conftest.err'
8426   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8427   (eval $ac_try) 2>&5
8428   ac_status=$?
8429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8430   (exit $ac_status); }; } &&
8431          { ac_try='test -s conftest.$ac_objext'
8432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8433   (eval $ac_try) 2>&5
8434   ac_status=$?
8435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8436   (exit $ac_status); }; }; then
8437   ac_header_compiler=yes
8438 else
8439   echo "$as_me: failed program was:" >&5
8440 sed 's/^/| /' conftest.$ac_ext >&5
8441
8442 ac_header_compiler=no
8443 fi
8444 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8445 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8446 echo "${ECHO_T}$ac_header_compiler" >&6
8447
8448 # Is the header present?
8449 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8450 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8451 cat >conftest.$ac_ext <<_ACEOF
8452 /* confdefs.h.  */
8453 _ACEOF
8454 cat confdefs.h >>conftest.$ac_ext
8455 cat >>conftest.$ac_ext <<_ACEOF
8456 /* end confdefs.h.  */
8457 #include <$ac_header>
8458 _ACEOF
8459 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8460   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8461   ac_status=$?
8462   grep -v '^ *+' conftest.er1 >conftest.err
8463   rm -f conftest.er1
8464   cat conftest.err >&5
8465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8466   (exit $ac_status); } >/dev/null; then
8467   if test -s conftest.err; then
8468     ac_cpp_err=$ac_c_preproc_warn_flag
8469     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8470   else
8471     ac_cpp_err=
8472   fi
8473 else
8474   ac_cpp_err=yes
8475 fi
8476 if test -z "$ac_cpp_err"; then
8477   ac_header_preproc=yes
8478 else
8479   echo "$as_me: failed program was:" >&5
8480 sed 's/^/| /' conftest.$ac_ext >&5
8481
8482   ac_header_preproc=no
8483 fi
8484 rm -f conftest.err conftest.$ac_ext
8485 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8486 echo "${ECHO_T}$ac_header_preproc" >&6
8487
8488 # So?  What about this header?
8489 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8490   yes:no: )
8491     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8492 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8493     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8494 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8495     ac_header_preproc=yes
8496     ;;
8497   no:yes:* )
8498     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8499 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8500     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8501 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8502     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8503 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8504     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8505 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8506     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8507 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8508     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8509 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8510     (
8511       cat <<\_ASBOX
8512 ## ------------------------------------------ ##
8513 ## Report this to the AC_PACKAGE_NAME lists.  ##
8514 ## ------------------------------------------ ##
8515 _ASBOX
8516     ) |
8517       sed "s/^/$as_me: WARNING:     /" >&2
8518     ;;
8519 esac
8520 echo "$as_me:$LINENO: checking for $ac_header" >&5
8521 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8522 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8523   echo $ECHO_N "(cached) $ECHO_C" >&6
8524 else
8525   eval "$as_ac_Header=\$ac_header_preproc"
8526 fi
8527 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8528 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8529
8530 fi
8531 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8532   cat >>confdefs.h <<_ACEOF
8533 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8534 _ACEOF
8535
8536 fi
8537
8538 done
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
8552 strdup __argz_count __argz_stringify __argz_next
8553 do
8554 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8555 echo "$as_me:$LINENO: checking for $ac_func" >&5
8556 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8557 if eval "test \"\${$as_ac_var+set}\" = set"; then
8558   echo $ECHO_N "(cached) $ECHO_C" >&6
8559 else
8560   cat >conftest.$ac_ext <<_ACEOF
8561 /* confdefs.h.  */
8562 _ACEOF
8563 cat confdefs.h >>conftest.$ac_ext
8564 cat >>conftest.$ac_ext <<_ACEOF
8565 /* end confdefs.h.  */
8566 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8567    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8568 #define $ac_func innocuous_$ac_func
8569
8570 /* System header to define __stub macros and hopefully few prototypes,
8571     which can conflict with char $ac_func (); below.
8572     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8573     <limits.h> exists even on freestanding compilers.  */
8574
8575 #ifdef __STDC__
8576 # include <limits.h>
8577 #else
8578 # include <assert.h>
8579 #endif
8580
8581 #undef $ac_func
8582
8583 /* Override any gcc2 internal prototype to avoid an error.  */
8584 #ifdef __cplusplus
8585 extern "C"
8586 {
8587 #endif
8588 /* We use char because int might match the return type of a gcc2
8589    builtin and then its argument prototype would still apply.  */
8590 char $ac_func ();
8591 /* The GNU C library defines this for functions which it implements
8592     to always fail with ENOSYS.  Some functions are actually named
8593     something starting with __ and the normal name is an alias.  */
8594 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8595 choke me
8596 #else
8597 char (*f) () = $ac_func;
8598 #endif
8599 #ifdef __cplusplus
8600 }
8601 #endif
8602
8603 int
8604 main ()
8605 {
8606 return f != $ac_func;
8607   ;
8608   return 0;
8609 }
8610 _ACEOF
8611 rm -f conftest.$ac_objext conftest$ac_exeext
8612 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8613   (eval $ac_link) 2>conftest.er1
8614   ac_status=$?
8615   grep -v '^ *+' conftest.er1 >conftest.err
8616   rm -f conftest.er1
8617   cat conftest.err >&5
8618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8619   (exit $ac_status); } &&
8620          { ac_try='test -z "$ac_c_werror_flag"
8621                          || test ! -s conftest.err'
8622   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8623   (eval $ac_try) 2>&5
8624   ac_status=$?
8625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8626   (exit $ac_status); }; } &&
8627          { ac_try='test -s conftest$ac_exeext'
8628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8629   (eval $ac_try) 2>&5
8630   ac_status=$?
8631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8632   (exit $ac_status); }; }; then
8633   eval "$as_ac_var=yes"
8634 else
8635   echo "$as_me: failed program was:" >&5
8636 sed 's/^/| /' conftest.$ac_ext >&5
8637
8638 eval "$as_ac_var=no"
8639 fi
8640 rm -f conftest.err conftest.$ac_objext \
8641       conftest$ac_exeext conftest.$ac_ext
8642 fi
8643 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8644 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8645 if test `eval echo '${'$as_ac_var'}'` = yes; then
8646   cat >>confdefs.h <<_ACEOF
8647 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8648 _ACEOF
8649
8650 fi
8651 done
8652
8653
8654    if test $ac_cv_header_locale_h = yes; then
8655     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
8656 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
8657 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
8658   echo $ECHO_N "(cached) $ECHO_C" >&6
8659 else
8660   cat >conftest.$ac_ext <<_ACEOF
8661 /* confdefs.h.  */
8662 _ACEOF
8663 cat confdefs.h >>conftest.$ac_ext
8664 cat >>conftest.$ac_ext <<_ACEOF
8665 /* end confdefs.h.  */
8666 #include <locale.h>
8667 int
8668 main ()
8669 {
8670 return LC_MESSAGES
8671   ;
8672   return 0;
8673 }
8674 _ACEOF
8675 rm -f conftest.$ac_objext conftest$ac_exeext
8676 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8677   (eval $ac_link) 2>conftest.er1
8678   ac_status=$?
8679   grep -v '^ *+' conftest.er1 >conftest.err
8680   rm -f conftest.er1
8681   cat conftest.err >&5
8682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8683   (exit $ac_status); } &&
8684          { ac_try='test -z "$ac_c_werror_flag"
8685                          || test ! -s conftest.err'
8686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8687   (eval $ac_try) 2>&5
8688   ac_status=$?
8689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8690   (exit $ac_status); }; } &&
8691          { ac_try='test -s conftest$ac_exeext'
8692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8693   (eval $ac_try) 2>&5
8694   ac_status=$?
8695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8696   (exit $ac_status); }; }; then
8697   am_cv_val_LC_MESSAGES=yes
8698 else
8699   echo "$as_me: failed program was:" >&5
8700 sed 's/^/| /' conftest.$ac_ext >&5
8701
8702 am_cv_val_LC_MESSAGES=no
8703 fi
8704 rm -f conftest.err conftest.$ac_objext \
8705       conftest$ac_exeext conftest.$ac_ext
8706 fi
8707 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
8708 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
8709     if test $am_cv_val_LC_MESSAGES = yes; then
8710
8711 cat >>confdefs.h <<\_ACEOF
8712 #define HAVE_LC_MESSAGES 1
8713 _ACEOF
8714
8715     fi
8716   fi
8717      USE_NLS=yes
8718
8719
8720         nls_cv_force_use_gnu_gettext="no"
8721
8722     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
8723     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
8724                               nls_cv_header_intl=
8725       nls_cv_header_libgt=
8726       CATOBJEXT=NONE
8727
8728       if test "${ac_cv_header_libintl_h+set}" = set; then
8729   echo "$as_me:$LINENO: checking for libintl.h" >&5
8730 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
8731 if test "${ac_cv_header_libintl_h+set}" = set; then
8732   echo $ECHO_N "(cached) $ECHO_C" >&6
8733 fi
8734 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
8735 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
8736 else
8737   # Is the header compilable?
8738 echo "$as_me:$LINENO: checking libintl.h usability" >&5
8739 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
8740 cat >conftest.$ac_ext <<_ACEOF
8741 /* confdefs.h.  */
8742 _ACEOF
8743 cat confdefs.h >>conftest.$ac_ext
8744 cat >>conftest.$ac_ext <<_ACEOF
8745 /* end confdefs.h.  */
8746 $ac_includes_default
8747 #include <libintl.h>
8748 _ACEOF
8749 rm -f conftest.$ac_objext
8750 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8751   (eval $ac_compile) 2>conftest.er1
8752   ac_status=$?
8753   grep -v '^ *+' conftest.er1 >conftest.err
8754   rm -f conftest.er1
8755   cat conftest.err >&5
8756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8757   (exit $ac_status); } &&
8758          { ac_try='test -z "$ac_c_werror_flag"
8759                          || test ! -s conftest.err'
8760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8761   (eval $ac_try) 2>&5
8762   ac_status=$?
8763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8764   (exit $ac_status); }; } &&
8765          { ac_try='test -s conftest.$ac_objext'
8766   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8767   (eval $ac_try) 2>&5
8768   ac_status=$?
8769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8770   (exit $ac_status); }; }; then
8771   ac_header_compiler=yes
8772 else
8773   echo "$as_me: failed program was:" >&5
8774 sed 's/^/| /' conftest.$ac_ext >&5
8775
8776 ac_header_compiler=no
8777 fi
8778 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8779 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8780 echo "${ECHO_T}$ac_header_compiler" >&6
8781
8782 # Is the header present?
8783 echo "$as_me:$LINENO: checking libintl.h presence" >&5
8784 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
8785 cat >conftest.$ac_ext <<_ACEOF
8786 /* confdefs.h.  */
8787 _ACEOF
8788 cat confdefs.h >>conftest.$ac_ext
8789 cat >>conftest.$ac_ext <<_ACEOF
8790 /* end confdefs.h.  */
8791 #include <libintl.h>
8792 _ACEOF
8793 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8794   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8795   ac_status=$?
8796   grep -v '^ *+' conftest.er1 >conftest.err
8797   rm -f conftest.er1
8798   cat conftest.err >&5
8799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8800   (exit $ac_status); } >/dev/null; then
8801   if test -s conftest.err; then
8802     ac_cpp_err=$ac_c_preproc_warn_flag
8803     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8804   else
8805     ac_cpp_err=
8806   fi
8807 else
8808   ac_cpp_err=yes
8809 fi
8810 if test -z "$ac_cpp_err"; then
8811   ac_header_preproc=yes
8812 else
8813   echo "$as_me: failed program was:" >&5
8814 sed 's/^/| /' conftest.$ac_ext >&5
8815
8816   ac_header_preproc=no
8817 fi
8818 rm -f conftest.err conftest.$ac_ext
8819 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8820 echo "${ECHO_T}$ac_header_preproc" >&6
8821
8822 # So?  What about this header?
8823 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8824   yes:no: )
8825     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
8826 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8827     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
8828 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
8829     ac_header_preproc=yes
8830     ;;
8831   no:yes:* )
8832     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
8833 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
8834     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
8835 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
8836     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
8837 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
8838     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
8839 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
8840     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
8841 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
8842     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
8843 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
8844     (
8845       cat <<\_ASBOX
8846 ## ------------------------------------------ ##
8847 ## Report this to the AC_PACKAGE_NAME lists.  ##
8848 ## ------------------------------------------ ##
8849 _ASBOX
8850     ) |
8851       sed "s/^/$as_me: WARNING:     /" >&2
8852     ;;
8853 esac
8854 echo "$as_me:$LINENO: checking for libintl.h" >&5
8855 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
8856 if test "${ac_cv_header_libintl_h+set}" = set; then
8857   echo $ECHO_N "(cached) $ECHO_C" >&6
8858 else
8859   ac_cv_header_libintl_h=$ac_header_preproc
8860 fi
8861 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
8862 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
8863
8864 fi
8865 if test $ac_cv_header_libintl_h = yes; then
8866   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
8867 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
8868 if test "${gt_cv_func_dgettext_libc+set}" = set; then
8869   echo $ECHO_N "(cached) $ECHO_C" >&6
8870 else
8871   cat >conftest.$ac_ext <<_ACEOF
8872 /* confdefs.h.  */
8873 _ACEOF
8874 cat confdefs.h >>conftest.$ac_ext
8875 cat >>conftest.$ac_ext <<_ACEOF
8876 /* end confdefs.h.  */
8877 #include <libintl.h>
8878 int
8879 main ()
8880 {
8881 return (int) dgettext ("","")
8882   ;
8883   return 0;
8884 }
8885 _ACEOF
8886 rm -f conftest.$ac_objext conftest$ac_exeext
8887 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8888   (eval $ac_link) 2>conftest.er1
8889   ac_status=$?
8890   grep -v '^ *+' conftest.er1 >conftest.err
8891   rm -f conftest.er1
8892   cat conftest.err >&5
8893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8894   (exit $ac_status); } &&
8895          { ac_try='test -z "$ac_c_werror_flag"
8896                          || test ! -s conftest.err'
8897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8898   (eval $ac_try) 2>&5
8899   ac_status=$?
8900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8901   (exit $ac_status); }; } &&
8902          { ac_try='test -s conftest$ac_exeext'
8903   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8904   (eval $ac_try) 2>&5
8905   ac_status=$?
8906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8907   (exit $ac_status); }; }; then
8908   gt_cv_func_dgettext_libc=yes
8909 else
8910   echo "$as_me: failed program was:" >&5
8911 sed 's/^/| /' conftest.$ac_ext >&5
8912
8913 gt_cv_func_dgettext_libc=no
8914 fi
8915 rm -f conftest.err conftest.$ac_objext \
8916       conftest$ac_exeext conftest.$ac_ext
8917 fi
8918 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
8919 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
8920
8921           if test "$gt_cv_func_dgettext_libc" != "yes"; then
8922             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
8923 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
8924 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
8925   echo $ECHO_N "(cached) $ECHO_C" >&6
8926 else
8927   ac_check_lib_save_LIBS=$LIBS
8928 LIBS="-lintl  $LIBS"
8929 cat >conftest.$ac_ext <<_ACEOF
8930 /* confdefs.h.  */
8931 _ACEOF
8932 cat confdefs.h >>conftest.$ac_ext
8933 cat >>conftest.$ac_ext <<_ACEOF
8934 /* end confdefs.h.  */
8935
8936 /* Override any gcc2 internal prototype to avoid an error.  */
8937 #ifdef __cplusplus
8938 extern "C"
8939 #endif
8940 /* We use char because int might match the return type of a gcc2
8941    builtin and then its argument prototype would still apply.  */
8942 char bindtextdomain ();
8943 int
8944 main ()
8945 {
8946 bindtextdomain ();
8947   ;
8948   return 0;
8949 }
8950 _ACEOF
8951 rm -f conftest.$ac_objext conftest$ac_exeext
8952 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8953   (eval $ac_link) 2>conftest.er1
8954   ac_status=$?
8955   grep -v '^ *+' conftest.er1 >conftest.err
8956   rm -f conftest.er1
8957   cat conftest.err >&5
8958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8959   (exit $ac_status); } &&
8960          { ac_try='test -z "$ac_c_werror_flag"
8961                          || test ! -s conftest.err'
8962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8963   (eval $ac_try) 2>&5
8964   ac_status=$?
8965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8966   (exit $ac_status); }; } &&
8967          { ac_try='test -s conftest$ac_exeext'
8968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8969   (eval $ac_try) 2>&5
8970   ac_status=$?
8971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8972   (exit $ac_status); }; }; then
8973   ac_cv_lib_intl_bindtextdomain=yes
8974 else
8975   echo "$as_me: failed program was:" >&5
8976 sed 's/^/| /' conftest.$ac_ext >&5
8977
8978 ac_cv_lib_intl_bindtextdomain=no
8979 fi
8980 rm -f conftest.err conftest.$ac_objext \
8981       conftest$ac_exeext conftest.$ac_ext
8982 LIBS=$ac_check_lib_save_LIBS
8983 fi
8984 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
8985 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
8986 if test $ac_cv_lib_intl_bindtextdomain = yes; then
8987   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
8988 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
8989 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
8990   echo $ECHO_N "(cached) $ECHO_C" >&6
8991 else
8992   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
8993 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
8994 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
8995   echo $ECHO_N "(cached) $ECHO_C" >&6
8996 else
8997   ac_check_lib_save_LIBS=$LIBS
8998 LIBS="-lintl  $LIBS"
8999 cat >conftest.$ac_ext <<_ACEOF
9000 /* confdefs.h.  */
9001 _ACEOF
9002 cat confdefs.h >>conftest.$ac_ext
9003 cat >>conftest.$ac_ext <<_ACEOF
9004 /* end confdefs.h.  */
9005
9006 /* Override any gcc2 internal prototype to avoid an error.  */
9007 #ifdef __cplusplus
9008 extern "C"
9009 #endif
9010 /* We use char because int might match the return type of a gcc2
9011    builtin and then its argument prototype would still apply.  */
9012 char dgettext ();
9013 int
9014 main ()
9015 {
9016 dgettext ();
9017   ;
9018   return 0;
9019 }
9020 _ACEOF
9021 rm -f conftest.$ac_objext conftest$ac_exeext
9022 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9023   (eval $ac_link) 2>conftest.er1
9024   ac_status=$?
9025   grep -v '^ *+' conftest.er1 >conftest.err
9026   rm -f conftest.er1
9027   cat conftest.err >&5
9028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9029   (exit $ac_status); } &&
9030          { ac_try='test -z "$ac_c_werror_flag"
9031                          || test ! -s conftest.err'
9032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9033   (eval $ac_try) 2>&5
9034   ac_status=$?
9035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9036   (exit $ac_status); }; } &&
9037          { ac_try='test -s conftest$ac_exeext'
9038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9039   (eval $ac_try) 2>&5
9040   ac_status=$?
9041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9042   (exit $ac_status); }; }; then
9043   ac_cv_lib_intl_dgettext=yes
9044 else
9045   echo "$as_me: failed program was:" >&5
9046 sed 's/^/| /' conftest.$ac_ext >&5
9047
9048 ac_cv_lib_intl_dgettext=no
9049 fi
9050 rm -f conftest.err conftest.$ac_objext \
9051       conftest$ac_exeext conftest.$ac_ext
9052 LIBS=$ac_check_lib_save_LIBS
9053 fi
9054 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
9055 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
9056 if test $ac_cv_lib_intl_dgettext = yes; then
9057   gt_cv_func_dgettext_libintl=yes
9058 else
9059   gt_cv_func_dgettext_libintl=no
9060 fi
9061
9062 fi
9063 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
9064 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
9065 fi
9066
9067           fi
9068
9069           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
9070             LIBS="$LIBS -lintl";
9071           fi
9072
9073           if test "$gt_cv_func_dgettext_libc" = "yes" \
9074             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
9075
9076 cat >>confdefs.h <<\_ACEOF
9077 #define HAVE_GETTEXT 1
9078 _ACEOF
9079
9080             # Extract the first word of "msgfmt", so it can be a program name with args.
9081 set dummy msgfmt; ac_word=$2
9082 echo "$as_me:$LINENO: checking for $ac_word" >&5
9083 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9084 if test "${ac_cv_path_MSGFMT+set}" = set; then
9085   echo $ECHO_N "(cached) $ECHO_C" >&6
9086 else
9087   case "$MSGFMT" in
9088   /*)
9089   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
9090   ;;
9091   *)
9092   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9093   for ac_dir in $PATH; do
9094     test -z "$ac_dir" && ac_dir=.
9095     if test -f $ac_dir/$ac_word; then
9096       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
9097         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
9098         break
9099       fi
9100     fi
9101   done
9102   IFS="$ac_save_ifs"
9103   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
9104   ;;
9105 esac
9106 fi
9107 MSGFMT="$ac_cv_path_MSGFMT"
9108 if test -n "$MSGFMT"; then
9109   echo "$as_me:$LINENO: result: $MSGFMT" >&5
9110 echo "${ECHO_T}$MSGFMT" >&6
9111 else
9112   echo "$as_me:$LINENO: result: no" >&5
9113 echo "${ECHO_T}no" >&6
9114 fi
9115             if test "$MSGFMT" != "no"; then
9116
9117 for ac_func in dcgettext
9118 do
9119 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9120 echo "$as_me:$LINENO: checking for $ac_func" >&5
9121 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9122 if eval "test \"\${$as_ac_var+set}\" = set"; then
9123   echo $ECHO_N "(cached) $ECHO_C" >&6
9124 else
9125   cat >conftest.$ac_ext <<_ACEOF
9126 /* confdefs.h.  */
9127 _ACEOF
9128 cat confdefs.h >>conftest.$ac_ext
9129 cat >>conftest.$ac_ext <<_ACEOF
9130 /* end confdefs.h.  */
9131 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9132    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9133 #define $ac_func innocuous_$ac_func
9134
9135 /* System header to define __stub macros and hopefully few prototypes,
9136     which can conflict with char $ac_func (); below.
9137     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9138     <limits.h> exists even on freestanding compilers.  */
9139
9140 #ifdef __STDC__
9141 # include <limits.h>
9142 #else
9143 # include <assert.h>
9144 #endif
9145
9146 #undef $ac_func
9147
9148 /* Override any gcc2 internal prototype to avoid an error.  */
9149 #ifdef __cplusplus
9150 extern "C"
9151 {
9152 #endif
9153 /* We use char because int might match the return type of a gcc2
9154    builtin and then its argument prototype would still apply.  */
9155 char $ac_func ();
9156 /* The GNU C library defines this for functions which it implements
9157     to always fail with ENOSYS.  Some functions are actually named
9158     something starting with __ and the normal name is an alias.  */
9159 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9160 choke me
9161 #else
9162 char (*f) () = $ac_func;
9163 #endif
9164 #ifdef __cplusplus
9165 }
9166 #endif
9167
9168 int
9169 main ()
9170 {
9171 return f != $ac_func;
9172   ;
9173   return 0;
9174 }
9175 _ACEOF
9176 rm -f conftest.$ac_objext conftest$ac_exeext
9177 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9178   (eval $ac_link) 2>conftest.er1
9179   ac_status=$?
9180   grep -v '^ *+' conftest.er1 >conftest.err
9181   rm -f conftest.er1
9182   cat conftest.err >&5
9183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9184   (exit $ac_status); } &&
9185          { ac_try='test -z "$ac_c_werror_flag"
9186                          || test ! -s conftest.err'
9187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9188   (eval $ac_try) 2>&5
9189   ac_status=$?
9190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9191   (exit $ac_status); }; } &&
9192          { ac_try='test -s conftest$ac_exeext'
9193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9194   (eval $ac_try) 2>&5
9195   ac_status=$?
9196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9197   (exit $ac_status); }; }; then
9198   eval "$as_ac_var=yes"
9199 else
9200   echo "$as_me: failed program was:" >&5
9201 sed 's/^/| /' conftest.$ac_ext >&5
9202
9203 eval "$as_ac_var=no"
9204 fi
9205 rm -f conftest.err conftest.$ac_objext \
9206       conftest$ac_exeext conftest.$ac_ext
9207 fi
9208 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9209 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9210 if test `eval echo '${'$as_ac_var'}'` = yes; then
9211   cat >>confdefs.h <<_ACEOF
9212 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9213 _ACEOF
9214
9215 fi
9216 done
9217
9218               # Extract the first word of "gmsgfmt", so it can be a program name with args.
9219 set dummy gmsgfmt; ac_word=$2
9220 echo "$as_me:$LINENO: checking for $ac_word" >&5
9221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9222 if test "${ac_cv_path_GMSGFMT+set}" = set; then
9223   echo $ECHO_N "(cached) $ECHO_C" >&6
9224 else
9225   case $GMSGFMT in
9226   [\\/]* | ?:[\\/]*)
9227   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
9228   ;;
9229   *)
9230   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9231 for as_dir in $PATH
9232 do
9233   IFS=$as_save_IFS
9234   test -z "$as_dir" && as_dir=.
9235   for ac_exec_ext in '' $ac_executable_extensions; do
9236   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9237     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
9238     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9239     break 2
9240   fi
9241 done
9242 done
9243
9244   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
9245   ;;
9246 esac
9247 fi
9248 GMSGFMT=$ac_cv_path_GMSGFMT
9249
9250 if test -n "$GMSGFMT"; then
9251   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
9252 echo "${ECHO_T}$GMSGFMT" >&6
9253 else
9254   echo "$as_me:$LINENO: result: no" >&5
9255 echo "${ECHO_T}no" >&6
9256 fi
9257
9258               # Extract the first word of "xgettext", so it can be a program name with args.
9259 set dummy xgettext; ac_word=$2
9260 echo "$as_me:$LINENO: checking for $ac_word" >&5
9261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9262 if test "${ac_cv_path_XGETTEXT+set}" = set; then
9263   echo $ECHO_N "(cached) $ECHO_C" >&6
9264 else
9265   case "$XGETTEXT" in
9266   /*)
9267   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
9268   ;;
9269   *)
9270   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9271   for ac_dir in $PATH; do
9272     test -z "$ac_dir" && ac_dir=.
9273     if test -f $ac_dir/$ac_word; then
9274       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
9275         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
9276         break
9277       fi
9278     fi
9279   done
9280   IFS="$ac_save_ifs"
9281   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
9282   ;;
9283 esac
9284 fi
9285 XGETTEXT="$ac_cv_path_XGETTEXT"
9286 if test -n "$XGETTEXT"; then
9287   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
9288 echo "${ECHO_T}$XGETTEXT" >&6
9289 else
9290   echo "$as_me:$LINENO: result: no" >&5
9291 echo "${ECHO_T}no" >&6
9292 fi
9293
9294               cat >conftest.$ac_ext <<_ACEOF
9295 /* confdefs.h.  */
9296 _ACEOF
9297 cat confdefs.h >>conftest.$ac_ext
9298 cat >>conftest.$ac_ext <<_ACEOF
9299 /* end confdefs.h.  */
9300
9301 int
9302 main ()
9303 {
9304 extern int _nl_msg_cat_cntr;
9305                              return _nl_msg_cat_cntr
9306   ;
9307   return 0;
9308 }
9309 _ACEOF
9310 rm -f conftest.$ac_objext conftest$ac_exeext
9311 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9312   (eval $ac_link) 2>conftest.er1
9313   ac_status=$?
9314   grep -v '^ *+' conftest.er1 >conftest.err
9315   rm -f conftest.er1
9316   cat conftest.err >&5
9317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9318   (exit $ac_status); } &&
9319          { ac_try='test -z "$ac_c_werror_flag"
9320                          || test ! -s conftest.err'
9321   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9322   (eval $ac_try) 2>&5
9323   ac_status=$?
9324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9325   (exit $ac_status); }; } &&
9326          { ac_try='test -s conftest$ac_exeext'
9327   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9328   (eval $ac_try) 2>&5
9329   ac_status=$?
9330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9331   (exit $ac_status); }; }; then
9332   CATOBJEXT=.gmo
9333                  DATADIRNAME=share
9334 else
9335   echo "$as_me: failed program was:" >&5
9336 sed 's/^/| /' conftest.$ac_ext >&5
9337
9338 CATOBJEXT=.mo
9339                  DATADIRNAME=lib
9340 fi
9341 rm -f conftest.err conftest.$ac_objext \
9342       conftest$ac_exeext conftest.$ac_ext
9343               INSTOBJEXT=.mo
9344             fi
9345           fi
9346
9347           # Added by Martin Baulig 12/15/98 for libc5 systems
9348           if test "$gt_cv_func_dgettext_libc" != "yes" \
9349             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
9350             INTLLIBS=-lintl
9351             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
9352           fi
9353
9354 fi
9355
9356
9357
9358       if test "$CATOBJEXT" = "NONE"; then
9359                         nls_cv_use_gnu_gettext=yes
9360       fi
9361     fi
9362
9363     if test "$nls_cv_use_gnu_gettext" != "yes"; then
9364
9365 cat >>confdefs.h <<\_ACEOF
9366 #define ENABLE_NLS 1
9367 _ACEOF
9368
9369     else
9370             CATOBJEXT=
9371     fi
9372
9373         if test "$XGETTEXT" != ":"; then
9374                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9375         : ;
9376       else
9377         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
9378 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
9379         XGETTEXT=":"
9380       fi
9381     fi
9382
9383     # We need to process the po/ directory.
9384     POSUB=po
9385
9386               ac_config_commands="$ac_config_commands default-2"
9387
9388
9389                 for lang in $ALL_LINGUAS; do
9390       GMOFILES="$GMOFILES $lang.gmo"
9391       POFILES="$POFILES $lang.po"
9392     done
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406    if test "x$CATOBJEXT" != "x"; then
9407      if test "x$ALL_LINGUAS" = "x"; then
9408        LINGUAS=
9409      else
9410        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9411 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
9412        NEW_LINGUAS=
9413        for lang in ${LINGUAS=$ALL_LINGUAS}; do
9414          case "$ALL_LINGUAS" in
9415           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
9416          esac
9417        done
9418        LINGUAS=$NEW_LINGUAS
9419        echo "$as_me:$LINENO: result: $LINGUAS" >&5
9420 echo "${ECHO_T}$LINGUAS" >&6
9421      fi
9422
9423           if test -n "$LINGUAS"; then
9424        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9425      fi
9426    fi
9427
9428             test -d po || mkdir po
9429    if test "$CATOBJEXT" = ".cat"; then
9430      if test "${ac_cv_header_linux_version_h+set}" = set; then
9431   echo "$as_me:$LINENO: checking for linux/version.h" >&5
9432 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
9433 if test "${ac_cv_header_linux_version_h+set}" = set; then
9434   echo $ECHO_N "(cached) $ECHO_C" >&6
9435 fi
9436 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9437 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
9438 else
9439   # Is the header compilable?
9440 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
9441 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
9442 cat >conftest.$ac_ext <<_ACEOF
9443 /* confdefs.h.  */
9444 _ACEOF
9445 cat confdefs.h >>conftest.$ac_ext
9446 cat >>conftest.$ac_ext <<_ACEOF
9447 /* end confdefs.h.  */
9448 $ac_includes_default
9449 #include <linux/version.h>
9450 _ACEOF
9451 rm -f conftest.$ac_objext
9452 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9453   (eval $ac_compile) 2>conftest.er1
9454   ac_status=$?
9455   grep -v '^ *+' conftest.er1 >conftest.err
9456   rm -f conftest.er1
9457   cat conftest.err >&5
9458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9459   (exit $ac_status); } &&
9460          { ac_try='test -z "$ac_c_werror_flag"
9461                          || test ! -s conftest.err'
9462   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9463   (eval $ac_try) 2>&5
9464   ac_status=$?
9465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9466   (exit $ac_status); }; } &&
9467          { ac_try='test -s conftest.$ac_objext'
9468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9469   (eval $ac_try) 2>&5
9470   ac_status=$?
9471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9472   (exit $ac_status); }; }; then
9473   ac_header_compiler=yes
9474 else
9475   echo "$as_me: failed program was:" >&5
9476 sed 's/^/| /' conftest.$ac_ext >&5
9477
9478 ac_header_compiler=no
9479 fi
9480 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9481 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9482 echo "${ECHO_T}$ac_header_compiler" >&6
9483
9484 # Is the header present?
9485 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
9486 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
9487 cat >conftest.$ac_ext <<_ACEOF
9488 /* confdefs.h.  */
9489 _ACEOF
9490 cat confdefs.h >>conftest.$ac_ext
9491 cat >>conftest.$ac_ext <<_ACEOF
9492 /* end confdefs.h.  */
9493 #include <linux/version.h>
9494 _ACEOF
9495 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9496   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9497   ac_status=$?
9498   grep -v '^ *+' conftest.er1 >conftest.err
9499   rm -f conftest.er1
9500   cat conftest.err >&5
9501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9502   (exit $ac_status); } >/dev/null; then
9503   if test -s conftest.err; then
9504     ac_cpp_err=$ac_c_preproc_warn_flag
9505     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9506   else
9507     ac_cpp_err=
9508   fi
9509 else
9510   ac_cpp_err=yes
9511 fi
9512 if test -z "$ac_cpp_err"; then
9513   ac_header_preproc=yes
9514 else
9515   echo "$as_me: failed program was:" >&5
9516 sed 's/^/| /' conftest.$ac_ext >&5
9517
9518   ac_header_preproc=no
9519 fi
9520 rm -f conftest.err conftest.$ac_ext
9521 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9522 echo "${ECHO_T}$ac_header_preproc" >&6
9523
9524 # So?  What about this header?
9525 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9526   yes:no: )
9527     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
9528 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9529     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
9530 echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
9531     ac_header_preproc=yes
9532     ;;
9533   no:yes:* )
9534     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
9535 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
9536     { echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
9537 echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
9538     { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
9539 echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
9540     { echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
9541 echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9542     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
9543 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
9544     { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
9545 echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
9546     (
9547       cat <<\_ASBOX
9548 ## ------------------------------------------ ##
9549 ## Report this to the AC_PACKAGE_NAME lists.  ##
9550 ## ------------------------------------------ ##
9551 _ASBOX
9552     ) |
9553       sed "s/^/$as_me: WARNING:     /" >&2
9554     ;;
9555 esac
9556 echo "$as_me:$LINENO: checking for linux/version.h" >&5
9557 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
9558 if test "${ac_cv_header_linux_version_h+set}" = set; then
9559   echo $ECHO_N "(cached) $ECHO_C" >&6
9560 else
9561   ac_cv_header_linux_version_h=$ac_header_preproc
9562 fi
9563 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9564 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
9565
9566 fi
9567 if test $ac_cv_header_linux_version_h = yes; then
9568   msgformat=linux
9569 else
9570   msgformat=xopen
9571 fi
9572
9573
9574
9575                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
9576    fi
9577
9578             MKINSTALLDIRS=
9579 #
9580 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
9581 #
9582 #   if test -n "$ac_aux_dir"; then
9583 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
9584 #   fi
9585    if test -z "$MKINSTALLDIRS"; then
9586      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
9587    fi
9588
9589    # jwz: you know what, screw it.  Let's just use the version that I
9590    # already computed in configure.in, instead of this version that came
9591    # with the i18n crud, ok?
9592    MKINSTALLDIRS="$INSTALL_DIRS"
9593
9594
9595
9596
9597          test -d po || mkdir po
9598    if test "x$srcdir" != "x."; then
9599      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
9600        posrcprefix="$srcdir/"
9601      else
9602        posrcprefix="../$srcdir/"
9603      fi
9604    else
9605      posrcprefix="../"
9606    fi
9607    rm -f po/POTFILES
9608    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
9609         < $srcdir/po/POTFILES.in > po/POTFILES
9610
9611 MKINSTALLDIRS="$INSTALL_DIRS"
9612
9613
9614 ###############################################################################
9615 #
9616 #       Check for -lXmu (some fucked up vendors don't ship it...)
9617 #
9618 ###############################################################################
9619
9620 have_xmu=no
9621
9622   ac_save_CPPFLAGS="$CPPFLAGS"
9623   if test \! -z "$includedir" ; then
9624     CPPFLAGS="$CPPFLAGS -I$includedir"
9625   fi
9626   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9627   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
9628 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
9629 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
9630   echo $ECHO_N "(cached) $ECHO_C" >&6
9631 else
9632   cat >conftest.$ac_ext <<_ACEOF
9633 /* confdefs.h.  */
9634 _ACEOF
9635 cat confdefs.h >>conftest.$ac_ext
9636 cat >>conftest.$ac_ext <<_ACEOF
9637 /* end confdefs.h.  */
9638 #include <stdlib.h>
9639                    #include <stdio.h>
9640                    #include <X11/Intrinsic.h>
9641
9642 #include <X11/Xmu/Error.h>
9643 _ACEOF
9644 rm -f conftest.$ac_objext
9645 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9646   (eval $ac_compile) 2>conftest.er1
9647   ac_status=$?
9648   grep -v '^ *+' conftest.er1 >conftest.err
9649   rm -f conftest.er1
9650   cat conftest.err >&5
9651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9652   (exit $ac_status); } &&
9653          { ac_try='test -z "$ac_c_werror_flag"
9654                          || test ! -s conftest.err'
9655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9656   (eval $ac_try) 2>&5
9657   ac_status=$?
9658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9659   (exit $ac_status); }; } &&
9660          { ac_try='test -s conftest.$ac_objext'
9661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9662   (eval $ac_try) 2>&5
9663   ac_status=$?
9664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9665   (exit $ac_status); }; }; then
9666   ac_cv_header_X11_Xmu_Error_h=yes
9667 else
9668   echo "$as_me: failed program was:" >&5
9669 sed 's/^/| /' conftest.$ac_ext >&5
9670
9671 ac_cv_header_X11_Xmu_Error_h=no
9672 fi
9673 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9674 fi
9675 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
9676 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
9677 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
9678   have_xmu=yes
9679 fi
9680
9681
9682   CPPFLAGS="$ac_save_CPPFLAGS"
9683 if test "$have_xmu" = no ; then
9684   XMU_SRCS='$(UTILS_SRC)/xmu.c'
9685   XMU_OBJS='$(UTILS_BIN)/xmu.o'
9686   XMU_LIBS=''
9687 else
9688   XMU_SRCS=''
9689   XMU_OBJS=''
9690   XMU_LIBS='-lXmu'
9691   cat >>confdefs.h <<\_ACEOF
9692 #define HAVE_XMU 1
9693 _ACEOF
9694
9695 fi
9696
9697
9698 ###############################################################################
9699 #
9700 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
9701 #       See comp.windows.x FAQ question 124.  The right fix is to
9702 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
9703 #
9704 ###############################################################################
9705
9706 if test "$have_xmu" = yes ; then
9707   case "$host" in
9708     *-sunos4*)
9709     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
9710 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
9711 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
9712   echo $ECHO_N "(cached) $ECHO_C" >&6
9713 else
9714   ac_save_LDFLAGS="$LDFLAGS"
9715                     if test \! -z "$x_libraries" ; then
9716                       LDFLAGS="$LDFLAGS -L$x_libraries"
9717                     fi
9718                     # Note: this trick never works!  (Generally.)
9719                     # We're only getting away with using AC_TRY_LINK
9720                     # with X libraries because we know it's SunOS.
9721                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
9722                     cat >conftest.$ac_ext <<_ACEOF
9723 /* confdefs.h.  */
9724 _ACEOF
9725 cat confdefs.h >>conftest.$ac_ext
9726 cat >>conftest.$ac_ext <<_ACEOF
9727 /* end confdefs.h.  */
9728
9729 int
9730 main ()
9731 {
9732
9733   ;
9734   return 0;
9735 }
9736 _ACEOF
9737 rm -f conftest.$ac_objext conftest$ac_exeext
9738 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9739   (eval $ac_link) 2>conftest.er1
9740   ac_status=$?
9741   grep -v '^ *+' conftest.er1 >conftest.err
9742   rm -f conftest.er1
9743   cat conftest.err >&5
9744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9745   (exit $ac_status); } &&
9746          { ac_try='test -z "$ac_c_werror_flag"
9747                          || test ! -s conftest.err'
9748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9749   (eval $ac_try) 2>&5
9750   ac_status=$?
9751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9752   (exit $ac_status); }; } &&
9753          { ac_try='test -s conftest$ac_exeext'
9754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9755   (eval $ac_try) 2>&5
9756   ac_status=$?
9757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9758   (exit $ac_status); }; }; then
9759   ac_cv_sunos_xmu_bug=no
9760 else
9761   echo "$as_me: failed program was:" >&5
9762 sed 's/^/| /' conftest.$ac_ext >&5
9763
9764 ac_cv_sunos_xmu_bug=yes
9765 fi
9766 rm -f conftest.err conftest.$ac_objext \
9767       conftest$ac_exeext conftest.$ac_ext
9768                     LDFLAGS="$ac_save_LDFLAGS"
9769 fi
9770 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
9771 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
9772     if test "$ac_cv_sunos_xmu_bug" = yes ; then
9773       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
9774 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
9775 if test "${ac_cv_ld_static+set}" = set; then
9776   echo $ECHO_N "(cached) $ECHO_C" >&6
9777 else
9778   ac_save_LDFLAGS="$LDFLAGS"
9779                       LDFLAGS="$LDFLAGS -static"
9780                       cat >conftest.$ac_ext <<_ACEOF
9781 /* confdefs.h.  */
9782 _ACEOF
9783 cat confdefs.h >>conftest.$ac_ext
9784 cat >>conftest.$ac_ext <<_ACEOF
9785 /* end confdefs.h.  */
9786
9787 int
9788 main ()
9789 {
9790
9791   ;
9792   return 0;
9793 }
9794 _ACEOF
9795 rm -f conftest.$ac_objext conftest$ac_exeext
9796 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9797   (eval $ac_link) 2>conftest.er1
9798   ac_status=$?
9799   grep -v '^ *+' conftest.er1 >conftest.err
9800   rm -f conftest.er1
9801   cat conftest.err >&5
9802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9803   (exit $ac_status); } &&
9804          { ac_try='test -z "$ac_c_werror_flag"
9805                          || test ! -s conftest.err'
9806   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9807   (eval $ac_try) 2>&5
9808   ac_status=$?
9809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9810   (exit $ac_status); }; } &&
9811          { ac_try='test -s conftest$ac_exeext'
9812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9813   (eval $ac_try) 2>&5
9814   ac_status=$?
9815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9816   (exit $ac_status); }; }; then
9817   ac_cv_ld_static=yes
9818 else
9819   echo "$as_me: failed program was:" >&5
9820 sed 's/^/| /' conftest.$ac_ext >&5
9821
9822 ac_cv_ld_static=no
9823 fi
9824 rm -f conftest.err conftest.$ac_objext \
9825       conftest$ac_exeext conftest.$ac_ext
9826                     LDFLAGS="$ac_save_LDFLAGS"
9827 fi
9828 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
9829 echo "${ECHO_T}$ac_cv_ld_static" >&6
9830       if test "$ac_cv_ld_static" = yes ; then
9831         LDFLAGS="$LDFLAGS -static"
9832       else
9833         LDFLAGS="$LDFLAGS -Bstatic"
9834       fi
9835     fi
9836     ;;
9837   esac
9838 fi
9839
9840
9841 ###############################################################################
9842 #
9843 #       Handle the --with-hackdir option
9844 #
9845 ###############################################################################
9846
9847 have_hackdir=yes
9848 with_hackdir_req=unspecified
9849
9850 # Check whether --with-hackdir or --without-hackdir was given.
9851 if test "${with_hackdir+set}" = set; then
9852   withval="$with_hackdir"
9853   with_hackdir="$withval"; with_hackdir_req="$withval"
9854 else
9855   with_hackdir=yes
9856 fi;
9857
9858 if test x"$with_hackdir" = xyes; then
9859   HACKDIR='${libexecdir}/xscreensaver'
9860 elif test x"$with_hackdir" = xno; then
9861   HACKDIR='${bindir}'
9862 else
9863   HACKDIR=$with_hackdir
9864 fi
9865
9866 # canonicalize slashes.
9867 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
9868
9869 # Expand HACKDIR as HACKDIR_FULL
9870 eval HACKDIR_FULL=${HACKDIR}
9871 eval HACKDIR_FULL=${HACKDIR_FULL}
9872 eval HACKDIR_FULL=${HACKDIR_FULL}
9873
9874 # This option used to be called --enable-subdir; make sure that is no longer
9875 # used, since configure brain-damagedly ignores unknown --enable options.
9876
9877 obsolete_enable=
9878 # Check whether --enable-subdir or --disable-subdir was given.
9879 if test "${enable_subdir+set}" = set; then
9880   enableval="$enable_subdir"
9881   obsolete_enable=yes
9882 fi;
9883 if test -n "$obsolete_enable"; then
9884   echo "error: the --enable-subdir option has been replaced with"
9885   echo "       the new --with-hackdir option; see \`configure --help'"
9886   echo "       for more information."
9887   exit 1
9888 fi
9889
9890
9891 ###############################################################################
9892 #
9893 #       Handle the --with-configdir option
9894 #       Help for --with-x-app-defaults option added..
9895 #
9896 ###############################################################################
9897
9898 have_configdir=yes
9899 with_configdir_req=unspecified
9900
9901 # Check whether --with-configdir or --without-configdir was given.
9902 if test "${with_configdir+set}" = set; then
9903   withval="$with_configdir"
9904   with_configdir="$withval"; with_configdir_req="$withval"
9905 else
9906   with_configdir=yes
9907 fi;
9908
9909 if test x"$with_configdir" = xyes; then
9910   HACK_CONF_DIR='${datadir}/xscreensaver/config'
9911 elif test x"$with_configdir" = xno; then
9912   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
9913   exit 1
9914 else
9915   # there must be a better way than this...
9916   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
9917     # absolute path
9918     HACK_CONF_DIR=$with_configdir
9919   else
9920     # relative path
9921     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
9922   fi
9923 fi
9924
9925
9926
9927
9928 ###############################################################################
9929 #
9930 #       Check for the SGI SCREEN_SAVER server extension.
9931 #
9932 ###############################################################################
9933
9934 have_sgi=no
9935 with_sgi_req=unspecified
9936
9937 # Check whether --with-sgi-ext or --without-sgi-ext was given.
9938 if test "${with_sgi_ext+set}" = set; then
9939   withval="$with_sgi_ext"
9940   with_sgi="$withval"; with_sgi_req="$withval"
9941 else
9942   with_sgi=yes
9943 fi;
9944
9945
9946    case "$with_sgi" in
9947     yes) ;;
9948     no)  ;;
9949
9950     /*)
9951      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
9952 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
9953      d=$with_sgi/include
9954      if test -d $d; then
9955        X_CFLAGS="-I$d $X_CFLAGS"
9956        echo "$as_me:$LINENO: result: $d" >&5
9957 echo "${ECHO_T}$d" >&6
9958      else
9959        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9960 echo "${ECHO_T}not found ($d: no such directory)" >&6
9961      fi
9962
9963      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
9964 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
9965      d=$with_sgi/lib
9966      if test -d $d; then
9967        X_LIBS="-L$d $X_LIBS"
9968        echo "$as_me:$LINENO: result: $d" >&5
9969 echo "${ECHO_T}$d" >&6
9970      else
9971        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9972 echo "${ECHO_T}not found ($d: no such directory)" >&6
9973      fi
9974
9975      # replace the directory string with "yes".
9976      with_sgi_req="yes"
9977      with_sgi=$with_sgi_req
9978      ;;
9979
9980     *)
9981      echo ""
9982      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
9983      echo "       If it is a directory, then \`DIR/include' will be added to"
9984      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9985      exit 1
9986      ;;
9987    esac
9988
9989
9990 if test "$with_sgi" = yes; then
9991
9992   ac_save_CPPFLAGS="$CPPFLAGS"
9993   if test \! -z "$includedir" ; then
9994     CPPFLAGS="$CPPFLAGS -I$includedir"
9995   fi
9996   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9997   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
9998 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
9999 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
10000   echo $ECHO_N "(cached) $ECHO_C" >&6
10001 else
10002   cat >conftest.$ac_ext <<_ACEOF
10003 /* confdefs.h.  */
10004 _ACEOF
10005 cat confdefs.h >>conftest.$ac_ext
10006 cat >>conftest.$ac_ext <<_ACEOF
10007 /* end confdefs.h.  */
10008 #include <X11/Xlib.h>
10009
10010 #include <X11/extensions/XScreenSaver.h>
10011 _ACEOF
10012 rm -f conftest.$ac_objext
10013 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10014   (eval $ac_compile) 2>conftest.er1
10015   ac_status=$?
10016   grep -v '^ *+' conftest.er1 >conftest.err
10017   rm -f conftest.er1
10018   cat conftest.err >&5
10019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10020   (exit $ac_status); } &&
10021          { ac_try='test -z "$ac_c_werror_flag"
10022                          || test ! -s conftest.err'
10023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10024   (eval $ac_try) 2>&5
10025   ac_status=$?
10026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10027   (exit $ac_status); }; } &&
10028          { ac_try='test -s conftest.$ac_objext'
10029   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10030   (eval $ac_try) 2>&5
10031   ac_status=$?
10032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10033   (exit $ac_status); }; }; then
10034   ac_cv_header_X11_extensions_XScreenSaver_h=yes
10035 else
10036   echo "$as_me: failed program was:" >&5
10037 sed 's/^/| /' conftest.$ac_ext >&5
10038
10039 ac_cv_header_X11_extensions_XScreenSaver_h=no
10040 fi
10041 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10042 fi
10043 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
10044 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
10045 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
10046   have_sgi=yes
10047                      cat >>confdefs.h <<\_ACEOF
10048 #define HAVE_SGI_SAVER_EXTENSION 1
10049 _ACEOF
10050
10051 fi
10052
10053
10054   CPPFLAGS="$ac_save_CPPFLAGS"
10055
10056 elif test "$with_sgi" != no; then
10057   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
10058   exit 1
10059 fi
10060
10061
10062 ###############################################################################
10063 #
10064 #       Check for the XIDLE server extension.
10065 #
10066 ###############################################################################
10067
10068 have_xidle=no
10069 with_xidle_req=unspecified
10070
10071 # Check whether --with-xidle-ext or --without-xidle-ext was given.
10072 if test "${with_xidle_ext+set}" = set; then
10073   withval="$with_xidle_ext"
10074   with_xidle="$withval"; with_xidle_req="$withval"
10075 else
10076   with_xidle=yes
10077 fi;
10078
10079
10080    case "$with_xidle" in
10081     yes) ;;
10082     no)  ;;
10083
10084     /*)
10085      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
10086 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
10087      d=$with_xidle/include
10088      if test -d $d; then
10089        X_CFLAGS="-I$d $X_CFLAGS"
10090        echo "$as_me:$LINENO: result: $d" >&5
10091 echo "${ECHO_T}$d" >&6
10092      else
10093        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10094 echo "${ECHO_T}not found ($d: no such directory)" >&6
10095      fi
10096
10097      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
10098 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
10099      d=$with_xidle/lib
10100      if test -d $d; then
10101        X_LIBS="-L$d $X_LIBS"
10102        echo "$as_me:$LINENO: result: $d" >&5
10103 echo "${ECHO_T}$d" >&6
10104      else
10105        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10106 echo "${ECHO_T}not found ($d: no such directory)" >&6
10107      fi
10108
10109      # replace the directory string with "yes".
10110      with_xidle_req="yes"
10111      with_xidle=$with_xidle_req
10112      ;;
10113
10114     *)
10115      echo ""
10116      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
10117      echo "       If it is a directory, then \`DIR/include' will be added to"
10118      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10119      exit 1
10120      ;;
10121    esac
10122
10123
10124 if test "$with_xidle" = yes; then
10125
10126   ac_save_CPPFLAGS="$CPPFLAGS"
10127   if test \! -z "$includedir" ; then
10128     CPPFLAGS="$CPPFLAGS -I$includedir"
10129   fi
10130   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10131   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
10132 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
10133 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
10134   echo $ECHO_N "(cached) $ECHO_C" >&6
10135 else
10136   cat >conftest.$ac_ext <<_ACEOF
10137 /* confdefs.h.  */
10138 _ACEOF
10139 cat confdefs.h >>conftest.$ac_ext
10140 cat >>conftest.$ac_ext <<_ACEOF
10141 /* end confdefs.h.  */
10142 #include <X11/Xlib.h>
10143
10144 #include <X11/extensions/xidle.h>
10145 _ACEOF
10146 rm -f conftest.$ac_objext
10147 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10148   (eval $ac_compile) 2>conftest.er1
10149   ac_status=$?
10150   grep -v '^ *+' conftest.er1 >conftest.err
10151   rm -f conftest.er1
10152   cat conftest.err >&5
10153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10154   (exit $ac_status); } &&
10155          { ac_try='test -z "$ac_c_werror_flag"
10156                          || test ! -s conftest.err'
10157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10158   (eval $ac_try) 2>&5
10159   ac_status=$?
10160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10161   (exit $ac_status); }; } &&
10162          { ac_try='test -s conftest.$ac_objext'
10163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10164   (eval $ac_try) 2>&5
10165   ac_status=$?
10166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10167   (exit $ac_status); }; }; then
10168   ac_cv_header_X11_extensions_xidle_h=yes
10169 else
10170   echo "$as_me: failed program was:" >&5
10171 sed 's/^/| /' conftest.$ac_ext >&5
10172
10173 ac_cv_header_X11_extensions_xidle_h=no
10174 fi
10175 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10176 fi
10177 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
10178 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
10179 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
10180   have_xidle=yes
10181                      cat >>confdefs.h <<\_ACEOF
10182 #define HAVE_XIDLE_EXTENSION 1
10183 _ACEOF
10184
10185 fi
10186
10187
10188   CPPFLAGS="$ac_save_CPPFLAGS"
10189 elif test "$with_xidle" != no; then
10190   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
10191   exit 1
10192 fi
10193
10194
10195 ###############################################################################
10196 #
10197 #       Check for the SGI-VIDEO-CONTROL server extension.
10198 #
10199 ###############################################################################
10200
10201 have_sgivc=no
10202 with_sgivc_req=unspecified
10203
10204 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
10205 if test "${with_sgivc_ext+set}" = set; then
10206   withval="$with_sgivc_ext"
10207   with_sgivc="$withval"; with_sgivc_req="$withval"
10208 else
10209   with_sgivc=yes
10210 fi;
10211
10212
10213    case "$with_sgivc" in
10214     yes) ;;
10215     no)  ;;
10216
10217     /*)
10218      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
10219 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
10220      d=$with_sgivc/include
10221      if test -d $d; then
10222        X_CFLAGS="-I$d $X_CFLAGS"
10223        echo "$as_me:$LINENO: result: $d" >&5
10224 echo "${ECHO_T}$d" >&6
10225      else
10226        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10227 echo "${ECHO_T}not found ($d: no such directory)" >&6
10228      fi
10229
10230      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
10231 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
10232      d=$with_sgivc/lib
10233      if test -d $d; then
10234        X_LIBS="-L$d $X_LIBS"
10235        echo "$as_me:$LINENO: result: $d" >&5
10236 echo "${ECHO_T}$d" >&6
10237      else
10238        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10239 echo "${ECHO_T}not found ($d: no such directory)" >&6
10240      fi
10241
10242      # replace the directory string with "yes".
10243      with_sgivc_req="yes"
10244      with_sgivc=$with_sgivc_req
10245      ;;
10246
10247     *)
10248      echo ""
10249      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
10250      echo "       If it is a directory, then \`DIR/include' will be added to"
10251      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10252      exit 1
10253      ;;
10254    esac
10255
10256
10257 if test "$with_sgivc" = yes; then
10258
10259   # first check for XSGIvc.h
10260
10261   ac_save_CPPFLAGS="$CPPFLAGS"
10262   if test \! -z "$includedir" ; then
10263     CPPFLAGS="$CPPFLAGS -I$includedir"
10264   fi
10265   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10266   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
10267 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
10268 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
10269   echo $ECHO_N "(cached) $ECHO_C" >&6
10270 else
10271   cat >conftest.$ac_ext <<_ACEOF
10272 /* confdefs.h.  */
10273 _ACEOF
10274 cat confdefs.h >>conftest.$ac_ext
10275 cat >>conftest.$ac_ext <<_ACEOF
10276 /* end confdefs.h.  */
10277 #include <X11/Xlib.h>
10278
10279 #include <X11/extensions/XSGIvc.h>
10280 _ACEOF
10281 rm -f conftest.$ac_objext
10282 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10283   (eval $ac_compile) 2>conftest.er1
10284   ac_status=$?
10285   grep -v '^ *+' conftest.er1 >conftest.err
10286   rm -f conftest.er1
10287   cat conftest.err >&5
10288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10289   (exit $ac_status); } &&
10290          { ac_try='test -z "$ac_c_werror_flag"
10291                          || test ! -s conftest.err'
10292   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10293   (eval $ac_try) 2>&5
10294   ac_status=$?
10295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10296   (exit $ac_status); }; } &&
10297          { ac_try='test -s conftest.$ac_objext'
10298   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10299   (eval $ac_try) 2>&5
10300   ac_status=$?
10301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10302   (exit $ac_status); }; }; then
10303   ac_cv_header_X11_extensions_XSGIvc_h=yes
10304 else
10305   echo "$as_me: failed program was:" >&5
10306 sed 's/^/| /' conftest.$ac_ext >&5
10307
10308 ac_cv_header_X11_extensions_XSGIvc_h=no
10309 fi
10310 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10311 fi
10312 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
10313 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
10314 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
10315   have_sgivc=yes
10316 fi
10317
10318
10319   CPPFLAGS="$ac_save_CPPFLAGS"
10320
10321   # if that succeeded, then check for the -lXsgivc
10322   if test "$have_sgivc" = yes; then
10323     have_sgivc=no
10324
10325   ac_save_CPPFLAGS="$CPPFLAGS"
10326   ac_save_LDFLAGS="$LDFLAGS"
10327 #  ac_save_LIBS="$LIBS"
10328
10329   if test \! -z "$includedir" ; then
10330     CPPFLAGS="$CPPFLAGS -I$includedir"
10331   fi
10332   # note: $X_CFLAGS includes $x_includes
10333   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10334
10335   if test \! -z "$libdir" ; then
10336     LDFLAGS="$LDFLAGS -L$libdir"
10337   fi
10338   # note: $X_LIBS includes $x_libraries
10339   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10340
10341   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
10342 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
10343 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
10344   echo $ECHO_N "(cached) $ECHO_C" >&6
10345 else
10346   ac_check_lib_save_LIBS=$LIBS
10347 LIBS="-lXsgivc -lXext -lX11 $LIBS"
10348 cat >conftest.$ac_ext <<_ACEOF
10349 /* confdefs.h.  */
10350 _ACEOF
10351 cat confdefs.h >>conftest.$ac_ext
10352 cat >>conftest.$ac_ext <<_ACEOF
10353 /* end confdefs.h.  */
10354
10355 /* Override any gcc2 internal prototype to avoid an error.  */
10356 #ifdef __cplusplus
10357 extern "C"
10358 #endif
10359 /* We use char because int might match the return type of a gcc2
10360    builtin and then its argument prototype would still apply.  */
10361 char XSGIvcQueryGammaMap ();
10362 int
10363 main ()
10364 {
10365 XSGIvcQueryGammaMap ();
10366   ;
10367   return 0;
10368 }
10369 _ACEOF
10370 rm -f conftest.$ac_objext conftest$ac_exeext
10371 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10372   (eval $ac_link) 2>conftest.er1
10373   ac_status=$?
10374   grep -v '^ *+' conftest.er1 >conftest.err
10375   rm -f conftest.er1
10376   cat conftest.err >&5
10377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10378   (exit $ac_status); } &&
10379          { ac_try='test -z "$ac_c_werror_flag"
10380                          || test ! -s conftest.err'
10381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10382   (eval $ac_try) 2>&5
10383   ac_status=$?
10384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10385   (exit $ac_status); }; } &&
10386          { ac_try='test -s conftest$ac_exeext'
10387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10388   (eval $ac_try) 2>&5
10389   ac_status=$?
10390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10391   (exit $ac_status); }; }; then
10392   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
10393 else
10394   echo "$as_me: failed program was:" >&5
10395 sed 's/^/| /' conftest.$ac_ext >&5
10396
10397 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
10398 fi
10399 rm -f conftest.err conftest.$ac_objext \
10400       conftest$ac_exeext conftest.$ac_ext
10401 LIBS=$ac_check_lib_save_LIBS
10402 fi
10403 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
10404 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
10405 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
10406   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
10407 else
10408   true
10409 fi
10410
10411   CPPFLAGS="$ac_save_CPPFLAGS"
10412   LDFLAGS="$ac_save_LDFLAGS"
10413 #  LIBS="$ac_save_LIBS"
10414
10415   fi
10416
10417   # if that succeeded, then we've really got it.
10418   if test "$have_sgivc" = yes; then
10419     cat >>confdefs.h <<\_ACEOF
10420 #define HAVE_SGI_VC_EXTENSION 1
10421 _ACEOF
10422
10423   fi
10424
10425 elif test "$with_sgivc" != no; then
10426   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10427   exit 1
10428 fi
10429
10430
10431 ###############################################################################
10432 #
10433 #       Check for the DPMS server extension.
10434 #
10435 ###############################################################################
10436
10437 have_dpms=no
10438 with_dpms_req=unspecified
10439
10440 # Check whether --with-dpms-ext or --without-dpms-ext was given.
10441 if test "${with_dpms_ext+set}" = set; then
10442   withval="$with_dpms_ext"
10443   with_dpms="$withval"; with_dpms_req="$withval"
10444 else
10445   with_dpms=yes
10446 fi;
10447
10448
10449    case "$with_dpms" in
10450     yes) ;;
10451     no)  ;;
10452
10453     /*)
10454      echo "$as_me:$LINENO: checking for DPMS headers" >&5
10455 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
10456      d=$with_dpms/include
10457      if test -d $d; then
10458        X_CFLAGS="-I$d $X_CFLAGS"
10459        echo "$as_me:$LINENO: result: $d" >&5
10460 echo "${ECHO_T}$d" >&6
10461      else
10462        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10463 echo "${ECHO_T}not found ($d: no such directory)" >&6
10464      fi
10465
10466      echo "$as_me:$LINENO: checking for DPMS libs" >&5
10467 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
10468      d=$with_dpms/lib
10469      if test -d $d; then
10470        X_LIBS="-L$d $X_LIBS"
10471        echo "$as_me:$LINENO: result: $d" >&5
10472 echo "${ECHO_T}$d" >&6
10473      else
10474        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10475 echo "${ECHO_T}not found ($d: no such directory)" >&6
10476      fi
10477
10478      # replace the directory string with "yes".
10479      with_dpms_req="yes"
10480      with_dpms=$with_dpms_req
10481      ;;
10482
10483     *)
10484      echo ""
10485      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
10486      echo "       If it is a directory, then \`DIR/include' will be added to"
10487      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10488      exit 1
10489      ;;
10490    esac
10491
10492
10493 if test "$with_dpms" = yes; then
10494
10495   # first check for dpms.h
10496
10497   ac_save_CPPFLAGS="$CPPFLAGS"
10498   if test \! -z "$includedir" ; then
10499     CPPFLAGS="$CPPFLAGS -I$includedir"
10500   fi
10501   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10502   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
10503 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
10504 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
10505   echo $ECHO_N "(cached) $ECHO_C" >&6
10506 else
10507   cat >conftest.$ac_ext <<_ACEOF
10508 /* confdefs.h.  */
10509 _ACEOF
10510 cat confdefs.h >>conftest.$ac_ext
10511 cat >>conftest.$ac_ext <<_ACEOF
10512 /* end confdefs.h.  */
10513 #include <X11/Xlib.h>
10514                      #include <X11/Xmd.h>
10515
10516 #include <X11/extensions/dpms.h>
10517 _ACEOF
10518 rm -f conftest.$ac_objext
10519 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10520   (eval $ac_compile) 2>conftest.er1
10521   ac_status=$?
10522   grep -v '^ *+' conftest.er1 >conftest.err
10523   rm -f conftest.er1
10524   cat conftest.err >&5
10525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10526   (exit $ac_status); } &&
10527          { ac_try='test -z "$ac_c_werror_flag"
10528                          || test ! -s conftest.err'
10529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10530   (eval $ac_try) 2>&5
10531   ac_status=$?
10532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10533   (exit $ac_status); }; } &&
10534          { ac_try='test -s conftest.$ac_objext'
10535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10536   (eval $ac_try) 2>&5
10537   ac_status=$?
10538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10539   (exit $ac_status); }; }; then
10540   ac_cv_header_X11_extensions_dpms_h=yes
10541 else
10542   echo "$as_me: failed program was:" >&5
10543 sed 's/^/| /' conftest.$ac_ext >&5
10544
10545 ac_cv_header_X11_extensions_dpms_h=no
10546 fi
10547 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10548 fi
10549 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
10550 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
10551 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
10552   have_dpms=yes
10553 fi
10554
10555
10556   CPPFLAGS="$ac_save_CPPFLAGS"
10557
10558   # if that succeeded, then check for the DPMS code in the libraries
10559   if test "$have_dpms" = yes; then
10560
10561     # first look in -lXext (this is where it is with XFree86 4.0)
10562     have_dpms=no
10563
10564   ac_save_CPPFLAGS="$CPPFLAGS"
10565   ac_save_LDFLAGS="$LDFLAGS"
10566 #  ac_save_LIBS="$LIBS"
10567
10568   if test \! -z "$includedir" ; then
10569     CPPFLAGS="$CPPFLAGS -I$includedir"
10570   fi
10571   # note: $X_CFLAGS includes $x_includes
10572   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10573
10574   if test \! -z "$libdir" ; then
10575     LDFLAGS="$LDFLAGS -L$libdir"
10576   fi
10577   # note: $X_LIBS includes $x_libraries
10578   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10579
10580   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
10581 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
10582 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
10583   echo $ECHO_N "(cached) $ECHO_C" >&6
10584 else
10585   ac_check_lib_save_LIBS=$LIBS
10586 LIBS="-lXext -lXext -lX11 $LIBS"
10587 cat >conftest.$ac_ext <<_ACEOF
10588 /* confdefs.h.  */
10589 _ACEOF
10590 cat confdefs.h >>conftest.$ac_ext
10591 cat >>conftest.$ac_ext <<_ACEOF
10592 /* end confdefs.h.  */
10593
10594 /* Override any gcc2 internal prototype to avoid an error.  */
10595 #ifdef __cplusplus
10596 extern "C"
10597 #endif
10598 /* We use char because int might match the return type of a gcc2
10599    builtin and then its argument prototype would still apply.  */
10600 char DPMSInfo ();
10601 int
10602 main ()
10603 {
10604 DPMSInfo ();
10605   ;
10606   return 0;
10607 }
10608 _ACEOF
10609 rm -f conftest.$ac_objext conftest$ac_exeext
10610 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10611   (eval $ac_link) 2>conftest.er1
10612   ac_status=$?
10613   grep -v '^ *+' conftest.er1 >conftest.err
10614   rm -f conftest.er1
10615   cat conftest.err >&5
10616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10617   (exit $ac_status); } &&
10618          { ac_try='test -z "$ac_c_werror_flag"
10619                          || test ! -s conftest.err'
10620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10621   (eval $ac_try) 2>&5
10622   ac_status=$?
10623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10624   (exit $ac_status); }; } &&
10625          { ac_try='test -s conftest$ac_exeext'
10626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10627   (eval $ac_try) 2>&5
10628   ac_status=$?
10629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10630   (exit $ac_status); }; }; then
10631   ac_cv_lib_Xext_DPMSInfo=yes
10632 else
10633   echo "$as_me: failed program was:" >&5
10634 sed 's/^/| /' conftest.$ac_ext >&5
10635
10636 ac_cv_lib_Xext_DPMSInfo=no
10637 fi
10638 rm -f conftest.err conftest.$ac_objext \
10639       conftest$ac_exeext conftest.$ac_ext
10640 LIBS=$ac_check_lib_save_LIBS
10641 fi
10642 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
10643 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
10644 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
10645   have_dpms=yes
10646 else
10647   true
10648 fi
10649
10650   CPPFLAGS="$ac_save_CPPFLAGS"
10651   LDFLAGS="$ac_save_LDFLAGS"
10652 #  LIBS="$ac_save_LIBS"
10653
10654
10655     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
10656     if test "$have_dpms" = no; then
10657
10658   ac_save_CPPFLAGS="$CPPFLAGS"
10659   ac_save_LDFLAGS="$LDFLAGS"
10660 #  ac_save_LIBS="$LIBS"
10661
10662   if test \! -z "$includedir" ; then
10663     CPPFLAGS="$CPPFLAGS -I$includedir"
10664   fi
10665   # note: $X_CFLAGS includes $x_includes
10666   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10667
10668   if test \! -z "$libdir" ; then
10669     LDFLAGS="$LDFLAGS -L$libdir"
10670   fi
10671   # note: $X_LIBS includes $x_libraries
10672   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10673
10674   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
10675 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
10676 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
10677   echo $ECHO_N "(cached) $ECHO_C" >&6
10678 else
10679   ac_check_lib_save_LIBS=$LIBS
10680 LIBS="-lXdpms -lXext -lX11 $LIBS"
10681 cat >conftest.$ac_ext <<_ACEOF
10682 /* confdefs.h.  */
10683 _ACEOF
10684 cat confdefs.h >>conftest.$ac_ext
10685 cat >>conftest.$ac_ext <<_ACEOF
10686 /* end confdefs.h.  */
10687
10688 /* Override any gcc2 internal prototype to avoid an error.  */
10689 #ifdef __cplusplus
10690 extern "C"
10691 #endif
10692 /* We use char because int might match the return type of a gcc2
10693    builtin and then its argument prototype would still apply.  */
10694 char DPMSInfo ();
10695 int
10696 main ()
10697 {
10698 DPMSInfo ();
10699   ;
10700   return 0;
10701 }
10702 _ACEOF
10703 rm -f conftest.$ac_objext conftest$ac_exeext
10704 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10705   (eval $ac_link) 2>conftest.er1
10706   ac_status=$?
10707   grep -v '^ *+' conftest.er1 >conftest.err
10708   rm -f conftest.er1
10709   cat conftest.err >&5
10710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10711   (exit $ac_status); } &&
10712          { ac_try='test -z "$ac_c_werror_flag"
10713                          || test ! -s conftest.err'
10714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10715   (eval $ac_try) 2>&5
10716   ac_status=$?
10717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10718   (exit $ac_status); }; } &&
10719          { ac_try='test -s conftest$ac_exeext'
10720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10721   (eval $ac_try) 2>&5
10722   ac_status=$?
10723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10724   (exit $ac_status); }; }; then
10725   ac_cv_lib_Xdpms_DPMSInfo=yes
10726 else
10727   echo "$as_me: failed program was:" >&5
10728 sed 's/^/| /' conftest.$ac_ext >&5
10729
10730 ac_cv_lib_Xdpms_DPMSInfo=no
10731 fi
10732 rm -f conftest.err conftest.$ac_objext \
10733       conftest$ac_exeext conftest.$ac_ext
10734 LIBS=$ac_check_lib_save_LIBS
10735 fi
10736 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
10737 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
10738 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
10739   have_dpms=yes; XDPMS_LIBS="-lXdpms"
10740 else
10741   true
10742 fi
10743
10744   CPPFLAGS="$ac_save_CPPFLAGS"
10745   LDFLAGS="$ac_save_LDFLAGS"
10746 #  LIBS="$ac_save_LIBS"
10747
10748     fi
10749   fi
10750
10751
10752   # if that succeeded, then we've really got it.
10753   if test "$have_dpms" = yes; then
10754     cat >>confdefs.h <<\_ACEOF
10755 #define HAVE_DPMS_EXTENSION 1
10756 _ACEOF
10757
10758   fi
10759
10760 elif test "$with_dpms" != no; then
10761   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
10762   exit 1
10763 fi
10764
10765
10766 ###############################################################################
10767 #
10768 #       Check for the XINERAMA server extension.
10769 #
10770 ###############################################################################
10771
10772 have_xinerama=no
10773 with_xinerama_req=unspecified
10774
10775 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
10776 if test "${with_xinerama_ext+set}" = set; then
10777   withval="$with_xinerama_ext"
10778   with_xinerama="$withval"; with_xinerama_req="$withval"
10779 else
10780   with_xinerama=yes
10781 fi;
10782
10783
10784    case "$with_xinerama" in
10785     yes) ;;
10786     no)  ;;
10787
10788     /*)
10789      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
10790 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
10791      d=$with_xinerama/include
10792      if test -d $d; then
10793        X_CFLAGS="-I$d $X_CFLAGS"
10794        echo "$as_me:$LINENO: result: $d" >&5
10795 echo "${ECHO_T}$d" >&6
10796      else
10797        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10798 echo "${ECHO_T}not found ($d: no such directory)" >&6
10799      fi
10800
10801      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
10802 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
10803      d=$with_xinerama/lib
10804      if test -d $d; then
10805        X_LIBS="-L$d $X_LIBS"
10806        echo "$as_me:$LINENO: result: $d" >&5
10807 echo "${ECHO_T}$d" >&6
10808      else
10809        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10810 echo "${ECHO_T}not found ($d: no such directory)" >&6
10811      fi
10812
10813      # replace the directory string with "yes".
10814      with_xinerama_req="yes"
10815      with_xinerama=$with_xinerama_req
10816      ;;
10817
10818     *)
10819      echo ""
10820      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
10821      echo "       If it is a directory, then \`DIR/include' will be added to"
10822      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10823      exit 1
10824      ;;
10825    esac
10826
10827
10828 if test "$with_xinerama" = yes; then
10829
10830   # first check for Xinerama.h
10831
10832   ac_save_CPPFLAGS="$CPPFLAGS"
10833   if test \! -z "$includedir" ; then
10834     CPPFLAGS="$CPPFLAGS -I$includedir"
10835   fi
10836   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10837   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
10838 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
10839 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
10840   echo $ECHO_N "(cached) $ECHO_C" >&6
10841 else
10842   cat >conftest.$ac_ext <<_ACEOF
10843 /* confdefs.h.  */
10844 _ACEOF
10845 cat confdefs.h >>conftest.$ac_ext
10846 cat >>conftest.$ac_ext <<_ACEOF
10847 /* end confdefs.h.  */
10848 #include <X11/Xlib.h>
10849
10850 #include <X11/extensions/Xinerama.h>
10851 _ACEOF
10852 rm -f conftest.$ac_objext
10853 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10854   (eval $ac_compile) 2>conftest.er1
10855   ac_status=$?
10856   grep -v '^ *+' conftest.er1 >conftest.err
10857   rm -f conftest.er1
10858   cat conftest.err >&5
10859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10860   (exit $ac_status); } &&
10861          { ac_try='test -z "$ac_c_werror_flag"
10862                          || test ! -s conftest.err'
10863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10864   (eval $ac_try) 2>&5
10865   ac_status=$?
10866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10867   (exit $ac_status); }; } &&
10868          { ac_try='test -s conftest.$ac_objext'
10869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10870   (eval $ac_try) 2>&5
10871   ac_status=$?
10872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10873   (exit $ac_status); }; }; then
10874   ac_cv_header_X11_extensions_Xinerama_h=yes
10875 else
10876   echo "$as_me: failed program was:" >&5
10877 sed 's/^/| /' conftest.$ac_ext >&5
10878
10879 ac_cv_header_X11_extensions_Xinerama_h=no
10880 fi
10881 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10882 fi
10883 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
10884 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
10885 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
10886   have_xinerama=yes
10887 fi
10888
10889
10890   CPPFLAGS="$ac_save_CPPFLAGS"
10891
10892   # if that succeeded, then check for the XINERAMA code in the libraries
10893   if test "$have_xinerama" = yes; then
10894
10895     # first look in -lXext
10896     have_xinerama=no
10897
10898   ac_save_CPPFLAGS="$CPPFLAGS"
10899   ac_save_LDFLAGS="$LDFLAGS"
10900 #  ac_save_LIBS="$LIBS"
10901
10902   if test \! -z "$includedir" ; then
10903     CPPFLAGS="$CPPFLAGS -I$includedir"
10904   fi
10905   # note: $X_CFLAGS includes $x_includes
10906   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10907
10908   if test \! -z "$libdir" ; then
10909     LDFLAGS="$LDFLAGS -L$libdir"
10910   fi
10911   # note: $X_LIBS includes $x_libraries
10912   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10913
10914   echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
10915 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6
10916 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
10917   echo $ECHO_N "(cached) $ECHO_C" >&6
10918 else
10919   ac_check_lib_save_LIBS=$LIBS
10920 LIBS="-lXext -lXext -lX11 $LIBS"
10921 cat >conftest.$ac_ext <<_ACEOF
10922 /* confdefs.h.  */
10923 _ACEOF
10924 cat confdefs.h >>conftest.$ac_ext
10925 cat >>conftest.$ac_ext <<_ACEOF
10926 /* end confdefs.h.  */
10927
10928 /* Override any gcc2 internal prototype to avoid an error.  */
10929 #ifdef __cplusplus
10930 extern "C"
10931 #endif
10932 /* We use char because int might match the return type of a gcc2
10933    builtin and then its argument prototype would still apply.  */
10934 char XineramaQueryScreens ();
10935 int
10936 main ()
10937 {
10938 XineramaQueryScreens ();
10939   ;
10940   return 0;
10941 }
10942 _ACEOF
10943 rm -f conftest.$ac_objext conftest$ac_exeext
10944 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10945   (eval $ac_link) 2>conftest.er1
10946   ac_status=$?
10947   grep -v '^ *+' conftest.er1 >conftest.err
10948   rm -f conftest.er1
10949   cat conftest.err >&5
10950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10951   (exit $ac_status); } &&
10952          { ac_try='test -z "$ac_c_werror_flag"
10953                          || test ! -s conftest.err'
10954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10955   (eval $ac_try) 2>&5
10956   ac_status=$?
10957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10958   (exit $ac_status); }; } &&
10959          { ac_try='test -s conftest$ac_exeext'
10960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10961   (eval $ac_try) 2>&5
10962   ac_status=$?
10963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10964   (exit $ac_status); }; }; then
10965   ac_cv_lib_Xext_XineramaQueryScreens=yes
10966 else
10967   echo "$as_me: failed program was:" >&5
10968 sed 's/^/| /' conftest.$ac_ext >&5
10969
10970 ac_cv_lib_Xext_XineramaQueryScreens=no
10971 fi
10972 rm -f conftest.err conftest.$ac_objext \
10973       conftest$ac_exeext conftest.$ac_ext
10974 LIBS=$ac_check_lib_save_LIBS
10975 fi
10976 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
10977 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6
10978 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
10979   have_xinerama=yes
10980 else
10981   true
10982 fi
10983
10984   CPPFLAGS="$ac_save_CPPFLAGS"
10985   LDFLAGS="$ac_save_LDFLAGS"
10986 #  LIBS="$ac_save_LIBS"
10987
10988
10989     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
10990     if test "$have_xinerama" = no; then
10991
10992   ac_save_CPPFLAGS="$CPPFLAGS"
10993   ac_save_LDFLAGS="$LDFLAGS"
10994 #  ac_save_LIBS="$LIBS"
10995
10996   if test \! -z "$includedir" ; then
10997     CPPFLAGS="$CPPFLAGS -I$includedir"
10998   fi
10999   # note: $X_CFLAGS includes $x_includes
11000   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11001
11002   if test \! -z "$libdir" ; then
11003     LDFLAGS="$LDFLAGS -L$libdir"
11004   fi
11005   # note: $X_LIBS includes $x_libraries
11006   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11007
11008   echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
11009 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
11010 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11011   echo $ECHO_N "(cached) $ECHO_C" >&6
11012 else
11013   ac_check_lib_save_LIBS=$LIBS
11014 LIBS="-lXinerama -lXext -lX11 $LIBS"
11015 cat >conftest.$ac_ext <<_ACEOF
11016 /* confdefs.h.  */
11017 _ACEOF
11018 cat confdefs.h >>conftest.$ac_ext
11019 cat >>conftest.$ac_ext <<_ACEOF
11020 /* end confdefs.h.  */
11021
11022 /* Override any gcc2 internal prototype to avoid an error.  */
11023 #ifdef __cplusplus
11024 extern "C"
11025 #endif
11026 /* We use char because int might match the return type of a gcc2
11027    builtin and then its argument prototype would still apply.  */
11028 char XineramaQueryScreens ();
11029 int
11030 main ()
11031 {
11032 XineramaQueryScreens ();
11033   ;
11034   return 0;
11035 }
11036 _ACEOF
11037 rm -f conftest.$ac_objext conftest$ac_exeext
11038 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11039   (eval $ac_link) 2>conftest.er1
11040   ac_status=$?
11041   grep -v '^ *+' conftest.er1 >conftest.err
11042   rm -f conftest.er1
11043   cat conftest.err >&5
11044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11045   (exit $ac_status); } &&
11046          { ac_try='test -z "$ac_c_werror_flag"
11047                          || test ! -s conftest.err'
11048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11049   (eval $ac_try) 2>&5
11050   ac_status=$?
11051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11052   (exit $ac_status); }; } &&
11053          { ac_try='test -s conftest$ac_exeext'
11054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11055   (eval $ac_try) 2>&5
11056   ac_status=$?
11057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11058   (exit $ac_status); }; }; then
11059   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11060 else
11061   echo "$as_me: failed program was:" >&5
11062 sed 's/^/| /' conftest.$ac_ext >&5
11063
11064 ac_cv_lib_Xinerama_XineramaQueryScreens=no
11065 fi
11066 rm -f conftest.err conftest.$ac_objext \
11067       conftest$ac_exeext conftest.$ac_ext
11068 LIBS=$ac_check_lib_save_LIBS
11069 fi
11070 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11071 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
11072 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
11073   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
11074 else
11075   true
11076 fi
11077
11078   CPPFLAGS="$ac_save_CPPFLAGS"
11079   LDFLAGS="$ac_save_LDFLAGS"
11080 #  LIBS="$ac_save_LIBS"
11081
11082     fi
11083   fi
11084
11085   # if that succeeded, then we've really got it.
11086   if test "$have_xinerama" = yes; then
11087     cat >>confdefs.h <<\_ACEOF
11088 #define HAVE_XINERAMA 1
11089 _ACEOF
11090
11091   fi
11092
11093 elif test "$with_xinerama" != no; then
11094   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
11095   exit 1
11096 fi
11097
11098
11099 ###############################################################################
11100 #
11101 #       Check for the XF86VMODE server extension (for virtual screens.)
11102 #
11103 ###############################################################################
11104
11105 have_xf86vmode=no
11106 with_xf86vmode_req=unspecified
11107
11108 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
11109 if test "${with_xf86vmode_ext+set}" = set; then
11110   withval="$with_xf86vmode_ext"
11111   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
11112 else
11113   with_xf86vmode=yes
11114 fi;
11115
11116
11117    case "$with_xf86vmode" in
11118     yes) ;;
11119     no)  ;;
11120
11121     /*)
11122      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
11123 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
11124      d=$with_xf86vmode/include
11125      if test -d $d; then
11126        X_CFLAGS="-I$d $X_CFLAGS"
11127        echo "$as_me:$LINENO: result: $d" >&5
11128 echo "${ECHO_T}$d" >&6
11129      else
11130        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11131 echo "${ECHO_T}not found ($d: no such directory)" >&6
11132      fi
11133
11134      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
11135 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
11136      d=$with_xf86vmode/lib
11137      if test -d $d; then
11138        X_LIBS="-L$d $X_LIBS"
11139        echo "$as_me:$LINENO: result: $d" >&5
11140 echo "${ECHO_T}$d" >&6
11141      else
11142        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11143 echo "${ECHO_T}not found ($d: no such directory)" >&6
11144      fi
11145
11146      # replace the directory string with "yes".
11147      with_xf86vmode_req="yes"
11148      with_xf86vmode=$with_xf86vmode_req
11149      ;;
11150
11151     *)
11152      echo ""
11153      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
11154      echo "       If it is a directory, then \`DIR/include' will be added to"
11155      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11156      exit 1
11157      ;;
11158    esac
11159
11160
11161 VIDMODE_LIBS=""
11162
11163 if test "$with_xf86vmode" = yes; then
11164
11165   # first check for xf86vmode.h
11166
11167   ac_save_CPPFLAGS="$CPPFLAGS"
11168   if test \! -z "$includedir" ; then
11169     CPPFLAGS="$CPPFLAGS -I$includedir"
11170   fi
11171   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11172   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11173 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
11174 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11175   echo $ECHO_N "(cached) $ECHO_C" >&6
11176 else
11177   cat >conftest.$ac_ext <<_ACEOF
11178 /* confdefs.h.  */
11179 _ACEOF
11180 cat confdefs.h >>conftest.$ac_ext
11181 cat >>conftest.$ac_ext <<_ACEOF
11182 /* end confdefs.h.  */
11183 #include <X11/Xlib.h>
11184
11185 #include <X11/extensions/xf86vmode.h>
11186 _ACEOF
11187 rm -f conftest.$ac_objext
11188 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11189   (eval $ac_compile) 2>conftest.er1
11190   ac_status=$?
11191   grep -v '^ *+' conftest.er1 >conftest.err
11192   rm -f conftest.er1
11193   cat conftest.err >&5
11194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11195   (exit $ac_status); } &&
11196          { ac_try='test -z "$ac_c_werror_flag"
11197                          || test ! -s conftest.err'
11198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11199   (eval $ac_try) 2>&5
11200   ac_status=$?
11201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11202   (exit $ac_status); }; } &&
11203          { ac_try='test -s conftest.$ac_objext'
11204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11205   (eval $ac_try) 2>&5
11206   ac_status=$?
11207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11208   (exit $ac_status); }; }; then
11209   ac_cv_header_X11_extensions_xf86vmode_h=yes
11210 else
11211   echo "$as_me: failed program was:" >&5
11212 sed 's/^/| /' conftest.$ac_ext >&5
11213
11214 ac_cv_header_X11_extensions_xf86vmode_h=no
11215 fi
11216 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11217 fi
11218 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11219 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
11220 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11221   have_xf86vmode=yes
11222 fi
11223
11224
11225   CPPFLAGS="$ac_save_CPPFLAGS"
11226
11227   # if that succeeded, then check for the -lXxf86vm
11228   if test "$have_xf86vmode" = yes; then
11229     have_xf86vmode=no
11230
11231   ac_save_CPPFLAGS="$CPPFLAGS"
11232   ac_save_LDFLAGS="$LDFLAGS"
11233 #  ac_save_LIBS="$LIBS"
11234
11235   if test \! -z "$includedir" ; then
11236     CPPFLAGS="$CPPFLAGS -I$includedir"
11237   fi
11238   # note: $X_CFLAGS includes $x_includes
11239   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11240
11241   if test \! -z "$libdir" ; then
11242     LDFLAGS="$LDFLAGS -L$libdir"
11243   fi
11244   # note: $X_LIBS includes $x_libraries
11245   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11246
11247   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
11248 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
11249 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
11250   echo $ECHO_N "(cached) $ECHO_C" >&6
11251 else
11252   ac_check_lib_save_LIBS=$LIBS
11253 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11254 cat >conftest.$ac_ext <<_ACEOF
11255 /* confdefs.h.  */
11256 _ACEOF
11257 cat confdefs.h >>conftest.$ac_ext
11258 cat >>conftest.$ac_ext <<_ACEOF
11259 /* end confdefs.h.  */
11260
11261 /* Override any gcc2 internal prototype to avoid an error.  */
11262 #ifdef __cplusplus
11263 extern "C"
11264 #endif
11265 /* We use char because int might match the return type of a gcc2
11266    builtin and then its argument prototype would still apply.  */
11267 char XF86VidModeGetViewPort ();
11268 int
11269 main ()
11270 {
11271 XF86VidModeGetViewPort ();
11272   ;
11273   return 0;
11274 }
11275 _ACEOF
11276 rm -f conftest.$ac_objext conftest$ac_exeext
11277 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11278   (eval $ac_link) 2>conftest.er1
11279   ac_status=$?
11280   grep -v '^ *+' conftest.er1 >conftest.err
11281   rm -f conftest.er1
11282   cat conftest.err >&5
11283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11284   (exit $ac_status); } &&
11285          { ac_try='test -z "$ac_c_werror_flag"
11286                          || test ! -s conftest.err'
11287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11288   (eval $ac_try) 2>&5
11289   ac_status=$?
11290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11291   (exit $ac_status); }; } &&
11292          { ac_try='test -s conftest$ac_exeext'
11293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11294   (eval $ac_try) 2>&5
11295   ac_status=$?
11296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11297   (exit $ac_status); }; }; then
11298   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
11299 else
11300   echo "$as_me: failed program was:" >&5
11301 sed 's/^/| /' conftest.$ac_ext >&5
11302
11303 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
11304 fi
11305 rm -f conftest.err conftest.$ac_objext \
11306       conftest$ac_exeext conftest.$ac_ext
11307 LIBS=$ac_check_lib_save_LIBS
11308 fi
11309 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
11310 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
11311 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
11312   have_xf86vmode=yes;
11313                    VIDMODE_LIBS="-lXxf86vm";
11314                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
11315 else
11316   true
11317 fi
11318
11319   CPPFLAGS="$ac_save_CPPFLAGS"
11320   LDFLAGS="$ac_save_LDFLAGS"
11321 #  LIBS="$ac_save_LIBS"
11322
11323   fi
11324
11325   # if that succeeded, then we've really got it.
11326   if test "$have_xf86vmode" = yes; then
11327     cat >>confdefs.h <<\_ACEOF
11328 #define HAVE_XF86VMODE 1
11329 _ACEOF
11330
11331   fi
11332
11333 elif test "$with_xf86vmode" != no; then
11334   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
11335   exit 1
11336 fi
11337
11338
11339 ###############################################################################
11340 #
11341 #       Check for the XF86VMODE server extension (for gamma fading.)
11342 #
11343 ###############################################################################
11344
11345 have_xf86gamma=no
11346 have_xf86gamma_ramp=no
11347 with_xf86gamma_req=unspecified
11348
11349 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
11350 if test "${with_xf86gamma_ext+set}" = set; then
11351   withval="$with_xf86gamma_ext"
11352   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
11353 else
11354   with_xf86gamma=yes
11355 fi;
11356
11357
11358    case "$with_xf86gamma" in
11359     yes) ;;
11360     no)  ;;
11361
11362     /*)
11363      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
11364 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
11365      d=$with_xf86gamma/include
11366      if test -d $d; then
11367        X_CFLAGS="-I$d $X_CFLAGS"
11368        echo "$as_me:$LINENO: result: $d" >&5
11369 echo "${ECHO_T}$d" >&6
11370      else
11371        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11372 echo "${ECHO_T}not found ($d: no such directory)" >&6
11373      fi
11374
11375      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
11376 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
11377      d=$with_xf86gamma/lib
11378      if test -d $d; then
11379        X_LIBS="-L$d $X_LIBS"
11380        echo "$as_me:$LINENO: result: $d" >&5
11381 echo "${ECHO_T}$d" >&6
11382      else
11383        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11384 echo "${ECHO_T}not found ($d: no such directory)" >&6
11385      fi
11386
11387      # replace the directory string with "yes".
11388      with_xf86gamma_req="yes"
11389      with_xf86gamma=$with_xf86gamma_req
11390      ;;
11391
11392     *)
11393      echo ""
11394      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
11395      echo "       If it is a directory, then \`DIR/include' will be added to"
11396      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11397      exit 1
11398      ;;
11399    esac
11400
11401
11402 if test "$with_xf86gamma" = yes; then
11403
11404   # first check for xf86vmode.h, if we haven't already
11405   if test "$have_xf86vmode" = yes; then
11406     have_xf86gamma=yes
11407   else
11408
11409   ac_save_CPPFLAGS="$CPPFLAGS"
11410   if test \! -z "$includedir" ; then
11411     CPPFLAGS="$CPPFLAGS -I$includedir"
11412   fi
11413   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11414   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11415 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
11416 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11417   echo $ECHO_N "(cached) $ECHO_C" >&6
11418 else
11419   cat >conftest.$ac_ext <<_ACEOF
11420 /* confdefs.h.  */
11421 _ACEOF
11422 cat confdefs.h >>conftest.$ac_ext
11423 cat >>conftest.$ac_ext <<_ACEOF
11424 /* end confdefs.h.  */
11425 #include <X11/Xlib.h>
11426
11427 #include <X11/extensions/xf86vmode.h>
11428 _ACEOF
11429 rm -f conftest.$ac_objext
11430 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11431   (eval $ac_compile) 2>conftest.er1
11432   ac_status=$?
11433   grep -v '^ *+' conftest.er1 >conftest.err
11434   rm -f conftest.er1
11435   cat conftest.err >&5
11436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11437   (exit $ac_status); } &&
11438          { ac_try='test -z "$ac_c_werror_flag"
11439                          || test ! -s conftest.err'
11440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11441   (eval $ac_try) 2>&5
11442   ac_status=$?
11443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11444   (exit $ac_status); }; } &&
11445          { ac_try='test -s conftest.$ac_objext'
11446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11447   (eval $ac_try) 2>&5
11448   ac_status=$?
11449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11450   (exit $ac_status); }; }; then
11451   ac_cv_header_X11_extensions_xf86vmode_h=yes
11452 else
11453   echo "$as_me: failed program was:" >&5
11454 sed 's/^/| /' conftest.$ac_ext >&5
11455
11456 ac_cv_header_X11_extensions_xf86vmode_h=no
11457 fi
11458 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11459 fi
11460 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11461 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
11462 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11463   have_xf86gamma=yes
11464 fi
11465
11466
11467   CPPFLAGS="$ac_save_CPPFLAGS"
11468   fi
11469
11470   # if that succeeded, then check for the -lXxf86vm
11471   if test "$have_xf86gamma" = yes; then
11472     have_xf86gamma=no
11473
11474   ac_save_CPPFLAGS="$CPPFLAGS"
11475   ac_save_LDFLAGS="$LDFLAGS"
11476 #  ac_save_LIBS="$LIBS"
11477
11478   if test \! -z "$includedir" ; then
11479     CPPFLAGS="$CPPFLAGS -I$includedir"
11480   fi
11481   # note: $X_CFLAGS includes $x_includes
11482   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11483
11484   if test \! -z "$libdir" ; then
11485     LDFLAGS="$LDFLAGS -L$libdir"
11486   fi
11487   # note: $X_LIBS includes $x_libraries
11488   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11489
11490   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
11491 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
11492 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
11493   echo $ECHO_N "(cached) $ECHO_C" >&6
11494 else
11495   ac_check_lib_save_LIBS=$LIBS
11496 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11497 cat >conftest.$ac_ext <<_ACEOF
11498 /* confdefs.h.  */
11499 _ACEOF
11500 cat confdefs.h >>conftest.$ac_ext
11501 cat >>conftest.$ac_ext <<_ACEOF
11502 /* end confdefs.h.  */
11503
11504 /* Override any gcc2 internal prototype to avoid an error.  */
11505 #ifdef __cplusplus
11506 extern "C"
11507 #endif
11508 /* We use char because int might match the return type of a gcc2
11509    builtin and then its argument prototype would still apply.  */
11510 char XF86VidModeSetGamma ();
11511 int
11512 main ()
11513 {
11514 XF86VidModeSetGamma ();
11515   ;
11516   return 0;
11517 }
11518 _ACEOF
11519 rm -f conftest.$ac_objext conftest$ac_exeext
11520 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11521   (eval $ac_link) 2>conftest.er1
11522   ac_status=$?
11523   grep -v '^ *+' conftest.er1 >conftest.err
11524   rm -f conftest.er1
11525   cat conftest.err >&5
11526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11527   (exit $ac_status); } &&
11528          { ac_try='test -z "$ac_c_werror_flag"
11529                          || test ! -s conftest.err'
11530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11531   (eval $ac_try) 2>&5
11532   ac_status=$?
11533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11534   (exit $ac_status); }; } &&
11535          { ac_try='test -s conftest$ac_exeext'
11536   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11537   (eval $ac_try) 2>&5
11538   ac_status=$?
11539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11540   (exit $ac_status); }; }; then
11541   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
11542 else
11543   echo "$as_me: failed program was:" >&5
11544 sed 's/^/| /' conftest.$ac_ext >&5
11545
11546 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
11547 fi
11548 rm -f conftest.err conftest.$ac_objext \
11549       conftest$ac_exeext conftest.$ac_ext
11550 LIBS=$ac_check_lib_save_LIBS
11551 fi
11552 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
11553 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
11554 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
11555   have_xf86gamma=yes
11556 else
11557   true
11558 fi
11559
11560   CPPFLAGS="$ac_save_CPPFLAGS"
11561   LDFLAGS="$ac_save_LDFLAGS"
11562 #  LIBS="$ac_save_LIBS"
11563
11564   fi
11565
11566   # check for the Ramp versions of the functions too.
11567   if test "$have_xf86gamma" = yes; then
11568     have_xf86gamma_ramp=no
11569
11570   ac_save_CPPFLAGS="$CPPFLAGS"
11571   ac_save_LDFLAGS="$LDFLAGS"
11572 #  ac_save_LIBS="$LIBS"
11573
11574   if test \! -z "$includedir" ; then
11575     CPPFLAGS="$CPPFLAGS -I$includedir"
11576   fi
11577   # note: $X_CFLAGS includes $x_includes
11578   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11579
11580   if test \! -z "$libdir" ; then
11581     LDFLAGS="$LDFLAGS -L$libdir"
11582   fi
11583   # note: $X_LIBS includes $x_libraries
11584   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11585
11586   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
11587 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
11588 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
11589   echo $ECHO_N "(cached) $ECHO_C" >&6
11590 else
11591   ac_check_lib_save_LIBS=$LIBS
11592 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11593 cat >conftest.$ac_ext <<_ACEOF
11594 /* confdefs.h.  */
11595 _ACEOF
11596 cat confdefs.h >>conftest.$ac_ext
11597 cat >>conftest.$ac_ext <<_ACEOF
11598 /* end confdefs.h.  */
11599
11600 /* Override any gcc2 internal prototype to avoid an error.  */
11601 #ifdef __cplusplus
11602 extern "C"
11603 #endif
11604 /* We use char because int might match the return type of a gcc2
11605    builtin and then its argument prototype would still apply.  */
11606 char XF86VidModeSetGammaRamp ();
11607 int
11608 main ()
11609 {
11610 XF86VidModeSetGammaRamp ();
11611   ;
11612   return 0;
11613 }
11614 _ACEOF
11615 rm -f conftest.$ac_objext conftest$ac_exeext
11616 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11617   (eval $ac_link) 2>conftest.er1
11618   ac_status=$?
11619   grep -v '^ *+' conftest.er1 >conftest.err
11620   rm -f conftest.er1
11621   cat conftest.err >&5
11622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11623   (exit $ac_status); } &&
11624          { ac_try='test -z "$ac_c_werror_flag"
11625                          || test ! -s conftest.err'
11626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11627   (eval $ac_try) 2>&5
11628   ac_status=$?
11629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11630   (exit $ac_status); }; } &&
11631          { ac_try='test -s conftest$ac_exeext'
11632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11633   (eval $ac_try) 2>&5
11634   ac_status=$?
11635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11636   (exit $ac_status); }; }; then
11637   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
11638 else
11639   echo "$as_me: failed program was:" >&5
11640 sed 's/^/| /' conftest.$ac_ext >&5
11641
11642 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
11643 fi
11644 rm -f conftest.err conftest.$ac_objext \
11645       conftest$ac_exeext conftest.$ac_ext
11646 LIBS=$ac_check_lib_save_LIBS
11647 fi
11648 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
11649 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
11650 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
11651   have_xf86gamma_ramp=yes
11652 else
11653   true
11654 fi
11655
11656   CPPFLAGS="$ac_save_CPPFLAGS"
11657   LDFLAGS="$ac_save_LDFLAGS"
11658 #  LIBS="$ac_save_LIBS"
11659
11660   fi
11661
11662   # if those tests succeeded, then we've really got the functions.
11663   if test "$have_xf86gamma" = yes; then
11664     cat >>confdefs.h <<\_ACEOF
11665 #define HAVE_XF86VMODE_GAMMA 1
11666 _ACEOF
11667
11668   fi
11669
11670   if test "$have_xf86gamma_ramp" = yes; then
11671     cat >>confdefs.h <<\_ACEOF
11672 #define HAVE_XF86VMODE_GAMMA_RAMP 1
11673 _ACEOF
11674
11675   fi
11676
11677   # pull in the lib, if we haven't already
11678   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
11679     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
11680   fi
11681
11682 elif test "$with_xf86gamma" != no; then
11683   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
11684   exit 1
11685 fi
11686
11687
11688 ###############################################################################
11689 #
11690 #       Check for the RANDR (Resize and Rotate) server extension.
11691 #
11692 #       We need this to detect when the resolution of the desktop
11693 #       has changed out from under us (this is a newer, different
11694 #       mechanism than the XF86VMODE virtual viewports.)
11695 #
11696 ###############################################################################
11697
11698 have_randr=no
11699 with_randr_req=unspecified
11700
11701 # Check whether --with-randr-ext or --without-randr-ext was given.
11702 if test "${with_randr_ext+set}" = set; then
11703   withval="$with_randr_ext"
11704   with_randr="$withval"; with_randr_req="$withval"
11705 else
11706   with_randr=yes
11707 fi;
11708
11709
11710    case "$with_randr" in
11711     yes) ;;
11712     no)  ;;
11713
11714     /*)
11715      echo "$as_me:$LINENO: checking for RANDR headers" >&5
11716 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6
11717      d=$with_randr/include
11718      if test -d $d; then
11719        X_CFLAGS="-I$d $X_CFLAGS"
11720        echo "$as_me:$LINENO: result: $d" >&5
11721 echo "${ECHO_T}$d" >&6
11722      else
11723        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11724 echo "${ECHO_T}not found ($d: no such directory)" >&6
11725      fi
11726
11727      echo "$as_me:$LINENO: checking for RANDR libs" >&5
11728 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6
11729      d=$with_randr/lib
11730      if test -d $d; then
11731        X_LIBS="-L$d $X_LIBS"
11732        echo "$as_me:$LINENO: result: $d" >&5
11733 echo "${ECHO_T}$d" >&6
11734      else
11735        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11736 echo "${ECHO_T}not found ($d: no such directory)" >&6
11737      fi
11738
11739      # replace the directory string with "yes".
11740      with_randr_req="yes"
11741      with_randr=$with_randr_req
11742      ;;
11743
11744     *)
11745      echo ""
11746      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
11747      echo "       If it is a directory, then \`DIR/include' will be added to"
11748      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11749      exit 1
11750      ;;
11751    esac
11752
11753
11754 if test "$with_randr" = yes; then
11755
11756   # first check for Randr.h
11757
11758   ac_save_CPPFLAGS="$CPPFLAGS"
11759   if test \! -z "$includedir" ; then
11760     CPPFLAGS="$CPPFLAGS -I$includedir"
11761   fi
11762   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11763   echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
11764 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6
11765 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
11766   echo $ECHO_N "(cached) $ECHO_C" >&6
11767 else
11768   cat >conftest.$ac_ext <<_ACEOF
11769 /* confdefs.h.  */
11770 _ACEOF
11771 cat confdefs.h >>conftest.$ac_ext
11772 cat >>conftest.$ac_ext <<_ACEOF
11773 /* end confdefs.h.  */
11774 #include <X11/Xlib.h>
11775
11776 #include <X11/extensions/Xrandr.h>
11777 _ACEOF
11778 rm -f conftest.$ac_objext
11779 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11780   (eval $ac_compile) 2>conftest.er1
11781   ac_status=$?
11782   grep -v '^ *+' conftest.er1 >conftest.err
11783   rm -f conftest.er1
11784   cat conftest.err >&5
11785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11786   (exit $ac_status); } &&
11787          { ac_try='test -z "$ac_c_werror_flag"
11788                          || test ! -s conftest.err'
11789   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11790   (eval $ac_try) 2>&5
11791   ac_status=$?
11792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11793   (exit $ac_status); }; } &&
11794          { ac_try='test -s conftest.$ac_objext'
11795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11796   (eval $ac_try) 2>&5
11797   ac_status=$?
11798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11799   (exit $ac_status); }; }; then
11800   ac_cv_header_X11_extensions_Xrandr_h=yes
11801 else
11802   echo "$as_me: failed program was:" >&5
11803 sed 's/^/| /' conftest.$ac_ext >&5
11804
11805 ac_cv_header_X11_extensions_Xrandr_h=no
11806 fi
11807 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11808 fi
11809 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
11810 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6
11811 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
11812   have_randr=yes
11813 fi
11814
11815
11816   CPPFLAGS="$ac_save_CPPFLAGS"
11817
11818   # if that succeeded, then check for the XRR code in the libraries
11819   if test "$have_randr" = yes; then
11820
11821     # RANDR probably needs -lXrender
11822     xrender_libs=
11823
11824   ac_save_CPPFLAGS="$CPPFLAGS"
11825   ac_save_LDFLAGS="$LDFLAGS"
11826 #  ac_save_LIBS="$LIBS"
11827
11828   if test \! -z "$includedir" ; then
11829     CPPFLAGS="$CPPFLAGS -I$includedir"
11830   fi
11831   # note: $X_CFLAGS includes $x_includes
11832   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11833
11834   if test \! -z "$libdir" ; then
11835     LDFLAGS="$LDFLAGS -L$libdir"
11836   fi
11837   # note: $X_LIBS includes $x_libraries
11838   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11839
11840   echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
11841 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6
11842 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
11843   echo $ECHO_N "(cached) $ECHO_C" >&6
11844 else
11845   ac_check_lib_save_LIBS=$LIBS
11846 LIBS="-lXrender -lXext -lX11 $LIBS"
11847 cat >conftest.$ac_ext <<_ACEOF
11848 /* confdefs.h.  */
11849 _ACEOF
11850 cat confdefs.h >>conftest.$ac_ext
11851 cat >>conftest.$ac_ext <<_ACEOF
11852 /* end confdefs.h.  */
11853
11854 /* Override any gcc2 internal prototype to avoid an error.  */
11855 #ifdef __cplusplus
11856 extern "C"
11857 #endif
11858 /* We use char because int might match the return type of a gcc2
11859    builtin and then its argument prototype would still apply.  */
11860 char XRenderSetSubpixelOrder ();
11861 int
11862 main ()
11863 {
11864 XRenderSetSubpixelOrder ();
11865   ;
11866   return 0;
11867 }
11868 _ACEOF
11869 rm -f conftest.$ac_objext conftest$ac_exeext
11870 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11871   (eval $ac_link) 2>conftest.er1
11872   ac_status=$?
11873   grep -v '^ *+' conftest.er1 >conftest.err
11874   rm -f conftest.er1
11875   cat conftest.err >&5
11876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11877   (exit $ac_status); } &&
11878          { ac_try='test -z "$ac_c_werror_flag"
11879                          || test ! -s conftest.err'
11880   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11881   (eval $ac_try) 2>&5
11882   ac_status=$?
11883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11884   (exit $ac_status); }; } &&
11885          { ac_try='test -s conftest$ac_exeext'
11886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11887   (eval $ac_try) 2>&5
11888   ac_status=$?
11889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11890   (exit $ac_status); }; }; then
11891   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
11892 else
11893   echo "$as_me: failed program was:" >&5
11894 sed 's/^/| /' conftest.$ac_ext >&5
11895
11896 ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
11897 fi
11898 rm -f conftest.err conftest.$ac_objext \
11899       conftest$ac_exeext conftest.$ac_ext
11900 LIBS=$ac_check_lib_save_LIBS
11901 fi
11902 echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
11903 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6
11904 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
11905   xrender_libs="-lXrender"
11906 else
11907   true
11908 fi
11909
11910   CPPFLAGS="$ac_save_CPPFLAGS"
11911   LDFLAGS="$ac_save_LDFLAGS"
11912 #  LIBS="$ac_save_LIBS"
11913
11914
11915     # first look for RANDR in -lXext
11916     have_randr=no
11917
11918   ac_save_CPPFLAGS="$CPPFLAGS"
11919   ac_save_LDFLAGS="$LDFLAGS"
11920 #  ac_save_LIBS="$LIBS"
11921
11922   if test \! -z "$includedir" ; then
11923     CPPFLAGS="$CPPFLAGS -I$includedir"
11924   fi
11925   # note: $X_CFLAGS includes $x_includes
11926   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11927
11928   if test \! -z "$libdir" ; then
11929     LDFLAGS="$LDFLAGS -L$libdir"
11930   fi
11931   # note: $X_LIBS includes $x_libraries
11932   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11933
11934   echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
11935 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6
11936 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
11937   echo $ECHO_N "(cached) $ECHO_C" >&6
11938 else
11939   ac_check_lib_save_LIBS=$LIBS
11940 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
11941 cat >conftest.$ac_ext <<_ACEOF
11942 /* confdefs.h.  */
11943 _ACEOF
11944 cat confdefs.h >>conftest.$ac_ext
11945 cat >>conftest.$ac_ext <<_ACEOF
11946 /* end confdefs.h.  */
11947
11948 /* Override any gcc2 internal prototype to avoid an error.  */
11949 #ifdef __cplusplus
11950 extern "C"
11951 #endif
11952 /* We use char because int might match the return type of a gcc2
11953    builtin and then its argument prototype would still apply.  */
11954 char XRRGetScreenInfo ();
11955 int
11956 main ()
11957 {
11958 XRRGetScreenInfo ();
11959   ;
11960   return 0;
11961 }
11962 _ACEOF
11963 rm -f conftest.$ac_objext conftest$ac_exeext
11964 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11965   (eval $ac_link) 2>conftest.er1
11966   ac_status=$?
11967   grep -v '^ *+' conftest.er1 >conftest.err
11968   rm -f conftest.er1
11969   cat conftest.err >&5
11970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11971   (exit $ac_status); } &&
11972          { ac_try='test -z "$ac_c_werror_flag"
11973                          || test ! -s conftest.err'
11974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11975   (eval $ac_try) 2>&5
11976   ac_status=$?
11977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11978   (exit $ac_status); }; } &&
11979          { ac_try='test -s conftest$ac_exeext'
11980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11981   (eval $ac_try) 2>&5
11982   ac_status=$?
11983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11984   (exit $ac_status); }; }; then
11985   ac_cv_lib_Xext_XRRGetScreenInfo=yes
11986 else
11987   echo "$as_me: failed program was:" >&5
11988 sed 's/^/| /' conftest.$ac_ext >&5
11989
11990 ac_cv_lib_Xext_XRRGetScreenInfo=no
11991 fi
11992 rm -f conftest.err conftest.$ac_objext \
11993       conftest$ac_exeext conftest.$ac_ext
11994 LIBS=$ac_check_lib_save_LIBS
11995 fi
11996 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
11997 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6
11998 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
11999   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
12000 else
12001   true
12002 fi
12003
12004   CPPFLAGS="$ac_save_CPPFLAGS"
12005   LDFLAGS="$ac_save_LDFLAGS"
12006 #  LIBS="$ac_save_LIBS"
12007
12008
12009     # if that failed, look in -lXrandr
12010     if test "$have_randr" = no; then
12011
12012   ac_save_CPPFLAGS="$CPPFLAGS"
12013   ac_save_LDFLAGS="$LDFLAGS"
12014 #  ac_save_LIBS="$LIBS"
12015
12016   if test \! -z "$includedir" ; then
12017     CPPFLAGS="$CPPFLAGS -I$includedir"
12018   fi
12019   # note: $X_CFLAGS includes $x_includes
12020   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12021
12022   if test \! -z "$libdir" ; then
12023     LDFLAGS="$LDFLAGS -L$libdir"
12024   fi
12025   # note: $X_LIBS includes $x_libraries
12026   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12027
12028   echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
12029 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6
12030 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
12031   echo $ECHO_N "(cached) $ECHO_C" >&6
12032 else
12033   ac_check_lib_save_LIBS=$LIBS
12034 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
12035 cat >conftest.$ac_ext <<_ACEOF
12036 /* confdefs.h.  */
12037 _ACEOF
12038 cat confdefs.h >>conftest.$ac_ext
12039 cat >>conftest.$ac_ext <<_ACEOF
12040 /* end confdefs.h.  */
12041
12042 /* Override any gcc2 internal prototype to avoid an error.  */
12043 #ifdef __cplusplus
12044 extern "C"
12045 #endif
12046 /* We use char because int might match the return type of a gcc2
12047    builtin and then its argument prototype would still apply.  */
12048 char XRRGetScreenInfo ();
12049 int
12050 main ()
12051 {
12052 XRRGetScreenInfo ();
12053   ;
12054   return 0;
12055 }
12056 _ACEOF
12057 rm -f conftest.$ac_objext conftest$ac_exeext
12058 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12059   (eval $ac_link) 2>conftest.er1
12060   ac_status=$?
12061   grep -v '^ *+' conftest.er1 >conftest.err
12062   rm -f conftest.er1
12063   cat conftest.err >&5
12064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12065   (exit $ac_status); } &&
12066          { ac_try='test -z "$ac_c_werror_flag"
12067                          || test ! -s conftest.err'
12068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12069   (eval $ac_try) 2>&5
12070   ac_status=$?
12071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12072   (exit $ac_status); }; } &&
12073          { ac_try='test -s conftest$ac_exeext'
12074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12075   (eval $ac_try) 2>&5
12076   ac_status=$?
12077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12078   (exit $ac_status); }; }; then
12079   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
12080 else
12081   echo "$as_me: failed program was:" >&5
12082 sed 's/^/| /' conftest.$ac_ext >&5
12083
12084 ac_cv_lib_Xrandr_XRRGetScreenInfo=no
12085 fi
12086 rm -f conftest.err conftest.$ac_objext \
12087       conftest$ac_exeext conftest.$ac_ext
12088 LIBS=$ac_check_lib_save_LIBS
12089 fi
12090 echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
12091 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6
12092 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
12093   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
12094 else
12095   true
12096 fi
12097
12098   CPPFLAGS="$ac_save_CPPFLAGS"
12099   LDFLAGS="$ac_save_LDFLAGS"
12100 #  LIBS="$ac_save_LIBS"
12101
12102     fi
12103   fi
12104
12105   # if that succeeded, then we've really got it.
12106   if test "$have_randr" = yes; then
12107     cat >>confdefs.h <<\_ACEOF
12108 #define HAVE_RANDR 1
12109 _ACEOF
12110
12111   fi
12112
12113 elif test "$with_randr" != no; then
12114   echo "error: must be yes or no: --with-randr-ext=$with_randr"
12115   exit 1
12116 fi
12117
12118
12119 ###############################################################################
12120 #
12121 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
12122 #       using other XF86 stuff.)
12123 #
12124 ###############################################################################
12125
12126 have_xf86miscsetgrabkeysstate=no
12127 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
12128
12129   ac_save_CPPFLAGS="$CPPFLAGS"
12130   ac_save_LDFLAGS="$LDFLAGS"
12131 #  ac_save_LIBS="$LIBS"
12132
12133   if test \! -z "$includedir" ; then
12134     CPPFLAGS="$CPPFLAGS -I$includedir"
12135   fi
12136   # note: $X_CFLAGS includes $x_includes
12137   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12138
12139   if test \! -z "$libdir" ; then
12140     LDFLAGS="$LDFLAGS -L$libdir"
12141   fi
12142   # note: $X_LIBS includes $x_libraries
12143   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12144
12145   echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
12146 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6
12147 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
12148   echo $ECHO_N "(cached) $ECHO_C" >&6
12149 else
12150   ac_check_lib_save_LIBS=$LIBS
12151 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
12152 cat >conftest.$ac_ext <<_ACEOF
12153 /* confdefs.h.  */
12154 _ACEOF
12155 cat confdefs.h >>conftest.$ac_ext
12156 cat >>conftest.$ac_ext <<_ACEOF
12157 /* end confdefs.h.  */
12158
12159 /* Override any gcc2 internal prototype to avoid an error.  */
12160 #ifdef __cplusplus
12161 extern "C"
12162 #endif
12163 /* We use char because int might match the return type of a gcc2
12164    builtin and then its argument prototype would still apply.  */
12165 char XF86MiscSetGrabKeysState ();
12166 int
12167 main ()
12168 {
12169 XF86MiscSetGrabKeysState ();
12170   ;
12171   return 0;
12172 }
12173 _ACEOF
12174 rm -f conftest.$ac_objext conftest$ac_exeext
12175 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12176   (eval $ac_link) 2>conftest.er1
12177   ac_status=$?
12178   grep -v '^ *+' conftest.er1 >conftest.err
12179   rm -f conftest.er1
12180   cat conftest.err >&5
12181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12182   (exit $ac_status); } &&
12183          { ac_try='test -z "$ac_c_werror_flag"
12184                          || test ! -s conftest.err'
12185   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12186   (eval $ac_try) 2>&5
12187   ac_status=$?
12188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12189   (exit $ac_status); }; } &&
12190          { ac_try='test -s conftest$ac_exeext'
12191   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12192   (eval $ac_try) 2>&5
12193   ac_status=$?
12194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12195   (exit $ac_status); }; }; then
12196   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
12197 else
12198   echo "$as_me: failed program was:" >&5
12199 sed 's/^/| /' conftest.$ac_ext >&5
12200
12201 ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
12202 fi
12203 rm -f conftest.err conftest.$ac_objext \
12204       conftest$ac_exeext conftest.$ac_ext
12205 LIBS=$ac_check_lib_save_LIBS
12206 fi
12207 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
12208 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6
12209 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
12210   have_xf86miscsetgrabkeysstate=yes
12211 else
12212   true
12213 fi
12214
12215   CPPFLAGS="$ac_save_CPPFLAGS"
12216   LDFLAGS="$ac_save_LDFLAGS"
12217 #  LIBS="$ac_save_LIBS"
12218
12219   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
12220     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
12221     cat >>confdefs.h <<\_ACEOF
12222 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
12223 _ACEOF
12224
12225   fi
12226 fi
12227
12228
12229 ###############################################################################
12230 #
12231 #       Check for HP XHPDisableReset and XHPEnableReset.
12232 #
12233 ###############################################################################
12234
12235 echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
12236 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6
12237
12238   ac_save_CPPFLAGS="$CPPFLAGS"
12239   if test \! -z "$includedir" ; then
12240     CPPFLAGS="$CPPFLAGS -I$includedir"
12241   fi
12242   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12243   cat >conftest.$ac_ext <<_ACEOF
12244 /* confdefs.h.  */
12245 _ACEOF
12246 cat confdefs.h >>conftest.$ac_ext
12247 cat >>conftest.$ac_ext <<_ACEOF
12248 /* end confdefs.h.  */
12249 #include <X11/XHPlib.h>
12250
12251 _ACEOF
12252 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12253   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
12254   cat >>confdefs.h <<\_ACEOF
12255 #define HAVE_XHPDISABLERESET 1
12256 _ACEOF
12257
12258                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
12259                    echo "$as_me:$LINENO: result: yes" >&5
12260 echo "${ECHO_T}yes" >&6
12261 else
12262   echo "$as_me:$LINENO: result: no" >&5
12263 echo "${ECHO_T}no" >&6
12264 fi
12265 rm -f conftest*
12266
12267   CPPFLAGS="$ac_save_CPPFLAGS"
12268
12269
12270 ###############################################################################
12271 #
12272 #       Check for /proc/interrupts.
12273 #
12274 ###############################################################################
12275
12276 have_proc_interrupts=no
12277 with_proc_interrupts_req=unspecified
12278
12279 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
12280 if test "${with_proc_interrupts+set}" = set; then
12281   withval="$with_proc_interrupts"
12282   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
12283 else
12284   with_proc_interrupts=yes
12285 fi;
12286
12287 if test "$with_proc_interrupts" = yes; then
12288
12289   # Note that we may be building in an environment (e.g. Debian buildd chroot)
12290   # without a proper /proc filesystem. If /proc/interrupts exists, then we'll
12291   # check that it has the bits we need, but otherwise we'll just go on faith.
12292   #
12293   have_proc_interrupts=yes
12294
12295   if test -f /proc/interrupts; then
12296    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
12297 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
12298 if test "${ac_cv_have_proc_interrupts+set}" = set; then
12299   echo $ECHO_N "(cached) $ECHO_C" >&6
12300 else
12301   ac_cv_have_proc_interrupts=no
12302      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
12303        ac_cv_have_proc_interrupts=yes
12304      fi
12305
12306 fi
12307 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
12308 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
12309    have_proc_interrupts=$ac_cv_have_proc_interrupts
12310   fi
12311
12312   if test "$have_proc_interrupts" = yes; then
12313     cat >>confdefs.h <<\_ACEOF
12314 #define HAVE_PROC_INTERRUPTS 1
12315 _ACEOF
12316
12317   fi
12318
12319 elif test "$with_proc_interrupts" != no; then
12320   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
12321   exit 1
12322 fi
12323
12324
12325 ###############################################################################
12326 #
12327 #       The --enable-locking option
12328 #
12329 ###############################################################################
12330
12331 # Check whether --enable-locking or --disable-locking was given.
12332 if test "${enable_locking+set}" = set; then
12333   enableval="$enable_locking"
12334   enable_locking="$enableval"
12335 else
12336   enable_locking=yes
12337 fi;
12338 if test "$enable_locking" = yes; then
12339   true
12340 elif test "$enable_locking" = no; then
12341   cat >>confdefs.h <<\_ACEOF
12342 #define NO_LOCKING 1
12343 _ACEOF
12344
12345 else
12346   echo "error: must be yes or no: --enable-locking=$enable_locking"
12347   exit 1
12348 fi
12349
12350 # We can't lock on MacOS X, so don't even bother compiling in support for it.
12351 #
12352 if test "$ac_macosx" = yes; then
12353   if test "$enable_locking" = yes; then
12354     echo "$as_me:$LINENO: result: locking disabled: it doesn't work on MacOS X" >&5
12355 echo "${ECHO_T}locking disabled: it doesn't work on MacOS X" >&6
12356     enable_locking=no
12357     cat >>confdefs.h <<\_ACEOF
12358 #define NO_LOCKING 1
12359 _ACEOF
12360
12361   fi
12362 fi
12363
12364
12365 ###############################################################################
12366 #
12367 #       Whether to allow root password to unblank.
12368 #
12369 ###############################################################################
12370 # Check whether --enable-root-passwd or --disable-root-passwd was given.
12371 if test "${enable_root_passwd+set}" = set; then
12372   enableval="$enable_root_passwd"
12373   enable_root_passwd="$enableval"
12374 else
12375   enable_root_passwd=yes
12376 fi;
12377 if test "$enable_root_passwd" = yes; then
12378   cat >>confdefs.h <<\_ACEOF
12379 #define ALLOW_ROOT_PASSWD 1
12380 _ACEOF
12381
12382   true
12383 elif test "$enable_root_passwd" != no; then
12384   echo "error: something wrong with root-passwd option. Check configure.in ."
12385   exit 1
12386 fi
12387
12388 ###############################################################################
12389 #
12390 #       Check for PAM.
12391 #
12392 ###############################################################################
12393
12394 case "$host" in
12395   *-solaris*)
12396    # Solaris systems tend to come with PAM misconfigured.
12397    #  Don't build it by default, even if the headers exist.
12398    with_pam_default=no
12399    ;;
12400   *)
12401    # Default to building PAM support on all other systems, if it exists.
12402    with_pam_default=yes
12403   ;;
12404 esac
12405
12406 have_pam=no
12407 with_pam_req=unspecified
12408
12409
12410 # Check whether --with-pam or --without-pam was given.
12411 if test "${with_pam+set}" = set; then
12412   withval="$with_pam"
12413   with_pam="$withval"; with_pam_req="$withval"
12414 else
12415   with_pam=$with_pam_default
12416 fi;
12417
12418
12419 # Check whether --with-pam_service_name or --without-pam_service_name was given.
12420 if test "${with_pam_service_name+set}" = set; then
12421   withval="$with_pam_service_name"
12422   pam_service_name="$withval"
12423 else
12424   pam_service_name="xscreensaver"
12425 fi;
12426
12427
12428    case "$with_pam" in
12429     yes) ;;
12430     no)  ;;
12431
12432     /*)
12433      echo "$as_me:$LINENO: checking for PAM headers" >&5
12434 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
12435      d=$with_pam/include
12436      if test -d $d; then
12437        X_CFLAGS="-I$d $X_CFLAGS"
12438        echo "$as_me:$LINENO: result: $d" >&5
12439 echo "${ECHO_T}$d" >&6
12440      else
12441        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12442 echo "${ECHO_T}not found ($d: no such directory)" >&6
12443      fi
12444
12445      echo "$as_me:$LINENO: checking for PAM libs" >&5
12446 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
12447      d=$with_pam/lib
12448      if test -d $d; then
12449        X_LIBS="-L$d $X_LIBS"
12450        echo "$as_me:$LINENO: result: $d" >&5
12451 echo "${ECHO_T}$d" >&6
12452      else
12453        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12454 echo "${ECHO_T}not found ($d: no such directory)" >&6
12455      fi
12456
12457      # replace the directory string with "yes".
12458      with_pam_req="yes"
12459      with_pam=$with_pam_req
12460      ;;
12461
12462     *)
12463      echo ""
12464      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
12465      echo "       If it is a directory, then \`DIR/include' will be added to"
12466      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12467      exit 1
12468      ;;
12469    esac
12470
12471
12472 if test "$enable_locking" = yes -a "$with_pam" = yes; then
12473   echo "$as_me:$LINENO: checking for PAM" >&5
12474 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
12475 if test "${ac_cv_pam+set}" = set; then
12476   echo $ECHO_N "(cached) $ECHO_C" >&6
12477 else
12478
12479   ac_save_CPPFLAGS="$CPPFLAGS"
12480   if test \! -z "$includedir" ; then
12481     CPPFLAGS="$CPPFLAGS -I$includedir"
12482   fi
12483   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12484   cat >conftest.$ac_ext <<_ACEOF
12485 /* confdefs.h.  */
12486 _ACEOF
12487 cat confdefs.h >>conftest.$ac_ext
12488 cat >>conftest.$ac_ext <<_ACEOF
12489 /* end confdefs.h.  */
12490 #include <security/pam_appl.h>
12491 int
12492 main ()
12493 {
12494
12495   ;
12496   return 0;
12497 }
12498 _ACEOF
12499 rm -f conftest.$ac_objext
12500 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12501   (eval $ac_compile) 2>conftest.er1
12502   ac_status=$?
12503   grep -v '^ *+' conftest.er1 >conftest.err
12504   rm -f conftest.er1
12505   cat conftest.err >&5
12506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12507   (exit $ac_status); } &&
12508          { ac_try='test -z "$ac_c_werror_flag"
12509                          || test ! -s conftest.err'
12510   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12511   (eval $ac_try) 2>&5
12512   ac_status=$?
12513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12514   (exit $ac_status); }; } &&
12515          { ac_try='test -s conftest.$ac_objext'
12516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12517   (eval $ac_try) 2>&5
12518   ac_status=$?
12519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12520   (exit $ac_status); }; }; then
12521   ac_cv_pam=yes
12522 else
12523   echo "$as_me: failed program was:" >&5
12524 sed 's/^/| /' conftest.$ac_ext >&5
12525
12526 ac_cv_pam=no
12527 fi
12528 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12529   CPPFLAGS="$ac_save_CPPFLAGS"
12530 fi
12531 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
12532 echo "${ECHO_T}$ac_cv_pam" >&6
12533   if test "$ac_cv_pam" = yes ; then
12534     have_pam=yes
12535     cat >>confdefs.h <<\_ACEOF
12536 #define HAVE_PAM 1
12537 _ACEOF
12538
12539     cat >>confdefs.h <<_ACEOF
12540 #define PAM_SERVICE_NAME "$pam_service_name"
12541 _ACEOF
12542
12543
12544     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
12545
12546     # libpam typically requires dlopen and dlsym.  On FreeBSD,
12547     # those are in libc.  On Linux and Solaris, they're in libdl.
12548     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12549 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
12550 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12551   echo $ECHO_N "(cached) $ECHO_C" >&6
12552 else
12553   ac_check_lib_save_LIBS=$LIBS
12554 LIBS="-ldl  $LIBS"
12555 cat >conftest.$ac_ext <<_ACEOF
12556 /* confdefs.h.  */
12557 _ACEOF
12558 cat confdefs.h >>conftest.$ac_ext
12559 cat >>conftest.$ac_ext <<_ACEOF
12560 /* end confdefs.h.  */
12561
12562 /* Override any gcc2 internal prototype to avoid an error.  */
12563 #ifdef __cplusplus
12564 extern "C"
12565 #endif
12566 /* We use char because int might match the return type of a gcc2
12567    builtin and then its argument prototype would still apply.  */
12568 char dlopen ();
12569 int
12570 main ()
12571 {
12572 dlopen ();
12573   ;
12574   return 0;
12575 }
12576 _ACEOF
12577 rm -f conftest.$ac_objext conftest$ac_exeext
12578 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12579   (eval $ac_link) 2>conftest.er1
12580   ac_status=$?
12581   grep -v '^ *+' conftest.er1 >conftest.err
12582   rm -f conftest.er1
12583   cat conftest.err >&5
12584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12585   (exit $ac_status); } &&
12586          { ac_try='test -z "$ac_c_werror_flag"
12587                          || test ! -s conftest.err'
12588   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12589   (eval $ac_try) 2>&5
12590   ac_status=$?
12591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12592   (exit $ac_status); }; } &&
12593          { ac_try='test -s conftest$ac_exeext'
12594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12595   (eval $ac_try) 2>&5
12596   ac_status=$?
12597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12598   (exit $ac_status); }; }; then
12599   ac_cv_lib_dl_dlopen=yes
12600 else
12601   echo "$as_me: failed program was:" >&5
12602 sed 's/^/| /' conftest.$ac_ext >&5
12603
12604 ac_cv_lib_dl_dlopen=no
12605 fi
12606 rm -f conftest.err conftest.$ac_objext \
12607       conftest$ac_exeext conftest.$ac_ext
12608 LIBS=$ac_check_lib_save_LIBS
12609 fi
12610 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12611 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
12612 if test $ac_cv_lib_dl_dlopen = yes; then
12613   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
12614 fi
12615
12616
12617     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
12618     have_timedwait=no
12619     echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
12620 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6
12621 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
12622   echo $ECHO_N "(cached) $ECHO_C" >&6
12623 else
12624   ac_check_lib_save_LIBS=$LIBS
12625 LIBS="-lc  $LIBS"
12626 cat >conftest.$ac_ext <<_ACEOF
12627 /* confdefs.h.  */
12628 _ACEOF
12629 cat confdefs.h >>conftest.$ac_ext
12630 cat >>conftest.$ac_ext <<_ACEOF
12631 /* end confdefs.h.  */
12632
12633 /* Override any gcc2 internal prototype to avoid an error.  */
12634 #ifdef __cplusplus
12635 extern "C"
12636 #endif
12637 /* We use char because int might match the return type of a gcc2
12638    builtin and then its argument prototype would still apply.  */
12639 char sigtimedwait ();
12640 int
12641 main ()
12642 {
12643 sigtimedwait ();
12644   ;
12645   return 0;
12646 }
12647 _ACEOF
12648 rm -f conftest.$ac_objext conftest$ac_exeext
12649 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12650   (eval $ac_link) 2>conftest.er1
12651   ac_status=$?
12652   grep -v '^ *+' conftest.er1 >conftest.err
12653   rm -f conftest.er1
12654   cat conftest.err >&5
12655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12656   (exit $ac_status); } &&
12657          { ac_try='test -z "$ac_c_werror_flag"
12658                          || test ! -s conftest.err'
12659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12660   (eval $ac_try) 2>&5
12661   ac_status=$?
12662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12663   (exit $ac_status); }; } &&
12664          { ac_try='test -s conftest$ac_exeext'
12665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12666   (eval $ac_try) 2>&5
12667   ac_status=$?
12668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12669   (exit $ac_status); }; }; then
12670   ac_cv_lib_c_sigtimedwait=yes
12671 else
12672   echo "$as_me: failed program was:" >&5
12673 sed 's/^/| /' conftest.$ac_ext >&5
12674
12675 ac_cv_lib_c_sigtimedwait=no
12676 fi
12677 rm -f conftest.err conftest.$ac_objext \
12678       conftest$ac_exeext conftest.$ac_ext
12679 LIBS=$ac_check_lib_save_LIBS
12680 fi
12681 echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
12682 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6
12683 if test $ac_cv_lib_c_sigtimedwait = yes; then
12684   have_timedwait=yes
12685 fi
12686
12687     if test "$have_timedwait" = no ; then
12688       echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
12689 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6
12690 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
12691   echo $ECHO_N "(cached) $ECHO_C" >&6
12692 else
12693   ac_check_lib_save_LIBS=$LIBS
12694 LIBS="-lrt  $LIBS"
12695 cat >conftest.$ac_ext <<_ACEOF
12696 /* confdefs.h.  */
12697 _ACEOF
12698 cat confdefs.h >>conftest.$ac_ext
12699 cat >>conftest.$ac_ext <<_ACEOF
12700 /* end confdefs.h.  */
12701
12702 /* Override any gcc2 internal prototype to avoid an error.  */
12703 #ifdef __cplusplus
12704 extern "C"
12705 #endif
12706 /* We use char because int might match the return type of a gcc2
12707    builtin and then its argument prototype would still apply.  */
12708 char sigtimedwait ();
12709 int
12710 main ()
12711 {
12712 sigtimedwait ();
12713   ;
12714   return 0;
12715 }
12716 _ACEOF
12717 rm -f conftest.$ac_objext conftest$ac_exeext
12718 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12719   (eval $ac_link) 2>conftest.er1
12720   ac_status=$?
12721   grep -v '^ *+' conftest.er1 >conftest.err
12722   rm -f conftest.er1
12723   cat conftest.err >&5
12724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12725   (exit $ac_status); } &&
12726          { ac_try='test -z "$ac_c_werror_flag"
12727                          || test ! -s conftest.err'
12728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12729   (eval $ac_try) 2>&5
12730   ac_status=$?
12731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12732   (exit $ac_status); }; } &&
12733          { ac_try='test -s conftest$ac_exeext'
12734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12735   (eval $ac_try) 2>&5
12736   ac_status=$?
12737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12738   (exit $ac_status); }; }; then
12739   ac_cv_lib_rt_sigtimedwait=yes
12740 else
12741   echo "$as_me: failed program was:" >&5
12742 sed 's/^/| /' conftest.$ac_ext >&5
12743
12744 ac_cv_lib_rt_sigtimedwait=no
12745 fi
12746 rm -f conftest.err conftest.$ac_objext \
12747       conftest$ac_exeext conftest.$ac_ext
12748 LIBS=$ac_check_lib_save_LIBS
12749 fi
12750 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
12751 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6
12752 if test $ac_cv_lib_rt_sigtimedwait = yes; then
12753   PASSWD_LIBS="${PASSWD_LIBS} -lrt"
12754 fi
12755
12756     fi
12757
12758     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
12759 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
12760     if test "${ac_cv_pam_strerror_args+set}" = set; then
12761   echo $ECHO_N "(cached) $ECHO_C" >&6
12762 else
12763   cat >conftest.$ac_ext <<_ACEOF
12764 /* confdefs.h.  */
12765 _ACEOF
12766 cat confdefs.h >>conftest.$ac_ext
12767 cat >>conftest.$ac_ext <<_ACEOF
12768 /* end confdefs.h.  */
12769 #include <stdio.h>
12770                       #include <stdlib.h>
12771                       #include <security/pam_appl.h>
12772 int
12773 main ()
12774 {
12775 pam_handle_t *pamh = 0;
12776                       char *s = pam_strerror(pamh, PAM_SUCCESS);
12777   ;
12778   return 0;
12779 }
12780 _ACEOF
12781 rm -f conftest.$ac_objext
12782 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12783   (eval $ac_compile) 2>conftest.er1
12784   ac_status=$?
12785   grep -v '^ *+' conftest.er1 >conftest.err
12786   rm -f conftest.er1
12787   cat conftest.err >&5
12788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12789   (exit $ac_status); } &&
12790          { ac_try='test -z "$ac_c_werror_flag"
12791                          || test ! -s conftest.err'
12792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12793   (eval $ac_try) 2>&5
12794   ac_status=$?
12795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12796   (exit $ac_status); }; } &&
12797          { ac_try='test -s conftest.$ac_objext'
12798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12799   (eval $ac_try) 2>&5
12800   ac_status=$?
12801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12802   (exit $ac_status); }; }; then
12803   ac_pam_strerror_args=2
12804 else
12805   echo "$as_me: failed program was:" >&5
12806 sed 's/^/| /' conftest.$ac_ext >&5
12807
12808 cat >conftest.$ac_ext <<_ACEOF
12809 /* confdefs.h.  */
12810 _ACEOF
12811 cat confdefs.h >>conftest.$ac_ext
12812 cat >>conftest.$ac_ext <<_ACEOF
12813 /* end confdefs.h.  */
12814 #include <stdio.h>
12815                                       #include <stdlib.h>
12816                                       #include <security/pam_appl.h>
12817 int
12818 main ()
12819 {
12820 char *s =
12821                                        pam_strerror(PAM_SUCCESS);
12822   ;
12823   return 0;
12824 }
12825 _ACEOF
12826 rm -f conftest.$ac_objext
12827 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12828   (eval $ac_compile) 2>conftest.er1
12829   ac_status=$?
12830   grep -v '^ *+' conftest.er1 >conftest.err
12831   rm -f conftest.er1
12832   cat conftest.err >&5
12833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12834   (exit $ac_status); } &&
12835          { ac_try='test -z "$ac_c_werror_flag"
12836                          || test ! -s conftest.err'
12837   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12838   (eval $ac_try) 2>&5
12839   ac_status=$?
12840   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12841   (exit $ac_status); }; } &&
12842          { ac_try='test -s conftest.$ac_objext'
12843   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12844   (eval $ac_try) 2>&5
12845   ac_status=$?
12846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12847   (exit $ac_status); }; }; then
12848   ac_pam_strerror_args=1
12849 else
12850   echo "$as_me: failed program was:" >&5
12851 sed 's/^/| /' conftest.$ac_ext >&5
12852
12853 ac_pam_strerror_args=0
12854 fi
12855 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12856 fi
12857 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12858       ac_cv_pam_strerror_args=$ac_pam_strerror_args
12859 fi
12860
12861     ac_pam_strerror_args=$ac_cv_pam_strerror_args
12862     if test "$ac_pam_strerror_args" = 1 ; then
12863       echo "$as_me:$LINENO: result: one argument" >&5
12864 echo "${ECHO_T}one argument" >&6
12865     elif test "$ac_pam_strerror_args" = 2 ; then
12866       cat >>confdefs.h <<\_ACEOF
12867 #define PAM_STRERROR_TWO_ARGS 1
12868 _ACEOF
12869
12870       echo "$as_me:$LINENO: result: two arguments" >&5
12871 echo "${ECHO_T}two arguments" >&6
12872     else
12873       echo "$as_me:$LINENO: result: unknown" >&5
12874 echo "${ECHO_T}unknown" >&6
12875     fi
12876
12877 # Check pam_fail_delay
12878     echo "$as_me:$LINENO: checking pam_fail_delay in -lpam" >&5
12879 echo $ECHO_N "checking pam_fail_delay in -lpam... $ECHO_C" >&6
12880     if test "${ac_cv_pam_fail_delay+set}" = set; then
12881   echo $ECHO_N "(cached) $ECHO_C" >&6
12882 else
12883   ac_save_LDFLAGS="$LDFLAGS"
12884       LDFLAGS="-lpam"
12885       cat >conftest.$ac_ext <<_ACEOF
12886 /* confdefs.h.  */
12887 _ACEOF
12888 cat confdefs.h >>conftest.$ac_ext
12889 cat >>conftest.$ac_ext <<_ACEOF
12890 /* end confdefs.h.  */
12891 #include <security/pam_appl.h>
12892 int
12893 main ()
12894 {
12895 pam_handle_t *pamh = 0;
12896                    unsigned int usec = 1;
12897                    int status = pam_fail_delay (pamh, usec);
12898   ;
12899   return 0;
12900 }
12901 _ACEOF
12902 rm -f conftest.$ac_objext conftest$ac_exeext
12903 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12904   (eval $ac_link) 2>conftest.er1
12905   ac_status=$?
12906   grep -v '^ *+' conftest.er1 >conftest.err
12907   rm -f conftest.er1
12908   cat conftest.err >&5
12909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12910   (exit $ac_status); } &&
12911          { ac_try='test -z "$ac_c_werror_flag"
12912                          || test ! -s conftest.err'
12913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12914   (eval $ac_try) 2>&5
12915   ac_status=$?
12916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12917   (exit $ac_status); }; } &&
12918          { ac_try='test -s conftest$ac_exeext'
12919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12920   (eval $ac_try) 2>&5
12921   ac_status=$?
12922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12923   (exit $ac_status); }; }; then
12924   ac_pam_fail_delay=yes
12925 else
12926   echo "$as_me: failed program was:" >&5
12927 sed 's/^/| /' conftest.$ac_ext >&5
12928
12929 ac_pam_fail_delay=no
12930 fi
12931 rm -f conftest.err conftest.$ac_objext \
12932       conftest$ac_exeext conftest.$ac_ext
12933       ac_cv_pam_fail_delay=$ac_pam_fail_delay,
12934       LD_FLAGS=$ac_save_LDFLAGS
12935 fi
12936
12937
12938       if test "$ac_pam_fail_delay" = yes ; then
12939         echo "$as_me:$LINENO: result: yes" >&5
12940 echo "${ECHO_T}yes" >&6
12941         cat >>confdefs.h <<\_ACEOF
12942 #define HAVE_PAM_FAIL_DELAY 1
12943 _ACEOF
12944
12945       else
12946         echo "$as_me:$LINENO: result: no" >&5
12947 echo "${ECHO_T}no" >&6
12948       fi
12949
12950   fi
12951 fi
12952
12953
12954 ###############################################################################
12955 #
12956 #       Check for Kerberos.
12957 #
12958 ###############################################################################
12959
12960 have_kerberos=no
12961 have_kerberos5=no
12962 with_kerberos_req=unspecified
12963
12964
12965 # Check whether --with-kerberos or --without-kerberos was given.
12966 if test "${with_kerberos+set}" = set; then
12967   withval="$with_kerberos"
12968   with_kerberos="$withval"; with_kerberos_req="$withval"
12969 else
12970   with_kerberos=yes
12971 fi;
12972
12973
12974    case "$with_kerberos" in
12975     yes) ;;
12976     no)  ;;
12977
12978     /*)
12979      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
12980 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
12981      d=$with_kerberos/include
12982      if test -d $d; then
12983        X_CFLAGS="-I$d $X_CFLAGS"
12984        echo "$as_me:$LINENO: result: $d" >&5
12985 echo "${ECHO_T}$d" >&6
12986      else
12987        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12988 echo "${ECHO_T}not found ($d: no such directory)" >&6
12989      fi
12990
12991      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
12992 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
12993      d=$with_kerberos/lib
12994      if test -d $d; then
12995        X_LIBS="-L$d $X_LIBS"
12996        echo "$as_me:$LINENO: result: $d" >&5
12997 echo "${ECHO_T}$d" >&6
12998      else
12999        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13000 echo "${ECHO_T}not found ($d: no such directory)" >&6
13001      fi
13002
13003      # replace the directory string with "yes".
13004      with_kerberos_req="yes"
13005      with_kerberos=$with_kerberos_req
13006      ;;
13007
13008     *)
13009      echo ""
13010      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
13011      echo "       If it is a directory, then \`DIR/include' will be added to"
13012      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13013      exit 1
13014      ;;
13015    esac
13016
13017
13018 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
13019   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
13020 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
13021 if test "${ac_cv_kerberos+set}" = set; then
13022   echo $ECHO_N "(cached) $ECHO_C" >&6
13023 else
13024
13025   ac_save_CPPFLAGS="$CPPFLAGS"
13026   if test \! -z "$includedir" ; then
13027     CPPFLAGS="$CPPFLAGS -I$includedir"
13028   fi
13029   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13030   cat >conftest.$ac_ext <<_ACEOF
13031 /* confdefs.h.  */
13032 _ACEOF
13033 cat confdefs.h >>conftest.$ac_ext
13034 cat >>conftest.$ac_ext <<_ACEOF
13035 /* end confdefs.h.  */
13036 #include <krb.h>
13037 int
13038 main ()
13039 {
13040
13041   ;
13042   return 0;
13043 }
13044 _ACEOF
13045 rm -f conftest.$ac_objext
13046 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13047   (eval $ac_compile) 2>conftest.er1
13048   ac_status=$?
13049   grep -v '^ *+' conftest.er1 >conftest.err
13050   rm -f conftest.er1
13051   cat conftest.err >&5
13052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13053   (exit $ac_status); } &&
13054          { ac_try='test -z "$ac_c_werror_flag"
13055                          || test ! -s conftest.err'
13056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13057   (eval $ac_try) 2>&5
13058   ac_status=$?
13059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13060   (exit $ac_status); }; } &&
13061          { ac_try='test -s conftest.$ac_objext'
13062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13063   (eval $ac_try) 2>&5
13064   ac_status=$?
13065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13066   (exit $ac_status); }; }; then
13067   ac_cv_kerberos=yes
13068 else
13069   echo "$as_me: failed program was:" >&5
13070 sed 's/^/| /' conftest.$ac_ext >&5
13071
13072 ac_cv_kerberos=no
13073 fi
13074 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13075   CPPFLAGS="$ac_save_CPPFLAGS"
13076 fi
13077 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
13078 echo "${ECHO_T}$ac_cv_kerberos" >&6
13079   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
13080 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
13081 if test "${ac_cv_kerberos5+set}" = set; then
13082   echo $ECHO_N "(cached) $ECHO_C" >&6
13083 else
13084
13085   ac_save_CPPFLAGS="$CPPFLAGS"
13086   if test \! -z "$includedir" ; then
13087     CPPFLAGS="$CPPFLAGS -I$includedir"
13088   fi
13089   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13090   cat >conftest.$ac_ext <<_ACEOF
13091 /* confdefs.h.  */
13092 _ACEOF
13093 cat confdefs.h >>conftest.$ac_ext
13094 cat >>conftest.$ac_ext <<_ACEOF
13095 /* end confdefs.h.  */
13096 #include <kerberosIV/krb.h>
13097 int
13098 main ()
13099 {
13100
13101   ;
13102   return 0;
13103 }
13104 _ACEOF
13105 rm -f conftest.$ac_objext
13106 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13107   (eval $ac_compile) 2>conftest.er1
13108   ac_status=$?
13109   grep -v '^ *+' conftest.er1 >conftest.err
13110   rm -f conftest.er1
13111   cat conftest.err >&5
13112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13113   (exit $ac_status); } &&
13114          { ac_try='test -z "$ac_c_werror_flag"
13115                          || test ! -s conftest.err'
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); }; } &&
13121          { ac_try='test -s conftest.$ac_objext'
13122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13123   (eval $ac_try) 2>&5
13124   ac_status=$?
13125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13126   (exit $ac_status); }; }; then
13127   ac_cv_kerberos5=yes
13128 else
13129   echo "$as_me: failed program was:" >&5
13130 sed 's/^/| /' conftest.$ac_ext >&5
13131
13132 ac_cv_kerberos5=no
13133 fi
13134 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13135   CPPFLAGS="$ac_save_CPPFLAGS"
13136 fi
13137 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
13138 echo "${ECHO_T}$ac_cv_kerberos5" >&6
13139
13140   if test "$ac_cv_kerberos" = yes ; then
13141     have_kerberos=yes
13142     cat >>confdefs.h <<\_ACEOF
13143 #define HAVE_KERBEROS 1
13144 _ACEOF
13145
13146   fi
13147
13148   if test "$ac_cv_kerberos5" = yes ; then
13149
13150     # Andrew Snare <ajs@pigpond.com> wrote:
13151     #
13152     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
13153     # (krb4) was also available.  This turns out not to be the case with
13154     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
13155     # is optional.
13156     #
13157     # So, disable kerberosV support if libkrb4 can't be found.
13158     # This is not the best solution, but it makes the compile not fail.
13159     #
13160
13161   ac_save_CPPFLAGS="$CPPFLAGS"
13162   ac_save_LDFLAGS="$LDFLAGS"
13163 #  ac_save_LIBS="$LIBS"
13164
13165   if test \! -z "$includedir" ; then
13166     CPPFLAGS="$CPPFLAGS -I$includedir"
13167   fi
13168   # note: $X_CFLAGS includes $x_includes
13169   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13170
13171   if test \! -z "$libdir" ; then
13172     LDFLAGS="$LDFLAGS -L$libdir"
13173   fi
13174   # note: $X_LIBS includes $x_libraries
13175   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13176
13177   echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
13178 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6
13179 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
13180   echo $ECHO_N "(cached) $ECHO_C" >&6
13181 else
13182   ac_check_lib_save_LIBS=$LIBS
13183 LIBS="-lkrb4  $LIBS"
13184 cat >conftest.$ac_ext <<_ACEOF
13185 /* confdefs.h.  */
13186 _ACEOF
13187 cat confdefs.h >>conftest.$ac_ext
13188 cat >>conftest.$ac_ext <<_ACEOF
13189 /* end confdefs.h.  */
13190
13191 /* Override any gcc2 internal prototype to avoid an error.  */
13192 #ifdef __cplusplus
13193 extern "C"
13194 #endif
13195 /* We use char because int might match the return type of a gcc2
13196    builtin and then its argument prototype would still apply.  */
13197 char krb_get_tf_realm ();
13198 int
13199 main ()
13200 {
13201 krb_get_tf_realm ();
13202   ;
13203   return 0;
13204 }
13205 _ACEOF
13206 rm -f conftest.$ac_objext conftest$ac_exeext
13207 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13208   (eval $ac_link) 2>conftest.er1
13209   ac_status=$?
13210   grep -v '^ *+' conftest.er1 >conftest.err
13211   rm -f conftest.er1
13212   cat conftest.err >&5
13213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13214   (exit $ac_status); } &&
13215          { ac_try='test -z "$ac_c_werror_flag"
13216                          || test ! -s conftest.err'
13217   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13218   (eval $ac_try) 2>&5
13219   ac_status=$?
13220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13221   (exit $ac_status); }; } &&
13222          { ac_try='test -s conftest$ac_exeext'
13223   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13224   (eval $ac_try) 2>&5
13225   ac_status=$?
13226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13227   (exit $ac_status); }; }; then
13228   ac_cv_lib_krb4_krb_get_tf_realm=yes
13229 else
13230   echo "$as_me: failed program was:" >&5
13231 sed 's/^/| /' conftest.$ac_ext >&5
13232
13233 ac_cv_lib_krb4_krb_get_tf_realm=no
13234 fi
13235 rm -f conftest.err conftest.$ac_objext \
13236       conftest$ac_exeext conftest.$ac_ext
13237 LIBS=$ac_check_lib_save_LIBS
13238 fi
13239 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
13240 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6
13241 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
13242   have_kerberos=yes
13243 else
13244   have_kerberos=no
13245 fi
13246
13247   CPPFLAGS="$ac_save_CPPFLAGS"
13248   LDFLAGS="$ac_save_LDFLAGS"
13249 #  LIBS="$ac_save_LIBS"
13250
13251     if test "$have_kerberos" = yes ; then
13252       have_kerberos5=yes
13253       cat >>confdefs.h <<\_ACEOF
13254 #define HAVE_KERBEROS 1
13255 _ACEOF
13256
13257       cat >>confdefs.h <<\_ACEOF
13258 #define HAVE_KERBEROS5 1
13259 _ACEOF
13260
13261     else
13262       have_kerberos5=no
13263       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
13264 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
13265     fi
13266
13267   fi
13268
13269   if test "$have_kerberos5" = yes ; then
13270     # from Matt Knopp <mhat@infocalypse.netlag.com>
13271     # (who got it from amu@mit.edu)
13272
13273     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
13274
13275     # jwz: MacOS X uses -lkrb5, but not -lcrypt
13276
13277   ac_save_CPPFLAGS="$CPPFLAGS"
13278   ac_save_LDFLAGS="$LDFLAGS"
13279 #  ac_save_LIBS="$LIBS"
13280
13281   if test \! -z "$includedir" ; then
13282     CPPFLAGS="$CPPFLAGS -I$includedir"
13283   fi
13284   # note: $X_CFLAGS includes $x_includes
13285   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13286
13287   if test \! -z "$libdir" ; then
13288     LDFLAGS="$LDFLAGS -L$libdir"
13289   fi
13290   # note: $X_LIBS includes $x_libraries
13291   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
13292
13293   echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
13294 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
13295 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
13296   echo $ECHO_N "(cached) $ECHO_C" >&6
13297 else
13298   ac_check_lib_save_LIBS=$LIBS
13299 LIBS="-lcrypt  $LIBS"
13300 cat >conftest.$ac_ext <<_ACEOF
13301 /* confdefs.h.  */
13302 _ACEOF
13303 cat confdefs.h >>conftest.$ac_ext
13304 cat >>conftest.$ac_ext <<_ACEOF
13305 /* end confdefs.h.  */
13306
13307 /* Override any gcc2 internal prototype to avoid an error.  */
13308 #ifdef __cplusplus
13309 extern "C"
13310 #endif
13311 /* We use char because int might match the return type of a gcc2
13312    builtin and then its argument prototype would still apply.  */
13313 char crypt ();
13314 int
13315 main ()
13316 {
13317 crypt ();
13318   ;
13319   return 0;
13320 }
13321 _ACEOF
13322 rm -f conftest.$ac_objext conftest$ac_exeext
13323 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13324   (eval $ac_link) 2>conftest.er1
13325   ac_status=$?
13326   grep -v '^ *+' conftest.er1 >conftest.err
13327   rm -f conftest.er1
13328   cat conftest.err >&5
13329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13330   (exit $ac_status); } &&
13331          { ac_try='test -z "$ac_c_werror_flag"
13332                          || test ! -s conftest.err'
13333   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13334   (eval $ac_try) 2>&5
13335   ac_status=$?
13336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13337   (exit $ac_status); }; } &&
13338          { ac_try='test -s conftest$ac_exeext'
13339   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13340   (eval $ac_try) 2>&5
13341   ac_status=$?
13342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13343   (exit $ac_status); }; }; then
13344   ac_cv_lib_crypt_crypt=yes
13345 else
13346   echo "$as_me: failed program was:" >&5
13347 sed 's/^/| /' conftest.$ac_ext >&5
13348
13349 ac_cv_lib_crypt_crypt=no
13350 fi
13351 rm -f conftest.err conftest.$ac_objext \
13352       conftest$ac_exeext conftest.$ac_ext
13353 LIBS=$ac_check_lib_save_LIBS
13354 fi
13355 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
13356 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
13357 if test $ac_cv_lib_crypt_crypt = yes; then
13358   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
13359 fi
13360
13361   CPPFLAGS="$ac_save_CPPFLAGS"
13362   LDFLAGS="$ac_save_LDFLAGS"
13363 #  LIBS="$ac_save_LIBS"
13364
13365
13366   elif test "$have_kerberos" = yes ; then
13367     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
13368     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
13369   fi
13370
13371   if test "$have_kerberos" = yes ; then
13372     echo "$as_me:$LINENO: checking for res_search" >&5
13373 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
13374 if test "${ac_cv_func_res_search+set}" = set; then
13375   echo $ECHO_N "(cached) $ECHO_C" >&6
13376 else
13377   cat >conftest.$ac_ext <<_ACEOF
13378 /* confdefs.h.  */
13379 _ACEOF
13380 cat confdefs.h >>conftest.$ac_ext
13381 cat >>conftest.$ac_ext <<_ACEOF
13382 /* end confdefs.h.  */
13383 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
13384    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13385 #define res_search innocuous_res_search
13386
13387 /* System header to define __stub macros and hopefully few prototypes,
13388     which can conflict with char res_search (); below.
13389     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13390     <limits.h> exists even on freestanding compilers.  */
13391
13392 #ifdef __STDC__
13393 # include <limits.h>
13394 #else
13395 # include <assert.h>
13396 #endif
13397
13398 #undef res_search
13399
13400 /* Override any gcc2 internal prototype to avoid an error.  */
13401 #ifdef __cplusplus
13402 extern "C"
13403 {
13404 #endif
13405 /* We use char because int might match the return type of a gcc2
13406    builtin and then its argument prototype would still apply.  */
13407 char res_search ();
13408 /* The GNU C library defines this for functions which it implements
13409     to always fail with ENOSYS.  Some functions are actually named
13410     something starting with __ and the normal name is an alias.  */
13411 #if defined (__stub_res_search) || defined (__stub___res_search)
13412 choke me
13413 #else
13414 char (*f) () = res_search;
13415 #endif
13416 #ifdef __cplusplus
13417 }
13418 #endif
13419
13420 int
13421 main ()
13422 {
13423 return f != res_search;
13424   ;
13425   return 0;
13426 }
13427 _ACEOF
13428 rm -f conftest.$ac_objext conftest$ac_exeext
13429 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13430   (eval $ac_link) 2>conftest.er1
13431   ac_status=$?
13432   grep -v '^ *+' conftest.er1 >conftest.err
13433   rm -f conftest.er1
13434   cat conftest.err >&5
13435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13436   (exit $ac_status); } &&
13437          { ac_try='test -z "$ac_c_werror_flag"
13438                          || test ! -s conftest.err'
13439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13440   (eval $ac_try) 2>&5
13441   ac_status=$?
13442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13443   (exit $ac_status); }; } &&
13444          { ac_try='test -s conftest$ac_exeext'
13445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13446   (eval $ac_try) 2>&5
13447   ac_status=$?
13448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13449   (exit $ac_status); }; }; then
13450   ac_cv_func_res_search=yes
13451 else
13452   echo "$as_me: failed program was:" >&5
13453 sed 's/^/| /' conftest.$ac_ext >&5
13454
13455 ac_cv_func_res_search=no
13456 fi
13457 rm -f conftest.err conftest.$ac_objext \
13458       conftest$ac_exeext conftest.$ac_ext
13459 fi
13460 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
13461 echo "${ECHO_T}$ac_cv_func_res_search" >&6
13462 if test $ac_cv_func_res_search = yes; then
13463   :
13464 else
13465   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
13466 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
13467 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
13468   echo $ECHO_N "(cached) $ECHO_C" >&6
13469 else
13470   ac_check_lib_save_LIBS=$LIBS
13471 LIBS="-lresolv  $LIBS"
13472 cat >conftest.$ac_ext <<_ACEOF
13473 /* confdefs.h.  */
13474 _ACEOF
13475 cat confdefs.h >>conftest.$ac_ext
13476 cat >>conftest.$ac_ext <<_ACEOF
13477 /* end confdefs.h.  */
13478
13479 /* Override any gcc2 internal prototype to avoid an error.  */
13480 #ifdef __cplusplus
13481 extern "C"
13482 #endif
13483 /* We use char because int might match the return type of a gcc2
13484    builtin and then its argument prototype would still apply.  */
13485 char res_search ();
13486 int
13487 main ()
13488 {
13489 res_search ();
13490   ;
13491   return 0;
13492 }
13493 _ACEOF
13494 rm -f conftest.$ac_objext conftest$ac_exeext
13495 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13496   (eval $ac_link) 2>conftest.er1
13497   ac_status=$?
13498   grep -v '^ *+' conftest.er1 >conftest.err
13499   rm -f conftest.er1
13500   cat conftest.err >&5
13501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13502   (exit $ac_status); } &&
13503          { ac_try='test -z "$ac_c_werror_flag"
13504                          || test ! -s conftest.err'
13505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13506   (eval $ac_try) 2>&5
13507   ac_status=$?
13508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13509   (exit $ac_status); }; } &&
13510          { ac_try='test -s conftest$ac_exeext'
13511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13512   (eval $ac_try) 2>&5
13513   ac_status=$?
13514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13515   (exit $ac_status); }; }; then
13516   ac_cv_lib_resolv_res_search=yes
13517 else
13518   echo "$as_me: failed program was:" >&5
13519 sed 's/^/| /' conftest.$ac_ext >&5
13520
13521 ac_cv_lib_resolv_res_search=no
13522 fi
13523 rm -f conftest.err conftest.$ac_objext \
13524       conftest$ac_exeext conftest.$ac_ext
13525 LIBS=$ac_check_lib_save_LIBS
13526 fi
13527 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
13528 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
13529 if test $ac_cv_lib_resolv_res_search = yes; then
13530   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
13531 else
13532   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
13533 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
13534
13535 fi
13536
13537 fi
13538
13539   fi
13540 fi
13541
13542
13543 ###############################################################################
13544 #
13545 #       Check for the nine billion variants of shadow passwords...
13546 #
13547 ###############################################################################
13548
13549 need_setuid=no
13550
13551 have_shadow=no
13552 with_shadow_req=unspecified
13553
13554
13555 # Check whether --with-shadow or --without-shadow was given.
13556 if test "${with_shadow+set}" = set; then
13557   withval="$with_shadow"
13558   with_shadow="$withval"; with_shadow_req="$withval"
13559 else
13560   with_shadow=yes
13561 fi;
13562
13563
13564    case "$with_shadow" in
13565     yes) ;;
13566     no)  ;;
13567
13568     /*)
13569      echo "$as_me:$LINENO: checking for shadow password headers" >&5
13570 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
13571      d=$with_shadow/include
13572      if test -d $d; then
13573        X_CFLAGS="-I$d $X_CFLAGS"
13574        echo "$as_me:$LINENO: result: $d" >&5
13575 echo "${ECHO_T}$d" >&6
13576      else
13577        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13578 echo "${ECHO_T}not found ($d: no such directory)" >&6
13579      fi
13580
13581      echo "$as_me:$LINENO: checking for shadow password libs" >&5
13582 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
13583      d=$with_shadow/lib
13584      if test -d $d; then
13585        X_LIBS="-L$d $X_LIBS"
13586        echo "$as_me:$LINENO: result: $d" >&5
13587 echo "${ECHO_T}$d" >&6
13588      else
13589        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13590 echo "${ECHO_T}not found ($d: no such directory)" >&6
13591      fi
13592
13593      # replace the directory string with "yes".
13594      with_shadow_req="yes"
13595      with_shadow=$with_shadow_req
13596      ;;
13597
13598     *)
13599      echo ""
13600      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
13601      echo "       If it is a directory, then \`DIR/include' will be added to"
13602      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13603      exit 1
13604      ;;
13605    esac
13606
13607
13608 if test "$enable_locking" = no ; then
13609   with_shadow_req=no
13610   with_shadow=no
13611 fi
13612
13613
13614 ###############################################################################
13615 #
13616 #       Check for Sun "adjunct" passwords.
13617 #
13618 ###############################################################################
13619
13620 if test "$with_shadow" = yes ; then
13621   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
13622 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
13623 if test "${ac_cv_sun_adjunct+set}" = set; then
13624   echo $ECHO_N "(cached) $ECHO_C" >&6
13625 else
13626
13627   ac_save_CPPFLAGS="$CPPFLAGS"
13628   if test \! -z "$includedir" ; then
13629     CPPFLAGS="$CPPFLAGS -I$includedir"
13630   fi
13631   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13632   cat >conftest.$ac_ext <<_ACEOF
13633 /* confdefs.h.  */
13634 _ACEOF
13635 cat confdefs.h >>conftest.$ac_ext
13636 cat >>conftest.$ac_ext <<_ACEOF
13637 /* end confdefs.h.  */
13638 #include <stdlib.h>
13639                                     #include <unistd.h>
13640                                     #include <sys/types.h>
13641                                     #include <sys/label.h>
13642                                     #include <sys/audit.h>
13643                                     #include <pwdadj.h>
13644 int
13645 main ()
13646 {
13647 struct passwd_adjunct *p = getpwanam("nobody");
13648                        const char *pw = p->pwa_passwd;
13649   ;
13650   return 0;
13651 }
13652 _ACEOF
13653 rm -f conftest.$ac_objext
13654 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13655   (eval $ac_compile) 2>conftest.er1
13656   ac_status=$?
13657   grep -v '^ *+' conftest.er1 >conftest.err
13658   rm -f conftest.er1
13659   cat conftest.err >&5
13660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13661   (exit $ac_status); } &&
13662          { ac_try='test -z "$ac_c_werror_flag"
13663                          || test ! -s conftest.err'
13664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13665   (eval $ac_try) 2>&5
13666   ac_status=$?
13667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13668   (exit $ac_status); }; } &&
13669          { ac_try='test -s conftest.$ac_objext'
13670   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13671   (eval $ac_try) 2>&5
13672   ac_status=$?
13673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13674   (exit $ac_status); }; }; then
13675   ac_cv_sun_adjunct=yes
13676 else
13677   echo "$as_me: failed program was:" >&5
13678 sed 's/^/| /' conftest.$ac_ext >&5
13679
13680 ac_cv_sun_adjunct=no
13681 fi
13682 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13683   CPPFLAGS="$ac_save_CPPFLAGS"
13684 fi
13685 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
13686 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
13687   if test "$ac_cv_sun_adjunct" = yes; then
13688     have_shadow_adjunct=yes
13689     have_shadow=yes
13690     need_setuid=yes
13691   fi
13692 fi
13693
13694
13695 ###############################################################################
13696 #
13697 #       Check for DEC and SCO so-called "enhanced" security.
13698 #
13699 ###############################################################################
13700
13701 if test "$with_shadow" = yes ; then
13702   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
13703 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
13704 if test "${ac_cv_enhanced_passwd+set}" = set; then
13705   echo $ECHO_N "(cached) $ECHO_C" >&6
13706 else
13707
13708   ac_save_CPPFLAGS="$CPPFLAGS"
13709   if test \! -z "$includedir" ; then
13710     CPPFLAGS="$CPPFLAGS -I$includedir"
13711   fi
13712   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13713   cat >conftest.$ac_ext <<_ACEOF
13714 /* confdefs.h.  */
13715 _ACEOF
13716 cat confdefs.h >>conftest.$ac_ext
13717 cat >>conftest.$ac_ext <<_ACEOF
13718 /* end confdefs.h.  */
13719 #include <stdlib.h>
13720                                     #include <unistd.h>
13721                                     #include <sys/types.h>
13722                                     #include <pwd.h>
13723                                     #include <sys/security.h>
13724                                     #include <prot.h>
13725 int
13726 main ()
13727 {
13728 struct pr_passwd *p;
13729                        const char *pw;
13730                        set_auth_parameters(0, 0);
13731                        check_auth_parameters();
13732                        p = getprpwnam("nobody");
13733                        pw = p->ufld.fd_encrypt;
13734   ;
13735   return 0;
13736 }
13737 _ACEOF
13738 rm -f conftest.$ac_objext
13739 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13740   (eval $ac_compile) 2>conftest.er1
13741   ac_status=$?
13742   grep -v '^ *+' conftest.er1 >conftest.err
13743   rm -f conftest.er1
13744   cat conftest.err >&5
13745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13746   (exit $ac_status); } &&
13747          { ac_try='test -z "$ac_c_werror_flag"
13748                          || test ! -s conftest.err'
13749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13750   (eval $ac_try) 2>&5
13751   ac_status=$?
13752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13753   (exit $ac_status); }; } &&
13754          { ac_try='test -s conftest.$ac_objext'
13755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13756   (eval $ac_try) 2>&5
13757   ac_status=$?
13758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13759   (exit $ac_status); }; }; then
13760   ac_cv_enhanced_passwd=yes
13761 else
13762   echo "$as_me: failed program was:" >&5
13763 sed 's/^/| /' conftest.$ac_ext >&5
13764
13765 ac_cv_enhanced_passwd=no
13766 fi
13767 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13768   CPPFLAGS="$ac_save_CPPFLAGS"
13769 fi
13770 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
13771 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
13772   if test $ac_cv_enhanced_passwd = yes; then
13773     have_shadow_enhanced=yes
13774     have_shadow=yes
13775     need_setuid=yes
13776
13777     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
13778     # (I'm told it needs -lcurses too, but I don't understand why.)
13779     # But on DEC, it's in -lsecurity.
13780     #
13781     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
13782 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
13783 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
13784   echo $ECHO_N "(cached) $ECHO_C" >&6
13785 else
13786   ac_check_lib_save_LIBS=$LIBS
13787 LIBS="-lprot -lx $LIBS"
13788 cat >conftest.$ac_ext <<_ACEOF
13789 /* confdefs.h.  */
13790 _ACEOF
13791 cat confdefs.h >>conftest.$ac_ext
13792 cat >>conftest.$ac_ext <<_ACEOF
13793 /* end confdefs.h.  */
13794
13795 /* Override any gcc2 internal prototype to avoid an error.  */
13796 #ifdef __cplusplus
13797 extern "C"
13798 #endif
13799 /* We use char because int might match the return type of a gcc2
13800    builtin and then its argument prototype would still apply.  */
13801 char getprpwnam ();
13802 int
13803 main ()
13804 {
13805 getprpwnam ();
13806   ;
13807   return 0;
13808 }
13809 _ACEOF
13810 rm -f conftest.$ac_objext conftest$ac_exeext
13811 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13812   (eval $ac_link) 2>conftest.er1
13813   ac_status=$?
13814   grep -v '^ *+' conftest.er1 >conftest.err
13815   rm -f conftest.er1
13816   cat conftest.err >&5
13817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13818   (exit $ac_status); } &&
13819          { ac_try='test -z "$ac_c_werror_flag"
13820                          || test ! -s conftest.err'
13821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13822   (eval $ac_try) 2>&5
13823   ac_status=$?
13824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13825   (exit $ac_status); }; } &&
13826          { ac_try='test -s conftest$ac_exeext'
13827   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13828   (eval $ac_try) 2>&5
13829   ac_status=$?
13830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13831   (exit $ac_status); }; }; then
13832   ac_cv_lib_prot_getprpwnam=yes
13833 else
13834   echo "$as_me: failed program was:" >&5
13835 sed 's/^/| /' conftest.$ac_ext >&5
13836
13837 ac_cv_lib_prot_getprpwnam=no
13838 fi
13839 rm -f conftest.err conftest.$ac_objext \
13840       conftest$ac_exeext conftest.$ac_ext
13841 LIBS=$ac_check_lib_save_LIBS
13842 fi
13843 echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
13844 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
13845 if test $ac_cv_lib_prot_getprpwnam = yes; then
13846   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
13847 else
13848   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
13849 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
13850 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
13851   echo $ECHO_N "(cached) $ECHO_C" >&6
13852 else
13853   ac_check_lib_save_LIBS=$LIBS
13854 LIBS="-lsecurity  $LIBS"
13855 cat >conftest.$ac_ext <<_ACEOF
13856 /* confdefs.h.  */
13857 _ACEOF
13858 cat confdefs.h >>conftest.$ac_ext
13859 cat >>conftest.$ac_ext <<_ACEOF
13860 /* end confdefs.h.  */
13861
13862 /* Override any gcc2 internal prototype to avoid an error.  */
13863 #ifdef __cplusplus
13864 extern "C"
13865 #endif
13866 /* We use char because int might match the return type of a gcc2
13867    builtin and then its argument prototype would still apply.  */
13868 char getprpwnam ();
13869 int
13870 main ()
13871 {
13872 getprpwnam ();
13873   ;
13874   return 0;
13875 }
13876 _ACEOF
13877 rm -f conftest.$ac_objext conftest$ac_exeext
13878 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13879   (eval $ac_link) 2>conftest.er1
13880   ac_status=$?
13881   grep -v '^ *+' conftest.er1 >conftest.err
13882   rm -f conftest.er1
13883   cat conftest.err >&5
13884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13885   (exit $ac_status); } &&
13886          { ac_try='test -z "$ac_c_werror_flag"
13887                          || test ! -s conftest.err'
13888   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13889   (eval $ac_try) 2>&5
13890   ac_status=$?
13891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13892   (exit $ac_status); }; } &&
13893          { ac_try='test -s conftest$ac_exeext'
13894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13895   (eval $ac_try) 2>&5
13896   ac_status=$?
13897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13898   (exit $ac_status); }; }; then
13899   ac_cv_lib_security_getprpwnam=yes
13900 else
13901   echo "$as_me: failed program was:" >&5
13902 sed 's/^/| /' conftest.$ac_ext >&5
13903
13904 ac_cv_lib_security_getprpwnam=no
13905 fi
13906 rm -f conftest.err conftest.$ac_objext \
13907       conftest$ac_exeext conftest.$ac_ext
13908 LIBS=$ac_check_lib_save_LIBS
13909 fi
13910 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
13911 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
13912 if test $ac_cv_lib_security_getprpwnam = yes; then
13913   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
13914 fi
13915
13916 fi
13917
13918   fi
13919 fi
13920
13921 ###############################################################################
13922 #
13923 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
13924 #
13925 ###############################################################################
13926
13927 if test "$with_shadow" = yes ; then
13928   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
13929 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
13930 if test "${ac_cv_hpux_passwd+set}" = set; then
13931   echo $ECHO_N "(cached) $ECHO_C" >&6
13932 else
13933
13934   ac_save_CPPFLAGS="$CPPFLAGS"
13935   if test \! -z "$includedir" ; then
13936     CPPFLAGS="$CPPFLAGS -I$includedir"
13937   fi
13938   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13939   cat >conftest.$ac_ext <<_ACEOF
13940 /* confdefs.h.  */
13941 _ACEOF
13942 cat confdefs.h >>conftest.$ac_ext
13943 cat >>conftest.$ac_ext <<_ACEOF
13944 /* end confdefs.h.  */
13945 #include <stdlib.h>
13946                                     #include <unistd.h>
13947                                     #include <sys/types.h>
13948                                     #include <pwd.h>
13949                                     #include <hpsecurity.h>
13950                                     #include <prot.h>
13951 int
13952 main ()
13953 {
13954 struct s_passwd *p = getspwnam("nobody");
13955                        const char *pw = p->pw_passwd;
13956   ;
13957   return 0;
13958 }
13959 _ACEOF
13960 rm -f conftest.$ac_objext
13961 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13962   (eval $ac_compile) 2>conftest.er1
13963   ac_status=$?
13964   grep -v '^ *+' conftest.er1 >conftest.err
13965   rm -f conftest.er1
13966   cat conftest.err >&5
13967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13968   (exit $ac_status); } &&
13969          { ac_try='test -z "$ac_c_werror_flag"
13970                          || test ! -s conftest.err'
13971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13972   (eval $ac_try) 2>&5
13973   ac_status=$?
13974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13975   (exit $ac_status); }; } &&
13976          { ac_try='test -s conftest.$ac_objext'
13977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13978   (eval $ac_try) 2>&5
13979   ac_status=$?
13980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13981   (exit $ac_status); }; }; then
13982   ac_cv_hpux_passwd=yes
13983 else
13984   echo "$as_me: failed program was:" >&5
13985 sed 's/^/| /' conftest.$ac_ext >&5
13986
13987 ac_cv_hpux_passwd=no
13988 fi
13989 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13990   CPPFLAGS="$ac_save_CPPFLAGS"
13991 fi
13992 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
13993 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
13994   if test "$ac_cv_hpux_passwd" = yes; then
13995     have_shadow_hpux=yes
13996     have_shadow=yes
13997     need_setuid=yes
13998
13999     # on HPUX, bigcrypt is in -lsec
14000     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
14001 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
14002 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
14003   echo $ECHO_N "(cached) $ECHO_C" >&6
14004 else
14005   ac_check_lib_save_LIBS=$LIBS
14006 LIBS="-lsec  $LIBS"
14007 cat >conftest.$ac_ext <<_ACEOF
14008 /* confdefs.h.  */
14009 _ACEOF
14010 cat confdefs.h >>conftest.$ac_ext
14011 cat >>conftest.$ac_ext <<_ACEOF
14012 /* end confdefs.h.  */
14013
14014 /* Override any gcc2 internal prototype to avoid an error.  */
14015 #ifdef __cplusplus
14016 extern "C"
14017 #endif
14018 /* We use char because int might match the return type of a gcc2
14019    builtin and then its argument prototype would still apply.  */
14020 char bigcrypt ();
14021 int
14022 main ()
14023 {
14024 bigcrypt ();
14025   ;
14026   return 0;
14027 }
14028 _ACEOF
14029 rm -f conftest.$ac_objext conftest$ac_exeext
14030 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14031   (eval $ac_link) 2>conftest.er1
14032   ac_status=$?
14033   grep -v '^ *+' conftest.er1 >conftest.err
14034   rm -f conftest.er1
14035   cat conftest.err >&5
14036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14037   (exit $ac_status); } &&
14038          { ac_try='test -z "$ac_c_werror_flag"
14039                          || test ! -s conftest.err'
14040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14041   (eval $ac_try) 2>&5
14042   ac_status=$?
14043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14044   (exit $ac_status); }; } &&
14045          { ac_try='test -s conftest$ac_exeext'
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); }; }; then
14051   ac_cv_lib_sec_bigcrypt=yes
14052 else
14053   echo "$as_me: failed program was:" >&5
14054 sed 's/^/| /' conftest.$ac_ext >&5
14055
14056 ac_cv_lib_sec_bigcrypt=no
14057 fi
14058 rm -f conftest.err conftest.$ac_objext \
14059       conftest$ac_exeext conftest.$ac_ext
14060 LIBS=$ac_check_lib_save_LIBS
14061 fi
14062 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
14063 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
14064 if test $ac_cv_lib_sec_bigcrypt = yes; then
14065   PASSWD_LIBS="$PASSWD_LIBS -lsec"
14066 fi
14067
14068   fi
14069 fi
14070
14071
14072 ###############################################################################
14073 #
14074 #       Check for FreeBSD-style shadow passwords.
14075 #
14076 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
14077 #       password systems -- except you only get stuff in the pw_passwd field
14078 #       if the running program is setuid.  So, guess that we've got this
14079 #       lossage to contend with if /etc/master.passwd exists, and default to
14080 #       a setuid installation.
14081 #
14082 ###############################################################################
14083
14084 if test "$with_shadow" = yes ; then
14085   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
14086 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
14087 if test "${ac_cv_master_passwd+set}" = set; then
14088   echo $ECHO_N "(cached) $ECHO_C" >&6
14089 else
14090   if test -f /etc/master.passwd ; then
14091                     ac_cv_master_passwd=yes
14092                   else
14093                     ac_cv_master_passwd=no
14094                   fi
14095 fi
14096 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
14097 echo "${ECHO_T}$ac_cv_master_passwd" >&6
14098   if test "$ac_cv_master_passwd" = yes; then
14099     need_setuid=yes
14100   fi
14101 fi
14102
14103
14104 ###############################################################################
14105 #
14106 #       Check for traditional (ha!) shadow passwords.
14107 #
14108 ###############################################################################
14109
14110 if test "$with_shadow" = yes ; then
14111   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
14112 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
14113 if test "${ac_cv_shadow+set}" = set; then
14114   echo $ECHO_N "(cached) $ECHO_C" >&6
14115 else
14116
14117   ac_save_CPPFLAGS="$CPPFLAGS"
14118   if test \! -z "$includedir" ; then
14119     CPPFLAGS="$CPPFLAGS -I$includedir"
14120   fi
14121   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14122   cat >conftest.$ac_ext <<_ACEOF
14123 /* confdefs.h.  */
14124 _ACEOF
14125 cat confdefs.h >>conftest.$ac_ext
14126 cat >>conftest.$ac_ext <<_ACEOF
14127 /* end confdefs.h.  */
14128 #include <stdlib.h>
14129                                     #include <unistd.h>
14130                                     #include <sys/types.h>
14131                                     #include <pwd.h>
14132                                     #include <shadow.h>
14133 int
14134 main ()
14135 {
14136 struct spwd *p = getspnam("nobody");
14137                        const char *pw = p->sp_pwdp;
14138   ;
14139   return 0;
14140 }
14141 _ACEOF
14142 rm -f conftest.$ac_objext
14143 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14144   (eval $ac_compile) 2>conftest.er1
14145   ac_status=$?
14146   grep -v '^ *+' conftest.er1 >conftest.err
14147   rm -f conftest.er1
14148   cat conftest.err >&5
14149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14150   (exit $ac_status); } &&
14151          { ac_try='test -z "$ac_c_werror_flag"
14152                          || test ! -s conftest.err'
14153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14154   (eval $ac_try) 2>&5
14155   ac_status=$?
14156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14157   (exit $ac_status); }; } &&
14158          { ac_try='test -s conftest.$ac_objext'
14159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14160   (eval $ac_try) 2>&5
14161   ac_status=$?
14162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14163   (exit $ac_status); }; }; then
14164   ac_cv_shadow=yes
14165 else
14166   echo "$as_me: failed program was:" >&5
14167 sed 's/^/| /' conftest.$ac_ext >&5
14168
14169 ac_cv_shadow=no
14170 fi
14171 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14172   CPPFLAGS="$ac_save_CPPFLAGS"
14173 fi
14174 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
14175 echo "${ECHO_T}$ac_cv_shadow" >&6
14176   if test "$ac_cv_shadow" = yes; then
14177     have_shadow=yes
14178     need_setuid=yes
14179
14180     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
14181     have_getspnam=no
14182     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
14183 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
14184 if test "${ac_cv_lib_c_getspnam+set}" = set; then
14185   echo $ECHO_N "(cached) $ECHO_C" >&6
14186 else
14187   ac_check_lib_save_LIBS=$LIBS
14188 LIBS="-lc  $LIBS"
14189 cat >conftest.$ac_ext <<_ACEOF
14190 /* confdefs.h.  */
14191 _ACEOF
14192 cat confdefs.h >>conftest.$ac_ext
14193 cat >>conftest.$ac_ext <<_ACEOF
14194 /* end confdefs.h.  */
14195
14196 /* Override any gcc2 internal prototype to avoid an error.  */
14197 #ifdef __cplusplus
14198 extern "C"
14199 #endif
14200 /* We use char because int might match the return type of a gcc2
14201    builtin and then its argument prototype would still apply.  */
14202 char getspnam ();
14203 int
14204 main ()
14205 {
14206 getspnam ();
14207   ;
14208   return 0;
14209 }
14210 _ACEOF
14211 rm -f conftest.$ac_objext conftest$ac_exeext
14212 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14213   (eval $ac_link) 2>conftest.er1
14214   ac_status=$?
14215   grep -v '^ *+' conftest.er1 >conftest.err
14216   rm -f conftest.er1
14217   cat conftest.err >&5
14218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14219   (exit $ac_status); } &&
14220          { ac_try='test -z "$ac_c_werror_flag"
14221                          || test ! -s conftest.err'
14222   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14223   (eval $ac_try) 2>&5
14224   ac_status=$?
14225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14226   (exit $ac_status); }; } &&
14227          { ac_try='test -s conftest$ac_exeext'
14228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14229   (eval $ac_try) 2>&5
14230   ac_status=$?
14231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14232   (exit $ac_status); }; }; then
14233   ac_cv_lib_c_getspnam=yes
14234 else
14235   echo "$as_me: failed program was:" >&5
14236 sed 's/^/| /' conftest.$ac_ext >&5
14237
14238 ac_cv_lib_c_getspnam=no
14239 fi
14240 rm -f conftest.err conftest.$ac_objext \
14241       conftest$ac_exeext conftest.$ac_ext
14242 LIBS=$ac_check_lib_save_LIBS
14243 fi
14244 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
14245 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
14246 if test $ac_cv_lib_c_getspnam = yes; then
14247   have_getspnam=yes
14248 fi
14249
14250     if test "$have_getspnam" = no ; then
14251       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
14252 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
14253 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
14254   echo $ECHO_N "(cached) $ECHO_C" >&6
14255 else
14256   ac_check_lib_save_LIBS=$LIBS
14257 LIBS="-lgen  $LIBS"
14258 cat >conftest.$ac_ext <<_ACEOF
14259 /* confdefs.h.  */
14260 _ACEOF
14261 cat confdefs.h >>conftest.$ac_ext
14262 cat >>conftest.$ac_ext <<_ACEOF
14263 /* end confdefs.h.  */
14264
14265 /* Override any gcc2 internal prototype to avoid an error.  */
14266 #ifdef __cplusplus
14267 extern "C"
14268 #endif
14269 /* We use char because int might match the return type of a gcc2
14270    builtin and then its argument prototype would still apply.  */
14271 char getspnam ();
14272 int
14273 main ()
14274 {
14275 getspnam ();
14276   ;
14277   return 0;
14278 }
14279 _ACEOF
14280 rm -f conftest.$ac_objext conftest$ac_exeext
14281 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14282   (eval $ac_link) 2>conftest.er1
14283   ac_status=$?
14284   grep -v '^ *+' conftest.er1 >conftest.err
14285   rm -f conftest.er1
14286   cat conftest.err >&5
14287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14288   (exit $ac_status); } &&
14289          { ac_try='test -z "$ac_c_werror_flag"
14290                          || test ! -s conftest.err'
14291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14292   (eval $ac_try) 2>&5
14293   ac_status=$?
14294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14295   (exit $ac_status); }; } &&
14296          { ac_try='test -s conftest$ac_exeext'
14297   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14298   (eval $ac_try) 2>&5
14299   ac_status=$?
14300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14301   (exit $ac_status); }; }; then
14302   ac_cv_lib_gen_getspnam=yes
14303 else
14304   echo "$as_me: failed program was:" >&5
14305 sed 's/^/| /' conftest.$ac_ext >&5
14306
14307 ac_cv_lib_gen_getspnam=no
14308 fi
14309 rm -f conftest.err conftest.$ac_objext \
14310       conftest$ac_exeext conftest.$ac_ext
14311 LIBS=$ac_check_lib_save_LIBS
14312 fi
14313 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
14314 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
14315 if test $ac_cv_lib_gen_getspnam = yes; then
14316   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
14317 fi
14318
14319     fi
14320   fi
14321 fi
14322
14323
14324 ###############################################################################
14325 #
14326 #       Check for other libraries needed for non-shadow passwords.
14327 #
14328 ###############################################################################
14329
14330 if test "$enable_locking" = yes ; then
14331
14332   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
14333   have_crypt=no
14334   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
14335 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
14336 if test "${ac_cv_lib_c_crypt+set}" = set; then
14337   echo $ECHO_N "(cached) $ECHO_C" >&6
14338 else
14339   ac_check_lib_save_LIBS=$LIBS
14340 LIBS="-lc  $LIBS"
14341 cat >conftest.$ac_ext <<_ACEOF
14342 /* confdefs.h.  */
14343 _ACEOF
14344 cat confdefs.h >>conftest.$ac_ext
14345 cat >>conftest.$ac_ext <<_ACEOF
14346 /* end confdefs.h.  */
14347
14348 /* Override any gcc2 internal prototype to avoid an error.  */
14349 #ifdef __cplusplus
14350 extern "C"
14351 #endif
14352 /* We use char because int might match the return type of a gcc2
14353    builtin and then its argument prototype would still apply.  */
14354 char crypt ();
14355 int
14356 main ()
14357 {
14358 crypt ();
14359   ;
14360   return 0;
14361 }
14362 _ACEOF
14363 rm -f conftest.$ac_objext conftest$ac_exeext
14364 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14365   (eval $ac_link) 2>conftest.er1
14366   ac_status=$?
14367   grep -v '^ *+' conftest.er1 >conftest.err
14368   rm -f conftest.er1
14369   cat conftest.err >&5
14370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14371   (exit $ac_status); } &&
14372          { ac_try='test -z "$ac_c_werror_flag"
14373                          || test ! -s conftest.err'
14374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14375   (eval $ac_try) 2>&5
14376   ac_status=$?
14377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14378   (exit $ac_status); }; } &&
14379          { ac_try='test -s conftest$ac_exeext'
14380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14381   (eval $ac_try) 2>&5
14382   ac_status=$?
14383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14384   (exit $ac_status); }; }; then
14385   ac_cv_lib_c_crypt=yes
14386 else
14387   echo "$as_me: failed program was:" >&5
14388 sed 's/^/| /' conftest.$ac_ext >&5
14389
14390 ac_cv_lib_c_crypt=no
14391 fi
14392 rm -f conftest.err conftest.$ac_objext \
14393       conftest$ac_exeext conftest.$ac_ext
14394 LIBS=$ac_check_lib_save_LIBS
14395 fi
14396 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
14397 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
14398 if test $ac_cv_lib_c_crypt = yes; then
14399   have_crypt=yes
14400 fi
14401
14402   if test "$have_crypt" = no ; then
14403     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14404 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
14405 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14406   echo $ECHO_N "(cached) $ECHO_C" >&6
14407 else
14408   ac_check_lib_save_LIBS=$LIBS
14409 LIBS="-lcrypt  $LIBS"
14410 cat >conftest.$ac_ext <<_ACEOF
14411 /* confdefs.h.  */
14412 _ACEOF
14413 cat confdefs.h >>conftest.$ac_ext
14414 cat >>conftest.$ac_ext <<_ACEOF
14415 /* end confdefs.h.  */
14416
14417 /* Override any gcc2 internal prototype to avoid an error.  */
14418 #ifdef __cplusplus
14419 extern "C"
14420 #endif
14421 /* We use char because int might match the return type of a gcc2
14422    builtin and then its argument prototype would still apply.  */
14423 char crypt ();
14424 int
14425 main ()
14426 {
14427 crypt ();
14428   ;
14429   return 0;
14430 }
14431 _ACEOF
14432 rm -f conftest.$ac_objext conftest$ac_exeext
14433 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14434   (eval $ac_link) 2>conftest.er1
14435   ac_status=$?
14436   grep -v '^ *+' conftest.er1 >conftest.err
14437   rm -f conftest.er1
14438   cat conftest.err >&5
14439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14440   (exit $ac_status); } &&
14441          { ac_try='test -z "$ac_c_werror_flag"
14442                          || test ! -s conftest.err'
14443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14444   (eval $ac_try) 2>&5
14445   ac_status=$?
14446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14447   (exit $ac_status); }; } &&
14448          { ac_try='test -s conftest$ac_exeext'
14449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14450   (eval $ac_try) 2>&5
14451   ac_status=$?
14452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14453   (exit $ac_status); }; }; then
14454   ac_cv_lib_crypt_crypt=yes
14455 else
14456   echo "$as_me: failed program was:" >&5
14457 sed 's/^/| /' conftest.$ac_ext >&5
14458
14459 ac_cv_lib_crypt_crypt=no
14460 fi
14461 rm -f conftest.err conftest.$ac_objext \
14462       conftest$ac_exeext conftest.$ac_ext
14463 LIBS=$ac_check_lib_save_LIBS
14464 fi
14465 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14466 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
14467 if test $ac_cv_lib_crypt_crypt = yes; then
14468   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14469 fi
14470
14471   fi
14472 fi
14473
14474
14475 # Most of the above shadow mechanisms will have set need_setuid to yes,
14476 # if they were found.  But, on some systems, we need setuid even when
14477 # using plain old vanilla passwords.
14478 #
14479 if test "$enable_locking" = yes ; then
14480   case "$host" in
14481     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
14482       need_setuid=yes
14483     ;;
14484   esac
14485 fi
14486
14487
14488 if test "$have_shadow_adjunct" = yes ; then
14489   cat >>confdefs.h <<\_ACEOF
14490 #define HAVE_ADJUNCT_PASSWD 1
14491 _ACEOF
14492
14493 elif test "$have_shadow_enhanced" = yes ; then
14494   cat >>confdefs.h <<\_ACEOF
14495 #define HAVE_ENHANCED_PASSWD 1
14496 _ACEOF
14497
14498 elif test "$have_shadow_hpux" = yes ; then
14499   cat >>confdefs.h <<\_ACEOF
14500 #define HAVE_HPUX_PASSWD 1
14501 _ACEOF
14502
14503 elif test "$have_shadow" = yes ; then
14504   cat >>confdefs.h <<\_ACEOF
14505 #define HAVE_SHADOW_PASSWD 1
14506 _ACEOF
14507
14508 fi
14509
14510
14511 ###############################################################################
14512 #
14513 #       Check for external password helper
14514 #       On SuSE, instead of having xscreensaver be a setuid program, they
14515 #       fork an external program that takes the password on stdin, and
14516 #       returns true if that password is a valid one.  Then only that
14517 #       smaller program needs to be setuid.
14518 #
14519 #       (Note that this external program is not a GUI: the GUI is still
14520 #       all in xscreensaver itself; the external program just does auth.)
14521 #
14522 ###############################################################################
14523
14524 have_passwd_helper=no
14525 with_passwd_helper_req=unspecified
14526
14527
14528 # Check whether --with-passwd-helper or --without-passwd-helper was given.
14529 if test "${with_passwd_helper+set}" = set; then
14530   withval="$with_passwd_helper"
14531   with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
14532 else
14533   with_passwd_helper=no
14534 fi;
14535 # no HANDLE_X_PATH_ARG for this one
14536
14537 if test "$enable_locking" = no ; then
14538   with_passwd_helper_req=no
14539   with_passwd_helper=no
14540 fi
14541
14542 case "$with_passwd_helper" in
14543   ""|no) : ;;
14544   /*)
14545     cat >>confdefs.h <<_ACEOF
14546 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
14547 _ACEOF
14548
14549     have_passwd_helper=yes;;
14550   *)
14551     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
14552     exit 1
14553 esac
14554
14555
14556 ###############################################################################
14557 #
14558 #       Check for a login manager for a "New Login" button on the lock dialog.
14559 #       Usually this will be "/usr/bin/gdmflexiserver".
14560 #
14561 ###############################################################################
14562
14563 have_login_manager=no
14564 with_login_manager_req=unspecified
14565 default_login_manager='gdmflexiserver -l'
14566
14567
14568 # Check whether --with-login-manager or --without-login-manager was given.
14569 if test "${with_login_manager+set}" = set; then
14570   withval="$with_login_manager"
14571   with_login_manager="$withval"; with_login_manager_req="$withval"
14572 else
14573   with_login_manager=no
14574 fi;
14575 # no HANDLE_X_PATH_ARG for this one
14576
14577 if test "$enable_locking" = no ; then
14578   with_login_manager_req=no
14579   with_login_manager=no
14580 fi
14581
14582 if test -n "$with_login_manager_req" ; then
14583   ac_cv_login_manager_program=""
14584
14585  if test "$with_login_manager_req" = "yes" ; then
14586    with_login_manager_req=$default_login_manager
14587  fi
14588
14589   case "$with_login_manager_req" in
14590     /*)
14591       # absolute path
14592       set dummy $with_login_manager_req ; login_manager_tmp=$2
14593       echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
14594 echo $ECHO_N "checking for $login_manager_tmp... $ECHO_C" >&6
14595       if test -x "$login_manager_tmp" ; then
14596         echo "$as_me:$LINENO: result: yes" >&5
14597 echo "${ECHO_T}yes" >&6
14598       else
14599         echo "$as_me:$LINENO: result: no" >&5
14600 echo "${ECHO_T}no" >&6
14601         with_login_manager=""
14602       fi
14603     ;;
14604     *)
14605       # relative path
14606       set dummy $with_login_manager_req ; login_manager_tmp=$2
14607       # don't cache
14608       unset ac_cv_path_login_manager_tmp
14609       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
14610 set dummy $login_manager_tmp; ac_word=$2
14611 echo "$as_me:$LINENO: checking for $ac_word" >&5
14612 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14613 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
14614   echo $ECHO_N "(cached) $ECHO_C" >&6
14615 else
14616   case $login_manager_tmp in
14617   [\\/]* | ?:[\\/]*)
14618   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
14619   ;;
14620   *)
14621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14622 for as_dir in $PATH
14623 do
14624   IFS=$as_save_IFS
14625   test -z "$as_dir" && as_dir=.
14626   for ac_exec_ext in '' $ac_executable_extensions; do
14627   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14628     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
14629     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14630     break 2
14631   fi
14632 done
14633 done
14634
14635   ;;
14636 esac
14637 fi
14638 login_manager_tmp=$ac_cv_path_login_manager_tmp
14639
14640 if test -n "$login_manager_tmp"; then
14641   echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
14642 echo "${ECHO_T}$login_manager_tmp" >&6
14643 else
14644   echo "$as_me:$LINENO: result: no" >&5
14645 echo "${ECHO_T}no" >&6
14646 fi
14647
14648       if test -z "$login_manager_tmp" ; then
14649         with_login_manager=""
14650       else
14651         with_login_manager="$login_manager_tmp"
14652       fi
14653     ;;
14654   esac
14655   ac_cv_login_manager_program="$with_login_manager"
14656
14657 elif test -n "$ac_cv_login_manager_program"; then
14658   echo "$as_me:$LINENO: result: checking for login_manager... (cached) $ac_cv_login_manager_program" >&5
14659 echo "${ECHO_T}checking for login_manager... (cached) $ac_cv_login_manager_program" >&6
14660 fi
14661
14662 NEW_LOGIN_COMMAND_P=''
14663 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
14664
14665 if test -z "$NEW_LOGIN_COMMAND" ; then
14666   NEW_LOGIN_COMMAND="$default_login_manager"
14667   NEW_LOGIN_COMMAND_P='! '
14668 fi
14669
14670
14671
14672 ###############################################################################
14673 #
14674 #       Check for -lgtk (and Gnome stuff)
14675 #
14676 ###############################################################################
14677
14678 have_gtk=no
14679 with_gtk_req=unspecified
14680
14681 # Check whether --with-gtk or --without-gtk was given.
14682 if test "${with_gtk+set}" = set; then
14683   withval="$with_gtk"
14684   with_gtk="$withval"; with_gtk_req="$withval"
14685 else
14686   with_gtk=yes
14687 fi;
14688
14689 # if --with-gtk=/directory/ was specified, remember that directory so that
14690 # we can also look for the `gtk-config' program in that directory.
14691 case "$with_gtk" in
14692   /*)
14693     gtk_dir="$with_gtk"
14694     ;;
14695   *)
14696     gtk_dir=""
14697     ;;
14698 esac
14699
14700
14701    case "$with_gtk" in
14702     yes) ;;
14703     no)  ;;
14704
14705     /*)
14706      echo "$as_me:$LINENO: checking for Gtk headers" >&5
14707 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
14708      d=$with_gtk/include
14709      if test -d $d; then
14710        X_CFLAGS="-I$d $X_CFLAGS"
14711        echo "$as_me:$LINENO: result: $d" >&5
14712 echo "${ECHO_T}$d" >&6
14713      else
14714        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14715 echo "${ECHO_T}not found ($d: no such directory)" >&6
14716      fi
14717
14718      echo "$as_me:$LINENO: checking for Gtk libs" >&5
14719 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
14720      d=$with_gtk/lib
14721      if test -d $d; then
14722        X_LIBS="-L$d $X_LIBS"
14723        echo "$as_me:$LINENO: result: $d" >&5
14724 echo "${ECHO_T}$d" >&6
14725      else
14726        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14727 echo "${ECHO_T}not found ($d: no such directory)" >&6
14728      fi
14729
14730      # replace the directory string with "yes".
14731      with_gtk_req="yes"
14732      with_gtk=$with_gtk_req
14733      ;;
14734
14735     *)
14736      echo ""
14737      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
14738      echo "       If it is a directory, then \`DIR/include' will be added to"
14739      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14740      exit 1
14741      ;;
14742    esac
14743
14744
14745 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
14746   echo "error: must be yes or no: --with-gtk=$with_gtk"
14747   exit 1
14748 fi
14749
14750
14751 parse_gtk_version_string() {
14752   # M4 sucks!!
14753
14754   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
14755   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
14756
14757   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
14758   if test -z "$ac_gtk_version"; then
14759     ac_gtk_version=unknown
14760     ac_gtk_version_string=unknown
14761   fi
14762 }
14763
14764 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
14765 # if the user specified --with-gtk=/foo/ then look there.
14766 #
14767 gtk_path="$PATH"
14768 if test ! -z "$gtk_dir"; then
14769   # canonicalize slashes.
14770   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
14771   gtk_path="$foo:$gtk_path"
14772 fi
14773
14774 for ac_prog in pkg-config
14775 do
14776   # Extract the first word of "$ac_prog", so it can be a program name with args.
14777 set dummy $ac_prog; ac_word=$2
14778 echo "$as_me:$LINENO: checking for $ac_word" >&5
14779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14780 if test "${ac_cv_path_pkg_config+set}" = set; then
14781   echo $ECHO_N "(cached) $ECHO_C" >&6
14782 else
14783   case $pkg_config in
14784   [\\/]* | ?:[\\/]*)
14785   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
14786   ;;
14787   *)
14788   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14789 for as_dir in $gtk_path
14790 do
14791   IFS=$as_save_IFS
14792   test -z "$as_dir" && as_dir=.
14793   for ac_exec_ext in '' $ac_executable_extensions; do
14794   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14795     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
14796     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14797     break 2
14798   fi
14799 done
14800 done
14801
14802   ;;
14803 esac
14804 fi
14805 pkg_config=$ac_cv_path_pkg_config
14806
14807 if test -n "$pkg_config"; then
14808   echo "$as_me:$LINENO: result: $pkg_config" >&5
14809 echo "${ECHO_T}$pkg_config" >&6
14810 else
14811   echo "$as_me:$LINENO: result: no" >&5
14812 echo "${ECHO_T}no" >&6
14813 fi
14814
14815   test -n "$pkg_config" && break
14816 done
14817
14818
14819 if test -z "$pkg_config" ; then
14820   { echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
14821 echo "$as_me: WARNING: pkg-config not found!" >&2;}
14822   pkg_config="false"
14823 fi
14824
14825
14826 # Utility function for running pkg-config-based tests...
14827 #
14828 pkgs=''
14829 pkg_check_version() {
14830   if test "$ok" = yes ; then
14831     req="$1"
14832     min="$2"
14833     echo "$as_me:$LINENO: checking for $req" >&5
14834 echo $ECHO_N "checking for $req... $ECHO_C" >&6
14835     if $pkg_config --exists "$req" ; then
14836       vers=`$pkg_config --modversion "$req"`
14837       if $pkg_config --exists "$req >= $min" ; then
14838         echo "$as_me:$LINENO: result: $vers" >&5
14839 echo "${ECHO_T}$vers" >&6
14840         pkgs="$pkgs $req"
14841         return 1
14842       else
14843         echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
14844 echo "${ECHO_T}$vers (wanted >= $min)" >&6
14845         ok=no
14846         return 0
14847       fi
14848     else
14849       echo "$as_me:$LINENO: result: no" >&5
14850 echo "${ECHO_T}no" >&6
14851       ok=no
14852       return 0
14853     fi
14854   fi
14855 }
14856
14857
14858 jurassic_gtk=no
14859 gtk_halfassed=no
14860
14861 if test "$with_gtk" = yes; then
14862   have_gtk=no
14863
14864   ok="yes"
14865   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
14866   pkg_check_version         gmodule-2.0  2.0.0
14867   pkg_check_version          libxml-2.0  2.4.6
14868   pkg_check_version        libglade-2.0  1.99.0
14869   pkg_check_version      gdk-pixbuf-2.0  2.0.0
14870   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
14871   have_gtk="$ok"
14872
14873   if test "$have_gtk" = no; then
14874     if test -n "$ac_gtk_version_string" ; then
14875       gtk_halfassed="$ac_gtk_version_string"
14876       gtk_halfassed_lib="$req"
14877     fi
14878   fi
14879
14880   if test "$have_gtk" = yes; then
14881     parse_gtk_version_string
14882     jurassic_gtk=no
14883   fi
14884
14885   if test "$have_gtk" = yes; then
14886     echo "$as_me:$LINENO: checking for Gtk includes" >&5
14887 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
14888 if test "${ac_cv_gtk_config_cflags+set}" = set; then
14889   echo $ECHO_N "(cached) $ECHO_C" >&6
14890 else
14891   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
14892 fi
14893 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
14894 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
14895     echo "$as_me:$LINENO: checking for Gtk libs" >&5
14896 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
14897 if test "${ac_cv_gtk_config_libs+set}" = set; then
14898   echo $ECHO_N "(cached) $ECHO_C" >&6
14899 else
14900   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
14901 fi
14902 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
14903 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
14904   fi
14905
14906   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
14907   ac_gtk_config_libs=$ac_cv_gtk_config_libs
14908
14909   GTK_EXTRA_OBJS=""
14910   GTK_DATADIR=""
14911   if test "$have_gtk" = yes; then
14912     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
14913     GTK_DATADIR="$GTK_DATADIR/share"
14914   fi
14915
14916   if test "$have_gtk" = yes; then
14917     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
14918     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
14919     cat >>confdefs.h <<\_ACEOF
14920 #define HAVE_GTK 1
14921 _ACEOF
14922
14923     cat >>confdefs.h <<\_ACEOF
14924 #define HAVE_GTK2 1
14925 _ACEOF
14926
14927     cat >>confdefs.h <<\_ACEOF
14928 #define HAVE_XML 1
14929 _ACEOF
14930
14931   fi
14932
14933 fi
14934
14935
14936 # Check for the various Gnome help and URL loading programs.
14937 #
14938 WITH_BROWSER=gnome-open
14939 if test "$have_gtk" = yes; then
14940   for ac_prog in gnome-open
14941 do
14942   # Extract the first word of "$ac_prog", so it can be a program name with args.
14943 set dummy $ac_prog; ac_word=$2
14944 echo "$as_me:$LINENO: checking for $ac_word" >&5
14945 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14946 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
14947   echo $ECHO_N "(cached) $ECHO_C" >&6
14948 else
14949   if test -n "$gnome_open_program"; then
14950   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
14951 else
14952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14953 for as_dir in $PATH
14954 do
14955   IFS=$as_save_IFS
14956   test -z "$as_dir" && as_dir=.
14957   for ac_exec_ext in '' $ac_executable_extensions; do
14958   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14959     ac_cv_prog_gnome_open_program="$ac_prog"
14960     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14961     break 2
14962   fi
14963 done
14964 done
14965
14966 fi
14967 fi
14968 gnome_open_program=$ac_cv_prog_gnome_open_program
14969 if test -n "$gnome_open_program"; then
14970   echo "$as_me:$LINENO: result: $gnome_open_program" >&5
14971 echo "${ECHO_T}$gnome_open_program" >&6
14972 else
14973   echo "$as_me:$LINENO: result: no" >&5
14974 echo "${ECHO_T}no" >&6
14975 fi
14976
14977   test -n "$gnome_open_program" && break
14978 done
14979
14980   for ac_prog in gnome-url-show
14981 do
14982   # Extract the first word of "$ac_prog", so it can be a program name with args.
14983 set dummy $ac_prog; ac_word=$2
14984 echo "$as_me:$LINENO: checking for $ac_word" >&5
14985 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14986 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
14987   echo $ECHO_N "(cached) $ECHO_C" >&6
14988 else
14989   if test -n "$gnome_url_show_program"; then
14990   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
14991 else
14992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14993 for as_dir in $PATH
14994 do
14995   IFS=$as_save_IFS
14996   test -z "$as_dir" && as_dir=.
14997   for ac_exec_ext in '' $ac_executable_extensions; do
14998   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14999     ac_cv_prog_gnome_url_show_program="$ac_prog"
15000     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15001     break 2
15002   fi
15003 done
15004 done
15005
15006 fi
15007 fi
15008 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
15009 if test -n "$gnome_url_show_program"; then
15010   echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
15011 echo "${ECHO_T}$gnome_url_show_program" >&6
15012 else
15013   echo "$as_me:$LINENO: result: no" >&5
15014 echo "${ECHO_T}no" >&6
15015 fi
15016
15017   test -n "$gnome_url_show_program" && break
15018 done
15019
15020 fi
15021
15022
15023 ###############################################################################
15024 #
15025 #       Check for -lXm.
15026 #
15027 ###############################################################################
15028
15029 have_motif=no
15030 with_motif_req=unspecified
15031
15032 # Check whether --with-motif or --without-motif was given.
15033 if test "${with_motif+set}" = set; then
15034   withval="$with_motif"
15035   with_motif="$withval"; with_motif_req="$withval"
15036 else
15037   with_motif=no
15038 fi;
15039
15040
15041    case "$with_motif" in
15042     yes) ;;
15043     no)  ;;
15044
15045     /*)
15046      echo "$as_me:$LINENO: checking for Motif headers" >&5
15047 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
15048      d=$with_motif/include
15049      if test -d $d; then
15050        X_CFLAGS="-I$d $X_CFLAGS"
15051        echo "$as_me:$LINENO: result: $d" >&5
15052 echo "${ECHO_T}$d" >&6
15053      else
15054        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15055 echo "${ECHO_T}not found ($d: no such directory)" >&6
15056      fi
15057
15058      echo "$as_me:$LINENO: checking for Motif libs" >&5
15059 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
15060      d=$with_motif/lib
15061      if test -d $d; then
15062        X_LIBS="-L$d $X_LIBS"
15063        echo "$as_me:$LINENO: result: $d" >&5
15064 echo "${ECHO_T}$d" >&6
15065      else
15066        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15067 echo "${ECHO_T}not found ($d: no such directory)" >&6
15068      fi
15069
15070      # replace the directory string with "yes".
15071      with_motif_req="yes"
15072      with_motif=$with_motif_req
15073      ;;
15074
15075     *)
15076      echo ""
15077      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
15078      echo "       If it is a directory, then \`DIR/include' will be added to"
15079      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15080      exit 1
15081      ;;
15082    esac
15083
15084
15085 if test "$with_motif" != yes -a "$with_motif" != no ; then
15086   echo "error: must be yes or no: --with-motif=$with_motif"
15087   exit 1
15088 fi
15089
15090 if test "$with_motif" = yes; then
15091   have_motif=no
15092
15093   ac_save_CPPFLAGS="$CPPFLAGS"
15094   if test \! -z "$includedir" ; then
15095     CPPFLAGS="$CPPFLAGS -I$includedir"
15096   fi
15097   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15098   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
15099 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
15100 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
15101   echo $ECHO_N "(cached) $ECHO_C" >&6
15102 else
15103   cat >conftest.$ac_ext <<_ACEOF
15104 /* confdefs.h.  */
15105 _ACEOF
15106 cat confdefs.h >>conftest.$ac_ext
15107 cat >>conftest.$ac_ext <<_ACEOF
15108 /* end confdefs.h.  */
15109 #include <stdlib.h>
15110                      #include <stdio.h>
15111                      #include <X11/Intrinsic.h>
15112
15113 #include <Xm/Xm.h>
15114 _ACEOF
15115 rm -f conftest.$ac_objext
15116 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15117   (eval $ac_compile) 2>conftest.er1
15118   ac_status=$?
15119   grep -v '^ *+' conftest.er1 >conftest.err
15120   rm -f conftest.er1
15121   cat conftest.err >&5
15122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15123   (exit $ac_status); } &&
15124          { ac_try='test -z "$ac_c_werror_flag"
15125                          || test ! -s conftest.err'
15126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15127   (eval $ac_try) 2>&5
15128   ac_status=$?
15129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15130   (exit $ac_status); }; } &&
15131          { ac_try='test -s conftest.$ac_objext'
15132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15133   (eval $ac_try) 2>&5
15134   ac_status=$?
15135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15136   (exit $ac_status); }; }; then
15137   ac_cv_header_Xm_Xm_h=yes
15138 else
15139   echo "$as_me: failed program was:" >&5
15140 sed 's/^/| /' conftest.$ac_ext >&5
15141
15142 ac_cv_header_Xm_Xm_h=no
15143 fi
15144 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15145 fi
15146 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
15147 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
15148 if test $ac_cv_header_Xm_Xm_h = yes; then
15149   have_motif=yes
15150                      cat >>confdefs.h <<\_ACEOF
15151 #define HAVE_MOTIF 1
15152 _ACEOF
15153
15154                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
15155 fi
15156
15157
15158   CPPFLAGS="$ac_save_CPPFLAGS"
15159 fi
15160
15161
15162 if test "$have_motif" = yes; then
15163
15164   ac_save_CPPFLAGS="$CPPFLAGS"
15165   if test \! -z "$includedir" ; then
15166     CPPFLAGS="$CPPFLAGS -I$includedir"
15167   fi
15168   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15169   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
15170 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
15171 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
15172   echo $ECHO_N "(cached) $ECHO_C" >&6
15173 else
15174   cat >conftest.$ac_ext <<_ACEOF
15175 /* confdefs.h.  */
15176 _ACEOF
15177 cat confdefs.h >>conftest.$ac_ext
15178 cat >>conftest.$ac_ext <<_ACEOF
15179 /* end confdefs.h.  */
15180 #include <stdlib.h>
15181                      #include <stdio.h>
15182                      #include <X11/Intrinsic.h>
15183
15184 #include <Xm/ComboBox.h>
15185 _ACEOF
15186 rm -f conftest.$ac_objext
15187 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15188   (eval $ac_compile) 2>conftest.er1
15189   ac_status=$?
15190   grep -v '^ *+' conftest.er1 >conftest.err
15191   rm -f conftest.er1
15192   cat conftest.err >&5
15193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15194   (exit $ac_status); } &&
15195          { ac_try='test -z "$ac_c_werror_flag"
15196                          || test ! -s conftest.err'
15197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15198   (eval $ac_try) 2>&5
15199   ac_status=$?
15200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15201   (exit $ac_status); }; } &&
15202          { ac_try='test -s conftest.$ac_objext'
15203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15204   (eval $ac_try) 2>&5
15205   ac_status=$?
15206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15207   (exit $ac_status); }; }; then
15208   ac_cv_header_Xm_ComboBox_h=yes
15209 else
15210   echo "$as_me: failed program was:" >&5
15211 sed 's/^/| /' conftest.$ac_ext >&5
15212
15213 ac_cv_header_Xm_ComboBox_h=no
15214 fi
15215 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15216 fi
15217 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
15218 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
15219 if test $ac_cv_header_Xm_ComboBox_h = yes; then
15220   cat >>confdefs.h <<\_ACEOF
15221 #define HAVE_XMCOMBOBOX 1
15222 _ACEOF
15223
15224 fi
15225
15226
15227   CPPFLAGS="$ac_save_CPPFLAGS"
15228 fi
15229
15230
15231 ###############################################################################
15232 #
15233 #       Checking whether Motif is really Lesstif.
15234 #
15235 ###############################################################################
15236
15237 have_lesstif=no
15238 if test "$have_motif" = yes ; then
15239   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
15240 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
15241 if test "${ac_cv_have_lesstif+set}" = set; then
15242   echo $ECHO_N "(cached) $ECHO_C" >&6
15243 else
15244
15245   ac_save_CPPFLAGS="$CPPFLAGS"
15246   if test \! -z "$includedir" ; then
15247     CPPFLAGS="$CPPFLAGS -I$includedir"
15248   fi
15249   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15250   cat >conftest.$ac_ext <<_ACEOF
15251 /* confdefs.h.  */
15252 _ACEOF
15253 cat confdefs.h >>conftest.$ac_ext
15254 cat >>conftest.$ac_ext <<_ACEOF
15255 /* end confdefs.h.  */
15256 #include <Xm/Xm.h>
15257 int
15258 main ()
15259 {
15260 long vers = LesstifVersion;
15261   ;
15262   return 0;
15263 }
15264 _ACEOF
15265 rm -f conftest.$ac_objext
15266 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15267   (eval $ac_compile) 2>conftest.er1
15268   ac_status=$?
15269   grep -v '^ *+' conftest.er1 >conftest.err
15270   rm -f conftest.er1
15271   cat conftest.err >&5
15272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15273   (exit $ac_status); } &&
15274          { ac_try='test -z "$ac_c_werror_flag"
15275                          || test ! -s conftest.err'
15276   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15277   (eval $ac_try) 2>&5
15278   ac_status=$?
15279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15280   (exit $ac_status); }; } &&
15281          { ac_try='test -s conftest.$ac_objext'
15282   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15283   (eval $ac_try) 2>&5
15284   ac_status=$?
15285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15286   (exit $ac_status); }; }; then
15287   ac_cv_have_lesstif=yes
15288 else
15289   echo "$as_me: failed program was:" >&5
15290 sed 's/^/| /' conftest.$ac_ext >&5
15291
15292 ac_cv_have_lesstif=no
15293 fi
15294 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15295   CPPFLAGS="$ac_save_CPPFLAGS"
15296 fi
15297 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
15298 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
15299   have_lesstif=$ac_cv_have_lesstif
15300 fi
15301
15302
15303 lesstif_version=unknown
15304 lesstif_version_string=unknown
15305
15306 if test "$have_lesstif" = yes ; then
15307   ltv=unknown
15308   echo unknown > conftest-lt
15309   echo "$as_me:$LINENO: checking LessTif version number" >&5
15310 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
15311 if test "${ac_cv_lesstif_version_string+set}" = set; then
15312   echo $ECHO_N "(cached) $ECHO_C" >&6
15313 else
15314
15315   ac_save_CPPFLAGS="$CPPFLAGS"
15316   if test \! -z "$includedir" ; then
15317     CPPFLAGS="$CPPFLAGS -I$includedir"
15318   fi
15319   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15320   if test "$cross_compiling" = yes; then
15321   ac_cv_lesstif_version=unknown
15322                      ac_cv_lesstif_version_string=unknown
15323 else
15324   cat >conftest.$ac_ext <<_ACEOF
15325 /* confdefs.h.  */
15326 _ACEOF
15327 cat confdefs.h >>conftest.$ac_ext
15328 cat >>conftest.$ac_ext <<_ACEOF
15329 /* end confdefs.h.  */
15330 #include <stdio.h>
15331                      #include <Xm/Xm.h>
15332                      int main() {
15333                        FILE *f = fopen("conftest-lt", "w");
15334                        if (!f) exit(1);
15335                        fprintf(f, "%d %d.%d\n", LesstifVersion,
15336                           LESSTIF_VERSION, LESSTIF_REVISION);
15337                        fclose(f);
15338                        exit(0);
15339                      }
15340 _ACEOF
15341 rm -f conftest$ac_exeext
15342 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15343   (eval $ac_link) 2>&5
15344   ac_status=$?
15345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15346   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15347   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15348   (eval $ac_try) 2>&5
15349   ac_status=$?
15350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15351   (exit $ac_status); }; }; then
15352   ltv=`cat conftest-lt`
15353                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
15354                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
15355 else
15356   echo "$as_me: program exited with status $ac_status" >&5
15357 echo "$as_me: failed program was:" >&5
15358 sed 's/^/| /' conftest.$ac_ext >&5
15359
15360 ( exit $ac_status )
15361 ac_cv_lesstif_version=unknown
15362                      ac_cv_lesstif_version_string=unknown
15363 fi
15364 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15365 fi
15366   CPPFLAGS="$ac_save_CPPFLAGS"
15367 fi
15368 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
15369 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
15370   rm -f conftest-lt
15371   lesstif_version=$ac_cv_lesstif_version
15372   lesstif_version_string=$ac_cv_lesstif_version_string
15373
15374 fi
15375
15376
15377 if test "$have_motif" = yes ; then
15378   mtv=unknown
15379   echo unknown > conftest-mt
15380   echo "$as_me:$LINENO: checking Motif version number" >&5
15381 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
15382 if test "${ac_cv_motif_version_string+set}" = set; then
15383   echo $ECHO_N "(cached) $ECHO_C" >&6
15384 else
15385
15386   ac_save_CPPFLAGS="$CPPFLAGS"
15387   if test \! -z "$includedir" ; then
15388     CPPFLAGS="$CPPFLAGS -I$includedir"
15389   fi
15390   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15391   if test "$cross_compiling" = yes; then
15392   ac_cv_motif_version=unknown
15393                      ac_cv_motif_version_string=unknown
15394 else
15395   cat >conftest.$ac_ext <<_ACEOF
15396 /* confdefs.h.  */
15397 _ACEOF
15398 cat confdefs.h >>conftest.$ac_ext
15399 cat >>conftest.$ac_ext <<_ACEOF
15400 /* end confdefs.h.  */
15401 #include <stdio.h>
15402                      #include <Xm/Xm.h>
15403                      int main() {
15404                        FILE *f = fopen("conftest-mt", "w");
15405                        if (!f) exit(1);
15406                        fprintf(f, "%d %d.%d\n", XmVersion,
15407                           XmVERSION, XmREVISION);
15408                        fclose(f);
15409                        exit(0);
15410                      }
15411 _ACEOF
15412 rm -f conftest$ac_exeext
15413 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15414   (eval $ac_link) 2>&5
15415   ac_status=$?
15416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15417   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15419   (eval $ac_try) 2>&5
15420   ac_status=$?
15421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15422   (exit $ac_status); }; }; then
15423   mtv=`cat conftest-mt`
15424                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
15425                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
15426 else
15427   echo "$as_me: program exited with status $ac_status" >&5
15428 echo "$as_me: failed program was:" >&5
15429 sed 's/^/| /' conftest.$ac_ext >&5
15430
15431 ( exit $ac_status )
15432 ac_cv_motif_version=unknown
15433                      ac_cv_motif_version_string=unknown
15434 fi
15435 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15436 fi
15437   CPPFLAGS="$ac_save_CPPFLAGS"
15438 fi
15439 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
15440 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
15441   rm -f conftest-mt
15442   motif_version=$ac_cv_motif_version
15443   motif_version_string=$ac_cv_motif_version_string
15444
15445 fi
15446
15447
15448 ###############################################################################
15449 #
15450 #       Checking whether Motif requires -lXpm.
15451 #
15452 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
15453 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
15454 #       of the library whether to build the XPM code into libXm, or whether
15455 #       to rely on an external libXm.  So the only way to tell whether XPM is
15456 #       a link-time requirement is to examine libXm.a, which is very
15457 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
15458 #       always link against XPM if the XPM lib exists (and this will be a
15459 #       no-op if libXm happens to already have the XPM code in it.)
15460 #
15461 ###############################################################################
15462
15463 motif_requires_xpm=no
15464 if test "$have_motif" = yes ; then
15465    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
15466 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
15467    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
15468    then
15469      motif_requires_xpm=yes
15470      echo "$as_me:$LINENO: result: maybe" >&5
15471 echo "${ECHO_T}maybe" >&6
15472    else
15473      echo "$as_me:$LINENO: result: no" >&5
15474 echo "${ECHO_T}no" >&6
15475    fi
15476 fi
15477
15478
15479 ###############################################################################
15480 #
15481 #       Checking whether Motif requires -lXp.
15482 #
15483 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
15484 #       Extension".   Why this extension isn't in -lXext with all the others,
15485 #       I have no idea.
15486 #
15487 ###############################################################################
15488
15489 have_xp_ext=no
15490 if test "$have_motif" = yes ; then
15491    have_xp_ext=no
15492
15493   ac_save_CPPFLAGS="$CPPFLAGS"
15494   ac_save_LDFLAGS="$LDFLAGS"
15495 #  ac_save_LIBS="$LIBS"
15496
15497   if test \! -z "$includedir" ; then
15498     CPPFLAGS="$CPPFLAGS -I$includedir"
15499   fi
15500   # note: $X_CFLAGS includes $x_includes
15501   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15502
15503   if test \! -z "$libdir" ; then
15504     LDFLAGS="$LDFLAGS -L$libdir"
15505   fi
15506   # note: $X_LIBS includes $x_libraries
15507   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15508
15509   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
15510 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
15511 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
15512   echo $ECHO_N "(cached) $ECHO_C" >&6
15513 else
15514   ac_check_lib_save_LIBS=$LIBS
15515 LIBS="-lXp -lX11 -lXext -lm $LIBS"
15516 cat >conftest.$ac_ext <<_ACEOF
15517 /* confdefs.h.  */
15518 _ACEOF
15519 cat confdefs.h >>conftest.$ac_ext
15520 cat >>conftest.$ac_ext <<_ACEOF
15521 /* end confdefs.h.  */
15522
15523 /* Override any gcc2 internal prototype to avoid an error.  */
15524 #ifdef __cplusplus
15525 extern "C"
15526 #endif
15527 /* We use char because int might match the return type of a gcc2
15528    builtin and then its argument prototype would still apply.  */
15529 char XpQueryExtension ();
15530 int
15531 main ()
15532 {
15533 XpQueryExtension ();
15534   ;
15535   return 0;
15536 }
15537 _ACEOF
15538 rm -f conftest.$ac_objext conftest$ac_exeext
15539 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15540   (eval $ac_link) 2>conftest.er1
15541   ac_status=$?
15542   grep -v '^ *+' conftest.er1 >conftest.err
15543   rm -f conftest.er1
15544   cat conftest.err >&5
15545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15546   (exit $ac_status); } &&
15547          { ac_try='test -z "$ac_c_werror_flag"
15548                          || test ! -s conftest.err'
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); }; } &&
15554          { ac_try='test -s conftest$ac_exeext'
15555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15556   (eval $ac_try) 2>&5
15557   ac_status=$?
15558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15559   (exit $ac_status); }; }; then
15560   ac_cv_lib_Xp_XpQueryExtension=yes
15561 else
15562   echo "$as_me: failed program was:" >&5
15563 sed 's/^/| /' conftest.$ac_ext >&5
15564
15565 ac_cv_lib_Xp_XpQueryExtension=no
15566 fi
15567 rm -f conftest.err conftest.$ac_objext \
15568       conftest$ac_exeext conftest.$ac_ext
15569 LIBS=$ac_check_lib_save_LIBS
15570 fi
15571 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
15572 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
15573 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
15574   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
15575 else
15576   true
15577 fi
15578
15579   CPPFLAGS="$ac_save_CPPFLAGS"
15580   LDFLAGS="$ac_save_LDFLAGS"
15581 #  LIBS="$ac_save_LIBS"
15582
15583 fi
15584
15585
15586 ###############################################################################
15587 #
15588 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
15589 #
15590 ###############################################################################
15591
15592 have_xintl=no
15593 if test "$have_motif" = yes ; then
15594
15595   ac_save_CPPFLAGS="$CPPFLAGS"
15596   ac_save_LDFLAGS="$LDFLAGS"
15597 #  ac_save_LIBS="$LIBS"
15598
15599   if test \! -z "$includedir" ; then
15600     CPPFLAGS="$CPPFLAGS -I$includedir"
15601   fi
15602   # note: $X_CFLAGS includes $x_includes
15603   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15604
15605   if test \! -z "$libdir" ; then
15606     LDFLAGS="$LDFLAGS -L$libdir"
15607   fi
15608   # note: $X_LIBS includes $x_libraries
15609   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15610
15611   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
15612 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
15613 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
15614   echo $ECHO_N "(cached) $ECHO_C" >&6
15615 else
15616   ac_check_lib_save_LIBS=$LIBS
15617 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
15618 cat >conftest.$ac_ext <<_ACEOF
15619 /* confdefs.h.  */
15620 _ACEOF
15621 cat confdefs.h >>conftest.$ac_ext
15622 cat >>conftest.$ac_ext <<_ACEOF
15623 /* end confdefs.h.  */
15624
15625 /* Override any gcc2 internal prototype to avoid an error.  */
15626 #ifdef __cplusplus
15627 extern "C"
15628 #endif
15629 /* We use char because int might match the return type of a gcc2
15630    builtin and then its argument prototype would still apply.  */
15631 char _Xsetlocale ();
15632 int
15633 main ()
15634 {
15635 _Xsetlocale ();
15636   ;
15637   return 0;
15638 }
15639 _ACEOF
15640 rm -f conftest.$ac_objext conftest$ac_exeext
15641 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15642   (eval $ac_link) 2>conftest.er1
15643   ac_status=$?
15644   grep -v '^ *+' conftest.er1 >conftest.err
15645   rm -f conftest.er1
15646   cat conftest.err >&5
15647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15648   (exit $ac_status); } &&
15649          { ac_try='test -z "$ac_c_werror_flag"
15650                          || test ! -s conftest.err'
15651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15652   (eval $ac_try) 2>&5
15653   ac_status=$?
15654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15655   (exit $ac_status); }; } &&
15656          { ac_try='test -s conftest$ac_exeext'
15657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15658   (eval $ac_try) 2>&5
15659   ac_status=$?
15660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15661   (exit $ac_status); }; }; then
15662   ac_cv_lib_Xintl__Xsetlocale=yes
15663 else
15664   echo "$as_me: failed program was:" >&5
15665 sed 's/^/| /' conftest.$ac_ext >&5
15666
15667 ac_cv_lib_Xintl__Xsetlocale=no
15668 fi
15669 rm -f conftest.err conftest.$ac_objext \
15670       conftest$ac_exeext conftest.$ac_ext
15671 LIBS=$ac_check_lib_save_LIBS
15672 fi
15673 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
15674 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
15675 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
15676   have_xintl=yes
15677 else
15678   have_xintl=no
15679 fi
15680
15681   CPPFLAGS="$ac_save_CPPFLAGS"
15682   LDFLAGS="$ac_save_LDFLAGS"
15683 #  LIBS="$ac_save_LIBS"
15684
15685   if test "$have_xintl" = yes; then
15686     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
15687   fi
15688 fi
15689
15690
15691 ###############################################################################
15692 #
15693 #       Check for -lGL or -lMesaGL.
15694 #
15695 ###############################################################################
15696
15697 have_gl=no
15698 ac_have_mesa_gl=no
15699 with_gl_req=unspecified
15700 gl_halfassed=no
15701
15702 # Check whether --with-gl or --without-gl was given.
15703 if test "${with_gl+set}" = set; then
15704   withval="$with_gl"
15705   with_gl="$withval"; with_gl_req="$withval"
15706 else
15707   with_gl=yes
15708 fi;
15709
15710
15711    case "$with_gl" in
15712     yes) ;;
15713     no)  ;;
15714
15715     /*)
15716      echo "$as_me:$LINENO: checking for GL headers" >&5
15717 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
15718      d=$with_gl/include
15719      if test -d $d; then
15720        X_CFLAGS="-I$d $X_CFLAGS"
15721        echo "$as_me:$LINENO: result: $d" >&5
15722 echo "${ECHO_T}$d" >&6
15723      else
15724        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15725 echo "${ECHO_T}not found ($d: no such directory)" >&6
15726      fi
15727
15728      echo "$as_me:$LINENO: checking for GL libs" >&5
15729 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
15730      d=$with_gl/lib
15731      if test -d $d; then
15732        X_LIBS="-L$d $X_LIBS"
15733        echo "$as_me:$LINENO: result: $d" >&5
15734 echo "${ECHO_T}$d" >&6
15735      else
15736        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15737 echo "${ECHO_T}not found ($d: no such directory)" >&6
15738      fi
15739
15740      # replace the directory string with "yes".
15741      with_gl_req="yes"
15742      with_gl=$with_gl_req
15743      ;;
15744
15745     *)
15746      echo ""
15747      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
15748      echo "       If it is a directory, then \`DIR/include' will be added to"
15749      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15750      exit 1
15751      ;;
15752    esac
15753
15754
15755 ac_mesagl_version=unknown
15756 ac_mesagl_version_string=unknown
15757
15758 if test "$with_gl" = yes; then
15759
15760   ac_save_CPPFLAGS="$CPPFLAGS"
15761   if test \! -z "$includedir" ; then
15762     CPPFLAGS="$CPPFLAGS -I$includedir"
15763   fi
15764   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15765   if test "${ac_cv_header_GL_gl_h+set}" = set; then
15766   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15767 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15768 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15769   echo $ECHO_N "(cached) $ECHO_C" >&6
15770 fi
15771 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15772 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15773 else
15774   # Is the header compilable?
15775 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
15776 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
15777 cat >conftest.$ac_ext <<_ACEOF
15778 /* confdefs.h.  */
15779 _ACEOF
15780 cat confdefs.h >>conftest.$ac_ext
15781 cat >>conftest.$ac_ext <<_ACEOF
15782 /* end confdefs.h.  */
15783 $ac_includes_default
15784 #include <GL/gl.h>
15785 _ACEOF
15786 rm -f conftest.$ac_objext
15787 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15788   (eval $ac_compile) 2>conftest.er1
15789   ac_status=$?
15790   grep -v '^ *+' conftest.er1 >conftest.err
15791   rm -f conftest.er1
15792   cat conftest.err >&5
15793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15794   (exit $ac_status); } &&
15795          { ac_try='test -z "$ac_c_werror_flag"
15796                          || test ! -s conftest.err'
15797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15798   (eval $ac_try) 2>&5
15799   ac_status=$?
15800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15801   (exit $ac_status); }; } &&
15802          { ac_try='test -s conftest.$ac_objext'
15803   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15804   (eval $ac_try) 2>&5
15805   ac_status=$?
15806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15807   (exit $ac_status); }; }; then
15808   ac_header_compiler=yes
15809 else
15810   echo "$as_me: failed program was:" >&5
15811 sed 's/^/| /' conftest.$ac_ext >&5
15812
15813 ac_header_compiler=no
15814 fi
15815 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15816 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15817 echo "${ECHO_T}$ac_header_compiler" >&6
15818
15819 # Is the header present?
15820 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
15821 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
15822 cat >conftest.$ac_ext <<_ACEOF
15823 /* confdefs.h.  */
15824 _ACEOF
15825 cat confdefs.h >>conftest.$ac_ext
15826 cat >>conftest.$ac_ext <<_ACEOF
15827 /* end confdefs.h.  */
15828 #include <GL/gl.h>
15829 _ACEOF
15830 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15831   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15832   ac_status=$?
15833   grep -v '^ *+' conftest.er1 >conftest.err
15834   rm -f conftest.er1
15835   cat conftest.err >&5
15836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15837   (exit $ac_status); } >/dev/null; then
15838   if test -s conftest.err; then
15839     ac_cpp_err=$ac_c_preproc_warn_flag
15840     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15841   else
15842     ac_cpp_err=
15843   fi
15844 else
15845   ac_cpp_err=yes
15846 fi
15847 if test -z "$ac_cpp_err"; then
15848   ac_header_preproc=yes
15849 else
15850   echo "$as_me: failed program was:" >&5
15851 sed 's/^/| /' conftest.$ac_ext >&5
15852
15853   ac_header_preproc=no
15854 fi
15855 rm -f conftest.err conftest.$ac_ext
15856 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15857 echo "${ECHO_T}$ac_header_preproc" >&6
15858
15859 # So?  What about this header?
15860 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15861   yes:no: )
15862     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
15863 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15864     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
15865 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
15866     ac_header_preproc=yes
15867     ;;
15868   no:yes:* )
15869     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
15870 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
15871     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
15872 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
15873     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
15874 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
15875     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
15876 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15877     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
15878 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
15879     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
15880 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
15881     (
15882       cat <<\_ASBOX
15883 ## ------------------------------------------ ##
15884 ## Report this to the AC_PACKAGE_NAME lists.  ##
15885 ## ------------------------------------------ ##
15886 _ASBOX
15887     ) |
15888       sed "s/^/$as_me: WARNING:     /" >&2
15889     ;;
15890 esac
15891 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15892 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15893 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15894   echo $ECHO_N "(cached) $ECHO_C" >&6
15895 else
15896   ac_cv_header_GL_gl_h=$ac_header_preproc
15897 fi
15898 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15899 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15900
15901 fi
15902 if test $ac_cv_header_GL_gl_h = yes; then
15903   have_gl=yes
15904 else
15905   have_gl=no
15906 fi
15907
15908
15909   CPPFLAGS="$ac_save_CPPFLAGS"
15910   if test "$have_gl" = yes ; then
15911
15912   ac_save_CPPFLAGS="$CPPFLAGS"
15913   if test \! -z "$includedir" ; then
15914     CPPFLAGS="$CPPFLAGS -I$includedir"
15915   fi
15916   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15917   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
15918 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
15919 if test "${ac_cv_header_GL_glx_h+set}" = set; then
15920   echo $ECHO_N "(cached) $ECHO_C" >&6
15921 else
15922   cat >conftest.$ac_ext <<_ACEOF
15923 /* confdefs.h.  */
15924 _ACEOF
15925 cat confdefs.h >>conftest.$ac_ext
15926 cat >>conftest.$ac_ext <<_ACEOF
15927 /* end confdefs.h.  */
15928 #include <GL/gl.h>
15929
15930 #include <GL/glx.h>
15931 _ACEOF
15932 rm -f conftest.$ac_objext
15933 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15934   (eval $ac_compile) 2>conftest.er1
15935   ac_status=$?
15936   grep -v '^ *+' conftest.er1 >conftest.err
15937   rm -f conftest.er1
15938   cat conftest.err >&5
15939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15940   (exit $ac_status); } &&
15941          { ac_try='test -z "$ac_c_werror_flag"
15942                          || test ! -s conftest.err'
15943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15944   (eval $ac_try) 2>&5
15945   ac_status=$?
15946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15947   (exit $ac_status); }; } &&
15948          { ac_try='test -s conftest.$ac_objext'
15949   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15950   (eval $ac_try) 2>&5
15951   ac_status=$?
15952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15953   (exit $ac_status); }; }; then
15954   ac_cv_header_GL_glx_h=yes
15955 else
15956   echo "$as_me: failed program was:" >&5
15957 sed 's/^/| /' conftest.$ac_ext >&5
15958
15959 ac_cv_header_GL_glx_h=no
15960 fi
15961 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15962 fi
15963 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
15964 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
15965 if test $ac_cv_header_GL_glx_h = yes; then
15966   have_gl=yes
15967 else
15968   have_gl=no
15969 fi
15970
15971
15972   CPPFLAGS="$ac_save_CPPFLAGS"
15973   fi
15974
15975   # If we have the headers, try and figure out which vendor it's from.
15976   #
15977   if test "$have_gl" = yes ; then
15978
15979     # We need to know whether it's MesaGL so that we know which libraries
15980     # to link against.
15981     #
15982     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
15983 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
15984 if test "${ac_cv_have_mesa_gl+set}" = set; then
15985   echo $ECHO_N "(cached) $ECHO_C" >&6
15986 else
15987   ac_cv_have_mesa_gl=no
15988
15989   ac_save_CPPFLAGS="$CPPFLAGS"
15990   if test \! -z "$includedir" ; then
15991     CPPFLAGS="$CPPFLAGS -I$includedir"
15992   fi
15993   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15994   cat >conftest.$ac_ext <<_ACEOF
15995 /* confdefs.h.  */
15996 _ACEOF
15997 cat confdefs.h >>conftest.$ac_ext
15998 cat >>conftest.$ac_ext <<_ACEOF
15999 /* end confdefs.h.  */
16000 #include <GL/glx.h>
16001
16002 _ACEOF
16003 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16004   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
16005   ac_cv_have_mesa_gl=yes
16006 fi
16007 rm -f conftest*
16008
16009   CPPFLAGS="$ac_save_CPPFLAGS"
16010
16011 fi
16012 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
16013 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
16014     ac_have_mesa_gl=$ac_cv_have_mesa_gl
16015
16016
16017     gl_lib_1=""
16018     GL_LIBS=""
16019
16020
16021     # Some versions of MesaGL are compiled to require -lpthread.
16022     # So if the Mesa headers exist, and -lpthread exists, then always
16023     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
16024     #
16025     if test "$ac_have_mesa_gl" = yes; then
16026       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16027 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
16028 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
16029   echo $ECHO_N "(cached) $ECHO_C" >&6
16030 else
16031   ac_check_lib_save_LIBS=$LIBS
16032 LIBS="-lpthread  $LIBS"
16033 cat >conftest.$ac_ext <<_ACEOF
16034 /* confdefs.h.  */
16035 _ACEOF
16036 cat confdefs.h >>conftest.$ac_ext
16037 cat >>conftest.$ac_ext <<_ACEOF
16038 /* end confdefs.h.  */
16039
16040 /* Override any gcc2 internal prototype to avoid an error.  */
16041 #ifdef __cplusplus
16042 extern "C"
16043 #endif
16044 /* We use char because int might match the return type of a gcc2
16045    builtin and then its argument prototype would still apply.  */
16046 char pthread_create ();
16047 int
16048 main ()
16049 {
16050 pthread_create ();
16051   ;
16052   return 0;
16053 }
16054 _ACEOF
16055 rm -f conftest.$ac_objext conftest$ac_exeext
16056 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16057   (eval $ac_link) 2>conftest.er1
16058   ac_status=$?
16059   grep -v '^ *+' conftest.er1 >conftest.err
16060   rm -f conftest.er1
16061   cat conftest.err >&5
16062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16063   (exit $ac_status); } &&
16064          { ac_try='test -z "$ac_c_werror_flag"
16065                          || test ! -s conftest.err'
16066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16067   (eval $ac_try) 2>&5
16068   ac_status=$?
16069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16070   (exit $ac_status); }; } &&
16071          { ac_try='test -s conftest$ac_exeext'
16072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16073   (eval $ac_try) 2>&5
16074   ac_status=$?
16075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16076   (exit $ac_status); }; }; then
16077   ac_cv_lib_pthread_pthread_create=yes
16078 else
16079   echo "$as_me: failed program was:" >&5
16080 sed 's/^/| /' conftest.$ac_ext >&5
16081
16082 ac_cv_lib_pthread_pthread_create=no
16083 fi
16084 rm -f conftest.err conftest.$ac_objext \
16085       conftest$ac_exeext conftest.$ac_ext
16086 LIBS=$ac_check_lib_save_LIBS
16087 fi
16088 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
16089 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
16090 if test $ac_cv_lib_pthread_pthread_create = yes; then
16091   GL_LIBS="-lpthread"
16092 fi
16093
16094     fi
16095
16096
16097     # If we have Mesa headers, check to see if we can link against -lMesaGL.
16098     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
16099     # Else, warn that GL is busted.  (We have the headers, but no libs.)
16100     #
16101
16102     if test "$ac_have_mesa_gl" = yes ; then
16103
16104   ac_save_CPPFLAGS="$CPPFLAGS"
16105   ac_save_LDFLAGS="$LDFLAGS"
16106 #  ac_save_LIBS="$LIBS"
16107
16108   if test \! -z "$includedir" ; then
16109     CPPFLAGS="$CPPFLAGS -I$includedir"
16110   fi
16111   # note: $X_CFLAGS includes $x_includes
16112   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16113
16114   if test \! -z "$libdir" ; then
16115     LDFLAGS="$LDFLAGS -L$libdir"
16116   fi
16117   # note: $X_LIBS includes $x_libraries
16118   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16119
16120   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
16121 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
16122 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
16123   echo $ECHO_N "(cached) $ECHO_C" >&6
16124 else
16125   ac_check_lib_save_LIBS=$LIBS
16126 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16127 cat >conftest.$ac_ext <<_ACEOF
16128 /* confdefs.h.  */
16129 _ACEOF
16130 cat confdefs.h >>conftest.$ac_ext
16131 cat >>conftest.$ac_ext <<_ACEOF
16132 /* end confdefs.h.  */
16133
16134 /* Override any gcc2 internal prototype to avoid an error.  */
16135 #ifdef __cplusplus
16136 extern "C"
16137 #endif
16138 /* We use char because int might match the return type of a gcc2
16139    builtin and then its argument prototype would still apply.  */
16140 char glXCreateContext ();
16141 int
16142 main ()
16143 {
16144 glXCreateContext ();
16145   ;
16146   return 0;
16147 }
16148 _ACEOF
16149 rm -f conftest.$ac_objext conftest$ac_exeext
16150 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16151   (eval $ac_link) 2>conftest.er1
16152   ac_status=$?
16153   grep -v '^ *+' conftest.er1 >conftest.err
16154   rm -f conftest.er1
16155   cat conftest.err >&5
16156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16157   (exit $ac_status); } &&
16158          { ac_try='test -z "$ac_c_werror_flag"
16159                          || test ! -s conftest.err'
16160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16161   (eval $ac_try) 2>&5
16162   ac_status=$?
16163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16164   (exit $ac_status); }; } &&
16165          { ac_try='test -s conftest$ac_exeext'
16166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16167   (eval $ac_try) 2>&5
16168   ac_status=$?
16169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16170   (exit $ac_status); }; }; then
16171   ac_cv_lib_MesaGL_glXCreateContext=yes
16172 else
16173   echo "$as_me: failed program was:" >&5
16174 sed 's/^/| /' conftest.$ac_ext >&5
16175
16176 ac_cv_lib_MesaGL_glXCreateContext=no
16177 fi
16178 rm -f conftest.err conftest.$ac_objext \
16179       conftest$ac_exeext conftest.$ac_ext
16180 LIBS=$ac_check_lib_save_LIBS
16181 fi
16182 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
16183 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
16184 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
16185   gl_lib_1="MesaGL"
16186                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
16187 fi
16188
16189   CPPFLAGS="$ac_save_CPPFLAGS"
16190   LDFLAGS="$ac_save_LDFLAGS"
16191 #  LIBS="$ac_save_LIBS"
16192
16193     fi
16194
16195     if test "$gl_lib_1" = "" ; then
16196
16197   ac_save_CPPFLAGS="$CPPFLAGS"
16198   ac_save_LDFLAGS="$LDFLAGS"
16199 #  ac_save_LIBS="$LIBS"
16200
16201   if test \! -z "$includedir" ; then
16202     CPPFLAGS="$CPPFLAGS -I$includedir"
16203   fi
16204   # note: $X_CFLAGS includes $x_includes
16205   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16206
16207   if test \! -z "$libdir" ; then
16208     LDFLAGS="$LDFLAGS -L$libdir"
16209   fi
16210   # note: $X_LIBS includes $x_libraries
16211   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16212
16213   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
16214 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
16215 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
16216   echo $ECHO_N "(cached) $ECHO_C" >&6
16217 else
16218   ac_check_lib_save_LIBS=$LIBS
16219 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
16220 cat >conftest.$ac_ext <<_ACEOF
16221 /* confdefs.h.  */
16222 _ACEOF
16223 cat confdefs.h >>conftest.$ac_ext
16224 cat >>conftest.$ac_ext <<_ACEOF
16225 /* end confdefs.h.  */
16226
16227 /* Override any gcc2 internal prototype to avoid an error.  */
16228 #ifdef __cplusplus
16229 extern "C"
16230 #endif
16231 /* We use char because int might match the return type of a gcc2
16232    builtin and then its argument prototype would still apply.  */
16233 char glXCreateContext ();
16234 int
16235 main ()
16236 {
16237 glXCreateContext ();
16238   ;
16239   return 0;
16240 }
16241 _ACEOF
16242 rm -f conftest.$ac_objext conftest$ac_exeext
16243 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16244   (eval $ac_link) 2>conftest.er1
16245   ac_status=$?
16246   grep -v '^ *+' conftest.er1 >conftest.err
16247   rm -f conftest.er1
16248   cat conftest.err >&5
16249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16250   (exit $ac_status); } &&
16251          { ac_try='test -z "$ac_c_werror_flag"
16252                          || test ! -s conftest.err'
16253   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16254   (eval $ac_try) 2>&5
16255   ac_status=$?
16256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16257   (exit $ac_status); }; } &&
16258          { ac_try='test -s conftest$ac_exeext'
16259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16260   (eval $ac_try) 2>&5
16261   ac_status=$?
16262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16263   (exit $ac_status); }; }; then
16264   ac_cv_lib_GL_glXCreateContext=yes
16265 else
16266   echo "$as_me: failed program was:" >&5
16267 sed 's/^/| /' conftest.$ac_ext >&5
16268
16269 ac_cv_lib_GL_glXCreateContext=no
16270 fi
16271 rm -f conftest.err conftest.$ac_objext \
16272       conftest$ac_exeext conftest.$ac_ext
16273 LIBS=$ac_check_lib_save_LIBS
16274 fi
16275 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
16276 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
16277 if test $ac_cv_lib_GL_glXCreateContext = yes; then
16278   gl_lib_1="GL"
16279                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
16280 fi
16281
16282   CPPFLAGS="$ac_save_CPPFLAGS"
16283   LDFLAGS="$ac_save_LDFLAGS"
16284 #  LIBS="$ac_save_LIBS"
16285
16286     fi
16287
16288     if test "$gl_lib_1" = "" ; then
16289       # we have headers, but no libs -- bail.
16290       have_gl=no
16291       ac_have_mesa_gl=no
16292       gl_halfassed=yes
16293     else
16294       # linking works -- we can build the GL hacks.
16295       cat >>confdefs.h <<\_ACEOF
16296 #define HAVE_GL 1
16297 _ACEOF
16298
16299       if test "$ac_have_mesa_gl" = yes ; then
16300         cat >>confdefs.h <<\_ACEOF
16301 #define HAVE_MESA_GL 1
16302 _ACEOF
16303
16304       fi
16305     fi
16306   fi
16307
16308
16309   # Now that we know we have GL headers and libs, do some more GL testing.
16310   #
16311
16312   if test "$have_gl" = yes ; then
16313     # If it's MesaGL, we'd like to issue a warning if the version number
16314     # is less than or equal to 2.6, because that version had a security bug.
16315     #
16316     if test "$ac_have_mesa_gl" = yes; then
16317
16318       echo "$as_me:$LINENO: checking MesaGL version number" >&5
16319 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
16320 if test "${ac_cv_mesagl_version_string+set}" = set; then
16321   echo $ECHO_N "(cached) $ECHO_C" >&6
16322 else
16323   cat > conftest.$ac_ext <<EOF
16324 #line 16328 "configure"
16325 #include "confdefs.h"
16326 #include <GL/gl.h>
16327 #ifndef MESA_MAJOR_VERSION
16328 # include <GL/xmesa.h>
16329 # ifdef XMESA_MAJOR_VERSION
16330    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
16331       we have to check the XMesa version number (the number of the X protocol
16332       support, which seems to be the same as the Mesa version number.)
16333     */
16334 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
16335 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
16336 # else
16337    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
16338       so we have no way of telling what version of Mesa this is at all.
16339       So, we'll guess that the osmesa version (the "offscreen protocol")
16340       is less than or equal to the real mesa version number.  Except that
16341       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
16342       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
16343     */
16344 # include <GL/osmesa.h>
16345 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
16346 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
16347 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
16348 #   undef MESA_MINOR_VERSION
16349 #   define MESA_MINOR_VERSION 4 or newer, probably?
16350 #  endif
16351 # endif
16352 #endif
16353 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
16354 EOF
16355
16356          ac_save_CPPFLAGS="$CPPFLAGS"
16357          if test \! -z "$includedir" ; then
16358            CPPFLAGS="$CPPFLAGS -I$includedir"
16359          fi
16360          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16361
16362          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
16363
16364          # M4 sucks!!
16365
16366           mglv=`echo "$mglv" | sed -n \
16367              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
16368
16369
16370          rm -f conftest.$ac_ext
16371
16372          CPPFLAGS="$ac_save_CPPFLAGS"
16373
16374          if test "$mglv" = ""; then
16375            ac_mesagl_version=unknown
16376            ac_mesagl_version_string=unknown
16377          else
16378            ac_mesagl_version_string="$mglv"
16379            # M4 sucks!!
16380
16381            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
16382            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
16383
16384            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
16385            if test -z "$ac_mesagl_version"; then
16386              ac_mesagl_version=unknown
16387              ac_mesagl_version_string=unknown
16388            fi
16389          fi
16390          ac_cv_mesagl_version=$ac_mesagl_version
16391          ac_cv_mesagl_version_string=$ac_mesagl_version_string
16392
16393 fi
16394 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
16395 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
16396       ac_mesagl_version=$ac_cv_mesagl_version
16397       ac_mesagl_version_string=$ac_cv_mesagl_version_string
16398     fi
16399
16400
16401     # Check for OpenGL 1.1 features.
16402     #
16403
16404   ac_save_CPPFLAGS="$CPPFLAGS"
16405   ac_save_LDFLAGS="$LDFLAGS"
16406 #  ac_save_LIBS="$LIBS"
16407
16408   if test \! -z "$includedir" ; then
16409     CPPFLAGS="$CPPFLAGS -I$includedir"
16410   fi
16411   # note: $X_CFLAGS includes $x_includes
16412   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16413
16414   if test \! -z "$libdir" ; then
16415     LDFLAGS="$LDFLAGS -L$libdir"
16416   fi
16417   # note: $X_LIBS includes $x_libraries
16418   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16419
16420   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
16421 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
16422 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
16423 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16424   echo $ECHO_N "(cached) $ECHO_C" >&6
16425 else
16426   ac_check_lib_save_LIBS=$LIBS
16427 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
16428 cat >conftest.$ac_ext <<_ACEOF
16429 /* confdefs.h.  */
16430 _ACEOF
16431 cat confdefs.h >>conftest.$ac_ext
16432 cat >>conftest.$ac_ext <<_ACEOF
16433 /* end confdefs.h.  */
16434
16435 /* Override any gcc2 internal prototype to avoid an error.  */
16436 #ifdef __cplusplus
16437 extern "C"
16438 #endif
16439 /* We use char because int might match the return type of a gcc2
16440    builtin and then its argument prototype would still apply.  */
16441 char glBindTexture ();
16442 int
16443 main ()
16444 {
16445 glBindTexture ();
16446   ;
16447   return 0;
16448 }
16449 _ACEOF
16450 rm -f conftest.$ac_objext conftest$ac_exeext
16451 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16452   (eval $ac_link) 2>conftest.er1
16453   ac_status=$?
16454   grep -v '^ *+' conftest.er1 >conftest.err
16455   rm -f conftest.er1
16456   cat conftest.err >&5
16457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16458   (exit $ac_status); } &&
16459          { ac_try='test -z "$ac_c_werror_flag"
16460                          || test ! -s conftest.err'
16461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16462   (eval $ac_try) 2>&5
16463   ac_status=$?
16464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16465   (exit $ac_status); }; } &&
16466          { ac_try='test -s conftest$ac_exeext'
16467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16468   (eval $ac_try) 2>&5
16469   ac_status=$?
16470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16471   (exit $ac_status); }; }; then
16472   eval "$as_ac_Lib=yes"
16473 else
16474   echo "$as_me: failed program was:" >&5
16475 sed 's/^/| /' conftest.$ac_ext >&5
16476
16477 eval "$as_ac_Lib=no"
16478 fi
16479 rm -f conftest.err conftest.$ac_objext \
16480       conftest$ac_exeext conftest.$ac_ext
16481 LIBS=$ac_check_lib_save_LIBS
16482 fi
16483 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16484 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16485 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16486   cat >>confdefs.h <<\_ACEOF
16487 #define HAVE_GLBINDTEXTURE 1
16488 _ACEOF
16489
16490 else
16491   true
16492 fi
16493
16494   CPPFLAGS="$ac_save_CPPFLAGS"
16495   LDFLAGS="$ac_save_LDFLAGS"
16496 #  LIBS="$ac_save_LIBS"
16497
16498   fi
16499
16500 elif test "$with_gl" != no; then
16501   echo "error: must be yes or no: --with-gl=$with_gl"
16502   exit 1
16503 fi
16504
16505
16506 ###############################################################################
16507 #
16508 #       Check for -lgle.
16509 #
16510 ###############################################################################
16511
16512 have_gle=no
16513 with_gle_req=unspecified
16514 gle_halfassed=no
16515
16516 # Check whether --with-gle or --without-gle was given.
16517 if test "${with_gle+set}" = set; then
16518   withval="$with_gle"
16519   with_gle="$withval"; with_gle_req="$withval"
16520 else
16521   with_gle=yes
16522 fi;
16523
16524
16525    case "$with_gle" in
16526     yes) ;;
16527     no)  ;;
16528
16529     /*)
16530      echo "$as_me:$LINENO: checking for GLE headers" >&5
16531 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
16532      d=$with_gle/include
16533      if test -d $d; then
16534        X_CFLAGS="-I$d $X_CFLAGS"
16535        echo "$as_me:$LINENO: result: $d" >&5
16536 echo "${ECHO_T}$d" >&6
16537      else
16538        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16539 echo "${ECHO_T}not found ($d: no such directory)" >&6
16540      fi
16541
16542      echo "$as_me:$LINENO: checking for GLE libs" >&5
16543 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
16544      d=$with_gle/lib
16545      if test -d $d; then
16546        X_LIBS="-L$d $X_LIBS"
16547        echo "$as_me:$LINENO: result: $d" >&5
16548 echo "${ECHO_T}$d" >&6
16549      else
16550        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16551 echo "${ECHO_T}not found ($d: no such directory)" >&6
16552      fi
16553
16554      # replace the directory string with "yes".
16555      with_gle_req="yes"
16556      with_gle=$with_gle_req
16557      ;;
16558
16559     *)
16560      echo ""
16561      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
16562      echo "       If it is a directory, then \`DIR/include' will be added to"
16563      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16564      exit 1
16565      ;;
16566    esac
16567
16568
16569 GLE_LIBS=""
16570
16571 if test "$have_gl" = no ; then
16572  true
16573 elif test "$with_gle" = yes; then
16574
16575
16576   ac_save_CPPFLAGS="$CPPFLAGS"
16577   if test \! -z "$includedir" ; then
16578     CPPFLAGS="$CPPFLAGS -I$includedir"
16579   fi
16580   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16581   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
16582 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
16583 if test "${ac_cv_header_GL_gle_h+set}" = set; then
16584   echo $ECHO_N "(cached) $ECHO_C" >&6
16585 else
16586   cat >conftest.$ac_ext <<_ACEOF
16587 /* confdefs.h.  */
16588 _ACEOF
16589 cat confdefs.h >>conftest.$ac_ext
16590 cat >>conftest.$ac_ext <<_ACEOF
16591 /* end confdefs.h.  */
16592 #include <GL/gl.h>
16593
16594 #include <GL/gle.h>
16595 _ACEOF
16596 rm -f conftest.$ac_objext
16597 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16598   (eval $ac_compile) 2>conftest.er1
16599   ac_status=$?
16600   grep -v '^ *+' conftest.er1 >conftest.err
16601   rm -f conftest.er1
16602   cat conftest.err >&5
16603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16604   (exit $ac_status); } &&
16605          { ac_try='test -z "$ac_c_werror_flag"
16606                          || test ! -s conftest.err'
16607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16608   (eval $ac_try) 2>&5
16609   ac_status=$?
16610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16611   (exit $ac_status); }; } &&
16612          { ac_try='test -s conftest.$ac_objext'
16613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16614   (eval $ac_try) 2>&5
16615   ac_status=$?
16616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16617   (exit $ac_status); }; }; then
16618   ac_cv_header_GL_gle_h=yes
16619 else
16620   echo "$as_me: failed program was:" >&5
16621 sed 's/^/| /' conftest.$ac_ext >&5
16622
16623 ac_cv_header_GL_gle_h=no
16624 fi
16625 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16626 fi
16627 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
16628 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
16629 if test $ac_cv_header_GL_gle_h = yes; then
16630   have_gle3=yes
16631 else
16632   have_gle3=no
16633 fi
16634
16635
16636   CPPFLAGS="$ac_save_CPPFLAGS"
16637   if test "$have_gle3" = yes ; then
16638     have_gle=yes;
16639   else
16640
16641   ac_save_CPPFLAGS="$CPPFLAGS"
16642   if test \! -z "$includedir" ; then
16643     CPPFLAGS="$CPPFLAGS -I$includedir"
16644   fi
16645   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16646   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
16647 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
16648 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
16649   echo $ECHO_N "(cached) $ECHO_C" >&6
16650 else
16651   cat >conftest.$ac_ext <<_ACEOF
16652 /* confdefs.h.  */
16653 _ACEOF
16654 cat confdefs.h >>conftest.$ac_ext
16655 cat >>conftest.$ac_ext <<_ACEOF
16656 /* end confdefs.h.  */
16657 #include <GL/gl.h>
16658
16659 #include <GL/gutil.h>
16660 _ACEOF
16661 rm -f conftest.$ac_objext
16662 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16663   (eval $ac_compile) 2>conftest.er1
16664   ac_status=$?
16665   grep -v '^ *+' conftest.er1 >conftest.err
16666   rm -f conftest.er1
16667   cat conftest.err >&5
16668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16669   (exit $ac_status); } &&
16670          { ac_try='test -z "$ac_c_werror_flag"
16671                          || test ! -s conftest.err'
16672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16673   (eval $ac_try) 2>&5
16674   ac_status=$?
16675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16676   (exit $ac_status); }; } &&
16677          { ac_try='test -s conftest.$ac_objext'
16678   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16679   (eval $ac_try) 2>&5
16680   ac_status=$?
16681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16682   (exit $ac_status); }; }; then
16683   ac_cv_header_GL_gutil_h=yes
16684 else
16685   echo "$as_me: failed program was:" >&5
16686 sed 's/^/| /' conftest.$ac_ext >&5
16687
16688 ac_cv_header_GL_gutil_h=no
16689 fi
16690 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16691 fi
16692 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
16693 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
16694 if test $ac_cv_header_GL_gutil_h = yes; then
16695   have_gle=yes
16696 else
16697   have_gle=no
16698 fi
16699
16700
16701   CPPFLAGS="$ac_save_CPPFLAGS"
16702     if test "$have_gle" = yes ; then
16703
16704   ac_save_CPPFLAGS="$CPPFLAGS"
16705   if test \! -z "$includedir" ; then
16706     CPPFLAGS="$CPPFLAGS -I$includedir"
16707   fi
16708   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16709   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
16710 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
16711 if test "${ac_cv_header_GL_tube_h+set}" = set; then
16712   echo $ECHO_N "(cached) $ECHO_C" >&6
16713 else
16714   cat >conftest.$ac_ext <<_ACEOF
16715 /* confdefs.h.  */
16716 _ACEOF
16717 cat confdefs.h >>conftest.$ac_ext
16718 cat >>conftest.$ac_ext <<_ACEOF
16719 /* end confdefs.h.  */
16720 #include <GL/gl.h>
16721
16722 #include <GL/tube.h>
16723 _ACEOF
16724 rm -f conftest.$ac_objext
16725 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16726   (eval $ac_compile) 2>conftest.er1
16727   ac_status=$?
16728   grep -v '^ *+' conftest.er1 >conftest.err
16729   rm -f conftest.er1
16730   cat conftest.err >&5
16731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16732   (exit $ac_status); } &&
16733          { ac_try='test -z "$ac_c_werror_flag"
16734                          || test ! -s conftest.err'
16735   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16736   (eval $ac_try) 2>&5
16737   ac_status=$?
16738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16739   (exit $ac_status); }; } &&
16740          { ac_try='test -s conftest.$ac_objext'
16741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16742   (eval $ac_try) 2>&5
16743   ac_status=$?
16744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16745   (exit $ac_status); }; }; then
16746   ac_cv_header_GL_tube_h=yes
16747 else
16748   echo "$as_me: failed program was:" >&5
16749 sed 's/^/| /' conftest.$ac_ext >&5
16750
16751 ac_cv_header_GL_tube_h=no
16752 fi
16753 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16754 fi
16755 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
16756 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
16757 if test $ac_cv_header_GL_tube_h = yes; then
16758   have_gle=yes
16759 else
16760   have_gle=no
16761 fi
16762
16763
16764   CPPFLAGS="$ac_save_CPPFLAGS"
16765     fi
16766   fi
16767
16768   if test "$have_gle" = yes ; then
16769     have_gle=no
16770     gle_halfassed=yes
16771
16772   ac_save_CPPFLAGS="$CPPFLAGS"
16773   ac_save_LDFLAGS="$LDFLAGS"
16774 #  ac_save_LIBS="$LIBS"
16775
16776   if test \! -z "$includedir" ; then
16777     CPPFLAGS="$CPPFLAGS -I$includedir"
16778   fi
16779   # note: $X_CFLAGS includes $x_includes
16780   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16781
16782   if test \! -z "$libdir" ; then
16783     LDFLAGS="$LDFLAGS -L$libdir"
16784   fi
16785   # note: $X_LIBS includes $x_libraries
16786   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16787
16788   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
16789 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
16790 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
16791   echo $ECHO_N "(cached) $ECHO_C" >&6
16792 else
16793   ac_check_lib_save_LIBS=$LIBS
16794 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16795 cat >conftest.$ac_ext <<_ACEOF
16796 /* confdefs.h.  */
16797 _ACEOF
16798 cat confdefs.h >>conftest.$ac_ext
16799 cat >>conftest.$ac_ext <<_ACEOF
16800 /* end confdefs.h.  */
16801
16802 /* Override any gcc2 internal prototype to avoid an error.  */
16803 #ifdef __cplusplus
16804 extern "C"
16805 #endif
16806 /* We use char because int might match the return type of a gcc2
16807    builtin and then its argument prototype would still apply.  */
16808 char gleCreateGC ();
16809 int
16810 main ()
16811 {
16812 gleCreateGC ();
16813   ;
16814   return 0;
16815 }
16816 _ACEOF
16817 rm -f conftest.$ac_objext conftest$ac_exeext
16818 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16819   (eval $ac_link) 2>conftest.er1
16820   ac_status=$?
16821   grep -v '^ *+' conftest.er1 >conftest.err
16822   rm -f conftest.er1
16823   cat conftest.err >&5
16824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16825   (exit $ac_status); } &&
16826          { ac_try='test -z "$ac_c_werror_flag"
16827                          || test ! -s conftest.err'
16828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16829   (eval $ac_try) 2>&5
16830   ac_status=$?
16831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16832   (exit $ac_status); }; } &&
16833          { ac_try='test -s conftest$ac_exeext'
16834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16835   (eval $ac_try) 2>&5
16836   ac_status=$?
16837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16838   (exit $ac_status); }; }; then
16839   ac_cv_lib_gle_gleCreateGC=yes
16840 else
16841   echo "$as_me: failed program was:" >&5
16842 sed 's/^/| /' conftest.$ac_ext >&5
16843
16844 ac_cv_lib_gle_gleCreateGC=no
16845 fi
16846 rm -f conftest.err conftest.$ac_objext \
16847       conftest$ac_exeext conftest.$ac_ext
16848 LIBS=$ac_check_lib_save_LIBS
16849 fi
16850 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
16851 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
16852 if test $ac_cv_lib_gle_gleCreateGC = yes; then
16853   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
16854 fi
16855
16856   CPPFLAGS="$ac_save_CPPFLAGS"
16857   LDFLAGS="$ac_save_LDFLAGS"
16858 #  LIBS="$ac_save_LIBS"
16859
16860   fi
16861   if test "$have_gle" = yes ; then
16862     have_gle=no
16863     gle_halfassed=yes
16864
16865     # sometimes the libmatrix stuff is included in libgle.  look there first.
16866 #
16867 # I don't get it.  For some reason, this test passes on SGI, as if
16868 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
16869 # Yet the link is succeeding.  Why???
16870 #
16871 #    AC_CHECK_X_LIB(gle, uview_direction_d,
16872 #                   [have_gle=yes; gle_halfassed=no],
16873 #                   [], $GL_LIBS -lX11 -lXext -lm)
16874
16875     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
16876     # *sigh*
16877     if test "$have_gle3" = yes ; then
16878
16879   ac_save_CPPFLAGS="$CPPFLAGS"
16880   ac_save_LDFLAGS="$LDFLAGS"
16881 #  ac_save_LIBS="$LIBS"
16882
16883   if test \! -z "$includedir" ; then
16884     CPPFLAGS="$CPPFLAGS -I$includedir"
16885   fi
16886   # note: $X_CFLAGS includes $x_includes
16887   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16888
16889   if test \! -z "$libdir" ; then
16890     LDFLAGS="$LDFLAGS -L$libdir"
16891   fi
16892   # note: $X_LIBS includes $x_libraries
16893   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16894
16895   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
16896 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
16897 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
16898   echo $ECHO_N "(cached) $ECHO_C" >&6
16899 else
16900   ac_check_lib_save_LIBS=$LIBS
16901 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16902 cat >conftest.$ac_ext <<_ACEOF
16903 /* confdefs.h.  */
16904 _ACEOF
16905 cat confdefs.h >>conftest.$ac_ext
16906 cat >>conftest.$ac_ext <<_ACEOF
16907 /* end confdefs.h.  */
16908
16909 /* Override any gcc2 internal prototype to avoid an error.  */
16910 #ifdef __cplusplus
16911 extern "C"
16912 #endif
16913 /* We use char because int might match the return type of a gcc2
16914    builtin and then its argument prototype would still apply.  */
16915 char uview_direction ();
16916 int
16917 main ()
16918 {
16919 uview_direction ();
16920   ;
16921   return 0;
16922 }
16923 _ACEOF
16924 rm -f conftest.$ac_objext conftest$ac_exeext
16925 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16926   (eval $ac_link) 2>conftest.er1
16927   ac_status=$?
16928   grep -v '^ *+' conftest.er1 >conftest.err
16929   rm -f conftest.er1
16930   cat conftest.err >&5
16931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16932   (exit $ac_status); } &&
16933          { ac_try='test -z "$ac_c_werror_flag"
16934                          || test ! -s conftest.err'
16935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16936   (eval $ac_try) 2>&5
16937   ac_status=$?
16938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16939   (exit $ac_status); }; } &&
16940          { ac_try='test -s conftest$ac_exeext'
16941   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16942   (eval $ac_try) 2>&5
16943   ac_status=$?
16944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16945   (exit $ac_status); }; }; then
16946   ac_cv_lib_gle_uview_direction=yes
16947 else
16948   echo "$as_me: failed program was:" >&5
16949 sed 's/^/| /' conftest.$ac_ext >&5
16950
16951 ac_cv_lib_gle_uview_direction=no
16952 fi
16953 rm -f conftest.err conftest.$ac_objext \
16954       conftest$ac_exeext conftest.$ac_ext
16955 LIBS=$ac_check_lib_save_LIBS
16956 fi
16957 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
16958 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
16959 if test $ac_cv_lib_gle_uview_direction = yes; then
16960   have_gle=yes; gle_halfassed=no
16961 fi
16962
16963   CPPFLAGS="$ac_save_CPPFLAGS"
16964   LDFLAGS="$ac_save_LDFLAGS"
16965 #  LIBS="$ac_save_LIBS"
16966
16967     fi
16968     # if it wasn't in libgle, then look in libmatrix.
16969     if test "$have_gle" = no ; then
16970
16971   ac_save_CPPFLAGS="$CPPFLAGS"
16972   ac_save_LDFLAGS="$LDFLAGS"
16973 #  ac_save_LIBS="$LIBS"
16974
16975   if test \! -z "$includedir" ; then
16976     CPPFLAGS="$CPPFLAGS -I$includedir"
16977   fi
16978   # note: $X_CFLAGS includes $x_includes
16979   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16980
16981   if test \! -z "$libdir" ; then
16982     LDFLAGS="$LDFLAGS -L$libdir"
16983   fi
16984   # note: $X_LIBS includes $x_libraries
16985   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16986
16987   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
16988 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
16989 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
16990   echo $ECHO_N "(cached) $ECHO_C" >&6
16991 else
16992   ac_check_lib_save_LIBS=$LIBS
16993 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
16994 cat >conftest.$ac_ext <<_ACEOF
16995 /* confdefs.h.  */
16996 _ACEOF
16997 cat confdefs.h >>conftest.$ac_ext
16998 cat >>conftest.$ac_ext <<_ACEOF
16999 /* end confdefs.h.  */
17000
17001 /* Override any gcc2 internal prototype to avoid an error.  */
17002 #ifdef __cplusplus
17003 extern "C"
17004 #endif
17005 /* We use char because int might match the return type of a gcc2
17006    builtin and then its argument prototype would still apply.  */
17007 char uview_direction_d ();
17008 int
17009 main ()
17010 {
17011 uview_direction_d ();
17012   ;
17013   return 0;
17014 }
17015 _ACEOF
17016 rm -f conftest.$ac_objext conftest$ac_exeext
17017 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17018   (eval $ac_link) 2>conftest.er1
17019   ac_status=$?
17020   grep -v '^ *+' conftest.er1 >conftest.err
17021   rm -f conftest.er1
17022   cat conftest.err >&5
17023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17024   (exit $ac_status); } &&
17025          { ac_try='test -z "$ac_c_werror_flag"
17026                          || test ! -s conftest.err'
17027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17028   (eval $ac_try) 2>&5
17029   ac_status=$?
17030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17031   (exit $ac_status); }; } &&
17032          { ac_try='test -s conftest$ac_exeext'
17033   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17034   (eval $ac_try) 2>&5
17035   ac_status=$?
17036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17037   (exit $ac_status); }; }; then
17038   ac_cv_lib_matrix_uview_direction_d=yes
17039 else
17040   echo "$as_me: failed program was:" >&5
17041 sed 's/^/| /' conftest.$ac_ext >&5
17042
17043 ac_cv_lib_matrix_uview_direction_d=no
17044 fi
17045 rm -f conftest.err conftest.$ac_objext \
17046       conftest$ac_exeext conftest.$ac_ext
17047 LIBS=$ac_check_lib_save_LIBS
17048 fi
17049 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
17050 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
17051 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
17052   have_gle=yes; gle_halfassed=no;
17053                       GLE_LIBS="$GLE_LIBS -lmatrix"
17054 fi
17055
17056   CPPFLAGS="$ac_save_CPPFLAGS"
17057   LDFLAGS="$ac_save_LDFLAGS"
17058 #  LIBS="$ac_save_LIBS"
17059
17060     fi
17061   fi
17062
17063   if test "$have_gle" = yes ; then
17064     cat >>confdefs.h <<\_ACEOF
17065 #define HAVE_GLE 1
17066 _ACEOF
17067
17068     if test "$have_gle3" = yes ; then
17069       cat >>confdefs.h <<\_ACEOF
17070 #define HAVE_GLE3 1
17071 _ACEOF
17072
17073     fi
17074   fi
17075
17076 elif test "$with_gle" != no; then
17077   echo "error: must be yes or no: --with-gle=$with_gle"
17078   exit 1
17079
17080 fi
17081
17082
17083 ###############################################################################
17084 #
17085 #       Check for -lgdk_pixbuf.
17086 #       These tests are for gdk_pixbuf usage of the hacks,
17087 #       not xscreensaver-demo (thus we have to test again to get
17088 #       the libraries right: don't want to pull in all of GTK
17089 #       for the hacks.)
17090 #
17091 ###############################################################################
17092
17093 have_gdk_pixbuf=no
17094 with_gdk_pixbuf_req=unspecified
17095
17096 # Check whether --with-pixbuf or --without-pixbuf was given.
17097 if test "${with_pixbuf+set}" = set; then
17098   withval="$with_pixbuf"
17099   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
17100 else
17101   with_gdk_pixbuf=yes
17102 fi;
17103
17104 # if --with-pixbuf=/directory/ was specified, remember that directory so that
17105 # we can also look for the `gdk-pixbuf-config' program in that directory.
17106 case "$with_gdk_pixbuf" in
17107   /*)
17108     gdk_pixbuf_dir="$with_gdk_pixbuf"
17109     ;;
17110   *)
17111     gdk_pixbuf_dir=""
17112     ;;
17113 esac
17114
17115
17116    case "$with_gdk_pixbuf" in
17117     yes) ;;
17118     no)  ;;
17119
17120     /*)
17121      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
17122 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
17123      d=$with_gdk_pixbuf/include
17124      if test -d $d; then
17125        X_CFLAGS="-I$d $X_CFLAGS"
17126        echo "$as_me:$LINENO: result: $d" >&5
17127 echo "${ECHO_T}$d" >&6
17128      else
17129        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17130 echo "${ECHO_T}not found ($d: no such directory)" >&6
17131      fi
17132
17133      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
17134 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
17135      d=$with_gdk_pixbuf/lib
17136      if test -d $d; then
17137        X_LIBS="-L$d $X_LIBS"
17138        echo "$as_me:$LINENO: result: $d" >&5
17139 echo "${ECHO_T}$d" >&6
17140      else
17141        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17142 echo "${ECHO_T}not found ($d: no such directory)" >&6
17143      fi
17144
17145      # replace the directory string with "yes".
17146      with_gdk_pixbuf_req="yes"
17147      with_gdk_pixbuf=$with_gdk_pixbuf_req
17148      ;;
17149
17150     *)
17151      echo ""
17152      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
17153      echo "       If it is a directory, then \`DIR/include' will be added to"
17154      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17155      exit 1
17156      ;;
17157    esac
17158
17159
17160 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
17161   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
17162   exit 1
17163 fi
17164
17165 if test "$with_gdk_pixbuf" = yes; then
17166   have_gdk_pixbuf=no
17167
17168   pkgs=''
17169   ok="yes"
17170
17171   pkg_check_version gdk-pixbuf-2.0      2.0.0
17172   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
17173   have_gdk_pixbuf="$ok"
17174
17175   if test "$have_gdk_pixbuf" = yes; then
17176     echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
17177 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
17178 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
17179   echo $ECHO_N "(cached) $ECHO_C" >&6
17180 else
17181   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
17182 fi
17183 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
17184 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
17185     echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
17186 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
17187 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
17188   echo $ECHO_N "(cached) $ECHO_C" >&6
17189 else
17190   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
17191 fi
17192 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
17193 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
17194   fi
17195
17196   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
17197   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
17198
17199
17200   if test "$have_gdk_pixbuf" = yes; then
17201     #
17202     # we appear to have pixbuf; check for headers/libs to be sure.
17203     #
17204     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
17205     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
17206
17207     have_gdk_pixbuf=no
17208
17209     # check for header A...
17210
17211   ac_save_CPPFLAGS="$CPPFLAGS"
17212   if test \! -z "$includedir" ; then
17213     CPPFLAGS="$CPPFLAGS -I$includedir"
17214   fi
17215   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17216   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17217   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17218 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
17219 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17220   echo $ECHO_N "(cached) $ECHO_C" >&6
17221 fi
17222 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17223 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
17224 else
17225   # Is the header compilable?
17226 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
17227 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
17228 cat >conftest.$ac_ext <<_ACEOF
17229 /* confdefs.h.  */
17230 _ACEOF
17231 cat confdefs.h >>conftest.$ac_ext
17232 cat >>conftest.$ac_ext <<_ACEOF
17233 /* end confdefs.h.  */
17234 $ac_includes_default
17235 #include <gdk-pixbuf/gdk-pixbuf.h>
17236 _ACEOF
17237 rm -f conftest.$ac_objext
17238 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17239   (eval $ac_compile) 2>conftest.er1
17240   ac_status=$?
17241   grep -v '^ *+' conftest.er1 >conftest.err
17242   rm -f conftest.er1
17243   cat conftest.err >&5
17244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17245   (exit $ac_status); } &&
17246          { ac_try='test -z "$ac_c_werror_flag"
17247                          || test ! -s conftest.err'
17248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17249   (eval $ac_try) 2>&5
17250   ac_status=$?
17251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17252   (exit $ac_status); }; } &&
17253          { ac_try='test -s conftest.$ac_objext'
17254   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17255   (eval $ac_try) 2>&5
17256   ac_status=$?
17257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17258   (exit $ac_status); }; }; then
17259   ac_header_compiler=yes
17260 else
17261   echo "$as_me: failed program was:" >&5
17262 sed 's/^/| /' conftest.$ac_ext >&5
17263
17264 ac_header_compiler=no
17265 fi
17266 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17267 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17268 echo "${ECHO_T}$ac_header_compiler" >&6
17269
17270 # Is the header present?
17271 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
17272 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
17273 cat >conftest.$ac_ext <<_ACEOF
17274 /* confdefs.h.  */
17275 _ACEOF
17276 cat confdefs.h >>conftest.$ac_ext
17277 cat >>conftest.$ac_ext <<_ACEOF
17278 /* end confdefs.h.  */
17279 #include <gdk-pixbuf/gdk-pixbuf.h>
17280 _ACEOF
17281 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17282   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17283   ac_status=$?
17284   grep -v '^ *+' conftest.er1 >conftest.err
17285   rm -f conftest.er1
17286   cat conftest.err >&5
17287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17288   (exit $ac_status); } >/dev/null; then
17289   if test -s conftest.err; then
17290     ac_cpp_err=$ac_c_preproc_warn_flag
17291     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17292   else
17293     ac_cpp_err=
17294   fi
17295 else
17296   ac_cpp_err=yes
17297 fi
17298 if test -z "$ac_cpp_err"; then
17299   ac_header_preproc=yes
17300 else
17301   echo "$as_me: failed program was:" >&5
17302 sed 's/^/| /' conftest.$ac_ext >&5
17303
17304   ac_header_preproc=no
17305 fi
17306 rm -f conftest.err conftest.$ac_ext
17307 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17308 echo "${ECHO_T}$ac_header_preproc" >&6
17309
17310 # So?  What about this header?
17311 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17312   yes:no: )
17313     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
17314 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17315     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
17316 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
17317     ac_header_preproc=yes
17318     ;;
17319   no:yes:* )
17320     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
17321 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
17322     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
17323 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
17324     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
17325 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
17326     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
17327 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17328     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
17329 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
17330     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
17331 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
17332     (
17333       cat <<\_ASBOX
17334 ## ------------------------------------------ ##
17335 ## Report this to the AC_PACKAGE_NAME lists.  ##
17336 ## ------------------------------------------ ##
17337 _ASBOX
17338     ) |
17339       sed "s/^/$as_me: WARNING:     /" >&2
17340     ;;
17341 esac
17342 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
17343 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
17344 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
17345   echo $ECHO_N "(cached) $ECHO_C" >&6
17346 else
17347   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
17348 fi
17349 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
17350 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
17351
17352 fi
17353 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
17354   have_gdk_pixbuf=yes
17355 fi
17356
17357
17358   CPPFLAGS="$ac_save_CPPFLAGS"
17359
17360     # if that worked, check for header B...
17361     if test "$have_gdk_pixbuf" = yes; then
17362       have_gdk_pixbuf=no
17363       gdk_pixbuf_halfassed=yes
17364
17365   ac_save_CPPFLAGS="$CPPFLAGS"
17366   if test \! -z "$includedir" ; then
17367     CPPFLAGS="$CPPFLAGS -I$includedir"
17368   fi
17369   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17370   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17371   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17372 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17373 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17374   echo $ECHO_N "(cached) $ECHO_C" >&6
17375 fi
17376 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17377 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
17378 else
17379   # Is the header compilable?
17380 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
17381 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
17382 cat >conftest.$ac_ext <<_ACEOF
17383 /* confdefs.h.  */
17384 _ACEOF
17385 cat confdefs.h >>conftest.$ac_ext
17386 cat >>conftest.$ac_ext <<_ACEOF
17387 /* end confdefs.h.  */
17388 $ac_includes_default
17389 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17390 _ACEOF
17391 rm -f conftest.$ac_objext
17392 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17393   (eval $ac_compile) 2>conftest.er1
17394   ac_status=$?
17395   grep -v '^ *+' conftest.er1 >conftest.err
17396   rm -f conftest.er1
17397   cat conftest.err >&5
17398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17399   (exit $ac_status); } &&
17400          { ac_try='test -z "$ac_c_werror_flag"
17401                          || test ! -s conftest.err'
17402   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17403   (eval $ac_try) 2>&5
17404   ac_status=$?
17405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17406   (exit $ac_status); }; } &&
17407          { ac_try='test -s conftest.$ac_objext'
17408   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17409   (eval $ac_try) 2>&5
17410   ac_status=$?
17411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17412   (exit $ac_status); }; }; then
17413   ac_header_compiler=yes
17414 else
17415   echo "$as_me: failed program was:" >&5
17416 sed 's/^/| /' conftest.$ac_ext >&5
17417
17418 ac_header_compiler=no
17419 fi
17420 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17421 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17422 echo "${ECHO_T}$ac_header_compiler" >&6
17423
17424 # Is the header present?
17425 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
17426 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
17427 cat >conftest.$ac_ext <<_ACEOF
17428 /* confdefs.h.  */
17429 _ACEOF
17430 cat confdefs.h >>conftest.$ac_ext
17431 cat >>conftest.$ac_ext <<_ACEOF
17432 /* end confdefs.h.  */
17433 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17434 _ACEOF
17435 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17436   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17437   ac_status=$?
17438   grep -v '^ *+' conftest.er1 >conftest.err
17439   rm -f conftest.er1
17440   cat conftest.err >&5
17441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17442   (exit $ac_status); } >/dev/null; then
17443   if test -s conftest.err; then
17444     ac_cpp_err=$ac_c_preproc_warn_flag
17445     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17446   else
17447     ac_cpp_err=
17448   fi
17449 else
17450   ac_cpp_err=yes
17451 fi
17452 if test -z "$ac_cpp_err"; then
17453   ac_header_preproc=yes
17454 else
17455   echo "$as_me: failed program was:" >&5
17456 sed 's/^/| /' conftest.$ac_ext >&5
17457
17458   ac_header_preproc=no
17459 fi
17460 rm -f conftest.err conftest.$ac_ext
17461 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17462 echo "${ECHO_T}$ac_header_preproc" >&6
17463
17464 # So?  What about this header?
17465 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17466   yes:no: )
17467     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17468 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17469     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17470 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17471     ac_header_preproc=yes
17472     ;;
17473   no:yes:* )
17474     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17475 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17476     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17477 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17478     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17479 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17480     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17481 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17482     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17483 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17484     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17485 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17486     (
17487       cat <<\_ASBOX
17488 ## ------------------------------------------ ##
17489 ## Report this to the AC_PACKAGE_NAME lists.  ##
17490 ## ------------------------------------------ ##
17491 _ASBOX
17492     ) |
17493       sed "s/^/$as_me: WARNING:     /" >&2
17494     ;;
17495 esac
17496 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17497 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17498 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17499   echo $ECHO_N "(cached) $ECHO_C" >&6
17500 else
17501   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
17502 fi
17503 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17504 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
17505
17506 fi
17507 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
17508   have_gdk_pixbuf=yes
17509                          gdk_pixbuf_halfassed=no
17510 fi
17511
17512
17513   CPPFLAGS="$ac_save_CPPFLAGS"
17514
17515       # yay, it has a new name in Gtk 2.x...
17516       if test "$have_gdk_pixbuf" = no; then
17517         have_gdk_pixbuf=no
17518         gdk_pixbuf_halfassed=yes
17519
17520   ac_save_CPPFLAGS="$CPPFLAGS"
17521   if test \! -z "$includedir" ; then
17522     CPPFLAGS="$CPPFLAGS -I$includedir"
17523   fi
17524   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17525   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17526   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17527 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17528 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17529   echo $ECHO_N "(cached) $ECHO_C" >&6
17530 fi
17531 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17532 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
17533 else
17534   # Is the header compilable?
17535 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
17536 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
17537 cat >conftest.$ac_ext <<_ACEOF
17538 /* confdefs.h.  */
17539 _ACEOF
17540 cat confdefs.h >>conftest.$ac_ext
17541 cat >>conftest.$ac_ext <<_ACEOF
17542 /* end confdefs.h.  */
17543 $ac_includes_default
17544 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17545 _ACEOF
17546 rm -f conftest.$ac_objext
17547 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17548   (eval $ac_compile) 2>conftest.er1
17549   ac_status=$?
17550   grep -v '^ *+' conftest.er1 >conftest.err
17551   rm -f conftest.er1
17552   cat conftest.err >&5
17553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17554   (exit $ac_status); } &&
17555          { ac_try='test -z "$ac_c_werror_flag"
17556                          || test ! -s conftest.err'
17557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17558   (eval $ac_try) 2>&5
17559   ac_status=$?
17560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17561   (exit $ac_status); }; } &&
17562          { ac_try='test -s conftest.$ac_objext'
17563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17564   (eval $ac_try) 2>&5
17565   ac_status=$?
17566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17567   (exit $ac_status); }; }; then
17568   ac_header_compiler=yes
17569 else
17570   echo "$as_me: failed program was:" >&5
17571 sed 's/^/| /' conftest.$ac_ext >&5
17572
17573 ac_header_compiler=no
17574 fi
17575 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17576 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17577 echo "${ECHO_T}$ac_header_compiler" >&6
17578
17579 # Is the header present?
17580 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
17581 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
17582 cat >conftest.$ac_ext <<_ACEOF
17583 /* confdefs.h.  */
17584 _ACEOF
17585 cat confdefs.h >>conftest.$ac_ext
17586 cat >>conftest.$ac_ext <<_ACEOF
17587 /* end confdefs.h.  */
17588 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17589 _ACEOF
17590 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17591   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17592   ac_status=$?
17593   grep -v '^ *+' conftest.er1 >conftest.err
17594   rm -f conftest.er1
17595   cat conftest.err >&5
17596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17597   (exit $ac_status); } >/dev/null; then
17598   if test -s conftest.err; then
17599     ac_cpp_err=$ac_c_preproc_warn_flag
17600     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17601   else
17602     ac_cpp_err=
17603   fi
17604 else
17605   ac_cpp_err=yes
17606 fi
17607 if test -z "$ac_cpp_err"; then
17608   ac_header_preproc=yes
17609 else
17610   echo "$as_me: failed program was:" >&5
17611 sed 's/^/| /' conftest.$ac_ext >&5
17612
17613   ac_header_preproc=no
17614 fi
17615 rm -f conftest.err conftest.$ac_ext
17616 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17617 echo "${ECHO_T}$ac_header_preproc" >&6
17618
17619 # So?  What about this header?
17620 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17621   yes:no: )
17622     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17623 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17624     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17625 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17626     ac_header_preproc=yes
17627     ;;
17628   no:yes:* )
17629     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17630 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17631     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17632 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17633     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17634 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17635     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17636 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17637     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17638 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17639     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17640 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17641     (
17642       cat <<\_ASBOX
17643 ## ------------------------------------------ ##
17644 ## Report this to the AC_PACKAGE_NAME lists.  ##
17645 ## ------------------------------------------ ##
17646 _ASBOX
17647     ) |
17648       sed "s/^/$as_me: WARNING:     /" >&2
17649     ;;
17650 esac
17651 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17652 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17653 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17654   echo $ECHO_N "(cached) $ECHO_C" >&6
17655 else
17656   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
17657 fi
17658 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17659 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
17660
17661 fi
17662 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
17663   have_gdk_pixbuf=yes
17664                            gdk_pixbuf_halfassed=no
17665 fi
17666
17667
17668   CPPFLAGS="$ac_save_CPPFLAGS"
17669       fi
17670     fi
17671     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
17672   fi
17673
17674   if test "$have_gdk_pixbuf" = yes; then
17675     # we have the headers, now check for the libraries
17676     have_gdk_pixbuf=no
17677     gdk_pixbuf_halfassed=yes
17678
17679     echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
17680 echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6
17681
17682     # library A...
17683
17684   ac_save_CPPFLAGS="$CPPFLAGS"
17685   ac_save_LDFLAGS="$LDFLAGS"
17686 #  ac_save_LIBS="$LIBS"
17687
17688   if test \! -z "$includedir" ; then
17689     CPPFLAGS="$CPPFLAGS -I$includedir"
17690   fi
17691   # note: $X_CFLAGS includes $x_includes
17692   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17693
17694   if test \! -z "$libdir" ; then
17695     LDFLAGS="$LDFLAGS -L$libdir"
17696   fi
17697   # note: $X_LIBS includes $x_libraries
17698   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17699
17700   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
17701 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
17702 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
17703   echo $ECHO_N "(cached) $ECHO_C" >&6
17704 else
17705   ac_check_lib_save_LIBS=$LIBS
17706 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17707 cat >conftest.$ac_ext <<_ACEOF
17708 /* confdefs.h.  */
17709 _ACEOF
17710 cat confdefs.h >>conftest.$ac_ext
17711 cat >>conftest.$ac_ext <<_ACEOF
17712 /* end confdefs.h.  */
17713
17714 /* Override any gcc2 internal prototype to avoid an error.  */
17715 #ifdef __cplusplus
17716 extern "C"
17717 #endif
17718 /* We use char because int might match the return type of a gcc2
17719    builtin and then its argument prototype would still apply.  */
17720 char gdk_pixbuf_new_from_file ();
17721 int
17722 main ()
17723 {
17724 gdk_pixbuf_new_from_file ();
17725   ;
17726   return 0;
17727 }
17728 _ACEOF
17729 rm -f conftest.$ac_objext conftest$ac_exeext
17730 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17731   (eval $ac_link) 2>conftest.er1
17732   ac_status=$?
17733   grep -v '^ *+' conftest.er1 >conftest.err
17734   rm -f conftest.er1
17735   cat conftest.err >&5
17736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17737   (exit $ac_status); } &&
17738          { ac_try='test -z "$ac_c_werror_flag"
17739                          || test ! -s conftest.err'
17740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17741   (eval $ac_try) 2>&5
17742   ac_status=$?
17743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17744   (exit $ac_status); }; } &&
17745          { ac_try='test -s conftest$ac_exeext'
17746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17747   (eval $ac_try) 2>&5
17748   ac_status=$?
17749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17750   (exit $ac_status); }; }; then
17751   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
17752 else
17753   echo "$as_me: failed program was:" >&5
17754 sed 's/^/| /' conftest.$ac_ext >&5
17755
17756 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
17757 fi
17758 rm -f conftest.err conftest.$ac_objext \
17759       conftest$ac_exeext conftest.$ac_ext
17760 LIBS=$ac_check_lib_save_LIBS
17761 fi
17762 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
17763 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
17764 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
17765   have_gdk_pixbuf=yes
17766 fi
17767
17768   CPPFLAGS="$ac_save_CPPFLAGS"
17769   LDFLAGS="$ac_save_LDFLAGS"
17770 #  LIBS="$ac_save_LIBS"
17771
17772     # library B...
17773     if test "$have_gdk_pixbuf" = yes; then
17774       have_gdk_pixbuf=no
17775
17776   ac_save_CPPFLAGS="$CPPFLAGS"
17777   ac_save_LDFLAGS="$LDFLAGS"
17778 #  ac_save_LIBS="$LIBS"
17779
17780   if test \! -z "$includedir" ; then
17781     CPPFLAGS="$CPPFLAGS -I$includedir"
17782   fi
17783   # note: $X_CFLAGS includes $x_includes
17784   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17785
17786   if test \! -z "$libdir" ; then
17787     LDFLAGS="$LDFLAGS -L$libdir"
17788   fi
17789   # note: $X_LIBS includes $x_libraries
17790   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17791
17792   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
17793 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
17794 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
17795   echo $ECHO_N "(cached) $ECHO_C" >&6
17796 else
17797   ac_check_lib_save_LIBS=$LIBS
17798 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17799 cat >conftest.$ac_ext <<_ACEOF
17800 /* confdefs.h.  */
17801 _ACEOF
17802 cat confdefs.h >>conftest.$ac_ext
17803 cat >>conftest.$ac_ext <<_ACEOF
17804 /* end confdefs.h.  */
17805
17806 /* Override any gcc2 internal prototype to avoid an error.  */
17807 #ifdef __cplusplus
17808 extern "C"
17809 #endif
17810 /* We use char because int might match the return type of a gcc2
17811    builtin and then its argument prototype would still apply.  */
17812 char gdk_pixbuf_xlib_init ();
17813 int
17814 main ()
17815 {
17816 gdk_pixbuf_xlib_init ();
17817   ;
17818   return 0;
17819 }
17820 _ACEOF
17821 rm -f conftest.$ac_objext conftest$ac_exeext
17822 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17823   (eval $ac_link) 2>conftest.er1
17824   ac_status=$?
17825   grep -v '^ *+' conftest.er1 >conftest.err
17826   rm -f conftest.er1
17827   cat conftest.err >&5
17828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17829   (exit $ac_status); } &&
17830          { ac_try='test -z "$ac_c_werror_flag"
17831                          || test ! -s conftest.err'
17832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17833   (eval $ac_try) 2>&5
17834   ac_status=$?
17835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17836   (exit $ac_status); }; } &&
17837          { ac_try='test -s conftest$ac_exeext'
17838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17839   (eval $ac_try) 2>&5
17840   ac_status=$?
17841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17842   (exit $ac_status); }; }; then
17843   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
17844 else
17845   echo "$as_me: failed program was:" >&5
17846 sed 's/^/| /' conftest.$ac_ext >&5
17847
17848 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
17849 fi
17850 rm -f conftest.err conftest.$ac_objext \
17851       conftest$ac_exeext conftest.$ac_ext
17852 LIBS=$ac_check_lib_save_LIBS
17853 fi
17854 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
17855 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
17856 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
17857   have_gdk_pixbuf=yes
17858                       gdk_pixbuf_halfassed=no
17859 fi
17860
17861   CPPFLAGS="$ac_save_CPPFLAGS"
17862   LDFLAGS="$ac_save_LDFLAGS"
17863 #  LIBS="$ac_save_LIBS"
17864
17865     fi
17866   fi
17867
17868   if test "$have_gdk_pixbuf" = yes; then
17869     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
17870     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
17871     cat >>confdefs.h <<\_ACEOF
17872 #define HAVE_GDK_PIXBUF 1
17873 _ACEOF
17874
17875   else
17876     echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
17877 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6
17878   fi
17879 fi
17880
17881
17882 ###############################################################################
17883 #
17884 #       Check for -lXpm.
17885 #
17886 ###############################################################################
17887
17888 have_xpm=no
17889 with_xpm_req=unspecified
17890
17891 # Check whether --with-xpm or --without-xpm was given.
17892 if test "${with_xpm+set}" = set; then
17893   withval="$with_xpm"
17894   with_xpm="$withval"; with_xpm_req="$withval"
17895 else
17896   with_xpm=yes
17897 fi;
17898
17899
17900    case "$with_xpm" in
17901     yes) ;;
17902     no)  ;;
17903
17904     /*)
17905      echo "$as_me:$LINENO: checking for XPM headers" >&5
17906 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
17907      d=$with_xpm/include
17908      if test -d $d; then
17909        X_CFLAGS="-I$d $X_CFLAGS"
17910        echo "$as_me:$LINENO: result: $d" >&5
17911 echo "${ECHO_T}$d" >&6
17912      else
17913        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17914 echo "${ECHO_T}not found ($d: no such directory)" >&6
17915      fi
17916
17917      echo "$as_me:$LINENO: checking for XPM libs" >&5
17918 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
17919      d=$with_xpm/lib
17920      if test -d $d; then
17921        X_LIBS="-L$d $X_LIBS"
17922        echo "$as_me:$LINENO: result: $d" >&5
17923 echo "${ECHO_T}$d" >&6
17924      else
17925        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17926 echo "${ECHO_T}not found ($d: no such directory)" >&6
17927      fi
17928
17929      # replace the directory string with "yes".
17930      with_xpm_req="yes"
17931      with_xpm=$with_xpm_req
17932      ;;
17933
17934     *)
17935      echo ""
17936      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
17937      echo "       If it is a directory, then \`DIR/include' will be added to"
17938      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17939      exit 1
17940      ;;
17941    esac
17942
17943
17944 if test "$with_xpm" = yes; then
17945
17946   ac_save_CPPFLAGS="$CPPFLAGS"
17947   if test \! -z "$includedir" ; then
17948     CPPFLAGS="$CPPFLAGS -I$includedir"
17949   fi
17950   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17951   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
17952 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
17953 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
17954   echo $ECHO_N "(cached) $ECHO_C" >&6
17955 else
17956   cat >conftest.$ac_ext <<_ACEOF
17957 /* confdefs.h.  */
17958 _ACEOF
17959 cat confdefs.h >>conftest.$ac_ext
17960 cat >>conftest.$ac_ext <<_ACEOF
17961 /* end confdefs.h.  */
17962 #include <X11/Xlib.h>
17963
17964 #include <X11/xpm.h>
17965 _ACEOF
17966 rm -f conftest.$ac_objext
17967 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17968   (eval $ac_compile) 2>conftest.er1
17969   ac_status=$?
17970   grep -v '^ *+' conftest.er1 >conftest.err
17971   rm -f conftest.er1
17972   cat conftest.err >&5
17973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17974   (exit $ac_status); } &&
17975          { ac_try='test -z "$ac_c_werror_flag"
17976                          || test ! -s conftest.err'
17977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17978   (eval $ac_try) 2>&5
17979   ac_status=$?
17980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17981   (exit $ac_status); }; } &&
17982          { ac_try='test -s conftest.$ac_objext'
17983   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17984   (eval $ac_try) 2>&5
17985   ac_status=$?
17986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17987   (exit $ac_status); }; }; then
17988   ac_cv_header_X11_xpm_h=yes
17989 else
17990   echo "$as_me: failed program was:" >&5
17991 sed 's/^/| /' conftest.$ac_ext >&5
17992
17993 ac_cv_header_X11_xpm_h=no
17994 fi
17995 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17996 fi
17997 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
17998 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
17999 if test $ac_cv_header_X11_xpm_h = yes; then
18000   have_xpm=yes
18001                     cat >>confdefs.h <<\_ACEOF
18002 #define HAVE_XPM 1
18003 _ACEOF
18004
18005                     XPM_LIBS="-lXpm $XPM_LIBS"
18006 fi
18007
18008
18009   CPPFLAGS="$ac_save_CPPFLAGS"
18010 elif test "$with_xpm" != no; then
18011   echo "error: must be yes or no: --with-xpm=$with_xpm"
18012   exit 1
18013 fi
18014
18015 # See comment near $motif_requires_xpm, above.
18016 # Need to do this here, after both Motif and XPM have been checked for.
18017 #
18018 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
18019   if test "$motif_requires_xpm" = yes ; then
18020     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
18021   fi
18022 fi
18023
18024 if test "$XPM_LIBS" = "" ; then
18025   XPM_LIBS=$(MINIXPM)
18026 fi
18027
18028
18029 ###############################################################################
18030 #
18031 #       Check for -ljpeg
18032 #
18033 ###############################################################################
18034
18035 have_jpeg=no
18036 with_jpeg_req=unspecified
18037 jpeg_halfassed=no
18038
18039 # Check whether --with-jpeg or --without-jpeg was given.
18040 if test "${with_jpeg+set}" = set; then
18041   withval="$with_jpeg"
18042   with_jpeg="$withval"; with_jpeg_req="$withval"
18043 else
18044   with_jpeg=yes
18045 fi;
18046
18047
18048    case "$with_jpeg" in
18049     yes) ;;
18050     no)  ;;
18051
18052     /*)
18053      echo "$as_me:$LINENO: checking for JPEG headers" >&5
18054 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
18055      d=$with_jpeg/include
18056      if test -d $d; then
18057        X_CFLAGS="-I$d $X_CFLAGS"
18058        echo "$as_me:$LINENO: result: $d" >&5
18059 echo "${ECHO_T}$d" >&6
18060      else
18061        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18062 echo "${ECHO_T}not found ($d: no such directory)" >&6
18063      fi
18064
18065      echo "$as_me:$LINENO: checking for JPEG libs" >&5
18066 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
18067      d=$with_jpeg/lib
18068      if test -d $d; then
18069        X_LIBS="-L$d $X_LIBS"
18070        echo "$as_me:$LINENO: result: $d" >&5
18071 echo "${ECHO_T}$d" >&6
18072      else
18073        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18074 echo "${ECHO_T}not found ($d: no such directory)" >&6
18075      fi
18076
18077      # replace the directory string with "yes".
18078      with_jpeg_req="yes"
18079      with_jpeg=$with_jpeg_req
18080      ;;
18081
18082     *)
18083      echo ""
18084      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
18085      echo "       If it is a directory, then \`DIR/include' will be added to"
18086      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18087      exit 1
18088      ;;
18089    esac
18090
18091
18092 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
18093   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
18094   exit 1
18095 fi
18096
18097 if test "$with_jpeg" = yes; then
18098
18099   have_jpeg=no
18100
18101   ac_save_CPPFLAGS="$CPPFLAGS"
18102   if test \! -z "$includedir" ; then
18103     CPPFLAGS="$CPPFLAGS -I$includedir"
18104   fi
18105   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18106   if test "${ac_cv_header_jpeglib_h+set}" = set; then
18107   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18108 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
18109 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18110   echo $ECHO_N "(cached) $ECHO_C" >&6
18111 fi
18112 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18113 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
18114 else
18115   # Is the header compilable?
18116 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
18117 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
18118 cat >conftest.$ac_ext <<_ACEOF
18119 /* confdefs.h.  */
18120 _ACEOF
18121 cat confdefs.h >>conftest.$ac_ext
18122 cat >>conftest.$ac_ext <<_ACEOF
18123 /* end confdefs.h.  */
18124 $ac_includes_default
18125 #include <jpeglib.h>
18126 _ACEOF
18127 rm -f conftest.$ac_objext
18128 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18129   (eval $ac_compile) 2>conftest.er1
18130   ac_status=$?
18131   grep -v '^ *+' conftest.er1 >conftest.err
18132   rm -f conftest.er1
18133   cat conftest.err >&5
18134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18135   (exit $ac_status); } &&
18136          { ac_try='test -z "$ac_c_werror_flag"
18137                          || test ! -s conftest.err'
18138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18139   (eval $ac_try) 2>&5
18140   ac_status=$?
18141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18142   (exit $ac_status); }; } &&
18143          { ac_try='test -s conftest.$ac_objext'
18144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18145   (eval $ac_try) 2>&5
18146   ac_status=$?
18147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18148   (exit $ac_status); }; }; then
18149   ac_header_compiler=yes
18150 else
18151   echo "$as_me: failed program was:" >&5
18152 sed 's/^/| /' conftest.$ac_ext >&5
18153
18154 ac_header_compiler=no
18155 fi
18156 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18157 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18158 echo "${ECHO_T}$ac_header_compiler" >&6
18159
18160 # Is the header present?
18161 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
18162 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
18163 cat >conftest.$ac_ext <<_ACEOF
18164 /* confdefs.h.  */
18165 _ACEOF
18166 cat confdefs.h >>conftest.$ac_ext
18167 cat >>conftest.$ac_ext <<_ACEOF
18168 /* end confdefs.h.  */
18169 #include <jpeglib.h>
18170 _ACEOF
18171 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18172   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18173   ac_status=$?
18174   grep -v '^ *+' conftest.er1 >conftest.err
18175   rm -f conftest.er1
18176   cat conftest.err >&5
18177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18178   (exit $ac_status); } >/dev/null; then
18179   if test -s conftest.err; then
18180     ac_cpp_err=$ac_c_preproc_warn_flag
18181     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18182   else
18183     ac_cpp_err=
18184   fi
18185 else
18186   ac_cpp_err=yes
18187 fi
18188 if test -z "$ac_cpp_err"; then
18189   ac_header_preproc=yes
18190 else
18191   echo "$as_me: failed program was:" >&5
18192 sed 's/^/| /' conftest.$ac_ext >&5
18193
18194   ac_header_preproc=no
18195 fi
18196 rm -f conftest.err conftest.$ac_ext
18197 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18198 echo "${ECHO_T}$ac_header_preproc" >&6
18199
18200 # So?  What about this header?
18201 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18202   yes:no: )
18203     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
18204 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18205     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
18206 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
18207     ac_header_preproc=yes
18208     ;;
18209   no:yes:* )
18210     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
18211 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
18212     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
18213 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
18214     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
18215 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
18216     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
18217 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18218     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
18219 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
18220     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
18221 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
18222     (
18223       cat <<\_ASBOX
18224 ## ------------------------------------------ ##
18225 ## Report this to the AC_PACKAGE_NAME lists.  ##
18226 ## ------------------------------------------ ##
18227 _ASBOX
18228     ) |
18229       sed "s/^/$as_me: WARNING:     /" >&2
18230     ;;
18231 esac
18232 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
18233 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
18234 if test "${ac_cv_header_jpeglib_h+set}" = set; then
18235   echo $ECHO_N "(cached) $ECHO_C" >&6
18236 else
18237   ac_cv_header_jpeglib_h=$ac_header_preproc
18238 fi
18239 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
18240 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
18241
18242 fi
18243 if test $ac_cv_header_jpeglib_h = yes; then
18244   have_jpeg=yes
18245 fi
18246
18247
18248   CPPFLAGS="$ac_save_CPPFLAGS"
18249
18250   if test "$have_jpeg" = yes; then
18251     # we have the header, now check for the library
18252     have_jpeg=no
18253     jpeg_halfassed=yes
18254
18255   ac_save_CPPFLAGS="$CPPFLAGS"
18256   ac_save_LDFLAGS="$LDFLAGS"
18257 #  ac_save_LIBS="$LIBS"
18258
18259   if test \! -z "$includedir" ; then
18260     CPPFLAGS="$CPPFLAGS -I$includedir"
18261   fi
18262   # note: $X_CFLAGS includes $x_includes
18263   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18264
18265   if test \! -z "$libdir" ; then
18266     LDFLAGS="$LDFLAGS -L$libdir"
18267   fi
18268   # note: $X_LIBS includes $x_libraries
18269   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18270
18271   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
18272 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
18273 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
18274   echo $ECHO_N "(cached) $ECHO_C" >&6
18275 else
18276   ac_check_lib_save_LIBS=$LIBS
18277 LIBS="-ljpeg  $LIBS"
18278 cat >conftest.$ac_ext <<_ACEOF
18279 /* confdefs.h.  */
18280 _ACEOF
18281 cat confdefs.h >>conftest.$ac_ext
18282 cat >>conftest.$ac_ext <<_ACEOF
18283 /* end confdefs.h.  */
18284
18285 /* Override any gcc2 internal prototype to avoid an error.  */
18286 #ifdef __cplusplus
18287 extern "C"
18288 #endif
18289 /* We use char because int might match the return type of a gcc2
18290    builtin and then its argument prototype would still apply.  */
18291 char jpeg_start_compress ();
18292 int
18293 main ()
18294 {
18295 jpeg_start_compress ();
18296   ;
18297   return 0;
18298 }
18299 _ACEOF
18300 rm -f conftest.$ac_objext conftest$ac_exeext
18301 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18302   (eval $ac_link) 2>conftest.er1
18303   ac_status=$?
18304   grep -v '^ *+' conftest.er1 >conftest.err
18305   rm -f conftest.er1
18306   cat conftest.err >&5
18307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18308   (exit $ac_status); } &&
18309          { ac_try='test -z "$ac_c_werror_flag"
18310                          || test ! -s conftest.err'
18311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18312   (eval $ac_try) 2>&5
18313   ac_status=$?
18314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18315   (exit $ac_status); }; } &&
18316          { ac_try='test -s conftest$ac_exeext'
18317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18318   (eval $ac_try) 2>&5
18319   ac_status=$?
18320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18321   (exit $ac_status); }; }; then
18322   ac_cv_lib_jpeg_jpeg_start_compress=yes
18323 else
18324   echo "$as_me: failed program was:" >&5
18325 sed 's/^/| /' conftest.$ac_ext >&5
18326
18327 ac_cv_lib_jpeg_jpeg_start_compress=no
18328 fi
18329 rm -f conftest.err conftest.$ac_objext \
18330       conftest$ac_exeext conftest.$ac_ext
18331 LIBS=$ac_check_lib_save_LIBS
18332 fi
18333 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
18334 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
18335 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
18336   have_jpeg=yes
18337                     jpeg_halfassed=no
18338                     JPEG_LIBS="-ljpeg"
18339                     cat >>confdefs.h <<\_ACEOF
18340 #define HAVE_JPEGLIB 1
18341 _ACEOF
18342
18343 fi
18344
18345   CPPFLAGS="$ac_save_CPPFLAGS"
18346   LDFLAGS="$ac_save_LDFLAGS"
18347 #  LIBS="$ac_save_LIBS"
18348
18349   fi
18350 fi
18351
18352
18353 ###############################################################################
18354 #
18355 #       Check for pty support: this allows 'phosphor' and 'apple2'
18356 #       to run curses-based programs, or be used as terminal windows.
18357 #
18358 ###############################################################################
18359
18360 PTY_LIBS=
18361
18362
18363 for ac_header in pty.h util.h
18364 do
18365 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18366 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18367   echo "$as_me:$LINENO: checking for $ac_header" >&5
18368 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18369 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18370   echo $ECHO_N "(cached) $ECHO_C" >&6
18371 fi
18372 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18373 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18374 else
18375   # Is the header compilable?
18376 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18377 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18378 cat >conftest.$ac_ext <<_ACEOF
18379 /* confdefs.h.  */
18380 _ACEOF
18381 cat confdefs.h >>conftest.$ac_ext
18382 cat >>conftest.$ac_ext <<_ACEOF
18383 /* end confdefs.h.  */
18384 $ac_includes_default
18385 #include <$ac_header>
18386 _ACEOF
18387 rm -f conftest.$ac_objext
18388 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18389   (eval $ac_compile) 2>conftest.er1
18390   ac_status=$?
18391   grep -v '^ *+' conftest.er1 >conftest.err
18392   rm -f conftest.er1
18393   cat conftest.err >&5
18394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18395   (exit $ac_status); } &&
18396          { ac_try='test -z "$ac_c_werror_flag"
18397                          || test ! -s conftest.err'
18398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18399   (eval $ac_try) 2>&5
18400   ac_status=$?
18401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18402   (exit $ac_status); }; } &&
18403          { ac_try='test -s conftest.$ac_objext'
18404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18405   (eval $ac_try) 2>&5
18406   ac_status=$?
18407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18408   (exit $ac_status); }; }; then
18409   ac_header_compiler=yes
18410 else
18411   echo "$as_me: failed program was:" >&5
18412 sed 's/^/| /' conftest.$ac_ext >&5
18413
18414 ac_header_compiler=no
18415 fi
18416 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18417 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18418 echo "${ECHO_T}$ac_header_compiler" >&6
18419
18420 # Is the header present?
18421 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18422 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18423 cat >conftest.$ac_ext <<_ACEOF
18424 /* confdefs.h.  */
18425 _ACEOF
18426 cat confdefs.h >>conftest.$ac_ext
18427 cat >>conftest.$ac_ext <<_ACEOF
18428 /* end confdefs.h.  */
18429 #include <$ac_header>
18430 _ACEOF
18431 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18432   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18433   ac_status=$?
18434   grep -v '^ *+' conftest.er1 >conftest.err
18435   rm -f conftest.er1
18436   cat conftest.err >&5
18437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18438   (exit $ac_status); } >/dev/null; then
18439   if test -s conftest.err; then
18440     ac_cpp_err=$ac_c_preproc_warn_flag
18441     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18442   else
18443     ac_cpp_err=
18444   fi
18445 else
18446   ac_cpp_err=yes
18447 fi
18448 if test -z "$ac_cpp_err"; then
18449   ac_header_preproc=yes
18450 else
18451   echo "$as_me: failed program was:" >&5
18452 sed 's/^/| /' conftest.$ac_ext >&5
18453
18454   ac_header_preproc=no
18455 fi
18456 rm -f conftest.err conftest.$ac_ext
18457 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18458 echo "${ECHO_T}$ac_header_preproc" >&6
18459
18460 # So?  What about this header?
18461 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18462   yes:no: )
18463     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18464 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18465     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18466 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18467     ac_header_preproc=yes
18468     ;;
18469   no:yes:* )
18470     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18471 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18472     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18473 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18474     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18475 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18476     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18477 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18478     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18479 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18480     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18481 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18482     (
18483       cat <<\_ASBOX
18484 ## ------------------------------------------ ##
18485 ## Report this to the AC_PACKAGE_NAME lists.  ##
18486 ## ------------------------------------------ ##
18487 _ASBOX
18488     ) |
18489       sed "s/^/$as_me: WARNING:     /" >&2
18490     ;;
18491 esac
18492 echo "$as_me:$LINENO: checking for $ac_header" >&5
18493 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18494 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18495   echo $ECHO_N "(cached) $ECHO_C" >&6
18496 else
18497   eval "$as_ac_Header=\$ac_header_preproc"
18498 fi
18499 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18500 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18501
18502 fi
18503 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18504   cat >>confdefs.h <<_ACEOF
18505 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18506 _ACEOF
18507
18508 fi
18509
18510 done
18511
18512
18513   ac_save_CPPFLAGS="$CPPFLAGS"
18514   ac_save_LDFLAGS="$LDFLAGS"
18515 #  ac_save_LIBS="$LIBS"
18516
18517   if test \! -z "$includedir" ; then
18518     CPPFLAGS="$CPPFLAGS -I$includedir"
18519   fi
18520   # note: $X_CFLAGS includes $x_includes
18521   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18522
18523   if test \! -z "$libdir" ; then
18524     LDFLAGS="$LDFLAGS -L$libdir"
18525   fi
18526   # note: $X_LIBS includes $x_libraries
18527   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18528
18529   echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18530 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
18531 if test "${ac_cv_lib_util_forkpty+set}" = set; then
18532   echo $ECHO_N "(cached) $ECHO_C" >&6
18533 else
18534   ac_check_lib_save_LIBS=$LIBS
18535 LIBS="-lutil  $LIBS"
18536 cat >conftest.$ac_ext <<_ACEOF
18537 /* confdefs.h.  */
18538 _ACEOF
18539 cat confdefs.h >>conftest.$ac_ext
18540 cat >>conftest.$ac_ext <<_ACEOF
18541 /* end confdefs.h.  */
18542
18543 /* Override any gcc2 internal prototype to avoid an error.  */
18544 #ifdef __cplusplus
18545 extern "C"
18546 #endif
18547 /* We use char because int might match the return type of a gcc2
18548    builtin and then its argument prototype would still apply.  */
18549 char forkpty ();
18550 int
18551 main ()
18552 {
18553 forkpty ();
18554   ;
18555   return 0;
18556 }
18557 _ACEOF
18558 rm -f conftest.$ac_objext conftest$ac_exeext
18559 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18560   (eval $ac_link) 2>conftest.er1
18561   ac_status=$?
18562   grep -v '^ *+' conftest.er1 >conftest.err
18563   rm -f conftest.er1
18564   cat conftest.err >&5
18565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18566   (exit $ac_status); } &&
18567          { ac_try='test -z "$ac_c_werror_flag"
18568                          || test ! -s conftest.err'
18569   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18570   (eval $ac_try) 2>&5
18571   ac_status=$?
18572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18573   (exit $ac_status); }; } &&
18574          { ac_try='test -s conftest$ac_exeext'
18575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18576   (eval $ac_try) 2>&5
18577   ac_status=$?
18578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18579   (exit $ac_status); }; }; then
18580   ac_cv_lib_util_forkpty=yes
18581 else
18582   echo "$as_me: failed program was:" >&5
18583 sed 's/^/| /' conftest.$ac_ext >&5
18584
18585 ac_cv_lib_util_forkpty=no
18586 fi
18587 rm -f conftest.err conftest.$ac_objext \
18588       conftest$ac_exeext conftest.$ac_ext
18589 LIBS=$ac_check_lib_save_LIBS
18590 fi
18591 echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18592 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
18593 if test $ac_cv_lib_util_forkpty = yes; then
18594   PTY_LIBS="-lutil"
18595                 ac_have_forkpty=yes
18596                 cat >>confdefs.h <<\_ACEOF
18597 #define HAVE_FORKPTY 1
18598 _ACEOF
18599
18600 fi
18601
18602   CPPFLAGS="$ac_save_CPPFLAGS"
18603   LDFLAGS="$ac_save_LDFLAGS"
18604 #  LIBS="$ac_save_LIBS"
18605
18606
18607 if test "$ac_have_forkpty" != yes ; then
18608   # we don't need (or have) -lutil on MacOS 10.4.2...
18609
18610   ac_save_CPPFLAGS="$CPPFLAGS"
18611   ac_save_LDFLAGS="$LDFLAGS"
18612 #  ac_save_LIBS="$LIBS"
18613
18614   if test \! -z "$includedir" ; then
18615     CPPFLAGS="$CPPFLAGS -I$includedir"
18616   fi
18617   # note: $X_CFLAGS includes $x_includes
18618   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18619
18620   if test \! -z "$libdir" ; then
18621     LDFLAGS="$LDFLAGS -L$libdir"
18622   fi
18623   # note: $X_LIBS includes $x_libraries
18624   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18625
18626   echo "$as_me:$LINENO: checking for forkpty in -lc" >&5
18627 echo $ECHO_N "checking for forkpty in -lc... $ECHO_C" >&6
18628 if test "${ac_cv_lib_c_forkpty+set}" = set; then
18629   echo $ECHO_N "(cached) $ECHO_C" >&6
18630 else
18631   ac_check_lib_save_LIBS=$LIBS
18632 LIBS="-lc  $LIBS"
18633 cat >conftest.$ac_ext <<_ACEOF
18634 /* confdefs.h.  */
18635 _ACEOF
18636 cat confdefs.h >>conftest.$ac_ext
18637 cat >>conftest.$ac_ext <<_ACEOF
18638 /* end confdefs.h.  */
18639
18640 /* Override any gcc2 internal prototype to avoid an error.  */
18641 #ifdef __cplusplus
18642 extern "C"
18643 #endif
18644 /* We use char because int might match the return type of a gcc2
18645    builtin and then its argument prototype would still apply.  */
18646 char forkpty ();
18647 int
18648 main ()
18649 {
18650 forkpty ();
18651   ;
18652   return 0;
18653 }
18654 _ACEOF
18655 rm -f conftest.$ac_objext conftest$ac_exeext
18656 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18657   (eval $ac_link) 2>conftest.er1
18658   ac_status=$?
18659   grep -v '^ *+' conftest.er1 >conftest.err
18660   rm -f conftest.er1
18661   cat conftest.err >&5
18662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18663   (exit $ac_status); } &&
18664          { ac_try='test -z "$ac_c_werror_flag"
18665                          || test ! -s conftest.err'
18666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18667   (eval $ac_try) 2>&5
18668   ac_status=$?
18669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18670   (exit $ac_status); }; } &&
18671          { ac_try='test -s conftest$ac_exeext'
18672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18673   (eval $ac_try) 2>&5
18674   ac_status=$?
18675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18676   (exit $ac_status); }; }; then
18677   ac_cv_lib_c_forkpty=yes
18678 else
18679   echo "$as_me: failed program was:" >&5
18680 sed 's/^/| /' conftest.$ac_ext >&5
18681
18682 ac_cv_lib_c_forkpty=no
18683 fi
18684 rm -f conftest.err conftest.$ac_objext \
18685       conftest$ac_exeext conftest.$ac_ext
18686 LIBS=$ac_check_lib_save_LIBS
18687 fi
18688 echo "$as_me:$LINENO: result: $ac_cv_lib_c_forkpty" >&5
18689 echo "${ECHO_T}$ac_cv_lib_c_forkpty" >&6
18690 if test $ac_cv_lib_c_forkpty = yes; then
18691   PTY_LIBS=""
18692                   cat >>confdefs.h <<\_ACEOF
18693 #define HAVE_FORKPTY 1
18694 _ACEOF
18695
18696 fi
18697
18698   CPPFLAGS="$ac_save_CPPFLAGS"
18699   LDFLAGS="$ac_save_LDFLAGS"
18700 #  LIBS="$ac_save_LIBS"
18701
18702 fi
18703
18704 ###############################################################################
18705 #
18706 #       Check for the XSHM server extension.
18707 #
18708 ###############################################################################
18709
18710 have_xshm=no
18711 with_xshm_req=unspecified
18712
18713 # Check whether --with-xshm-ext or --without-xshm-ext was given.
18714 if test "${with_xshm_ext+set}" = set; then
18715   withval="$with_xshm_ext"
18716   with_xshm="$withval"; with_xshm_req="$withval"
18717 else
18718   with_xshm=yes
18719 fi;
18720
18721
18722    case "$with_xshm" in
18723     yes) ;;
18724     no)  ;;
18725
18726     /*)
18727      echo "$as_me:$LINENO: checking for XSHM headers" >&5
18728 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
18729      d=$with_xshm/include
18730      if test -d $d; then
18731        X_CFLAGS="-I$d $X_CFLAGS"
18732        echo "$as_me:$LINENO: result: $d" >&5
18733 echo "${ECHO_T}$d" >&6
18734      else
18735        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18736 echo "${ECHO_T}not found ($d: no such directory)" >&6
18737      fi
18738
18739      echo "$as_me:$LINENO: checking for XSHM libs" >&5
18740 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
18741      d=$with_xshm/lib
18742      if test -d $d; then
18743        X_LIBS="-L$d $X_LIBS"
18744        echo "$as_me:$LINENO: result: $d" >&5
18745 echo "${ECHO_T}$d" >&6
18746      else
18747        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18748 echo "${ECHO_T}not found ($d: no such directory)" >&6
18749      fi
18750
18751      # replace the directory string with "yes".
18752      with_xshm_req="yes"
18753      with_xshm=$with_xshm_req
18754      ;;
18755
18756     *)
18757      echo ""
18758      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
18759      echo "       If it is a directory, then \`DIR/include' will be added to"
18760      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18761      exit 1
18762      ;;
18763    esac
18764
18765
18766 if test "$with_xshm" = yes; then
18767
18768   # first check for Xshm.h.
18769
18770   ac_save_CPPFLAGS="$CPPFLAGS"
18771   if test \! -z "$includedir" ; then
18772     CPPFLAGS="$CPPFLAGS -I$includedir"
18773   fi
18774   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18775   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
18776 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
18777 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
18778   echo $ECHO_N "(cached) $ECHO_C" >&6
18779 else
18780   cat >conftest.$ac_ext <<_ACEOF
18781 /* confdefs.h.  */
18782 _ACEOF
18783 cat confdefs.h >>conftest.$ac_ext
18784 cat >>conftest.$ac_ext <<_ACEOF
18785 /* end confdefs.h.  */
18786 #include <X11/Xlib.h>
18787
18788 #include <X11/extensions/XShm.h>
18789 _ACEOF
18790 rm -f conftest.$ac_objext
18791 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18792   (eval $ac_compile) 2>conftest.er1
18793   ac_status=$?
18794   grep -v '^ *+' conftest.er1 >conftest.err
18795   rm -f conftest.er1
18796   cat conftest.err >&5
18797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18798   (exit $ac_status); } &&
18799          { ac_try='test -z "$ac_c_werror_flag"
18800                          || test ! -s conftest.err'
18801   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18802   (eval $ac_try) 2>&5
18803   ac_status=$?
18804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18805   (exit $ac_status); }; } &&
18806          { ac_try='test -s conftest.$ac_objext'
18807   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18808   (eval $ac_try) 2>&5
18809   ac_status=$?
18810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18811   (exit $ac_status); }; }; then
18812   ac_cv_header_X11_extensions_XShm_h=yes
18813 else
18814   echo "$as_me: failed program was:" >&5
18815 sed 's/^/| /' conftest.$ac_ext >&5
18816
18817 ac_cv_header_X11_extensions_XShm_h=no
18818 fi
18819 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18820 fi
18821 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
18822 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
18823 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
18824   have_xshm=yes
18825 fi
18826
18827
18828   CPPFLAGS="$ac_save_CPPFLAGS"
18829
18830   # if that succeeded, then check for sys/ipc.h.
18831   if test "$have_xshm" = yes; then
18832     have_xshm=no
18833
18834   ac_save_CPPFLAGS="$CPPFLAGS"
18835   if test \! -z "$includedir" ; then
18836     CPPFLAGS="$CPPFLAGS -I$includedir"
18837   fi
18838   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18839   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18840   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
18841 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
18842 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18843   echo $ECHO_N "(cached) $ECHO_C" >&6
18844 fi
18845 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
18846 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
18847 else
18848   # Is the header compilable?
18849 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
18850 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
18851 cat >conftest.$ac_ext <<_ACEOF
18852 /* confdefs.h.  */
18853 _ACEOF
18854 cat confdefs.h >>conftest.$ac_ext
18855 cat >>conftest.$ac_ext <<_ACEOF
18856 /* end confdefs.h.  */
18857 $ac_includes_default
18858 #include <sys/ipc.h>
18859 _ACEOF
18860 rm -f conftest.$ac_objext
18861 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18862   (eval $ac_compile) 2>conftest.er1
18863   ac_status=$?
18864   grep -v '^ *+' conftest.er1 >conftest.err
18865   rm -f conftest.er1
18866   cat conftest.err >&5
18867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18868   (exit $ac_status); } &&
18869          { ac_try='test -z "$ac_c_werror_flag"
18870                          || test ! -s conftest.err'
18871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18872   (eval $ac_try) 2>&5
18873   ac_status=$?
18874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18875   (exit $ac_status); }; } &&
18876          { ac_try='test -s conftest.$ac_objext'
18877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18878   (eval $ac_try) 2>&5
18879   ac_status=$?
18880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18881   (exit $ac_status); }; }; then
18882   ac_header_compiler=yes
18883 else
18884   echo "$as_me: failed program was:" >&5
18885 sed 's/^/| /' conftest.$ac_ext >&5
18886
18887 ac_header_compiler=no
18888 fi
18889 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18890 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18891 echo "${ECHO_T}$ac_header_compiler" >&6
18892
18893 # Is the header present?
18894 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
18895 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
18896 cat >conftest.$ac_ext <<_ACEOF
18897 /* confdefs.h.  */
18898 _ACEOF
18899 cat confdefs.h >>conftest.$ac_ext
18900 cat >>conftest.$ac_ext <<_ACEOF
18901 /* end confdefs.h.  */
18902 #include <sys/ipc.h>
18903 _ACEOF
18904 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18905   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18906   ac_status=$?
18907   grep -v '^ *+' conftest.er1 >conftest.err
18908   rm -f conftest.er1
18909   cat conftest.err >&5
18910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18911   (exit $ac_status); } >/dev/null; then
18912   if test -s conftest.err; then
18913     ac_cpp_err=$ac_c_preproc_warn_flag
18914     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18915   else
18916     ac_cpp_err=
18917   fi
18918 else
18919   ac_cpp_err=yes
18920 fi
18921 if test -z "$ac_cpp_err"; then
18922   ac_header_preproc=yes
18923 else
18924   echo "$as_me: failed program was:" >&5
18925 sed 's/^/| /' conftest.$ac_ext >&5
18926
18927   ac_header_preproc=no
18928 fi
18929 rm -f conftest.err conftest.$ac_ext
18930 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18931 echo "${ECHO_T}$ac_header_preproc" >&6
18932
18933 # So?  What about this header?
18934 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18935   yes:no: )
18936     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
18937 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18938     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
18939 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
18940     ac_header_preproc=yes
18941     ;;
18942   no:yes:* )
18943     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
18944 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
18945     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
18946 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
18947     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
18948 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
18949     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
18950 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18951     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
18952 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
18953     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
18954 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
18955     (
18956       cat <<\_ASBOX
18957 ## ------------------------------------------ ##
18958 ## Report this to the AC_PACKAGE_NAME lists.  ##
18959 ## ------------------------------------------ ##
18960 _ASBOX
18961     ) |
18962       sed "s/^/$as_me: WARNING:     /" >&2
18963     ;;
18964 esac
18965 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
18966 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
18967 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18968   echo $ECHO_N "(cached) $ECHO_C" >&6
18969 else
18970   ac_cv_header_sys_ipc_h=$ac_header_preproc
18971 fi
18972 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
18973 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
18974
18975 fi
18976 if test $ac_cv_header_sys_ipc_h = yes; then
18977   have_xshm=yes
18978 fi
18979
18980
18981   CPPFLAGS="$ac_save_CPPFLAGS"
18982   fi
18983
18984   # if that succeeded, then check for sys/shm.h.
18985   if test "$have_xshm" = yes; then
18986     have_xshm=no
18987
18988   ac_save_CPPFLAGS="$CPPFLAGS"
18989   if test \! -z "$includedir" ; then
18990     CPPFLAGS="$CPPFLAGS -I$includedir"
18991   fi
18992   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18993   if test "${ac_cv_header_sys_shm_h+set}" = set; then
18994   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
18995 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
18996 if test "${ac_cv_header_sys_shm_h+set}" = set; then
18997   echo $ECHO_N "(cached) $ECHO_C" >&6
18998 fi
18999 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19000 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
19001 else
19002   # Is the header compilable?
19003 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
19004 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
19005 cat >conftest.$ac_ext <<_ACEOF
19006 /* confdefs.h.  */
19007 _ACEOF
19008 cat confdefs.h >>conftest.$ac_ext
19009 cat >>conftest.$ac_ext <<_ACEOF
19010 /* end confdefs.h.  */
19011 $ac_includes_default
19012 #include <sys/shm.h>
19013 _ACEOF
19014 rm -f conftest.$ac_objext
19015 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19016   (eval $ac_compile) 2>conftest.er1
19017   ac_status=$?
19018   grep -v '^ *+' conftest.er1 >conftest.err
19019   rm -f conftest.er1
19020   cat conftest.err >&5
19021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19022   (exit $ac_status); } &&
19023          { ac_try='test -z "$ac_c_werror_flag"
19024                          || test ! -s conftest.err'
19025   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19026   (eval $ac_try) 2>&5
19027   ac_status=$?
19028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19029   (exit $ac_status); }; } &&
19030          { ac_try='test -s conftest.$ac_objext'
19031   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19032   (eval $ac_try) 2>&5
19033   ac_status=$?
19034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19035   (exit $ac_status); }; }; then
19036   ac_header_compiler=yes
19037 else
19038   echo "$as_me: failed program was:" >&5
19039 sed 's/^/| /' conftest.$ac_ext >&5
19040
19041 ac_header_compiler=no
19042 fi
19043 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19044 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19045 echo "${ECHO_T}$ac_header_compiler" >&6
19046
19047 # Is the header present?
19048 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
19049 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
19050 cat >conftest.$ac_ext <<_ACEOF
19051 /* confdefs.h.  */
19052 _ACEOF
19053 cat confdefs.h >>conftest.$ac_ext
19054 cat >>conftest.$ac_ext <<_ACEOF
19055 /* end confdefs.h.  */
19056 #include <sys/shm.h>
19057 _ACEOF
19058 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19059   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19060   ac_status=$?
19061   grep -v '^ *+' conftest.er1 >conftest.err
19062   rm -f conftest.er1
19063   cat conftest.err >&5
19064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19065   (exit $ac_status); } >/dev/null; then
19066   if test -s conftest.err; then
19067     ac_cpp_err=$ac_c_preproc_warn_flag
19068     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19069   else
19070     ac_cpp_err=
19071   fi
19072 else
19073   ac_cpp_err=yes
19074 fi
19075 if test -z "$ac_cpp_err"; then
19076   ac_header_preproc=yes
19077 else
19078   echo "$as_me: failed program was:" >&5
19079 sed 's/^/| /' conftest.$ac_ext >&5
19080
19081   ac_header_preproc=no
19082 fi
19083 rm -f conftest.err conftest.$ac_ext
19084 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19085 echo "${ECHO_T}$ac_header_preproc" >&6
19086
19087 # So?  What about this header?
19088 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19089   yes:no: )
19090     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
19091 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
19092     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
19093 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
19094     ac_header_preproc=yes
19095     ;;
19096   no:yes:* )
19097     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
19098 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
19099     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
19100 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
19101     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
19102 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
19103     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
19104 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
19105     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
19106 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
19107     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
19108 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
19109     (
19110       cat <<\_ASBOX
19111 ## ------------------------------------------ ##
19112 ## Report this to the AC_PACKAGE_NAME lists.  ##
19113 ## ------------------------------------------ ##
19114 _ASBOX
19115     ) |
19116       sed "s/^/$as_me: WARNING:     /" >&2
19117     ;;
19118 esac
19119 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
19120 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
19121 if test "${ac_cv_header_sys_shm_h+set}" = set; then
19122   echo $ECHO_N "(cached) $ECHO_C" >&6
19123 else
19124   ac_cv_header_sys_shm_h=$ac_header_preproc
19125 fi
19126 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
19127 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
19128
19129 fi
19130 if test $ac_cv_header_sys_shm_h = yes; then
19131   have_xshm=yes
19132 fi
19133
19134
19135   CPPFLAGS="$ac_save_CPPFLAGS"
19136   fi
19137
19138   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
19139   # to exist, but the library code to not exist.  And even better, the library
19140   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
19141   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
19142   # that's not quite right, but close enough.)
19143   #
19144   case "$host" in
19145     *-aix*)
19146       if  `uname -v` -eq 3 ; then
19147         have_xshm=no
19148
19149   ac_save_CPPFLAGS="$CPPFLAGS"
19150   ac_save_LDFLAGS="$LDFLAGS"
19151 #  ac_save_LIBS="$LIBS"
19152
19153   if test \! -z "$includedir" ; then
19154     CPPFLAGS="$CPPFLAGS -I$includedir"
19155   fi
19156   # note: $X_CFLAGS includes $x_includes
19157   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19158
19159   if test \! -z "$libdir" ; then
19160     LDFLAGS="$LDFLAGS -L$libdir"
19161   fi
19162   # note: $X_LIBS includes $x_libraries
19163   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
19164
19165   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
19166 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
19167 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
19168   echo $ECHO_N "(cached) $ECHO_C" >&6
19169 else
19170   ac_check_lib_save_LIBS=$LIBS
19171 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
19172 cat >conftest.$ac_ext <<_ACEOF
19173 /* confdefs.h.  */
19174 _ACEOF
19175 cat confdefs.h >>conftest.$ac_ext
19176 cat >>conftest.$ac_ext <<_ACEOF
19177 /* end confdefs.h.  */
19178
19179 /* Override any gcc2 internal prototype to avoid an error.  */
19180 #ifdef __cplusplus
19181 extern "C"
19182 #endif
19183 /* We use char because int might match the return type of a gcc2
19184    builtin and then its argument prototype would still apply.  */
19185 char XShmQueryExtension ();
19186 int
19187 main ()
19188 {
19189 XShmQueryExtension ();
19190   ;
19191   return 0;
19192 }
19193 _ACEOF
19194 rm -f conftest.$ac_objext conftest$ac_exeext
19195 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19196   (eval $ac_link) 2>conftest.er1
19197   ac_status=$?
19198   grep -v '^ *+' conftest.er1 >conftest.err
19199   rm -f conftest.er1
19200   cat conftest.err >&5
19201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19202   (exit $ac_status); } &&
19203          { ac_try='test -z "$ac_c_werror_flag"
19204                          || test ! -s conftest.err'
19205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19206   (eval $ac_try) 2>&5
19207   ac_status=$?
19208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19209   (exit $ac_status); }; } &&
19210          { ac_try='test -s conftest$ac_exeext'
19211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19212   (eval $ac_try) 2>&5
19213   ac_status=$?
19214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19215   (exit $ac_status); }; }; then
19216   ac_cv_lib_XextSam_XShmQueryExtension=yes
19217 else
19218   echo "$as_me: failed program was:" >&5
19219 sed 's/^/| /' conftest.$ac_ext >&5
19220
19221 ac_cv_lib_XextSam_XShmQueryExtension=no
19222 fi
19223 rm -f conftest.err conftest.$ac_objext \
19224       conftest$ac_exeext conftest.$ac_ext
19225 LIBS=$ac_check_lib_save_LIBS
19226 fi
19227 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
19228 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
19229 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
19230   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
19231 else
19232   true
19233 fi
19234
19235   CPPFLAGS="$ac_save_CPPFLAGS"
19236   LDFLAGS="$ac_save_LDFLAGS"
19237 #  LIBS="$ac_save_LIBS"
19238
19239       fi
19240     ;;
19241   esac
19242
19243   # if that succeeded, then we've really got it.
19244   if test "$have_xshm" = yes; then
19245     cat >>confdefs.h <<\_ACEOF
19246 #define HAVE_XSHM_EXTENSION 1
19247 _ACEOF
19248
19249   fi
19250
19251 elif test "$with_xshm" != no; then
19252   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
19253   exit 1
19254 fi
19255
19256
19257 ###############################################################################
19258 #
19259 #       Check for the DOUBLE-BUFFER server extension.
19260 #
19261 ###############################################################################
19262
19263 have_xdbe=no
19264 with_xdbe_req=unspecified
19265
19266 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
19267 if test "${with_xdbe_ext+set}" = set; then
19268   withval="$with_xdbe_ext"
19269   with_xdbe="$withval"; with_xdbe_req="$withval"
19270 else
19271   with_xdbe=yes
19272 fi;
19273
19274
19275    case "$with_xdbe" in
19276     yes) ;;
19277     no)  ;;
19278
19279     /*)
19280      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
19281 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
19282      d=$with_xdbe/include
19283      if test -d $d; then
19284        X_CFLAGS="-I$d $X_CFLAGS"
19285        echo "$as_me:$LINENO: result: $d" >&5
19286 echo "${ECHO_T}$d" >&6
19287      else
19288        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19289 echo "${ECHO_T}not found ($d: no such directory)" >&6
19290      fi
19291
19292      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
19293 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
19294      d=$with_xdbe/lib
19295      if test -d $d; then
19296        X_LIBS="-L$d $X_LIBS"
19297        echo "$as_me:$LINENO: result: $d" >&5
19298 echo "${ECHO_T}$d" >&6
19299      else
19300        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19301 echo "${ECHO_T}not found ($d: no such directory)" >&6
19302      fi
19303
19304      # replace the directory string with "yes".
19305      with_xdbe_req="yes"
19306      with_xdbe=$with_xdbe_req
19307      ;;
19308
19309     *)
19310      echo ""
19311      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
19312      echo "       If it is a directory, then \`DIR/include' will be added to"
19313      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19314      exit 1
19315      ;;
19316    esac
19317
19318
19319 if test "$with_xdbe" = yes; then
19320
19321
19322   ac_save_CPPFLAGS="$CPPFLAGS"
19323   if test \! -z "$includedir" ; then
19324     CPPFLAGS="$CPPFLAGS -I$includedir"
19325   fi
19326   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19327   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
19328 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
19329 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
19330   echo $ECHO_N "(cached) $ECHO_C" >&6
19331 else
19332   cat >conftest.$ac_ext <<_ACEOF
19333 /* confdefs.h.  */
19334 _ACEOF
19335 cat confdefs.h >>conftest.$ac_ext
19336 cat >>conftest.$ac_ext <<_ACEOF
19337 /* end confdefs.h.  */
19338 #include <X11/Xlib.h>
19339
19340 #include <X11/extensions/Xdbe.h>
19341 _ACEOF
19342 rm -f conftest.$ac_objext
19343 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19344   (eval $ac_compile) 2>conftest.er1
19345   ac_status=$?
19346   grep -v '^ *+' conftest.er1 >conftest.err
19347   rm -f conftest.er1
19348   cat conftest.err >&5
19349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19350   (exit $ac_status); } &&
19351          { ac_try='test -z "$ac_c_werror_flag"
19352                          || test ! -s conftest.err'
19353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19354   (eval $ac_try) 2>&5
19355   ac_status=$?
19356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19357   (exit $ac_status); }; } &&
19358          { ac_try='test -s conftest.$ac_objext'
19359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19360   (eval $ac_try) 2>&5
19361   ac_status=$?
19362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19363   (exit $ac_status); }; }; then
19364   ac_cv_header_X11_extensions_Xdbe_h=yes
19365 else
19366   echo "$as_me: failed program was:" >&5
19367 sed 's/^/| /' conftest.$ac_ext >&5
19368
19369 ac_cv_header_X11_extensions_Xdbe_h=no
19370 fi
19371 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19372 fi
19373 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
19374 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
19375 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
19376   have_xdbe=yes
19377 fi
19378
19379
19380   CPPFLAGS="$ac_save_CPPFLAGS"
19381   if test "$have_xdbe" = yes; then
19382     cat >>confdefs.h <<\_ACEOF
19383 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
19384 _ACEOF
19385
19386   fi
19387
19388 elif test "$with_xdbe" != no; then
19389   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
19390   exit 1
19391 fi
19392
19393
19394 ###############################################################################
19395 #
19396 #       Check for the SGI XReadDisplay server extension.
19397 #
19398 #       Note: this has to be down here, rather than up with the other server
19399 #       extension tests, so that the output of `configure --help' is in the
19400 #       right order.  Arrgh!
19401 #
19402 ###############################################################################
19403
19404 have_readdisplay=no
19405 with_readdisplay_req=unspecified
19406
19407 # Check whether --with-readdisplay or --without-readdisplay was given.
19408 if test "${with_readdisplay+set}" = set; then
19409   withval="$with_readdisplay"
19410   with_readdisplay="$withval"; with_readdisplay_req="$withval"
19411 else
19412   with_readdisplay=yes
19413 fi;
19414
19415
19416    case "$with_readdisplay" in
19417     yes) ;;
19418     no)  ;;
19419
19420     /*)
19421      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
19422 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
19423      d=$with_readdisplay/include
19424      if test -d $d; then
19425        X_CFLAGS="-I$d $X_CFLAGS"
19426        echo "$as_me:$LINENO: result: $d" >&5
19427 echo "${ECHO_T}$d" >&6
19428      else
19429        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19430 echo "${ECHO_T}not found ($d: no such directory)" >&6
19431      fi
19432
19433      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
19434 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
19435      d=$with_readdisplay/lib
19436      if test -d $d; then
19437        X_LIBS="-L$d $X_LIBS"
19438        echo "$as_me:$LINENO: result: $d" >&5
19439 echo "${ECHO_T}$d" >&6
19440      else
19441        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19442 echo "${ECHO_T}not found ($d: no such directory)" >&6
19443      fi
19444
19445      # replace the directory string with "yes".
19446      with_readdisplay_req="yes"
19447      with_readdisplay=$with_readdisplay_req
19448      ;;
19449
19450     *)
19451      echo ""
19452      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
19453      echo "       If it is a directory, then \`DIR/include' will be added to"
19454      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19455      exit 1
19456      ;;
19457    esac
19458
19459
19460 if test "$with_readdisplay" = yes; then
19461
19462   ac_save_CPPFLAGS="$CPPFLAGS"
19463   if test \! -z "$includedir" ; then
19464     CPPFLAGS="$CPPFLAGS -I$includedir"
19465   fi
19466   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
19467   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
19468 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
19469 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
19470   echo $ECHO_N "(cached) $ECHO_C" >&6
19471 else
19472   cat >conftest.$ac_ext <<_ACEOF
19473 /* confdefs.h.  */
19474 _ACEOF
19475 cat confdefs.h >>conftest.$ac_ext
19476 cat >>conftest.$ac_ext <<_ACEOF
19477 /* end confdefs.h.  */
19478 #include <X11/Xlib.h>
19479
19480 #include <X11/extensions/readdisplay.h>
19481 _ACEOF
19482 rm -f conftest.$ac_objext
19483 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19484   (eval $ac_compile) 2>conftest.er1
19485   ac_status=$?
19486   grep -v '^ *+' conftest.er1 >conftest.err
19487   rm -f conftest.er1
19488   cat conftest.err >&5
19489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19490   (exit $ac_status); } &&
19491          { ac_try='test -z "$ac_c_werror_flag"
19492                          || test ! -s conftest.err'
19493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19494   (eval $ac_try) 2>&5
19495   ac_status=$?
19496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19497   (exit $ac_status); }; } &&
19498          { ac_try='test -s conftest.$ac_objext'
19499   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19500   (eval $ac_try) 2>&5
19501   ac_status=$?
19502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19503   (exit $ac_status); }; }; then
19504   ac_cv_header_X11_extensions_readdisplay_h=yes
19505 else
19506   echo "$as_me: failed program was:" >&5
19507 sed 's/^/| /' conftest.$ac_ext >&5
19508
19509 ac_cv_header_X11_extensions_readdisplay_h=no
19510 fi
19511 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19512 fi
19513 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
19514 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
19515 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
19516   cat >>confdefs.h <<\_ACEOF
19517 #define HAVE_READ_DISPLAY_EXTENSION 1
19518 _ACEOF
19519
19520 fi
19521
19522
19523   CPPFLAGS="$ac_save_CPPFLAGS"
19524 elif test "$with_readdisplay" != no; then
19525   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
19526   exit 1
19527 fi
19528
19529
19530 ###############################################################################
19531 #
19532 #       Check for a directory full of images to use as the default value
19533 #       of the "imageDirectory" preference.
19534 #
19535 ###############################################################################
19536
19537 have_imagedir=no
19538 with_imagedir_req=unspecified
19539
19540
19541 # Check whether --with-image-directory or --without-image-directory was given.
19542 if test "${with_image_directory+set}" = set; then
19543   withval="$with_image_directory"
19544   with_imagedir="$withval"; with_imagedir_req="$withval"
19545 else
19546   with_imagedir=yes
19547 fi;
19548 # no HANDLE_X_PATH_ARG for this one
19549
19550 case "$with_imagedir" in
19551   /*)
19552     # absolute path
19553     echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
19554 echo $ECHO_N "checking for image directory $with_imagedir... $ECHO_C" >&6
19555     if test -d "$with_imagedir" ; then
19556       echo "$as_me:$LINENO: result: yes" >&5
19557 echo "${ECHO_T}yes" >&6
19558     else
19559       echo "$as_me:$LINENO: result: no" >&5
19560 echo "${ECHO_T}no" >&6
19561       with_imagedir=""
19562     fi
19563   ;;
19564   yes)
19565     with_imagedir=""
19566
19567     #### Could use some more defaults here...
19568     for dd in \
19569       "/usr/share/backgrounds/images/"          \
19570       "/usr/share/wallpapers/"                  \
19571       "/Library/Desktop Pictures/"              \
19572     ; do
19573       if test -z "$with_imagedir"; then
19574         echo "$as_me:$LINENO: checking for image directory $dd" >&5
19575 echo $ECHO_N "checking for image directory $dd... $ECHO_C" >&6
19576         if test -d "$dd" ; then
19577           echo "$as_me:$LINENO: result: yes" >&5
19578 echo "${ECHO_T}yes" >&6
19579           with_imagedir="$dd"
19580         else
19581           echo "$as_me:$LINENO: result: no" >&5
19582 echo "${ECHO_T}no" >&6
19583         fi
19584       fi
19585     done
19586
19587   ;;
19588   no)
19589     with_imagedir=""
19590   ;;
19591
19592   *)
19593     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
19594     exit 1
19595   ;;
19596 esac
19597 ac_cv_imagedir="$with_imagedir"
19598
19599 DEFAULT_IMAGES_P='True'
19600 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
19601
19602 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
19603   DEFAULT_IMAGES_P='False'
19604 fi
19605
19606
19607 ###############################################################################
19608 #
19609 #       Pick a text file to use as the default of the "textFile" preference.
19610 #       Any old file will do, but preferably one that will make interesting
19611 #       shapes when displayed by "starwars" and "fontglide".
19612 #
19613 ###############################################################################
19614
19615 have_textfile=no
19616 with_textfile_req=unspecified
19617
19618
19619 # Check whether --with-text-file or --without-text-file was given.
19620 if test "${with_text_file+set}" = set; then
19621   withval="$with_text_file"
19622   with_textfile="$withval"; with_textfile_req="$withval"
19623 else
19624   with_textfile=yes
19625 fi;
19626 # no HANDLE_X_PATH_ARG for this one
19627
19628 case "$with_textfile" in
19629   /*)
19630     # absolute path
19631     echo "$as_me:$LINENO: checking for text file $with_textfile" >&5
19632 echo $ECHO_N "checking for text file $with_textfile... $ECHO_C" >&6
19633     if test -f "$with_textfile" ; then
19634       echo "$as_me:$LINENO: result: yes" >&5
19635 echo "${ECHO_T}yes" >&6
19636     else
19637       echo "$as_me:$LINENO: result: no" >&5
19638 echo "${ECHO_T}no" >&6
19639       with_textfile=""
19640     fi
19641   ;;
19642   yes)
19643     with_textfile=""
19644
19645     #### Could use some more defaults here...
19646     for f in \
19647       "/usr/X11R6/lib/X11/doc/README"           \
19648       "/usr/share/doc/xserver-common/copyright" \
19649       "/usr/X11R6/README"                       \
19650     ; do
19651       if test -z "$with_textfile"; then
19652         echo "$as_me:$LINENO: checking for text file $f" >&5
19653 echo $ECHO_N "checking for text file $f... $ECHO_C" >&6
19654         if test -f "$f" ; then
19655           echo "$as_me:$LINENO: result: yes" >&5
19656 echo "${ECHO_T}yes" >&6
19657           with_textfile="$f"
19658         else
19659           echo "$as_me:$LINENO: result: no" >&5
19660 echo "${ECHO_T}no" >&6
19661         fi
19662       fi
19663     done
19664
19665   ;;
19666   no)
19667     with_textfile=""
19668   ;;
19669
19670   *)
19671     echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
19672     exit 1
19673   ;;
19674 esac
19675 ac_cv_textfile="$with_textfile"
19676
19677 DEFAULT_TEXT_FILE="$ac_cv_textfile"
19678
19679
19680 ###############################################################################
19681 #
19682 #       Check the browser to see help URL
19683 #
19684 ###############################################################################
19685
19686 have_browser=no
19687 with_browser_req=unspecified
19688
19689
19690 # Check whether --with-browser or --without-browser was given.
19691 if test "${with_browser+set}" = set; then
19692   withval="$with_browser"
19693   with_browser="$withval"; with_browser_req="$withval"
19694 else
19695   with_browser=no
19696 fi;
19697 # no HANDLE_X_PATH_ARG for this one
19698
19699 case "$with_browser" in
19700   no )
19701   ;;
19702   * )
19703     WITH_BROWSER=$with_browser
19704     gnome_open_program=$with_browser
19705     echo "$as_me:$LINENO: checking for browser $with_browser" >&5
19706 echo $ECHO_N "checking for browser $with_browser... $ECHO_C" >&6
19707     with_browser_fullpath=`which $with_browser 2>/dev/null`
19708     case $with_browser_fullpath in
19709          /* )
19710                 echo "$as_me:$LINENO: result: yes" >&5
19711 echo "${ECHO_T}yes" >&6
19712                  have_browser=yes
19713                  ;;
19714         * )
19715                echo "$as_me:$LINENO: result: no" >&5
19716 echo "${ECHO_T}no" >&6
19717 # Only warning: we don't want to install all packages for the
19718 # dependency of the browser in building stage...
19719                echo "WARNING: browser not found: --with-browser=$with_browser"
19720                ;;
19721     esac
19722   ;;
19723 esac
19724 ac_cv_browser="$with_browser"
19725
19726 ###############################################################################
19727 #
19728 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
19729 #       This should be safe, but let's give people the option.
19730 #
19731 ###############################################################################
19732
19733 setuid_hacks_default=no
19734 setuid_hacks="$setuid_hacks_default"
19735
19736 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
19737 if test "${with_setuid_hacks+set}" = set; then
19738   withval="$with_setuid_hacks"
19739   setuid_hacks="$withval"
19740 else
19741   setuid_hacks="$setuid_hacks_default"
19742 fi;
19743
19744
19745    case "$setuid_hacks" in
19746     yes) ;;
19747     no)  ;;
19748
19749     /*)
19750      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
19751 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
19752      d=$setuid_hacks/include
19753      if test -d $d; then
19754        X_CFLAGS="-I$d $X_CFLAGS"
19755        echo "$as_me:$LINENO: result: $d" >&5
19756 echo "${ECHO_T}$d" >&6
19757      else
19758        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19759 echo "${ECHO_T}not found ($d: no such directory)" >&6
19760      fi
19761
19762      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
19763 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
19764      d=$setuid_hacks/lib
19765      if test -d $d; then
19766        X_LIBS="-L$d $X_LIBS"
19767        echo "$as_me:$LINENO: result: $d" >&5
19768 echo "${ECHO_T}$d" >&6
19769      else
19770        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19771 echo "${ECHO_T}not found ($d: no such directory)" >&6
19772      fi
19773
19774      # replace the directory string with "yes".
19775      setuid_hacks_req="yes"
19776      setuid_hacks=$setuid_hacks_req
19777      ;;
19778
19779     *)
19780      echo ""
19781      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
19782      echo "       If it is a directory, then \`DIR/include' will be added to"
19783      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19784      exit 1
19785      ;;
19786    esac
19787
19788
19789 if test "$setuid_hacks" = yes; then
19790   true
19791 elif test "$setuid_hacks" != no; then
19792   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
19793   exit 1
19794 fi
19795
19796
19797 ###############################################################################
19798 #
19799 #       Done testing.  Now, set up the various -I and -L variables,
19800 #       and decide which GUI program to build by default.
19801 #
19802 ###############################################################################
19803
19804 DEPEND=makedepend
19805 DEPEND_FLAGS=
19806 DEPEND_DEFINES=
19807
19808
19809 if test \! -z "$includedir" ; then
19810   INCLUDES="$INCLUDES -I$includedir"
19811 fi
19812
19813 if test \! -z "$libdir" ; then
19814   LDFLAGS="$LDFLAGS -L$libdir"
19815 fi
19816
19817
19818 PREFERRED_DEMO_PROGRAM=''
19819 ALL_DEMO_PROGRAMS=
19820 if test "$have_motif" = yes; then
19821   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
19822   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
19823 fi
19824 if test "$have_gtk" = yes; then
19825   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
19826   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
19827 fi
19828
19829
19830 if test "$have_kerberos" = yes; then
19831   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
19832   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
19833 fi
19834 if test "$have_pam" = yes; then
19835   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
19836   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
19837   INSTALL_PAM="install-pam"
19838 fi
19839 if test "$have_passwd_helper" = yes; then
19840   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
19841   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
19842 fi
19843   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
19844   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
19845
19846
19847 if test "$enable_locking" = yes; then
19848   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
19849   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
19850 else
19851   LOCK_SRCS='$(NOLOCK_SRCS_1)'
19852   LOCK_OBJS='$(NOLOCK_OBJS_1)'
19853 fi
19854
19855 if test "$ac_macosx" = yes; then
19856   EXES_OSX='$(EXES_OSX)'
19857   SCRIPTS_OSX='$(SCRIPTS_OSX)'
19858   MEN_OSX='$(MEN_OSX)'
19859 else
19860   EXES_OSX=
19861   SCRIPTS_OSX=
19862   MEN_OSX=
19863 fi
19864
19865
19866 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
19867
19868 if test "$need_setuid" = yes; then
19869   NEED_SETUID=yes
19870 else
19871   NEED_SETUID=no
19872 fi
19873
19874 if test "$setuid_hacks" = yes; then
19875   SETUID_HACKS=yes
19876 else
19877   SETUID_HACKS=no
19878 fi
19879
19880 tab='   '
19881 if test "$have_gl" = yes; then
19882   GL_EXES='$(GL_EXES)'
19883   GL_UTIL_EXES='$(GL_UTIL_EXES)'
19884   GL_MEN='$(GL_MEN)'
19885   GL_KLUDGE="${tab}  "
19886 else
19887   GL_KLUDGE="-${tab}  "
19888 fi
19889
19890 if test "$have_gle" = yes; then
19891   GLE_EXES='$(GLE_EXES)'
19892   GLE_KLUDGE="${tab}   "
19893 else
19894   GLE_KLUDGE="-${tab}   "
19895 fi
19896
19897 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
19898  JPEG_EXES='$(JPEG_EXES)'
19899 fi
19900
19901
19902 # Another substitution in the XScreenSaver.ad.in file:
19903 #
19904 if test "$gnome_open_program" != ''; then
19905   GNOME24=''
19906   GNOME22='!    '
19907   NOGNOME='!    '
19908 elif test "$gnome_url_show_program" != ''; then
19909   GNOME24='!    '
19910   GNOME22=''
19911   NOGNOME='!    '
19912 else
19913   GNOME24='!    '
19914   GNOME22='!    '
19915   NOGNOME=''
19916 fi
19917
19918
19919 # Set PO_DATADIR to something sensible.
19920 #
19921 echo "$as_me:$LINENO: checking for locale directory" >&5
19922 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
19923 if test -n "$GTK_DATADIR" ; then
19924   PO_DATADIR="$GTK_DATADIR"
19925 elif test "$have_gtk" = yes; then
19926   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
19927   PO_DATADIR="$PO_DATADIR/share"
19928 fi
19929
19930 if test -z "$PO_DATADIR" ; then
19931   #
19932   # #### Total fucking kludge --
19933   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
19934   # but of course we need to expand all the nested variables to do that...
19935   #
19936   dd=$datadir
19937   eval dd=${dd}
19938   eval dd=${dd}
19939   eval dd=${dd}
19940   eval dd=${dd}
19941   eval dd=${dd}
19942   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
19943 fi
19944
19945 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
19946 echo "${ECHO_T}$PO_DATADIR/locale" >&6
19947
19948
19949 # canonicalize slashes.
19950 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
19951
19952 # gcc 3.0 likes to issue this warning for every file:
19953 #
19954 # cc1: warning: changing search order for system directory "/usr/local/include"
19955 # cc1: warning:   as it has already been specified as a non-system directory
19956 #
19957 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
19958 # Which *should* be totally redundant, and thus an ok thing to delete?
19959 #
19960 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
19961
19962
19963 ###############################################################################
19964 #
19965 #       Perform substitutions and write Makefiles.
19966 #
19967 ###############################################################################
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031 APPDEFAULTS=$ac_x_app_defaults
20032
20033
20034
20035
20036
20037
20038
20039                                                                       ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
20040 cat >confcache <<\_ACEOF
20041 # This file is a shell script that caches the results of configure
20042 # tests run on this system so they can be shared between configure
20043 # scripts and configure runs, see configure's option --config-cache.
20044 # It is not useful on other systems.  If it contains results you don't
20045 # want to keep, you may remove or edit it.
20046 #
20047 # config.status only pays attention to the cache file if you give it
20048 # the --recheck option to rerun configure.
20049 #
20050 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20051 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20052 # following values.
20053
20054 _ACEOF
20055
20056 # The following way of writing the cache mishandles newlines in values,
20057 # but we know of no workaround that is simple, portable, and efficient.
20058 # So, don't put newlines in cache variables' values.
20059 # Ultrix sh set writes to stderr and can't be redirected directly,
20060 # and sets the high bit in the cache file unless we assign to the vars.
20061 {
20062   (set) 2>&1 |
20063     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20064     *ac_space=\ *)
20065       # `set' does not quote correctly, so add quotes (double-quote
20066       # substitution turns \\\\ into \\, and sed turns \\ into \).
20067       sed -n \
20068         "s/'/'\\\\''/g;
20069           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20070       ;;
20071     *)
20072       # `set' quotes correctly as required by POSIX, so do not add quotes.
20073       sed -n \
20074         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20075       ;;
20076     esac;
20077 } |
20078   sed '
20079      t clear
20080      : clear
20081      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20082      t end
20083      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20084      : end' >>confcache
20085 if diff $cache_file confcache >/dev/null 2>&1; then :; else
20086   if test -w $cache_file; then
20087     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20088     cat confcache >$cache_file
20089   else
20090     echo "not updating unwritable cache $cache_file"
20091   fi
20092 fi
20093 rm -f confcache
20094
20095 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20096 # Let make expand exec_prefix.
20097 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20098
20099 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20100 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20101 # trailing colons and then remove the whole line if VPATH becomes empty
20102 # (actually we leave an empty line to preserve line numbers).
20103 if test "x$srcdir" = x.; then
20104   ac_vpsub='/^[  ]*VPATH[        ]*=/{
20105 s/:*\$(srcdir):*/:/;
20106 s/:*\${srcdir}:*/:/;
20107 s/:*@srcdir@:*/:/;
20108 s/^\([^=]*=[     ]*\):*/\1/;
20109 s/:*$//;
20110 s/^[^=]*=[       ]*$//;
20111 }'
20112 fi
20113
20114 DEFS=-DHAVE_CONFIG_H
20115
20116 ac_libobjs=
20117 ac_ltlibobjs=
20118 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20119   # 1. Remove the extension, and $U if already installed.
20120   ac_i=`echo "$ac_i" |
20121          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
20122   # 2. Add them.
20123   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
20124   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
20125 done
20126 LIBOBJS=$ac_libobjs
20127
20128 LTLIBOBJS=$ac_ltlibobjs
20129
20130
20131
20132
20133         mv -f po/POTFILES po/POTFILES.tmp
20134         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
20135         rm -f po/POTFILES.tmp
20136
20137
20138
20139 : ${CONFIG_STATUS=./config.status}
20140 ac_clean_files_save=$ac_clean_files
20141 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20142 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20143 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20144 cat >$CONFIG_STATUS <<_ACEOF
20145 #! $SHELL
20146 # Generated by $as_me.
20147 # Run this file to recreate the current configuration.
20148 # Compiler output produced by configure, useful for debugging
20149 # configure, is in config.log if it exists.
20150
20151 debug=false
20152 ac_cs_recheck=false
20153 ac_cs_silent=false
20154 SHELL=\${CONFIG_SHELL-$SHELL}
20155 _ACEOF
20156
20157 cat >>$CONFIG_STATUS <<\_ACEOF
20158 ## --------------------- ##
20159 ## M4sh Initialization.  ##
20160 ## --------------------- ##
20161
20162 # Be Bourne compatible
20163 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20164   emulate sh
20165   NULLCMD=:
20166   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20167   # is contrary to our usage.  Disable this feature.
20168   alias -g '${1+"$@"}'='"$@"'
20169 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20170   set -o posix
20171 fi
20172 DUALCASE=1; export DUALCASE # for MKS sh
20173
20174 # Support unset when possible.
20175 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
20176   as_unset=unset
20177 else
20178   as_unset=false
20179 fi
20180
20181
20182 # Work around bugs in pre-3.0 UWIN ksh.
20183 $as_unset ENV MAIL MAILPATH
20184 PS1='$ '
20185 PS2='> '
20186 PS4='+ '
20187
20188 # NLS nuisances.
20189 for as_var in \
20190   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20191   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20192   LC_TELEPHONE LC_TIME
20193 do
20194   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
20195     eval $as_var=C; export $as_var
20196   else
20197     $as_unset $as_var
20198   fi
20199 done
20200
20201 # Required to use basename.
20202 if expr a : '\(a\)' >/dev/null 2>&1; then
20203   as_expr=expr
20204 else
20205   as_expr=false
20206 fi
20207
20208 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
20209   as_basename=basename
20210 else
20211   as_basename=false
20212 fi
20213
20214
20215 # Name of the executable.
20216 as_me=`$as_basename "$0" ||
20217 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20218          X"$0" : 'X\(//\)$' \| \
20219          X"$0" : 'X\(/\)$' \| \
20220          .     : '\(.\)' 2>/dev/null ||
20221 echo X/"$0" |
20222     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
20223           /^X\/\(\/\/\)$/{ s//\1/; q; }
20224           /^X\/\(\/\).*/{ s//\1/; q; }
20225           s/.*/./; q'`
20226
20227
20228 # PATH needs CR, and LINENO needs CR and PATH.
20229 # Avoid depending upon Character Ranges.
20230 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20231 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20232 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20233 as_cr_digits='0123456789'
20234 as_cr_alnum=$as_cr_Letters$as_cr_digits
20235
20236 # The user is always right.
20237 if test "${PATH_SEPARATOR+set}" != set; then
20238   echo "#! /bin/sh" >conf$$.sh
20239   echo  "exit 0"   >>conf$$.sh
20240   chmod +x conf$$.sh
20241   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20242     PATH_SEPARATOR=';'
20243   else
20244     PATH_SEPARATOR=:
20245   fi
20246   rm -f conf$$.sh
20247 fi
20248
20249
20250   as_lineno_1=$LINENO
20251   as_lineno_2=$LINENO
20252   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20253   test "x$as_lineno_1" != "x$as_lineno_2" &&
20254   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
20255   # Find who we are.  Look in the path if we contain no path at all
20256   # relative or not.
20257   case $0 in
20258     *[\\/]* ) as_myself=$0 ;;
20259     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20260 for as_dir in $PATH
20261 do
20262   IFS=$as_save_IFS
20263   test -z "$as_dir" && as_dir=.
20264   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20265 done
20266
20267        ;;
20268   esac
20269   # We did not find ourselves, most probably we were run as `sh COMMAND'
20270   # in which case we are not to be found in the path.
20271   if test "x$as_myself" = x; then
20272     as_myself=$0
20273   fi
20274   if test ! -f "$as_myself"; then
20275     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
20276 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
20277    { (exit 1); exit 1; }; }
20278   fi
20279   case $CONFIG_SHELL in
20280   '')
20281     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20282 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
20283 do
20284   IFS=$as_save_IFS
20285   test -z "$as_dir" && as_dir=.
20286   for as_base in sh bash ksh sh5; do
20287          case $as_dir in
20288          /*)
20289            if ("$as_dir/$as_base" -c '
20290   as_lineno_1=$LINENO
20291   as_lineno_2=$LINENO
20292   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20293   test "x$as_lineno_1" != "x$as_lineno_2" &&
20294   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
20295              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
20296              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
20297              CONFIG_SHELL=$as_dir/$as_base
20298              export CONFIG_SHELL
20299              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
20300            fi;;
20301          esac
20302        done
20303 done
20304 ;;
20305   esac
20306
20307   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20308   # uniformly replaced by the line number.  The first 'sed' inserts a
20309   # line-number line before each line; the second 'sed' does the real
20310   # work.  The second script uses 'N' to pair each line-number line
20311   # with the numbered line, and appends trailing '-' during
20312   # substitution so that $LINENO is not a special case at line end.
20313   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20314   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
20315   sed '=' <$as_myself |
20316     sed '
20317       N
20318       s,$,-,
20319       : loop
20320       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
20321       t loop
20322       s,-$,,
20323       s,^['$as_cr_digits']*\n,,
20324     ' >$as_me.lineno &&
20325   chmod +x $as_me.lineno ||
20326     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
20327 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
20328    { (exit 1); exit 1; }; }
20329
20330   # Don't try to exec as it changes $[0], causing all sort of problems
20331   # (the dirname of $[0] is not the place where we might find the
20332   # original and so on.  Autoconf is especially sensible to this).
20333   . ./$as_me.lineno
20334   # Exit status is that of the last command.
20335   exit
20336 }
20337
20338
20339 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
20340   *c*,-n*) ECHO_N= ECHO_C='
20341 ' ECHO_T='      ' ;;
20342   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
20343   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
20344 esac
20345
20346 if expr a : '\(a\)' >/dev/null 2>&1; then
20347   as_expr=expr
20348 else
20349   as_expr=false
20350 fi
20351
20352 rm -f conf$$ conf$$.exe conf$$.file
20353 echo >conf$$.file
20354 if ln -s conf$$.file conf$$ 2>/dev/null; then
20355   # We could just check for DJGPP; but this test a) works b) is more generic
20356   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20357   if test -f conf$$.exe; then
20358     # Don't use ln at all; we don't have any links
20359     as_ln_s='cp -p'
20360   else
20361     as_ln_s='ln -s'
20362   fi
20363 elif ln conf$$.file conf$$ 2>/dev/null; then
20364   as_ln_s=ln
20365 else
20366   as_ln_s='cp -p'
20367 fi
20368 rm -f conf$$ conf$$.exe conf$$.file
20369
20370 if mkdir -p . 2>/dev/null; then
20371   as_mkdir_p=:
20372 else
20373   test -d ./-p && rmdir ./-p
20374   as_mkdir_p=false
20375 fi
20376
20377 as_executable_p="test -f"
20378
20379 # Sed expression to map a string onto a valid CPP name.
20380 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20381
20382 # Sed expression to map a string onto a valid variable name.
20383 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20384
20385
20386 # IFS
20387 # We need space, tab and new line, in precisely that order.
20388 as_nl='
20389 '
20390 IFS="   $as_nl"
20391
20392 # CDPATH.
20393 $as_unset CDPATH
20394
20395 exec 6>&1
20396
20397 # Open the log real soon, to keep \$[0] and so on meaningful, and to
20398 # report actual input values of CONFIG_FILES etc. instead of their
20399 # values after options handling.  Logging --version etc. is OK.
20400 exec 5>>config.log
20401 {
20402   echo
20403   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20404 ## Running $as_me. ##
20405 _ASBOX
20406 } >&5
20407 cat >&5 <<_CSEOF
20408
20409 This file was extended by $as_me, which was
20410 generated by GNU Autoconf 2.59.  Invocation command line was
20411
20412   CONFIG_FILES    = $CONFIG_FILES
20413   CONFIG_HEADERS  = $CONFIG_HEADERS
20414   CONFIG_LINKS    = $CONFIG_LINKS
20415   CONFIG_COMMANDS = $CONFIG_COMMANDS
20416   $ $0 $@
20417
20418 _CSEOF
20419 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
20420 echo >&5
20421 _ACEOF
20422
20423 # Files that config.status was made for.
20424 if test -n "$ac_config_files"; then
20425   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20426 fi
20427
20428 if test -n "$ac_config_headers"; then
20429   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20430 fi
20431
20432 if test -n "$ac_config_links"; then
20433   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20434 fi
20435
20436 if test -n "$ac_config_commands"; then
20437   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20438 fi
20439
20440 cat >>$CONFIG_STATUS <<\_ACEOF
20441
20442 ac_cs_usage="\
20443 \`$as_me' instantiates files from templates according to the
20444 current configuration.
20445
20446 Usage: $0 [OPTIONS] [FILE]...
20447
20448   -h, --help       print this help, then exit
20449   -V, --version    print version number, then exit
20450   -q, --quiet      do not print progress messages
20451   -d, --debug      don't remove temporary files
20452       --recheck    update $as_me by reconfiguring in the same conditions
20453   --file=FILE[:TEMPLATE]
20454                    instantiate the configuration file FILE
20455   --header=FILE[:TEMPLATE]
20456                    instantiate the configuration header FILE
20457
20458 Configuration files:
20459 $config_files
20460
20461 Configuration headers:
20462 $config_headers
20463
20464 Configuration commands:
20465 $config_commands
20466
20467 Report bugs to <bug-autoconf@gnu.org>."
20468 _ACEOF
20469
20470 cat >>$CONFIG_STATUS <<_ACEOF
20471 ac_cs_version="\\
20472 config.status
20473 configured by $0, generated by GNU Autoconf 2.59,
20474   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20475
20476 Copyright (C) 2003 Free Software Foundation, Inc.
20477 This config.status script is free software; the Free Software Foundation
20478 gives unlimited permission to copy, distribute and modify it."
20479 srcdir=$srcdir
20480 INSTALL="$INSTALL"
20481 _ACEOF
20482
20483 cat >>$CONFIG_STATUS <<\_ACEOF
20484 # If no file are specified by the user, then we need to provide default
20485 # value.  By we need to know if files were specified by the user.
20486 ac_need_defaults=:
20487 while test $# != 0
20488 do
20489   case $1 in
20490   --*=*)
20491     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20492     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20493     ac_shift=:
20494     ;;
20495   -*)
20496     ac_option=$1
20497     ac_optarg=$2
20498     ac_shift=shift
20499     ;;
20500   *) # This is not an option, so the user has probably given explicit
20501      # arguments.
20502      ac_option=$1
20503      ac_need_defaults=false;;
20504   esac
20505
20506   case $ac_option in
20507   # Handling of the options.
20508 _ACEOF
20509 cat >>$CONFIG_STATUS <<\_ACEOF
20510   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20511     ac_cs_recheck=: ;;
20512   --version | --vers* | -V )
20513     echo "$ac_cs_version"; exit 0 ;;
20514   --he | --h)
20515     # Conflict between --help and --header
20516     { { echo "$as_me:$LINENO: error: ambiguous option: $1
20517 Try \`$0 --help' for more information." >&5
20518 echo "$as_me: error: ambiguous option: $1
20519 Try \`$0 --help' for more information." >&2;}
20520    { (exit 1); exit 1; }; };;
20521   --help | --hel | -h )
20522     echo "$ac_cs_usage"; exit 0 ;;
20523   --debug | --d* | -d )
20524     debug=: ;;
20525   --file | --fil | --fi | --f )
20526     $ac_shift
20527     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
20528     ac_need_defaults=false;;
20529   --header | --heade | --head | --hea )
20530     $ac_shift
20531     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
20532     ac_need_defaults=false;;
20533   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20534   | -silent | --silent | --silen | --sile | --sil | --si | --s)
20535     ac_cs_silent=: ;;
20536
20537   # This is an error.
20538   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
20539 Try \`$0 --help' for more information." >&5
20540 echo "$as_me: error: unrecognized option: $1
20541 Try \`$0 --help' for more information." >&2;}
20542    { (exit 1); exit 1; }; } ;;
20543
20544   *) ac_config_targets="$ac_config_targets $1" ;;
20545
20546   esac
20547   shift
20548 done
20549
20550 ac_configure_extra_args=
20551
20552 if $ac_cs_silent; then
20553   exec 6>/dev/null
20554   ac_configure_extra_args="$ac_configure_extra_args --silent"
20555 fi
20556
20557 _ACEOF
20558 cat >>$CONFIG_STATUS <<_ACEOF
20559 if \$ac_cs_recheck; then
20560   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
20561   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20562 fi
20563
20564 _ACEOF
20565
20566 cat >>$CONFIG_STATUS <<_ACEOF
20567 #
20568 # INIT-COMMANDS section.
20569 #
20570
20571 INTLTOOL_PERL=${INTLTOOL_PERL}
20572
20573
20574 _ACEOF
20575
20576
20577
20578 cat >>$CONFIG_STATUS <<\_ACEOF
20579 for ac_config_target in $ac_config_targets
20580 do
20581   case "$ac_config_target" in
20582   # Handling of arguments.
20583   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20584   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
20585   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
20586   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
20587   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
20588   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
20589   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
20590   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
20591   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
20592   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
20593   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
20594 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20595    { (exit 1); exit 1; }; };;
20596   esac
20597 done
20598
20599 # If the user did not use the arguments to specify the items to instantiate,
20600 # then the envvar interface is used.  Set only those that are not.
20601 # We use the long form for the default assignment because of an extremely
20602 # bizarre bug on SunOS 4.1.3.
20603 if $ac_need_defaults; then
20604   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20605   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20606   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20607 fi
20608
20609 # Have a temporary directory for convenience.  Make it in the build tree
20610 # simply because there is no reason to put it here, and in addition,
20611 # creating and moving files from /tmp can sometimes cause problems.
20612 # Create a temporary directory, and hook for its removal unless debugging.
20613 $debug ||
20614 {
20615   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20616   trap '{ (exit 1); exit 1; }' 1 2 13 15
20617 }
20618
20619 # Create a (secure) tmp directory for tmp files.
20620
20621 {
20622   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
20623   test -n "$tmp" && test -d "$tmp"
20624 }  ||
20625 {
20626   tmp=./confstat$$-$RANDOM
20627   (umask 077 && mkdir $tmp)
20628 } ||
20629 {
20630    echo "$me: cannot create a temporary directory in ." >&2
20631    { (exit 1); exit 1; }
20632 }
20633
20634 _ACEOF
20635
20636 cat >>$CONFIG_STATUS <<_ACEOF
20637
20638 #
20639 # CONFIG_FILES section.
20640 #
20641
20642 # No need to generate the scripts if there are no CONFIG_FILES.
20643 # This happens for instance when ./config.status config.h
20644 if test -n "\$CONFIG_FILES"; then
20645   # Protect against being on the right side of a sed subst in config.status.
20646   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20647    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20648 s,@SHELL@,$SHELL,;t t
20649 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20650 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20651 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20652 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20653 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20654 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20655 s,@exec_prefix@,$exec_prefix,;t t
20656 s,@prefix@,$prefix,;t t
20657 s,@program_transform_name@,$program_transform_name,;t t
20658 s,@bindir@,$bindir,;t t
20659 s,@sbindir@,$sbindir,;t t
20660 s,@libexecdir@,$libexecdir,;t t
20661 s,@datadir@,$datadir,;t t
20662 s,@sysconfdir@,$sysconfdir,;t t
20663 s,@sharedstatedir@,$sharedstatedir,;t t
20664 s,@localstatedir@,$localstatedir,;t t
20665 s,@libdir@,$libdir,;t t
20666 s,@includedir@,$includedir,;t t
20667 s,@oldincludedir@,$oldincludedir,;t t
20668 s,@infodir@,$infodir,;t t
20669 s,@mandir@,$mandir,;t t
20670 s,@build_alias@,$build_alias,;t t
20671 s,@host_alias@,$host_alias,;t t
20672 s,@target_alias@,$target_alias,;t t
20673 s,@DEFS@,$DEFS,;t t
20674 s,@ECHO_C@,$ECHO_C,;t t
20675 s,@ECHO_N@,$ECHO_N,;t t
20676 s,@ECHO_T@,$ECHO_T,;t t
20677 s,@LIBS@,$LIBS,;t t
20678 s,@build@,$build,;t t
20679 s,@build_cpu@,$build_cpu,;t t
20680 s,@build_vendor@,$build_vendor,;t t
20681 s,@build_os@,$build_os,;t t
20682 s,@host@,$host,;t t
20683 s,@host_cpu@,$host_cpu,;t t
20684 s,@host_vendor@,$host_vendor,;t t
20685 s,@host_os@,$host_os,;t t
20686 s,@CC@,$CC,;t t
20687 s,@CFLAGS@,$CFLAGS,;t t
20688 s,@LDFLAGS@,$LDFLAGS,;t t
20689 s,@CPPFLAGS@,$CPPFLAGS,;t t
20690 s,@ac_ct_CC@,$ac_ct_CC,;t t
20691 s,@EXEEXT@,$EXEEXT,;t t
20692 s,@OBJEXT@,$OBJEXT,;t t
20693 s,@CPP@,$CPP,;t t
20694 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20695 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20696 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20697 s,@SET_MAKE@,$SET_MAKE,;t t
20698 s,@EGREP@,$EGREP,;t t
20699 s,@PERL@,$PERL,;t t
20700 s,@X_CFLAGS@,$X_CFLAGS,;t t
20701 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
20702 s,@X_LIBS@,$X_LIBS,;t t
20703 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
20704 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
20705 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
20706 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
20707 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
20708 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
20709 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
20710 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
20711 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
20712 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
20713 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
20714 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
20715 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
20716 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
20717 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
20718 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
20719 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
20720 s,@RANLIB@,$RANLIB,;t t
20721 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20722 s,@ALLOCA@,$ALLOCA,;t t
20723 s,@USE_NLS@,$USE_NLS,;t t
20724 s,@MSGFMT@,$MSGFMT,;t t
20725 s,@GMSGFMT@,$GMSGFMT,;t t
20726 s,@XGETTEXT@,$XGETTEXT,;t t
20727 s,@CATALOGS@,$CATALOGS,;t t
20728 s,@CATOBJEXT@,$CATOBJEXT,;t t
20729 s,@DATADIRNAME@,$DATADIRNAME,;t t
20730 s,@GMOFILES@,$GMOFILES,;t t
20731 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
20732 s,@INTLDEPS@,$INTLDEPS,;t t
20733 s,@INTLLIBS@,$INTLLIBS,;t t
20734 s,@INTLOBJS@,$INTLOBJS,;t t
20735 s,@POFILES@,$POFILES,;t t
20736 s,@POSUB@,$POSUB,;t t
20737 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
20738 s,@login_manager_tmp@,$login_manager_tmp,;t t
20739 s,@pkg_config@,$pkg_config,;t t
20740 s,@gnome_open_program@,$gnome_open_program,;t t
20741 s,@gnome_url_show_program@,$gnome_url_show_program,;t t
20742 s,@INCLUDES@,$INCLUDES,;t t
20743 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
20744 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
20745 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
20746 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
20747 s,@GTK_LIBS@,$GTK_LIBS,;t t
20748 s,@XML_LIBS@,$XML_LIBS,;t t
20749 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
20750 s,@HACK_LIBS@,$HACK_LIBS,;t t
20751 s,@XPM_LIBS@,$XPM_LIBS,;t t
20752 s,@PTY_LIBS@,$PTY_LIBS,;t t
20753 s,@GL_LIBS@,$GL_LIBS,;t t
20754 s,@GLE_LIBS@,$GLE_LIBS,;t t
20755 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
20756 s,@XINERAMA_LIBS@,$XINERAMA_LIBS,;t t
20757 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
20758 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
20759 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
20760 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
20761 s,@NEED_SETUID@,$NEED_SETUID,;t t
20762 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
20763 s,@HAVE_PAM_FAIL_DELAY@,$HAVE_PAM_FAIL_DELAY,;t t
20764 s,@NEW_LOGIN_COMMAND@,$NEW_LOGIN_COMMAND,;t t
20765 s,@NEW_LOGIN_COMMAND_P@,$NEW_LOGIN_COMMAND_P,;t t
20766 s,@DEFAULT_IMAGES_P@,$DEFAULT_IMAGES_P,;t t
20767 s,@DEFAULT_IMAGE_DIRECTORY@,$DEFAULT_IMAGE_DIRECTORY,;t t
20768 s,@DEFAULT_TEXT_FILE@,$DEFAULT_TEXT_FILE,;t t
20769 s,@WITH_BROWSER@,$WITH_BROWSER,;t t
20770 s,@OBJCC@,$OBJCC,;t t
20771 s,@EXES_OSX@,$EXES_OSX,;t t
20772 s,@SCRIPTS_OSX@,$SCRIPTS_OSX,;t t
20773 s,@MEN_OSX@,$MEN_OSX,;t t
20774 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
20775 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
20776 s,@XMU_SRCS@,$XMU_SRCS,;t t
20777 s,@XMU_OBJS@,$XMU_OBJS,;t t
20778 s,@XMU_LIBS@,$XMU_LIBS,;t t
20779 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
20780 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
20781 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
20782 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
20783 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
20784 s,@JPEG_EXES@,$JPEG_EXES,;t t
20785 s,@GL_EXES@,$GL_EXES,;t t
20786 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
20787 s,@GL_MEN@,$GL_MEN,;t t
20788 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
20789 s,@GLE_EXES@,$GLE_EXES,;t t
20790 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
20791 s,@GNOME24@,$GNOME24,;t t
20792 s,@GNOME22@,$GNOME22,;t t
20793 s,@NOGNOME@,$NOGNOME,;t t
20794 s,@HACKDIR@,$HACKDIR,;t t
20795 s,@HACKDIR_FULL@,$HACKDIR_FULL,;t t
20796 s,@GTK_DATADIR@,$GTK_DATADIR,;t t
20797 s,@PO_DATADIR@,$PO_DATADIR,;t t
20798 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
20799 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
20800 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
20801 s,@DEPEND@,$DEPEND,;t t
20802 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
20803 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
20804 s,@LIBOBJS@,$LIBOBJS,;t t
20805 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
20806 CEOF
20807
20808 _ACEOF
20809
20810   cat >>$CONFIG_STATUS <<\_ACEOF
20811   # Split the substitutions into bite-sized pieces for seds with
20812   # small command number limits, like on Digital OSF/1 and HP-UX.
20813   ac_max_sed_lines=48
20814   ac_sed_frag=1 # Number of current file.
20815   ac_beg=1 # First line for current file.
20816   ac_end=$ac_max_sed_lines # Line after last line for current file.
20817   ac_more_lines=:
20818   ac_sed_cmds=
20819   while $ac_more_lines; do
20820     if test $ac_beg -gt 1; then
20821       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20822     else
20823       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20824     fi
20825     if test ! -s $tmp/subs.frag; then
20826       ac_more_lines=false
20827     else
20828       # The purpose of the label and of the branching condition is to
20829       # speed up the sed processing (if there are no `@' at all, there
20830       # is no need to browse any of the substitutions).
20831       # These are the two extra sed commands mentioned above.
20832       (echo ':t
20833   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20834       if test -z "$ac_sed_cmds"; then
20835         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20836       else
20837         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20838       fi
20839       ac_sed_frag=`expr $ac_sed_frag + 1`
20840       ac_beg=$ac_end
20841       ac_end=`expr $ac_end + $ac_max_sed_lines`
20842     fi
20843   done
20844   if test -z "$ac_sed_cmds"; then
20845     ac_sed_cmds=cat
20846   fi
20847 fi # test -n "$CONFIG_FILES"
20848
20849 _ACEOF
20850 cat >>$CONFIG_STATUS <<\_ACEOF
20851 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20852   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20853   case $ac_file in
20854   - | *:- | *:-:* ) # input from stdin
20855         cat >$tmp/stdin
20856         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20857         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20858   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20859         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20860   * )   ac_file_in=$ac_file.in ;;
20861   esac
20862
20863   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20864   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
20865 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20866          X"$ac_file" : 'X\(//\)[^/]' \| \
20867          X"$ac_file" : 'X\(//\)$' \| \
20868          X"$ac_file" : 'X\(/\)' \| \
20869          .     : '\(.\)' 2>/dev/null ||
20870 echo X"$ac_file" |
20871     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20872           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20873           /^X\(\/\/\)$/{ s//\1/; q; }
20874           /^X\(\/\).*/{ s//\1/; q; }
20875           s/.*/./; q'`
20876   { if $as_mkdir_p; then
20877     mkdir -p "$ac_dir"
20878   else
20879     as_dir="$ac_dir"
20880     as_dirs=
20881     while test ! -d "$as_dir"; do
20882       as_dirs="$as_dir $as_dirs"
20883       as_dir=`(dirname "$as_dir") 2>/dev/null ||
20884 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20885          X"$as_dir" : 'X\(//\)[^/]' \| \
20886          X"$as_dir" : 'X\(//\)$' \| \
20887          X"$as_dir" : 'X\(/\)' \| \
20888          .     : '\(.\)' 2>/dev/null ||
20889 echo X"$as_dir" |
20890     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20891           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20892           /^X\(\/\/\)$/{ s//\1/; q; }
20893           /^X\(\/\).*/{ s//\1/; q; }
20894           s/.*/./; q'`
20895     done
20896     test ! -n "$as_dirs" || mkdir $as_dirs
20897   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20898 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20899    { (exit 1); exit 1; }; }; }
20900
20901   ac_builddir=.
20902
20903 if test "$ac_dir" != .; then
20904   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
20905   # A "../" for each directory in $ac_dir_suffix.
20906   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
20907 else
20908   ac_dir_suffix= ac_top_builddir=
20909 fi
20910
20911 case $srcdir in
20912   .)  # No --srcdir option.  We are building in place.
20913     ac_srcdir=.
20914     if test -z "$ac_top_builddir"; then
20915        ac_top_srcdir=.
20916     else
20917        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
20918     fi ;;
20919   [\\/]* | ?:[\\/]* )  # Absolute path.
20920     ac_srcdir=$srcdir$ac_dir_suffix;
20921     ac_top_srcdir=$srcdir ;;
20922   *) # Relative path.
20923     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
20924     ac_top_srcdir=$ac_top_builddir$srcdir ;;
20925 esac
20926
20927 # Do not use `cd foo && pwd` to compute absolute paths, because
20928 # the directories may not exist.
20929 case `pwd` in
20930 .) ac_abs_builddir="$ac_dir";;
20931 *)
20932   case "$ac_dir" in
20933   .) ac_abs_builddir=`pwd`;;
20934   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
20935   *) ac_abs_builddir=`pwd`/"$ac_dir";;
20936   esac;;
20937 esac
20938 case $ac_abs_builddir in
20939 .) ac_abs_top_builddir=${ac_top_builddir}.;;
20940 *)
20941   case ${ac_top_builddir}. in
20942   .) ac_abs_top_builddir=$ac_abs_builddir;;
20943   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
20944   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
20945   esac;;
20946 esac
20947 case $ac_abs_builddir in
20948 .) ac_abs_srcdir=$ac_srcdir;;
20949 *)
20950   case $ac_srcdir in
20951   .) ac_abs_srcdir=$ac_abs_builddir;;
20952   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
20953   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
20954   esac;;
20955 esac
20956 case $ac_abs_builddir in
20957 .) ac_abs_top_srcdir=$ac_top_srcdir;;
20958 *)
20959   case $ac_top_srcdir in
20960   .) ac_abs_top_srcdir=$ac_abs_builddir;;
20961   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
20962   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
20963   esac;;
20964 esac
20965
20966
20967   case $INSTALL in
20968   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20969   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
20970   esac
20971
20972   if test x"$ac_file" != x-; then
20973     { echo "$as_me:$LINENO: creating $ac_file" >&5
20974 echo "$as_me: creating $ac_file" >&6;}
20975     rm -f "$ac_file"
20976   fi
20977   # Let's still pretend it is `configure' which instantiates (i.e., don't
20978   # use $as_me), people would be surprised to read:
20979   #    /* config.h.  Generated by config.status.  */
20980   if test x"$ac_file" = x-; then
20981     configure_input=
20982   else
20983     configure_input="$ac_file.  "
20984   fi
20985   configure_input=$configure_input"Generated from `echo $ac_file_in |
20986                                      sed 's,.*/,,'` by configure."
20987
20988   # First look for the input files in the build tree, otherwise in the
20989   # src tree.
20990   ac_file_inputs=`IFS=:
20991     for f in $ac_file_in; do
20992       case $f in
20993       -) echo $tmp/stdin ;;
20994       [\\/$]*)
20995          # Absolute (can't be DOS-style, as IFS=:)
20996          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20997 echo "$as_me: error: cannot find input file: $f" >&2;}
20998    { (exit 1); exit 1; }; }
20999          echo "$f";;
21000       *) # Relative
21001          if test -f "$f"; then
21002            # Build tree
21003            echo "$f"
21004          elif test -f "$srcdir/$f"; then
21005            # Source tree
21006            echo "$srcdir/$f"
21007          else
21008            # /dev/null tree
21009            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
21010 echo "$as_me: error: cannot find input file: $f" >&2;}
21011    { (exit 1); exit 1; }; }
21012          fi;;
21013       esac
21014     done` || { (exit 1); exit 1; }
21015 _ACEOF
21016 cat >>$CONFIG_STATUS <<_ACEOF
21017   sed "$ac_vpsub
21018 $extrasub
21019 _ACEOF
21020 cat >>$CONFIG_STATUS <<\_ACEOF
21021 :t
21022 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21023 s,@configure_input@,$configure_input,;t t
21024 s,@srcdir@,$ac_srcdir,;t t
21025 s,@abs_srcdir@,$ac_abs_srcdir,;t t
21026 s,@top_srcdir@,$ac_top_srcdir,;t t
21027 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
21028 s,@builddir@,$ac_builddir,;t t
21029 s,@abs_builddir@,$ac_abs_builddir,;t t
21030 s,@top_builddir@,$ac_top_builddir,;t t
21031 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
21032 s,@INSTALL@,$ac_INSTALL,;t t
21033 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21034   rm -f $tmp/stdin
21035   if test x"$ac_file" != x-; then
21036     mv $tmp/out $ac_file
21037   else
21038     cat $tmp/out
21039     rm -f $tmp/out
21040   fi
21041
21042 done
21043 _ACEOF
21044 cat >>$CONFIG_STATUS <<\_ACEOF
21045
21046 #
21047 # CONFIG_HEADER section.
21048 #
21049
21050 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21051 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21052 #
21053 # ac_d sets the value in "#define NAME VALUE" lines.
21054 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
21055 ac_dB='[         ].*$,\1#\2'
21056 ac_dC=' '
21057 ac_dD=',;t'
21058 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21059 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21060 ac_uB='$,\1#\2define\3'
21061 ac_uC=' '
21062 ac_uD=',;t'
21063
21064 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21065   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21066   case $ac_file in
21067   - | *:- | *:-:* ) # input from stdin
21068         cat >$tmp/stdin
21069         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21070         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21071   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21072         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21073   * )   ac_file_in=$ac_file.in ;;
21074   esac
21075
21076   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
21077 echo "$as_me: creating $ac_file" >&6;}
21078
21079   # First look for the input files in the build tree, otherwise in the
21080   # src tree.
21081   ac_file_inputs=`IFS=:
21082     for f in $ac_file_in; do
21083       case $f in
21084       -) echo $tmp/stdin ;;
21085       [\\/$]*)
21086          # Absolute (can't be DOS-style, as IFS=:)
21087          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
21088 echo "$as_me: error: cannot find input file: $f" >&2;}
21089    { (exit 1); exit 1; }; }
21090          # Do quote $f, to prevent DOS paths from being IFS'd.
21091          echo "$f";;
21092       *) # Relative
21093          if test -f "$f"; then
21094            # Build tree
21095            echo "$f"
21096          elif test -f "$srcdir/$f"; then
21097            # Source tree
21098            echo "$srcdir/$f"
21099          else
21100            # /dev/null tree
21101            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
21102 echo "$as_me: error: cannot find input file: $f" >&2;}
21103    { (exit 1); exit 1; }; }
21104          fi;;
21105       esac
21106     done` || { (exit 1); exit 1; }
21107   # Remove the trailing spaces.
21108   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
21109
21110 _ACEOF
21111
21112 # Transform confdefs.h into two sed scripts, `conftest.defines' and
21113 # `conftest.undefs', that substitutes the proper values into
21114 # config.h.in to produce config.h.  The first handles `#define'
21115 # templates, and the second `#undef' templates.
21116 # And first: Protect against being on the right side of a sed subst in
21117 # config.status.  Protect against being in an unquoted here document
21118 # in config.status.
21119 rm -f conftest.defines conftest.undefs
21120 # Using a here document instead of a string reduces the quoting nightmare.
21121 # Putting comments in sed scripts is not portable.
21122 #
21123 # `end' is used to avoid that the second main sed command (meant for
21124 # 0-ary CPP macros) applies to n-ary macro definitions.
21125 # See the Autoconf documentation for `clear'.
21126 cat >confdef2sed.sed <<\_ACEOF
21127 s/[\\&,]/\\&/g
21128 s,[\\$`],\\&,g
21129 t clear
21130 : clear
21131 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
21132 t end
21133 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
21134 : end
21135 _ACEOF
21136 # If some macros were called several times there might be several times
21137 # the same #defines, which is useless.  Nevertheless, we may not want to
21138 # sort them, since we want the *last* AC-DEFINE to be honored.
21139 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
21140 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
21141 rm -f confdef2sed.sed
21142
21143 # This sed command replaces #undef with comments.  This is necessary, for
21144 # example, in the case of _POSIX_SOURCE, which is predefined and required
21145 # on some systems where configure will not decide to define it.
21146 cat >>conftest.undefs <<\_ACEOF
21147 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
21148 _ACEOF
21149
21150 # Break up conftest.defines because some shells have a limit on the size
21151 # of here documents, and old seds have small limits too (100 cmds).
21152 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
21153 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
21154 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
21155 echo '  :' >>$CONFIG_STATUS
21156 rm -f conftest.tail
21157 while grep . conftest.defines >/dev/null
21158 do
21159   # Write a limited-size here document to $tmp/defines.sed.
21160   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
21161   # Speed up: don't consider the non `#define' lines.
21162   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
21163   # Work around the forget-to-reset-the-flag bug.
21164   echo 't clr' >>$CONFIG_STATUS
21165   echo ': clr' >>$CONFIG_STATUS
21166   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
21167   echo 'CEOF
21168   sed -f $tmp/defines.sed $tmp/in >$tmp/out
21169   rm -f $tmp/in
21170   mv $tmp/out $tmp/in
21171 ' >>$CONFIG_STATUS
21172   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
21173   rm -f conftest.defines
21174   mv conftest.tail conftest.defines
21175 done
21176 rm -f conftest.defines
21177 echo '  fi # grep' >>$CONFIG_STATUS
21178 echo >>$CONFIG_STATUS
21179
21180 # Break up conftest.undefs because some shells have a limit on the size
21181 # of here documents, and old seds have small limits too (100 cmds).
21182 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
21183 rm -f conftest.tail
21184 while grep . conftest.undefs >/dev/null
21185 do
21186   # Write a limited-size here document to $tmp/undefs.sed.
21187   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
21188   # Speed up: don't consider the non `#undef'
21189   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
21190   # Work around the forget-to-reset-the-flag bug.
21191   echo 't clr' >>$CONFIG_STATUS
21192   echo ': clr' >>$CONFIG_STATUS
21193   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
21194   echo 'CEOF
21195   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
21196   rm -f $tmp/in
21197   mv $tmp/out $tmp/in
21198 ' >>$CONFIG_STATUS
21199   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
21200   rm -f conftest.undefs
21201   mv conftest.tail conftest.undefs
21202 done
21203 rm -f conftest.undefs
21204
21205 cat >>$CONFIG_STATUS <<\_ACEOF
21206   # Let's still pretend it is `configure' which instantiates (i.e., don't
21207   # use $as_me), people would be surprised to read:
21208   #    /* config.h.  Generated by config.status.  */
21209   if test x"$ac_file" = x-; then
21210     echo "/* Generated by configure.  */" >$tmp/config.h
21211   else
21212     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
21213   fi
21214   cat $tmp/in >>$tmp/config.h
21215   rm -f $tmp/in
21216   if test x"$ac_file" != x-; then
21217     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
21218       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21219 echo "$as_me: $ac_file is unchanged" >&6;}
21220     else
21221       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21222 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21223          X"$ac_file" : 'X\(//\)[^/]' \| \
21224          X"$ac_file" : 'X\(//\)$' \| \
21225          X"$ac_file" : 'X\(/\)' \| \
21226          .     : '\(.\)' 2>/dev/null ||
21227 echo X"$ac_file" |
21228     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21229           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21230           /^X\(\/\/\)$/{ s//\1/; q; }
21231           /^X\(\/\).*/{ s//\1/; q; }
21232           s/.*/./; q'`
21233       { if $as_mkdir_p; then
21234     mkdir -p "$ac_dir"
21235   else
21236     as_dir="$ac_dir"
21237     as_dirs=
21238     while test ! -d "$as_dir"; do
21239       as_dirs="$as_dir $as_dirs"
21240       as_dir=`(dirname "$as_dir") 2>/dev/null ||
21241 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21242          X"$as_dir" : 'X\(//\)[^/]' \| \
21243          X"$as_dir" : 'X\(//\)$' \| \
21244          X"$as_dir" : 'X\(/\)' \| \
21245          .     : '\(.\)' 2>/dev/null ||
21246 echo X"$as_dir" |
21247     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21248           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21249           /^X\(\/\/\)$/{ s//\1/; q; }
21250           /^X\(\/\).*/{ s//\1/; q; }
21251           s/.*/./; q'`
21252     done
21253     test ! -n "$as_dirs" || mkdir $as_dirs
21254   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21255 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21256    { (exit 1); exit 1; }; }; }
21257
21258       rm -f $ac_file
21259       mv $tmp/config.h $ac_file
21260     fi
21261   else
21262     cat $tmp/config.h
21263     rm -f $tmp/config.h
21264   fi
21265 done
21266 _ACEOF
21267 cat >>$CONFIG_STATUS <<\_ACEOF
21268
21269 #
21270 # CONFIG_COMMANDS section.
21271 #
21272 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21273   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21274   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21275   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
21276 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21277          X"$ac_dest" : 'X\(//\)[^/]' \| \
21278          X"$ac_dest" : 'X\(//\)$' \| \
21279          X"$ac_dest" : 'X\(/\)' \| \
21280          .     : '\(.\)' 2>/dev/null ||
21281 echo X"$ac_dest" |
21282     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21283           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21284           /^X\(\/\/\)$/{ s//\1/; q; }
21285           /^X\(\/\).*/{ s//\1/; q; }
21286           s/.*/./; q'`
21287   { if $as_mkdir_p; then
21288     mkdir -p "$ac_dir"
21289   else
21290     as_dir="$ac_dir"
21291     as_dirs=
21292     while test ! -d "$as_dir"; do
21293       as_dirs="$as_dir $as_dirs"
21294       as_dir=`(dirname "$as_dir") 2>/dev/null ||
21295 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21296          X"$as_dir" : 'X\(//\)[^/]' \| \
21297          X"$as_dir" : 'X\(//\)$' \| \
21298          X"$as_dir" : 'X\(/\)' \| \
21299          .     : '\(.\)' 2>/dev/null ||
21300 echo X"$as_dir" |
21301     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21302           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21303           /^X\(\/\/\)$/{ s//\1/; q; }
21304           /^X\(\/\).*/{ s//\1/; q; }
21305           s/.*/./; q'`
21306     done
21307     test ! -n "$as_dirs" || mkdir $as_dirs
21308   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21309 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21310    { (exit 1); exit 1; }; }; }
21311
21312   ac_builddir=.
21313
21314 if test "$ac_dir" != .; then
21315   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21316   # A "../" for each directory in $ac_dir_suffix.
21317   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
21318 else
21319   ac_dir_suffix= ac_top_builddir=
21320 fi
21321
21322 case $srcdir in
21323   .)  # No --srcdir option.  We are building in place.
21324     ac_srcdir=.
21325     if test -z "$ac_top_builddir"; then
21326        ac_top_srcdir=.
21327     else
21328        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
21329     fi ;;
21330   [\\/]* | ?:[\\/]* )  # Absolute path.
21331     ac_srcdir=$srcdir$ac_dir_suffix;
21332     ac_top_srcdir=$srcdir ;;
21333   *) # Relative path.
21334     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
21335     ac_top_srcdir=$ac_top_builddir$srcdir ;;
21336 esac
21337
21338 # Do not use `cd foo && pwd` to compute absolute paths, because
21339 # the directories may not exist.
21340 case `pwd` in
21341 .) ac_abs_builddir="$ac_dir";;
21342 *)
21343   case "$ac_dir" in
21344   .) ac_abs_builddir=`pwd`;;
21345   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
21346   *) ac_abs_builddir=`pwd`/"$ac_dir";;
21347   esac;;
21348 esac
21349 case $ac_abs_builddir in
21350 .) ac_abs_top_builddir=${ac_top_builddir}.;;
21351 *)
21352   case ${ac_top_builddir}. in
21353   .) ac_abs_top_builddir=$ac_abs_builddir;;
21354   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
21355   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
21356   esac;;
21357 esac
21358 case $ac_abs_builddir in
21359 .) ac_abs_srcdir=$ac_srcdir;;
21360 *)
21361   case $ac_srcdir in
21362   .) ac_abs_srcdir=$ac_abs_builddir;;
21363   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
21364   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
21365   esac;;
21366 esac
21367 case $ac_abs_builddir in
21368 .) ac_abs_top_srcdir=$ac_top_srcdir;;
21369 *)
21370   case $ac_top_srcdir in
21371   .) ac_abs_top_srcdir=$ac_abs_builddir;;
21372   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
21373   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
21374   esac;;
21375 esac
21376
21377
21378   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
21379 echo "$as_me: executing $ac_dest commands" >&6;}
21380   case $ac_dest in
21381     default-1 )
21382
21383 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
21384 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
21385   rm -f intltool-extract.out
21386 else
21387   mv -f intltool-extract.out intltool-extract
21388 fi
21389 chmod ugo+x intltool-extract
21390 chmod u+w intltool-extract
21391
21392 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
21393 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
21394   rm -f intltool-merge.out
21395 else
21396   mv -f intltool-merge.out intltool-merge
21397 fi
21398 chmod ugo+x intltool-merge
21399 chmod u+w intltool-merge
21400
21401 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
21402 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
21403   rm -f intltool-update.out
21404 else
21405   mv -f intltool-update.out intltool-update
21406 fi
21407 chmod ugo+x intltool-update
21408 chmod u+w intltool-update
21409
21410  ;;
21411     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
21412         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
21413       esac ;;
21414   esac
21415 done
21416 _ACEOF
21417
21418 cat >>$CONFIG_STATUS <<\_ACEOF
21419
21420 { (exit 0); exit 0; }
21421 _ACEOF
21422 chmod +x $CONFIG_STATUS
21423 ac_clean_files=$ac_clean_files_save
21424
21425
21426 # configure is writing to config.log, and then calls config.status.
21427 # config.status does its own redirection, appending to config.log.
21428 # Unfortunately, on DOS this fails, as config.log is still kept open
21429 # by configure, so config.status won't be able to write to it; its
21430 # output is simply discarded.  So we exec the FD to /dev/null,
21431 # effectively closing config.log, so it can be properly (re)opened and
21432 # appended to by config.status.  When coming back to configure, we
21433 # need to make the FD available again.
21434 if test "$no_create" != yes; then
21435   ac_cs_success=:
21436   ac_config_status_args=
21437   test "$silent" = yes &&
21438     ac_config_status_args="$ac_config_status_args --quiet"
21439   exec 5>/dev/null
21440   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21441   exec 5>>config.log
21442   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21443   # would make configure fail if this is the last instruction.
21444   $ac_cs_success || { (exit 1); exit 1; }
21445 fi
21446
21447
21448 ###############################################################################
21449 #
21450 #       Print some warnings at the end.
21451 #
21452 ###############################################################################
21453
21454 warn_prefix_1="    Warning:"
21455 warn_prefix_2="       Note:"
21456 warn_prefix="$warn_prefix_1"
21457
21458 warning=no
21459 warnsep='    #################################################################'
21460
21461 warnpre() {
21462   if test "$warning" = no ; then
21463     echo '' ; echo "$warnsep" ; echo ''
21464     warning=yes
21465   fi
21466 }
21467
21468 warn() {
21469   warnpre
21470   if test "$warning" = long ; then echo '' ; fi
21471   warning=yes
21472   rest="$@"
21473   echo "$warn_prefix $rest"
21474 }
21475
21476 warnL() {
21477   was=$warning
21478   warnpre
21479   warning=yes
21480   if test "$was" != no ; then echo '' ; fi
21481   rest="$@"
21482   echo "$warn_prefix $rest"
21483 }
21484
21485 warn2() {
21486   rest="$@"
21487   echo "             $rest"
21488   warning=long
21489 }
21490
21491 note() {
21492   warn_prefix="$warn_prefix_2"
21493   warn $@
21494   warn_prefix="$warn_prefix_1"
21495 }
21496
21497 noteL() {
21498   warn_prefix="$warn_prefix_2"
21499   warnL $@
21500   warn_prefix="$warn_prefix_1"
21501 }
21502
21503
21504 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
21505   warn 'The SGI saver extension was requested, but was not found.'
21506 fi
21507
21508 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
21509   warn 'The XIdle extension was requested, but was not found.'
21510 fi
21511
21512 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
21513   warn 'The XSHM extension was requested, but was not found.'
21514 fi
21515
21516 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
21517   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
21518 fi
21519
21520 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
21521   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
21522 fi
21523
21524 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
21525   warn 'The DPMS extension was requested, but was not found.'
21526 fi
21527
21528 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
21529   warn 'The Xinerama extension was requested, but was not found.'
21530 fi
21531
21532 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
21533   warn 'The XF86VMODE extension was requested, but was not found.'
21534 fi
21535
21536 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
21537   warn 'The RANDR extension was requested, but was not found.'
21538 fi
21539
21540 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
21541   warn "Checking of /proc/interrupts was requested, but it's bogus."
21542 fi
21543
21544 if test "$pkg_config" = false ; then
21545   warnL 'The "pkg-config" program was not found.  Without that,'
21546   warn2 "detection of the various GTK libraries won't work."
21547 else
21548   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
21549   if test "x$pkgerr" != "x" ; then
21550     warnL 'The "pkg-config" program produces errors.  This often causes'
21551     warn2 "detection of the various GTK libraries to malfunction."
21552     warn2 "The errors are:"
21553     echo ''
21554     echo "$pkgerr" | sed 's/^/             > /g'
21555   fi
21556 fi
21557
21558 if test "$gtk_halfassed" != no ; then
21559   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
21560   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
21561   warn2 "Perhaps some of the development packages are not installed?"
21562   if test "$have_gtk" = yes ; then
21563     v="$ac_gtk_version_string"
21564     warn2 "GTK $v is also installed, so it will be used instead."
21565     warn2 "Please read the above output and the \`config.log' file"
21566     warn2 "for more details."
21567   fi
21568 fi
21569
21570 motif_warn2() {
21571   warn2 'Though the Motif front-end to xscreensaver is still'
21572   warn2 'maintained, it is no longer being updated with new'
21573   warn2 'features: all new development on the xscreensaver-demo'
21574   warn2 'program is happening in the GTK version, and not in the'
21575   warn2 'Motif version.  It is recommended that you build against'
21576   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
21577 }
21578
21579 if test "$have_motif" = no -a "$have_gtk" = no; then
21580
21581   if test "$with_motif" = yes; then
21582     warnL "Neither the GTK nor Motif libraries were found; the"
21583     warn2 "\`xscreensaver-demo' program requires one of these."
21584     echo ''
21585     motif_warn2
21586   else
21587     warnL "The GTK libraries do not seem to be available; the"
21588     warn2 "\`xscreensaver-demo' program requires them."
21589 #   echo ''
21590 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
21591 #   warn2 "\`--with-motif' option) but that is NOT recommended."
21592 #   motif_warn2
21593   fi
21594
21595 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
21596   warnL "Use of Motif was requested, but it wasn't found;"
21597   warn2 "Gtk will be used instead."
21598
21599 elif test "$jurassic_gtk" = yes ; then
21600
21601   pref_gtk=2.0
21602
21603   v="$ac_gtk_version_string"
21604   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
21605     warnL "Use of Gtk was requested, but its version number is unknown;"
21606   elif test "$with_gtk_req" = yes ; then
21607     warnL "Use of Gtk was requested, but it is version $v;"
21608   else
21609     warnL "Gtk was found on this system, but it is version $v;"
21610   fi
21611
21612   warn2 "Gtk $pref_gtk or newer is required."
21613
21614 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
21615   warnL "Use of Gtk was requested, but it wasn't found."
21616 fi
21617
21618
21619 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
21620   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
21621   warn2 "headers were not found.  That can't be good.  Please"
21622   warn2 "install the GDK-Pixbuf development kit and re-configure."
21623 fi
21624
21625 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
21626
21627   preferred_lesstif=0.92
21628
21629   if test "$lesstif_version" = unknown; then
21630     warnL "Unable to determine the LessTif version number!"
21631     warn2 "Make sure you are using version $preferred_lesstif or newer."
21632     warn2 "See <http://www.lesstif.org/>."
21633
21634   elif test \! $lesstif_version -gt 82; then
21635     warnL "LessTif version $lesstif_version_string is being used."
21636     warn2 "LessTif versions 0.82 and earlier are too buggy to"
21637     warn2 "use with XScreenSaver; it is strongly recommended"
21638     warn2 "that you upgrade to at least version $preferred_lesstif!"
21639     warn2 "See <http://www.lesstif.org/>."
21640   fi
21641 fi
21642
21643
21644 if test "$have_motif" = yes -a "$have_gtk" = no ; then
21645   warn  'Motif is being used, and GTK is not.'
21646   echo  ''
21647   motif_warn2
21648 fi
21649
21650
21651 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
21652   warnL 'Use of XPM was requested, but it was not found.'
21653 fi
21654
21655 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
21656   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
21657 fi
21658
21659 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
21660    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
21661
21662   if test "$with_gdk_pixbuf_req" = yes ; then
21663     true
21664   elif test "$with_gdk_pixbuf_req" = no ; then
21665     warnL 'The GDK-Pixbuf library is not being used.'
21666   else
21667     warnL 'The GDK-Pixbuf library was not found.'
21668   fi
21669
21670   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
21671     true
21672   elif test "$with_xpm_req" = no ; then
21673     warnL 'The XPM library is not being used.'
21674   else
21675     warnL 'The XPM library was not found.'
21676   fi
21677
21678   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
21679     warn2 'The XPM library is being used instead.'
21680   fi
21681
21682   if test "$gdk_pixbuf_halfassed" = yes ; then
21683     echo ''
21684     warn2 'More specifically, we found the headers, but not the'
21685     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
21686     warn2 "system, or something else went wrong.  The \`config.log'"
21687     warn2 'file might contain some clues.'
21688   fi
21689
21690   echo ''
21691   warn2 'Some of the demos will not use images as much as they could.'
21692   warn2 'You should consider installing GDK-Pixbuf and re-running'
21693   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
21694   warn2 'provides support for more image formats.)'
21695 fi
21696
21697
21698 if test "$have_jpeg" = no ; then
21699   if test "$with_jpeg_req" = yes ; then
21700     warnL 'Use of libjpeg was requested, but it was not found.'
21701   elif test "$with_jpeg_req" = no ; then
21702     noteL 'The JPEG library is not being used.'
21703   else
21704     noteL 'The JPEG library was not found.'
21705   fi
21706
21707   if test "$jpeg_halfassed" = yes ; then
21708     echo ''
21709     warn2 'More specifically, we found the headers, but not the'
21710     warn2 'library; so either JPEG is half-installed on this'
21711     warn2 "system, or something else went wrong.  The \`config.log'"
21712     warn2 'file might contain some clues.'
21713     echo ''
21714   fi
21715
21716   if test "$have_gdk_pixbuf" = no ; then
21717     warn2 "This means that it won't be possible for the image-manipulating"
21718     warn2 "display modes to load files from disk; and it also means that"
21719     warn2 "the \`webcollage' program will be much slower."
21720   else
21721     warn2 "This means the \`webcollage' program will be much slower."
21722   fi
21723 fi
21724
21725
21726 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
21727   preferred_mesagl=3.4
21728   mgv="$ac_mesagl_version_string"
21729   pgl="$preferred_mesagl"
21730
21731   if test "$ac_mesagl_version" = unknown; then
21732     warnL "Unable to determine the MesaGL version number!"
21733     warn2 "Make sure you are using version $preferred_mesagl or newer."
21734
21735   elif test \! "$ac_mesagl_version" -gt 2006; then
21736     warnL "MesaGL version number is $mgv --"
21737     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
21738     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
21739
21740   elif test \! "$ac_mesagl_version" -gt 3003; then
21741     warnL "MesaGL version number is $mgv --"
21742     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
21743     warn2 "that you upgrade to $pgl or newer."
21744   fi
21745 fi
21746
21747 if test "$have_gl" = no ; then
21748   if test "$with_gl_req" = yes ; then
21749     warnL 'Use of GL was requested, but it was not found.'
21750   elif test "$with_gl_req" = no ; then
21751     noteL 'The OpenGL 3D library is not being used.'
21752   else
21753     noteL 'The OpenGL 3D library was not found.'
21754   fi
21755
21756   if test "$gl_halfassed" = yes ; then
21757     echo ''
21758     warn2 'More specifically, we found the headers, but not the'
21759     warn2 'libraries; so either GL is half-installed on this'
21760     warn2 "system, or something else went wrong.  The \`config.log'"
21761     warn2 'file might contain some clues.'
21762   fi
21763
21764   echo ''
21765   warn2 'Those demos which use 3D will not be built or installed.'
21766   warn2 'You might want to consider installing OpenGL and'
21767   warn2 "re-running configure.  If your vendor doesn't ship"
21768   warn2 'their own implementation of OpenGL, you can get a free'
21769   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
21770   warn2 'info, see <http://www.opengl.org/>.'
21771
21772 fi
21773
21774
21775 if test "$have_gl" = yes -a "$have_gle" = no ; then
21776
21777  # nobody cares about this; don't print the warning unless it was
21778  # requested and not found, or halfway-found.
21779  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
21780
21781   if test "$with_gle_req" = yes ; then
21782     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
21783     warn2 'it was not found (though the OpenGL library was found, and'
21784     warn2 'is being used.)'
21785   elif test "$with_gle_req" = no ; then
21786     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
21787     warn2 'library is not.'
21788   else
21789     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
21790     warn2 'was not.'
21791   fi
21792
21793   if test "$gle_halfassed" = yes ; then
21794     echo ''
21795     warn2 'More specifically, we found the headers, but not the'
21796     warn2 'libraries; so either GLE is half-installed on this'
21797     warn2 "system, or something else went wrong.  The \`config.log'"
21798     warn2 'file might contain some clues.'
21799   fi
21800
21801   echo ''
21802   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
21803   warn2 'will not be built or installed.  You might want to consider'
21804   warn2 'installing GLE and re-running configure.  You can find the'
21805   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
21806   warn2 'OpenGL info, see <http://www.opengl.org/>.'
21807
21808  fi
21809 fi
21810
21811
21812 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
21813   warn 'Use of XReadDisplay was requested, but it was not found.'
21814 fi
21815
21816 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
21817   warn 'Use of Kerberos was requested, but it was not found.'
21818 fi
21819
21820 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
21821   warn 'Use of PAM was requested, but it was not found.'
21822 fi
21823
21824 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
21825   warn 'Use of shadow passwords was requested, but they were not found.'
21826 fi
21827
21828
21829 # You are in a twisty maze of namespaces and syntaxes, all alike.
21830 # Fuck the skull of Unix.
21831 #
21832 eval bindir=${bindir}
21833 eval bindir=${bindir}
21834 eval bindir=${bindir}
21835 eval bindir=${bindir}
21836 eval bindir=${bindir}
21837 eval bindir=${bindir}
21838 eval HACKDIR=${HACKDIR}
21839 eval HACKDIR=${HACKDIR}
21840 eval HACKDIR=${HACKDIR}
21841 eval HACKDIR=${HACKDIR}
21842 eval HACKDIR=${HACKDIR}
21843 eval HACKDIR=${HACKDIR}
21844 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21845 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21846 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21847 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21848 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21849 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21850
21851 # canonicalize slashes.
21852 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
21853 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
21854 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
21855
21856
21857 # Sanity check the hackdir
21858 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
21859   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
21860     echo ""
21861     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
21862                    There will be an executable installed with that name, so
21863                    that can't be the name of a directory as well.  Please
21864                    re-configure with a different directory name." >&5
21865 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
21866                    There will be an executable installed with that name, so
21867                    that can't be the name of a directory as well.  Please
21868                    re-configure with a different directory name." >&2;}
21869    { (exit 1); exit 1; }; }
21870   fi
21871 done
21872
21873
21874 do_dir_warning=no
21875
21876 # Now let's warn if there's a previous RPM version already installed.
21877 # But don't bother with this test if we are currently *building* an RPM.
21878
21879 if test -z "$RPM_PACKAGE_VERSION" ; then
21880
21881   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
21882
21883   # M4 sucks!!
21884
21885   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
21886         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
21887         head -1`
21888
21889
21890   if test \! -z "$rpmv" ; then
21891     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
21892     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/attraction$@\1@p'`
21893
21894     warning=no
21895     warnL "There is already an installed RPM of xscreensaver $rpmv"
21896     warn2 'on this system.  You might want to remove it ("rpm -ve")'
21897     warn2 'before running "make install" in this directory.'
21898     echo ""
21899     warn2 "Alternately, you could build this version of xscreensaver"
21900     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
21901     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
21902     warn2 "See the RPM documentation for more info."
21903     echo ""
21904
21905     if test "$rpmbdir" = "$rpmhdir" ; then
21906       warn2 "The RPM version was installed in $rpmbdir/."
21907       do_dir_warning=yes
21908     else
21909       warn2 "The RPM version was installed in $rpmbdir/,"
21910       warn2 "with demos in $rpmhdir/."
21911     fi
21912   fi
21913 fi
21914
21915 if test "${bindir}" = "${HACKDIR}" ; then
21916   do_dir_warning=yes
21917 fi
21918
21919 if test "$do_dir_warning" = yes; then
21920   echo ""
21921   echo "$warnsep"
21922   echo ""
21923   echo '      When you run "make install", the "xscreensaver",'
21924   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
21925   echo "      will be installed in ${bindir}/."
21926   echo ""
21927   echo "      The various graphics demos (190+ different executables) will"
21928   echo "      be installed in ${HACKDIR}/."
21929   echo ""
21930   echo "      If you would prefer the demos to be installed elsewhere,"
21931   echo "      you should re-run configure with the --with-hackdir=DIR"
21932   echo "      option.  For more information, run \`./configure --help'."
21933   warning=yes
21934 fi
21935
21936 if test "$warning" != no; then
21937   echo '' ; echo "$warnsep" ; echo ''
21938 fi
21939
21940 if test "$do_dir_warning" = no; then
21941   if test "$warning" = no; then
21942     echo ''
21943   fi
21944   echo "User programs will be installed in ${bindir}/"
21945   echo "Screen savers will be installed in ${HACKDIR}/"
21946   echo "Hack configurations will be installed in ${HACK_CONF_DIR}/"
21947   echo "Saver configuration will be installed in ${APPDEFAULTS}/"
21948   echo ''
21949 fi