ftp://ftp.krokus.ru/pub/OpenBSD/distfiles/xscreensaver-4.21.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 NEW_LOGIN_COMMAND NEW_LOGIN_COMMAND_P DEFAULT_IMAGES_P DEFAULT_IMAGE_DIRECTORY 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 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='${prefix}/man'
352
353 ac_prev=
354 for ac_option
355 do
356   # If the previous option needs an argument, assign it.
357   if test -n "$ac_prev"; then
358     eval "$ac_prev=\$ac_option"
359     ac_prev=
360     continue
361   fi
362
363   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
364
365   # Accept the important Cygnus configure options, so we can diagnose typos.
366
367   case $ac_option in
368
369   -bindir | --bindir | --bindi | --bind | --bin | --bi)
370     ac_prev=bindir ;;
371   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
372     bindir=$ac_optarg ;;
373
374   -build | --build | --buil | --bui | --bu)
375     ac_prev=build_alias ;;
376   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
377     build_alias=$ac_optarg ;;
378
379   -cache-file | --cache-file | --cache-fil | --cache-fi \
380   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381     ac_prev=cache_file ;;
382   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
384     cache_file=$ac_optarg ;;
385
386   --config-cache | -C)
387     cache_file=config.cache ;;
388
389   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390     ac_prev=datadir ;;
391   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392   | --da=*)
393     datadir=$ac_optarg ;;
394
395   -disable-* | --disable-*)
396     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
397     # Reject names that are not valid shell variable names.
398     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400    { (exit 1); exit 1; }; }
401     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402     eval "enable_$ac_feature=no" ;;
403
404   -enable-* | --enable-*)
405     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
406     # Reject names that are not valid shell variable names.
407     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409    { (exit 1); exit 1; }; }
410     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411     case $ac_option in
412       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
413       *) ac_optarg=yes ;;
414     esac
415     eval "enable_$ac_feature='$ac_optarg'" ;;
416
417   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419   | --exec | --exe | --ex)
420     ac_prev=exec_prefix ;;
421   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423   | --exec=* | --exe=* | --ex=*)
424     exec_prefix=$ac_optarg ;;
425
426   -gas | --gas | --ga | --g)
427     # Obsolete; use --with-gas.
428     with_gas=yes ;;
429
430   -help | --help | --hel | --he | -h)
431     ac_init_help=long ;;
432   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433     ac_init_help=recursive ;;
434   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435     ac_init_help=short ;;
436
437   -host | --host | --hos | --ho)
438     ac_prev=host_alias ;;
439   -host=* | --host=* | --hos=* | --ho=*)
440     host_alias=$ac_optarg ;;
441
442   -includedir | --includedir | --includedi | --included | --include \
443   | --includ | --inclu | --incl | --inc)
444     ac_prev=includedir ;;
445   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446   | --includ=* | --inclu=* | --incl=* | --inc=*)
447     includedir=$ac_optarg ;;
448
449   -infodir | --infodir | --infodi | --infod | --info | --inf)
450     ac_prev=infodir ;;
451   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
452     infodir=$ac_optarg ;;
453
454   -libdir | --libdir | --libdi | --libd)
455     ac_prev=libdir ;;
456   -libdir=* | --libdir=* | --libdi=* | --libd=*)
457     libdir=$ac_optarg ;;
458
459   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460   | --libexe | --libex | --libe)
461     ac_prev=libexecdir ;;
462   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463   | --libexe=* | --libex=* | --libe=*)
464     libexecdir=$ac_optarg ;;
465
466   -localstatedir | --localstatedir | --localstatedi | --localstated \
467   | --localstate | --localstat | --localsta | --localst \
468   | --locals | --local | --loca | --loc | --lo)
469     ac_prev=localstatedir ;;
470   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
473     localstatedir=$ac_optarg ;;
474
475   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476     ac_prev=mandir ;;
477   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
478     mandir=$ac_optarg ;;
479
480   -nfp | --nfp | --nf)
481     # Obsolete; use --without-fp.
482     with_fp=no ;;
483
484   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
485   | --no-cr | --no-c | -n)
486     no_create=yes ;;
487
488   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490     no_recursion=yes ;;
491
492   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494   | --oldin | --oldi | --old | --ol | --o)
495     ac_prev=oldincludedir ;;
496   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
499     oldincludedir=$ac_optarg ;;
500
501   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502     ac_prev=prefix ;;
503   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
504     prefix=$ac_optarg ;;
505
506   -program-prefix | --program-prefix | --program-prefi | --program-pref \
507   | --program-pre | --program-pr | --program-p)
508     ac_prev=program_prefix ;;
509   -program-prefix=* | --program-prefix=* | --program-prefi=* \
510   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
511     program_prefix=$ac_optarg ;;
512
513   -program-suffix | --program-suffix | --program-suffi | --program-suff \
514   | --program-suf | --program-su | --program-s)
515     ac_prev=program_suffix ;;
516   -program-suffix=* | --program-suffix=* | --program-suffi=* \
517   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
518     program_suffix=$ac_optarg ;;
519
520   -program-transform-name | --program-transform-name \
521   | --program-transform-nam | --program-transform-na \
522   | --program-transform-n | --program-transform- \
523   | --program-transform | --program-transfor \
524   | --program-transfo | --program-transf \
525   | --program-trans | --program-tran \
526   | --progr-tra | --program-tr | --program-t)
527     ac_prev=program_transform_name ;;
528   -program-transform-name=* | --program-transform-name=* \
529   | --program-transform-nam=* | --program-transform-na=* \
530   | --program-transform-n=* | --program-transform-=* \
531   | --program-transform=* | --program-transfor=* \
532   | --program-transfo=* | --program-transf=* \
533   | --program-trans=* | --program-tran=* \
534   | --progr-tra=* | --program-tr=* | --program-t=*)
535     program_transform_name=$ac_optarg ;;
536
537   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538   | -silent | --silent | --silen | --sile | --sil)
539     silent=yes ;;
540
541   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542     ac_prev=sbindir ;;
543   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544   | --sbi=* | --sb=*)
545     sbindir=$ac_optarg ;;
546
547   -sharedstatedir | --sharedstatedir | --sharedstatedi \
548   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549   | --sharedst | --shareds | --shared | --share | --shar \
550   | --sha | --sh)
551     ac_prev=sharedstatedir ;;
552   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555   | --sha=* | --sh=*)
556     sharedstatedir=$ac_optarg ;;
557
558   -site | --site | --sit)
559     ac_prev=site ;;
560   -site=* | --site=* | --sit=*)
561     site=$ac_optarg ;;
562
563   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564     ac_prev=srcdir ;;
565   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
566     srcdir=$ac_optarg ;;
567
568   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569   | --syscon | --sysco | --sysc | --sys | --sy)
570     ac_prev=sysconfdir ;;
571   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
573     sysconfdir=$ac_optarg ;;
574
575   -target | --target | --targe | --targ | --tar | --ta | --t)
576     ac_prev=target_alias ;;
577   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
578     target_alias=$ac_optarg ;;
579
580   -v | -verbose | --verbose | --verbos | --verbo | --verb)
581     verbose=yes ;;
582
583   -version | --version | --versio | --versi | --vers | -V)
584     ac_init_version=: ;;
585
586   -with-* | --with-*)
587     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
588     # Reject names that are not valid shell variable names.
589     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590       { echo "$as_me: error: invalid package name: $ac_package" >&2
591    { (exit 1); exit 1; }; }
592     ac_package=`echo $ac_package| sed 's/-/_/g'`
593     case $ac_option in
594       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
595       *) ac_optarg=yes ;;
596     esac
597     eval "with_$ac_package='$ac_optarg'" ;;
598
599   -without-* | --without-*)
600     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
601     # Reject names that are not valid shell variable names.
602     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603       { echo "$as_me: error: invalid package name: $ac_package" >&2
604    { (exit 1); exit 1; }; }
605     ac_package=`echo $ac_package | sed 's/-/_/g'`
606     eval "with_$ac_package=no" ;;
607
608   --x)
609     # Obsolete; use --with-x.
610     with_x=yes ;;
611
612   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613   | --x-incl | --x-inc | --x-in | --x-i)
614     ac_prev=x_includes ;;
615   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
617     x_includes=$ac_optarg ;;
618
619   -x-libraries | --x-libraries | --x-librarie | --x-librari \
620   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621     ac_prev=x_libraries ;;
622   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
624     x_libraries=$ac_optarg ;;
625
626   -*) { echo "$as_me: error: unrecognized option: $ac_option
627 Try \`$0 --help' for more information." >&2
628    { (exit 1); exit 1; }; }
629     ;;
630
631   *=*)
632     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633     # Reject names that are not valid shell variable names.
634     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636    { (exit 1); exit 1; }; }
637     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638     eval "$ac_envvar='$ac_optarg'"
639     export $ac_envvar ;;
640
641   *)
642     # FIXME: should be removed in autoconf 3.0.
643     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
647     ;;
648
649   esac
650 done
651
652 if test -n "$ac_prev"; then
653   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654   { echo "$as_me: error: missing argument to $ac_option" >&2
655    { (exit 1); exit 1; }; }
656 fi
657
658 # Be sure to have absolute paths.
659 for ac_var in exec_prefix prefix
660 do
661   eval ac_val=$`echo $ac_var`
662   case $ac_val in
663     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665    { (exit 1); exit 1; }; };;
666   esac
667 done
668
669 # Be sure to have absolute paths.
670 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671               localstatedir libdir includedir oldincludedir infodir mandir
672 do
673   eval ac_val=$`echo $ac_var`
674   case $ac_val in
675     [\\/$]* | ?:[\\/]* ) ;;
676     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677    { (exit 1); exit 1; }; };;
678   esac
679 done
680
681 # There might be people who depend on the old broken behavior: `$host'
682 # used to hold the argument of --host etc.
683 # FIXME: To remove some day.
684 build=$build_alias
685 host=$host_alias
686 target=$target_alias
687
688 # FIXME: To remove some day.
689 if test "x$host_alias" != x; then
690   if test "x$build_alias" = x; then
691     cross_compiling=maybe
692     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693     If a cross compiler is detected then cross compile mode will be used." >&2
694   elif test "x$build_alias" != "x$host_alias"; then
695     cross_compiling=yes
696   fi
697 fi
698
699 ac_tool_prefix=
700 test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702 test "$silent" = yes && exec 6>/dev/null
703
704
705 # Find the source files, if location was not specified.
706 if test -z "$srcdir"; then
707   ac_srcdir_defaulted=yes
708   # Try the directory containing this script, then its parent.
709   ac_confdir=`(dirname "$0") 2>/dev/null ||
710 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
711          X"$0" : 'X\(//\)[^/]' \| \
712          X"$0" : 'X\(//\)$' \| \
713          X"$0" : 'X\(/\)' \| \
714          .     : '\(.\)' 2>/dev/null ||
715 echo X"$0" |
716     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718           /^X\(\/\/\)$/{ s//\1/; q; }
719           /^X\(\/\).*/{ s//\1/; q; }
720           s/.*/./; q'`
721   srcdir=$ac_confdir
722   if test ! -r $srcdir/$ac_unique_file; then
723     srcdir=..
724   fi
725 else
726   ac_srcdir_defaulted=no
727 fi
728 if test ! -r $srcdir/$ac_unique_file; then
729   if test "$ac_srcdir_defaulted" = yes; then
730     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731    { (exit 1); exit 1; }; }
732   else
733     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734    { (exit 1); exit 1; }; }
735   fi
736 fi
737 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739    { (exit 1); exit 1; }; }
740 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741 ac_env_build_alias_set=${build_alias+set}
742 ac_env_build_alias_value=$build_alias
743 ac_cv_env_build_alias_set=${build_alias+set}
744 ac_cv_env_build_alias_value=$build_alias
745 ac_env_host_alias_set=${host_alias+set}
746 ac_env_host_alias_value=$host_alias
747 ac_cv_env_host_alias_set=${host_alias+set}
748 ac_cv_env_host_alias_value=$host_alias
749 ac_env_target_alias_set=${target_alias+set}
750 ac_env_target_alias_value=$target_alias
751 ac_cv_env_target_alias_set=${target_alias+set}
752 ac_cv_env_target_alias_value=$target_alias
753 ac_env_CC_set=${CC+set}
754 ac_env_CC_value=$CC
755 ac_cv_env_CC_set=${CC+set}
756 ac_cv_env_CC_value=$CC
757 ac_env_CFLAGS_set=${CFLAGS+set}
758 ac_env_CFLAGS_value=$CFLAGS
759 ac_cv_env_CFLAGS_set=${CFLAGS+set}
760 ac_cv_env_CFLAGS_value=$CFLAGS
761 ac_env_LDFLAGS_set=${LDFLAGS+set}
762 ac_env_LDFLAGS_value=$LDFLAGS
763 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764 ac_cv_env_LDFLAGS_value=$LDFLAGS
765 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766 ac_env_CPPFLAGS_value=$CPPFLAGS
767 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769 ac_env_CPP_set=${CPP+set}
770 ac_env_CPP_value=$CPP
771 ac_cv_env_CPP_set=${CPP+set}
772 ac_cv_env_CPP_value=$CPP
773
774 #
775 # Report the --help message.
776 #
777 if test "$ac_init_help" = "long"; then
778   # Omit some internal or obsolete options to make the list less imposing.
779   # This message is too long to be a string in the A/UX 3.1 sh.
780   cat <<_ACEOF
781 \`configure' configures this package to adapt to many kinds of systems.
782
783 Usage: $0 [OPTION]... [VAR=VALUE]...
784
785 To assign environment variables (e.g., CC, CFLAGS...), specify them as
786 VAR=VALUE.  See below for descriptions of some of the useful variables.
787
788 Defaults for the options are specified in brackets.
789
790
791 Configuration:
792
793   -h, --help              display this help and exit
794       --help=short        display options specific to this package
795       --help=recursive    display the short help of all the included packages
796   -V, --version           display version information and exit
797   -q, --quiet, --silent   do not print \`checking...' messages
798       --cache-file=FILE   cache test results in FILE [disabled]
799   -C, --config-cache      alias for \`--cache-file=config.cache'
800   -n, --no-create         do not create output files
801       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
802
803 _ACEOF
804
805   cat <<_ACEOF
806 Installation directories:
807   --prefix=PREFIX         install architecture-independent files in PREFIX
808                           [$ac_default_prefix]
809   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
810                           [PREFIX]
811
812 By default, \`make install' will install all the files in
813 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
814 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
815 for instance \`--prefix=\$HOME'.
816
817 For better control, use the options below.
818
819 Fine tuning of the installation directories:
820   --bindir=DIR           user executables [EPREFIX/bin]
821   --libexecdir=DIR       program executables [EPREFIX/libexec]
822   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
823   --libdir=DIR           object code libraries [EPREFIX/lib]
824   --includedir=DIR       C header files [PREFIX/include]
825   --x-includes=DIR        X include files are in DIR
826   --x-libraries=DIR       X library files are in DIR
827   --mandir=DIR           man documentation [PREFIX/man]
828 _ACEOF
829
830   cat <<\_ACEOF
831
832 X features:
833   --x-includes=DIR    X include files are in DIR
834   --x-libraries=DIR   X library files are in DIR
835
836 System types:
837   --build=BUILD     configure for building on BUILD [guessed]
838   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
839 _ACEOF
840 fi
841
842 if test -n "$ac_init_help"; then
843
844   cat <<\_ACEOF
845
846 Optional Features:
847   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
848   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
849
850 Screen locking options:
851   --enable-locking        Compile in support for locking the display.
852   --disable-locking       Do not allow locking at all.
853
854 Optional Packages:
855   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
856   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
857
858 Installation options:
859   --with-hackdir=DIR      Where to install the hundreds of demo executables.
860                           Default: `EPREFIX/lib/xscreensaver/'
861   --with-configdir=DIR    Where to install the data files that describe each
862                           of the display modes to the GUI.
863                           Default: `PREFIX/share/xscreensaver/config/'
864
865 Except where noted, all of the --with options below can also take a
866 directory argument: for example, `--with-motif=/opt/Motif'.  That would
867 cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
868 to be added to the -L list, assuming those directories exist.
869
870 By default, support for each of these options will be built in, if the
871 relevant library routines exist.  At run time, they will then be used
872 only if the X server being used supports them.  Each --with option has
873 a corresponding --without option, to override building support for them
874 at all.
875
876 Screen blanking and idle-detection options:
877
878   --with-sgi-ext          Include support for the SGI SCREEN_SAVER extension.
879   --with-xidle-ext        Include support for the XIDLE extension.
880   --with-sgivc-ext        Include support for the SGI-VIDEO-CONTROL extension.
881   --with-dpms-ext         Include support for the DPMS extension.
882   --with-xinerama-ext     Include support for the XINERAMA extension.
883   --with-xf86vmode-ext    Include support for XFree86 virtual screens.
884   --with-xf86gamma-ext    Include support for XFree86 gamma fading.
885   --with-randr-ext        Include support for the X Resize+Rotate extension.
886   --with-proc-interrupts  Include support for consulting the /proc/interrupts
887                           file to notice keyboard activity.
888   --with-pam              Include support for PAM (Pluggable Auth Modules.)
889   --with-kerberos         Include support for Kerberos authentication.
890   --with-shadow           Include support for shadow password authentication.
891   --with-passwd-helper    Include support for an external password
892                           verification helper program.
893   --with-login-manager    Put a "New Login" button on the unlock dialog that
894                           runs a login manager such as gdmflexiserver.
895
896 User interface options:
897
898   --with-gtk              Use the Gtk toolkit for the user interface.
899   --with-motif            Use the Motif toolkit for the user interface
900                           (not recommended.)
901
902 Graphics options:
903
904   --with-gl               Build those demos which depend on OpenGL.
905   --with-gle              Build those demos which depend on GLE
906                           (the OpenGL "extrusion" library.)
907   --with-pixbuf           Include support for the GDK-Pixbuf library in some
908                           demos, which will make it possible for them to read
909                           GIF, JPEG, and PNG files as well.
910   --with-xpm              Include support for XPM files in some demos.
911                           (Not needed if Pixbuf is used.)
912   --with-jpeg             Include support for the JPEG library.
913   --with-xshm-ext         Include support for the Shared Memory extension.
914   --with-xdbe-ext         Include support for the DOUBLE-BUFFER extension.
915   --with-readdisplay      Include support for the XReadDisplay extension.
916   --with-image-directory=DIR  By default, some screen savers may load
917                           random images out of this directory.
918   --with-setuid-hacks     Allow some demos to be installed `setuid root'
919                           (which is needed in order to ping other hosts.)
920
921
922 Some influential environment variables:
923   CC          C compiler command
924   CFLAGS      C compiler flags
925   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
926               nonstandard directory <lib dir>
927   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
928               headers in a nonstandard directory <include dir>
929   CPP         C preprocessor
930
931 Use these variables to override the choices made by `configure' or to help
932 it to find libraries and programs with nonstandard names/locations.
933
934 _ACEOF
935 fi
936
937 if test "$ac_init_help" = "recursive"; then
938   # If there are subdirs, report their specific --help.
939   ac_popdir=`pwd`
940   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
941     test -d $ac_dir || continue
942     ac_builddir=.
943
944 if test "$ac_dir" != .; then
945   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
946   # A "../" for each directory in $ac_dir_suffix.
947   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
948 else
949   ac_dir_suffix= ac_top_builddir=
950 fi
951
952 case $srcdir in
953   .)  # No --srcdir option.  We are building in place.
954     ac_srcdir=.
955     if test -z "$ac_top_builddir"; then
956        ac_top_srcdir=.
957     else
958        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
959     fi ;;
960   [\\/]* | ?:[\\/]* )  # Absolute path.
961     ac_srcdir=$srcdir$ac_dir_suffix;
962     ac_top_srcdir=$srcdir ;;
963   *) # Relative path.
964     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
965     ac_top_srcdir=$ac_top_builddir$srcdir ;;
966 esac
967
968 # Do not use `cd foo && pwd` to compute absolute paths, because
969 # the directories may not exist.
970 case `pwd` in
971 .) ac_abs_builddir="$ac_dir";;
972 *)
973   case "$ac_dir" in
974   .) ac_abs_builddir=`pwd`;;
975   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
976   *) ac_abs_builddir=`pwd`/"$ac_dir";;
977   esac;;
978 esac
979 case $ac_abs_builddir in
980 .) ac_abs_top_builddir=${ac_top_builddir}.;;
981 *)
982   case ${ac_top_builddir}. in
983   .) ac_abs_top_builddir=$ac_abs_builddir;;
984   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
985   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
986   esac;;
987 esac
988 case $ac_abs_builddir in
989 .) ac_abs_srcdir=$ac_srcdir;;
990 *)
991   case $ac_srcdir in
992   .) ac_abs_srcdir=$ac_abs_builddir;;
993   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
994   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
995   esac;;
996 esac
997 case $ac_abs_builddir in
998 .) ac_abs_top_srcdir=$ac_top_srcdir;;
999 *)
1000   case $ac_top_srcdir in
1001   .) ac_abs_top_srcdir=$ac_abs_builddir;;
1002   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1003   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1004   esac;;
1005 esac
1006
1007     cd $ac_dir
1008     # Check for guested configure; otherwise get Cygnus style configure.
1009     if test -f $ac_srcdir/configure.gnu; then
1010       echo
1011       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1012     elif test -f $ac_srcdir/configure; then
1013       echo
1014       $SHELL $ac_srcdir/configure  --help=recursive
1015     elif test -f $ac_srcdir/configure.ac ||
1016            test -f $ac_srcdir/configure.in; then
1017       echo
1018       $ac_configure --help
1019     else
1020       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1021     fi
1022     cd $ac_popdir
1023   done
1024 fi
1025
1026 test -n "$ac_init_help" && exit 0
1027 if $ac_init_version; then
1028   cat <<\_ACEOF
1029
1030 Copyright (C) 2003 Free Software Foundation, Inc.
1031 This configure script is free software; the Free Software Foundation
1032 gives unlimited permission to copy, distribute and modify it.
1033 _ACEOF
1034   exit 0
1035 fi
1036 exec 5>config.log
1037 cat >&5 <<_ACEOF
1038 This file contains any messages produced by compilers while
1039 running configure, to aid debugging if configure makes a mistake.
1040
1041 It was created by $as_me, which was
1042 generated by GNU Autoconf 2.59.  Invocation command line was
1043
1044   $ $0 $@
1045
1046 _ACEOF
1047 {
1048 cat <<_ASUNAME
1049 ## --------- ##
1050 ## Platform. ##
1051 ## --------- ##
1052
1053 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1054 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1055 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1056 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1057 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1058
1059 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1060 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1061
1062 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1063 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1064 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1065 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1066 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1067 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1068 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1069
1070 _ASUNAME
1071
1072 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1073 for as_dir in $PATH
1074 do
1075   IFS=$as_save_IFS
1076   test -z "$as_dir" && as_dir=.
1077   echo "PATH: $as_dir"
1078 done
1079
1080 } >&5
1081
1082 cat >&5 <<_ACEOF
1083
1084
1085 ## ----------- ##
1086 ## Core tests. ##
1087 ## ----------- ##
1088
1089 _ACEOF
1090
1091
1092 # Keep a trace of the command line.
1093 # Strip out --no-create and --no-recursion so they do not pile up.
1094 # Strip out --silent because we don't want to record it for future runs.
1095 # Also quote any args containing shell meta-characters.
1096 # Make two passes to allow for proper duplicate-argument suppression.
1097 ac_configure_args=
1098 ac_configure_args0=
1099 ac_configure_args1=
1100 ac_sep=
1101 ac_must_keep_next=false
1102 for ac_pass in 1 2
1103 do
1104   for ac_arg
1105   do
1106     case $ac_arg in
1107     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1108     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1109     | -silent | --silent | --silen | --sile | --sil)
1110       continue ;;
1111     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1112       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1113     esac
1114     case $ac_pass in
1115     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1116     2)
1117       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1118       if test $ac_must_keep_next = true; then
1119         ac_must_keep_next=false # Got value, back to normal.
1120       else
1121         case $ac_arg in
1122           *=* | --config-cache | -C | -disable-* | --disable-* \
1123           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1124           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1125           | -with-* | --with-* | -without-* | --without-* | --x)
1126             case "$ac_configure_args0 " in
1127               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1128             esac
1129             ;;
1130           -* ) ac_must_keep_next=true ;;
1131         esac
1132       fi
1133       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1134       # Get rid of the leading space.
1135       ac_sep=" "
1136       ;;
1137     esac
1138   done
1139 done
1140 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1141 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1142
1143 # When interrupted or exit'd, cleanup temporary files, and complete
1144 # config.log.  We remove comments because anyway the quotes in there
1145 # would cause problems or look ugly.
1146 # WARNING: Be sure not to use single quotes in there, as some shells,
1147 # such as our DU 5.0 friend, will then `close' the trap.
1148 trap 'exit_status=$?
1149   # Save into config.log some information that might help in debugging.
1150   {
1151     echo
1152
1153     cat <<\_ASBOX
1154 ## ---------------- ##
1155 ## Cache variables. ##
1156 ## ---------------- ##
1157 _ASBOX
1158     echo
1159     # The following way of writing the cache mishandles newlines in values,
1160 {
1161   (set) 2>&1 |
1162     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1163     *ac_space=\ *)
1164       sed -n \
1165         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1166           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1167       ;;
1168     *)
1169       sed -n \
1170         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1171       ;;
1172     esac;
1173 }
1174     echo
1175
1176     cat <<\_ASBOX
1177 ## ----------------- ##
1178 ## Output variables. ##
1179 ## ----------------- ##
1180 _ASBOX
1181     echo
1182     for ac_var in $ac_subst_vars
1183     do
1184       eval ac_val=$`echo $ac_var`
1185       echo "$ac_var='"'"'$ac_val'"'"'"
1186     done | sort
1187     echo
1188
1189     if test -n "$ac_subst_files"; then
1190       cat <<\_ASBOX
1191 ## ------------- ##
1192 ## Output files. ##
1193 ## ------------- ##
1194 _ASBOX
1195       echo
1196       for ac_var in $ac_subst_files
1197       do
1198         eval ac_val=$`echo $ac_var`
1199         echo "$ac_var='"'"'$ac_val'"'"'"
1200       done | sort
1201       echo
1202     fi
1203
1204     if test -s confdefs.h; then
1205       cat <<\_ASBOX
1206 ## ----------- ##
1207 ## confdefs.h. ##
1208 ## ----------- ##
1209 _ASBOX
1210       echo
1211       sed "/^$/d" confdefs.h | sort
1212       echo
1213     fi
1214     test "$ac_signal" != 0 &&
1215       echo "$as_me: caught signal $ac_signal"
1216     echo "$as_me: exit $exit_status"
1217   } >&5
1218   rm -f core *.core &&
1219   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1220     exit $exit_status
1221      ' 0
1222 for ac_signal in 1 2 13 15; do
1223   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1224 done
1225 ac_signal=0
1226
1227 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1228 rm -rf conftest* confdefs.h
1229 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1230 echo >confdefs.h
1231
1232 # Predefined preprocessor variables.
1233
1234 cat >>confdefs.h <<_ACEOF
1235 #define PACKAGE_NAME "$PACKAGE_NAME"
1236 _ACEOF
1237
1238
1239 cat >>confdefs.h <<_ACEOF
1240 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1241 _ACEOF
1242
1243
1244 cat >>confdefs.h <<_ACEOF
1245 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1246 _ACEOF
1247
1248
1249 cat >>confdefs.h <<_ACEOF
1250 #define PACKAGE_STRING "$PACKAGE_STRING"
1251 _ACEOF
1252
1253
1254 cat >>confdefs.h <<_ACEOF
1255 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1256 _ACEOF
1257
1258
1259 # Let the site file select an alternate cache file if it wants to.
1260 # Prefer explicitly selected file to automatically selected ones.
1261 if test -z "$CONFIG_SITE"; then
1262   if test "x$prefix" != xNONE; then
1263     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1264   else
1265     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1266   fi
1267 fi
1268 for ac_site_file in $CONFIG_SITE; do
1269   if test -r "$ac_site_file"; then
1270     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1271 echo "$as_me: loading site script $ac_site_file" >&6;}
1272     sed 's/^/| /' "$ac_site_file" >&5
1273     . "$ac_site_file"
1274   fi
1275 done
1276
1277 if test -r "$cache_file"; then
1278   # Some versions of bash will fail to source /dev/null (special
1279   # files actually), so we avoid doing that.
1280   if test -f "$cache_file"; then
1281     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1282 echo "$as_me: loading cache $cache_file" >&6;}
1283     case $cache_file in
1284       [\\/]* | ?:[\\/]* ) . $cache_file;;
1285       *)                      . ./$cache_file;;
1286     esac
1287   fi
1288 else
1289   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1290 echo "$as_me: creating cache $cache_file" >&6;}
1291   >$cache_file
1292 fi
1293
1294 # Check that the precious variables saved in the cache have kept the same
1295 # value.
1296 ac_cache_corrupted=false
1297 for ac_var in `(set) 2>&1 |
1298                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1299   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1300   eval ac_new_set=\$ac_env_${ac_var}_set
1301   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1302   eval ac_new_val="\$ac_env_${ac_var}_value"
1303   case $ac_old_set,$ac_new_set in
1304     set,)
1305       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1306 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1307       ac_cache_corrupted=: ;;
1308     ,set)
1309       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1310 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1311       ac_cache_corrupted=: ;;
1312     ,);;
1313     *)
1314       if test "x$ac_old_val" != "x$ac_new_val"; then
1315         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1316 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1317         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1318 echo "$as_me:   former value:  $ac_old_val" >&2;}
1319         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1320 echo "$as_me:   current value: $ac_new_val" >&2;}
1321         ac_cache_corrupted=:
1322       fi;;
1323   esac
1324   # Pass precious variables to config.status.
1325   if test "$ac_new_set" = set; then
1326     case $ac_new_val in
1327     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1328       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1329     *) ac_arg=$ac_var=$ac_new_val ;;
1330     esac
1331     case " $ac_configure_args " in
1332       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1333       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1334     esac
1335   fi
1336 done
1337 if $ac_cache_corrupted; then
1338   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1339 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1340   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1341 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1342    { (exit 1); exit 1; }; }
1343 fi
1344
1345 ac_ext=c
1346 ac_cpp='$CPP $CPPFLAGS'
1347 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1348 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1349 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369           ac_config_headers="$ac_config_headers config.h"
1370
1371
1372 echo "current directory: `pwd`"
1373 echo "command line was: $0 $@"
1374
1375
1376 # After checking to see that --srcdir is correct (which AC_INIT does)
1377 # check for some random other files that come later in the tar file,
1378 # to make sure everything is here.
1379 #
1380 for d in driver utils hacks hacks/glx ; do
1381   f=$srcdir/$d/Makefile.in
1382   if test \! -r $f ; then
1383     echo ""
1384     echo "ERROR: The package is incomplete: $f does not exist."
1385     echo "       This probably means that your download was truncated."
1386     echo ""
1387     exit 1
1388   fi
1389 done
1390
1391 ###############################################################################
1392 #
1393 #       Function to figure out how to run the compiler.
1394 #
1395 ###############################################################################
1396
1397
1398
1399
1400 ###############################################################################
1401 #
1402 #       Functions to figure out how to disable // comments in ANSI C code.
1403 #
1404 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
1405 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
1406 #       gcc.  Old gcc doesn't support -std, and new gcc doesn't support -lang.
1407 #       so much for compatibility!)
1408 #
1409 #       UPDATE: apparently there is NO WAY to tell gcc 3.2.2 to require that
1410 #       declarations preceed statements, without resorting to "-pedantic".
1411 #       This means that there is no way to get gcc3 to issue warnings that
1412 #       ensure that your code complies with the ANSI/ISO C89 standard, without
1413 #       also drowning in totally useless warnings.  Thank you master may I
1414 #       have another.
1415 #
1416 #       So, I give up, let's just use -pedantic.
1417 #
1418 ###############################################################################
1419
1420
1421
1422
1423
1424
1425 ###############################################################################
1426 #
1427 #       Function to figure out how to turn off Objective C on MacOS X.
1428 #       (We have to do this to work around an Apple-specific gcc bug.)
1429 #
1430 ###############################################################################
1431
1432
1433
1434
1435
1436
1437 ###############################################################################
1438 #
1439 #       Function to figure out how to create directory trees.
1440 #
1441 ###############################################################################
1442
1443
1444
1445
1446 ###############################################################################
1447 #
1448 #       Function to check whether gettimeofday() exists, and how to call it.
1449 #       This may define HAVE_GETTIMEOFDAY and GETTIMEOFDAY_TWO_ARGS.
1450 #
1451 ###############################################################################
1452
1453
1454
1455
1456 ###############################################################################
1457 #
1458 #       Function to find perl5 (defines PERL and PERL_VERSION.)
1459 #
1460 ###############################################################################
1461
1462 # M4 sucks!!  perl sucks too!!
1463
1464 perl_version_cmd='print $]'
1465
1466
1467
1468
1469
1470 ###############################################################################
1471 #
1472 #       Function to demand "bc".  Losers.
1473 #
1474 ###############################################################################
1475
1476
1477
1478 ###############################################################################
1479 #
1480 #       Functions to check how to do ICMP PING requests.
1481 #
1482 ###############################################################################
1483
1484
1485
1486
1487
1488
1489 ###############################################################################
1490 #
1491 #       Functions to check for various X11 crap.
1492 #
1493 ###############################################################################
1494
1495 # Try and find the app-defaults directory.
1496 # It sucks that autoconf doesn't do this already...
1497 #
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508 # Random special-cases for X on certain pathological OSes.
1509 # You know who you are.
1510 #
1511
1512
1513
1514
1515 ###############################################################################
1516 #
1517 #       Some utility functions to make checking for X things easier.
1518 #
1519 ###############################################################################
1520
1521 # Like AC_CHECK_HEADER, but it uses the already-computed -I directories.
1522 #
1523
1524
1525 # Like AC_EGREP_HEADER, but it uses the already-computed -I directories.
1526 #
1527
1528
1529 # Like AC_TRY_COMPILE, but it uses the already-computed -I directories.
1530 #
1531
1532
1533
1534 # Like AC_CHECK_LIB, but it uses the already-computed -I and -L directories.
1535 # Use this sparingly; it probably doesn't work very well on X programs.
1536 #
1537
1538
1539 # Like AC_TRY_RUN, but it uses the already-computed -I directories.
1540 # (But not the -L directories!)
1541 #
1542
1543
1544
1545
1546 # Usage: HANDLE_X_PATH_ARG([variable_name],
1547 #                          [--command-line-option],
1548 #                          [descriptive string])
1549 #
1550 # All of the --with options take three forms:
1551 #
1552 #   --with-foo (or --with-foo=yes)
1553 #   --without-foo (or --with-foo=no)
1554 #   --with-foo=/DIR
1555 #
1556 # This function, HANDLE_X_PATH_ARG, deals with the /DIR case.  When it sees
1557 # a directory (string beginning with a slash) it checks to see whether
1558 # /DIR/include and /DIR/lib exist, and adds them to $X_CFLAGS and $X_LIBS
1559 # as appropriate.
1560 #
1561
1562
1563
1564
1565 ###############################################################################
1566 ###############################################################################
1567 #
1568 #       End of function definitions.  Now start actually executing stuff.
1569 #
1570 ###############################################################################
1571 ###############################################################################
1572
1573 # random compiler setup
1574 ac_aux_dir=
1575 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1576   if test -f $ac_dir/install-sh; then
1577     ac_aux_dir=$ac_dir
1578     ac_install_sh="$ac_aux_dir/install-sh -c"
1579     break
1580   elif test -f $ac_dir/install.sh; then
1581     ac_aux_dir=$ac_dir
1582     ac_install_sh="$ac_aux_dir/install.sh -c"
1583     break
1584   elif test -f $ac_dir/shtool; then
1585     ac_aux_dir=$ac_dir
1586     ac_install_sh="$ac_aux_dir/shtool install -c"
1587     break
1588   fi
1589 done
1590 if test -z "$ac_aux_dir"; then
1591   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1592 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1593    { (exit 1); exit 1; }; }
1594 fi
1595 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1596 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1597 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1598
1599 # Make sure we can run config.sub.
1600 $ac_config_sub sun4 >/dev/null 2>&1 ||
1601   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1602 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1603    { (exit 1); exit 1; }; }
1604
1605 echo "$as_me:$LINENO: checking build system type" >&5
1606 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1607 if test "${ac_cv_build+set}" = set; then
1608   echo $ECHO_N "(cached) $ECHO_C" >&6
1609 else
1610   ac_cv_build_alias=$build_alias
1611 test -z "$ac_cv_build_alias" &&
1612   ac_cv_build_alias=`$ac_config_guess`
1613 test -z "$ac_cv_build_alias" &&
1614   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1615 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1616    { (exit 1); exit 1; }; }
1617 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1618   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1619 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1620    { (exit 1); exit 1; }; }
1621
1622 fi
1623 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1624 echo "${ECHO_T}$ac_cv_build" >&6
1625 build=$ac_cv_build
1626 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1627 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1628 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1629
1630
1631 echo "$as_me:$LINENO: checking host system type" >&5
1632 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1633 if test "${ac_cv_host+set}" = set; then
1634   echo $ECHO_N "(cached) $ECHO_C" >&6
1635 else
1636   ac_cv_host_alias=$host_alias
1637 test -z "$ac_cv_host_alias" &&
1638   ac_cv_host_alias=$ac_cv_build_alias
1639 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1640   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1641 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1642    { (exit 1); exit 1; }; }
1643
1644 fi
1645 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1646 echo "${ECHO_T}$ac_cv_host" >&6
1647 host=$ac_cv_host
1648 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1649 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1650 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1651
1652
1653
1654 ac_ext=c
1655 ac_cpp='$CPP $CPPFLAGS'
1656 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1657 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1658 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1659 if test -n "$ac_tool_prefix"; then
1660   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1661 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1662 echo "$as_me:$LINENO: checking for $ac_word" >&5
1663 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1664 if test "${ac_cv_prog_CC+set}" = set; then
1665   echo $ECHO_N "(cached) $ECHO_C" >&6
1666 else
1667   if test -n "$CC"; then
1668   ac_cv_prog_CC="$CC" # Let the user override the test.
1669 else
1670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1671 for as_dir in $PATH
1672 do
1673   IFS=$as_save_IFS
1674   test -z "$as_dir" && as_dir=.
1675   for ac_exec_ext in '' $ac_executable_extensions; do
1676   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1677     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1678     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1679     break 2
1680   fi
1681 done
1682 done
1683
1684 fi
1685 fi
1686 CC=$ac_cv_prog_CC
1687 if test -n "$CC"; then
1688   echo "$as_me:$LINENO: result: $CC" >&5
1689 echo "${ECHO_T}$CC" >&6
1690 else
1691   echo "$as_me:$LINENO: result: no" >&5
1692 echo "${ECHO_T}no" >&6
1693 fi
1694
1695 fi
1696 if test -z "$ac_cv_prog_CC"; then
1697   ac_ct_CC=$CC
1698   # Extract the first word of "gcc", so it can be a program name with args.
1699 set dummy gcc; ac_word=$2
1700 echo "$as_me:$LINENO: checking for $ac_word" >&5
1701 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1702 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1703   echo $ECHO_N "(cached) $ECHO_C" >&6
1704 else
1705   if test -n "$ac_ct_CC"; then
1706   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1707 else
1708 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1709 for as_dir in $PATH
1710 do
1711   IFS=$as_save_IFS
1712   test -z "$as_dir" && as_dir=.
1713   for ac_exec_ext in '' $ac_executable_extensions; do
1714   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1715     ac_cv_prog_ac_ct_CC="gcc"
1716     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1717     break 2
1718   fi
1719 done
1720 done
1721
1722 fi
1723 fi
1724 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1725 if test -n "$ac_ct_CC"; then
1726   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1727 echo "${ECHO_T}$ac_ct_CC" >&6
1728 else
1729   echo "$as_me:$LINENO: result: no" >&5
1730 echo "${ECHO_T}no" >&6
1731 fi
1732
1733   CC=$ac_ct_CC
1734 else
1735   CC="$ac_cv_prog_CC"
1736 fi
1737
1738 if test -z "$CC"; then
1739   if test -n "$ac_tool_prefix"; then
1740   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1741 set dummy ${ac_tool_prefix}cc; ac_word=$2
1742 echo "$as_me:$LINENO: checking for $ac_word" >&5
1743 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1744 if test "${ac_cv_prog_CC+set}" = set; then
1745   echo $ECHO_N "(cached) $ECHO_C" >&6
1746 else
1747   if test -n "$CC"; then
1748   ac_cv_prog_CC="$CC" # Let the user override the test.
1749 else
1750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1751 for as_dir in $PATH
1752 do
1753   IFS=$as_save_IFS
1754   test -z "$as_dir" && as_dir=.
1755   for ac_exec_ext in '' $ac_executable_extensions; do
1756   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1757     ac_cv_prog_CC="${ac_tool_prefix}cc"
1758     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1759     break 2
1760   fi
1761 done
1762 done
1763
1764 fi
1765 fi
1766 CC=$ac_cv_prog_CC
1767 if test -n "$CC"; then
1768   echo "$as_me:$LINENO: result: $CC" >&5
1769 echo "${ECHO_T}$CC" >&6
1770 else
1771   echo "$as_me:$LINENO: result: no" >&5
1772 echo "${ECHO_T}no" >&6
1773 fi
1774
1775 fi
1776 if test -z "$ac_cv_prog_CC"; then
1777   ac_ct_CC=$CC
1778   # Extract the first word of "cc", so it can be a program name with args.
1779 set dummy cc; ac_word=$2
1780 echo "$as_me:$LINENO: checking for $ac_word" >&5
1781 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1782 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1783   echo $ECHO_N "(cached) $ECHO_C" >&6
1784 else
1785   if test -n "$ac_ct_CC"; then
1786   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1787 else
1788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1789 for as_dir in $PATH
1790 do
1791   IFS=$as_save_IFS
1792   test -z "$as_dir" && as_dir=.
1793   for ac_exec_ext in '' $ac_executable_extensions; do
1794   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1795     ac_cv_prog_ac_ct_CC="cc"
1796     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1797     break 2
1798   fi
1799 done
1800 done
1801
1802 fi
1803 fi
1804 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1805 if test -n "$ac_ct_CC"; then
1806   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1807 echo "${ECHO_T}$ac_ct_CC" >&6
1808 else
1809   echo "$as_me:$LINENO: result: no" >&5
1810 echo "${ECHO_T}no" >&6
1811 fi
1812
1813   CC=$ac_ct_CC
1814 else
1815   CC="$ac_cv_prog_CC"
1816 fi
1817
1818 fi
1819 if test -z "$CC"; then
1820   # Extract the first word of "cc", so it can be a program name with args.
1821 set dummy cc; ac_word=$2
1822 echo "$as_me:$LINENO: checking for $ac_word" >&5
1823 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1824 if test "${ac_cv_prog_CC+set}" = set; then
1825   echo $ECHO_N "(cached) $ECHO_C" >&6
1826 else
1827   if test -n "$CC"; then
1828   ac_cv_prog_CC="$CC" # Let the user override the test.
1829 else
1830   ac_prog_rejected=no
1831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1832 for as_dir in $PATH
1833 do
1834   IFS=$as_save_IFS
1835   test -z "$as_dir" && as_dir=.
1836   for ac_exec_ext in '' $ac_executable_extensions; do
1837   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1838     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1839        ac_prog_rejected=yes
1840        continue
1841      fi
1842     ac_cv_prog_CC="cc"
1843     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1844     break 2
1845   fi
1846 done
1847 done
1848
1849 if test $ac_prog_rejected = yes; then
1850   # We found a bogon in the path, so make sure we never use it.
1851   set dummy $ac_cv_prog_CC
1852   shift
1853   if test $# != 0; then
1854     # We chose a different compiler from the bogus one.
1855     # However, it has the same basename, so the bogon will be chosen
1856     # first if we set CC to just the basename; use the full file name.
1857     shift
1858     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1859   fi
1860 fi
1861 fi
1862 fi
1863 CC=$ac_cv_prog_CC
1864 if test -n "$CC"; then
1865   echo "$as_me:$LINENO: result: $CC" >&5
1866 echo "${ECHO_T}$CC" >&6
1867 else
1868   echo "$as_me:$LINENO: result: no" >&5
1869 echo "${ECHO_T}no" >&6
1870 fi
1871
1872 fi
1873 if test -z "$CC"; then
1874   if test -n "$ac_tool_prefix"; then
1875   for ac_prog in cl
1876   do
1877     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1878 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1879 echo "$as_me:$LINENO: checking for $ac_word" >&5
1880 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1881 if test "${ac_cv_prog_CC+set}" = set; then
1882   echo $ECHO_N "(cached) $ECHO_C" >&6
1883 else
1884   if test -n "$CC"; then
1885   ac_cv_prog_CC="$CC" # Let the user override the test.
1886 else
1887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1888 for as_dir in $PATH
1889 do
1890   IFS=$as_save_IFS
1891   test -z "$as_dir" && as_dir=.
1892   for ac_exec_ext in '' $ac_executable_extensions; do
1893   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1894     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1895     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1896     break 2
1897   fi
1898 done
1899 done
1900
1901 fi
1902 fi
1903 CC=$ac_cv_prog_CC
1904 if test -n "$CC"; then
1905   echo "$as_me:$LINENO: result: $CC" >&5
1906 echo "${ECHO_T}$CC" >&6
1907 else
1908   echo "$as_me:$LINENO: result: no" >&5
1909 echo "${ECHO_T}no" >&6
1910 fi
1911
1912     test -n "$CC" && break
1913   done
1914 fi
1915 if test -z "$CC"; then
1916   ac_ct_CC=$CC
1917   for ac_prog in cl
1918 do
1919   # Extract the first word of "$ac_prog", so it can be a program name with args.
1920 set dummy $ac_prog; ac_word=$2
1921 echo "$as_me:$LINENO: checking for $ac_word" >&5
1922 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1923 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1924   echo $ECHO_N "(cached) $ECHO_C" >&6
1925 else
1926   if test -n "$ac_ct_CC"; then
1927   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1928 else
1929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1930 for as_dir in $PATH
1931 do
1932   IFS=$as_save_IFS
1933   test -z "$as_dir" && as_dir=.
1934   for ac_exec_ext in '' $ac_executable_extensions; do
1935   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1936     ac_cv_prog_ac_ct_CC="$ac_prog"
1937     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1938     break 2
1939   fi
1940 done
1941 done
1942
1943 fi
1944 fi
1945 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1946 if test -n "$ac_ct_CC"; then
1947   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1948 echo "${ECHO_T}$ac_ct_CC" >&6
1949 else
1950   echo "$as_me:$LINENO: result: no" >&5
1951 echo "${ECHO_T}no" >&6
1952 fi
1953
1954   test -n "$ac_ct_CC" && break
1955 done
1956
1957   CC=$ac_ct_CC
1958 fi
1959
1960 fi
1961
1962
1963 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1964 See \`config.log' for more details." >&5
1965 echo "$as_me: error: no acceptable C compiler found in \$PATH
1966 See \`config.log' for more details." >&2;}
1967    { (exit 1); exit 1; }; }
1968
1969 # Provide some information about the compiler.
1970 echo "$as_me:$LINENO:" \
1971      "checking for C compiler version" >&5
1972 ac_compiler=`set X $ac_compile; echo $2`
1973 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1974   (eval $ac_compiler --version </dev/null >&5) 2>&5
1975   ac_status=$?
1976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1977   (exit $ac_status); }
1978 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1979   (eval $ac_compiler -v </dev/null >&5) 2>&5
1980   ac_status=$?
1981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1982   (exit $ac_status); }
1983 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1984   (eval $ac_compiler -V </dev/null >&5) 2>&5
1985   ac_status=$?
1986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1987   (exit $ac_status); }
1988
1989 cat >conftest.$ac_ext <<_ACEOF
1990 /* confdefs.h.  */
1991 _ACEOF
1992 cat confdefs.h >>conftest.$ac_ext
1993 cat >>conftest.$ac_ext <<_ACEOF
1994 /* end confdefs.h.  */
1995
1996 int
1997 main ()
1998 {
1999
2000   ;
2001   return 0;
2002 }
2003 _ACEOF
2004 ac_clean_files_save=$ac_clean_files
2005 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2006 # Try to create an executable without -o first, disregard a.out.
2007 # It will help us diagnose broken compilers, and finding out an intuition
2008 # of exeext.
2009 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2010 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2011 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2012 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2013   (eval $ac_link_default) 2>&5
2014   ac_status=$?
2015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2016   (exit $ac_status); }; then
2017   # Find the output, starting from the most likely.  This scheme is
2018 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2019 # resort.
2020
2021 # Be careful to initialize this variable, since it used to be cached.
2022 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2023 ac_cv_exeext=
2024 # b.out is created by i960 compilers.
2025 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2026 do
2027   test -f "$ac_file" || continue
2028   case $ac_file in
2029     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2030         ;;
2031     conftest.$ac_ext )
2032         # This is the source file.
2033         ;;
2034     [ab].out )
2035         # We found the default executable, but exeext='' is most
2036         # certainly right.
2037         break;;
2038     *.* )
2039         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2040         # FIXME: I believe we export ac_cv_exeext for Libtool,
2041         # but it would be cool to find out if it's true.  Does anybody
2042         # maintain Libtool? --akim.
2043         export ac_cv_exeext
2044         break;;
2045     * )
2046         break;;
2047   esac
2048 done
2049 else
2050   echo "$as_me: failed program was:" >&5
2051 sed 's/^/| /' conftest.$ac_ext >&5
2052
2053 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2054 See \`config.log' for more details." >&5
2055 echo "$as_me: error: C compiler cannot create executables
2056 See \`config.log' for more details." >&2;}
2057    { (exit 77); exit 77; }; }
2058 fi
2059
2060 ac_exeext=$ac_cv_exeext
2061 echo "$as_me:$LINENO: result: $ac_file" >&5
2062 echo "${ECHO_T}$ac_file" >&6
2063
2064 # Check the compiler produces executables we can run.  If not, either
2065 # the compiler is broken, or we cross compile.
2066 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2067 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2068 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2069 # If not cross compiling, check that we can run a simple program.
2070 if test "$cross_compiling" != yes; then
2071   if { ac_try='./$ac_file'
2072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2073   (eval $ac_try) 2>&5
2074   ac_status=$?
2075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2076   (exit $ac_status); }; }; then
2077     cross_compiling=no
2078   else
2079     if test "$cross_compiling" = maybe; then
2080         cross_compiling=yes
2081     else
2082         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2083 If you meant to cross compile, use \`--host'.
2084 See \`config.log' for more details." >&5
2085 echo "$as_me: error: cannot run C compiled programs.
2086 If you meant to cross compile, use \`--host'.
2087 See \`config.log' for more details." >&2;}
2088    { (exit 1); exit 1; }; }
2089     fi
2090   fi
2091 fi
2092 echo "$as_me:$LINENO: result: yes" >&5
2093 echo "${ECHO_T}yes" >&6
2094
2095 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2096 ac_clean_files=$ac_clean_files_save
2097 # Check the compiler produces executables we can run.  If not, either
2098 # the compiler is broken, or we cross compile.
2099 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2100 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2101 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2102 echo "${ECHO_T}$cross_compiling" >&6
2103
2104 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2105 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2106 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2107   (eval $ac_link) 2>&5
2108   ac_status=$?
2109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2110   (exit $ac_status); }; then
2111   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2112 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2113 # work properly (i.e., refer to `conftest.exe'), while it won't with
2114 # `rm'.
2115 for ac_file in conftest.exe conftest conftest.*; do
2116   test -f "$ac_file" || continue
2117   case $ac_file in
2118     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2119     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2120           export ac_cv_exeext
2121           break;;
2122     * ) break;;
2123   esac
2124 done
2125 else
2126   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2127 See \`config.log' for more details." >&5
2128 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2129 See \`config.log' for more details." >&2;}
2130    { (exit 1); exit 1; }; }
2131 fi
2132
2133 rm -f conftest$ac_cv_exeext
2134 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2135 echo "${ECHO_T}$ac_cv_exeext" >&6
2136
2137 rm -f conftest.$ac_ext
2138 EXEEXT=$ac_cv_exeext
2139 ac_exeext=$EXEEXT
2140 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2141 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2142 if test "${ac_cv_objext+set}" = set; then
2143   echo $ECHO_N "(cached) $ECHO_C" >&6
2144 else
2145   cat >conftest.$ac_ext <<_ACEOF
2146 /* confdefs.h.  */
2147 _ACEOF
2148 cat confdefs.h >>conftest.$ac_ext
2149 cat >>conftest.$ac_ext <<_ACEOF
2150 /* end confdefs.h.  */
2151
2152 int
2153 main ()
2154 {
2155
2156   ;
2157   return 0;
2158 }
2159 _ACEOF
2160 rm -f conftest.o conftest.obj
2161 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2162   (eval $ac_compile) 2>&5
2163   ac_status=$?
2164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2165   (exit $ac_status); }; then
2166   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2167   case $ac_file in
2168     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2169     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2170        break;;
2171   esac
2172 done
2173 else
2174   echo "$as_me: failed program was:" >&5
2175 sed 's/^/| /' conftest.$ac_ext >&5
2176
2177 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2178 See \`config.log' for more details." >&5
2179 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2180 See \`config.log' for more details." >&2;}
2181    { (exit 1); exit 1; }; }
2182 fi
2183
2184 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2185 fi
2186 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2187 echo "${ECHO_T}$ac_cv_objext" >&6
2188 OBJEXT=$ac_cv_objext
2189 ac_objext=$OBJEXT
2190 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2191 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2192 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2193   echo $ECHO_N "(cached) $ECHO_C" >&6
2194 else
2195   cat >conftest.$ac_ext <<_ACEOF
2196 /* confdefs.h.  */
2197 _ACEOF
2198 cat confdefs.h >>conftest.$ac_ext
2199 cat >>conftest.$ac_ext <<_ACEOF
2200 /* end confdefs.h.  */
2201
2202 int
2203 main ()
2204 {
2205 #ifndef __GNUC__
2206        choke me
2207 #endif
2208
2209   ;
2210   return 0;
2211 }
2212 _ACEOF
2213 rm -f conftest.$ac_objext
2214 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2215   (eval $ac_compile) 2>conftest.er1
2216   ac_status=$?
2217   grep -v '^ *+' conftest.er1 >conftest.err
2218   rm -f conftest.er1
2219   cat conftest.err >&5
2220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2221   (exit $ac_status); } &&
2222          { ac_try='test -z "$ac_c_werror_flag"
2223                          || test ! -s conftest.err'
2224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2225   (eval $ac_try) 2>&5
2226   ac_status=$?
2227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2228   (exit $ac_status); }; } &&
2229          { ac_try='test -s conftest.$ac_objext'
2230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2231   (eval $ac_try) 2>&5
2232   ac_status=$?
2233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2234   (exit $ac_status); }; }; then
2235   ac_compiler_gnu=yes
2236 else
2237   echo "$as_me: failed program was:" >&5
2238 sed 's/^/| /' conftest.$ac_ext >&5
2239
2240 ac_compiler_gnu=no
2241 fi
2242 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2243 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2244
2245 fi
2246 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2247 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2248 GCC=`test $ac_compiler_gnu = yes && echo yes`
2249 ac_test_CFLAGS=${CFLAGS+set}
2250 ac_save_CFLAGS=$CFLAGS
2251 CFLAGS="-g"
2252 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2253 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2254 if test "${ac_cv_prog_cc_g+set}" = set; then
2255   echo $ECHO_N "(cached) $ECHO_C" >&6
2256 else
2257   cat >conftest.$ac_ext <<_ACEOF
2258 /* confdefs.h.  */
2259 _ACEOF
2260 cat confdefs.h >>conftest.$ac_ext
2261 cat >>conftest.$ac_ext <<_ACEOF
2262 /* end confdefs.h.  */
2263
2264 int
2265 main ()
2266 {
2267
2268   ;
2269   return 0;
2270 }
2271 _ACEOF
2272 rm -f conftest.$ac_objext
2273 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2274   (eval $ac_compile) 2>conftest.er1
2275   ac_status=$?
2276   grep -v '^ *+' conftest.er1 >conftest.err
2277   rm -f conftest.er1
2278   cat conftest.err >&5
2279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2280   (exit $ac_status); } &&
2281          { ac_try='test -z "$ac_c_werror_flag"
2282                          || test ! -s conftest.err'
2283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2284   (eval $ac_try) 2>&5
2285   ac_status=$?
2286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2287   (exit $ac_status); }; } &&
2288          { ac_try='test -s conftest.$ac_objext'
2289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2290   (eval $ac_try) 2>&5
2291   ac_status=$?
2292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2293   (exit $ac_status); }; }; then
2294   ac_cv_prog_cc_g=yes
2295 else
2296   echo "$as_me: failed program was:" >&5
2297 sed 's/^/| /' conftest.$ac_ext >&5
2298
2299 ac_cv_prog_cc_g=no
2300 fi
2301 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2302 fi
2303 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2304 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2305 if test "$ac_test_CFLAGS" = set; then
2306   CFLAGS=$ac_save_CFLAGS
2307 elif test $ac_cv_prog_cc_g = yes; then
2308   if test "$GCC" = yes; then
2309     CFLAGS="-g -O2"
2310   else
2311     CFLAGS="-g"
2312   fi
2313 else
2314   if test "$GCC" = yes; then
2315     CFLAGS="-O2"
2316   else
2317     CFLAGS=
2318   fi
2319 fi
2320 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2321 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2322 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2323   echo $ECHO_N "(cached) $ECHO_C" >&6
2324 else
2325   ac_cv_prog_cc_stdc=no
2326 ac_save_CC=$CC
2327 cat >conftest.$ac_ext <<_ACEOF
2328 /* confdefs.h.  */
2329 _ACEOF
2330 cat confdefs.h >>conftest.$ac_ext
2331 cat >>conftest.$ac_ext <<_ACEOF
2332 /* end confdefs.h.  */
2333 #include <stdarg.h>
2334 #include <stdio.h>
2335 #include <sys/types.h>
2336 #include <sys/stat.h>
2337 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2338 struct buf { int x; };
2339 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2340 static char *e (p, i)
2341      char **p;
2342      int i;
2343 {
2344   return p[i];
2345 }
2346 static char *f (char * (*g) (char **, int), char **p, ...)
2347 {
2348   char *s;
2349   va_list v;
2350   va_start (v,p);
2351   s = g (p, va_arg (v,int));
2352   va_end (v);
2353   return s;
2354 }
2355
2356 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2357    function prototypes and stuff, but not '\xHH' hex character constants.
2358    These don't provoke an error unfortunately, instead are silently treated
2359    as 'x'.  The following induces an error, until -std1 is added to get
2360    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2361    array size at least.  It's necessary to write '\x00'==0 to get something
2362    that's true only with -std1.  */
2363 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2364
2365 int test (int i, double x);
2366 struct s1 {int (*f) (int a);};
2367 struct s2 {int (*f) (double a);};
2368 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2369 int argc;
2370 char **argv;
2371 int
2372 main ()
2373 {
2374 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2375   ;
2376   return 0;
2377 }
2378 _ACEOF
2379 # Don't try gcc -ansi; that turns off useful extensions and
2380 # breaks some systems' header files.
2381 # AIX                   -qlanglvl=ansi
2382 # Ultrix and OSF/1      -std1
2383 # HP-UX 10.20 and later -Ae
2384 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2385 # SVR4                  -Xc -D__EXTENSIONS__
2386 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2387 do
2388   CC="$ac_save_CC $ac_arg"
2389   rm -f conftest.$ac_objext
2390 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2391   (eval $ac_compile) 2>conftest.er1
2392   ac_status=$?
2393   grep -v '^ *+' conftest.er1 >conftest.err
2394   rm -f conftest.er1
2395   cat conftest.err >&5
2396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397   (exit $ac_status); } &&
2398          { ac_try='test -z "$ac_c_werror_flag"
2399                          || test ! -s conftest.err'
2400   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2401   (eval $ac_try) 2>&5
2402   ac_status=$?
2403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2404   (exit $ac_status); }; } &&
2405          { ac_try='test -s conftest.$ac_objext'
2406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2407   (eval $ac_try) 2>&5
2408   ac_status=$?
2409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2410   (exit $ac_status); }; }; then
2411   ac_cv_prog_cc_stdc=$ac_arg
2412 break
2413 else
2414   echo "$as_me: failed program was:" >&5
2415 sed 's/^/| /' conftest.$ac_ext >&5
2416
2417 fi
2418 rm -f conftest.err conftest.$ac_objext
2419 done
2420 rm -f conftest.$ac_ext conftest.$ac_objext
2421 CC=$ac_save_CC
2422
2423 fi
2424
2425 case "x$ac_cv_prog_cc_stdc" in
2426   x|xno)
2427     echo "$as_me:$LINENO: result: none needed" >&5
2428 echo "${ECHO_T}none needed" >&6 ;;
2429   *)
2430     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2431 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2432     CC="$CC $ac_cv_prog_cc_stdc" ;;
2433 esac
2434
2435 # Some people use a C++ compiler to compile C.  Since we use `exit',
2436 # in C++ we need to declare it.  In case someone uses the same compiler
2437 # for both compiling C and C++ we need to have the C++ compiler decide
2438 # the declaration of exit, since it's the most demanding environment.
2439 cat >conftest.$ac_ext <<_ACEOF
2440 #ifndef __cplusplus
2441   choke me
2442 #endif
2443 _ACEOF
2444 rm -f conftest.$ac_objext
2445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2446   (eval $ac_compile) 2>conftest.er1
2447   ac_status=$?
2448   grep -v '^ *+' conftest.er1 >conftest.err
2449   rm -f conftest.er1
2450   cat conftest.err >&5
2451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2452   (exit $ac_status); } &&
2453          { ac_try='test -z "$ac_c_werror_flag"
2454                          || test ! -s conftest.err'
2455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2456   (eval $ac_try) 2>&5
2457   ac_status=$?
2458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2459   (exit $ac_status); }; } &&
2460          { ac_try='test -s conftest.$ac_objext'
2461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2462   (eval $ac_try) 2>&5
2463   ac_status=$?
2464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2465   (exit $ac_status); }; }; then
2466   for ac_declaration in \
2467    '' \
2468    'extern "C" void std::exit (int) throw (); using std::exit;' \
2469    'extern "C" void std::exit (int); using std::exit;' \
2470    'extern "C" void exit (int) throw ();' \
2471    'extern "C" void exit (int);' \
2472    'void exit (int);'
2473 do
2474   cat >conftest.$ac_ext <<_ACEOF
2475 /* confdefs.h.  */
2476 _ACEOF
2477 cat confdefs.h >>conftest.$ac_ext
2478 cat >>conftest.$ac_ext <<_ACEOF
2479 /* end confdefs.h.  */
2480 $ac_declaration
2481 #include <stdlib.h>
2482 int
2483 main ()
2484 {
2485 exit (42);
2486   ;
2487   return 0;
2488 }
2489 _ACEOF
2490 rm -f conftest.$ac_objext
2491 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2492   (eval $ac_compile) 2>conftest.er1
2493   ac_status=$?
2494   grep -v '^ *+' conftest.er1 >conftest.err
2495   rm -f conftest.er1
2496   cat conftest.err >&5
2497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2498   (exit $ac_status); } &&
2499          { ac_try='test -z "$ac_c_werror_flag"
2500                          || test ! -s conftest.err'
2501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2502   (eval $ac_try) 2>&5
2503   ac_status=$?
2504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2505   (exit $ac_status); }; } &&
2506          { ac_try='test -s conftest.$ac_objext'
2507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2508   (eval $ac_try) 2>&5
2509   ac_status=$?
2510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2511   (exit $ac_status); }; }; then
2512   :
2513 else
2514   echo "$as_me: failed program was:" >&5
2515 sed 's/^/| /' conftest.$ac_ext >&5
2516
2517 continue
2518 fi
2519 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2520   cat >conftest.$ac_ext <<_ACEOF
2521 /* confdefs.h.  */
2522 _ACEOF
2523 cat confdefs.h >>conftest.$ac_ext
2524 cat >>conftest.$ac_ext <<_ACEOF
2525 /* end confdefs.h.  */
2526 $ac_declaration
2527 int
2528 main ()
2529 {
2530 exit (42);
2531   ;
2532   return 0;
2533 }
2534 _ACEOF
2535 rm -f conftest.$ac_objext
2536 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2537   (eval $ac_compile) 2>conftest.er1
2538   ac_status=$?
2539   grep -v '^ *+' conftest.er1 >conftest.err
2540   rm -f conftest.er1
2541   cat conftest.err >&5
2542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2543   (exit $ac_status); } &&
2544          { ac_try='test -z "$ac_c_werror_flag"
2545                          || test ! -s conftest.err'
2546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2547   (eval $ac_try) 2>&5
2548   ac_status=$?
2549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2550   (exit $ac_status); }; } &&
2551          { ac_try='test -s conftest.$ac_objext'
2552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2553   (eval $ac_try) 2>&5
2554   ac_status=$?
2555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2556   (exit $ac_status); }; }; then
2557   break
2558 else
2559   echo "$as_me: failed program was:" >&5
2560 sed 's/^/| /' conftest.$ac_ext >&5
2561
2562 fi
2563 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2564 done
2565 rm -f conftest*
2566 if test -n "$ac_declaration"; then
2567   echo '#ifdef __cplusplus' >>confdefs.h
2568   echo $ac_declaration      >>confdefs.h
2569   echo '#endif'             >>confdefs.h
2570 fi
2571
2572 else
2573   echo "$as_me: failed program was:" >&5
2574 sed 's/^/| /' conftest.$ac_ext >&5
2575
2576 fi
2577 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2578 ac_ext=c
2579 ac_cpp='$CPP $CPPFLAGS'
2580 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2581 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2582 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2583
2584
2585   if test -z "$GCC"; then
2586     # not using GCC
2587     echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5
2588 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6
2589     case "$host" in
2590       *-hpux* )
2591         echo "$as_me:$LINENO: result: HPUX: adding -Ae" >&5
2592 echo "${ECHO_T}HPUX: adding -Ae" >&6
2593         CC="$CC -Ae"
2594       ;;
2595       *-aix* )
2596         echo "$as_me:$LINENO: result: AIX: adding -qlanglvl=ansi -qhalt=e" >&5
2597 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6
2598         CC="$CC -qlanglvl=ansi -qhalt=e"
2599       ;;
2600       *-dec-* )
2601         echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5
2602 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6
2603         CC="$CC -std1"
2604       ;;
2605       *)
2606         echo "$as_me:$LINENO: result: no idea" >&5
2607 echo "${ECHO_T}no idea" >&6
2608       ;;
2609     esac
2610   else
2611     # using GCC
2612     case "$host" in
2613       *-solaris*)
2614         echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5
2615 echo "${ECHO_T}Solaris: adding -D__EXTENSIONS__" >&6
2616         CC="$CC -D__EXTENSIONS__"
2617       ;;
2618     esac
2619   fi
2620
2621   OBJCC="$CC"
2622
2623   echo "$as_me:$LINENO: checking whether the compiler works on ANSI C" >&5
2624 echo $ECHO_N "checking whether the compiler works on ANSI C... $ECHO_C" >&6
2625   if test "$cross_compiling" = yes; then
2626   { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2627 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2628    { (exit 1); exit 1; }; }
2629 else
2630   cat >conftest.$ac_ext <<_ACEOF
2631 /* confdefs.h.  */
2632 _ACEOF
2633 cat confdefs.h >>conftest.$ac_ext
2634 cat >>conftest.$ac_ext <<_ACEOF
2635 /* end confdefs.h.  */
2636  main(int ac, char **av) { return 0; }
2637 _ACEOF
2638 rm -f conftest$ac_exeext
2639 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2640   (eval $ac_link) 2>&5
2641   ac_status=$?
2642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2643   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2645   (eval $ac_try) 2>&5
2646   ac_status=$?
2647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2648   (exit $ac_status); }; }; then
2649   echo "$as_me:$LINENO: result: yes" >&5
2650 echo "${ECHO_T}yes" >&6
2651 else
2652   echo "$as_me: program exited with status $ac_status" >&5
2653 echo "$as_me: failed program was:" >&5
2654 sed 's/^/| /' conftest.$ac_ext >&5
2655
2656 ( exit $ac_status )
2657 echo "$as_me:$LINENO: result: no" >&5
2658 echo "${ECHO_T}no" >&6
2659      { { echo "$as_me:$LINENO: error: Couldn't build even a trivial ANSI C program: check CC." >&5
2660 echo "$as_me: error: Couldn't build even a trivial ANSI C program: check CC." >&2;}
2661    { (exit 1); exit 1; }; }
2662 fi
2663 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2664 fi
2665
2666   if test -n "$GCC"; then
2667     echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5
2668 echo "${ECHO_T}Turning on gcc compiler warnings." >&6
2669     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs"
2670     OBJCC="$OBJCC -Wall"
2671     # supposedly gcc 3.4 will have "-Wdeclaration-after-statement"
2672     # and then perhaps we can do without -pedantic?
2673   else
2674     case "$host" in
2675       *-irix5* |*-irix6.0-3* )
2676         echo "$as_me:$LINENO: result: Turning on SGI compiler warnings." >&5
2677 echo "${ECHO_T}Turning on SGI compiler warnings." >&6
2678         CC="$CC -fullwarn -use_readonly_const -rdata_shared -g3"
2679       ;;
2680 #     *-dec-osf* )
2681 #       if test -z "$GCC"; then
2682 #         AC_MSG_RESULT(Turning on DEC C compiler warnings.)
2683 #         CC="$CC -migrate -w0 -verbose -warnprotos"
2684 #       fi
2685 #     ;;
2686     esac
2687   fi
2688
2689 if test -n "$GCC"; then
2690    if test -n "$GCC"; then
2691    echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
2692 echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6
2693 if test "${ac_cv_gcc_accepts_std+set}" = set; then
2694   echo $ECHO_N "(cached) $ECHO_C" >&6
2695 else
2696   if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
2697           grep unrecognized >/dev/null ); then
2698        ac_cv_gcc_accepts_std=no
2699      else
2700        ac_cv_gcc_accepts_std=yes
2701      fi
2702 fi
2703 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
2704 echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6
2705    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
2706   fi
2707
2708    echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
2709 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6
2710    #
2711    # The reason that // comments are banned from xscreensaver is that gcc is
2712    # basically the only compiler in the world that supports them in C code.
2713    # All other vendors support them only in their C++ compilers, not in their
2714    # ANSI C compilers.  This means that it's a portability problem: every time
2715    # these comments have snuck into the xscreensaver source code, I've gotten
2716    # complaints about it the next day.  So we turn off support for them in gcc
2717    # as well to prevent them from accidentially slipping in.
2718    #
2719    if test "$ac_gcc_accepts_std" = yes ; then
2720      #
2721      # -std=c89 defines __STRICT_ANSI__, which we don't want.
2722      # (That appears to be the only additional preprocessor symbol
2723      # it defines, in addition to the syntax changes it makes.)
2724      #
2725      # -std=gnu89 is no good, because // comments were a GNU extension
2726      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
2727      # with -std=gnu89 but not with -std=c89.)
2728      #
2729      CC="$CC -std=c89 -U__STRICT_ANSI__"
2730    else
2731      # The old way:
2732      CC="$CC -Wp,-lang-c89"
2733    fi
2734   fi
2735
2736 if test -n "$GCC"; then
2737    if test -n "$GCC"; then
2738    echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
2739 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6
2740 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
2741   echo $ECHO_N "(cached) $ECHO_C" >&6
2742 else
2743   if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
2744           grep unrecognized >/dev/null ); then
2745        ac_cv_gcc_accepts_no_cpp_precomp=no
2746      else
2747        ac_cv_gcc_accepts_no_cpp_precomp=yes
2748      fi
2749 fi
2750 echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
2751 echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6
2752    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
2753   fi
2754
2755    if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
2756      echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
2757 echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6
2758      CC="$CC -no-cpp-precomp"
2759    fi
2760   fi
2761
2762 ac_ext=c
2763 ac_cpp='$CPP $CPPFLAGS'
2764 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2765 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2766 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2767 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2768 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2769 # On Suns, sometimes $CPP names a directory.
2770 if test -n "$CPP" && test -d "$CPP"; then
2771   CPP=
2772 fi
2773 if test -z "$CPP"; then
2774   if test "${ac_cv_prog_CPP+set}" = set; then
2775   echo $ECHO_N "(cached) $ECHO_C" >&6
2776 else
2777       # Double quotes because CPP needs to be expanded
2778     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2779     do
2780       ac_preproc_ok=false
2781 for ac_c_preproc_warn_flag in '' yes
2782 do
2783   # Use a header file that comes with gcc, so configuring glibc
2784   # with a fresh cross-compiler works.
2785   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2786   # <limits.h> exists even on freestanding compilers.
2787   # On the NeXT, cc -E runs the code through the compiler's parser,
2788   # not just through cpp. "Syntax error" is here to catch this case.
2789   cat >conftest.$ac_ext <<_ACEOF
2790 /* confdefs.h.  */
2791 _ACEOF
2792 cat confdefs.h >>conftest.$ac_ext
2793 cat >>conftest.$ac_ext <<_ACEOF
2794 /* end confdefs.h.  */
2795 #ifdef __STDC__
2796 # include <limits.h>
2797 #else
2798 # include <assert.h>
2799 #endif
2800                      Syntax error
2801 _ACEOF
2802 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2803   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2804   ac_status=$?
2805   grep -v '^ *+' conftest.er1 >conftest.err
2806   rm -f conftest.er1
2807   cat conftest.err >&5
2808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2809   (exit $ac_status); } >/dev/null; then
2810   if test -s conftest.err; then
2811     ac_cpp_err=$ac_c_preproc_warn_flag
2812     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2813   else
2814     ac_cpp_err=
2815   fi
2816 else
2817   ac_cpp_err=yes
2818 fi
2819 if test -z "$ac_cpp_err"; then
2820   :
2821 else
2822   echo "$as_me: failed program was:" >&5
2823 sed 's/^/| /' conftest.$ac_ext >&5
2824
2825   # Broken: fails on valid input.
2826 continue
2827 fi
2828 rm -f conftest.err conftest.$ac_ext
2829
2830   # OK, works on sane cases.  Now check whether non-existent headers
2831   # can be detected and how.
2832   cat >conftest.$ac_ext <<_ACEOF
2833 /* confdefs.h.  */
2834 _ACEOF
2835 cat confdefs.h >>conftest.$ac_ext
2836 cat >>conftest.$ac_ext <<_ACEOF
2837 /* end confdefs.h.  */
2838 #include <ac_nonexistent.h>
2839 _ACEOF
2840 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2841   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2842   ac_status=$?
2843   grep -v '^ *+' conftest.er1 >conftest.err
2844   rm -f conftest.er1
2845   cat conftest.err >&5
2846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2847   (exit $ac_status); } >/dev/null; then
2848   if test -s conftest.err; then
2849     ac_cpp_err=$ac_c_preproc_warn_flag
2850     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2851   else
2852     ac_cpp_err=
2853   fi
2854 else
2855   ac_cpp_err=yes
2856 fi
2857 if test -z "$ac_cpp_err"; then
2858   # Broken: success on invalid input.
2859 continue
2860 else
2861   echo "$as_me: failed program was:" >&5
2862 sed 's/^/| /' conftest.$ac_ext >&5
2863
2864   # Passes both tests.
2865 ac_preproc_ok=:
2866 break
2867 fi
2868 rm -f conftest.err conftest.$ac_ext
2869
2870 done
2871 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2872 rm -f conftest.err conftest.$ac_ext
2873 if $ac_preproc_ok; then
2874   break
2875 fi
2876
2877     done
2878     ac_cv_prog_CPP=$CPP
2879
2880 fi
2881   CPP=$ac_cv_prog_CPP
2882 else
2883   ac_cv_prog_CPP=$CPP
2884 fi
2885 echo "$as_me:$LINENO: result: $CPP" >&5
2886 echo "${ECHO_T}$CPP" >&6
2887 ac_preproc_ok=false
2888 for ac_c_preproc_warn_flag in '' yes
2889 do
2890   # Use a header file that comes with gcc, so configuring glibc
2891   # with a fresh cross-compiler works.
2892   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2893   # <limits.h> exists even on freestanding compilers.
2894   # On the NeXT, cc -E runs the code through the compiler's parser,
2895   # not just through cpp. "Syntax error" is here to catch this case.
2896   cat >conftest.$ac_ext <<_ACEOF
2897 /* confdefs.h.  */
2898 _ACEOF
2899 cat confdefs.h >>conftest.$ac_ext
2900 cat >>conftest.$ac_ext <<_ACEOF
2901 /* end confdefs.h.  */
2902 #ifdef __STDC__
2903 # include <limits.h>
2904 #else
2905 # include <assert.h>
2906 #endif
2907                      Syntax error
2908 _ACEOF
2909 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2910   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2911   ac_status=$?
2912   grep -v '^ *+' conftest.er1 >conftest.err
2913   rm -f conftest.er1
2914   cat conftest.err >&5
2915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2916   (exit $ac_status); } >/dev/null; then
2917   if test -s conftest.err; then
2918     ac_cpp_err=$ac_c_preproc_warn_flag
2919     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2920   else
2921     ac_cpp_err=
2922   fi
2923 else
2924   ac_cpp_err=yes
2925 fi
2926 if test -z "$ac_cpp_err"; then
2927   :
2928 else
2929   echo "$as_me: failed program was:" >&5
2930 sed 's/^/| /' conftest.$ac_ext >&5
2931
2932   # Broken: fails on valid input.
2933 continue
2934 fi
2935 rm -f conftest.err conftest.$ac_ext
2936
2937   # OK, works on sane cases.  Now check whether non-existent headers
2938   # can be detected and how.
2939   cat >conftest.$ac_ext <<_ACEOF
2940 /* confdefs.h.  */
2941 _ACEOF
2942 cat confdefs.h >>conftest.$ac_ext
2943 cat >>conftest.$ac_ext <<_ACEOF
2944 /* end confdefs.h.  */
2945 #include <ac_nonexistent.h>
2946 _ACEOF
2947 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2948   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2949   ac_status=$?
2950   grep -v '^ *+' conftest.er1 >conftest.err
2951   rm -f conftest.er1
2952   cat conftest.err >&5
2953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2954   (exit $ac_status); } >/dev/null; then
2955   if test -s conftest.err; then
2956     ac_cpp_err=$ac_c_preproc_warn_flag
2957     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2958   else
2959     ac_cpp_err=
2960   fi
2961 else
2962   ac_cpp_err=yes
2963 fi
2964 if test -z "$ac_cpp_err"; then
2965   # Broken: success on invalid input.
2966 continue
2967 else
2968   echo "$as_me: failed program was:" >&5
2969 sed 's/^/| /' conftest.$ac_ext >&5
2970
2971   # Passes both tests.
2972 ac_preproc_ok=:
2973 break
2974 fi
2975 rm -f conftest.err conftest.$ac_ext
2976
2977 done
2978 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2979 rm -f conftest.err conftest.$ac_ext
2980 if $ac_preproc_ok; then
2981   :
2982 else
2983   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2984 See \`config.log' for more details." >&5
2985 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2986 See \`config.log' for more details." >&2;}
2987    { (exit 1); exit 1; }; }
2988 fi
2989
2990 ac_ext=c
2991 ac_cpp='$CPP $CPPFLAGS'
2992 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2993 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2994 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2995
2996 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
2997 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2998 if test "${ac_cv_c_const+set}" = set; then
2999   echo $ECHO_N "(cached) $ECHO_C" >&6
3000 else
3001   cat >conftest.$ac_ext <<_ACEOF
3002 /* confdefs.h.  */
3003 _ACEOF
3004 cat confdefs.h >>conftest.$ac_ext
3005 cat >>conftest.$ac_ext <<_ACEOF
3006 /* end confdefs.h.  */
3007
3008 int
3009 main ()
3010 {
3011 /* FIXME: Include the comments suggested by Paul. */
3012 #ifndef __cplusplus
3013   /* Ultrix mips cc rejects this.  */
3014   typedef int charset[2];
3015   const charset x;
3016   /* SunOS 4.1.1 cc rejects this.  */
3017   char const *const *ccp;
3018   char **p;
3019   /* NEC SVR4.0.2 mips cc rejects this.  */
3020   struct point {int x, y;};
3021   static struct point const zero = {0,0};
3022   /* AIX XL C 1.02.0.0 rejects this.
3023      It does not let you subtract one const X* pointer from another in
3024      an arm of an if-expression whose if-part is not a constant
3025      expression */
3026   const char *g = "string";
3027   ccp = &g + (g ? g-g : 0);
3028   /* HPUX 7.0 cc rejects these. */
3029   ++ccp;
3030   p = (char**) ccp;
3031   ccp = (char const *const *) p;
3032   { /* SCO 3.2v4 cc rejects this.  */
3033     char *t;
3034     char const *s = 0 ? (char *) 0 : (char const *) 0;
3035
3036     *t++ = 0;
3037   }
3038   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3039     int x[] = {25, 17};
3040     const int *foo = &x[0];
3041     ++foo;
3042   }
3043   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3044     typedef const int *iptr;
3045     iptr p = 0;
3046     ++p;
3047   }
3048   { /* AIX XL C 1.02.0.0 rejects this saying
3049        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3050     struct s { int j; const int *ap[3]; };
3051     struct s *b; b->j = 5;
3052   }
3053   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3054     const int foo = 10;
3055   }
3056 #endif
3057
3058   ;
3059   return 0;
3060 }
3061 _ACEOF
3062 rm -f conftest.$ac_objext
3063 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3064   (eval $ac_compile) 2>conftest.er1
3065   ac_status=$?
3066   grep -v '^ *+' conftest.er1 >conftest.err
3067   rm -f conftest.er1
3068   cat conftest.err >&5
3069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3070   (exit $ac_status); } &&
3071          { ac_try='test -z "$ac_c_werror_flag"
3072                          || test ! -s conftest.err'
3073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3074   (eval $ac_try) 2>&5
3075   ac_status=$?
3076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3077   (exit $ac_status); }; } &&
3078          { ac_try='test -s conftest.$ac_objext'
3079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3080   (eval $ac_try) 2>&5
3081   ac_status=$?
3082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3083   (exit $ac_status); }; }; then
3084   ac_cv_c_const=yes
3085 else
3086   echo "$as_me: failed program was:" >&5
3087 sed 's/^/| /' conftest.$ac_ext >&5
3088
3089 ac_cv_c_const=no
3090 fi
3091 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3092 fi
3093 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3094 echo "${ECHO_T}$ac_cv_c_const" >&6
3095 if test $ac_cv_c_const = no; then
3096
3097 cat >>confdefs.h <<\_ACEOF
3098 #define const
3099 _ACEOF
3100
3101 fi
3102
3103 echo "$as_me:$LINENO: checking for inline" >&5
3104 echo $ECHO_N "checking for inline... $ECHO_C" >&6
3105 if test "${ac_cv_c_inline+set}" = set; then
3106   echo $ECHO_N "(cached) $ECHO_C" >&6
3107 else
3108   ac_cv_c_inline=no
3109 for ac_kw in inline __inline__ __inline; do
3110   cat >conftest.$ac_ext <<_ACEOF
3111 /* confdefs.h.  */
3112 _ACEOF
3113 cat confdefs.h >>conftest.$ac_ext
3114 cat >>conftest.$ac_ext <<_ACEOF
3115 /* end confdefs.h.  */
3116 #ifndef __cplusplus
3117 typedef int foo_t;
3118 static $ac_kw foo_t static_foo () {return 0; }
3119 $ac_kw foo_t foo () {return 0; }
3120 #endif
3121
3122 _ACEOF
3123 rm -f conftest.$ac_objext
3124 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3125   (eval $ac_compile) 2>conftest.er1
3126   ac_status=$?
3127   grep -v '^ *+' conftest.er1 >conftest.err
3128   rm -f conftest.er1
3129   cat conftest.err >&5
3130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3131   (exit $ac_status); } &&
3132          { ac_try='test -z "$ac_c_werror_flag"
3133                          || test ! -s conftest.err'
3134   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3135   (eval $ac_try) 2>&5
3136   ac_status=$?
3137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3138   (exit $ac_status); }; } &&
3139          { ac_try='test -s conftest.$ac_objext'
3140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3141   (eval $ac_try) 2>&5
3142   ac_status=$?
3143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3144   (exit $ac_status); }; }; then
3145   ac_cv_c_inline=$ac_kw; break
3146 else
3147   echo "$as_me: failed program was:" >&5
3148 sed 's/^/| /' conftest.$ac_ext >&5
3149
3150 fi
3151 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3152 done
3153
3154 fi
3155 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3156 echo "${ECHO_T}$ac_cv_c_inline" >&6
3157
3158
3159 case $ac_cv_c_inline in
3160   inline | yes) ;;
3161   *)
3162     case $ac_cv_c_inline in
3163       no) ac_val=;;
3164       *) ac_val=$ac_cv_c_inline;;
3165     esac
3166     cat >>confdefs.h <<_ACEOF
3167 #ifndef __cplusplus
3168 #define inline $ac_val
3169 #endif
3170 _ACEOF
3171     ;;
3172 esac
3173
3174
3175 ac_bc_result=`echo 6+9 | bc 2>/dev/null`
3176   echo "$as_me:$LINENO: checking for bc" >&5
3177 echo $ECHO_N "checking for bc... $ECHO_C" >&6
3178   if test "$ac_bc_result" = "15" ; then
3179     echo "$as_me:$LINENO: result: yes" >&5
3180 echo "${ECHO_T}yes" >&6
3181   else
3182     echo "$as_me:$LINENO: result: no" >&5
3183 echo "${ECHO_T}no" >&6
3184     echo ''
3185     { { echo "$as_me:$LINENO: error: Your system doesn't have \"bc\", which has been a standard
3186                   part of Unix since the 1970s.  Come back when your vendor
3187                   has grown a clue." >&5
3188 echo "$as_me: error: Your system doesn't have \"bc\", which has been a standard
3189                   part of Unix since the 1970s.  Come back when your vendor
3190                   has grown a clue." >&2;}
3191    { (exit 1); exit 1; }; }
3192   fi
3193
3194
3195 # stuff for Makefiles
3196 # Find a good install program.  We prefer a C program (faster),
3197 # so one script is as good as another.  But avoid the broken or
3198 # incompatible versions:
3199 # SysV /etc/install, /usr/sbin/install
3200 # SunOS /usr/etc/install
3201 # IRIX /sbin/install
3202 # AIX /bin/install
3203 # AmigaOS /C/install, which installs bootblocks on floppy discs
3204 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3205 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3206 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3207 # OS/2's system install, which has a completely different semantic
3208 # ./install, which can be erroneously created by make from ./install.sh.
3209 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3210 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3211 if test -z "$INSTALL"; then
3212 if test "${ac_cv_path_install+set}" = set; then
3213   echo $ECHO_N "(cached) $ECHO_C" >&6
3214 else
3215   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3216 for as_dir in $PATH
3217 do
3218   IFS=$as_save_IFS
3219   test -z "$as_dir" && as_dir=.
3220   # Account for people who put trailing slashes in PATH elements.
3221 case $as_dir/ in
3222   ./ | .// | /cC/* | \
3223   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3224   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3225   /usr/ucb/* ) ;;
3226   *)
3227     # OSF1 and SCO ODT 3.0 have their own names for install.
3228     # Don't use installbsd from OSF since it installs stuff as root
3229     # by default.
3230     for ac_prog in ginstall scoinst install; do
3231       for ac_exec_ext in '' $ac_executable_extensions; do
3232         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3233           if test $ac_prog = install &&
3234             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3235             # AIX install.  It has an incompatible calling convention.
3236             :
3237           elif test $ac_prog = install &&
3238             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3239             # program-specific install script used by HP pwplus--don't use.
3240             :
3241           else
3242             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3243             break 3
3244           fi
3245         fi
3246       done
3247     done
3248     ;;
3249 esac
3250 done
3251
3252
3253 fi
3254   if test "${ac_cv_path_install+set}" = set; then
3255     INSTALL=$ac_cv_path_install
3256   else
3257     # As a last resort, use the slow shell script.  We don't cache a
3258     # path for INSTALL within a source directory, because that will
3259     # break other packages using the cache if that directory is
3260     # removed, or if the path is relative.
3261     INSTALL=$ac_install_sh
3262   fi
3263 fi
3264 echo "$as_me:$LINENO: result: $INSTALL" >&5
3265 echo "${ECHO_T}$INSTALL" >&6
3266
3267 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3268 # It thinks the first close brace ends the variable substitution.
3269 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3270
3271 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3272
3273 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3274
3275 echo "$as_me:$LINENO: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
3276 echo $ECHO_N "checking whether \"\${INSTALL} -d\" creates intermediate directories... $ECHO_C" >&6
3277 if test "${ac_cv_install_d_creates_dirs+set}" = set; then
3278   echo $ECHO_N "(cached) $ECHO_C" >&6
3279 else
3280   ac_cv_install_d_creates_dirs=no
3281      rm -rf conftestdir
3282      if mkdir conftestdir; then
3283        cd conftestdir 2>/dev/null
3284        ${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
3285        if test -d dir1/dir2/. ; then
3286          ac_cv_install_d_creates_dirs=yes
3287        fi
3288        cd .. 2>/dev/null
3289        rm -rf conftestdir
3290      fi
3291
3292 fi
3293 echo "$as_me:$LINENO: result: $ac_cv_install_d_creates_dirs" >&5
3294 echo "${ECHO_T}$ac_cv_install_d_creates_dirs" >&6
3295
3296   if test "$ac_cv_install_d_creates_dirs" = no ; then
3297     echo "$as_me:$LINENO: checking whether \"mkdir -p\" creates intermediate directories" >&5
3298 echo $ECHO_N "checking whether \"mkdir -p\" creates intermediate directories... $ECHO_C" >&6
3299 if test "${ac_cv_mkdir_p_creates_dirs+set}" = set; then
3300   echo $ECHO_N "(cached) $ECHO_C" >&6
3301 else
3302   ac_cv_mkdir_p_creates_dirs=no
3303        rm -rf conftestdir
3304        if mkdir conftestdir; then
3305          cd conftestdir 2>/dev/null
3306          mkdir -p dir1/dir2 >/dev/null 2>&1
3307          if test -d dir1/dir2/. ; then
3308            ac_cv_mkdir_p_creates_dirs=yes
3309          fi
3310          cd .. 2>/dev/null
3311          rm -rf conftestdir
3312        fi
3313
3314 fi
3315 echo "$as_me:$LINENO: result: $ac_cv_mkdir_p_creates_dirs" >&5
3316 echo "${ECHO_T}$ac_cv_mkdir_p_creates_dirs" >&6
3317   fi
3318
3319   if test "$ac_cv_install_d_creates_dirs" = yes ; then
3320     INSTALL_DIRS='${INSTALL} -d'
3321   elif test "$ac_cv_mkdir_p_creates_dirs" = yes ; then
3322     INSTALL_DIRS='mkdir -p'
3323   else
3324     # any other ideas?
3325     INSTALL_DIRS='${INSTALL} -d'
3326   fi
3327
3328 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3329 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3330 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
3331 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3332   echo $ECHO_N "(cached) $ECHO_C" >&6
3333 else
3334   cat >conftest.make <<\_ACEOF
3335 all:
3336         @echo 'ac_maketemp="$(MAKE)"'
3337 _ACEOF
3338 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3339 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3340 if test -n "$ac_maketemp"; then
3341   eval ac_cv_prog_make_${ac_make}_set=yes
3342 else
3343   eval ac_cv_prog_make_${ac_make}_set=no
3344 fi
3345 rm -f conftest.make
3346 fi
3347 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3348   echo "$as_me:$LINENO: result: yes" >&5
3349 echo "${ECHO_T}yes" >&6
3350   SET_MAKE=
3351 else
3352   echo "$as_me:$LINENO: result: no" >&5
3353 echo "${ECHO_T}no" >&6
3354   SET_MAKE="MAKE=${MAKE-make}"
3355 fi
3356
3357
3358 # By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
3359 # That's wrong: it should be set to '${INSTALL}', so that one can
3360 # implement the "install-strip" target properly (strip executables,
3361 # but do not try to strip scripts.)
3362 #
3363 INSTALL_SCRIPT='${INSTALL}'
3364
3365 # random libc stuff
3366
3367 echo "$as_me:$LINENO: checking for egrep" >&5
3368 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3369 if test "${ac_cv_prog_egrep+set}" = set; then
3370   echo $ECHO_N "(cached) $ECHO_C" >&6
3371 else
3372   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3373     then ac_cv_prog_egrep='grep -E'
3374     else ac_cv_prog_egrep='egrep'
3375     fi
3376 fi
3377 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3378 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3379  EGREP=$ac_cv_prog_egrep
3380
3381
3382 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3383 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3384 if test "${ac_cv_header_stdc+set}" = set; then
3385   echo $ECHO_N "(cached) $ECHO_C" >&6
3386 else
3387   cat >conftest.$ac_ext <<_ACEOF
3388 /* confdefs.h.  */
3389 _ACEOF
3390 cat confdefs.h >>conftest.$ac_ext
3391 cat >>conftest.$ac_ext <<_ACEOF
3392 /* end confdefs.h.  */
3393 #include <stdlib.h>
3394 #include <stdarg.h>
3395 #include <string.h>
3396 #include <float.h>
3397
3398 int
3399 main ()
3400 {
3401
3402   ;
3403   return 0;
3404 }
3405 _ACEOF
3406 rm -f conftest.$ac_objext
3407 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3408   (eval $ac_compile) 2>conftest.er1
3409   ac_status=$?
3410   grep -v '^ *+' conftest.er1 >conftest.err
3411   rm -f conftest.er1
3412   cat conftest.err >&5
3413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3414   (exit $ac_status); } &&
3415          { ac_try='test -z "$ac_c_werror_flag"
3416                          || test ! -s conftest.err'
3417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3418   (eval $ac_try) 2>&5
3419   ac_status=$?
3420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3421   (exit $ac_status); }; } &&
3422          { ac_try='test -s conftest.$ac_objext'
3423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3424   (eval $ac_try) 2>&5
3425   ac_status=$?
3426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3427   (exit $ac_status); }; }; then
3428   ac_cv_header_stdc=yes
3429 else
3430   echo "$as_me: failed program was:" >&5
3431 sed 's/^/| /' conftest.$ac_ext >&5
3432
3433 ac_cv_header_stdc=no
3434 fi
3435 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3436
3437 if test $ac_cv_header_stdc = yes; then
3438   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3439   cat >conftest.$ac_ext <<_ACEOF
3440 /* confdefs.h.  */
3441 _ACEOF
3442 cat confdefs.h >>conftest.$ac_ext
3443 cat >>conftest.$ac_ext <<_ACEOF
3444 /* end confdefs.h.  */
3445 #include <string.h>
3446
3447 _ACEOF
3448 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3449   $EGREP "memchr" >/dev/null 2>&1; then
3450   :
3451 else
3452   ac_cv_header_stdc=no
3453 fi
3454 rm -f conftest*
3455
3456 fi
3457
3458 if test $ac_cv_header_stdc = yes; then
3459   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3460   cat >conftest.$ac_ext <<_ACEOF
3461 /* confdefs.h.  */
3462 _ACEOF
3463 cat confdefs.h >>conftest.$ac_ext
3464 cat >>conftest.$ac_ext <<_ACEOF
3465 /* end confdefs.h.  */
3466 #include <stdlib.h>
3467
3468 _ACEOF
3469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3470   $EGREP "free" >/dev/null 2>&1; then
3471   :
3472 else
3473   ac_cv_header_stdc=no
3474 fi
3475 rm -f conftest*
3476
3477 fi
3478
3479 if test $ac_cv_header_stdc = yes; then
3480   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3481   if test "$cross_compiling" = yes; then
3482   :
3483 else
3484   cat >conftest.$ac_ext <<_ACEOF
3485 /* confdefs.h.  */
3486 _ACEOF
3487 cat confdefs.h >>conftest.$ac_ext
3488 cat >>conftest.$ac_ext <<_ACEOF
3489 /* end confdefs.h.  */
3490 #include <ctype.h>
3491 #if ((' ' & 0x0FF) == 0x020)
3492 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3493 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3494 #else
3495 # define ISLOWER(c) \
3496                    (('a' <= (c) && (c) <= 'i') \
3497                      || ('j' <= (c) && (c) <= 'r') \
3498                      || ('s' <= (c) && (c) <= 'z'))
3499 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3500 #endif
3501
3502 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3503 int
3504 main ()
3505 {
3506   int i;
3507   for (i = 0; i < 256; i++)
3508     if (XOR (islower (i), ISLOWER (i))
3509         || toupper (i) != TOUPPER (i))
3510       exit(2);
3511   exit (0);
3512 }
3513 _ACEOF
3514 rm -f conftest$ac_exeext
3515 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3516   (eval $ac_link) 2>&5
3517   ac_status=$?
3518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3519   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3521   (eval $ac_try) 2>&5
3522   ac_status=$?
3523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3524   (exit $ac_status); }; }; then
3525   :
3526 else
3527   echo "$as_me: program exited with status $ac_status" >&5
3528 echo "$as_me: failed program was:" >&5
3529 sed 's/^/| /' conftest.$ac_ext >&5
3530
3531 ( exit $ac_status )
3532 ac_cv_header_stdc=no
3533 fi
3534 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3535 fi
3536 fi
3537 fi
3538 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3539 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3540 if test $ac_cv_header_stdc = yes; then
3541
3542 cat >>confdefs.h <<\_ACEOF
3543 #define STDC_HEADERS 1
3544 _ACEOF
3545
3546 fi
3547
3548 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3559                   inttypes.h stdint.h unistd.h
3560 do
3561 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3562 echo "$as_me:$LINENO: checking for $ac_header" >&5
3563 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3564 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3565   echo $ECHO_N "(cached) $ECHO_C" >&6
3566 else
3567   cat >conftest.$ac_ext <<_ACEOF
3568 /* confdefs.h.  */
3569 _ACEOF
3570 cat confdefs.h >>conftest.$ac_ext
3571 cat >>conftest.$ac_ext <<_ACEOF
3572 /* end confdefs.h.  */
3573 $ac_includes_default
3574
3575 #include <$ac_header>
3576 _ACEOF
3577 rm -f conftest.$ac_objext
3578 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3579   (eval $ac_compile) 2>conftest.er1
3580   ac_status=$?
3581   grep -v '^ *+' conftest.er1 >conftest.err
3582   rm -f conftest.er1
3583   cat conftest.err >&5
3584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3585   (exit $ac_status); } &&
3586          { ac_try='test -z "$ac_c_werror_flag"
3587                          || test ! -s conftest.err'
3588   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3589   (eval $ac_try) 2>&5
3590   ac_status=$?
3591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3592   (exit $ac_status); }; } &&
3593          { ac_try='test -s conftest.$ac_objext'
3594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3595   (eval $ac_try) 2>&5
3596   ac_status=$?
3597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3598   (exit $ac_status); }; }; then
3599   eval "$as_ac_Header=yes"
3600 else
3601   echo "$as_me: failed program was:" >&5
3602 sed 's/^/| /' conftest.$ac_ext >&5
3603
3604 eval "$as_ac_Header=no"
3605 fi
3606 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3607 fi
3608 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3609 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3610 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3611   cat >>confdefs.h <<_ACEOF
3612 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3613 _ACEOF
3614
3615 fi
3616
3617 done
3618
3619
3620
3621 for ac_header in unistd.h
3622 do
3623 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3624 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3625   echo "$as_me:$LINENO: checking for $ac_header" >&5
3626 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3627 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3628   echo $ECHO_N "(cached) $ECHO_C" >&6
3629 fi
3630 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3631 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3632 else
3633   # Is the header compilable?
3634 echo "$as_me:$LINENO: checking $ac_header usability" >&5
3635 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3636 cat >conftest.$ac_ext <<_ACEOF
3637 /* confdefs.h.  */
3638 _ACEOF
3639 cat confdefs.h >>conftest.$ac_ext
3640 cat >>conftest.$ac_ext <<_ACEOF
3641 /* end confdefs.h.  */
3642 $ac_includes_default
3643 #include <$ac_header>
3644 _ACEOF
3645 rm -f conftest.$ac_objext
3646 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3647   (eval $ac_compile) 2>conftest.er1
3648   ac_status=$?
3649   grep -v '^ *+' conftest.er1 >conftest.err
3650   rm -f conftest.er1
3651   cat conftest.err >&5
3652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3653   (exit $ac_status); } &&
3654          { ac_try='test -z "$ac_c_werror_flag"
3655                          || test ! -s conftest.err'
3656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3657   (eval $ac_try) 2>&5
3658   ac_status=$?
3659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3660   (exit $ac_status); }; } &&
3661          { ac_try='test -s conftest.$ac_objext'
3662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3663   (eval $ac_try) 2>&5
3664   ac_status=$?
3665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3666   (exit $ac_status); }; }; then
3667   ac_header_compiler=yes
3668 else
3669   echo "$as_me: failed program was:" >&5
3670 sed 's/^/| /' conftest.$ac_ext >&5
3671
3672 ac_header_compiler=no
3673 fi
3674 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3675 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3676 echo "${ECHO_T}$ac_header_compiler" >&6
3677
3678 # Is the header present?
3679 echo "$as_me:$LINENO: checking $ac_header presence" >&5
3680 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3681 cat >conftest.$ac_ext <<_ACEOF
3682 /* confdefs.h.  */
3683 _ACEOF
3684 cat confdefs.h >>conftest.$ac_ext
3685 cat >>conftest.$ac_ext <<_ACEOF
3686 /* end confdefs.h.  */
3687 #include <$ac_header>
3688 _ACEOF
3689 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3690   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3691   ac_status=$?
3692   grep -v '^ *+' conftest.er1 >conftest.err
3693   rm -f conftest.er1
3694   cat conftest.err >&5
3695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3696   (exit $ac_status); } >/dev/null; then
3697   if test -s conftest.err; then
3698     ac_cpp_err=$ac_c_preproc_warn_flag
3699     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3700   else
3701     ac_cpp_err=
3702   fi
3703 else
3704   ac_cpp_err=yes
3705 fi
3706 if test -z "$ac_cpp_err"; then
3707   ac_header_preproc=yes
3708 else
3709   echo "$as_me: failed program was:" >&5
3710 sed 's/^/| /' conftest.$ac_ext >&5
3711
3712   ac_header_preproc=no
3713 fi
3714 rm -f conftest.err conftest.$ac_ext
3715 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3716 echo "${ECHO_T}$ac_header_preproc" >&6
3717
3718 # So?  What about this header?
3719 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3720   yes:no: )
3721     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3722 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3723     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
3724 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
3725     ac_header_preproc=yes
3726     ;;
3727   no:yes:* )
3728     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3729 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3730     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
3731 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
3732     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
3733 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
3734     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
3735 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
3736     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3737 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3738     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
3739 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
3740     (
3741       cat <<\_ASBOX
3742 ## ------------------------------------------ ##
3743 ## Report this to the AC_PACKAGE_NAME lists.  ##
3744 ## ------------------------------------------ ##
3745 _ASBOX
3746     ) |
3747       sed "s/^/$as_me: WARNING:     /" >&2
3748     ;;
3749 esac
3750 echo "$as_me:$LINENO: checking for $ac_header" >&5
3751 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3752 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3753   echo $ECHO_N "(cached) $ECHO_C" >&6
3754 else
3755   eval "$as_ac_Header=\$ac_header_preproc"
3756 fi
3757 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3758 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3759
3760 fi
3761 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3762   cat >>confdefs.h <<_ACEOF
3763 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3764 _ACEOF
3765
3766 fi
3767
3768 done
3769
3770 echo "$as_me:$LINENO: checking for mode_t" >&5
3771 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3772 if test "${ac_cv_type_mode_t+set}" = set; then
3773   echo $ECHO_N "(cached) $ECHO_C" >&6
3774 else
3775   cat >conftest.$ac_ext <<_ACEOF
3776 /* confdefs.h.  */
3777 _ACEOF
3778 cat confdefs.h >>conftest.$ac_ext
3779 cat >>conftest.$ac_ext <<_ACEOF
3780 /* end confdefs.h.  */
3781 $ac_includes_default
3782 int
3783 main ()
3784 {
3785 if ((mode_t *) 0)
3786   return 0;
3787 if (sizeof (mode_t))
3788   return 0;
3789   ;
3790   return 0;
3791 }
3792 _ACEOF
3793 rm -f conftest.$ac_objext
3794 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3795   (eval $ac_compile) 2>conftest.er1
3796   ac_status=$?
3797   grep -v '^ *+' conftest.er1 >conftest.err
3798   rm -f conftest.er1
3799   cat conftest.err >&5
3800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3801   (exit $ac_status); } &&
3802          { ac_try='test -z "$ac_c_werror_flag"
3803                          || test ! -s conftest.err'
3804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3805   (eval $ac_try) 2>&5
3806   ac_status=$?
3807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3808   (exit $ac_status); }; } &&
3809          { ac_try='test -s conftest.$ac_objext'
3810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3811   (eval $ac_try) 2>&5
3812   ac_status=$?
3813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3814   (exit $ac_status); }; }; then
3815   ac_cv_type_mode_t=yes
3816 else
3817   echo "$as_me: failed program was:" >&5
3818 sed 's/^/| /' conftest.$ac_ext >&5
3819
3820 ac_cv_type_mode_t=no
3821 fi
3822 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3823 fi
3824 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
3825 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3826 if test $ac_cv_type_mode_t = yes; then
3827   :
3828 else
3829
3830 cat >>confdefs.h <<_ACEOF
3831 #define mode_t int
3832 _ACEOF
3833
3834 fi
3835
3836 echo "$as_me:$LINENO: checking for pid_t" >&5
3837 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
3838 if test "${ac_cv_type_pid_t+set}" = set; then
3839   echo $ECHO_N "(cached) $ECHO_C" >&6
3840 else
3841   cat >conftest.$ac_ext <<_ACEOF
3842 /* confdefs.h.  */
3843 _ACEOF
3844 cat confdefs.h >>conftest.$ac_ext
3845 cat >>conftest.$ac_ext <<_ACEOF
3846 /* end confdefs.h.  */
3847 $ac_includes_default
3848 int
3849 main ()
3850 {
3851 if ((pid_t *) 0)
3852   return 0;
3853 if (sizeof (pid_t))
3854   return 0;
3855   ;
3856   return 0;
3857 }
3858 _ACEOF
3859 rm -f conftest.$ac_objext
3860 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3861   (eval $ac_compile) 2>conftest.er1
3862   ac_status=$?
3863   grep -v '^ *+' conftest.er1 >conftest.err
3864   rm -f conftest.er1
3865   cat conftest.err >&5
3866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3867   (exit $ac_status); } &&
3868          { ac_try='test -z "$ac_c_werror_flag"
3869                          || test ! -s conftest.err'
3870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3871   (eval $ac_try) 2>&5
3872   ac_status=$?
3873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3874   (exit $ac_status); }; } &&
3875          { ac_try='test -s conftest.$ac_objext'
3876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3877   (eval $ac_try) 2>&5
3878   ac_status=$?
3879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3880   (exit $ac_status); }; }; then
3881   ac_cv_type_pid_t=yes
3882 else
3883   echo "$as_me: failed program was:" >&5
3884 sed 's/^/| /' conftest.$ac_ext >&5
3885
3886 ac_cv_type_pid_t=no
3887 fi
3888 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3889 fi
3890 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
3891 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3892 if test $ac_cv_type_pid_t = yes; then
3893   :
3894 else
3895
3896 cat >>confdefs.h <<_ACEOF
3897 #define pid_t int
3898 _ACEOF
3899
3900 fi
3901
3902 echo "$as_me:$LINENO: checking for size_t" >&5
3903 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
3904 if test "${ac_cv_type_size_t+set}" = set; then
3905   echo $ECHO_N "(cached) $ECHO_C" >&6
3906 else
3907   cat >conftest.$ac_ext <<_ACEOF
3908 /* confdefs.h.  */
3909 _ACEOF
3910 cat confdefs.h >>conftest.$ac_ext
3911 cat >>conftest.$ac_ext <<_ACEOF
3912 /* end confdefs.h.  */
3913 $ac_includes_default
3914 int
3915 main ()
3916 {
3917 if ((size_t *) 0)
3918   return 0;
3919 if (sizeof (size_t))
3920   return 0;
3921   ;
3922   return 0;
3923 }
3924 _ACEOF
3925 rm -f conftest.$ac_objext
3926 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3927   (eval $ac_compile) 2>conftest.er1
3928   ac_status=$?
3929   grep -v '^ *+' conftest.er1 >conftest.err
3930   rm -f conftest.er1
3931   cat conftest.err >&5
3932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3933   (exit $ac_status); } &&
3934          { ac_try='test -z "$ac_c_werror_flag"
3935                          || test ! -s conftest.err'
3936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3937   (eval $ac_try) 2>&5
3938   ac_status=$?
3939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3940   (exit $ac_status); }; } &&
3941          { ac_try='test -s conftest.$ac_objext'
3942   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3943   (eval $ac_try) 2>&5
3944   ac_status=$?
3945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946   (exit $ac_status); }; }; then
3947   ac_cv_type_size_t=yes
3948 else
3949   echo "$as_me: failed program was:" >&5
3950 sed 's/^/| /' conftest.$ac_ext >&5
3951
3952 ac_cv_type_size_t=no
3953 fi
3954 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3955 fi
3956 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
3957 echo "${ECHO_T}$ac_cv_type_size_t" >&6
3958 if test $ac_cv_type_size_t = yes; then
3959   :
3960 else
3961
3962 cat >>confdefs.h <<_ACEOF
3963 #define size_t unsigned
3964 _ACEOF
3965
3966 fi
3967
3968 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
3969 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
3970 if test "${ac_cv_type_signal+set}" = set; then
3971   echo $ECHO_N "(cached) $ECHO_C" >&6
3972 else
3973   cat >conftest.$ac_ext <<_ACEOF
3974 /* confdefs.h.  */
3975 _ACEOF
3976 cat confdefs.h >>conftest.$ac_ext
3977 cat >>conftest.$ac_ext <<_ACEOF
3978 /* end confdefs.h.  */
3979 #include <sys/types.h>
3980 #include <signal.h>
3981 #ifdef signal
3982 # undef signal
3983 #endif
3984 #ifdef __cplusplus
3985 extern "C" void (*signal (int, void (*)(int)))(int);
3986 #else
3987 void (*signal ()) ();
3988 #endif
3989
3990 int
3991 main ()
3992 {
3993 int i;
3994   ;
3995   return 0;
3996 }
3997 _ACEOF
3998 rm -f conftest.$ac_objext
3999 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4000   (eval $ac_compile) 2>conftest.er1
4001   ac_status=$?
4002   grep -v '^ *+' conftest.er1 >conftest.err
4003   rm -f conftest.er1
4004   cat conftest.err >&5
4005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4006   (exit $ac_status); } &&
4007          { ac_try='test -z "$ac_c_werror_flag"
4008                          || test ! -s conftest.err'
4009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4010   (eval $ac_try) 2>&5
4011   ac_status=$?
4012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4013   (exit $ac_status); }; } &&
4014          { ac_try='test -s conftest.$ac_objext'
4015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4016   (eval $ac_try) 2>&5
4017   ac_status=$?
4018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4019   (exit $ac_status); }; }; then
4020   ac_cv_type_signal=void
4021 else
4022   echo "$as_me: failed program was:" >&5
4023 sed 's/^/| /' conftest.$ac_ext >&5
4024
4025 ac_cv_type_signal=int
4026 fi
4027 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4028 fi
4029 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4030 echo "${ECHO_T}$ac_cv_type_signal" >&6
4031
4032 cat >>confdefs.h <<_ACEOF
4033 #define RETSIGTYPE $ac_cv_type_signal
4034 _ACEOF
4035
4036
4037 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
4038 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4039 if test "${ac_cv_header_time+set}" = set; then
4040   echo $ECHO_N "(cached) $ECHO_C" >&6
4041 else
4042   cat >conftest.$ac_ext <<_ACEOF
4043 /* confdefs.h.  */
4044 _ACEOF
4045 cat confdefs.h >>conftest.$ac_ext
4046 cat >>conftest.$ac_ext <<_ACEOF
4047 /* end confdefs.h.  */
4048 #include <sys/types.h>
4049 #include <sys/time.h>
4050 #include <time.h>
4051
4052 int
4053 main ()
4054 {
4055 if ((struct tm *) 0)
4056 return 0;
4057   ;
4058   return 0;
4059 }
4060 _ACEOF
4061 rm -f conftest.$ac_objext
4062 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4063   (eval $ac_compile) 2>conftest.er1
4064   ac_status=$?
4065   grep -v '^ *+' conftest.er1 >conftest.err
4066   rm -f conftest.er1
4067   cat conftest.err >&5
4068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4069   (exit $ac_status); } &&
4070          { ac_try='test -z "$ac_c_werror_flag"
4071                          || test ! -s conftest.err'
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); }; } &&
4077          { ac_try='test -s conftest.$ac_objext'
4078   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4079   (eval $ac_try) 2>&5
4080   ac_status=$?
4081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4082   (exit $ac_status); }; }; then
4083   ac_cv_header_time=yes
4084 else
4085   echo "$as_me: failed program was:" >&5
4086 sed 's/^/| /' conftest.$ac_ext >&5
4087
4088 ac_cv_header_time=no
4089 fi
4090 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4091 fi
4092 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
4093 echo "${ECHO_T}$ac_cv_header_time" >&6
4094 if test $ac_cv_header_time = yes; then
4095
4096 cat >>confdefs.h <<\_ACEOF
4097 #define TIME_WITH_SYS_TIME 1
4098 _ACEOF
4099
4100 fi
4101
4102 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
4103 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
4104 if test "${ac_cv_header_sys_wait_h+set}" = set; then
4105   echo $ECHO_N "(cached) $ECHO_C" >&6
4106 else
4107   cat >conftest.$ac_ext <<_ACEOF
4108 /* confdefs.h.  */
4109 _ACEOF
4110 cat confdefs.h >>conftest.$ac_ext
4111 cat >>conftest.$ac_ext <<_ACEOF
4112 /* end confdefs.h.  */
4113 #include <sys/types.h>
4114 #include <sys/wait.h>
4115 #ifndef WEXITSTATUS
4116 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4117 #endif
4118 #ifndef WIFEXITED
4119 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4120 #endif
4121
4122 int
4123 main ()
4124 {
4125   int s;
4126   wait (&s);
4127   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4128   ;
4129   return 0;
4130 }
4131 _ACEOF
4132 rm -f conftest.$ac_objext
4133 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4134   (eval $ac_compile) 2>conftest.er1
4135   ac_status=$?
4136   grep -v '^ *+' conftest.er1 >conftest.err
4137   rm -f conftest.er1
4138   cat conftest.err >&5
4139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4140   (exit $ac_status); } &&
4141          { ac_try='test -z "$ac_c_werror_flag"
4142                          || test ! -s conftest.err'
4143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4144   (eval $ac_try) 2>&5
4145   ac_status=$?
4146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4147   (exit $ac_status); }; } &&
4148          { ac_try='test -s conftest.$ac_objext'
4149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4150   (eval $ac_try) 2>&5
4151   ac_status=$?
4152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4153   (exit $ac_status); }; }; then
4154   ac_cv_header_sys_wait_h=yes
4155 else
4156   echo "$as_me: failed program was:" >&5
4157 sed 's/^/| /' conftest.$ac_ext >&5
4158
4159 ac_cv_header_sys_wait_h=no
4160 fi
4161 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4162 fi
4163 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
4164 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
4165 if test $ac_cv_header_sys_wait_h = yes; then
4166
4167 cat >>confdefs.h <<\_ACEOF
4168 #define HAVE_SYS_WAIT_H 1
4169 _ACEOF
4170
4171 fi
4172
4173
4174
4175
4176
4177
4178 ac_header_dirent=no
4179 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4180   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4181 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4182 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4183 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4184   echo $ECHO_N "(cached) $ECHO_C" >&6
4185 else
4186   cat >conftest.$ac_ext <<_ACEOF
4187 /* confdefs.h.  */
4188 _ACEOF
4189 cat confdefs.h >>conftest.$ac_ext
4190 cat >>conftest.$ac_ext <<_ACEOF
4191 /* end confdefs.h.  */
4192 #include <sys/types.h>
4193 #include <$ac_hdr>
4194
4195 int
4196 main ()
4197 {
4198 if ((DIR *) 0)
4199 return 0;
4200   ;
4201   return 0;
4202 }
4203 _ACEOF
4204 rm -f conftest.$ac_objext
4205 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4206   (eval $ac_compile) 2>conftest.er1
4207   ac_status=$?
4208   grep -v '^ *+' conftest.er1 >conftest.err
4209   rm -f conftest.er1
4210   cat conftest.err >&5
4211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4212   (exit $ac_status); } &&
4213          { ac_try='test -z "$ac_c_werror_flag"
4214                          || test ! -s conftest.err'
4215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4216   (eval $ac_try) 2>&5
4217   ac_status=$?
4218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4219   (exit $ac_status); }; } &&
4220          { ac_try='test -s conftest.$ac_objext'
4221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4222   (eval $ac_try) 2>&5
4223   ac_status=$?
4224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4225   (exit $ac_status); }; }; then
4226   eval "$as_ac_Header=yes"
4227 else
4228   echo "$as_me: failed program was:" >&5
4229 sed 's/^/| /' conftest.$ac_ext >&5
4230
4231 eval "$as_ac_Header=no"
4232 fi
4233 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4234 fi
4235 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4236 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4237 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4238   cat >>confdefs.h <<_ACEOF
4239 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4240 _ACEOF
4241
4242 ac_header_dirent=$ac_hdr; break
4243 fi
4244
4245 done
4246 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4247 if test $ac_header_dirent = dirent.h; then
4248   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4249 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4250 if test "${ac_cv_search_opendir+set}" = set; then
4251   echo $ECHO_N "(cached) $ECHO_C" >&6
4252 else
4253   ac_func_search_save_LIBS=$LIBS
4254 ac_cv_search_opendir=no
4255 cat >conftest.$ac_ext <<_ACEOF
4256 /* confdefs.h.  */
4257 _ACEOF
4258 cat confdefs.h >>conftest.$ac_ext
4259 cat >>conftest.$ac_ext <<_ACEOF
4260 /* end confdefs.h.  */
4261
4262 /* Override any gcc2 internal prototype to avoid an error.  */
4263 #ifdef __cplusplus
4264 extern "C"
4265 #endif
4266 /* We use char because int might match the return type of a gcc2
4267    builtin and then its argument prototype would still apply.  */
4268 char opendir ();
4269 int
4270 main ()
4271 {
4272 opendir ();
4273   ;
4274   return 0;
4275 }
4276 _ACEOF
4277 rm -f conftest.$ac_objext conftest$ac_exeext
4278 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4279   (eval $ac_link) 2>conftest.er1
4280   ac_status=$?
4281   grep -v '^ *+' conftest.er1 >conftest.err
4282   rm -f conftest.er1
4283   cat conftest.err >&5
4284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4285   (exit $ac_status); } &&
4286          { ac_try='test -z "$ac_c_werror_flag"
4287                          || test ! -s conftest.err'
4288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4289   (eval $ac_try) 2>&5
4290   ac_status=$?
4291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4292   (exit $ac_status); }; } &&
4293          { ac_try='test -s conftest$ac_exeext'
4294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4295   (eval $ac_try) 2>&5
4296   ac_status=$?
4297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4298   (exit $ac_status); }; }; then
4299   ac_cv_search_opendir="none required"
4300 else
4301   echo "$as_me: failed program was:" >&5
4302 sed 's/^/| /' conftest.$ac_ext >&5
4303
4304 fi
4305 rm -f conftest.err conftest.$ac_objext \
4306       conftest$ac_exeext conftest.$ac_ext
4307 if test "$ac_cv_search_opendir" = no; then
4308   for ac_lib in dir; do
4309     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4310     cat >conftest.$ac_ext <<_ACEOF
4311 /* confdefs.h.  */
4312 _ACEOF
4313 cat confdefs.h >>conftest.$ac_ext
4314 cat >>conftest.$ac_ext <<_ACEOF
4315 /* end confdefs.h.  */
4316
4317 /* Override any gcc2 internal prototype to avoid an error.  */
4318 #ifdef __cplusplus
4319 extern "C"
4320 #endif
4321 /* We use char because int might match the return type of a gcc2
4322    builtin and then its argument prototype would still apply.  */
4323 char opendir ();
4324 int
4325 main ()
4326 {
4327 opendir ();
4328   ;
4329   return 0;
4330 }
4331 _ACEOF
4332 rm -f conftest.$ac_objext conftest$ac_exeext
4333 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4334   (eval $ac_link) 2>conftest.er1
4335   ac_status=$?
4336   grep -v '^ *+' conftest.er1 >conftest.err
4337   rm -f conftest.er1
4338   cat conftest.err >&5
4339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4340   (exit $ac_status); } &&
4341          { ac_try='test -z "$ac_c_werror_flag"
4342                          || test ! -s conftest.err'
4343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4344   (eval $ac_try) 2>&5
4345   ac_status=$?
4346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4347   (exit $ac_status); }; } &&
4348          { ac_try='test -s conftest$ac_exeext'
4349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4350   (eval $ac_try) 2>&5
4351   ac_status=$?
4352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4353   (exit $ac_status); }; }; then
4354   ac_cv_search_opendir="-l$ac_lib"
4355 break
4356 else
4357   echo "$as_me: failed program was:" >&5
4358 sed 's/^/| /' conftest.$ac_ext >&5
4359
4360 fi
4361 rm -f conftest.err conftest.$ac_objext \
4362       conftest$ac_exeext conftest.$ac_ext
4363   done
4364 fi
4365 LIBS=$ac_func_search_save_LIBS
4366 fi
4367 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4368 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4369 if test "$ac_cv_search_opendir" != no; then
4370   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4371
4372 fi
4373
4374 else
4375   echo "$as_me:$LINENO: checking for library containing opendir" >&5
4376 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4377 if test "${ac_cv_search_opendir+set}" = set; then
4378   echo $ECHO_N "(cached) $ECHO_C" >&6
4379 else
4380   ac_func_search_save_LIBS=$LIBS
4381 ac_cv_search_opendir=no
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
4389 /* Override any gcc2 internal prototype to avoid an error.  */
4390 #ifdef __cplusplus
4391 extern "C"
4392 #endif
4393 /* We use char because int might match the return type of a gcc2
4394    builtin and then its argument prototype would still apply.  */
4395 char opendir ();
4396 int
4397 main ()
4398 {
4399 opendir ();
4400   ;
4401   return 0;
4402 }
4403 _ACEOF
4404 rm -f conftest.$ac_objext conftest$ac_exeext
4405 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4406   (eval $ac_link) 2>conftest.er1
4407   ac_status=$?
4408   grep -v '^ *+' conftest.er1 >conftest.err
4409   rm -f conftest.er1
4410   cat conftest.err >&5
4411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4412   (exit $ac_status); } &&
4413          { ac_try='test -z "$ac_c_werror_flag"
4414                          || test ! -s conftest.err'
4415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4416   (eval $ac_try) 2>&5
4417   ac_status=$?
4418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4419   (exit $ac_status); }; } &&
4420          { ac_try='test -s conftest$ac_exeext'
4421   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4422   (eval $ac_try) 2>&5
4423   ac_status=$?
4424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4425   (exit $ac_status); }; }; then
4426   ac_cv_search_opendir="none required"
4427 else
4428   echo "$as_me: failed program was:" >&5
4429 sed 's/^/| /' conftest.$ac_ext >&5
4430
4431 fi
4432 rm -f conftest.err conftest.$ac_objext \
4433       conftest$ac_exeext conftest.$ac_ext
4434 if test "$ac_cv_search_opendir" = no; then
4435   for ac_lib in x; do
4436     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4437     cat >conftest.$ac_ext <<_ACEOF
4438 /* confdefs.h.  */
4439 _ACEOF
4440 cat confdefs.h >>conftest.$ac_ext
4441 cat >>conftest.$ac_ext <<_ACEOF
4442 /* end confdefs.h.  */
4443
4444 /* Override any gcc2 internal prototype to avoid an error.  */
4445 #ifdef __cplusplus
4446 extern "C"
4447 #endif
4448 /* We use char because int might match the return type of a gcc2
4449    builtin and then its argument prototype would still apply.  */
4450 char opendir ();
4451 int
4452 main ()
4453 {
4454 opendir ();
4455   ;
4456   return 0;
4457 }
4458 _ACEOF
4459 rm -f conftest.$ac_objext conftest$ac_exeext
4460 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4461   (eval $ac_link) 2>conftest.er1
4462   ac_status=$?
4463   grep -v '^ *+' conftest.er1 >conftest.err
4464   rm -f conftest.er1
4465   cat conftest.err >&5
4466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4467   (exit $ac_status); } &&
4468          { ac_try='test -z "$ac_c_werror_flag"
4469                          || test ! -s conftest.err'
4470   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4471   (eval $ac_try) 2>&5
4472   ac_status=$?
4473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4474   (exit $ac_status); }; } &&
4475          { ac_try='test -s conftest$ac_exeext'
4476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4477   (eval $ac_try) 2>&5
4478   ac_status=$?
4479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4480   (exit $ac_status); }; }; then
4481   ac_cv_search_opendir="-l$ac_lib"
4482 break
4483 else
4484   echo "$as_me: failed program was:" >&5
4485 sed 's/^/| /' conftest.$ac_ext >&5
4486
4487 fi
4488 rm -f conftest.err conftest.$ac_objext \
4489       conftest$ac_exeext conftest.$ac_ext
4490   done
4491 fi
4492 LIBS=$ac_func_search_save_LIBS
4493 fi
4494 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4495 echo "${ECHO_T}$ac_cv_search_opendir" >&6
4496 if test "$ac_cv_search_opendir" != no; then
4497   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4498
4499 fi
4500
4501 fi
4502
4503 echo "$as_me:$LINENO: checking how to call gettimeofday" >&5
4504 echo $ECHO_N "checking how to call gettimeofday... $ECHO_C" >&6
4505   if test "${ac_cv_gettimeofday_args+set}" = set; then
4506   echo $ECHO_N "(cached) $ECHO_C" >&6
4507 else
4508   cat >conftest.$ac_ext <<_ACEOF
4509 /* confdefs.h.  */
4510 _ACEOF
4511 cat confdefs.h >>conftest.$ac_ext
4512 cat >>conftest.$ac_ext <<_ACEOF
4513 /* end confdefs.h.  */
4514 #include <stdlib.h>
4515                     #include <sys/time.h>
4516 int
4517 main ()
4518 {
4519 struct timeval tv; struct timezone tzp;
4520                     gettimeofday(&tv, &tzp);
4521   ;
4522   return 0;
4523 }
4524 _ACEOF
4525 rm -f conftest.$ac_objext
4526 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4527   (eval $ac_compile) 2>conftest.er1
4528   ac_status=$?
4529   grep -v '^ *+' conftest.er1 >conftest.err
4530   rm -f conftest.er1
4531   cat conftest.err >&5
4532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4533   (exit $ac_status); } &&
4534          { ac_try='test -z "$ac_c_werror_flag"
4535                          || test ! -s conftest.err'
4536   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4537   (eval $ac_try) 2>&5
4538   ac_status=$?
4539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4540   (exit $ac_status); }; } &&
4541          { ac_try='test -s conftest.$ac_objext'
4542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4543   (eval $ac_try) 2>&5
4544   ac_status=$?
4545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4546   (exit $ac_status); }; }; then
4547   ac_gettimeofday_args=2
4548 else
4549   echo "$as_me: failed program was:" >&5
4550 sed 's/^/| /' conftest.$ac_ext >&5
4551
4552 cat >conftest.$ac_ext <<_ACEOF
4553 /* confdefs.h.  */
4554 _ACEOF
4555 cat confdefs.h >>conftest.$ac_ext
4556 cat >>conftest.$ac_ext <<_ACEOF
4557 /* end confdefs.h.  */
4558 #include <stdlib.h>
4559                                     #include <sys/time.h>
4560 int
4561 main ()
4562 {
4563 struct timeval tv; gettimeofday(&tv);
4564   ;
4565   return 0;
4566 }
4567 _ACEOF
4568 rm -f conftest.$ac_objext
4569 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4570   (eval $ac_compile) 2>conftest.er1
4571   ac_status=$?
4572   grep -v '^ *+' conftest.er1 >conftest.err
4573   rm -f conftest.er1
4574   cat conftest.err >&5
4575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4576   (exit $ac_status); } &&
4577          { ac_try='test -z "$ac_c_werror_flag"
4578                          || test ! -s conftest.err'
4579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4580   (eval $ac_try) 2>&5
4581   ac_status=$?
4582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4583   (exit $ac_status); }; } &&
4584          { ac_try='test -s conftest.$ac_objext'
4585   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4586   (eval $ac_try) 2>&5
4587   ac_status=$?
4588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4589   (exit $ac_status); }; }; then
4590   ac_gettimeofday_args=1
4591 else
4592   echo "$as_me: failed program was:" >&5
4593 sed 's/^/| /' conftest.$ac_ext >&5
4594
4595 ac_gettimeofday_args=0
4596 fi
4597 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4598 fi
4599 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4600     ac_cv_gettimeofday_args=$ac_gettimeofday_args
4601 fi
4602
4603   ac_gettimeofday_args=$ac_cv_gettimeofday_args
4604   if test "$ac_gettimeofday_args" = 1 ; then
4605     cat >>confdefs.h <<\_ACEOF
4606 #define HAVE_GETTIMEOFDAY 1
4607 _ACEOF
4608
4609     echo "$as_me:$LINENO: result: one argument" >&5
4610 echo "${ECHO_T}one argument" >&6
4611   elif test "$ac_gettimeofday_args" = 2 ; then
4612     cat >>confdefs.h <<\_ACEOF
4613 #define HAVE_GETTIMEOFDAY 1
4614 _ACEOF
4615
4616     cat >>confdefs.h <<\_ACEOF
4617 #define GETTIMEOFDAY_TWO_ARGS 1
4618 _ACEOF
4619
4620     echo "$as_me:$LINENO: result: two arguments" >&5
4621 echo "${ECHO_T}two arguments" >&6
4622   else
4623     echo "$as_me:$LINENO: result: unknown" >&5
4624 echo "${ECHO_T}unknown" >&6
4625   fi
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636 for ac_func in select fcntl uname nice setpriority getcwd getwd putenv sbrk
4637 do
4638 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4639 echo "$as_me:$LINENO: checking for $ac_func" >&5
4640 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4641 if eval "test \"\${$as_ac_var+set}\" = set"; then
4642   echo $ECHO_N "(cached) $ECHO_C" >&6
4643 else
4644   cat >conftest.$ac_ext <<_ACEOF
4645 /* confdefs.h.  */
4646 _ACEOF
4647 cat confdefs.h >>conftest.$ac_ext
4648 cat >>conftest.$ac_ext <<_ACEOF
4649 /* end confdefs.h.  */
4650 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4651    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4652 #define $ac_func innocuous_$ac_func
4653
4654 /* System header to define __stub macros and hopefully few prototypes,
4655     which can conflict with char $ac_func (); below.
4656     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4657     <limits.h> exists even on freestanding compilers.  */
4658
4659 #ifdef __STDC__
4660 # include <limits.h>
4661 #else
4662 # include <assert.h>
4663 #endif
4664
4665 #undef $ac_func
4666
4667 /* Override any gcc2 internal prototype to avoid an error.  */
4668 #ifdef __cplusplus
4669 extern "C"
4670 {
4671 #endif
4672 /* We use char because int might match the return type of a gcc2
4673    builtin and then its argument prototype would still apply.  */
4674 char $ac_func ();
4675 /* The GNU C library defines this for functions which it implements
4676     to always fail with ENOSYS.  Some functions are actually named
4677     something starting with __ and the normal name is an alias.  */
4678 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4679 choke me
4680 #else
4681 char (*f) () = $ac_func;
4682 #endif
4683 #ifdef __cplusplus
4684 }
4685 #endif
4686
4687 int
4688 main ()
4689 {
4690 return f != $ac_func;
4691   ;
4692   return 0;
4693 }
4694 _ACEOF
4695 rm -f conftest.$ac_objext conftest$ac_exeext
4696 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4697   (eval $ac_link) 2>conftest.er1
4698   ac_status=$?
4699   grep -v '^ *+' conftest.er1 >conftest.err
4700   rm -f conftest.er1
4701   cat conftest.err >&5
4702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4703   (exit $ac_status); } &&
4704          { ac_try='test -z "$ac_c_werror_flag"
4705                          || test ! -s conftest.err'
4706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4707   (eval $ac_try) 2>&5
4708   ac_status=$?
4709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4710   (exit $ac_status); }; } &&
4711          { ac_try='test -s conftest$ac_exeext'
4712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4713   (eval $ac_try) 2>&5
4714   ac_status=$?
4715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4716   (exit $ac_status); }; }; then
4717   eval "$as_ac_var=yes"
4718 else
4719   echo "$as_me: failed program was:" >&5
4720 sed 's/^/| /' conftest.$ac_ext >&5
4721
4722 eval "$as_ac_var=no"
4723 fi
4724 rm -f conftest.err conftest.$ac_objext \
4725       conftest$ac_exeext conftest.$ac_ext
4726 fi
4727 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4728 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4729 if test `eval echo '${'$as_ac_var'}'` = yes; then
4730   cat >>confdefs.h <<_ACEOF
4731 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4732 _ACEOF
4733
4734 fi
4735 done
4736
4737
4738
4739
4740
4741 for ac_func in sigaction syslog realpath setrlimit
4742 do
4743 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4744 echo "$as_me:$LINENO: checking for $ac_func" >&5
4745 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4746 if eval "test \"\${$as_ac_var+set}\" = set"; then
4747   echo $ECHO_N "(cached) $ECHO_C" >&6
4748 else
4749   cat >conftest.$ac_ext <<_ACEOF
4750 /* confdefs.h.  */
4751 _ACEOF
4752 cat confdefs.h >>conftest.$ac_ext
4753 cat >>conftest.$ac_ext <<_ACEOF
4754 /* end confdefs.h.  */
4755 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4756    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4757 #define $ac_func innocuous_$ac_func
4758
4759 /* System header to define __stub macros and hopefully few prototypes,
4760     which can conflict with char $ac_func (); below.
4761     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4762     <limits.h> exists even on freestanding compilers.  */
4763
4764 #ifdef __STDC__
4765 # include <limits.h>
4766 #else
4767 # include <assert.h>
4768 #endif
4769
4770 #undef $ac_func
4771
4772 /* Override any gcc2 internal prototype to avoid an error.  */
4773 #ifdef __cplusplus
4774 extern "C"
4775 {
4776 #endif
4777 /* We use char because int might match the return type of a gcc2
4778    builtin and then its argument prototype would still apply.  */
4779 char $ac_func ();
4780 /* The GNU C library defines this for functions which it implements
4781     to always fail with ENOSYS.  Some functions are actually named
4782     something starting with __ and the normal name is an alias.  */
4783 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4784 choke me
4785 #else
4786 char (*f) () = $ac_func;
4787 #endif
4788 #ifdef __cplusplus
4789 }
4790 #endif
4791
4792 int
4793 main ()
4794 {
4795 return f != $ac_func;
4796   ;
4797   return 0;
4798 }
4799 _ACEOF
4800 rm -f conftest.$ac_objext conftest$ac_exeext
4801 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4802   (eval $ac_link) 2>conftest.er1
4803   ac_status=$?
4804   grep -v '^ *+' conftest.er1 >conftest.err
4805   rm -f conftest.er1
4806   cat conftest.err >&5
4807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4808   (exit $ac_status); } &&
4809          { ac_try='test -z "$ac_c_werror_flag"
4810                          || test ! -s conftest.err'
4811   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4812   (eval $ac_try) 2>&5
4813   ac_status=$?
4814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815   (exit $ac_status); }; } &&
4816          { ac_try='test -s conftest$ac_exeext'
4817   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4818   (eval $ac_try) 2>&5
4819   ac_status=$?
4820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4821   (exit $ac_status); }; }; then
4822   eval "$as_ac_var=yes"
4823 else
4824   echo "$as_me: failed program was:" >&5
4825 sed 's/^/| /' conftest.$ac_ext >&5
4826
4827 eval "$as_ac_var=no"
4828 fi
4829 rm -f conftest.err conftest.$ac_objext \
4830       conftest$ac_exeext conftest.$ac_ext
4831 fi
4832 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4833 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4834 if test `eval echo '${'$as_ac_var'}'` = yes; then
4835   cat >>confdefs.h <<_ACEOF
4836 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4837 _ACEOF
4838
4839 fi
4840 done
4841
4842 echo "$as_me:$LINENO: checking for struct icmp" >&5
4843 echo $ECHO_N "checking for struct icmp... $ECHO_C" >&6
4844 if test "${ac_cv_have_icmp+set}" = set; then
4845   echo $ECHO_N "(cached) $ECHO_C" >&6
4846 else
4847   cat >conftest.$ac_ext <<_ACEOF
4848 /* confdefs.h.  */
4849 _ACEOF
4850 cat confdefs.h >>conftest.$ac_ext
4851 cat >>conftest.$ac_ext <<_ACEOF
4852 /* end confdefs.h.  */
4853 #include <stdlib.h>
4854                    #include <stdio.h>
4855                    #include <math.h>
4856                    #include <unistd.h>
4857                    #include <limits.h>
4858                    #include <signal.h>
4859                    #include <fcntl.h>
4860                    #include <sys/types.h>
4861                    #include <sys/time.h>
4862                    #include <sys/ipc.h>
4863                    #include <sys/shm.h>
4864                    #include <sys/socket.h>
4865                    #include <netinet/in_systm.h>
4866                    #include <netinet/in.h>
4867                    #include <netinet/ip.h>
4868                    #include <netinet/ip_icmp.h>
4869                    #include <netinet/udp.h>
4870                    #include <arpa/inet.h>
4871                    #include <netdb.h>
4872 int
4873 main ()
4874 {
4875 struct icmp i;
4876                    struct sockaddr s;
4877                    struct sockaddr_in si;
4878                    struct ip ip;
4879                    i.icmp_type = ICMP_ECHO;
4880                    i.icmp_code = 0;
4881                    i.icmp_cksum = 0;
4882                    i.icmp_id = 0;
4883                    i.icmp_seq = 0;
4884                    si.sin_family = AF_INET;
4885                    #if defined(__DECC) || defined(_IP_VHL)
4886                    ip.ip_vhl = 0;
4887                    #else
4888                    ip.ip_hl = 0;
4889                    #endif
4890
4891   ;
4892   return 0;
4893 }
4894 _ACEOF
4895 rm -f conftest.$ac_objext
4896 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4897   (eval $ac_compile) 2>conftest.er1
4898   ac_status=$?
4899   grep -v '^ *+' conftest.er1 >conftest.err
4900   rm -f conftest.er1
4901   cat conftest.err >&5
4902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4903   (exit $ac_status); } &&
4904          { ac_try='test -z "$ac_c_werror_flag"
4905                          || test ! -s conftest.err'
4906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4907   (eval $ac_try) 2>&5
4908   ac_status=$?
4909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4910   (exit $ac_status); }; } &&
4911          { ac_try='test -s conftest.$ac_objext'
4912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4913   (eval $ac_try) 2>&5
4914   ac_status=$?
4915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4916   (exit $ac_status); }; }; then
4917   ac_cv_have_icmp=yes
4918 else
4919   echo "$as_me: failed program was:" >&5
4920 sed 's/^/| /' conftest.$ac_ext >&5
4921
4922 ac_cv_have_icmp=no
4923 fi
4924 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4925 fi
4926 echo "$as_me:$LINENO: result: $ac_cv_have_icmp" >&5
4927 echo "${ECHO_T}$ac_cv_have_icmp" >&6
4928  if test "$ac_cv_have_icmp" = yes ; then
4929    cat >>confdefs.h <<\_ACEOF
4930 #define HAVE_ICMP 1
4931 _ACEOF
4932
4933  fi
4934 echo "$as_me:$LINENO: checking for struct icmphdr" >&5
4935 echo $ECHO_N "checking for struct icmphdr... $ECHO_C" >&6
4936 if test "${ac_cv_have_icmphdr+set}" = set; then
4937   echo $ECHO_N "(cached) $ECHO_C" >&6
4938 else
4939   cat >conftest.$ac_ext <<_ACEOF
4940 /* confdefs.h.  */
4941 _ACEOF
4942 cat confdefs.h >>conftest.$ac_ext
4943 cat >>conftest.$ac_ext <<_ACEOF
4944 /* end confdefs.h.  */
4945 #include <stdlib.h>
4946                    #include <stdio.h>
4947                    #include <math.h>
4948                    #include <unistd.h>
4949                    #include <limits.h>
4950                    #include <signal.h>
4951                    #include <fcntl.h>
4952                    #include <sys/types.h>
4953                    #include <sys/time.h>
4954                    #include <sys/ipc.h>
4955                    #include <sys/shm.h>
4956                    #include <sys/socket.h>
4957                    #include <netinet/in_systm.h>
4958                    #include <netinet/in.h>
4959                    #include <netinet/ip.h>
4960                    #include <netinet/ip_icmp.h>
4961                    #include <netinet/udp.h>
4962                    #include <arpa/inet.h>
4963                    #include <netdb.h>
4964 int
4965 main ()
4966 {
4967 struct icmphdr i;
4968                    struct sockaddr s;
4969                    struct sockaddr_in si;
4970                    struct ip ip;
4971                    i.type = ICMP_ECHO;
4972                    i.code = 0;
4973                    i.checksum = 0;
4974                    i.un.echo.id = 0;
4975                    i.un.echo.sequence = 0;
4976                    si.sin_family = AF_INET;
4977                    ip.ip_hl = 0;
4978   ;
4979   return 0;
4980 }
4981 _ACEOF
4982 rm -f conftest.$ac_objext
4983 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4984   (eval $ac_compile) 2>conftest.er1
4985   ac_status=$?
4986   grep -v '^ *+' conftest.er1 >conftest.err
4987   rm -f conftest.er1
4988   cat conftest.err >&5
4989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4990   (exit $ac_status); } &&
4991          { ac_try='test -z "$ac_c_werror_flag"
4992                          || test ! -s conftest.err'
4993   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4994   (eval $ac_try) 2>&5
4995   ac_status=$?
4996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4997   (exit $ac_status); }; } &&
4998          { ac_try='test -s conftest.$ac_objext'
4999   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5000   (eval $ac_try) 2>&5
5001   ac_status=$?
5002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5003   (exit $ac_status); }; }; then
5004   ac_cv_have_icmphdr=yes
5005 else
5006   echo "$as_me: failed program was:" >&5
5007 sed 's/^/| /' conftest.$ac_ext >&5
5008
5009 ac_cv_have_icmphdr=no
5010 fi
5011 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5012 fi
5013 echo "$as_me:$LINENO: result: $ac_cv_have_icmphdr" >&5
5014 echo "${ECHO_T}$ac_cv_have_icmphdr" >&6
5015  if test "$ac_cv_have_icmphdr" = yes ; then
5016    cat >>confdefs.h <<\_ACEOF
5017 #define HAVE_ICMPHDR 1
5018 _ACEOF
5019
5020  fi
5021
5022
5023 for ac_header in crypt.h sys/select.h
5024 do
5025 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5026 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5027   echo "$as_me:$LINENO: checking for $ac_header" >&5
5028 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5029 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5030   echo $ECHO_N "(cached) $ECHO_C" >&6
5031 fi
5032 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5033 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5034 else
5035   # Is the header compilable?
5036 echo "$as_me:$LINENO: checking $ac_header usability" >&5
5037 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5038 cat >conftest.$ac_ext <<_ACEOF
5039 /* confdefs.h.  */
5040 _ACEOF
5041 cat confdefs.h >>conftest.$ac_ext
5042 cat >>conftest.$ac_ext <<_ACEOF
5043 /* end confdefs.h.  */
5044 $ac_includes_default
5045 #include <$ac_header>
5046 _ACEOF
5047 rm -f conftest.$ac_objext
5048 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5049   (eval $ac_compile) 2>conftest.er1
5050   ac_status=$?
5051   grep -v '^ *+' conftest.er1 >conftest.err
5052   rm -f conftest.er1
5053   cat conftest.err >&5
5054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5055   (exit $ac_status); } &&
5056          { ac_try='test -z "$ac_c_werror_flag"
5057                          || test ! -s conftest.err'
5058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5059   (eval $ac_try) 2>&5
5060   ac_status=$?
5061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5062   (exit $ac_status); }; } &&
5063          { ac_try='test -s conftest.$ac_objext'
5064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5065   (eval $ac_try) 2>&5
5066   ac_status=$?
5067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5068   (exit $ac_status); }; }; then
5069   ac_header_compiler=yes
5070 else
5071   echo "$as_me: failed program was:" >&5
5072 sed 's/^/| /' conftest.$ac_ext >&5
5073
5074 ac_header_compiler=no
5075 fi
5076 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5077 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5078 echo "${ECHO_T}$ac_header_compiler" >&6
5079
5080 # Is the header present?
5081 echo "$as_me:$LINENO: checking $ac_header presence" >&5
5082 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5083 cat >conftest.$ac_ext <<_ACEOF
5084 /* confdefs.h.  */
5085 _ACEOF
5086 cat confdefs.h >>conftest.$ac_ext
5087 cat >>conftest.$ac_ext <<_ACEOF
5088 /* end confdefs.h.  */
5089 #include <$ac_header>
5090 _ACEOF
5091 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5092   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5093   ac_status=$?
5094   grep -v '^ *+' conftest.er1 >conftest.err
5095   rm -f conftest.er1
5096   cat conftest.err >&5
5097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5098   (exit $ac_status); } >/dev/null; then
5099   if test -s conftest.err; then
5100     ac_cpp_err=$ac_c_preproc_warn_flag
5101     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5102   else
5103     ac_cpp_err=
5104   fi
5105 else
5106   ac_cpp_err=yes
5107 fi
5108 if test -z "$ac_cpp_err"; then
5109   ac_header_preproc=yes
5110 else
5111   echo "$as_me: failed program was:" >&5
5112 sed 's/^/| /' conftest.$ac_ext >&5
5113
5114   ac_header_preproc=no
5115 fi
5116 rm -f conftest.err conftest.$ac_ext
5117 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5118 echo "${ECHO_T}$ac_header_preproc" >&6
5119
5120 # So?  What about this header?
5121 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5122   yes:no: )
5123     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5124 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5125     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5126 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5127     ac_header_preproc=yes
5128     ;;
5129   no:yes:* )
5130     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5131 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5132     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
5133 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
5134     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5135 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5136     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
5137 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
5138     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5139 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5140     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5141 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5142     (
5143       cat <<\_ASBOX
5144 ## ------------------------------------------ ##
5145 ## Report this to the AC_PACKAGE_NAME lists.  ##
5146 ## ------------------------------------------ ##
5147 _ASBOX
5148     ) |
5149       sed "s/^/$as_me: WARNING:     /" >&2
5150     ;;
5151 esac
5152 echo "$as_me:$LINENO: checking for $ac_header" >&5
5153 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5154 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5155   echo $ECHO_N "(cached) $ECHO_C" >&6
5156 else
5157   eval "$as_ac_Header=\$ac_header_preproc"
5158 fi
5159 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5160 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5161
5162 fi
5163 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5164   cat >>confdefs.h <<_ACEOF
5165 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5166 _ACEOF
5167
5168 fi
5169
5170 done
5171
5172 for ac_prog in perl5 perl
5173 do
5174   # Extract the first word of "$ac_prog", so it can be a program name with args.
5175 set dummy $ac_prog; ac_word=$2
5176 echo "$as_me:$LINENO: checking for $ac_word" >&5
5177 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5178 if test "${ac_cv_path_PERL+set}" = set; then
5179   echo $ECHO_N "(cached) $ECHO_C" >&6
5180 else
5181   case $PERL in
5182   [\\/]* | ?:[\\/]*)
5183   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5184   ;;
5185   *)
5186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5187 for as_dir in $PATH
5188 do
5189   IFS=$as_save_IFS
5190   test -z "$as_dir" && as_dir=.
5191   for ac_exec_ext in '' $ac_executable_extensions; do
5192   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5193     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5194     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5195     break 2
5196   fi
5197 done
5198 done
5199
5200   ;;
5201 esac
5202 fi
5203 PERL=$ac_cv_path_PERL
5204
5205 if test -n "$PERL"; then
5206   echo "$as_me:$LINENO: result: $PERL" >&5
5207 echo "${ECHO_T}$PERL" >&6
5208 else
5209   echo "$as_me:$LINENO: result: no" >&5
5210 echo "${ECHO_T}no" >&6
5211 fi
5212
5213   test -n "$PERL" && break
5214 done
5215
5216   if test -z "$PERL" ; then
5217     PERL_VERSION=0
5218   else
5219     echo "$as_me:$LINENO: checking perl version" >&5
5220 echo $ECHO_N "checking perl version... $ECHO_C" >&6
5221 if test "${ac_cv_perl_version+set}" = set; then
5222   echo $ECHO_N "(cached) $ECHO_C" >&6
5223 else
5224   ac_cv_perl_version=`$PERL -e "$perl_version_cmd"`
5225 fi
5226 echo "$as_me:$LINENO: result: $ac_cv_perl_version" >&5
5227 echo "${ECHO_T}$ac_cv_perl_version" >&6
5228     PERL_VERSION=$ac_cv_perl_version
5229   fi
5230
5231
5232 if test -z "$PERL" ; then
5233   # don't let it be blank...
5234   PERL=/usr/bin/perl
5235 fi
5236
5237 echo "$as_me:$LINENO: checking for X" >&5
5238 echo $ECHO_N "checking for X... $ECHO_C" >&6
5239
5240
5241 # Check whether --with-x or --without-x was given.
5242 if test "${with_x+set}" = set; then
5243   withval="$with_x"
5244
5245 fi;
5246 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5247 if test "x$with_x" = xno; then
5248   # The user explicitly disabled X.
5249   have_x=disabled
5250 else
5251   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5252     # Both variables are already set.
5253     have_x=yes
5254   else
5255     if test "${ac_cv_have_x+set}" = set; then
5256   echo $ECHO_N "(cached) $ECHO_C" >&6
5257 else
5258   # One or both of the vars are not set, and there is no cached value.
5259 ac_x_includes=no ac_x_libraries=no
5260 rm -fr conftest.dir
5261 if mkdir conftest.dir; then
5262   cd conftest.dir
5263   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5264   cat >Imakefile <<'_ACEOF'
5265 acfindx:
5266         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5267 _ACEOF
5268   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5269     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5270     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5271     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5272     for ac_extension in a so sl; do
5273       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5274          test -f $ac_im_libdir/libX11.$ac_extension; then
5275         ac_im_usrlibdir=$ac_im_libdir; break
5276       fi
5277     done
5278     # Screen out bogus values from the imake configuration.  They are
5279     # bogus both because they are the default anyway, and because
5280     # using them would break gcc on systems where it needs fixed includes.
5281     case $ac_im_incroot in
5282         /usr/include) ;;
5283         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
5284     esac
5285     case $ac_im_usrlibdir in
5286         /usr/lib | /lib) ;;
5287         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
5288     esac
5289   fi
5290   cd ..
5291   rm -fr conftest.dir
5292 fi
5293
5294 # Standard set of common directories for X headers.
5295 # Check X11 before X11Rn because it is often a symlink to the current release.
5296 ac_x_header_dirs='
5297 /usr/X11/include
5298 /usr/X11R6/include
5299 /usr/X11R5/include
5300 /usr/X11R4/include
5301
5302 /usr/include/X11
5303 /usr/include/X11R6
5304 /usr/include/X11R5
5305 /usr/include/X11R4
5306
5307 /usr/local/X11/include
5308 /usr/local/X11R6/include
5309 /usr/local/X11R5/include
5310 /usr/local/X11R4/include
5311
5312 /usr/local/include/X11
5313 /usr/local/include/X11R6
5314 /usr/local/include/X11R5
5315 /usr/local/include/X11R4
5316
5317 /usr/X386/include
5318 /usr/x386/include
5319 /usr/XFree86/include/X11
5320
5321 /usr/include
5322 /usr/local/include
5323 /usr/unsupported/include
5324 /usr/athena/include
5325 /usr/local/x11r5/include
5326 /usr/lpp/Xamples/include
5327
5328 /usr/openwin/include
5329 /usr/openwin/share/include'
5330
5331 if test "$ac_x_includes" = no; then
5332   # Guess where to find include files, by looking for Intrinsic.h.
5333   # First, try using that file with no special directory specified.
5334   cat >conftest.$ac_ext <<_ACEOF
5335 /* confdefs.h.  */
5336 _ACEOF
5337 cat confdefs.h >>conftest.$ac_ext
5338 cat >>conftest.$ac_ext <<_ACEOF
5339 /* end confdefs.h.  */
5340 #include <X11/Intrinsic.h>
5341 _ACEOF
5342 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5343   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5344   ac_status=$?
5345   grep -v '^ *+' conftest.er1 >conftest.err
5346   rm -f conftest.er1
5347   cat conftest.err >&5
5348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5349   (exit $ac_status); } >/dev/null; then
5350   if test -s conftest.err; then
5351     ac_cpp_err=$ac_c_preproc_warn_flag
5352     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5353   else
5354     ac_cpp_err=
5355   fi
5356 else
5357   ac_cpp_err=yes
5358 fi
5359 if test -z "$ac_cpp_err"; then
5360   # We can compile using X headers with no special include directory.
5361 ac_x_includes=
5362 else
5363   echo "$as_me: failed program was:" >&5
5364 sed 's/^/| /' conftest.$ac_ext >&5
5365
5366   for ac_dir in $ac_x_header_dirs; do
5367   if test -r "$ac_dir/X11/Intrinsic.h"; then
5368     ac_x_includes=$ac_dir
5369     break
5370   fi
5371 done
5372 fi
5373 rm -f conftest.err conftest.$ac_ext
5374 fi # $ac_x_includes = no
5375
5376 if test "$ac_x_libraries" = no; then
5377   # Check for the libraries.
5378   # See if we find them without any special options.
5379   # Don't add to $LIBS permanently.
5380   ac_save_LIBS=$LIBS
5381   LIBS="-lXt $LIBS"
5382   cat >conftest.$ac_ext <<_ACEOF
5383 /* confdefs.h.  */
5384 _ACEOF
5385 cat confdefs.h >>conftest.$ac_ext
5386 cat >>conftest.$ac_ext <<_ACEOF
5387 /* end confdefs.h.  */
5388 #include <X11/Intrinsic.h>
5389 int
5390 main ()
5391 {
5392 XtMalloc (0)
5393   ;
5394   return 0;
5395 }
5396 _ACEOF
5397 rm -f conftest.$ac_objext conftest$ac_exeext
5398 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5399   (eval $ac_link) 2>conftest.er1
5400   ac_status=$?
5401   grep -v '^ *+' conftest.er1 >conftest.err
5402   rm -f conftest.er1
5403   cat conftest.err >&5
5404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5405   (exit $ac_status); } &&
5406          { ac_try='test -z "$ac_c_werror_flag"
5407                          || test ! -s conftest.err'
5408   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5409   (eval $ac_try) 2>&5
5410   ac_status=$?
5411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5412   (exit $ac_status); }; } &&
5413          { ac_try='test -s conftest$ac_exeext'
5414   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5415   (eval $ac_try) 2>&5
5416   ac_status=$?
5417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5418   (exit $ac_status); }; }; then
5419   LIBS=$ac_save_LIBS
5420 # We can link X programs with no special library path.
5421 ac_x_libraries=
5422 else
5423   echo "$as_me: failed program was:" >&5
5424 sed 's/^/| /' conftest.$ac_ext >&5
5425
5426 LIBS=$ac_save_LIBS
5427 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5428 do
5429   # Don't even attempt the hair of trying to link an X program!
5430   for ac_extension in a so sl; do
5431     if test -r $ac_dir/libXt.$ac_extension; then
5432       ac_x_libraries=$ac_dir
5433       break 2
5434     fi
5435   done
5436 done
5437 fi
5438 rm -f conftest.err conftest.$ac_objext \
5439       conftest$ac_exeext conftest.$ac_ext
5440 fi # $ac_x_libraries = no
5441
5442 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
5443   # Didn't find X anywhere.  Cache the known absence of X.
5444   ac_cv_have_x="have_x=no"
5445 else
5446   # Record where we found X for the cache.
5447   ac_cv_have_x="have_x=yes \
5448                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5449 fi
5450 fi
5451
5452   fi
5453   eval "$ac_cv_have_x"
5454 fi # $with_x != no
5455
5456 if test "$have_x" != yes; then
5457   echo "$as_me:$LINENO: result: $have_x" >&5
5458 echo "${ECHO_T}$have_x" >&6
5459   no_x=yes
5460 else
5461   # If each of the values was on the command line, it overrides each guess.
5462   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5463   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5464   # Update the cache value to reflect the command line values.
5465   ac_cv_have_x="have_x=yes \
5466                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5467   echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
5468 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5469 fi
5470
5471 if test "$no_x" = yes; then
5472   # Not all programs may use this symbol, but it does not hurt to define it.
5473
5474 cat >>confdefs.h <<\_ACEOF
5475 #define X_DISPLAY_MISSING 1
5476 _ACEOF
5477
5478   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5479 else
5480   if test -n "$x_includes"; then
5481     X_CFLAGS="$X_CFLAGS -I$x_includes"
5482   fi
5483
5484   # It would also be nice to do this for all -L options, not just this one.
5485   if test -n "$x_libraries"; then
5486     X_LIBS="$X_LIBS -L$x_libraries"
5487     # For Solaris; some versions of Sun CC require a space after -R and
5488     # others require no space.  Words are not sufficient . . . .
5489     case `(uname -sr) 2>/dev/null` in
5490     "SunOS 5"*)
5491       echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
5492 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
5493       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
5494       cat >conftest.$ac_ext <<_ACEOF
5495 /* confdefs.h.  */
5496 _ACEOF
5497 cat confdefs.h >>conftest.$ac_ext
5498 cat >>conftest.$ac_ext <<_ACEOF
5499 /* end confdefs.h.  */
5500
5501 int
5502 main ()
5503 {
5504
5505   ;
5506   return 0;
5507 }
5508 _ACEOF
5509 rm -f conftest.$ac_objext conftest$ac_exeext
5510 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5511   (eval $ac_link) 2>conftest.er1
5512   ac_status=$?
5513   grep -v '^ *+' conftest.er1 >conftest.err
5514   rm -f conftest.er1
5515   cat conftest.err >&5
5516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5517   (exit $ac_status); } &&
5518          { ac_try='test -z "$ac_c_werror_flag"
5519                          || test ! -s conftest.err'
5520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5521   (eval $ac_try) 2>&5
5522   ac_status=$?
5523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5524   (exit $ac_status); }; } &&
5525          { ac_try='test -s conftest$ac_exeext'
5526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5527   (eval $ac_try) 2>&5
5528   ac_status=$?
5529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5530   (exit $ac_status); }; }; then
5531   ac_R_nospace=yes
5532 else
5533   echo "$as_me: failed program was:" >&5
5534 sed 's/^/| /' conftest.$ac_ext >&5
5535
5536 ac_R_nospace=no
5537 fi
5538 rm -f conftest.err conftest.$ac_objext \
5539       conftest$ac_exeext conftest.$ac_ext
5540       if test $ac_R_nospace = yes; then
5541         echo "$as_me:$LINENO: result: no" >&5
5542 echo "${ECHO_T}no" >&6
5543         X_LIBS="$X_LIBS -R$x_libraries"
5544       else
5545         LIBS="$ac_xsave_LIBS -R $x_libraries"
5546         cat >conftest.$ac_ext <<_ACEOF
5547 /* confdefs.h.  */
5548 _ACEOF
5549 cat confdefs.h >>conftest.$ac_ext
5550 cat >>conftest.$ac_ext <<_ACEOF
5551 /* end confdefs.h.  */
5552
5553 int
5554 main ()
5555 {
5556
5557   ;
5558   return 0;
5559 }
5560 _ACEOF
5561 rm -f conftest.$ac_objext conftest$ac_exeext
5562 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5563   (eval $ac_link) 2>conftest.er1
5564   ac_status=$?
5565   grep -v '^ *+' conftest.er1 >conftest.err
5566   rm -f conftest.er1
5567   cat conftest.err >&5
5568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5569   (exit $ac_status); } &&
5570          { ac_try='test -z "$ac_c_werror_flag"
5571                          || test ! -s conftest.err'
5572   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5573   (eval $ac_try) 2>&5
5574   ac_status=$?
5575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5576   (exit $ac_status); }; } &&
5577          { ac_try='test -s conftest$ac_exeext'
5578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5579   (eval $ac_try) 2>&5
5580   ac_status=$?
5581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5582   (exit $ac_status); }; }; then
5583   ac_R_space=yes
5584 else
5585   echo "$as_me: failed program was:" >&5
5586 sed 's/^/| /' conftest.$ac_ext >&5
5587
5588 ac_R_space=no
5589 fi
5590 rm -f conftest.err conftest.$ac_objext \
5591       conftest$ac_exeext conftest.$ac_ext
5592         if test $ac_R_space = yes; then
5593           echo "$as_me:$LINENO: result: yes" >&5
5594 echo "${ECHO_T}yes" >&6
5595           X_LIBS="$X_LIBS -R $x_libraries"
5596         else
5597           echo "$as_me:$LINENO: result: neither works" >&5
5598 echo "${ECHO_T}neither works" >&6
5599         fi
5600       fi
5601       LIBS=$ac_xsave_LIBS
5602     esac
5603   fi
5604
5605   # Check for system-dependent libraries X programs must link with.
5606   # Do this before checking for the system-independent R6 libraries
5607   # (-lICE), since we may need -lsocket or whatever for X linking.
5608
5609   if test "$ISC" = yes; then
5610     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5611   else
5612     # Martyn Johnson says this is needed for Ultrix, if the X
5613     # libraries were built with DECnet support.  And Karl Berry says
5614     # the Alpha needs dnet_stub (dnet does not exist).
5615     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5616     cat >conftest.$ac_ext <<_ACEOF
5617 /* confdefs.h.  */
5618 _ACEOF
5619 cat confdefs.h >>conftest.$ac_ext
5620 cat >>conftest.$ac_ext <<_ACEOF
5621 /* end confdefs.h.  */
5622
5623 /* Override any gcc2 internal prototype to avoid an error.  */
5624 #ifdef __cplusplus
5625 extern "C"
5626 #endif
5627 /* We use char because int might match the return type of a gcc2
5628    builtin and then its argument prototype would still apply.  */
5629 char XOpenDisplay ();
5630 int
5631 main ()
5632 {
5633 XOpenDisplay ();
5634   ;
5635   return 0;
5636 }
5637 _ACEOF
5638 rm -f conftest.$ac_objext conftest$ac_exeext
5639 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5640   (eval $ac_link) 2>conftest.er1
5641   ac_status=$?
5642   grep -v '^ *+' conftest.er1 >conftest.err
5643   rm -f conftest.er1
5644   cat conftest.err >&5
5645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5646   (exit $ac_status); } &&
5647          { ac_try='test -z "$ac_c_werror_flag"
5648                          || test ! -s conftest.err'
5649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5650   (eval $ac_try) 2>&5
5651   ac_status=$?
5652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5653   (exit $ac_status); }; } &&
5654          { ac_try='test -s conftest$ac_exeext'
5655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5656   (eval $ac_try) 2>&5
5657   ac_status=$?
5658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5659   (exit $ac_status); }; }; then
5660   :
5661 else
5662   echo "$as_me: failed program was:" >&5
5663 sed 's/^/| /' conftest.$ac_ext >&5
5664
5665 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5666 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5667 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5668   echo $ECHO_N "(cached) $ECHO_C" >&6
5669 else
5670   ac_check_lib_save_LIBS=$LIBS
5671 LIBS="-ldnet  $LIBS"
5672 cat >conftest.$ac_ext <<_ACEOF
5673 /* confdefs.h.  */
5674 _ACEOF
5675 cat confdefs.h >>conftest.$ac_ext
5676 cat >>conftest.$ac_ext <<_ACEOF
5677 /* end confdefs.h.  */
5678
5679 /* Override any gcc2 internal prototype to avoid an error.  */
5680 #ifdef __cplusplus
5681 extern "C"
5682 #endif
5683 /* We use char because int might match the return type of a gcc2
5684    builtin and then its argument prototype would still apply.  */
5685 char dnet_ntoa ();
5686 int
5687 main ()
5688 {
5689 dnet_ntoa ();
5690   ;
5691   return 0;
5692 }
5693 _ACEOF
5694 rm -f conftest.$ac_objext conftest$ac_exeext
5695 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5696   (eval $ac_link) 2>conftest.er1
5697   ac_status=$?
5698   grep -v '^ *+' conftest.er1 >conftest.err
5699   rm -f conftest.er1
5700   cat conftest.err >&5
5701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5702   (exit $ac_status); } &&
5703          { ac_try='test -z "$ac_c_werror_flag"
5704                          || test ! -s conftest.err'
5705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5706   (eval $ac_try) 2>&5
5707   ac_status=$?
5708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5709   (exit $ac_status); }; } &&
5710          { ac_try='test -s conftest$ac_exeext'
5711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5712   (eval $ac_try) 2>&5
5713   ac_status=$?
5714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5715   (exit $ac_status); }; }; then
5716   ac_cv_lib_dnet_dnet_ntoa=yes
5717 else
5718   echo "$as_me: failed program was:" >&5
5719 sed 's/^/| /' conftest.$ac_ext >&5
5720
5721 ac_cv_lib_dnet_dnet_ntoa=no
5722 fi
5723 rm -f conftest.err conftest.$ac_objext \
5724       conftest$ac_exeext conftest.$ac_ext
5725 LIBS=$ac_check_lib_save_LIBS
5726 fi
5727 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5728 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5729 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5730   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5731 fi
5732
5733     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5734       echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5735 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5736 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5737   echo $ECHO_N "(cached) $ECHO_C" >&6
5738 else
5739   ac_check_lib_save_LIBS=$LIBS
5740 LIBS="-ldnet_stub  $LIBS"
5741 cat >conftest.$ac_ext <<_ACEOF
5742 /* confdefs.h.  */
5743 _ACEOF
5744 cat confdefs.h >>conftest.$ac_ext
5745 cat >>conftest.$ac_ext <<_ACEOF
5746 /* end confdefs.h.  */
5747
5748 /* Override any gcc2 internal prototype to avoid an error.  */
5749 #ifdef __cplusplus
5750 extern "C"
5751 #endif
5752 /* We use char because int might match the return type of a gcc2
5753    builtin and then its argument prototype would still apply.  */
5754 char dnet_ntoa ();
5755 int
5756 main ()
5757 {
5758 dnet_ntoa ();
5759   ;
5760   return 0;
5761 }
5762 _ACEOF
5763 rm -f conftest.$ac_objext conftest$ac_exeext
5764 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5765   (eval $ac_link) 2>conftest.er1
5766   ac_status=$?
5767   grep -v '^ *+' conftest.er1 >conftest.err
5768   rm -f conftest.er1
5769   cat conftest.err >&5
5770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5771   (exit $ac_status); } &&
5772          { ac_try='test -z "$ac_c_werror_flag"
5773                          || test ! -s conftest.err'
5774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5775   (eval $ac_try) 2>&5
5776   ac_status=$?
5777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5778   (exit $ac_status); }; } &&
5779          { ac_try='test -s conftest$ac_exeext'
5780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5781   (eval $ac_try) 2>&5
5782   ac_status=$?
5783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5784   (exit $ac_status); }; }; then
5785   ac_cv_lib_dnet_stub_dnet_ntoa=yes
5786 else
5787   echo "$as_me: failed program was:" >&5
5788 sed 's/^/| /' conftest.$ac_ext >&5
5789
5790 ac_cv_lib_dnet_stub_dnet_ntoa=no
5791 fi
5792 rm -f conftest.err conftest.$ac_objext \
5793       conftest$ac_exeext conftest.$ac_ext
5794 LIBS=$ac_check_lib_save_LIBS
5795 fi
5796 echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5797 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5798 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5799   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5800 fi
5801
5802     fi
5803 fi
5804 rm -f conftest.err conftest.$ac_objext \
5805       conftest$ac_exeext conftest.$ac_ext
5806     LIBS="$ac_xsave_LIBS"
5807
5808     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5809     # to get the SysV transport functions.
5810     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5811     # needs -lnsl.
5812     # The nsl library prevents programs from opening the X display
5813     # on Irix 5.2, according to T.E. Dickey.
5814     # The functions gethostbyname, getservbyname, and inet_addr are
5815     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5816     echo "$as_me:$LINENO: checking for gethostbyname" >&5
5817 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5818 if test "${ac_cv_func_gethostbyname+set}" = set; then
5819   echo $ECHO_N "(cached) $ECHO_C" >&6
5820 else
5821   cat >conftest.$ac_ext <<_ACEOF
5822 /* confdefs.h.  */
5823 _ACEOF
5824 cat confdefs.h >>conftest.$ac_ext
5825 cat >>conftest.$ac_ext <<_ACEOF
5826 /* end confdefs.h.  */
5827 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5828    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5829 #define gethostbyname innocuous_gethostbyname
5830
5831 /* System header to define __stub macros and hopefully few prototypes,
5832     which can conflict with char gethostbyname (); below.
5833     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5834     <limits.h> exists even on freestanding compilers.  */
5835
5836 #ifdef __STDC__
5837 # include <limits.h>
5838 #else
5839 # include <assert.h>
5840 #endif
5841
5842 #undef gethostbyname
5843
5844 /* Override any gcc2 internal prototype to avoid an error.  */
5845 #ifdef __cplusplus
5846 extern "C"
5847 {
5848 #endif
5849 /* We use char because int might match the return type of a gcc2
5850    builtin and then its argument prototype would still apply.  */
5851 char gethostbyname ();
5852 /* The GNU C library defines this for functions which it implements
5853     to always fail with ENOSYS.  Some functions are actually named
5854     something starting with __ and the normal name is an alias.  */
5855 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5856 choke me
5857 #else
5858 char (*f) () = gethostbyname;
5859 #endif
5860 #ifdef __cplusplus
5861 }
5862 #endif
5863
5864 int
5865 main ()
5866 {
5867 return f != gethostbyname;
5868   ;
5869   return 0;
5870 }
5871 _ACEOF
5872 rm -f conftest.$ac_objext conftest$ac_exeext
5873 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5874   (eval $ac_link) 2>conftest.er1
5875   ac_status=$?
5876   grep -v '^ *+' conftest.er1 >conftest.err
5877   rm -f conftest.er1
5878   cat conftest.err >&5
5879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880   (exit $ac_status); } &&
5881          { ac_try='test -z "$ac_c_werror_flag"
5882                          || test ! -s conftest.err'
5883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5884   (eval $ac_try) 2>&5
5885   ac_status=$?
5886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5887   (exit $ac_status); }; } &&
5888          { ac_try='test -s conftest$ac_exeext'
5889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5890   (eval $ac_try) 2>&5
5891   ac_status=$?
5892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5893   (exit $ac_status); }; }; then
5894   ac_cv_func_gethostbyname=yes
5895 else
5896   echo "$as_me: failed program was:" >&5
5897 sed 's/^/| /' conftest.$ac_ext >&5
5898
5899 ac_cv_func_gethostbyname=no
5900 fi
5901 rm -f conftest.err conftest.$ac_objext \
5902       conftest$ac_exeext conftest.$ac_ext
5903 fi
5904 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5905 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5906
5907     if test $ac_cv_func_gethostbyname = no; then
5908       echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5909 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5910 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5911   echo $ECHO_N "(cached) $ECHO_C" >&6
5912 else
5913   ac_check_lib_save_LIBS=$LIBS
5914 LIBS="-lnsl  $LIBS"
5915 cat >conftest.$ac_ext <<_ACEOF
5916 /* confdefs.h.  */
5917 _ACEOF
5918 cat confdefs.h >>conftest.$ac_ext
5919 cat >>conftest.$ac_ext <<_ACEOF
5920 /* end confdefs.h.  */
5921
5922 /* Override any gcc2 internal prototype to avoid an error.  */
5923 #ifdef __cplusplus
5924 extern "C"
5925 #endif
5926 /* We use char because int might match the return type of a gcc2
5927    builtin and then its argument prototype would still apply.  */
5928 char gethostbyname ();
5929 int
5930 main ()
5931 {
5932 gethostbyname ();
5933   ;
5934   return 0;
5935 }
5936 _ACEOF
5937 rm -f conftest.$ac_objext conftest$ac_exeext
5938 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5939   (eval $ac_link) 2>conftest.er1
5940   ac_status=$?
5941   grep -v '^ *+' conftest.er1 >conftest.err
5942   rm -f conftest.er1
5943   cat conftest.err >&5
5944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5945   (exit $ac_status); } &&
5946          { ac_try='test -z "$ac_c_werror_flag"
5947                          || test ! -s conftest.err'
5948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5949   (eval $ac_try) 2>&5
5950   ac_status=$?
5951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5952   (exit $ac_status); }; } &&
5953          { ac_try='test -s conftest$ac_exeext'
5954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5955   (eval $ac_try) 2>&5
5956   ac_status=$?
5957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5958   (exit $ac_status); }; }; then
5959   ac_cv_lib_nsl_gethostbyname=yes
5960 else
5961   echo "$as_me: failed program was:" >&5
5962 sed 's/^/| /' conftest.$ac_ext >&5
5963
5964 ac_cv_lib_nsl_gethostbyname=no
5965 fi
5966 rm -f conftest.err conftest.$ac_objext \
5967       conftest$ac_exeext conftest.$ac_ext
5968 LIBS=$ac_check_lib_save_LIBS
5969 fi
5970 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5971 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5972 if test $ac_cv_lib_nsl_gethostbyname = yes; then
5973   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5974 fi
5975
5976       if test $ac_cv_lib_nsl_gethostbyname = no; then
5977         echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5978 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5979 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5980   echo $ECHO_N "(cached) $ECHO_C" >&6
5981 else
5982   ac_check_lib_save_LIBS=$LIBS
5983 LIBS="-lbsd  $LIBS"
5984 cat >conftest.$ac_ext <<_ACEOF
5985 /* confdefs.h.  */
5986 _ACEOF
5987 cat confdefs.h >>conftest.$ac_ext
5988 cat >>conftest.$ac_ext <<_ACEOF
5989 /* end confdefs.h.  */
5990
5991 /* Override any gcc2 internal prototype to avoid an error.  */
5992 #ifdef __cplusplus
5993 extern "C"
5994 #endif
5995 /* We use char because int might match the return type of a gcc2
5996    builtin and then its argument prototype would still apply.  */
5997 char gethostbyname ();
5998 int
5999 main ()
6000 {
6001 gethostbyname ();
6002   ;
6003   return 0;
6004 }
6005 _ACEOF
6006 rm -f conftest.$ac_objext conftest$ac_exeext
6007 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6008   (eval $ac_link) 2>conftest.er1
6009   ac_status=$?
6010   grep -v '^ *+' conftest.er1 >conftest.err
6011   rm -f conftest.er1
6012   cat conftest.err >&5
6013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6014   (exit $ac_status); } &&
6015          { ac_try='test -z "$ac_c_werror_flag"
6016                          || test ! -s conftest.err'
6017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6018   (eval $ac_try) 2>&5
6019   ac_status=$?
6020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6021   (exit $ac_status); }; } &&
6022          { ac_try='test -s conftest$ac_exeext'
6023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6024   (eval $ac_try) 2>&5
6025   ac_status=$?
6026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6027   (exit $ac_status); }; }; then
6028   ac_cv_lib_bsd_gethostbyname=yes
6029 else
6030   echo "$as_me: failed program was:" >&5
6031 sed 's/^/| /' conftest.$ac_ext >&5
6032
6033 ac_cv_lib_bsd_gethostbyname=no
6034 fi
6035 rm -f conftest.err conftest.$ac_objext \
6036       conftest$ac_exeext conftest.$ac_ext
6037 LIBS=$ac_check_lib_save_LIBS
6038 fi
6039 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6040 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
6041 if test $ac_cv_lib_bsd_gethostbyname = yes; then
6042   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6043 fi
6044
6045       fi
6046     fi
6047
6048     # lieder@skyler.mavd.honeywell.com says without -lsocket,
6049     # socket/setsockopt and other routines are undefined under SCO ODT
6050     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6051     # on later versions), says Simon Leinen: it contains gethostby*
6052     # variants that don't use the name server (or something).  -lsocket
6053     # must be given before -lnsl if both are needed.  We assume that
6054     # if connect needs -lnsl, so does gethostbyname.
6055     echo "$as_me:$LINENO: checking for connect" >&5
6056 echo $ECHO_N "checking for connect... $ECHO_C" >&6
6057 if test "${ac_cv_func_connect+set}" = set; then
6058   echo $ECHO_N "(cached) $ECHO_C" >&6
6059 else
6060   cat >conftest.$ac_ext <<_ACEOF
6061 /* confdefs.h.  */
6062 _ACEOF
6063 cat confdefs.h >>conftest.$ac_ext
6064 cat >>conftest.$ac_ext <<_ACEOF
6065 /* end confdefs.h.  */
6066 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
6067    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6068 #define connect innocuous_connect
6069
6070 /* System header to define __stub macros and hopefully few prototypes,
6071     which can conflict with char connect (); below.
6072     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6073     <limits.h> exists even on freestanding compilers.  */
6074
6075 #ifdef __STDC__
6076 # include <limits.h>
6077 #else
6078 # include <assert.h>
6079 #endif
6080
6081 #undef connect
6082
6083 /* Override any gcc2 internal prototype to avoid an error.  */
6084 #ifdef __cplusplus
6085 extern "C"
6086 {
6087 #endif
6088 /* We use char because int might match the return type of a gcc2
6089    builtin and then its argument prototype would still apply.  */
6090 char connect ();
6091 /* The GNU C library defines this for functions which it implements
6092     to always fail with ENOSYS.  Some functions are actually named
6093     something starting with __ and the normal name is an alias.  */
6094 #if defined (__stub_connect) || defined (__stub___connect)
6095 choke me
6096 #else
6097 char (*f) () = connect;
6098 #endif
6099 #ifdef __cplusplus
6100 }
6101 #endif
6102
6103 int
6104 main ()
6105 {
6106 return f != connect;
6107   ;
6108   return 0;
6109 }
6110 _ACEOF
6111 rm -f conftest.$ac_objext conftest$ac_exeext
6112 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6113   (eval $ac_link) 2>conftest.er1
6114   ac_status=$?
6115   grep -v '^ *+' conftest.er1 >conftest.err
6116   rm -f conftest.er1
6117   cat conftest.err >&5
6118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6119   (exit $ac_status); } &&
6120          { ac_try='test -z "$ac_c_werror_flag"
6121                          || test ! -s conftest.err'
6122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6123   (eval $ac_try) 2>&5
6124   ac_status=$?
6125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6126   (exit $ac_status); }; } &&
6127          { ac_try='test -s conftest$ac_exeext'
6128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6129   (eval $ac_try) 2>&5
6130   ac_status=$?
6131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6132   (exit $ac_status); }; }; then
6133   ac_cv_func_connect=yes
6134 else
6135   echo "$as_me: failed program was:" >&5
6136 sed 's/^/| /' conftest.$ac_ext >&5
6137
6138 ac_cv_func_connect=no
6139 fi
6140 rm -f conftest.err conftest.$ac_objext \
6141       conftest$ac_exeext conftest.$ac_ext
6142 fi
6143 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
6144 echo "${ECHO_T}$ac_cv_func_connect" >&6
6145
6146     if test $ac_cv_func_connect = no; then
6147       echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
6148 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
6149 if test "${ac_cv_lib_socket_connect+set}" = set; then
6150   echo $ECHO_N "(cached) $ECHO_C" >&6
6151 else
6152   ac_check_lib_save_LIBS=$LIBS
6153 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6154 cat >conftest.$ac_ext <<_ACEOF
6155 /* confdefs.h.  */
6156 _ACEOF
6157 cat confdefs.h >>conftest.$ac_ext
6158 cat >>conftest.$ac_ext <<_ACEOF
6159 /* end confdefs.h.  */
6160
6161 /* Override any gcc2 internal prototype to avoid an error.  */
6162 #ifdef __cplusplus
6163 extern "C"
6164 #endif
6165 /* We use char because int might match the return type of a gcc2
6166    builtin and then its argument prototype would still apply.  */
6167 char connect ();
6168 int
6169 main ()
6170 {
6171 connect ();
6172   ;
6173   return 0;
6174 }
6175 _ACEOF
6176 rm -f conftest.$ac_objext conftest$ac_exeext
6177 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6178   (eval $ac_link) 2>conftest.er1
6179   ac_status=$?
6180   grep -v '^ *+' conftest.er1 >conftest.err
6181   rm -f conftest.er1
6182   cat conftest.err >&5
6183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6184   (exit $ac_status); } &&
6185          { ac_try='test -z "$ac_c_werror_flag"
6186                          || test ! -s conftest.err'
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); }; } &&
6192          { ac_try='test -s conftest$ac_exeext'
6193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6194   (eval $ac_try) 2>&5
6195   ac_status=$?
6196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6197   (exit $ac_status); }; }; then
6198   ac_cv_lib_socket_connect=yes
6199 else
6200   echo "$as_me: failed program was:" >&5
6201 sed 's/^/| /' conftest.$ac_ext >&5
6202
6203 ac_cv_lib_socket_connect=no
6204 fi
6205 rm -f conftest.err conftest.$ac_objext \
6206       conftest$ac_exeext conftest.$ac_ext
6207 LIBS=$ac_check_lib_save_LIBS
6208 fi
6209 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
6210 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
6211 if test $ac_cv_lib_socket_connect = yes; then
6212   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6213 fi
6214
6215     fi
6216
6217     # Guillermo Gomez says -lposix is necessary on A/UX.
6218     echo "$as_me:$LINENO: checking for remove" >&5
6219 echo $ECHO_N "checking for remove... $ECHO_C" >&6
6220 if test "${ac_cv_func_remove+set}" = set; then
6221   echo $ECHO_N "(cached) $ECHO_C" >&6
6222 else
6223   cat >conftest.$ac_ext <<_ACEOF
6224 /* confdefs.h.  */
6225 _ACEOF
6226 cat confdefs.h >>conftest.$ac_ext
6227 cat >>conftest.$ac_ext <<_ACEOF
6228 /* end confdefs.h.  */
6229 /* Define remove to an innocuous variant, in case <limits.h> declares remove.
6230    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6231 #define remove innocuous_remove
6232
6233 /* System header to define __stub macros and hopefully few prototypes,
6234     which can conflict with char remove (); below.
6235     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6236     <limits.h> exists even on freestanding compilers.  */
6237
6238 #ifdef __STDC__
6239 # include <limits.h>
6240 #else
6241 # include <assert.h>
6242 #endif
6243
6244 #undef remove
6245
6246 /* Override any gcc2 internal prototype to avoid an error.  */
6247 #ifdef __cplusplus
6248 extern "C"
6249 {
6250 #endif
6251 /* We use char because int might match the return type of a gcc2
6252    builtin and then its argument prototype would still apply.  */
6253 char remove ();
6254 /* The GNU C library defines this for functions which it implements
6255     to always fail with ENOSYS.  Some functions are actually named
6256     something starting with __ and the normal name is an alias.  */
6257 #if defined (__stub_remove) || defined (__stub___remove)
6258 choke me
6259 #else
6260 char (*f) () = remove;
6261 #endif
6262 #ifdef __cplusplus
6263 }
6264 #endif
6265
6266 int
6267 main ()
6268 {
6269 return f != remove;
6270   ;
6271   return 0;
6272 }
6273 _ACEOF
6274 rm -f conftest.$ac_objext conftest$ac_exeext
6275 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6276   (eval $ac_link) 2>conftest.er1
6277   ac_status=$?
6278   grep -v '^ *+' conftest.er1 >conftest.err
6279   rm -f conftest.er1
6280   cat conftest.err >&5
6281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6282   (exit $ac_status); } &&
6283          { ac_try='test -z "$ac_c_werror_flag"
6284                          || test ! -s conftest.err'
6285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6286   (eval $ac_try) 2>&5
6287   ac_status=$?
6288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6289   (exit $ac_status); }; } &&
6290          { ac_try='test -s conftest$ac_exeext'
6291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6292   (eval $ac_try) 2>&5
6293   ac_status=$?
6294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6295   (exit $ac_status); }; }; then
6296   ac_cv_func_remove=yes
6297 else
6298   echo "$as_me: failed program was:" >&5
6299 sed 's/^/| /' conftest.$ac_ext >&5
6300
6301 ac_cv_func_remove=no
6302 fi
6303 rm -f conftest.err conftest.$ac_objext \
6304       conftest$ac_exeext conftest.$ac_ext
6305 fi
6306 echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
6307 echo "${ECHO_T}$ac_cv_func_remove" >&6
6308
6309     if test $ac_cv_func_remove = no; then
6310       echo "$as_me:$LINENO: checking for remove in -lposix" >&5
6311 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
6312 if test "${ac_cv_lib_posix_remove+set}" = set; then
6313   echo $ECHO_N "(cached) $ECHO_C" >&6
6314 else
6315   ac_check_lib_save_LIBS=$LIBS
6316 LIBS="-lposix  $LIBS"
6317 cat >conftest.$ac_ext <<_ACEOF
6318 /* confdefs.h.  */
6319 _ACEOF
6320 cat confdefs.h >>conftest.$ac_ext
6321 cat >>conftest.$ac_ext <<_ACEOF
6322 /* end confdefs.h.  */
6323
6324 /* Override any gcc2 internal prototype to avoid an error.  */
6325 #ifdef __cplusplus
6326 extern "C"
6327 #endif
6328 /* We use char because int might match the return type of a gcc2
6329    builtin and then its argument prototype would still apply.  */
6330 char remove ();
6331 int
6332 main ()
6333 {
6334 remove ();
6335   ;
6336   return 0;
6337 }
6338 _ACEOF
6339 rm -f conftest.$ac_objext conftest$ac_exeext
6340 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6341   (eval $ac_link) 2>conftest.er1
6342   ac_status=$?
6343   grep -v '^ *+' conftest.er1 >conftest.err
6344   rm -f conftest.er1
6345   cat conftest.err >&5
6346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6347   (exit $ac_status); } &&
6348          { ac_try='test -z "$ac_c_werror_flag"
6349                          || test ! -s conftest.err'
6350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6351   (eval $ac_try) 2>&5
6352   ac_status=$?
6353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354   (exit $ac_status); }; } &&
6355          { ac_try='test -s conftest$ac_exeext'
6356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6357   (eval $ac_try) 2>&5
6358   ac_status=$?
6359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6360   (exit $ac_status); }; }; then
6361   ac_cv_lib_posix_remove=yes
6362 else
6363   echo "$as_me: failed program was:" >&5
6364 sed 's/^/| /' conftest.$ac_ext >&5
6365
6366 ac_cv_lib_posix_remove=no
6367 fi
6368 rm -f conftest.err conftest.$ac_objext \
6369       conftest$ac_exeext conftest.$ac_ext
6370 LIBS=$ac_check_lib_save_LIBS
6371 fi
6372 echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
6373 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
6374 if test $ac_cv_lib_posix_remove = yes; then
6375   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6376 fi
6377
6378     fi
6379
6380     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6381     echo "$as_me:$LINENO: checking for shmat" >&5
6382 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
6383 if test "${ac_cv_func_shmat+set}" = set; then
6384   echo $ECHO_N "(cached) $ECHO_C" >&6
6385 else
6386   cat >conftest.$ac_ext <<_ACEOF
6387 /* confdefs.h.  */
6388 _ACEOF
6389 cat confdefs.h >>conftest.$ac_ext
6390 cat >>conftest.$ac_ext <<_ACEOF
6391 /* end confdefs.h.  */
6392 /* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
6393    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6394 #define shmat innocuous_shmat
6395
6396 /* System header to define __stub macros and hopefully few prototypes,
6397     which can conflict with char shmat (); below.
6398     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6399     <limits.h> exists even on freestanding compilers.  */
6400
6401 #ifdef __STDC__
6402 # include <limits.h>
6403 #else
6404 # include <assert.h>
6405 #endif
6406
6407 #undef shmat
6408
6409 /* Override any gcc2 internal prototype to avoid an error.  */
6410 #ifdef __cplusplus
6411 extern "C"
6412 {
6413 #endif
6414 /* We use char because int might match the return type of a gcc2
6415    builtin and then its argument prototype would still apply.  */
6416 char shmat ();
6417 /* The GNU C library defines this for functions which it implements
6418     to always fail with ENOSYS.  Some functions are actually named
6419     something starting with __ and the normal name is an alias.  */
6420 #if defined (__stub_shmat) || defined (__stub___shmat)
6421 choke me
6422 #else
6423 char (*f) () = shmat;
6424 #endif
6425 #ifdef __cplusplus
6426 }
6427 #endif
6428
6429 int
6430 main ()
6431 {
6432 return f != shmat;
6433   ;
6434   return 0;
6435 }
6436 _ACEOF
6437 rm -f conftest.$ac_objext conftest$ac_exeext
6438 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6439   (eval $ac_link) 2>conftest.er1
6440   ac_status=$?
6441   grep -v '^ *+' conftest.er1 >conftest.err
6442   rm -f conftest.er1
6443   cat conftest.err >&5
6444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6445   (exit $ac_status); } &&
6446          { ac_try='test -z "$ac_c_werror_flag"
6447                          || test ! -s conftest.err'
6448   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6449   (eval $ac_try) 2>&5
6450   ac_status=$?
6451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6452   (exit $ac_status); }; } &&
6453          { ac_try='test -s conftest$ac_exeext'
6454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6455   (eval $ac_try) 2>&5
6456   ac_status=$?
6457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6458   (exit $ac_status); }; }; then
6459   ac_cv_func_shmat=yes
6460 else
6461   echo "$as_me: failed program was:" >&5
6462 sed 's/^/| /' conftest.$ac_ext >&5
6463
6464 ac_cv_func_shmat=no
6465 fi
6466 rm -f conftest.err conftest.$ac_objext \
6467       conftest$ac_exeext conftest.$ac_ext
6468 fi
6469 echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
6470 echo "${ECHO_T}$ac_cv_func_shmat" >&6
6471
6472     if test $ac_cv_func_shmat = no; then
6473       echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
6474 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
6475 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
6476   echo $ECHO_N "(cached) $ECHO_C" >&6
6477 else
6478   ac_check_lib_save_LIBS=$LIBS
6479 LIBS="-lipc  $LIBS"
6480 cat >conftest.$ac_ext <<_ACEOF
6481 /* confdefs.h.  */
6482 _ACEOF
6483 cat confdefs.h >>conftest.$ac_ext
6484 cat >>conftest.$ac_ext <<_ACEOF
6485 /* end confdefs.h.  */
6486
6487 /* Override any gcc2 internal prototype to avoid an error.  */
6488 #ifdef __cplusplus
6489 extern "C"
6490 #endif
6491 /* We use char because int might match the return type of a gcc2
6492    builtin and then its argument prototype would still apply.  */
6493 char shmat ();
6494 int
6495 main ()
6496 {
6497 shmat ();
6498   ;
6499   return 0;
6500 }
6501 _ACEOF
6502 rm -f conftest.$ac_objext conftest$ac_exeext
6503 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6504   (eval $ac_link) 2>conftest.er1
6505   ac_status=$?
6506   grep -v '^ *+' conftest.er1 >conftest.err
6507   rm -f conftest.er1
6508   cat conftest.err >&5
6509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6510   (exit $ac_status); } &&
6511          { ac_try='test -z "$ac_c_werror_flag"
6512                          || test ! -s conftest.err'
6513   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6514   (eval $ac_try) 2>&5
6515   ac_status=$?
6516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6517   (exit $ac_status); }; } &&
6518          { ac_try='test -s conftest$ac_exeext'
6519   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6520   (eval $ac_try) 2>&5
6521   ac_status=$?
6522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6523   (exit $ac_status); }; }; then
6524   ac_cv_lib_ipc_shmat=yes
6525 else
6526   echo "$as_me: failed program was:" >&5
6527 sed 's/^/| /' conftest.$ac_ext >&5
6528
6529 ac_cv_lib_ipc_shmat=no
6530 fi
6531 rm -f conftest.err conftest.$ac_objext \
6532       conftest$ac_exeext conftest.$ac_ext
6533 LIBS=$ac_check_lib_save_LIBS
6534 fi
6535 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
6536 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
6537 if test $ac_cv_lib_ipc_shmat = yes; then
6538   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6539 fi
6540
6541     fi
6542   fi
6543
6544   # Check for libraries that X11R6 Xt/Xaw programs need.
6545   ac_save_LDFLAGS=$LDFLAGS
6546   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6547   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6548   # check for ICE first), but we must link in the order -lSM -lICE or
6549   # we get undefined symbols.  So assume we have SM if we have ICE.
6550   # These have to be linked with before -lX11, unlike the other
6551   # libraries we check for below, so use a different variable.
6552   # John Interrante, Karl Berry
6553   echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
6554 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
6555 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
6556   echo $ECHO_N "(cached) $ECHO_C" >&6
6557 else
6558   ac_check_lib_save_LIBS=$LIBS
6559 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6560 cat >conftest.$ac_ext <<_ACEOF
6561 /* confdefs.h.  */
6562 _ACEOF
6563 cat confdefs.h >>conftest.$ac_ext
6564 cat >>conftest.$ac_ext <<_ACEOF
6565 /* end confdefs.h.  */
6566
6567 /* Override any gcc2 internal prototype to avoid an error.  */
6568 #ifdef __cplusplus
6569 extern "C"
6570 #endif
6571 /* We use char because int might match the return type of a gcc2
6572    builtin and then its argument prototype would still apply.  */
6573 char IceConnectionNumber ();
6574 int
6575 main ()
6576 {
6577 IceConnectionNumber ();
6578   ;
6579   return 0;
6580 }
6581 _ACEOF
6582 rm -f conftest.$ac_objext conftest$ac_exeext
6583 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6584   (eval $ac_link) 2>conftest.er1
6585   ac_status=$?
6586   grep -v '^ *+' conftest.er1 >conftest.err
6587   rm -f conftest.er1
6588   cat conftest.err >&5
6589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6590   (exit $ac_status); } &&
6591          { ac_try='test -z "$ac_c_werror_flag"
6592                          || test ! -s conftest.err'
6593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6594   (eval $ac_try) 2>&5
6595   ac_status=$?
6596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6597   (exit $ac_status); }; } &&
6598          { ac_try='test -s conftest$ac_exeext'
6599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6600   (eval $ac_try) 2>&5
6601   ac_status=$?
6602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6603   (exit $ac_status); }; }; then
6604   ac_cv_lib_ICE_IceConnectionNumber=yes
6605 else
6606   echo "$as_me: failed program was:" >&5
6607 sed 's/^/| /' conftest.$ac_ext >&5
6608
6609 ac_cv_lib_ICE_IceConnectionNumber=no
6610 fi
6611 rm -f conftest.err conftest.$ac_objext \
6612       conftest$ac_exeext conftest.$ac_ext
6613 LIBS=$ac_check_lib_save_LIBS
6614 fi
6615 echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6616 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
6617 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
6618   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6619 fi
6620
6621   LDFLAGS=$ac_save_LDFLAGS
6622
6623 fi
6624
6625
6626 if test "$have_x" != yes; then
6627   { { echo "$as_me:$LINENO: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&5
6628 echo "$as_me: error: Couldn't find X11 headers/libs.  Try \`$0 --help'." >&2;}
6629    { (exit 1); exit 1; }; }
6630 fi
6631
6632
6633     echo "$as_me:$LINENO: checking for X app-defaults directory" >&5
6634 echo $ECHO_N "checking for X app-defaults directory... $ECHO_C" >&6
6635 if test "${ac_cv_x_app_defaults+set}" = set; then
6636   echo $ECHO_N "(cached) $ECHO_C" >&6
6637 else
6638
6639   rm -fr conftestdir
6640   if mkdir conftestdir; then
6641     cd conftestdir 2>/dev/null
6642     # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6643     cat > Imakefile <<'EOF'
6644 acfindx:
6645         @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
6646 EOF
6647     if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
6648       # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
6649       eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6650     fi
6651     cd .. 2>/dev/null
6652     rm -fr conftestdir
6653   fi
6654       if test x"$ac_x_app_defaults" = x; then
6655
6656   # Look for the directory under a standard set of common directories.
6657   # Check X11 before X11Rn because it's often a symlink to the current release.
6658   for ac_dir in                                 \
6659     /usr/X11/lib/app-defaults                   \
6660     /usr/X11R6/lib/app-defaults                 \
6661     /usr/X11R6/lib/X11/app-defaults             \
6662     /usr/X11R5/lib/app-defaults                 \
6663     /usr/X11R5/lib/X11/app-defaults             \
6664     /usr/X11R4/lib/app-defaults                 \
6665     /usr/X11R4/lib/X11/app-defaults             \
6666                                                 \
6667     /usr/lib/X11/app-defaults                   \
6668     /usr/lib/X11R6/app-defaults                 \
6669     /usr/lib/X11R5/app-defaults                 \
6670     /usr/lib/X11R4/app-defaults                 \
6671                                                 \
6672     /usr/local/X11/lib/app-defaults             \
6673     /usr/local/X11R6/lib/app-defaults           \
6674     /usr/local/X11R5/lib/app-defaults           \
6675     /usr/local/X11R4/lib/app-defaults           \
6676                                                 \
6677     /usr/local/lib/X11/app-defaults             \
6678     /usr/local/lib/X11R6/app-defaults           \
6679     /usr/local/lib/X11R6/X11/app-defaults       \
6680     /usr/local/lib/X11R5/app-defaults           \
6681     /usr/local/lib/X11R5/X11/app-defaults       \
6682     /usr/local/lib/X11R4/app-defaults           \
6683     /usr/local/lib/X11R4/X11/app-defaults       \
6684                                                 \
6685     /usr/X386/lib/X11/app-defaults              \
6686     /usr/x386/lib/X11/app-defaults              \
6687     /usr/XFree86/lib/X11/app-defaults           \
6688                                                 \
6689     /usr/lib/X11/app-defaults                   \
6690     /usr/local/lib/X11/app-defaults             \
6691     /usr/unsupported/lib/X11/app-defaults       \
6692     /usr/athena/lib/X11/app-defaults            \
6693     /usr/local/x11r5/lib/X11/app-defaults       \
6694     /usr/lpp/Xamples/lib/X11/app-defaults       \
6695     /lib/usr/lib/X11/app-defaults               \
6696                                                 \
6697     /usr/openwin/lib/app-defaults               \
6698     /usr/openwin/lib/X11/app-defaults           \
6699     /usr/openwin/share/lib/app-defaults         \
6700     /usr/openwin/share/lib/X11/app-defaults     \
6701                                                 \
6702     /X11R6/lib/app-defaults                     \
6703     /X11R5/lib/app-defaults                     \
6704     /X11R4/lib/app-defaults                     \
6705     ; \
6706   do
6707     if test -d "$ac_dir"; then
6708       ac_x_app_defaults=$ac_dir
6709       break
6710     fi
6711   done
6712
6713       fi
6714       if test x"$ac_x_app_defaults" = x; then
6715         ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
6716       else
6717         # Record where we found app-defaults for the cache.
6718         ac_cv_x_app_defaults="$ac_x_app_defaults"
6719       fi
6720 fi
6721 echo "$as_me:$LINENO: result: $ac_cv_x_app_defaults" >&5
6722 echo "${ECHO_T}$ac_cv_x_app_defaults" >&6
6723     eval ac_x_app_defaults="$ac_cv_x_app_defaults"
6724 case "$host" in
6725     *-hpux*)
6726
6727       # The following arcana was gleaned from conversations with
6728       # Eric Schwartz <erics@col.hp.com>:
6729       #
6730       # On HPUX 10.x, the parts of X that HP considers "standard" live in
6731       # /usr/{include,lib}/X11R6/.  The parts that HP doesn't consider
6732       # "standard", notably, Xaw and Xmu, live in /usr/contrib/X11R6/.
6733       # Yet /usr/contrib/X11R6/ comes preinstalled on all HPUX systems.
6734       # Also, there are symlinks from /usr/include/ and /usr/lib/ into
6735       # /usr/{include,lib}/X11R6/, so that (if you don't use Xmu at all)
6736       # you don't need any -I or -L arguments.
6737       #
6738       # On HPUX 9.x, /usr/{include,lib}/X11R5/ and /usr/contrib/X11R5/
6739       # are the same division as 10.x.  However, there are no symlinks to
6740       # the X stuff from /usr/include/ and /usr/lib/, so -I and -L
6741       # arguments are always necessary.
6742       #
6743       # However, X11R6 was available on HPUX 9.x as a patch: if that
6744       # patch was installed, then all of X11R6 went in to
6745       # /usr/contrib/X11R6/ (there was no /usr/{include,lib}/X11R6/.)
6746       #
6747       # HPUX 8.x was the same as 9.x, but was X11R4 instead (I don't know
6748       # whether R5 was available as a patch; R6 undoubtedly was not.)
6749       #
6750       # So.  We try and use the highest numbered pair of
6751       # /usr/{include,lib}/X11R?/ and /usr/contrib/X11R?/{include,lib}/
6752       # that are available.  We do not mix and match different versions
6753       # of X.
6754       #
6755       # Question I still don't know the answer to: (do you?)
6756       #
6757       #   * On HPUX 9.x, where /usr/include/X11R5/ was standard, and
6758       #     /usr/contrib/X11R6/ could be installed as a patch, what was in
6759       #     that contrib directory?  Did it contain so-called "standard"
6760       #     X11R6, or did it include Xaw and Xmu as well?  If the former,
6761       #     where did one find Xaw and Xmu on 9.x R6 systems?  Would this
6762       #     be a situation where one had to reach into the R5 headers and
6763       #     libs to find Xmu?  That is, must both R6 and R5 directories
6764       #     be on the -I and -L lists in that case?
6765       #
6766       for version in X11R6 X11R5 X11R4 ; do
6767         # if either pair of directories exists...
6768         if test -d /usr/include/$version || test -d /usr/contrib/$version/include
6769         then
6770            # if contrib exists, use it...
6771            if test -d /usr/contrib/$version/include ; then
6772              X_CFLAGS="$X_CFLAGS -I/usr/contrib/$version/include"
6773              X_LIBS="$X_LIBS -L/usr/contrib/$version/lib"
6774            fi
6775            # if the "standard" one exists, use it.
6776            if test -d /usr/include/$version ; then
6777              X_CFLAGS="$X_CFLAGS -I/usr/include/$version"
6778              X_LIBS="$X_LIBS -L/usr/lib/$version"
6779            fi
6780            # since at least one of the pair exists, go no farther.
6781            break
6782         fi
6783       done
6784
6785       # Now find Motif.  Thanks for not making xmkmf find this by
6786       # default, you losers.
6787       #
6788       if test -d /usr/include/Motif2.1 ; then
6789         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif2.1"
6790         X_LIBS="$X_LIBS -L/usr/lib/Motif2.1"
6791       elif test -d /usr/include/Motif1.2 ; then
6792         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.2"
6793         X_LIBS="$X_LIBS -L/usr/lib/Motif1.2"
6794       elif test -d /usr/include/Motif1.1 ; then
6795         X_CFLAGS="$X_CFLAGS -I/usr/include/Motif1.1"
6796         X_LIBS="$X_LIBS -L/usr/lib/Motif1.1"
6797       fi
6798
6799       # Now let's check for the pseudo-standard locations for OpenGL and XPM.
6800       #
6801       if test -d /opt/graphics/OpenGL/include ; then
6802         # HP-UX 10.20 puts it here
6803         X_CFLAGS="-I/opt/graphics/OpenGL/include $X_CFLAGS"
6804         X_LIBS="-L/opt/graphics/OpenGL/lib $X_LIBS"
6805       elif test -d /opt/Mesa/lib ; then
6806         X_CFLAGS="-I/opt/Mesa/include $X_CFLAGS"
6807         X_LIBS="-L/opt/Mesa/lib $X_LIBS"
6808       fi
6809
6810
6811       if test -d /opt/xpm/lib/X11 ; then
6812         X_CFLAGS="-I/opt/xpm/include $X_CFLAGS"
6813         X_LIBS="-L/opt/xpm/lib/X11 $X_LIBS"
6814       fi
6815
6816       # On HPUX, default to installing in /opt/xscreensaver/ instead of
6817       # in /usr/local/, unless there is already an xscreensaver in
6818       # /usr/local/bin/.  This can be overridden with the --prefix arg
6819       # to configure.  I'm not sure this is the right thing to do, but
6820       # Richard Lloyd says so...
6821       #
6822       if test \! -x /usr/local/bin/xscreensaver ; then
6823         ac_default_prefix=/opt/xscreensaver
6824       fi
6825
6826     ;;
6827     *-solaris*)
6828
6829       # Thanks for not making xmkmf find this by default, pinheads.
6830       # And thanks for moving things around again, too.  Is this
6831       # really the standard location now?  What happened to the
6832       # joke that this kind of thing went in /opt?
6833       # cthomp says "answer: CDE (Common Disorganized Environment)"
6834       #
6835       if test -f /usr/dt/include/Xm/Xm.h ; then
6836         X_CFLAGS="$X_CFLAGS -I/usr/dt/include"
6837         MOTIF_LIBS="$MOTIF_LIBS -L/usr/dt/lib -R/usr/dt/lib"
6838
6839         # Some versions of Slowlaris Motif require -lgen.  But not all.  Why?
6840         echo "$as_me:$LINENO: checking for regcmp in -lgen" >&5
6841 echo $ECHO_N "checking for regcmp in -lgen... $ECHO_C" >&6
6842 if test "${ac_cv_lib_gen_regcmp+set}" = set; then
6843   echo $ECHO_N "(cached) $ECHO_C" >&6
6844 else
6845   ac_check_lib_save_LIBS=$LIBS
6846 LIBS="-lgen  $LIBS"
6847 cat >conftest.$ac_ext <<_ACEOF
6848 /* confdefs.h.  */
6849 _ACEOF
6850 cat confdefs.h >>conftest.$ac_ext
6851 cat >>conftest.$ac_ext <<_ACEOF
6852 /* end confdefs.h.  */
6853
6854 /* Override any gcc2 internal prototype to avoid an error.  */
6855 #ifdef __cplusplus
6856 extern "C"
6857 #endif
6858 /* We use char because int might match the return type of a gcc2
6859    builtin and then its argument prototype would still apply.  */
6860 char regcmp ();
6861 int
6862 main ()
6863 {
6864 regcmp ();
6865   ;
6866   return 0;
6867 }
6868 _ACEOF
6869 rm -f conftest.$ac_objext conftest$ac_exeext
6870 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6871   (eval $ac_link) 2>conftest.er1
6872   ac_status=$?
6873   grep -v '^ *+' conftest.er1 >conftest.err
6874   rm -f conftest.er1
6875   cat conftest.err >&5
6876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6877   (exit $ac_status); } &&
6878          { ac_try='test -z "$ac_c_werror_flag"
6879                          || test ! -s conftest.err'
6880   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6881   (eval $ac_try) 2>&5
6882   ac_status=$?
6883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6884   (exit $ac_status); }; } &&
6885          { ac_try='test -s conftest$ac_exeext'
6886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6887   (eval $ac_try) 2>&5
6888   ac_status=$?
6889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6890   (exit $ac_status); }; }; then
6891   ac_cv_lib_gen_regcmp=yes
6892 else
6893   echo "$as_me: failed program was:" >&5
6894 sed 's/^/| /' conftest.$ac_ext >&5
6895
6896 ac_cv_lib_gen_regcmp=no
6897 fi
6898 rm -f conftest.err conftest.$ac_objext \
6899       conftest$ac_exeext conftest.$ac_ext
6900 LIBS=$ac_check_lib_save_LIBS
6901 fi
6902 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_regcmp" >&5
6903 echo "${ECHO_T}$ac_cv_lib_gen_regcmp" >&6
6904 if test $ac_cv_lib_gen_regcmp = yes; then
6905   MOTIF_LIBS="$MOTIF_LIBS -lgen"
6906 fi
6907
6908       fi
6909
6910     ;;
6911     *-darwin*)
6912
6913       # On MacOS X (10.x with "fink"), many things are under /sw/.
6914       #
6915       if test -d /sw/include ; then
6916         X_CFLAGS="-I/sw/include $X_CFLAGS"
6917         X_LIBS="-L/sw/lib $X_LIBS"
6918       fi
6919     ;;
6920   esac
6921 echo "$as_me:$LINENO: checking for XPointer" >&5
6922 echo $ECHO_N "checking for XPointer... $ECHO_C" >&6
6923 if test "${ac_cv_xpointer+set}" = set; then
6924   echo $ECHO_N "(cached) $ECHO_C" >&6
6925 else
6926
6927   ac_save_CPPFLAGS="$CPPFLAGS"
6928   if test \! -z "$includedir" ; then
6929     CPPFLAGS="$CPPFLAGS -I$includedir"
6930   fi
6931   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6932   cat >conftest.$ac_ext <<_ACEOF
6933 /* confdefs.h.  */
6934 _ACEOF
6935 cat confdefs.h >>conftest.$ac_ext
6936 cat >>conftest.$ac_ext <<_ACEOF
6937 /* end confdefs.h.  */
6938 #include <X11/Xlib.h>
6939 int
6940 main ()
6941 {
6942 XPointer foo = (XPointer) 0;
6943   ;
6944   return 0;
6945 }
6946 _ACEOF
6947 rm -f conftest.$ac_objext
6948 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6949   (eval $ac_compile) 2>conftest.er1
6950   ac_status=$?
6951   grep -v '^ *+' conftest.er1 >conftest.err
6952   rm -f conftest.er1
6953   cat conftest.err >&5
6954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6955   (exit $ac_status); } &&
6956          { ac_try='test -z "$ac_c_werror_flag"
6957                          || test ! -s conftest.err'
6958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6959   (eval $ac_try) 2>&5
6960   ac_status=$?
6961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6962   (exit $ac_status); }; } &&
6963          { ac_try='test -s conftest.$ac_objext'
6964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6965   (eval $ac_try) 2>&5
6966   ac_status=$?
6967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6968   (exit $ac_status); }; }; then
6969   ac_cv_xpointer=yes
6970 else
6971   echo "$as_me: failed program was:" >&5
6972 sed 's/^/| /' conftest.$ac_ext >&5
6973
6974 ac_cv_xpointer=no
6975 fi
6976 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6977   CPPFLAGS="$ac_save_CPPFLAGS"
6978 fi
6979 echo "$as_me:$LINENO: result: $ac_cv_xpointer" >&5
6980 echo "${ECHO_T}$ac_cv_xpointer" >&6
6981   if test "$ac_cv_xpointer" != yes; then
6982    cat >>confdefs.h <<\_ACEOF
6983 #define XPointer char*
6984 _ACEOF
6985
6986   fi
6987
6988 echo "$as_me:$LINENO: checking whether this is MacOS X" >&5
6989 echo $ECHO_N "checking whether this is MacOS X... $ECHO_C" >&6
6990   ac_macosx=no
6991   case "$host" in
6992     *-apple-darwin* )
6993       ac_macosx=yes
6994     ;;
6995   esac
6996 echo "$as_me:$LINENO: result: $ac_macosx" >&5
6997 echo "${ECHO_T}$ac_macosx" >&6
6998
6999
7000
7001 ###############################################################################
7002 #
7003 #       Gettext support
7004 #
7005 ###############################################################################
7006
7007
7008
7009 if test -n ""; then
7010     echo "$as_me:$LINENO: checking for intltool >= " >&5
7011 echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6
7012
7013     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo  | awk -F. '{ printf "%d", $1 * 100 + $2; }'`
7014     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $2; }'  < intltool-update.in`
7015
7016     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($2, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in`
7017
7018
7019     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
7020         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
7021 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6
7022     else
7023         echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&5
7024 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool  or later." >&6
7025         exit 1
7026     fi
7027 fi
7028
7029   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'
7030 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'
7031      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'
7032       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -o -p'
7033      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'
7034    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'
7035     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'
7036 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'
7037        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'
7038       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'
7039     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'
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053 # Use the tools built into the package, not the ones that are installed.
7054
7055 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
7056 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
7057 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
7058
7059
7060
7061
7062
7063 # Extract the first word of "perl", so it can be a program name with args.
7064 set dummy perl; ac_word=$2
7065 echo "$as_me:$LINENO: checking for $ac_word" >&5
7066 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7067 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
7068   echo $ECHO_N "(cached) $ECHO_C" >&6
7069 else
7070   case $INTLTOOL_PERL in
7071   [\\/]* | ?:[\\/]*)
7072   ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
7073   ;;
7074   *)
7075   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7076 for as_dir in $PATH
7077 do
7078   IFS=$as_save_IFS
7079   test -z "$as_dir" && as_dir=.
7080   for ac_exec_ext in '' $ac_executable_extensions; do
7081   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7082     ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
7083     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7084     break 2
7085   fi
7086 done
7087 done
7088
7089   ;;
7090 esac
7091 fi
7092 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
7093
7094 if test -n "$INTLTOOL_PERL"; then
7095   echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
7096 echo "${ECHO_T}$INTLTOOL_PERL" >&6
7097 else
7098   echo "$as_me:$LINENO: result: no" >&5
7099 echo "${ECHO_T}no" >&6
7100 fi
7101
7102 if test -z "$INTLTOOL_PERL"; then
7103    { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
7104 echo "$as_me: error: perl not found; required for intltool" >&2;}
7105    { (exit 1); exit 1; }; }
7106 fi
7107 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
7108    { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
7109 echo "$as_me: error: perl 5.x required for intltool" >&2;}
7110    { (exit 1); exit 1; }; }
7111 fi
7112
7113 # Remove file type tags (using []) from po/POTFILES.
7114
7115
7116
7117
7118
7119
7120
7121 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7122
7123           ac_config_commands="$ac_config_commands default-1"
7124
7125
7126
7127 GETTEXT_PACKAGE=xscreensaver
7128 cat >>confdefs.h <<_ACEOF
7129 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
7130 _ACEOF
7131
7132 cat >>confdefs.h <<_ACEOF
7133 #define PACKAGE "$GETTEXT_PACKAGE"
7134 _ACEOF
7135
7136
7137
7138 ALL_LINGUAS="ca da de es et fi fr hu it ja ko nl no pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
7139 if test -n "$ac_tool_prefix"; then
7140   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7141 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7142 echo "$as_me:$LINENO: checking for $ac_word" >&5
7143 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7144 if test "${ac_cv_prog_RANLIB+set}" = set; then
7145   echo $ECHO_N "(cached) $ECHO_C" >&6
7146 else
7147   if test -n "$RANLIB"; then
7148   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7149 else
7150 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7151 for as_dir in $PATH
7152 do
7153   IFS=$as_save_IFS
7154   test -z "$as_dir" && as_dir=.
7155   for ac_exec_ext in '' $ac_executable_extensions; do
7156   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7157     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7158     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7159     break 2
7160   fi
7161 done
7162 done
7163
7164 fi
7165 fi
7166 RANLIB=$ac_cv_prog_RANLIB
7167 if test -n "$RANLIB"; then
7168   echo "$as_me:$LINENO: result: $RANLIB" >&5
7169 echo "${ECHO_T}$RANLIB" >&6
7170 else
7171   echo "$as_me:$LINENO: result: no" >&5
7172 echo "${ECHO_T}no" >&6
7173 fi
7174
7175 fi
7176 if test -z "$ac_cv_prog_RANLIB"; then
7177   ac_ct_RANLIB=$RANLIB
7178   # Extract the first word of "ranlib", so it can be a program name with args.
7179 set dummy ranlib; ac_word=$2
7180 echo "$as_me:$LINENO: checking for $ac_word" >&5
7181 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7182 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7183   echo $ECHO_N "(cached) $ECHO_C" >&6
7184 else
7185   if test -n "$ac_ct_RANLIB"; then
7186   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7187 else
7188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7189 for as_dir in $PATH
7190 do
7191   IFS=$as_save_IFS
7192   test -z "$as_dir" && as_dir=.
7193   for ac_exec_ext in '' $ac_executable_extensions; do
7194   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7195     ac_cv_prog_ac_ct_RANLIB="ranlib"
7196     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7197     break 2
7198   fi
7199 done
7200 done
7201
7202   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7203 fi
7204 fi
7205 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7206 if test -n "$ac_ct_RANLIB"; then
7207   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7208 echo "${ECHO_T}$ac_ct_RANLIB" >&6
7209 else
7210   echo "$as_me:$LINENO: result: no" >&5
7211 echo "${ECHO_T}no" >&6
7212 fi
7213
7214   RANLIB=$ac_ct_RANLIB
7215 else
7216   RANLIB="$ac_cv_prog_RANLIB"
7217 fi
7218
7219 echo "$as_me:$LINENO: checking for off_t" >&5
7220 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
7221 if test "${ac_cv_type_off_t+set}" = set; then
7222   echo $ECHO_N "(cached) $ECHO_C" >&6
7223 else
7224   cat >conftest.$ac_ext <<_ACEOF
7225 /* confdefs.h.  */
7226 _ACEOF
7227 cat confdefs.h >>conftest.$ac_ext
7228 cat >>conftest.$ac_ext <<_ACEOF
7229 /* end confdefs.h.  */
7230 $ac_includes_default
7231 int
7232 main ()
7233 {
7234 if ((off_t *) 0)
7235   return 0;
7236 if (sizeof (off_t))
7237   return 0;
7238   ;
7239   return 0;
7240 }
7241 _ACEOF
7242 rm -f conftest.$ac_objext
7243 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7244   (eval $ac_compile) 2>conftest.er1
7245   ac_status=$?
7246   grep -v '^ *+' conftest.er1 >conftest.err
7247   rm -f conftest.er1
7248   cat conftest.err >&5
7249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7250   (exit $ac_status); } &&
7251          { ac_try='test -z "$ac_c_werror_flag"
7252                          || test ! -s conftest.err'
7253   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7254   (eval $ac_try) 2>&5
7255   ac_status=$?
7256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7257   (exit $ac_status); }; } &&
7258          { ac_try='test -s conftest.$ac_objext'
7259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7260   (eval $ac_try) 2>&5
7261   ac_status=$?
7262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7263   (exit $ac_status); }; }; then
7264   ac_cv_type_off_t=yes
7265 else
7266   echo "$as_me: failed program was:" >&5
7267 sed 's/^/| /' conftest.$ac_ext >&5
7268
7269 ac_cv_type_off_t=no
7270 fi
7271 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7272 fi
7273 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
7274 echo "${ECHO_T}$ac_cv_type_off_t" >&6
7275 if test $ac_cv_type_off_t = yes; then
7276   :
7277 else
7278
7279 cat >>confdefs.h <<_ACEOF
7280 #define off_t long
7281 _ACEOF
7282
7283 fi
7284
7285 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7286 # for constant arguments.  Useless!
7287 echo "$as_me:$LINENO: checking for working alloca.h" >&5
7288 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7289 if test "${ac_cv_working_alloca_h+set}" = set; then
7290   echo $ECHO_N "(cached) $ECHO_C" >&6
7291 else
7292   cat >conftest.$ac_ext <<_ACEOF
7293 /* confdefs.h.  */
7294 _ACEOF
7295 cat confdefs.h >>conftest.$ac_ext
7296 cat >>conftest.$ac_ext <<_ACEOF
7297 /* end confdefs.h.  */
7298 #include <alloca.h>
7299 int
7300 main ()
7301 {
7302 char *p = (char *) alloca (2 * sizeof (int));
7303   ;
7304   return 0;
7305 }
7306 _ACEOF
7307 rm -f conftest.$ac_objext conftest$ac_exeext
7308 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7309   (eval $ac_link) 2>conftest.er1
7310   ac_status=$?
7311   grep -v '^ *+' conftest.er1 >conftest.err
7312   rm -f conftest.er1
7313   cat conftest.err >&5
7314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7315   (exit $ac_status); } &&
7316          { ac_try='test -z "$ac_c_werror_flag"
7317                          || test ! -s conftest.err'
7318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7319   (eval $ac_try) 2>&5
7320   ac_status=$?
7321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7322   (exit $ac_status); }; } &&
7323          { ac_try='test -s conftest$ac_exeext'
7324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7325   (eval $ac_try) 2>&5
7326   ac_status=$?
7327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328   (exit $ac_status); }; }; then
7329   ac_cv_working_alloca_h=yes
7330 else
7331   echo "$as_me: failed program was:" >&5
7332 sed 's/^/| /' conftest.$ac_ext >&5
7333
7334 ac_cv_working_alloca_h=no
7335 fi
7336 rm -f conftest.err conftest.$ac_objext \
7337       conftest$ac_exeext conftest.$ac_ext
7338 fi
7339 echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
7340 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7341 if test $ac_cv_working_alloca_h = yes; then
7342
7343 cat >>confdefs.h <<\_ACEOF
7344 #define HAVE_ALLOCA_H 1
7345 _ACEOF
7346
7347 fi
7348
7349 echo "$as_me:$LINENO: checking for alloca" >&5
7350 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7351 if test "${ac_cv_func_alloca_works+set}" = set; then
7352   echo $ECHO_N "(cached) $ECHO_C" >&6
7353 else
7354   cat >conftest.$ac_ext <<_ACEOF
7355 /* confdefs.h.  */
7356 _ACEOF
7357 cat confdefs.h >>conftest.$ac_ext
7358 cat >>conftest.$ac_ext <<_ACEOF
7359 /* end confdefs.h.  */
7360 #ifdef __GNUC__
7361 # define alloca __builtin_alloca
7362 #else
7363 # ifdef _MSC_VER
7364 #  include <malloc.h>
7365 #  define alloca _alloca
7366 # else
7367 #  if HAVE_ALLOCA_H
7368 #   include <alloca.h>
7369 #  else
7370 #   ifdef _AIX
7371  #pragma alloca
7372 #   else
7373 #    ifndef alloca /* predefined by HP cc +Olibcalls */
7374 char *alloca ();
7375 #    endif
7376 #   endif
7377 #  endif
7378 # endif
7379 #endif
7380
7381 int
7382 main ()
7383 {
7384 char *p = (char *) alloca (1);
7385   ;
7386   return 0;
7387 }
7388 _ACEOF
7389 rm -f conftest.$ac_objext conftest$ac_exeext
7390 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7391   (eval $ac_link) 2>conftest.er1
7392   ac_status=$?
7393   grep -v '^ *+' conftest.er1 >conftest.err
7394   rm -f conftest.er1
7395   cat conftest.err >&5
7396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7397   (exit $ac_status); } &&
7398          { ac_try='test -z "$ac_c_werror_flag"
7399                          || test ! -s conftest.err'
7400   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7401   (eval $ac_try) 2>&5
7402   ac_status=$?
7403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7404   (exit $ac_status); }; } &&
7405          { ac_try='test -s conftest$ac_exeext'
7406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7407   (eval $ac_try) 2>&5
7408   ac_status=$?
7409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7410   (exit $ac_status); }; }; then
7411   ac_cv_func_alloca_works=yes
7412 else
7413   echo "$as_me: failed program was:" >&5
7414 sed 's/^/| /' conftest.$ac_ext >&5
7415
7416 ac_cv_func_alloca_works=no
7417 fi
7418 rm -f conftest.err conftest.$ac_objext \
7419       conftest$ac_exeext conftest.$ac_ext
7420 fi
7421 echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
7422 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
7423
7424 if test $ac_cv_func_alloca_works = yes; then
7425
7426 cat >>confdefs.h <<\_ACEOF
7427 #define HAVE_ALLOCA 1
7428 _ACEOF
7429
7430 else
7431   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7432 # that cause trouble.  Some versions do not even contain alloca or
7433 # contain a buggy version.  If you still want to use their alloca,
7434 # use ar to extract alloca.o from them instead of compiling alloca.c.
7435
7436 ALLOCA=alloca.$ac_objext
7437
7438 cat >>confdefs.h <<\_ACEOF
7439 #define C_ALLOCA 1
7440 _ACEOF
7441
7442
7443 echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
7444 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
7445 if test "${ac_cv_os_cray+set}" = set; then
7446   echo $ECHO_N "(cached) $ECHO_C" >&6
7447 else
7448   cat >conftest.$ac_ext <<_ACEOF
7449 /* confdefs.h.  */
7450 _ACEOF
7451 cat confdefs.h >>conftest.$ac_ext
7452 cat >>conftest.$ac_ext <<_ACEOF
7453 /* end confdefs.h.  */
7454 #if defined(CRAY) && ! defined(CRAY2)
7455 webecray
7456 #else
7457 wenotbecray
7458 #endif
7459
7460 _ACEOF
7461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7462   $EGREP "webecray" >/dev/null 2>&1; then
7463   ac_cv_os_cray=yes
7464 else
7465   ac_cv_os_cray=no
7466 fi
7467 rm -f conftest*
7468
7469 fi
7470 echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
7471 echo "${ECHO_T}$ac_cv_os_cray" >&6
7472 if test $ac_cv_os_cray = yes; then
7473   for ac_func in _getb67 GETB67 getb67; do
7474     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7475 echo "$as_me:$LINENO: checking for $ac_func" >&5
7476 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7477 if eval "test \"\${$as_ac_var+set}\" = set"; then
7478   echo $ECHO_N "(cached) $ECHO_C" >&6
7479 else
7480   cat >conftest.$ac_ext <<_ACEOF
7481 /* confdefs.h.  */
7482 _ACEOF
7483 cat confdefs.h >>conftest.$ac_ext
7484 cat >>conftest.$ac_ext <<_ACEOF
7485 /* end confdefs.h.  */
7486 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7487    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7488 #define $ac_func innocuous_$ac_func
7489
7490 /* System header to define __stub macros and hopefully few prototypes,
7491     which can conflict with char $ac_func (); below.
7492     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7493     <limits.h> exists even on freestanding compilers.  */
7494
7495 #ifdef __STDC__
7496 # include <limits.h>
7497 #else
7498 # include <assert.h>
7499 #endif
7500
7501 #undef $ac_func
7502
7503 /* Override any gcc2 internal prototype to avoid an error.  */
7504 #ifdef __cplusplus
7505 extern "C"
7506 {
7507 #endif
7508 /* We use char because int might match the return type of a gcc2
7509    builtin and then its argument prototype would still apply.  */
7510 char $ac_func ();
7511 /* The GNU C library defines this for functions which it implements
7512     to always fail with ENOSYS.  Some functions are actually named
7513     something starting with __ and the normal name is an alias.  */
7514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7515 choke me
7516 #else
7517 char (*f) () = $ac_func;
7518 #endif
7519 #ifdef __cplusplus
7520 }
7521 #endif
7522
7523 int
7524 main ()
7525 {
7526 return f != $ac_func;
7527   ;
7528   return 0;
7529 }
7530 _ACEOF
7531 rm -f conftest.$ac_objext conftest$ac_exeext
7532 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7533   (eval $ac_link) 2>conftest.er1
7534   ac_status=$?
7535   grep -v '^ *+' conftest.er1 >conftest.err
7536   rm -f conftest.er1
7537   cat conftest.err >&5
7538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7539   (exit $ac_status); } &&
7540          { ac_try='test -z "$ac_c_werror_flag"
7541                          || test ! -s conftest.err'
7542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7543   (eval $ac_try) 2>&5
7544   ac_status=$?
7545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7546   (exit $ac_status); }; } &&
7547          { ac_try='test -s conftest$ac_exeext'
7548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7549   (eval $ac_try) 2>&5
7550   ac_status=$?
7551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7552   (exit $ac_status); }; }; then
7553   eval "$as_ac_var=yes"
7554 else
7555   echo "$as_me: failed program was:" >&5
7556 sed 's/^/| /' conftest.$ac_ext >&5
7557
7558 eval "$as_ac_var=no"
7559 fi
7560 rm -f conftest.err conftest.$ac_objext \
7561       conftest$ac_exeext conftest.$ac_ext
7562 fi
7563 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7564 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7565 if test `eval echo '${'$as_ac_var'}'` = yes; then
7566
7567 cat >>confdefs.h <<_ACEOF
7568 #define CRAY_STACKSEG_END $ac_func
7569 _ACEOF
7570
7571     break
7572 fi
7573
7574   done
7575 fi
7576
7577 echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
7578 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7579 if test "${ac_cv_c_stack_direction+set}" = set; then
7580   echo $ECHO_N "(cached) $ECHO_C" >&6
7581 else
7582   if test "$cross_compiling" = yes; then
7583   ac_cv_c_stack_direction=0
7584 else
7585   cat >conftest.$ac_ext <<_ACEOF
7586 /* confdefs.h.  */
7587 _ACEOF
7588 cat confdefs.h >>conftest.$ac_ext
7589 cat >>conftest.$ac_ext <<_ACEOF
7590 /* end confdefs.h.  */
7591 int
7592 find_stack_direction ()
7593 {
7594   static char *addr = 0;
7595   auto char dummy;
7596   if (addr == 0)
7597     {
7598       addr = &dummy;
7599       return find_stack_direction ();
7600     }
7601   else
7602     return (&dummy > addr) ? 1 : -1;
7603 }
7604
7605 int
7606 main ()
7607 {
7608   exit (find_stack_direction () < 0);
7609 }
7610 _ACEOF
7611 rm -f conftest$ac_exeext
7612 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7613   (eval $ac_link) 2>&5
7614   ac_status=$?
7615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7616   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7618   (eval $ac_try) 2>&5
7619   ac_status=$?
7620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7621   (exit $ac_status); }; }; then
7622   ac_cv_c_stack_direction=1
7623 else
7624   echo "$as_me: program exited with status $ac_status" >&5
7625 echo "$as_me: failed program was:" >&5
7626 sed 's/^/| /' conftest.$ac_ext >&5
7627
7628 ( exit $ac_status )
7629 ac_cv_c_stack_direction=-1
7630 fi
7631 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7632 fi
7633 fi
7634 echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
7635 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
7636
7637 cat >>confdefs.h <<_ACEOF
7638 #define STACK_DIRECTION $ac_cv_c_stack_direction
7639 _ACEOF
7640
7641
7642 fi
7643
7644
7645
7646 for ac_header in stdlib.h unistd.h
7647 do
7648 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7649 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7650   echo "$as_me:$LINENO: checking for $ac_header" >&5
7651 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7652 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7653   echo $ECHO_N "(cached) $ECHO_C" >&6
7654 fi
7655 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7656 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7657 else
7658   # Is the header compilable?
7659 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7660 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7661 cat >conftest.$ac_ext <<_ACEOF
7662 /* confdefs.h.  */
7663 _ACEOF
7664 cat confdefs.h >>conftest.$ac_ext
7665 cat >>conftest.$ac_ext <<_ACEOF
7666 /* end confdefs.h.  */
7667 $ac_includes_default
7668 #include <$ac_header>
7669 _ACEOF
7670 rm -f conftest.$ac_objext
7671 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7672   (eval $ac_compile) 2>conftest.er1
7673   ac_status=$?
7674   grep -v '^ *+' conftest.er1 >conftest.err
7675   rm -f conftest.er1
7676   cat conftest.err >&5
7677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7678   (exit $ac_status); } &&
7679          { ac_try='test -z "$ac_c_werror_flag"
7680                          || test ! -s conftest.err'
7681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7682   (eval $ac_try) 2>&5
7683   ac_status=$?
7684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7685   (exit $ac_status); }; } &&
7686          { ac_try='test -s conftest.$ac_objext'
7687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7688   (eval $ac_try) 2>&5
7689   ac_status=$?
7690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7691   (exit $ac_status); }; }; then
7692   ac_header_compiler=yes
7693 else
7694   echo "$as_me: failed program was:" >&5
7695 sed 's/^/| /' conftest.$ac_ext >&5
7696
7697 ac_header_compiler=no
7698 fi
7699 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7700 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7701 echo "${ECHO_T}$ac_header_compiler" >&6
7702
7703 # Is the header present?
7704 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7705 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7706 cat >conftest.$ac_ext <<_ACEOF
7707 /* confdefs.h.  */
7708 _ACEOF
7709 cat confdefs.h >>conftest.$ac_ext
7710 cat >>conftest.$ac_ext <<_ACEOF
7711 /* end confdefs.h.  */
7712 #include <$ac_header>
7713 _ACEOF
7714 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7715   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7716   ac_status=$?
7717   grep -v '^ *+' conftest.er1 >conftest.err
7718   rm -f conftest.er1
7719   cat conftest.err >&5
7720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7721   (exit $ac_status); } >/dev/null; then
7722   if test -s conftest.err; then
7723     ac_cpp_err=$ac_c_preproc_warn_flag
7724     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7725   else
7726     ac_cpp_err=
7727   fi
7728 else
7729   ac_cpp_err=yes
7730 fi
7731 if test -z "$ac_cpp_err"; then
7732   ac_header_preproc=yes
7733 else
7734   echo "$as_me: failed program was:" >&5
7735 sed 's/^/| /' conftest.$ac_ext >&5
7736
7737   ac_header_preproc=no
7738 fi
7739 rm -f conftest.err conftest.$ac_ext
7740 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7741 echo "${ECHO_T}$ac_header_preproc" >&6
7742
7743 # So?  What about this header?
7744 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7745   yes:no: )
7746     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7747 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7748     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7749 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7750     ac_header_preproc=yes
7751     ;;
7752   no:yes:* )
7753     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7754 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7755     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7756 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7757     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7758 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7759     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7760 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7761     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7762 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7763     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7764 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7765     (
7766       cat <<\_ASBOX
7767 ## ------------------------------------------ ##
7768 ## Report this to the AC_PACKAGE_NAME lists.  ##
7769 ## ------------------------------------------ ##
7770 _ASBOX
7771     ) |
7772       sed "s/^/$as_me: WARNING:     /" >&2
7773     ;;
7774 esac
7775 echo "$as_me:$LINENO: checking for $ac_header" >&5
7776 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7777 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7778   echo $ECHO_N "(cached) $ECHO_C" >&6
7779 else
7780   eval "$as_ac_Header=\$ac_header_preproc"
7781 fi
7782 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7783 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7784
7785 fi
7786 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7787   cat >>confdefs.h <<_ACEOF
7788 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7789 _ACEOF
7790
7791 fi
7792
7793 done
7794
7795
7796 for ac_func in getpagesize
7797 do
7798 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7799 echo "$as_me:$LINENO: checking for $ac_func" >&5
7800 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7801 if eval "test \"\${$as_ac_var+set}\" = set"; then
7802   echo $ECHO_N "(cached) $ECHO_C" >&6
7803 else
7804   cat >conftest.$ac_ext <<_ACEOF
7805 /* confdefs.h.  */
7806 _ACEOF
7807 cat confdefs.h >>conftest.$ac_ext
7808 cat >>conftest.$ac_ext <<_ACEOF
7809 /* end confdefs.h.  */
7810 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7811    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7812 #define $ac_func innocuous_$ac_func
7813
7814 /* System header to define __stub macros and hopefully few prototypes,
7815     which can conflict with char $ac_func (); below.
7816     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7817     <limits.h> exists even on freestanding compilers.  */
7818
7819 #ifdef __STDC__
7820 # include <limits.h>
7821 #else
7822 # include <assert.h>
7823 #endif
7824
7825 #undef $ac_func
7826
7827 /* Override any gcc2 internal prototype to avoid an error.  */
7828 #ifdef __cplusplus
7829 extern "C"
7830 {
7831 #endif
7832 /* We use char because int might match the return type of a gcc2
7833    builtin and then its argument prototype would still apply.  */
7834 char $ac_func ();
7835 /* The GNU C library defines this for functions which it implements
7836     to always fail with ENOSYS.  Some functions are actually named
7837     something starting with __ and the normal name is an alias.  */
7838 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7839 choke me
7840 #else
7841 char (*f) () = $ac_func;
7842 #endif
7843 #ifdef __cplusplus
7844 }
7845 #endif
7846
7847 int
7848 main ()
7849 {
7850 return f != $ac_func;
7851   ;
7852   return 0;
7853 }
7854 _ACEOF
7855 rm -f conftest.$ac_objext conftest$ac_exeext
7856 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7857   (eval $ac_link) 2>conftest.er1
7858   ac_status=$?
7859   grep -v '^ *+' conftest.er1 >conftest.err
7860   rm -f conftest.er1
7861   cat conftest.err >&5
7862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7863   (exit $ac_status); } &&
7864          { ac_try='test -z "$ac_c_werror_flag"
7865                          || test ! -s conftest.err'
7866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7867   (eval $ac_try) 2>&5
7868   ac_status=$?
7869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7870   (exit $ac_status); }; } &&
7871          { ac_try='test -s conftest$ac_exeext'
7872   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7873   (eval $ac_try) 2>&5
7874   ac_status=$?
7875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7876   (exit $ac_status); }; }; then
7877   eval "$as_ac_var=yes"
7878 else
7879   echo "$as_me: failed program was:" >&5
7880 sed 's/^/| /' conftest.$ac_ext >&5
7881
7882 eval "$as_ac_var=no"
7883 fi
7884 rm -f conftest.err conftest.$ac_objext \
7885       conftest$ac_exeext conftest.$ac_ext
7886 fi
7887 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7888 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7889 if test `eval echo '${'$as_ac_var'}'` = yes; then
7890   cat >>confdefs.h <<_ACEOF
7891 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7892 _ACEOF
7893
7894 fi
7895 done
7896
7897 echo "$as_me:$LINENO: checking for working mmap" >&5
7898 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7899 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7900   echo $ECHO_N "(cached) $ECHO_C" >&6
7901 else
7902   if test "$cross_compiling" = yes; then
7903   ac_cv_func_mmap_fixed_mapped=no
7904 else
7905   cat >conftest.$ac_ext <<_ACEOF
7906 /* confdefs.h.  */
7907 _ACEOF
7908 cat confdefs.h >>conftest.$ac_ext
7909 cat >>conftest.$ac_ext <<_ACEOF
7910 /* end confdefs.h.  */
7911 $ac_includes_default
7912 /* malloc might have been renamed as rpl_malloc. */
7913 #undef malloc
7914
7915 /* Thanks to Mike Haertel and Jim Avera for this test.
7916    Here is a matrix of mmap possibilities:
7917         mmap private not fixed
7918         mmap private fixed at somewhere currently unmapped
7919         mmap private fixed at somewhere already mapped
7920         mmap shared not fixed
7921         mmap shared fixed at somewhere currently unmapped
7922         mmap shared fixed at somewhere already mapped
7923    For private mappings, we should verify that changes cannot be read()
7924    back from the file, nor mmap's back from the file at a different
7925    address.  (There have been systems where private was not correctly
7926    implemented like the infamous i386 svr4.0, and systems where the
7927    VM page cache was not coherent with the file system buffer cache
7928    like early versions of FreeBSD and possibly contemporary NetBSD.)
7929    For shared mappings, we should conversely verify that changes get
7930    propagated back to all the places they're supposed to be.
7931
7932    Grep wants private fixed already mapped.
7933    The main things grep needs to know about mmap are:
7934    * does it exist and is it safe to write into the mmap'd area
7935    * how to use it (BSD variants)  */
7936
7937 #include <fcntl.h>
7938 #include <sys/mman.h>
7939
7940 #if !STDC_HEADERS && !HAVE_STDLIB_H
7941 char *malloc ();
7942 #endif
7943
7944 /* This mess was copied from the GNU getpagesize.h.  */
7945 #if !HAVE_GETPAGESIZE
7946 /* Assume that all systems that can run configure have sys/param.h.  */
7947 # if !HAVE_SYS_PARAM_H
7948 #  define HAVE_SYS_PARAM_H 1
7949 # endif
7950
7951 # ifdef _SC_PAGESIZE
7952 #  define getpagesize() sysconf(_SC_PAGESIZE)
7953 # else /* no _SC_PAGESIZE */
7954 #  if HAVE_SYS_PARAM_H
7955 #   include <sys/param.h>
7956 #   ifdef EXEC_PAGESIZE
7957 #    define getpagesize() EXEC_PAGESIZE
7958 #   else /* no EXEC_PAGESIZE */
7959 #    ifdef NBPG
7960 #     define getpagesize() NBPG * CLSIZE
7961 #     ifndef CLSIZE
7962 #      define CLSIZE 1
7963 #     endif /* no CLSIZE */
7964 #    else /* no NBPG */
7965 #     ifdef NBPC
7966 #      define getpagesize() NBPC
7967 #     else /* no NBPC */
7968 #      ifdef PAGESIZE
7969 #       define getpagesize() PAGESIZE
7970 #      endif /* PAGESIZE */
7971 #     endif /* no NBPC */
7972 #    endif /* no NBPG */
7973 #   endif /* no EXEC_PAGESIZE */
7974 #  else /* no HAVE_SYS_PARAM_H */
7975 #   define getpagesize() 8192   /* punt totally */
7976 #  endif /* no HAVE_SYS_PARAM_H */
7977 # endif /* no _SC_PAGESIZE */
7978
7979 #endif /* no HAVE_GETPAGESIZE */
7980
7981 int
7982 main ()
7983 {
7984   char *data, *data2, *data3;
7985   int i, pagesize;
7986   int fd;
7987
7988   pagesize = getpagesize ();
7989
7990   /* First, make a file with some known garbage in it. */
7991   data = (char *) malloc (pagesize);
7992   if (!data)
7993     exit (1);
7994   for (i = 0; i < pagesize; ++i)
7995     *(data + i) = rand ();
7996   umask (0);
7997   fd = creat ("conftest.mmap", 0600);
7998   if (fd < 0)
7999     exit (1);
8000   if (write (fd, data, pagesize) != pagesize)
8001     exit (1);
8002   close (fd);
8003
8004   /* Next, try to mmap the file at a fixed address which already has
8005      something else allocated at it.  If we can, also make sure that
8006      we see the same garbage.  */
8007   fd = open ("conftest.mmap", O_RDWR);
8008   if (fd < 0)
8009     exit (1);
8010   data2 = (char *) malloc (2 * pagesize);
8011   if (!data2)
8012     exit (1);
8013   data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
8014   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8015                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
8016     exit (1);
8017   for (i = 0; i < pagesize; ++i)
8018     if (*(data + i) != *(data2 + i))
8019       exit (1);
8020
8021   /* Finally, make sure that changes to the mapped area do not
8022      percolate back to the file as seen by read().  (This is a bug on
8023      some variants of i386 svr4.0.)  */
8024   for (i = 0; i < pagesize; ++i)
8025     *(data2 + i) = *(data2 + i) + 1;
8026   data3 = (char *) malloc (pagesize);
8027   if (!data3)
8028     exit (1);
8029   if (read (fd, data3, pagesize) != pagesize)
8030     exit (1);
8031   for (i = 0; i < pagesize; ++i)
8032     if (*(data + i) != *(data3 + i))
8033       exit (1);
8034   close (fd);
8035   exit (0);
8036 }
8037 _ACEOF
8038 rm -f conftest$ac_exeext
8039 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8040   (eval $ac_link) 2>&5
8041   ac_status=$?
8042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8043   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8045   (eval $ac_try) 2>&5
8046   ac_status=$?
8047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8048   (exit $ac_status); }; }; then
8049   ac_cv_func_mmap_fixed_mapped=yes
8050 else
8051   echo "$as_me: program exited with status $ac_status" >&5
8052 echo "$as_me: failed program was:" >&5
8053 sed 's/^/| /' conftest.$ac_ext >&5
8054
8055 ( exit $ac_status )
8056 ac_cv_func_mmap_fixed_mapped=no
8057 fi
8058 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8059 fi
8060 fi
8061 echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8062 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8063 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8064
8065 cat >>confdefs.h <<\_ACEOF
8066 #define HAVE_MMAP 1
8067 _ACEOF
8068
8069 fi
8070 rm -f conftest.mmap
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
8082 unistd.h sys/param.h
8083 do
8084 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8085 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8086   echo "$as_me:$LINENO: checking for $ac_header" >&5
8087 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8088 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8089   echo $ECHO_N "(cached) $ECHO_C" >&6
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 else
8094   # Is the header compilable?
8095 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8096 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8097 cat >conftest.$ac_ext <<_ACEOF
8098 /* confdefs.h.  */
8099 _ACEOF
8100 cat confdefs.h >>conftest.$ac_ext
8101 cat >>conftest.$ac_ext <<_ACEOF
8102 /* end confdefs.h.  */
8103 $ac_includes_default
8104 #include <$ac_header>
8105 _ACEOF
8106 rm -f conftest.$ac_objext
8107 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8108   (eval $ac_compile) 2>conftest.er1
8109   ac_status=$?
8110   grep -v '^ *+' conftest.er1 >conftest.err
8111   rm -f conftest.er1
8112   cat conftest.err >&5
8113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8114   (exit $ac_status); } &&
8115          { ac_try='test -z "$ac_c_werror_flag"
8116                          || test ! -s conftest.err'
8117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8118   (eval $ac_try) 2>&5
8119   ac_status=$?
8120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8121   (exit $ac_status); }; } &&
8122          { ac_try='test -s conftest.$ac_objext'
8123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8124   (eval $ac_try) 2>&5
8125   ac_status=$?
8126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8127   (exit $ac_status); }; }; then
8128   ac_header_compiler=yes
8129 else
8130   echo "$as_me: failed program was:" >&5
8131 sed 's/^/| /' conftest.$ac_ext >&5
8132
8133 ac_header_compiler=no
8134 fi
8135 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8136 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8137 echo "${ECHO_T}$ac_header_compiler" >&6
8138
8139 # Is the header present?
8140 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8141 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8142 cat >conftest.$ac_ext <<_ACEOF
8143 /* confdefs.h.  */
8144 _ACEOF
8145 cat confdefs.h >>conftest.$ac_ext
8146 cat >>conftest.$ac_ext <<_ACEOF
8147 /* end confdefs.h.  */
8148 #include <$ac_header>
8149 _ACEOF
8150 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8151   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8152   ac_status=$?
8153   grep -v '^ *+' conftest.er1 >conftest.err
8154   rm -f conftest.er1
8155   cat conftest.err >&5
8156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8157   (exit $ac_status); } >/dev/null; then
8158   if test -s conftest.err; then
8159     ac_cpp_err=$ac_c_preproc_warn_flag
8160     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8161   else
8162     ac_cpp_err=
8163   fi
8164 else
8165   ac_cpp_err=yes
8166 fi
8167 if test -z "$ac_cpp_err"; then
8168   ac_header_preproc=yes
8169 else
8170   echo "$as_me: failed program was:" >&5
8171 sed 's/^/| /' conftest.$ac_ext >&5
8172
8173   ac_header_preproc=no
8174 fi
8175 rm -f conftest.err conftest.$ac_ext
8176 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8177 echo "${ECHO_T}$ac_header_preproc" >&6
8178
8179 # So?  What about this header?
8180 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8181   yes:no: )
8182     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8183 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8184     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8185 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8186     ac_header_preproc=yes
8187     ;;
8188   no:yes:* )
8189     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8190 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8191     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8192 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8193     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8194 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8195     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8196 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8197     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8198 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8199     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8200 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8201     (
8202       cat <<\_ASBOX
8203 ## ------------------------------------------ ##
8204 ## Report this to the AC_PACKAGE_NAME lists.  ##
8205 ## ------------------------------------------ ##
8206 _ASBOX
8207     ) |
8208       sed "s/^/$as_me: WARNING:     /" >&2
8209     ;;
8210 esac
8211 echo "$as_me:$LINENO: checking for $ac_header" >&5
8212 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8213 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8214   echo $ECHO_N "(cached) $ECHO_C" >&6
8215 else
8216   eval "$as_ac_Header=\$ac_header_preproc"
8217 fi
8218 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8219 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8220
8221 fi
8222 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8223   cat >>confdefs.h <<_ACEOF
8224 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8225 _ACEOF
8226
8227 fi
8228
8229 done
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
8243 strdup __argz_count __argz_stringify __argz_next
8244 do
8245 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8246 echo "$as_me:$LINENO: checking for $ac_func" >&5
8247 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8248 if eval "test \"\${$as_ac_var+set}\" = set"; then
8249   echo $ECHO_N "(cached) $ECHO_C" >&6
8250 else
8251   cat >conftest.$ac_ext <<_ACEOF
8252 /* confdefs.h.  */
8253 _ACEOF
8254 cat confdefs.h >>conftest.$ac_ext
8255 cat >>conftest.$ac_ext <<_ACEOF
8256 /* end confdefs.h.  */
8257 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8258    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8259 #define $ac_func innocuous_$ac_func
8260
8261 /* System header to define __stub macros and hopefully few prototypes,
8262     which can conflict with char $ac_func (); below.
8263     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8264     <limits.h> exists even on freestanding compilers.  */
8265
8266 #ifdef __STDC__
8267 # include <limits.h>
8268 #else
8269 # include <assert.h>
8270 #endif
8271
8272 #undef $ac_func
8273
8274 /* Override any gcc2 internal prototype to avoid an error.  */
8275 #ifdef __cplusplus
8276 extern "C"
8277 {
8278 #endif
8279 /* We use char because int might match the return type of a gcc2
8280    builtin and then its argument prototype would still apply.  */
8281 char $ac_func ();
8282 /* The GNU C library defines this for functions which it implements
8283     to always fail with ENOSYS.  Some functions are actually named
8284     something starting with __ and the normal name is an alias.  */
8285 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8286 choke me
8287 #else
8288 char (*f) () = $ac_func;
8289 #endif
8290 #ifdef __cplusplus
8291 }
8292 #endif
8293
8294 int
8295 main ()
8296 {
8297 return f != $ac_func;
8298   ;
8299   return 0;
8300 }
8301 _ACEOF
8302 rm -f conftest.$ac_objext conftest$ac_exeext
8303 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8304   (eval $ac_link) 2>conftest.er1
8305   ac_status=$?
8306   grep -v '^ *+' conftest.er1 >conftest.err
8307   rm -f conftest.er1
8308   cat conftest.err >&5
8309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8310   (exit $ac_status); } &&
8311          { ac_try='test -z "$ac_c_werror_flag"
8312                          || test ! -s conftest.err'
8313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8314   (eval $ac_try) 2>&5
8315   ac_status=$?
8316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8317   (exit $ac_status); }; } &&
8318          { ac_try='test -s conftest$ac_exeext'
8319   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8320   (eval $ac_try) 2>&5
8321   ac_status=$?
8322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8323   (exit $ac_status); }; }; then
8324   eval "$as_ac_var=yes"
8325 else
8326   echo "$as_me: failed program was:" >&5
8327 sed 's/^/| /' conftest.$ac_ext >&5
8328
8329 eval "$as_ac_var=no"
8330 fi
8331 rm -f conftest.err conftest.$ac_objext \
8332       conftest$ac_exeext conftest.$ac_ext
8333 fi
8334 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8335 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8336 if test `eval echo '${'$as_ac_var'}'` = yes; then
8337   cat >>confdefs.h <<_ACEOF
8338 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8339 _ACEOF
8340
8341 fi
8342 done
8343
8344
8345    if test $ac_cv_header_locale_h = yes; then
8346     echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
8347 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
8348 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
8349   echo $ECHO_N "(cached) $ECHO_C" >&6
8350 else
8351   cat >conftest.$ac_ext <<_ACEOF
8352 /* confdefs.h.  */
8353 _ACEOF
8354 cat confdefs.h >>conftest.$ac_ext
8355 cat >>conftest.$ac_ext <<_ACEOF
8356 /* end confdefs.h.  */
8357 #include <locale.h>
8358 int
8359 main ()
8360 {
8361 return LC_MESSAGES
8362   ;
8363   return 0;
8364 }
8365 _ACEOF
8366 rm -f conftest.$ac_objext conftest$ac_exeext
8367 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8368   (eval $ac_link) 2>conftest.er1
8369   ac_status=$?
8370   grep -v '^ *+' conftest.er1 >conftest.err
8371   rm -f conftest.er1
8372   cat conftest.err >&5
8373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8374   (exit $ac_status); } &&
8375          { ac_try='test -z "$ac_c_werror_flag"
8376                          || test ! -s conftest.err'
8377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8378   (eval $ac_try) 2>&5
8379   ac_status=$?
8380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8381   (exit $ac_status); }; } &&
8382          { ac_try='test -s conftest$ac_exeext'
8383   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8384   (eval $ac_try) 2>&5
8385   ac_status=$?
8386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8387   (exit $ac_status); }; }; then
8388   am_cv_val_LC_MESSAGES=yes
8389 else
8390   echo "$as_me: failed program was:" >&5
8391 sed 's/^/| /' conftest.$ac_ext >&5
8392
8393 am_cv_val_LC_MESSAGES=no
8394 fi
8395 rm -f conftest.err conftest.$ac_objext \
8396       conftest$ac_exeext conftest.$ac_ext
8397 fi
8398 echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
8399 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
8400     if test $am_cv_val_LC_MESSAGES = yes; then
8401
8402 cat >>confdefs.h <<\_ACEOF
8403 #define HAVE_LC_MESSAGES 1
8404 _ACEOF
8405
8406     fi
8407   fi
8408      USE_NLS=yes
8409
8410
8411         nls_cv_force_use_gnu_gettext="no"
8412
8413     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
8414     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
8415                               nls_cv_header_intl=
8416       nls_cv_header_libgt=
8417       CATOBJEXT=NONE
8418
8419       if test "${ac_cv_header_libintl_h+set}" = set; then
8420   echo "$as_me:$LINENO: checking for libintl.h" >&5
8421 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
8422 if test "${ac_cv_header_libintl_h+set}" = set; then
8423   echo $ECHO_N "(cached) $ECHO_C" >&6
8424 fi
8425 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
8426 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
8427 else
8428   # Is the header compilable?
8429 echo "$as_me:$LINENO: checking libintl.h usability" >&5
8430 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
8431 cat >conftest.$ac_ext <<_ACEOF
8432 /* confdefs.h.  */
8433 _ACEOF
8434 cat confdefs.h >>conftest.$ac_ext
8435 cat >>conftest.$ac_ext <<_ACEOF
8436 /* end confdefs.h.  */
8437 $ac_includes_default
8438 #include <libintl.h>
8439 _ACEOF
8440 rm -f conftest.$ac_objext
8441 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8442   (eval $ac_compile) 2>conftest.er1
8443   ac_status=$?
8444   grep -v '^ *+' conftest.er1 >conftest.err
8445   rm -f conftest.er1
8446   cat conftest.err >&5
8447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8448   (exit $ac_status); } &&
8449          { ac_try='test -z "$ac_c_werror_flag"
8450                          || test ! -s conftest.err'
8451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8452   (eval $ac_try) 2>&5
8453   ac_status=$?
8454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8455   (exit $ac_status); }; } &&
8456          { ac_try='test -s conftest.$ac_objext'
8457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8458   (eval $ac_try) 2>&5
8459   ac_status=$?
8460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8461   (exit $ac_status); }; }; then
8462   ac_header_compiler=yes
8463 else
8464   echo "$as_me: failed program was:" >&5
8465 sed 's/^/| /' conftest.$ac_ext >&5
8466
8467 ac_header_compiler=no
8468 fi
8469 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8470 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8471 echo "${ECHO_T}$ac_header_compiler" >&6
8472
8473 # Is the header present?
8474 echo "$as_me:$LINENO: checking libintl.h presence" >&5
8475 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
8476 cat >conftest.$ac_ext <<_ACEOF
8477 /* confdefs.h.  */
8478 _ACEOF
8479 cat confdefs.h >>conftest.$ac_ext
8480 cat >>conftest.$ac_ext <<_ACEOF
8481 /* end confdefs.h.  */
8482 #include <libintl.h>
8483 _ACEOF
8484 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8485   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8486   ac_status=$?
8487   grep -v '^ *+' conftest.er1 >conftest.err
8488   rm -f conftest.er1
8489   cat conftest.err >&5
8490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491   (exit $ac_status); } >/dev/null; then
8492   if test -s conftest.err; then
8493     ac_cpp_err=$ac_c_preproc_warn_flag
8494     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8495   else
8496     ac_cpp_err=
8497   fi
8498 else
8499   ac_cpp_err=yes
8500 fi
8501 if test -z "$ac_cpp_err"; then
8502   ac_header_preproc=yes
8503 else
8504   echo "$as_me: failed program was:" >&5
8505 sed 's/^/| /' conftest.$ac_ext >&5
8506
8507   ac_header_preproc=no
8508 fi
8509 rm -f conftest.err conftest.$ac_ext
8510 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8511 echo "${ECHO_T}$ac_header_preproc" >&6
8512
8513 # So?  What about this header?
8514 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8515   yes:no: )
8516     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
8517 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8518     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
8519 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
8520     ac_header_preproc=yes
8521     ;;
8522   no:yes:* )
8523     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
8524 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
8525     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
8526 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
8527     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
8528 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
8529     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
8530 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
8531     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
8532 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
8533     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
8534 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
8535     (
8536       cat <<\_ASBOX
8537 ## ------------------------------------------ ##
8538 ## Report this to the AC_PACKAGE_NAME lists.  ##
8539 ## ------------------------------------------ ##
8540 _ASBOX
8541     ) |
8542       sed "s/^/$as_me: WARNING:     /" >&2
8543     ;;
8544 esac
8545 echo "$as_me:$LINENO: checking for libintl.h" >&5
8546 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
8547 if test "${ac_cv_header_libintl_h+set}" = set; then
8548   echo $ECHO_N "(cached) $ECHO_C" >&6
8549 else
8550   ac_cv_header_libintl_h=$ac_header_preproc
8551 fi
8552 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
8553 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
8554
8555 fi
8556 if test $ac_cv_header_libintl_h = yes; then
8557   echo "$as_me:$LINENO: checking for dgettext in libc" >&5
8558 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
8559 if test "${gt_cv_func_dgettext_libc+set}" = set; then
8560   echo $ECHO_N "(cached) $ECHO_C" >&6
8561 else
8562   cat >conftest.$ac_ext <<_ACEOF
8563 /* confdefs.h.  */
8564 _ACEOF
8565 cat confdefs.h >>conftest.$ac_ext
8566 cat >>conftest.$ac_ext <<_ACEOF
8567 /* end confdefs.h.  */
8568 #include <libintl.h>
8569 int
8570 main ()
8571 {
8572 return (int) dgettext ("","")
8573   ;
8574   return 0;
8575 }
8576 _ACEOF
8577 rm -f conftest.$ac_objext conftest$ac_exeext
8578 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8579   (eval $ac_link) 2>conftest.er1
8580   ac_status=$?
8581   grep -v '^ *+' conftest.er1 >conftest.err
8582   rm -f conftest.er1
8583   cat conftest.err >&5
8584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8585   (exit $ac_status); } &&
8586          { ac_try='test -z "$ac_c_werror_flag"
8587                          || test ! -s conftest.err'
8588   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8589   (eval $ac_try) 2>&5
8590   ac_status=$?
8591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8592   (exit $ac_status); }; } &&
8593          { ac_try='test -s conftest$ac_exeext'
8594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8595   (eval $ac_try) 2>&5
8596   ac_status=$?
8597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8598   (exit $ac_status); }; }; then
8599   gt_cv_func_dgettext_libc=yes
8600 else
8601   echo "$as_me: failed program was:" >&5
8602 sed 's/^/| /' conftest.$ac_ext >&5
8603
8604 gt_cv_func_dgettext_libc=no
8605 fi
8606 rm -f conftest.err conftest.$ac_objext \
8607       conftest$ac_exeext conftest.$ac_ext
8608 fi
8609 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
8610 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
8611
8612           if test "$gt_cv_func_dgettext_libc" != "yes"; then
8613             echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
8614 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
8615 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
8616   echo $ECHO_N "(cached) $ECHO_C" >&6
8617 else
8618   ac_check_lib_save_LIBS=$LIBS
8619 LIBS="-lintl  $LIBS"
8620 cat >conftest.$ac_ext <<_ACEOF
8621 /* confdefs.h.  */
8622 _ACEOF
8623 cat confdefs.h >>conftest.$ac_ext
8624 cat >>conftest.$ac_ext <<_ACEOF
8625 /* end confdefs.h.  */
8626
8627 /* Override any gcc2 internal prototype to avoid an error.  */
8628 #ifdef __cplusplus
8629 extern "C"
8630 #endif
8631 /* We use char because int might match the return type of a gcc2
8632    builtin and then its argument prototype would still apply.  */
8633 char bindtextdomain ();
8634 int
8635 main ()
8636 {
8637 bindtextdomain ();
8638   ;
8639   return 0;
8640 }
8641 _ACEOF
8642 rm -f conftest.$ac_objext conftest$ac_exeext
8643 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8644   (eval $ac_link) 2>conftest.er1
8645   ac_status=$?
8646   grep -v '^ *+' conftest.er1 >conftest.err
8647   rm -f conftest.er1
8648   cat conftest.err >&5
8649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8650   (exit $ac_status); } &&
8651          { ac_try='test -z "$ac_c_werror_flag"
8652                          || test ! -s conftest.err'
8653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8654   (eval $ac_try) 2>&5
8655   ac_status=$?
8656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8657   (exit $ac_status); }; } &&
8658          { ac_try='test -s conftest$ac_exeext'
8659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8660   (eval $ac_try) 2>&5
8661   ac_status=$?
8662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8663   (exit $ac_status); }; }; then
8664   ac_cv_lib_intl_bindtextdomain=yes
8665 else
8666   echo "$as_me: failed program was:" >&5
8667 sed 's/^/| /' conftest.$ac_ext >&5
8668
8669 ac_cv_lib_intl_bindtextdomain=no
8670 fi
8671 rm -f conftest.err conftest.$ac_objext \
8672       conftest$ac_exeext conftest.$ac_ext
8673 LIBS=$ac_check_lib_save_LIBS
8674 fi
8675 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
8676 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
8677 if test $ac_cv_lib_intl_bindtextdomain = yes; then
8678   echo "$as_me:$LINENO: checking for dgettext in libintl" >&5
8679 echo $ECHO_N "checking for dgettext in libintl... $ECHO_C" >&6
8680 if test "${gt_cv_func_dgettext_libintl+set}" = set; then
8681   echo $ECHO_N "(cached) $ECHO_C" >&6
8682 else
8683   echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
8684 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
8685 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
8686   echo $ECHO_N "(cached) $ECHO_C" >&6
8687 else
8688   ac_check_lib_save_LIBS=$LIBS
8689 LIBS="-lintl  $LIBS"
8690 cat >conftest.$ac_ext <<_ACEOF
8691 /* confdefs.h.  */
8692 _ACEOF
8693 cat confdefs.h >>conftest.$ac_ext
8694 cat >>conftest.$ac_ext <<_ACEOF
8695 /* end confdefs.h.  */
8696
8697 /* Override any gcc2 internal prototype to avoid an error.  */
8698 #ifdef __cplusplus
8699 extern "C"
8700 #endif
8701 /* We use char because int might match the return type of a gcc2
8702    builtin and then its argument prototype would still apply.  */
8703 char dgettext ();
8704 int
8705 main ()
8706 {
8707 dgettext ();
8708   ;
8709   return 0;
8710 }
8711 _ACEOF
8712 rm -f conftest.$ac_objext conftest$ac_exeext
8713 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8714   (eval $ac_link) 2>conftest.er1
8715   ac_status=$?
8716   grep -v '^ *+' conftest.er1 >conftest.err
8717   rm -f conftest.er1
8718   cat conftest.err >&5
8719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8720   (exit $ac_status); } &&
8721          { ac_try='test -z "$ac_c_werror_flag"
8722                          || test ! -s conftest.err'
8723   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8724   (eval $ac_try) 2>&5
8725   ac_status=$?
8726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8727   (exit $ac_status); }; } &&
8728          { ac_try='test -s conftest$ac_exeext'
8729   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8730   (eval $ac_try) 2>&5
8731   ac_status=$?
8732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8733   (exit $ac_status); }; }; then
8734   ac_cv_lib_intl_dgettext=yes
8735 else
8736   echo "$as_me: failed program was:" >&5
8737 sed 's/^/| /' conftest.$ac_ext >&5
8738
8739 ac_cv_lib_intl_dgettext=no
8740 fi
8741 rm -f conftest.err conftest.$ac_objext \
8742       conftest$ac_exeext conftest.$ac_ext
8743 LIBS=$ac_check_lib_save_LIBS
8744 fi
8745 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
8746 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
8747 if test $ac_cv_lib_intl_dgettext = yes; then
8748   gt_cv_func_dgettext_libintl=yes
8749 else
8750   gt_cv_func_dgettext_libintl=no
8751 fi
8752
8753 fi
8754 echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libintl" >&5
8755 echo "${ECHO_T}$gt_cv_func_dgettext_libintl" >&6
8756 fi
8757
8758           fi
8759
8760           if test "$gt_cv_func_dgettext_libintl" = "yes"; then
8761             LIBS="$LIBS -lintl";
8762           fi
8763
8764           if test "$gt_cv_func_dgettext_libc" = "yes" \
8765             || test "$gt_cv_func_dgettext_libintl" = "yes"; then
8766
8767 cat >>confdefs.h <<\_ACEOF
8768 #define HAVE_GETTEXT 1
8769 _ACEOF
8770
8771             # Extract the first word of "msgfmt", so it can be a program name with args.
8772 set dummy msgfmt; ac_word=$2
8773 echo "$as_me:$LINENO: checking for $ac_word" >&5
8774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8775 if test "${ac_cv_path_MSGFMT+set}" = set; then
8776   echo $ECHO_N "(cached) $ECHO_C" >&6
8777 else
8778   case "$MSGFMT" in
8779   /*)
8780   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8781   ;;
8782   *)
8783   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8784   for ac_dir in $PATH; do
8785     test -z "$ac_dir" && ac_dir=.
8786     if test -f $ac_dir/$ac_word; then
8787       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
8788         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
8789         break
8790       fi
8791     fi
8792   done
8793   IFS="$ac_save_ifs"
8794   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
8795   ;;
8796 esac
8797 fi
8798 MSGFMT="$ac_cv_path_MSGFMT"
8799 if test -n "$MSGFMT"; then
8800   echo "$as_me:$LINENO: result: $MSGFMT" >&5
8801 echo "${ECHO_T}$MSGFMT" >&6
8802 else
8803   echo "$as_me:$LINENO: result: no" >&5
8804 echo "${ECHO_T}no" >&6
8805 fi
8806             if test "$MSGFMT" != "no"; then
8807
8808 for ac_func in dcgettext
8809 do
8810 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8811 echo "$as_me:$LINENO: checking for $ac_func" >&5
8812 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8813 if eval "test \"\${$as_ac_var+set}\" = set"; then
8814   echo $ECHO_N "(cached) $ECHO_C" >&6
8815 else
8816   cat >conftest.$ac_ext <<_ACEOF
8817 /* confdefs.h.  */
8818 _ACEOF
8819 cat confdefs.h >>conftest.$ac_ext
8820 cat >>conftest.$ac_ext <<_ACEOF
8821 /* end confdefs.h.  */
8822 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8823    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
8824 #define $ac_func innocuous_$ac_func
8825
8826 /* System header to define __stub macros and hopefully few prototypes,
8827     which can conflict with char $ac_func (); below.
8828     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8829     <limits.h> exists even on freestanding compilers.  */
8830
8831 #ifdef __STDC__
8832 # include <limits.h>
8833 #else
8834 # include <assert.h>
8835 #endif
8836
8837 #undef $ac_func
8838
8839 /* Override any gcc2 internal prototype to avoid an error.  */
8840 #ifdef __cplusplus
8841 extern "C"
8842 {
8843 #endif
8844 /* We use char because int might match the return type of a gcc2
8845    builtin and then its argument prototype would still apply.  */
8846 char $ac_func ();
8847 /* The GNU C library defines this for functions which it implements
8848     to always fail with ENOSYS.  Some functions are actually named
8849     something starting with __ and the normal name is an alias.  */
8850 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8851 choke me
8852 #else
8853 char (*f) () = $ac_func;
8854 #endif
8855 #ifdef __cplusplus
8856 }
8857 #endif
8858
8859 int
8860 main ()
8861 {
8862 return f != $ac_func;
8863   ;
8864   return 0;
8865 }
8866 _ACEOF
8867 rm -f conftest.$ac_objext conftest$ac_exeext
8868 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8869   (eval $ac_link) 2>conftest.er1
8870   ac_status=$?
8871   grep -v '^ *+' conftest.er1 >conftest.err
8872   rm -f conftest.er1
8873   cat conftest.err >&5
8874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8875   (exit $ac_status); } &&
8876          { ac_try='test -z "$ac_c_werror_flag"
8877                          || test ! -s conftest.err'
8878   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8879   (eval $ac_try) 2>&5
8880   ac_status=$?
8881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8882   (exit $ac_status); }; } &&
8883          { ac_try='test -s conftest$ac_exeext'
8884   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8885   (eval $ac_try) 2>&5
8886   ac_status=$?
8887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8888   (exit $ac_status); }; }; then
8889   eval "$as_ac_var=yes"
8890 else
8891   echo "$as_me: failed program was:" >&5
8892 sed 's/^/| /' conftest.$ac_ext >&5
8893
8894 eval "$as_ac_var=no"
8895 fi
8896 rm -f conftest.err conftest.$ac_objext \
8897       conftest$ac_exeext conftest.$ac_ext
8898 fi
8899 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8900 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8901 if test `eval echo '${'$as_ac_var'}'` = yes; then
8902   cat >>confdefs.h <<_ACEOF
8903 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8904 _ACEOF
8905
8906 fi
8907 done
8908
8909               # Extract the first word of "gmsgfmt", so it can be a program name with args.
8910 set dummy gmsgfmt; ac_word=$2
8911 echo "$as_me:$LINENO: checking for $ac_word" >&5
8912 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8913 if test "${ac_cv_path_GMSGFMT+set}" = set; then
8914   echo $ECHO_N "(cached) $ECHO_C" >&6
8915 else
8916   case $GMSGFMT in
8917   [\\/]* | ?:[\\/]*)
8918   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8919   ;;
8920   *)
8921   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8922 for as_dir in $PATH
8923 do
8924   IFS=$as_save_IFS
8925   test -z "$as_dir" && as_dir=.
8926   for ac_exec_ext in '' $ac_executable_extensions; do
8927   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8928     ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
8929     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8930     break 2
8931   fi
8932 done
8933 done
8934
8935   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8936   ;;
8937 esac
8938 fi
8939 GMSGFMT=$ac_cv_path_GMSGFMT
8940
8941 if test -n "$GMSGFMT"; then
8942   echo "$as_me:$LINENO: result: $GMSGFMT" >&5
8943 echo "${ECHO_T}$GMSGFMT" >&6
8944 else
8945   echo "$as_me:$LINENO: result: no" >&5
8946 echo "${ECHO_T}no" >&6
8947 fi
8948
8949               # Extract the first word of "xgettext", so it can be a program name with args.
8950 set dummy xgettext; ac_word=$2
8951 echo "$as_me:$LINENO: checking for $ac_word" >&5
8952 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8953 if test "${ac_cv_path_XGETTEXT+set}" = set; then
8954   echo $ECHO_N "(cached) $ECHO_C" >&6
8955 else
8956   case "$XGETTEXT" in
8957   /*)
8958   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8959   ;;
8960   *)
8961   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
8962   for ac_dir in $PATH; do
8963     test -z "$ac_dir" && ac_dir=.
8964     if test -f $ac_dir/$ac_word; then
8965       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
8966         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
8967         break
8968       fi
8969     fi
8970   done
8971   IFS="$ac_save_ifs"
8972   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8973   ;;
8974 esac
8975 fi
8976 XGETTEXT="$ac_cv_path_XGETTEXT"
8977 if test -n "$XGETTEXT"; then
8978   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
8979 echo "${ECHO_T}$XGETTEXT" >&6
8980 else
8981   echo "$as_me:$LINENO: result: no" >&5
8982 echo "${ECHO_T}no" >&6
8983 fi
8984
8985               cat >conftest.$ac_ext <<_ACEOF
8986 /* confdefs.h.  */
8987 _ACEOF
8988 cat confdefs.h >>conftest.$ac_ext
8989 cat >>conftest.$ac_ext <<_ACEOF
8990 /* end confdefs.h.  */
8991
8992 int
8993 main ()
8994 {
8995 extern int _nl_msg_cat_cntr;
8996                              return _nl_msg_cat_cntr
8997   ;
8998   return 0;
8999 }
9000 _ACEOF
9001 rm -f conftest.$ac_objext conftest$ac_exeext
9002 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9003   (eval $ac_link) 2>conftest.er1
9004   ac_status=$?
9005   grep -v '^ *+' conftest.er1 >conftest.err
9006   rm -f conftest.er1
9007   cat conftest.err >&5
9008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9009   (exit $ac_status); } &&
9010          { ac_try='test -z "$ac_c_werror_flag"
9011                          || test ! -s conftest.err'
9012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9013   (eval $ac_try) 2>&5
9014   ac_status=$?
9015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9016   (exit $ac_status); }; } &&
9017          { ac_try='test -s conftest$ac_exeext'
9018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9019   (eval $ac_try) 2>&5
9020   ac_status=$?
9021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9022   (exit $ac_status); }; }; then
9023   CATOBJEXT=.gmo
9024                  DATADIRNAME=share
9025 else
9026   echo "$as_me: failed program was:" >&5
9027 sed 's/^/| /' conftest.$ac_ext >&5
9028
9029 CATOBJEXT=.mo
9030                  DATADIRNAME=lib
9031 fi
9032 rm -f conftest.err conftest.$ac_objext \
9033       conftest$ac_exeext conftest.$ac_ext
9034               INSTOBJEXT=.mo
9035             fi
9036           fi
9037
9038           # Added by Martin Baulig 12/15/98 for libc5 systems
9039           if test "$gt_cv_func_dgettext_libc" != "yes" \
9040             && test "$gt_cv_func_dgettext_libintl" = "yes"; then
9041             INTLLIBS=-lintl
9042             LIBS=`echo $LIBS | sed -e 's/-lintl//'`
9043           fi
9044
9045 fi
9046
9047
9048
9049       if test "$CATOBJEXT" = "NONE"; then
9050                         nls_cv_use_gnu_gettext=yes
9051       fi
9052     fi
9053
9054     if test "$nls_cv_use_gnu_gettext" != "yes"; then
9055
9056 cat >>confdefs.h <<\_ACEOF
9057 #define ENABLE_NLS 1
9058 _ACEOF
9059
9060     else
9061             CATOBJEXT=
9062     fi
9063
9064         if test "$XGETTEXT" != ":"; then
9065                   if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9066         : ;
9067       else
9068         echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
9069 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
9070         XGETTEXT=":"
9071       fi
9072     fi
9073
9074     # We need to process the po/ directory.
9075     POSUB=po
9076
9077               ac_config_commands="$ac_config_commands default-2"
9078
9079
9080                 for lang in $ALL_LINGUAS; do
9081       GMOFILES="$GMOFILES $lang.gmo"
9082       POFILES="$POFILES $lang.po"
9083     done
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097    if test "x$CATOBJEXT" != "x"; then
9098      if test "x$ALL_LINGUAS" = "x"; then
9099        LINGUAS=
9100      else
9101        echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
9102 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
9103        NEW_LINGUAS=
9104        for lang in ${LINGUAS=$ALL_LINGUAS}; do
9105          case "$ALL_LINGUAS" in
9106           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
9107          esac
9108        done
9109        LINGUAS=$NEW_LINGUAS
9110        echo "$as_me:$LINENO: result: $LINGUAS" >&5
9111 echo "${ECHO_T}$LINGUAS" >&6
9112      fi
9113
9114           if test -n "$LINGUAS"; then
9115        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9116      fi
9117    fi
9118
9119             test -d po || mkdir po
9120    if test "$CATOBJEXT" = ".cat"; then
9121      if test "${ac_cv_header_linux_version_h+set}" = set; then
9122   echo "$as_me:$LINENO: checking for linux/version.h" >&5
9123 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
9124 if test "${ac_cv_header_linux_version_h+set}" = set; then
9125   echo $ECHO_N "(cached) $ECHO_C" >&6
9126 fi
9127 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9128 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
9129 else
9130   # Is the header compilable?
9131 echo "$as_me:$LINENO: checking linux/version.h usability" >&5
9132 echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
9133 cat >conftest.$ac_ext <<_ACEOF
9134 /* confdefs.h.  */
9135 _ACEOF
9136 cat confdefs.h >>conftest.$ac_ext
9137 cat >>conftest.$ac_ext <<_ACEOF
9138 /* end confdefs.h.  */
9139 $ac_includes_default
9140 #include <linux/version.h>
9141 _ACEOF
9142 rm -f conftest.$ac_objext
9143 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9144   (eval $ac_compile) 2>conftest.er1
9145   ac_status=$?
9146   grep -v '^ *+' conftest.er1 >conftest.err
9147   rm -f conftest.er1
9148   cat conftest.err >&5
9149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9150   (exit $ac_status); } &&
9151          { ac_try='test -z "$ac_c_werror_flag"
9152                          || test ! -s conftest.err'
9153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9154   (eval $ac_try) 2>&5
9155   ac_status=$?
9156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9157   (exit $ac_status); }; } &&
9158          { ac_try='test -s conftest.$ac_objext'
9159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9160   (eval $ac_try) 2>&5
9161   ac_status=$?
9162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9163   (exit $ac_status); }; }; then
9164   ac_header_compiler=yes
9165 else
9166   echo "$as_me: failed program was:" >&5
9167 sed 's/^/| /' conftest.$ac_ext >&5
9168
9169 ac_header_compiler=no
9170 fi
9171 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9172 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9173 echo "${ECHO_T}$ac_header_compiler" >&6
9174
9175 # Is the header present?
9176 echo "$as_me:$LINENO: checking linux/version.h presence" >&5
9177 echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
9178 cat >conftest.$ac_ext <<_ACEOF
9179 /* confdefs.h.  */
9180 _ACEOF
9181 cat confdefs.h >>conftest.$ac_ext
9182 cat >>conftest.$ac_ext <<_ACEOF
9183 /* end confdefs.h.  */
9184 #include <linux/version.h>
9185 _ACEOF
9186 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9187   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9188   ac_status=$?
9189   grep -v '^ *+' conftest.er1 >conftest.err
9190   rm -f conftest.er1
9191   cat conftest.err >&5
9192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9193   (exit $ac_status); } >/dev/null; then
9194   if test -s conftest.err; then
9195     ac_cpp_err=$ac_c_preproc_warn_flag
9196     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9197   else
9198     ac_cpp_err=
9199   fi
9200 else
9201   ac_cpp_err=yes
9202 fi
9203 if test -z "$ac_cpp_err"; then
9204   ac_header_preproc=yes
9205 else
9206   echo "$as_me: failed program was:" >&5
9207 sed 's/^/| /' conftest.$ac_ext >&5
9208
9209   ac_header_preproc=no
9210 fi
9211 rm -f conftest.err conftest.$ac_ext
9212 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9213 echo "${ECHO_T}$ac_header_preproc" >&6
9214
9215 # So?  What about this header?
9216 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9217   yes:no: )
9218     { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
9219 echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9220     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
9221 echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
9222     ac_header_preproc=yes
9223     ;;
9224   no:yes:* )
9225     { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
9226 echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
9227     { echo "$as_me:$LINENO: WARNING: linux/version.h:     check for missing prerequisite headers?" >&5
9228 echo "$as_me: WARNING: linux/version.h:     check for missing prerequisite headers?" >&2;}
9229     { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
9230 echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
9231     { echo "$as_me:$LINENO: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&5
9232 echo "$as_me: WARNING: linux/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9233     { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
9234 echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
9235     { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
9236 echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
9237     (
9238       cat <<\_ASBOX
9239 ## ------------------------------------------ ##
9240 ## Report this to the AC_PACKAGE_NAME lists.  ##
9241 ## ------------------------------------------ ##
9242 _ASBOX
9243     ) |
9244       sed "s/^/$as_me: WARNING:     /" >&2
9245     ;;
9246 esac
9247 echo "$as_me:$LINENO: checking for linux/version.h" >&5
9248 echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
9249 if test "${ac_cv_header_linux_version_h+set}" = set; then
9250   echo $ECHO_N "(cached) $ECHO_C" >&6
9251 else
9252   ac_cv_header_linux_version_h=$ac_header_preproc
9253 fi
9254 echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
9255 echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
9256
9257 fi
9258 if test $ac_cv_header_linux_version_h = yes; then
9259   msgformat=linux
9260 else
9261   msgformat=xopen
9262 fi
9263
9264
9265
9266                sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
9267    fi
9268
9269             MKINSTALLDIRS=
9270 #
9271 # jwz: fuck this!  it puts hardcoded pathnames into the generated Makefiles!
9272 #
9273 #   if test -n "$ac_aux_dir"; then
9274 #     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
9275 #   fi
9276    if test -z "$MKINSTALLDIRS"; then
9277      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
9278    fi
9279
9280    # jwz: you know what, screw it.  Let's just use the version that I
9281    # already computed in configure.in, instead of this version that came
9282    # with the i18n crud, ok?
9283    MKINSTALLDIRS="$INSTALL_DIRS"
9284
9285
9286
9287
9288          test -d po || mkdir po
9289    if test "x$srcdir" != "x."; then
9290      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
9291        posrcprefix="$srcdir/"
9292      else
9293        posrcprefix="../$srcdir/"
9294      fi
9295    else
9296      posrcprefix="../"
9297    fi
9298    rm -f po/POTFILES
9299    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
9300         < $srcdir/po/POTFILES.in > po/POTFILES
9301
9302 MKINSTALLDIRS="$INSTALL_DIRS"
9303
9304
9305 ###############################################################################
9306 #
9307 #       Check for -lXmu (some fucked up vendors don't ship it...)
9308 #
9309 ###############################################################################
9310
9311 have_xmu=no
9312
9313   ac_save_CPPFLAGS="$CPPFLAGS"
9314   if test \! -z "$includedir" ; then
9315     CPPFLAGS="$CPPFLAGS -I$includedir"
9316   fi
9317   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9318   echo "$as_me:$LINENO: checking for X11/Xmu/Error.h" >&5
9319 echo $ECHO_N "checking for X11/Xmu/Error.h... $ECHO_C" >&6
9320 if test "${ac_cv_header_X11_Xmu_Error_h+set}" = set; then
9321   echo $ECHO_N "(cached) $ECHO_C" >&6
9322 else
9323   cat >conftest.$ac_ext <<_ACEOF
9324 /* confdefs.h.  */
9325 _ACEOF
9326 cat confdefs.h >>conftest.$ac_ext
9327 cat >>conftest.$ac_ext <<_ACEOF
9328 /* end confdefs.h.  */
9329 #include <stdlib.h>
9330                    #include <stdio.h>
9331                    #include <X11/Intrinsic.h>
9332
9333 #include <X11/Xmu/Error.h>
9334 _ACEOF
9335 rm -f conftest.$ac_objext
9336 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9337   (eval $ac_compile) 2>conftest.er1
9338   ac_status=$?
9339   grep -v '^ *+' conftest.er1 >conftest.err
9340   rm -f conftest.er1
9341   cat conftest.err >&5
9342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9343   (exit $ac_status); } &&
9344          { ac_try='test -z "$ac_c_werror_flag"
9345                          || test ! -s conftest.err'
9346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9347   (eval $ac_try) 2>&5
9348   ac_status=$?
9349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9350   (exit $ac_status); }; } &&
9351          { ac_try='test -s conftest.$ac_objext'
9352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9353   (eval $ac_try) 2>&5
9354   ac_status=$?
9355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9356   (exit $ac_status); }; }; then
9357   ac_cv_header_X11_Xmu_Error_h=yes
9358 else
9359   echo "$as_me: failed program was:" >&5
9360 sed 's/^/| /' conftest.$ac_ext >&5
9361
9362 ac_cv_header_X11_Xmu_Error_h=no
9363 fi
9364 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9365 fi
9366 echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Error_h" >&5
9367 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Error_h" >&6
9368 if test $ac_cv_header_X11_Xmu_Error_h = yes; then
9369   have_xmu=yes
9370 fi
9371
9372
9373   CPPFLAGS="$ac_save_CPPFLAGS"
9374 if test "$have_xmu" = no ; then
9375   XMU_SRCS='$(UTILS_SRC)/xmu.c'
9376   XMU_OBJS='$(UTILS_BIN)/xmu.o'
9377   XMU_LIBS=''
9378 else
9379   XMU_SRCS=''
9380   XMU_OBJS=''
9381   XMU_LIBS='-lXmu'
9382   cat >>confdefs.h <<\_ACEOF
9383 #define HAVE_XMU 1
9384 _ACEOF
9385
9386 fi
9387
9388
9389 ###############################################################################
9390 #
9391 #       Check for the SunOS 4.1.x _get_wmShellWidgetClass bug.
9392 #       See comp.windows.x FAQ question 124.  The right fix is to
9393 #       get OpenWindows 3.0 patches 100512-02 and 100573-03.
9394 #
9395 ###############################################################################
9396
9397 if test "$have_xmu" = yes ; then
9398   case "$host" in
9399     *-sunos4*)
9400     echo "$as_me:$LINENO: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
9401 echo $ECHO_N "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug... $ECHO_C" >&6
9402 if test "${ac_cv_sunos_xmu_bug+set}" = set; then
9403   echo $ECHO_N "(cached) $ECHO_C" >&6
9404 else
9405   ac_save_LDFLAGS="$LDFLAGS"
9406                     if test \! -z "$x_libraries" ; then
9407                       LDFLAGS="$LDFLAGS -L$x_libraries"
9408                     fi
9409                     # Note: this trick never works!  (Generally.)
9410                     # We're only getting away with using AC_TRY_LINK
9411                     # with X libraries because we know it's SunOS.
9412                     LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
9413                     cat >conftest.$ac_ext <<_ACEOF
9414 /* confdefs.h.  */
9415 _ACEOF
9416 cat confdefs.h >>conftest.$ac_ext
9417 cat >>conftest.$ac_ext <<_ACEOF
9418 /* end confdefs.h.  */
9419
9420 int
9421 main ()
9422 {
9423
9424   ;
9425   return 0;
9426 }
9427 _ACEOF
9428 rm -f conftest.$ac_objext conftest$ac_exeext
9429 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9430   (eval $ac_link) 2>conftest.er1
9431   ac_status=$?
9432   grep -v '^ *+' conftest.er1 >conftest.err
9433   rm -f conftest.er1
9434   cat conftest.err >&5
9435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9436   (exit $ac_status); } &&
9437          { ac_try='test -z "$ac_c_werror_flag"
9438                          || test ! -s conftest.err'
9439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9440   (eval $ac_try) 2>&5
9441   ac_status=$?
9442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9443   (exit $ac_status); }; } &&
9444          { ac_try='test -s conftest$ac_exeext'
9445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9446   (eval $ac_try) 2>&5
9447   ac_status=$?
9448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9449   (exit $ac_status); }; }; then
9450   ac_cv_sunos_xmu_bug=no
9451 else
9452   echo "$as_me: failed program was:" >&5
9453 sed 's/^/| /' conftest.$ac_ext >&5
9454
9455 ac_cv_sunos_xmu_bug=yes
9456 fi
9457 rm -f conftest.err conftest.$ac_objext \
9458       conftest$ac_exeext conftest.$ac_ext
9459                     LDFLAGS="$ac_save_LDFLAGS"
9460 fi
9461 echo "$as_me:$LINENO: result: $ac_cv_sunos_xmu_bug" >&5
9462 echo "${ECHO_T}$ac_cv_sunos_xmu_bug" >&6
9463     if test "$ac_cv_sunos_xmu_bug" = yes ; then
9464       echo "$as_me:$LINENO: checking whether the compiler understands -static" >&5
9465 echo $ECHO_N "checking whether the compiler understands -static... $ECHO_C" >&6
9466 if test "${ac_cv_ld_static+set}" = set; then
9467   echo $ECHO_N "(cached) $ECHO_C" >&6
9468 else
9469   ac_save_LDFLAGS="$LDFLAGS"
9470                       LDFLAGS="$LDFLAGS -static"
9471                       cat >conftest.$ac_ext <<_ACEOF
9472 /* confdefs.h.  */
9473 _ACEOF
9474 cat confdefs.h >>conftest.$ac_ext
9475 cat >>conftest.$ac_ext <<_ACEOF
9476 /* end confdefs.h.  */
9477
9478 int
9479 main ()
9480 {
9481
9482   ;
9483   return 0;
9484 }
9485 _ACEOF
9486 rm -f conftest.$ac_objext conftest$ac_exeext
9487 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9488   (eval $ac_link) 2>conftest.er1
9489   ac_status=$?
9490   grep -v '^ *+' conftest.er1 >conftest.err
9491   rm -f conftest.er1
9492   cat conftest.err >&5
9493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9494   (exit $ac_status); } &&
9495          { ac_try='test -z "$ac_c_werror_flag"
9496                          || test ! -s conftest.err'
9497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9498   (eval $ac_try) 2>&5
9499   ac_status=$?
9500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9501   (exit $ac_status); }; } &&
9502          { ac_try='test -s conftest$ac_exeext'
9503   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9504   (eval $ac_try) 2>&5
9505   ac_status=$?
9506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9507   (exit $ac_status); }; }; then
9508   ac_cv_ld_static=yes
9509 else
9510   echo "$as_me: failed program was:" >&5
9511 sed 's/^/| /' conftest.$ac_ext >&5
9512
9513 ac_cv_ld_static=no
9514 fi
9515 rm -f conftest.err conftest.$ac_objext \
9516       conftest$ac_exeext conftest.$ac_ext
9517                     LDFLAGS="$ac_save_LDFLAGS"
9518 fi
9519 echo "$as_me:$LINENO: result: $ac_cv_ld_static" >&5
9520 echo "${ECHO_T}$ac_cv_ld_static" >&6
9521       if test "$ac_cv_ld_static" = yes ; then
9522         LDFLAGS="$LDFLAGS -static"
9523       else
9524         LDFLAGS="$LDFLAGS -Bstatic"
9525       fi
9526     fi
9527     ;;
9528   esac
9529 fi
9530
9531
9532 ###############################################################################
9533 #
9534 #       Handle the --with-hackdir option
9535 #
9536 ###############################################################################
9537
9538 have_hackdir=yes
9539 with_hackdir_req=unspecified
9540
9541 # Check whether --with-hackdir or --without-hackdir was given.
9542 if test "${with_hackdir+set}" = set; then
9543   withval="$with_hackdir"
9544   with_hackdir="$withval"; with_hackdir_req="$withval"
9545 else
9546   with_hackdir=yes
9547 fi;
9548
9549 if test x"$with_hackdir" = xyes; then
9550   HACKDIR='${libexecdir}/xscreensaver'
9551 elif test x"$with_hackdir" = xno; then
9552   HACKDIR='${bindir}'
9553 else
9554   HACKDIR=$with_hackdir
9555 fi
9556
9557 # canonicalize slashes.
9558 HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
9559
9560 # This option used to be called --enable-subdir; make sure that is no longer
9561 # used, since configure brain-damagedly ignores unknown --enable options.
9562
9563 obsolete_enable=
9564 # Check whether --enable-subdir or --disable-subdir was given.
9565 if test "${enable_subdir+set}" = set; then
9566   enableval="$enable_subdir"
9567   obsolete_enable=yes
9568 fi;
9569 if test -n "$obsolete_enable"; then
9570   echo "error: the --enable-subdir option has been replaced with"
9571   echo "       the new --with-hackdir option; see \`configure --help'"
9572   echo "       for more information."
9573   exit 1
9574 fi
9575
9576
9577 ###############################################################################
9578 #
9579 #       Handle the --with-configdir option
9580 #
9581 ###############################################################################
9582
9583 have_configdir=yes
9584 with_configdir_req=unspecified
9585
9586 # Check whether --with-configdir or --without-configdir was given.
9587 if test "${with_configdir+set}" = set; then
9588   withval="$with_configdir"
9589   with_configdir="$withval"; with_configdir_req="$withval"
9590 else
9591   with_configdir=yes
9592 fi;
9593
9594 if test x"$with_configdir" = xyes; then
9595   HACK_CONF_DIR='${datadir}/xscreensaver/config'
9596 elif test x"$with_configdir" = xno; then
9597   echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
9598   exit 1
9599 else
9600   # there must be a better way than this...
9601   if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
9602     # absolute path
9603     HACK_CONF_DIR=$with_configdir
9604   else
9605     # relative path
9606     HACK_CONF_DIR="\${exec_prefix}$with_configdir"
9607   fi
9608 fi
9609
9610
9611
9612
9613 ###############################################################################
9614 #
9615 #       Check for the SGI SCREEN_SAVER server extension.
9616 #
9617 ###############################################################################
9618
9619 have_sgi=no
9620 with_sgi_req=unspecified
9621
9622 # Check whether --with-sgi-ext or --without-sgi-ext was given.
9623 if test "${with_sgi_ext+set}" = set; then
9624   withval="$with_sgi_ext"
9625   with_sgi="$withval"; with_sgi_req="$withval"
9626 else
9627   with_sgi=yes
9628 fi;
9629
9630
9631    case "$with_sgi" in
9632     yes) ;;
9633     no)  ;;
9634
9635     /*)
9636      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER headers" >&5
9637 echo $ECHO_N "checking for SGI SCREEN_SAVER headers... $ECHO_C" >&6
9638      d=$with_sgi/include
9639      if test -d $d; then
9640        X_CFLAGS="-I$d $X_CFLAGS"
9641        echo "$as_me:$LINENO: result: $d" >&5
9642 echo "${ECHO_T}$d" >&6
9643      else
9644        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9645 echo "${ECHO_T}not found ($d: no such directory)" >&6
9646      fi
9647
9648      echo "$as_me:$LINENO: checking for SGI SCREEN_SAVER libs" >&5
9649 echo $ECHO_N "checking for SGI SCREEN_SAVER libs... $ECHO_C" >&6
9650      d=$with_sgi/lib
9651      if test -d $d; then
9652        X_LIBS="-L$d $X_LIBS"
9653        echo "$as_me:$LINENO: result: $d" >&5
9654 echo "${ECHO_T}$d" >&6
9655      else
9656        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9657 echo "${ECHO_T}not found ($d: no such directory)" >&6
9658      fi
9659
9660      # replace the directory string with "yes".
9661      with_sgi_req="yes"
9662      with_sgi=$with_sgi_req
9663      ;;
9664
9665     *)
9666      echo ""
9667      echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
9668      echo "       If it is a directory, then \`DIR/include' will be added to"
9669      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9670      exit 1
9671      ;;
9672    esac
9673
9674
9675 if test "$with_sgi" = yes; then
9676
9677   ac_save_CPPFLAGS="$CPPFLAGS"
9678   if test \! -z "$includedir" ; then
9679     CPPFLAGS="$CPPFLAGS -I$includedir"
9680   fi
9681   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9682   echo "$as_me:$LINENO: checking for X11/extensions/XScreenSaver.h" >&5
9683 echo $ECHO_N "checking for X11/extensions/XScreenSaver.h... $ECHO_C" >&6
9684 if test "${ac_cv_header_X11_extensions_XScreenSaver_h+set}" = set; then
9685   echo $ECHO_N "(cached) $ECHO_C" >&6
9686 else
9687   cat >conftest.$ac_ext <<_ACEOF
9688 /* confdefs.h.  */
9689 _ACEOF
9690 cat confdefs.h >>conftest.$ac_ext
9691 cat >>conftest.$ac_ext <<_ACEOF
9692 /* end confdefs.h.  */
9693 #include <X11/Xlib.h>
9694
9695 #include <X11/extensions/XScreenSaver.h>
9696 _ACEOF
9697 rm -f conftest.$ac_objext
9698 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9699   (eval $ac_compile) 2>conftest.er1
9700   ac_status=$?
9701   grep -v '^ *+' conftest.er1 >conftest.err
9702   rm -f conftest.er1
9703   cat conftest.err >&5
9704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9705   (exit $ac_status); } &&
9706          { ac_try='test -z "$ac_c_werror_flag"
9707                          || test ! -s conftest.err'
9708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9709   (eval $ac_try) 2>&5
9710   ac_status=$?
9711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9712   (exit $ac_status); }; } &&
9713          { ac_try='test -s conftest.$ac_objext'
9714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9715   (eval $ac_try) 2>&5
9716   ac_status=$?
9717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9718   (exit $ac_status); }; }; then
9719   ac_cv_header_X11_extensions_XScreenSaver_h=yes
9720 else
9721   echo "$as_me: failed program was:" >&5
9722 sed 's/^/| /' conftest.$ac_ext >&5
9723
9724 ac_cv_header_X11_extensions_XScreenSaver_h=no
9725 fi
9726 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9727 fi
9728 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XScreenSaver_h" >&5
9729 echo "${ECHO_T}$ac_cv_header_X11_extensions_XScreenSaver_h" >&6
9730 if test $ac_cv_header_X11_extensions_XScreenSaver_h = yes; then
9731   have_sgi=yes
9732                      cat >>confdefs.h <<\_ACEOF
9733 #define HAVE_SGI_SAVER_EXTENSION 1
9734 _ACEOF
9735
9736 fi
9737
9738
9739   CPPFLAGS="$ac_save_CPPFLAGS"
9740
9741 elif test "$with_sgi" != no; then
9742   echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
9743   exit 1
9744 fi
9745
9746
9747 ###############################################################################
9748 #
9749 #       Check for the XIDLE server extension.
9750 #
9751 ###############################################################################
9752
9753 have_xidle=no
9754 with_xidle_req=unspecified
9755
9756 # Check whether --with-xidle-ext or --without-xidle-ext was given.
9757 if test "${with_xidle_ext+set}" = set; then
9758   withval="$with_xidle_ext"
9759   with_xidle="$withval"; with_xidle_req="$withval"
9760 else
9761   with_xidle=yes
9762 fi;
9763
9764
9765    case "$with_xidle" in
9766     yes) ;;
9767     no)  ;;
9768
9769     /*)
9770      echo "$as_me:$LINENO: checking for XIDLE headers" >&5
9771 echo $ECHO_N "checking for XIDLE headers... $ECHO_C" >&6
9772      d=$with_xidle/include
9773      if test -d $d; then
9774        X_CFLAGS="-I$d $X_CFLAGS"
9775        echo "$as_me:$LINENO: result: $d" >&5
9776 echo "${ECHO_T}$d" >&6
9777      else
9778        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9779 echo "${ECHO_T}not found ($d: no such directory)" >&6
9780      fi
9781
9782      echo "$as_me:$LINENO: checking for XIDLE libs" >&5
9783 echo $ECHO_N "checking for XIDLE libs... $ECHO_C" >&6
9784      d=$with_xidle/lib
9785      if test -d $d; then
9786        X_LIBS="-L$d $X_LIBS"
9787        echo "$as_me:$LINENO: result: $d" >&5
9788 echo "${ECHO_T}$d" >&6
9789      else
9790        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9791 echo "${ECHO_T}not found ($d: no such directory)" >&6
9792      fi
9793
9794      # replace the directory string with "yes".
9795      with_xidle_req="yes"
9796      with_xidle=$with_xidle_req
9797      ;;
9798
9799     *)
9800      echo ""
9801      echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
9802      echo "       If it is a directory, then \`DIR/include' will be added to"
9803      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9804      exit 1
9805      ;;
9806    esac
9807
9808
9809 if test "$with_xidle" = yes; then
9810
9811   ac_save_CPPFLAGS="$CPPFLAGS"
9812   if test \! -z "$includedir" ; then
9813     CPPFLAGS="$CPPFLAGS -I$includedir"
9814   fi
9815   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9816   echo "$as_me:$LINENO: checking for X11/extensions/xidle.h" >&5
9817 echo $ECHO_N "checking for X11/extensions/xidle.h... $ECHO_C" >&6
9818 if test "${ac_cv_header_X11_extensions_xidle_h+set}" = set; then
9819   echo $ECHO_N "(cached) $ECHO_C" >&6
9820 else
9821   cat >conftest.$ac_ext <<_ACEOF
9822 /* confdefs.h.  */
9823 _ACEOF
9824 cat confdefs.h >>conftest.$ac_ext
9825 cat >>conftest.$ac_ext <<_ACEOF
9826 /* end confdefs.h.  */
9827 #include <X11/Xlib.h>
9828
9829 #include <X11/extensions/xidle.h>
9830 _ACEOF
9831 rm -f conftest.$ac_objext
9832 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9833   (eval $ac_compile) 2>conftest.er1
9834   ac_status=$?
9835   grep -v '^ *+' conftest.er1 >conftest.err
9836   rm -f conftest.er1
9837   cat conftest.err >&5
9838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9839   (exit $ac_status); } &&
9840          { ac_try='test -z "$ac_c_werror_flag"
9841                          || test ! -s conftest.err'
9842   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9843   (eval $ac_try) 2>&5
9844   ac_status=$?
9845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846   (exit $ac_status); }; } &&
9847          { ac_try='test -s conftest.$ac_objext'
9848   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9849   (eval $ac_try) 2>&5
9850   ac_status=$?
9851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9852   (exit $ac_status); }; }; then
9853   ac_cv_header_X11_extensions_xidle_h=yes
9854 else
9855   echo "$as_me: failed program was:" >&5
9856 sed 's/^/| /' conftest.$ac_ext >&5
9857
9858 ac_cv_header_X11_extensions_xidle_h=no
9859 fi
9860 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9861 fi
9862 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xidle_h" >&5
9863 echo "${ECHO_T}$ac_cv_header_X11_extensions_xidle_h" >&6
9864 if test $ac_cv_header_X11_extensions_xidle_h = yes; then
9865   have_xidle=yes
9866                      cat >>confdefs.h <<\_ACEOF
9867 #define HAVE_XIDLE_EXTENSION 1
9868 _ACEOF
9869
9870 fi
9871
9872
9873   CPPFLAGS="$ac_save_CPPFLAGS"
9874 elif test "$with_xidle" != no; then
9875   echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
9876   exit 1
9877 fi
9878
9879
9880 ###############################################################################
9881 #
9882 #       Check for the SGI-VIDEO-CONTROL server extension.
9883 #
9884 ###############################################################################
9885
9886 have_sgivc=no
9887 with_sgivc_req=unspecified
9888
9889 # Check whether --with-sgivc-ext or --without-sgivc-ext was given.
9890 if test "${with_sgivc_ext+set}" = set; then
9891   withval="$with_sgivc_ext"
9892   with_sgivc="$withval"; with_sgivc_req="$withval"
9893 else
9894   with_sgivc=yes
9895 fi;
9896
9897
9898    case "$with_sgivc" in
9899     yes) ;;
9900     no)  ;;
9901
9902     /*)
9903      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL headers" >&5
9904 echo $ECHO_N "checking for SGI-VIDEO-CONTROL headers... $ECHO_C" >&6
9905      d=$with_sgivc/include
9906      if test -d $d; then
9907        X_CFLAGS="-I$d $X_CFLAGS"
9908        echo "$as_me:$LINENO: result: $d" >&5
9909 echo "${ECHO_T}$d" >&6
9910      else
9911        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9912 echo "${ECHO_T}not found ($d: no such directory)" >&6
9913      fi
9914
9915      echo "$as_me:$LINENO: checking for SGI-VIDEO-CONTROL libs" >&5
9916 echo $ECHO_N "checking for SGI-VIDEO-CONTROL libs... $ECHO_C" >&6
9917      d=$with_sgivc/lib
9918      if test -d $d; then
9919        X_LIBS="-L$d $X_LIBS"
9920        echo "$as_me:$LINENO: result: $d" >&5
9921 echo "${ECHO_T}$d" >&6
9922      else
9923        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
9924 echo "${ECHO_T}not found ($d: no such directory)" >&6
9925      fi
9926
9927      # replace the directory string with "yes".
9928      with_sgivc_req="yes"
9929      with_sgivc=$with_sgivc_req
9930      ;;
9931
9932     *)
9933      echo ""
9934      echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
9935      echo "       If it is a directory, then \`DIR/include' will be added to"
9936      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
9937      exit 1
9938      ;;
9939    esac
9940
9941
9942 if test "$with_sgivc" = yes; then
9943
9944   # first check for XSGIvc.h
9945
9946   ac_save_CPPFLAGS="$CPPFLAGS"
9947   if test \! -z "$includedir" ; then
9948     CPPFLAGS="$CPPFLAGS -I$includedir"
9949   fi
9950   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9951   echo "$as_me:$LINENO: checking for X11/extensions/XSGIvc.h" >&5
9952 echo $ECHO_N "checking for X11/extensions/XSGIvc.h... $ECHO_C" >&6
9953 if test "${ac_cv_header_X11_extensions_XSGIvc_h+set}" = set; then
9954   echo $ECHO_N "(cached) $ECHO_C" >&6
9955 else
9956   cat >conftest.$ac_ext <<_ACEOF
9957 /* confdefs.h.  */
9958 _ACEOF
9959 cat confdefs.h >>conftest.$ac_ext
9960 cat >>conftest.$ac_ext <<_ACEOF
9961 /* end confdefs.h.  */
9962 #include <X11/Xlib.h>
9963
9964 #include <X11/extensions/XSGIvc.h>
9965 _ACEOF
9966 rm -f conftest.$ac_objext
9967 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9968   (eval $ac_compile) 2>conftest.er1
9969   ac_status=$?
9970   grep -v '^ *+' conftest.er1 >conftest.err
9971   rm -f conftest.er1
9972   cat conftest.err >&5
9973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9974   (exit $ac_status); } &&
9975          { ac_try='test -z "$ac_c_werror_flag"
9976                          || test ! -s conftest.err'
9977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9978   (eval $ac_try) 2>&5
9979   ac_status=$?
9980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9981   (exit $ac_status); }; } &&
9982          { ac_try='test -s conftest.$ac_objext'
9983   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9984   (eval $ac_try) 2>&5
9985   ac_status=$?
9986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9987   (exit $ac_status); }; }; then
9988   ac_cv_header_X11_extensions_XSGIvc_h=yes
9989 else
9990   echo "$as_me: failed program was:" >&5
9991 sed 's/^/| /' conftest.$ac_ext >&5
9992
9993 ac_cv_header_X11_extensions_XSGIvc_h=no
9994 fi
9995 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9996 fi
9997 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XSGIvc_h" >&5
9998 echo "${ECHO_T}$ac_cv_header_X11_extensions_XSGIvc_h" >&6
9999 if test $ac_cv_header_X11_extensions_XSGIvc_h = yes; then
10000   have_sgivc=yes
10001 fi
10002
10003
10004   CPPFLAGS="$ac_save_CPPFLAGS"
10005
10006   # if that succeeded, then check for the -lXsgivc
10007   if test "$have_sgivc" = yes; then
10008     have_sgivc=no
10009
10010   ac_save_CPPFLAGS="$CPPFLAGS"
10011   ac_save_LDFLAGS="$LDFLAGS"
10012 #  ac_save_LIBS="$LIBS"
10013
10014   if test \! -z "$includedir" ; then
10015     CPPFLAGS="$CPPFLAGS -I$includedir"
10016   fi
10017   # note: $X_CFLAGS includes $x_includes
10018   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10019
10020   if test \! -z "$libdir" ; then
10021     LDFLAGS="$LDFLAGS -L$libdir"
10022   fi
10023   # note: $X_LIBS includes $x_libraries
10024   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10025
10026   echo "$as_me:$LINENO: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
10027 echo $ECHO_N "checking for XSGIvcQueryGammaMap in -lXsgivc... $ECHO_C" >&6
10028 if test "${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+set}" = set; then
10029   echo $ECHO_N "(cached) $ECHO_C" >&6
10030 else
10031   ac_check_lib_save_LIBS=$LIBS
10032 LIBS="-lXsgivc -lXext -lX11 $LIBS"
10033 cat >conftest.$ac_ext <<_ACEOF
10034 /* confdefs.h.  */
10035 _ACEOF
10036 cat confdefs.h >>conftest.$ac_ext
10037 cat >>conftest.$ac_ext <<_ACEOF
10038 /* end confdefs.h.  */
10039
10040 /* Override any gcc2 internal prototype to avoid an error.  */
10041 #ifdef __cplusplus
10042 extern "C"
10043 #endif
10044 /* We use char because int might match the return type of a gcc2
10045    builtin and then its argument prototype would still apply.  */
10046 char XSGIvcQueryGammaMap ();
10047 int
10048 main ()
10049 {
10050 XSGIvcQueryGammaMap ();
10051   ;
10052   return 0;
10053 }
10054 _ACEOF
10055 rm -f conftest.$ac_objext conftest$ac_exeext
10056 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10057   (eval $ac_link) 2>conftest.er1
10058   ac_status=$?
10059   grep -v '^ *+' conftest.er1 >conftest.err
10060   rm -f conftest.er1
10061   cat conftest.err >&5
10062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10063   (exit $ac_status); } &&
10064          { ac_try='test -z "$ac_c_werror_flag"
10065                          || test ! -s conftest.err'
10066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10067   (eval $ac_try) 2>&5
10068   ac_status=$?
10069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10070   (exit $ac_status); }; } &&
10071          { ac_try='test -s conftest$ac_exeext'
10072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10073   (eval $ac_try) 2>&5
10074   ac_status=$?
10075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10076   (exit $ac_status); }; }; then
10077   ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
10078 else
10079   echo "$as_me: failed program was:" >&5
10080 sed 's/^/| /' conftest.$ac_ext >&5
10081
10082 ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
10083 fi
10084 rm -f conftest.err conftest.$ac_objext \
10085       conftest$ac_exeext conftest.$ac_ext
10086 LIBS=$ac_check_lib_save_LIBS
10087 fi
10088 echo "$as_me:$LINENO: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
10089 echo "${ECHO_T}$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6
10090 if test $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap = yes; then
10091   have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
10092 else
10093   true
10094 fi
10095
10096   CPPFLAGS="$ac_save_CPPFLAGS"
10097   LDFLAGS="$ac_save_LDFLAGS"
10098 #  LIBS="$ac_save_LIBS"
10099
10100   fi
10101
10102   # if that succeeded, then we've really got it.
10103   if test "$have_sgivc" = yes; then
10104     cat >>confdefs.h <<\_ACEOF
10105 #define HAVE_SGI_VC_EXTENSION 1
10106 _ACEOF
10107
10108   fi
10109
10110 elif test "$with_sgivc" != no; then
10111   echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
10112   exit 1
10113 fi
10114
10115
10116 ###############################################################################
10117 #
10118 #       Check for the DPMS server extension.
10119 #
10120 ###############################################################################
10121
10122 have_dpms=no
10123 with_dpms_req=unspecified
10124
10125 # Check whether --with-dpms-ext or --without-dpms-ext was given.
10126 if test "${with_dpms_ext+set}" = set; then
10127   withval="$with_dpms_ext"
10128   with_dpms="$withval"; with_dpms_req="$withval"
10129 else
10130   with_dpms=yes
10131 fi;
10132
10133
10134    case "$with_dpms" in
10135     yes) ;;
10136     no)  ;;
10137
10138     /*)
10139      echo "$as_me:$LINENO: checking for DPMS headers" >&5
10140 echo $ECHO_N "checking for DPMS headers... $ECHO_C" >&6
10141      d=$with_dpms/include
10142      if test -d $d; then
10143        X_CFLAGS="-I$d $X_CFLAGS"
10144        echo "$as_me:$LINENO: result: $d" >&5
10145 echo "${ECHO_T}$d" >&6
10146      else
10147        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10148 echo "${ECHO_T}not found ($d: no such directory)" >&6
10149      fi
10150
10151      echo "$as_me:$LINENO: checking for DPMS libs" >&5
10152 echo $ECHO_N "checking for DPMS libs... $ECHO_C" >&6
10153      d=$with_dpms/lib
10154      if test -d $d; then
10155        X_LIBS="-L$d $X_LIBS"
10156        echo "$as_me:$LINENO: result: $d" >&5
10157 echo "${ECHO_T}$d" >&6
10158      else
10159        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10160 echo "${ECHO_T}not found ($d: no such directory)" >&6
10161      fi
10162
10163      # replace the directory string with "yes".
10164      with_dpms_req="yes"
10165      with_dpms=$with_dpms_req
10166      ;;
10167
10168     *)
10169      echo ""
10170      echo "error: argument to --with-dpms-ext must be \"yes\", \"no\", or a directory."
10171      echo "       If it is a directory, then \`DIR/include' will be added to"
10172      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10173      exit 1
10174      ;;
10175    esac
10176
10177
10178 if test "$with_dpms" = yes; then
10179
10180   # first check for dpms.h
10181
10182   ac_save_CPPFLAGS="$CPPFLAGS"
10183   if test \! -z "$includedir" ; then
10184     CPPFLAGS="$CPPFLAGS -I$includedir"
10185   fi
10186   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10187   echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5
10188 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6
10189 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then
10190   echo $ECHO_N "(cached) $ECHO_C" >&6
10191 else
10192   cat >conftest.$ac_ext <<_ACEOF
10193 /* confdefs.h.  */
10194 _ACEOF
10195 cat confdefs.h >>conftest.$ac_ext
10196 cat >>conftest.$ac_ext <<_ACEOF
10197 /* end confdefs.h.  */
10198 #include <X11/Xlib.h>
10199                      #include <X11/Xmd.h>
10200
10201 #include <X11/extensions/dpms.h>
10202 _ACEOF
10203 rm -f conftest.$ac_objext
10204 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10205   (eval $ac_compile) 2>conftest.er1
10206   ac_status=$?
10207   grep -v '^ *+' conftest.er1 >conftest.err
10208   rm -f conftest.er1
10209   cat conftest.err >&5
10210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10211   (exit $ac_status); } &&
10212          { ac_try='test -z "$ac_c_werror_flag"
10213                          || test ! -s conftest.err'
10214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10215   (eval $ac_try) 2>&5
10216   ac_status=$?
10217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10218   (exit $ac_status); }; } &&
10219          { ac_try='test -s conftest.$ac_objext'
10220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10221   (eval $ac_try) 2>&5
10222   ac_status=$?
10223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10224   (exit $ac_status); }; }; then
10225   ac_cv_header_X11_extensions_dpms_h=yes
10226 else
10227   echo "$as_me: failed program was:" >&5
10228 sed 's/^/| /' conftest.$ac_ext >&5
10229
10230 ac_cv_header_X11_extensions_dpms_h=no
10231 fi
10232 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10233 fi
10234 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5
10235 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6
10236 if test $ac_cv_header_X11_extensions_dpms_h = yes; then
10237   have_dpms=yes
10238 fi
10239
10240
10241   CPPFLAGS="$ac_save_CPPFLAGS"
10242
10243   # if that succeeded, then check for the DPMS code in the libraries
10244   if test "$have_dpms" = yes; then
10245
10246     # first look in -lXext (this is where it is with XFree86 4.0)
10247     have_dpms=no
10248
10249   ac_save_CPPFLAGS="$CPPFLAGS"
10250   ac_save_LDFLAGS="$LDFLAGS"
10251 #  ac_save_LIBS="$LIBS"
10252
10253   if test \! -z "$includedir" ; then
10254     CPPFLAGS="$CPPFLAGS -I$includedir"
10255   fi
10256   # note: $X_CFLAGS includes $x_includes
10257   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10258
10259   if test \! -z "$libdir" ; then
10260     LDFLAGS="$LDFLAGS -L$libdir"
10261   fi
10262   # note: $X_LIBS includes $x_libraries
10263   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10264
10265   echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5
10266 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6
10267 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then
10268   echo $ECHO_N "(cached) $ECHO_C" >&6
10269 else
10270   ac_check_lib_save_LIBS=$LIBS
10271 LIBS="-lXext -lXext -lX11 $LIBS"
10272 cat >conftest.$ac_ext <<_ACEOF
10273 /* confdefs.h.  */
10274 _ACEOF
10275 cat confdefs.h >>conftest.$ac_ext
10276 cat >>conftest.$ac_ext <<_ACEOF
10277 /* end confdefs.h.  */
10278
10279 /* Override any gcc2 internal prototype to avoid an error.  */
10280 #ifdef __cplusplus
10281 extern "C"
10282 #endif
10283 /* We use char because int might match the return type of a gcc2
10284    builtin and then its argument prototype would still apply.  */
10285 char DPMSInfo ();
10286 int
10287 main ()
10288 {
10289 DPMSInfo ();
10290   ;
10291   return 0;
10292 }
10293 _ACEOF
10294 rm -f conftest.$ac_objext conftest$ac_exeext
10295 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10296   (eval $ac_link) 2>conftest.er1
10297   ac_status=$?
10298   grep -v '^ *+' conftest.er1 >conftest.err
10299   rm -f conftest.er1
10300   cat conftest.err >&5
10301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10302   (exit $ac_status); } &&
10303          { ac_try='test -z "$ac_c_werror_flag"
10304                          || test ! -s conftest.err'
10305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10306   (eval $ac_try) 2>&5
10307   ac_status=$?
10308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10309   (exit $ac_status); }; } &&
10310          { ac_try='test -s conftest$ac_exeext'
10311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10312   (eval $ac_try) 2>&5
10313   ac_status=$?
10314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10315   (exit $ac_status); }; }; then
10316   ac_cv_lib_Xext_DPMSInfo=yes
10317 else
10318   echo "$as_me: failed program was:" >&5
10319 sed 's/^/| /' conftest.$ac_ext >&5
10320
10321 ac_cv_lib_Xext_DPMSInfo=no
10322 fi
10323 rm -f conftest.err conftest.$ac_objext \
10324       conftest$ac_exeext conftest.$ac_ext
10325 LIBS=$ac_check_lib_save_LIBS
10326 fi
10327 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5
10328 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6
10329 if test $ac_cv_lib_Xext_DPMSInfo = yes; then
10330   have_dpms=yes
10331 else
10332   true
10333 fi
10334
10335   CPPFLAGS="$ac_save_CPPFLAGS"
10336   LDFLAGS="$ac_save_LDFLAGS"
10337 #  LIBS="$ac_save_LIBS"
10338
10339
10340     # if that failed, look in -lXdpms (this is where it was in XFree86 3.x)
10341     if test "$have_dpms" = no; then
10342
10343   ac_save_CPPFLAGS="$CPPFLAGS"
10344   ac_save_LDFLAGS="$LDFLAGS"
10345 #  ac_save_LIBS="$LIBS"
10346
10347   if test \! -z "$includedir" ; then
10348     CPPFLAGS="$CPPFLAGS -I$includedir"
10349   fi
10350   # note: $X_CFLAGS includes $x_includes
10351   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10352
10353   if test \! -z "$libdir" ; then
10354     LDFLAGS="$LDFLAGS -L$libdir"
10355   fi
10356   # note: $X_LIBS includes $x_libraries
10357   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10358
10359   echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5
10360 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6
10361 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then
10362   echo $ECHO_N "(cached) $ECHO_C" >&6
10363 else
10364   ac_check_lib_save_LIBS=$LIBS
10365 LIBS="-lXdpms -lXext -lX11 $LIBS"
10366 cat >conftest.$ac_ext <<_ACEOF
10367 /* confdefs.h.  */
10368 _ACEOF
10369 cat confdefs.h >>conftest.$ac_ext
10370 cat >>conftest.$ac_ext <<_ACEOF
10371 /* end confdefs.h.  */
10372
10373 /* Override any gcc2 internal prototype to avoid an error.  */
10374 #ifdef __cplusplus
10375 extern "C"
10376 #endif
10377 /* We use char because int might match the return type of a gcc2
10378    builtin and then its argument prototype would still apply.  */
10379 char DPMSInfo ();
10380 int
10381 main ()
10382 {
10383 DPMSInfo ();
10384   ;
10385   return 0;
10386 }
10387 _ACEOF
10388 rm -f conftest.$ac_objext conftest$ac_exeext
10389 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10390   (eval $ac_link) 2>conftest.er1
10391   ac_status=$?
10392   grep -v '^ *+' conftest.er1 >conftest.err
10393   rm -f conftest.er1
10394   cat conftest.err >&5
10395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10396   (exit $ac_status); } &&
10397          { ac_try='test -z "$ac_c_werror_flag"
10398                          || test ! -s conftest.err'
10399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10400   (eval $ac_try) 2>&5
10401   ac_status=$?
10402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10403   (exit $ac_status); }; } &&
10404          { ac_try='test -s conftest$ac_exeext'
10405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10406   (eval $ac_try) 2>&5
10407   ac_status=$?
10408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10409   (exit $ac_status); }; }; then
10410   ac_cv_lib_Xdpms_DPMSInfo=yes
10411 else
10412   echo "$as_me: failed program was:" >&5
10413 sed 's/^/| /' conftest.$ac_ext >&5
10414
10415 ac_cv_lib_Xdpms_DPMSInfo=no
10416 fi
10417 rm -f conftest.err conftest.$ac_objext \
10418       conftest$ac_exeext conftest.$ac_ext
10419 LIBS=$ac_check_lib_save_LIBS
10420 fi
10421 echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5
10422 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6
10423 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then
10424   have_dpms=yes; XDPMS_LIBS="-lXdpms"
10425 else
10426   true
10427 fi
10428
10429   CPPFLAGS="$ac_save_CPPFLAGS"
10430   LDFLAGS="$ac_save_LDFLAGS"
10431 #  LIBS="$ac_save_LIBS"
10432
10433     fi
10434   fi
10435
10436
10437   # if that succeeded, then we've really got it.
10438   if test "$have_dpms" = yes; then
10439     cat >>confdefs.h <<\_ACEOF
10440 #define HAVE_DPMS_EXTENSION 1
10441 _ACEOF
10442
10443   fi
10444
10445 elif test "$with_dpms" != no; then
10446   echo "error: must be yes or no: --with-dpms-ext=$with_dpms"
10447   exit 1
10448 fi
10449
10450
10451 ###############################################################################
10452 #
10453 #       Check for the XINERAMA server extension.
10454 #
10455 ###############################################################################
10456
10457 have_xinerama=no
10458 with_xinerama_req=unspecified
10459
10460 # Check whether --with-xinerama-ext or --without-xinerama-ext was given.
10461 if test "${with_xinerama_ext+set}" = set; then
10462   withval="$with_xinerama_ext"
10463   with_xinerama="$withval"; with_xinerama_req="$withval"
10464 else
10465   with_xinerama=yes
10466 fi;
10467
10468
10469    case "$with_xinerama" in
10470     yes) ;;
10471     no)  ;;
10472
10473     /*)
10474      echo "$as_me:$LINENO: checking for XINERAMA headers" >&5
10475 echo $ECHO_N "checking for XINERAMA headers... $ECHO_C" >&6
10476      d=$with_xinerama/include
10477      if test -d $d; then
10478        X_CFLAGS="-I$d $X_CFLAGS"
10479        echo "$as_me:$LINENO: result: $d" >&5
10480 echo "${ECHO_T}$d" >&6
10481      else
10482        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10483 echo "${ECHO_T}not found ($d: no such directory)" >&6
10484      fi
10485
10486      echo "$as_me:$LINENO: checking for XINERAMA libs" >&5
10487 echo $ECHO_N "checking for XINERAMA libs... $ECHO_C" >&6
10488      d=$with_xinerama/lib
10489      if test -d $d; then
10490        X_LIBS="-L$d $X_LIBS"
10491        echo "$as_me:$LINENO: result: $d" >&5
10492 echo "${ECHO_T}$d" >&6
10493      else
10494        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10495 echo "${ECHO_T}not found ($d: no such directory)" >&6
10496      fi
10497
10498      # replace the directory string with "yes".
10499      with_xinerama_req="yes"
10500      with_xinerama=$with_xinerama_req
10501      ;;
10502
10503     *)
10504      echo ""
10505      echo "error: argument to --with-xinerama-ext must be \"yes\", \"no\", or a directory."
10506      echo "       If it is a directory, then \`DIR/include' will be added to"
10507      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10508      exit 1
10509      ;;
10510    esac
10511
10512
10513 if test "$with_xinerama" = yes; then
10514
10515   # first check for Xinerama.h
10516
10517   ac_save_CPPFLAGS="$CPPFLAGS"
10518   if test \! -z "$includedir" ; then
10519     CPPFLAGS="$CPPFLAGS -I$includedir"
10520   fi
10521   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10522   echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
10523 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6
10524 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
10525   echo $ECHO_N "(cached) $ECHO_C" >&6
10526 else
10527   cat >conftest.$ac_ext <<_ACEOF
10528 /* confdefs.h.  */
10529 _ACEOF
10530 cat confdefs.h >>conftest.$ac_ext
10531 cat >>conftest.$ac_ext <<_ACEOF
10532 /* end confdefs.h.  */
10533 #include <X11/Xlib.h>
10534
10535 #include <X11/extensions/Xinerama.h>
10536 _ACEOF
10537 rm -f conftest.$ac_objext
10538 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10539   (eval $ac_compile) 2>conftest.er1
10540   ac_status=$?
10541   grep -v '^ *+' conftest.er1 >conftest.err
10542   rm -f conftest.er1
10543   cat conftest.err >&5
10544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10545   (exit $ac_status); } &&
10546          { ac_try='test -z "$ac_c_werror_flag"
10547                          || test ! -s conftest.err'
10548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10549   (eval $ac_try) 2>&5
10550   ac_status=$?
10551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10552   (exit $ac_status); }; } &&
10553          { ac_try='test -s conftest.$ac_objext'
10554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10555   (eval $ac_try) 2>&5
10556   ac_status=$?
10557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10558   (exit $ac_status); }; }; then
10559   ac_cv_header_X11_extensions_Xinerama_h=yes
10560 else
10561   echo "$as_me: failed program was:" >&5
10562 sed 's/^/| /' conftest.$ac_ext >&5
10563
10564 ac_cv_header_X11_extensions_Xinerama_h=no
10565 fi
10566 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10567 fi
10568 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
10569 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6
10570 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
10571   have_xinerama=yes
10572 fi
10573
10574
10575   CPPFLAGS="$ac_save_CPPFLAGS"
10576
10577   # if that succeeded, then check for the XINERAMA code in the libraries
10578   if test "$have_xinerama" = yes; then
10579
10580     # first look in -lXext
10581     have_xinerama=no
10582
10583   ac_save_CPPFLAGS="$CPPFLAGS"
10584   ac_save_LDFLAGS="$LDFLAGS"
10585 #  ac_save_LIBS="$LIBS"
10586
10587   if test \! -z "$includedir" ; then
10588     CPPFLAGS="$CPPFLAGS -I$includedir"
10589   fi
10590   # note: $X_CFLAGS includes $x_includes
10591   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10592
10593   if test \! -z "$libdir" ; then
10594     LDFLAGS="$LDFLAGS -L$libdir"
10595   fi
10596   # note: $X_LIBS includes $x_libraries
10597   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10598
10599   echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5
10600 echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6
10601 if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then
10602   echo $ECHO_N "(cached) $ECHO_C" >&6
10603 else
10604   ac_check_lib_save_LIBS=$LIBS
10605 LIBS="-lXext -lXext -lX11 $LIBS"
10606 cat >conftest.$ac_ext <<_ACEOF
10607 /* confdefs.h.  */
10608 _ACEOF
10609 cat confdefs.h >>conftest.$ac_ext
10610 cat >>conftest.$ac_ext <<_ACEOF
10611 /* end confdefs.h.  */
10612
10613 /* Override any gcc2 internal prototype to avoid an error.  */
10614 #ifdef __cplusplus
10615 extern "C"
10616 #endif
10617 /* We use char because int might match the return type of a gcc2
10618    builtin and then its argument prototype would still apply.  */
10619 char XineramaQueryScreens ();
10620 int
10621 main ()
10622 {
10623 XineramaQueryScreens ();
10624   ;
10625   return 0;
10626 }
10627 _ACEOF
10628 rm -f conftest.$ac_objext conftest$ac_exeext
10629 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10630   (eval $ac_link) 2>conftest.er1
10631   ac_status=$?
10632   grep -v '^ *+' conftest.er1 >conftest.err
10633   rm -f conftest.er1
10634   cat conftest.err >&5
10635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10636   (exit $ac_status); } &&
10637          { ac_try='test -z "$ac_c_werror_flag"
10638                          || test ! -s conftest.err'
10639   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10640   (eval $ac_try) 2>&5
10641   ac_status=$?
10642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10643   (exit $ac_status); }; } &&
10644          { ac_try='test -s conftest$ac_exeext'
10645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10646   (eval $ac_try) 2>&5
10647   ac_status=$?
10648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10649   (exit $ac_status); }; }; then
10650   ac_cv_lib_Xext_XineramaQueryScreens=yes
10651 else
10652   echo "$as_me: failed program was:" >&5
10653 sed 's/^/| /' conftest.$ac_ext >&5
10654
10655 ac_cv_lib_Xext_XineramaQueryScreens=no
10656 fi
10657 rm -f conftest.err conftest.$ac_objext \
10658       conftest$ac_exeext conftest.$ac_ext
10659 LIBS=$ac_check_lib_save_LIBS
10660 fi
10661 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5
10662 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6
10663 if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then
10664   have_xinerama=yes
10665 else
10666   true
10667 fi
10668
10669   CPPFLAGS="$ac_save_CPPFLAGS"
10670   LDFLAGS="$ac_save_LDFLAGS"
10671 #  LIBS="$ac_save_LIBS"
10672
10673
10674     # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
10675     if test "$have_xinerama" = no; then
10676
10677   ac_save_CPPFLAGS="$CPPFLAGS"
10678   ac_save_LDFLAGS="$LDFLAGS"
10679 #  ac_save_LIBS="$LIBS"
10680
10681   if test \! -z "$includedir" ; then
10682     CPPFLAGS="$CPPFLAGS -I$includedir"
10683   fi
10684   # note: $X_CFLAGS includes $x_includes
10685   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10686
10687   if test \! -z "$libdir" ; then
10688     LDFLAGS="$LDFLAGS -L$libdir"
10689   fi
10690   # note: $X_LIBS includes $x_libraries
10691   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10692
10693   echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5
10694 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
10695 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
10696   echo $ECHO_N "(cached) $ECHO_C" >&6
10697 else
10698   ac_check_lib_save_LIBS=$LIBS
10699 LIBS="-lXinerama -lXext -lX11 $LIBS"
10700 cat >conftest.$ac_ext <<_ACEOF
10701 /* confdefs.h.  */
10702 _ACEOF
10703 cat confdefs.h >>conftest.$ac_ext
10704 cat >>conftest.$ac_ext <<_ACEOF
10705 /* end confdefs.h.  */
10706
10707 /* Override any gcc2 internal prototype to avoid an error.  */
10708 #ifdef __cplusplus
10709 extern "C"
10710 #endif
10711 /* We use char because int might match the return type of a gcc2
10712    builtin and then its argument prototype would still apply.  */
10713 char XineramaQueryScreens ();
10714 int
10715 main ()
10716 {
10717 XineramaQueryScreens ();
10718   ;
10719   return 0;
10720 }
10721 _ACEOF
10722 rm -f conftest.$ac_objext conftest$ac_exeext
10723 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10724   (eval $ac_link) 2>conftest.er1
10725   ac_status=$?
10726   grep -v '^ *+' conftest.er1 >conftest.err
10727   rm -f conftest.er1
10728   cat conftest.err >&5
10729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10730   (exit $ac_status); } &&
10731          { ac_try='test -z "$ac_c_werror_flag"
10732                          || test ! -s conftest.err'
10733   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10734   (eval $ac_try) 2>&5
10735   ac_status=$?
10736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10737   (exit $ac_status); }; } &&
10738          { ac_try='test -s conftest$ac_exeext'
10739   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10740   (eval $ac_try) 2>&5
10741   ac_status=$?
10742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10743   (exit $ac_status); }; }; then
10744   ac_cv_lib_Xinerama_XineramaQueryScreens=yes
10745 else
10746   echo "$as_me: failed program was:" >&5
10747 sed 's/^/| /' conftest.$ac_ext >&5
10748
10749 ac_cv_lib_Xinerama_XineramaQueryScreens=no
10750 fi
10751 rm -f conftest.err conftest.$ac_objext \
10752       conftest$ac_exeext conftest.$ac_ext
10753 LIBS=$ac_check_lib_save_LIBS
10754 fi
10755 echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
10756 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
10757 if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
10758   have_xinerama=yes; XINERAMA_LIBS="-lXinerama"
10759 else
10760   true
10761 fi
10762
10763   CPPFLAGS="$ac_save_CPPFLAGS"
10764   LDFLAGS="$ac_save_LDFLAGS"
10765 #  LIBS="$ac_save_LIBS"
10766
10767     fi
10768   fi
10769
10770   # if that succeeded, then we've really got it.
10771   if test "$have_xinerama" = yes; then
10772     cat >>confdefs.h <<\_ACEOF
10773 #define HAVE_XINERAMA 1
10774 _ACEOF
10775
10776   fi
10777
10778 elif test "$with_xinerama" != no; then
10779   echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
10780   exit 1
10781 fi
10782
10783
10784 ###############################################################################
10785 #
10786 #       Check for the XF86VMODE server extension (for virtual screens.)
10787 #
10788 ###############################################################################
10789
10790 have_xf86vmode=no
10791 with_xf86vmode_req=unspecified
10792
10793 # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given.
10794 if test "${with_xf86vmode_ext+set}" = set; then
10795   withval="$with_xf86vmode_ext"
10796   with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
10797 else
10798   with_xf86vmode=yes
10799 fi;
10800
10801
10802    case "$with_xf86vmode" in
10803     yes) ;;
10804     no)  ;;
10805
10806     /*)
10807      echo "$as_me:$LINENO: checking for xf86vmode headers" >&5
10808 echo $ECHO_N "checking for xf86vmode headers... $ECHO_C" >&6
10809      d=$with_xf86vmode/include
10810      if test -d $d; then
10811        X_CFLAGS="-I$d $X_CFLAGS"
10812        echo "$as_me:$LINENO: result: $d" >&5
10813 echo "${ECHO_T}$d" >&6
10814      else
10815        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10816 echo "${ECHO_T}not found ($d: no such directory)" >&6
10817      fi
10818
10819      echo "$as_me:$LINENO: checking for xf86vmode libs" >&5
10820 echo $ECHO_N "checking for xf86vmode libs... $ECHO_C" >&6
10821      d=$with_xf86vmode/lib
10822      if test -d $d; then
10823        X_LIBS="-L$d $X_LIBS"
10824        echo "$as_me:$LINENO: result: $d" >&5
10825 echo "${ECHO_T}$d" >&6
10826      else
10827        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
10828 echo "${ECHO_T}not found ($d: no such directory)" >&6
10829      fi
10830
10831      # replace the directory string with "yes".
10832      with_xf86vmode_req="yes"
10833      with_xf86vmode=$with_xf86vmode_req
10834      ;;
10835
10836     *)
10837      echo ""
10838      echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
10839      echo "       If it is a directory, then \`DIR/include' will be added to"
10840      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
10841      exit 1
10842      ;;
10843    esac
10844
10845
10846 VIDMODE_LIBS=""
10847
10848 if test "$with_xf86vmode" = yes; then
10849
10850   # first check for xf86vmode.h
10851
10852   ac_save_CPPFLAGS="$CPPFLAGS"
10853   if test \! -z "$includedir" ; then
10854     CPPFLAGS="$CPPFLAGS -I$includedir"
10855   fi
10856   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10857   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
10858 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
10859 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
10860   echo $ECHO_N "(cached) $ECHO_C" >&6
10861 else
10862   cat >conftest.$ac_ext <<_ACEOF
10863 /* confdefs.h.  */
10864 _ACEOF
10865 cat confdefs.h >>conftest.$ac_ext
10866 cat >>conftest.$ac_ext <<_ACEOF
10867 /* end confdefs.h.  */
10868 #include <X11/Xlib.h>
10869
10870 #include <X11/extensions/xf86vmode.h>
10871 _ACEOF
10872 rm -f conftest.$ac_objext
10873 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10874   (eval $ac_compile) 2>conftest.er1
10875   ac_status=$?
10876   grep -v '^ *+' conftest.er1 >conftest.err
10877   rm -f conftest.er1
10878   cat conftest.err >&5
10879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10880   (exit $ac_status); } &&
10881          { ac_try='test -z "$ac_c_werror_flag"
10882                          || test ! -s conftest.err'
10883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10884   (eval $ac_try) 2>&5
10885   ac_status=$?
10886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10887   (exit $ac_status); }; } &&
10888          { ac_try='test -s conftest.$ac_objext'
10889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10890   (eval $ac_try) 2>&5
10891   ac_status=$?
10892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10893   (exit $ac_status); }; }; then
10894   ac_cv_header_X11_extensions_xf86vmode_h=yes
10895 else
10896   echo "$as_me: failed program was:" >&5
10897 sed 's/^/| /' conftest.$ac_ext >&5
10898
10899 ac_cv_header_X11_extensions_xf86vmode_h=no
10900 fi
10901 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10902 fi
10903 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
10904 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
10905 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
10906   have_xf86vmode=yes
10907 fi
10908
10909
10910   CPPFLAGS="$ac_save_CPPFLAGS"
10911
10912   # if that succeeded, then check for the -lXxf86vm
10913   if test "$have_xf86vmode" = yes; then
10914     have_xf86vmode=no
10915
10916   ac_save_CPPFLAGS="$CPPFLAGS"
10917   ac_save_LDFLAGS="$LDFLAGS"
10918 #  ac_save_LIBS="$LIBS"
10919
10920   if test \! -z "$includedir" ; then
10921     CPPFLAGS="$CPPFLAGS -I$includedir"
10922   fi
10923   # note: $X_CFLAGS includes $x_includes
10924   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10925
10926   if test \! -z "$libdir" ; then
10927     LDFLAGS="$LDFLAGS -L$libdir"
10928   fi
10929   # note: $X_LIBS includes $x_libraries
10930   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
10931
10932   echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
10933 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6
10934 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then
10935   echo $ECHO_N "(cached) $ECHO_C" >&6
10936 else
10937   ac_check_lib_save_LIBS=$LIBS
10938 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
10939 cat >conftest.$ac_ext <<_ACEOF
10940 /* confdefs.h.  */
10941 _ACEOF
10942 cat confdefs.h >>conftest.$ac_ext
10943 cat >>conftest.$ac_ext <<_ACEOF
10944 /* end confdefs.h.  */
10945
10946 /* Override any gcc2 internal prototype to avoid an error.  */
10947 #ifdef __cplusplus
10948 extern "C"
10949 #endif
10950 /* We use char because int might match the return type of a gcc2
10951    builtin and then its argument prototype would still apply.  */
10952 char XF86VidModeGetViewPort ();
10953 int
10954 main ()
10955 {
10956 XF86VidModeGetViewPort ();
10957   ;
10958   return 0;
10959 }
10960 _ACEOF
10961 rm -f conftest.$ac_objext conftest$ac_exeext
10962 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10963   (eval $ac_link) 2>conftest.er1
10964   ac_status=$?
10965   grep -v '^ *+' conftest.er1 >conftest.err
10966   rm -f conftest.er1
10967   cat conftest.err >&5
10968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10969   (exit $ac_status); } &&
10970          { ac_try='test -z "$ac_c_werror_flag"
10971                          || test ! -s conftest.err'
10972   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10973   (eval $ac_try) 2>&5
10974   ac_status=$?
10975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10976   (exit $ac_status); }; } &&
10977          { ac_try='test -s conftest$ac_exeext'
10978   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10979   (eval $ac_try) 2>&5
10980   ac_status=$?
10981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10982   (exit $ac_status); }; }; then
10983   ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
10984 else
10985   echo "$as_me: failed program was:" >&5
10986 sed 's/^/| /' conftest.$ac_ext >&5
10987
10988 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
10989 fi
10990 rm -f conftest.err conftest.$ac_objext \
10991       conftest$ac_exeext conftest.$ac_ext
10992 LIBS=$ac_check_lib_save_LIBS
10993 fi
10994 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
10995 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6
10996 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then
10997   have_xf86vmode=yes;
10998                    VIDMODE_LIBS="-lXxf86vm";
10999                    SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
11000 else
11001   true
11002 fi
11003
11004   CPPFLAGS="$ac_save_CPPFLAGS"
11005   LDFLAGS="$ac_save_LDFLAGS"
11006 #  LIBS="$ac_save_LIBS"
11007
11008   fi
11009
11010   # if that succeeded, then we've really got it.
11011   if test "$have_xf86vmode" = yes; then
11012     cat >>confdefs.h <<\_ACEOF
11013 #define HAVE_XF86VMODE 1
11014 _ACEOF
11015
11016   fi
11017
11018 elif test "$with_xf86vmode" != no; then
11019   echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
11020   exit 1
11021 fi
11022
11023
11024 ###############################################################################
11025 #
11026 #       Check for the XF86VMODE server extension (for gamma fading.)
11027 #
11028 ###############################################################################
11029
11030 have_xf86gamma=no
11031 have_xf86gamma_ramp=no
11032 with_xf86gamma_req=unspecified
11033
11034 # Check whether --with-xf86gamma-ext or --without-xf86gamma-ext was given.
11035 if test "${with_xf86gamma_ext+set}" = set; then
11036   withval="$with_xf86gamma_ext"
11037   with_xf86gamma="$withval"; with_xf86gamma_req="$withval"
11038 else
11039   with_xf86gamma=yes
11040 fi;
11041
11042
11043    case "$with_xf86gamma" in
11044     yes) ;;
11045     no)  ;;
11046
11047     /*)
11048      echo "$as_me:$LINENO: checking for xf86gamma headers" >&5
11049 echo $ECHO_N "checking for xf86gamma headers... $ECHO_C" >&6
11050      d=$with_xf86gamma/include
11051      if test -d $d; then
11052        X_CFLAGS="-I$d $X_CFLAGS"
11053        echo "$as_me:$LINENO: result: $d" >&5
11054 echo "${ECHO_T}$d" >&6
11055      else
11056        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11057 echo "${ECHO_T}not found ($d: no such directory)" >&6
11058      fi
11059
11060      echo "$as_me:$LINENO: checking for xf86gamma libs" >&5
11061 echo $ECHO_N "checking for xf86gamma libs... $ECHO_C" >&6
11062      d=$with_xf86gamma/lib
11063      if test -d $d; then
11064        X_LIBS="-L$d $X_LIBS"
11065        echo "$as_me:$LINENO: result: $d" >&5
11066 echo "${ECHO_T}$d" >&6
11067      else
11068        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11069 echo "${ECHO_T}not found ($d: no such directory)" >&6
11070      fi
11071
11072      # replace the directory string with "yes".
11073      with_xf86gamma_req="yes"
11074      with_xf86gamma=$with_xf86gamma_req
11075      ;;
11076
11077     *)
11078      echo ""
11079      echo "error: argument to --with-xf86gamma-ext must be \"yes\", \"no\", or a directory."
11080      echo "       If it is a directory, then \`DIR/include' will be added to"
11081      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11082      exit 1
11083      ;;
11084    esac
11085
11086
11087 if test "$with_xf86gamma" = yes; then
11088
11089   # first check for xf86vmode.h, if we haven't already
11090   if test "$have_xf86vmode" = yes; then
11091     have_xf86gamma=yes
11092   else
11093
11094   ac_save_CPPFLAGS="$CPPFLAGS"
11095   if test \! -z "$includedir" ; then
11096     CPPFLAGS="$CPPFLAGS -I$includedir"
11097   fi
11098   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11099   echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
11100 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6
11101 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
11102   echo $ECHO_N "(cached) $ECHO_C" >&6
11103 else
11104   cat >conftest.$ac_ext <<_ACEOF
11105 /* confdefs.h.  */
11106 _ACEOF
11107 cat confdefs.h >>conftest.$ac_ext
11108 cat >>conftest.$ac_ext <<_ACEOF
11109 /* end confdefs.h.  */
11110 #include <X11/Xlib.h>
11111
11112 #include <X11/extensions/xf86vmode.h>
11113 _ACEOF
11114 rm -f conftest.$ac_objext
11115 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11116   (eval $ac_compile) 2>conftest.er1
11117   ac_status=$?
11118   grep -v '^ *+' conftest.er1 >conftest.err
11119   rm -f conftest.er1
11120   cat conftest.err >&5
11121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11122   (exit $ac_status); } &&
11123          { ac_try='test -z "$ac_c_werror_flag"
11124                          || test ! -s conftest.err'
11125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11126   (eval $ac_try) 2>&5
11127   ac_status=$?
11128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11129   (exit $ac_status); }; } &&
11130          { ac_try='test -s conftest.$ac_objext'
11131   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11132   (eval $ac_try) 2>&5
11133   ac_status=$?
11134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11135   (exit $ac_status); }; }; then
11136   ac_cv_header_X11_extensions_xf86vmode_h=yes
11137 else
11138   echo "$as_me: failed program was:" >&5
11139 sed 's/^/| /' conftest.$ac_ext >&5
11140
11141 ac_cv_header_X11_extensions_xf86vmode_h=no
11142 fi
11143 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11144 fi
11145 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
11146 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6
11147 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
11148   have_xf86gamma=yes
11149 fi
11150
11151
11152   CPPFLAGS="$ac_save_CPPFLAGS"
11153   fi
11154
11155   # if that succeeded, then check for the -lXxf86vm
11156   if test "$have_xf86gamma" = yes; then
11157     have_xf86gamma=no
11158
11159   ac_save_CPPFLAGS="$CPPFLAGS"
11160   ac_save_LDFLAGS="$LDFLAGS"
11161 #  ac_save_LIBS="$LIBS"
11162
11163   if test \! -z "$includedir" ; then
11164     CPPFLAGS="$CPPFLAGS -I$includedir"
11165   fi
11166   # note: $X_CFLAGS includes $x_includes
11167   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11168
11169   if test \! -z "$libdir" ; then
11170     LDFLAGS="$LDFLAGS -L$libdir"
11171   fi
11172   # note: $X_LIBS includes $x_libraries
11173   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11174
11175   echo "$as_me:$LINENO: checking for XF86VidModeSetGamma in -lXxf86vm" >&5
11176 echo $ECHO_N "checking for XF86VidModeSetGamma in -lXxf86vm... $ECHO_C" >&6
11177 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGamma+set}" = set; then
11178   echo $ECHO_N "(cached) $ECHO_C" >&6
11179 else
11180   ac_check_lib_save_LIBS=$LIBS
11181 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11182 cat >conftest.$ac_ext <<_ACEOF
11183 /* confdefs.h.  */
11184 _ACEOF
11185 cat confdefs.h >>conftest.$ac_ext
11186 cat >>conftest.$ac_ext <<_ACEOF
11187 /* end confdefs.h.  */
11188
11189 /* Override any gcc2 internal prototype to avoid an error.  */
11190 #ifdef __cplusplus
11191 extern "C"
11192 #endif
11193 /* We use char because int might match the return type of a gcc2
11194    builtin and then its argument prototype would still apply.  */
11195 char XF86VidModeSetGamma ();
11196 int
11197 main ()
11198 {
11199 XF86VidModeSetGamma ();
11200   ;
11201   return 0;
11202 }
11203 _ACEOF
11204 rm -f conftest.$ac_objext conftest$ac_exeext
11205 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11206   (eval $ac_link) 2>conftest.er1
11207   ac_status=$?
11208   grep -v '^ *+' conftest.er1 >conftest.err
11209   rm -f conftest.er1
11210   cat conftest.err >&5
11211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11212   (exit $ac_status); } &&
11213          { ac_try='test -z "$ac_c_werror_flag"
11214                          || test ! -s conftest.err'
11215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11216   (eval $ac_try) 2>&5
11217   ac_status=$?
11218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11219   (exit $ac_status); }; } &&
11220          { ac_try='test -s conftest$ac_exeext'
11221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11222   (eval $ac_try) 2>&5
11223   ac_status=$?
11224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11225   (exit $ac_status); }; }; then
11226   ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=yes
11227 else
11228   echo "$as_me: failed program was:" >&5
11229 sed 's/^/| /' conftest.$ac_ext >&5
11230
11231 ac_cv_lib_Xxf86vm_XF86VidModeSetGamma=no
11232 fi
11233 rm -f conftest.err conftest.$ac_objext \
11234       conftest$ac_exeext conftest.$ac_ext
11235 LIBS=$ac_check_lib_save_LIBS
11236 fi
11237 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&5
11238 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGamma" >&6
11239 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGamma = yes; then
11240   have_xf86gamma=yes
11241 else
11242   true
11243 fi
11244
11245   CPPFLAGS="$ac_save_CPPFLAGS"
11246   LDFLAGS="$ac_save_LDFLAGS"
11247 #  LIBS="$ac_save_LIBS"
11248
11249   fi
11250
11251   # check for the Ramp versions of the functions too.
11252   if test "$have_xf86gamma" = yes; then
11253     have_xf86gamma_ramp=no
11254
11255   ac_save_CPPFLAGS="$CPPFLAGS"
11256   ac_save_LDFLAGS="$LDFLAGS"
11257 #  ac_save_LIBS="$LIBS"
11258
11259   if test \! -z "$includedir" ; then
11260     CPPFLAGS="$CPPFLAGS -I$includedir"
11261   fi
11262   # note: $X_CFLAGS includes $x_includes
11263   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11264
11265   if test \! -z "$libdir" ; then
11266     LDFLAGS="$LDFLAGS -L$libdir"
11267   fi
11268   # note: $X_LIBS includes $x_libraries
11269   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11270
11271   echo "$as_me:$LINENO: checking for XF86VidModeSetGammaRamp in -lXxf86vm" >&5
11272 echo $ECHO_N "checking for XF86VidModeSetGammaRamp in -lXxf86vm... $ECHO_C" >&6
11273 if test "${ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp+set}" = set; then
11274   echo $ECHO_N "(cached) $ECHO_C" >&6
11275 else
11276   ac_check_lib_save_LIBS=$LIBS
11277 LIBS="-lXxf86vm -lXext -lX11 $LIBS"
11278 cat >conftest.$ac_ext <<_ACEOF
11279 /* confdefs.h.  */
11280 _ACEOF
11281 cat confdefs.h >>conftest.$ac_ext
11282 cat >>conftest.$ac_ext <<_ACEOF
11283 /* end confdefs.h.  */
11284
11285 /* Override any gcc2 internal prototype to avoid an error.  */
11286 #ifdef __cplusplus
11287 extern "C"
11288 #endif
11289 /* We use char because int might match the return type of a gcc2
11290    builtin and then its argument prototype would still apply.  */
11291 char XF86VidModeSetGammaRamp ();
11292 int
11293 main ()
11294 {
11295 XF86VidModeSetGammaRamp ();
11296   ;
11297   return 0;
11298 }
11299 _ACEOF
11300 rm -f conftest.$ac_objext conftest$ac_exeext
11301 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11302   (eval $ac_link) 2>conftest.er1
11303   ac_status=$?
11304   grep -v '^ *+' conftest.er1 >conftest.err
11305   rm -f conftest.er1
11306   cat conftest.err >&5
11307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11308   (exit $ac_status); } &&
11309          { ac_try='test -z "$ac_c_werror_flag"
11310                          || test ! -s conftest.err'
11311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11312   (eval $ac_try) 2>&5
11313   ac_status=$?
11314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11315   (exit $ac_status); }; } &&
11316          { ac_try='test -s conftest$ac_exeext'
11317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11318   (eval $ac_try) 2>&5
11319   ac_status=$?
11320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11321   (exit $ac_status); }; }; then
11322   ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=yes
11323 else
11324   echo "$as_me: failed program was:" >&5
11325 sed 's/^/| /' conftest.$ac_ext >&5
11326
11327 ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp=no
11328 fi
11329 rm -f conftest.err conftest.$ac_objext \
11330       conftest$ac_exeext conftest.$ac_ext
11331 LIBS=$ac_check_lib_save_LIBS
11332 fi
11333 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&5
11334 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp" >&6
11335 if test $ac_cv_lib_Xxf86vm_XF86VidModeSetGammaRamp = yes; then
11336   have_xf86gamma_ramp=yes
11337 else
11338   true
11339 fi
11340
11341   CPPFLAGS="$ac_save_CPPFLAGS"
11342   LDFLAGS="$ac_save_LDFLAGS"
11343 #  LIBS="$ac_save_LIBS"
11344
11345   fi
11346
11347   # if those tests succeeded, then we've really got the functions.
11348   if test "$have_xf86gamma" = yes; then
11349     cat >>confdefs.h <<\_ACEOF
11350 #define HAVE_XF86VMODE_GAMMA 1
11351 _ACEOF
11352
11353   fi
11354
11355   if test "$have_xf86gamma_ramp" = yes; then
11356     cat >>confdefs.h <<\_ACEOF
11357 #define HAVE_XF86VMODE_GAMMA_RAMP 1
11358 _ACEOF
11359
11360   fi
11361
11362   # pull in the lib, if we haven't already
11363   if test "$have_xf86gamma" = yes -a "$have_xf86vmode" = no; then
11364     SAVER_LIBS="$SAVER_LIBS -lXxf86vm"
11365   fi
11366
11367 elif test "$with_xf86gamma" != no; then
11368   echo "error: must be yes or no: --with-xf86gamma-ext=$with_xf86vmode"
11369   exit 1
11370 fi
11371
11372
11373 ###############################################################################
11374 #
11375 #       Check for the RANDR (Resize and Rotate) server extension.
11376 #
11377 #       We need this to detect when the resolution of the desktop
11378 #       has changed out from under us (this is a newer, different
11379 #       mechanism than the XF86VMODE virtual viewports.)
11380 #
11381 ###############################################################################
11382
11383 have_randr=no
11384 with_randr_req=unspecified
11385
11386 # Check whether --with-randr-ext or --without-randr-ext was given.
11387 if test "${with_randr_ext+set}" = set; then
11388   withval="$with_randr_ext"
11389   with_randr="$withval"; with_randr_req="$withval"
11390 else
11391   with_randr=yes
11392 fi;
11393
11394
11395    case "$with_randr" in
11396     yes) ;;
11397     no)  ;;
11398
11399     /*)
11400      echo "$as_me:$LINENO: checking for RANDR headers" >&5
11401 echo $ECHO_N "checking for RANDR headers... $ECHO_C" >&6
11402      d=$with_randr/include
11403      if test -d $d; then
11404        X_CFLAGS="-I$d $X_CFLAGS"
11405        echo "$as_me:$LINENO: result: $d" >&5
11406 echo "${ECHO_T}$d" >&6
11407      else
11408        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11409 echo "${ECHO_T}not found ($d: no such directory)" >&6
11410      fi
11411
11412      echo "$as_me:$LINENO: checking for RANDR libs" >&5
11413 echo $ECHO_N "checking for RANDR libs... $ECHO_C" >&6
11414      d=$with_randr/lib
11415      if test -d $d; then
11416        X_LIBS="-L$d $X_LIBS"
11417        echo "$as_me:$LINENO: result: $d" >&5
11418 echo "${ECHO_T}$d" >&6
11419      else
11420        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
11421 echo "${ECHO_T}not found ($d: no such directory)" >&6
11422      fi
11423
11424      # replace the directory string with "yes".
11425      with_randr_req="yes"
11426      with_randr=$with_randr_req
11427      ;;
11428
11429     *)
11430      echo ""
11431      echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
11432      echo "       If it is a directory, then \`DIR/include' will be added to"
11433      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
11434      exit 1
11435      ;;
11436    esac
11437
11438
11439 if test "$with_randr" = yes; then
11440
11441   # first check for Randr.h
11442
11443   ac_save_CPPFLAGS="$CPPFLAGS"
11444   if test \! -z "$includedir" ; then
11445     CPPFLAGS="$CPPFLAGS -I$includedir"
11446   fi
11447   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11448   echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
11449 echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6
11450 if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
11451   echo $ECHO_N "(cached) $ECHO_C" >&6
11452 else
11453   cat >conftest.$ac_ext <<_ACEOF
11454 /* confdefs.h.  */
11455 _ACEOF
11456 cat confdefs.h >>conftest.$ac_ext
11457 cat >>conftest.$ac_ext <<_ACEOF
11458 /* end confdefs.h.  */
11459 #include <X11/Xlib.h>
11460
11461 #include <X11/extensions/Xrandr.h>
11462 _ACEOF
11463 rm -f conftest.$ac_objext
11464 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11465   (eval $ac_compile) 2>conftest.er1
11466   ac_status=$?
11467   grep -v '^ *+' conftest.er1 >conftest.err
11468   rm -f conftest.er1
11469   cat conftest.err >&5
11470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11471   (exit $ac_status); } &&
11472          { ac_try='test -z "$ac_c_werror_flag"
11473                          || test ! -s conftest.err'
11474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11475   (eval $ac_try) 2>&5
11476   ac_status=$?
11477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11478   (exit $ac_status); }; } &&
11479          { ac_try='test -s conftest.$ac_objext'
11480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11481   (eval $ac_try) 2>&5
11482   ac_status=$?
11483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11484   (exit $ac_status); }; }; then
11485   ac_cv_header_X11_extensions_Xrandr_h=yes
11486 else
11487   echo "$as_me: failed program was:" >&5
11488 sed 's/^/| /' conftest.$ac_ext >&5
11489
11490 ac_cv_header_X11_extensions_Xrandr_h=no
11491 fi
11492 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11493 fi
11494 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
11495 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6
11496 if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
11497   have_randr=yes
11498 fi
11499
11500
11501   CPPFLAGS="$ac_save_CPPFLAGS"
11502
11503   # if that succeeded, then check for the XRR code in the libraries
11504   if test "$have_randr" = yes; then
11505
11506     # RANDR probably needs -lXrender
11507     xrender_libs=
11508
11509   ac_save_CPPFLAGS="$CPPFLAGS"
11510   ac_save_LDFLAGS="$LDFLAGS"
11511 #  ac_save_LIBS="$LIBS"
11512
11513   if test \! -z "$includedir" ; then
11514     CPPFLAGS="$CPPFLAGS -I$includedir"
11515   fi
11516   # note: $X_CFLAGS includes $x_includes
11517   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11518
11519   if test \! -z "$libdir" ; then
11520     LDFLAGS="$LDFLAGS -L$libdir"
11521   fi
11522   # note: $X_LIBS includes $x_libraries
11523   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11524
11525   echo "$as_me:$LINENO: checking for XRenderSetSubpixelOrder in -lXrender" >&5
11526 echo $ECHO_N "checking for XRenderSetSubpixelOrder in -lXrender... $ECHO_C" >&6
11527 if test "${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+set}" = set; then
11528   echo $ECHO_N "(cached) $ECHO_C" >&6
11529 else
11530   ac_check_lib_save_LIBS=$LIBS
11531 LIBS="-lXrender -lXext -lX11 $LIBS"
11532 cat >conftest.$ac_ext <<_ACEOF
11533 /* confdefs.h.  */
11534 _ACEOF
11535 cat confdefs.h >>conftest.$ac_ext
11536 cat >>conftest.$ac_ext <<_ACEOF
11537 /* end confdefs.h.  */
11538
11539 /* Override any gcc2 internal prototype to avoid an error.  */
11540 #ifdef __cplusplus
11541 extern "C"
11542 #endif
11543 /* We use char because int might match the return type of a gcc2
11544    builtin and then its argument prototype would still apply.  */
11545 char XRenderSetSubpixelOrder ();
11546 int
11547 main ()
11548 {
11549 XRenderSetSubpixelOrder ();
11550   ;
11551   return 0;
11552 }
11553 _ACEOF
11554 rm -f conftest.$ac_objext conftest$ac_exeext
11555 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11556   (eval $ac_link) 2>conftest.er1
11557   ac_status=$?
11558   grep -v '^ *+' conftest.er1 >conftest.err
11559   rm -f conftest.er1
11560   cat conftest.err >&5
11561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11562   (exit $ac_status); } &&
11563          { ac_try='test -z "$ac_c_werror_flag"
11564                          || test ! -s conftest.err'
11565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11566   (eval $ac_try) 2>&5
11567   ac_status=$?
11568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11569   (exit $ac_status); }; } &&
11570          { ac_try='test -s conftest$ac_exeext'
11571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11572   (eval $ac_try) 2>&5
11573   ac_status=$?
11574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11575   (exit $ac_status); }; }; then
11576   ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
11577 else
11578   echo "$as_me: failed program was:" >&5
11579 sed 's/^/| /' conftest.$ac_ext >&5
11580
11581 ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
11582 fi
11583 rm -f conftest.err conftest.$ac_objext \
11584       conftest$ac_exeext conftest.$ac_ext
11585 LIBS=$ac_check_lib_save_LIBS
11586 fi
11587 echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
11588 echo "${ECHO_T}$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6
11589 if test $ac_cv_lib_Xrender_XRenderSetSubpixelOrder = yes; then
11590   xrender_libs="-lXrender"
11591 else
11592   true
11593 fi
11594
11595   CPPFLAGS="$ac_save_CPPFLAGS"
11596   LDFLAGS="$ac_save_LDFLAGS"
11597 #  LIBS="$ac_save_LIBS"
11598
11599
11600     # first look for RANDR in -lXext
11601     have_randr=no
11602
11603   ac_save_CPPFLAGS="$CPPFLAGS"
11604   ac_save_LDFLAGS="$LDFLAGS"
11605 #  ac_save_LIBS="$LIBS"
11606
11607   if test \! -z "$includedir" ; then
11608     CPPFLAGS="$CPPFLAGS -I$includedir"
11609   fi
11610   # note: $X_CFLAGS includes $x_includes
11611   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11612
11613   if test \! -z "$libdir" ; then
11614     LDFLAGS="$LDFLAGS -L$libdir"
11615   fi
11616   # note: $X_LIBS includes $x_libraries
11617   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11618
11619   echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXext" >&5
11620 echo $ECHO_N "checking for XRRGetScreenInfo in -lXext... $ECHO_C" >&6
11621 if test "${ac_cv_lib_Xext_XRRGetScreenInfo+set}" = set; then
11622   echo $ECHO_N "(cached) $ECHO_C" >&6
11623 else
11624   ac_check_lib_save_LIBS=$LIBS
11625 LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
11626 cat >conftest.$ac_ext <<_ACEOF
11627 /* confdefs.h.  */
11628 _ACEOF
11629 cat confdefs.h >>conftest.$ac_ext
11630 cat >>conftest.$ac_ext <<_ACEOF
11631 /* end confdefs.h.  */
11632
11633 /* Override any gcc2 internal prototype to avoid an error.  */
11634 #ifdef __cplusplus
11635 extern "C"
11636 #endif
11637 /* We use char because int might match the return type of a gcc2
11638    builtin and then its argument prototype would still apply.  */
11639 char XRRGetScreenInfo ();
11640 int
11641 main ()
11642 {
11643 XRRGetScreenInfo ();
11644   ;
11645   return 0;
11646 }
11647 _ACEOF
11648 rm -f conftest.$ac_objext conftest$ac_exeext
11649 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11650   (eval $ac_link) 2>conftest.er1
11651   ac_status=$?
11652   grep -v '^ *+' conftest.er1 >conftest.err
11653   rm -f conftest.er1
11654   cat conftest.err >&5
11655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11656   (exit $ac_status); } &&
11657          { ac_try='test -z "$ac_c_werror_flag"
11658                          || test ! -s conftest.err'
11659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11660   (eval $ac_try) 2>&5
11661   ac_status=$?
11662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11663   (exit $ac_status); }; } &&
11664          { ac_try='test -s conftest$ac_exeext'
11665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11666   (eval $ac_try) 2>&5
11667   ac_status=$?
11668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11669   (exit $ac_status); }; }; then
11670   ac_cv_lib_Xext_XRRGetScreenInfo=yes
11671 else
11672   echo "$as_me: failed program was:" >&5
11673 sed 's/^/| /' conftest.$ac_ext >&5
11674
11675 ac_cv_lib_Xext_XRRGetScreenInfo=no
11676 fi
11677 rm -f conftest.err conftest.$ac_objext \
11678       conftest$ac_exeext conftest.$ac_ext
11679 LIBS=$ac_check_lib_save_LIBS
11680 fi
11681 echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
11682 echo "${ECHO_T}$ac_cv_lib_Xext_XRRGetScreenInfo" >&6
11683 if test $ac_cv_lib_Xext_XRRGetScreenInfo = yes; then
11684   have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
11685 else
11686   true
11687 fi
11688
11689   CPPFLAGS="$ac_save_CPPFLAGS"
11690   LDFLAGS="$ac_save_LDFLAGS"
11691 #  LIBS="$ac_save_LIBS"
11692
11693
11694     # if that failed, look in -lXrandr
11695     if test "$have_randr" = no; then
11696
11697   ac_save_CPPFLAGS="$CPPFLAGS"
11698   ac_save_LDFLAGS="$LDFLAGS"
11699 #  ac_save_LIBS="$LIBS"
11700
11701   if test \! -z "$includedir" ; then
11702     CPPFLAGS="$CPPFLAGS -I$includedir"
11703   fi
11704   # note: $X_CFLAGS includes $x_includes
11705   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11706
11707   if test \! -z "$libdir" ; then
11708     LDFLAGS="$LDFLAGS -L$libdir"
11709   fi
11710   # note: $X_LIBS includes $x_libraries
11711   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11712
11713   echo "$as_me:$LINENO: checking for XRRGetScreenInfo in -lXrandr" >&5
11714 echo $ECHO_N "checking for XRRGetScreenInfo in -lXrandr... $ECHO_C" >&6
11715 if test "${ac_cv_lib_Xrandr_XRRGetScreenInfo+set}" = set; then
11716   echo $ECHO_N "(cached) $ECHO_C" >&6
11717 else
11718   ac_check_lib_save_LIBS=$LIBS
11719 LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
11720 cat >conftest.$ac_ext <<_ACEOF
11721 /* confdefs.h.  */
11722 _ACEOF
11723 cat confdefs.h >>conftest.$ac_ext
11724 cat >>conftest.$ac_ext <<_ACEOF
11725 /* end confdefs.h.  */
11726
11727 /* Override any gcc2 internal prototype to avoid an error.  */
11728 #ifdef __cplusplus
11729 extern "C"
11730 #endif
11731 /* We use char because int might match the return type of a gcc2
11732    builtin and then its argument prototype would still apply.  */
11733 char XRRGetScreenInfo ();
11734 int
11735 main ()
11736 {
11737 XRRGetScreenInfo ();
11738   ;
11739   return 0;
11740 }
11741 _ACEOF
11742 rm -f conftest.$ac_objext conftest$ac_exeext
11743 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11744   (eval $ac_link) 2>conftest.er1
11745   ac_status=$?
11746   grep -v '^ *+' conftest.er1 >conftest.err
11747   rm -f conftest.er1
11748   cat conftest.err >&5
11749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11750   (exit $ac_status); } &&
11751          { ac_try='test -z "$ac_c_werror_flag"
11752                          || test ! -s conftest.err'
11753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11754   (eval $ac_try) 2>&5
11755   ac_status=$?
11756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11757   (exit $ac_status); }; } &&
11758          { ac_try='test -s conftest$ac_exeext'
11759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11760   (eval $ac_try) 2>&5
11761   ac_status=$?
11762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11763   (exit $ac_status); }; }; then
11764   ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
11765 else
11766   echo "$as_me: failed program was:" >&5
11767 sed 's/^/| /' conftest.$ac_ext >&5
11768
11769 ac_cv_lib_Xrandr_XRRGetScreenInfo=no
11770 fi
11771 rm -f conftest.err conftest.$ac_objext \
11772       conftest$ac_exeext conftest.$ac_ext
11773 LIBS=$ac_check_lib_save_LIBS
11774 fi
11775 echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
11776 echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6
11777 if test $ac_cv_lib_Xrandr_XRRGetScreenInfo = yes; then
11778   have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
11779 else
11780   true
11781 fi
11782
11783   CPPFLAGS="$ac_save_CPPFLAGS"
11784   LDFLAGS="$ac_save_LDFLAGS"
11785 #  LIBS="$ac_save_LIBS"
11786
11787     fi
11788   fi
11789
11790   # if that succeeded, then we've really got it.
11791   if test "$have_randr" = yes; then
11792     cat >>confdefs.h <<\_ACEOF
11793 #define HAVE_RANDR 1
11794 _ACEOF
11795
11796   fi
11797
11798 elif test "$with_randr" != no; then
11799   echo "error: must be yes or no: --with-randr-ext=$with_randr"
11800   exit 1
11801 fi
11802
11803
11804 ###############################################################################
11805 #
11806 #       Check for XF86MiscSetGrabKeysState (but only bother if we are already
11807 #       using other XF86 stuff.)
11808 #
11809 ###############################################################################
11810
11811 have_xf86miscsetgrabkeysstate=no
11812 if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
11813
11814   ac_save_CPPFLAGS="$CPPFLAGS"
11815   ac_save_LDFLAGS="$LDFLAGS"
11816 #  ac_save_LIBS="$LIBS"
11817
11818   if test \! -z "$includedir" ; then
11819     CPPFLAGS="$CPPFLAGS -I$includedir"
11820   fi
11821   # note: $X_CFLAGS includes $x_includes
11822   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11823
11824   if test \! -z "$libdir" ; then
11825     LDFLAGS="$LDFLAGS -L$libdir"
11826   fi
11827   # note: $X_LIBS includes $x_libraries
11828   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
11829
11830   echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
11831 echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6
11832 if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
11833   echo $ECHO_N "(cached) $ECHO_C" >&6
11834 else
11835   ac_check_lib_save_LIBS=$LIBS
11836 LIBS="-lXxf86misc -lXext -lX11 $LIBS"
11837 cat >conftest.$ac_ext <<_ACEOF
11838 /* confdefs.h.  */
11839 _ACEOF
11840 cat confdefs.h >>conftest.$ac_ext
11841 cat >>conftest.$ac_ext <<_ACEOF
11842 /* end confdefs.h.  */
11843
11844 /* Override any gcc2 internal prototype to avoid an error.  */
11845 #ifdef __cplusplus
11846 extern "C"
11847 #endif
11848 /* We use char because int might match the return type of a gcc2
11849    builtin and then its argument prototype would still apply.  */
11850 char XF86MiscSetGrabKeysState ();
11851 int
11852 main ()
11853 {
11854 XF86MiscSetGrabKeysState ();
11855   ;
11856   return 0;
11857 }
11858 _ACEOF
11859 rm -f conftest.$ac_objext conftest$ac_exeext
11860 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11861   (eval $ac_link) 2>conftest.er1
11862   ac_status=$?
11863   grep -v '^ *+' conftest.er1 >conftest.err
11864   rm -f conftest.er1
11865   cat conftest.err >&5
11866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11867   (exit $ac_status); } &&
11868          { ac_try='test -z "$ac_c_werror_flag"
11869                          || test ! -s conftest.err'
11870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11871   (eval $ac_try) 2>&5
11872   ac_status=$?
11873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11874   (exit $ac_status); }; } &&
11875          { ac_try='test -s conftest$ac_exeext'
11876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11877   (eval $ac_try) 2>&5
11878   ac_status=$?
11879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11880   (exit $ac_status); }; }; then
11881   ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
11882 else
11883   echo "$as_me: failed program was:" >&5
11884 sed 's/^/| /' conftest.$ac_ext >&5
11885
11886 ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
11887 fi
11888 rm -f conftest.err conftest.$ac_objext \
11889       conftest$ac_exeext conftest.$ac_ext
11890 LIBS=$ac_check_lib_save_LIBS
11891 fi
11892 echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
11893 echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6
11894 if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
11895   have_xf86miscsetgrabkeysstate=yes
11896 else
11897   true
11898 fi
11899
11900   CPPFLAGS="$ac_save_CPPFLAGS"
11901   LDFLAGS="$ac_save_LDFLAGS"
11902 #  LIBS="$ac_save_LIBS"
11903
11904   if test "$have_xf86miscsetgrabkeysstate" = yes ; then
11905     SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
11906     cat >>confdefs.h <<\_ACEOF
11907 #define HAVE_XF86MISCSETGRABKEYSSTATE 1
11908 _ACEOF
11909
11910   fi
11911 fi
11912
11913
11914 ###############################################################################
11915 #
11916 #       Check for HP XHPDisableReset and XHPEnableReset.
11917 #
11918 ###############################################################################
11919
11920 echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
11921 echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6
11922
11923   ac_save_CPPFLAGS="$CPPFLAGS"
11924   if test \! -z "$includedir" ; then
11925     CPPFLAGS="$CPPFLAGS -I$includedir"
11926   fi
11927   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11928   cat >conftest.$ac_ext <<_ACEOF
11929 /* confdefs.h.  */
11930 _ACEOF
11931 cat confdefs.h >>conftest.$ac_ext
11932 cat >>conftest.$ac_ext <<_ACEOF
11933 /* end confdefs.h.  */
11934 #include <X11/XHPlib.h>
11935
11936 _ACEOF
11937 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11938   $EGREP "XHPDisableReset" >/dev/null 2>&1; then
11939   cat >>confdefs.h <<\_ACEOF
11940 #define HAVE_XHPDISABLERESET 1
11941 _ACEOF
11942
11943                    SAVER_LIBS="-lXhp11 $SAVER_LIBS"
11944                    echo "$as_me:$LINENO: result: yes" >&5
11945 echo "${ECHO_T}yes" >&6
11946 else
11947   echo "$as_me:$LINENO: result: no" >&5
11948 echo "${ECHO_T}no" >&6
11949 fi
11950 rm -f conftest*
11951
11952   CPPFLAGS="$ac_save_CPPFLAGS"
11953
11954
11955 ###############################################################################
11956 #
11957 #       Check for /proc/interrupts.
11958 #
11959 ###############################################################################
11960
11961 have_proc_interrupts=no
11962 with_proc_interrupts_req=unspecified
11963
11964 # Check whether --with-proc-interrupts or --without-proc-interrupts was given.
11965 if test "${with_proc_interrupts+set}" = set; then
11966   withval="$with_proc_interrupts"
11967   with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
11968 else
11969   with_proc_interrupts=yes
11970 fi;
11971
11972 if test "$with_proc_interrupts" = yes; then
11973
11974    echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
11975 echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
11976 if test "${ac_cv_have_proc_interrupts+set}" = set; then
11977   echo $ECHO_N "(cached) $ECHO_C" >&6
11978 else
11979   ac_cv_have_proc_interrupts=no
11980      if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then
11981        ac_cv_have_proc_interrupts=yes
11982      fi
11983
11984 fi
11985 echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
11986 echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
11987    have_proc_interrupts=$ac_cv_have_proc_interrupts
11988
11989   if test "$have_proc_interrupts" = yes; then
11990     cat >>confdefs.h <<\_ACEOF
11991 #define HAVE_PROC_INTERRUPTS 1
11992 _ACEOF
11993
11994   fi
11995
11996 elif test "$with_proc_interrupts" != no; then
11997   echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
11998   exit 1
11999 fi
12000
12001
12002 ###############################################################################
12003 #
12004 #       The --enable-locking option
12005 #
12006 ###############################################################################
12007
12008 # Check whether --enable-locking or --disable-locking was given.
12009 if test "${enable_locking+set}" = set; then
12010   enableval="$enable_locking"
12011   enable_locking="$enableval"
12012 else
12013   enable_locking=yes
12014 fi;
12015 if test "$enable_locking" = yes; then
12016   true
12017 elif test "$enable_locking" = no; then
12018   cat >>confdefs.h <<\_ACEOF
12019 #define NO_LOCKING 1
12020 _ACEOF
12021
12022 else
12023   echo "error: must be yes or no: --enable-locking=$enable_locking"
12024   exit 1
12025 fi
12026
12027 # We can't lock on MacOS X, so don't even bother compiling in support for it.
12028 #
12029 if test "$ac_macosx" = yes; then
12030   if test "$enable_locking" = yes; then
12031     echo "$as_me:$LINENO: result: locking disabled: it doesn't work on MacOS X" >&5
12032 echo "${ECHO_T}locking disabled: it doesn't work on MacOS X" >&6
12033     enable_locking=no
12034     cat >>confdefs.h <<\_ACEOF
12035 #define NO_LOCKING 1
12036 _ACEOF
12037
12038   fi
12039 fi
12040
12041
12042 ###############################################################################
12043 #
12044 #       The --enable-vt-locking option
12045 #
12046 ###############################################################################
12047
12048 #ac_vt_lockswitch=no
12049 #AC_ARG_ENABLE(vt-locking,[
12050 #  --enable-vt-locking     Compile in support for locking Virtual Terminals.
12051 #                          This is the default if the system supports it, and
12052 #                          if locking support is included (--enable-locking.)
12053 #  --disable-vt-locking    Do not allow locking of VTs, even if locking is
12054 #                          enabled.],
12055 #  [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
12056 #if test "$enable_vt_locking" = yes; then
12057 #
12058 #  AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
12059 #   [AC_TRY_COMPILE([#include <fcntl.h>
12060 #                   #include <sys/ioctl.h>
12061 #                   #include <sys/vt.h>],
12062 #                  [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
12063 #                  [ac_cv_vt_lockswitch=yes],
12064 #                  [ac_cv_vt_lockswitch=no])])
12065 #  ac_vt_lockswitch=$ac_cv_vt_lockswitch
12066 #
12067 #elif test "$enable_vt_locking" = no; then
12068 #  true
12069 #else
12070 #  echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
12071 #  exit 1
12072 #fi
12073 #
12074 #if test "$ac_vt_lockswitch" = yes; then
12075 #  AC_DEFINE(HAVE_VT_LOCKSWITCH)
12076 #  # the VT_LOCKSWITCH ioctl can only be used when running as root.
12077 #  # #### but it doesn't work yet, so don't worry about that for now.
12078 ##  need_setuid=yes
12079 #fi
12080
12081
12082 ###############################################################################
12083 #
12084 #       Check for PAM.
12085 #
12086 ###############################################################################
12087
12088 case "$host" in
12089   *-solaris*)
12090    # Solaris systems tend to come with PAM misconfigured.
12091    #  Don't build it by default, even if the headers exist.
12092    with_pam_default=no
12093    ;;
12094   *)
12095    # Default to building PAM support on all other systems, if it exists.
12096    with_pam_default=yes
12097   ;;
12098 esac
12099
12100 have_pam=no
12101 with_pam_req=unspecified
12102
12103
12104 # Check whether --with-pam or --without-pam was given.
12105 if test "${with_pam+set}" = set; then
12106   withval="$with_pam"
12107   with_pam="$withval"; with_pam_req="$withval"
12108 else
12109   with_pam=$with_pam_default
12110 fi;
12111
12112
12113    case "$with_pam" in
12114     yes) ;;
12115     no)  ;;
12116
12117     /*)
12118      echo "$as_me:$LINENO: checking for PAM headers" >&5
12119 echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
12120      d=$with_pam/include
12121      if test -d $d; then
12122        X_CFLAGS="-I$d $X_CFLAGS"
12123        echo "$as_me:$LINENO: result: $d" >&5
12124 echo "${ECHO_T}$d" >&6
12125      else
12126        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12127 echo "${ECHO_T}not found ($d: no such directory)" >&6
12128      fi
12129
12130      echo "$as_me:$LINENO: checking for PAM libs" >&5
12131 echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
12132      d=$with_pam/lib
12133      if test -d $d; then
12134        X_LIBS="-L$d $X_LIBS"
12135        echo "$as_me:$LINENO: result: $d" >&5
12136 echo "${ECHO_T}$d" >&6
12137      else
12138        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12139 echo "${ECHO_T}not found ($d: no such directory)" >&6
12140      fi
12141
12142      # replace the directory string with "yes".
12143      with_pam_req="yes"
12144      with_pam=$with_pam_req
12145      ;;
12146
12147     *)
12148      echo ""
12149      echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
12150      echo "       If it is a directory, then \`DIR/include' will be added to"
12151      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12152      exit 1
12153      ;;
12154    esac
12155
12156
12157 if test "$enable_locking" = yes -a "$with_pam" = yes; then
12158   echo "$as_me:$LINENO: checking for PAM" >&5
12159 echo $ECHO_N "checking for PAM... $ECHO_C" >&6
12160 if test "${ac_cv_pam+set}" = set; then
12161   echo $ECHO_N "(cached) $ECHO_C" >&6
12162 else
12163
12164   ac_save_CPPFLAGS="$CPPFLAGS"
12165   if test \! -z "$includedir" ; then
12166     CPPFLAGS="$CPPFLAGS -I$includedir"
12167   fi
12168   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12169   cat >conftest.$ac_ext <<_ACEOF
12170 /* confdefs.h.  */
12171 _ACEOF
12172 cat confdefs.h >>conftest.$ac_ext
12173 cat >>conftest.$ac_ext <<_ACEOF
12174 /* end confdefs.h.  */
12175 #include <security/pam_appl.h>
12176 int
12177 main ()
12178 {
12179
12180   ;
12181   return 0;
12182 }
12183 _ACEOF
12184 rm -f conftest.$ac_objext
12185 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12186   (eval $ac_compile) 2>conftest.er1
12187   ac_status=$?
12188   grep -v '^ *+' conftest.er1 >conftest.err
12189   rm -f conftest.er1
12190   cat conftest.err >&5
12191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12192   (exit $ac_status); } &&
12193          { ac_try='test -z "$ac_c_werror_flag"
12194                          || test ! -s conftest.err'
12195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12196   (eval $ac_try) 2>&5
12197   ac_status=$?
12198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12199   (exit $ac_status); }; } &&
12200          { ac_try='test -s conftest.$ac_objext'
12201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12202   (eval $ac_try) 2>&5
12203   ac_status=$?
12204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12205   (exit $ac_status); }; }; then
12206   ac_cv_pam=yes
12207 else
12208   echo "$as_me: failed program was:" >&5
12209 sed 's/^/| /' conftest.$ac_ext >&5
12210
12211 ac_cv_pam=no
12212 fi
12213 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12214   CPPFLAGS="$ac_save_CPPFLAGS"
12215 fi
12216 echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
12217 echo "${ECHO_T}$ac_cv_pam" >&6
12218   if test "$ac_cv_pam" = yes ; then
12219     have_pam=yes
12220     cat >>confdefs.h <<\_ACEOF
12221 #define HAVE_PAM 1
12222 _ACEOF
12223
12224     PASSWD_LIBS="${PASSWD_LIBS} -lpam"
12225
12226     # libpam typically requires dlopen and dlsym.  On FreeBSD,
12227     # those are in libc.  On Linux and Solaris, they're in libdl.
12228     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12229 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
12230 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12231   echo $ECHO_N "(cached) $ECHO_C" >&6
12232 else
12233   ac_check_lib_save_LIBS=$LIBS
12234 LIBS="-ldl  $LIBS"
12235 cat >conftest.$ac_ext <<_ACEOF
12236 /* confdefs.h.  */
12237 _ACEOF
12238 cat confdefs.h >>conftest.$ac_ext
12239 cat >>conftest.$ac_ext <<_ACEOF
12240 /* end confdefs.h.  */
12241
12242 /* Override any gcc2 internal prototype to avoid an error.  */
12243 #ifdef __cplusplus
12244 extern "C"
12245 #endif
12246 /* We use char because int might match the return type of a gcc2
12247    builtin and then its argument prototype would still apply.  */
12248 char dlopen ();
12249 int
12250 main ()
12251 {
12252 dlopen ();
12253   ;
12254   return 0;
12255 }
12256 _ACEOF
12257 rm -f conftest.$ac_objext conftest$ac_exeext
12258 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12259   (eval $ac_link) 2>conftest.er1
12260   ac_status=$?
12261   grep -v '^ *+' conftest.er1 >conftest.err
12262   rm -f conftest.er1
12263   cat conftest.err >&5
12264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12265   (exit $ac_status); } &&
12266          { ac_try='test -z "$ac_c_werror_flag"
12267                          || test ! -s conftest.err'
12268   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12269   (eval $ac_try) 2>&5
12270   ac_status=$?
12271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12272   (exit $ac_status); }; } &&
12273          { ac_try='test -s conftest$ac_exeext'
12274   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12275   (eval $ac_try) 2>&5
12276   ac_status=$?
12277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12278   (exit $ac_status); }; }; then
12279   ac_cv_lib_dl_dlopen=yes
12280 else
12281   echo "$as_me: failed program was:" >&5
12282 sed 's/^/| /' conftest.$ac_ext >&5
12283
12284 ac_cv_lib_dl_dlopen=no
12285 fi
12286 rm -f conftest.err conftest.$ac_objext \
12287       conftest$ac_exeext conftest.$ac_ext
12288 LIBS=$ac_check_lib_save_LIBS
12289 fi
12290 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12291 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
12292 if test $ac_cv_lib_dl_dlopen = yes; then
12293   PASSWD_LIBS="${PASSWD_LIBS} -ldl"
12294 fi
12295
12296
12297     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
12298     have_timedwait=no
12299     echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5
12300 echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6
12301 if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then
12302   echo $ECHO_N "(cached) $ECHO_C" >&6
12303 else
12304   ac_check_lib_save_LIBS=$LIBS
12305 LIBS="-lc  $LIBS"
12306 cat >conftest.$ac_ext <<_ACEOF
12307 /* confdefs.h.  */
12308 _ACEOF
12309 cat confdefs.h >>conftest.$ac_ext
12310 cat >>conftest.$ac_ext <<_ACEOF
12311 /* end confdefs.h.  */
12312
12313 /* Override any gcc2 internal prototype to avoid an error.  */
12314 #ifdef __cplusplus
12315 extern "C"
12316 #endif
12317 /* We use char because int might match the return type of a gcc2
12318    builtin and then its argument prototype would still apply.  */
12319 char sigtimedwait ();
12320 int
12321 main ()
12322 {
12323 sigtimedwait ();
12324   ;
12325   return 0;
12326 }
12327 _ACEOF
12328 rm -f conftest.$ac_objext conftest$ac_exeext
12329 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12330   (eval $ac_link) 2>conftest.er1
12331   ac_status=$?
12332   grep -v '^ *+' conftest.er1 >conftest.err
12333   rm -f conftest.er1
12334   cat conftest.err >&5
12335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12336   (exit $ac_status); } &&
12337          { ac_try='test -z "$ac_c_werror_flag"
12338                          || test ! -s conftest.err'
12339   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12340   (eval $ac_try) 2>&5
12341   ac_status=$?
12342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12343   (exit $ac_status); }; } &&
12344          { ac_try='test -s conftest$ac_exeext'
12345   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12346   (eval $ac_try) 2>&5
12347   ac_status=$?
12348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12349   (exit $ac_status); }; }; then
12350   ac_cv_lib_c_sigtimedwait=yes
12351 else
12352   echo "$as_me: failed program was:" >&5
12353 sed 's/^/| /' conftest.$ac_ext >&5
12354
12355 ac_cv_lib_c_sigtimedwait=no
12356 fi
12357 rm -f conftest.err conftest.$ac_objext \
12358       conftest$ac_exeext conftest.$ac_ext
12359 LIBS=$ac_check_lib_save_LIBS
12360 fi
12361 echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5
12362 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6
12363 if test $ac_cv_lib_c_sigtimedwait = yes; then
12364   have_timedwait=yes
12365 fi
12366
12367     if test "$have_timedwait" = no ; then
12368       echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5
12369 echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6
12370 if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then
12371   echo $ECHO_N "(cached) $ECHO_C" >&6
12372 else
12373   ac_check_lib_save_LIBS=$LIBS
12374 LIBS="-lrt  $LIBS"
12375 cat >conftest.$ac_ext <<_ACEOF
12376 /* confdefs.h.  */
12377 _ACEOF
12378 cat confdefs.h >>conftest.$ac_ext
12379 cat >>conftest.$ac_ext <<_ACEOF
12380 /* end confdefs.h.  */
12381
12382 /* Override any gcc2 internal prototype to avoid an error.  */
12383 #ifdef __cplusplus
12384 extern "C"
12385 #endif
12386 /* We use char because int might match the return type of a gcc2
12387    builtin and then its argument prototype would still apply.  */
12388 char sigtimedwait ();
12389 int
12390 main ()
12391 {
12392 sigtimedwait ();
12393   ;
12394   return 0;
12395 }
12396 _ACEOF
12397 rm -f conftest.$ac_objext conftest$ac_exeext
12398 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12399   (eval $ac_link) 2>conftest.er1
12400   ac_status=$?
12401   grep -v '^ *+' conftest.er1 >conftest.err
12402   rm -f conftest.er1
12403   cat conftest.err >&5
12404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12405   (exit $ac_status); } &&
12406          { ac_try='test -z "$ac_c_werror_flag"
12407                          || test ! -s conftest.err'
12408   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12409   (eval $ac_try) 2>&5
12410   ac_status=$?
12411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12412   (exit $ac_status); }; } &&
12413          { ac_try='test -s conftest$ac_exeext'
12414   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12415   (eval $ac_try) 2>&5
12416   ac_status=$?
12417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12418   (exit $ac_status); }; }; then
12419   ac_cv_lib_rt_sigtimedwait=yes
12420 else
12421   echo "$as_me: failed program was:" >&5
12422 sed 's/^/| /' conftest.$ac_ext >&5
12423
12424 ac_cv_lib_rt_sigtimedwait=no
12425 fi
12426 rm -f conftest.err conftest.$ac_objext \
12427       conftest$ac_exeext conftest.$ac_ext
12428 LIBS=$ac_check_lib_save_LIBS
12429 fi
12430 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
12431 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6
12432 if test $ac_cv_lib_rt_sigtimedwait = yes; then
12433   PASSWD_LIBS="${PASSWD_LIBS} -lrt"
12434 fi
12435
12436     fi
12437
12438     echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
12439 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
12440     if test "${ac_cv_pam_strerror_args+set}" = set; then
12441   echo $ECHO_N "(cached) $ECHO_C" >&6
12442 else
12443   cat >conftest.$ac_ext <<_ACEOF
12444 /* confdefs.h.  */
12445 _ACEOF
12446 cat confdefs.h >>conftest.$ac_ext
12447 cat >>conftest.$ac_ext <<_ACEOF
12448 /* end confdefs.h.  */
12449 #include <stdio.h>
12450                       #include <stdlib.h>
12451                       #include <security/pam_appl.h>
12452 int
12453 main ()
12454 {
12455 pam_handle_t *pamh = 0;
12456                       char *s = pam_strerror(pamh, PAM_SUCCESS);
12457   ;
12458   return 0;
12459 }
12460 _ACEOF
12461 rm -f conftest.$ac_objext
12462 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12463   (eval $ac_compile) 2>conftest.er1
12464   ac_status=$?
12465   grep -v '^ *+' conftest.er1 >conftest.err
12466   rm -f conftest.er1
12467   cat conftest.err >&5
12468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12469   (exit $ac_status); } &&
12470          { ac_try='test -z "$ac_c_werror_flag"
12471                          || test ! -s conftest.err'
12472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12473   (eval $ac_try) 2>&5
12474   ac_status=$?
12475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12476   (exit $ac_status); }; } &&
12477          { ac_try='test -s conftest.$ac_objext'
12478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12479   (eval $ac_try) 2>&5
12480   ac_status=$?
12481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12482   (exit $ac_status); }; }; then
12483   ac_pam_strerror_args=2
12484 else
12485   echo "$as_me: failed program was:" >&5
12486 sed 's/^/| /' conftest.$ac_ext >&5
12487
12488 cat >conftest.$ac_ext <<_ACEOF
12489 /* confdefs.h.  */
12490 _ACEOF
12491 cat confdefs.h >>conftest.$ac_ext
12492 cat >>conftest.$ac_ext <<_ACEOF
12493 /* end confdefs.h.  */
12494 #include <stdio.h>
12495                                       #include <stdlib.h>
12496                                       #include <security/pam_appl.h>
12497 int
12498 main ()
12499 {
12500 char *s =
12501                                        pam_strerror(PAM_SUCCESS);
12502   ;
12503   return 0;
12504 }
12505 _ACEOF
12506 rm -f conftest.$ac_objext
12507 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12508   (eval $ac_compile) 2>conftest.er1
12509   ac_status=$?
12510   grep -v '^ *+' conftest.er1 >conftest.err
12511   rm -f conftest.er1
12512   cat conftest.err >&5
12513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12514   (exit $ac_status); } &&
12515          { ac_try='test -z "$ac_c_werror_flag"
12516                          || test ! -s conftest.err'
12517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12518   (eval $ac_try) 2>&5
12519   ac_status=$?
12520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12521   (exit $ac_status); }; } &&
12522          { ac_try='test -s conftest.$ac_objext'
12523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12524   (eval $ac_try) 2>&5
12525   ac_status=$?
12526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12527   (exit $ac_status); }; }; then
12528   ac_pam_strerror_args=1
12529 else
12530   echo "$as_me: failed program was:" >&5
12531 sed 's/^/| /' conftest.$ac_ext >&5
12532
12533 ac_pam_strerror_args=0
12534 fi
12535 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12536 fi
12537 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12538       ac_cv_pam_strerror_args=$ac_pam_strerror_args
12539 fi
12540
12541     ac_pam_strerror_args=$ac_cv_pam_strerror_args
12542     if test "$ac_pam_strerror_args" = 1 ; then
12543       echo "$as_me:$LINENO: result: one argument" >&5
12544 echo "${ECHO_T}one argument" >&6
12545     elif test "$ac_pam_strerror_args" = 2 ; then
12546       cat >>confdefs.h <<\_ACEOF
12547 #define PAM_STRERROR_TWO_ARGS 1
12548 _ACEOF
12549
12550       echo "$as_me:$LINENO: result: two arguments" >&5
12551 echo "${ECHO_T}two arguments" >&6
12552     else
12553       echo "$as_me:$LINENO: result: unknown" >&5
12554 echo "${ECHO_T}unknown" >&6
12555     fi
12556   fi
12557 fi
12558
12559
12560 ###############################################################################
12561 #
12562 #       Check for Kerberos.
12563 #
12564 ###############################################################################
12565
12566 have_kerberos=no
12567 have_kerberos5=no
12568 with_kerberos_req=unspecified
12569
12570
12571 # Check whether --with-kerberos or --without-kerberos was given.
12572 if test "${with_kerberos+set}" = set; then
12573   withval="$with_kerberos"
12574   with_kerberos="$withval"; with_kerberos_req="$withval"
12575 else
12576   with_kerberos=yes
12577 fi;
12578
12579
12580    case "$with_kerberos" in
12581     yes) ;;
12582     no)  ;;
12583
12584     /*)
12585      echo "$as_me:$LINENO: checking for Kerberos headers" >&5
12586 echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
12587      d=$with_kerberos/include
12588      if test -d $d; then
12589        X_CFLAGS="-I$d $X_CFLAGS"
12590        echo "$as_me:$LINENO: result: $d" >&5
12591 echo "${ECHO_T}$d" >&6
12592      else
12593        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12594 echo "${ECHO_T}not found ($d: no such directory)" >&6
12595      fi
12596
12597      echo "$as_me:$LINENO: checking for Kerberos libs" >&5
12598 echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
12599      d=$with_kerberos/lib
12600      if test -d $d; then
12601        X_LIBS="-L$d $X_LIBS"
12602        echo "$as_me:$LINENO: result: $d" >&5
12603 echo "${ECHO_T}$d" >&6
12604      else
12605        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
12606 echo "${ECHO_T}not found ($d: no such directory)" >&6
12607      fi
12608
12609      # replace the directory string with "yes".
12610      with_kerberos_req="yes"
12611      with_kerberos=$with_kerberos_req
12612      ;;
12613
12614     *)
12615      echo ""
12616      echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
12617      echo "       If it is a directory, then \`DIR/include' will be added to"
12618      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
12619      exit 1
12620      ;;
12621    esac
12622
12623
12624 if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
12625   echo "$as_me:$LINENO: checking for Kerberos 4" >&5
12626 echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
12627 if test "${ac_cv_kerberos+set}" = set; then
12628   echo $ECHO_N "(cached) $ECHO_C" >&6
12629 else
12630
12631   ac_save_CPPFLAGS="$CPPFLAGS"
12632   if test \! -z "$includedir" ; then
12633     CPPFLAGS="$CPPFLAGS -I$includedir"
12634   fi
12635   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12636   cat >conftest.$ac_ext <<_ACEOF
12637 /* confdefs.h.  */
12638 _ACEOF
12639 cat confdefs.h >>conftest.$ac_ext
12640 cat >>conftest.$ac_ext <<_ACEOF
12641 /* end confdefs.h.  */
12642 #include <krb.h>
12643 int
12644 main ()
12645 {
12646
12647   ;
12648   return 0;
12649 }
12650 _ACEOF
12651 rm -f conftest.$ac_objext
12652 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12653   (eval $ac_compile) 2>conftest.er1
12654   ac_status=$?
12655   grep -v '^ *+' conftest.er1 >conftest.err
12656   rm -f conftest.er1
12657   cat conftest.err >&5
12658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12659   (exit $ac_status); } &&
12660          { ac_try='test -z "$ac_c_werror_flag"
12661                          || test ! -s conftest.err'
12662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12663   (eval $ac_try) 2>&5
12664   ac_status=$?
12665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12666   (exit $ac_status); }; } &&
12667          { ac_try='test -s conftest.$ac_objext'
12668   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12669   (eval $ac_try) 2>&5
12670   ac_status=$?
12671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12672   (exit $ac_status); }; }; then
12673   ac_cv_kerberos=yes
12674 else
12675   echo "$as_me: failed program was:" >&5
12676 sed 's/^/| /' conftest.$ac_ext >&5
12677
12678 ac_cv_kerberos=no
12679 fi
12680 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12681   CPPFLAGS="$ac_save_CPPFLAGS"
12682 fi
12683 echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
12684 echo "${ECHO_T}$ac_cv_kerberos" >&6
12685   echo "$as_me:$LINENO: checking for Kerberos 5" >&5
12686 echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
12687 if test "${ac_cv_kerberos5+set}" = set; then
12688   echo $ECHO_N "(cached) $ECHO_C" >&6
12689 else
12690
12691   ac_save_CPPFLAGS="$CPPFLAGS"
12692   if test \! -z "$includedir" ; then
12693     CPPFLAGS="$CPPFLAGS -I$includedir"
12694   fi
12695   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12696   cat >conftest.$ac_ext <<_ACEOF
12697 /* confdefs.h.  */
12698 _ACEOF
12699 cat confdefs.h >>conftest.$ac_ext
12700 cat >>conftest.$ac_ext <<_ACEOF
12701 /* end confdefs.h.  */
12702 #include <kerberosIV/krb.h>
12703 int
12704 main ()
12705 {
12706
12707   ;
12708   return 0;
12709 }
12710 _ACEOF
12711 rm -f conftest.$ac_objext
12712 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12713   (eval $ac_compile) 2>conftest.er1
12714   ac_status=$?
12715   grep -v '^ *+' conftest.er1 >conftest.err
12716   rm -f conftest.er1
12717   cat conftest.err >&5
12718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12719   (exit $ac_status); } &&
12720          { ac_try='test -z "$ac_c_werror_flag"
12721                          || test ! -s conftest.err'
12722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12723   (eval $ac_try) 2>&5
12724   ac_status=$?
12725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12726   (exit $ac_status); }; } &&
12727          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
12733   ac_cv_kerberos5=yes
12734 else
12735   echo "$as_me: failed program was:" >&5
12736 sed 's/^/| /' conftest.$ac_ext >&5
12737
12738 ac_cv_kerberos5=no
12739 fi
12740 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12741   CPPFLAGS="$ac_save_CPPFLAGS"
12742 fi
12743 echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
12744 echo "${ECHO_T}$ac_cv_kerberos5" >&6
12745
12746   if test "$ac_cv_kerberos" = yes ; then
12747     have_kerberos=yes
12748     cat >>confdefs.h <<\_ACEOF
12749 #define HAVE_KERBEROS 1
12750 _ACEOF
12751
12752   fi
12753
12754   if test "$ac_cv_kerberos5" = yes ; then
12755
12756     # Andrew Snare <ajs@pigpond.com> wrote:
12757     #
12758     # You were assuming that if kerberosV (krb5) was found, then kerberosIV
12759     # (krb4) was also available.  This turns out not to be the case with
12760     # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
12761     # is optional.
12762     #
12763     # So, disable kerberosV support if libkrb4 can't be found.
12764     # This is not the best solution, but it makes the compile not fail.
12765     #
12766
12767   ac_save_CPPFLAGS="$CPPFLAGS"
12768   ac_save_LDFLAGS="$LDFLAGS"
12769 #  ac_save_LIBS="$LIBS"
12770
12771   if test \! -z "$includedir" ; then
12772     CPPFLAGS="$CPPFLAGS -I$includedir"
12773   fi
12774   # note: $X_CFLAGS includes $x_includes
12775   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12776
12777   if test \! -z "$libdir" ; then
12778     LDFLAGS="$LDFLAGS -L$libdir"
12779   fi
12780   # note: $X_LIBS includes $x_libraries
12781   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12782
12783   echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
12784 echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6
12785 if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
12786   echo $ECHO_N "(cached) $ECHO_C" >&6
12787 else
12788   ac_check_lib_save_LIBS=$LIBS
12789 LIBS="-lkrb4  $LIBS"
12790 cat >conftest.$ac_ext <<_ACEOF
12791 /* confdefs.h.  */
12792 _ACEOF
12793 cat confdefs.h >>conftest.$ac_ext
12794 cat >>conftest.$ac_ext <<_ACEOF
12795 /* end confdefs.h.  */
12796
12797 /* Override any gcc2 internal prototype to avoid an error.  */
12798 #ifdef __cplusplus
12799 extern "C"
12800 #endif
12801 /* We use char because int might match the return type of a gcc2
12802    builtin and then its argument prototype would still apply.  */
12803 char krb_get_tf_realm ();
12804 int
12805 main ()
12806 {
12807 krb_get_tf_realm ();
12808   ;
12809   return 0;
12810 }
12811 _ACEOF
12812 rm -f conftest.$ac_objext conftest$ac_exeext
12813 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12814   (eval $ac_link) 2>conftest.er1
12815   ac_status=$?
12816   grep -v '^ *+' conftest.er1 >conftest.err
12817   rm -f conftest.er1
12818   cat conftest.err >&5
12819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12820   (exit $ac_status); } &&
12821          { ac_try='test -z "$ac_c_werror_flag"
12822                          || test ! -s conftest.err'
12823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12824   (eval $ac_try) 2>&5
12825   ac_status=$?
12826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12827   (exit $ac_status); }; } &&
12828          { ac_try='test -s conftest$ac_exeext'
12829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12830   (eval $ac_try) 2>&5
12831   ac_status=$?
12832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12833   (exit $ac_status); }; }; then
12834   ac_cv_lib_krb4_krb_get_tf_realm=yes
12835 else
12836   echo "$as_me: failed program was:" >&5
12837 sed 's/^/| /' conftest.$ac_ext >&5
12838
12839 ac_cv_lib_krb4_krb_get_tf_realm=no
12840 fi
12841 rm -f conftest.err conftest.$ac_objext \
12842       conftest$ac_exeext conftest.$ac_ext
12843 LIBS=$ac_check_lib_save_LIBS
12844 fi
12845 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
12846 echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6
12847 if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
12848   have_kerberos=yes
12849 else
12850   have_kerberos=no
12851 fi
12852
12853   CPPFLAGS="$ac_save_CPPFLAGS"
12854   LDFLAGS="$ac_save_LDFLAGS"
12855 #  LIBS="$ac_save_LIBS"
12856
12857     if test "$have_kerberos" = yes ; then
12858       have_kerberos5=yes
12859       cat >>confdefs.h <<\_ACEOF
12860 #define HAVE_KERBEROS 1
12861 _ACEOF
12862
12863       cat >>confdefs.h <<\_ACEOF
12864 #define HAVE_KERBEROS5 1
12865 _ACEOF
12866
12867     else
12868       have_kerberos5=no
12869       { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
12870 echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
12871     fi
12872
12873   fi
12874
12875   if test "$have_kerberos5" = yes ; then
12876     # from Matt Knopp <mhat@infocalypse.netlag.com>
12877     # (who got it from amu@mit.edu)
12878
12879     PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
12880
12881     # jwz: MacOS X uses -lkrb5, but not -lcrypt
12882
12883   ac_save_CPPFLAGS="$CPPFLAGS"
12884   ac_save_LDFLAGS="$LDFLAGS"
12885 #  ac_save_LIBS="$LIBS"
12886
12887   if test \! -z "$includedir" ; then
12888     CPPFLAGS="$CPPFLAGS -I$includedir"
12889   fi
12890   # note: $X_CFLAGS includes $x_includes
12891   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
12892
12893   if test \! -z "$libdir" ; then
12894     LDFLAGS="$LDFLAGS -L$libdir"
12895   fi
12896   # note: $X_LIBS includes $x_libraries
12897   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
12898
12899   echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
12900 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
12901 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
12902   echo $ECHO_N "(cached) $ECHO_C" >&6
12903 else
12904   ac_check_lib_save_LIBS=$LIBS
12905 LIBS="-lcrypt  $LIBS"
12906 cat >conftest.$ac_ext <<_ACEOF
12907 /* confdefs.h.  */
12908 _ACEOF
12909 cat confdefs.h >>conftest.$ac_ext
12910 cat >>conftest.$ac_ext <<_ACEOF
12911 /* end confdefs.h.  */
12912
12913 /* Override any gcc2 internal prototype to avoid an error.  */
12914 #ifdef __cplusplus
12915 extern "C"
12916 #endif
12917 /* We use char because int might match the return type of a gcc2
12918    builtin and then its argument prototype would still apply.  */
12919 char crypt ();
12920 int
12921 main ()
12922 {
12923 crypt ();
12924   ;
12925   return 0;
12926 }
12927 _ACEOF
12928 rm -f conftest.$ac_objext conftest$ac_exeext
12929 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12930   (eval $ac_link) 2>conftest.er1
12931   ac_status=$?
12932   grep -v '^ *+' conftest.er1 >conftest.err
12933   rm -f conftest.er1
12934   cat conftest.err >&5
12935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12936   (exit $ac_status); } &&
12937          { ac_try='test -z "$ac_c_werror_flag"
12938                          || test ! -s conftest.err'
12939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12940   (eval $ac_try) 2>&5
12941   ac_status=$?
12942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12943   (exit $ac_status); }; } &&
12944          { ac_try='test -s conftest$ac_exeext'
12945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12946   (eval $ac_try) 2>&5
12947   ac_status=$?
12948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12949   (exit $ac_status); }; }; then
12950   ac_cv_lib_crypt_crypt=yes
12951 else
12952   echo "$as_me: failed program was:" >&5
12953 sed 's/^/| /' conftest.$ac_ext >&5
12954
12955 ac_cv_lib_crypt_crypt=no
12956 fi
12957 rm -f conftest.err conftest.$ac_objext \
12958       conftest$ac_exeext conftest.$ac_ext
12959 LIBS=$ac_check_lib_save_LIBS
12960 fi
12961 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
12962 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
12963 if test $ac_cv_lib_crypt_crypt = yes; then
12964   PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
12965 fi
12966
12967   CPPFLAGS="$ac_save_CPPFLAGS"
12968   LDFLAGS="$ac_save_LDFLAGS"
12969 #  LIBS="$ac_save_LIBS"
12970
12971
12972   elif test "$have_kerberos" = yes ; then
12973     # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
12974     PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
12975   fi
12976
12977   if test "$have_kerberos" = yes ; then
12978     echo "$as_me:$LINENO: checking for res_search" >&5
12979 echo $ECHO_N "checking for res_search... $ECHO_C" >&6
12980 if test "${ac_cv_func_res_search+set}" = set; then
12981   echo $ECHO_N "(cached) $ECHO_C" >&6
12982 else
12983   cat >conftest.$ac_ext <<_ACEOF
12984 /* confdefs.h.  */
12985 _ACEOF
12986 cat confdefs.h >>conftest.$ac_ext
12987 cat >>conftest.$ac_ext <<_ACEOF
12988 /* end confdefs.h.  */
12989 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
12990    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12991 #define res_search innocuous_res_search
12992
12993 /* System header to define __stub macros and hopefully few prototypes,
12994     which can conflict with char res_search (); below.
12995     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12996     <limits.h> exists even on freestanding compilers.  */
12997
12998 #ifdef __STDC__
12999 # include <limits.h>
13000 #else
13001 # include <assert.h>
13002 #endif
13003
13004 #undef res_search
13005
13006 /* Override any gcc2 internal prototype to avoid an error.  */
13007 #ifdef __cplusplus
13008 extern "C"
13009 {
13010 #endif
13011 /* We use char because int might match the return type of a gcc2
13012    builtin and then its argument prototype would still apply.  */
13013 char res_search ();
13014 /* The GNU C library defines this for functions which it implements
13015     to always fail with ENOSYS.  Some functions are actually named
13016     something starting with __ and the normal name is an alias.  */
13017 #if defined (__stub_res_search) || defined (__stub___res_search)
13018 choke me
13019 #else
13020 char (*f) () = res_search;
13021 #endif
13022 #ifdef __cplusplus
13023 }
13024 #endif
13025
13026 int
13027 main ()
13028 {
13029 return f != res_search;
13030   ;
13031   return 0;
13032 }
13033 _ACEOF
13034 rm -f conftest.$ac_objext conftest$ac_exeext
13035 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13036   (eval $ac_link) 2>conftest.er1
13037   ac_status=$?
13038   grep -v '^ *+' conftest.er1 >conftest.err
13039   rm -f conftest.er1
13040   cat conftest.err >&5
13041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13042   (exit $ac_status); } &&
13043          { ac_try='test -z "$ac_c_werror_flag"
13044                          || test ! -s conftest.err'
13045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13046   (eval $ac_try) 2>&5
13047   ac_status=$?
13048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13049   (exit $ac_status); }; } &&
13050          { ac_try='test -s conftest$ac_exeext'
13051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13052   (eval $ac_try) 2>&5
13053   ac_status=$?
13054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13055   (exit $ac_status); }; }; then
13056   ac_cv_func_res_search=yes
13057 else
13058   echo "$as_me: failed program was:" >&5
13059 sed 's/^/| /' conftest.$ac_ext >&5
13060
13061 ac_cv_func_res_search=no
13062 fi
13063 rm -f conftest.err conftest.$ac_objext \
13064       conftest$ac_exeext conftest.$ac_ext
13065 fi
13066 echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
13067 echo "${ECHO_T}$ac_cv_func_res_search" >&6
13068 if test $ac_cv_func_res_search = yes; then
13069   :
13070 else
13071   echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
13072 echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
13073 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
13074   echo $ECHO_N "(cached) $ECHO_C" >&6
13075 else
13076   ac_check_lib_save_LIBS=$LIBS
13077 LIBS="-lresolv  $LIBS"
13078 cat >conftest.$ac_ext <<_ACEOF
13079 /* confdefs.h.  */
13080 _ACEOF
13081 cat confdefs.h >>conftest.$ac_ext
13082 cat >>conftest.$ac_ext <<_ACEOF
13083 /* end confdefs.h.  */
13084
13085 /* Override any gcc2 internal prototype to avoid an error.  */
13086 #ifdef __cplusplus
13087 extern "C"
13088 #endif
13089 /* We use char because int might match the return type of a gcc2
13090    builtin and then its argument prototype would still apply.  */
13091 char res_search ();
13092 int
13093 main ()
13094 {
13095 res_search ();
13096   ;
13097   return 0;
13098 }
13099 _ACEOF
13100 rm -f conftest.$ac_objext conftest$ac_exeext
13101 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13102   (eval $ac_link) 2>conftest.er1
13103   ac_status=$?
13104   grep -v '^ *+' conftest.er1 >conftest.err
13105   rm -f conftest.er1
13106   cat conftest.err >&5
13107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13108   (exit $ac_status); } &&
13109          { ac_try='test -z "$ac_c_werror_flag"
13110                          || test ! -s conftest.err'
13111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13112   (eval $ac_try) 2>&5
13113   ac_status=$?
13114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13115   (exit $ac_status); }; } &&
13116          { ac_try='test -s conftest$ac_exeext'
13117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13118   (eval $ac_try) 2>&5
13119   ac_status=$?
13120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13121   (exit $ac_status); }; }; then
13122   ac_cv_lib_resolv_res_search=yes
13123 else
13124   echo "$as_me: failed program was:" >&5
13125 sed 's/^/| /' conftest.$ac_ext >&5
13126
13127 ac_cv_lib_resolv_res_search=no
13128 fi
13129 rm -f conftest.err conftest.$ac_objext \
13130       conftest$ac_exeext conftest.$ac_ext
13131 LIBS=$ac_check_lib_save_LIBS
13132 fi
13133 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
13134 echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
13135 if test $ac_cv_lib_resolv_res_search = yes; then
13136   PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
13137 else
13138   { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
13139 echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
13140
13141 fi
13142
13143 fi
13144
13145   fi
13146 fi
13147
13148
13149 ###############################################################################
13150 #
13151 #       Check for the nine billion variants of shadow passwords...
13152 #
13153 ###############################################################################
13154
13155 need_setuid=no
13156
13157 have_shadow=no
13158 with_shadow_req=unspecified
13159
13160
13161 # Check whether --with-shadow or --without-shadow was given.
13162 if test "${with_shadow+set}" = set; then
13163   withval="$with_shadow"
13164   with_shadow="$withval"; with_shadow_req="$withval"
13165 else
13166   with_shadow=yes
13167 fi;
13168
13169
13170    case "$with_shadow" in
13171     yes) ;;
13172     no)  ;;
13173
13174     /*)
13175      echo "$as_me:$LINENO: checking for shadow password headers" >&5
13176 echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
13177      d=$with_shadow/include
13178      if test -d $d; then
13179        X_CFLAGS="-I$d $X_CFLAGS"
13180        echo "$as_me:$LINENO: result: $d" >&5
13181 echo "${ECHO_T}$d" >&6
13182      else
13183        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13184 echo "${ECHO_T}not found ($d: no such directory)" >&6
13185      fi
13186
13187      echo "$as_me:$LINENO: checking for shadow password libs" >&5
13188 echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
13189      d=$with_shadow/lib
13190      if test -d $d; then
13191        X_LIBS="-L$d $X_LIBS"
13192        echo "$as_me:$LINENO: result: $d" >&5
13193 echo "${ECHO_T}$d" >&6
13194      else
13195        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
13196 echo "${ECHO_T}not found ($d: no such directory)" >&6
13197      fi
13198
13199      # replace the directory string with "yes".
13200      with_shadow_req="yes"
13201      with_shadow=$with_shadow_req
13202      ;;
13203
13204     *)
13205      echo ""
13206      echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
13207      echo "       If it is a directory, then \`DIR/include' will be added to"
13208      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
13209      exit 1
13210      ;;
13211    esac
13212
13213
13214 if test "$enable_locking" = no ; then
13215   with_shadow_req=no
13216   with_shadow=no
13217 fi
13218
13219
13220 ###############################################################################
13221 #
13222 #       Check for Sun "adjunct" passwords.
13223 #
13224 ###############################################################################
13225
13226 if test "$with_shadow" = yes ; then
13227   echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
13228 echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
13229 if test "${ac_cv_sun_adjunct+set}" = set; then
13230   echo $ECHO_N "(cached) $ECHO_C" >&6
13231 else
13232
13233   ac_save_CPPFLAGS="$CPPFLAGS"
13234   if test \! -z "$includedir" ; then
13235     CPPFLAGS="$CPPFLAGS -I$includedir"
13236   fi
13237   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13238   cat >conftest.$ac_ext <<_ACEOF
13239 /* confdefs.h.  */
13240 _ACEOF
13241 cat confdefs.h >>conftest.$ac_ext
13242 cat >>conftest.$ac_ext <<_ACEOF
13243 /* end confdefs.h.  */
13244 #include <stdlib.h>
13245                                     #include <unistd.h>
13246                                     #include <sys/types.h>
13247                                     #include <sys/label.h>
13248                                     #include <sys/audit.h>
13249                                     #include <pwdadj.h>
13250 int
13251 main ()
13252 {
13253 struct passwd_adjunct *p = getpwanam("nobody");
13254                        const char *pw = p->pwa_passwd;
13255   ;
13256   return 0;
13257 }
13258 _ACEOF
13259 rm -f conftest.$ac_objext
13260 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13261   (eval $ac_compile) 2>conftest.er1
13262   ac_status=$?
13263   grep -v '^ *+' conftest.er1 >conftest.err
13264   rm -f conftest.er1
13265   cat conftest.err >&5
13266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13267   (exit $ac_status); } &&
13268          { ac_try='test -z "$ac_c_werror_flag"
13269                          || test ! -s conftest.err'
13270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13271   (eval $ac_try) 2>&5
13272   ac_status=$?
13273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13274   (exit $ac_status); }; } &&
13275          { ac_try='test -s conftest.$ac_objext'
13276   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13277   (eval $ac_try) 2>&5
13278   ac_status=$?
13279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13280   (exit $ac_status); }; }; then
13281   ac_cv_sun_adjunct=yes
13282 else
13283   echo "$as_me: failed program was:" >&5
13284 sed 's/^/| /' conftest.$ac_ext >&5
13285
13286 ac_cv_sun_adjunct=no
13287 fi
13288 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13289   CPPFLAGS="$ac_save_CPPFLAGS"
13290 fi
13291 echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
13292 echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
13293   if test "$ac_cv_sun_adjunct" = yes; then
13294     have_shadow_adjunct=yes
13295     have_shadow=yes
13296     need_setuid=yes
13297   fi
13298 fi
13299
13300
13301 ###############################################################################
13302 #
13303 #       Check for DEC and SCO so-called "enhanced" security.
13304 #
13305 ###############################################################################
13306
13307 if test "$with_shadow" = yes ; then
13308   echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
13309 echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
13310 if test "${ac_cv_enhanced_passwd+set}" = set; then
13311   echo $ECHO_N "(cached) $ECHO_C" >&6
13312 else
13313
13314   ac_save_CPPFLAGS="$CPPFLAGS"
13315   if test \! -z "$includedir" ; then
13316     CPPFLAGS="$CPPFLAGS -I$includedir"
13317   fi
13318   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13319   cat >conftest.$ac_ext <<_ACEOF
13320 /* confdefs.h.  */
13321 _ACEOF
13322 cat confdefs.h >>conftest.$ac_ext
13323 cat >>conftest.$ac_ext <<_ACEOF
13324 /* end confdefs.h.  */
13325 #include <stdlib.h>
13326                                     #include <unistd.h>
13327                                     #include <sys/types.h>
13328                                     #include <pwd.h>
13329                                     #include <sys/security.h>
13330                                     #include <prot.h>
13331 int
13332 main ()
13333 {
13334 struct pr_passwd *p;
13335                        const char *pw;
13336                        set_auth_parameters(0, 0);
13337                        check_auth_parameters();
13338                        p = getprpwnam("nobody");
13339                        pw = p->ufld.fd_encrypt;
13340   ;
13341   return 0;
13342 }
13343 _ACEOF
13344 rm -f conftest.$ac_objext
13345 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13346   (eval $ac_compile) 2>conftest.er1
13347   ac_status=$?
13348   grep -v '^ *+' conftest.er1 >conftest.err
13349   rm -f conftest.er1
13350   cat conftest.err >&5
13351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13352   (exit $ac_status); } &&
13353          { ac_try='test -z "$ac_c_werror_flag"
13354                          || test ! -s conftest.err'
13355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13356   (eval $ac_try) 2>&5
13357   ac_status=$?
13358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13359   (exit $ac_status); }; } &&
13360          { ac_try='test -s conftest.$ac_objext'
13361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13362   (eval $ac_try) 2>&5
13363   ac_status=$?
13364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13365   (exit $ac_status); }; }; then
13366   ac_cv_enhanced_passwd=yes
13367 else
13368   echo "$as_me: failed program was:" >&5
13369 sed 's/^/| /' conftest.$ac_ext >&5
13370
13371 ac_cv_enhanced_passwd=no
13372 fi
13373 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13374   CPPFLAGS="$ac_save_CPPFLAGS"
13375 fi
13376 echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
13377 echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
13378   if test $ac_cv_enhanced_passwd = yes; then
13379     have_shadow_enhanced=yes
13380     have_shadow=yes
13381     need_setuid=yes
13382
13383     # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
13384     # (I'm told it needs -lcurses too, but I don't understand why.)
13385     # But on DEC, it's in -lsecurity.
13386     #
13387     echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
13388 echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
13389 if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
13390   echo $ECHO_N "(cached) $ECHO_C" >&6
13391 else
13392   ac_check_lib_save_LIBS=$LIBS
13393 LIBS="-lprot -lx $LIBS"
13394 cat >conftest.$ac_ext <<_ACEOF
13395 /* confdefs.h.  */
13396 _ACEOF
13397 cat confdefs.h >>conftest.$ac_ext
13398 cat >>conftest.$ac_ext <<_ACEOF
13399 /* end confdefs.h.  */
13400
13401 /* Override any gcc2 internal prototype to avoid an error.  */
13402 #ifdef __cplusplus
13403 extern "C"
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 getprpwnam ();
13408 int
13409 main ()
13410 {
13411 getprpwnam ();
13412   ;
13413   return 0;
13414 }
13415 _ACEOF
13416 rm -f conftest.$ac_objext conftest$ac_exeext
13417 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13418   (eval $ac_link) 2>conftest.er1
13419   ac_status=$?
13420   grep -v '^ *+' conftest.er1 >conftest.err
13421   rm -f conftest.er1
13422   cat conftest.err >&5
13423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13424   (exit $ac_status); } &&
13425          { ac_try='test -z "$ac_c_werror_flag"
13426                          || test ! -s conftest.err'
13427   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13428   (eval $ac_try) 2>&5
13429   ac_status=$?
13430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13431   (exit $ac_status); }; } &&
13432          { ac_try='test -s conftest$ac_exeext'
13433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13434   (eval $ac_try) 2>&5
13435   ac_status=$?
13436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13437   (exit $ac_status); }; }; then
13438   ac_cv_lib_prot_getprpwnam=yes
13439 else
13440   echo "$as_me: failed program was:" >&5
13441 sed 's/^/| /' conftest.$ac_ext >&5
13442
13443 ac_cv_lib_prot_getprpwnam=no
13444 fi
13445 rm -f conftest.err conftest.$ac_objext \
13446       conftest$ac_exeext conftest.$ac_ext
13447 LIBS=$ac_check_lib_save_LIBS
13448 fi
13449 echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
13450 echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
13451 if test $ac_cv_lib_prot_getprpwnam = yes; then
13452   PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
13453 else
13454   echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
13455 echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
13456 if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
13457   echo $ECHO_N "(cached) $ECHO_C" >&6
13458 else
13459   ac_check_lib_save_LIBS=$LIBS
13460 LIBS="-lsecurity  $LIBS"
13461 cat >conftest.$ac_ext <<_ACEOF
13462 /* confdefs.h.  */
13463 _ACEOF
13464 cat confdefs.h >>conftest.$ac_ext
13465 cat >>conftest.$ac_ext <<_ACEOF
13466 /* end confdefs.h.  */
13467
13468 /* Override any gcc2 internal prototype to avoid an error.  */
13469 #ifdef __cplusplus
13470 extern "C"
13471 #endif
13472 /* We use char because int might match the return type of a gcc2
13473    builtin and then its argument prototype would still apply.  */
13474 char getprpwnam ();
13475 int
13476 main ()
13477 {
13478 getprpwnam ();
13479   ;
13480   return 0;
13481 }
13482 _ACEOF
13483 rm -f conftest.$ac_objext conftest$ac_exeext
13484 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13485   (eval $ac_link) 2>conftest.er1
13486   ac_status=$?
13487   grep -v '^ *+' conftest.er1 >conftest.err
13488   rm -f conftest.er1
13489   cat conftest.err >&5
13490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13491   (exit $ac_status); } &&
13492          { ac_try='test -z "$ac_c_werror_flag"
13493                          || test ! -s conftest.err'
13494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13495   (eval $ac_try) 2>&5
13496   ac_status=$?
13497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13498   (exit $ac_status); }; } &&
13499          { ac_try='test -s conftest$ac_exeext'
13500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13501   (eval $ac_try) 2>&5
13502   ac_status=$?
13503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13504   (exit $ac_status); }; }; then
13505   ac_cv_lib_security_getprpwnam=yes
13506 else
13507   echo "$as_me: failed program was:" >&5
13508 sed 's/^/| /' conftest.$ac_ext >&5
13509
13510 ac_cv_lib_security_getprpwnam=no
13511 fi
13512 rm -f conftest.err conftest.$ac_objext \
13513       conftest$ac_exeext conftest.$ac_ext
13514 LIBS=$ac_check_lib_save_LIBS
13515 fi
13516 echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
13517 echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
13518 if test $ac_cv_lib_security_getprpwnam = yes; then
13519   PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
13520 fi
13521
13522 fi
13523
13524   fi
13525 fi
13526
13527 ###############################################################################
13528 #
13529 #       Check for HP's entry in the "Not Invented Here" Sweepstakes.
13530 #
13531 ###############################################################################
13532
13533 if test "$with_shadow" = yes ; then
13534   echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
13535 echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
13536 if test "${ac_cv_hpux_passwd+set}" = set; then
13537   echo $ECHO_N "(cached) $ECHO_C" >&6
13538 else
13539
13540   ac_save_CPPFLAGS="$CPPFLAGS"
13541   if test \! -z "$includedir" ; then
13542     CPPFLAGS="$CPPFLAGS -I$includedir"
13543   fi
13544   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13545   cat >conftest.$ac_ext <<_ACEOF
13546 /* confdefs.h.  */
13547 _ACEOF
13548 cat confdefs.h >>conftest.$ac_ext
13549 cat >>conftest.$ac_ext <<_ACEOF
13550 /* end confdefs.h.  */
13551 #include <stdlib.h>
13552                                     #include <unistd.h>
13553                                     #include <sys/types.h>
13554                                     #include <pwd.h>
13555                                     #include <hpsecurity.h>
13556                                     #include <prot.h>
13557 int
13558 main ()
13559 {
13560 struct s_passwd *p = getspwnam("nobody");
13561                        const char *pw = p->pw_passwd;
13562   ;
13563   return 0;
13564 }
13565 _ACEOF
13566 rm -f conftest.$ac_objext
13567 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13568   (eval $ac_compile) 2>conftest.er1
13569   ac_status=$?
13570   grep -v '^ *+' conftest.er1 >conftest.err
13571   rm -f conftest.er1
13572   cat conftest.err >&5
13573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13574   (exit $ac_status); } &&
13575          { ac_try='test -z "$ac_c_werror_flag"
13576                          || test ! -s conftest.err'
13577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13578   (eval $ac_try) 2>&5
13579   ac_status=$?
13580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13581   (exit $ac_status); }; } &&
13582          { ac_try='test -s conftest.$ac_objext'
13583   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13584   (eval $ac_try) 2>&5
13585   ac_status=$?
13586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13587   (exit $ac_status); }; }; then
13588   ac_cv_hpux_passwd=yes
13589 else
13590   echo "$as_me: failed program was:" >&5
13591 sed 's/^/| /' conftest.$ac_ext >&5
13592
13593 ac_cv_hpux_passwd=no
13594 fi
13595 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13596   CPPFLAGS="$ac_save_CPPFLAGS"
13597 fi
13598 echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
13599 echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
13600   if test "$ac_cv_hpux_passwd" = yes; then
13601     have_shadow_hpux=yes
13602     have_shadow=yes
13603     need_setuid=yes
13604
13605     # on HPUX, bigcrypt is in -lsec
13606     echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
13607 echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
13608 if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
13609   echo $ECHO_N "(cached) $ECHO_C" >&6
13610 else
13611   ac_check_lib_save_LIBS=$LIBS
13612 LIBS="-lsec  $LIBS"
13613 cat >conftest.$ac_ext <<_ACEOF
13614 /* confdefs.h.  */
13615 _ACEOF
13616 cat confdefs.h >>conftest.$ac_ext
13617 cat >>conftest.$ac_ext <<_ACEOF
13618 /* end confdefs.h.  */
13619
13620 /* Override any gcc2 internal prototype to avoid an error.  */
13621 #ifdef __cplusplus
13622 extern "C"
13623 #endif
13624 /* We use char because int might match the return type of a gcc2
13625    builtin and then its argument prototype would still apply.  */
13626 char bigcrypt ();
13627 int
13628 main ()
13629 {
13630 bigcrypt ();
13631   ;
13632   return 0;
13633 }
13634 _ACEOF
13635 rm -f conftest.$ac_objext conftest$ac_exeext
13636 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13637   (eval $ac_link) 2>conftest.er1
13638   ac_status=$?
13639   grep -v '^ *+' conftest.er1 >conftest.err
13640   rm -f conftest.er1
13641   cat conftest.err >&5
13642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13643   (exit $ac_status); } &&
13644          { ac_try='test -z "$ac_c_werror_flag"
13645                          || test ! -s conftest.err'
13646   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13647   (eval $ac_try) 2>&5
13648   ac_status=$?
13649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13650   (exit $ac_status); }; } &&
13651          { ac_try='test -s conftest$ac_exeext'
13652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13653   (eval $ac_try) 2>&5
13654   ac_status=$?
13655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13656   (exit $ac_status); }; }; then
13657   ac_cv_lib_sec_bigcrypt=yes
13658 else
13659   echo "$as_me: failed program was:" >&5
13660 sed 's/^/| /' conftest.$ac_ext >&5
13661
13662 ac_cv_lib_sec_bigcrypt=no
13663 fi
13664 rm -f conftest.err conftest.$ac_objext \
13665       conftest$ac_exeext conftest.$ac_ext
13666 LIBS=$ac_check_lib_save_LIBS
13667 fi
13668 echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
13669 echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
13670 if test $ac_cv_lib_sec_bigcrypt = yes; then
13671   PASSWD_LIBS="$PASSWD_LIBS -lsec"
13672 fi
13673
13674   fi
13675 fi
13676
13677
13678 ###############################################################################
13679 #
13680 #       Check for FreeBSD-style shadow passwords.
13681 #
13682 #       On FreeBSD, getpwnam() and friends work just like on non-shadow-
13683 #       password systems -- except you only get stuff in the pw_passwd field
13684 #       if the running program is setuid.  So, guess that we've got this
13685 #       lossage to contend with if /etc/master.passwd exists, and default to
13686 #       a setuid installation.
13687 #
13688 ###############################################################################
13689
13690 if test "$with_shadow" = yes ; then
13691   echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
13692 echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
13693 if test "${ac_cv_master_passwd+set}" = set; then
13694   echo $ECHO_N "(cached) $ECHO_C" >&6
13695 else
13696   if test -f /etc/master.passwd ; then
13697                     ac_cv_master_passwd=yes
13698                   else
13699                     ac_cv_master_passwd=no
13700                   fi
13701 fi
13702 echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
13703 echo "${ECHO_T}$ac_cv_master_passwd" >&6
13704   if test "$ac_cv_master_passwd" = yes; then
13705     need_setuid=yes
13706   fi
13707 fi
13708
13709
13710 ###############################################################################
13711 #
13712 #       Check for traditional (ha!) shadow passwords.
13713 #
13714 ###############################################################################
13715
13716 if test "$with_shadow" = yes ; then
13717   echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
13718 echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
13719 if test "${ac_cv_shadow+set}" = set; then
13720   echo $ECHO_N "(cached) $ECHO_C" >&6
13721 else
13722
13723   ac_save_CPPFLAGS="$CPPFLAGS"
13724   if test \! -z "$includedir" ; then
13725     CPPFLAGS="$CPPFLAGS -I$includedir"
13726   fi
13727   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
13728   cat >conftest.$ac_ext <<_ACEOF
13729 /* confdefs.h.  */
13730 _ACEOF
13731 cat confdefs.h >>conftest.$ac_ext
13732 cat >>conftest.$ac_ext <<_ACEOF
13733 /* end confdefs.h.  */
13734 #include <stdlib.h>
13735                                     #include <unistd.h>
13736                                     #include <sys/types.h>
13737                                     #include <pwd.h>
13738                                     #include <shadow.h>
13739 int
13740 main ()
13741 {
13742 struct spwd *p = getspnam("nobody");
13743                        const char *pw = p->sp_pwdp;
13744   ;
13745   return 0;
13746 }
13747 _ACEOF
13748 rm -f conftest.$ac_objext
13749 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13750   (eval $ac_compile) 2>conftest.er1
13751   ac_status=$?
13752   grep -v '^ *+' conftest.er1 >conftest.err
13753   rm -f conftest.er1
13754   cat conftest.err >&5
13755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13756   (exit $ac_status); } &&
13757          { ac_try='test -z "$ac_c_werror_flag"
13758                          || test ! -s conftest.err'
13759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13760   (eval $ac_try) 2>&5
13761   ac_status=$?
13762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13763   (exit $ac_status); }; } &&
13764          { ac_try='test -s conftest.$ac_objext'
13765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13766   (eval $ac_try) 2>&5
13767   ac_status=$?
13768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13769   (exit $ac_status); }; }; then
13770   ac_cv_shadow=yes
13771 else
13772   echo "$as_me: failed program was:" >&5
13773 sed 's/^/| /' conftest.$ac_ext >&5
13774
13775 ac_cv_shadow=no
13776 fi
13777 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13778   CPPFLAGS="$ac_save_CPPFLAGS"
13779 fi
13780 echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
13781 echo "${ECHO_T}$ac_cv_shadow" >&6
13782   if test "$ac_cv_shadow" = yes; then
13783     have_shadow=yes
13784     need_setuid=yes
13785
13786     # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
13787     have_getspnam=no
13788     echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
13789 echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
13790 if test "${ac_cv_lib_c_getspnam+set}" = set; then
13791   echo $ECHO_N "(cached) $ECHO_C" >&6
13792 else
13793   ac_check_lib_save_LIBS=$LIBS
13794 LIBS="-lc  $LIBS"
13795 cat >conftest.$ac_ext <<_ACEOF
13796 /* confdefs.h.  */
13797 _ACEOF
13798 cat confdefs.h >>conftest.$ac_ext
13799 cat >>conftest.$ac_ext <<_ACEOF
13800 /* end confdefs.h.  */
13801
13802 /* Override any gcc2 internal prototype to avoid an error.  */
13803 #ifdef __cplusplus
13804 extern "C"
13805 #endif
13806 /* We use char because int might match the return type of a gcc2
13807    builtin and then its argument prototype would still apply.  */
13808 char getspnam ();
13809 int
13810 main ()
13811 {
13812 getspnam ();
13813   ;
13814   return 0;
13815 }
13816 _ACEOF
13817 rm -f conftest.$ac_objext conftest$ac_exeext
13818 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13819   (eval $ac_link) 2>conftest.er1
13820   ac_status=$?
13821   grep -v '^ *+' conftest.er1 >conftest.err
13822   rm -f conftest.er1
13823   cat conftest.err >&5
13824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13825   (exit $ac_status); } &&
13826          { ac_try='test -z "$ac_c_werror_flag"
13827                          || test ! -s conftest.err'
13828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13829   (eval $ac_try) 2>&5
13830   ac_status=$?
13831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13832   (exit $ac_status); }; } &&
13833          { ac_try='test -s conftest$ac_exeext'
13834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13835   (eval $ac_try) 2>&5
13836   ac_status=$?
13837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13838   (exit $ac_status); }; }; then
13839   ac_cv_lib_c_getspnam=yes
13840 else
13841   echo "$as_me: failed program was:" >&5
13842 sed 's/^/| /' conftest.$ac_ext >&5
13843
13844 ac_cv_lib_c_getspnam=no
13845 fi
13846 rm -f conftest.err conftest.$ac_objext \
13847       conftest$ac_exeext conftest.$ac_ext
13848 LIBS=$ac_check_lib_save_LIBS
13849 fi
13850 echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
13851 echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
13852 if test $ac_cv_lib_c_getspnam = yes; then
13853   have_getspnam=yes
13854 fi
13855
13856     if test "$have_getspnam" = no ; then
13857       echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
13858 echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
13859 if test "${ac_cv_lib_gen_getspnam+set}" = set; then
13860   echo $ECHO_N "(cached) $ECHO_C" >&6
13861 else
13862   ac_check_lib_save_LIBS=$LIBS
13863 LIBS="-lgen  $LIBS"
13864 cat >conftest.$ac_ext <<_ACEOF
13865 /* confdefs.h.  */
13866 _ACEOF
13867 cat confdefs.h >>conftest.$ac_ext
13868 cat >>conftest.$ac_ext <<_ACEOF
13869 /* end confdefs.h.  */
13870
13871 /* Override any gcc2 internal prototype to avoid an error.  */
13872 #ifdef __cplusplus
13873 extern "C"
13874 #endif
13875 /* We use char because int might match the return type of a gcc2
13876    builtin and then its argument prototype would still apply.  */
13877 char getspnam ();
13878 int
13879 main ()
13880 {
13881 getspnam ();
13882   ;
13883   return 0;
13884 }
13885 _ACEOF
13886 rm -f conftest.$ac_objext conftest$ac_exeext
13887 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13888   (eval $ac_link) 2>conftest.er1
13889   ac_status=$?
13890   grep -v '^ *+' conftest.er1 >conftest.err
13891   rm -f conftest.er1
13892   cat conftest.err >&5
13893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13894   (exit $ac_status); } &&
13895          { ac_try='test -z "$ac_c_werror_flag"
13896                          || test ! -s conftest.err'
13897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13898   (eval $ac_try) 2>&5
13899   ac_status=$?
13900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13901   (exit $ac_status); }; } &&
13902          { ac_try='test -s conftest$ac_exeext'
13903   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13904   (eval $ac_try) 2>&5
13905   ac_status=$?
13906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13907   (exit $ac_status); }; }; then
13908   ac_cv_lib_gen_getspnam=yes
13909 else
13910   echo "$as_me: failed program was:" >&5
13911 sed 's/^/| /' conftest.$ac_ext >&5
13912
13913 ac_cv_lib_gen_getspnam=no
13914 fi
13915 rm -f conftest.err conftest.$ac_objext \
13916       conftest$ac_exeext conftest.$ac_ext
13917 LIBS=$ac_check_lib_save_LIBS
13918 fi
13919 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
13920 echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
13921 if test $ac_cv_lib_gen_getspnam = yes; then
13922   have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
13923 fi
13924
13925     fi
13926   fi
13927 fi
13928
13929
13930 ###############################################################################
13931 #
13932 #       Check for other libraries needed for non-shadow passwords.
13933 #
13934 ###############################################################################
13935
13936 if test "$enable_locking" = yes ; then
13937
13938   # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
13939   have_crypt=no
13940   echo "$as_me:$LINENO: checking for crypt in -lc" >&5
13941 echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
13942 if test "${ac_cv_lib_c_crypt+set}" = set; then
13943   echo $ECHO_N "(cached) $ECHO_C" >&6
13944 else
13945   ac_check_lib_save_LIBS=$LIBS
13946 LIBS="-lc  $LIBS"
13947 cat >conftest.$ac_ext <<_ACEOF
13948 /* confdefs.h.  */
13949 _ACEOF
13950 cat confdefs.h >>conftest.$ac_ext
13951 cat >>conftest.$ac_ext <<_ACEOF
13952 /* end confdefs.h.  */
13953
13954 /* Override any gcc2 internal prototype to avoid an error.  */
13955 #ifdef __cplusplus
13956 extern "C"
13957 #endif
13958 /* We use char because int might match the return type of a gcc2
13959    builtin and then its argument prototype would still apply.  */
13960 char crypt ();
13961 int
13962 main ()
13963 {
13964 crypt ();
13965   ;
13966   return 0;
13967 }
13968 _ACEOF
13969 rm -f conftest.$ac_objext conftest$ac_exeext
13970 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13971   (eval $ac_link) 2>conftest.er1
13972   ac_status=$?
13973   grep -v '^ *+' conftest.er1 >conftest.err
13974   rm -f conftest.er1
13975   cat conftest.err >&5
13976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13977   (exit $ac_status); } &&
13978          { ac_try='test -z "$ac_c_werror_flag"
13979                          || test ! -s conftest.err'
13980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13981   (eval $ac_try) 2>&5
13982   ac_status=$?
13983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13984   (exit $ac_status); }; } &&
13985          { ac_try='test -s conftest$ac_exeext'
13986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13987   (eval $ac_try) 2>&5
13988   ac_status=$?
13989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13990   (exit $ac_status); }; }; then
13991   ac_cv_lib_c_crypt=yes
13992 else
13993   echo "$as_me: failed program was:" >&5
13994 sed 's/^/| /' conftest.$ac_ext >&5
13995
13996 ac_cv_lib_c_crypt=no
13997 fi
13998 rm -f conftest.err conftest.$ac_objext \
13999       conftest$ac_exeext conftest.$ac_ext
14000 LIBS=$ac_check_lib_save_LIBS
14001 fi
14002 echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
14003 echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
14004 if test $ac_cv_lib_c_crypt = yes; then
14005   have_crypt=yes
14006 fi
14007
14008   if test "$have_crypt" = no ; then
14009     echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
14010 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
14011 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
14012   echo $ECHO_N "(cached) $ECHO_C" >&6
14013 else
14014   ac_check_lib_save_LIBS=$LIBS
14015 LIBS="-lcrypt  $LIBS"
14016 cat >conftest.$ac_ext <<_ACEOF
14017 /* confdefs.h.  */
14018 _ACEOF
14019 cat confdefs.h >>conftest.$ac_ext
14020 cat >>conftest.$ac_ext <<_ACEOF
14021 /* end confdefs.h.  */
14022
14023 /* Override any gcc2 internal prototype to avoid an error.  */
14024 #ifdef __cplusplus
14025 extern "C"
14026 #endif
14027 /* We use char because int might match the return type of a gcc2
14028    builtin and then its argument prototype would still apply.  */
14029 char crypt ();
14030 int
14031 main ()
14032 {
14033 crypt ();
14034   ;
14035   return 0;
14036 }
14037 _ACEOF
14038 rm -f conftest.$ac_objext conftest$ac_exeext
14039 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14040   (eval $ac_link) 2>conftest.er1
14041   ac_status=$?
14042   grep -v '^ *+' conftest.er1 >conftest.err
14043   rm -f conftest.er1
14044   cat conftest.err >&5
14045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14046   (exit $ac_status); } &&
14047          { ac_try='test -z "$ac_c_werror_flag"
14048                          || test ! -s conftest.err'
14049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14050   (eval $ac_try) 2>&5
14051   ac_status=$?
14052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14053   (exit $ac_status); }; } &&
14054          { ac_try='test -s conftest$ac_exeext'
14055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14056   (eval $ac_try) 2>&5
14057   ac_status=$?
14058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14059   (exit $ac_status); }; }; then
14060   ac_cv_lib_crypt_crypt=yes
14061 else
14062   echo "$as_me: failed program was:" >&5
14063 sed 's/^/| /' conftest.$ac_ext >&5
14064
14065 ac_cv_lib_crypt_crypt=no
14066 fi
14067 rm -f conftest.err conftest.$ac_objext \
14068       conftest$ac_exeext conftest.$ac_ext
14069 LIBS=$ac_check_lib_save_LIBS
14070 fi
14071 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
14072 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
14073 if test $ac_cv_lib_crypt_crypt = yes; then
14074   have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
14075 fi
14076
14077   fi
14078 fi
14079
14080
14081 # Most of the above shadow mechanisms will have set need_setuid to yes,
14082 # if they were found.  But, on some systems, we need setuid even when
14083 # using plain old vanilla passwords.
14084 #
14085 if test "$enable_locking" = yes ; then
14086   case "$host" in
14087     *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
14088       need_setuid=yes
14089     ;;
14090   esac
14091 fi
14092
14093
14094 if test "$have_shadow_adjunct" = yes ; then
14095   cat >>confdefs.h <<\_ACEOF
14096 #define HAVE_ADJUNCT_PASSWD 1
14097 _ACEOF
14098
14099 elif test "$have_shadow_enhanced" = yes ; then
14100   cat >>confdefs.h <<\_ACEOF
14101 #define HAVE_ENHANCED_PASSWD 1
14102 _ACEOF
14103
14104 elif test "$have_shadow_hpux" = yes ; then
14105   cat >>confdefs.h <<\_ACEOF
14106 #define HAVE_HPUX_PASSWD 1
14107 _ACEOF
14108
14109 elif test "$have_shadow" = yes ; then
14110   cat >>confdefs.h <<\_ACEOF
14111 #define HAVE_SHADOW_PASSWD 1
14112 _ACEOF
14113
14114 fi
14115
14116
14117 ###############################################################################
14118 #
14119 #       Check for external password helper
14120 #       On SuSE, instead of having xscreensaver be a setuid program, they
14121 #       fork an external program that takes the password on stdin, and
14122 #       returns true if that password is a valid one.  Then only that
14123 #       smaller program needs to be setuid.
14124 #
14125 #       (Note that this external program is not a GUI: the GUI is still
14126 #       all in xscreensaver itself; the external program just does auth.)
14127 #
14128 ###############################################################################
14129
14130 have_passwd_helper=no
14131 with_passwd_helper_req=unspecified
14132
14133
14134 # Check whether --with-passwd-helper or --without-passwd-helper was given.
14135 if test "${with_passwd_helper+set}" = set; then
14136   withval="$with_passwd_helper"
14137   with_passwd_helper="$withval"; with_passwd_helper_req="$withval"
14138 else
14139   with_passwd_helper=no
14140 fi;
14141 # no HANDLE_X_PATH_ARG for this one
14142
14143 if test "$enable_locking" = no ; then
14144   with_passwd_helper_req=no
14145   with_passwd_helper=no
14146 fi
14147
14148 case "$with_passwd_helper" in
14149   ""|no) : ;;
14150   /*)
14151     cat >>confdefs.h <<_ACEOF
14152 #define PASSWD_HELPER_PROGRAM "$with_passwd_helper"
14153 _ACEOF
14154
14155     have_passwd_helper=yes;;
14156   *)
14157     echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
14158     exit 1
14159 esac
14160
14161
14162 ###############################################################################
14163 #
14164 #       Check for a login manager for a "New Login" button on the lock dialog.
14165 #       Usually this will be "/usr/bin/gdmflexiserver".
14166 #
14167 ###############################################################################
14168
14169 have_login_manager=no
14170 with_login_manager_req=unspecified
14171 default_login_manager='gdmflexiserver -l'
14172
14173
14174 # Check whether --with-login-manager or --without-login-manager was given.
14175 if test "${with_login_manager+set}" = set; then
14176   withval="$with_login_manager"
14177   with_login_manager="$withval"; with_login_manager_req="$withval"
14178 else
14179   with_login_manager=no
14180 fi;
14181 # no HANDLE_X_PATH_ARG for this one
14182
14183 if test "$enable_locking" = no ; then
14184   with_login_manager_req=no
14185   with_login_manager=no
14186 fi
14187
14188 if test -n "$with_login_manager_req" ; then
14189   ac_cv_login_manager_program=""
14190
14191  if test "$with_login_manager_req" = "yes" ; then
14192    with_login_manager_req=$default_login_manager
14193  fi
14194
14195   case "$with_login_manager_req" in
14196     /*)
14197       # absolute path
14198       set dummy $with_login_manager_req ; login_manager_tmp=$2
14199       echo "$as_me:$LINENO: checking for $login_manager_tmp" >&5
14200 echo $ECHO_N "checking for $login_manager_tmp... $ECHO_C" >&6
14201       if test -x "$login_manager_tmp" ; then
14202         echo "$as_me:$LINENO: result: yes" >&5
14203 echo "${ECHO_T}yes" >&6
14204         with_login_manager="$login_manager_tmp"
14205       else
14206         echo "$as_me:$LINENO: result: no" >&5
14207 echo "${ECHO_T}no" >&6
14208         with_login_manager=""
14209       fi
14210     ;;
14211     *)
14212       # relative path
14213       set dummy $with_login_manager_req ; login_manager_tmp=$2
14214       # don't cache
14215       unset ac_cv_path_login_manager_tmp
14216       # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
14217 set dummy $login_manager_tmp; ac_word=$2
14218 echo "$as_me:$LINENO: checking for $ac_word" >&5
14219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14220 if test "${ac_cv_path_login_manager_tmp+set}" = set; then
14221   echo $ECHO_N "(cached) $ECHO_C" >&6
14222 else
14223   case $login_manager_tmp in
14224   [\\/]* | ?:[\\/]*)
14225   ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
14226   ;;
14227   *)
14228   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14229 for as_dir in $PATH
14230 do
14231   IFS=$as_save_IFS
14232   test -z "$as_dir" && as_dir=.
14233   for ac_exec_ext in '' $ac_executable_extensions; do
14234   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14235     ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
14236     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14237     break 2
14238   fi
14239 done
14240 done
14241
14242   ;;
14243 esac
14244 fi
14245 login_manager_tmp=$ac_cv_path_login_manager_tmp
14246
14247 if test -n "$login_manager_tmp"; then
14248   echo "$as_me:$LINENO: result: $login_manager_tmp" >&5
14249 echo "${ECHO_T}$login_manager_tmp" >&6
14250 else
14251   echo "$as_me:$LINENO: result: no" >&5
14252 echo "${ECHO_T}no" >&6
14253 fi
14254
14255       if test -z "$login_manager_tmp" ; then
14256         with_login_manager=""
14257       else
14258         with_login_manager="$login_manager_tmp"
14259       fi
14260     ;;
14261   esac
14262   ac_cv_login_manager_program="$with_login_manager"
14263
14264 elif test -n "$ac_cv_login_manager_program"; then
14265   echo "$as_me:$LINENO: result: checking for login_manager... (cached) $ac_cv_login_manager_program" >&5
14266 echo "${ECHO_T}checking for login_manager... (cached) $ac_cv_login_manager_program" >&6
14267 fi
14268
14269 NEW_LOGIN_COMMAND_P=''
14270 NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
14271
14272 if test -z "$NEW_LOGIN_COMMAND" ; then
14273   NEW_LOGIN_COMMAND="$default_login_manager"
14274   NEW_LOGIN_COMMAND_P='! '
14275 fi
14276
14277
14278
14279 ###############################################################################
14280 #
14281 #       Check for -lgtk (and Gnome stuff)
14282 #
14283 ###############################################################################
14284
14285 have_gtk=no
14286 with_gtk_req=unspecified
14287
14288 # Check whether --with-gtk or --without-gtk was given.
14289 if test "${with_gtk+set}" = set; then
14290   withval="$with_gtk"
14291   with_gtk="$withval"; with_gtk_req="$withval"
14292 else
14293   with_gtk=yes
14294 fi;
14295
14296 # if --with-gtk=/directory/ was specified, remember that directory so that
14297 # we can also look for the `gtk-config' program in that directory.
14298 case "$with_gtk" in
14299   /*)
14300     gtk_dir="$with_gtk"
14301     ;;
14302   *)
14303     gtk_dir=""
14304     ;;
14305 esac
14306
14307
14308    case "$with_gtk" in
14309     yes) ;;
14310     no)  ;;
14311
14312     /*)
14313      echo "$as_me:$LINENO: checking for Gtk headers" >&5
14314 echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
14315      d=$with_gtk/include
14316      if test -d $d; then
14317        X_CFLAGS="-I$d $X_CFLAGS"
14318        echo "$as_me:$LINENO: result: $d" >&5
14319 echo "${ECHO_T}$d" >&6
14320      else
14321        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14322 echo "${ECHO_T}not found ($d: no such directory)" >&6
14323      fi
14324
14325      echo "$as_me:$LINENO: checking for Gtk libs" >&5
14326 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
14327      d=$with_gtk/lib
14328      if test -d $d; then
14329        X_LIBS="-L$d $X_LIBS"
14330        echo "$as_me:$LINENO: result: $d" >&5
14331 echo "${ECHO_T}$d" >&6
14332      else
14333        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14334 echo "${ECHO_T}not found ($d: no such directory)" >&6
14335      fi
14336
14337      # replace the directory string with "yes".
14338      with_gtk_req="yes"
14339      with_gtk=$with_gtk_req
14340      ;;
14341
14342     *)
14343      echo ""
14344      echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
14345      echo "       If it is a directory, then \`DIR/include' will be added to"
14346      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14347      exit 1
14348      ;;
14349    esac
14350
14351
14352 if test "$with_gtk" != yes -a "$with_gtk" != no ; then
14353   echo "error: must be yes or no: --with-gtk=$with_gtk"
14354   exit 1
14355 fi
14356
14357
14358 parse_gtk_version_string() {
14359   # M4 sucks!!
14360
14361   maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
14362   min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
14363
14364   ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
14365   if test -z "$ac_gtk_version"; then
14366     ac_gtk_version=unknown
14367     ac_gtk_version_string=unknown
14368   fi
14369 }
14370
14371 # Find pkg-config... (need this for both gtk and gdk_pixbuf.)
14372 # if the user specified --with-gtk=/foo/ then look there.
14373 #
14374 gtk_path="$PATH"
14375 if test ! -z "$gtk_dir"; then
14376   # canonicalize slashes.
14377   foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
14378   gtk_path="$foo:$gtk_path"
14379 fi
14380
14381 for ac_prog in pkg-config
14382 do
14383   # Extract the first word of "$ac_prog", so it can be a program name with args.
14384 set dummy $ac_prog; ac_word=$2
14385 echo "$as_me:$LINENO: checking for $ac_word" >&5
14386 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14387 if test "${ac_cv_path_pkg_config+set}" = set; then
14388   echo $ECHO_N "(cached) $ECHO_C" >&6
14389 else
14390   case $pkg_config in
14391   [\\/]* | ?:[\\/]*)
14392   ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
14393   ;;
14394   *)
14395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14396 for as_dir in $gtk_path
14397 do
14398   IFS=$as_save_IFS
14399   test -z "$as_dir" && as_dir=.
14400   for ac_exec_ext in '' $ac_executable_extensions; do
14401   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14402     ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
14403     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14404     break 2
14405   fi
14406 done
14407 done
14408
14409   ;;
14410 esac
14411 fi
14412 pkg_config=$ac_cv_path_pkg_config
14413
14414 if test -n "$pkg_config"; then
14415   echo "$as_me:$LINENO: result: $pkg_config" >&5
14416 echo "${ECHO_T}$pkg_config" >&6
14417 else
14418   echo "$as_me:$LINENO: result: no" >&5
14419 echo "${ECHO_T}no" >&6
14420 fi
14421
14422   test -n "$pkg_config" && break
14423 done
14424
14425
14426 if test -z "$pkg_config" ; then
14427   { echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5
14428 echo "$as_me: WARNING: pkg-config not found!" >&2;}
14429   pkg_config="false"
14430 fi
14431
14432
14433 # Utility function for running pkg-config-based tests...
14434 #
14435 pkgs=''
14436 pkg_check_version() {
14437   if test "$ok" = yes ; then
14438     req="$1"
14439     min="$2"
14440     echo "$as_me:$LINENO: checking for $req" >&5
14441 echo $ECHO_N "checking for $req... $ECHO_C" >&6
14442     if $pkg_config --exists "$req" ; then
14443       vers=`$pkg_config --modversion "$req"`
14444       if $pkg_config --exists "$req >= $min" ; then
14445         echo "$as_me:$LINENO: result: $vers" >&5
14446 echo "${ECHO_T}$vers" >&6
14447         pkgs="$pkgs $req"
14448         return 1
14449       else
14450         echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
14451 echo "${ECHO_T}$vers (wanted >= $min)" >&6
14452         ok=no
14453         return 0
14454       fi
14455     else
14456       echo "$as_me:$LINENO: result: no" >&5
14457 echo "${ECHO_T}no" >&6
14458       ok=no
14459       return 0
14460     fi
14461   fi
14462 }
14463
14464
14465 jurassic_gtk=no
14466 gtk_halfassed=no
14467
14468 if test "$with_gtk" = yes; then
14469   have_gtk=no
14470
14471   ok="yes"
14472   pkg_check_version            gtk+-2.0  2.0.1  ; ac_gtk_version_string="$vers"
14473   pkg_check_version         gmodule-2.0  2.0.0
14474   pkg_check_version          libxml-2.0  2.4.6
14475   pkg_check_version        libglade-2.0  1.99.0
14476   pkg_check_version      gdk-pixbuf-2.0  2.0.0
14477   pkg_check_version gdk-pixbuf-xlib-2.0  2.0.0
14478   have_gtk="$ok"
14479
14480   if test "$have_gtk" = no; then
14481     if test -n "$ac_gtk_version_string" ; then
14482       gtk_halfassed="$ac_gtk_version_string"
14483       gtk_halfassed_lib="$req"
14484     fi
14485   fi
14486
14487   if test "$have_gtk" = yes; then
14488     parse_gtk_version_string
14489     jurassic_gtk=no
14490   fi
14491
14492   if test "$have_gtk" = yes; then
14493     echo "$as_me:$LINENO: checking for Gtk includes" >&5
14494 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
14495 if test "${ac_cv_gtk_config_cflags+set}" = set; then
14496   echo $ECHO_N "(cached) $ECHO_C" >&6
14497 else
14498   ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
14499 fi
14500 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
14501 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
14502     echo "$as_me:$LINENO: checking for Gtk libs" >&5
14503 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
14504 if test "${ac_cv_gtk_config_libs+set}" = set; then
14505   echo $ECHO_N "(cached) $ECHO_C" >&6
14506 else
14507   ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
14508 fi
14509 echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
14510 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
14511   fi
14512   ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
14513   ac_gtk_config_libs=$ac_cv_gtk_config_libs
14514
14515   GTK_EXTRA_OBJS=""
14516   GTK_DATADIR=""
14517   if test "$have_gtk" = yes; then
14518     GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
14519     GTK_DATADIR="$GTK_DATADIR/share"
14520   fi
14521
14522   if test "$have_gtk" = yes; then
14523     INCLUDES="$INCLUDES $ac_gtk_config_cflags"
14524     GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
14525     cat >>confdefs.h <<\_ACEOF
14526 #define HAVE_GTK 1
14527 _ACEOF
14528
14529     cat >>confdefs.h <<\_ACEOF
14530 #define HAVE_GTK2 1
14531 _ACEOF
14532
14533     cat >>confdefs.h <<\_ACEOF
14534 #define HAVE_XML 1
14535 _ACEOF
14536
14537   fi
14538
14539 fi
14540
14541
14542 # Check for the various Gnome help and URL loading programs.
14543 #
14544 if test "$have_gtk" = yes; then
14545   for ac_prog in gnome-open
14546 do
14547   # Extract the first word of "$ac_prog", so it can be a program name with args.
14548 set dummy $ac_prog; ac_word=$2
14549 echo "$as_me:$LINENO: checking for $ac_word" >&5
14550 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14551 if test "${ac_cv_prog_gnome_open_program+set}" = set; then
14552   echo $ECHO_N "(cached) $ECHO_C" >&6
14553 else
14554   if test -n "$gnome_open_program"; then
14555   ac_cv_prog_gnome_open_program="$gnome_open_program" # Let the user override the test.
14556 else
14557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14558 for as_dir in $PATH
14559 do
14560   IFS=$as_save_IFS
14561   test -z "$as_dir" && as_dir=.
14562   for ac_exec_ext in '' $ac_executable_extensions; do
14563   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14564     ac_cv_prog_gnome_open_program="$ac_prog"
14565     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14566     break 2
14567   fi
14568 done
14569 done
14570
14571 fi
14572 fi
14573 gnome_open_program=$ac_cv_prog_gnome_open_program
14574 if test -n "$gnome_open_program"; then
14575   echo "$as_me:$LINENO: result: $gnome_open_program" >&5
14576 echo "${ECHO_T}$gnome_open_program" >&6
14577 else
14578   echo "$as_me:$LINENO: result: no" >&5
14579 echo "${ECHO_T}no" >&6
14580 fi
14581
14582   test -n "$gnome_open_program" && break
14583 done
14584
14585   for ac_prog in gnome-url-show
14586 do
14587   # Extract the first word of "$ac_prog", so it can be a program name with args.
14588 set dummy $ac_prog; ac_word=$2
14589 echo "$as_me:$LINENO: checking for $ac_word" >&5
14590 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14591 if test "${ac_cv_prog_gnome_url_show_program+set}" = set; then
14592   echo $ECHO_N "(cached) $ECHO_C" >&6
14593 else
14594   if test -n "$gnome_url_show_program"; then
14595   ac_cv_prog_gnome_url_show_program="$gnome_url_show_program" # Let the user override the test.
14596 else
14597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14598 for as_dir in $PATH
14599 do
14600   IFS=$as_save_IFS
14601   test -z "$as_dir" && as_dir=.
14602   for ac_exec_ext in '' $ac_executable_extensions; do
14603   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14604     ac_cv_prog_gnome_url_show_program="$ac_prog"
14605     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14606     break 2
14607   fi
14608 done
14609 done
14610
14611 fi
14612 fi
14613 gnome_url_show_program=$ac_cv_prog_gnome_url_show_program
14614 if test -n "$gnome_url_show_program"; then
14615   echo "$as_me:$LINENO: result: $gnome_url_show_program" >&5
14616 echo "${ECHO_T}$gnome_url_show_program" >&6
14617 else
14618   echo "$as_me:$LINENO: result: no" >&5
14619 echo "${ECHO_T}no" >&6
14620 fi
14621
14622   test -n "$gnome_url_show_program" && break
14623 done
14624
14625 fi
14626
14627
14628 ###############################################################################
14629 #
14630 #       Check for -lXm.
14631 #
14632 ###############################################################################
14633
14634 have_motif=no
14635 with_motif_req=unspecified
14636
14637 # Check whether --with-motif or --without-motif was given.
14638 if test "${with_motif+set}" = set; then
14639   withval="$with_motif"
14640   with_motif="$withval"; with_motif_req="$withval"
14641 else
14642   with_motif=no
14643 fi;
14644
14645
14646    case "$with_motif" in
14647     yes) ;;
14648     no)  ;;
14649
14650     /*)
14651      echo "$as_me:$LINENO: checking for Motif headers" >&5
14652 echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
14653      d=$with_motif/include
14654      if test -d $d; then
14655        X_CFLAGS="-I$d $X_CFLAGS"
14656        echo "$as_me:$LINENO: result: $d" >&5
14657 echo "${ECHO_T}$d" >&6
14658      else
14659        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14660 echo "${ECHO_T}not found ($d: no such directory)" >&6
14661      fi
14662
14663      echo "$as_me:$LINENO: checking for Motif libs" >&5
14664 echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
14665      d=$with_motif/lib
14666      if test -d $d; then
14667        X_LIBS="-L$d $X_LIBS"
14668        echo "$as_me:$LINENO: result: $d" >&5
14669 echo "${ECHO_T}$d" >&6
14670      else
14671        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
14672 echo "${ECHO_T}not found ($d: no such directory)" >&6
14673      fi
14674
14675      # replace the directory string with "yes".
14676      with_motif_req="yes"
14677      with_motif=$with_motif_req
14678      ;;
14679
14680     *)
14681      echo ""
14682      echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
14683      echo "       If it is a directory, then \`DIR/include' will be added to"
14684      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
14685      exit 1
14686      ;;
14687    esac
14688
14689
14690 if test "$with_motif" != yes -a "$with_motif" != no ; then
14691   echo "error: must be yes or no: --with-motif=$with_motif"
14692   exit 1
14693 fi
14694
14695 if test "$with_motif" = yes; then
14696   have_motif=no
14697
14698   ac_save_CPPFLAGS="$CPPFLAGS"
14699   if test \! -z "$includedir" ; then
14700     CPPFLAGS="$CPPFLAGS -I$includedir"
14701   fi
14702   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14703   echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
14704 echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
14705 if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
14706   echo $ECHO_N "(cached) $ECHO_C" >&6
14707 else
14708   cat >conftest.$ac_ext <<_ACEOF
14709 /* confdefs.h.  */
14710 _ACEOF
14711 cat confdefs.h >>conftest.$ac_ext
14712 cat >>conftest.$ac_ext <<_ACEOF
14713 /* end confdefs.h.  */
14714 #include <stdlib.h>
14715                      #include <stdio.h>
14716                      #include <X11/Intrinsic.h>
14717
14718 #include <Xm/Xm.h>
14719 _ACEOF
14720 rm -f conftest.$ac_objext
14721 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14722   (eval $ac_compile) 2>conftest.er1
14723   ac_status=$?
14724   grep -v '^ *+' conftest.er1 >conftest.err
14725   rm -f conftest.er1
14726   cat conftest.err >&5
14727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14728   (exit $ac_status); } &&
14729          { ac_try='test -z "$ac_c_werror_flag"
14730                          || test ! -s conftest.err'
14731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14732   (eval $ac_try) 2>&5
14733   ac_status=$?
14734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14735   (exit $ac_status); }; } &&
14736          { ac_try='test -s conftest.$ac_objext'
14737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14738   (eval $ac_try) 2>&5
14739   ac_status=$?
14740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14741   (exit $ac_status); }; }; then
14742   ac_cv_header_Xm_Xm_h=yes
14743 else
14744   echo "$as_me: failed program was:" >&5
14745 sed 's/^/| /' conftest.$ac_ext >&5
14746
14747 ac_cv_header_Xm_Xm_h=no
14748 fi
14749 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14750 fi
14751 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
14752 echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
14753 if test $ac_cv_header_Xm_Xm_h = yes; then
14754   have_motif=yes
14755                      cat >>confdefs.h <<\_ACEOF
14756 #define HAVE_MOTIF 1
14757 _ACEOF
14758
14759                      MOTIF_LIBS="$MOTIF_LIBS -lXm"
14760 fi
14761
14762
14763   CPPFLAGS="$ac_save_CPPFLAGS"
14764 fi
14765
14766
14767 if test "$have_motif" = yes; then
14768
14769   ac_save_CPPFLAGS="$CPPFLAGS"
14770   if test \! -z "$includedir" ; then
14771     CPPFLAGS="$CPPFLAGS -I$includedir"
14772   fi
14773   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14774   echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
14775 echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
14776 if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
14777   echo $ECHO_N "(cached) $ECHO_C" >&6
14778 else
14779   cat >conftest.$ac_ext <<_ACEOF
14780 /* confdefs.h.  */
14781 _ACEOF
14782 cat confdefs.h >>conftest.$ac_ext
14783 cat >>conftest.$ac_ext <<_ACEOF
14784 /* end confdefs.h.  */
14785 #include <stdlib.h>
14786                      #include <stdio.h>
14787                      #include <X11/Intrinsic.h>
14788
14789 #include <Xm/ComboBox.h>
14790 _ACEOF
14791 rm -f conftest.$ac_objext
14792 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14793   (eval $ac_compile) 2>conftest.er1
14794   ac_status=$?
14795   grep -v '^ *+' conftest.er1 >conftest.err
14796   rm -f conftest.er1
14797   cat conftest.err >&5
14798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14799   (exit $ac_status); } &&
14800          { ac_try='test -z "$ac_c_werror_flag"
14801                          || test ! -s conftest.err'
14802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14803   (eval $ac_try) 2>&5
14804   ac_status=$?
14805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14806   (exit $ac_status); }; } &&
14807          { ac_try='test -s conftest.$ac_objext'
14808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14809   (eval $ac_try) 2>&5
14810   ac_status=$?
14811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14812   (exit $ac_status); }; }; then
14813   ac_cv_header_Xm_ComboBox_h=yes
14814 else
14815   echo "$as_me: failed program was:" >&5
14816 sed 's/^/| /' conftest.$ac_ext >&5
14817
14818 ac_cv_header_Xm_ComboBox_h=no
14819 fi
14820 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14821 fi
14822 echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
14823 echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
14824 if test $ac_cv_header_Xm_ComboBox_h = yes; then
14825   cat >>confdefs.h <<\_ACEOF
14826 #define HAVE_XMCOMBOBOX 1
14827 _ACEOF
14828
14829 fi
14830
14831
14832   CPPFLAGS="$ac_save_CPPFLAGS"
14833 fi
14834
14835
14836 ###############################################################################
14837 #
14838 #       Checking whether Motif is really Lesstif.
14839 #
14840 ###############################################################################
14841
14842 have_lesstif=no
14843 if test "$have_motif" = yes ; then
14844   echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
14845 echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
14846 if test "${ac_cv_have_lesstif+set}" = set; then
14847   echo $ECHO_N "(cached) $ECHO_C" >&6
14848 else
14849
14850   ac_save_CPPFLAGS="$CPPFLAGS"
14851   if test \! -z "$includedir" ; then
14852     CPPFLAGS="$CPPFLAGS -I$includedir"
14853   fi
14854   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14855   cat >conftest.$ac_ext <<_ACEOF
14856 /* confdefs.h.  */
14857 _ACEOF
14858 cat confdefs.h >>conftest.$ac_ext
14859 cat >>conftest.$ac_ext <<_ACEOF
14860 /* end confdefs.h.  */
14861 #include <Xm/Xm.h>
14862 int
14863 main ()
14864 {
14865 long vers = LesstifVersion;
14866   ;
14867   return 0;
14868 }
14869 _ACEOF
14870 rm -f conftest.$ac_objext
14871 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14872   (eval $ac_compile) 2>conftest.er1
14873   ac_status=$?
14874   grep -v '^ *+' conftest.er1 >conftest.err
14875   rm -f conftest.er1
14876   cat conftest.err >&5
14877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14878   (exit $ac_status); } &&
14879          { ac_try='test -z "$ac_c_werror_flag"
14880                          || test ! -s conftest.err'
14881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14882   (eval $ac_try) 2>&5
14883   ac_status=$?
14884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14885   (exit $ac_status); }; } &&
14886          { ac_try='test -s conftest.$ac_objext'
14887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14888   (eval $ac_try) 2>&5
14889   ac_status=$?
14890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14891   (exit $ac_status); }; }; then
14892   ac_cv_have_lesstif=yes
14893 else
14894   echo "$as_me: failed program was:" >&5
14895 sed 's/^/| /' conftest.$ac_ext >&5
14896
14897 ac_cv_have_lesstif=no
14898 fi
14899 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14900   CPPFLAGS="$ac_save_CPPFLAGS"
14901 fi
14902 echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
14903 echo "${ECHO_T}$ac_cv_have_lesstif" >&6
14904   have_lesstif=$ac_cv_have_lesstif
14905 fi
14906
14907
14908 lesstif_version=unknown
14909 lesstif_version_string=unknown
14910
14911 if test "$have_lesstif" = yes ; then
14912   ltv=unknown
14913   echo unknown > conftest-lt
14914   echo "$as_me:$LINENO: checking LessTif version number" >&5
14915 echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
14916 if test "${ac_cv_lesstif_version_string+set}" = set; then
14917   echo $ECHO_N "(cached) $ECHO_C" >&6
14918 else
14919
14920   ac_save_CPPFLAGS="$CPPFLAGS"
14921   if test \! -z "$includedir" ; then
14922     CPPFLAGS="$CPPFLAGS -I$includedir"
14923   fi
14924   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14925   if test "$cross_compiling" = yes; then
14926   ac_cv_lesstif_version=unknown
14927                      ac_cv_lesstif_version_string=unknown
14928 else
14929   cat >conftest.$ac_ext <<_ACEOF
14930 /* confdefs.h.  */
14931 _ACEOF
14932 cat confdefs.h >>conftest.$ac_ext
14933 cat >>conftest.$ac_ext <<_ACEOF
14934 /* end confdefs.h.  */
14935 #include <stdio.h>
14936                      #include <Xm/Xm.h>
14937                      int main() {
14938                        FILE *f = fopen("conftest-lt", "w");
14939                        if (!f) exit(1);
14940                        fprintf(f, "%d %d.%d\n", LesstifVersion,
14941                           LESSTIF_VERSION, LESSTIF_REVISION);
14942                        fclose(f);
14943                        exit(0);
14944                      }
14945 _ACEOF
14946 rm -f conftest$ac_exeext
14947 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14948   (eval $ac_link) 2>&5
14949   ac_status=$?
14950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14951   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14953   (eval $ac_try) 2>&5
14954   ac_status=$?
14955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14956   (exit $ac_status); }; }; then
14957   ltv=`cat conftest-lt`
14958                      ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
14959                      ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
14960 else
14961   echo "$as_me: program exited with status $ac_status" >&5
14962 echo "$as_me: failed program was:" >&5
14963 sed 's/^/| /' conftest.$ac_ext >&5
14964
14965 ( exit $ac_status )
14966 ac_cv_lesstif_version=unknown
14967                      ac_cv_lesstif_version_string=unknown
14968 fi
14969 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14970 fi
14971   CPPFLAGS="$ac_save_CPPFLAGS"
14972 fi
14973 echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
14974 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
14975   rm -f conftest-lt
14976   lesstif_version=$ac_cv_lesstif_version
14977   lesstif_version_string=$ac_cv_lesstif_version_string
14978
14979 fi
14980
14981
14982 if test "$have_motif" = yes ; then
14983   mtv=unknown
14984   echo unknown > conftest-mt
14985   echo "$as_me:$LINENO: checking Motif version number" >&5
14986 echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
14987 if test "${ac_cv_motif_version_string+set}" = set; then
14988   echo $ECHO_N "(cached) $ECHO_C" >&6
14989 else
14990
14991   ac_save_CPPFLAGS="$CPPFLAGS"
14992   if test \! -z "$includedir" ; then
14993     CPPFLAGS="$CPPFLAGS -I$includedir"
14994   fi
14995   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
14996   if test "$cross_compiling" = yes; then
14997   ac_cv_motif_version=unknown
14998                      ac_cv_motif_version_string=unknown
14999 else
15000   cat >conftest.$ac_ext <<_ACEOF
15001 /* confdefs.h.  */
15002 _ACEOF
15003 cat confdefs.h >>conftest.$ac_ext
15004 cat >>conftest.$ac_ext <<_ACEOF
15005 /* end confdefs.h.  */
15006 #include <stdio.h>
15007                      #include <Xm/Xm.h>
15008                      int main() {
15009                        FILE *f = fopen("conftest-mt", "w");
15010                        if (!f) exit(1);
15011                        fprintf(f, "%d %d.%d\n", XmVersion,
15012                           XmVERSION, XmREVISION);
15013                        fclose(f);
15014                        exit(0);
15015                      }
15016 _ACEOF
15017 rm -f conftest$ac_exeext
15018 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15019   (eval $ac_link) 2>&5
15020   ac_status=$?
15021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15022   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15024   (eval $ac_try) 2>&5
15025   ac_status=$?
15026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15027   (exit $ac_status); }; }; then
15028   mtv=`cat conftest-mt`
15029                      ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
15030                      ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
15031 else
15032   echo "$as_me: program exited with status $ac_status" >&5
15033 echo "$as_me: failed program was:" >&5
15034 sed 's/^/| /' conftest.$ac_ext >&5
15035
15036 ( exit $ac_status )
15037 ac_cv_motif_version=unknown
15038                      ac_cv_motif_version_string=unknown
15039 fi
15040 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15041 fi
15042   CPPFLAGS="$ac_save_CPPFLAGS"
15043 fi
15044 echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
15045 echo "${ECHO_T}$ac_cv_motif_version_string" >&6
15046   rm -f conftest-mt
15047   motif_version=$ac_cv_motif_version
15048   motif_version_string=$ac_cv_motif_version_string
15049
15050 fi
15051
15052
15053 ###############################################################################
15054 #
15055 #       Checking whether Motif requires -lXpm.
15056 #
15057 #       If this is Motif 2.x, and we have XPM, then link against XPM as well.
15058 #       The deal is, Motif 2.x requires XPM -- but it's a compilation option
15059 #       of the library whether to build the XPM code into libXm, or whether
15060 #       to rely on an external libXm.  So the only way to tell whether XPM is
15061 #       a link-time requirement is to examine libXm.a, which is very
15062 #       difficult to do in an autoconf script.  So... if it's Motif 2.x, we
15063 #       always link against XPM if the XPM lib exists (and this will be a
15064 #       no-op if libXm happens to already have the XPM code in it.)
15065 #
15066 ###############################################################################
15067
15068 motif_requires_xpm=no
15069 if test "$have_motif" = yes ; then
15070    echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
15071 echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
15072    if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
15073    then
15074      motif_requires_xpm=yes
15075      echo "$as_me:$LINENO: result: maybe" >&5
15076 echo "${ECHO_T}maybe" >&6
15077    else
15078      echo "$as_me:$LINENO: result: no" >&5
15079 echo "${ECHO_T}no" >&6
15080    fi
15081 fi
15082
15083
15084 ###############################################################################
15085 #
15086 #       Checking whether Motif requires -lXp.
15087 #
15088 #       Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
15089 #       Extension".   Why this extension isn't in -lXext with all the others,
15090 #       I have no idea.
15091 #
15092 ###############################################################################
15093
15094 have_xp_ext=no
15095 if test "$have_motif" = yes ; then
15096    have_xp_ext=no
15097
15098   ac_save_CPPFLAGS="$CPPFLAGS"
15099   ac_save_LDFLAGS="$LDFLAGS"
15100 #  ac_save_LIBS="$LIBS"
15101
15102   if test \! -z "$includedir" ; then
15103     CPPFLAGS="$CPPFLAGS -I$includedir"
15104   fi
15105   # note: $X_CFLAGS includes $x_includes
15106   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15107
15108   if test \! -z "$libdir" ; then
15109     LDFLAGS="$LDFLAGS -L$libdir"
15110   fi
15111   # note: $X_LIBS includes $x_libraries
15112   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15113
15114   echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
15115 echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
15116 if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
15117   echo $ECHO_N "(cached) $ECHO_C" >&6
15118 else
15119   ac_check_lib_save_LIBS=$LIBS
15120 LIBS="-lXp -lX11 -lXext -lm $LIBS"
15121 cat >conftest.$ac_ext <<_ACEOF
15122 /* confdefs.h.  */
15123 _ACEOF
15124 cat confdefs.h >>conftest.$ac_ext
15125 cat >>conftest.$ac_ext <<_ACEOF
15126 /* end confdefs.h.  */
15127
15128 /* Override any gcc2 internal prototype to avoid an error.  */
15129 #ifdef __cplusplus
15130 extern "C"
15131 #endif
15132 /* We use char because int might match the return type of a gcc2
15133    builtin and then its argument prototype would still apply.  */
15134 char XpQueryExtension ();
15135 int
15136 main ()
15137 {
15138 XpQueryExtension ();
15139   ;
15140   return 0;
15141 }
15142 _ACEOF
15143 rm -f conftest.$ac_objext conftest$ac_exeext
15144 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15145   (eval $ac_link) 2>conftest.er1
15146   ac_status=$?
15147   grep -v '^ *+' conftest.er1 >conftest.err
15148   rm -f conftest.er1
15149   cat conftest.err >&5
15150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15151   (exit $ac_status); } &&
15152          { ac_try='test -z "$ac_c_werror_flag"
15153                          || test ! -s conftest.err'
15154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15155   (eval $ac_try) 2>&5
15156   ac_status=$?
15157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15158   (exit $ac_status); }; } &&
15159          { ac_try='test -s conftest$ac_exeext'
15160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15161   (eval $ac_try) 2>&5
15162   ac_status=$?
15163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15164   (exit $ac_status); }; }; then
15165   ac_cv_lib_Xp_XpQueryExtension=yes
15166 else
15167   echo "$as_me: failed program was:" >&5
15168 sed 's/^/| /' conftest.$ac_ext >&5
15169
15170 ac_cv_lib_Xp_XpQueryExtension=no
15171 fi
15172 rm -f conftest.err conftest.$ac_objext \
15173       conftest$ac_exeext conftest.$ac_ext
15174 LIBS=$ac_check_lib_save_LIBS
15175 fi
15176 echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
15177 echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
15178 if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
15179   have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
15180 else
15181   true
15182 fi
15183
15184   CPPFLAGS="$ac_save_CPPFLAGS"
15185   LDFLAGS="$ac_save_LDFLAGS"
15186 #  LIBS="$ac_save_LIBS"
15187
15188 fi
15189
15190
15191 ###############################################################################
15192 #
15193 #       Checking whether Motif requires -lXintl (for _Xsetlocale.)
15194 #
15195 ###############################################################################
15196
15197 have_xintl=no
15198 if test "$have_motif" = yes ; then
15199
15200   ac_save_CPPFLAGS="$CPPFLAGS"
15201   ac_save_LDFLAGS="$LDFLAGS"
15202 #  ac_save_LIBS="$LIBS"
15203
15204   if test \! -z "$includedir" ; then
15205     CPPFLAGS="$CPPFLAGS -I$includedir"
15206   fi
15207   # note: $X_CFLAGS includes $x_includes
15208   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15209
15210   if test \! -z "$libdir" ; then
15211     LDFLAGS="$LDFLAGS -L$libdir"
15212   fi
15213   # note: $X_LIBS includes $x_libraries
15214   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15215
15216   echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
15217 echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
15218 if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
15219   echo $ECHO_N "(cached) $ECHO_C" >&6
15220 else
15221   ac_check_lib_save_LIBS=$LIBS
15222 LIBS="-lXintl -lX11 -lXext -lm $LIBS"
15223 cat >conftest.$ac_ext <<_ACEOF
15224 /* confdefs.h.  */
15225 _ACEOF
15226 cat confdefs.h >>conftest.$ac_ext
15227 cat >>conftest.$ac_ext <<_ACEOF
15228 /* end confdefs.h.  */
15229
15230 /* Override any gcc2 internal prototype to avoid an error.  */
15231 #ifdef __cplusplus
15232 extern "C"
15233 #endif
15234 /* We use char because int might match the return type of a gcc2
15235    builtin and then its argument prototype would still apply.  */
15236 char _Xsetlocale ();
15237 int
15238 main ()
15239 {
15240 _Xsetlocale ();
15241   ;
15242   return 0;
15243 }
15244 _ACEOF
15245 rm -f conftest.$ac_objext conftest$ac_exeext
15246 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15247   (eval $ac_link) 2>conftest.er1
15248   ac_status=$?
15249   grep -v '^ *+' conftest.er1 >conftest.err
15250   rm -f conftest.er1
15251   cat conftest.err >&5
15252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15253   (exit $ac_status); } &&
15254          { ac_try='test -z "$ac_c_werror_flag"
15255                          || test ! -s conftest.err'
15256   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15257   (eval $ac_try) 2>&5
15258   ac_status=$?
15259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15260   (exit $ac_status); }; } &&
15261          { ac_try='test -s conftest$ac_exeext'
15262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15263   (eval $ac_try) 2>&5
15264   ac_status=$?
15265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15266   (exit $ac_status); }; }; then
15267   ac_cv_lib_Xintl__Xsetlocale=yes
15268 else
15269   echo "$as_me: failed program was:" >&5
15270 sed 's/^/| /' conftest.$ac_ext >&5
15271
15272 ac_cv_lib_Xintl__Xsetlocale=no
15273 fi
15274 rm -f conftest.err conftest.$ac_objext \
15275       conftest$ac_exeext conftest.$ac_ext
15276 LIBS=$ac_check_lib_save_LIBS
15277 fi
15278 echo "$as_me:$LINENO: result: $ac_cv_lib_Xintl__Xsetlocale" >&5
15279 echo "${ECHO_T}$ac_cv_lib_Xintl__Xsetlocale" >&6
15280 if test $ac_cv_lib_Xintl__Xsetlocale = yes; then
15281   have_xintl=yes
15282 else
15283   have_xintl=no
15284 fi
15285
15286   CPPFLAGS="$ac_save_CPPFLAGS"
15287   LDFLAGS="$ac_save_LDFLAGS"
15288 #  LIBS="$ac_save_LIBS"
15289
15290   if test "$have_xintl" = yes; then
15291     MOTIF_LIBS="$MOTIF_LIBS -lXintl"
15292   fi
15293 fi
15294
15295
15296 ###############################################################################
15297 #
15298 #       Check for -lGL or -lMesaGL.
15299 #
15300 ###############################################################################
15301
15302 have_gl=no
15303 ac_have_mesa_gl=no
15304 with_gl_req=unspecified
15305 gl_halfassed=no
15306
15307 # Check whether --with-gl or --without-gl was given.
15308 if test "${with_gl+set}" = set; then
15309   withval="$with_gl"
15310   with_gl="$withval"; with_gl_req="$withval"
15311 else
15312   with_gl=yes
15313 fi;
15314
15315
15316    case "$with_gl" in
15317     yes) ;;
15318     no)  ;;
15319
15320     /*)
15321      echo "$as_me:$LINENO: checking for GL headers" >&5
15322 echo $ECHO_N "checking for GL headers... $ECHO_C" >&6
15323      d=$with_gl/include
15324      if test -d $d; then
15325        X_CFLAGS="-I$d $X_CFLAGS"
15326        echo "$as_me:$LINENO: result: $d" >&5
15327 echo "${ECHO_T}$d" >&6
15328      else
15329        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15330 echo "${ECHO_T}not found ($d: no such directory)" >&6
15331      fi
15332
15333      echo "$as_me:$LINENO: checking for GL libs" >&5
15334 echo $ECHO_N "checking for GL libs... $ECHO_C" >&6
15335      d=$with_gl/lib
15336      if test -d $d; then
15337        X_LIBS="-L$d $X_LIBS"
15338        echo "$as_me:$LINENO: result: $d" >&5
15339 echo "${ECHO_T}$d" >&6
15340      else
15341        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
15342 echo "${ECHO_T}not found ($d: no such directory)" >&6
15343      fi
15344
15345      # replace the directory string with "yes".
15346      with_gl_req="yes"
15347      with_gl=$with_gl_req
15348      ;;
15349
15350     *)
15351      echo ""
15352      echo "error: argument to --with-gl must be \"yes\", \"no\", or a directory."
15353      echo "       If it is a directory, then \`DIR/include' will be added to"
15354      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
15355      exit 1
15356      ;;
15357    esac
15358
15359
15360 ac_mesagl_version=unknown
15361 ac_mesagl_version_string=unknown
15362
15363 if test "$with_gl" = yes; then
15364
15365   ac_save_CPPFLAGS="$CPPFLAGS"
15366   if test \! -z "$includedir" ; then
15367     CPPFLAGS="$CPPFLAGS -I$includedir"
15368   fi
15369   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15370   if test "${ac_cv_header_GL_gl_h+set}" = set; then
15371   echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15372 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15373 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15374   echo $ECHO_N "(cached) $ECHO_C" >&6
15375 fi
15376 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15377 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15378 else
15379   # Is the header compilable?
15380 echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
15381 echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6
15382 cat >conftest.$ac_ext <<_ACEOF
15383 /* confdefs.h.  */
15384 _ACEOF
15385 cat confdefs.h >>conftest.$ac_ext
15386 cat >>conftest.$ac_ext <<_ACEOF
15387 /* end confdefs.h.  */
15388 $ac_includes_default
15389 #include <GL/gl.h>
15390 _ACEOF
15391 rm -f conftest.$ac_objext
15392 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15393   (eval $ac_compile) 2>conftest.er1
15394   ac_status=$?
15395   grep -v '^ *+' conftest.er1 >conftest.err
15396   rm -f conftest.er1
15397   cat conftest.err >&5
15398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15399   (exit $ac_status); } &&
15400          { ac_try='test -z "$ac_c_werror_flag"
15401                          || test ! -s conftest.err'
15402   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15403   (eval $ac_try) 2>&5
15404   ac_status=$?
15405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15406   (exit $ac_status); }; } &&
15407          { ac_try='test -s conftest.$ac_objext'
15408   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15409   (eval $ac_try) 2>&5
15410   ac_status=$?
15411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15412   (exit $ac_status); }; }; then
15413   ac_header_compiler=yes
15414 else
15415   echo "$as_me: failed program was:" >&5
15416 sed 's/^/| /' conftest.$ac_ext >&5
15417
15418 ac_header_compiler=no
15419 fi
15420 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15421 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15422 echo "${ECHO_T}$ac_header_compiler" >&6
15423
15424 # Is the header present?
15425 echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
15426 echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6
15427 cat >conftest.$ac_ext <<_ACEOF
15428 /* confdefs.h.  */
15429 _ACEOF
15430 cat confdefs.h >>conftest.$ac_ext
15431 cat >>conftest.$ac_ext <<_ACEOF
15432 /* end confdefs.h.  */
15433 #include <GL/gl.h>
15434 _ACEOF
15435 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15436   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15437   ac_status=$?
15438   grep -v '^ *+' conftest.er1 >conftest.err
15439   rm -f conftest.er1
15440   cat conftest.err >&5
15441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15442   (exit $ac_status); } >/dev/null; then
15443   if test -s conftest.err; then
15444     ac_cpp_err=$ac_c_preproc_warn_flag
15445     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15446   else
15447     ac_cpp_err=
15448   fi
15449 else
15450   ac_cpp_err=yes
15451 fi
15452 if test -z "$ac_cpp_err"; then
15453   ac_header_preproc=yes
15454 else
15455   echo "$as_me: failed program was:" >&5
15456 sed 's/^/| /' conftest.$ac_ext >&5
15457
15458   ac_header_preproc=no
15459 fi
15460 rm -f conftest.err conftest.$ac_ext
15461 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15462 echo "${ECHO_T}$ac_header_preproc" >&6
15463
15464 # So?  What about this header?
15465 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15466   yes:no: )
15467     { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
15468 echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15469     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
15470 echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
15471     ac_header_preproc=yes
15472     ;;
15473   no:yes:* )
15474     { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
15475 echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
15476     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
15477 echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
15478     { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
15479 echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
15480     { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
15481 echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15482     { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
15483 echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
15484     { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
15485 echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
15486     (
15487       cat <<\_ASBOX
15488 ## ------------------------------------------ ##
15489 ## Report this to the AC_PACKAGE_NAME lists.  ##
15490 ## ------------------------------------------ ##
15491 _ASBOX
15492     ) |
15493       sed "s/^/$as_me: WARNING:     /" >&2
15494     ;;
15495 esac
15496 echo "$as_me:$LINENO: checking for GL/gl.h" >&5
15497 echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
15498 if test "${ac_cv_header_GL_gl_h+set}" = set; then
15499   echo $ECHO_N "(cached) $ECHO_C" >&6
15500 else
15501   ac_cv_header_GL_gl_h=$ac_header_preproc
15502 fi
15503 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
15504 echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6
15505
15506 fi
15507 if test $ac_cv_header_GL_gl_h = yes; then
15508   have_gl=yes
15509 else
15510   have_gl=no
15511 fi
15512
15513
15514   CPPFLAGS="$ac_save_CPPFLAGS"
15515   if test "$have_gl" = yes ; then
15516
15517   ac_save_CPPFLAGS="$CPPFLAGS"
15518   if test \! -z "$includedir" ; then
15519     CPPFLAGS="$CPPFLAGS -I$includedir"
15520   fi
15521   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15522   echo "$as_me:$LINENO: checking for GL/glx.h" >&5
15523 echo $ECHO_N "checking for GL/glx.h... $ECHO_C" >&6
15524 if test "${ac_cv_header_GL_glx_h+set}" = set; then
15525   echo $ECHO_N "(cached) $ECHO_C" >&6
15526 else
15527   cat >conftest.$ac_ext <<_ACEOF
15528 /* confdefs.h.  */
15529 _ACEOF
15530 cat confdefs.h >>conftest.$ac_ext
15531 cat >>conftest.$ac_ext <<_ACEOF
15532 /* end confdefs.h.  */
15533 #include <GL/gl.h>
15534
15535 #include <GL/glx.h>
15536 _ACEOF
15537 rm -f conftest.$ac_objext
15538 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15539   (eval $ac_compile) 2>conftest.er1
15540   ac_status=$?
15541   grep -v '^ *+' conftest.er1 >conftest.err
15542   rm -f conftest.er1
15543   cat conftest.err >&5
15544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15545   (exit $ac_status); } &&
15546          { ac_try='test -z "$ac_c_werror_flag"
15547                          || test ! -s conftest.err'
15548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15549   (eval $ac_try) 2>&5
15550   ac_status=$?
15551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15552   (exit $ac_status); }; } &&
15553          { ac_try='test -s conftest.$ac_objext'
15554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15555   (eval $ac_try) 2>&5
15556   ac_status=$?
15557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15558   (exit $ac_status); }; }; then
15559   ac_cv_header_GL_glx_h=yes
15560 else
15561   echo "$as_me: failed program was:" >&5
15562 sed 's/^/| /' conftest.$ac_ext >&5
15563
15564 ac_cv_header_GL_glx_h=no
15565 fi
15566 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15567 fi
15568 echo "$as_me:$LINENO: result: $ac_cv_header_GL_glx_h" >&5
15569 echo "${ECHO_T}$ac_cv_header_GL_glx_h" >&6
15570 if test $ac_cv_header_GL_glx_h = yes; then
15571   have_gl=yes
15572 else
15573   have_gl=no
15574 fi
15575
15576
15577   CPPFLAGS="$ac_save_CPPFLAGS"
15578   fi
15579
15580   # If we have the headers, try and figure out which vendor it's from.
15581   #
15582   if test "$have_gl" = yes ; then
15583
15584     # We need to know whether it's MesaGL so that we know which libraries
15585     # to link against.
15586     #
15587     echo "$as_me:$LINENO: checking whether GL is really MesaGL" >&5
15588 echo $ECHO_N "checking whether GL is really MesaGL... $ECHO_C" >&6
15589 if test "${ac_cv_have_mesa_gl+set}" = set; then
15590   echo $ECHO_N "(cached) $ECHO_C" >&6
15591 else
15592   ac_cv_have_mesa_gl=no
15593
15594   ac_save_CPPFLAGS="$CPPFLAGS"
15595   if test \! -z "$includedir" ; then
15596     CPPFLAGS="$CPPFLAGS -I$includedir"
15597   fi
15598   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15599   cat >conftest.$ac_ext <<_ACEOF
15600 /* confdefs.h.  */
15601 _ACEOF
15602 cat confdefs.h >>conftest.$ac_ext
15603 cat >>conftest.$ac_ext <<_ACEOF
15604 /* end confdefs.h.  */
15605 #include <GL/glx.h>
15606
15607 _ACEOF
15608 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15609   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
15610   ac_cv_have_mesa_gl=yes
15611 fi
15612 rm -f conftest*
15613
15614   CPPFLAGS="$ac_save_CPPFLAGS"
15615
15616 fi
15617 echo "$as_me:$LINENO: result: $ac_cv_have_mesa_gl" >&5
15618 echo "${ECHO_T}$ac_cv_have_mesa_gl" >&6
15619     ac_have_mesa_gl=$ac_cv_have_mesa_gl
15620
15621
15622     gl_lib_1=""
15623     GL_LIBS=""
15624
15625
15626     # Some versions of MesaGL are compiled to require -lpthread.
15627     # So if the Mesa headers exist, and -lpthread exists, then always
15628     # link -lpthread after the Mesa libs (be they named -lGL or -lMesaGL.)
15629     #
15630     if test "$ac_have_mesa_gl" = yes; then
15631       echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15632 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
15633 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
15634   echo $ECHO_N "(cached) $ECHO_C" >&6
15635 else
15636   ac_check_lib_save_LIBS=$LIBS
15637 LIBS="-lpthread  $LIBS"
15638 cat >conftest.$ac_ext <<_ACEOF
15639 /* confdefs.h.  */
15640 _ACEOF
15641 cat confdefs.h >>conftest.$ac_ext
15642 cat >>conftest.$ac_ext <<_ACEOF
15643 /* end confdefs.h.  */
15644
15645 /* Override any gcc2 internal prototype to avoid an error.  */
15646 #ifdef __cplusplus
15647 extern "C"
15648 #endif
15649 /* We use char because int might match the return type of a gcc2
15650    builtin and then its argument prototype would still apply.  */
15651 char pthread_create ();
15652 int
15653 main ()
15654 {
15655 pthread_create ();
15656   ;
15657   return 0;
15658 }
15659 _ACEOF
15660 rm -f conftest.$ac_objext conftest$ac_exeext
15661 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15662   (eval $ac_link) 2>conftest.er1
15663   ac_status=$?
15664   grep -v '^ *+' conftest.er1 >conftest.err
15665   rm -f conftest.er1
15666   cat conftest.err >&5
15667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15668   (exit $ac_status); } &&
15669          { ac_try='test -z "$ac_c_werror_flag"
15670                          || test ! -s conftest.err'
15671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15672   (eval $ac_try) 2>&5
15673   ac_status=$?
15674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15675   (exit $ac_status); }; } &&
15676          { ac_try='test -s conftest$ac_exeext'
15677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15678   (eval $ac_try) 2>&5
15679   ac_status=$?
15680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15681   (exit $ac_status); }; }; then
15682   ac_cv_lib_pthread_pthread_create=yes
15683 else
15684   echo "$as_me: failed program was:" >&5
15685 sed 's/^/| /' conftest.$ac_ext >&5
15686
15687 ac_cv_lib_pthread_pthread_create=no
15688 fi
15689 rm -f conftest.err conftest.$ac_objext \
15690       conftest$ac_exeext conftest.$ac_ext
15691 LIBS=$ac_check_lib_save_LIBS
15692 fi
15693 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
15694 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
15695 if test $ac_cv_lib_pthread_pthread_create = yes; then
15696   GL_LIBS="-lpthread"
15697 fi
15698
15699     fi
15700
15701
15702     # If we have Mesa headers, check to see if we can link against -lMesaGL.
15703     # If we don't have Mesa headers, or we don't have -lMesaGL, try -lGL.
15704     # Else, warn that GL is busted.  (We have the headers, but no libs.)
15705     #
15706
15707     if test "$ac_have_mesa_gl" = yes ; then
15708
15709   ac_save_CPPFLAGS="$CPPFLAGS"
15710   ac_save_LDFLAGS="$LDFLAGS"
15711 #  ac_save_LIBS="$LIBS"
15712
15713   if test \! -z "$includedir" ; then
15714     CPPFLAGS="$CPPFLAGS -I$includedir"
15715   fi
15716   # note: $X_CFLAGS includes $x_includes
15717   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15718
15719   if test \! -z "$libdir" ; then
15720     LDFLAGS="$LDFLAGS -L$libdir"
15721   fi
15722   # note: $X_LIBS includes $x_libraries
15723   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15724
15725   echo "$as_me:$LINENO: checking for glXCreateContext in -lMesaGL" >&5
15726 echo $ECHO_N "checking for glXCreateContext in -lMesaGL... $ECHO_C" >&6
15727 if test "${ac_cv_lib_MesaGL_glXCreateContext+set}" = set; then
15728   echo $ECHO_N "(cached) $ECHO_C" >&6
15729 else
15730   ac_check_lib_save_LIBS=$LIBS
15731 LIBS="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
15732 cat >conftest.$ac_ext <<_ACEOF
15733 /* confdefs.h.  */
15734 _ACEOF
15735 cat confdefs.h >>conftest.$ac_ext
15736 cat >>conftest.$ac_ext <<_ACEOF
15737 /* end confdefs.h.  */
15738
15739 /* Override any gcc2 internal prototype to avoid an error.  */
15740 #ifdef __cplusplus
15741 extern "C"
15742 #endif
15743 /* We use char because int might match the return type of a gcc2
15744    builtin and then its argument prototype would still apply.  */
15745 char glXCreateContext ();
15746 int
15747 main ()
15748 {
15749 glXCreateContext ();
15750   ;
15751   return 0;
15752 }
15753 _ACEOF
15754 rm -f conftest.$ac_objext conftest$ac_exeext
15755 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15756   (eval $ac_link) 2>conftest.er1
15757   ac_status=$?
15758   grep -v '^ *+' conftest.er1 >conftest.err
15759   rm -f conftest.er1
15760   cat conftest.err >&5
15761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15762   (exit $ac_status); } &&
15763          { ac_try='test -z "$ac_c_werror_flag"
15764                          || test ! -s conftest.err'
15765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15766   (eval $ac_try) 2>&5
15767   ac_status=$?
15768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15769   (exit $ac_status); }; } &&
15770          { ac_try='test -s conftest$ac_exeext'
15771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15772   (eval $ac_try) 2>&5
15773   ac_status=$?
15774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15775   (exit $ac_status); }; }; then
15776   ac_cv_lib_MesaGL_glXCreateContext=yes
15777 else
15778   echo "$as_me: failed program was:" >&5
15779 sed 's/^/| /' conftest.$ac_ext >&5
15780
15781 ac_cv_lib_MesaGL_glXCreateContext=no
15782 fi
15783 rm -f conftest.err conftest.$ac_objext \
15784       conftest$ac_exeext conftest.$ac_ext
15785 LIBS=$ac_check_lib_save_LIBS
15786 fi
15787 echo "$as_me:$LINENO: result: $ac_cv_lib_MesaGL_glXCreateContext" >&5
15788 echo "${ECHO_T}$ac_cv_lib_MesaGL_glXCreateContext" >&6
15789 if test $ac_cv_lib_MesaGL_glXCreateContext = yes; then
15790   gl_lib_1="MesaGL"
15791                       GL_LIBS="-lMesaGL -lMesaGLU $VIDMODE_LIBS $GL_LIBS"
15792 fi
15793
15794   CPPFLAGS="$ac_save_CPPFLAGS"
15795   LDFLAGS="$ac_save_LDFLAGS"
15796 #  LIBS="$ac_save_LIBS"
15797
15798     fi
15799
15800     if test "$gl_lib_1" = "" ; then
15801
15802   ac_save_CPPFLAGS="$CPPFLAGS"
15803   ac_save_LDFLAGS="$LDFLAGS"
15804 #  ac_save_LIBS="$LIBS"
15805
15806   if test \! -z "$includedir" ; then
15807     CPPFLAGS="$CPPFLAGS -I$includedir"
15808   fi
15809   # note: $X_CFLAGS includes $x_includes
15810   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15811
15812   if test \! -z "$libdir" ; then
15813     LDFLAGS="$LDFLAGS -L$libdir"
15814   fi
15815   # note: $X_LIBS includes $x_libraries
15816   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
15817
15818   echo "$as_me:$LINENO: checking for glXCreateContext in -lGL" >&5
15819 echo $ECHO_N "checking for glXCreateContext in -lGL... $ECHO_C" >&6
15820 if test "${ac_cv_lib_GL_glXCreateContext+set}" = set; then
15821   echo $ECHO_N "(cached) $ECHO_C" >&6
15822 else
15823   ac_check_lib_save_LIBS=$LIBS
15824 LIBS="-lGL -lGLU $GL_LIBS -lX11 -lXext $VIDMODE_LIBS -lm $LIBS"
15825 cat >conftest.$ac_ext <<_ACEOF
15826 /* confdefs.h.  */
15827 _ACEOF
15828 cat confdefs.h >>conftest.$ac_ext
15829 cat >>conftest.$ac_ext <<_ACEOF
15830 /* end confdefs.h.  */
15831
15832 /* Override any gcc2 internal prototype to avoid an error.  */
15833 #ifdef __cplusplus
15834 extern "C"
15835 #endif
15836 /* We use char because int might match the return type of a gcc2
15837    builtin and then its argument prototype would still apply.  */
15838 char glXCreateContext ();
15839 int
15840 main ()
15841 {
15842 glXCreateContext ();
15843   ;
15844   return 0;
15845 }
15846 _ACEOF
15847 rm -f conftest.$ac_objext conftest$ac_exeext
15848 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15849   (eval $ac_link) 2>conftest.er1
15850   ac_status=$?
15851   grep -v '^ *+' conftest.er1 >conftest.err
15852   rm -f conftest.er1
15853   cat conftest.err >&5
15854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15855   (exit $ac_status); } &&
15856          { ac_try='test -z "$ac_c_werror_flag"
15857                          || test ! -s conftest.err'
15858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15859   (eval $ac_try) 2>&5
15860   ac_status=$?
15861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15862   (exit $ac_status); }; } &&
15863          { ac_try='test -s conftest$ac_exeext'
15864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15865   (eval $ac_try) 2>&5
15866   ac_status=$?
15867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15868   (exit $ac_status); }; }; then
15869   ac_cv_lib_GL_glXCreateContext=yes
15870 else
15871   echo "$as_me: failed program was:" >&5
15872 sed 's/^/| /' conftest.$ac_ext >&5
15873
15874 ac_cv_lib_GL_glXCreateContext=no
15875 fi
15876 rm -f conftest.err conftest.$ac_objext \
15877       conftest$ac_exeext conftest.$ac_ext
15878 LIBS=$ac_check_lib_save_LIBS
15879 fi
15880 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glXCreateContext" >&5
15881 echo "${ECHO_T}$ac_cv_lib_GL_glXCreateContext" >&6
15882 if test $ac_cv_lib_GL_glXCreateContext = yes; then
15883   gl_lib_1="GL"
15884                       GL_LIBS="-lGL -lGLU $VIDMODE_LIBS $GL_LIBS"
15885 fi
15886
15887   CPPFLAGS="$ac_save_CPPFLAGS"
15888   LDFLAGS="$ac_save_LDFLAGS"
15889 #  LIBS="$ac_save_LIBS"
15890
15891     fi
15892
15893     if test "$gl_lib_1" = "" ; then
15894       # we have headers, but no libs -- bail.
15895       have_gl=no
15896       ac_have_mesa_gl=no
15897       gl_halfassed=yes
15898     else
15899       # linking works -- we can build the GL hacks.
15900       cat >>confdefs.h <<\_ACEOF
15901 #define HAVE_GL 1
15902 _ACEOF
15903
15904       if test "$ac_have_mesa_gl" = yes ; then
15905         cat >>confdefs.h <<\_ACEOF
15906 #define HAVE_MESA_GL 1
15907 _ACEOF
15908
15909       fi
15910     fi
15911   fi
15912
15913
15914   # Now that we know we have GL headers and libs, do some more GL testing.
15915   #
15916
15917   if test "$have_gl" = yes ; then
15918     # If it's MesaGL, we'd like to issue a warning if the version number
15919     # is less than or equal to 2.6, because that version had a security bug.
15920     #
15921     if test "$ac_have_mesa_gl" = yes; then
15922
15923       echo "$as_me:$LINENO: checking MesaGL version number" >&5
15924 echo $ECHO_N "checking MesaGL version number... $ECHO_C" >&6
15925 if test "${ac_cv_mesagl_version_string+set}" = set; then
15926   echo $ECHO_N "(cached) $ECHO_C" >&6
15927 else
15928   cat > conftest.$ac_ext <<EOF
15929 #line 15933 "configure"
15930 #include "confdefs.h"
15931 #include <GL/gl.h>
15932 #ifndef MESA_MAJOR_VERSION
15933 # include <GL/xmesa.h>
15934 # ifdef XMESA_MAJOR_VERSION
15935    /* Around Mesa 3.2, they took out the Mesa version number, so instead,
15936       we have to check the XMesa version number (the number of the X protocol
15937       support, which seems to be the same as the Mesa version number.)
15938     */
15939 #  define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
15940 #  define MESA_MINOR_VERSION XMESA_MINOR_VERSION
15941 # else
15942    /* Oh great.  Some time after 3.4, they took out the xmesa.h header file,
15943       so we have no way of telling what version of Mesa this is at all.
15944       So, we'll guess that the osmesa version (the "offscreen protocol")
15945       is less than or equal to the real mesa version number.  Except that
15946       if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
15947       Mesa 3.4.  And Mesa 3.3 had xmesa.h.  What a complete load of shit!
15948     */
15949 # include <GL/osmesa.h>
15950 #  define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
15951 #  define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
15952 #  if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
15953 #   undef MESA_MINOR_VERSION
15954 #   define MESA_MINOR_VERSION 4 or newer, probably?
15955 #  endif
15956 # endif
15957 #endif
15958 configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
15959 EOF
15960
15961          ac_save_CPPFLAGS="$CPPFLAGS"
15962          if test \! -z "$includedir" ; then
15963            CPPFLAGS="$CPPFLAGS -I$includedir"
15964          fi
15965          CPPFLAGS="$CPPFLAGS $X_CFLAGS"
15966
15967          mglv=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep configure:`
15968
15969          # M4 sucks!!
15970
15971           mglv=`echo "$mglv" | sed -n \
15972              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
15973
15974
15975          rm -f conftest.$ac_ext
15976
15977          CPPFLAGS="$ac_save_CPPFLAGS"
15978
15979          if test "$mglv" = ""; then
15980            ac_mesagl_version=unknown
15981            ac_mesagl_version_string=unknown
15982          else
15983            ac_mesagl_version_string="$mglv"
15984            # M4 sucks!!
15985
15986            maj=`echo "$mglv" | sed -n 's/^\([0-9][0-9]*\)\..*$/\1/p'`
15987            min=`echo "$mglv" | sed -n 's/^.*\.\([0-9][0-9]*\).*$/\1/p'`
15988
15989            ac_mesagl_version=`echo "$maj * 1000 + $min" | bc`
15990            if test -z "$ac_mesagl_version"; then
15991              ac_mesagl_version=unknown
15992              ac_mesagl_version_string=unknown
15993            fi
15994          fi
15995          ac_cv_mesagl_version=$ac_mesagl_version
15996          ac_cv_mesagl_version_string=$ac_mesagl_version_string
15997
15998 fi
15999 echo "$as_me:$LINENO: result: $ac_cv_mesagl_version_string" >&5
16000 echo "${ECHO_T}$ac_cv_mesagl_version_string" >&6
16001       ac_mesagl_version=$ac_cv_mesagl_version
16002       ac_mesagl_version_string=$ac_cv_mesagl_version_string
16003     fi
16004
16005
16006     # Check for OpenGL 1.1 features.
16007     #
16008
16009   ac_save_CPPFLAGS="$CPPFLAGS"
16010   ac_save_LDFLAGS="$LDFLAGS"
16011 #  ac_save_LIBS="$LIBS"
16012
16013   if test \! -z "$includedir" ; then
16014     CPPFLAGS="$CPPFLAGS -I$includedir"
16015   fi
16016   # note: $X_CFLAGS includes $x_includes
16017   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16018
16019   if test \! -z "$libdir" ; then
16020     LDFLAGS="$LDFLAGS -L$libdir"
16021   fi
16022   # note: $X_LIBS includes $x_libraries
16023   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16024
16025   as_ac_Lib=`echo "ac_cv_lib_$gl_lib_1''_glBindTexture" | $as_tr_sh`
16026 echo "$as_me:$LINENO: checking for glBindTexture in -l$gl_lib_1" >&5
16027 echo $ECHO_N "checking for glBindTexture in -l$gl_lib_1... $ECHO_C" >&6
16028 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16029   echo $ECHO_N "(cached) $ECHO_C" >&6
16030 else
16031   ac_check_lib_save_LIBS=$LIBS
16032 LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $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 glBindTexture ();
16047 int
16048 main ()
16049 {
16050 glBindTexture ();
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   eval "$as_ac_Lib=yes"
16078 else
16079   echo "$as_me: failed program was:" >&5
16080 sed 's/^/| /' conftest.$ac_ext >&5
16081
16082 eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
16089 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16090 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16091   cat >>confdefs.h <<\_ACEOF
16092 #define HAVE_GLBINDTEXTURE 1
16093 _ACEOF
16094
16095 else
16096   true
16097 fi
16098
16099   CPPFLAGS="$ac_save_CPPFLAGS"
16100   LDFLAGS="$ac_save_LDFLAGS"
16101 #  LIBS="$ac_save_LIBS"
16102
16103   fi
16104
16105 elif test "$with_gl" != no; then
16106   echo "error: must be yes or no: --with-gl=$with_gl"
16107   exit 1
16108 fi
16109
16110
16111 ###############################################################################
16112 #
16113 #       Check for -lgle.
16114 #
16115 ###############################################################################
16116
16117 have_gle=no
16118 with_gle_req=unspecified
16119 gle_halfassed=no
16120
16121 # Check whether --with-gle or --without-gle was given.
16122 if test "${with_gle+set}" = set; then
16123   withval="$with_gle"
16124   with_gle="$withval"; with_gle_req="$withval"
16125 else
16126   with_gle=yes
16127 fi;
16128
16129
16130    case "$with_gle" in
16131     yes) ;;
16132     no)  ;;
16133
16134     /*)
16135      echo "$as_me:$LINENO: checking for GLE headers" >&5
16136 echo $ECHO_N "checking for GLE headers... $ECHO_C" >&6
16137      d=$with_gle/include
16138      if test -d $d; then
16139        X_CFLAGS="-I$d $X_CFLAGS"
16140        echo "$as_me:$LINENO: result: $d" >&5
16141 echo "${ECHO_T}$d" >&6
16142      else
16143        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16144 echo "${ECHO_T}not found ($d: no such directory)" >&6
16145      fi
16146
16147      echo "$as_me:$LINENO: checking for GLE libs" >&5
16148 echo $ECHO_N "checking for GLE libs... $ECHO_C" >&6
16149      d=$with_gle/lib
16150      if test -d $d; then
16151        X_LIBS="-L$d $X_LIBS"
16152        echo "$as_me:$LINENO: result: $d" >&5
16153 echo "${ECHO_T}$d" >&6
16154      else
16155        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16156 echo "${ECHO_T}not found ($d: no such directory)" >&6
16157      fi
16158
16159      # replace the directory string with "yes".
16160      with_gle_req="yes"
16161      with_gle=$with_gle_req
16162      ;;
16163
16164     *)
16165      echo ""
16166      echo "error: argument to --with-gle must be \"yes\", \"no\", or a directory."
16167      echo "       If it is a directory, then \`DIR/include' will be added to"
16168      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16169      exit 1
16170      ;;
16171    esac
16172
16173
16174 GLE_LIBS=""
16175
16176 if test "$have_gl" = no ; then
16177  true
16178 elif test "$with_gle" = yes; then
16179
16180
16181   ac_save_CPPFLAGS="$CPPFLAGS"
16182   if test \! -z "$includedir" ; then
16183     CPPFLAGS="$CPPFLAGS -I$includedir"
16184   fi
16185   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16186   echo "$as_me:$LINENO: checking for GL/gle.h" >&5
16187 echo $ECHO_N "checking for GL/gle.h... $ECHO_C" >&6
16188 if test "${ac_cv_header_GL_gle_h+set}" = set; then
16189   echo $ECHO_N "(cached) $ECHO_C" >&6
16190 else
16191   cat >conftest.$ac_ext <<_ACEOF
16192 /* confdefs.h.  */
16193 _ACEOF
16194 cat confdefs.h >>conftest.$ac_ext
16195 cat >>conftest.$ac_ext <<_ACEOF
16196 /* end confdefs.h.  */
16197 #include <GL/gl.h>
16198
16199 #include <GL/gle.h>
16200 _ACEOF
16201 rm -f conftest.$ac_objext
16202 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16203   (eval $ac_compile) 2>conftest.er1
16204   ac_status=$?
16205   grep -v '^ *+' conftest.er1 >conftest.err
16206   rm -f conftest.er1
16207   cat conftest.err >&5
16208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16209   (exit $ac_status); } &&
16210          { ac_try='test -z "$ac_c_werror_flag"
16211                          || test ! -s conftest.err'
16212   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16213   (eval $ac_try) 2>&5
16214   ac_status=$?
16215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16216   (exit $ac_status); }; } &&
16217          { ac_try='test -s conftest.$ac_objext'
16218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16219   (eval $ac_try) 2>&5
16220   ac_status=$?
16221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16222   (exit $ac_status); }; }; then
16223   ac_cv_header_GL_gle_h=yes
16224 else
16225   echo "$as_me: failed program was:" >&5
16226 sed 's/^/| /' conftest.$ac_ext >&5
16227
16228 ac_cv_header_GL_gle_h=no
16229 fi
16230 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16231 fi
16232 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gle_h" >&5
16233 echo "${ECHO_T}$ac_cv_header_GL_gle_h" >&6
16234 if test $ac_cv_header_GL_gle_h = yes; then
16235   have_gle3=yes
16236 else
16237   have_gle3=no
16238 fi
16239
16240
16241   CPPFLAGS="$ac_save_CPPFLAGS"
16242   if test "$have_gle3" = yes ; then
16243     have_gle=yes;
16244   else
16245
16246   ac_save_CPPFLAGS="$CPPFLAGS"
16247   if test \! -z "$includedir" ; then
16248     CPPFLAGS="$CPPFLAGS -I$includedir"
16249   fi
16250   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16251   echo "$as_me:$LINENO: checking for GL/gutil.h" >&5
16252 echo $ECHO_N "checking for GL/gutil.h... $ECHO_C" >&6
16253 if test "${ac_cv_header_GL_gutil_h+set}" = set; then
16254   echo $ECHO_N "(cached) $ECHO_C" >&6
16255 else
16256   cat >conftest.$ac_ext <<_ACEOF
16257 /* confdefs.h.  */
16258 _ACEOF
16259 cat confdefs.h >>conftest.$ac_ext
16260 cat >>conftest.$ac_ext <<_ACEOF
16261 /* end confdefs.h.  */
16262 #include <GL/gl.h>
16263
16264 #include <GL/gutil.h>
16265 _ACEOF
16266 rm -f conftest.$ac_objext
16267 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16268   (eval $ac_compile) 2>conftest.er1
16269   ac_status=$?
16270   grep -v '^ *+' conftest.er1 >conftest.err
16271   rm -f conftest.er1
16272   cat conftest.err >&5
16273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16274   (exit $ac_status); } &&
16275          { ac_try='test -z "$ac_c_werror_flag"
16276                          || test ! -s conftest.err'
16277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16278   (eval $ac_try) 2>&5
16279   ac_status=$?
16280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16281   (exit $ac_status); }; } &&
16282          { ac_try='test -s conftest.$ac_objext'
16283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16284   (eval $ac_try) 2>&5
16285   ac_status=$?
16286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16287   (exit $ac_status); }; }; then
16288   ac_cv_header_GL_gutil_h=yes
16289 else
16290   echo "$as_me: failed program was:" >&5
16291 sed 's/^/| /' conftest.$ac_ext >&5
16292
16293 ac_cv_header_GL_gutil_h=no
16294 fi
16295 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16296 fi
16297 echo "$as_me:$LINENO: result: $ac_cv_header_GL_gutil_h" >&5
16298 echo "${ECHO_T}$ac_cv_header_GL_gutil_h" >&6
16299 if test $ac_cv_header_GL_gutil_h = yes; then
16300   have_gle=yes
16301 else
16302   have_gle=no
16303 fi
16304
16305
16306   CPPFLAGS="$ac_save_CPPFLAGS"
16307     if test "$have_gle" = yes ; then
16308
16309   ac_save_CPPFLAGS="$CPPFLAGS"
16310   if test \! -z "$includedir" ; then
16311     CPPFLAGS="$CPPFLAGS -I$includedir"
16312   fi
16313   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16314   echo "$as_me:$LINENO: checking for GL/tube.h" >&5
16315 echo $ECHO_N "checking for GL/tube.h... $ECHO_C" >&6
16316 if test "${ac_cv_header_GL_tube_h+set}" = set; then
16317   echo $ECHO_N "(cached) $ECHO_C" >&6
16318 else
16319   cat >conftest.$ac_ext <<_ACEOF
16320 /* confdefs.h.  */
16321 _ACEOF
16322 cat confdefs.h >>conftest.$ac_ext
16323 cat >>conftest.$ac_ext <<_ACEOF
16324 /* end confdefs.h.  */
16325 #include <GL/gl.h>
16326
16327 #include <GL/tube.h>
16328 _ACEOF
16329 rm -f conftest.$ac_objext
16330 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16331   (eval $ac_compile) 2>conftest.er1
16332   ac_status=$?
16333   grep -v '^ *+' conftest.er1 >conftest.err
16334   rm -f conftest.er1
16335   cat conftest.err >&5
16336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16337   (exit $ac_status); } &&
16338          { ac_try='test -z "$ac_c_werror_flag"
16339                          || test ! -s conftest.err'
16340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16341   (eval $ac_try) 2>&5
16342   ac_status=$?
16343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16344   (exit $ac_status); }; } &&
16345          { ac_try='test -s conftest.$ac_objext'
16346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16347   (eval $ac_try) 2>&5
16348   ac_status=$?
16349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16350   (exit $ac_status); }; }; then
16351   ac_cv_header_GL_tube_h=yes
16352 else
16353   echo "$as_me: failed program was:" >&5
16354 sed 's/^/| /' conftest.$ac_ext >&5
16355
16356 ac_cv_header_GL_tube_h=no
16357 fi
16358 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16359 fi
16360 echo "$as_me:$LINENO: result: $ac_cv_header_GL_tube_h" >&5
16361 echo "${ECHO_T}$ac_cv_header_GL_tube_h" >&6
16362 if test $ac_cv_header_GL_tube_h = yes; then
16363   have_gle=yes
16364 else
16365   have_gle=no
16366 fi
16367
16368
16369   CPPFLAGS="$ac_save_CPPFLAGS"
16370     fi
16371   fi
16372
16373   if test "$have_gle" = yes ; then
16374     have_gle=no
16375     gle_halfassed=yes
16376
16377   ac_save_CPPFLAGS="$CPPFLAGS"
16378   ac_save_LDFLAGS="$LDFLAGS"
16379 #  ac_save_LIBS="$LIBS"
16380
16381   if test \! -z "$includedir" ; then
16382     CPPFLAGS="$CPPFLAGS -I$includedir"
16383   fi
16384   # note: $X_CFLAGS includes $x_includes
16385   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16386
16387   if test \! -z "$libdir" ; then
16388     LDFLAGS="$LDFLAGS -L$libdir"
16389   fi
16390   # note: $X_LIBS includes $x_libraries
16391   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16392
16393   echo "$as_me:$LINENO: checking for gleCreateGC in -lgle" >&5
16394 echo $ECHO_N "checking for gleCreateGC in -lgle... $ECHO_C" >&6
16395 if test "${ac_cv_lib_gle_gleCreateGC+set}" = set; then
16396   echo $ECHO_N "(cached) $ECHO_C" >&6
16397 else
16398   ac_check_lib_save_LIBS=$LIBS
16399 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16400 cat >conftest.$ac_ext <<_ACEOF
16401 /* confdefs.h.  */
16402 _ACEOF
16403 cat confdefs.h >>conftest.$ac_ext
16404 cat >>conftest.$ac_ext <<_ACEOF
16405 /* end confdefs.h.  */
16406
16407 /* Override any gcc2 internal prototype to avoid an error.  */
16408 #ifdef __cplusplus
16409 extern "C"
16410 #endif
16411 /* We use char because int might match the return type of a gcc2
16412    builtin and then its argument prototype would still apply.  */
16413 char gleCreateGC ();
16414 int
16415 main ()
16416 {
16417 gleCreateGC ();
16418   ;
16419   return 0;
16420 }
16421 _ACEOF
16422 rm -f conftest.$ac_objext conftest$ac_exeext
16423 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16424   (eval $ac_link) 2>conftest.er1
16425   ac_status=$?
16426   grep -v '^ *+' conftest.er1 >conftest.err
16427   rm -f conftest.er1
16428   cat conftest.err >&5
16429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16430   (exit $ac_status); } &&
16431          { ac_try='test -z "$ac_c_werror_flag"
16432                          || test ! -s conftest.err'
16433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16434   (eval $ac_try) 2>&5
16435   ac_status=$?
16436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16437   (exit $ac_status); }; } &&
16438          { ac_try='test -s conftest$ac_exeext'
16439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16440   (eval $ac_try) 2>&5
16441   ac_status=$?
16442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16443   (exit $ac_status); }; }; then
16444   ac_cv_lib_gle_gleCreateGC=yes
16445 else
16446   echo "$as_me: failed program was:" >&5
16447 sed 's/^/| /' conftest.$ac_ext >&5
16448
16449 ac_cv_lib_gle_gleCreateGC=no
16450 fi
16451 rm -f conftest.err conftest.$ac_objext \
16452       conftest$ac_exeext conftest.$ac_ext
16453 LIBS=$ac_check_lib_save_LIBS
16454 fi
16455 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_gleCreateGC" >&5
16456 echo "${ECHO_T}$ac_cv_lib_gle_gleCreateGC" >&6
16457 if test $ac_cv_lib_gle_gleCreateGC = yes; then
16458   have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
16459 fi
16460
16461   CPPFLAGS="$ac_save_CPPFLAGS"
16462   LDFLAGS="$ac_save_LDFLAGS"
16463 #  LIBS="$ac_save_LIBS"
16464
16465   fi
16466   if test "$have_gle" = yes ; then
16467     have_gle=no
16468     gle_halfassed=yes
16469
16470     # sometimes the libmatrix stuff is included in libgle.  look there first.
16471 #
16472 # I don't get it.  For some reason, this test passes on SGI, as if
16473 # uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
16474 # Yet the link is succeeding.  Why???
16475 #
16476 #    AC_CHECK_X_LIB(gle, uview_direction_d,
16477 #                   [have_gle=yes; gle_halfassed=no],
16478 #                   [], $GL_LIBS -lX11 -lXext -lm)
16479
16480     # As of GLE 3 this is in libgle, and has changed name to uview_direction!
16481     # *sigh*
16482     if test "$have_gle3" = yes ; then
16483
16484   ac_save_CPPFLAGS="$CPPFLAGS"
16485   ac_save_LDFLAGS="$LDFLAGS"
16486 #  ac_save_LIBS="$LIBS"
16487
16488   if test \! -z "$includedir" ; then
16489     CPPFLAGS="$CPPFLAGS -I$includedir"
16490   fi
16491   # note: $X_CFLAGS includes $x_includes
16492   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16493
16494   if test \! -z "$libdir" ; then
16495     LDFLAGS="$LDFLAGS -L$libdir"
16496   fi
16497   # note: $X_LIBS includes $x_libraries
16498   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16499
16500   echo "$as_me:$LINENO: checking for uview_direction in -lgle" >&5
16501 echo $ECHO_N "checking for uview_direction in -lgle... $ECHO_C" >&6
16502 if test "${ac_cv_lib_gle_uview_direction+set}" = set; then
16503   echo $ECHO_N "(cached) $ECHO_C" >&6
16504 else
16505   ac_check_lib_save_LIBS=$LIBS
16506 LIBS="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
16507 cat >conftest.$ac_ext <<_ACEOF
16508 /* confdefs.h.  */
16509 _ACEOF
16510 cat confdefs.h >>conftest.$ac_ext
16511 cat >>conftest.$ac_ext <<_ACEOF
16512 /* end confdefs.h.  */
16513
16514 /* Override any gcc2 internal prototype to avoid an error.  */
16515 #ifdef __cplusplus
16516 extern "C"
16517 #endif
16518 /* We use char because int might match the return type of a gcc2
16519    builtin and then its argument prototype would still apply.  */
16520 char uview_direction ();
16521 int
16522 main ()
16523 {
16524 uview_direction ();
16525   ;
16526   return 0;
16527 }
16528 _ACEOF
16529 rm -f conftest.$ac_objext conftest$ac_exeext
16530 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16531   (eval $ac_link) 2>conftest.er1
16532   ac_status=$?
16533   grep -v '^ *+' conftest.er1 >conftest.err
16534   rm -f conftest.er1
16535   cat conftest.err >&5
16536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16537   (exit $ac_status); } &&
16538          { ac_try='test -z "$ac_c_werror_flag"
16539                          || test ! -s conftest.err'
16540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16541   (eval $ac_try) 2>&5
16542   ac_status=$?
16543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16544   (exit $ac_status); }; } &&
16545          { ac_try='test -s conftest$ac_exeext'
16546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16547   (eval $ac_try) 2>&5
16548   ac_status=$?
16549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16550   (exit $ac_status); }; }; then
16551   ac_cv_lib_gle_uview_direction=yes
16552 else
16553   echo "$as_me: failed program was:" >&5
16554 sed 's/^/| /' conftest.$ac_ext >&5
16555
16556 ac_cv_lib_gle_uview_direction=no
16557 fi
16558 rm -f conftest.err conftest.$ac_objext \
16559       conftest$ac_exeext conftest.$ac_ext
16560 LIBS=$ac_check_lib_save_LIBS
16561 fi
16562 echo "$as_me:$LINENO: result: $ac_cv_lib_gle_uview_direction" >&5
16563 echo "${ECHO_T}$ac_cv_lib_gle_uview_direction" >&6
16564 if test $ac_cv_lib_gle_uview_direction = yes; then
16565   have_gle=yes; gle_halfassed=no
16566 fi
16567
16568   CPPFLAGS="$ac_save_CPPFLAGS"
16569   LDFLAGS="$ac_save_LDFLAGS"
16570 #  LIBS="$ac_save_LIBS"
16571
16572     fi
16573     # if it wasn't in libgle, then look in libmatrix.
16574     if test "$have_gle" = no ; then
16575
16576   ac_save_CPPFLAGS="$CPPFLAGS"
16577   ac_save_LDFLAGS="$LDFLAGS"
16578 #  ac_save_LIBS="$LIBS"
16579
16580   if test \! -z "$includedir" ; then
16581     CPPFLAGS="$CPPFLAGS -I$includedir"
16582   fi
16583   # note: $X_CFLAGS includes $x_includes
16584   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16585
16586   if test \! -z "$libdir" ; then
16587     LDFLAGS="$LDFLAGS -L$libdir"
16588   fi
16589   # note: $X_LIBS includes $x_libraries
16590   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
16591
16592   echo "$as_me:$LINENO: checking for uview_direction_d in -lmatrix" >&5
16593 echo $ECHO_N "checking for uview_direction_d in -lmatrix... $ECHO_C" >&6
16594 if test "${ac_cv_lib_matrix_uview_direction_d+set}" = set; then
16595   echo $ECHO_N "(cached) $ECHO_C" >&6
16596 else
16597   ac_check_lib_save_LIBS=$LIBS
16598 LIBS="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
16599 cat >conftest.$ac_ext <<_ACEOF
16600 /* confdefs.h.  */
16601 _ACEOF
16602 cat confdefs.h >>conftest.$ac_ext
16603 cat >>conftest.$ac_ext <<_ACEOF
16604 /* end confdefs.h.  */
16605
16606 /* Override any gcc2 internal prototype to avoid an error.  */
16607 #ifdef __cplusplus
16608 extern "C"
16609 #endif
16610 /* We use char because int might match the return type of a gcc2
16611    builtin and then its argument prototype would still apply.  */
16612 char uview_direction_d ();
16613 int
16614 main ()
16615 {
16616 uview_direction_d ();
16617   ;
16618   return 0;
16619 }
16620 _ACEOF
16621 rm -f conftest.$ac_objext conftest$ac_exeext
16622 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16623   (eval $ac_link) 2>conftest.er1
16624   ac_status=$?
16625   grep -v '^ *+' conftest.er1 >conftest.err
16626   rm -f conftest.er1
16627   cat conftest.err >&5
16628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16629   (exit $ac_status); } &&
16630          { ac_try='test -z "$ac_c_werror_flag"
16631                          || test ! -s conftest.err'
16632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16633   (eval $ac_try) 2>&5
16634   ac_status=$?
16635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16636   (exit $ac_status); }; } &&
16637          { ac_try='test -s conftest$ac_exeext'
16638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16639   (eval $ac_try) 2>&5
16640   ac_status=$?
16641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16642   (exit $ac_status); }; }; then
16643   ac_cv_lib_matrix_uview_direction_d=yes
16644 else
16645   echo "$as_me: failed program was:" >&5
16646 sed 's/^/| /' conftest.$ac_ext >&5
16647
16648 ac_cv_lib_matrix_uview_direction_d=no
16649 fi
16650 rm -f conftest.err conftest.$ac_objext \
16651       conftest$ac_exeext conftest.$ac_ext
16652 LIBS=$ac_check_lib_save_LIBS
16653 fi
16654 echo "$as_me:$LINENO: result: $ac_cv_lib_matrix_uview_direction_d" >&5
16655 echo "${ECHO_T}$ac_cv_lib_matrix_uview_direction_d" >&6
16656 if test $ac_cv_lib_matrix_uview_direction_d = yes; then
16657   have_gle=yes; gle_halfassed=no;
16658                       GLE_LIBS="$GLE_LIBS -lmatrix"
16659 fi
16660
16661   CPPFLAGS="$ac_save_CPPFLAGS"
16662   LDFLAGS="$ac_save_LDFLAGS"
16663 #  LIBS="$ac_save_LIBS"
16664
16665     fi
16666   fi
16667
16668   if test "$have_gle" = yes ; then
16669     cat >>confdefs.h <<\_ACEOF
16670 #define HAVE_GLE 1
16671 _ACEOF
16672
16673     if test "$have_gle3" = yes ; then
16674       cat >>confdefs.h <<\_ACEOF
16675 #define HAVE_GLE3 1
16676 _ACEOF
16677
16678     fi
16679   fi
16680
16681 elif test "$with_gle" != no; then
16682   echo "error: must be yes or no: --with-gle=$with_gle"
16683   exit 1
16684
16685 fi
16686
16687
16688 ###############################################################################
16689 #
16690 #       Check for -lgdk_pixbuf.
16691 #       These tests are for gdk_pixbuf usage of the hacks,
16692 #       not xscreensaver-demo (thus we have to test again to get
16693 #       the libraries right: don't want to pull in all of GTK
16694 #       for the hacks.)
16695 #
16696 ###############################################################################
16697
16698 have_gdk_pixbuf=no
16699 with_gdk_pixbuf_req=unspecified
16700
16701 # Check whether --with-pixbuf or --without-pixbuf was given.
16702 if test "${with_pixbuf+set}" = set; then
16703   withval="$with_pixbuf"
16704   with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"
16705 else
16706   with_gdk_pixbuf=yes
16707 fi;
16708
16709 # if --with-pixbuf=/directory/ was specified, remember that directory so that
16710 # we can also look for the `gdk-pixbuf-config' program in that directory.
16711 case "$with_gdk_pixbuf" in
16712   /*)
16713     gdk_pixbuf_dir="$with_gdk_pixbuf"
16714     ;;
16715   *)
16716     gdk_pixbuf_dir=""
16717     ;;
16718 esac
16719
16720
16721    case "$with_gdk_pixbuf" in
16722     yes) ;;
16723     no)  ;;
16724
16725     /*)
16726      echo "$as_me:$LINENO: checking for GDK_PIXBUF headers" >&5
16727 echo $ECHO_N "checking for GDK_PIXBUF headers... $ECHO_C" >&6
16728      d=$with_gdk_pixbuf/include
16729      if test -d $d; then
16730        X_CFLAGS="-I$d $X_CFLAGS"
16731        echo "$as_me:$LINENO: result: $d" >&5
16732 echo "${ECHO_T}$d" >&6
16733      else
16734        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16735 echo "${ECHO_T}not found ($d: no such directory)" >&6
16736      fi
16737
16738      echo "$as_me:$LINENO: checking for GDK_PIXBUF libs" >&5
16739 echo $ECHO_N "checking for GDK_PIXBUF libs... $ECHO_C" >&6
16740      d=$with_gdk_pixbuf/lib
16741      if test -d $d; then
16742        X_LIBS="-L$d $X_LIBS"
16743        echo "$as_me:$LINENO: result: $d" >&5
16744 echo "${ECHO_T}$d" >&6
16745      else
16746        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
16747 echo "${ECHO_T}not found ($d: no such directory)" >&6
16748      fi
16749
16750      # replace the directory string with "yes".
16751      with_gdk_pixbuf_req="yes"
16752      with_gdk_pixbuf=$with_gdk_pixbuf_req
16753      ;;
16754
16755     *)
16756      echo ""
16757      echo "error: argument to --with-pixbuf must be \"yes\", \"no\", or a directory."
16758      echo "       If it is a directory, then \`DIR/include' will be added to"
16759      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
16760      exit 1
16761      ;;
16762    esac
16763
16764
16765 if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
16766   echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
16767   exit 1
16768 fi
16769
16770 if test "$with_gdk_pixbuf" = yes; then
16771   have_gdk_pixbuf=no
16772
16773   pkgs=''
16774   ok="yes"
16775
16776   pkg_check_version gdk-pixbuf-2.0      2.0.0
16777   pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
16778   have_gdk_pixbuf="$ok"
16779
16780   if test "$have_gdk_pixbuf" = yes; then
16781     echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5
16782 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6
16783 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then
16784   echo $ECHO_N "(cached) $ECHO_C" >&6
16785 else
16786   ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`
16787 fi
16788 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5
16789 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6
16790     echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5
16791 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6
16792 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then
16793   echo $ECHO_N "(cached) $ECHO_C" >&6
16794 else
16795   ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`
16796 fi
16797 echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5
16798 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6
16799   fi
16800   ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
16801   ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
16802
16803
16804   if test "$have_gdk_pixbuf" = yes; then
16805     #
16806     # we appear to have pixbuf; check for headers/libs to be sure.
16807     #
16808     ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
16809     CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
16810
16811     have_gdk_pixbuf=no
16812
16813     # check for header A...
16814
16815   ac_save_CPPFLAGS="$CPPFLAGS"
16816   if test \! -z "$includedir" ; then
16817     CPPFLAGS="$CPPFLAGS -I$includedir"
16818   fi
16819   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16820   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
16821   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
16822 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
16823 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
16824   echo $ECHO_N "(cached) $ECHO_C" >&6
16825 fi
16826 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
16827 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
16828 else
16829   # Is the header compilable?
16830 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5
16831 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6
16832 cat >conftest.$ac_ext <<_ACEOF
16833 /* confdefs.h.  */
16834 _ACEOF
16835 cat confdefs.h >>conftest.$ac_ext
16836 cat >>conftest.$ac_ext <<_ACEOF
16837 /* end confdefs.h.  */
16838 $ac_includes_default
16839 #include <gdk-pixbuf/gdk-pixbuf.h>
16840 _ACEOF
16841 rm -f conftest.$ac_objext
16842 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16843   (eval $ac_compile) 2>conftest.er1
16844   ac_status=$?
16845   grep -v '^ *+' conftest.er1 >conftest.err
16846   rm -f conftest.er1
16847   cat conftest.err >&5
16848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16849   (exit $ac_status); } &&
16850          { ac_try='test -z "$ac_c_werror_flag"
16851                          || test ! -s conftest.err'
16852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16853   (eval $ac_try) 2>&5
16854   ac_status=$?
16855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16856   (exit $ac_status); }; } &&
16857          { ac_try='test -s conftest.$ac_objext'
16858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16859   (eval $ac_try) 2>&5
16860   ac_status=$?
16861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16862   (exit $ac_status); }; }; then
16863   ac_header_compiler=yes
16864 else
16865   echo "$as_me: failed program was:" >&5
16866 sed 's/^/| /' conftest.$ac_ext >&5
16867
16868 ac_header_compiler=no
16869 fi
16870 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16871 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16872 echo "${ECHO_T}$ac_header_compiler" >&6
16873
16874 # Is the header present?
16875 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5
16876 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6
16877 cat >conftest.$ac_ext <<_ACEOF
16878 /* confdefs.h.  */
16879 _ACEOF
16880 cat confdefs.h >>conftest.$ac_ext
16881 cat >>conftest.$ac_ext <<_ACEOF
16882 /* end confdefs.h.  */
16883 #include <gdk-pixbuf/gdk-pixbuf.h>
16884 _ACEOF
16885 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16886   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16887   ac_status=$?
16888   grep -v '^ *+' conftest.er1 >conftest.err
16889   rm -f conftest.er1
16890   cat conftest.err >&5
16891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16892   (exit $ac_status); } >/dev/null; then
16893   if test -s conftest.err; then
16894     ac_cpp_err=$ac_c_preproc_warn_flag
16895     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16896   else
16897     ac_cpp_err=
16898   fi
16899 else
16900   ac_cpp_err=yes
16901 fi
16902 if test -z "$ac_cpp_err"; then
16903   ac_header_preproc=yes
16904 else
16905   echo "$as_me: failed program was:" >&5
16906 sed 's/^/| /' conftest.$ac_ext >&5
16907
16908   ac_header_preproc=no
16909 fi
16910 rm -f conftest.err conftest.$ac_ext
16911 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16912 echo "${ECHO_T}$ac_header_preproc" >&6
16913
16914 # So?  What about this header?
16915 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16916   yes:no: )
16917     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5
16918 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16919     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5
16920 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;}
16921     ac_header_preproc=yes
16922     ;;
16923   no:yes:* )
16924     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5
16925 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;}
16926     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&5
16927 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     check for missing prerequisite headers?" >&2;}
16928     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5
16929 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;}
16930     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&5
16931 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16932     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5
16933 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;}
16934     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5
16935 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;}
16936     (
16937       cat <<\_ASBOX
16938 ## ------------------------------------------ ##
16939 ## Report this to the AC_PACKAGE_NAME lists.  ##
16940 ## ------------------------------------------ ##
16941 _ASBOX
16942     ) |
16943       sed "s/^/$as_me: WARNING:     /" >&2
16944     ;;
16945 esac
16946 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5
16947 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6
16948 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then
16949   echo $ECHO_N "(cached) $ECHO_C" >&6
16950 else
16951   ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc
16952 fi
16953 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5
16954 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6
16955
16956 fi
16957 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then
16958   have_gdk_pixbuf=yes
16959 fi
16960
16961
16962   CPPFLAGS="$ac_save_CPPFLAGS"
16963
16964     # if that worked, check for header B...
16965     if test "$have_gdk_pixbuf" = yes; then
16966       have_gdk_pixbuf=no
16967       gdk_pixbuf_halfassed=yes
16968
16969   ac_save_CPPFLAGS="$CPPFLAGS"
16970   if test \! -z "$includedir" ; then
16971     CPPFLAGS="$CPPFLAGS -I$includedir"
16972   fi
16973   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
16974   if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16975   echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
16976 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
16977 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
16978   echo $ECHO_N "(cached) $ECHO_C" >&6
16979 fi
16980 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
16981 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
16982 else
16983   # Is the header compilable?
16984 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h usability" >&5
16985 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
16986 cat >conftest.$ac_ext <<_ACEOF
16987 /* confdefs.h.  */
16988 _ACEOF
16989 cat confdefs.h >>conftest.$ac_ext
16990 cat >>conftest.$ac_ext <<_ACEOF
16991 /* end confdefs.h.  */
16992 $ac_includes_default
16993 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
16994 _ACEOF
16995 rm -f conftest.$ac_objext
16996 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16997   (eval $ac_compile) 2>conftest.er1
16998   ac_status=$?
16999   grep -v '^ *+' conftest.er1 >conftest.err
17000   rm -f conftest.er1
17001   cat conftest.err >&5
17002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17003   (exit $ac_status); } &&
17004          { ac_try='test -z "$ac_c_werror_flag"
17005                          || test ! -s conftest.err'
17006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17007   (eval $ac_try) 2>&5
17008   ac_status=$?
17009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17010   (exit $ac_status); }; } &&
17011          { ac_try='test -s conftest.$ac_objext'
17012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17013   (eval $ac_try) 2>&5
17014   ac_status=$?
17015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17016   (exit $ac_status); }; }; then
17017   ac_header_compiler=yes
17018 else
17019   echo "$as_me: failed program was:" >&5
17020 sed 's/^/| /' conftest.$ac_ext >&5
17021
17022 ac_header_compiler=no
17023 fi
17024 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17025 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17026 echo "${ECHO_T}$ac_header_compiler" >&6
17027
17028 # Is the header present?
17029 echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf-xlib.h presence" >&5
17030 echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
17031 cat >conftest.$ac_ext <<_ACEOF
17032 /* confdefs.h.  */
17033 _ACEOF
17034 cat confdefs.h >>conftest.$ac_ext
17035 cat >>conftest.$ac_ext <<_ACEOF
17036 /* end confdefs.h.  */
17037 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
17038 _ACEOF
17039 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17040   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17041   ac_status=$?
17042   grep -v '^ *+' conftest.er1 >conftest.err
17043   rm -f conftest.er1
17044   cat conftest.err >&5
17045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17046   (exit $ac_status); } >/dev/null; then
17047   if test -s conftest.err; then
17048     ac_cpp_err=$ac_c_preproc_warn_flag
17049     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17050   else
17051     ac_cpp_err=
17052   fi
17053 else
17054   ac_cpp_err=yes
17055 fi
17056 if test -z "$ac_cpp_err"; then
17057   ac_header_preproc=yes
17058 else
17059   echo "$as_me: failed program was:" >&5
17060 sed 's/^/| /' conftest.$ac_ext >&5
17061
17062   ac_header_preproc=no
17063 fi
17064 rm -f conftest.err conftest.$ac_ext
17065 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17066 echo "${ECHO_T}$ac_header_preproc" >&6
17067
17068 # So?  What about this header?
17069 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17070   yes:no: )
17071     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17072 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17073     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17074 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17075     ac_header_preproc=yes
17076     ;;
17077   no:yes:* )
17078     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17079 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17080     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17081 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17082     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17083 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17084     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17085 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17086     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17087 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17088     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17089 echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17090     (
17091       cat <<\_ASBOX
17092 ## ------------------------------------------ ##
17093 ## Report this to the AC_PACKAGE_NAME lists.  ##
17094 ## ------------------------------------------ ##
17095 _ASBOX
17096     ) |
17097       sed "s/^/$as_me: WARNING:     /" >&2
17098     ;;
17099 esac
17100 echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf-xlib.h" >&5
17101 echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17102 if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h+set}" = set; then
17103   echo $ECHO_N "(cached) $ECHO_C" >&6
17104 else
17105   ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h=$ac_header_preproc
17106 fi
17107 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&5
17108 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h" >&6
17109
17110 fi
17111 if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_xlib_h = yes; then
17112   have_gdk_pixbuf=yes
17113                          gdk_pixbuf_halfassed=no
17114 fi
17115
17116
17117   CPPFLAGS="$ac_save_CPPFLAGS"
17118
17119       # yay, it has a new name in Gtk 2.x...
17120       if test "$have_gdk_pixbuf" = no; then
17121         have_gdk_pixbuf=no
17122         gdk_pixbuf_halfassed=yes
17123
17124   ac_save_CPPFLAGS="$CPPFLAGS"
17125   if test \! -z "$includedir" ; then
17126     CPPFLAGS="$CPPFLAGS -I$includedir"
17127   fi
17128   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17129   if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17130   echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17131 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17132 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17133   echo $ECHO_N "(cached) $ECHO_C" >&6
17134 fi
17135 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17136 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
17137 else
17138   # Is the header compilable?
17139 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability" >&5
17140 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h usability... $ECHO_C" >&6
17141 cat >conftest.$ac_ext <<_ACEOF
17142 /* confdefs.h.  */
17143 _ACEOF
17144 cat confdefs.h >>conftest.$ac_ext
17145 cat >>conftest.$ac_ext <<_ACEOF
17146 /* end confdefs.h.  */
17147 $ac_includes_default
17148 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17149 _ACEOF
17150 rm -f conftest.$ac_objext
17151 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17152   (eval $ac_compile) 2>conftest.er1
17153   ac_status=$?
17154   grep -v '^ *+' conftest.er1 >conftest.err
17155   rm -f conftest.er1
17156   cat conftest.err >&5
17157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17158   (exit $ac_status); } &&
17159          { ac_try='test -z "$ac_c_werror_flag"
17160                          || test ! -s conftest.err'
17161   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17162   (eval $ac_try) 2>&5
17163   ac_status=$?
17164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17165   (exit $ac_status); }; } &&
17166          { ac_try='test -s conftest.$ac_objext'
17167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17168   (eval $ac_try) 2>&5
17169   ac_status=$?
17170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17171   (exit $ac_status); }; }; then
17172   ac_header_compiler=yes
17173 else
17174   echo "$as_me: failed program was:" >&5
17175 sed 's/^/| /' conftest.$ac_ext >&5
17176
17177 ac_header_compiler=no
17178 fi
17179 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17180 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17181 echo "${ECHO_T}$ac_header_compiler" >&6
17182
17183 # Is the header present?
17184 echo "$as_me:$LINENO: checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence" >&5
17185 echo $ECHO_N "checking gdk-pixbuf-xlib/gdk-pixbuf-xlib.h presence... $ECHO_C" >&6
17186 cat >conftest.$ac_ext <<_ACEOF
17187 /* confdefs.h.  */
17188 _ACEOF
17189 cat confdefs.h >>conftest.$ac_ext
17190 cat >>conftest.$ac_ext <<_ACEOF
17191 /* end confdefs.h.  */
17192 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
17193 _ACEOF
17194 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17195   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17196   ac_status=$?
17197   grep -v '^ *+' conftest.er1 >conftest.err
17198   rm -f conftest.er1
17199   cat conftest.err >&5
17200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17201   (exit $ac_status); } >/dev/null; then
17202   if test -s conftest.err; then
17203     ac_cpp_err=$ac_c_preproc_warn_flag
17204     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17205   else
17206     ac_cpp_err=
17207   fi
17208 else
17209   ac_cpp_err=yes
17210 fi
17211 if test -z "$ac_cpp_err"; then
17212   ac_header_preproc=yes
17213 else
17214   echo "$as_me: failed program was:" >&5
17215 sed 's/^/| /' conftest.$ac_ext >&5
17216
17217   ac_header_preproc=no
17218 fi
17219 rm -f conftest.err conftest.$ac_ext
17220 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17221 echo "${ECHO_T}$ac_header_preproc" >&6
17222
17223 # So?  What about this header?
17224 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17225   yes:no: )
17226     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17227 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17228     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&5
17229 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the compiler's result" >&2;}
17230     ac_header_preproc=yes
17231     ;;
17232   no:yes:* )
17233     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&5
17234 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: present but cannot be compiled" >&2;}
17235     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&5
17236 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     check for missing prerequisite headers?" >&2;}
17237     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&5
17238 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: see the Autoconf documentation" >&2;}
17239     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
17240 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17241     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&5
17242 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: proceeding with the preprocessor's result" >&2;}
17243     { echo "$as_me:$LINENO: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&5
17244 echo "$as_me: WARNING: gdk-pixbuf-xlib/gdk-pixbuf-xlib.h: in the future, the compiler will take precedence" >&2;}
17245     (
17246       cat <<\_ASBOX
17247 ## ------------------------------------------ ##
17248 ## Report this to the AC_PACKAGE_NAME lists.  ##
17249 ## ------------------------------------------ ##
17250 _ASBOX
17251     ) |
17252       sed "s/^/$as_me: WARNING:     /" >&2
17253     ;;
17254 esac
17255 echo "$as_me:$LINENO: checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h" >&5
17256 echo $ECHO_N "checking for gdk-pixbuf-xlib/gdk-pixbuf-xlib.h... $ECHO_C" >&6
17257 if test "${ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h+set}" = set; then
17258   echo $ECHO_N "(cached) $ECHO_C" >&6
17259 else
17260   ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h=$ac_header_preproc
17261 fi
17262 echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&5
17263 echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h" >&6
17264
17265 fi
17266 if test $ac_cv_header_gdk_pixbuf_xlib_gdk_pixbuf_xlib_h = yes; then
17267   have_gdk_pixbuf=yes
17268                            gdk_pixbuf_halfassed=no
17269 fi
17270
17271
17272   CPPFLAGS="$ac_save_CPPFLAGS"
17273       fi
17274     fi
17275     CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
17276   fi
17277
17278   if test "$have_gdk_pixbuf" = yes; then
17279     # we have the headers, now check for the libraries
17280     have_gdk_pixbuf=no
17281     gdk_pixbuf_halfassed=yes
17282
17283     echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5
17284 echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6
17285
17286     # library A...
17287
17288   ac_save_CPPFLAGS="$CPPFLAGS"
17289   ac_save_LDFLAGS="$LDFLAGS"
17290 #  ac_save_LIBS="$LIBS"
17291
17292   if test \! -z "$includedir" ; then
17293     CPPFLAGS="$CPPFLAGS -I$includedir"
17294   fi
17295   # note: $X_CFLAGS includes $x_includes
17296   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17297
17298   if test \! -z "$libdir" ; then
17299     LDFLAGS="$LDFLAGS -L$libdir"
17300   fi
17301   # note: $X_LIBS includes $x_libraries
17302   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17303
17304   echo "$as_me:$LINENO: checking for gdk_pixbuf_new_from_file in -lc" >&5
17305 echo $ECHO_N "checking for gdk_pixbuf_new_from_file in -lc... $ECHO_C" >&6
17306 if test "${ac_cv_lib_c_gdk_pixbuf_new_from_file+set}" = set; then
17307   echo $ECHO_N "(cached) $ECHO_C" >&6
17308 else
17309   ac_check_lib_save_LIBS=$LIBS
17310 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17311 cat >conftest.$ac_ext <<_ACEOF
17312 /* confdefs.h.  */
17313 _ACEOF
17314 cat confdefs.h >>conftest.$ac_ext
17315 cat >>conftest.$ac_ext <<_ACEOF
17316 /* end confdefs.h.  */
17317
17318 /* Override any gcc2 internal prototype to avoid an error.  */
17319 #ifdef __cplusplus
17320 extern "C"
17321 #endif
17322 /* We use char because int might match the return type of a gcc2
17323    builtin and then its argument prototype would still apply.  */
17324 char gdk_pixbuf_new_from_file ();
17325 int
17326 main ()
17327 {
17328 gdk_pixbuf_new_from_file ();
17329   ;
17330   return 0;
17331 }
17332 _ACEOF
17333 rm -f conftest.$ac_objext conftest$ac_exeext
17334 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17335   (eval $ac_link) 2>conftest.er1
17336   ac_status=$?
17337   grep -v '^ *+' conftest.er1 >conftest.err
17338   rm -f conftest.er1
17339   cat conftest.err >&5
17340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17341   (exit $ac_status); } &&
17342          { ac_try='test -z "$ac_c_werror_flag"
17343                          || test ! -s conftest.err'
17344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17345   (eval $ac_try) 2>&5
17346   ac_status=$?
17347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17348   (exit $ac_status); }; } &&
17349          { ac_try='test -s conftest$ac_exeext'
17350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17351   (eval $ac_try) 2>&5
17352   ac_status=$?
17353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17354   (exit $ac_status); }; }; then
17355   ac_cv_lib_c_gdk_pixbuf_new_from_file=yes
17356 else
17357   echo "$as_me: failed program was:" >&5
17358 sed 's/^/| /' conftest.$ac_ext >&5
17359
17360 ac_cv_lib_c_gdk_pixbuf_new_from_file=no
17361 fi
17362 rm -f conftest.err conftest.$ac_objext \
17363       conftest$ac_exeext conftest.$ac_ext
17364 LIBS=$ac_check_lib_save_LIBS
17365 fi
17366 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_new_from_file" >&5
17367 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_new_from_file" >&6
17368 if test $ac_cv_lib_c_gdk_pixbuf_new_from_file = yes; then
17369   have_gdk_pixbuf=yes
17370 fi
17371
17372   CPPFLAGS="$ac_save_CPPFLAGS"
17373   LDFLAGS="$ac_save_LDFLAGS"
17374 #  LIBS="$ac_save_LIBS"
17375
17376     # library B...
17377     if test "$have_gdk_pixbuf" = yes; then
17378       have_gdk_pixbuf=no
17379
17380   ac_save_CPPFLAGS="$CPPFLAGS"
17381   ac_save_LDFLAGS="$LDFLAGS"
17382 #  ac_save_LIBS="$LIBS"
17383
17384   if test \! -z "$includedir" ; then
17385     CPPFLAGS="$CPPFLAGS -I$includedir"
17386   fi
17387   # note: $X_CFLAGS includes $x_includes
17388   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17389
17390   if test \! -z "$libdir" ; then
17391     LDFLAGS="$LDFLAGS -L$libdir"
17392   fi
17393   # note: $X_LIBS includes $x_libraries
17394   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17395
17396   echo "$as_me:$LINENO: checking for gdk_pixbuf_xlib_init in -lc" >&5
17397 echo $ECHO_N "checking for gdk_pixbuf_xlib_init in -lc... $ECHO_C" >&6
17398 if test "${ac_cv_lib_c_gdk_pixbuf_xlib_init+set}" = set; then
17399   echo $ECHO_N "(cached) $ECHO_C" >&6
17400 else
17401   ac_check_lib_save_LIBS=$LIBS
17402 LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
17403 cat >conftest.$ac_ext <<_ACEOF
17404 /* confdefs.h.  */
17405 _ACEOF
17406 cat confdefs.h >>conftest.$ac_ext
17407 cat >>conftest.$ac_ext <<_ACEOF
17408 /* end confdefs.h.  */
17409
17410 /* Override any gcc2 internal prototype to avoid an error.  */
17411 #ifdef __cplusplus
17412 extern "C"
17413 #endif
17414 /* We use char because int might match the return type of a gcc2
17415    builtin and then its argument prototype would still apply.  */
17416 char gdk_pixbuf_xlib_init ();
17417 int
17418 main ()
17419 {
17420 gdk_pixbuf_xlib_init ();
17421   ;
17422   return 0;
17423 }
17424 _ACEOF
17425 rm -f conftest.$ac_objext conftest$ac_exeext
17426 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17427   (eval $ac_link) 2>conftest.er1
17428   ac_status=$?
17429   grep -v '^ *+' conftest.er1 >conftest.err
17430   rm -f conftest.er1
17431   cat conftest.err >&5
17432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17433   (exit $ac_status); } &&
17434          { ac_try='test -z "$ac_c_werror_flag"
17435                          || test ! -s conftest.err'
17436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17437   (eval $ac_try) 2>&5
17438   ac_status=$?
17439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17440   (exit $ac_status); }; } &&
17441          { ac_try='test -s conftest$ac_exeext'
17442   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17443   (eval $ac_try) 2>&5
17444   ac_status=$?
17445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17446   (exit $ac_status); }; }; then
17447   ac_cv_lib_c_gdk_pixbuf_xlib_init=yes
17448 else
17449   echo "$as_me: failed program was:" >&5
17450 sed 's/^/| /' conftest.$ac_ext >&5
17451
17452 ac_cv_lib_c_gdk_pixbuf_xlib_init=no
17453 fi
17454 rm -f conftest.err conftest.$ac_objext \
17455       conftest$ac_exeext conftest.$ac_ext
17456 LIBS=$ac_check_lib_save_LIBS
17457 fi
17458 echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_xlib_init" >&5
17459 echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_xlib_init" >&6
17460 if test $ac_cv_lib_c_gdk_pixbuf_xlib_init = yes; then
17461   have_gdk_pixbuf=yes
17462                       gdk_pixbuf_halfassed=no
17463 fi
17464
17465   CPPFLAGS="$ac_save_CPPFLAGS"
17466   LDFLAGS="$ac_save_LDFLAGS"
17467 #  LIBS="$ac_save_LIBS"
17468
17469     fi
17470   fi
17471
17472   if test "$have_gdk_pixbuf" = yes; then
17473     INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
17474     XPM_LIBS="$ac_gdk_pixbuf_config_libs"
17475     cat >>confdefs.h <<\_ACEOF
17476 #define HAVE_GDK_PIXBUF 1
17477 _ACEOF
17478
17479   else
17480     echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
17481 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6
17482   fi
17483 fi
17484
17485
17486 ###############################################################################
17487 #
17488 #       Check for -lXpm.
17489 #
17490 ###############################################################################
17491
17492 have_xpm=no
17493 with_xpm_req=unspecified
17494
17495 # Check whether --with-xpm or --without-xpm was given.
17496 if test "${with_xpm+set}" = set; then
17497   withval="$with_xpm"
17498   with_xpm="$withval"; with_xpm_req="$withval"
17499 else
17500   with_xpm=yes
17501 fi;
17502
17503
17504    case "$with_xpm" in
17505     yes) ;;
17506     no)  ;;
17507
17508     /*)
17509      echo "$as_me:$LINENO: checking for XPM headers" >&5
17510 echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6
17511      d=$with_xpm/include
17512      if test -d $d; then
17513        X_CFLAGS="-I$d $X_CFLAGS"
17514        echo "$as_me:$LINENO: result: $d" >&5
17515 echo "${ECHO_T}$d" >&6
17516      else
17517        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17518 echo "${ECHO_T}not found ($d: no such directory)" >&6
17519      fi
17520
17521      echo "$as_me:$LINENO: checking for XPM libs" >&5
17522 echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6
17523      d=$with_xpm/lib
17524      if test -d $d; then
17525        X_LIBS="-L$d $X_LIBS"
17526        echo "$as_me:$LINENO: result: $d" >&5
17527 echo "${ECHO_T}$d" >&6
17528      else
17529        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17530 echo "${ECHO_T}not found ($d: no such directory)" >&6
17531      fi
17532
17533      # replace the directory string with "yes".
17534      with_xpm_req="yes"
17535      with_xpm=$with_xpm_req
17536      ;;
17537
17538     *)
17539      echo ""
17540      echo "error: argument to --with-xpm must be \"yes\", \"no\", or a directory."
17541      echo "       If it is a directory, then \`DIR/include' will be added to"
17542      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17543      exit 1
17544      ;;
17545    esac
17546
17547
17548 if test "$with_xpm" = yes; then
17549
17550   ac_save_CPPFLAGS="$CPPFLAGS"
17551   if test \! -z "$includedir" ; then
17552     CPPFLAGS="$CPPFLAGS -I$includedir"
17553   fi
17554   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17555   echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
17556 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
17557 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
17558   echo $ECHO_N "(cached) $ECHO_C" >&6
17559 else
17560   cat >conftest.$ac_ext <<_ACEOF
17561 /* confdefs.h.  */
17562 _ACEOF
17563 cat confdefs.h >>conftest.$ac_ext
17564 cat >>conftest.$ac_ext <<_ACEOF
17565 /* end confdefs.h.  */
17566 #include <X11/Xlib.h>
17567
17568 #include <X11/xpm.h>
17569 _ACEOF
17570 rm -f conftest.$ac_objext
17571 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17572   (eval $ac_compile) 2>conftest.er1
17573   ac_status=$?
17574   grep -v '^ *+' conftest.er1 >conftest.err
17575   rm -f conftest.er1
17576   cat conftest.err >&5
17577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17578   (exit $ac_status); } &&
17579          { ac_try='test -z "$ac_c_werror_flag"
17580                          || test ! -s conftest.err'
17581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17582   (eval $ac_try) 2>&5
17583   ac_status=$?
17584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17585   (exit $ac_status); }; } &&
17586          { ac_try='test -s conftest.$ac_objext'
17587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17588   (eval $ac_try) 2>&5
17589   ac_status=$?
17590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17591   (exit $ac_status); }; }; then
17592   ac_cv_header_X11_xpm_h=yes
17593 else
17594   echo "$as_me: failed program was:" >&5
17595 sed 's/^/| /' conftest.$ac_ext >&5
17596
17597 ac_cv_header_X11_xpm_h=no
17598 fi
17599 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17600 fi
17601 echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
17602 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
17603 if test $ac_cv_header_X11_xpm_h = yes; then
17604   have_xpm=yes
17605                     cat >>confdefs.h <<\_ACEOF
17606 #define HAVE_XPM 1
17607 _ACEOF
17608
17609                     XPM_LIBS="-lXpm $XPM_LIBS"
17610 fi
17611
17612
17613   CPPFLAGS="$ac_save_CPPFLAGS"
17614 elif test "$with_xpm" != no; then
17615   echo "error: must be yes or no: --with-xpm=$with_xpm"
17616   exit 1
17617 fi
17618
17619 # See comment near $motif_requires_xpm, above.
17620 # Need to do this here, after both Motif and XPM have been checked for.
17621 #
17622 if test "$have_motif" = yes -a "$have_xpm" = yes ; then
17623   if test "$motif_requires_xpm" = yes ; then
17624     MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS"
17625   fi
17626 fi
17627
17628
17629 ###############################################################################
17630 #
17631 #       Check for -ljpeg
17632 #
17633 ###############################################################################
17634
17635 have_jpeg=no
17636 with_jpeg_req=unspecified
17637 jpeg_halfassed=no
17638
17639 # Check whether --with-jpeg or --without-jpeg was given.
17640 if test "${with_jpeg+set}" = set; then
17641   withval="$with_jpeg"
17642   with_jpeg="$withval"; with_jpeg_req="$withval"
17643 else
17644   with_jpeg=yes
17645 fi;
17646
17647
17648    case "$with_jpeg" in
17649     yes) ;;
17650     no)  ;;
17651
17652     /*)
17653      echo "$as_me:$LINENO: checking for JPEG headers" >&5
17654 echo $ECHO_N "checking for JPEG headers... $ECHO_C" >&6
17655      d=$with_jpeg/include
17656      if test -d $d; then
17657        X_CFLAGS="-I$d $X_CFLAGS"
17658        echo "$as_me:$LINENO: result: $d" >&5
17659 echo "${ECHO_T}$d" >&6
17660      else
17661        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17662 echo "${ECHO_T}not found ($d: no such directory)" >&6
17663      fi
17664
17665      echo "$as_me:$LINENO: checking for JPEG libs" >&5
17666 echo $ECHO_N "checking for JPEG libs... $ECHO_C" >&6
17667      d=$with_jpeg/lib
17668      if test -d $d; then
17669        X_LIBS="-L$d $X_LIBS"
17670        echo "$as_me:$LINENO: result: $d" >&5
17671 echo "${ECHO_T}$d" >&6
17672      else
17673        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
17674 echo "${ECHO_T}not found ($d: no such directory)" >&6
17675      fi
17676
17677      # replace the directory string with "yes".
17678      with_jpeg_req="yes"
17679      with_jpeg=$with_jpeg_req
17680      ;;
17681
17682     *)
17683      echo ""
17684      echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
17685      echo "       If it is a directory, then \`DIR/include' will be added to"
17686      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
17687      exit 1
17688      ;;
17689    esac
17690
17691
17692 if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
17693   echo "error: must be yes or no: --with-jpeg=$with_jpeg"
17694   exit 1
17695 fi
17696
17697 if test "$with_jpeg" = yes; then
17698
17699   have_jpeg=no
17700
17701   ac_save_CPPFLAGS="$CPPFLAGS"
17702   if test \! -z "$includedir" ; then
17703     CPPFLAGS="$CPPFLAGS -I$includedir"
17704   fi
17705   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17706   if test "${ac_cv_header_jpeglib_h+set}" = set; then
17707   echo "$as_me:$LINENO: checking for jpeglib.h" >&5
17708 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
17709 if test "${ac_cv_header_jpeglib_h+set}" = set; then
17710   echo $ECHO_N "(cached) $ECHO_C" >&6
17711 fi
17712 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
17713 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
17714 else
17715   # Is the header compilable?
17716 echo "$as_me:$LINENO: checking jpeglib.h usability" >&5
17717 echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6
17718 cat >conftest.$ac_ext <<_ACEOF
17719 /* confdefs.h.  */
17720 _ACEOF
17721 cat confdefs.h >>conftest.$ac_ext
17722 cat >>conftest.$ac_ext <<_ACEOF
17723 /* end confdefs.h.  */
17724 $ac_includes_default
17725 #include <jpeglib.h>
17726 _ACEOF
17727 rm -f conftest.$ac_objext
17728 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17729   (eval $ac_compile) 2>conftest.er1
17730   ac_status=$?
17731   grep -v '^ *+' conftest.er1 >conftest.err
17732   rm -f conftest.er1
17733   cat conftest.err >&5
17734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17735   (exit $ac_status); } &&
17736          { ac_try='test -z "$ac_c_werror_flag"
17737                          || test ! -s conftest.err'
17738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17739   (eval $ac_try) 2>&5
17740   ac_status=$?
17741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17742   (exit $ac_status); }; } &&
17743          { ac_try='test -s conftest.$ac_objext'
17744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17745   (eval $ac_try) 2>&5
17746   ac_status=$?
17747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17748   (exit $ac_status); }; }; then
17749   ac_header_compiler=yes
17750 else
17751   echo "$as_me: failed program was:" >&5
17752 sed 's/^/| /' conftest.$ac_ext >&5
17753
17754 ac_header_compiler=no
17755 fi
17756 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17757 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17758 echo "${ECHO_T}$ac_header_compiler" >&6
17759
17760 # Is the header present?
17761 echo "$as_me:$LINENO: checking jpeglib.h presence" >&5
17762 echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6
17763 cat >conftest.$ac_ext <<_ACEOF
17764 /* confdefs.h.  */
17765 _ACEOF
17766 cat confdefs.h >>conftest.$ac_ext
17767 cat >>conftest.$ac_ext <<_ACEOF
17768 /* end confdefs.h.  */
17769 #include <jpeglib.h>
17770 _ACEOF
17771 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17772   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17773   ac_status=$?
17774   grep -v '^ *+' conftest.er1 >conftest.err
17775   rm -f conftest.er1
17776   cat conftest.err >&5
17777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17778   (exit $ac_status); } >/dev/null; then
17779   if test -s conftest.err; then
17780     ac_cpp_err=$ac_c_preproc_warn_flag
17781     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17782   else
17783     ac_cpp_err=
17784   fi
17785 else
17786   ac_cpp_err=yes
17787 fi
17788 if test -z "$ac_cpp_err"; then
17789   ac_header_preproc=yes
17790 else
17791   echo "$as_me: failed program was:" >&5
17792 sed 's/^/| /' conftest.$ac_ext >&5
17793
17794   ac_header_preproc=no
17795 fi
17796 rm -f conftest.err conftest.$ac_ext
17797 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17798 echo "${ECHO_T}$ac_header_preproc" >&6
17799
17800 # So?  What about this header?
17801 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17802   yes:no: )
17803     { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5
17804 echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17805     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5
17806 echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;}
17807     ac_header_preproc=yes
17808     ;;
17809   no:yes:* )
17810     { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5
17811 echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;}
17812     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&5
17813 echo "$as_me: WARNING: jpeglib.h:     check for missing prerequisite headers?" >&2;}
17814     { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5
17815 echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;}
17816     { echo "$as_me:$LINENO: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&5
17817 echo "$as_me: WARNING: jpeglib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17818     { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5
17819 echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;}
17820     { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5
17821 echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;}
17822     (
17823       cat <<\_ASBOX
17824 ## ------------------------------------------ ##
17825 ## Report this to the AC_PACKAGE_NAME lists.  ##
17826 ## ------------------------------------------ ##
17827 _ASBOX
17828     ) |
17829       sed "s/^/$as_me: WARNING:     /" >&2
17830     ;;
17831 esac
17832 echo "$as_me:$LINENO: checking for jpeglib.h" >&5
17833 echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6
17834 if test "${ac_cv_header_jpeglib_h+set}" = set; then
17835   echo $ECHO_N "(cached) $ECHO_C" >&6
17836 else
17837   ac_cv_header_jpeglib_h=$ac_header_preproc
17838 fi
17839 echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5
17840 echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6
17841
17842 fi
17843 if test $ac_cv_header_jpeglib_h = yes; then
17844   have_jpeg=yes
17845 fi
17846
17847
17848   CPPFLAGS="$ac_save_CPPFLAGS"
17849
17850   if test "$have_jpeg" = yes; then
17851     # we have the header, now check for the library
17852     have_jpeg=no
17853     jpeg_halfassed=yes
17854
17855   ac_save_CPPFLAGS="$CPPFLAGS"
17856   ac_save_LDFLAGS="$LDFLAGS"
17857 #  ac_save_LIBS="$LIBS"
17858
17859   if test \! -z "$includedir" ; then
17860     CPPFLAGS="$CPPFLAGS -I$includedir"
17861   fi
17862   # note: $X_CFLAGS includes $x_includes
17863   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
17864
17865   if test \! -z "$libdir" ; then
17866     LDFLAGS="$LDFLAGS -L$libdir"
17867   fi
17868   # note: $X_LIBS includes $x_libraries
17869   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
17870
17871   echo "$as_me:$LINENO: checking for jpeg_start_compress in -ljpeg" >&5
17872 echo $ECHO_N "checking for jpeg_start_compress in -ljpeg... $ECHO_C" >&6
17873 if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then
17874   echo $ECHO_N "(cached) $ECHO_C" >&6
17875 else
17876   ac_check_lib_save_LIBS=$LIBS
17877 LIBS="-ljpeg  $LIBS"
17878 cat >conftest.$ac_ext <<_ACEOF
17879 /* confdefs.h.  */
17880 _ACEOF
17881 cat confdefs.h >>conftest.$ac_ext
17882 cat >>conftest.$ac_ext <<_ACEOF
17883 /* end confdefs.h.  */
17884
17885 /* Override any gcc2 internal prototype to avoid an error.  */
17886 #ifdef __cplusplus
17887 extern "C"
17888 #endif
17889 /* We use char because int might match the return type of a gcc2
17890    builtin and then its argument prototype would still apply.  */
17891 char jpeg_start_compress ();
17892 int
17893 main ()
17894 {
17895 jpeg_start_compress ();
17896   ;
17897   return 0;
17898 }
17899 _ACEOF
17900 rm -f conftest.$ac_objext conftest$ac_exeext
17901 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17902   (eval $ac_link) 2>conftest.er1
17903   ac_status=$?
17904   grep -v '^ *+' conftest.er1 >conftest.err
17905   rm -f conftest.er1
17906   cat conftest.err >&5
17907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17908   (exit $ac_status); } &&
17909          { ac_try='test -z "$ac_c_werror_flag"
17910                          || test ! -s conftest.err'
17911   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17912   (eval $ac_try) 2>&5
17913   ac_status=$?
17914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17915   (exit $ac_status); }; } &&
17916          { ac_try='test -s conftest$ac_exeext'
17917   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17918   (eval $ac_try) 2>&5
17919   ac_status=$?
17920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17921   (exit $ac_status); }; }; then
17922   ac_cv_lib_jpeg_jpeg_start_compress=yes
17923 else
17924   echo "$as_me: failed program was:" >&5
17925 sed 's/^/| /' conftest.$ac_ext >&5
17926
17927 ac_cv_lib_jpeg_jpeg_start_compress=no
17928 fi
17929 rm -f conftest.err conftest.$ac_objext \
17930       conftest$ac_exeext conftest.$ac_ext
17931 LIBS=$ac_check_lib_save_LIBS
17932 fi
17933 echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
17934 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_compress" >&6
17935 if test $ac_cv_lib_jpeg_jpeg_start_compress = yes; then
17936   have_jpeg=yes
17937                     jpeg_halfassed=no
17938                     JPEG_LIBS="-ljpeg"
17939                     cat >>confdefs.h <<\_ACEOF
17940 #define HAVE_JPEGLIB 1
17941 _ACEOF
17942
17943 fi
17944
17945   CPPFLAGS="$ac_save_CPPFLAGS"
17946   LDFLAGS="$ac_save_LDFLAGS"
17947 #  LIBS="$ac_save_LIBS"
17948
17949   fi
17950 fi
17951
17952
17953 ###############################################################################
17954 #
17955 #       Check for pty support for 'phosphor'
17956 #
17957 ###############################################################################
17958
17959 PTY_LIBS=
17960
17961
17962 for ac_header in pty.h util.h
17963 do
17964 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17965 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17966   echo "$as_me:$LINENO: checking for $ac_header" >&5
17967 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17968 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17969   echo $ECHO_N "(cached) $ECHO_C" >&6
17970 fi
17971 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17972 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17973 else
17974   # Is the header compilable?
17975 echo "$as_me:$LINENO: checking $ac_header usability" >&5
17976 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17977 cat >conftest.$ac_ext <<_ACEOF
17978 /* confdefs.h.  */
17979 _ACEOF
17980 cat confdefs.h >>conftest.$ac_ext
17981 cat >>conftest.$ac_ext <<_ACEOF
17982 /* end confdefs.h.  */
17983 $ac_includes_default
17984 #include <$ac_header>
17985 _ACEOF
17986 rm -f conftest.$ac_objext
17987 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17988   (eval $ac_compile) 2>conftest.er1
17989   ac_status=$?
17990   grep -v '^ *+' conftest.er1 >conftest.err
17991   rm -f conftest.er1
17992   cat conftest.err >&5
17993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17994   (exit $ac_status); } &&
17995          { ac_try='test -z "$ac_c_werror_flag"
17996                          || test ! -s conftest.err'
17997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17998   (eval $ac_try) 2>&5
17999   ac_status=$?
18000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18001   (exit $ac_status); }; } &&
18002          { ac_try='test -s conftest.$ac_objext'
18003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18004   (eval $ac_try) 2>&5
18005   ac_status=$?
18006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18007   (exit $ac_status); }; }; then
18008   ac_header_compiler=yes
18009 else
18010   echo "$as_me: failed program was:" >&5
18011 sed 's/^/| /' conftest.$ac_ext >&5
18012
18013 ac_header_compiler=no
18014 fi
18015 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18016 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18017 echo "${ECHO_T}$ac_header_compiler" >&6
18018
18019 # Is the header present?
18020 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18021 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18022 cat >conftest.$ac_ext <<_ACEOF
18023 /* confdefs.h.  */
18024 _ACEOF
18025 cat confdefs.h >>conftest.$ac_ext
18026 cat >>conftest.$ac_ext <<_ACEOF
18027 /* end confdefs.h.  */
18028 #include <$ac_header>
18029 _ACEOF
18030 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18031   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18032   ac_status=$?
18033   grep -v '^ *+' conftest.er1 >conftest.err
18034   rm -f conftest.er1
18035   cat conftest.err >&5
18036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18037   (exit $ac_status); } >/dev/null; then
18038   if test -s conftest.err; then
18039     ac_cpp_err=$ac_c_preproc_warn_flag
18040     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18041   else
18042     ac_cpp_err=
18043   fi
18044 else
18045   ac_cpp_err=yes
18046 fi
18047 if test -z "$ac_cpp_err"; then
18048   ac_header_preproc=yes
18049 else
18050   echo "$as_me: failed program was:" >&5
18051 sed 's/^/| /' conftest.$ac_ext >&5
18052
18053   ac_header_preproc=no
18054 fi
18055 rm -f conftest.err conftest.$ac_ext
18056 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18057 echo "${ECHO_T}$ac_header_preproc" >&6
18058
18059 # So?  What about this header?
18060 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18061   yes:no: )
18062     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18063 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18064     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18065 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18066     ac_header_preproc=yes
18067     ;;
18068   no:yes:* )
18069     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18070 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18071     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18072 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18073     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18074 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18075     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18076 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18077     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18078 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18079     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18080 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18081     (
18082       cat <<\_ASBOX
18083 ## ------------------------------------------ ##
18084 ## Report this to the AC_PACKAGE_NAME lists.  ##
18085 ## ------------------------------------------ ##
18086 _ASBOX
18087     ) |
18088       sed "s/^/$as_me: WARNING:     /" >&2
18089     ;;
18090 esac
18091 echo "$as_me:$LINENO: checking for $ac_header" >&5
18092 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18093 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18094   echo $ECHO_N "(cached) $ECHO_C" >&6
18095 else
18096   eval "$as_ac_Header=\$ac_header_preproc"
18097 fi
18098 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18099 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18100
18101 fi
18102 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18103   cat >>confdefs.h <<_ACEOF
18104 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18105 _ACEOF
18106
18107 fi
18108
18109 done
18110
18111
18112   ac_save_CPPFLAGS="$CPPFLAGS"
18113   ac_save_LDFLAGS="$LDFLAGS"
18114 #  ac_save_LIBS="$LIBS"
18115
18116   if test \! -z "$includedir" ; then
18117     CPPFLAGS="$CPPFLAGS -I$includedir"
18118   fi
18119   # note: $X_CFLAGS includes $x_includes
18120   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18121
18122   if test \! -z "$libdir" ; then
18123     LDFLAGS="$LDFLAGS -L$libdir"
18124   fi
18125   # note: $X_LIBS includes $x_libraries
18126   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18127
18128   echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18129 echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
18130 if test "${ac_cv_lib_util_forkpty+set}" = set; then
18131   echo $ECHO_N "(cached) $ECHO_C" >&6
18132 else
18133   ac_check_lib_save_LIBS=$LIBS
18134 LIBS="-lutil  $LIBS"
18135 cat >conftest.$ac_ext <<_ACEOF
18136 /* confdefs.h.  */
18137 _ACEOF
18138 cat confdefs.h >>conftest.$ac_ext
18139 cat >>conftest.$ac_ext <<_ACEOF
18140 /* end confdefs.h.  */
18141
18142 /* Override any gcc2 internal prototype to avoid an error.  */
18143 #ifdef __cplusplus
18144 extern "C"
18145 #endif
18146 /* We use char because int might match the return type of a gcc2
18147    builtin and then its argument prototype would still apply.  */
18148 char forkpty ();
18149 int
18150 main ()
18151 {
18152 forkpty ();
18153   ;
18154   return 0;
18155 }
18156 _ACEOF
18157 rm -f conftest.$ac_objext conftest$ac_exeext
18158 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18159   (eval $ac_link) 2>conftest.er1
18160   ac_status=$?
18161   grep -v '^ *+' conftest.er1 >conftest.err
18162   rm -f conftest.er1
18163   cat conftest.err >&5
18164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18165   (exit $ac_status); } &&
18166          { ac_try='test -z "$ac_c_werror_flag"
18167                          || test ! -s conftest.err'
18168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18169   (eval $ac_try) 2>&5
18170   ac_status=$?
18171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18172   (exit $ac_status); }; } &&
18173          { ac_try='test -s conftest$ac_exeext'
18174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18175   (eval $ac_try) 2>&5
18176   ac_status=$?
18177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18178   (exit $ac_status); }; }; then
18179   ac_cv_lib_util_forkpty=yes
18180 else
18181   echo "$as_me: failed program was:" >&5
18182 sed 's/^/| /' conftest.$ac_ext >&5
18183
18184 ac_cv_lib_util_forkpty=no
18185 fi
18186 rm -f conftest.err conftest.$ac_objext \
18187       conftest$ac_exeext conftest.$ac_ext
18188 LIBS=$ac_check_lib_save_LIBS
18189 fi
18190 echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18191 echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
18192 if test $ac_cv_lib_util_forkpty = yes; then
18193   PTY_LIBS="-lutil"
18194                 cat >>confdefs.h <<\_ACEOF
18195 #define HAVE_FORKPTY 1
18196 _ACEOF
18197
18198 fi
18199
18200   CPPFLAGS="$ac_save_CPPFLAGS"
18201   LDFLAGS="$ac_save_LDFLAGS"
18202 #  LIBS="$ac_save_LIBS"
18203
18204
18205
18206 ###############################################################################
18207 #
18208 #       Check for the XSHM server extension.
18209 #
18210 ###############################################################################
18211
18212 have_xshm=no
18213 with_xshm_req=unspecified
18214
18215 # Check whether --with-xshm-ext or --without-xshm-ext was given.
18216 if test "${with_xshm_ext+set}" = set; then
18217   withval="$with_xshm_ext"
18218   with_xshm="$withval"; with_xshm_req="$withval"
18219 else
18220   with_xshm=yes
18221 fi;
18222
18223
18224    case "$with_xshm" in
18225     yes) ;;
18226     no)  ;;
18227
18228     /*)
18229      echo "$as_me:$LINENO: checking for XSHM headers" >&5
18230 echo $ECHO_N "checking for XSHM headers... $ECHO_C" >&6
18231      d=$with_xshm/include
18232      if test -d $d; then
18233        X_CFLAGS="-I$d $X_CFLAGS"
18234        echo "$as_me:$LINENO: result: $d" >&5
18235 echo "${ECHO_T}$d" >&6
18236      else
18237        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18238 echo "${ECHO_T}not found ($d: no such directory)" >&6
18239      fi
18240
18241      echo "$as_me:$LINENO: checking for XSHM libs" >&5
18242 echo $ECHO_N "checking for XSHM libs... $ECHO_C" >&6
18243      d=$with_xshm/lib
18244      if test -d $d; then
18245        X_LIBS="-L$d $X_LIBS"
18246        echo "$as_me:$LINENO: result: $d" >&5
18247 echo "${ECHO_T}$d" >&6
18248      else
18249        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18250 echo "${ECHO_T}not found ($d: no such directory)" >&6
18251      fi
18252
18253      # replace the directory string with "yes".
18254      with_xshm_req="yes"
18255      with_xshm=$with_xshm_req
18256      ;;
18257
18258     *)
18259      echo ""
18260      echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
18261      echo "       If it is a directory, then \`DIR/include' will be added to"
18262      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18263      exit 1
18264      ;;
18265    esac
18266
18267
18268 if test "$with_xshm" = yes; then
18269
18270   # first check for Xshm.h.
18271
18272   ac_save_CPPFLAGS="$CPPFLAGS"
18273   if test \! -z "$includedir" ; then
18274     CPPFLAGS="$CPPFLAGS -I$includedir"
18275   fi
18276   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18277   echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
18278 echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
18279 if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
18280   echo $ECHO_N "(cached) $ECHO_C" >&6
18281 else
18282   cat >conftest.$ac_ext <<_ACEOF
18283 /* confdefs.h.  */
18284 _ACEOF
18285 cat confdefs.h >>conftest.$ac_ext
18286 cat >>conftest.$ac_ext <<_ACEOF
18287 /* end confdefs.h.  */
18288 #include <X11/Xlib.h>
18289
18290 #include <X11/extensions/XShm.h>
18291 _ACEOF
18292 rm -f conftest.$ac_objext
18293 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18294   (eval $ac_compile) 2>conftest.er1
18295   ac_status=$?
18296   grep -v '^ *+' conftest.er1 >conftest.err
18297   rm -f conftest.er1
18298   cat conftest.err >&5
18299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18300   (exit $ac_status); } &&
18301          { ac_try='test -z "$ac_c_werror_flag"
18302                          || test ! -s conftest.err'
18303   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18304   (eval $ac_try) 2>&5
18305   ac_status=$?
18306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18307   (exit $ac_status); }; } &&
18308          { ac_try='test -s conftest.$ac_objext'
18309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18310   (eval $ac_try) 2>&5
18311   ac_status=$?
18312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18313   (exit $ac_status); }; }; then
18314   ac_cv_header_X11_extensions_XShm_h=yes
18315 else
18316   echo "$as_me: failed program was:" >&5
18317 sed 's/^/| /' conftest.$ac_ext >&5
18318
18319 ac_cv_header_X11_extensions_XShm_h=no
18320 fi
18321 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18322 fi
18323 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
18324 echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
18325 if test $ac_cv_header_X11_extensions_XShm_h = yes; then
18326   have_xshm=yes
18327 fi
18328
18329
18330   CPPFLAGS="$ac_save_CPPFLAGS"
18331
18332   # if that succeeded, then check for sys/ipc.h.
18333   if test "$have_xshm" = yes; then
18334     have_xshm=no
18335
18336   ac_save_CPPFLAGS="$CPPFLAGS"
18337   if test \! -z "$includedir" ; then
18338     CPPFLAGS="$CPPFLAGS -I$includedir"
18339   fi
18340   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18341   if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18342   echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
18343 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
18344 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18345   echo $ECHO_N "(cached) $ECHO_C" >&6
18346 fi
18347 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
18348 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
18349 else
18350   # Is the header compilable?
18351 echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
18352 echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6
18353 cat >conftest.$ac_ext <<_ACEOF
18354 /* confdefs.h.  */
18355 _ACEOF
18356 cat confdefs.h >>conftest.$ac_ext
18357 cat >>conftest.$ac_ext <<_ACEOF
18358 /* end confdefs.h.  */
18359 $ac_includes_default
18360 #include <sys/ipc.h>
18361 _ACEOF
18362 rm -f conftest.$ac_objext
18363 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18364   (eval $ac_compile) 2>conftest.er1
18365   ac_status=$?
18366   grep -v '^ *+' conftest.er1 >conftest.err
18367   rm -f conftest.er1
18368   cat conftest.err >&5
18369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18370   (exit $ac_status); } &&
18371          { ac_try='test -z "$ac_c_werror_flag"
18372                          || test ! -s conftest.err'
18373   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18374   (eval $ac_try) 2>&5
18375   ac_status=$?
18376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18377   (exit $ac_status); }; } &&
18378          { ac_try='test -s conftest.$ac_objext'
18379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18380   (eval $ac_try) 2>&5
18381   ac_status=$?
18382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18383   (exit $ac_status); }; }; then
18384   ac_header_compiler=yes
18385 else
18386   echo "$as_me: failed program was:" >&5
18387 sed 's/^/| /' conftest.$ac_ext >&5
18388
18389 ac_header_compiler=no
18390 fi
18391 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18392 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18393 echo "${ECHO_T}$ac_header_compiler" >&6
18394
18395 # Is the header present?
18396 echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
18397 echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6
18398 cat >conftest.$ac_ext <<_ACEOF
18399 /* confdefs.h.  */
18400 _ACEOF
18401 cat confdefs.h >>conftest.$ac_ext
18402 cat >>conftest.$ac_ext <<_ACEOF
18403 /* end confdefs.h.  */
18404 #include <sys/ipc.h>
18405 _ACEOF
18406 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18407   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18408   ac_status=$?
18409   grep -v '^ *+' conftest.er1 >conftest.err
18410   rm -f conftest.er1
18411   cat conftest.err >&5
18412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18413   (exit $ac_status); } >/dev/null; then
18414   if test -s conftest.err; then
18415     ac_cpp_err=$ac_c_preproc_warn_flag
18416     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18417   else
18418     ac_cpp_err=
18419   fi
18420 else
18421   ac_cpp_err=yes
18422 fi
18423 if test -z "$ac_cpp_err"; then
18424   ac_header_preproc=yes
18425 else
18426   echo "$as_me: failed program was:" >&5
18427 sed 's/^/| /' conftest.$ac_ext >&5
18428
18429   ac_header_preproc=no
18430 fi
18431 rm -f conftest.err conftest.$ac_ext
18432 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18433 echo "${ECHO_T}$ac_header_preproc" >&6
18434
18435 # So?  What about this header?
18436 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18437   yes:no: )
18438     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
18439 echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18440     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
18441 echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
18442     ac_header_preproc=yes
18443     ;;
18444   no:yes:* )
18445     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
18446 echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
18447     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&5
18448 echo "$as_me: WARNING: sys/ipc.h:     check for missing prerequisite headers?" >&2;}
18449     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
18450 echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
18451     { echo "$as_me:$LINENO: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&5
18452 echo "$as_me: WARNING: sys/ipc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18453     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
18454 echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
18455     { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
18456 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
18457     (
18458       cat <<\_ASBOX
18459 ## ------------------------------------------ ##
18460 ## Report this to the AC_PACKAGE_NAME lists.  ##
18461 ## ------------------------------------------ ##
18462 _ASBOX
18463     ) |
18464       sed "s/^/$as_me: WARNING:     /" >&2
18465     ;;
18466 esac
18467 echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
18468 echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6
18469 if test "${ac_cv_header_sys_ipc_h+set}" = set; then
18470   echo $ECHO_N "(cached) $ECHO_C" >&6
18471 else
18472   ac_cv_header_sys_ipc_h=$ac_header_preproc
18473 fi
18474 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
18475 echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6
18476
18477 fi
18478 if test $ac_cv_header_sys_ipc_h = yes; then
18479   have_xshm=yes
18480 fi
18481
18482
18483   CPPFLAGS="$ac_save_CPPFLAGS"
18484   fi
18485
18486   # if that succeeded, then check for sys/shm.h.
18487   if test "$have_xshm" = yes; then
18488     have_xshm=no
18489
18490   ac_save_CPPFLAGS="$CPPFLAGS"
18491   if test \! -z "$includedir" ; then
18492     CPPFLAGS="$CPPFLAGS -I$includedir"
18493   fi
18494   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18495   if test "${ac_cv_header_sys_shm_h+set}" = set; then
18496   echo "$as_me:$LINENO: checking for sys/shm.h" >&5
18497 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
18498 if test "${ac_cv_header_sys_shm_h+set}" = set; then
18499   echo $ECHO_N "(cached) $ECHO_C" >&6
18500 fi
18501 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
18502 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
18503 else
18504   # Is the header compilable?
18505 echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
18506 echo $ECHO_N "checking sys/shm.h usability... $ECHO_C" >&6
18507 cat >conftest.$ac_ext <<_ACEOF
18508 /* confdefs.h.  */
18509 _ACEOF
18510 cat confdefs.h >>conftest.$ac_ext
18511 cat >>conftest.$ac_ext <<_ACEOF
18512 /* end confdefs.h.  */
18513 $ac_includes_default
18514 #include <sys/shm.h>
18515 _ACEOF
18516 rm -f conftest.$ac_objext
18517 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18518   (eval $ac_compile) 2>conftest.er1
18519   ac_status=$?
18520   grep -v '^ *+' conftest.er1 >conftest.err
18521   rm -f conftest.er1
18522   cat conftest.err >&5
18523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18524   (exit $ac_status); } &&
18525          { ac_try='test -z "$ac_c_werror_flag"
18526                          || test ! -s conftest.err'
18527   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18528   (eval $ac_try) 2>&5
18529   ac_status=$?
18530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18531   (exit $ac_status); }; } &&
18532          { ac_try='test -s conftest.$ac_objext'
18533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18534   (eval $ac_try) 2>&5
18535   ac_status=$?
18536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18537   (exit $ac_status); }; }; then
18538   ac_header_compiler=yes
18539 else
18540   echo "$as_me: failed program was:" >&5
18541 sed 's/^/| /' conftest.$ac_ext >&5
18542
18543 ac_header_compiler=no
18544 fi
18545 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18546 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18547 echo "${ECHO_T}$ac_header_compiler" >&6
18548
18549 # Is the header present?
18550 echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
18551 echo $ECHO_N "checking sys/shm.h presence... $ECHO_C" >&6
18552 cat >conftest.$ac_ext <<_ACEOF
18553 /* confdefs.h.  */
18554 _ACEOF
18555 cat confdefs.h >>conftest.$ac_ext
18556 cat >>conftest.$ac_ext <<_ACEOF
18557 /* end confdefs.h.  */
18558 #include <sys/shm.h>
18559 _ACEOF
18560 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18561   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18562   ac_status=$?
18563   grep -v '^ *+' conftest.er1 >conftest.err
18564   rm -f conftest.er1
18565   cat conftest.err >&5
18566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18567   (exit $ac_status); } >/dev/null; then
18568   if test -s conftest.err; then
18569     ac_cpp_err=$ac_c_preproc_warn_flag
18570     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18571   else
18572     ac_cpp_err=
18573   fi
18574 else
18575   ac_cpp_err=yes
18576 fi
18577 if test -z "$ac_cpp_err"; then
18578   ac_header_preproc=yes
18579 else
18580   echo "$as_me: failed program was:" >&5
18581 sed 's/^/| /' conftest.$ac_ext >&5
18582
18583   ac_header_preproc=no
18584 fi
18585 rm -f conftest.err conftest.$ac_ext
18586 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18587 echo "${ECHO_T}$ac_header_preproc" >&6
18588
18589 # So?  What about this header?
18590 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18591   yes:no: )
18592     { echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
18593 echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18594     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
18595 echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
18596     ac_header_preproc=yes
18597     ;;
18598   no:yes:* )
18599     { echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
18600 echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
18601     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&5
18602 echo "$as_me: WARNING: sys/shm.h:     check for missing prerequisite headers?" >&2;}
18603     { echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
18604 echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
18605     { echo "$as_me:$LINENO: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&5
18606 echo "$as_me: WARNING: sys/shm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18607     { echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
18608 echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
18609     { echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
18610 echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
18611     (
18612       cat <<\_ASBOX
18613 ## ------------------------------------------ ##
18614 ## Report this to the AC_PACKAGE_NAME lists.  ##
18615 ## ------------------------------------------ ##
18616 _ASBOX
18617     ) |
18618       sed "s/^/$as_me: WARNING:     /" >&2
18619     ;;
18620 esac
18621 echo "$as_me:$LINENO: checking for sys/shm.h" >&5
18622 echo $ECHO_N "checking for sys/shm.h... $ECHO_C" >&6
18623 if test "${ac_cv_header_sys_shm_h+set}" = set; then
18624   echo $ECHO_N "(cached) $ECHO_C" >&6
18625 else
18626   ac_cv_header_sys_shm_h=$ac_header_preproc
18627 fi
18628 echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
18629 echo "${ECHO_T}$ac_cv_header_sys_shm_h" >&6
18630
18631 fi
18632 if test $ac_cv_header_sys_shm_h = yes; then
18633   have_xshm=yes
18634 fi
18635
18636
18637   CPPFLAGS="$ac_save_CPPFLAGS"
18638   fi
18639
18640   # AIX is pathological, as usual: apparently it's normal for the Xshm headers
18641   # to exist, but the library code to not exist.  And even better, the library
18642   # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
18643   # lib doesn't exist, give up.  (This lib gets added to X_EXTRA_LIBS, and
18644   # that's not quite right, but close enough.)
18645   #
18646   case "$host" in
18647     *-aix*)
18648       if  `uname -v` -eq 3 ; then
18649         have_xshm=no
18650
18651   ac_save_CPPFLAGS="$CPPFLAGS"
18652   ac_save_LDFLAGS="$LDFLAGS"
18653 #  ac_save_LIBS="$LIBS"
18654
18655   if test \! -z "$includedir" ; then
18656     CPPFLAGS="$CPPFLAGS -I$includedir"
18657   fi
18658   # note: $X_CFLAGS includes $x_includes
18659   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18660
18661   if test \! -z "$libdir" ; then
18662     LDFLAGS="$LDFLAGS -L$libdir"
18663   fi
18664   # note: $X_LIBS includes $x_libraries
18665   LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
18666
18667   echo "$as_me:$LINENO: checking for XShmQueryExtension in -lXextSam" >&5
18668 echo $ECHO_N "checking for XShmQueryExtension in -lXextSam... $ECHO_C" >&6
18669 if test "${ac_cv_lib_XextSam_XShmQueryExtension+set}" = set; then
18670   echo $ECHO_N "(cached) $ECHO_C" >&6
18671 else
18672   ac_check_lib_save_LIBS=$LIBS
18673 LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
18674 cat >conftest.$ac_ext <<_ACEOF
18675 /* confdefs.h.  */
18676 _ACEOF
18677 cat confdefs.h >>conftest.$ac_ext
18678 cat >>conftest.$ac_ext <<_ACEOF
18679 /* end confdefs.h.  */
18680
18681 /* Override any gcc2 internal prototype to avoid an error.  */
18682 #ifdef __cplusplus
18683 extern "C"
18684 #endif
18685 /* We use char because int might match the return type of a gcc2
18686    builtin and then its argument prototype would still apply.  */
18687 char XShmQueryExtension ();
18688 int
18689 main ()
18690 {
18691 XShmQueryExtension ();
18692   ;
18693   return 0;
18694 }
18695 _ACEOF
18696 rm -f conftest.$ac_objext conftest$ac_exeext
18697 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18698   (eval $ac_link) 2>conftest.er1
18699   ac_status=$?
18700   grep -v '^ *+' conftest.er1 >conftest.err
18701   rm -f conftest.er1
18702   cat conftest.err >&5
18703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18704   (exit $ac_status); } &&
18705          { ac_try='test -z "$ac_c_werror_flag"
18706                          || test ! -s conftest.err'
18707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18708   (eval $ac_try) 2>&5
18709   ac_status=$?
18710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18711   (exit $ac_status); }; } &&
18712          { ac_try='test -s conftest$ac_exeext'
18713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18714   (eval $ac_try) 2>&5
18715   ac_status=$?
18716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18717   (exit $ac_status); }; }; then
18718   ac_cv_lib_XextSam_XShmQueryExtension=yes
18719 else
18720   echo "$as_me: failed program was:" >&5
18721 sed 's/^/| /' conftest.$ac_ext >&5
18722
18723 ac_cv_lib_XextSam_XShmQueryExtension=no
18724 fi
18725 rm -f conftest.err conftest.$ac_objext \
18726       conftest$ac_exeext conftest.$ac_ext
18727 LIBS=$ac_check_lib_save_LIBS
18728 fi
18729 echo "$as_me:$LINENO: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
18730 echo "${ECHO_T}$ac_cv_lib_XextSam_XShmQueryExtension" >&6
18731 if test $ac_cv_lib_XextSam_XShmQueryExtension = yes; then
18732   have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
18733 else
18734   true
18735 fi
18736
18737   CPPFLAGS="$ac_save_CPPFLAGS"
18738   LDFLAGS="$ac_save_LDFLAGS"
18739 #  LIBS="$ac_save_LIBS"
18740
18741       fi
18742     ;;
18743   esac
18744
18745   # if that succeeded, then we've really got it.
18746   if test "$have_xshm" = yes; then
18747     cat >>confdefs.h <<\_ACEOF
18748 #define HAVE_XSHM_EXTENSION 1
18749 _ACEOF
18750
18751   fi
18752
18753 elif test "$with_xshm" != no; then
18754   echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
18755   exit 1
18756 fi
18757
18758
18759 ###############################################################################
18760 #
18761 #       Check for the DOUBLE-BUFFER server extension.
18762 #
18763 ###############################################################################
18764
18765 have_xdbe=no
18766 with_xdbe_req=unspecified
18767
18768 # Check whether --with-xdbe-ext or --without-xdbe-ext was given.
18769 if test "${with_xdbe_ext+set}" = set; then
18770   withval="$with_xdbe_ext"
18771   with_xdbe="$withval"; with_xdbe_req="$withval"
18772 else
18773   with_xdbe=yes
18774 fi;
18775
18776
18777    case "$with_xdbe" in
18778     yes) ;;
18779     no)  ;;
18780
18781     /*)
18782      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER headers" >&5
18783 echo $ECHO_N "checking for DOUBLE-BUFFER headers... $ECHO_C" >&6
18784      d=$with_xdbe/include
18785      if test -d $d; then
18786        X_CFLAGS="-I$d $X_CFLAGS"
18787        echo "$as_me:$LINENO: result: $d" >&5
18788 echo "${ECHO_T}$d" >&6
18789      else
18790        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18791 echo "${ECHO_T}not found ($d: no such directory)" >&6
18792      fi
18793
18794      echo "$as_me:$LINENO: checking for DOUBLE-BUFFER libs" >&5
18795 echo $ECHO_N "checking for DOUBLE-BUFFER libs... $ECHO_C" >&6
18796      d=$with_xdbe/lib
18797      if test -d $d; then
18798        X_LIBS="-L$d $X_LIBS"
18799        echo "$as_me:$LINENO: result: $d" >&5
18800 echo "${ECHO_T}$d" >&6
18801      else
18802        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18803 echo "${ECHO_T}not found ($d: no such directory)" >&6
18804      fi
18805
18806      # replace the directory string with "yes".
18807      with_xdbe_req="yes"
18808      with_xdbe=$with_xdbe_req
18809      ;;
18810
18811     *)
18812      echo ""
18813      echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
18814      echo "       If it is a directory, then \`DIR/include' will be added to"
18815      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18816      exit 1
18817      ;;
18818    esac
18819
18820
18821 if test "$with_xdbe" = yes; then
18822
18823
18824   ac_save_CPPFLAGS="$CPPFLAGS"
18825   if test \! -z "$includedir" ; then
18826     CPPFLAGS="$CPPFLAGS -I$includedir"
18827   fi
18828   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18829   echo "$as_me:$LINENO: checking for X11/extensions/Xdbe.h" >&5
18830 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
18831 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
18832   echo $ECHO_N "(cached) $ECHO_C" >&6
18833 else
18834   cat >conftest.$ac_ext <<_ACEOF
18835 /* confdefs.h.  */
18836 _ACEOF
18837 cat confdefs.h >>conftest.$ac_ext
18838 cat >>conftest.$ac_ext <<_ACEOF
18839 /* end confdefs.h.  */
18840 #include <X11/Xlib.h>
18841
18842 #include <X11/extensions/Xdbe.h>
18843 _ACEOF
18844 rm -f conftest.$ac_objext
18845 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18846   (eval $ac_compile) 2>conftest.er1
18847   ac_status=$?
18848   grep -v '^ *+' conftest.er1 >conftest.err
18849   rm -f conftest.er1
18850   cat conftest.err >&5
18851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18852   (exit $ac_status); } &&
18853          { ac_try='test -z "$ac_c_werror_flag"
18854                          || test ! -s conftest.err'
18855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18856   (eval $ac_try) 2>&5
18857   ac_status=$?
18858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18859   (exit $ac_status); }; } &&
18860          { ac_try='test -s conftest.$ac_objext'
18861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18862   (eval $ac_try) 2>&5
18863   ac_status=$?
18864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18865   (exit $ac_status); }; }; then
18866   ac_cv_header_X11_extensions_Xdbe_h=yes
18867 else
18868   echo "$as_me: failed program was:" >&5
18869 sed 's/^/| /' conftest.$ac_ext >&5
18870
18871 ac_cv_header_X11_extensions_Xdbe_h=no
18872 fi
18873 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18874 fi
18875 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
18876 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
18877 if test $ac_cv_header_X11_extensions_Xdbe_h = yes; then
18878   have_xdbe=yes
18879 fi
18880
18881
18882   CPPFLAGS="$ac_save_CPPFLAGS"
18883   if test "$have_xdbe" = yes; then
18884     cat >>confdefs.h <<\_ACEOF
18885 #define HAVE_DOUBLE_BUFFER_EXTENSION 1
18886 _ACEOF
18887
18888   fi
18889
18890 elif test "$with_xdbe" != no; then
18891   echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
18892   exit 1
18893 fi
18894
18895
18896 ###############################################################################
18897 #
18898 #       Check for the SGI XReadDisplay server extension.
18899 #
18900 #       Note: this has to be down here, rather than up with the other server
18901 #       extension tests, so that the output of `configure --help' is in the
18902 #       right order.  Arrgh!
18903 #
18904 ###############################################################################
18905
18906 have_readdisplay=no
18907 with_readdisplay_req=unspecified
18908
18909 # Check whether --with-readdisplay or --without-readdisplay was given.
18910 if test "${with_readdisplay+set}" = set; then
18911   withval="$with_readdisplay"
18912   with_readdisplay="$withval"; with_readdisplay_req="$withval"
18913 else
18914   with_readdisplay=yes
18915 fi;
18916
18917
18918    case "$with_readdisplay" in
18919     yes) ;;
18920     no)  ;;
18921
18922     /*)
18923      echo "$as_me:$LINENO: checking for XReadDisplay headers" >&5
18924 echo $ECHO_N "checking for XReadDisplay headers... $ECHO_C" >&6
18925      d=$with_readdisplay/include
18926      if test -d $d; then
18927        X_CFLAGS="-I$d $X_CFLAGS"
18928        echo "$as_me:$LINENO: result: $d" >&5
18929 echo "${ECHO_T}$d" >&6
18930      else
18931        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18932 echo "${ECHO_T}not found ($d: no such directory)" >&6
18933      fi
18934
18935      echo "$as_me:$LINENO: checking for XReadDisplay libs" >&5
18936 echo $ECHO_N "checking for XReadDisplay libs... $ECHO_C" >&6
18937      d=$with_readdisplay/lib
18938      if test -d $d; then
18939        X_LIBS="-L$d $X_LIBS"
18940        echo "$as_me:$LINENO: result: $d" >&5
18941 echo "${ECHO_T}$d" >&6
18942      else
18943        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
18944 echo "${ECHO_T}not found ($d: no such directory)" >&6
18945      fi
18946
18947      # replace the directory string with "yes".
18948      with_readdisplay_req="yes"
18949      with_readdisplay=$with_readdisplay_req
18950      ;;
18951
18952     *)
18953      echo ""
18954      echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
18955      echo "       If it is a directory, then \`DIR/include' will be added to"
18956      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
18957      exit 1
18958      ;;
18959    esac
18960
18961
18962 if test "$with_readdisplay" = yes; then
18963
18964   ac_save_CPPFLAGS="$CPPFLAGS"
18965   if test \! -z "$includedir" ; then
18966     CPPFLAGS="$CPPFLAGS -I$includedir"
18967   fi
18968   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
18969   echo "$as_me:$LINENO: checking for X11/extensions/readdisplay.h" >&5
18970 echo $ECHO_N "checking for X11/extensions/readdisplay.h... $ECHO_C" >&6
18971 if test "${ac_cv_header_X11_extensions_readdisplay_h+set}" = set; then
18972   echo $ECHO_N "(cached) $ECHO_C" >&6
18973 else
18974   cat >conftest.$ac_ext <<_ACEOF
18975 /* confdefs.h.  */
18976 _ACEOF
18977 cat confdefs.h >>conftest.$ac_ext
18978 cat >>conftest.$ac_ext <<_ACEOF
18979 /* end confdefs.h.  */
18980 #include <X11/Xlib.h>
18981
18982 #include <X11/extensions/readdisplay.h>
18983 _ACEOF
18984 rm -f conftest.$ac_objext
18985 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18986   (eval $ac_compile) 2>conftest.er1
18987   ac_status=$?
18988   grep -v '^ *+' conftest.er1 >conftest.err
18989   rm -f conftest.er1
18990   cat conftest.err >&5
18991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18992   (exit $ac_status); } &&
18993          { ac_try='test -z "$ac_c_werror_flag"
18994                          || test ! -s conftest.err'
18995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18996   (eval $ac_try) 2>&5
18997   ac_status=$?
18998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18999   (exit $ac_status); }; } &&
19000          { ac_try='test -s conftest.$ac_objext'
19001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19002   (eval $ac_try) 2>&5
19003   ac_status=$?
19004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19005   (exit $ac_status); }; }; then
19006   ac_cv_header_X11_extensions_readdisplay_h=yes
19007 else
19008   echo "$as_me: failed program was:" >&5
19009 sed 's/^/| /' conftest.$ac_ext >&5
19010
19011 ac_cv_header_X11_extensions_readdisplay_h=no
19012 fi
19013 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19014 fi
19015 echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_readdisplay_h" >&5
19016 echo "${ECHO_T}$ac_cv_header_X11_extensions_readdisplay_h" >&6
19017 if test $ac_cv_header_X11_extensions_readdisplay_h = yes; then
19018   cat >>confdefs.h <<\_ACEOF
19019 #define HAVE_READ_DISPLAY_EXTENSION 1
19020 _ACEOF
19021
19022 fi
19023
19024
19025   CPPFLAGS="$ac_save_CPPFLAGS"
19026 elif test "$with_readdisplay" != no; then
19027   echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
19028   exit 1
19029 fi
19030
19031
19032 ###############################################################################
19033 #
19034 #       Check for a directory full of images to use as the default value
19035 #       of the "imageDirectory" preference.
19036 #
19037 ###############################################################################
19038
19039 have_imagedir=no
19040 with_imagedir_req=unspecified
19041
19042
19043 # Check whether --with-image-directory or --without-image-directory was given.
19044 if test "${with_image_directory+set}" = set; then
19045   withval="$with_image_directory"
19046   with_imagedir="$withval"; with_imagedir_req="$withval"
19047 else
19048   with_imagedir=yes
19049 fi;
19050 # no HANDLE_X_PATH_ARG for this one
19051
19052 case "$with_imagedir" in
19053   /*)
19054     # absolute path
19055     echo "$as_me:$LINENO: checking for image directory $with_imagedir" >&5
19056 echo $ECHO_N "checking for image directory $with_imagedir... $ECHO_C" >&6
19057     if test -d "$with_imagedir" ; then
19058       echo "$as_me:$LINENO: result: yes" >&5
19059 echo "${ECHO_T}yes" >&6
19060     else
19061       echo "$as_me:$LINENO: result: no" >&5
19062 echo "${ECHO_T}no" >&6
19063       with_imagedir=""
19064     fi
19065   ;;
19066   yes)
19067     with_imagedir=""
19068
19069     #### Could use some more defaults here...
19070     for dd in \
19071       "/usr/share/backgrounds/images/"          \
19072       "/usr/share/wallpapers/"                  \
19073       "/Library/Desktop Pictures/"              \
19074     ; do
19075       if test -z "$with_imagedir"; then
19076         echo "$as_me:$LINENO: checking for image directory $dd" >&5
19077 echo $ECHO_N "checking for image directory $dd... $ECHO_C" >&6
19078         if test -d "$dd" ; then
19079           echo "$as_me:$LINENO: result: yes" >&5
19080 echo "${ECHO_T}yes" >&6
19081           with_imagedir="$dd"
19082         else
19083           echo "$as_me:$LINENO: result: no" >&5
19084 echo "${ECHO_T}no" >&6
19085         fi
19086       fi
19087     done
19088
19089   ;;
19090   no)
19091     with_imagedir=""
19092   ;;
19093
19094   *)
19095     echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
19096     exit 1
19097   ;;
19098 esac
19099 ac_cv_imagedir="$with_imagedir"
19100
19101 DEFAULT_IMAGES_P='True'
19102 DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
19103
19104 if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
19105   DEFAULT_IMAGES_P='False'
19106 fi
19107
19108
19109 ###############################################################################
19110 #
19111 #       Check whether it's ok to install some hacks as setuid (e.g., "sonar")
19112 #       This should be safe, but let's give people the option.
19113 #
19114 ###############################################################################
19115
19116 setuid_hacks_default=no
19117 setuid_hacks="$setuid_hacks_default"
19118
19119 # Check whether --with-setuid-hacks or --without-setuid-hacks was given.
19120 if test "${with_setuid_hacks+set}" = set; then
19121   withval="$with_setuid_hacks"
19122   setuid_hacks="$withval"
19123 else
19124   setuid_hacks="$setuid_hacks_default"
19125 fi;
19126
19127
19128    case "$setuid_hacks" in
19129     yes) ;;
19130     no)  ;;
19131
19132     /*)
19133      echo "$as_me:$LINENO: checking for setuid hacks headers" >&5
19134 echo $ECHO_N "checking for setuid hacks headers... $ECHO_C" >&6
19135      d=$setuid_hacks/include
19136      if test -d $d; then
19137        X_CFLAGS="-I$d $X_CFLAGS"
19138        echo "$as_me:$LINENO: result: $d" >&5
19139 echo "${ECHO_T}$d" >&6
19140      else
19141        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19142 echo "${ECHO_T}not found ($d: no such directory)" >&6
19143      fi
19144
19145      echo "$as_me:$LINENO: checking for setuid hacks libs" >&5
19146 echo $ECHO_N "checking for setuid hacks libs... $ECHO_C" >&6
19147      d=$setuid_hacks/lib
19148      if test -d $d; then
19149        X_LIBS="-L$d $X_LIBS"
19150        echo "$as_me:$LINENO: result: $d" >&5
19151 echo "${ECHO_T}$d" >&6
19152      else
19153        echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
19154 echo "${ECHO_T}not found ($d: no such directory)" >&6
19155      fi
19156
19157      # replace the directory string with "yes".
19158      setuid_hacks_req="yes"
19159      setuid_hacks=$setuid_hacks_req
19160      ;;
19161
19162     *)
19163      echo ""
19164      echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
19165      echo "       If it is a directory, then \`DIR/include' will be added to"
19166      echo "       the -I list, and \`DIR/lib' will be added to the -L list."
19167      exit 1
19168      ;;
19169    esac
19170
19171
19172 if test "$setuid_hacks" = yes; then
19173   true
19174 elif test "$setuid_hacks" != no; then
19175   echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
19176   exit 1
19177 fi
19178
19179
19180 ###############################################################################
19181 #
19182 #       Done testing.  Now, set up the various -I and -L variables,
19183 #       and decide which GUI program to build by default.
19184 #
19185 ###############################################################################
19186
19187 DEPEND=makedepend
19188 DEPEND_FLAGS=
19189 DEPEND_DEFINES=
19190
19191
19192 if test \! -z "$includedir" ; then
19193   INCLUDES="$INCLUDES -I$includedir"
19194 fi
19195
19196 if test \! -z "$libdir" ; then
19197   LDFLAGS="$LDFLAGS -L$libdir"
19198 fi
19199
19200
19201 PREFERRED_DEMO_PROGRAM=''
19202 ALL_DEMO_PROGRAMS=
19203 if test "$have_motif" = yes; then
19204   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
19205   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
19206 fi
19207 if test "$have_gtk" = yes; then
19208   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
19209   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
19210 fi
19211
19212
19213 if test "$have_kerberos" = yes; then
19214   PASSWD_SRCS="$PASSWD_SRCS \$(KERBEROS_SRCS)"
19215   PASSWD_OBJS="$PASSWD_OBJS \$(KERBEROS_OBJS)"
19216 fi
19217 if test "$have_pam" = yes; then
19218   PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)"
19219   PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)"
19220   INSTALL_PAM="install-pam"
19221 fi
19222 if test "$have_passwd_helper" = yes; then
19223   PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)"
19224   PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)"
19225 fi
19226   PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)"
19227   PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)"
19228
19229
19230 if test "$enable_locking" = yes; then
19231   LOCK_SRCS='$(LOCK_SRCS_1) $(PASSWD_SRCS)'
19232   LOCK_OBJS='$(LOCK_OBJS_1) $(PASSWD_OBJS)'
19233 else
19234   LOCK_SRCS='$(NOLOCK_SRCS_1)'
19235   LOCK_OBJS='$(NOLOCK_OBJS_1)'
19236 fi
19237
19238 if test "$ac_macosx" = yes; then
19239   EXES_OSX='$(EXES_OSX)'
19240   SCRIPTS_OSX='$(SCRIPTS_OSX)'
19241   MEN_OSX='$(MEN_OSX)'
19242 else
19243   EXES_OSX=
19244   SCRIPTS_OSX=
19245   MEN_OSX=
19246 fi
19247
19248
19249 INSTALL_SETUID='$(INSTALL_PROGRAM) $(SUID_FLAGS)'
19250
19251 if test "$need_setuid" = yes; then
19252   NEED_SETUID=yes
19253 else
19254   NEED_SETUID=no
19255 fi
19256
19257 if test "$setuid_hacks" = yes; then
19258   SETUID_HACKS=yes
19259 else
19260   SETUID_HACKS=no
19261 fi
19262
19263 tab='   '
19264 if test "$have_gl" = yes; then
19265   GL_EXES='$(GL_EXES)'
19266   GL_UTIL_EXES='$(GL_UTIL_EXES)'
19267   GL_MEN='$(GL_MEN)'
19268   GL_KLUDGE="${tab}  "
19269 else
19270   GL_KLUDGE="-${tab}  "
19271 fi
19272
19273 if test "$have_gle" = yes; then
19274   GLE_EXES='$(GLE_EXES)'
19275   GLE_KLUDGE="${tab}   "
19276 else
19277   GLE_KLUDGE="-${tab}   "
19278 fi
19279
19280 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
19281  JPEG_EXES='$(JPEG_EXES)'
19282 fi
19283
19284
19285 # Another substitution in the XScreenSaver.ad.in file:
19286 #
19287 if test "$gnome_open_program" != ''; then
19288   GNOME24=''
19289   GNOME22='!    '
19290   NOGNOME='!    '
19291 elif test "$gnome_url_show_program" != ''; then
19292   GNOME24='!    '
19293   GNOME22=''
19294   NOGNOME='!    '
19295 else
19296   GNOME24='!    '
19297   GNOME22='!    '
19298   NOGNOME=''
19299 fi
19300
19301
19302 # Set PO_DATADIR to something sensible.
19303 #
19304 echo "$as_me:$LINENO: checking for locale directory" >&5
19305 echo $ECHO_N "checking for locale directory... $ECHO_C" >&6
19306 if test -n "$GTK_DATADIR" ; then
19307   PO_DATADIR="$GTK_DATADIR"
19308 elif test "$have_gtk" = yes; then
19309   PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
19310   PO_DATADIR="$PO_DATADIR/share"
19311 fi
19312
19313 if test -z "$PO_DATADIR" ; then
19314   #
19315   # #### Total fucking kludge --
19316   # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
19317   # but of course we need to expand all the nested variables to do that...
19318   #
19319   dd=$datadir
19320   eval dd=${dd}
19321   eval dd=${dd}
19322   eval dd=${dd}
19323   eval dd=${dd}
19324   eval dd=${dd}
19325   PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
19326 fi
19327
19328 echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5
19329 echo "${ECHO_T}$PO_DATADIR/locale" >&6
19330
19331
19332 # canonicalize slashes.
19333 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
19334
19335 # gcc 3.0 likes to issue this warning for every file:
19336 #
19337 # cc1: warning: changing search order for system directory "/usr/local/include"
19338 # cc1: warning:   as it has already been specified as a non-system directory
19339 #
19340 # Yay.  We can only avoid that by deleting "-I${prefix}/include" from the list.
19341 # Which *should* be totally redundant, and thus an ok thing to delete?
19342 #
19343 INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
19344
19345
19346 ###############################################################################
19347 #
19348 #       Perform substitutions and write Makefiles.
19349 #
19350 ###############################################################################
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410 APPDEFAULTS=$ac_x_app_defaults
19411
19412
19413
19414
19415
19416
19417
19418                                                                       ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad"
19419 cat >confcache <<\_ACEOF
19420 # This file is a shell script that caches the results of configure
19421 # tests run on this system so they can be shared between configure
19422 # scripts and configure runs, see configure's option --config-cache.
19423 # It is not useful on other systems.  If it contains results you don't
19424 # want to keep, you may remove or edit it.
19425 #
19426 # config.status only pays attention to the cache file if you give it
19427 # the --recheck option to rerun configure.
19428 #
19429 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19430 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19431 # following values.
19432
19433 _ACEOF
19434
19435 # The following way of writing the cache mishandles newlines in values,
19436 # but we know of no workaround that is simple, portable, and efficient.
19437 # So, don't put newlines in cache variables' values.
19438 # Ultrix sh set writes to stderr and can't be redirected directly,
19439 # and sets the high bit in the cache file unless we assign to the vars.
19440 {
19441   (set) 2>&1 |
19442     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19443     *ac_space=\ *)
19444       # `set' does not quote correctly, so add quotes (double-quote
19445       # substitution turns \\\\ into \\, and sed turns \\ into \).
19446       sed -n \
19447         "s/'/'\\\\''/g;
19448           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19449       ;;
19450     *)
19451       # `set' quotes correctly as required by POSIX, so do not add quotes.
19452       sed -n \
19453         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19454       ;;
19455     esac;
19456 } |
19457   sed '
19458      t clear
19459      : clear
19460      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19461      t end
19462      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19463      : end' >>confcache
19464 if diff $cache_file confcache >/dev/null 2>&1; then :; else
19465   if test -w $cache_file; then
19466     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19467     cat confcache >$cache_file
19468   else
19469     echo "not updating unwritable cache $cache_file"
19470   fi
19471 fi
19472 rm -f confcache
19473
19474 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19475 # Let make expand exec_prefix.
19476 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19477
19478 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19479 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19480 # trailing colons and then remove the whole line if VPATH becomes empty
19481 # (actually we leave an empty line to preserve line numbers).
19482 if test "x$srcdir" = x.; then
19483   ac_vpsub='/^[  ]*VPATH[        ]*=/{
19484 s/:*\$(srcdir):*/:/;
19485 s/:*\${srcdir}:*/:/;
19486 s/:*@srcdir@:*/:/;
19487 s/^\([^=]*=[     ]*\):*/\1/;
19488 s/:*$//;
19489 s/^[^=]*=[       ]*$//;
19490 }'
19491 fi
19492
19493 DEFS=-DHAVE_CONFIG_H
19494
19495 ac_libobjs=
19496 ac_ltlibobjs=
19497 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19498   # 1. Remove the extension, and $U if already installed.
19499   ac_i=`echo "$ac_i" |
19500          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
19501   # 2. Add them.
19502   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
19503   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
19504 done
19505 LIBOBJS=$ac_libobjs
19506
19507 LTLIBOBJS=$ac_ltlibobjs
19508
19509
19510
19511
19512         mv -f po/POTFILES po/POTFILES.tmp
19513         sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
19514         rm -f po/POTFILES.tmp
19515
19516
19517
19518 : ${CONFIG_STATUS=./config.status}
19519 ac_clean_files_save=$ac_clean_files
19520 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19521 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
19522 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19523 cat >$CONFIG_STATUS <<_ACEOF
19524 #! $SHELL
19525 # Generated by $as_me.
19526 # Run this file to recreate the current configuration.
19527 # Compiler output produced by configure, useful for debugging
19528 # configure, is in config.log if it exists.
19529
19530 debug=false
19531 ac_cs_recheck=false
19532 ac_cs_silent=false
19533 SHELL=\${CONFIG_SHELL-$SHELL}
19534 _ACEOF
19535
19536 cat >>$CONFIG_STATUS <<\_ACEOF
19537 ## --------------------- ##
19538 ## M4sh Initialization.  ##
19539 ## --------------------- ##
19540
19541 # Be Bourne compatible
19542 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19543   emulate sh
19544   NULLCMD=:
19545   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19546   # is contrary to our usage.  Disable this feature.
19547   alias -g '${1+"$@"}'='"$@"'
19548 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19549   set -o posix
19550 fi
19551 DUALCASE=1; export DUALCASE # for MKS sh
19552
19553 # Support unset when possible.
19554 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
19555   as_unset=unset
19556 else
19557   as_unset=false
19558 fi
19559
19560
19561 # Work around bugs in pre-3.0 UWIN ksh.
19562 $as_unset ENV MAIL MAILPATH
19563 PS1='$ '
19564 PS2='> '
19565 PS4='+ '
19566
19567 # NLS nuisances.
19568 for as_var in \
19569   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
19570   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
19571   LC_TELEPHONE LC_TIME
19572 do
19573   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
19574     eval $as_var=C; export $as_var
19575   else
19576     $as_unset $as_var
19577   fi
19578 done
19579
19580 # Required to use basename.
19581 if expr a : '\(a\)' >/dev/null 2>&1; then
19582   as_expr=expr
19583 else
19584   as_expr=false
19585 fi
19586
19587 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
19588   as_basename=basename
19589 else
19590   as_basename=false
19591 fi
19592
19593
19594 # Name of the executable.
19595 as_me=`$as_basename "$0" ||
19596 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19597          X"$0" : 'X\(//\)$' \| \
19598          X"$0" : 'X\(/\)$' \| \
19599          .     : '\(.\)' 2>/dev/null ||
19600 echo X/"$0" |
19601     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
19602           /^X\/\(\/\/\)$/{ s//\1/; q; }
19603           /^X\/\(\/\).*/{ s//\1/; q; }
19604           s/.*/./; q'`
19605
19606
19607 # PATH needs CR, and LINENO needs CR and PATH.
19608 # Avoid depending upon Character Ranges.
19609 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19610 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19611 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19612 as_cr_digits='0123456789'
19613 as_cr_alnum=$as_cr_Letters$as_cr_digits
19614
19615 # The user is always right.
19616 if test "${PATH_SEPARATOR+set}" != set; then
19617   echo "#! /bin/sh" >conf$$.sh
19618   echo  "exit 0"   >>conf$$.sh
19619   chmod +x conf$$.sh
19620   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
19621     PATH_SEPARATOR=';'
19622   else
19623     PATH_SEPARATOR=:
19624   fi
19625   rm -f conf$$.sh
19626 fi
19627
19628
19629   as_lineno_1=$LINENO
19630   as_lineno_2=$LINENO
19631   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19632   test "x$as_lineno_1" != "x$as_lineno_2" &&
19633   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
19634   # Find who we are.  Look in the path if we contain no path at all
19635   # relative or not.
19636   case $0 in
19637     *[\\/]* ) as_myself=$0 ;;
19638     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19639 for as_dir in $PATH
19640 do
19641   IFS=$as_save_IFS
19642   test -z "$as_dir" && as_dir=.
19643   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19644 done
19645
19646        ;;
19647   esac
19648   # We did not find ourselves, most probably we were run as `sh COMMAND'
19649   # in which case we are not to be found in the path.
19650   if test "x$as_myself" = x; then
19651     as_myself=$0
19652   fi
19653   if test ! -f "$as_myself"; then
19654     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
19655 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
19656    { (exit 1); exit 1; }; }
19657   fi
19658   case $CONFIG_SHELL in
19659   '')
19660     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19661 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
19662 do
19663   IFS=$as_save_IFS
19664   test -z "$as_dir" && as_dir=.
19665   for as_base in sh bash ksh sh5; do
19666          case $as_dir in
19667          /*)
19668            if ("$as_dir/$as_base" -c '
19669   as_lineno_1=$LINENO
19670   as_lineno_2=$LINENO
19671   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
19672   test "x$as_lineno_1" != "x$as_lineno_2" &&
19673   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
19674              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
19675              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
19676              CONFIG_SHELL=$as_dir/$as_base
19677              export CONFIG_SHELL
19678              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
19679            fi;;
19680          esac
19681        done
19682 done
19683 ;;
19684   esac
19685
19686   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
19687   # uniformly replaced by the line number.  The first 'sed' inserts a
19688   # line-number line before each line; the second 'sed' does the real
19689   # work.  The second script uses 'N' to pair each line-number line
19690   # with the numbered line, and appends trailing '-' during
19691   # substitution so that $LINENO is not a special case at line end.
19692   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
19693   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
19694   sed '=' <$as_myself |
19695     sed '
19696       N
19697       s,$,-,
19698       : loop
19699       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
19700       t loop
19701       s,-$,,
19702       s,^['$as_cr_digits']*\n,,
19703     ' >$as_me.lineno &&
19704   chmod +x $as_me.lineno ||
19705     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
19706 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
19707    { (exit 1); exit 1; }; }
19708
19709   # Don't try to exec as it changes $[0], causing all sort of problems
19710   # (the dirname of $[0] is not the place where we might find the
19711   # original and so on.  Autoconf is especially sensible to this).
19712   . ./$as_me.lineno
19713   # Exit status is that of the last command.
19714   exit
19715 }
19716
19717
19718 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
19719   *c*,-n*) ECHO_N= ECHO_C='
19720 ' ECHO_T='      ' ;;
19721   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
19722   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
19723 esac
19724
19725 if expr a : '\(a\)' >/dev/null 2>&1; then
19726   as_expr=expr
19727 else
19728   as_expr=false
19729 fi
19730
19731 rm -f conf$$ conf$$.exe conf$$.file
19732 echo >conf$$.file
19733 if ln -s conf$$.file conf$$ 2>/dev/null; then
19734   # We could just check for DJGPP; but this test a) works b) is more generic
19735   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19736   if test -f conf$$.exe; then
19737     # Don't use ln at all; we don't have any links
19738     as_ln_s='cp -p'
19739   else
19740     as_ln_s='ln -s'
19741   fi
19742 elif ln conf$$.file conf$$ 2>/dev/null; then
19743   as_ln_s=ln
19744 else
19745   as_ln_s='cp -p'
19746 fi
19747 rm -f conf$$ conf$$.exe conf$$.file
19748
19749 if mkdir -p . 2>/dev/null; then
19750   as_mkdir_p=:
19751 else
19752   test -d ./-p && rmdir ./-p
19753   as_mkdir_p=false
19754 fi
19755
19756 as_executable_p="test -f"
19757
19758 # Sed expression to map a string onto a valid CPP name.
19759 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19760
19761 # Sed expression to map a string onto a valid variable name.
19762 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19763
19764
19765 # IFS
19766 # We need space, tab and new line, in precisely that order.
19767 as_nl='
19768 '
19769 IFS="   $as_nl"
19770
19771 # CDPATH.
19772 $as_unset CDPATH
19773
19774 exec 6>&1
19775
19776 # Open the log real soon, to keep \$[0] and so on meaningful, and to
19777 # report actual input values of CONFIG_FILES etc. instead of their
19778 # values after options handling.  Logging --version etc. is OK.
19779 exec 5>>config.log
19780 {
19781   echo
19782   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19783 ## Running $as_me. ##
19784 _ASBOX
19785 } >&5
19786 cat >&5 <<_CSEOF
19787
19788 This file was extended by $as_me, which was
19789 generated by GNU Autoconf 2.59.  Invocation command line was
19790
19791   CONFIG_FILES    = $CONFIG_FILES
19792   CONFIG_HEADERS  = $CONFIG_HEADERS
19793   CONFIG_LINKS    = $CONFIG_LINKS
19794   CONFIG_COMMANDS = $CONFIG_COMMANDS
19795   $ $0 $@
19796
19797 _CSEOF
19798 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
19799 echo >&5
19800 _ACEOF
19801
19802 # Files that config.status was made for.
19803 if test -n "$ac_config_files"; then
19804   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19805 fi
19806
19807 if test -n "$ac_config_headers"; then
19808   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19809 fi
19810
19811 if test -n "$ac_config_links"; then
19812   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19813 fi
19814
19815 if test -n "$ac_config_commands"; then
19816   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19817 fi
19818
19819 cat >>$CONFIG_STATUS <<\_ACEOF
19820
19821 ac_cs_usage="\
19822 \`$as_me' instantiates files from templates according to the
19823 current configuration.
19824
19825 Usage: $0 [OPTIONS] [FILE]...
19826
19827   -h, --help       print this help, then exit
19828   -V, --version    print version number, then exit
19829   -q, --quiet      do not print progress messages
19830   -d, --debug      don't remove temporary files
19831       --recheck    update $as_me by reconfiguring in the same conditions
19832   --file=FILE[:TEMPLATE]
19833                    instantiate the configuration file FILE
19834   --header=FILE[:TEMPLATE]
19835                    instantiate the configuration header FILE
19836
19837 Configuration files:
19838 $config_files
19839
19840 Configuration headers:
19841 $config_headers
19842
19843 Configuration commands:
19844 $config_commands
19845
19846 Report bugs to <bug-autoconf@gnu.org>."
19847 _ACEOF
19848
19849 cat >>$CONFIG_STATUS <<_ACEOF
19850 ac_cs_version="\\
19851 config.status
19852 configured by $0, generated by GNU Autoconf 2.59,
19853   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19854
19855 Copyright (C) 2003 Free Software Foundation, Inc.
19856 This config.status script is free software; the Free Software Foundation
19857 gives unlimited permission to copy, distribute and modify it."
19858 srcdir=$srcdir
19859 INSTALL="$INSTALL"
19860 _ACEOF
19861
19862 cat >>$CONFIG_STATUS <<\_ACEOF
19863 # If no file are specified by the user, then we need to provide default
19864 # value.  By we need to know if files were specified by the user.
19865 ac_need_defaults=:
19866 while test $# != 0
19867 do
19868   case $1 in
19869   --*=*)
19870     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19871     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19872     ac_shift=:
19873     ;;
19874   -*)
19875     ac_option=$1
19876     ac_optarg=$2
19877     ac_shift=shift
19878     ;;
19879   *) # This is not an option, so the user has probably given explicit
19880      # arguments.
19881      ac_option=$1
19882      ac_need_defaults=false;;
19883   esac
19884
19885   case $ac_option in
19886   # Handling of the options.
19887 _ACEOF
19888 cat >>$CONFIG_STATUS <<\_ACEOF
19889   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19890     ac_cs_recheck=: ;;
19891   --version | --vers* | -V )
19892     echo "$ac_cs_version"; exit 0 ;;
19893   --he | --h)
19894     # Conflict between --help and --header
19895     { { echo "$as_me:$LINENO: error: ambiguous option: $1
19896 Try \`$0 --help' for more information." >&5
19897 echo "$as_me: error: ambiguous option: $1
19898 Try \`$0 --help' for more information." >&2;}
19899    { (exit 1); exit 1; }; };;
19900   --help | --hel | -h )
19901     echo "$ac_cs_usage"; exit 0 ;;
19902   --debug | --d* | -d )
19903     debug=: ;;
19904   --file | --fil | --fi | --f )
19905     $ac_shift
19906     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
19907     ac_need_defaults=false;;
19908   --header | --heade | --head | --hea )
19909     $ac_shift
19910     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
19911     ac_need_defaults=false;;
19912   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19913   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19914     ac_cs_silent=: ;;
19915
19916   # This is an error.
19917   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
19918 Try \`$0 --help' for more information." >&5
19919 echo "$as_me: error: unrecognized option: $1
19920 Try \`$0 --help' for more information." >&2;}
19921    { (exit 1); exit 1; }; } ;;
19922
19923   *) ac_config_targets="$ac_config_targets $1" ;;
19924
19925   esac
19926   shift
19927 done
19928
19929 ac_configure_extra_args=
19930
19931 if $ac_cs_silent; then
19932   exec 6>/dev/null
19933   ac_configure_extra_args="$ac_configure_extra_args --silent"
19934 fi
19935
19936 _ACEOF
19937 cat >>$CONFIG_STATUS <<_ACEOF
19938 if \$ac_cs_recheck; then
19939   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19940   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19941 fi
19942
19943 _ACEOF
19944
19945 cat >>$CONFIG_STATUS <<_ACEOF
19946 #
19947 # INIT-COMMANDS section.
19948 #
19949
19950 INTLTOOL_PERL=${INTLTOOL_PERL}
19951
19952
19953 _ACEOF
19954
19955
19956
19957 cat >>$CONFIG_STATUS <<\_ACEOF
19958 for ac_config_target in $ac_config_targets
19959 do
19960   case "$ac_config_target" in
19961   # Handling of arguments.
19962   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19963   "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
19964   "driver/Makefile" ) CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
19965   "hacks/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/Makefile" ;;
19966   "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;;
19967   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
19968   "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
19969   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
19970   "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
19971   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
19972   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19973 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19974    { (exit 1); exit 1; }; };;
19975   esac
19976 done
19977
19978 # If the user did not use the arguments to specify the items to instantiate,
19979 # then the envvar interface is used.  Set only those that are not.
19980 # We use the long form for the default assignment because of an extremely
19981 # bizarre bug on SunOS 4.1.3.
19982 if $ac_need_defaults; then
19983   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19984   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19985   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19986 fi
19987
19988 # Have a temporary directory for convenience.  Make it in the build tree
19989 # simply because there is no reason to put it here, and in addition,
19990 # creating and moving files from /tmp can sometimes cause problems.
19991 # Create a temporary directory, and hook for its removal unless debugging.
19992 $debug ||
19993 {
19994   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19995   trap '{ (exit 1); exit 1; }' 1 2 13 15
19996 }
19997
19998 # Create a (secure) tmp directory for tmp files.
19999
20000 {
20001   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
20002   test -n "$tmp" && test -d "$tmp"
20003 }  ||
20004 {
20005   tmp=./confstat$$-$RANDOM
20006   (umask 077 && mkdir $tmp)
20007 } ||
20008 {
20009    echo "$me: cannot create a temporary directory in ." >&2
20010    { (exit 1); exit 1; }
20011 }
20012
20013 _ACEOF
20014
20015 cat >>$CONFIG_STATUS <<_ACEOF
20016
20017 #
20018 # CONFIG_FILES section.
20019 #
20020
20021 # No need to generate the scripts if there are no CONFIG_FILES.
20022 # This happens for instance when ./config.status config.h
20023 if test -n "\$CONFIG_FILES"; then
20024   # Protect against being on the right side of a sed subst in config.status.
20025   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20026    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20027 s,@SHELL@,$SHELL,;t t
20028 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20029 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20030 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20031 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20032 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20033 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20034 s,@exec_prefix@,$exec_prefix,;t t
20035 s,@prefix@,$prefix,;t t
20036 s,@program_transform_name@,$program_transform_name,;t t
20037 s,@bindir@,$bindir,;t t
20038 s,@sbindir@,$sbindir,;t t
20039 s,@libexecdir@,$libexecdir,;t t
20040 s,@datadir@,$datadir,;t t
20041 s,@sysconfdir@,$sysconfdir,;t t
20042 s,@sharedstatedir@,$sharedstatedir,;t t
20043 s,@localstatedir@,$localstatedir,;t t
20044 s,@libdir@,$libdir,;t t
20045 s,@includedir@,$includedir,;t t
20046 s,@oldincludedir@,$oldincludedir,;t t
20047 s,@infodir@,$infodir,;t t
20048 s,@mandir@,$mandir,;t t
20049 s,@build_alias@,$build_alias,;t t
20050 s,@host_alias@,$host_alias,;t t
20051 s,@target_alias@,$target_alias,;t t
20052 s,@DEFS@,$DEFS,;t t
20053 s,@ECHO_C@,$ECHO_C,;t t
20054 s,@ECHO_N@,$ECHO_N,;t t
20055 s,@ECHO_T@,$ECHO_T,;t t
20056 s,@LIBS@,$LIBS,;t t
20057 s,@build@,$build,;t t
20058 s,@build_cpu@,$build_cpu,;t t
20059 s,@build_vendor@,$build_vendor,;t t
20060 s,@build_os@,$build_os,;t t
20061 s,@host@,$host,;t t
20062 s,@host_cpu@,$host_cpu,;t t
20063 s,@host_vendor@,$host_vendor,;t t
20064 s,@host_os@,$host_os,;t t
20065 s,@CC@,$CC,;t t
20066 s,@CFLAGS@,$CFLAGS,;t t
20067 s,@LDFLAGS@,$LDFLAGS,;t t
20068 s,@CPPFLAGS@,$CPPFLAGS,;t t
20069 s,@ac_ct_CC@,$ac_ct_CC,;t t
20070 s,@EXEEXT@,$EXEEXT,;t t
20071 s,@OBJEXT@,$OBJEXT,;t t
20072 s,@CPP@,$CPP,;t t
20073 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20074 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20075 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20076 s,@SET_MAKE@,$SET_MAKE,;t t
20077 s,@EGREP@,$EGREP,;t t
20078 s,@PERL@,$PERL,;t t
20079 s,@X_CFLAGS@,$X_CFLAGS,;t t
20080 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
20081 s,@X_LIBS@,$X_LIBS,;t t
20082 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
20083 s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t
20084 s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t
20085 s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t
20086 s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t
20087 s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t
20088 s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t
20089 s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t
20090 s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t
20091 s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t
20092 s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t
20093 s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t
20094 s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t
20095 s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t
20096 s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t
20097 s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t
20098 s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t
20099 s,@RANLIB@,$RANLIB,;t t
20100 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20101 s,@ALLOCA@,$ALLOCA,;t t
20102 s,@USE_NLS@,$USE_NLS,;t t
20103 s,@MSGFMT@,$MSGFMT,;t t
20104 s,@GMSGFMT@,$GMSGFMT,;t t
20105 s,@XGETTEXT@,$XGETTEXT,;t t
20106 s,@CATALOGS@,$CATALOGS,;t t
20107 s,@CATOBJEXT@,$CATOBJEXT,;t t
20108 s,@DATADIRNAME@,$DATADIRNAME,;t t
20109 s,@GMOFILES@,$GMOFILES,;t t
20110 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
20111 s,@INTLDEPS@,$INTLDEPS,;t t
20112 s,@INTLLIBS@,$INTLLIBS,;t t
20113 s,@INTLOBJS@,$INTLOBJS,;t t
20114 s,@POFILES@,$POFILES,;t t
20115 s,@POSUB@,$POSUB,;t t
20116 s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
20117 s,@login_manager_tmp@,$login_manager_tmp,;t t
20118 s,@pkg_config@,$pkg_config,;t t
20119 s,@gnome_open_program@,$gnome_open_program,;t t
20120 s,@gnome_url_show_program@,$gnome_url_show_program,;t t
20121 s,@INCLUDES@,$INCLUDES,;t t
20122 s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t
20123 s,@ALL_DEMO_PROGRAMS@,$ALL_DEMO_PROGRAMS,;t t
20124 s,@SAVER_LIBS@,$SAVER_LIBS,;t t
20125 s,@MOTIF_LIBS@,$MOTIF_LIBS,;t t
20126 s,@GTK_LIBS@,$GTK_LIBS,;t t
20127 s,@XML_LIBS@,$XML_LIBS,;t t
20128 s,@JPEG_LIBS@,$JPEG_LIBS,;t t
20129 s,@HACK_LIBS@,$HACK_LIBS,;t t
20130 s,@XPM_LIBS@,$XPM_LIBS,;t t
20131 s,@PTY_LIBS@,$PTY_LIBS,;t t
20132 s,@GL_LIBS@,$GL_LIBS,;t t
20133 s,@GLE_LIBS@,$GLE_LIBS,;t t
20134 s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t
20135 s,@XINERAMA_LIBS@,$XINERAMA_LIBS,;t t
20136 s,@PASSWD_LIBS@,$PASSWD_LIBS,;t t
20137 s,@INSTALL_SETUID@,$INSTALL_SETUID,;t t
20138 s,@SETUID_HACKS@,$SETUID_HACKS,;t t
20139 s,@INSTALL_DIRS@,$INSTALL_DIRS,;t t
20140 s,@NEED_SETUID@,$NEED_SETUID,;t t
20141 s,@INSTALL_PAM@,$INSTALL_PAM,;t t
20142 s,@NEW_LOGIN_COMMAND@,$NEW_LOGIN_COMMAND,;t t
20143 s,@NEW_LOGIN_COMMAND_P@,$NEW_LOGIN_COMMAND_P,;t t
20144 s,@DEFAULT_IMAGES_P@,$DEFAULT_IMAGES_P,;t t
20145 s,@DEFAULT_IMAGE_DIRECTORY@,$DEFAULT_IMAGE_DIRECTORY,;t t
20146 s,@OBJCC@,$OBJCC,;t t
20147 s,@EXES_OSX@,$EXES_OSX,;t t
20148 s,@SCRIPTS_OSX@,$SCRIPTS_OSX,;t t
20149 s,@MEN_OSX@,$MEN_OSX,;t t
20150 s,@PASSWD_SRCS@,$PASSWD_SRCS,;t t
20151 s,@PASSWD_OBJS@,$PASSWD_OBJS,;t t
20152 s,@XMU_SRCS@,$XMU_SRCS,;t t
20153 s,@XMU_OBJS@,$XMU_OBJS,;t t
20154 s,@XMU_LIBS@,$XMU_LIBS,;t t
20155 s,@SAVER_GL_SRCS@,$SAVER_GL_SRCS,;t t
20156 s,@SAVER_GL_OBJS@,$SAVER_GL_OBJS,;t t
20157 s,@SAVER_GL_LIBS@,$SAVER_GL_LIBS,;t t
20158 s,@LOCK_SRCS@,$LOCK_SRCS,;t t
20159 s,@LOCK_OBJS@,$LOCK_OBJS,;t t
20160 s,@JPEG_EXES@,$JPEG_EXES,;t t
20161 s,@GL_EXES@,$GL_EXES,;t t
20162 s,@GL_UTIL_EXES@,$GL_UTIL_EXES,;t t
20163 s,@GL_MEN@,$GL_MEN,;t t
20164 s,@GL_KLUDGE@,$GL_KLUDGE,;t t
20165 s,@GLE_EXES@,$GLE_EXES,;t t
20166 s,@GLE_KLUDGE@,$GLE_KLUDGE,;t t
20167 s,@GNOME24@,$GNOME24,;t t
20168 s,@GNOME22@,$GNOME22,;t t
20169 s,@NOGNOME@,$NOGNOME,;t t
20170 s,@HACKDIR@,$HACKDIR,;t t
20171 s,@GTK_DATADIR@,$GTK_DATADIR,;t t
20172 s,@PO_DATADIR@,$PO_DATADIR,;t t
20173 s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t
20174 s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t
20175 s,@APPDEFAULTS@,$APPDEFAULTS,;t t
20176 s,@DEPEND@,$DEPEND,;t t
20177 s,@DEPEND_FLAGS@,$DEPEND_FLAGS,;t t
20178 s,@DEPEND_DEFINES@,$DEPEND_DEFINES,;t t
20179 s,@LIBOBJS@,$LIBOBJS,;t t
20180 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
20181 CEOF
20182
20183 _ACEOF
20184
20185   cat >>$CONFIG_STATUS <<\_ACEOF
20186   # Split the substitutions into bite-sized pieces for seds with
20187   # small command number limits, like on Digital OSF/1 and HP-UX.
20188   ac_max_sed_lines=48
20189   ac_sed_frag=1 # Number of current file.
20190   ac_beg=1 # First line for current file.
20191   ac_end=$ac_max_sed_lines # Line after last line for current file.
20192   ac_more_lines=:
20193   ac_sed_cmds=
20194   while $ac_more_lines; do
20195     if test $ac_beg -gt 1; then
20196       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20197     else
20198       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20199     fi
20200     if test ! -s $tmp/subs.frag; then
20201       ac_more_lines=false
20202     else
20203       # The purpose of the label and of the branching condition is to
20204       # speed up the sed processing (if there are no `@' at all, there
20205       # is no need to browse any of the substitutions).
20206       # These are the two extra sed commands mentioned above.
20207       (echo ':t
20208   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20209       if test -z "$ac_sed_cmds"; then
20210         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20211       else
20212         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20213       fi
20214       ac_sed_frag=`expr $ac_sed_frag + 1`
20215       ac_beg=$ac_end
20216       ac_end=`expr $ac_end + $ac_max_sed_lines`
20217     fi
20218   done
20219   if test -z "$ac_sed_cmds"; then
20220     ac_sed_cmds=cat
20221   fi
20222 fi # test -n "$CONFIG_FILES"
20223
20224 _ACEOF
20225 cat >>$CONFIG_STATUS <<\_ACEOF
20226 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20227   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20228   case $ac_file in
20229   - | *:- | *:-:* ) # input from stdin
20230         cat >$tmp/stdin
20231         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20232         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20233   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20234         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20235   * )   ac_file_in=$ac_file.in ;;
20236   esac
20237
20238   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20239   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
20240 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20241          X"$ac_file" : 'X\(//\)[^/]' \| \
20242          X"$ac_file" : 'X\(//\)$' \| \
20243          X"$ac_file" : 'X\(/\)' \| \
20244          .     : '\(.\)' 2>/dev/null ||
20245 echo X"$ac_file" |
20246     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20247           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20248           /^X\(\/\/\)$/{ s//\1/; q; }
20249           /^X\(\/\).*/{ s//\1/; q; }
20250           s/.*/./; q'`
20251   { if $as_mkdir_p; then
20252     mkdir -p "$ac_dir"
20253   else
20254     as_dir="$ac_dir"
20255     as_dirs=
20256     while test ! -d "$as_dir"; do
20257       as_dirs="$as_dir $as_dirs"
20258       as_dir=`(dirname "$as_dir") 2>/dev/null ||
20259 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20260          X"$as_dir" : 'X\(//\)[^/]' \| \
20261          X"$as_dir" : 'X\(//\)$' \| \
20262          X"$as_dir" : 'X\(/\)' \| \
20263          .     : '\(.\)' 2>/dev/null ||
20264 echo X"$as_dir" |
20265     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20266           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20267           /^X\(\/\/\)$/{ s//\1/; q; }
20268           /^X\(\/\).*/{ s//\1/; q; }
20269           s/.*/./; q'`
20270     done
20271     test ! -n "$as_dirs" || mkdir $as_dirs
20272   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20273 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20274    { (exit 1); exit 1; }; }; }
20275
20276   ac_builddir=.
20277
20278 if test "$ac_dir" != .; then
20279   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
20280   # A "../" for each directory in $ac_dir_suffix.
20281   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
20282 else
20283   ac_dir_suffix= ac_top_builddir=
20284 fi
20285
20286 case $srcdir in
20287   .)  # No --srcdir option.  We are building in place.
20288     ac_srcdir=.
20289     if test -z "$ac_top_builddir"; then
20290        ac_top_srcdir=.
20291     else
20292        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
20293     fi ;;
20294   [\\/]* | ?:[\\/]* )  # Absolute path.
20295     ac_srcdir=$srcdir$ac_dir_suffix;
20296     ac_top_srcdir=$srcdir ;;
20297   *) # Relative path.
20298     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
20299     ac_top_srcdir=$ac_top_builddir$srcdir ;;
20300 esac
20301
20302 # Do not use `cd foo && pwd` to compute absolute paths, because
20303 # the directories may not exist.
20304 case `pwd` in
20305 .) ac_abs_builddir="$ac_dir";;
20306 *)
20307   case "$ac_dir" in
20308   .) ac_abs_builddir=`pwd`;;
20309   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
20310   *) ac_abs_builddir=`pwd`/"$ac_dir";;
20311   esac;;
20312 esac
20313 case $ac_abs_builddir in
20314 .) ac_abs_top_builddir=${ac_top_builddir}.;;
20315 *)
20316   case ${ac_top_builddir}. in
20317   .) ac_abs_top_builddir=$ac_abs_builddir;;
20318   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
20319   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
20320   esac;;
20321 esac
20322 case $ac_abs_builddir in
20323 .) ac_abs_srcdir=$ac_srcdir;;
20324 *)
20325   case $ac_srcdir in
20326   .) ac_abs_srcdir=$ac_abs_builddir;;
20327   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
20328   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
20329   esac;;
20330 esac
20331 case $ac_abs_builddir in
20332 .) ac_abs_top_srcdir=$ac_top_srcdir;;
20333 *)
20334   case $ac_top_srcdir in
20335   .) ac_abs_top_srcdir=$ac_abs_builddir;;
20336   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
20337   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
20338   esac;;
20339 esac
20340
20341
20342   case $INSTALL in
20343   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20344   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
20345   esac
20346
20347   if test x"$ac_file" != x-; then
20348     { echo "$as_me:$LINENO: creating $ac_file" >&5
20349 echo "$as_me: creating $ac_file" >&6;}
20350     rm -f "$ac_file"
20351   fi
20352   # Let's still pretend it is `configure' which instantiates (i.e., don't
20353   # use $as_me), people would be surprised to read:
20354   #    /* config.h.  Generated by config.status.  */
20355   if test x"$ac_file" = x-; then
20356     configure_input=
20357   else
20358     configure_input="$ac_file.  "
20359   fi
20360   configure_input=$configure_input"Generated from `echo $ac_file_in |
20361                                      sed 's,.*/,,'` by configure."
20362
20363   # First look for the input files in the build tree, otherwise in the
20364   # src tree.
20365   ac_file_inputs=`IFS=:
20366     for f in $ac_file_in; do
20367       case $f in
20368       -) echo $tmp/stdin ;;
20369       [\\/$]*)
20370          # Absolute (can't be DOS-style, as IFS=:)
20371          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20372 echo "$as_me: error: cannot find input file: $f" >&2;}
20373    { (exit 1); exit 1; }; }
20374          echo "$f";;
20375       *) # Relative
20376          if test -f "$f"; then
20377            # Build tree
20378            echo "$f"
20379          elif test -f "$srcdir/$f"; then
20380            # Source tree
20381            echo "$srcdir/$f"
20382          else
20383            # /dev/null tree
20384            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20385 echo "$as_me: error: cannot find input file: $f" >&2;}
20386    { (exit 1); exit 1; }; }
20387          fi;;
20388       esac
20389     done` || { (exit 1); exit 1; }
20390 _ACEOF
20391 cat >>$CONFIG_STATUS <<_ACEOF
20392   sed "$ac_vpsub
20393 $extrasub
20394 _ACEOF
20395 cat >>$CONFIG_STATUS <<\_ACEOF
20396 :t
20397 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20398 s,@configure_input@,$configure_input,;t t
20399 s,@srcdir@,$ac_srcdir,;t t
20400 s,@abs_srcdir@,$ac_abs_srcdir,;t t
20401 s,@top_srcdir@,$ac_top_srcdir,;t t
20402 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
20403 s,@builddir@,$ac_builddir,;t t
20404 s,@abs_builddir@,$ac_abs_builddir,;t t
20405 s,@top_builddir@,$ac_top_builddir,;t t
20406 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
20407 s,@INSTALL@,$ac_INSTALL,;t t
20408 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20409   rm -f $tmp/stdin
20410   if test x"$ac_file" != x-; then
20411     mv $tmp/out $ac_file
20412   else
20413     cat $tmp/out
20414     rm -f $tmp/out
20415   fi
20416
20417 done
20418 _ACEOF
20419 cat >>$CONFIG_STATUS <<\_ACEOF
20420
20421 #
20422 # CONFIG_HEADER section.
20423 #
20424
20425 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20426 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20427 #
20428 # ac_d sets the value in "#define NAME VALUE" lines.
20429 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
20430 ac_dB='[         ].*$,\1#\2'
20431 ac_dC=' '
20432 ac_dD=',;t'
20433 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20434 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20435 ac_uB='$,\1#\2define\3'
20436 ac_uC=' '
20437 ac_uD=',;t'
20438
20439 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20440   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20441   case $ac_file in
20442   - | *:- | *:-:* ) # input from stdin
20443         cat >$tmp/stdin
20444         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20445         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20446   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20447         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20448   * )   ac_file_in=$ac_file.in ;;
20449   esac
20450
20451   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
20452 echo "$as_me: creating $ac_file" >&6;}
20453
20454   # First look for the input files in the build tree, otherwise in the
20455   # src tree.
20456   ac_file_inputs=`IFS=:
20457     for f in $ac_file_in; do
20458       case $f in
20459       -) echo $tmp/stdin ;;
20460       [\\/$]*)
20461          # Absolute (can't be DOS-style, as IFS=:)
20462          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20463 echo "$as_me: error: cannot find input file: $f" >&2;}
20464    { (exit 1); exit 1; }; }
20465          # Do quote $f, to prevent DOS paths from being IFS'd.
20466          echo "$f";;
20467       *) # Relative
20468          if test -f "$f"; then
20469            # Build tree
20470            echo "$f"
20471          elif test -f "$srcdir/$f"; then
20472            # Source tree
20473            echo "$srcdir/$f"
20474          else
20475            # /dev/null tree
20476            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
20477 echo "$as_me: error: cannot find input file: $f" >&2;}
20478    { (exit 1); exit 1; }; }
20479          fi;;
20480       esac
20481     done` || { (exit 1); exit 1; }
20482   # Remove the trailing spaces.
20483   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
20484
20485 _ACEOF
20486
20487 # Transform confdefs.h into two sed scripts, `conftest.defines' and
20488 # `conftest.undefs', that substitutes the proper values into
20489 # config.h.in to produce config.h.  The first handles `#define'
20490 # templates, and the second `#undef' templates.
20491 # And first: Protect against being on the right side of a sed subst in
20492 # config.status.  Protect against being in an unquoted here document
20493 # in config.status.
20494 rm -f conftest.defines conftest.undefs
20495 # Using a here document instead of a string reduces the quoting nightmare.
20496 # Putting comments in sed scripts is not portable.
20497 #
20498 # `end' is used to avoid that the second main sed command (meant for
20499 # 0-ary CPP macros) applies to n-ary macro definitions.
20500 # See the Autoconf documentation for `clear'.
20501 cat >confdef2sed.sed <<\_ACEOF
20502 s/[\\&,]/\\&/g
20503 s,[\\$`],\\&,g
20504 t clear
20505 : clear
20506 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
20507 t end
20508 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
20509 : end
20510 _ACEOF
20511 # If some macros were called several times there might be several times
20512 # the same #defines, which is useless.  Nevertheless, we may not want to
20513 # sort them, since we want the *last* AC-DEFINE to be honored.
20514 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
20515 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
20516 rm -f confdef2sed.sed
20517
20518 # This sed command replaces #undef with comments.  This is necessary, for
20519 # example, in the case of _POSIX_SOURCE, which is predefined and required
20520 # on some systems where configure will not decide to define it.
20521 cat >>conftest.undefs <<\_ACEOF
20522 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
20523 _ACEOF
20524
20525 # Break up conftest.defines because some shells have a limit on the size
20526 # of here documents, and old seds have small limits too (100 cmds).
20527 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
20528 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
20529 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
20530 echo '  :' >>$CONFIG_STATUS
20531 rm -f conftest.tail
20532 while grep . conftest.defines >/dev/null
20533 do
20534   # Write a limited-size here document to $tmp/defines.sed.
20535   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
20536   # Speed up: don't consider the non `#define' lines.
20537   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
20538   # Work around the forget-to-reset-the-flag bug.
20539   echo 't clr' >>$CONFIG_STATUS
20540   echo ': clr' >>$CONFIG_STATUS
20541   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
20542   echo 'CEOF
20543   sed -f $tmp/defines.sed $tmp/in >$tmp/out
20544   rm -f $tmp/in
20545   mv $tmp/out $tmp/in
20546 ' >>$CONFIG_STATUS
20547   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
20548   rm -f conftest.defines
20549   mv conftest.tail conftest.defines
20550 done
20551 rm -f conftest.defines
20552 echo '  fi # grep' >>$CONFIG_STATUS
20553 echo >>$CONFIG_STATUS
20554
20555 # Break up conftest.undefs because some shells have a limit on the size
20556 # of here documents, and old seds have small limits too (100 cmds).
20557 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
20558 rm -f conftest.tail
20559 while grep . conftest.undefs >/dev/null
20560 do
20561   # Write a limited-size here document to $tmp/undefs.sed.
20562   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
20563   # Speed up: don't consider the non `#undef'
20564   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
20565   # Work around the forget-to-reset-the-flag bug.
20566   echo 't clr' >>$CONFIG_STATUS
20567   echo ': clr' >>$CONFIG_STATUS
20568   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
20569   echo 'CEOF
20570   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
20571   rm -f $tmp/in
20572   mv $tmp/out $tmp/in
20573 ' >>$CONFIG_STATUS
20574   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
20575   rm -f conftest.undefs
20576   mv conftest.tail conftest.undefs
20577 done
20578 rm -f conftest.undefs
20579
20580 cat >>$CONFIG_STATUS <<\_ACEOF
20581   # Let's still pretend it is `configure' which instantiates (i.e., don't
20582   # use $as_me), people would be surprised to read:
20583   #    /* config.h.  Generated by config.status.  */
20584   if test x"$ac_file" = x-; then
20585     echo "/* Generated by configure.  */" >$tmp/config.h
20586   else
20587     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
20588   fi
20589   cat $tmp/in >>$tmp/config.h
20590   rm -f $tmp/in
20591   if test x"$ac_file" != x-; then
20592     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
20593       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
20594 echo "$as_me: $ac_file is unchanged" >&6;}
20595     else
20596       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
20597 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20598          X"$ac_file" : 'X\(//\)[^/]' \| \
20599          X"$ac_file" : 'X\(//\)$' \| \
20600          X"$ac_file" : 'X\(/\)' \| \
20601          .     : '\(.\)' 2>/dev/null ||
20602 echo X"$ac_file" |
20603     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20604           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20605           /^X\(\/\/\)$/{ s//\1/; q; }
20606           /^X\(\/\).*/{ s//\1/; q; }
20607           s/.*/./; q'`
20608       { if $as_mkdir_p; then
20609     mkdir -p "$ac_dir"
20610   else
20611     as_dir="$ac_dir"
20612     as_dirs=
20613     while test ! -d "$as_dir"; do
20614       as_dirs="$as_dir $as_dirs"
20615       as_dir=`(dirname "$as_dir") 2>/dev/null ||
20616 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20617          X"$as_dir" : 'X\(//\)[^/]' \| \
20618          X"$as_dir" : 'X\(//\)$' \| \
20619          X"$as_dir" : 'X\(/\)' \| \
20620          .     : '\(.\)' 2>/dev/null ||
20621 echo X"$as_dir" |
20622     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20623           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20624           /^X\(\/\/\)$/{ s//\1/; q; }
20625           /^X\(\/\).*/{ s//\1/; q; }
20626           s/.*/./; q'`
20627     done
20628     test ! -n "$as_dirs" || mkdir $as_dirs
20629   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20630 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20631    { (exit 1); exit 1; }; }; }
20632
20633       rm -f $ac_file
20634       mv $tmp/config.h $ac_file
20635     fi
20636   else
20637     cat $tmp/config.h
20638     rm -f $tmp/config.h
20639   fi
20640 done
20641 _ACEOF
20642 cat >>$CONFIG_STATUS <<\_ACEOF
20643
20644 #
20645 # CONFIG_COMMANDS section.
20646 #
20647 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20648   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20649   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20650   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
20651 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20652          X"$ac_dest" : 'X\(//\)[^/]' \| \
20653          X"$ac_dest" : 'X\(//\)$' \| \
20654          X"$ac_dest" : 'X\(/\)' \| \
20655          .     : '\(.\)' 2>/dev/null ||
20656 echo X"$ac_dest" |
20657     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20658           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20659           /^X\(\/\/\)$/{ s//\1/; q; }
20660           /^X\(\/\).*/{ s//\1/; q; }
20661           s/.*/./; q'`
20662   { if $as_mkdir_p; then
20663     mkdir -p "$ac_dir"
20664   else
20665     as_dir="$ac_dir"
20666     as_dirs=
20667     while test ! -d "$as_dir"; do
20668       as_dirs="$as_dir $as_dirs"
20669       as_dir=`(dirname "$as_dir") 2>/dev/null ||
20670 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20671          X"$as_dir" : 'X\(//\)[^/]' \| \
20672          X"$as_dir" : 'X\(//\)$' \| \
20673          X"$as_dir" : 'X\(/\)' \| \
20674          .     : '\(.\)' 2>/dev/null ||
20675 echo X"$as_dir" |
20676     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20677           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20678           /^X\(\/\/\)$/{ s//\1/; q; }
20679           /^X\(\/\).*/{ s//\1/; q; }
20680           s/.*/./; q'`
20681     done
20682     test ! -n "$as_dirs" || mkdir $as_dirs
20683   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20684 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20685    { (exit 1); exit 1; }; }; }
20686
20687   ac_builddir=.
20688
20689 if test "$ac_dir" != .; then
20690   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
20691   # A "../" for each directory in $ac_dir_suffix.
20692   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
20693 else
20694   ac_dir_suffix= ac_top_builddir=
20695 fi
20696
20697 case $srcdir in
20698   .)  # No --srcdir option.  We are building in place.
20699     ac_srcdir=.
20700     if test -z "$ac_top_builddir"; then
20701        ac_top_srcdir=.
20702     else
20703        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
20704     fi ;;
20705   [\\/]* | ?:[\\/]* )  # Absolute path.
20706     ac_srcdir=$srcdir$ac_dir_suffix;
20707     ac_top_srcdir=$srcdir ;;
20708   *) # Relative path.
20709     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
20710     ac_top_srcdir=$ac_top_builddir$srcdir ;;
20711 esac
20712
20713 # Do not use `cd foo && pwd` to compute absolute paths, because
20714 # the directories may not exist.
20715 case `pwd` in
20716 .) ac_abs_builddir="$ac_dir";;
20717 *)
20718   case "$ac_dir" in
20719   .) ac_abs_builddir=`pwd`;;
20720   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
20721   *) ac_abs_builddir=`pwd`/"$ac_dir";;
20722   esac;;
20723 esac
20724 case $ac_abs_builddir in
20725 .) ac_abs_top_builddir=${ac_top_builddir}.;;
20726 *)
20727   case ${ac_top_builddir}. in
20728   .) ac_abs_top_builddir=$ac_abs_builddir;;
20729   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
20730   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
20731   esac;;
20732 esac
20733 case $ac_abs_builddir in
20734 .) ac_abs_srcdir=$ac_srcdir;;
20735 *)
20736   case $ac_srcdir in
20737   .) ac_abs_srcdir=$ac_abs_builddir;;
20738   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
20739   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
20740   esac;;
20741 esac
20742 case $ac_abs_builddir in
20743 .) ac_abs_top_srcdir=$ac_top_srcdir;;
20744 *)
20745   case $ac_top_srcdir in
20746   .) ac_abs_top_srcdir=$ac_abs_builddir;;
20747   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
20748   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
20749   esac;;
20750 esac
20751
20752
20753   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
20754 echo "$as_me: executing $ac_dest commands" >&6;}
20755   case $ac_dest in
20756     default-1 )
20757
20758 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
20759 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
20760   rm -f intltool-extract.out
20761 else
20762   mv -f intltool-extract.out intltool-extract
20763 fi
20764 chmod ugo+x intltool-extract
20765 chmod u+w intltool-extract
20766
20767 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
20768 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
20769   rm -f intltool-merge.out
20770 else
20771   mv -f intltool-merge.out intltool-merge
20772 fi
20773 chmod ugo+x intltool-merge
20774 chmod u+w intltool-merge
20775
20776 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
20777 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
20778   rm -f intltool-update.out
20779 else
20780   mv -f intltool-update.out intltool-update
20781 fi
20782 chmod ugo+x intltool-update
20783 chmod u+w intltool-update
20784
20785  ;;
20786     default-2 ) case "$CONFIG_FILES" in *po/Makefile.in*)
20787         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
20788       esac ;;
20789   esac
20790 done
20791 _ACEOF
20792
20793 cat >>$CONFIG_STATUS <<\_ACEOF
20794
20795 { (exit 0); exit 0; }
20796 _ACEOF
20797 chmod +x $CONFIG_STATUS
20798 ac_clean_files=$ac_clean_files_save
20799
20800
20801 # configure is writing to config.log, and then calls config.status.
20802 # config.status does its own redirection, appending to config.log.
20803 # Unfortunately, on DOS this fails, as config.log is still kept open
20804 # by configure, so config.status won't be able to write to it; its
20805 # output is simply discarded.  So we exec the FD to /dev/null,
20806 # effectively closing config.log, so it can be properly (re)opened and
20807 # appended to by config.status.  When coming back to configure, we
20808 # need to make the FD available again.
20809 if test "$no_create" != yes; then
20810   ac_cs_success=:
20811   ac_config_status_args=
20812   test "$silent" = yes &&
20813     ac_config_status_args="$ac_config_status_args --quiet"
20814   exec 5>/dev/null
20815   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20816   exec 5>>config.log
20817   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20818   # would make configure fail if this is the last instruction.
20819   $ac_cs_success || { (exit 1); exit 1; }
20820 fi
20821
20822
20823 ###############################################################################
20824 #
20825 #       Print some warnings at the end.
20826 #
20827 ###############################################################################
20828
20829 warn_prefix_1="    Warning:"
20830 warn_prefix_2="       Note:"
20831 warn_prefix="$warn_prefix_1"
20832
20833 warning=no
20834 warnsep='    #################################################################'
20835
20836 warnpre() {
20837   if test "$warning" = no ; then
20838     echo '' ; echo "$warnsep" ; echo ''
20839     warning=yes
20840   fi
20841 }
20842
20843 warn() {
20844   warnpre
20845   if test "$warning" = long ; then echo '' ; fi
20846   warning=yes
20847   rest="$@"
20848   echo "$warn_prefix $rest"
20849 }
20850
20851 warnL() {
20852   was=$warning
20853   warnpre
20854   warning=yes
20855   if test "$was" != no ; then echo '' ; fi
20856   rest="$@"
20857   echo "$warn_prefix $rest"
20858 }
20859
20860 warn2() {
20861   rest="$@"
20862   echo "             $rest"
20863   warning=long
20864 }
20865
20866 note() {
20867   warn_prefix="$warn_prefix_2"
20868   warn $@
20869   warn_prefix="$warn_prefix_1"
20870 }
20871
20872 noteL() {
20873   warn_prefix="$warn_prefix_2"
20874   warnL $@
20875   warn_prefix="$warn_prefix_1"
20876 }
20877
20878
20879 if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
20880   warn 'The SGI saver extension was requested, but was not found.'
20881 fi
20882
20883 if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
20884   warn 'The XIdle extension was requested, but was not found.'
20885 fi
20886
20887 if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
20888   warn 'The XSHM extension was requested, but was not found.'
20889 fi
20890
20891 if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
20892   warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
20893 fi
20894
20895 if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
20896   warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
20897 fi
20898
20899 if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
20900   warn 'The DPMS extension was requested, but was not found.'
20901 fi
20902
20903 if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
20904   warn 'The Xinerama extension was requested, but was not found.'
20905 fi
20906
20907 if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
20908   warn 'The XF86VMODE extension was requested, but was not found.'
20909 fi
20910
20911 if test "$with_randr_req" = yes -a "$have_randr" = no ; then
20912   warn 'The RANDR extension was requested, but was not found.'
20913 fi
20914
20915 if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
20916   warn "Checking of /proc/interrupts was requested, but it's bogus."
20917 fi
20918
20919 if test "$pkg_config" = false ; then
20920   warnL 'The "pkg-config" program was not found.  Without that,'
20921   warn2 "detection of the various GTK libraries won't work."
20922 else
20923   pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
20924   if test "x$pkgerr" != "x" ; then
20925     warnL 'The "pkg-config" program produces errors.  This often causes'
20926     warn2 "detection of the various GTK libraries to malfunction."
20927     warn2 "The errors are:"
20928     echo ''
20929     echo "$pkgerr" | sed 's/^/             > /g'
20930   fi
20931 fi
20932
20933 if test "$gtk_halfassed" != no ; then
20934   warnL "GTK version $gtk_halfassed was found, but at least one supporting"
20935   warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
20936   warn2 "Perhaps some of the development packages are not installed?"
20937   if test "$have_gtk" = yes ; then
20938     v="$ac_gtk_version_string"
20939     warn2 "GTK $v is also installed, so it will be used instead."
20940     warn2 "Please read the above output and the \`config.log' file"
20941     warn2 "for more details."
20942   fi
20943 fi
20944
20945 motif_warn2() {
20946   warn2 'Though the Motif front-end to xscreensaver is still'
20947   warn2 'maintained, it is no longer being updated with new'
20948   warn2 'features: all new development on the xscreensaver-demo'
20949   warn2 'program is happening in the GTK version, and not in the'
20950   warn2 'Motif version.  It is recommended that you build against'
20951   warn2 'GTK instead of Motif.  See <http://www.gtk.org/>.'
20952 }
20953
20954 if test "$have_motif" = no -a "$have_gtk" = no; then
20955
20956   if test "$with_motif" = yes; then
20957     warnL "Neither the GTK nor Motif libraries were found; the"
20958     warn2 "\`xscreensaver-demo' program requires one of these."
20959     echo ''
20960     motif_warn2
20961   else
20962     warnL "The GTK libraries do not seem to be available; the"
20963     warn2 "\`xscreensaver-demo' program requires them."
20964 #   echo ''
20965 #   warn2 'You can use Motif or Lesstif instead of GTK (use the'
20966 #   warn2 "\`--with-motif' option) but that is NOT recommended."
20967 #   motif_warn2
20968   fi
20969
20970 elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
20971   warnL "Use of Motif was requested, but it wasn't found;"
20972   warn2 "Gtk will be used instead."
20973
20974 elif test "$jurassic_gtk" = yes ; then
20975
20976   pref_gtk=2.0
20977
20978   v="$ac_gtk_version_string"
20979   if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
20980     warnL "Use of Gtk was requested, but its version number is unknown;"
20981   elif test "$with_gtk_req" = yes ; then
20982     warnL "Use of Gtk was requested, but it is version $v;"
20983   else
20984     warnL "Gtk was found on this system, but it is version $v;"
20985   fi
20986
20987   warn2 "Gtk $pref_gtk or newer is required."
20988
20989 elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
20990   warnL "Use of Gtk was requested, but it wasn't found."
20991 fi
20992
20993
20994 if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then
20995   warn  "GTK is being used, but the GDK-Pixbuf library and/or"
20996   warn2 "headers were not found.  That can't be good.  Please"
20997   warn2 "install the GDK-Pixbuf development kit and re-configure."
20998 fi
20999
21000 if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
21001
21002   preferred_lesstif=0.92
21003
21004   if test "$lesstif_version" = unknown; then
21005     warnL "Unable to determine the LessTif version number!"
21006     warn2 "Make sure you are using version $preferred_lesstif or newer."
21007     warn2 "See <http://www.lesstif.org/>."
21008
21009   elif test \! $lesstif_version -gt 82; then
21010     warnL "LessTif version $lesstif_version_string is being used."
21011     warn2 "LessTif versions 0.82 and earlier are too buggy to"
21012     warn2 "use with XScreenSaver; it is strongly recommended"
21013     warn2 "that you upgrade to at least version $preferred_lesstif!"
21014     warn2 "See <http://www.lesstif.org/>."
21015   fi
21016 fi
21017
21018
21019 if test "$have_motif" = yes -a "$have_gtk" = no ; then
21020   warn  'Motif is being used, and GTK is not.'
21021   echo  ''
21022   motif_warn2
21023 fi
21024
21025
21026 if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
21027   warnL 'Use of XPM was requested, but it was not found.'
21028 fi
21029
21030 if test "$with_gdk_pixbuf_req" = yes  -a "$have_gdk_pixbuf" = no; then
21031   warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
21032 fi
21033
21034 if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
21035    test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
21036
21037   if test "$with_gdk_pixbuf_req" = yes ; then
21038     true
21039   elif test "$with_gdk_pixbuf_req" = no ; then
21040     warnL 'The GDK-Pixbuf library is not being used.'
21041   else
21042     warnL 'The GDK-Pixbuf library was not found.'
21043   fi
21044
21045   if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
21046     true
21047   elif test "$with_xpm_req" = no ; then
21048     warnL 'The XPM library is not being used.'
21049   else
21050     warnL 'The XPM library was not found.'
21051   fi
21052
21053   if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
21054     warn2 'The XPM library is being used instead.'
21055   fi
21056
21057   if test "$gdk_pixbuf_halfassed" = yes ; then
21058     echo ''
21059     warn2 'More specifically, we found the headers, but not the'
21060     warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
21061     warn2 "system, or something else went wrong.  The \`config.log'"
21062     warn2 'file might contain some clues.'
21063   fi
21064
21065   echo ''
21066   warn2 'Some of the demos will not use images as much as they could.'
21067   warn2 'You should consider installing GDK-Pixbuf and re-running'
21068   warn2 'configure.  (GDK-Pixbuf is recommended over XPM, as it'
21069   warn2 'provides support for more image formats.)'
21070 fi
21071
21072
21073 if test "$have_jpeg" = no ; then
21074   if test "$with_jpeg_req" = yes ; then
21075     warnL 'Use of libjpeg was requested, but it was not found.'
21076   elif test "$with_jpeg_req" = no ; then
21077     noteL 'The JPEG library is not being used.'
21078   else
21079     noteL 'The JPEG library was not found.'
21080   fi
21081
21082   if test "$jpeg_halfassed" = yes ; then
21083     echo ''
21084     warn2 'More specifically, we found the headers, but not the'
21085     warn2 'library; so either JPEG is half-installed on this'
21086     warn2 "system, or something else went wrong.  The \`config.log'"
21087     warn2 'file might contain some clues.'
21088     echo ''
21089   fi
21090
21091   if test "$have_gdk_pixbuf" = no ; then
21092     warn2 "This means that it won't be possible for the image-manipulating"
21093     warn2 "display modes to load files from disk; and it also means that"
21094     warn2 "the \`webcollage' program will be much slower."
21095   else
21096     warn2 "This means the \`webcollage' program will be much slower."
21097   fi
21098 fi
21099
21100
21101 if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
21102   preferred_mesagl=3.4
21103   mgv="$ac_mesagl_version_string"
21104   pgl="$preferred_mesagl"
21105
21106   if test "$ac_mesagl_version" = unknown; then
21107     warnL "Unable to determine the MesaGL version number!"
21108     warn2 "Make sure you are using version $preferred_mesagl or newer."
21109
21110   elif test \! "$ac_mesagl_version" -gt 2006; then
21111     warnL "MesaGL version number is $mgv --"
21112     warn2 "MesaGL 2.6 and earlier have a security bug.  It is strongly"
21113     warn2 "recommended that you upgrade to at least version $preferred_mesagl."
21114
21115   elif test \! "$ac_mesagl_version" -gt 3003; then
21116     warnL "MesaGL version number is $mgv --"
21117     warn2 "MesaGL 3.3 and earlier have some bugs; it is recommended"
21118     warn2 "that you upgrade to $pgl or newer."
21119   fi
21120 fi
21121
21122 if test "$have_gl" = no ; then
21123   if test "$with_gl_req" = yes ; then
21124     warnL 'Use of GL was requested, but it was not found.'
21125   elif test "$with_gl_req" = no ; then
21126     noteL 'The OpenGL 3D library is not being used.'
21127   else
21128     noteL 'The OpenGL 3D library was not found.'
21129   fi
21130
21131   if test "$gl_halfassed" = yes ; then
21132     echo ''
21133     warn2 'More specifically, we found the headers, but not the'
21134     warn2 'libraries; so either GL is half-installed on this'
21135     warn2 "system, or something else went wrong.  The \`config.log'"
21136     warn2 'file might contain some clues.'
21137   fi
21138
21139   echo ''
21140   warn2 'Those demos which use 3D will not be built or installed.'
21141   warn2 'You might want to consider installing OpenGL and'
21142   warn2 "re-running configure.  If your vendor doesn't ship"
21143   warn2 'their own implementation of OpenGL, you can get a free'
21144   warn2 'version at <http://www.mesa3d.org/>.  For general OpenGL'
21145   warn2 'info, see <http://www.opengl.org/>.'
21146
21147 fi
21148
21149
21150 if test "$have_gl" = yes -a "$have_gle" = no ; then
21151
21152  # nobody cares about this; don't print the warning unless it was
21153  # requested and not found, or halfway-found.
21154  if test "$with_gle_req" = yes -o "$gle_halfassed" = yes ; then
21155
21156   if test "$with_gle_req" = yes ; then
21157     noteL 'Use of the GLE (GL Extrusion) library was requested, but'
21158     warn2 'it was not found (though the OpenGL library was found, and'
21159     warn2 'is being used.)'
21160   elif test "$with_gle_req" = no ; then
21161     noteL 'The OpenGL Library is being used, but the GLE (GL Extrusion)'
21162     warn2 'library is not.'
21163   else
21164     noteL 'The OpenGL Library was found, but the GLE (GL Extrusion)'
21165     warn2 'was not.'
21166   fi
21167
21168   if test "$gle_halfassed" = yes ; then
21169     echo ''
21170     warn2 'More specifically, we found the headers, but not the'
21171     warn2 'libraries; so either GLE is half-installed on this'
21172     warn2 "system, or something else went wrong.  The \`config.log'"
21173     warn2 'file might contain some clues.'
21174   fi
21175
21176   echo ''
21177   warn2 'Some of the OpenGL (3D) demos (those that depend on GLE)'
21178   warn2 'will not be built or installed.  You might want to consider'
21179   warn2 'installing GLE and re-running configure.  You can find the'
21180   warn2 'GLE library at <http://www.linas.org/gle/>.  For general'
21181   warn2 'OpenGL info, see <http://www.opengl.org/>.'
21182
21183  fi
21184 fi
21185
21186
21187 if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
21188   warn 'Use of XReadDisplay was requested, but it was not found.'
21189 fi
21190
21191 if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
21192   warn 'Use of Kerberos was requested, but it was not found.'
21193 fi
21194
21195 if test "$with_pam_req" = yes -a "$have_pam" = no ; then
21196   warn 'Use of PAM was requested, but it was not found.'
21197 fi
21198
21199 if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
21200   warn 'Use of shadow passwords was requested, but they were not found.'
21201 fi
21202
21203
21204 # You are in a twisty maze of namespaces and syntaxes, all alike.
21205 # Fuck the skull of Unix.
21206 #
21207 eval bindir=${bindir}
21208 eval bindir=${bindir}
21209 eval bindir=${bindir}
21210 eval bindir=${bindir}
21211 eval bindir=${bindir}
21212 eval bindir=${bindir}
21213 eval HACKDIR=${HACKDIR}
21214 eval HACKDIR=${HACKDIR}
21215 eval HACKDIR=${HACKDIR}
21216 eval HACKDIR=${HACKDIR}
21217 eval HACKDIR=${HACKDIR}
21218 eval HACKDIR=${HACKDIR}
21219 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21220 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21221 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21222 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21223 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21224 eval HACK_CONF_DIR=${HACK_CONF_DIR}
21225
21226 # canonicalize slashes.
21227 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
21228 HACKDIR=`echo "${HACKDIR}"             | sed 's@/$@@;s@//*@/@g'`
21229 HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
21230
21231
21232 # Sanity check the hackdir
21233 for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
21234   if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then
21235     echo ""
21236     { { echo "$as_me:$LINENO: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
21237                    There will be an executable installed with that name, so
21238                    that can't be the name of a directory as well.  Please
21239                    re-configure with a different directory name." >&5
21240 echo "$as_me: error: \"--with-hackdir=${bindir}/${bad_choice}\" won't work.
21241                    There will be an executable installed with that name, so
21242                    that can't be the name of a directory as well.  Please
21243                    re-configure with a different directory name." >&2;}
21244    { (exit 1); exit 1; }; }
21245   fi
21246 done
21247
21248
21249 do_dir_warning=no
21250
21251 # Now let's warn if there's a previous RPM version already installed.
21252 # But don't bother with this test if we are currently *building* an RPM.
21253
21254 if test -z "$RPM_PACKAGE_VERSION" ; then
21255
21256   rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
21257
21258   # M4 sucks!!
21259
21260   rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
21261         sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
21262         head -1`
21263
21264
21265   if test \! -z "$rpmv" ; then
21266     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
21267     rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/attraction$@\1@p'`
21268
21269     warning=no
21270     warnL "There is already an installed RPM of xscreensaver $rpmv"
21271     warn2 'on this system.  You might want to remove it ("rpm -ve")'
21272     warn2 'before running "make install" in this directory.'
21273     echo ""
21274     warn2 "Alternately, you could build this version of xscreensaver"
21275     warn2 'as an RPM, and then install that.  An "xscreensaver.spec"'
21276     warn2 'file is included.  Try "rpmbuild -v -ba xscreensaver.spec".'
21277     warn2 "See the RPM documentation for more info."
21278     echo ""
21279
21280     if test "$rpmbdir" = "$rpmhdir" ; then
21281       warn2 "The RPM version was installed in $rpmbdir/."
21282       do_dir_warning=yes
21283     else
21284       warn2 "The RPM version was installed in $rpmbdir/,"
21285       warn2 "with demos in $rpmhdir/."
21286     fi
21287   fi
21288 fi
21289
21290 if test "${bindir}" = "${HACKDIR}" ; then
21291   do_dir_warning=yes
21292 fi
21293
21294 if test "$do_dir_warning" = yes; then
21295   echo ""
21296   echo "$warnsep"
21297   echo ""
21298   echo '      When you run "make install", the "xscreensaver",'
21299   echo '      "xscreensaver-demo", and "xscreensaver-command" executables'
21300   echo "      will be installed in ${bindir}/."
21301   echo ""
21302   echo "      The various graphics demos (190+ different executables) will"
21303   echo "      be installed in ${HACKDIR}/."
21304   echo ""
21305   echo "      If you would prefer the demos to be installed elsewhere,"
21306   echo "      you should re-run configure with the --with-hackdir=DIR"
21307   echo "      option.  For more information, run \`./configure --help'."
21308   warning=yes
21309 fi
21310
21311 if test "$warning" != no; then
21312   echo '' ; echo "$warnsep" ; echo ''
21313 fi
21314
21315 if test "$do_dir_warning" = no; then
21316   if test "$warning" = no; then
21317     echo ''
21318   fi
21319   echo "User programs will be installed in ${bindir}/"
21320   echo "Screen savers will be installed in ${HACKDIR}/"
21321   echo "Configuration will be installed in ${HACK_CONF_DIR}/"
21322   echo ''
21323 fi